@univerjs-pro/thread-comment-datasource 0.8.2-nightly.202506231607 → 0.8.2-nightly.202506241607

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 _0x2d1a7d=_0x395b;(function(_0x2f46ca,_0xb8a413){const _0x44fe5c=_0x395b,_0x4f8c59=_0x2f46ca();while(!![]){try{const _0x12a0b9=parseInt(_0x44fe5c(0x215))/0x1+parseInt(_0x44fe5c(0x214))/0x2*(-parseInt(_0x44fe5c(0x20f))/0x3)+parseInt(_0x44fe5c(0x1b4))/0x4*(-parseInt(_0x44fe5c(0x1f1))/0x5)+parseInt(_0x44fe5c(0x1ed))/0x6*(-parseInt(_0x44fe5c(0x1ce))/0x7)+parseInt(_0x44fe5c(0x220))/0x8+-parseInt(_0x44fe5c(0x1b9))/0x9*(-parseInt(_0x44fe5c(0x1ca))/0xa)+-parseInt(_0x44fe5c(0x21e))/0xb*(parseInt(_0x44fe5c(0x1c7))/0xc);if(_0x12a0b9===_0xb8a413)break;else _0x4f8c59['push'](_0x4f8c59['shift']());}catch(_0x5f1316){_0x4f8c59['push'](_0x4f8c59['shift']());}}}(_0x1987,0x775c6));Object[_0x2d1a7d(0x227)](exports,Symbol[_0x2d1a7d(0x1cf)],{'value':_0x2d1a7d(0x1d4)});const b=require(_0x2d1a7d(0x1d1)),T=require(_0x2d1a7d(0x1fa)),c=require(_0x2d1a7d(0x1bc)),j=require(_0x2d1a7d(0x1b0)),M=require(_0x2d1a7d(0x1c5)),w=require('rxjs'),P=require(_0x2d1a7d(0x223)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xd9adce=>(_0xd9adce[_0xd9adce['OpenOrReOpen']=0x0]='OpenOrReOpen',_0xd9adce[_0xd9adce['Solved']=0x1]=_0x2d1a7d(0x1f2),_0xd9adce[_0xd9adce['UNRECOGNIZED']=-0x1]=_0x2d1a7d(0x1d3),_0xd9adce))(I||{}),v=(_0x4ac216=>(_0x4ac216[_0x4ac216['Unknown']=0x0]=_0x2d1a7d(0x207),_0x4ac216[_0x4ac216['Add']=0x1]=_0x2d1a7d(0x1d2),_0x4ac216[_0x4ac216[_0x2d1a7d(0x1ea)]=0x2]=_0x2d1a7d(0x1ea),_0x4ac216[_0x4ac216[_0x2d1a7d(0x200)]=0x3]=_0x2d1a7d(0x200),_0x4ac216[_0x4ac216[_0x2d1a7d(0x20e)]=0x4]=_0x2d1a7d(0x20e),_0x4ac216[_0x4ac216[_0x2d1a7d(0x1f3)]=0x5]=_0x2d1a7d(0x1f3),_0x4ac216[_0x4ac216[_0x2d1a7d(0x1d3)]=-0x1]=_0x2d1a7d(0x1d3),_0x4ac216))(v||{});function _0x395b(_0x27797a,_0x4eb4dc){const _0x198794=_0x1987();return _0x395b=function(_0x395b96,_0xa46777){_0x395b96=_0x395b96-0x1ad;let _0x71f17b=_0x198794[_0x395b96];return _0x71f17b;},_0x395b(_0x27797a,_0x4eb4dc);}const f=_0x3c8b77=>c[_0x2d1a7d(0x1e4)](new Date(+_0x3c8b77))[_0x2d1a7d(0x1da)](_0x2d1a7d(0x1ff)),R=async(_0x5443e4,_0x35b2cd)=>{const _0x25363b=_0x2d1a7d,_0x5e455a=_0x5443e4[_0x25363b(0x212)](c['UserManagerService']),_0xa862f2=_0x5443e4[_0x25363b(0x212)](P['HTTPService']);_0x35b2cd[_0x25363b(0x1f6)](_0x5438f0=>{const _0x337072=_0x25363b;_0x5e455a[_0x337072(0x1d5)](_0x5438f0)&&_0x35b2cd['delete'](_0x5438f0);}),_0x35b2cd[_0x25363b(0x1c3)]&&(await _0xa862f2[_0x25363b(0x212)]('/universer-api/user/list',{'params':{'userIDs':[..._0x35b2cd]}}))['body']['users'][_0x25363b(0x1f6)](_0x2b3065=>{const _0x5eb5b9=_0x25363b;_0x2b3065&&_0x5e455a[_0x5eb5b9(0x1bd)](_0x2b3065);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x1da798,_0x409c11,_0x201f4b,_0x4db47f)=>{const _0x45b756=_0x2d1a7d;for(var _0x50cadc=_0x4db47f>0x1?void 0x0:_0x4db47f?$(_0x409c11,_0x201f4b):_0x409c11,_0x19ec6c=_0x1da798[_0x45b756(0x1c1)]-0x1,_0x2d2355;_0x19ec6c>=0x0;_0x19ec6c--)(_0x2d2355=_0x1da798[_0x19ec6c])&&(_0x50cadc=_0x2d2355(_0x50cadc)||_0x50cadc);return _0x50cadc;},S=(_0x4b6625,_0x42dc85)=>(_0xffa3c7,_0x117a94)=>_0x42dc85(_0xffa3c7,_0x117a94,_0x4b6625);let p=class extends c[_0x2d1a7d(0x21c)]{constructor(_0x295fe7,_0x5cb031,_0x317eb7,_0x3695fc){const _0x282bbe=_0x2d1a7d;super(),this['_commentService']=_0x295fe7,this[_0x282bbe(0x1cb)]=_0x5cb031,this[_0x282bbe(0x1c9)]=_0x317eb7,this[_0x282bbe(0x1e3)]=_0x3695fc,this[_0x282bbe(0x1f5)](),this['_initUserSync']();}['_initUserSync'](){const _0x2324a8=_0x2d1a7d;this[_0x2324a8(0x1b3)](this[_0x2324a8(0x1cb)][_0x2324a8(0x226)][_0x2324a8(0x1e8)](w['bufferTime'](0x10))[_0x2324a8(0x1b7)](_0x57a2bb=>{const _0x206a6c=_0x2324a8,_0x1e1c32=new Set();_0x57a2bb['forEach'](_0x32d302=>{const _0x5c15c8=_0x395b;switch(_0x32d302[_0x5c15c8(0x1e1)]){case _0x5c15c8(0x1f4):{const _0x3149d7=_0x32d302['payload'][_0x5c15c8(0x21d)];_0x1e1c32[_0x5c15c8(0x1f4)](_0x3149d7);break;}}}),R(this[_0x206a6c(0x1e3)],_0x1e1c32);}));}[_0x2d1a7d(0x1f5)](){const _0x285e81=_0x2d1a7d;this[_0x285e81(0x1b3)](this[_0x285e81(0x1cd)]['commentUpdate$']['subscribe'](async _0x4042d2=>{const _0x553942=_0x285e81;var _0x51842,_0x596b87,_0x5f24e7,_0x48e5a5;const _0x39f44b=(_0x51842=this['_threadCommentModel'][_0x553942(0x1f9)](_0x4042d2[_0x553942(0x1c8)])[_0x553942(0x1eb)](_0x1b42f2=>_0x1b42f2[_0x553942(0x1cc)]===_0x4042d2[_0x553942(0x1cc)]))==null?void 0x0:_0x51842[_0x553942(0x218)];if(!_0x39f44b)return;const {unitId:_0x29f5cd,subUnitId:_0x447c39}=_0x39f44b;switch(_0x4042d2['user']&&this[_0x553942(0x1c9)][_0x553942(0x1bd)](_0x4042d2['user']),_0x4042d2[_0x553942(0x1e1)]){case v[_0x553942(0x1d2)]:break;case v[_0x553942(0x1ea)]:{this[_0x553942(0x1cb)][_0x553942(0x1c2)](_0x29f5cd,_0x447c39,{'unitId':_0x29f5cd,'subUnitId':_0x447c39,'ref':'','id':_0x4042d2[_0x553942(0x1c4)],'dT':f(+_0x4042d2[_0x553942(0x1f7)]),'threadId':_0x4042d2[_0x553942(0x1cc)],'personId':(_0x5f24e7=(_0x596b87=_0x4042d2[_0x553942(0x21a)])==null?void 0x0:_0x596b87[_0x553942(0x210)])!=null?_0x5f24e7:_0x4042d2[_0x553942(0x1d7)],'text':JSON[_0x553942(0x1ad)](_0x4042d2[_0x553942(0x1b8)]),'parentId':_0x39f44b['id']});break;}case v[_0x553942(0x20e)]:{const _0x4445eb=this[_0x553942(0x1cb)][_0x553942(0x1e2)](_0x29f5cd,_0x447c39,_0x4042d2['replyId']);_0x4445eb&&_0x4445eb['parentId']&&this[_0x553942(0x1cb)][_0x553942(0x1e0)](_0x29f5cd,_0x447c39,_0x4042d2[_0x553942(0x1c4)]);break;}case v[_0x553942(0x200)]:{this['_threadCommentModel']['updateComment'](_0x29f5cd,_0x447c39,{'commentId':_0x4042d2['replyId'],'text':JSON[_0x553942(0x1ad)](_0x4042d2[_0x553942(0x1b8)])});break;}case v[_0x553942(0x1f3)]:{const _0xcfe781=(_0x48e5a5=this[_0x553942(0x1cb)][_0x553942(0x1f9)](_0x4042d2[_0x553942(0x1c8)])['find'](_0x695e92=>_0x695e92['threadId']===_0x4042d2[_0x553942(0x1cc)]))==null?void 0x0:_0x48e5a5[_0x553942(0x218)];_0xcfe781&&this[_0x553942(0x1cb)][_0x553942(0x1f0)](_0x29f5cd,_0x447c39,_0xcfe781['id'],_0x4042d2[_0x553942(0x217)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x2d1a7d(0x1fb)](b[_0x2d1a7d(0x20a)])),S(0x1,c[_0x2d1a7d(0x1fb)](M[_0x2d1a7d(0x20c)])),S(0x2,c[_0x2d1a7d(0x1fb)](c[_0x2d1a7d(0x229)])),S(0x3,c[_0x2d1a7d(0x1fb)](c[_0x2d1a7d(0x1df)]))],p);function _0x1987(){const _0x3d4bd6=['IConfigService','UniverLicensePlugin','replies','UniverThreadCommentUIPlugin','DependentOn','rangeType','Unknown','dataSource','OpenOrReOpen','CommentService','body','ThreadCommentModel','reply','Delete','9PpxWOW','userID','_threadCommentDataSourceService','get','CustomRangeType','354638uUuuiZ','734761fOnqKz','pluginName','solved','root','ref','user','/solved','Disposable','personId','11wSpvpR','UNIVER_UNKNOWN','2397080jHLAto','_httpService','setConfig','@univerjs/network','/universer-api/comment/unit/','/edit','commentUpdate$','defineProperty','saveCommentToSnapshot','UserManagerService','listComments','code','parse','_threadCommentDataSource','error','@univerjs/thread-comment-ui','_configService','map','disposeWithMe','140yPEKIh','rangeId','getOwnPropertyDescriptor','subscribe','content','9cUvITL','UniverCollaborationClientPlugin','HTTPService','@univerjs/core','addUser','IThreadCommentDataSourceService','slice','Plugin','length','addComment','size','replyId','@univerjs/thread-comment','_initDataSource','1016700NmpoZx','unitId','_userService','9186990KpVapT','_threadCommentModel','threadId','_commentService','49jtOyrg','toStringTag','getCurrentUser','@univerjs-pro/collaboration-client','Add','UNRECOGNIZED','Module','getUser','COMMENT','userId','users','updateComment','format','_config','values','requireSession','thread-comment-data-source.config','Injector','deleteComment','type','getComment','_injector','dayjs','stringify','onReady','_sessionService','pipe','syncUpdateMutationToColla','Reply','find','post','689358GeEnll','getMemberID','UniverInstanceType','resolveComment','6180UURTTb','Solved','Solve','add','_init','forEach','createTimestamp','symbol','getUnit','@univerjs-pro/license','Inject','UniverThreadCommentDataSourcePlugin','filter','/add','YYYY/MM/DD\x20HH:mm','Edit'];_0x1987=function(){return _0x3d4bd6;};return _0x1987();}const q=_0x2d1a7d(0x1de),D={};var A=Object[_0x2d1a7d(0x1b6)],x=(_0x333dc9,_0x1533dd,_0x4d62b9,_0x3aa077)=>{const _0x378b7e=_0x2d1a7d;for(var _0x36aa2b=_0x3aa077>0x1?void 0x0:_0x3aa077?A(_0x1533dd,_0x4d62b9):_0x1533dd,_0x3c557e=_0x333dc9[_0x378b7e(0x1c1)]-0x1,_0x2e8f1b;_0x3c557e>=0x0;_0x3c557e--)(_0x2e8f1b=_0x333dc9[_0x3c557e])&&(_0x36aa2b=_0x2e8f1b(_0x36aa2b)||_0x36aa2b);return _0x36aa2b;},_=(_0x351a5c,_0x1907b0)=>(_0x5110cb,_0x2827b2)=>_0x1907b0(_0x5110cb,_0x2827b2,_0x351a5c);function Y(_0x20092c,_0x1cc4a4){const _0x6ede17=_0x2d1a7d,_0x3b72ca=_0x20092c['replies'][0x0];return{..._0x1cc4a4,'id':_0x3b72ca[_0x6ede17(0x1c4)],'resolved':_0x20092c[_0x6ede17(0x217)]===0x1,'dT':f(_0x3b72ca['createTimestamp']),'personId':_0x3b72ca[_0x6ede17(0x1d7)],'threadId':_0x3b72ca[_0x6ede17(0x1cc)]};}function G(_0x37cf27,_0x951fab,_0x2a1f17){const _0x2563e7=_0x2d1a7d;var _0x1bf6b4,_0x1c7998;if(((_0x1c7998=(_0x1bf6b4=_0x37cf27==null?void 0x0:_0x37cf27[_0x2563e7(0x203)])==null?void 0x0:_0x1bf6b4[_0x2563e7(0x1c1)])!=null?_0x1c7998:0x0)>0x0){const _0x30d0a2=(_0x67ab01,_0x6dd411)=>({'id':_0x67ab01[_0x2563e7(0x1c4)],'threadId':_0x67ab01[_0x2563e7(0x1cc)],'dT':f(_0x67ab01[_0x2563e7(0x1f7)]),'personId':_0x67ab01[_0x2563e7(0x1d7)],'resolved':_0x37cf27[_0x2563e7(0x217)]===I['Solved'],'unitId':_0x951fab,'subUnitId':_0x2a1f17,'text':JSON[_0x2563e7(0x1ad)](_0x67ab01[_0x2563e7(0x1b8)]),'parentId':_0x6dd411}),_0x37a05a=_0x30d0a2(_0x37cf27[_0x2563e7(0x203)][0x0]);return{..._0x37a05a,'children':_0x37cf27[_0x2563e7(0x203)][_0x2563e7(0x1bf)](0x1)[_0x2563e7(0x1b2)](_0x59c9ea=>_0x30d0a2(_0x59c9ea,_0x37a05a['id']))};}return null;}let g=class{constructor(_0x591f30,_0x22e768,_0x1c706b,_0x45e3db){const _0x11cb20=_0x2d1a7d;this[_0x11cb20(0x221)]=_0x591f30,this['_userService']=_0x22e768,this[_0x11cb20(0x1e7)]=_0x1c706b,this[_0x11cb20(0x1e3)]=_0x45e3db;}async['addComment'](_0xfa86e0){const _0x1e4ce6=_0x2d1a7d;var _0x24c045,_0x5dad89;const {parentId:_0x11f2c6,unitId:_0xc56f50,text:_0xf79741,threadId:_0x5ff5c0}=_0xfa86e0,_0x519dae=(_0x5dad89=(_0x24c045=_0xf79741['customRanges'])==null?void 0x0:_0x24c045[_0x1e4ce6(0x1fd)](_0x340c91=>_0x340c91[_0x1e4ce6(0x206)]===c[_0x1e4ce6(0x213)][_0x1e4ce6(0x1d6)])[_0x1e4ce6(0x1b2)](_0x44140f=>_0x44140f['rangeId']))!=null?_0x5dad89:[],_0x47aaba=JSON[_0x1e4ce6(0x1e5)](_0xf79741),_0x1aee77=(await this[_0x1e4ce6(0x1e7)]['requireSession'](_0xc56f50))[_0x1e4ce6(0x1ee)]();if(_0x11f2c6){const _0x19e8f9={'memberId':_0x1aee77,'unitId':_0xc56f50,'content':_0x47aaba,'mention':_0x519dae,'threadId':_0x5ff5c0},_0x1cbe43=(await this['_httpService'][_0x1e4ce6(0x1ec)](_0x1e4ce6(0x224)+_0xc56f50+'/reply',{'body':_0x19e8f9}))[_0x1e4ce6(0x20b)][_0x1e4ce6(0x20d)];return{..._0xfa86e0,'id':_0x1cbe43[_0x1e4ce6(0x1c4)],'dT':c[_0x1e4ce6(0x1e4)](+_0x1cbe43[_0x1e4ce6(0x1f7)])['format'](_0x1e4ce6(0x1ff)),'personId':_0x1cbe43['userId']};}else{const _0x239060={'memberId':_0x1aee77,'unitId':_0xc56f50,'content':_0x47aaba,'mention':_0x519dae},_0x4b7af8=await this[_0x1e4ce6(0x221)][_0x1e4ce6(0x1ec)](_0x1e4ce6(0x224)+_0xc56f50+_0x1e4ce6(0x1fe),{'body':_0x239060});return Y(_0x4b7af8[_0x1e4ce6(0x20b)]['comment'],_0xfa86e0);}}async[_0x2d1a7d(0x1d9)](_0x51a3ed){const _0x1fcb62=_0x2d1a7d;var _0x3c560a,_0x36fb19;const {text:_0x2555bb,unitId:_0x46bd4d}=_0x51a3ed,_0x4e037c=(_0x36fb19=(_0x3c560a=_0x2555bb['customRanges'])==null?void 0x0:_0x3c560a[_0x1fcb62(0x1fd)](_0x4eebcd=>_0x4eebcd[_0x1fcb62(0x206)]===c['CustomRangeType'][_0x1fcb62(0x1d6)])[_0x1fcb62(0x1b2)](_0x47dc93=>_0x47dc93[_0x1fcb62(0x1b5)]))!=null?_0x36fb19:[],_0x18bc85=JSON[_0x1fcb62(0x1e5)](_0x2555bb),_0x58efba=_0x51a3ed[_0x1fcb62(0x1cc)],_0x380d9f=_0x51a3ed['id'],_0x408882={'memberId':(await this[_0x1fcb62(0x1e7)][_0x1fcb62(0x1dd)](_0x46bd4d))['getMemberID'](),'unitId':_0x46bd4d,'threadId':_0x58efba,'mention':_0x4e037c,'content':_0x18bc85,'replyId':_0x380d9f},_0x573915=await this[_0x1fcb62(0x221)][_0x1fcb62(0x1ec)]('/universer-api/comment/unit/'+_0x46bd4d+_0x1fcb62(0x225),{'body':_0x408882});return!_0x573915['body'][_0x1fcb62(0x1af)]||_0x573915[_0x1fcb62(0x20b)][_0x1fcb62(0x1af)][_0x1fcb62(0x22b)]===0x1;}async[_0x2d1a7d(0x1f0)](_0x11c70){const _0x43d181=_0x2d1a7d,{unitId:_0x3bfbf2}=_0x11c70,_0x993c4=_0x11c70[_0x43d181(0x1cc)],_0x12a50c={'memberId':this[_0x43d181(0x1c9)][_0x43d181(0x1d0)]()[_0x43d181(0x210)],'unitId':_0x3bfbf2,'threadId':_0x993c4,'solved':_0x11c70['resolved']?I[_0x43d181(0x1f2)]:I[_0x43d181(0x209)]},_0x3b26f8=await this[_0x43d181(0x221)]['post'](_0x43d181(0x224)+_0x3bfbf2+_0x43d181(0x21b),{'body':_0x12a50c});return!_0x3b26f8[_0x43d181(0x20b)][_0x43d181(0x1af)]||_0x3b26f8[_0x43d181(0x20b)][_0x43d181(0x1af)]['code']===0x1;}async[_0x2d1a7d(0x1e0)](_0x3d91a7,_0x5714d2,_0x1507a0,_0x3f8d9a){const _0x30059d=_0x2d1a7d,_0x50e592={'memberId':(await this[_0x30059d(0x1e7)][_0x30059d(0x1dd)](_0x3d91a7))['getMemberID'](),'threadId':_0x1507a0,'replyId':_0x3f8d9a,'unitId':_0x3d91a7},_0x2d9844=await this[_0x30059d(0x221)][_0x30059d(0x1ec)](_0x30059d(0x224)+_0x3d91a7+'/delete',{'body':_0x50e592});return!_0x2d9844[_0x30059d(0x20b)][_0x30059d(0x1af)]||_0x2d9844[_0x30059d(0x20b)]['error']['code']===0x1;}async[_0x2d1a7d(0x22a)](_0x4144c9,_0x5d81bc,_0x51d1a7){const _0x3ef3b9=_0x2d1a7d,_0x1093a8={'unitId':_0x4144c9,'threadId':_0x51d1a7},_0x15749c=await this['_httpService'][_0x3ef3b9(0x1ec)](_0x3ef3b9(0x224)+_0x4144c9+'/list',{'body':_0x1093a8}),_0x14fdb8=_0x51d1a7['map'](_0x4c132c=>G(_0x15749c[_0x3ef3b9(0x20b)]['comments'][_0x4c132c],_0x4144c9,_0x5d81bc))[_0x3ef3b9(0x1fd)](Boolean);return Object[_0x3ef3b9(0x1dc)](_0x15749c[_0x3ef3b9(0x20b)][_0x3ef3b9(0x1d8)])['forEach'](_0x433d8b=>{const _0x1fc365=_0x3ef3b9;this[_0x1fc365(0x1c9)][_0x1fc365(0x1bd)](_0x433d8b);}),_0x14fdb8;}[_0x2d1a7d(0x228)](_0x1475f8){const _0x371f51=_0x2d1a7d;return{'id':_0x1475f8['id'],'threadId':_0x1475f8['threadId'],'ref':_0x1475f8[_0x371f51(0x219)]};}};g=x([_(0x0,c['Inject'](P[_0x2d1a7d(0x1bb)])),_(0x1,c[_0x2d1a7d(0x1fb)](c[_0x2d1a7d(0x229)])),_(0x2,c['Inject'](b['CollaborationSessionService'])),_(0x3,c[_0x2d1a7d(0x1fb)](c[_0x2d1a7d(0x1df)]))],g);var H=Object[_0x2d1a7d(0x1b6)],J=(_0x16c0de,_0x562a08,_0x56c75e,_0x1f4e43)=>{const _0x5b056a=_0x2d1a7d;for(var _0x4be837=_0x1f4e43>0x1?void 0x0:_0x1f4e43?H(_0x562a08,_0x56c75e):_0x562a08,_0x186262=_0x16c0de[_0x5b056a(0x1c1)]-0x1,_0x242706;_0x186262>=0x0;_0x186262--)(_0x242706=_0x16c0de[_0x186262])&&(_0x4be837=_0x242706(_0x4be837)||_0x4be837);return _0x4be837;},y=(_0x368103,_0x52ea4a)=>(_0x3a4de3,_0x1bfb73)=>_0x52ea4a(_0x3a4de3,_0x1bfb73,_0x368103);let C=class extends c[_0x2d1a7d(0x21c)]{constructor(_0x35d41b,_0x17f89c){const _0xc8fc70=_0x2d1a7d;super(),this[_0xc8fc70(0x211)]=_0x35d41b,this['_threadCommentDataSource']=_0x17f89c,this[_0xc8fc70(0x1c6)]();}[_0x2d1a7d(0x1c6)](){const _0x3b16c4=_0x2d1a7d;this[_0x3b16c4(0x211)][_0x3b16c4(0x208)]=this[_0x3b16c4(0x1ae)],this[_0x3b16c4(0x211)][_0x3b16c4(0x1e9)]=!0x1;}};C=J([y(0x0,M[_0x2d1a7d(0x1be)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x2d1a7d(0x227)],L=Object[_0x2d1a7d(0x1b6)],Z=(_0x5766e5,_0x14ea90,_0x3735a5)=>_0x14ea90 in _0x5766e5?F(_0x5766e5,_0x14ea90,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3735a5}):_0x5766e5[_0x14ea90]=_0x3735a5,W=(_0x55a7b5,_0x19697a,_0x420b5d,_0x17de18)=>{const _0x4c8cfd=_0x2d1a7d;for(var _0x41541f=_0x17de18>0x1?void 0x0:_0x17de18?L(_0x19697a,_0x420b5d):_0x19697a,_0x160181=_0x55a7b5[_0x4c8cfd(0x1c1)]-0x1,_0x4fbf6e;_0x160181>=0x0;_0x160181--)(_0x4fbf6e=_0x55a7b5[_0x160181])&&(_0x41541f=_0x4fbf6e(_0x41541f)||_0x41541f);return _0x41541f;},O=(_0x20dc06,_0x21f56b)=>(_0x1abb6f,_0x32eb52)=>_0x21f56b(_0x1abb6f,_0x32eb52,_0x20dc06),N=(_0x12b34f,_0x5a0b04,_0x6f4be7)=>Z(_0x12b34f,typeof _0x5a0b04!=_0x2d1a7d(0x1f8)?_0x5a0b04+'':_0x5a0b04,_0x6f4be7);exports[_0x2d1a7d(0x1fc)]=class extends c[_0x2d1a7d(0x1c0)]{constructor(_0x49bb0b=D,_0xea1dd8,_0x40ef94){const _0x46aaff=_0x2d1a7d;super(),this[_0x46aaff(0x1db)]=_0x49bb0b,this['_injector']=_0xea1dd8,this['_configService']=_0x40ef94;const {..._0x254951}=c['merge']({},D,this[_0x46aaff(0x1db)]);this[_0x46aaff(0x1b1)][_0x46aaff(0x222)](q,_0x254951);}['onStarting'](){const _0x1b9e2a=_0x2d1a7d;[[g],[C],[p]][_0x1b9e2a(0x1f6)](_0x22e1aa=>{const _0x17ffce=_0x1b9e2a;this[_0x17ffce(0x1e3)]['add'](_0x22e1aa);});}[_0x2d1a7d(0x1e6)](){const _0x18e3a3=_0x2d1a7d;this[_0x18e3a3(0x1e3)][_0x18e3a3(0x212)](C),this[_0x18e3a3(0x1e3)][_0x18e3a3(0x212)](p);}},N(exports[_0x2d1a7d(0x1fc)],_0x2d1a7d(0x216),U),N(exports[_0x2d1a7d(0x1fc)],_0x2d1a7d(0x1e1),c[_0x2d1a7d(0x1ef)][_0x2d1a7d(0x21f)]),exports[_0x2d1a7d(0x1fc)]=W([c[_0x2d1a7d(0x205)](j[_0x2d1a7d(0x204)],b[_0x2d1a7d(0x1ba)],T[_0x2d1a7d(0x202)]),O(0x1,c[_0x2d1a7d(0x1fb)](c[_0x2d1a7d(0x1df)])),O(0x2,c[_0x2d1a7d(0x201)])],exports[_0x2d1a7d(0x1fc)]);
1
+ 'use strict';const _0x11a97c=_0x4e32;(function(_0xf990e0,_0xf22bc2){const _0x2ee998=_0x4e32,_0x17d5e1=_0xf990e0();while(!![]){try{const _0x176f6e=parseInt(_0x2ee998(0x205))/0x1*(parseInt(_0x2ee998(0x229))/0x2)+parseInt(_0x2ee998(0x217))/0x3+-parseInt(_0x2ee998(0x240))/0x4*(-parseInt(_0x2ee998(0x225))/0x5)+parseInt(_0x2ee998(0x1f2))/0x6*(parseInt(_0x2ee998(0x23c))/0x7)+parseInt(_0x2ee998(0x213))/0x8+parseInt(_0x2ee998(0x209))/0x9*(-parseInt(_0x2ee998(0x1dc))/0xa)+-parseInt(_0x2ee998(0x1f6))/0xb;if(_0x176f6e===_0xf22bc2)break;else _0x17d5e1['push'](_0x17d5e1['shift']());}catch(_0x5856a9){_0x17d5e1['push'](_0x17d5e1['shift']());}}}(_0x57ae,0x48cbb));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x11a97c(0x1d3)});const b=require(_0x11a97c(0x231)),T=require(_0x11a97c(0x1cb)),c=require('@univerjs/core'),j=require(_0x11a97c(0x20d)),M=require(_0x11a97c(0x234)),w=require(_0x11a97c(0x1d1)),P=require('@univerjs/network'),U=_0x11a97c(0x1e5);function _0x4e32(_0x317281,_0x341eaa){const _0x57aecc=_0x57ae();return _0x4e32=function(_0x4e3274,_0x14f47d){_0x4e3274=_0x4e3274-0x1c5;let _0x431de8=_0x57aecc[_0x4e3274];return _0x431de8;},_0x4e32(_0x317281,_0x341eaa);}var I=(_0x196b80=>(_0x196b80[_0x196b80[_0x11a97c(0x228)]=0x0]=_0x11a97c(0x228),_0x196b80[_0x196b80[_0x11a97c(0x1fc)]=0x1]='Solved',_0x196b80[_0x196b80[_0x11a97c(0x233)]=-0x1]='UNRECOGNIZED',_0x196b80))(I||{}),v=(_0x3f89f2=>(_0x3f89f2[_0x3f89f2[_0x11a97c(0x1e8)]=0x0]='Unknown',_0x3f89f2[_0x3f89f2[_0x11a97c(0x1cc)]=0x1]=_0x11a97c(0x1cc),_0x3f89f2[_0x3f89f2[_0x11a97c(0x21a)]=0x2]='Reply',_0x3f89f2[_0x3f89f2[_0x11a97c(0x21d)]=0x3]='Edit',_0x3f89f2[_0x3f89f2[_0x11a97c(0x1f9)]=0x4]=_0x11a97c(0x1f9),_0x3f89f2[_0x3f89f2['Solve']=0x5]='Solve',_0x3f89f2[_0x3f89f2[_0x11a97c(0x233)]=-0x1]='UNRECOGNIZED',_0x3f89f2))(v||{});const f=_0x52b918=>c[_0x11a97c(0x1e9)](new Date(+_0x52b918))[_0x11a97c(0x242)](_0x11a97c(0x207)),R=async(_0x2cf028,_0x3e9d67)=>{const _0x4bd555=_0x11a97c,_0x47da3d=_0x2cf028['get'](c[_0x4bd555(0x227)]),_0x10574d=_0x2cf028[_0x4bd555(0x237)](P[_0x4bd555(0x200)]);_0x3e9d67['forEach'](_0x5ebe47=>{const _0x1d8f6c=_0x4bd555;_0x47da3d[_0x1d8f6c(0x20b)](_0x5ebe47)&&_0x3e9d67['delete'](_0x5ebe47);}),_0x3e9d67[_0x4bd555(0x204)]&&(await _0x10574d[_0x4bd555(0x237)](_0x4bd555(0x22f),{'params':{'userIDs':[..._0x3e9d67]}}))['body'][_0x4bd555(0x1f1)][_0x4bd555(0x1fd)](_0xa77a20=>{_0xa77a20&&_0x47da3d['addUser'](_0xa77a20);});};var $=Object[_0x11a97c(0x219)],E=(_0xce4934,_0x675811,_0x134377,_0x1eb1b9)=>{const _0x116493=_0x11a97c;for(var _0x5302db=_0x1eb1b9>0x1?void 0x0:_0x1eb1b9?$(_0x675811,_0x134377):_0x675811,_0x317013=_0xce4934[_0x116493(0x223)]-0x1,_0x4ebecf;_0x317013>=0x0;_0x317013--)(_0x4ebecf=_0xce4934[_0x317013])&&(_0x5302db=_0x4ebecf(_0x5302db)||_0x5302db);return _0x5302db;},S=(_0x1e147f,_0x153b05)=>(_0x638079,_0x2beaf4)=>_0x153b05(_0x638079,_0x2beaf4,_0x1e147f);let p=class extends c[_0x11a97c(0x1f4)]{constructor(_0x562bb9,_0x442401,_0x227a13,_0x5cf3ab){const _0x5bfb75=_0x11a97c;super(),this[_0x5bfb75(0x203)]=_0x562bb9,this[_0x5bfb75(0x1d9)]=_0x442401,this[_0x5bfb75(0x1e1)]=_0x227a13,this[_0x5bfb75(0x224)]=_0x5cf3ab,this['_init'](),this[_0x5bfb75(0x230)]();}[_0x11a97c(0x230)](){const _0x5e788e=_0x11a97c;this['disposeWithMe'](this[_0x5e788e(0x1d9)][_0x5e788e(0x23e)]['pipe'](w[_0x5e788e(0x1ed)](0x10))[_0x5e788e(0x20e)](_0x1db532=>{const _0x5ae0dc=_0x5e788e,_0x4ffcbd=new Set();_0x1db532[_0x5ae0dc(0x1fd)](_0x434b6d=>{const _0x370cd5=_0x5ae0dc;switch(_0x434b6d[_0x370cd5(0x215)]){case _0x370cd5(0x235):{const _0x26409f=_0x434b6d[_0x370cd5(0x1c8)][_0x370cd5(0x243)];_0x4ffcbd[_0x370cd5(0x235)](_0x26409f);break;}}}),R(this[_0x5ae0dc(0x224)],_0x4ffcbd);}));}[_0x11a97c(0x22e)](){const _0x25ec66=_0x11a97c;this[_0x25ec66(0x1e4)](this[_0x25ec66(0x203)][_0x25ec66(0x23e)][_0x25ec66(0x20e)](async _0x260734=>{const _0x590c8a=_0x25ec66;var _0x506ee6,_0xb91ea7,_0x1621b2,_0x2bcb5f;const _0x2d6a5d=(_0x506ee6=this[_0x590c8a(0x1d9)][_0x590c8a(0x221)](_0x260734['unitId'])[_0x590c8a(0x1ff)](_0x21b5e2=>_0x21b5e2[_0x590c8a(0x22b)]===_0x260734[_0x590c8a(0x22b)]))==null?void 0x0:_0x506ee6[_0x590c8a(0x1c9)];if(!_0x2d6a5d)return;const {unitId:_0x250219,subUnitId:_0x4b54e5}=_0x2d6a5d;switch(_0x260734[_0x590c8a(0x226)]&&this[_0x590c8a(0x1e1)][_0x590c8a(0x1e6)](_0x260734['user']),_0x260734[_0x590c8a(0x215)]){case v[_0x590c8a(0x1cc)]:break;case v['Reply']:{this[_0x590c8a(0x1d9)][_0x590c8a(0x1da)](_0x250219,_0x4b54e5,{'unitId':_0x250219,'subUnitId':_0x4b54e5,'ref':'','id':_0x260734[_0x590c8a(0x1d0)],'dT':f(+_0x260734[_0x590c8a(0x1ef)]),'threadId':_0x260734[_0x590c8a(0x22b)],'personId':(_0x1621b2=(_0xb91ea7=_0x260734[_0x590c8a(0x226)])==null?void 0x0:_0xb91ea7[_0x590c8a(0x21e)])!=null?_0x1621b2:_0x260734[_0x590c8a(0x220)],'text':JSON[_0x590c8a(0x206)](_0x260734[_0x590c8a(0x202)]),'parentId':_0x2d6a5d['id']});break;}case v['Delete']:{const _0xb67c6a=this[_0x590c8a(0x1d9)]['getComment'](_0x250219,_0x4b54e5,_0x260734[_0x590c8a(0x1d0)]);_0xb67c6a&&_0xb67c6a[_0x590c8a(0x1d6)]&&this['_threadCommentModel'][_0x590c8a(0x22c)](_0x250219,_0x4b54e5,_0x260734[_0x590c8a(0x1d0)]);break;}case v[_0x590c8a(0x21d)]:{this[_0x590c8a(0x1d9)][_0x590c8a(0x1cd)](_0x250219,_0x4b54e5,{'commentId':_0x260734[_0x590c8a(0x1d0)],'text':JSON['parse'](_0x260734[_0x590c8a(0x202)])});break;}case v[_0x590c8a(0x1e7)]:{const _0x4cbb56=(_0x2bcb5f=this[_0x590c8a(0x1d9)][_0x590c8a(0x221)](_0x260734[_0x590c8a(0x21c)])[_0x590c8a(0x1ff)](_0x147c2f=>_0x147c2f[_0x590c8a(0x22b)]===_0x260734['threadId']))==null?void 0x0:_0x2bcb5f[_0x590c8a(0x1c9)];_0x4cbb56&&this[_0x590c8a(0x1d9)][_0x590c8a(0x20a)](_0x250219,_0x4b54e5,_0x4cbb56['id'],_0x260734[_0x590c8a(0x22d)]===I[_0x590c8a(0x1fc)]);break;}}}));}};p=E([S(0x0,c[_0x11a97c(0x214)](b[_0x11a97c(0x1fe)])),S(0x1,c[_0x11a97c(0x214)](M['ThreadCommentModel'])),S(0x2,c[_0x11a97c(0x214)](c[_0x11a97c(0x227)])),S(0x3,c[_0x11a97c(0x214)](c[_0x11a97c(0x1c6)]))],p);function _0x57ae(){const _0x508d9f=['getUser','comments','@univerjs/thread-comment-ui','subscribe','getCurrentUser','thread-comment-data-source.config','UniverThreadCommentDataSourcePlugin','requireSession','436096LLKnHl','Inject','type','comment','1454076lrorUp','_sessionService','getOwnPropertyDescriptor','Reply','listComments','unitId','Edit','userID','pluginName','userId','getUnit','stringify','length','_injector','250615ZjidAY','user','UserManagerService','OpenOrReOpen','2eJFErj','/reply','threadId','deleteComment','solved','_init','/universer-api/user/list','_initUserSync','@univerjs-pro/collaboration-client','/delete','UNRECOGNIZED','@univerjs/thread-comment','add','symbol','get','reply','CustomRangeType','UniverCollaborationClientPlugin','setConfig','14sCyhiL','map','commentUpdate$','/solved','28rpuBGA','rangeType','format','personId','onStarting','Injector','UniverLicensePlugin','payload','root','ref','@univerjs-pro/license','Add','updateComment','CollaborationSessionService','/add','replyId','rxjs','merge','Module','IThreadCommentDataSourceService','rangeId','parentId','filter','replies','_threadCommentModel','addComment','_threadCommentDataSource','418130RkBltB','_initDataSource','code','values','dataSource','_userService','IConfigService','UNIVER_UNKNOWN','disposeWithMe','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','addUser','Solve','Unknown','dayjs','post','/universer-api/comment/unit/','_httpService','bufferTime','_config','createTimestamp','slice','users','1504122Lanorj','saveCommentToSnapshot','Disposable','getMemberID','9802694MUaluC','_threadCommentDataSourceService','body','Delete','_configService','error','Solved','forEach','CommentService','find','HTTPService','COMMENT','content','_commentService','size','90577VhSKpk','parse','YYYY/MM/DD\x20HH:mm','customRanges','63WwAfMk','resolveComment'];_0x57ae=function(){return _0x508d9f;};return _0x57ae();}const q=_0x11a97c(0x210),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x9e1227,_0x502ea4,_0x225d6a,_0x1808da)=>{for(var _0x1e6637=_0x1808da>0x1?void 0x0:_0x1808da?A(_0x502ea4,_0x225d6a):_0x502ea4,_0x275471=_0x9e1227['length']-0x1,_0x587546;_0x275471>=0x0;_0x275471--)(_0x587546=_0x9e1227[_0x275471])&&(_0x1e6637=_0x587546(_0x1e6637)||_0x1e6637);return _0x1e6637;},_=(_0x532ef9,_0x56b27e)=>(_0x1fe208,_0x2c866d)=>_0x56b27e(_0x1fe208,_0x2c866d,_0x532ef9);function Y(_0xf96f42,_0x453617){const _0x2bf610=_0x11a97c,_0x5f1298=_0xf96f42[_0x2bf610(0x1d8)][0x0];return{..._0x453617,'id':_0x5f1298['replyId'],'resolved':_0xf96f42[_0x2bf610(0x22d)]===0x1,'dT':f(_0x5f1298['createTimestamp']),'personId':_0x5f1298[_0x2bf610(0x220)],'threadId':_0x5f1298[_0x2bf610(0x22b)]};}function G(_0xf7ea95,_0x1a78d7,_0x900f78){const _0x443190=_0x11a97c;var _0x3ff4c2,_0x5240bc;if(((_0x5240bc=(_0x3ff4c2=_0xf7ea95==null?void 0x0:_0xf7ea95[_0x443190(0x1d8)])==null?void 0x0:_0x3ff4c2[_0x443190(0x223)])!=null?_0x5240bc:0x0)>0x0){const _0x288f19=(_0x59a84f,_0x1035c8)=>({'id':_0x59a84f['replyId'],'threadId':_0x59a84f[_0x443190(0x22b)],'dT':f(_0x59a84f[_0x443190(0x1ef)]),'personId':_0x59a84f[_0x443190(0x220)],'resolved':_0xf7ea95[_0x443190(0x22d)]===I['Solved'],'unitId':_0x1a78d7,'subUnitId':_0x900f78,'text':JSON[_0x443190(0x206)](_0x59a84f['content']),'parentId':_0x1035c8}),_0x28e014=_0x288f19(_0xf7ea95[_0x443190(0x1d8)][0x0]);return{..._0x28e014,'children':_0xf7ea95[_0x443190(0x1d8)][_0x443190(0x1f0)](0x1)[_0x443190(0x23d)](_0x3ff3b3=>_0x288f19(_0x3ff3b3,_0x28e014['id']))};}return null;}let g=class{constructor(_0x50fb13,_0x5287e8,_0xd0cc77,_0x23d3b8){const _0x45c93e=_0x11a97c;this[_0x45c93e(0x1ec)]=_0x50fb13,this[_0x45c93e(0x1e1)]=_0x5287e8,this['_sessionService']=_0xd0cc77,this[_0x45c93e(0x224)]=_0x23d3b8;}async[_0x11a97c(0x1da)](_0x2c84e3){const _0x5cec0a=_0x11a97c;var _0x202378,_0x5e221c;const {parentId:_0x285779,unitId:_0x22ea18,text:_0x437891,threadId:_0x22be7c}=_0x2c84e3,_0x42e69a=(_0x5e221c=(_0x202378=_0x437891['customRanges'])==null?void 0x0:_0x202378['filter'](_0x9dc9f6=>_0x9dc9f6[_0x5cec0a(0x241)]===c[_0x5cec0a(0x239)][_0x5cec0a(0x201)])[_0x5cec0a(0x23d)](_0x5d4af=>_0x5d4af[_0x5cec0a(0x1d5)]))!=null?_0x5e221c:[],_0x3559ba=JSON['stringify'](_0x437891),_0x845971=(await this[_0x5cec0a(0x218)][_0x5cec0a(0x212)](_0x22ea18))[_0x5cec0a(0x1f5)]();if(_0x285779){const _0x24709e={'memberId':_0x845971,'unitId':_0x22ea18,'content':_0x3559ba,'mention':_0x42e69a,'threadId':_0x22be7c},_0x25858c=(await this['_httpService'][_0x5cec0a(0x1ea)](_0x5cec0a(0x1eb)+_0x22ea18+_0x5cec0a(0x22a),{'body':_0x24709e}))[_0x5cec0a(0x1f8)][_0x5cec0a(0x238)];return{..._0x2c84e3,'id':_0x25858c[_0x5cec0a(0x1d0)],'dT':c[_0x5cec0a(0x1e9)](+_0x25858c[_0x5cec0a(0x1ef)])[_0x5cec0a(0x242)](_0x5cec0a(0x207)),'personId':_0x25858c[_0x5cec0a(0x220)]};}else{const _0x324382={'memberId':_0x845971,'unitId':_0x22ea18,'content':_0x3559ba,'mention':_0x42e69a},_0x2cbf2a=await this[_0x5cec0a(0x1ec)][_0x5cec0a(0x1ea)](_0x5cec0a(0x1eb)+_0x22ea18+_0x5cec0a(0x1cf),{'body':_0x324382});return Y(_0x2cbf2a[_0x5cec0a(0x1f8)][_0x5cec0a(0x216)],_0x2c84e3);}}async['updateComment'](_0x596b8d){const _0x4841a5=_0x11a97c;var _0x473e34,_0x2d061e;const {text:_0x43ddb1,unitId:_0x2d89bf}=_0x596b8d,_0x1a9265=(_0x2d061e=(_0x473e34=_0x43ddb1[_0x4841a5(0x208)])==null?void 0x0:_0x473e34['filter'](_0x243ca2=>_0x243ca2[_0x4841a5(0x241)]===c[_0x4841a5(0x239)][_0x4841a5(0x201)])['map'](_0x3ebad5=>_0x3ebad5[_0x4841a5(0x1d5)]))!=null?_0x2d061e:[],_0x1ae9e2=JSON[_0x4841a5(0x222)](_0x43ddb1),_0x5e0f6f=_0x596b8d[_0x4841a5(0x22b)],_0x4a3d69=_0x596b8d['id'],_0x3e2262={'memberId':(await this['_sessionService']['requireSession'](_0x2d89bf))[_0x4841a5(0x1f5)](),'unitId':_0x2d89bf,'threadId':_0x5e0f6f,'mention':_0x1a9265,'content':_0x1ae9e2,'replyId':_0x4a3d69},_0x1eaf9d=await this[_0x4841a5(0x1ec)][_0x4841a5(0x1ea)]('/universer-api/comment/unit/'+_0x2d89bf+'/edit',{'body':_0x3e2262});return!_0x1eaf9d[_0x4841a5(0x1f8)][_0x4841a5(0x1fb)]||_0x1eaf9d[_0x4841a5(0x1f8)]['error'][_0x4841a5(0x1de)]===0x1;}async['resolveComment'](_0x3f0ecb){const _0x5d542c=_0x11a97c,{unitId:_0x143f52}=_0x3f0ecb,_0x344df4=_0x3f0ecb[_0x5d542c(0x22b)],_0x2b95d4={'memberId':this[_0x5d542c(0x1e1)][_0x5d542c(0x20f)]()['userID'],'unitId':_0x143f52,'threadId':_0x344df4,'solved':_0x3f0ecb['resolved']?I[_0x5d542c(0x1fc)]:I[_0x5d542c(0x228)]},_0x53a560=await this['_httpService']['post'](_0x5d542c(0x1eb)+_0x143f52+_0x5d542c(0x23f),{'body':_0x2b95d4});return!_0x53a560[_0x5d542c(0x1f8)][_0x5d542c(0x1fb)]||_0x53a560[_0x5d542c(0x1f8)][_0x5d542c(0x1fb)][_0x5d542c(0x1de)]===0x1;}async[_0x11a97c(0x22c)](_0x15dd83,_0x1b7db6,_0xf13c7a,_0x5c63eb){const _0xf4528b=_0x11a97c,_0x4755ff={'memberId':(await this[_0xf4528b(0x218)][_0xf4528b(0x212)](_0x15dd83))[_0xf4528b(0x1f5)](),'threadId':_0xf13c7a,'replyId':_0x5c63eb,'unitId':_0x15dd83},_0x2d6372=await this[_0xf4528b(0x1ec)][_0xf4528b(0x1ea)]('/universer-api/comment/unit/'+_0x15dd83+_0xf4528b(0x232),{'body':_0x4755ff});return!_0x2d6372[_0xf4528b(0x1f8)][_0xf4528b(0x1fb)]||_0x2d6372[_0xf4528b(0x1f8)][_0xf4528b(0x1fb)]['code']===0x1;}async[_0x11a97c(0x21b)](_0xe96ab8,_0x6bf737,_0x5ca8fb){const _0x1281ff=_0x11a97c,_0x18ef09={'unitId':_0xe96ab8,'threadId':_0x5ca8fb},_0xead04a=await this[_0x1281ff(0x1ec)]['post'](_0x1281ff(0x1eb)+_0xe96ab8+'/list',{'body':_0x18ef09}),_0x1858d3=_0x5ca8fb[_0x1281ff(0x23d)](_0x54c9b2=>G(_0xead04a[_0x1281ff(0x1f8)][_0x1281ff(0x20c)][_0x54c9b2],_0xe96ab8,_0x6bf737))[_0x1281ff(0x1d7)](Boolean);return Object[_0x1281ff(0x1df)](_0xead04a[_0x1281ff(0x1f8)]['users'])[_0x1281ff(0x1fd)](_0x1def67=>{this['_userService']['addUser'](_0x1def67);}),_0x1858d3;}[_0x11a97c(0x1f3)](_0x574ab9){const _0x2e6902=_0x11a97c;return{'id':_0x574ab9['id'],'threadId':_0x574ab9[_0x2e6902(0x22b)],'ref':_0x574ab9[_0x2e6902(0x1ca)]};}};g=x([_(0x0,c[_0x11a97c(0x214)](P[_0x11a97c(0x200)])),_(0x1,c[_0x11a97c(0x214)](c['UserManagerService'])),_(0x2,c[_0x11a97c(0x214)](b[_0x11a97c(0x1ce)])),_(0x3,c[_0x11a97c(0x214)](c[_0x11a97c(0x1c6)]))],g);var H=Object[_0x11a97c(0x219)],J=(_0x5e3f45,_0x4e2aa7,_0x3c205c,_0x5ad89d)=>{const _0x568ed6=_0x11a97c;for(var _0x132ab1=_0x5ad89d>0x1?void 0x0:_0x5ad89d?H(_0x4e2aa7,_0x3c205c):_0x4e2aa7,_0x307c94=_0x5e3f45[_0x568ed6(0x223)]-0x1,_0x5c420b;_0x307c94>=0x0;_0x307c94--)(_0x5c420b=_0x5e3f45[_0x307c94])&&(_0x132ab1=_0x5c420b(_0x132ab1)||_0x132ab1);return _0x132ab1;},y=(_0x38107f,_0x188961)=>(_0x382e5f,_0xaf1280)=>_0x188961(_0x382e5f,_0xaf1280,_0x38107f);let C=class extends c[_0x11a97c(0x1f4)]{constructor(_0x21f6a2,_0x570ff5){const _0x100ea3=_0x11a97c;super(),this[_0x100ea3(0x1f7)]=_0x21f6a2,this['_threadCommentDataSource']=_0x570ff5,this[_0x100ea3(0x1dd)]();}[_0x11a97c(0x1dd)](){const _0x36ad08=_0x11a97c;this['_threadCommentDataSourceService'][_0x36ad08(0x1e0)]=this[_0x36ad08(0x1db)],this[_0x36ad08(0x1f7)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x11a97c(0x1d4)]),y(0x1,c[_0x11a97c(0x214)](g))],C);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x382f53,_0x164708,_0x397ea6)=>_0x164708 in _0x382f53?F(_0x382f53,_0x164708,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x397ea6}):_0x382f53[_0x164708]=_0x397ea6,W=(_0x281067,_0x4c1cfc,_0x3d8318,_0x3f1b42)=>{for(var _0x92683f=_0x3f1b42>0x1?void 0x0:_0x3f1b42?L(_0x4c1cfc,_0x3d8318):_0x4c1cfc,_0x1eb3da=_0x281067['length']-0x1,_0x3b5029;_0x1eb3da>=0x0;_0x1eb3da--)(_0x3b5029=_0x281067[_0x1eb3da])&&(_0x92683f=_0x3b5029(_0x92683f)||_0x92683f);return _0x92683f;},O=(_0x76f742,_0x800279)=>(_0xc84fc0,_0x3b0646)=>_0x800279(_0xc84fc0,_0x3b0646,_0x76f742),N=(_0x1c4397,_0x12adc3,_0x385c56)=>Z(_0x1c4397,typeof _0x12adc3!=_0x11a97c(0x236)?_0x12adc3+'':_0x12adc3,_0x385c56);exports[_0x11a97c(0x211)]=class extends c['Plugin']{constructor(_0x1a4a8d=D,_0x8b61d8,_0x5ba546){const _0x2ab4e1=_0x11a97c;super(),this[_0x2ab4e1(0x1ee)]=_0x1a4a8d,this['_injector']=_0x8b61d8,this[_0x2ab4e1(0x1fa)]=_0x5ba546;const {..._0x46fa7f}=c[_0x2ab4e1(0x1d2)]({},D,this[_0x2ab4e1(0x1ee)]);this[_0x2ab4e1(0x1fa)][_0x2ab4e1(0x23b)](q,_0x46fa7f);}[_0x11a97c(0x1c5)](){[[g],[C],[p]]['forEach'](_0xfcfdf9=>{const _0x32e53b=_0x4e32;this['_injector'][_0x32e53b(0x235)](_0xfcfdf9);});}['onReady'](){const _0x18017f=_0x11a97c;this[_0x18017f(0x224)][_0x18017f(0x237)](C),this[_0x18017f(0x224)][_0x18017f(0x237)](p);}},N(exports[_0x11a97c(0x211)],_0x11a97c(0x21f),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x11a97c(0x215),c['UniverInstanceType'][_0x11a97c(0x1e3)]),exports[_0x11a97c(0x211)]=W([c['DependentOn'](j['UniverThreadCommentUIPlugin'],b[_0x11a97c(0x23a)],T[_0x11a97c(0x1c7)]),O(0x1,c[_0x11a97c(0x214)](c[_0x11a97c(0x1c6)])),O(0x2,c[_0x11a97c(0x1e2)])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x1ab695=_0x5c8a;(function(_0x5a823a,_0x5e761d){const _0xc27562=_0x5c8a,_0x28e648=_0x5a823a();while(!![]){try{const _0x2cf62d=-parseInt(_0xc27562(0x167))/0x1+-parseInt(_0xc27562(0x19c))/0x2+parseInt(_0xc27562(0x1a6))/0x3*(-parseInt(_0xc27562(0x1a2))/0x4)+parseInt(_0xc27562(0x155))/0x5+parseInt(_0xc27562(0x1b6))/0x6*(-parseInt(_0xc27562(0x19a))/0x7)+-parseInt(_0xc27562(0x18b))/0x8*(parseInt(_0xc27562(0x171))/0x9)+-parseInt(_0xc27562(0x16b))/0xa*(-parseInt(_0xc27562(0x1b1))/0xb);if(_0x2cf62d===_0x5e761d)break;else _0x28e648['push'](_0x28e648['shift']());}catch(_0x91ef88){_0x28e648['push'](_0x28e648['shift']());}}}(_0x1577,0x52941));import{CommentService as _0x2f1b6,CollaborationSessionService as _0x296507,UniverCollaborationClientPlugin as _0x215a50}from'@univerjs-pro/collaboration-client';function _0x5c8a(_0x213d84,_0xc1e0aa){const _0x1577ff=_0x1577();return _0x5c8a=function(_0x5c8a70,_0x38170c){_0x5c8a70=_0x5c8a70-0x151;let _0x2c9b54=_0x1577ff[_0x5c8a70];return _0x2c9b54;},_0x5c8a(_0x213d84,_0xc1e0aa);}import{UniverLicensePlugin as _0x59e42c}from'@univerjs-pro/license';import{dayjs as _0x2ee0ce,UserManagerService as _0x491dce,Inject as _0x14d5a2,Injector as _0x153703,Disposable as _0x403f07,CustomRangeType as _0x55c7fc,UniverInstanceType as _0x185fb6,DependentOn as _0x4ec335,IConfigService as _0x30003c,Plugin as _0xd075a6,merge as _0xcec0b5}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x51046f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x54638b,IThreadCommentDataSourceService as _0x39aa21}from'@univerjs/thread-comment';import{bufferTime as _0xade764}from'rxjs';import{HTTPService as _0x5c6d2d}from'@univerjs/network';const W=_0x1ab695(0x1a1);var I=(_0x10ded5=>(_0x10ded5[_0x10ded5[_0x1ab695(0x196)]=0x0]=_0x1ab695(0x196),_0x10ded5[_0x10ded5[_0x1ab695(0x177)]=0x1]='Solved',_0x10ded5[_0x10ded5[_0x1ab695(0x154)]=-0x1]='UNRECOGNIZED',_0x10ded5))(I||{}),v=(_0x5d8504=>(_0x5d8504[_0x5d8504[_0x1ab695(0x165)]=0x0]=_0x1ab695(0x165),_0x5d8504[_0x5d8504[_0x1ab695(0x169)]=0x1]=_0x1ab695(0x169),_0x5d8504[_0x5d8504[_0x1ab695(0x1b0)]=0x2]=_0x1ab695(0x1b0),_0x5d8504[_0x5d8504[_0x1ab695(0x1a7)]=0x3]=_0x1ab695(0x1a7),_0x5d8504[_0x5d8504[_0x1ab695(0x18f)]=0x4]='Delete',_0x5d8504[_0x5d8504['Solve']=0x5]=_0x1ab695(0x176),_0x5d8504[_0x5d8504['UNRECOGNIZED']=-0x1]=_0x1ab695(0x154),_0x5d8504))(v||{});const D=_0x735ab=>_0x2ee0ce(new Date(+_0x735ab))[_0x1ab695(0x17f)](_0x1ab695(0x194)),B=async(_0x45720d,_0x4f5406)=>{const _0x58ba0f=_0x1ab695,_0x21c5fb=_0x45720d[_0x58ba0f(0x192)](_0x491dce),_0x40c6cd=_0x45720d[_0x58ba0f(0x192)](_0x5c6d2d);_0x4f5406['forEach'](_0x282b27=>{const _0x180f4a=_0x58ba0f;_0x21c5fb['getUser'](_0x282b27)&&_0x4f5406[_0x180f4a(0x198)](_0x282b27);}),_0x4f5406[_0x58ba0f(0x1a4)]&&(await _0x40c6cd[_0x58ba0f(0x192)](_0x58ba0f(0x189),{'params':{'userIDs':[..._0x4f5406]}}))['body']['users'][_0x58ba0f(0x15b)](_0x224ff=>{const _0x1cedac=_0x58ba0f;_0x224ff&&_0x21c5fb[_0x1cedac(0x19f)](_0x224ff);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2e162b,_0x31db1f,_0x22c426,_0x28245c)=>{const _0x24adbc=_0x1ab695;for(var _0x4c8bd5=_0x28245c>0x1?void 0x0:_0x28245c?K(_0x31db1f,_0x22c426):_0x31db1f,_0x1dd158=_0x2e162b[_0x24adbc(0x1b2)]-0x1,_0x4a3921;_0x1dd158>=0x0;_0x1dd158--)(_0x4a3921=_0x2e162b[_0x1dd158])&&(_0x4c8bd5=_0x4a3921(_0x4c8bd5)||_0x4c8bd5);return _0x4c8bd5;},p=(_0x42fbc7,_0x349b84)=>(_0x627dd2,_0x425f42)=>_0x349b84(_0x627dd2,_0x425f42,_0x42fbc7);let S=class extends _0x403f07{constructor(_0x4aea70,_0x135039,_0x43e4c8,_0x37040e){const _0x51a8fd=_0x1ab695;super(),this[_0x51a8fd(0x1ab)]=_0x4aea70,this['_threadCommentModel']=_0x135039,this['_userService']=_0x43e4c8,this[_0x51a8fd(0x158)]=_0x37040e,this['_init'](),this[_0x51a8fd(0x15e)]();}['_initUserSync'](){const _0x4c3178=_0x1ab695;this[_0x4c3178(0x1ac)](this[_0x4c3178(0x1a0)][_0x4c3178(0x1b4)][_0x4c3178(0x173)](_0xade764(0x10))[_0x4c3178(0x187)](_0x4e6960=>{const _0x311b25=_0x4c3178,_0x36162e=new Set();_0x4e6960[_0x311b25(0x15b)](_0x3fb22d=>{const _0x2459d0=_0x311b25;switch(_0x3fb22d[_0x2459d0(0x186)]){case _0x2459d0(0x195):{const _0x2f4173=_0x3fb22d['payload'][_0x2459d0(0x19e)];_0x36162e[_0x2459d0(0x195)](_0x2f4173);break;}}}),B(this['_injector'],_0x36162e);}));}[_0x1ab695(0x164)](){const _0x3a97eb=_0x1ab695;this[_0x3a97eb(0x1ac)](this[_0x3a97eb(0x1ab)]['commentUpdate$']['subscribe'](async _0x388598=>{const _0x57f2d8=_0x3a97eb;var _0x450fef,_0x289362,_0x37d568,_0x41ef2a;const _0x5b60cd=(_0x450fef=this[_0x57f2d8(0x1a0)]['getUnit'](_0x388598['unitId'])['find'](_0x51502c=>_0x51502c[_0x57f2d8(0x1a5)]===_0x388598[_0x57f2d8(0x1a5)]))==null?void 0x0:_0x450fef['root'];if(!_0x5b60cd)return;const {unitId:_0x2bbc7a,subUnitId:_0x235d58}=_0x5b60cd;switch(_0x388598[_0x57f2d8(0x161)]&&this[_0x57f2d8(0x163)][_0x57f2d8(0x19f)](_0x388598[_0x57f2d8(0x161)]),_0x388598[_0x57f2d8(0x186)]){case v['Add']:break;case v['Reply']:{this[_0x57f2d8(0x1a0)][_0x57f2d8(0x172)](_0x2bbc7a,_0x235d58,{'unitId':_0x2bbc7a,'subUnitId':_0x235d58,'ref':'','id':_0x388598[_0x57f2d8(0x16d)],'dT':D(+_0x388598[_0x57f2d8(0x182)]),'threadId':_0x388598[_0x57f2d8(0x1a5)],'personId':(_0x37d568=(_0x289362=_0x388598[_0x57f2d8(0x161)])==null?void 0x0:_0x289362['userID'])!=null?_0x37d568:_0x388598[_0x57f2d8(0x181)],'text':JSON[_0x57f2d8(0x179)](_0x388598['content']),'parentId':_0x5b60cd['id']});break;}case v[_0x57f2d8(0x18f)]:{const _0x169d36=this[_0x57f2d8(0x1a0)][_0x57f2d8(0x17c)](_0x2bbc7a,_0x235d58,_0x388598[_0x57f2d8(0x16d)]);_0x169d36&&_0x169d36['parentId']&&this[_0x57f2d8(0x1a0)][_0x57f2d8(0x16a)](_0x2bbc7a,_0x235d58,_0x388598[_0x57f2d8(0x16d)]);break;}case v[_0x57f2d8(0x1a7)]:{this[_0x57f2d8(0x1a0)][_0x57f2d8(0x193)](_0x2bbc7a,_0x235d58,{'commentId':_0x388598[_0x57f2d8(0x16d)],'text':JSON[_0x57f2d8(0x179)](_0x388598['content'])});break;}case v[_0x57f2d8(0x176)]:{const _0x4ba43d=(_0x41ef2a=this[_0x57f2d8(0x1a0)][_0x57f2d8(0x19d)](_0x388598[_0x57f2d8(0x16f)])[_0x57f2d8(0x184)](_0x53d067=>_0x53d067['threadId']===_0x388598[_0x57f2d8(0x1a5)]))==null?void 0x0:_0x41ef2a['root'];_0x4ba43d&&this[_0x57f2d8(0x1a0)][_0x57f2d8(0x188)](_0x2bbc7a,_0x235d58,_0x4ba43d['id'],_0x388598['solved']===I[_0x57f2d8(0x177)]);break;}}}));}};S=V([p(0x0,_0x14d5a2(_0x2f1b6)),p(0x1,_0x14d5a2(_0x54638b)),p(0x2,_0x14d5a2(_0x491dce)),p(0x3,_0x14d5a2(_0x153703))],S);const z=_0x1ab695(0x162),M={};var k=Object[_0x1ab695(0x17a)],Q=(_0x4ff8df,_0x3b9800,_0x2db718,_0x3b9b2f)=>{const _0xf9c1bc=_0x1ab695;for(var _0x2698c9=_0x3b9b2f>0x1?void 0x0:_0x3b9b2f?k(_0x3b9800,_0x2db718):_0x3b9800,_0x3b21dd=_0x4ff8df[_0xf9c1bc(0x1b2)]-0x1,_0x103f85;_0x3b21dd>=0x0;_0x3b21dd--)(_0x103f85=_0x4ff8df[_0x3b21dd])&&(_0x2698c9=_0x103f85(_0x2698c9)||_0x2698c9);return _0x2698c9;},_=(_0x3eb845,_0x1f066e)=>(_0x3b8104,_0x5519b3)=>_0x1f066e(_0x3b8104,_0x5519b3,_0x3eb845);function X(_0x107474,_0x4de781){const _0x4016ff=_0x1ab695,_0x2474fb=_0x107474[_0x4016ff(0x1aa)][0x0];return{..._0x4de781,'id':_0x2474fb[_0x4016ff(0x16d)],'resolved':_0x107474[_0x4016ff(0x1b5)]===0x1,'dT':D(_0x2474fb[_0x4016ff(0x182)]),'personId':_0x2474fb['userId'],'threadId':_0x2474fb[_0x4016ff(0x1a5)]};}function _0x1577(){const _0x37f951=['body','Add','deleteComment','30phFFPC','/solved','replyId','_threadCommentDataSourceService','unitId','/delete','1755ZyqmvX','addComment','pipe','_httpService','content','Solve','Solved','requireSession','parse','getOwnPropertyDescriptor','/reply','getComment','pluginName','dataSource','format','COMMENT','userId','createTimestamp','customRanges','find','map','type','subscribe','resolveComment','/universer-api/user/list','symbol','9448IarCwX','stringify','_config','rangeType','Delete','defineProperty','post','get','updateComment','YYYY/MM/DD\x20HH:mm','add','OpenOrReOpen','getCurrentUser','delete','_sessionService','28AGMubT','_configService','895870vUegaF','getUnit','personId','addUser','_threadCommentModel','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','16EWFoLJ','/universer-api/comment/unit/','size','threadId','403134NChdRu','Edit','filter','users','replies','_commentService','disposeWithMe','rangeId','_initDataSource','error','Reply','6822761xcQhzz','length','/add','commentUpdate$','solved','269100reJCWZ','values','syncUpdateMutationToColla','onReady','UNRECOGNIZED','1960225FSRNPR','reply','code','_injector','getMemberID','setConfig','forEach','onStarting','comments','_initUserSync','comment','_threadCommentDataSource','user','thread-comment-data-source.config','_userService','_init','Unknown','slice','519415rwGyiA'];_0x1577=function(){return _0x37f951;};return _0x1577();}function ee(_0x138eab,_0x122584,_0x4d758b){const _0x1afbdc=_0x1ab695;var _0x3160ea,_0x544f5b;if(((_0x544f5b=(_0x3160ea=_0x138eab==null?void 0x0:_0x138eab[_0x1afbdc(0x1aa)])==null?void 0x0:_0x3160ea[_0x1afbdc(0x1b2)])!=null?_0x544f5b:0x0)>0x0){const _0x5a887e=(_0x2595c8,_0x4cb673)=>({'id':_0x2595c8[_0x1afbdc(0x16d)],'threadId':_0x2595c8[_0x1afbdc(0x1a5)],'dT':D(_0x2595c8[_0x1afbdc(0x182)]),'personId':_0x2595c8[_0x1afbdc(0x181)],'resolved':_0x138eab['solved']===I[_0x1afbdc(0x177)],'unitId':_0x122584,'subUnitId':_0x4d758b,'text':JSON[_0x1afbdc(0x179)](_0x2595c8[_0x1afbdc(0x175)]),'parentId':_0x4cb673}),_0x19300a=_0x5a887e(_0x138eab[_0x1afbdc(0x1aa)][0x0]);return{..._0x19300a,'children':_0x138eab['replies'][_0x1afbdc(0x166)](0x1)['map'](_0x304013=>_0x5a887e(_0x304013,_0x19300a['id']))};}return null;}let f=class{constructor(_0x3d12c2,_0x28ac34,_0xf4cd7a,_0x285dd1){const _0x209268=_0x1ab695;this[_0x209268(0x174)]=_0x3d12c2,this['_userService']=_0x28ac34,this[_0x209268(0x199)]=_0xf4cd7a,this['_injector']=_0x285dd1;}async[_0x1ab695(0x172)](_0x45b6a3){const _0x5373cd=_0x1ab695;var _0x1e8862,_0x2e0855;const {parentId:_0x38d4a5,unitId:_0x112310,text:_0x413995,threadId:_0x4ba364}=_0x45b6a3,_0x7cd92b=(_0x2e0855=(_0x1e8862=_0x413995[_0x5373cd(0x183)])==null?void 0x0:_0x1e8862[_0x5373cd(0x1a8)](_0x25bf04=>_0x25bf04[_0x5373cd(0x18e)]===_0x55c7fc[_0x5373cd(0x180)])[_0x5373cd(0x185)](_0x3b4d77=>_0x3b4d77[_0x5373cd(0x1ad)]))!=null?_0x2e0855:[],_0x33383b=JSON['stringify'](_0x413995),_0x19b24a=(await this[_0x5373cd(0x199)]['requireSession'](_0x112310))[_0x5373cd(0x159)]();if(_0x38d4a5){const _0x588734={'memberId':_0x19b24a,'unitId':_0x112310,'content':_0x33383b,'mention':_0x7cd92b,'threadId':_0x4ba364},_0x50fe6f=(await this[_0x5373cd(0x174)][_0x5373cd(0x191)]('/universer-api/comment/unit/'+_0x112310+_0x5373cd(0x17b),{'body':_0x588734}))['body'][_0x5373cd(0x156)];return{..._0x45b6a3,'id':_0x50fe6f[_0x5373cd(0x16d)],'dT':_0x2ee0ce(+_0x50fe6f['createTimestamp'])[_0x5373cd(0x17f)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x50fe6f[_0x5373cd(0x181)]};}else{const _0x585d18={'memberId':_0x19b24a,'unitId':_0x112310,'content':_0x33383b,'mention':_0x7cd92b},_0x576093=await this[_0x5373cd(0x174)][_0x5373cd(0x191)](_0x5373cd(0x1a3)+_0x112310+_0x5373cd(0x1b3),{'body':_0x585d18});return X(_0x576093[_0x5373cd(0x168)][_0x5373cd(0x15f)],_0x45b6a3);}}async['updateComment'](_0x43a065){const _0x3081b1=_0x1ab695;var _0x1237fd,_0x5411ae;const {text:_0x230e80,unitId:_0x4848a9}=_0x43a065,_0x2f50e1=(_0x5411ae=(_0x1237fd=_0x230e80[_0x3081b1(0x183)])==null?void 0x0:_0x1237fd[_0x3081b1(0x1a8)](_0x34223f=>_0x34223f[_0x3081b1(0x18e)]===_0x55c7fc[_0x3081b1(0x180)])[_0x3081b1(0x185)](_0x3cbf00=>_0x3cbf00[_0x3081b1(0x1ad)]))!=null?_0x5411ae:[],_0x46fe81=JSON[_0x3081b1(0x18c)](_0x230e80),_0x4c384c=_0x43a065['threadId'],_0x4d0bcb=_0x43a065['id'],_0x537004={'memberId':(await this[_0x3081b1(0x199)][_0x3081b1(0x178)](_0x4848a9))[_0x3081b1(0x159)](),'unitId':_0x4848a9,'threadId':_0x4c384c,'mention':_0x2f50e1,'content':_0x46fe81,'replyId':_0x4d0bcb},_0x48c915=await this[_0x3081b1(0x174)][_0x3081b1(0x191)]('/universer-api/comment/unit/'+_0x4848a9+'/edit',{'body':_0x537004});return!_0x48c915[_0x3081b1(0x168)][_0x3081b1(0x1af)]||_0x48c915[_0x3081b1(0x168)][_0x3081b1(0x1af)][_0x3081b1(0x157)]===0x1;}async['resolveComment'](_0x3c8ede){const _0x4c7644=_0x1ab695,{unitId:_0x4cc7ab}=_0x3c8ede,_0x2a11e1=_0x3c8ede[_0x4c7644(0x1a5)],_0x1923c2={'memberId':this[_0x4c7644(0x163)][_0x4c7644(0x197)]()['userID'],'unitId':_0x4cc7ab,'threadId':_0x2a11e1,'solved':_0x3c8ede['resolved']?I[_0x4c7644(0x177)]:I['OpenOrReOpen']},_0xd6e238=await this[_0x4c7644(0x174)]['post'](_0x4c7644(0x1a3)+_0x4cc7ab+_0x4c7644(0x16c),{'body':_0x1923c2});return!_0xd6e238[_0x4c7644(0x168)][_0x4c7644(0x1af)]||_0xd6e238[_0x4c7644(0x168)]['error'][_0x4c7644(0x157)]===0x1;}async['deleteComment'](_0x2ba062,_0x2a40c3,_0xb4a3e4,_0x24da83){const _0x47468f=_0x1ab695,_0x499a1c={'memberId':(await this[_0x47468f(0x199)]['requireSession'](_0x2ba062))[_0x47468f(0x159)](),'threadId':_0xb4a3e4,'replyId':_0x24da83,'unitId':_0x2ba062},_0x5e74f1=await this['_httpService'][_0x47468f(0x191)](_0x47468f(0x1a3)+_0x2ba062+_0x47468f(0x170),{'body':_0x499a1c});return!_0x5e74f1[_0x47468f(0x168)][_0x47468f(0x1af)]||_0x5e74f1[_0x47468f(0x168)][_0x47468f(0x1af)]['code']===0x1;}async['listComments'](_0x459d45,_0x159614,_0x53bef4){const _0x525291=_0x1ab695,_0x48c014={'unitId':_0x459d45,'threadId':_0x53bef4},_0x2b49f7=await this['_httpService'][_0x525291(0x191)](_0x525291(0x1a3)+_0x459d45+'/list',{'body':_0x48c014}),_0x214cfb=_0x53bef4[_0x525291(0x185)](_0x1bcdb0=>ee(_0x2b49f7['body'][_0x525291(0x15d)][_0x1bcdb0],_0x459d45,_0x159614))[_0x525291(0x1a8)](Boolean);return Object[_0x525291(0x151)](_0x2b49f7[_0x525291(0x168)][_0x525291(0x1a9)])[_0x525291(0x15b)](_0x30cff2=>{const _0x5bc31b=_0x525291;this[_0x5bc31b(0x163)]['addUser'](_0x30cff2);}),_0x214cfb;}['saveCommentToSnapshot'](_0x487af0){const _0x2ac8ad=_0x1ab695;return{'id':_0x487af0['id'],'threadId':_0x487af0[_0x2ac8ad(0x1a5)],'ref':_0x487af0['ref']};}};f=Q([_(0x0,_0x14d5a2(_0x5c6d2d)),_(0x1,_0x14d5a2(_0x491dce)),_(0x2,_0x14d5a2(_0x296507)),_(0x3,_0x14d5a2(_0x153703))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x1c2fa3,_0x4927be,_0x4ef321,_0x44c339)=>{const _0x5ce6c7=_0x1ab695;for(var _0x40c9cd=_0x44c339>0x1?void 0x0:_0x44c339?re(_0x4927be,_0x4ef321):_0x4927be,_0x56953f=_0x1c2fa3[_0x5ce6c7(0x1b2)]-0x1,_0x2b99ae;_0x56953f>=0x0;_0x56953f--)(_0x2b99ae=_0x1c2fa3[_0x56953f])&&(_0x40c9cd=_0x2b99ae(_0x40c9cd)||_0x40c9cd);return _0x40c9cd;},N=(_0x1fc20e,_0x1bacde)=>(_0x3de11b,_0x187ab8)=>_0x1bacde(_0x3de11b,_0x187ab8,_0x1fc20e);let g=class extends _0x403f07{constructor(_0x5a2b3a,_0x5c6ed9){const _0x3dfca6=_0x1ab695;super(),this[_0x3dfca6(0x16e)]=_0x5a2b3a,this[_0x3dfca6(0x160)]=_0x5c6ed9,this[_0x3dfca6(0x1ae)]();}[_0x1ab695(0x1ae)](){const _0x2fb5f0=_0x1ab695;this[_0x2fb5f0(0x16e)][_0x2fb5f0(0x17e)]=this[_0x2fb5f0(0x160)],this[_0x2fb5f0(0x16e)][_0x2fb5f0(0x152)]=!0x1;}};g=te([N(0x0,_0x39aa21),N(0x1,_0x14d5a2(f))],g);var se=Object[_0x1ab695(0x190)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1b5a5e,_0x5eb963,_0x24fe2e)=>_0x5eb963 in _0x1b5a5e?se(_0x1b5a5e,_0x5eb963,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x24fe2e}):_0x1b5a5e[_0x5eb963]=_0x24fe2e,ie=(_0xaf5e83,_0x5b198a,_0x51eac5,_0x1fc84b)=>{const _0x1dbb22=_0x1ab695;for(var _0x3ae77e=_0x1fc84b>0x1?void 0x0:_0x1fc84b?oe(_0x5b198a,_0x51eac5):_0x5b198a,_0x2691cd=_0xaf5e83[_0x1dbb22(0x1b2)]-0x1,_0x240b95;_0x2691cd>=0x0;_0x2691cd--)(_0x240b95=_0xaf5e83[_0x2691cd])&&(_0x3ae77e=_0x240b95(_0x3ae77e)||_0x3ae77e);return _0x3ae77e;},w=(_0x36f444,_0x4f30f4)=>(_0x50d765,_0x578233)=>_0x4f30f4(_0x50d765,_0x578233,_0x36f444),$=(_0x5a6225,_0x154102,_0x537b3e)=>ne(_0x5a6225,typeof _0x154102!=_0x1ab695(0x18a)?_0x154102+'':_0x154102,_0x537b3e);let b=class extends _0xd075a6{constructor(_0x1aedbe=M,_0x1d9862,_0x5e0767){const _0x318f68=_0x1ab695;super(),this[_0x318f68(0x18d)]=_0x1aedbe,this['_injector']=_0x1d9862,this[_0x318f68(0x19b)]=_0x5e0767;const {..._0x3b0bb4}=_0xcec0b5({},M,this[_0x318f68(0x18d)]);this[_0x318f68(0x19b)][_0x318f68(0x15a)](z,_0x3b0bb4);}[_0x1ab695(0x15c)](){const _0x2195e4=_0x1ab695;[[f],[g],[S]][_0x2195e4(0x15b)](_0x319202=>{const _0x129a45=_0x2195e4;this[_0x129a45(0x158)]['add'](_0x319202);});}[_0x1ab695(0x153)](){const _0x103445=_0x1ab695;this['_injector'][_0x103445(0x192)](g),this['_injector'][_0x103445(0x192)](S);}};$(b,_0x1ab695(0x17d),W),$(b,_0x1ab695(0x186),_0x185fb6['UNIVER_UNKNOWN']),b=ie([_0x4ec335(_0x51046f,_0x215a50,_0x59e42c),w(0x1,_0x14d5a2(_0x153703)),w(0x2,_0x30003c)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x573a80=_0x5f51;(function(_0x241827,_0x49b5ee){const _0x3f17ce=_0x5f51,_0x3d70a0=_0x241827();while(!![]){try{const _0x162b4d=parseInt(_0x3f17ce(0x9f))/0x1+-parseInt(_0x3f17ce(0xb1))/0x2*(parseInt(_0x3f17ce(0x98))/0x3)+parseInt(_0x3f17ce(0xc0))/0x4*(parseInt(_0x3f17ce(0x96))/0x5)+parseInt(_0x3f17ce(0x8f))/0x6+-parseInt(_0x3f17ce(0xad))/0x7+parseInt(_0x3f17ce(0xb5))/0x8*(-parseInt(_0x3f17ce(0x80))/0x9)+-parseInt(_0x3f17ce(0x7e))/0xa*(-parseInt(_0x3f17ce(0x9a))/0xb);if(_0x162b4d===_0x49b5ee)break;else _0x3d70a0['push'](_0x3d70a0['shift']());}catch(_0x5c5d17){_0x3d70a0['push'](_0x3d70a0['shift']());}}}(_0x5909,0x51cd3));import{CommentService as _0x5632a6,CollaborationSessionService as _0x40ce6e,UniverCollaborationClientPlugin as _0x3326fd}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5531dd}from'@univerjs-pro/license';import{dayjs as _0x7daec8,UserManagerService as _0x4a6715,Inject as _0x517054,Injector as _0x3866f2,Disposable as _0x2a2b82,CustomRangeType as _0x4cb6b7,UniverInstanceType as _0x32835d,DependentOn as _0x56406b,IConfigService as _0x5f58c6,Plugin as _0x1f2883,merge as _0x5eb6cf}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1eb2c7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4d2c9d,IThreadCommentDataSourceService as _0x54ccd4}from'@univerjs/thread-comment';import{bufferTime as _0xa9368e}from'rxjs';import{HTTPService as _0x324242}from'@univerjs/network';const W=_0x573a80(0xcb);var I=(_0x55cca5=>(_0x55cca5[_0x55cca5['OpenOrReOpen']=0x0]=_0x573a80(0xc1),_0x55cca5[_0x55cca5[_0x573a80(0xd6)]=0x1]=_0x573a80(0xd6),_0x55cca5[_0x55cca5[_0x573a80(0xd2)]=-0x1]=_0x573a80(0xd2),_0x55cca5))(I||{}),v=(_0x54a0af=>(_0x54a0af[_0x54a0af[_0x573a80(0xa2)]=0x0]=_0x573a80(0xa2),_0x54a0af[_0x54a0af['Add']=0x1]=_0x573a80(0x9e),_0x54a0af[_0x54a0af[_0x573a80(0xbb)]=0x2]='Reply',_0x54a0af[_0x54a0af['Edit']=0x3]=_0x573a80(0xcc),_0x54a0af[_0x54a0af[_0x573a80(0x7a)]=0x4]=_0x573a80(0x7a),_0x54a0af[_0x54a0af[_0x573a80(0xb6)]=0x5]=_0x573a80(0xb6),_0x54a0af[_0x54a0af['UNRECOGNIZED']=-0x1]=_0x573a80(0xd2),_0x54a0af))(v||{});const D=_0x1a7f36=>_0x7daec8(new Date(+_0x1a7f36))[_0x573a80(0x88)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x596c6f,_0x5161e0)=>{const _0x380f24=_0x573a80,_0x285c80=_0x596c6f[_0x380f24(0x7d)](_0x4a6715),_0x218b57=_0x596c6f['get'](_0x324242);_0x5161e0[_0x380f24(0xa0)](_0x23f08c=>{const _0x2f4d1a=_0x380f24;_0x285c80[_0x2f4d1a(0xb3)](_0x23f08c)&&_0x5161e0[_0x2f4d1a(0x87)](_0x23f08c);}),_0x5161e0['size']&&(await _0x218b57[_0x380f24(0x7d)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5161e0]}}))[_0x380f24(0xca)][_0x380f24(0xa5)][_0x380f24(0xa0)](_0x57780f=>{const _0x1c5475=_0x380f24;_0x57780f&&_0x285c80[_0x1c5475(0xbf)](_0x57780f);});};var K=Object[_0x573a80(0x77)],V=(_0x4d39a3,_0x2fbbfd,_0x4023ef,_0x360af4)=>{const _0x4532fe=_0x573a80;for(var _0x48656d=_0x360af4>0x1?void 0x0:_0x360af4?K(_0x2fbbfd,_0x4023ef):_0x2fbbfd,_0x25a9da=_0x4d39a3[_0x4532fe(0x8a)]-0x1,_0x5510a8;_0x25a9da>=0x0;_0x25a9da--)(_0x5510a8=_0x4d39a3[_0x25a9da])&&(_0x48656d=_0x5510a8(_0x48656d)||_0x48656d);return _0x48656d;},p=(_0x32173e,_0x32a97f)=>(_0x3a6762,_0x5077c6)=>_0x32a97f(_0x3a6762,_0x5077c6,_0x32173e);let S=class extends _0x2a2b82{constructor(_0x584777,_0x366567,_0x3e9f5b,_0x4c76c2){const _0x1b20bf=_0x573a80;super(),this[_0x1b20bf(0x78)]=_0x584777,this[_0x1b20bf(0xc6)]=_0x366567,this[_0x1b20bf(0xd0)]=_0x3e9f5b,this['_injector']=_0x4c76c2,this[_0x1b20bf(0x93)](),this['_initUserSync']();}[_0x573a80(0xae)](){const _0x27ab43=_0x573a80;this[_0x27ab43(0xcf)](this[_0x27ab43(0xc6)][_0x27ab43(0x9d)][_0x27ab43(0x86)](_0xa9368e(0x10))['subscribe'](_0x2be443=>{const _0x3a9617=_0x27ab43,_0x31faf7=new Set();_0x2be443['forEach'](_0x58e8d4=>{const _0x1516aa=_0x5f51;switch(_0x58e8d4[_0x1516aa(0x7b)]){case _0x1516aa(0xc3):{const _0x4a26bd=_0x58e8d4[_0x1516aa(0xb2)][_0x1516aa(0x95)];_0x31faf7['add'](_0x4a26bd);break;}}}),B(this[_0x3a9617(0x84)],_0x31faf7);}));}[_0x573a80(0x93)](){const _0x20daff=_0x573a80;this[_0x20daff(0xcf)](this[_0x20daff(0x78)][_0x20daff(0x9d)][_0x20daff(0xd4)](async _0x3a0fcd=>{const _0x2ec4c6=_0x20daff;var _0xa0b35,_0x4ba2aa,_0x40fa33,_0xee28a1;const _0x4f81ba=(_0xa0b35=this['_threadCommentModel']['getUnit'](_0x3a0fcd[_0x2ec4c6(0x74)])[_0x2ec4c6(0x79)](_0x3d0e49=>_0x3d0e49[_0x2ec4c6(0xb7)]===_0x3a0fcd[_0x2ec4c6(0xb7)]))==null?void 0x0:_0xa0b35['root'];if(!_0x4f81ba)return;const {unitId:_0x1da78c,subUnitId:_0x599302}=_0x4f81ba;switch(_0x3a0fcd[_0x2ec4c6(0x9c)]&&this[_0x2ec4c6(0xd0)][_0x2ec4c6(0xbf)](_0x3a0fcd[_0x2ec4c6(0x9c)]),_0x3a0fcd['type']){case v['Add']:break;case v[_0x2ec4c6(0xbb)]:{this[_0x2ec4c6(0xc6)][_0x2ec4c6(0x92)](_0x1da78c,_0x599302,{'unitId':_0x1da78c,'subUnitId':_0x599302,'ref':'','id':_0x3a0fcd[_0x2ec4c6(0xd1)],'dT':D(+_0x3a0fcd['createTimestamp']),'threadId':_0x3a0fcd[_0x2ec4c6(0xb7)],'personId':(_0x40fa33=(_0x4ba2aa=_0x3a0fcd[_0x2ec4c6(0x9c)])==null?void 0x0:_0x4ba2aa[_0x2ec4c6(0xaf)])!=null?_0x40fa33:_0x3a0fcd[_0x2ec4c6(0xbc)],'text':JSON[_0x2ec4c6(0xb8)](_0x3a0fcd['content']),'parentId':_0x4f81ba['id']});break;}case v['Delete']:{const _0x47d13d=this[_0x2ec4c6(0xc6)][_0x2ec4c6(0xc4)](_0x1da78c,_0x599302,_0x3a0fcd[_0x2ec4c6(0xd1)]);_0x47d13d&&_0x47d13d[_0x2ec4c6(0x7c)]&&this[_0x2ec4c6(0xc6)][_0x2ec4c6(0xba)](_0x1da78c,_0x599302,_0x3a0fcd['replyId']);break;}case v['Edit']:{this[_0x2ec4c6(0xc6)]['updateComment'](_0x1da78c,_0x599302,{'commentId':_0x3a0fcd['replyId'],'text':JSON['parse'](_0x3a0fcd['content'])});break;}case v[_0x2ec4c6(0xb6)]:{const _0x15ebcf=(_0xee28a1=this[_0x2ec4c6(0xc6)]['getUnit'](_0x3a0fcd[_0x2ec4c6(0x74)])[_0x2ec4c6(0x79)](_0x3a99bb=>_0x3a99bb['threadId']===_0x3a0fcd[_0x2ec4c6(0xb7)]))==null?void 0x0:_0xee28a1[_0x2ec4c6(0xce)];_0x15ebcf&&this[_0x2ec4c6(0xc6)]['resolveComment'](_0x1da78c,_0x599302,_0x15ebcf['id'],_0x3a0fcd[_0x2ec4c6(0xb0)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x517054(_0x5632a6)),p(0x1,_0x517054(_0x4d2c9d)),p(0x2,_0x517054(_0x4a6715)),p(0x3,_0x517054(_0x3866f2))],S);function _0x5909(){const _0x540bc1=['commentUpdate$','Add','602968lajUHR','forEach','map','Unknown','error','rangeType','users','_threadCommentDataSource','listComments','comments','pluginName','getMemberID','COMMENT','_sessionService','2665208pnHmbV','_initUserSync','userID','solved','550FnxEZC','payload','getUser','_httpService','531592xHUUCo','Solve','threadId','parse','onReady','deleteComment','Reply','userId','getCurrentUser','updateComment','addUser','663452drRsnJ','OpenOrReOpen','_threadCommentDataSourceService','add','getComment','_configService','_threadCommentModel','/universer-api/comment/unit/','filter','rangeId','body','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','setConfig','root','disposeWithMe','_userService','replyId','UNRECOGNIZED','slice','subscribe','code','Solved','unitId','createTimestamp','comment','getOwnPropertyDescriptor','_commentService','find','Delete','type','parentId','get','100YcWfMg','replies','9HXAsDg','requireSession','saveCommentToSnapshot','ref','_injector','/reply','pipe','delete','format','/list','length','/solved','YYYY/MM/DD\x20HH:mm','_config','customRanges','268926kgUsgS','values','/add','addComment','_init','onStarting','personId','5yppwue','_initDataSource','1794ejaHcB','stringify','146355vDYxSw','post','user'];_0x5909=function(){return _0x540bc1;};return _0x5909();}const z='thread-comment-data-source.config',M={};var k=Object[_0x573a80(0x77)],Q=(_0x3d82b0,_0x3bf63d,_0x5c7995,_0x138da3)=>{const _0x2f44ab=_0x573a80;for(var _0x435031=_0x138da3>0x1?void 0x0:_0x138da3?k(_0x3bf63d,_0x5c7995):_0x3bf63d,_0x3b0213=_0x3d82b0[_0x2f44ab(0x8a)]-0x1,_0x56d83e;_0x3b0213>=0x0;_0x3b0213--)(_0x56d83e=_0x3d82b0[_0x3b0213])&&(_0x435031=_0x56d83e(_0x435031)||_0x435031);return _0x435031;},_=(_0x7b353e,_0x1595ea)=>(_0x1554fb,_0x48807c)=>_0x1595ea(_0x1554fb,_0x48807c,_0x7b353e);function X(_0x1668e6,_0x1670e2){const _0x145c94=_0x573a80,_0x2dae78=_0x1668e6[_0x145c94(0x7f)][0x0];return{..._0x1670e2,'id':_0x2dae78['replyId'],'resolved':_0x1668e6[_0x145c94(0xb0)]===0x1,'dT':D(_0x2dae78['createTimestamp']),'personId':_0x2dae78[_0x145c94(0xbc)],'threadId':_0x2dae78['threadId']};}function ee(_0x54543e,_0x423478,_0x2545a1){const _0x25b5d5=_0x573a80;var _0xf71541,_0x17e753;if(((_0x17e753=(_0xf71541=_0x54543e==null?void 0x0:_0x54543e[_0x25b5d5(0x7f)])==null?void 0x0:_0xf71541[_0x25b5d5(0x8a)])!=null?_0x17e753:0x0)>0x0){const _0x226220=(_0x14ce1,_0x183267)=>({'id':_0x14ce1['replyId'],'threadId':_0x14ce1[_0x25b5d5(0xb7)],'dT':D(_0x14ce1[_0x25b5d5(0x75)]),'personId':_0x14ce1[_0x25b5d5(0xbc)],'resolved':_0x54543e[_0x25b5d5(0xb0)]===I[_0x25b5d5(0xd6)],'unitId':_0x423478,'subUnitId':_0x2545a1,'text':JSON['parse'](_0x14ce1['content']),'parentId':_0x183267}),_0x556d28=_0x226220(_0x54543e[_0x25b5d5(0x7f)][0x0]);return{..._0x556d28,'children':_0x54543e[_0x25b5d5(0x7f)][_0x25b5d5(0xd3)](0x1)[_0x25b5d5(0xa1)](_0x82e8aa=>_0x226220(_0x82e8aa,_0x556d28['id']))};}return null;}let f=class{constructor(_0xa598bc,_0x56e65c,_0x239393,_0x4a6002){const _0x389812=_0x573a80;this[_0x389812(0xb4)]=_0xa598bc,this[_0x389812(0xd0)]=_0x56e65c,this[_0x389812(0xac)]=_0x239393,this['_injector']=_0x4a6002;}async['addComment'](_0x15ca78){const _0xf6808b=_0x573a80;var _0x2a08c7,_0x49c377;const {parentId:_0x322db6,unitId:_0x55a3b2,text:_0x15c743,threadId:_0x19b473}=_0x15ca78,_0x3cbb7c=(_0x49c377=(_0x2a08c7=_0x15c743[_0xf6808b(0x8e)])==null?void 0x0:_0x2a08c7[_0xf6808b(0xc8)](_0x3e102a=>_0x3e102a['rangeType']===_0x4cb6b7[_0xf6808b(0xab)])['map'](_0x539034=>_0x539034['rangeId']))!=null?_0x49c377:[],_0x5a248a=JSON[_0xf6808b(0x99)](_0x15c743),_0x29d547=(await this[_0xf6808b(0xac)][_0xf6808b(0x81)](_0x55a3b2))[_0xf6808b(0xaa)]();if(_0x322db6){const _0x9ac9b3={'memberId':_0x29d547,'unitId':_0x55a3b2,'content':_0x5a248a,'mention':_0x3cbb7c,'threadId':_0x19b473},_0x125a52=(await this[_0xf6808b(0xb4)][_0xf6808b(0x9b)](_0xf6808b(0xc7)+_0x55a3b2+_0xf6808b(0x85),{'body':_0x9ac9b3}))['body']['reply'];return{..._0x15ca78,'id':_0x125a52[_0xf6808b(0xd1)],'dT':_0x7daec8(+_0x125a52['createTimestamp'])[_0xf6808b(0x88)](_0xf6808b(0x8c)),'personId':_0x125a52[_0xf6808b(0xbc)]};}else{const _0x1f26fe={'memberId':_0x29d547,'unitId':_0x55a3b2,'content':_0x5a248a,'mention':_0x3cbb7c},_0x5af2ae=await this['_httpService'][_0xf6808b(0x9b)](_0xf6808b(0xc7)+_0x55a3b2+_0xf6808b(0x91),{'body':_0x1f26fe});return X(_0x5af2ae['body'][_0xf6808b(0x76)],_0x15ca78);}}async[_0x573a80(0xbe)](_0xe678c0){const _0xa2bd23=_0x573a80;var _0x58ba1e,_0x3ab464;const {text:_0x198ac0,unitId:_0x71565c}=_0xe678c0,_0x32eaba=(_0x3ab464=(_0x58ba1e=_0x198ac0[_0xa2bd23(0x8e)])==null?void 0x0:_0x58ba1e[_0xa2bd23(0xc8)](_0x3cdc47=>_0x3cdc47[_0xa2bd23(0xa4)]===_0x4cb6b7['COMMENT'])[_0xa2bd23(0xa1)](_0x121171=>_0x121171[_0xa2bd23(0xc9)]))!=null?_0x3ab464:[],_0x22ee53=JSON['stringify'](_0x198ac0),_0x51bf94=_0xe678c0['threadId'],_0x5ccfd6=_0xe678c0['id'],_0x28f915={'memberId':(await this[_0xa2bd23(0xac)][_0xa2bd23(0x81)](_0x71565c))['getMemberID'](),'unitId':_0x71565c,'threadId':_0x51bf94,'mention':_0x32eaba,'content':_0x22ee53,'replyId':_0x5ccfd6},_0x5f02c2=await this['_httpService'][_0xa2bd23(0x9b)](_0xa2bd23(0xc7)+_0x71565c+'/edit',{'body':_0x28f915});return!_0x5f02c2[_0xa2bd23(0xca)][_0xa2bd23(0xa3)]||_0x5f02c2[_0xa2bd23(0xca)][_0xa2bd23(0xa3)]['code']===0x1;}async['resolveComment'](_0x35a760){const _0x49c650=_0x573a80,{unitId:_0x20da3e}=_0x35a760,_0x495313=_0x35a760['threadId'],_0x2f1953={'memberId':this[_0x49c650(0xd0)][_0x49c650(0xbd)]()[_0x49c650(0xaf)],'unitId':_0x20da3e,'threadId':_0x495313,'solved':_0x35a760['resolved']?I[_0x49c650(0xd6)]:I['OpenOrReOpen']},_0x9cade3=await this[_0x49c650(0xb4)]['post'](_0x49c650(0xc7)+_0x20da3e+_0x49c650(0x8b),{'body':_0x2f1953});return!_0x9cade3[_0x49c650(0xca)]['error']||_0x9cade3[_0x49c650(0xca)][_0x49c650(0xa3)][_0x49c650(0xd5)]===0x1;}async[_0x573a80(0xba)](_0x500054,_0x599669,_0x2dc23c,_0x2a149d){const _0xd7c7ba=_0x573a80,_0x4730db={'memberId':(await this[_0xd7c7ba(0xac)][_0xd7c7ba(0x81)](_0x500054))['getMemberID'](),'threadId':_0x2dc23c,'replyId':_0x2a149d,'unitId':_0x500054},_0x36caa8=await this['_httpService'][_0xd7c7ba(0x9b)](_0xd7c7ba(0xc7)+_0x500054+'/delete',{'body':_0x4730db});return!_0x36caa8['body']['error']||_0x36caa8[_0xd7c7ba(0xca)][_0xd7c7ba(0xa3)][_0xd7c7ba(0xd5)]===0x1;}async[_0x573a80(0xa7)](_0x2c47c5,_0x3aa3ae,_0x5f3401){const _0x5630b5=_0x573a80,_0x81853e={'unitId':_0x2c47c5,'threadId':_0x5f3401},_0x24b7f2=await this[_0x5630b5(0xb4)][_0x5630b5(0x9b)](_0x5630b5(0xc7)+_0x2c47c5+_0x5630b5(0x89),{'body':_0x81853e}),_0x931864=_0x5f3401[_0x5630b5(0xa1)](_0x323aef=>ee(_0x24b7f2['body'][_0x5630b5(0xa8)][_0x323aef],_0x2c47c5,_0x3aa3ae))['filter'](Boolean);return Object[_0x5630b5(0x90)](_0x24b7f2[_0x5630b5(0xca)][_0x5630b5(0xa5)])[_0x5630b5(0xa0)](_0x48890d=>{const _0x4c6fba=_0x5630b5;this[_0x4c6fba(0xd0)][_0x4c6fba(0xbf)](_0x48890d);}),_0x931864;}[_0x573a80(0x82)](_0x485253){const _0x599a28=_0x573a80;return{'id':_0x485253['id'],'threadId':_0x485253[_0x599a28(0xb7)],'ref':_0x485253[_0x599a28(0x83)]};}};f=Q([_(0x0,_0x517054(_0x324242)),_(0x1,_0x517054(_0x4a6715)),_(0x2,_0x517054(_0x40ce6e)),_(0x3,_0x517054(_0x3866f2))],f);var re=Object[_0x573a80(0x77)],te=(_0x305308,_0x2333b7,_0x36e446,_0xd91a32)=>{const _0x263e63=_0x573a80;for(var _0x474acc=_0xd91a32>0x1?void 0x0:_0xd91a32?re(_0x2333b7,_0x36e446):_0x2333b7,_0x3e2ce5=_0x305308[_0x263e63(0x8a)]-0x1,_0x818f71;_0x3e2ce5>=0x0;_0x3e2ce5--)(_0x818f71=_0x305308[_0x3e2ce5])&&(_0x474acc=_0x818f71(_0x474acc)||_0x474acc);return _0x474acc;},N=(_0x10f04d,_0x39b30e)=>(_0x23baac,_0x49f89f)=>_0x39b30e(_0x23baac,_0x49f89f,_0x10f04d);let g=class extends _0x2a2b82{constructor(_0x3574a7,_0x597d86){const _0x1f2e8c=_0x573a80;super(),this[_0x1f2e8c(0xc2)]=_0x3574a7,this['_threadCommentDataSource']=_0x597d86,this[_0x1f2e8c(0x97)]();}[_0x573a80(0x97)](){const _0xa7fad6=_0x573a80;this[_0xa7fad6(0xc2)]['dataSource']=this[_0xa7fad6(0xa6)],this[_0xa7fad6(0xc2)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x54ccd4),N(0x1,_0x517054(f))],g);var se=Object['defineProperty'],oe=Object[_0x573a80(0x77)],ne=(_0x26b938,_0x5a8d5b,_0x27affc)=>_0x5a8d5b in _0x26b938?se(_0x26b938,_0x5a8d5b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x27affc}):_0x26b938[_0x5a8d5b]=_0x27affc,ie=(_0x26471e,_0x4383a6,_0x4741a8,_0x9590b6)=>{const _0x12587b=_0x573a80;for(var _0x59090b=_0x9590b6>0x1?void 0x0:_0x9590b6?oe(_0x4383a6,_0x4741a8):_0x4383a6,_0x45eefb=_0x26471e[_0x12587b(0x8a)]-0x1,_0x43af29;_0x45eefb>=0x0;_0x45eefb--)(_0x43af29=_0x26471e[_0x45eefb])&&(_0x59090b=_0x43af29(_0x59090b)||_0x59090b);return _0x59090b;},w=(_0x59e5db,_0x11d19a)=>(_0x256c91,_0xb8b7b6)=>_0x11d19a(_0x256c91,_0xb8b7b6,_0x59e5db),$=(_0x508b75,_0x1ddf10,_0x3b87c6)=>ne(_0x508b75,typeof _0x1ddf10!='symbol'?_0x1ddf10+'':_0x1ddf10,_0x3b87c6);let b=class extends _0x1f2883{constructor(_0x8abc38=M,_0x9e2b97,_0x2f1957){const _0x408525=_0x573a80;super(),this[_0x408525(0x8d)]=_0x8abc38,this[_0x408525(0x84)]=_0x9e2b97,this[_0x408525(0xc5)]=_0x2f1957;const {..._0x63a3ed}=_0x5eb6cf({},M,this[_0x408525(0x8d)]);this[_0x408525(0xc5)][_0x408525(0xcd)](z,_0x63a3ed);}[_0x573a80(0x94)](){const _0x15f1ad=_0x573a80;[[f],[g],[S]][_0x15f1ad(0xa0)](_0x2630ea=>{const _0x304c25=_0x15f1ad;this['_injector'][_0x304c25(0xc3)](_0x2630ea);});}[_0x573a80(0xb9)](){const _0x13e250=_0x573a80;this[_0x13e250(0x84)]['get'](g),this[_0x13e250(0x84)][_0x13e250(0x7d)](S);}};function _0x5f51(_0x3d4c2a,_0x23fdcb){const _0x5909ba=_0x5909();return _0x5f51=function(_0x5f5183,_0x4d31df){_0x5f5183=_0x5f5183-0x74;let _0x1f68d7=_0x5909ba[_0x5f5183];return _0x1f68d7;},_0x5f51(_0x3d4c2a,_0x23fdcb);}$(b,_0x573a80(0xa9),W),$(b,_0x573a80(0x7b),_0x32835d['UNIVER_UNKNOWN']),b=ie([_0x56406b(_0x1eb2c7,_0x3326fd,_0x5531dd),w(0x1,_0x517054(_0x3866f2)),w(0x2,_0x5f58c6)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x1ab695=_0x5c8a;(function(_0x5a823a,_0x5e761d){const _0xc27562=_0x5c8a,_0x28e648=_0x5a823a();while(!![]){try{const _0x2cf62d=-parseInt(_0xc27562(0x167))/0x1+-parseInt(_0xc27562(0x19c))/0x2+parseInt(_0xc27562(0x1a6))/0x3*(-parseInt(_0xc27562(0x1a2))/0x4)+parseInt(_0xc27562(0x155))/0x5+parseInt(_0xc27562(0x1b6))/0x6*(-parseInt(_0xc27562(0x19a))/0x7)+-parseInt(_0xc27562(0x18b))/0x8*(parseInt(_0xc27562(0x171))/0x9)+-parseInt(_0xc27562(0x16b))/0xa*(-parseInt(_0xc27562(0x1b1))/0xb);if(_0x2cf62d===_0x5e761d)break;else _0x28e648['push'](_0x28e648['shift']());}catch(_0x91ef88){_0x28e648['push'](_0x28e648['shift']());}}}(_0x1577,0x52941));import{CommentService as _0x2f1b6,CollaborationSessionService as _0x296507,UniverCollaborationClientPlugin as _0x215a50}from'@univerjs-pro/collaboration-client';function _0x5c8a(_0x213d84,_0xc1e0aa){const _0x1577ff=_0x1577();return _0x5c8a=function(_0x5c8a70,_0x38170c){_0x5c8a70=_0x5c8a70-0x151;let _0x2c9b54=_0x1577ff[_0x5c8a70];return _0x2c9b54;},_0x5c8a(_0x213d84,_0xc1e0aa);}import{UniverLicensePlugin as _0x59e42c}from'@univerjs-pro/license';import{dayjs as _0x2ee0ce,UserManagerService as _0x491dce,Inject as _0x14d5a2,Injector as _0x153703,Disposable as _0x403f07,CustomRangeType as _0x55c7fc,UniverInstanceType as _0x185fb6,DependentOn as _0x4ec335,IConfigService as _0x30003c,Plugin as _0xd075a6,merge as _0xcec0b5}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x51046f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x54638b,IThreadCommentDataSourceService as _0x39aa21}from'@univerjs/thread-comment';import{bufferTime as _0xade764}from'rxjs';import{HTTPService as _0x5c6d2d}from'@univerjs/network';const W=_0x1ab695(0x1a1);var I=(_0x10ded5=>(_0x10ded5[_0x10ded5[_0x1ab695(0x196)]=0x0]=_0x1ab695(0x196),_0x10ded5[_0x10ded5[_0x1ab695(0x177)]=0x1]='Solved',_0x10ded5[_0x10ded5[_0x1ab695(0x154)]=-0x1]='UNRECOGNIZED',_0x10ded5))(I||{}),v=(_0x5d8504=>(_0x5d8504[_0x5d8504[_0x1ab695(0x165)]=0x0]=_0x1ab695(0x165),_0x5d8504[_0x5d8504[_0x1ab695(0x169)]=0x1]=_0x1ab695(0x169),_0x5d8504[_0x5d8504[_0x1ab695(0x1b0)]=0x2]=_0x1ab695(0x1b0),_0x5d8504[_0x5d8504[_0x1ab695(0x1a7)]=0x3]=_0x1ab695(0x1a7),_0x5d8504[_0x5d8504[_0x1ab695(0x18f)]=0x4]='Delete',_0x5d8504[_0x5d8504['Solve']=0x5]=_0x1ab695(0x176),_0x5d8504[_0x5d8504['UNRECOGNIZED']=-0x1]=_0x1ab695(0x154),_0x5d8504))(v||{});const D=_0x735ab=>_0x2ee0ce(new Date(+_0x735ab))[_0x1ab695(0x17f)](_0x1ab695(0x194)),B=async(_0x45720d,_0x4f5406)=>{const _0x58ba0f=_0x1ab695,_0x21c5fb=_0x45720d[_0x58ba0f(0x192)](_0x491dce),_0x40c6cd=_0x45720d[_0x58ba0f(0x192)](_0x5c6d2d);_0x4f5406['forEach'](_0x282b27=>{const _0x180f4a=_0x58ba0f;_0x21c5fb['getUser'](_0x282b27)&&_0x4f5406[_0x180f4a(0x198)](_0x282b27);}),_0x4f5406[_0x58ba0f(0x1a4)]&&(await _0x40c6cd[_0x58ba0f(0x192)](_0x58ba0f(0x189),{'params':{'userIDs':[..._0x4f5406]}}))['body']['users'][_0x58ba0f(0x15b)](_0x224ff=>{const _0x1cedac=_0x58ba0f;_0x224ff&&_0x21c5fb[_0x1cedac(0x19f)](_0x224ff);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2e162b,_0x31db1f,_0x22c426,_0x28245c)=>{const _0x24adbc=_0x1ab695;for(var _0x4c8bd5=_0x28245c>0x1?void 0x0:_0x28245c?K(_0x31db1f,_0x22c426):_0x31db1f,_0x1dd158=_0x2e162b[_0x24adbc(0x1b2)]-0x1,_0x4a3921;_0x1dd158>=0x0;_0x1dd158--)(_0x4a3921=_0x2e162b[_0x1dd158])&&(_0x4c8bd5=_0x4a3921(_0x4c8bd5)||_0x4c8bd5);return _0x4c8bd5;},p=(_0x42fbc7,_0x349b84)=>(_0x627dd2,_0x425f42)=>_0x349b84(_0x627dd2,_0x425f42,_0x42fbc7);let S=class extends _0x403f07{constructor(_0x4aea70,_0x135039,_0x43e4c8,_0x37040e){const _0x51a8fd=_0x1ab695;super(),this[_0x51a8fd(0x1ab)]=_0x4aea70,this['_threadCommentModel']=_0x135039,this['_userService']=_0x43e4c8,this[_0x51a8fd(0x158)]=_0x37040e,this['_init'](),this[_0x51a8fd(0x15e)]();}['_initUserSync'](){const _0x4c3178=_0x1ab695;this[_0x4c3178(0x1ac)](this[_0x4c3178(0x1a0)][_0x4c3178(0x1b4)][_0x4c3178(0x173)](_0xade764(0x10))[_0x4c3178(0x187)](_0x4e6960=>{const _0x311b25=_0x4c3178,_0x36162e=new Set();_0x4e6960[_0x311b25(0x15b)](_0x3fb22d=>{const _0x2459d0=_0x311b25;switch(_0x3fb22d[_0x2459d0(0x186)]){case _0x2459d0(0x195):{const _0x2f4173=_0x3fb22d['payload'][_0x2459d0(0x19e)];_0x36162e[_0x2459d0(0x195)](_0x2f4173);break;}}}),B(this['_injector'],_0x36162e);}));}[_0x1ab695(0x164)](){const _0x3a97eb=_0x1ab695;this[_0x3a97eb(0x1ac)](this[_0x3a97eb(0x1ab)]['commentUpdate$']['subscribe'](async _0x388598=>{const _0x57f2d8=_0x3a97eb;var _0x450fef,_0x289362,_0x37d568,_0x41ef2a;const _0x5b60cd=(_0x450fef=this[_0x57f2d8(0x1a0)]['getUnit'](_0x388598['unitId'])['find'](_0x51502c=>_0x51502c[_0x57f2d8(0x1a5)]===_0x388598[_0x57f2d8(0x1a5)]))==null?void 0x0:_0x450fef['root'];if(!_0x5b60cd)return;const {unitId:_0x2bbc7a,subUnitId:_0x235d58}=_0x5b60cd;switch(_0x388598[_0x57f2d8(0x161)]&&this[_0x57f2d8(0x163)][_0x57f2d8(0x19f)](_0x388598[_0x57f2d8(0x161)]),_0x388598[_0x57f2d8(0x186)]){case v['Add']:break;case v['Reply']:{this[_0x57f2d8(0x1a0)][_0x57f2d8(0x172)](_0x2bbc7a,_0x235d58,{'unitId':_0x2bbc7a,'subUnitId':_0x235d58,'ref':'','id':_0x388598[_0x57f2d8(0x16d)],'dT':D(+_0x388598[_0x57f2d8(0x182)]),'threadId':_0x388598[_0x57f2d8(0x1a5)],'personId':(_0x37d568=(_0x289362=_0x388598[_0x57f2d8(0x161)])==null?void 0x0:_0x289362['userID'])!=null?_0x37d568:_0x388598[_0x57f2d8(0x181)],'text':JSON[_0x57f2d8(0x179)](_0x388598['content']),'parentId':_0x5b60cd['id']});break;}case v[_0x57f2d8(0x18f)]:{const _0x169d36=this[_0x57f2d8(0x1a0)][_0x57f2d8(0x17c)](_0x2bbc7a,_0x235d58,_0x388598[_0x57f2d8(0x16d)]);_0x169d36&&_0x169d36['parentId']&&this[_0x57f2d8(0x1a0)][_0x57f2d8(0x16a)](_0x2bbc7a,_0x235d58,_0x388598[_0x57f2d8(0x16d)]);break;}case v[_0x57f2d8(0x1a7)]:{this[_0x57f2d8(0x1a0)][_0x57f2d8(0x193)](_0x2bbc7a,_0x235d58,{'commentId':_0x388598[_0x57f2d8(0x16d)],'text':JSON[_0x57f2d8(0x179)](_0x388598['content'])});break;}case v[_0x57f2d8(0x176)]:{const _0x4ba43d=(_0x41ef2a=this[_0x57f2d8(0x1a0)][_0x57f2d8(0x19d)](_0x388598[_0x57f2d8(0x16f)])[_0x57f2d8(0x184)](_0x53d067=>_0x53d067['threadId']===_0x388598[_0x57f2d8(0x1a5)]))==null?void 0x0:_0x41ef2a['root'];_0x4ba43d&&this[_0x57f2d8(0x1a0)][_0x57f2d8(0x188)](_0x2bbc7a,_0x235d58,_0x4ba43d['id'],_0x388598['solved']===I[_0x57f2d8(0x177)]);break;}}}));}};S=V([p(0x0,_0x14d5a2(_0x2f1b6)),p(0x1,_0x14d5a2(_0x54638b)),p(0x2,_0x14d5a2(_0x491dce)),p(0x3,_0x14d5a2(_0x153703))],S);const z=_0x1ab695(0x162),M={};var k=Object[_0x1ab695(0x17a)],Q=(_0x4ff8df,_0x3b9800,_0x2db718,_0x3b9b2f)=>{const _0xf9c1bc=_0x1ab695;for(var _0x2698c9=_0x3b9b2f>0x1?void 0x0:_0x3b9b2f?k(_0x3b9800,_0x2db718):_0x3b9800,_0x3b21dd=_0x4ff8df[_0xf9c1bc(0x1b2)]-0x1,_0x103f85;_0x3b21dd>=0x0;_0x3b21dd--)(_0x103f85=_0x4ff8df[_0x3b21dd])&&(_0x2698c9=_0x103f85(_0x2698c9)||_0x2698c9);return _0x2698c9;},_=(_0x3eb845,_0x1f066e)=>(_0x3b8104,_0x5519b3)=>_0x1f066e(_0x3b8104,_0x5519b3,_0x3eb845);function X(_0x107474,_0x4de781){const _0x4016ff=_0x1ab695,_0x2474fb=_0x107474[_0x4016ff(0x1aa)][0x0];return{..._0x4de781,'id':_0x2474fb[_0x4016ff(0x16d)],'resolved':_0x107474[_0x4016ff(0x1b5)]===0x1,'dT':D(_0x2474fb[_0x4016ff(0x182)]),'personId':_0x2474fb['userId'],'threadId':_0x2474fb[_0x4016ff(0x1a5)]};}function _0x1577(){const _0x37f951=['body','Add','deleteComment','30phFFPC','/solved','replyId','_threadCommentDataSourceService','unitId','/delete','1755ZyqmvX','addComment','pipe','_httpService','content','Solve','Solved','requireSession','parse','getOwnPropertyDescriptor','/reply','getComment','pluginName','dataSource','format','COMMENT','userId','createTimestamp','customRanges','find','map','type','subscribe','resolveComment','/universer-api/user/list','symbol','9448IarCwX','stringify','_config','rangeType','Delete','defineProperty','post','get','updateComment','YYYY/MM/DD\x20HH:mm','add','OpenOrReOpen','getCurrentUser','delete','_sessionService','28AGMubT','_configService','895870vUegaF','getUnit','personId','addUser','_threadCommentModel','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','16EWFoLJ','/universer-api/comment/unit/','size','threadId','403134NChdRu','Edit','filter','users','replies','_commentService','disposeWithMe','rangeId','_initDataSource','error','Reply','6822761xcQhzz','length','/add','commentUpdate$','solved','269100reJCWZ','values','syncUpdateMutationToColla','onReady','UNRECOGNIZED','1960225FSRNPR','reply','code','_injector','getMemberID','setConfig','forEach','onStarting','comments','_initUserSync','comment','_threadCommentDataSource','user','thread-comment-data-source.config','_userService','_init','Unknown','slice','519415rwGyiA'];_0x1577=function(){return _0x37f951;};return _0x1577();}function ee(_0x138eab,_0x122584,_0x4d758b){const _0x1afbdc=_0x1ab695;var _0x3160ea,_0x544f5b;if(((_0x544f5b=(_0x3160ea=_0x138eab==null?void 0x0:_0x138eab[_0x1afbdc(0x1aa)])==null?void 0x0:_0x3160ea[_0x1afbdc(0x1b2)])!=null?_0x544f5b:0x0)>0x0){const _0x5a887e=(_0x2595c8,_0x4cb673)=>({'id':_0x2595c8[_0x1afbdc(0x16d)],'threadId':_0x2595c8[_0x1afbdc(0x1a5)],'dT':D(_0x2595c8[_0x1afbdc(0x182)]),'personId':_0x2595c8[_0x1afbdc(0x181)],'resolved':_0x138eab['solved']===I[_0x1afbdc(0x177)],'unitId':_0x122584,'subUnitId':_0x4d758b,'text':JSON[_0x1afbdc(0x179)](_0x2595c8[_0x1afbdc(0x175)]),'parentId':_0x4cb673}),_0x19300a=_0x5a887e(_0x138eab[_0x1afbdc(0x1aa)][0x0]);return{..._0x19300a,'children':_0x138eab['replies'][_0x1afbdc(0x166)](0x1)['map'](_0x304013=>_0x5a887e(_0x304013,_0x19300a['id']))};}return null;}let f=class{constructor(_0x3d12c2,_0x28ac34,_0xf4cd7a,_0x285dd1){const _0x209268=_0x1ab695;this[_0x209268(0x174)]=_0x3d12c2,this['_userService']=_0x28ac34,this[_0x209268(0x199)]=_0xf4cd7a,this['_injector']=_0x285dd1;}async[_0x1ab695(0x172)](_0x45b6a3){const _0x5373cd=_0x1ab695;var _0x1e8862,_0x2e0855;const {parentId:_0x38d4a5,unitId:_0x112310,text:_0x413995,threadId:_0x4ba364}=_0x45b6a3,_0x7cd92b=(_0x2e0855=(_0x1e8862=_0x413995[_0x5373cd(0x183)])==null?void 0x0:_0x1e8862[_0x5373cd(0x1a8)](_0x25bf04=>_0x25bf04[_0x5373cd(0x18e)]===_0x55c7fc[_0x5373cd(0x180)])[_0x5373cd(0x185)](_0x3b4d77=>_0x3b4d77[_0x5373cd(0x1ad)]))!=null?_0x2e0855:[],_0x33383b=JSON['stringify'](_0x413995),_0x19b24a=(await this[_0x5373cd(0x199)]['requireSession'](_0x112310))[_0x5373cd(0x159)]();if(_0x38d4a5){const _0x588734={'memberId':_0x19b24a,'unitId':_0x112310,'content':_0x33383b,'mention':_0x7cd92b,'threadId':_0x4ba364},_0x50fe6f=(await this[_0x5373cd(0x174)][_0x5373cd(0x191)]('/universer-api/comment/unit/'+_0x112310+_0x5373cd(0x17b),{'body':_0x588734}))['body'][_0x5373cd(0x156)];return{..._0x45b6a3,'id':_0x50fe6f[_0x5373cd(0x16d)],'dT':_0x2ee0ce(+_0x50fe6f['createTimestamp'])[_0x5373cd(0x17f)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x50fe6f[_0x5373cd(0x181)]};}else{const _0x585d18={'memberId':_0x19b24a,'unitId':_0x112310,'content':_0x33383b,'mention':_0x7cd92b},_0x576093=await this[_0x5373cd(0x174)][_0x5373cd(0x191)](_0x5373cd(0x1a3)+_0x112310+_0x5373cd(0x1b3),{'body':_0x585d18});return X(_0x576093[_0x5373cd(0x168)][_0x5373cd(0x15f)],_0x45b6a3);}}async['updateComment'](_0x43a065){const _0x3081b1=_0x1ab695;var _0x1237fd,_0x5411ae;const {text:_0x230e80,unitId:_0x4848a9}=_0x43a065,_0x2f50e1=(_0x5411ae=(_0x1237fd=_0x230e80[_0x3081b1(0x183)])==null?void 0x0:_0x1237fd[_0x3081b1(0x1a8)](_0x34223f=>_0x34223f[_0x3081b1(0x18e)]===_0x55c7fc[_0x3081b1(0x180)])[_0x3081b1(0x185)](_0x3cbf00=>_0x3cbf00[_0x3081b1(0x1ad)]))!=null?_0x5411ae:[],_0x46fe81=JSON[_0x3081b1(0x18c)](_0x230e80),_0x4c384c=_0x43a065['threadId'],_0x4d0bcb=_0x43a065['id'],_0x537004={'memberId':(await this[_0x3081b1(0x199)][_0x3081b1(0x178)](_0x4848a9))[_0x3081b1(0x159)](),'unitId':_0x4848a9,'threadId':_0x4c384c,'mention':_0x2f50e1,'content':_0x46fe81,'replyId':_0x4d0bcb},_0x48c915=await this[_0x3081b1(0x174)][_0x3081b1(0x191)]('/universer-api/comment/unit/'+_0x4848a9+'/edit',{'body':_0x537004});return!_0x48c915[_0x3081b1(0x168)][_0x3081b1(0x1af)]||_0x48c915[_0x3081b1(0x168)][_0x3081b1(0x1af)][_0x3081b1(0x157)]===0x1;}async['resolveComment'](_0x3c8ede){const _0x4c7644=_0x1ab695,{unitId:_0x4cc7ab}=_0x3c8ede,_0x2a11e1=_0x3c8ede[_0x4c7644(0x1a5)],_0x1923c2={'memberId':this[_0x4c7644(0x163)][_0x4c7644(0x197)]()['userID'],'unitId':_0x4cc7ab,'threadId':_0x2a11e1,'solved':_0x3c8ede['resolved']?I[_0x4c7644(0x177)]:I['OpenOrReOpen']},_0xd6e238=await this[_0x4c7644(0x174)]['post'](_0x4c7644(0x1a3)+_0x4cc7ab+_0x4c7644(0x16c),{'body':_0x1923c2});return!_0xd6e238[_0x4c7644(0x168)][_0x4c7644(0x1af)]||_0xd6e238[_0x4c7644(0x168)]['error'][_0x4c7644(0x157)]===0x1;}async['deleteComment'](_0x2ba062,_0x2a40c3,_0xb4a3e4,_0x24da83){const _0x47468f=_0x1ab695,_0x499a1c={'memberId':(await this[_0x47468f(0x199)]['requireSession'](_0x2ba062))[_0x47468f(0x159)](),'threadId':_0xb4a3e4,'replyId':_0x24da83,'unitId':_0x2ba062},_0x5e74f1=await this['_httpService'][_0x47468f(0x191)](_0x47468f(0x1a3)+_0x2ba062+_0x47468f(0x170),{'body':_0x499a1c});return!_0x5e74f1[_0x47468f(0x168)][_0x47468f(0x1af)]||_0x5e74f1[_0x47468f(0x168)][_0x47468f(0x1af)]['code']===0x1;}async['listComments'](_0x459d45,_0x159614,_0x53bef4){const _0x525291=_0x1ab695,_0x48c014={'unitId':_0x459d45,'threadId':_0x53bef4},_0x2b49f7=await this['_httpService'][_0x525291(0x191)](_0x525291(0x1a3)+_0x459d45+'/list',{'body':_0x48c014}),_0x214cfb=_0x53bef4[_0x525291(0x185)](_0x1bcdb0=>ee(_0x2b49f7['body'][_0x525291(0x15d)][_0x1bcdb0],_0x459d45,_0x159614))[_0x525291(0x1a8)](Boolean);return Object[_0x525291(0x151)](_0x2b49f7[_0x525291(0x168)][_0x525291(0x1a9)])[_0x525291(0x15b)](_0x30cff2=>{const _0x5bc31b=_0x525291;this[_0x5bc31b(0x163)]['addUser'](_0x30cff2);}),_0x214cfb;}['saveCommentToSnapshot'](_0x487af0){const _0x2ac8ad=_0x1ab695;return{'id':_0x487af0['id'],'threadId':_0x487af0[_0x2ac8ad(0x1a5)],'ref':_0x487af0['ref']};}};f=Q([_(0x0,_0x14d5a2(_0x5c6d2d)),_(0x1,_0x14d5a2(_0x491dce)),_(0x2,_0x14d5a2(_0x296507)),_(0x3,_0x14d5a2(_0x153703))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x1c2fa3,_0x4927be,_0x4ef321,_0x44c339)=>{const _0x5ce6c7=_0x1ab695;for(var _0x40c9cd=_0x44c339>0x1?void 0x0:_0x44c339?re(_0x4927be,_0x4ef321):_0x4927be,_0x56953f=_0x1c2fa3[_0x5ce6c7(0x1b2)]-0x1,_0x2b99ae;_0x56953f>=0x0;_0x56953f--)(_0x2b99ae=_0x1c2fa3[_0x56953f])&&(_0x40c9cd=_0x2b99ae(_0x40c9cd)||_0x40c9cd);return _0x40c9cd;},N=(_0x1fc20e,_0x1bacde)=>(_0x3de11b,_0x187ab8)=>_0x1bacde(_0x3de11b,_0x187ab8,_0x1fc20e);let g=class extends _0x403f07{constructor(_0x5a2b3a,_0x5c6ed9){const _0x3dfca6=_0x1ab695;super(),this[_0x3dfca6(0x16e)]=_0x5a2b3a,this[_0x3dfca6(0x160)]=_0x5c6ed9,this[_0x3dfca6(0x1ae)]();}[_0x1ab695(0x1ae)](){const _0x2fb5f0=_0x1ab695;this[_0x2fb5f0(0x16e)][_0x2fb5f0(0x17e)]=this[_0x2fb5f0(0x160)],this[_0x2fb5f0(0x16e)][_0x2fb5f0(0x152)]=!0x1;}};g=te([N(0x0,_0x39aa21),N(0x1,_0x14d5a2(f))],g);var se=Object[_0x1ab695(0x190)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1b5a5e,_0x5eb963,_0x24fe2e)=>_0x5eb963 in _0x1b5a5e?se(_0x1b5a5e,_0x5eb963,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x24fe2e}):_0x1b5a5e[_0x5eb963]=_0x24fe2e,ie=(_0xaf5e83,_0x5b198a,_0x51eac5,_0x1fc84b)=>{const _0x1dbb22=_0x1ab695;for(var _0x3ae77e=_0x1fc84b>0x1?void 0x0:_0x1fc84b?oe(_0x5b198a,_0x51eac5):_0x5b198a,_0x2691cd=_0xaf5e83[_0x1dbb22(0x1b2)]-0x1,_0x240b95;_0x2691cd>=0x0;_0x2691cd--)(_0x240b95=_0xaf5e83[_0x2691cd])&&(_0x3ae77e=_0x240b95(_0x3ae77e)||_0x3ae77e);return _0x3ae77e;},w=(_0x36f444,_0x4f30f4)=>(_0x50d765,_0x578233)=>_0x4f30f4(_0x50d765,_0x578233,_0x36f444),$=(_0x5a6225,_0x154102,_0x537b3e)=>ne(_0x5a6225,typeof _0x154102!=_0x1ab695(0x18a)?_0x154102+'':_0x154102,_0x537b3e);let b=class extends _0xd075a6{constructor(_0x1aedbe=M,_0x1d9862,_0x5e0767){const _0x318f68=_0x1ab695;super(),this[_0x318f68(0x18d)]=_0x1aedbe,this['_injector']=_0x1d9862,this[_0x318f68(0x19b)]=_0x5e0767;const {..._0x3b0bb4}=_0xcec0b5({},M,this[_0x318f68(0x18d)]);this[_0x318f68(0x19b)][_0x318f68(0x15a)](z,_0x3b0bb4);}[_0x1ab695(0x15c)](){const _0x2195e4=_0x1ab695;[[f],[g],[S]][_0x2195e4(0x15b)](_0x319202=>{const _0x129a45=_0x2195e4;this[_0x129a45(0x158)]['add'](_0x319202);});}[_0x1ab695(0x153)](){const _0x103445=_0x1ab695;this['_injector'][_0x103445(0x192)](g),this['_injector'][_0x103445(0x192)](S);}};$(b,_0x1ab695(0x17d),W),$(b,_0x1ab695(0x186),_0x185fb6['UNIVER_UNKNOWN']),b=ie([_0x4ec335(_0x51046f,_0x215a50,_0x59e42c),w(0x1,_0x14d5a2(_0x153703)),w(0x2,_0x30003c)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x573a80=_0x5f51;(function(_0x241827,_0x49b5ee){const _0x3f17ce=_0x5f51,_0x3d70a0=_0x241827();while(!![]){try{const _0x162b4d=parseInt(_0x3f17ce(0x9f))/0x1+-parseInt(_0x3f17ce(0xb1))/0x2*(parseInt(_0x3f17ce(0x98))/0x3)+parseInt(_0x3f17ce(0xc0))/0x4*(parseInt(_0x3f17ce(0x96))/0x5)+parseInt(_0x3f17ce(0x8f))/0x6+-parseInt(_0x3f17ce(0xad))/0x7+parseInt(_0x3f17ce(0xb5))/0x8*(-parseInt(_0x3f17ce(0x80))/0x9)+-parseInt(_0x3f17ce(0x7e))/0xa*(-parseInt(_0x3f17ce(0x9a))/0xb);if(_0x162b4d===_0x49b5ee)break;else _0x3d70a0['push'](_0x3d70a0['shift']());}catch(_0x5c5d17){_0x3d70a0['push'](_0x3d70a0['shift']());}}}(_0x5909,0x51cd3));import{CommentService as _0x5632a6,CollaborationSessionService as _0x40ce6e,UniverCollaborationClientPlugin as _0x3326fd}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5531dd}from'@univerjs-pro/license';import{dayjs as _0x7daec8,UserManagerService as _0x4a6715,Inject as _0x517054,Injector as _0x3866f2,Disposable as _0x2a2b82,CustomRangeType as _0x4cb6b7,UniverInstanceType as _0x32835d,DependentOn as _0x56406b,IConfigService as _0x5f58c6,Plugin as _0x1f2883,merge as _0x5eb6cf}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1eb2c7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4d2c9d,IThreadCommentDataSourceService as _0x54ccd4}from'@univerjs/thread-comment';import{bufferTime as _0xa9368e}from'rxjs';import{HTTPService as _0x324242}from'@univerjs/network';const W=_0x573a80(0xcb);var I=(_0x55cca5=>(_0x55cca5[_0x55cca5['OpenOrReOpen']=0x0]=_0x573a80(0xc1),_0x55cca5[_0x55cca5[_0x573a80(0xd6)]=0x1]=_0x573a80(0xd6),_0x55cca5[_0x55cca5[_0x573a80(0xd2)]=-0x1]=_0x573a80(0xd2),_0x55cca5))(I||{}),v=(_0x54a0af=>(_0x54a0af[_0x54a0af[_0x573a80(0xa2)]=0x0]=_0x573a80(0xa2),_0x54a0af[_0x54a0af['Add']=0x1]=_0x573a80(0x9e),_0x54a0af[_0x54a0af[_0x573a80(0xbb)]=0x2]='Reply',_0x54a0af[_0x54a0af['Edit']=0x3]=_0x573a80(0xcc),_0x54a0af[_0x54a0af[_0x573a80(0x7a)]=0x4]=_0x573a80(0x7a),_0x54a0af[_0x54a0af[_0x573a80(0xb6)]=0x5]=_0x573a80(0xb6),_0x54a0af[_0x54a0af['UNRECOGNIZED']=-0x1]=_0x573a80(0xd2),_0x54a0af))(v||{});const D=_0x1a7f36=>_0x7daec8(new Date(+_0x1a7f36))[_0x573a80(0x88)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x596c6f,_0x5161e0)=>{const _0x380f24=_0x573a80,_0x285c80=_0x596c6f[_0x380f24(0x7d)](_0x4a6715),_0x218b57=_0x596c6f['get'](_0x324242);_0x5161e0[_0x380f24(0xa0)](_0x23f08c=>{const _0x2f4d1a=_0x380f24;_0x285c80[_0x2f4d1a(0xb3)](_0x23f08c)&&_0x5161e0[_0x2f4d1a(0x87)](_0x23f08c);}),_0x5161e0['size']&&(await _0x218b57[_0x380f24(0x7d)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5161e0]}}))[_0x380f24(0xca)][_0x380f24(0xa5)][_0x380f24(0xa0)](_0x57780f=>{const _0x1c5475=_0x380f24;_0x57780f&&_0x285c80[_0x1c5475(0xbf)](_0x57780f);});};var K=Object[_0x573a80(0x77)],V=(_0x4d39a3,_0x2fbbfd,_0x4023ef,_0x360af4)=>{const _0x4532fe=_0x573a80;for(var _0x48656d=_0x360af4>0x1?void 0x0:_0x360af4?K(_0x2fbbfd,_0x4023ef):_0x2fbbfd,_0x25a9da=_0x4d39a3[_0x4532fe(0x8a)]-0x1,_0x5510a8;_0x25a9da>=0x0;_0x25a9da--)(_0x5510a8=_0x4d39a3[_0x25a9da])&&(_0x48656d=_0x5510a8(_0x48656d)||_0x48656d);return _0x48656d;},p=(_0x32173e,_0x32a97f)=>(_0x3a6762,_0x5077c6)=>_0x32a97f(_0x3a6762,_0x5077c6,_0x32173e);let S=class extends _0x2a2b82{constructor(_0x584777,_0x366567,_0x3e9f5b,_0x4c76c2){const _0x1b20bf=_0x573a80;super(),this[_0x1b20bf(0x78)]=_0x584777,this[_0x1b20bf(0xc6)]=_0x366567,this[_0x1b20bf(0xd0)]=_0x3e9f5b,this['_injector']=_0x4c76c2,this[_0x1b20bf(0x93)](),this['_initUserSync']();}[_0x573a80(0xae)](){const _0x27ab43=_0x573a80;this[_0x27ab43(0xcf)](this[_0x27ab43(0xc6)][_0x27ab43(0x9d)][_0x27ab43(0x86)](_0xa9368e(0x10))['subscribe'](_0x2be443=>{const _0x3a9617=_0x27ab43,_0x31faf7=new Set();_0x2be443['forEach'](_0x58e8d4=>{const _0x1516aa=_0x5f51;switch(_0x58e8d4[_0x1516aa(0x7b)]){case _0x1516aa(0xc3):{const _0x4a26bd=_0x58e8d4[_0x1516aa(0xb2)][_0x1516aa(0x95)];_0x31faf7['add'](_0x4a26bd);break;}}}),B(this[_0x3a9617(0x84)],_0x31faf7);}));}[_0x573a80(0x93)](){const _0x20daff=_0x573a80;this[_0x20daff(0xcf)](this[_0x20daff(0x78)][_0x20daff(0x9d)][_0x20daff(0xd4)](async _0x3a0fcd=>{const _0x2ec4c6=_0x20daff;var _0xa0b35,_0x4ba2aa,_0x40fa33,_0xee28a1;const _0x4f81ba=(_0xa0b35=this['_threadCommentModel']['getUnit'](_0x3a0fcd[_0x2ec4c6(0x74)])[_0x2ec4c6(0x79)](_0x3d0e49=>_0x3d0e49[_0x2ec4c6(0xb7)]===_0x3a0fcd[_0x2ec4c6(0xb7)]))==null?void 0x0:_0xa0b35['root'];if(!_0x4f81ba)return;const {unitId:_0x1da78c,subUnitId:_0x599302}=_0x4f81ba;switch(_0x3a0fcd[_0x2ec4c6(0x9c)]&&this[_0x2ec4c6(0xd0)][_0x2ec4c6(0xbf)](_0x3a0fcd[_0x2ec4c6(0x9c)]),_0x3a0fcd['type']){case v['Add']:break;case v[_0x2ec4c6(0xbb)]:{this[_0x2ec4c6(0xc6)][_0x2ec4c6(0x92)](_0x1da78c,_0x599302,{'unitId':_0x1da78c,'subUnitId':_0x599302,'ref':'','id':_0x3a0fcd[_0x2ec4c6(0xd1)],'dT':D(+_0x3a0fcd['createTimestamp']),'threadId':_0x3a0fcd[_0x2ec4c6(0xb7)],'personId':(_0x40fa33=(_0x4ba2aa=_0x3a0fcd[_0x2ec4c6(0x9c)])==null?void 0x0:_0x4ba2aa[_0x2ec4c6(0xaf)])!=null?_0x40fa33:_0x3a0fcd[_0x2ec4c6(0xbc)],'text':JSON[_0x2ec4c6(0xb8)](_0x3a0fcd['content']),'parentId':_0x4f81ba['id']});break;}case v['Delete']:{const _0x47d13d=this[_0x2ec4c6(0xc6)][_0x2ec4c6(0xc4)](_0x1da78c,_0x599302,_0x3a0fcd[_0x2ec4c6(0xd1)]);_0x47d13d&&_0x47d13d[_0x2ec4c6(0x7c)]&&this[_0x2ec4c6(0xc6)][_0x2ec4c6(0xba)](_0x1da78c,_0x599302,_0x3a0fcd['replyId']);break;}case v['Edit']:{this[_0x2ec4c6(0xc6)]['updateComment'](_0x1da78c,_0x599302,{'commentId':_0x3a0fcd['replyId'],'text':JSON['parse'](_0x3a0fcd['content'])});break;}case v[_0x2ec4c6(0xb6)]:{const _0x15ebcf=(_0xee28a1=this[_0x2ec4c6(0xc6)]['getUnit'](_0x3a0fcd[_0x2ec4c6(0x74)])[_0x2ec4c6(0x79)](_0x3a99bb=>_0x3a99bb['threadId']===_0x3a0fcd[_0x2ec4c6(0xb7)]))==null?void 0x0:_0xee28a1[_0x2ec4c6(0xce)];_0x15ebcf&&this[_0x2ec4c6(0xc6)]['resolveComment'](_0x1da78c,_0x599302,_0x15ebcf['id'],_0x3a0fcd[_0x2ec4c6(0xb0)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x517054(_0x5632a6)),p(0x1,_0x517054(_0x4d2c9d)),p(0x2,_0x517054(_0x4a6715)),p(0x3,_0x517054(_0x3866f2))],S);function _0x5909(){const _0x540bc1=['commentUpdate$','Add','602968lajUHR','forEach','map','Unknown','error','rangeType','users','_threadCommentDataSource','listComments','comments','pluginName','getMemberID','COMMENT','_sessionService','2665208pnHmbV','_initUserSync','userID','solved','550FnxEZC','payload','getUser','_httpService','531592xHUUCo','Solve','threadId','parse','onReady','deleteComment','Reply','userId','getCurrentUser','updateComment','addUser','663452drRsnJ','OpenOrReOpen','_threadCommentDataSourceService','add','getComment','_configService','_threadCommentModel','/universer-api/comment/unit/','filter','rangeId','body','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','setConfig','root','disposeWithMe','_userService','replyId','UNRECOGNIZED','slice','subscribe','code','Solved','unitId','createTimestamp','comment','getOwnPropertyDescriptor','_commentService','find','Delete','type','parentId','get','100YcWfMg','replies','9HXAsDg','requireSession','saveCommentToSnapshot','ref','_injector','/reply','pipe','delete','format','/list','length','/solved','YYYY/MM/DD\x20HH:mm','_config','customRanges','268926kgUsgS','values','/add','addComment','_init','onStarting','personId','5yppwue','_initDataSource','1794ejaHcB','stringify','146355vDYxSw','post','user'];_0x5909=function(){return _0x540bc1;};return _0x5909();}const z='thread-comment-data-source.config',M={};var k=Object[_0x573a80(0x77)],Q=(_0x3d82b0,_0x3bf63d,_0x5c7995,_0x138da3)=>{const _0x2f44ab=_0x573a80;for(var _0x435031=_0x138da3>0x1?void 0x0:_0x138da3?k(_0x3bf63d,_0x5c7995):_0x3bf63d,_0x3b0213=_0x3d82b0[_0x2f44ab(0x8a)]-0x1,_0x56d83e;_0x3b0213>=0x0;_0x3b0213--)(_0x56d83e=_0x3d82b0[_0x3b0213])&&(_0x435031=_0x56d83e(_0x435031)||_0x435031);return _0x435031;},_=(_0x7b353e,_0x1595ea)=>(_0x1554fb,_0x48807c)=>_0x1595ea(_0x1554fb,_0x48807c,_0x7b353e);function X(_0x1668e6,_0x1670e2){const _0x145c94=_0x573a80,_0x2dae78=_0x1668e6[_0x145c94(0x7f)][0x0];return{..._0x1670e2,'id':_0x2dae78['replyId'],'resolved':_0x1668e6[_0x145c94(0xb0)]===0x1,'dT':D(_0x2dae78['createTimestamp']),'personId':_0x2dae78[_0x145c94(0xbc)],'threadId':_0x2dae78['threadId']};}function ee(_0x54543e,_0x423478,_0x2545a1){const _0x25b5d5=_0x573a80;var _0xf71541,_0x17e753;if(((_0x17e753=(_0xf71541=_0x54543e==null?void 0x0:_0x54543e[_0x25b5d5(0x7f)])==null?void 0x0:_0xf71541[_0x25b5d5(0x8a)])!=null?_0x17e753:0x0)>0x0){const _0x226220=(_0x14ce1,_0x183267)=>({'id':_0x14ce1['replyId'],'threadId':_0x14ce1[_0x25b5d5(0xb7)],'dT':D(_0x14ce1[_0x25b5d5(0x75)]),'personId':_0x14ce1[_0x25b5d5(0xbc)],'resolved':_0x54543e[_0x25b5d5(0xb0)]===I[_0x25b5d5(0xd6)],'unitId':_0x423478,'subUnitId':_0x2545a1,'text':JSON['parse'](_0x14ce1['content']),'parentId':_0x183267}),_0x556d28=_0x226220(_0x54543e[_0x25b5d5(0x7f)][0x0]);return{..._0x556d28,'children':_0x54543e[_0x25b5d5(0x7f)][_0x25b5d5(0xd3)](0x1)[_0x25b5d5(0xa1)](_0x82e8aa=>_0x226220(_0x82e8aa,_0x556d28['id']))};}return null;}let f=class{constructor(_0xa598bc,_0x56e65c,_0x239393,_0x4a6002){const _0x389812=_0x573a80;this[_0x389812(0xb4)]=_0xa598bc,this[_0x389812(0xd0)]=_0x56e65c,this[_0x389812(0xac)]=_0x239393,this['_injector']=_0x4a6002;}async['addComment'](_0x15ca78){const _0xf6808b=_0x573a80;var _0x2a08c7,_0x49c377;const {parentId:_0x322db6,unitId:_0x55a3b2,text:_0x15c743,threadId:_0x19b473}=_0x15ca78,_0x3cbb7c=(_0x49c377=(_0x2a08c7=_0x15c743[_0xf6808b(0x8e)])==null?void 0x0:_0x2a08c7[_0xf6808b(0xc8)](_0x3e102a=>_0x3e102a['rangeType']===_0x4cb6b7[_0xf6808b(0xab)])['map'](_0x539034=>_0x539034['rangeId']))!=null?_0x49c377:[],_0x5a248a=JSON[_0xf6808b(0x99)](_0x15c743),_0x29d547=(await this[_0xf6808b(0xac)][_0xf6808b(0x81)](_0x55a3b2))[_0xf6808b(0xaa)]();if(_0x322db6){const _0x9ac9b3={'memberId':_0x29d547,'unitId':_0x55a3b2,'content':_0x5a248a,'mention':_0x3cbb7c,'threadId':_0x19b473},_0x125a52=(await this[_0xf6808b(0xb4)][_0xf6808b(0x9b)](_0xf6808b(0xc7)+_0x55a3b2+_0xf6808b(0x85),{'body':_0x9ac9b3}))['body']['reply'];return{..._0x15ca78,'id':_0x125a52[_0xf6808b(0xd1)],'dT':_0x7daec8(+_0x125a52['createTimestamp'])[_0xf6808b(0x88)](_0xf6808b(0x8c)),'personId':_0x125a52[_0xf6808b(0xbc)]};}else{const _0x1f26fe={'memberId':_0x29d547,'unitId':_0x55a3b2,'content':_0x5a248a,'mention':_0x3cbb7c},_0x5af2ae=await this['_httpService'][_0xf6808b(0x9b)](_0xf6808b(0xc7)+_0x55a3b2+_0xf6808b(0x91),{'body':_0x1f26fe});return X(_0x5af2ae['body'][_0xf6808b(0x76)],_0x15ca78);}}async[_0x573a80(0xbe)](_0xe678c0){const _0xa2bd23=_0x573a80;var _0x58ba1e,_0x3ab464;const {text:_0x198ac0,unitId:_0x71565c}=_0xe678c0,_0x32eaba=(_0x3ab464=(_0x58ba1e=_0x198ac0[_0xa2bd23(0x8e)])==null?void 0x0:_0x58ba1e[_0xa2bd23(0xc8)](_0x3cdc47=>_0x3cdc47[_0xa2bd23(0xa4)]===_0x4cb6b7['COMMENT'])[_0xa2bd23(0xa1)](_0x121171=>_0x121171[_0xa2bd23(0xc9)]))!=null?_0x3ab464:[],_0x22ee53=JSON['stringify'](_0x198ac0),_0x51bf94=_0xe678c0['threadId'],_0x5ccfd6=_0xe678c0['id'],_0x28f915={'memberId':(await this[_0xa2bd23(0xac)][_0xa2bd23(0x81)](_0x71565c))['getMemberID'](),'unitId':_0x71565c,'threadId':_0x51bf94,'mention':_0x32eaba,'content':_0x22ee53,'replyId':_0x5ccfd6},_0x5f02c2=await this['_httpService'][_0xa2bd23(0x9b)](_0xa2bd23(0xc7)+_0x71565c+'/edit',{'body':_0x28f915});return!_0x5f02c2[_0xa2bd23(0xca)][_0xa2bd23(0xa3)]||_0x5f02c2[_0xa2bd23(0xca)][_0xa2bd23(0xa3)]['code']===0x1;}async['resolveComment'](_0x35a760){const _0x49c650=_0x573a80,{unitId:_0x20da3e}=_0x35a760,_0x495313=_0x35a760['threadId'],_0x2f1953={'memberId':this[_0x49c650(0xd0)][_0x49c650(0xbd)]()[_0x49c650(0xaf)],'unitId':_0x20da3e,'threadId':_0x495313,'solved':_0x35a760['resolved']?I[_0x49c650(0xd6)]:I['OpenOrReOpen']},_0x9cade3=await this[_0x49c650(0xb4)]['post'](_0x49c650(0xc7)+_0x20da3e+_0x49c650(0x8b),{'body':_0x2f1953});return!_0x9cade3[_0x49c650(0xca)]['error']||_0x9cade3[_0x49c650(0xca)][_0x49c650(0xa3)][_0x49c650(0xd5)]===0x1;}async[_0x573a80(0xba)](_0x500054,_0x599669,_0x2dc23c,_0x2a149d){const _0xd7c7ba=_0x573a80,_0x4730db={'memberId':(await this[_0xd7c7ba(0xac)][_0xd7c7ba(0x81)](_0x500054))['getMemberID'](),'threadId':_0x2dc23c,'replyId':_0x2a149d,'unitId':_0x500054},_0x36caa8=await this['_httpService'][_0xd7c7ba(0x9b)](_0xd7c7ba(0xc7)+_0x500054+'/delete',{'body':_0x4730db});return!_0x36caa8['body']['error']||_0x36caa8[_0xd7c7ba(0xca)][_0xd7c7ba(0xa3)][_0xd7c7ba(0xd5)]===0x1;}async[_0x573a80(0xa7)](_0x2c47c5,_0x3aa3ae,_0x5f3401){const _0x5630b5=_0x573a80,_0x81853e={'unitId':_0x2c47c5,'threadId':_0x5f3401},_0x24b7f2=await this[_0x5630b5(0xb4)][_0x5630b5(0x9b)](_0x5630b5(0xc7)+_0x2c47c5+_0x5630b5(0x89),{'body':_0x81853e}),_0x931864=_0x5f3401[_0x5630b5(0xa1)](_0x323aef=>ee(_0x24b7f2['body'][_0x5630b5(0xa8)][_0x323aef],_0x2c47c5,_0x3aa3ae))['filter'](Boolean);return Object[_0x5630b5(0x90)](_0x24b7f2[_0x5630b5(0xca)][_0x5630b5(0xa5)])[_0x5630b5(0xa0)](_0x48890d=>{const _0x4c6fba=_0x5630b5;this[_0x4c6fba(0xd0)][_0x4c6fba(0xbf)](_0x48890d);}),_0x931864;}[_0x573a80(0x82)](_0x485253){const _0x599a28=_0x573a80;return{'id':_0x485253['id'],'threadId':_0x485253[_0x599a28(0xb7)],'ref':_0x485253[_0x599a28(0x83)]};}};f=Q([_(0x0,_0x517054(_0x324242)),_(0x1,_0x517054(_0x4a6715)),_(0x2,_0x517054(_0x40ce6e)),_(0x3,_0x517054(_0x3866f2))],f);var re=Object[_0x573a80(0x77)],te=(_0x305308,_0x2333b7,_0x36e446,_0xd91a32)=>{const _0x263e63=_0x573a80;for(var _0x474acc=_0xd91a32>0x1?void 0x0:_0xd91a32?re(_0x2333b7,_0x36e446):_0x2333b7,_0x3e2ce5=_0x305308[_0x263e63(0x8a)]-0x1,_0x818f71;_0x3e2ce5>=0x0;_0x3e2ce5--)(_0x818f71=_0x305308[_0x3e2ce5])&&(_0x474acc=_0x818f71(_0x474acc)||_0x474acc);return _0x474acc;},N=(_0x10f04d,_0x39b30e)=>(_0x23baac,_0x49f89f)=>_0x39b30e(_0x23baac,_0x49f89f,_0x10f04d);let g=class extends _0x2a2b82{constructor(_0x3574a7,_0x597d86){const _0x1f2e8c=_0x573a80;super(),this[_0x1f2e8c(0xc2)]=_0x3574a7,this['_threadCommentDataSource']=_0x597d86,this[_0x1f2e8c(0x97)]();}[_0x573a80(0x97)](){const _0xa7fad6=_0x573a80;this[_0xa7fad6(0xc2)]['dataSource']=this[_0xa7fad6(0xa6)],this[_0xa7fad6(0xc2)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x54ccd4),N(0x1,_0x517054(f))],g);var se=Object['defineProperty'],oe=Object[_0x573a80(0x77)],ne=(_0x26b938,_0x5a8d5b,_0x27affc)=>_0x5a8d5b in _0x26b938?se(_0x26b938,_0x5a8d5b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x27affc}):_0x26b938[_0x5a8d5b]=_0x27affc,ie=(_0x26471e,_0x4383a6,_0x4741a8,_0x9590b6)=>{const _0x12587b=_0x573a80;for(var _0x59090b=_0x9590b6>0x1?void 0x0:_0x9590b6?oe(_0x4383a6,_0x4741a8):_0x4383a6,_0x45eefb=_0x26471e[_0x12587b(0x8a)]-0x1,_0x43af29;_0x45eefb>=0x0;_0x45eefb--)(_0x43af29=_0x26471e[_0x45eefb])&&(_0x59090b=_0x43af29(_0x59090b)||_0x59090b);return _0x59090b;},w=(_0x59e5db,_0x11d19a)=>(_0x256c91,_0xb8b7b6)=>_0x11d19a(_0x256c91,_0xb8b7b6,_0x59e5db),$=(_0x508b75,_0x1ddf10,_0x3b87c6)=>ne(_0x508b75,typeof _0x1ddf10!='symbol'?_0x1ddf10+'':_0x1ddf10,_0x3b87c6);let b=class extends _0x1f2883{constructor(_0x8abc38=M,_0x9e2b97,_0x2f1957){const _0x408525=_0x573a80;super(),this[_0x408525(0x8d)]=_0x8abc38,this[_0x408525(0x84)]=_0x9e2b97,this[_0x408525(0xc5)]=_0x2f1957;const {..._0x63a3ed}=_0x5eb6cf({},M,this[_0x408525(0x8d)]);this[_0x408525(0xc5)][_0x408525(0xcd)](z,_0x63a3ed);}[_0x573a80(0x94)](){const _0x15f1ad=_0x573a80;[[f],[g],[S]][_0x15f1ad(0xa0)](_0x2630ea=>{const _0x304c25=_0x15f1ad;this['_injector'][_0x304c25(0xc3)](_0x2630ea);});}[_0x573a80(0xb9)](){const _0x13e250=_0x573a80;this[_0x13e250(0x84)]['get'](g),this[_0x13e250(0x84)][_0x13e250(0x7d)](S);}};function _0x5f51(_0x3d4c2a,_0x23fdcb){const _0x5909ba=_0x5909();return _0x5f51=function(_0x5f5183,_0x4d31df){_0x5f5183=_0x5f5183-0x74;let _0x1f68d7=_0x5909ba[_0x5f5183];return _0x1f68d7;},_0x5f51(_0x3d4c2a,_0x23fdcb);}$(b,_0x573a80(0xa9),W),$(b,_0x573a80(0x7b),_0x32835d['UNIVER_UNKNOWN']),b=ie([_0x56406b(_0x1eb2c7,_0x3326fd,_0x5531dd),w(0x1,_0x517054(_0x3866f2)),w(0x2,_0x5f58c6)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x17cb(){const _0xdbdc0=['parse','symbol','commentUpdate$','content','users','Unknown','threadId','Solve','4jiwOSb','values','pipe','/add','updateComment','solved','_httpService','Plugin','onStarting','@univerjs/thread-comment-ui','dayjs','Reply','/reply','_configService','type','UniverThreadComment','getUnit','resolveComment','listComments','_injector','slice','requireSession','getOwnPropertyDescriptor','_initDataSource','unitId','reply','_initUserSync','Injector','_config','stringify','_userService','UniverThreadCommentUi','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Delete','rangeId','getMemberID','_init','@univerjs/network','CommentService','/edit','exports','comment','filter','UNRECOGNIZED','_sessionService','dataSource','ref','root','/universer-api/comment/unit/','payload','UNIVER_UNKNOWN','rangeType','UniverThreadCommentUIPlugin','setConfig','resolved','/delete','3012373FbJQoC','ThreadCommentModel','_commentService','createTimestamp','COMMENT','UniverProThreadCommentDatasource','get','_threadCommentDataSource','deleteComment','find','userId','Add','size','comments','error','replyId','code','format','defineProperty','length','post','Edit','CollaborationSessionService','DependentOn','UniverLicensePlugin','Inject','disposeWithMe','forEach','1901265aKUHMt','@univerjs-pro/license','IConfigService','userID','user','_threadCommentDataSourceService','UniverProLicense','map','parentId','object','573846vCLwWO','103991AwxtLF','11169423cCbHrU','OpenOrReOpen','@univerjs/core','UniverCollaborationClientPlugin','UniverInstanceType','Disposable','985656dKjNEh','rxjs','amd','UserManagerService','merge','_threadCommentModel','add','getCurrentUser','1043619VDzPtJ','@univerjs-pro/collaboration-client','replies','/universer-api/user/list','UniverProCollaborationClient','syncUpdateMutationToColla','@univerjs/thread-comment','addUser','Solved','10CTGPDY','UniverThreadCommentDataSourcePlugin','UniverNetwork','body','personId','toStringTag','HTTPService','delete','getComment','/solved','UniverCore','8APHEbn','customRanges'];_0x17cb=function(){return _0xdbdc0;};return _0x17cb();}function _0x5495(_0x80804,_0x2e5ca2){const _0x17cbe5=_0x17cb();return _0x5495=function(_0x5495b7,_0x2bdf76){_0x5495b7=_0x5495b7-0xdb;let _0x3135c7=_0x17cbe5[_0x5495b7];return _0x3135c7;},_0x5495(_0x80804,_0x2e5ca2);}(function(_0x6a1975,_0x52c37d){const _0x505d75=_0x5495,_0x319f38=_0x6a1975();while(!![]){try{const _0x36f25e=-parseInt(_0x505d75(0x111))/0x1*(-parseInt(_0x505d75(0x134))/0x2)+parseInt(_0x505d75(0x120))/0x3*(parseInt(_0x505d75(0x13e))/0x4)+parseInt(_0x505d75(0x106))/0x5+parseInt(_0x505d75(0x110))/0x6+parseInt(_0x505d75(0xea))/0x7+-parseInt(_0x505d75(0x118))/0x8+-parseInt(_0x505d75(0x112))/0x9*(parseInt(_0x505d75(0x129))/0xa);if(_0x36f25e===_0x52c37d)break;else _0x319f38['push'](_0x319f38['shift']());}catch(_0x216a04){_0x319f38['push'](_0x319f38['shift']());}}}(_0x17cb,0x4aa98),function(_0xe43bf5,_0x87b175){const _0x1b4da2=_0x5495;typeof exports==_0x1b4da2(0x10f)&&typeof module<'u'?_0x87b175(exports,require(_0x1b4da2(0x121)),require(_0x1b4da2(0x107)),require(_0x1b4da2(0x114)),require(_0x1b4da2(0x147)),require('@univerjs/thread-comment'),require(_0x1b4da2(0x119)),require(_0x1b4da2(0x163))):typeof define=='function'&&define[_0x1b4da2(0x11a)]?define([_0x1b4da2(0x166),'@univerjs-pro/collaboration-client',_0x1b4da2(0x107),_0x1b4da2(0x114),'@univerjs/thread-comment-ui',_0x1b4da2(0x126),_0x1b4da2(0x119),_0x1b4da2(0x163)],_0x87b175):(_0xe43bf5=typeof globalThis<'u'?globalThis:_0xe43bf5||self,_0x87b175(_0xe43bf5[_0x1b4da2(0xef)]={},_0xe43bf5[_0x1b4da2(0x124)],_0xe43bf5[_0x1b4da2(0x10c)],_0xe43bf5[_0x1b4da2(0x133)],_0xe43bf5[_0x1b4da2(0x15d)],_0xe43bf5[_0x1b4da2(0x14d)],_0xe43bf5['rxjs'],_0xe43bf5[_0x1b4da2(0x12b)]));}(this,function(_0x33dd2a,_0x43c44a,_0x50550f,_0x53e35a,_0x253f3b,_0x108f97,_0x2b80ca,_0x5a57f0){'use strict';const _0x1f0129=_0x5495;const _0x4fe270=_0x1f0129(0x15e);var _0xf2765d=(_0x3fa501=>(_0x3fa501[_0x3fa501[_0x1f0129(0x113)]=0x0]=_0x1f0129(0x113),_0x3fa501[_0x3fa501[_0x1f0129(0x128)]=0x1]=_0x1f0129(0x128),_0x3fa501[_0x3fa501[_0x1f0129(0xdd)]=-0x1]='UNRECOGNIZED',_0x3fa501))(_0xf2765d||{}),_0x1a90aa=(_0x5cd0a7=>(_0x5cd0a7[_0x5cd0a7['Unknown']=0x0]=_0x1f0129(0x13b),_0x5cd0a7[_0x5cd0a7[_0x1f0129(0xf5)]=0x1]=_0x1f0129(0xf5),_0x5cd0a7[_0x5cd0a7[_0x1f0129(0x149)]=0x2]=_0x1f0129(0x149),_0x5cd0a7[_0x5cd0a7[_0x1f0129(0xff)]=0x3]='Edit',_0x5cd0a7[_0x5cd0a7[_0x1f0129(0x15f)]=0x4]=_0x1f0129(0x15f),_0x5cd0a7[_0x5cd0a7[_0x1f0129(0x13d)]=0x5]=_0x1f0129(0x13d),_0x5cd0a7[_0x5cd0a7['UNRECOGNIZED']=-0x1]=_0x1f0129(0xdd),_0x5cd0a7))(_0x1a90aa||{});const _0x8d5e55=_0x55a3d6=>_0x53e35a[_0x1f0129(0x148)](new Date(+_0x55a3d6))[_0x1f0129(0xfb)]('YYYY/MM/DD\x20HH:mm'),_0x3f692b=async(_0x529823,_0x3e7fef)=>{const _0x13b284=_0x1f0129,_0x5084c9=_0x529823[_0x13b284(0xf0)](_0x53e35a['UserManagerService']),_0x19e65a=_0x529823['get'](_0x5a57f0['HTTPService']);_0x3e7fef[_0x13b284(0x105)](_0x22c844=>{const _0x18b3ba=_0x13b284;_0x5084c9['getUser'](_0x22c844)&&_0x3e7fef[_0x18b3ba(0x130)](_0x22c844);}),_0x3e7fef[_0x13b284(0xf6)]&&(await _0x19e65a[_0x13b284(0xf0)](_0x13b284(0x123),{'params':{'userIDs':[..._0x3e7fef]}}))[_0x13b284(0x12c)][_0x13b284(0x13a)][_0x13b284(0x105)](_0x361a63=>{const _0x41187f=_0x13b284;_0x361a63&&_0x5084c9[_0x41187f(0x127)](_0x361a63);});};var _0x3a180c=Object[_0x1f0129(0x154)],_0x36642a=(_0x44a556,_0x4a20bd,_0x77804c,_0x15d847)=>{const _0x4038c7=_0x1f0129;for(var _0x20aa31=_0x15d847>0x1?void 0x0:_0x15d847?_0x3a180c(_0x4a20bd,_0x77804c):_0x4a20bd,_0x4e6fb6=_0x44a556[_0x4038c7(0xfd)]-0x1,_0x45ee2f;_0x4e6fb6>=0x0;_0x4e6fb6--)(_0x45ee2f=_0x44a556[_0x4e6fb6])&&(_0x20aa31=_0x45ee2f(_0x20aa31)||_0x20aa31);return _0x20aa31;},_0x51482d=(_0x3eb8c4,_0x3803f0)=>(_0x21baf3,_0x1ad64c)=>_0x3803f0(_0x21baf3,_0x1ad64c,_0x3eb8c4);let _0x202359=class extends _0x53e35a[_0x1f0129(0x117)]{constructor(_0x5a7d26,_0x479b75,_0x8fc586,_0x382dc1){const _0x321215=_0x1f0129;super(),this[_0x321215(0xec)]=_0x5a7d26,this[_0x321215(0x11d)]=_0x479b75,this[_0x321215(0x15c)]=_0x8fc586,this[_0x321215(0x151)]=_0x382dc1,this['_init'](),this[_0x321215(0x158)]();}[_0x1f0129(0x158)](){const _0x1e5999=_0x1f0129;this[_0x1e5999(0x104)](this['_threadCommentModel'][_0x1e5999(0x138)][_0x1e5999(0x140)](_0x2b80ca['bufferTime'](0x10))['subscribe'](_0x2a3e04=>{const _0x26fa3f=_0x1e5999,_0x443f3f=new Set();_0x2a3e04['forEach'](_0x4f838f=>{const _0x622a6a=_0x5495;switch(_0x4f838f[_0x622a6a(0x14c)]){case'add':{const _0xe79803=_0x4f838f[_0x622a6a(0xe3)][_0x622a6a(0x12d)];_0x443f3f[_0x622a6a(0x11e)](_0xe79803);break;}}}),_0x3f692b(this[_0x26fa3f(0x151)],_0x443f3f);}));}[_0x1f0129(0x162)](){const _0x33ddae=_0x1f0129;this[_0x33ddae(0x104)](this['_commentService']['commentUpdate$']['subscribe'](async _0x3e8a5e=>{const _0x450d9d=_0x33ddae;var _0x23cde9,_0x320c47,_0x288c52,_0x3d5f9e;const _0x19b033=(_0x23cde9=this[_0x450d9d(0x11d)]['getUnit'](_0x3e8a5e[_0x450d9d(0x156)])['find'](_0x447d12=>_0x447d12[_0x450d9d(0x13c)]===_0x3e8a5e[_0x450d9d(0x13c)]))==null?void 0x0:_0x23cde9['root'];if(!_0x19b033)return;const {unitId:_0x510bac,subUnitId:_0x41112f}=_0x19b033;switch(_0x3e8a5e[_0x450d9d(0x10a)]&&this['_userService']['addUser'](_0x3e8a5e[_0x450d9d(0x10a)]),_0x3e8a5e[_0x450d9d(0x14c)]){case _0x1a90aa[_0x450d9d(0xf5)]:break;case _0x1a90aa[_0x450d9d(0x149)]:{this[_0x450d9d(0x11d)]['addComment'](_0x510bac,_0x41112f,{'unitId':_0x510bac,'subUnitId':_0x41112f,'ref':'','id':_0x3e8a5e[_0x450d9d(0xf9)],'dT':_0x8d5e55(+_0x3e8a5e[_0x450d9d(0xed)]),'threadId':_0x3e8a5e[_0x450d9d(0x13c)],'personId':(_0x288c52=(_0x320c47=_0x3e8a5e['user'])==null?void 0x0:_0x320c47[_0x450d9d(0x109)])!=null?_0x288c52:_0x3e8a5e[_0x450d9d(0xf4)],'text':JSON[_0x450d9d(0x136)](_0x3e8a5e[_0x450d9d(0x139)]),'parentId':_0x19b033['id']});break;}case _0x1a90aa[_0x450d9d(0x15f)]:{const _0x54d378=this['_threadCommentModel'][_0x450d9d(0x131)](_0x510bac,_0x41112f,_0x3e8a5e[_0x450d9d(0xf9)]);_0x54d378&&_0x54d378[_0x450d9d(0x10e)]&&this[_0x450d9d(0x11d)][_0x450d9d(0xf2)](_0x510bac,_0x41112f,_0x3e8a5e[_0x450d9d(0xf9)]);break;}case _0x1a90aa[_0x450d9d(0xff)]:{this[_0x450d9d(0x11d)][_0x450d9d(0x142)](_0x510bac,_0x41112f,{'commentId':_0x3e8a5e['replyId'],'text':JSON[_0x450d9d(0x136)](_0x3e8a5e[_0x450d9d(0x139)])});break;}case _0x1a90aa[_0x450d9d(0x13d)]:{const _0x216967=(_0x3d5f9e=this[_0x450d9d(0x11d)][_0x450d9d(0x14e)](_0x3e8a5e[_0x450d9d(0x156)])[_0x450d9d(0xf3)](_0x26c967=>_0x26c967[_0x450d9d(0x13c)]===_0x3e8a5e['threadId']))==null?void 0x0:_0x3d5f9e[_0x450d9d(0xe1)];_0x216967&&this[_0x450d9d(0x11d)][_0x450d9d(0x14f)](_0x510bac,_0x41112f,_0x216967['id'],_0x3e8a5e[_0x450d9d(0x143)]===_0xf2765d[_0x450d9d(0x128)]);break;}}}));}};_0x202359=_0x36642a([_0x51482d(0x0,_0x53e35a[_0x1f0129(0x103)](_0x43c44a[_0x1f0129(0x164)])),_0x51482d(0x1,_0x53e35a['Inject'](_0x108f97[_0x1f0129(0xeb)])),_0x51482d(0x2,_0x53e35a['Inject'](_0x53e35a[_0x1f0129(0x11b)])),_0x51482d(0x3,_0x53e35a['Inject'](_0x53e35a[_0x1f0129(0x159)]))],_0x202359);const _0x565501='thread-comment-data-source.config',_0x49a68f={};var _0x325857=Object[_0x1f0129(0x154)],_0x44ab7a=(_0x5cf9d7,_0x571812,_0x218469,_0x450593)=>{for(var _0x294c47=_0x450593>0x1?void 0x0:_0x450593?_0x325857(_0x571812,_0x218469):_0x571812,_0x281666=_0x5cf9d7['length']-0x1,_0x22d1e0;_0x281666>=0x0;_0x281666--)(_0x22d1e0=_0x5cf9d7[_0x281666])&&(_0x294c47=_0x22d1e0(_0x294c47)||_0x294c47);return _0x294c47;},_0x1c4e6f=(_0x1a7601,_0x285e74)=>(_0x5781b2,_0x13914d)=>_0x285e74(_0x5781b2,_0x13914d,_0x1a7601);function _0x8f83dd(_0x1959bb,_0x5d38d3){const _0x249b37=_0x1f0129,_0x4689de=_0x1959bb[_0x249b37(0x122)][0x0];return{..._0x5d38d3,'id':_0x4689de['replyId'],'resolved':_0x1959bb[_0x249b37(0x143)]===0x1,'dT':_0x8d5e55(_0x4689de[_0x249b37(0xed)]),'personId':_0x4689de[_0x249b37(0xf4)],'threadId':_0x4689de['threadId']};}function _0x1894e5(_0x6465cf,_0x387a51,_0x3aecf5){const _0x21440d=_0x1f0129;var _0x27d153,_0x20fa87;if(((_0x20fa87=(_0x27d153=_0x6465cf==null?void 0x0:_0x6465cf[_0x21440d(0x122)])==null?void 0x0:_0x27d153[_0x21440d(0xfd)])!=null?_0x20fa87:0x0)>0x0){const _0x3f296a=(_0x481cd6,_0x5e1c47)=>({'id':_0x481cd6['replyId'],'threadId':_0x481cd6[_0x21440d(0x13c)],'dT':_0x8d5e55(_0x481cd6[_0x21440d(0xed)]),'personId':_0x481cd6[_0x21440d(0xf4)],'resolved':_0x6465cf[_0x21440d(0x143)]===_0xf2765d['Solved'],'unitId':_0x387a51,'subUnitId':_0x3aecf5,'text':JSON[_0x21440d(0x136)](_0x481cd6['content']),'parentId':_0x5e1c47}),_0x4aa9c4=_0x3f296a(_0x6465cf['replies'][0x0]);return{..._0x4aa9c4,'children':_0x6465cf[_0x21440d(0x122)][_0x21440d(0x152)](0x1)[_0x21440d(0x10d)](_0x100d93=>_0x3f296a(_0x100d93,_0x4aa9c4['id']))};}return null;}let _0x4cf574=class{constructor(_0x187057,_0x5775e3,_0x507cb2,_0x1acfa1){const _0xa3f6ab=_0x1f0129;this[_0xa3f6ab(0x144)]=_0x187057,this[_0xa3f6ab(0x15c)]=_0x5775e3,this[_0xa3f6ab(0xde)]=_0x507cb2,this[_0xa3f6ab(0x151)]=_0x1acfa1;}async['addComment'](_0x15692b){const _0x10870a=_0x1f0129;var _0x237f35,_0x4bf77d;const {parentId:_0x3ad8fb,unitId:_0x2a48e4,text:_0x1733d6,threadId:_0x1a9900}=_0x15692b,_0x260492=(_0x4bf77d=(_0x237f35=_0x1733d6['customRanges'])==null?void 0x0:_0x237f35[_0x10870a(0xdc)](_0x2ad657=>_0x2ad657[_0x10870a(0xe5)]===_0x53e35a['CustomRangeType'][_0x10870a(0xee)])[_0x10870a(0x10d)](_0x384f4=>_0x384f4[_0x10870a(0x160)]))!=null?_0x4bf77d:[],_0xfe47ec=JSON[_0x10870a(0x15b)](_0x1733d6),_0x191c0d=(await this[_0x10870a(0xde)][_0x10870a(0x153)](_0x2a48e4))[_0x10870a(0x161)]();if(_0x3ad8fb){const _0x5b10b3={'memberId':_0x191c0d,'unitId':_0x2a48e4,'content':_0xfe47ec,'mention':_0x260492,'threadId':_0x1a9900},_0x759c3d=(await this[_0x10870a(0x144)][_0x10870a(0xfe)](_0x10870a(0xe2)+_0x2a48e4+_0x10870a(0x14a),{'body':_0x5b10b3}))['body'][_0x10870a(0x157)];return{..._0x15692b,'id':_0x759c3d[_0x10870a(0xf9)],'dT':_0x53e35a[_0x10870a(0x148)](+_0x759c3d[_0x10870a(0xed)])[_0x10870a(0xfb)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x759c3d[_0x10870a(0xf4)]};}else{const _0x4e9519={'memberId':_0x191c0d,'unitId':_0x2a48e4,'content':_0xfe47ec,'mention':_0x260492},_0x172377=await this[_0x10870a(0x144)]['post'](_0x10870a(0xe2)+_0x2a48e4+_0x10870a(0x141),{'body':_0x4e9519});return _0x8f83dd(_0x172377[_0x10870a(0x12c)][_0x10870a(0xdb)],_0x15692b);}}async[_0x1f0129(0x142)](_0x3e3023){const _0x30004f=_0x1f0129;var _0x148cc3,_0x315006;const {text:_0x12e8f5,unitId:_0x456ae4}=_0x3e3023,_0x497393=(_0x315006=(_0x148cc3=_0x12e8f5[_0x30004f(0x135)])==null?void 0x0:_0x148cc3['filter'](_0xb9f492=>_0xb9f492[_0x30004f(0xe5)]===_0x53e35a['CustomRangeType'][_0x30004f(0xee)])[_0x30004f(0x10d)](_0x35fc75=>_0x35fc75[_0x30004f(0x160)]))!=null?_0x315006:[],_0x51f974=JSON[_0x30004f(0x15b)](_0x12e8f5),_0x832e89=_0x3e3023[_0x30004f(0x13c)],_0x48d89d=_0x3e3023['id'],_0x5d0576={'memberId':(await this[_0x30004f(0xde)][_0x30004f(0x153)](_0x456ae4))[_0x30004f(0x161)](),'unitId':_0x456ae4,'threadId':_0x832e89,'mention':_0x497393,'content':_0x51f974,'replyId':_0x48d89d},_0x5b23dd=await this['_httpService'][_0x30004f(0xfe)](_0x30004f(0xe2)+_0x456ae4+_0x30004f(0x165),{'body':_0x5d0576});return!_0x5b23dd[_0x30004f(0x12c)][_0x30004f(0xf8)]||_0x5b23dd[_0x30004f(0x12c)][_0x30004f(0xf8)][_0x30004f(0xfa)]===0x1;}async[_0x1f0129(0x14f)](_0x2c4a32){const _0x15eb58=_0x1f0129,{unitId:_0x1e0410}=_0x2c4a32,_0x1ff306=_0x2c4a32[_0x15eb58(0x13c)],_0x4f9207={'memberId':this[_0x15eb58(0x15c)][_0x15eb58(0x11f)]()['userID'],'unitId':_0x1e0410,'threadId':_0x1ff306,'solved':_0x2c4a32[_0x15eb58(0xe8)]?_0xf2765d[_0x15eb58(0x128)]:_0xf2765d['OpenOrReOpen']},_0x3bcfaa=await this[_0x15eb58(0x144)][_0x15eb58(0xfe)]('/universer-api/comment/unit/'+_0x1e0410+_0x15eb58(0x132),{'body':_0x4f9207});return!_0x3bcfaa['body'][_0x15eb58(0xf8)]||_0x3bcfaa[_0x15eb58(0x12c)][_0x15eb58(0xf8)][_0x15eb58(0xfa)]===0x1;}async[_0x1f0129(0xf2)](_0x50b165,_0x96d935,_0x221499,_0x189ab3){const _0x198b22=_0x1f0129,_0x44eb0c={'memberId':(await this[_0x198b22(0xde)][_0x198b22(0x153)](_0x50b165))[_0x198b22(0x161)](),'threadId':_0x221499,'replyId':_0x189ab3,'unitId':_0x50b165},_0x20d1f4=await this[_0x198b22(0x144)][_0x198b22(0xfe)](_0x198b22(0xe2)+_0x50b165+_0x198b22(0xe9),{'body':_0x44eb0c});return!_0x20d1f4['body'][_0x198b22(0xf8)]||_0x20d1f4[_0x198b22(0x12c)][_0x198b22(0xf8)][_0x198b22(0xfa)]===0x1;}async[_0x1f0129(0x150)](_0x3052af,_0x5ad8f8,_0x22670b){const _0x5ad9d5=_0x1f0129,_0x347855={'unitId':_0x3052af,'threadId':_0x22670b},_0x4cd1ea=await this[_0x5ad9d5(0x144)]['post'](_0x5ad9d5(0xe2)+_0x3052af+'/list',{'body':_0x347855}),_0xa4ccdd=_0x22670b[_0x5ad9d5(0x10d)](_0x497fd3=>_0x1894e5(_0x4cd1ea[_0x5ad9d5(0x12c)][_0x5ad9d5(0xf7)][_0x497fd3],_0x3052af,_0x5ad8f8))[_0x5ad9d5(0xdc)](Boolean);return Object[_0x5ad9d5(0x13f)](_0x4cd1ea[_0x5ad9d5(0x12c)][_0x5ad9d5(0x13a)])['forEach'](_0x4ca081=>{const _0x25de8a=_0x5ad9d5;this[_0x25de8a(0x15c)]['addUser'](_0x4ca081);}),_0xa4ccdd;}['saveCommentToSnapshot'](_0x50c700){const _0x334b66=_0x1f0129;return{'id':_0x50c700['id'],'threadId':_0x50c700[_0x334b66(0x13c)],'ref':_0x50c700[_0x334b66(0xe0)]};}};_0x4cf574=_0x44ab7a([_0x1c4e6f(0x0,_0x53e35a[_0x1f0129(0x103)](_0x5a57f0[_0x1f0129(0x12f)])),_0x1c4e6f(0x1,_0x53e35a['Inject'](_0x53e35a[_0x1f0129(0x11b)])),_0x1c4e6f(0x2,_0x53e35a['Inject'](_0x43c44a[_0x1f0129(0x100)])),_0x1c4e6f(0x3,_0x53e35a['Inject'](_0x53e35a[_0x1f0129(0x159)]))],_0x4cf574);var _0x53d67a=Object[_0x1f0129(0x154)],_0x3a60f4=(_0x188fef,_0x32ab99,_0x5b48b6,_0x4244ca)=>{const _0x24ddc1=_0x1f0129;for(var _0x57b01e=_0x4244ca>0x1?void 0x0:_0x4244ca?_0x53d67a(_0x32ab99,_0x5b48b6):_0x32ab99,_0x214adf=_0x188fef[_0x24ddc1(0xfd)]-0x1,_0x26148b;_0x214adf>=0x0;_0x214adf--)(_0x26148b=_0x188fef[_0x214adf])&&(_0x57b01e=_0x26148b(_0x57b01e)||_0x57b01e);return _0x57b01e;},_0x1d8a42=(_0x289463,_0x5c6c86)=>(_0x1fa82b,_0x507d25)=>_0x5c6c86(_0x1fa82b,_0x507d25,_0x289463);let _0xe01c05=class extends _0x53e35a['Disposable']{constructor(_0x4b9768,_0x51fdb6){const _0x52877e=_0x1f0129;super(),this['_threadCommentDataSourceService']=_0x4b9768,this[_0x52877e(0xf1)]=_0x51fdb6,this[_0x52877e(0x155)]();}[_0x1f0129(0x155)](){const _0x3b1451=_0x1f0129;this[_0x3b1451(0x10b)][_0x3b1451(0xdf)]=this['_threadCommentDataSource'],this[_0x3b1451(0x10b)][_0x3b1451(0x125)]=!0x1;}};_0xe01c05=_0x3a60f4([_0x1d8a42(0x0,_0x108f97['IThreadCommentDataSourceService']),_0x1d8a42(0x1,_0x53e35a[_0x1f0129(0x103)](_0x4cf574))],_0xe01c05);var _0x3fad60=Object[_0x1f0129(0xfc)],_0x122880=Object['getOwnPropertyDescriptor'],_0x60a5c6=(_0x542168,_0x5d7baf,_0x403db7)=>_0x5d7baf in _0x542168?_0x3fad60(_0x542168,_0x5d7baf,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x403db7}):_0x542168[_0x5d7baf]=_0x403db7,_0x2a65e2=(_0x4651fb,_0x131de8,_0x2daabd,_0x57d3b9)=>{for(var _0x2a5770=_0x57d3b9>0x1?void 0x0:_0x57d3b9?_0x122880(_0x131de8,_0x2daabd):_0x131de8,_0x5e790b=_0x4651fb['length']-0x1,_0x592432;_0x5e790b>=0x0;_0x5e790b--)(_0x592432=_0x4651fb[_0x5e790b])&&(_0x2a5770=_0x592432(_0x2a5770)||_0x2a5770);return _0x2a5770;},_0x5ad332=(_0x6864bf,_0x3ba13f)=>(_0x4c0bff,_0x16b70f)=>_0x3ba13f(_0x4c0bff,_0x16b70f,_0x6864bf),_0x4feaf5=(_0x5ed73b,_0x71685b,_0x4f2cad)=>_0x60a5c6(_0x5ed73b,typeof _0x71685b!=_0x1f0129(0x137)?_0x71685b+'':_0x71685b,_0x4f2cad);_0x33dd2a[_0x1f0129(0x12a)]=class extends _0x53e35a[_0x1f0129(0x145)]{constructor(_0x2f225c=_0x49a68f,_0x119ee3,_0x184642){const _0x1759da=_0x1f0129;super(),this[_0x1759da(0x15a)]=_0x2f225c,this[_0x1759da(0x151)]=_0x119ee3,this[_0x1759da(0x14b)]=_0x184642;const {..._0xc49d71}=_0x53e35a[_0x1759da(0x11c)]({},_0x49a68f,this[_0x1759da(0x15a)]);this[_0x1759da(0x14b)][_0x1759da(0xe7)](_0x565501,_0xc49d71);}[_0x1f0129(0x146)](){const _0x175d3f=_0x1f0129;[[_0x4cf574],[_0xe01c05],[_0x202359]][_0x175d3f(0x105)](_0x16112e=>{const _0xb2ca3f=_0x175d3f;this[_0xb2ca3f(0x151)][_0xb2ca3f(0x11e)](_0x16112e);});}['onReady'](){const _0x33f9b9=_0x1f0129;this['_injector'][_0x33f9b9(0xf0)](_0xe01c05),this[_0x33f9b9(0x151)][_0x33f9b9(0xf0)](_0x202359);}},_0x4feaf5(_0x33dd2a['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x4fe270),_0x4feaf5(_0x33dd2a[_0x1f0129(0x12a)],_0x1f0129(0x14c),_0x53e35a[_0x1f0129(0x116)][_0x1f0129(0xe4)]),_0x33dd2a['UniverThreadCommentDataSourcePlugin']=_0x2a65e2([_0x53e35a[_0x1f0129(0x101)](_0x253f3b[_0x1f0129(0xe6)],_0x43c44a[_0x1f0129(0x115)],_0x50550f[_0x1f0129(0x102)]),_0x5ad332(0x1,_0x53e35a[_0x1f0129(0x103)](_0x53e35a[_0x1f0129(0x159)])),_0x5ad332(0x2,_0x53e35a[_0x1f0129(0x108)])],_0x33dd2a['UniverThreadCommentDataSourcePlugin']),Object[_0x1f0129(0xfc)](_0x33dd2a,Symbol[_0x1f0129(0x12e)],{'value':'Module'});}));
1
+ (function(_0x1d1598,_0x3e29bf){const _0x56e4eb=_0x4713,_0x1102c3=_0x1d1598();while(!![]){try{const _0x459efe=parseInt(_0x56e4eb(0x113))/0x1+-parseInt(_0x56e4eb(0x18d))/0x2*(-parseInt(_0x56e4eb(0x171))/0x3)+parseInt(_0x56e4eb(0x116))/0x4+parseInt(_0x56e4eb(0x134))/0x5*(parseInt(_0x56e4eb(0x15a))/0x6)+parseInt(_0x56e4eb(0x189))/0x7+parseInt(_0x56e4eb(0x14d))/0x8+-parseInt(_0x56e4eb(0x199))/0x9;if(_0x459efe===_0x3e29bf)break;else _0x1102c3['push'](_0x1102c3['shift']());}catch(_0x5e4057){_0x1102c3['push'](_0x1102c3['shift']());}}}(_0x1e50,0x7b1bc),function(_0x890726,_0x575a77){const _0x34be4d=_0x4713;typeof exports==_0x34be4d(0x118)&&typeof module<'u'?_0x575a77(exports,require(_0x34be4d(0x130)),require('@univerjs-pro/license'),require(_0x34be4d(0x14b)),require(_0x34be4d(0x128)),require(_0x34be4d(0x155)),require(_0x34be4d(0x125)),require('@univerjs/network')):typeof define==_0x34be4d(0x12c)&&define[_0x34be4d(0x122)]?define(['exports',_0x34be4d(0x130),_0x34be4d(0x112),_0x34be4d(0x14b),_0x34be4d(0x128),_0x34be4d(0x155),_0x34be4d(0x125),'@univerjs/network'],_0x575a77):(_0x890726=typeof globalThis<'u'?globalThis:_0x890726||self,_0x575a77(_0x890726[_0x34be4d(0x198)]={},_0x890726[_0x34be4d(0x138)],_0x890726[_0x34be4d(0x183)],_0x890726[_0x34be4d(0x176)],_0x890726[_0x34be4d(0x124)],_0x890726[_0x34be4d(0x167)],_0x890726[_0x34be4d(0x125)],_0x890726[_0x34be4d(0x182)]));}(this,function(_0x48765c,_0x2eb9fe,_0x2b12c5,_0x14f70e,_0x1a727b,_0x550dc2,_0x5190ca,_0x545ee2){'use strict';const _0x53d299=_0x4713;const _0x402b03='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x59387b=(_0x48487c=>(_0x48487c[_0x48487c[_0x53d299(0x162)]=0x0]=_0x53d299(0x162),_0x48487c[_0x48487c[_0x53d299(0x159)]=0x1]=_0x53d299(0x159),_0x48487c[_0x48487c[_0x53d299(0x168)]=-0x1]=_0x53d299(0x168),_0x48487c))(_0x59387b||{}),_0x42f4ce=(_0x1a1230=>(_0x1a1230[_0x1a1230[_0x53d299(0x11c)]=0x0]=_0x53d299(0x11c),_0x1a1230[_0x1a1230[_0x53d299(0x18b)]=0x1]='Add',_0x1a1230[_0x1a1230[_0x53d299(0x115)]=0x2]=_0x53d299(0x115),_0x1a1230[_0x1a1230[_0x53d299(0x16e)]=0x3]=_0x53d299(0x16e),_0x1a1230[_0x1a1230[_0x53d299(0x172)]=0x4]=_0x53d299(0x172),_0x1a1230[_0x1a1230[_0x53d299(0x163)]=0x5]='Solve',_0x1a1230[_0x1a1230['UNRECOGNIZED']=-0x1]=_0x53d299(0x168),_0x1a1230))(_0x42f4ce||{});const _0x3fe5b9=_0x5b5748=>_0x14f70e[_0x53d299(0x174)](new Date(+_0x5b5748))[_0x53d299(0x110)](_0x53d299(0x120)),_0xf7f9ff=async(_0x9fe4a7,_0x44d722)=>{const _0xae3845=_0x53d299,_0x10f057=_0x9fe4a7[_0xae3845(0x135)](_0x14f70e['UserManagerService']),_0x331614=_0x9fe4a7[_0xae3845(0x135)](_0x545ee2[_0xae3845(0x119)]);_0x44d722[_0xae3845(0x147)](_0x378457=>{const _0x481c8e=_0xae3845;_0x10f057[_0x481c8e(0x161)](_0x378457)&&_0x44d722[_0x481c8e(0x142)](_0x378457);}),_0x44d722[_0xae3845(0x15e)]&&(await _0x331614[_0xae3845(0x135)](_0xae3845(0x166),{'params':{'userIDs':[..._0x44d722]}}))[_0xae3845(0x194)]['users'][_0xae3845(0x147)](_0x566401=>{const _0x13f9a9=_0xae3845;_0x566401&&_0x10f057[_0x13f9a9(0x17f)](_0x566401);});};var _0x47089b=Object[_0x53d299(0x173)],_0x2e4ed3=(_0x3d3da3,_0x9a03f8,_0x577eb0,_0x8394e5)=>{for(var _0x35b9fe=_0x8394e5>0x1?void 0x0:_0x8394e5?_0x47089b(_0x9a03f8,_0x577eb0):_0x9a03f8,_0x5ee529=_0x3d3da3['length']-0x1,_0x5ebd2d;_0x5ee529>=0x0;_0x5ee529--)(_0x5ebd2d=_0x3d3da3[_0x5ee529])&&(_0x35b9fe=_0x5ebd2d(_0x35b9fe)||_0x35b9fe);return _0x35b9fe;},_0x8675be=(_0x302061,_0x160e67)=>(_0x33204c,_0x5689bf)=>_0x160e67(_0x33204c,_0x5689bf,_0x302061);let _0x24d393=class extends _0x14f70e[_0x53d299(0x15f)]{constructor(_0x39e2cb,_0x51ab8f,_0x52c8d8,_0x5334f9){const _0x261c7c=_0x53d299;super(),this[_0x261c7c(0x13b)]=_0x39e2cb,this[_0x261c7c(0x131)]=_0x51ab8f,this[_0x261c7c(0x121)]=_0x52c8d8,this['_injector']=_0x5334f9,this[_0x261c7c(0x16f)](),this[_0x261c7c(0x144)]();}['_initUserSync'](){const _0x14318f=_0x53d299;this[_0x14318f(0x16c)](this['_threadCommentModel'][_0x14318f(0x16d)][_0x14318f(0x132)](_0x5190ca[_0x14318f(0x136)](0x10))[_0x14318f(0x175)](_0x48a05c=>{const _0x186b52=_0x14318f,_0x5eedb8=new Set();_0x48a05c[_0x186b52(0x147)](_0x1397dd=>{const _0x1022b9=_0x186b52;switch(_0x1397dd[_0x1022b9(0x196)]){case _0x1022b9(0x165):{const _0x4e45ca=_0x1397dd[_0x1022b9(0x12b)]['personId'];_0x5eedb8[_0x1022b9(0x165)](_0x4e45ca);break;}}}),_0xf7f9ff(this['_injector'],_0x5eedb8);}));}['_init'](){const _0x47b8c4=_0x53d299;this[_0x47b8c4(0x16c)](this[_0x47b8c4(0x13b)][_0x47b8c4(0x16d)]['subscribe'](async _0x5ac8f5=>{const _0x196d65=_0x47b8c4;var _0x57eeef,_0x35dd1e,_0x6d8a15,_0x133652;const _0x24a690=(_0x57eeef=this[_0x196d65(0x131)][_0x196d65(0x117)](_0x5ac8f5[_0x196d65(0x141)])[_0x196d65(0x140)](_0x5a2c6b=>_0x5a2c6b[_0x196d65(0x180)]===_0x5ac8f5[_0x196d65(0x180)]))==null?void 0x0:_0x57eeef[_0x196d65(0x164)];if(!_0x24a690)return;const {unitId:_0x4a2e3e,subUnitId:_0x421f41}=_0x24a690;switch(_0x5ac8f5['user']&&this[_0x196d65(0x121)][_0x196d65(0x17f)](_0x5ac8f5[_0x196d65(0x16b)]),_0x5ac8f5['type']){case _0x42f4ce[_0x196d65(0x18b)]:break;case _0x42f4ce['Reply']:{this[_0x196d65(0x131)][_0x196d65(0x14f)](_0x4a2e3e,_0x421f41,{'unitId':_0x4a2e3e,'subUnitId':_0x421f41,'ref':'','id':_0x5ac8f5['replyId'],'dT':_0x3fe5b9(+_0x5ac8f5[_0x196d65(0x10c)]),'threadId':_0x5ac8f5[_0x196d65(0x180)],'personId':(_0x6d8a15=(_0x35dd1e=_0x5ac8f5[_0x196d65(0x16b)])==null?void 0x0:_0x35dd1e[_0x196d65(0x114)])!=null?_0x6d8a15:_0x5ac8f5[_0x196d65(0x156)],'text':JSON[_0x196d65(0x146)](_0x5ac8f5[_0x196d65(0x12f)]),'parentId':_0x24a690['id']});break;}case _0x42f4ce['Delete']:{const _0x27fe21=this[_0x196d65(0x131)][_0x196d65(0x160)](_0x4a2e3e,_0x421f41,_0x5ac8f5['replyId']);_0x27fe21&&_0x27fe21[_0x196d65(0x11d)]&&this[_0x196d65(0x131)]['deleteComment'](_0x4a2e3e,_0x421f41,_0x5ac8f5[_0x196d65(0x150)]);break;}case _0x42f4ce[_0x196d65(0x16e)]:{this[_0x196d65(0x131)][_0x196d65(0x193)](_0x4a2e3e,_0x421f41,{'commentId':_0x5ac8f5[_0x196d65(0x150)],'text':JSON[_0x196d65(0x146)](_0x5ac8f5[_0x196d65(0x12f)])});break;}case _0x42f4ce['Solve']:{const _0x17f17d=(_0x133652=this[_0x196d65(0x131)][_0x196d65(0x117)](_0x5ac8f5['unitId'])['find'](_0xe122f9=>_0xe122f9[_0x196d65(0x180)]===_0x5ac8f5['threadId']))==null?void 0x0:_0x133652['root'];_0x17f17d&&this[_0x196d65(0x131)][_0x196d65(0x129)](_0x4a2e3e,_0x421f41,_0x17f17d['id'],_0x5ac8f5[_0x196d65(0x158)]===_0x59387b['Solved']);break;}}}));}};_0x24d393=_0x2e4ed3([_0x8675be(0x0,_0x14f70e[_0x53d299(0x10f)](_0x2eb9fe['CommentService'])),_0x8675be(0x1,_0x14f70e[_0x53d299(0x10f)](_0x550dc2['ThreadCommentModel'])),_0x8675be(0x2,_0x14f70e[_0x53d299(0x10f)](_0x14f70e['UserManagerService'])),_0x8675be(0x3,_0x14f70e[_0x53d299(0x10f)](_0x14f70e['Injector']))],_0x24d393);const _0x121bc1=_0x53d299(0x10d),_0x53738f={};var _0x5b4f3f=Object[_0x53d299(0x173)],_0x114897=(_0x256ca9,_0x59e624,_0x787fcb,_0x1b8a87)=>{const _0x56b93b=_0x53d299;for(var _0x48fcd7=_0x1b8a87>0x1?void 0x0:_0x1b8a87?_0x5b4f3f(_0x59e624,_0x787fcb):_0x59e624,_0x4263f9=_0x256ca9[_0x56b93b(0x17c)]-0x1,_0x3d237d;_0x4263f9>=0x0;_0x4263f9--)(_0x3d237d=_0x256ca9[_0x4263f9])&&(_0x48fcd7=_0x3d237d(_0x48fcd7)||_0x48fcd7);return _0x48fcd7;},_0x1f62bb=(_0x470e9d,_0x22e613)=>(_0x43a843,_0x426117)=>_0x22e613(_0x43a843,_0x426117,_0x470e9d);function _0x71882e(_0x20519f,_0x2108a1){const _0x3c27a7=_0x53d299,_0x31a62f=_0x20519f['replies'][0x0];return{..._0x2108a1,'id':_0x31a62f[_0x3c27a7(0x150)],'resolved':_0x20519f[_0x3c27a7(0x158)]===0x1,'dT':_0x3fe5b9(_0x31a62f[_0x3c27a7(0x10c)]),'personId':_0x31a62f['userId'],'threadId':_0x31a62f['threadId']};}function _0x534c15(_0x4bd1de,_0x492064,_0x5ead8d){const _0xf32482=_0x53d299;var _0x295ce1,_0x2bf2e5;if(((_0x2bf2e5=(_0x295ce1=_0x4bd1de==null?void 0x0:_0x4bd1de[_0xf32482(0x17d)])==null?void 0x0:_0x295ce1[_0xf32482(0x17c)])!=null?_0x2bf2e5:0x0)>0x0){const _0x3fd380=(_0x1a2144,_0x1ffee6)=>({'id':_0x1a2144[_0xf32482(0x150)],'threadId':_0x1a2144[_0xf32482(0x180)],'dT':_0x3fe5b9(_0x1a2144[_0xf32482(0x10c)]),'personId':_0x1a2144[_0xf32482(0x156)],'resolved':_0x4bd1de[_0xf32482(0x158)]===_0x59387b[_0xf32482(0x159)],'unitId':_0x492064,'subUnitId':_0x5ead8d,'text':JSON[_0xf32482(0x146)](_0x1a2144[_0xf32482(0x12f)]),'parentId':_0x1ffee6}),_0x2f16b0=_0x3fd380(_0x4bd1de['replies'][0x0]);return{..._0x2f16b0,'children':_0x4bd1de[_0xf32482(0x17d)][_0xf32482(0x145)](0x1)[_0xf32482(0x197)](_0x421f15=>_0x3fd380(_0x421f15,_0x2f16b0['id']))};}return null;}let _0x467a4d=class{constructor(_0x170c1d,_0x469788,_0x22c951,_0x2db829){const _0x4f9646=_0x53d299;this[_0x4f9646(0x11b)]=_0x170c1d,this['_userService']=_0x469788,this[_0x4f9646(0x152)]=_0x22c951,this[_0x4f9646(0x13e)]=_0x2db829;}async[_0x53d299(0x14f)](_0x30688c){const _0x492f3e=_0x53d299;var _0x33c7ed,_0x2ef603;const {parentId:_0x5d5de8,unitId:_0x4a87c1,text:_0x31b1c7,threadId:_0x28a131}=_0x30688c,_0x5db13f=(_0x2ef603=(_0x33c7ed=_0x31b1c7[_0x492f3e(0x14e)])==null?void 0x0:_0x33c7ed[_0x492f3e(0x151)](_0x4250fd=>_0x4250fd['rangeType']===_0x14f70e[_0x492f3e(0x13d)][_0x492f3e(0x13a)])['map'](_0x4f5d21=>_0x4f5d21['rangeId']))!=null?_0x2ef603:[],_0x13faf2=JSON[_0x492f3e(0x15d)](_0x31b1c7),_0x44ea55=(await this[_0x492f3e(0x152)]['requireSession'](_0x4a87c1))[_0x492f3e(0x18e)]();if(_0x5d5de8){const _0x11250a={'memberId':_0x44ea55,'unitId':_0x4a87c1,'content':_0x13faf2,'mention':_0x5db13f,'threadId':_0x28a131},_0x4b5314=(await this[_0x492f3e(0x11b)][_0x492f3e(0x143)](_0x492f3e(0x12a)+_0x4a87c1+_0x492f3e(0x177),{'body':_0x11250a}))[_0x492f3e(0x194)][_0x492f3e(0x153)];return{..._0x30688c,'id':_0x4b5314[_0x492f3e(0x150)],'dT':_0x14f70e[_0x492f3e(0x174)](+_0x4b5314[_0x492f3e(0x10c)])[_0x492f3e(0x110)](_0x492f3e(0x120)),'personId':_0x4b5314['userId']};}else{const _0xb323f5={'memberId':_0x44ea55,'unitId':_0x4a87c1,'content':_0x13faf2,'mention':_0x5db13f},_0x3bf9de=await this[_0x492f3e(0x11b)]['post'](_0x492f3e(0x12a)+_0x4a87c1+_0x492f3e(0x14c),{'body':_0xb323f5});return _0x71882e(_0x3bf9de[_0x492f3e(0x194)][_0x492f3e(0x123)],_0x30688c);}}async[_0x53d299(0x193)](_0x366e62){const _0x5299de=_0x53d299;var _0xf7ae22,_0x382768;const {text:_0x4e0807,unitId:_0x54492c}=_0x366e62,_0x5ef3f5=(_0x382768=(_0xf7ae22=_0x4e0807[_0x5299de(0x14e)])==null?void 0x0:_0xf7ae22[_0x5299de(0x151)](_0x28f506=>_0x28f506[_0x5299de(0x191)]===_0x14f70e[_0x5299de(0x13d)][_0x5299de(0x13a)])[_0x5299de(0x197)](_0x1bff8c=>_0x1bff8c[_0x5299de(0x185)]))!=null?_0x382768:[],_0x29cc29=JSON[_0x5299de(0x15d)](_0x4e0807),_0x1f9134=_0x366e62[_0x5299de(0x180)],_0x5c23be=_0x366e62['id'],_0x2f1e38={'memberId':(await this[_0x5299de(0x152)]['requireSession'](_0x54492c))['getMemberID'](),'unitId':_0x54492c,'threadId':_0x1f9134,'mention':_0x5ef3f5,'content':_0x29cc29,'replyId':_0x5c23be},_0x3521f2=await this[_0x5299de(0x11b)]['post'](_0x5299de(0x12a)+_0x54492c+_0x5299de(0x18f),{'body':_0x2f1e38});return!_0x3521f2['body'][_0x5299de(0x195)]||_0x3521f2[_0x5299de(0x194)]['error'][_0x5299de(0x148)]===0x1;}async['resolveComment'](_0x30fa4e){const _0x653012=_0x53d299,{unitId:_0xcce7a7}=_0x30fa4e,_0x388821=_0x30fa4e[_0x653012(0x180)],_0x39db04={'memberId':this['_userService'][_0x653012(0x187)]()['userID'],'unitId':_0xcce7a7,'threadId':_0x388821,'solved':_0x30fa4e[_0x653012(0x157)]?_0x59387b['Solved']:_0x59387b[_0x653012(0x162)]},_0x3753fb=await this[_0x653012(0x11b)]['post']('/universer-api/comment/unit/'+_0xcce7a7+_0x653012(0x137),{'body':_0x39db04});return!_0x3753fb[_0x653012(0x194)][_0x653012(0x195)]||_0x3753fb['body'][_0x653012(0x195)][_0x653012(0x148)]===0x1;}async[_0x53d299(0x181)](_0x50dd72,_0x50a2fd,_0xaa1a7,_0x57439e){const _0x2b2d3f=_0x53d299,_0x192630={'memberId':(await this[_0x2b2d3f(0x152)][_0x2b2d3f(0x18c)](_0x50dd72))[_0x2b2d3f(0x18e)](),'threadId':_0xaa1a7,'replyId':_0x57439e,'unitId':_0x50dd72},_0xe3289e=await this[_0x2b2d3f(0x11b)][_0x2b2d3f(0x143)](_0x2b2d3f(0x12a)+_0x50dd72+'/delete',{'body':_0x192630});return!_0xe3289e[_0x2b2d3f(0x194)]['error']||_0xe3289e['body'][_0x2b2d3f(0x195)][_0x2b2d3f(0x148)]===0x1;}async[_0x53d299(0x17e)](_0x240f3c,_0xcd82aa,_0x1adcbf){const _0x268572=_0x53d299,_0x478305={'unitId':_0x240f3c,'threadId':_0x1adcbf},_0x494f15=await this[_0x268572(0x11b)][_0x268572(0x143)](_0x268572(0x12a)+_0x240f3c+_0x268572(0x17b),{'body':_0x478305}),_0x158eb7=_0x1adcbf[_0x268572(0x197)](_0x1a107e=>_0x534c15(_0x494f15['body'][_0x268572(0x192)][_0x1a107e],_0x240f3c,_0xcd82aa))[_0x268572(0x151)](Boolean);return Object[_0x268572(0x13c)](_0x494f15[_0x268572(0x194)][_0x268572(0x10e)])['forEach'](_0x14d562=>{this['_userService']['addUser'](_0x14d562);}),_0x158eb7;}[_0x53d299(0x15c)](_0x5ecb9b){const _0x5c8284=_0x53d299;return{'id':_0x5ecb9b['id'],'threadId':_0x5ecb9b[_0x5c8284(0x180)],'ref':_0x5ecb9b[_0x5c8284(0x16a)]};}};_0x467a4d=_0x114897([_0x1f62bb(0x0,_0x14f70e[_0x53d299(0x10f)](_0x545ee2[_0x53d299(0x119)])),_0x1f62bb(0x1,_0x14f70e[_0x53d299(0x10f)](_0x14f70e[_0x53d299(0x178)])),_0x1f62bb(0x2,_0x14f70e['Inject'](_0x2eb9fe[_0x53d299(0x179)])),_0x1f62bb(0x3,_0x14f70e[_0x53d299(0x10f)](_0x14f70e[_0x53d299(0x15b)]))],_0x467a4d);var _0x5cbed6=Object[_0x53d299(0x173)],_0x34e3d1=(_0x3ce0a5,_0x42a048,_0x59596e,_0xbbef22)=>{const _0x4a29af=_0x53d299;for(var _0x1c9512=_0xbbef22>0x1?void 0x0:_0xbbef22?_0x5cbed6(_0x42a048,_0x59596e):_0x42a048,_0x36091e=_0x3ce0a5[_0x4a29af(0x17c)]-0x1,_0x396927;_0x36091e>=0x0;_0x36091e--)(_0x396927=_0x3ce0a5[_0x36091e])&&(_0x1c9512=_0x396927(_0x1c9512)||_0x1c9512);return _0x1c9512;},_0x1d4b9f=(_0x286d0f,_0x290910)=>(_0x3b5bb5,_0x1777c6)=>_0x290910(_0x3b5bb5,_0x1777c6,_0x286d0f);let _0x43d51a=class extends _0x14f70e[_0x53d299(0x15f)]{constructor(_0x1fcefb,_0x2632fc){const _0x2d27ee=_0x53d299;super(),this[_0x2d27ee(0x11e)]=_0x1fcefb,this[_0x2d27ee(0x12d)]=_0x2632fc,this[_0x2d27ee(0x190)]();}['_initDataSource'](){const _0x317b05=_0x53d299;this[_0x317b05(0x11e)][_0x317b05(0x126)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x43d51a=_0x34e3d1([_0x1d4b9f(0x0,_0x550dc2['IThreadCommentDataSourceService']),_0x1d4b9f(0x1,_0x14f70e['Inject'](_0x467a4d))],_0x43d51a);var _0x2f20d4=Object[_0x53d299(0x188)],_0x40cd31=Object['getOwnPropertyDescriptor'],_0x2941e0=(_0x324938,_0x458bac,_0x321b4b)=>_0x458bac in _0x324938?_0x2f20d4(_0x324938,_0x458bac,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x321b4b}):_0x324938[_0x458bac]=_0x321b4b,_0x233d40=(_0x4876ff,_0x1a8e42,_0x5cd0ca,_0x16948d)=>{const _0x4048c6=_0x53d299;for(var _0x179021=_0x16948d>0x1?void 0x0:_0x16948d?_0x40cd31(_0x1a8e42,_0x5cd0ca):_0x1a8e42,_0x23c031=_0x4876ff[_0x4048c6(0x17c)]-0x1,_0x4c4f99;_0x23c031>=0x0;_0x23c031--)(_0x4c4f99=_0x4876ff[_0x23c031])&&(_0x179021=_0x4c4f99(_0x179021)||_0x179021);return _0x179021;},_0x6add12=(_0x3c401d,_0x11a43d)=>(_0x5b838b,_0x161fc3)=>_0x11a43d(_0x5b838b,_0x161fc3,_0x3c401d),_0xfb06f4=(_0x5c04c6,_0x5d4b1c,_0x16bad4)=>_0x2941e0(_0x5c04c6,typeof _0x5d4b1c!='symbol'?_0x5d4b1c+'':_0x5d4b1c,_0x16bad4);_0x48765c[_0x53d299(0x133)]=class extends _0x14f70e[_0x53d299(0x17a)]{constructor(_0x100d34=_0x53738f,_0x5acaa8,_0xe168a4){const _0x4e26a0=_0x53d299;super(),this[_0x4e26a0(0x184)]=_0x100d34,this[_0x4e26a0(0x13e)]=_0x5acaa8,this[_0x4e26a0(0x13f)]=_0xe168a4;const {..._0x9522ee}=_0x14f70e[_0x4e26a0(0x11f)]({},_0x53738f,this[_0x4e26a0(0x184)]);this[_0x4e26a0(0x13f)][_0x4e26a0(0x14a)](_0x121bc1,_0x9522ee);}[_0x53d299(0x186)](){const _0xbf53ea=_0x53d299;[[_0x467a4d],[_0x43d51a],[_0x24d393]][_0xbf53ea(0x147)](_0x37dafa=>{const _0x1770d0=_0xbf53ea;this['_injector'][_0x1770d0(0x165)](_0x37dafa);});}[_0x53d299(0x18a)](){const _0x3e5551=_0x53d299;this[_0x3e5551(0x13e)][_0x3e5551(0x135)](_0x43d51a),this['_injector'][_0x3e5551(0x135)](_0x24d393);}},_0xfb06f4(_0x48765c[_0x53d299(0x133)],_0x53d299(0x11a),_0x402b03),_0xfb06f4(_0x48765c[_0x53d299(0x133)],_0x53d299(0x196),_0x14f70e[_0x53d299(0x127)][_0x53d299(0x170)]),_0x48765c[_0x53d299(0x133)]=_0x233d40([_0x14f70e[_0x53d299(0x154)](_0x1a727b[_0x53d299(0x111)],_0x2eb9fe[_0x53d299(0x12e)],_0x2b12c5[_0x53d299(0x149)]),_0x6add12(0x1,_0x14f70e[_0x53d299(0x10f)](_0x14f70e['Injector'])),_0x6add12(0x2,_0x14f70e[_0x53d299(0x169)])],_0x48765c[_0x53d299(0x133)]),Object[_0x53d299(0x188)](_0x48765c,Symbol[_0x53d299(0x139)],{'value':'Module'});}));function _0x4713(_0x28c0d3,_0x5208c4){const _0x1e50a2=_0x1e50();return _0x4713=function(_0x471349,_0x35ee41){_0x471349=_0x471349-0x10c;let _0x5db7ad=_0x1e50a2[_0x471349];return _0x5db7ad;},_0x4713(_0x28c0d3,_0x5208c4);}function _0x1e50(){const _0x4889f4=['updateComment','body','error','type','map','UniverProThreadCommentDatasource','16708221jqCTbb','createTimestamp','thread-comment-data-source.config','users','Inject','format','UniverThreadCommentUIPlugin','@univerjs-pro/license','169573JyaWUi','userID','Reply','3696564fWCTzf','getUnit','object','HTTPService','pluginName','_httpService','Unknown','parentId','_threadCommentDataSourceService','merge','YYYY/MM/DD\x20HH:mm','_userService','amd','comment','UniverThreadCommentUi','rxjs','dataSource','UniverInstanceType','@univerjs/thread-comment-ui','resolveComment','/universer-api/comment/unit/','payload','function','_threadCommentDataSource','UniverCollaborationClientPlugin','content','@univerjs-pro/collaboration-client','_threadCommentModel','pipe','UniverThreadCommentDataSourcePlugin','5jjkBfh','get','bufferTime','/solved','UniverProCollaborationClient','toStringTag','COMMENT','_commentService','values','CustomRangeType','_injector','_configService','find','unitId','delete','post','_initUserSync','slice','parse','forEach','code','UniverLicensePlugin','setConfig','@univerjs/core','/add','6284560jTcAMT','customRanges','addComment','replyId','filter','_sessionService','reply','DependentOn','@univerjs/thread-comment','userId','resolved','solved','Solved','484134LiPQmC','Injector','saveCommentToSnapshot','stringify','size','Disposable','getComment','getUser','OpenOrReOpen','Solve','root','add','/universer-api/user/list','UniverThreadComment','UNRECOGNIZED','IConfigService','ref','user','disposeWithMe','commentUpdate$','Edit','_init','UNIVER_UNKNOWN','1677EEDsTv','Delete','getOwnPropertyDescriptor','dayjs','subscribe','UniverCore','/reply','UserManagerService','CollaborationSessionService','Plugin','/list','length','replies','listComments','addUser','threadId','deleteComment','UniverNetwork','UniverProLicense','_config','rangeId','onStarting','getCurrentUser','defineProperty','1376991XrLhGO','onReady','Add','requireSession','730frTIzg','getMemberID','/edit','_initDataSource','rangeType','comments'];_0x1e50=function(){return _0x4889f4;};return _0x1e50();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.8.2-nightly.202506231607",
3
+ "version": "0.8.2-nightly.202506241607",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.8.2-nightly.202506231607",
49
- "@univerjs/core": "0.8.2-nightly.202506231607",
50
- "@univerjs-pro/license": "0.8.2-nightly.202506231607",
48
+ "@univerjs-pro/collaboration-client": "0.8.2-nightly.202506241607",
49
+ "@univerjs-pro/license": "0.8.2-nightly.202506241607",
50
+ "@univerjs/network": "0.8.2-nightly.202506241607",
51
+ "@univerjs/core": "0.8.2-nightly.202506241607",
51
52
  "@univerjs/protocol": "0.1.47-alpha.0",
52
- "@univerjs/thread-comment": "0.8.2-nightly.202506231607",
53
- "@univerjs/network": "0.8.2-nightly.202506231607",
54
- "@univerjs/thread-comment-ui": "0.8.2-nightly.202506231607"
53
+ "@univerjs/thread-comment": "0.8.2-nightly.202506241607",
54
+ "@univerjs/thread-comment-ui": "0.8.2-nightly.202506241607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",