@univerjs-pro/thread-comment-datasource 0.8.1-nightly.202506161607 → 0.8.1-nightly.202506181607

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 _0x5a7473=_0x5780;(function(_0x2afd33,_0x1cf00a){const _0x3875dc=_0x5780,_0x53334b=_0x2afd33();while(!![]){try{const _0x2915d8=-parseInt(_0x3875dc(0x197))/0x1*(parseInt(_0x3875dc(0x1b1))/0x2)+-parseInt(_0x3875dc(0x175))/0x3*(parseInt(_0x3875dc(0x1ae))/0x4)+-parseInt(_0x3875dc(0x1bc))/0x5+parseInt(_0x3875dc(0x172))/0x6*(-parseInt(_0x3875dc(0x187))/0x7)+parseInt(_0x3875dc(0x18c))/0x8+-parseInt(_0x3875dc(0x159))/0x9*(parseInt(_0x3875dc(0x1bf))/0xa)+parseInt(_0x3875dc(0x192))/0xb;if(_0x2915d8===_0x1cf00a)break;else _0x53334b['push'](_0x53334b['shift']());}catch(_0x2d864b){_0x53334b['push'](_0x53334b['shift']());}}}(_0x46f5,0x41f53));function _0x46f5(){const _0x3a6f17=['_injector','addUser','stringify','UniverCollaborationClientPlugin','comments','CustomRangeType','91TSUspa','type','_userService','@univerjs-pro/license','replies','3741544FVhogi','UNRECOGNIZED','users','OpenOrReOpen','UniverInstanceType','/universer-api/user/list','13349094UDJiZX','delete','merge','symbol','@univerjs/core','13qGUQMK','Solved','post','/delete','body','error','/universer-api/comment/unit/','Disposable','onStarting','payload','_initUserSync','_httpService','requireSession','UserManagerService','replyId','setConfig','pipe','/reply','_threadCommentModel','_config','get','personId','@univerjs/thread-comment','6484obhjnw','content','rangeId','81586sSbQmQ','_configService','@univerjs/thread-comment-ui','syncUpdateMutationToColla','HTTPService','_commentService','Solve','Module','bufferTime','/solved','UNIVER_UNKNOWN','288330japzTy','YYYY/MM/DD\x20HH:mm','unitId','5079490pLCpUZ','/add','size','/list','Plugin','ref','getUser','Injector','@univerjs/network','disposeWithMe','_initDataSource','filter','Inject','UniverLicensePlugin','pluginName','COMMENT','code','rxjs','map','_init','rangeType','customRanges','subscribe','solved','deleteComment','createTimestamp','defineProperty','find','userID','9WIUhPv','addComment','_sessionService','UniverThreadCommentDataSourcePlugin','updateComment','getMemberID','length','parse','threadId','parentId','/edit','resolveComment','root','values','_threadCommentDataSourceService','IConfigService','Add','onReady','DependentOn','getUnit','commentUpdate$','Delete','add','listComments','Edit','123762hjhTzi','dayjs','userId','87UUffLU','format','saveCommentToSnapshot','thread-comment-data-source.config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getOwnPropertyDescriptor','Reply','forEach','UniverThreadCommentUIPlugin','CommentService','comment','_threadCommentDataSource'];_0x46f5=function(){return _0x3a6f17;};return _0x46f5();}Object[_0x5a7473(0x156)](exports,Symbol['toStringTag'],{'value':_0x5a7473(0x1b8)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x5a7473(0x18a)),c=require(_0x5a7473(0x196)),j=require(_0x5a7473(0x1b3)),M=require(_0x5a7473(0x1ad)),w=require(_0x5a7473(0x14d)),P=require(_0x5a7473(0x1c7)),U=_0x5a7473(0x179);var I=(_0x4fe93a=>(_0x4fe93a[_0x4fe93a[_0x5a7473(0x18f)]=0x0]='OpenOrReOpen',_0x4fe93a[_0x4fe93a[_0x5a7473(0x198)]=0x1]=_0x5a7473(0x198),_0x4fe93a[_0x4fe93a[_0x5a7473(0x18d)]=-0x1]=_0x5a7473(0x18d),_0x4fe93a))(I||{}),v=(_0x592765=>(_0x592765[_0x592765['Unknown']=0x0]='Unknown',_0x592765[_0x592765[_0x5a7473(0x169)]=0x1]='Add',_0x592765[_0x592765[_0x5a7473(0x17b)]=0x2]=_0x5a7473(0x17b),_0x592765[_0x592765[_0x5a7473(0x171)]=0x3]='Edit',_0x592765[_0x592765[_0x5a7473(0x16e)]=0x4]=_0x5a7473(0x16e),_0x592765[_0x592765[_0x5a7473(0x1b7)]=0x5]=_0x5a7473(0x1b7),_0x592765[_0x592765[_0x5a7473(0x18d)]=-0x1]=_0x5a7473(0x18d),_0x592765))(v||{});const f=_0x30aae6=>c['dayjs'](new Date(+_0x30aae6))[_0x5a7473(0x176)](_0x5a7473(0x1bd)),R=async(_0x47cd8b,_0x2a508c)=>{const _0x1acf27=_0x5a7473,_0x5b38f1=_0x47cd8b[_0x1acf27(0x1ab)](c[_0x1acf27(0x1a4)]),_0xeab1c8=_0x47cd8b['get'](P[_0x1acf27(0x1b5)]);_0x2a508c[_0x1acf27(0x17c)](_0x315d9b=>{const _0x4aad08=_0x1acf27;_0x5b38f1[_0x4aad08(0x1c5)](_0x315d9b)&&_0x2a508c[_0x4aad08(0x193)](_0x315d9b);}),_0x2a508c[_0x1acf27(0x1c1)]&&(await _0xeab1c8[_0x1acf27(0x1ab)](_0x1acf27(0x191),{'params':{'userIDs':[..._0x2a508c]}}))['body'][_0x1acf27(0x18e)][_0x1acf27(0x17c)](_0x1179e6=>{_0x1179e6&&_0x5b38f1['addUser'](_0x1179e6);});};var $=Object[_0x5a7473(0x17a)],E=(_0x1be346,_0xc501f9,_0x1eae46,_0x42c049)=>{const _0x2bb034=_0x5a7473;for(var _0x259c94=_0x42c049>0x1?void 0x0:_0x42c049?$(_0xc501f9,_0x1eae46):_0xc501f9,_0x66fdf6=_0x1be346[_0x2bb034(0x15f)]-0x1,_0x320c27;_0x66fdf6>=0x0;_0x66fdf6--)(_0x320c27=_0x1be346[_0x66fdf6])&&(_0x259c94=_0x320c27(_0x259c94)||_0x259c94);return _0x259c94;},S=(_0x52d42c,_0xadaa7d)=>(_0x6cd097,_0x29cf7d)=>_0xadaa7d(_0x6cd097,_0x29cf7d,_0x52d42c);let p=class extends c[_0x5a7473(0x19e)]{constructor(_0xea76ee,_0x57e70d,_0x25275c,_0x10d749){const _0x1945d5=_0x5a7473;super(),this[_0x1945d5(0x1b6)]=_0xea76ee,this['_threadCommentModel']=_0x57e70d,this[_0x1945d5(0x189)]=_0x25275c,this[_0x1945d5(0x181)]=_0x10d749,this[_0x1945d5(0x14f)](),this[_0x1945d5(0x1a1)]();}[_0x5a7473(0x1a1)](){const _0x89d0e3=_0x5a7473;this['disposeWithMe'](this[_0x89d0e3(0x1a9)][_0x89d0e3(0x16d)][_0x89d0e3(0x1a7)](w[_0x89d0e3(0x1b9)](0x10))[_0x89d0e3(0x152)](_0x5ebfac=>{const _0x1d48ee=new Set();_0x5ebfac['forEach'](_0x39326f=>{const _0x593bd=_0x5780;switch(_0x39326f[_0x593bd(0x188)]){case'add':{const _0x540ec6=_0x39326f[_0x593bd(0x1a0)][_0x593bd(0x1ac)];_0x1d48ee['add'](_0x540ec6);break;}}}),R(this['_injector'],_0x1d48ee);}));}[_0x5a7473(0x14f)](){const _0x25366b=_0x5a7473;this[_0x25366b(0x1c8)](this[_0x25366b(0x1b6)][_0x25366b(0x16d)][_0x25366b(0x152)](async _0x4c61c2=>{const _0x366e3b=_0x25366b;var _0x2304d6,_0x32cb6d,_0x115194,_0xb21282;const _0xd2669a=(_0x2304d6=this[_0x366e3b(0x1a9)][_0x366e3b(0x16c)](_0x4c61c2[_0x366e3b(0x1be)])[_0x366e3b(0x157)](_0x224dd9=>_0x224dd9[_0x366e3b(0x161)]===_0x4c61c2[_0x366e3b(0x161)]))==null?void 0x0:_0x2304d6[_0x366e3b(0x165)];if(!_0xd2669a)return;const {unitId:_0x3fad69,subUnitId:_0x233258}=_0xd2669a;switch(_0x4c61c2['user']&&this[_0x366e3b(0x189)][_0x366e3b(0x182)](_0x4c61c2['user']),_0x4c61c2[_0x366e3b(0x188)]){case v[_0x366e3b(0x169)]:break;case v[_0x366e3b(0x17b)]:{this[_0x366e3b(0x1a9)]['addComment'](_0x3fad69,_0x233258,{'unitId':_0x3fad69,'subUnitId':_0x233258,'ref':'','id':_0x4c61c2['replyId'],'dT':f(+_0x4c61c2['createTimestamp']),'threadId':_0x4c61c2[_0x366e3b(0x161)],'personId':(_0x115194=(_0x32cb6d=_0x4c61c2['user'])==null?void 0x0:_0x32cb6d['userID'])!=null?_0x115194:_0x4c61c2[_0x366e3b(0x174)],'text':JSON[_0x366e3b(0x160)](_0x4c61c2['content']),'parentId':_0xd2669a['id']});break;}case v['Delete']:{const _0x56e54d=this['_threadCommentModel']['getComment'](_0x3fad69,_0x233258,_0x4c61c2[_0x366e3b(0x1a5)]);_0x56e54d&&_0x56e54d[_0x366e3b(0x162)]&&this[_0x366e3b(0x1a9)][_0x366e3b(0x154)](_0x3fad69,_0x233258,_0x4c61c2[_0x366e3b(0x1a5)]);break;}case v[_0x366e3b(0x171)]:{this[_0x366e3b(0x1a9)][_0x366e3b(0x15d)](_0x3fad69,_0x233258,{'commentId':_0x4c61c2[_0x366e3b(0x1a5)],'text':JSON[_0x366e3b(0x160)](_0x4c61c2[_0x366e3b(0x1af)])});break;}case v['Solve']:{const _0x3f3851=(_0xb21282=this[_0x366e3b(0x1a9)][_0x366e3b(0x16c)](_0x4c61c2['unitId'])['find'](_0x1bee86=>_0x1bee86[_0x366e3b(0x161)]===_0x4c61c2[_0x366e3b(0x161)]))==null?void 0x0:_0xb21282[_0x366e3b(0x165)];_0x3f3851&&this[_0x366e3b(0x1a9)]['resolveComment'](_0x3fad69,_0x233258,_0x3f3851['id'],_0x4c61c2['solved']===I[_0x366e3b(0x198)]);break;}}}));}};p=E([S(0x0,c[_0x5a7473(0x1cb)](b[_0x5a7473(0x17e)])),S(0x1,c[_0x5a7473(0x1cb)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0x5a7473(0x1a4)])),S(0x3,c[_0x5a7473(0x1cb)](c[_0x5a7473(0x1c6)]))],p);const q=_0x5a7473(0x178),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x127a76,_0x254249,_0x5c4d87,_0x17c975)=>{for(var _0x570008=_0x17c975>0x1?void 0x0:_0x17c975?A(_0x254249,_0x5c4d87):_0x254249,_0x5ca767=_0x127a76['length']-0x1,_0x346c03;_0x5ca767>=0x0;_0x5ca767--)(_0x346c03=_0x127a76[_0x5ca767])&&(_0x570008=_0x346c03(_0x570008)||_0x570008);return _0x570008;},_=(_0x20151f,_0x39145d)=>(_0x5b47e3,_0x327454)=>_0x39145d(_0x5b47e3,_0x327454,_0x20151f);function _0x5780(_0x59a013,_0x4391d8){const _0x46f5f8=_0x46f5();return _0x5780=function(_0x578019,_0x5d7ae9){_0x578019=_0x578019-0x149;let _0x302a70=_0x46f5f8[_0x578019];return _0x302a70;},_0x5780(_0x59a013,_0x4391d8);}function Y(_0x9b454f,_0x479504){const _0x5a32ee=_0x5a7473,_0x3e69f6=_0x9b454f[_0x5a32ee(0x18b)][0x0];return{..._0x479504,'id':_0x3e69f6[_0x5a32ee(0x1a5)],'resolved':_0x9b454f[_0x5a32ee(0x153)]===0x1,'dT':f(_0x3e69f6['createTimestamp']),'personId':_0x3e69f6[_0x5a32ee(0x174)],'threadId':_0x3e69f6[_0x5a32ee(0x161)]};}function G(_0x572a91,_0x11e351,_0x40ea76){const _0x319638=_0x5a7473;var _0x379fd2,_0x51bc03;if(((_0x51bc03=(_0x379fd2=_0x572a91==null?void 0x0:_0x572a91[_0x319638(0x18b)])==null?void 0x0:_0x379fd2[_0x319638(0x15f)])!=null?_0x51bc03:0x0)>0x0){const _0x47a41f=(_0x4e0dfd,_0x3ab2ca)=>({'id':_0x4e0dfd[_0x319638(0x1a5)],'threadId':_0x4e0dfd['threadId'],'dT':f(_0x4e0dfd[_0x319638(0x155)]),'personId':_0x4e0dfd[_0x319638(0x174)],'resolved':_0x572a91[_0x319638(0x153)]===I[_0x319638(0x198)],'unitId':_0x11e351,'subUnitId':_0x40ea76,'text':JSON['parse'](_0x4e0dfd['content']),'parentId':_0x3ab2ca}),_0x432f4e=_0x47a41f(_0x572a91[_0x319638(0x18b)][0x0]);return{..._0x432f4e,'children':_0x572a91['replies']['slice'](0x1)[_0x319638(0x14e)](_0x1e6dc6=>_0x47a41f(_0x1e6dc6,_0x432f4e['id']))};}return null;}let g=class{constructor(_0x155ec3,_0x3c08d2,_0x100087,_0x555db4){const _0x2c5e69=_0x5a7473;this['_httpService']=_0x155ec3,this[_0x2c5e69(0x189)]=_0x3c08d2,this[_0x2c5e69(0x15b)]=_0x100087,this['_injector']=_0x555db4;}async[_0x5a7473(0x15a)](_0x575a49){const _0x236c2e=_0x5a7473;var _0x1b13e0,_0x28912a;const {parentId:_0x492cc7,unitId:_0x2c0b64,text:_0x331432,threadId:_0x171957}=_0x575a49,_0x59801d=(_0x28912a=(_0x1b13e0=_0x331432['customRanges'])==null?void 0x0:_0x1b13e0[_0x236c2e(0x1ca)](_0x26b486=>_0x26b486[_0x236c2e(0x150)]===c[_0x236c2e(0x186)][_0x236c2e(0x14b)])[_0x236c2e(0x14e)](_0x322c36=>_0x322c36[_0x236c2e(0x1b0)]))!=null?_0x28912a:[],_0x4f0dc6=JSON['stringify'](_0x331432),_0x48da28=(await this[_0x236c2e(0x15b)][_0x236c2e(0x1a3)](_0x2c0b64))[_0x236c2e(0x15e)]();if(_0x492cc7){const _0x4368ee={'memberId':_0x48da28,'unitId':_0x2c0b64,'content':_0x4f0dc6,'mention':_0x59801d,'threadId':_0x171957},_0x3eb3f1=(await this['_httpService'][_0x236c2e(0x199)](_0x236c2e(0x19d)+_0x2c0b64+_0x236c2e(0x1a8),{'body':_0x4368ee}))[_0x236c2e(0x19b)]['reply'];return{..._0x575a49,'id':_0x3eb3f1['replyId'],'dT':c[_0x236c2e(0x173)](+_0x3eb3f1[_0x236c2e(0x155)])[_0x236c2e(0x176)](_0x236c2e(0x1bd)),'personId':_0x3eb3f1['userId']};}else{const _0x514090={'memberId':_0x48da28,'unitId':_0x2c0b64,'content':_0x4f0dc6,'mention':_0x59801d},_0x198edc=await this[_0x236c2e(0x1a2)][_0x236c2e(0x199)](_0x236c2e(0x19d)+_0x2c0b64+_0x236c2e(0x1c0),{'body':_0x514090});return Y(_0x198edc[_0x236c2e(0x19b)][_0x236c2e(0x17f)],_0x575a49);}}async[_0x5a7473(0x15d)](_0x310ffd){const _0x4cb5e4=_0x5a7473;var _0x509d8a,_0x3d089d;const {text:_0x3b811e,unitId:_0x5a1f17}=_0x310ffd,_0x4a5492=(_0x3d089d=(_0x509d8a=_0x3b811e[_0x4cb5e4(0x151)])==null?void 0x0:_0x509d8a['filter'](_0x44b2d5=>_0x44b2d5[_0x4cb5e4(0x150)]===c[_0x4cb5e4(0x186)][_0x4cb5e4(0x14b)])[_0x4cb5e4(0x14e)](_0x4d1f04=>_0x4d1f04[_0x4cb5e4(0x1b0)]))!=null?_0x3d089d:[],_0x381ccb=JSON[_0x4cb5e4(0x183)](_0x3b811e),_0x1c6951=_0x310ffd[_0x4cb5e4(0x161)],_0x55b0cb=_0x310ffd['id'],_0x2706c9={'memberId':(await this['_sessionService'][_0x4cb5e4(0x1a3)](_0x5a1f17))[_0x4cb5e4(0x15e)](),'unitId':_0x5a1f17,'threadId':_0x1c6951,'mention':_0x4a5492,'content':_0x381ccb,'replyId':_0x55b0cb},_0x6ba42a=await this[_0x4cb5e4(0x1a2)][_0x4cb5e4(0x199)](_0x4cb5e4(0x19d)+_0x5a1f17+_0x4cb5e4(0x163),{'body':_0x2706c9});return!_0x6ba42a[_0x4cb5e4(0x19b)][_0x4cb5e4(0x19c)]||_0x6ba42a[_0x4cb5e4(0x19b)][_0x4cb5e4(0x19c)][_0x4cb5e4(0x14c)]===0x1;}async[_0x5a7473(0x164)](_0x210abf){const _0x4ffef9=_0x5a7473,{unitId:_0x2276f}=_0x210abf,_0x3c4f2a=_0x210abf[_0x4ffef9(0x161)],_0x3864a4={'memberId':this[_0x4ffef9(0x189)]['getCurrentUser']()[_0x4ffef9(0x158)],'unitId':_0x2276f,'threadId':_0x3c4f2a,'solved':_0x210abf['resolved']?I[_0x4ffef9(0x198)]:I[_0x4ffef9(0x18f)]},_0x5055f8=await this['_httpService'][_0x4ffef9(0x199)](_0x4ffef9(0x19d)+_0x2276f+_0x4ffef9(0x1ba),{'body':_0x3864a4});return!_0x5055f8[_0x4ffef9(0x19b)][_0x4ffef9(0x19c)]||_0x5055f8[_0x4ffef9(0x19b)][_0x4ffef9(0x19c)][_0x4ffef9(0x14c)]===0x1;}async[_0x5a7473(0x154)](_0x2ca6d5,_0x58fff6,_0x3465fb,_0x1ea876){const _0x21a73f=_0x5a7473,_0x1038a7={'memberId':(await this['_sessionService'][_0x21a73f(0x1a3)](_0x2ca6d5))[_0x21a73f(0x15e)](),'threadId':_0x3465fb,'replyId':_0x1ea876,'unitId':_0x2ca6d5},_0x435490=await this['_httpService'][_0x21a73f(0x199)](_0x21a73f(0x19d)+_0x2ca6d5+_0x21a73f(0x19a),{'body':_0x1038a7});return!_0x435490['body'][_0x21a73f(0x19c)]||_0x435490['body'][_0x21a73f(0x19c)][_0x21a73f(0x14c)]===0x1;}async[_0x5a7473(0x170)](_0x4d7d6a,_0x3ca8b1,_0x1cf9a8){const _0x339b66=_0x5a7473,_0x439d9b={'unitId':_0x4d7d6a,'threadId':_0x1cf9a8},_0x50fdf8=await this[_0x339b66(0x1a2)][_0x339b66(0x199)]('/universer-api/comment/unit/'+_0x4d7d6a+_0x339b66(0x1c2),{'body':_0x439d9b}),_0x355970=_0x1cf9a8[_0x339b66(0x14e)](_0x45e947=>G(_0x50fdf8[_0x339b66(0x19b)][_0x339b66(0x185)][_0x45e947],_0x4d7d6a,_0x3ca8b1))[_0x339b66(0x1ca)](Boolean);return Object[_0x339b66(0x166)](_0x50fdf8[_0x339b66(0x19b)][_0x339b66(0x18e)])['forEach'](_0x217443=>{const _0x3778e9=_0x339b66;this['_userService'][_0x3778e9(0x182)](_0x217443);}),_0x355970;}[_0x5a7473(0x177)](_0x8da89){const _0x1e0221=_0x5a7473;return{'id':_0x8da89['id'],'threadId':_0x8da89[_0x1e0221(0x161)],'ref':_0x8da89[_0x1e0221(0x1c4)]};}};g=x([_(0x0,c[_0x5a7473(0x1cb)](P[_0x5a7473(0x1b5)])),_(0x1,c[_0x5a7473(0x1cb)](c[_0x5a7473(0x1a4)])),_(0x2,c[_0x5a7473(0x1cb)](b['CollaborationSessionService'])),_(0x3,c[_0x5a7473(0x1cb)](c[_0x5a7473(0x1c6)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x593df0,_0x24f3da,_0x18adb8,_0x2f55c6)=>{for(var _0x27c7e1=_0x2f55c6>0x1?void 0x0:_0x2f55c6?H(_0x24f3da,_0x18adb8):_0x24f3da,_0x29084c=_0x593df0['length']-0x1,_0x813ec3;_0x29084c>=0x0;_0x29084c--)(_0x813ec3=_0x593df0[_0x29084c])&&(_0x27c7e1=_0x813ec3(_0x27c7e1)||_0x27c7e1);return _0x27c7e1;},y=(_0x2b4503,_0x259ef1)=>(_0x735b89,_0x2860a4)=>_0x259ef1(_0x735b89,_0x2860a4,_0x2b4503);let C=class extends c['Disposable']{constructor(_0x4a9a88,_0x1c8b98){const _0x1533a9=_0x5a7473;super(),this[_0x1533a9(0x167)]=_0x4a9a88,this[_0x1533a9(0x180)]=_0x1c8b98,this[_0x1533a9(0x1c9)]();}['_initDataSource'](){const _0x1e4e99=_0x5a7473;this[_0x1e4e99(0x167)]['dataSource']=this['_threadCommentDataSource'],this[_0x1e4e99(0x167)][_0x1e4e99(0x1b4)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x5a7473(0x1cb)](g))],C);var F=Object[_0x5a7473(0x156)],L=Object['getOwnPropertyDescriptor'],Z=(_0x582bad,_0x3265b1,_0x326366)=>_0x3265b1 in _0x582bad?F(_0x582bad,_0x3265b1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x326366}):_0x582bad[_0x3265b1]=_0x326366,W=(_0x3d980d,_0x4773bb,_0x4c0263,_0x274c71)=>{for(var _0x305f0b=_0x274c71>0x1?void 0x0:_0x274c71?L(_0x4773bb,_0x4c0263):_0x4773bb,_0x510002=_0x3d980d['length']-0x1,_0x4697a2;_0x510002>=0x0;_0x510002--)(_0x4697a2=_0x3d980d[_0x510002])&&(_0x305f0b=_0x4697a2(_0x305f0b)||_0x305f0b);return _0x305f0b;},O=(_0x1c423c,_0x4cd4d8)=>(_0x2aebdc,_0x293456)=>_0x4cd4d8(_0x2aebdc,_0x293456,_0x1c423c),N=(_0x6fea50,_0x795899,_0x338e0f)=>Z(_0x6fea50,typeof _0x795899!=_0x5a7473(0x195)?_0x795899+'':_0x795899,_0x338e0f);exports[_0x5a7473(0x15c)]=class extends c[_0x5a7473(0x1c3)]{constructor(_0x3c5e66=D,_0x12acdb,_0x5e821c){const _0x1c8d6b=_0x5a7473;super(),this[_0x1c8d6b(0x1aa)]=_0x3c5e66,this['_injector']=_0x12acdb,this[_0x1c8d6b(0x1b2)]=_0x5e821c;const {..._0x4b090e}=c[_0x1c8d6b(0x194)]({},D,this[_0x1c8d6b(0x1aa)]);this[_0x1c8d6b(0x1b2)][_0x1c8d6b(0x1a6)](q,_0x4b090e);}[_0x5a7473(0x19f)](){const _0x28e813=_0x5a7473;[[g],[C],[p]][_0x28e813(0x17c)](_0xca3914=>{const _0x40e09f=_0x28e813;this[_0x40e09f(0x181)][_0x40e09f(0x16f)](_0xca3914);});}[_0x5a7473(0x16a)](){const _0x29f794=_0x5a7473;this[_0x29f794(0x181)][_0x29f794(0x1ab)](C),this[_0x29f794(0x181)][_0x29f794(0x1ab)](p);}},N(exports[_0x5a7473(0x15c)],_0x5a7473(0x14a),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x5a7473(0x188),c[_0x5a7473(0x190)][_0x5a7473(0x1bb)]),exports[_0x5a7473(0x15c)]=W([c[_0x5a7473(0x16b)](j[_0x5a7473(0x17d)],b[_0x5a7473(0x184)],T[_0x5a7473(0x149)]),O(0x1,c[_0x5a7473(0x1cb)](c[_0x5a7473(0x1c6)])),O(0x2,c[_0x5a7473(0x168)])],exports[_0x5a7473(0x15c)]);
1
+ 'use strict';const _0x115ab7=_0x5725;(function(_0x1e0bae,_0xa9a9f0){const _0x1822dd=_0x5725,_0x2c9e10=_0x1e0bae();while(!![]){try{const _0x36006c=-parseInt(_0x1822dd(0x22e))/0x1+parseInt(_0x1822dd(0x1fe))/0x2*(parseInt(_0x1822dd(0x268))/0x3)+parseInt(_0x1822dd(0x1fa))/0x4*(parseInt(_0x1822dd(0x204))/0x5)+-parseInt(_0x1822dd(0x1f6))/0x6*(-parseInt(_0x1822dd(0x211))/0x7)+parseInt(_0x1822dd(0x236))/0x8*(parseInt(_0x1822dd(0x231))/0x9)+parseInt(_0x1822dd(0x1f3))/0xa+-parseInt(_0x1822dd(0x258))/0xb;if(_0x36006c===_0xa9a9f0)break;else _0x2c9e10['push'](_0x2c9e10['shift']());}catch(_0x2b7b23){_0x2c9e10['push'](_0x2c9e10['shift']());}}}(_0x486e,0x8315b));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x115ab7(0x217)});function _0x5725(_0x5653db,_0x154d51){const _0x486e47=_0x486e();return _0x5725=function(_0x572522,_0x18cae7){_0x572522=_0x572522-0x1e8;let _0x13f5b7=_0x486e47[_0x572522];return _0x13f5b7;},_0x5725(_0x5653db,_0x154d51);}const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require(_0x115ab7(0x1f7)),M=require(_0x115ab7(0x26d)),w=require(_0x115ab7(0x251)),P=require(_0x115ab7(0x1e9)),U=_0x115ab7(0x225);var I=(_0x2fdcc2=>(_0x2fdcc2[_0x2fdcc2[_0x115ab7(0x1f1)]=0x0]='OpenOrReOpen',_0x2fdcc2[_0x2fdcc2[_0x115ab7(0x21b)]=0x1]=_0x115ab7(0x21b),_0x2fdcc2[_0x2fdcc2[_0x115ab7(0x22a)]=-0x1]=_0x115ab7(0x22a),_0x2fdcc2))(I||{}),v=(_0x594017=>(_0x594017[_0x594017['Unknown']=0x0]=_0x115ab7(0x259),_0x594017[_0x594017[_0x115ab7(0x1fb)]=0x1]=_0x115ab7(0x1fb),_0x594017[_0x594017[_0x115ab7(0x247)]=0x2]=_0x115ab7(0x247),_0x594017[_0x594017[_0x115ab7(0x24b)]=0x3]=_0x115ab7(0x24b),_0x594017[_0x594017[_0x115ab7(0x250)]=0x4]=_0x115ab7(0x250),_0x594017[_0x594017[_0x115ab7(0x203)]=0x5]=_0x115ab7(0x203),_0x594017[_0x594017[_0x115ab7(0x22a)]=-0x1]=_0x115ab7(0x22a),_0x594017))(v||{});const f=_0x359066=>c[_0x115ab7(0x266)](new Date(+_0x359066))[_0x115ab7(0x20a)](_0x115ab7(0x210)),R=async(_0x8c682e,_0x2d616b)=>{const _0x22ec69=_0x115ab7,_0xc23481=_0x8c682e[_0x22ec69(0x21e)](c['UserManagerService']),_0x51bbce=_0x8c682e[_0x22ec69(0x21e)](P[_0x22ec69(0x24e)]);_0x2d616b['forEach'](_0x2dae2c=>{const _0x2d42ac=_0x22ec69;_0xc23481[_0x2d42ac(0x216)](_0x2dae2c)&&_0x2d616b[_0x2d42ac(0x1f4)](_0x2dae2c);}),_0x2d616b[_0x22ec69(0x239)]&&(await _0x51bbce[_0x22ec69(0x21e)](_0x22ec69(0x238),{'params':{'userIDs':[..._0x2d616b]}}))[_0x22ec69(0x25e)][_0x22ec69(0x20c)]['forEach'](_0x55c7a4=>{const _0x8f126b=_0x22ec69;_0x55c7a4&&_0xc23481[_0x8f126b(0x226)](_0x55c7a4);});};var $=Object[_0x115ab7(0x23d)],E=(_0x558e27,_0x43e14d,_0x295484,_0x28e870)=>{const _0x297dcc=_0x115ab7;for(var _0x4c9d86=_0x28e870>0x1?void 0x0:_0x28e870?$(_0x43e14d,_0x295484):_0x43e14d,_0x3924cd=_0x558e27[_0x297dcc(0x222)]-0x1,_0x44bbef;_0x3924cd>=0x0;_0x3924cd--)(_0x44bbef=_0x558e27[_0x3924cd])&&(_0x4c9d86=_0x44bbef(_0x4c9d86)||_0x4c9d86);return _0x4c9d86;},S=(_0x1e986c,_0x26c25d)=>(_0x5bcb28,_0x586aad)=>_0x26c25d(_0x5bcb28,_0x586aad,_0x1e986c);let p=class extends c[_0x115ab7(0x1f0)]{constructor(_0x27f1ee,_0x196f63,_0x447464,_0x1e8a4f){const _0x2430c7=_0x115ab7;super(),this[_0x2430c7(0x264)]=_0x27f1ee,this[_0x2430c7(0x1ef)]=_0x196f63,this['_userService']=_0x447464,this['_injector']=_0x1e8a4f,this['_init'](),this[_0x2430c7(0x212)]();}[_0x115ab7(0x212)](){const _0x153cec=_0x115ab7;this[_0x153cec(0x22d)](this[_0x153cec(0x1ef)][_0x153cec(0x20e)]['pipe'](w[_0x153cec(0x23a)](0x10))[_0x153cec(0x25b)](_0x250a70=>{const _0x1d6d73=_0x153cec,_0x40a42c=new Set();_0x250a70[_0x1d6d73(0x263)](_0xfeec2e=>{const _0x5d288f=_0x1d6d73;switch(_0xfeec2e[_0x5d288f(0x220)]){case'add':{const _0x543761=_0xfeec2e[_0x5d288f(0x252)][_0x5d288f(0x260)];_0x40a42c[_0x5d288f(0x246)](_0x543761);break;}}}),R(this[_0x1d6d73(0x249)],_0x40a42c);}));}[_0x115ab7(0x21a)](){const _0x3c721e=_0x115ab7;this['disposeWithMe'](this[_0x3c721e(0x264)][_0x3c721e(0x20e)]['subscribe'](async _0x524362=>{const _0x220abb=_0x3c721e;var _0x4aab8e,_0x54366f,_0x1ef2fc,_0x1b5ce9;const _0x5c9723=(_0x4aab8e=this['_threadCommentModel'][_0x220abb(0x25f)](_0x524362[_0x220abb(0x24c)])[_0x220abb(0x229)](_0x356a8a=>_0x356a8a['threadId']===_0x524362[_0x220abb(0x261)]))==null?void 0x0:_0x4aab8e[_0x220abb(0x21f)];if(!_0x5c9723)return;const {unitId:_0x3b7dbd,subUnitId:_0x3645b6}=_0x5c9723;switch(_0x524362[_0x220abb(0x206)]&&this[_0x220abb(0x224)]['addUser'](_0x524362[_0x220abb(0x206)]),_0x524362[_0x220abb(0x220)]){case v[_0x220abb(0x1fb)]:break;case v['Reply']:{this[_0x220abb(0x1ef)][_0x220abb(0x23c)](_0x3b7dbd,_0x3645b6,{'unitId':_0x3b7dbd,'subUnitId':_0x3645b6,'ref':'','id':_0x524362[_0x220abb(0x26b)],'dT':f(+_0x524362[_0x220abb(0x256)]),'threadId':_0x524362[_0x220abb(0x261)],'personId':(_0x1ef2fc=(_0x54366f=_0x524362[_0x220abb(0x206)])==null?void 0x0:_0x54366f[_0x220abb(0x262)])!=null?_0x1ef2fc:_0x524362[_0x220abb(0x209)],'text':JSON[_0x220abb(0x240)](_0x524362['content']),'parentId':_0x5c9723['id']});break;}case v[_0x220abb(0x250)]:{const _0x11b978=this['_threadCommentModel'][_0x220abb(0x269)](_0x3b7dbd,_0x3645b6,_0x524362[_0x220abb(0x26b)]);_0x11b978&&_0x11b978['parentId']&&this[_0x220abb(0x1ef)][_0x220abb(0x230)](_0x3b7dbd,_0x3645b6,_0x524362[_0x220abb(0x26b)]);break;}case v[_0x220abb(0x24b)]:{this[_0x220abb(0x1ef)][_0x220abb(0x221)](_0x3b7dbd,_0x3645b6,{'commentId':_0x524362[_0x220abb(0x26b)],'text':JSON[_0x220abb(0x240)](_0x524362[_0x220abb(0x1ff)])});break;}case v[_0x220abb(0x203)]:{const _0x1534a8=(_0x1b5ce9=this[_0x220abb(0x1ef)][_0x220abb(0x25f)](_0x524362[_0x220abb(0x24c)])['find'](_0x36eab1=>_0x36eab1[_0x220abb(0x261)]===_0x524362[_0x220abb(0x261)]))==null?void 0x0:_0x1b5ce9[_0x220abb(0x21f)];_0x1534a8&&this['_threadCommentModel'][_0x220abb(0x1fd)](_0x3b7dbd,_0x3645b6,_0x1534a8['id'],_0x524362[_0x220abb(0x219)]===I[_0x220abb(0x21b)]);break;}}}));}};p=E([S(0x0,c[_0x115ab7(0x24d)](b[_0x115ab7(0x223)])),S(0x1,c[_0x115ab7(0x24d)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0x115ab7(0x25d)])),S(0x3,c[_0x115ab7(0x24d)](c['Injector']))],p);const q=_0x115ab7(0x22f),D={};var A=Object[_0x115ab7(0x23d)],x=(_0xac559a,_0x192cf3,_0x2ddab4,_0xe56f05)=>{const _0x12a496=_0x115ab7;for(var _0x5ce218=_0xe56f05>0x1?void 0x0:_0xe56f05?A(_0x192cf3,_0x2ddab4):_0x192cf3,_0x4d8141=_0xac559a[_0x12a496(0x222)]-0x1,_0x2857fb;_0x4d8141>=0x0;_0x4d8141--)(_0x2857fb=_0xac559a[_0x4d8141])&&(_0x5ce218=_0x2857fb(_0x5ce218)||_0x5ce218);return _0x5ce218;},_=(_0x5349ea,_0xe16d3b)=>(_0x2e3688,_0x49f2bf)=>_0xe16d3b(_0x2e3688,_0x49f2bf,_0x5349ea);function Y(_0x5c157e,_0x186906){const _0x265f41=_0x115ab7,_0x4b521c=_0x5c157e[_0x265f41(0x23e)][0x0];return{..._0x186906,'id':_0x4b521c['replyId'],'resolved':_0x5c157e[_0x265f41(0x219)]===0x1,'dT':f(_0x4b521c['createTimestamp']),'personId':_0x4b521c['userId'],'threadId':_0x4b521c['threadId']};}function G(_0x530f33,_0x262db4,_0x4e1356){const _0x7d77f8=_0x115ab7;var _0x540d6a,_0x37e6f5;if(((_0x37e6f5=(_0x540d6a=_0x530f33==null?void 0x0:_0x530f33[_0x7d77f8(0x23e)])==null?void 0x0:_0x540d6a[_0x7d77f8(0x222)])!=null?_0x37e6f5:0x0)>0x0){const _0x15ae20=(_0x3c4b72,_0x2fd86f)=>({'id':_0x3c4b72['replyId'],'threadId':_0x3c4b72['threadId'],'dT':f(_0x3c4b72[_0x7d77f8(0x256)]),'personId':_0x3c4b72[_0x7d77f8(0x209)],'resolved':_0x530f33[_0x7d77f8(0x219)]===I[_0x7d77f8(0x21b)],'unitId':_0x262db4,'subUnitId':_0x4e1356,'text':JSON[_0x7d77f8(0x240)](_0x3c4b72[_0x7d77f8(0x1ff)]),'parentId':_0x2fd86f}),_0x39d1ce=_0x15ae20(_0x530f33[_0x7d77f8(0x23e)][0x0]);return{..._0x39d1ce,'children':_0x530f33[_0x7d77f8(0x23e)][_0x7d77f8(0x265)](0x1)['map'](_0x5ea7ef=>_0x15ae20(_0x5ea7ef,_0x39d1ce['id']))};}return null;}let g=class{constructor(_0x2f05ed,_0x4c7de2,_0x78893a,_0x4f02af){const _0x33b693=_0x115ab7;this[_0x33b693(0x200)]=_0x2f05ed,this[_0x33b693(0x224)]=_0x4c7de2,this[_0x33b693(0x207)]=_0x78893a,this['_injector']=_0x4f02af;}async[_0x115ab7(0x23c)](_0x53ac95){const _0xc88fd2=_0x115ab7;var _0xa0cf9c,_0x4a5542;const {parentId:_0x317716,unitId:_0x3bb78b,text:_0x26b1a8,threadId:_0x54355d}=_0x53ac95,_0x5031ec=(_0x4a5542=(_0xa0cf9c=_0x26b1a8[_0xc88fd2(0x1ec)])==null?void 0x0:_0xa0cf9c['filter'](_0x3a8db0=>_0x3a8db0[_0xc88fd2(0x22c)]===c[_0xc88fd2(0x21c)][_0xc88fd2(0x1f5)])['map'](_0xd4320c=>_0xd4320c[_0xc88fd2(0x26c)]))!=null?_0x4a5542:[],_0x358f50=JSON[_0xc88fd2(0x20f)](_0x26b1a8),_0x5ccbbb=(await this[_0xc88fd2(0x207)][_0xc88fd2(0x235)](_0x3bb78b))[_0xc88fd2(0x213)]();if(_0x317716){const _0x49961b={'memberId':_0x5ccbbb,'unitId':_0x3bb78b,'content':_0x358f50,'mention':_0x5031ec,'threadId':_0x54355d},_0x45d93a=(await this[_0xc88fd2(0x200)]['post'](_0xc88fd2(0x228)+_0x3bb78b+_0xc88fd2(0x1fc),{'body':_0x49961b}))[_0xc88fd2(0x25e)][_0xc88fd2(0x1ed)];return{..._0x53ac95,'id':_0x45d93a['replyId'],'dT':c[_0xc88fd2(0x266)](+_0x45d93a['createTimestamp'])[_0xc88fd2(0x20a)](_0xc88fd2(0x210)),'personId':_0x45d93a[_0xc88fd2(0x209)]};}else{const _0x3eed09={'memberId':_0x5ccbbb,'unitId':_0x3bb78b,'content':_0x358f50,'mention':_0x5031ec},_0x60955b=await this[_0xc88fd2(0x200)][_0xc88fd2(0x1f2)](_0xc88fd2(0x228)+_0x3bb78b+_0xc88fd2(0x23b),{'body':_0x3eed09});return Y(_0x60955b[_0xc88fd2(0x25e)][_0xc88fd2(0x1ee)],_0x53ac95);}}async[_0x115ab7(0x221)](_0x34c480){const _0x1b14f1=_0x115ab7;var _0x27b426,_0x5ac05c;const {text:_0x35eecc,unitId:_0x2e3b2f}=_0x34c480,_0x461433=(_0x5ac05c=(_0x27b426=_0x35eecc[_0x1b14f1(0x1ec)])==null?void 0x0:_0x27b426[_0x1b14f1(0x241)](_0x50c230=>_0x50c230['rangeType']===c[_0x1b14f1(0x21c)][_0x1b14f1(0x1f5)])[_0x1b14f1(0x25c)](_0x20d523=>_0x20d523[_0x1b14f1(0x26c)]))!=null?_0x5ac05c:[],_0x2842af=JSON[_0x1b14f1(0x20f)](_0x35eecc),_0x1e673d=_0x34c480[_0x1b14f1(0x261)],_0x4ff7be=_0x34c480['id'],_0x3ded1d={'memberId':(await this[_0x1b14f1(0x207)][_0x1b14f1(0x235)](_0x2e3b2f))[_0x1b14f1(0x213)](),'unitId':_0x2e3b2f,'threadId':_0x1e673d,'mention':_0x461433,'content':_0x2842af,'replyId':_0x4ff7be},_0x35924d=await this[_0x1b14f1(0x200)][_0x1b14f1(0x1f2)](_0x1b14f1(0x228)+_0x2e3b2f+'/edit',{'body':_0x3ded1d});return!_0x35924d[_0x1b14f1(0x25e)][_0x1b14f1(0x208)]||_0x35924d[_0x1b14f1(0x25e)][_0x1b14f1(0x208)][_0x1b14f1(0x20d)]===0x1;}async[_0x115ab7(0x1fd)](_0x544431){const _0x51d017=_0x115ab7,{unitId:_0x503a1b}=_0x544431,_0x20f1fb=_0x544431[_0x51d017(0x261)],_0x380ca3={'memberId':this[_0x51d017(0x224)][_0x51d017(0x253)]()['userID'],'unitId':_0x503a1b,'threadId':_0x20f1fb,'solved':_0x544431[_0x51d017(0x242)]?I[_0x51d017(0x21b)]:I[_0x51d017(0x1f1)]},_0x261e56=await this[_0x51d017(0x200)][_0x51d017(0x1f2)](_0x51d017(0x228)+_0x503a1b+_0x51d017(0x201),{'body':_0x380ca3});return!_0x261e56[_0x51d017(0x25e)]['error']||_0x261e56[_0x51d017(0x25e)][_0x51d017(0x208)][_0x51d017(0x20d)]===0x1;}async[_0x115ab7(0x230)](_0x2f70dc,_0x1e6334,_0x5c0842,_0x181a12){const _0x1e6e3e=_0x115ab7,_0x4b17a0={'memberId':(await this[_0x1e6e3e(0x207)][_0x1e6e3e(0x235)](_0x2f70dc))[_0x1e6e3e(0x213)](),'threadId':_0x5c0842,'replyId':_0x181a12,'unitId':_0x2f70dc},_0x19ac5=await this['_httpService'][_0x1e6e3e(0x1f2)](_0x1e6e3e(0x228)+_0x2f70dc+_0x1e6e3e(0x243),{'body':_0x4b17a0});return!_0x19ac5['body'][_0x1e6e3e(0x208)]||_0x19ac5['body']['error'][_0x1e6e3e(0x20d)]===0x1;}async[_0x115ab7(0x1ea)](_0x172694,_0x29989a,_0x152cae){const _0x1cbbda=_0x115ab7,_0x4abb74={'unitId':_0x172694,'threadId':_0x152cae},_0x5ac064=await this[_0x1cbbda(0x200)]['post'](_0x1cbbda(0x228)+_0x172694+'/list',{'body':_0x4abb74}),_0x8ed1f6=_0x152cae['map'](_0xe5fedd=>G(_0x5ac064['body'][_0x1cbbda(0x1eb)][_0xe5fedd],_0x172694,_0x29989a))[_0x1cbbda(0x241)](Boolean);return Object[_0x1cbbda(0x267)](_0x5ac064['body'][_0x1cbbda(0x20c)])[_0x1cbbda(0x263)](_0x2c69e4=>{const _0x3ebd75=_0x1cbbda;this[_0x3ebd75(0x224)][_0x3ebd75(0x226)](_0x2c69e4);}),_0x8ed1f6;}[_0x115ab7(0x233)](_0x562899){return{'id':_0x562899['id'],'threadId':_0x562899['threadId'],'ref':_0x562899['ref']};}};g=x([_(0x0,c['Inject'](P[_0x115ab7(0x24e)])),_(0x1,c[_0x115ab7(0x24d)](c[_0x115ab7(0x25d)])),_(0x2,c[_0x115ab7(0x24d)](b[_0x115ab7(0x257)])),_(0x3,c[_0x115ab7(0x24d)](c[_0x115ab7(0x1f8)]))],g);var H=Object[_0x115ab7(0x23d)],J=(_0x3e2f3e,_0x927222,_0x5f0e00,_0x5af020)=>{const _0x13f0db=_0x115ab7;for(var _0x51020e=_0x5af020>0x1?void 0x0:_0x5af020?H(_0x927222,_0x5f0e00):_0x927222,_0x52ae40=_0x3e2f3e[_0x13f0db(0x222)]-0x1,_0x381e7f;_0x52ae40>=0x0;_0x52ae40--)(_0x381e7f=_0x3e2f3e[_0x52ae40])&&(_0x51020e=_0x381e7f(_0x51020e)||_0x51020e);return _0x51020e;},y=(_0x4948ee,_0x4b3a14)=>(_0x4ea3c4,_0x29103d)=>_0x4b3a14(_0x4ea3c4,_0x29103d,_0x4948ee);let C=class extends c[_0x115ab7(0x1f0)]{constructor(_0x4a95db,_0x115a20){const _0x858b8d=_0x115ab7;super(),this['_threadCommentDataSourceService']=_0x4a95db,this[_0x858b8d(0x248)]=_0x115a20,this['_initDataSource']();}[_0x115ab7(0x20b)](){const _0x1a0bc1=_0x115ab7;this[_0x1a0bc1(0x245)][_0x1a0bc1(0x255)]=this[_0x1a0bc1(0x248)],this[_0x1a0bc1(0x245)][_0x1a0bc1(0x23f)]=!0x1;}};C=J([y(0x0,M[_0x115ab7(0x1e8)]),y(0x1,c[_0x115ab7(0x24d)](g))],C);var F=Object[_0x115ab7(0x24f)],L=Object[_0x115ab7(0x23d)],Z=(_0x4b5c9f,_0x59f114,_0x27b8ef)=>_0x59f114 in _0x4b5c9f?F(_0x4b5c9f,_0x59f114,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x27b8ef}):_0x4b5c9f[_0x59f114]=_0x27b8ef,W=(_0x5dcc13,_0x3b6c39,_0x503855,_0x4a2d2d)=>{const _0x5a2734=_0x115ab7;for(var _0x541791=_0x4a2d2d>0x1?void 0x0:_0x4a2d2d?L(_0x3b6c39,_0x503855):_0x3b6c39,_0x41436d=_0x5dcc13[_0x5a2734(0x222)]-0x1,_0x10efc0;_0x41436d>=0x0;_0x41436d--)(_0x10efc0=_0x5dcc13[_0x41436d])&&(_0x541791=_0x10efc0(_0x541791)||_0x541791);return _0x541791;},O=(_0x153995,_0x14f635)=>(_0x545c7d,_0x2f1da7)=>_0x14f635(_0x545c7d,_0x2f1da7,_0x153995),N=(_0x37c1d5,_0x56bcbd,_0x3c1775)=>Z(_0x37c1d5,typeof _0x56bcbd!=_0x115ab7(0x244)?_0x56bcbd+'':_0x56bcbd,_0x3c1775);exports[_0x115ab7(0x254)]=class extends c[_0x115ab7(0x25a)]{constructor(_0x381cc6=D,_0x25bc17,_0x237783){const _0x57631e=_0x115ab7;super(),this[_0x57631e(0x24a)]=_0x381cc6,this[_0x57631e(0x249)]=_0x25bc17,this[_0x57631e(0x237)]=_0x237783;const {..._0x43df38}=c[_0x57631e(0x234)]({},D,this['_config']);this['_configService'][_0x57631e(0x215)](q,_0x43df38);}[_0x115ab7(0x21d)](){[[g],[C],[p]]['forEach'](_0xf82b90=>{const _0x259f26=_0x5725;this['_injector'][_0x259f26(0x246)](_0xf82b90);});}[_0x115ab7(0x202)](){const _0x43f7c1=_0x115ab7;this[_0x43f7c1(0x249)][_0x43f7c1(0x21e)](C),this[_0x43f7c1(0x249)][_0x43f7c1(0x21e)](p);}},N(exports[_0x115ab7(0x254)],_0x115ab7(0x218),U),N(exports[_0x115ab7(0x254)],_0x115ab7(0x220),c[_0x115ab7(0x205)][_0x115ab7(0x227)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x115ab7(0x214)](j[_0x115ab7(0x232)],b[_0x115ab7(0x1f9)],T[_0x115ab7(0x26a)]),O(0x1,c['Inject'](c['Injector'])),O(0x2,c[_0x115ab7(0x22b)])],exports[_0x115ab7(0x254)]);function _0x486e(){const _0x3b90fa=['replies','syncUpdateMutationToColla','parse','filter','resolved','/delete','symbol','_threadCommentDataSourceService','add','Reply','_threadCommentDataSource','_injector','_config','Edit','unitId','Inject','HTTPService','defineProperty','Delete','rxjs','payload','getCurrentUser','UniverThreadCommentDataSourcePlugin','dataSource','createTimestamp','CollaborationSessionService','16255613zJgQdL','Unknown','Plugin','subscribe','map','UserManagerService','body','getUnit','personId','threadId','userID','forEach','_commentService','slice','dayjs','values','1038354sDtuya','getComment','UniverLicensePlugin','replyId','rangeId','@univerjs/thread-comment','IThreadCommentDataSourceService','@univerjs/network','listComments','comments','customRanges','reply','comment','_threadCommentModel','Disposable','OpenOrReOpen','post','10708420doPToc','delete','COMMENT','6LIOnbe','@univerjs/thread-comment-ui','Injector','UniverCollaborationClientPlugin','2276356nhEfGk','Add','/reply','resolveComment','2jjKUwH','content','_httpService','/solved','onReady','Solve','5AOxZrf','UniverInstanceType','user','_sessionService','error','userId','format','_initDataSource','users','code','commentUpdate$','stringify','YYYY/MM/DD\x20HH:mm','46501zNaceb','_initUserSync','getMemberID','DependentOn','setConfig','getUser','Module','pluginName','solved','_init','Solved','CustomRangeType','onStarting','get','root','type','updateComment','length','CommentService','_userService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','addUser','UNIVER_UNKNOWN','/universer-api/comment/unit/','find','UNRECOGNIZED','IConfigService','rangeType','disposeWithMe','423277gLFpEe','thread-comment-data-source.config','deleteComment','4007619OgiskN','UniverThreadCommentUIPlugin','saveCommentToSnapshot','merge','requireSession','8udnhCy','_configService','/universer-api/user/list','size','bufferTime','/add','addComment','getOwnPropertyDescriptor'];_0x486e=function(){return _0x3b90fa;};return _0x486e();}
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x12b56c=_0x10d6;function _0x10d6(_0x3ec3a3,_0x389d62){const _0xce34ea=_0xce34();return _0x10d6=function(_0x10d6db,_0x593616){_0x10d6db=_0x10d6db-0x198;let _0x481542=_0xce34ea[_0x10d6db];return _0x481542;},_0x10d6(_0x3ec3a3,_0x389d62);}(function(_0x215dac,_0x3e3d42){const _0x100892=_0x10d6,_0x359c04=_0x215dac();while(!![]){try{const _0x3b64df=-parseInt(_0x100892(0x1e4))/0x1*(parseInt(_0x100892(0x1dd))/0x2)+-parseInt(_0x100892(0x1ba))/0x3+-parseInt(_0x100892(0x1a4))/0x4+parseInt(_0x100892(0x1f0))/0x5+parseInt(_0x100892(0x1d0))/0x6*(-parseInt(_0x100892(0x1f2))/0x7)+-parseInt(_0x100892(0x1b7))/0x8*(parseInt(_0x100892(0x1c0))/0x9)+-parseInt(_0x100892(0x1d7))/0xa*(-parseInt(_0x100892(0x1c1))/0xb);if(_0x3b64df===_0x3e3d42)break;else _0x359c04['push'](_0x359c04['shift']());}catch(_0x507c53){_0x359c04['push'](_0x359c04['shift']());}}}(_0xce34,0x2fda4));import{CommentService as _0x4961eb,CollaborationSessionService as _0x29ed8b,UniverCollaborationClientPlugin as _0x34c6e6}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x109dd0}from'@univerjs-pro/license';import{dayjs as _0x471f42,UserManagerService as _0x49fe3b,Inject as _0x39b796,Injector as _0x424bef,Disposable as _0x2461f3,CustomRangeType as _0x3f7c3c,UniverInstanceType as _0x823561,DependentOn as _0x21a168,IConfigService as _0x560613,Plugin as _0x3a42a6,merge as _0x720492}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3dd3a8}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xd98492,IThreadCommentDataSourceService as _0x91912c}from'@univerjs/thread-comment';import{bufferTime as _0x212897}from'rxjs';import{HTTPService as _0x397a0a}from'@univerjs/network';const W=_0x12b56c(0x1c9);var I=(_0x1d96a6=>(_0x1d96a6[_0x1d96a6['OpenOrReOpen']=0x0]=_0x12b56c(0x1e9),_0x1d96a6[_0x1d96a6[_0x12b56c(0x1a8)]=0x1]=_0x12b56c(0x1a8),_0x1d96a6[_0x1d96a6['UNRECOGNIZED']=-0x1]=_0x12b56c(0x1c6),_0x1d96a6))(I||{}),v=(_0x2eb9eb=>(_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x19c)]=0x0]=_0x12b56c(0x19c),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1c5)]=0x1]=_0x12b56c(0x1c5),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1e6)]=0x2]=_0x12b56c(0x1e6),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1c7)]=0x3]=_0x12b56c(0x1c7),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1dc)]=0x4]=_0x12b56c(0x1dc),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1d8)]=0x5]=_0x12b56c(0x1d8),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1c6)]=-0x1]=_0x12b56c(0x1c6),_0x2eb9eb))(v||{});const D=_0x59c67d=>_0x471f42(new Date(+_0x59c67d))[_0x12b56c(0x1b9)](_0x12b56c(0x1ea)),B=async(_0x28c461,_0x2fda40)=>{const _0x4426f8=_0x12b56c,_0x95603c=_0x28c461['get'](_0x49fe3b),_0x36971b=_0x28c461[_0x4426f8(0x1b3)](_0x397a0a);_0x2fda40['forEach'](_0x134d6b=>{const _0x4b5b00=_0x4426f8;_0x95603c[_0x4b5b00(0x1af)](_0x134d6b)&&_0x2fda40[_0x4b5b00(0x1d5)](_0x134d6b);}),_0x2fda40[_0x4426f8(0x1f6)]&&(await _0x36971b[_0x4426f8(0x1b3)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2fda40]}}))[_0x4426f8(0x1b8)][_0x4426f8(0x1aa)][_0x4426f8(0x1d1)](_0x242a8d=>{const _0x39c586=_0x4426f8;_0x242a8d&&_0x95603c[_0x39c586(0x1e8)](_0x242a8d);});};var K=Object[_0x12b56c(0x1e1)],V=(_0x49dddd,_0x2f2948,_0x1f4f6d,_0x4d5bbc)=>{const _0x397ab9=_0x12b56c;for(var _0x1de8a2=_0x4d5bbc>0x1?void 0x0:_0x4d5bbc?K(_0x2f2948,_0x1f4f6d):_0x2f2948,_0x15a2d9=_0x49dddd[_0x397ab9(0x1f5)]-0x1,_0x145d0a;_0x15a2d9>=0x0;_0x15a2d9--)(_0x145d0a=_0x49dddd[_0x15a2d9])&&(_0x1de8a2=_0x145d0a(_0x1de8a2)||_0x1de8a2);return _0x1de8a2;},p=(_0x1c2670,_0x51ff8a)=>(_0x16d015,_0x31b19e)=>_0x51ff8a(_0x16d015,_0x31b19e,_0x1c2670);let S=class extends _0x2461f3{constructor(_0x37664f,_0x3415c1,_0x35fd08,_0x3135cd){const _0x57ca06=_0x12b56c;super(),this['_commentService']=_0x37664f,this[_0x57ca06(0x1e3)]=_0x3415c1,this[_0x57ca06(0x1ee)]=_0x35fd08,this[_0x57ca06(0x1ed)]=_0x3135cd,this[_0x57ca06(0x1c2)](),this['_initUserSync']();}['_initUserSync'](){const _0xd74971=_0x12b56c;this[_0xd74971(0x1f3)](this[_0xd74971(0x1e3)][_0xd74971(0x1f1)][_0xd74971(0x19f)](_0x212897(0x10))[_0xd74971(0x1c8)](_0x299557=>{const _0x539ecf=_0xd74971,_0x56e015=new Set();_0x299557[_0x539ecf(0x1d1)](_0x5509a8=>{const _0x37ad16=_0x539ecf;switch(_0x5509a8['type']){case _0x37ad16(0x1cf):{const _0x458f6c=_0x5509a8['payload'][_0x37ad16(0x1bd)];_0x56e015[_0x37ad16(0x1cf)](_0x458f6c);break;}}}),B(this[_0x539ecf(0x1ed)],_0x56e015);}));}[_0x12b56c(0x1c2)](){const _0xb948cb=_0x12b56c;this[_0xb948cb(0x1f3)](this['_commentService'][_0xb948cb(0x1f1)][_0xb948cb(0x1c8)](async _0x5338d9=>{const _0x2b6797=_0xb948cb;var _0x3102cd,_0x591ee7,_0x2ed96c,_0x189afb;const _0x37ba69=(_0x3102cd=this[_0x2b6797(0x1e3)][_0x2b6797(0x198)](_0x5338d9[_0x2b6797(0x1a5)])[_0x2b6797(0x1cb)](_0x44decd=>_0x44decd[_0x2b6797(0x19a)]===_0x5338d9[_0x2b6797(0x19a)]))==null?void 0x0:_0x3102cd[_0x2b6797(0x1a0)];if(!_0x37ba69)return;const {unitId:_0x474aba,subUnitId:_0x58e080}=_0x37ba69;switch(_0x5338d9[_0x2b6797(0x1f9)]&&this['_userService'][_0x2b6797(0x1e8)](_0x5338d9[_0x2b6797(0x1f9)]),_0x5338d9[_0x2b6797(0x19e)]){case v[_0x2b6797(0x1c5)]:break;case v[_0x2b6797(0x1e6)]:{this[_0x2b6797(0x1e3)][_0x2b6797(0x1f7)](_0x474aba,_0x58e080,{'unitId':_0x474aba,'subUnitId':_0x58e080,'ref':'','id':_0x5338d9[_0x2b6797(0x1da)],'dT':D(+_0x5338d9[_0x2b6797(0x1ec)]),'threadId':_0x5338d9[_0x2b6797(0x19a)],'personId':(_0x2ed96c=(_0x591ee7=_0x5338d9[_0x2b6797(0x1f9)])==null?void 0x0:_0x591ee7[_0x2b6797(0x1b5)])!=null?_0x2ed96c:_0x5338d9[_0x2b6797(0x1ce)],'text':JSON['parse'](_0x5338d9['content']),'parentId':_0x37ba69['id']});break;}case v['Delete']:{const _0x3cb262=this[_0x2b6797(0x1e3)][_0x2b6797(0x1df)](_0x474aba,_0x58e080,_0x5338d9[_0x2b6797(0x1da)]);_0x3cb262&&_0x3cb262[_0x2b6797(0x1e5)]&&this['_threadCommentModel'][_0x2b6797(0x1a1)](_0x474aba,_0x58e080,_0x5338d9[_0x2b6797(0x1da)]);break;}case v[_0x2b6797(0x1c7)]:{this['_threadCommentModel'][_0x2b6797(0x1b1)](_0x474aba,_0x58e080,{'commentId':_0x5338d9['replyId'],'text':JSON[_0x2b6797(0x1ab)](_0x5338d9[_0x2b6797(0x1de)])});break;}case v[_0x2b6797(0x1d8)]:{const _0x16464f=(_0x189afb=this[_0x2b6797(0x1e3)][_0x2b6797(0x198)](_0x5338d9[_0x2b6797(0x1a5)])[_0x2b6797(0x1cb)](_0x361be3=>_0x361be3['threadId']===_0x5338d9[_0x2b6797(0x19a)]))==null?void 0x0:_0x189afb[_0x2b6797(0x1a0)];_0x16464f&&this[_0x2b6797(0x1e3)][_0x2b6797(0x1e7)](_0x474aba,_0x58e080,_0x16464f['id'],_0x5338d9['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x39b796(_0x4961eb)),p(0x1,_0x39b796(_0xd98492)),p(0x2,_0x39b796(_0x49fe3b)),p(0x3,_0x39b796(_0x424bef))],S);const z=_0x12b56c(0x1ef),M={};var k=Object[_0x12b56c(0x1e1)],Q=(_0x5d2e38,_0x2770b6,_0x4ed512,_0x4829a2)=>{const _0x5765dc=_0x12b56c;for(var _0x3f8544=_0x4829a2>0x1?void 0x0:_0x4829a2?k(_0x2770b6,_0x4ed512):_0x2770b6,_0x58b16a=_0x5d2e38[_0x5765dc(0x1f5)]-0x1,_0x449da5;_0x58b16a>=0x0;_0x58b16a--)(_0x449da5=_0x5d2e38[_0x58b16a])&&(_0x3f8544=_0x449da5(_0x3f8544)||_0x3f8544);return _0x3f8544;},_=(_0x499741,_0x242072)=>(_0x1250f3,_0x4e5125)=>_0x242072(_0x1250f3,_0x4e5125,_0x499741);function X(_0xcb7f20,_0x2c6057){const _0x397d31=_0x12b56c,_0x5b0c32=_0xcb7f20['replies'][0x0];return{..._0x2c6057,'id':_0x5b0c32['replyId'],'resolved':_0xcb7f20[_0x397d31(0x1bc)]===0x1,'dT':D(_0x5b0c32[_0x397d31(0x1ec)]),'personId':_0x5b0c32[_0x397d31(0x1ce)],'threadId':_0x5b0c32[_0x397d31(0x19a)]};}function ee(_0x494b40,_0x57abb2,_0x404687){const _0x42a50e=_0x12b56c;var _0x206ca9,_0x238f14;if(((_0x238f14=(_0x206ca9=_0x494b40==null?void 0x0:_0x494b40[_0x42a50e(0x199)])==null?void 0x0:_0x206ca9['length'])!=null?_0x238f14:0x0)>0x0){const _0x5d06ff=(_0x4b9736,_0x580b0b)=>({'id':_0x4b9736[_0x42a50e(0x1da)],'threadId':_0x4b9736[_0x42a50e(0x19a)],'dT':D(_0x4b9736['createTimestamp']),'personId':_0x4b9736[_0x42a50e(0x1ce)],'resolved':_0x494b40[_0x42a50e(0x1bc)]===I[_0x42a50e(0x1a8)],'unitId':_0x57abb2,'subUnitId':_0x404687,'text':JSON[_0x42a50e(0x1ab)](_0x4b9736[_0x42a50e(0x1de)]),'parentId':_0x580b0b}),_0x214db7=_0x5d06ff(_0x494b40[_0x42a50e(0x199)][0x0]);return{..._0x214db7,'children':_0x494b40[_0x42a50e(0x199)]['slice'](0x1)[_0x42a50e(0x1ae)](_0x5ad52e=>_0x5d06ff(_0x5ad52e,_0x214db7['id']))};}return null;}let f=class{constructor(_0x5274cf,_0x30f7e5,_0x20a447,_0x406063){const _0x2a4dc7=_0x12b56c;this[_0x2a4dc7(0x1f8)]=_0x5274cf,this['_userService']=_0x30f7e5,this[_0x2a4dc7(0x1f4)]=_0x20a447,this[_0x2a4dc7(0x1ed)]=_0x406063;}async['addComment'](_0x1c0eac){const _0x4f63a9=_0x12b56c;var _0x26aeb3,_0x2c362f;const {parentId:_0x2c5e69,unitId:_0x5c1e49,text:_0x36ec8e,threadId:_0x5bd0aa}=_0x1c0eac,_0x110a9c=(_0x2c362f=(_0x26aeb3=_0x36ec8e[_0x4f63a9(0x19b)])==null?void 0x0:_0x26aeb3[_0x4f63a9(0x1b2)](_0x2fd52c=>_0x2fd52c[_0x4f63a9(0x1e2)]===_0x3f7c3c['COMMENT'])['map'](_0xad4890=>_0xad4890[_0x4f63a9(0x1db)]))!=null?_0x2c362f:[],_0x52b941=JSON[_0x4f63a9(0x1c4)](_0x36ec8e),_0x1a8f8b=(await this[_0x4f63a9(0x1f4)]['requireSession'](_0x5c1e49))[_0x4f63a9(0x1eb)]();if(_0x2c5e69){const _0x419575={'memberId':_0x1a8f8b,'unitId':_0x5c1e49,'content':_0x52b941,'mention':_0x110a9c,'threadId':_0x5bd0aa},_0x5a1d8f=(await this[_0x4f63a9(0x1f8)][_0x4f63a9(0x1bb)](_0x4f63a9(0x1d4)+_0x5c1e49+'/reply',{'body':_0x419575}))[_0x4f63a9(0x1b8)][_0x4f63a9(0x1b4)];return{..._0x1c0eac,'id':_0x5a1d8f[_0x4f63a9(0x1da)],'dT':_0x471f42(+_0x5a1d8f[_0x4f63a9(0x1ec)])[_0x4f63a9(0x1b9)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5a1d8f[_0x4f63a9(0x1ce)]};}else{const _0xc58149={'memberId':_0x1a8f8b,'unitId':_0x5c1e49,'content':_0x52b941,'mention':_0x110a9c},_0x357b2c=await this['_httpService'][_0x4f63a9(0x1bb)](_0x4f63a9(0x1d4)+_0x5c1e49+_0x4f63a9(0x1d6),{'body':_0xc58149});return X(_0x357b2c[_0x4f63a9(0x1b8)][_0x4f63a9(0x1a3)],_0x1c0eac);}}async['updateComment'](_0x1dc244){const _0x13dac0=_0x12b56c;var _0xf84e6a,_0x46404c;const {text:_0x2c6bea,unitId:_0x273e79}=_0x1dc244,_0x52252f=(_0x46404c=(_0xf84e6a=_0x2c6bea[_0x13dac0(0x19b)])==null?void 0x0:_0xf84e6a[_0x13dac0(0x1b2)](_0x485391=>_0x485391[_0x13dac0(0x1e2)]===_0x3f7c3c['COMMENT'])[_0x13dac0(0x1ae)](_0x36e49f=>_0x36e49f[_0x13dac0(0x1db)]))!=null?_0x46404c:[],_0x4ef4be=JSON[_0x13dac0(0x1c4)](_0x2c6bea),_0x57cd05=_0x1dc244[_0x13dac0(0x19a)],_0x3a1684=_0x1dc244['id'],_0x36cb59={'memberId':(await this[_0x13dac0(0x1f4)][_0x13dac0(0x1d3)](_0x273e79))[_0x13dac0(0x1eb)](),'unitId':_0x273e79,'threadId':_0x57cd05,'mention':_0x52252f,'content':_0x4ef4be,'replyId':_0x3a1684},_0x562e3c=await this[_0x13dac0(0x1f8)][_0x13dac0(0x1bb)](_0x13dac0(0x1d4)+_0x273e79+'/edit',{'body':_0x36cb59});return!_0x562e3c[_0x13dac0(0x1b8)][_0x13dac0(0x1bf)]||_0x562e3c[_0x13dac0(0x1b8)]['error'][_0x13dac0(0x1c3)]===0x1;}async[_0x12b56c(0x1e7)](_0x400644){const _0x3d0046=_0x12b56c,{unitId:_0x2e15c8}=_0x400644,_0x4be0ef=_0x400644['threadId'],_0x51070c={'memberId':this[_0x3d0046(0x1ee)][_0x3d0046(0x1d2)]()['userID'],'unitId':_0x2e15c8,'threadId':_0x4be0ef,'solved':_0x400644['resolved']?I[_0x3d0046(0x1a8)]:I[_0x3d0046(0x1e9)]},_0x1cabff=await this['_httpService'][_0x3d0046(0x1bb)]('/universer-api/comment/unit/'+_0x2e15c8+'/solved',{'body':_0x51070c});return!_0x1cabff[_0x3d0046(0x1b8)][_0x3d0046(0x1bf)]||_0x1cabff[_0x3d0046(0x1b8)][_0x3d0046(0x1bf)][_0x3d0046(0x1c3)]===0x1;}async['deleteComment'](_0x33f749,_0x4a8dd0,_0x3dc8d8,_0x7080){const _0x1edd4e=_0x12b56c,_0x35b9af={'memberId':(await this[_0x1edd4e(0x1f4)][_0x1edd4e(0x1d3)](_0x33f749))['getMemberID'](),'threadId':_0x3dc8d8,'replyId':_0x7080,'unitId':_0x33f749},_0x13a547=await this[_0x1edd4e(0x1f8)][_0x1edd4e(0x1bb)](_0x1edd4e(0x1d4)+_0x33f749+_0x1edd4e(0x1be),{'body':_0x35b9af});return!_0x13a547[_0x1edd4e(0x1b8)]['error']||_0x13a547[_0x1edd4e(0x1b8)]['error'][_0x1edd4e(0x1c3)]===0x1;}async[_0x12b56c(0x1cd)](_0x30a587,_0x2a0dd9,_0x29e4b1){const _0x345ca0=_0x12b56c,_0x14e0fb={'unitId':_0x30a587,'threadId':_0x29e4b1},_0x2edb5c=await this['_httpService'][_0x345ca0(0x1bb)](_0x345ca0(0x1d4)+_0x30a587+'/list',{'body':_0x14e0fb}),_0x9970c=_0x29e4b1[_0x345ca0(0x1ae)](_0x55961a=>ee(_0x2edb5c[_0x345ca0(0x1b8)]['comments'][_0x55961a],_0x30a587,_0x2a0dd9))['filter'](Boolean);return Object['values'](_0x2edb5c[_0x345ca0(0x1b8)][_0x345ca0(0x1aa)])['forEach'](_0x1d9cbf=>{const _0x32aa6c=_0x345ca0;this[_0x32aa6c(0x1ee)][_0x32aa6c(0x1e8)](_0x1d9cbf);}),_0x9970c;}[_0x12b56c(0x1cc)](_0x31306f){const _0x3f49c8=_0x12b56c;return{'id':_0x31306f['id'],'threadId':_0x31306f[_0x3f49c8(0x19a)],'ref':_0x31306f[_0x3f49c8(0x1ad)]};}};f=Q([_(0x0,_0x39b796(_0x397a0a)),_(0x1,_0x39b796(_0x49fe3b)),_(0x2,_0x39b796(_0x29ed8b)),_(0x3,_0x39b796(_0x424bef))],f);var re=Object[_0x12b56c(0x1e1)],te=(_0x195d00,_0x3804a4,_0x32fccf,_0x11799b)=>{const _0x1f94d9=_0x12b56c;for(var _0x247dde=_0x11799b>0x1?void 0x0:_0x11799b?re(_0x3804a4,_0x32fccf):_0x3804a4,_0xdaeddd=_0x195d00[_0x1f94d9(0x1f5)]-0x1,_0x5f3674;_0xdaeddd>=0x0;_0xdaeddd--)(_0x5f3674=_0x195d00[_0xdaeddd])&&(_0x247dde=_0x5f3674(_0x247dde)||_0x247dde);return _0x247dde;},N=(_0x14a4e0,_0x366d79)=>(_0x56242a,_0x57b7b4)=>_0x366d79(_0x56242a,_0x57b7b4,_0x14a4e0);function _0xce34(){const _0x4ad063=['parentId','Reply','resolveComment','addUser','OpenOrReOpen','YYYY/MM/DD\x20HH:mm','getMemberID','createTimestamp','_injector','_userService','thread-comment-data-source.config','450885yUTaLy','commentUpdate$','175BvaMsD','disposeWithMe','_sessionService','length','size','addComment','_httpService','user','getUnit','replies','threadId','customRanges','Unknown','UNIVER_UNKNOWN','type','pipe','root','deleteComment','dataSource','comment','731232bYBsLZ','unitId','defineProperty','_config','Solved','symbol','users','parse','_threadCommentDataSource','ref','map','getUser','pluginName','updateComment','filter','get','reply','userID','_threadCommentDataSourceService','538904vtzFOm','body','format','1118307pxPZje','post','solved','personId','/delete','error','36zrKTBX','11hAPOoA','_init','code','stringify','Add','UNRECOGNIZED','Edit','subscribe','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initDataSource','find','saveCommentToSnapshot','listComments','userId','add','26454HqJiae','forEach','getCurrentUser','requireSession','/universer-api/comment/unit/','delete','/add','11385430nAKAIF','Solve','setConfig','replyId','rangeId','Delete','2HdmDbf','content','getComment','_configService','getOwnPropertyDescriptor','rangeType','_threadCommentModel','97462rCBWoe'];_0xce34=function(){return _0x4ad063;};return _0xce34();}let g=class extends _0x2461f3{constructor(_0x3c357d,_0x166fdb){const _0x5c8294=_0x12b56c;super(),this[_0x5c8294(0x1b6)]=_0x3c357d,this[_0x5c8294(0x1ac)]=_0x166fdb,this[_0x5c8294(0x1ca)]();}[_0x12b56c(0x1ca)](){const _0x50baa6=_0x12b56c;this[_0x50baa6(0x1b6)][_0x50baa6(0x1a2)]=this[_0x50baa6(0x1ac)],this[_0x50baa6(0x1b6)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x91912c),N(0x1,_0x39b796(f))],g);var se=Object[_0x12b56c(0x1a6)],oe=Object[_0x12b56c(0x1e1)],ne=(_0x37a0d9,_0xb50cc6,_0x7beabe)=>_0xb50cc6 in _0x37a0d9?se(_0x37a0d9,_0xb50cc6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x7beabe}):_0x37a0d9[_0xb50cc6]=_0x7beabe,ie=(_0x40b3a8,_0xc0a831,_0xace0f5,_0x73095e)=>{const _0x4fb9ce=_0x12b56c;for(var _0x16d76e=_0x73095e>0x1?void 0x0:_0x73095e?oe(_0xc0a831,_0xace0f5):_0xc0a831,_0x52c5a3=_0x40b3a8[_0x4fb9ce(0x1f5)]-0x1,_0x39d5d6;_0x52c5a3>=0x0;_0x52c5a3--)(_0x39d5d6=_0x40b3a8[_0x52c5a3])&&(_0x16d76e=_0x39d5d6(_0x16d76e)||_0x16d76e);return _0x16d76e;},w=(_0x369b6d,_0x4a6cb7)=>(_0x55b64e,_0x11fe55)=>_0x4a6cb7(_0x55b64e,_0x11fe55,_0x369b6d),$=(_0x5d71be,_0x93677f,_0x3dd09e)=>ne(_0x5d71be,typeof _0x93677f!=_0x12b56c(0x1a9)?_0x93677f+'':_0x93677f,_0x3dd09e);let b=class extends _0x3a42a6{constructor(_0x14eaa1=M,_0x57a787,_0x4237b3){const _0x3d2193=_0x12b56c;super(),this[_0x3d2193(0x1a7)]=_0x14eaa1,this[_0x3d2193(0x1ed)]=_0x57a787,this[_0x3d2193(0x1e0)]=_0x4237b3;const {..._0x2f5890}=_0x720492({},M,this[_0x3d2193(0x1a7)]);this['_configService'][_0x3d2193(0x1d9)](z,_0x2f5890);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x51bc9d=>{const _0x7b6389=_0x10d6;this[_0x7b6389(0x1ed)]['add'](_0x51bc9d);});}['onReady'](){const _0x456ea9=_0x12b56c;this[_0x456ea9(0x1ed)][_0x456ea9(0x1b3)](g),this[_0x456ea9(0x1ed)]['get'](S);}};$(b,_0x12b56c(0x1b0),W),$(b,'type',_0x823561[_0x12b56c(0x19d)]),b=ie([_0x21a168(_0x3dd3a8,_0x34c6e6,_0x109dd0),w(0x1,_0x39b796(_0x424bef)),w(0x2,_0x560613)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x3c63ed=_0x686a;(function(_0x404739,_0x224a0e){const _0x3b87b4=_0x686a,_0x239fda=_0x404739();while(!![]){try{const _0x14235d=parseInt(_0x3b87b4(0x18c))/0x1+parseInt(_0x3b87b4(0x177))/0x2*(-parseInt(_0x3b87b4(0x1a8))/0x3)+-parseInt(_0x3b87b4(0x19c))/0x4*(parseInt(_0x3b87b4(0x16b))/0x5)+parseInt(_0x3b87b4(0x166))/0x6+-parseInt(_0x3b87b4(0x181))/0x7*(parseInt(_0x3b87b4(0x158))/0x8)+-parseInt(_0x3b87b4(0x185))/0x9+parseInt(_0x3b87b4(0x167))/0xa;if(_0x14235d===_0x224a0e)break;else _0x239fda['push'](_0x239fda['shift']());}catch(_0x5a5390){_0x239fda['push'](_0x239fda['shift']());}}}(_0x3bff,0x58c59));import{CommentService as _0x1f5f6e,CollaborationSessionService as _0x30fdc0,UniverCollaborationClientPlugin as _0x1f70fd}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1df8ef}from'@univerjs-pro/license';import{dayjs as _0x14457b,UserManagerService as _0x317ae9,Inject as _0x425bc5,Injector as _0x344a66,Disposable as _0x2716e8,CustomRangeType as _0x4c58ab,UniverInstanceType as _0xe14618,DependentOn as _0x440a04,IConfigService as _0x5bacb3,Plugin as _0x417ad6,merge as _0x4aed61}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x21fc1f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x59fb27,IThreadCommentDataSourceService as _0x581906}from'@univerjs/thread-comment';import{bufferTime as _0x96ccfa}from'rxjs';import{HTTPService as _0x304e86}from'@univerjs/network';const W=_0x3c63ed(0x1aa);var I=(_0x2e779d=>(_0x2e779d[_0x2e779d[_0x3c63ed(0x1a7)]=0x0]=_0x3c63ed(0x1a7),_0x2e779d[_0x2e779d[_0x3c63ed(0x189)]=0x1]=_0x3c63ed(0x189),_0x2e779d[_0x2e779d[_0x3c63ed(0x19b)]=-0x1]=_0x3c63ed(0x19b),_0x2e779d))(I||{}),v=(_0x55c348=>(_0x55c348[_0x55c348[_0x3c63ed(0x1ac)]=0x0]=_0x3c63ed(0x1ac),_0x55c348[_0x55c348[_0x3c63ed(0x18e)]=0x1]=_0x3c63ed(0x18e),_0x55c348[_0x55c348[_0x3c63ed(0x151)]=0x2]=_0x3c63ed(0x151),_0x55c348[_0x55c348[_0x3c63ed(0x1b2)]=0x3]=_0x3c63ed(0x1b2),_0x55c348[_0x55c348['Delete']=0x4]='Delete',_0x55c348[_0x55c348['Solve']=0x5]=_0x3c63ed(0x196),_0x55c348[_0x55c348[_0x3c63ed(0x19b)]=-0x1]='UNRECOGNIZED',_0x55c348))(v||{});const D=_0x3fe9d5=>_0x14457b(new Date(+_0x3fe9d5))[_0x3c63ed(0x19a)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x1663fe,_0x58047a)=>{const _0x4cad74=_0x3c63ed,_0x572cc1=_0x1663fe[_0x4cad74(0x171)](_0x317ae9),_0x35d323=_0x1663fe[_0x4cad74(0x171)](_0x304e86);_0x58047a[_0x4cad74(0x16c)](_0x2f3979=>{_0x572cc1['getUser'](_0x2f3979)&&_0x58047a['delete'](_0x2f3979);}),_0x58047a['size']&&(await _0x35d323['get'](_0x4cad74(0x15b),{'params':{'userIDs':[..._0x58047a]}}))[_0x4cad74(0x172)]['users'][_0x4cad74(0x16c)](_0x5d1c9d=>{const _0x451b88=_0x4cad74;_0x5d1c9d&&_0x572cc1[_0x451b88(0x1a1)](_0x5d1c9d);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x451b27,_0x283e3c,_0x2793f8,_0x1b07cd)=>{const _0x58b18b=_0x3c63ed;for(var _0x6418b7=_0x1b07cd>0x1?void 0x0:_0x1b07cd?K(_0x283e3c,_0x2793f8):_0x283e3c,_0x14aaac=_0x451b27[_0x58b18b(0x183)]-0x1,_0x3c8ced;_0x14aaac>=0x0;_0x14aaac--)(_0x3c8ced=_0x451b27[_0x14aaac])&&(_0x6418b7=_0x3c8ced(_0x6418b7)||_0x6418b7);return _0x6418b7;},p=(_0x4f1aa2,_0x4012d1)=>(_0xa393cb,_0x26d387)=>_0x4012d1(_0xa393cb,_0x26d387,_0x4f1aa2);let S=class extends _0x2716e8{constructor(_0x23c5b7,_0x745ff8,_0x56678e,_0x128501){const _0xfa3853=_0x3c63ed;super(),this['_commentService']=_0x23c5b7,this[_0xfa3853(0x1a9)]=_0x745ff8,this[_0xfa3853(0x17d)]=_0x56678e,this[_0xfa3853(0x15c)]=_0x128501,this[_0xfa3853(0x14d)](),this[_0xfa3853(0x159)]();}[_0x3c63ed(0x159)](){const _0x5e4b01=_0x3c63ed;this['disposeWithMe'](this['_threadCommentModel'][_0x5e4b01(0x18a)][_0x5e4b01(0x18f)](_0x96ccfa(0x10))[_0x5e4b01(0x1a2)](_0x2682e5=>{const _0x480d90=_0x5e4b01,_0x32e5b3=new Set();_0x2682e5[_0x480d90(0x16c)](_0x3623e6=>{const _0x5bc62f=_0x480d90;switch(_0x3623e6[_0x5bc62f(0x165)]){case _0x5bc62f(0x164):{const _0x436779=_0x3623e6[_0x5bc62f(0x162)][_0x5bc62f(0x17e)];_0x32e5b3['add'](_0x436779);break;}}}),B(this[_0x480d90(0x15c)],_0x32e5b3);}));}[_0x3c63ed(0x14d)](){const _0xae3974=_0x3c63ed;this[_0xae3974(0x17a)](this[_0xae3974(0x1a6)][_0xae3974(0x18a)][_0xae3974(0x1a2)](async _0x5cc814=>{const _0x222feb=_0xae3974;var _0x3e32e0,_0x44e89d,_0x1eaf2e,_0x3f3b6e;const _0x2afde6=(_0x3e32e0=this[_0x222feb(0x1a9)][_0x222feb(0x195)](_0x5cc814[_0x222feb(0x173)])[_0x222feb(0x14c)](_0x475902=>_0x475902[_0x222feb(0x14f)]===_0x5cc814['threadId']))==null?void 0x0:_0x3e32e0[_0x222feb(0x180)];if(!_0x2afde6)return;const {unitId:_0x36011c,subUnitId:_0xa120c9}=_0x2afde6;switch(_0x5cc814[_0x222feb(0x150)]&&this[_0x222feb(0x17d)][_0x222feb(0x1a1)](_0x5cc814[_0x222feb(0x150)]),_0x5cc814[_0x222feb(0x165)]){case v['Add']:break;case v[_0x222feb(0x151)]:{this[_0x222feb(0x1a9)][_0x222feb(0x156)](_0x36011c,_0xa120c9,{'unitId':_0x36011c,'subUnitId':_0xa120c9,'ref':'','id':_0x5cc814[_0x222feb(0x15d)],'dT':D(+_0x5cc814[_0x222feb(0x15e)]),'threadId':_0x5cc814['threadId'],'personId':(_0x1eaf2e=(_0x44e89d=_0x5cc814[_0x222feb(0x150)])==null?void 0x0:_0x44e89d[_0x222feb(0x192)])!=null?_0x1eaf2e:_0x5cc814[_0x222feb(0x193)],'text':JSON['parse'](_0x5cc814[_0x222feb(0x1a5)]),'parentId':_0x2afde6['id']});break;}case v[_0x222feb(0x184)]:{const _0x3ebf55=this[_0x222feb(0x1a9)]['getComment'](_0x36011c,_0xa120c9,_0x5cc814[_0x222feb(0x15d)]);_0x3ebf55&&_0x3ebf55[_0x222feb(0x18d)]&&this[_0x222feb(0x1a9)][_0x222feb(0x1ad)](_0x36011c,_0xa120c9,_0x5cc814[_0x222feb(0x15d)]);break;}case v[_0x222feb(0x1b2)]:{this[_0x222feb(0x1a9)][_0x222feb(0x16f)](_0x36011c,_0xa120c9,{'commentId':_0x5cc814[_0x222feb(0x15d)],'text':JSON['parse'](_0x5cc814[_0x222feb(0x1a5)])});break;}case v[_0x222feb(0x196)]:{const _0x426ab9=(_0x3f3b6e=this['_threadCommentModel'][_0x222feb(0x195)](_0x5cc814[_0x222feb(0x173)])[_0x222feb(0x14c)](_0x5b4af8=>_0x5b4af8['threadId']===_0x5cc814['threadId']))==null?void 0x0:_0x3f3b6e[_0x222feb(0x180)];_0x426ab9&&this[_0x222feb(0x1a9)][_0x222feb(0x191)](_0x36011c,_0xa120c9,_0x426ab9['id'],_0x5cc814['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x425bc5(_0x1f5f6e)),p(0x1,_0x425bc5(_0x59fb27)),p(0x2,_0x425bc5(_0x317ae9)),p(0x3,_0x425bc5(_0x344a66))],S);const z=_0x3c63ed(0x174),M={};function _0x3bff(){const _0x355f1=['root','7xabFUC','code','length','Delete','6131556mzMgCx','post','YYYY/MM/DD\x20HH:mm','/list','Solved','commentUpdate$','comment','115822UkcxlL','parentId','Add','pipe','dataSource','resolveComment','userID','userId','map','getUnit','Solve','UNIVER_UNKNOWN','/edit','error','format','UNRECOGNIZED','2208904qfMuHp','symbol','_threadCommentDataSourceService','getOwnPropertyDescriptor','rangeId','addUser','subscribe','rangeType','/add','content','_commentService','OpenOrReOpen','98922IlwSnS','_threadCommentModel','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','setConfig','Unknown','deleteComment','getMemberID','_httpService','solved','values','Edit','resolved','/universer-api/comment/unit/','find','_init','getCurrentUser','threadId','user','Reply','ref','_threadCommentDataSource','_sessionService','COMMENT','addComment','_config','4588808VLXIcy','_initUserSync','/solved','/universer-api/user/list','_injector','replyId','createTimestamp','defineProperty','syncUpdateMutationToColla','/delete','payload','slice','add','type','1837644xLbrNr','24740520IWwCBE','comments','parse','_configService','5gdDrDg','forEach','stringify','_initDataSource','updateComment','replies','get','body','unitId','thread-comment-data-source.config','filter','customRanges','44WDSRZx','users','requireSession','disposeWithMe','pluginName','saveCommentToSnapshot','_userService','personId','onReady'];_0x3bff=function(){return _0x355f1;};return _0x3bff();}var k=Object[_0x3c63ed(0x19f)],Q=(_0x2a53df,_0x46ffd6,_0x3eaaf3,_0x6fd965)=>{const _0x5ef11b=_0x3c63ed;for(var _0x41d4fc=_0x6fd965>0x1?void 0x0:_0x6fd965?k(_0x46ffd6,_0x3eaaf3):_0x46ffd6,_0x2b3a8a=_0x2a53df[_0x5ef11b(0x183)]-0x1,_0xdcbdb3;_0x2b3a8a>=0x0;_0x2b3a8a--)(_0xdcbdb3=_0x2a53df[_0x2b3a8a])&&(_0x41d4fc=_0xdcbdb3(_0x41d4fc)||_0x41d4fc);return _0x41d4fc;},_=(_0x307121,_0x2a147f)=>(_0x3b7da5,_0x296027)=>_0x2a147f(_0x3b7da5,_0x296027,_0x307121);function X(_0x24292c,_0x1654b7){const _0x52c8bd=_0x3c63ed,_0x1abff8=_0x24292c['replies'][0x0];return{..._0x1654b7,'id':_0x1abff8[_0x52c8bd(0x15d)],'resolved':_0x24292c[_0x52c8bd(0x1b0)]===0x1,'dT':D(_0x1abff8[_0x52c8bd(0x15e)]),'personId':_0x1abff8['userId'],'threadId':_0x1abff8[_0x52c8bd(0x14f)]};}function _0x686a(_0x5c6a6e,_0x288393){const _0x3bff5c=_0x3bff();return _0x686a=function(_0x686a8c,_0x412f48){_0x686a8c=_0x686a8c-0x14a;let _0x5f3735=_0x3bff5c[_0x686a8c];return _0x5f3735;},_0x686a(_0x5c6a6e,_0x288393);}function ee(_0x3305ff,_0x51a84d,_0x50c7b9){const _0x52f9b2=_0x3c63ed;var _0x477239,_0x4c047a;if(((_0x4c047a=(_0x477239=_0x3305ff==null?void 0x0:_0x3305ff['replies'])==null?void 0x0:_0x477239[_0x52f9b2(0x183)])!=null?_0x4c047a:0x0)>0x0){const _0x100400=(_0x20adbf,_0x20531b)=>({'id':_0x20adbf['replyId'],'threadId':_0x20adbf[_0x52f9b2(0x14f)],'dT':D(_0x20adbf[_0x52f9b2(0x15e)]),'personId':_0x20adbf[_0x52f9b2(0x193)],'resolved':_0x3305ff[_0x52f9b2(0x1b0)]===I['Solved'],'unitId':_0x51a84d,'subUnitId':_0x50c7b9,'text':JSON[_0x52f9b2(0x169)](_0x20adbf[_0x52f9b2(0x1a5)]),'parentId':_0x20531b}),_0xdd1115=_0x100400(_0x3305ff[_0x52f9b2(0x170)][0x0]);return{..._0xdd1115,'children':_0x3305ff[_0x52f9b2(0x170)][_0x52f9b2(0x163)](0x1)[_0x52f9b2(0x194)](_0x332701=>_0x100400(_0x332701,_0xdd1115['id']))};}return null;}let f=class{constructor(_0x47b64e,_0x425db8,_0x1cffad,_0x49b19a){const _0x2422cb=_0x3c63ed;this['_httpService']=_0x47b64e,this['_userService']=_0x425db8,this[_0x2422cb(0x154)]=_0x1cffad,this[_0x2422cb(0x15c)]=_0x49b19a;}async['addComment'](_0x18a112){const _0x37b0b0=_0x3c63ed;var _0x4de9cd,_0x5cc8a4;const {parentId:_0x18c17b,unitId:_0x268d8f,text:_0x13845d,threadId:_0x141ba7}=_0x18a112,_0xa56beb=(_0x5cc8a4=(_0x4de9cd=_0x13845d['customRanges'])==null?void 0x0:_0x4de9cd[_0x37b0b0(0x175)](_0x3e5fcd=>_0x3e5fcd['rangeType']===_0x4c58ab[_0x37b0b0(0x155)])[_0x37b0b0(0x194)](_0x5eea5a=>_0x5eea5a[_0x37b0b0(0x1a0)]))!=null?_0x5cc8a4:[],_0x1a54a2=JSON[_0x37b0b0(0x16d)](_0x13845d),_0x437d03=(await this[_0x37b0b0(0x154)]['requireSession'](_0x268d8f))[_0x37b0b0(0x1ae)]();if(_0x18c17b){const _0x440ce9={'memberId':_0x437d03,'unitId':_0x268d8f,'content':_0x1a54a2,'mention':_0xa56beb,'threadId':_0x141ba7},_0x2889dd=(await this[_0x37b0b0(0x1af)][_0x37b0b0(0x186)]('/universer-api/comment/unit/'+_0x268d8f+'/reply',{'body':_0x440ce9}))[_0x37b0b0(0x172)]['reply'];return{..._0x18a112,'id':_0x2889dd[_0x37b0b0(0x15d)],'dT':_0x14457b(+_0x2889dd[_0x37b0b0(0x15e)])[_0x37b0b0(0x19a)](_0x37b0b0(0x187)),'personId':_0x2889dd[_0x37b0b0(0x193)]};}else{const _0x5020e4={'memberId':_0x437d03,'unitId':_0x268d8f,'content':_0x1a54a2,'mention':_0xa56beb},_0x2e81b4=await this[_0x37b0b0(0x1af)]['post'](_0x37b0b0(0x14b)+_0x268d8f+_0x37b0b0(0x1a4),{'body':_0x5020e4});return X(_0x2e81b4[_0x37b0b0(0x172)][_0x37b0b0(0x18b)],_0x18a112);}}async[_0x3c63ed(0x16f)](_0x249932){const _0x5f4b14=_0x3c63ed;var _0x3ec8a5,_0x4e2358;const {text:_0x197fc4,unitId:_0x7f71fa}=_0x249932,_0x23abbe=(_0x4e2358=(_0x3ec8a5=_0x197fc4[_0x5f4b14(0x176)])==null?void 0x0:_0x3ec8a5[_0x5f4b14(0x175)](_0x444088=>_0x444088[_0x5f4b14(0x1a3)]===_0x4c58ab[_0x5f4b14(0x155)])[_0x5f4b14(0x194)](_0x367d9b=>_0x367d9b[_0x5f4b14(0x1a0)]))!=null?_0x4e2358:[],_0x4cbbb6=JSON[_0x5f4b14(0x16d)](_0x197fc4),_0x1aa320=_0x249932[_0x5f4b14(0x14f)],_0x46b9da=_0x249932['id'],_0x35c560={'memberId':(await this[_0x5f4b14(0x154)][_0x5f4b14(0x179)](_0x7f71fa))[_0x5f4b14(0x1ae)](),'unitId':_0x7f71fa,'threadId':_0x1aa320,'mention':_0x23abbe,'content':_0x4cbbb6,'replyId':_0x46b9da},_0x4f1b47=await this[_0x5f4b14(0x1af)][_0x5f4b14(0x186)](_0x5f4b14(0x14b)+_0x7f71fa+_0x5f4b14(0x198),{'body':_0x35c560});return!_0x4f1b47['body'][_0x5f4b14(0x199)]||_0x4f1b47[_0x5f4b14(0x172)][_0x5f4b14(0x199)][_0x5f4b14(0x182)]===0x1;}async[_0x3c63ed(0x191)](_0x392ce4){const _0x27730d=_0x3c63ed,{unitId:_0x2867dd}=_0x392ce4,_0x1d2b9d=_0x392ce4[_0x27730d(0x14f)],_0x4f08c0={'memberId':this['_userService'][_0x27730d(0x14e)]()[_0x27730d(0x192)],'unitId':_0x2867dd,'threadId':_0x1d2b9d,'solved':_0x392ce4[_0x27730d(0x14a)]?I[_0x27730d(0x189)]:I[_0x27730d(0x1a7)]},_0x5dd1d7=await this['_httpService'][_0x27730d(0x186)](_0x27730d(0x14b)+_0x2867dd+_0x27730d(0x15a),{'body':_0x4f08c0});return!_0x5dd1d7[_0x27730d(0x172)][_0x27730d(0x199)]||_0x5dd1d7[_0x27730d(0x172)][_0x27730d(0x199)][_0x27730d(0x182)]===0x1;}async[_0x3c63ed(0x1ad)](_0x94fe1e,_0x2ef399,_0x20550b,_0x294995){const _0xd1603e=_0x3c63ed,_0x12c4e1={'memberId':(await this['_sessionService'][_0xd1603e(0x179)](_0x94fe1e))[_0xd1603e(0x1ae)](),'threadId':_0x20550b,'replyId':_0x294995,'unitId':_0x94fe1e},_0x5481e4=await this[_0xd1603e(0x1af)][_0xd1603e(0x186)]('/universer-api/comment/unit/'+_0x94fe1e+_0xd1603e(0x161),{'body':_0x12c4e1});return!_0x5481e4['body'][_0xd1603e(0x199)]||_0x5481e4['body'][_0xd1603e(0x199)]['code']===0x1;}async['listComments'](_0x321d5c,_0x4b8858,_0xac451c){const _0x2c0667=_0x3c63ed,_0x25052d={'unitId':_0x321d5c,'threadId':_0xac451c},_0x1e52a4=await this[_0x2c0667(0x1af)]['post'](_0x2c0667(0x14b)+_0x321d5c+_0x2c0667(0x188),{'body':_0x25052d}),_0x56a9dd=_0xac451c['map'](_0x3a1138=>ee(_0x1e52a4['body'][_0x2c0667(0x168)][_0x3a1138],_0x321d5c,_0x4b8858))[_0x2c0667(0x175)](Boolean);return Object[_0x2c0667(0x1b1)](_0x1e52a4[_0x2c0667(0x172)][_0x2c0667(0x178)])[_0x2c0667(0x16c)](_0x1fc7b3=>{const _0x439cf7=_0x2c0667;this[_0x439cf7(0x17d)][_0x439cf7(0x1a1)](_0x1fc7b3);}),_0x56a9dd;}[_0x3c63ed(0x17c)](_0x537f4b){const _0x21bf08=_0x3c63ed;return{'id':_0x537f4b['id'],'threadId':_0x537f4b[_0x21bf08(0x14f)],'ref':_0x537f4b[_0x21bf08(0x152)]};}};f=Q([_(0x0,_0x425bc5(_0x304e86)),_(0x1,_0x425bc5(_0x317ae9)),_(0x2,_0x425bc5(_0x30fdc0)),_(0x3,_0x425bc5(_0x344a66))],f);var re=Object[_0x3c63ed(0x19f)],te=(_0x34183c,_0x4e4908,_0x4231c3,_0x40a9a0)=>{const _0x5da59a=_0x3c63ed;for(var _0x235181=_0x40a9a0>0x1?void 0x0:_0x40a9a0?re(_0x4e4908,_0x4231c3):_0x4e4908,_0x237e65=_0x34183c[_0x5da59a(0x183)]-0x1,_0x2f0892;_0x237e65>=0x0;_0x237e65--)(_0x2f0892=_0x34183c[_0x237e65])&&(_0x235181=_0x2f0892(_0x235181)||_0x235181);return _0x235181;},N=(_0x31157a,_0x51530e)=>(_0x543ed6,_0x1076f5)=>_0x51530e(_0x543ed6,_0x1076f5,_0x31157a);let g=class extends _0x2716e8{constructor(_0x2cd2c9,_0x51b281){const _0x365d70=_0x3c63ed;super(),this[_0x365d70(0x19e)]=_0x2cd2c9,this[_0x365d70(0x153)]=_0x51b281,this[_0x365d70(0x16e)]();}[_0x3c63ed(0x16e)](){const _0x2e4853=_0x3c63ed;this[_0x2e4853(0x19e)][_0x2e4853(0x190)]=this[_0x2e4853(0x153)],this['_threadCommentDataSourceService'][_0x2e4853(0x160)]=!0x1;}};g=te([N(0x0,_0x581906),N(0x1,_0x425bc5(f))],g);var se=Object[_0x3c63ed(0x15f)],oe=Object[_0x3c63ed(0x19f)],ne=(_0x479751,_0x4511e8,_0xd8d38)=>_0x4511e8 in _0x479751?se(_0x479751,_0x4511e8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd8d38}):_0x479751[_0x4511e8]=_0xd8d38,ie=(_0x5b84ea,_0x10579c,_0x4e461a,_0x1ea4d7)=>{const _0x44fd1d=_0x3c63ed;for(var _0x496f45=_0x1ea4d7>0x1?void 0x0:_0x1ea4d7?oe(_0x10579c,_0x4e461a):_0x10579c,_0x50cf11=_0x5b84ea[_0x44fd1d(0x183)]-0x1,_0x132741;_0x50cf11>=0x0;_0x50cf11--)(_0x132741=_0x5b84ea[_0x50cf11])&&(_0x496f45=_0x132741(_0x496f45)||_0x496f45);return _0x496f45;},w=(_0xcff464,_0x3f2ac1)=>(_0x1c76e7,_0x4831f0)=>_0x3f2ac1(_0x1c76e7,_0x4831f0,_0xcff464),$=(_0x26f3f0,_0x38520f,_0x2a7ef9)=>ne(_0x26f3f0,typeof _0x38520f!=_0x3c63ed(0x19d)?_0x38520f+'':_0x38520f,_0x2a7ef9);let b=class extends _0x417ad6{constructor(_0x15f88f=M,_0x160114,_0x298029){const _0x11e597=_0x3c63ed;super(),this[_0x11e597(0x157)]=_0x15f88f,this[_0x11e597(0x15c)]=_0x160114,this[_0x11e597(0x16a)]=_0x298029;const {..._0x35d6f0}=_0x4aed61({},M,this['_config']);this[_0x11e597(0x16a)][_0x11e597(0x1ab)](z,_0x35d6f0);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x5dac36=>{const _0x153554=_0x686a;this[_0x153554(0x15c)]['add'](_0x5dac36);});}[_0x3c63ed(0x17f)](){const _0x5ef403=_0x3c63ed;this[_0x5ef403(0x15c)]['get'](g),this['_injector'][_0x5ef403(0x171)](S);}};$(b,_0x3c63ed(0x17b),W),$(b,_0x3c63ed(0x165),_0xe14618[_0x3c63ed(0x197)]),b=ie([_0x440a04(_0x21fc1f,_0x1f70fd,_0x1df8ef),w(0x1,_0x425bc5(_0x344a66)),w(0x2,_0x5bacb3)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x12b56c=_0x10d6;function _0x10d6(_0x3ec3a3,_0x389d62){const _0xce34ea=_0xce34();return _0x10d6=function(_0x10d6db,_0x593616){_0x10d6db=_0x10d6db-0x198;let _0x481542=_0xce34ea[_0x10d6db];return _0x481542;},_0x10d6(_0x3ec3a3,_0x389d62);}(function(_0x215dac,_0x3e3d42){const _0x100892=_0x10d6,_0x359c04=_0x215dac();while(!![]){try{const _0x3b64df=-parseInt(_0x100892(0x1e4))/0x1*(parseInt(_0x100892(0x1dd))/0x2)+-parseInt(_0x100892(0x1ba))/0x3+-parseInt(_0x100892(0x1a4))/0x4+parseInt(_0x100892(0x1f0))/0x5+parseInt(_0x100892(0x1d0))/0x6*(-parseInt(_0x100892(0x1f2))/0x7)+-parseInt(_0x100892(0x1b7))/0x8*(parseInt(_0x100892(0x1c0))/0x9)+-parseInt(_0x100892(0x1d7))/0xa*(-parseInt(_0x100892(0x1c1))/0xb);if(_0x3b64df===_0x3e3d42)break;else _0x359c04['push'](_0x359c04['shift']());}catch(_0x507c53){_0x359c04['push'](_0x359c04['shift']());}}}(_0xce34,0x2fda4));import{CommentService as _0x4961eb,CollaborationSessionService as _0x29ed8b,UniverCollaborationClientPlugin as _0x34c6e6}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x109dd0}from'@univerjs-pro/license';import{dayjs as _0x471f42,UserManagerService as _0x49fe3b,Inject as _0x39b796,Injector as _0x424bef,Disposable as _0x2461f3,CustomRangeType as _0x3f7c3c,UniverInstanceType as _0x823561,DependentOn as _0x21a168,IConfigService as _0x560613,Plugin as _0x3a42a6,merge as _0x720492}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3dd3a8}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xd98492,IThreadCommentDataSourceService as _0x91912c}from'@univerjs/thread-comment';import{bufferTime as _0x212897}from'rxjs';import{HTTPService as _0x397a0a}from'@univerjs/network';const W=_0x12b56c(0x1c9);var I=(_0x1d96a6=>(_0x1d96a6[_0x1d96a6['OpenOrReOpen']=0x0]=_0x12b56c(0x1e9),_0x1d96a6[_0x1d96a6[_0x12b56c(0x1a8)]=0x1]=_0x12b56c(0x1a8),_0x1d96a6[_0x1d96a6['UNRECOGNIZED']=-0x1]=_0x12b56c(0x1c6),_0x1d96a6))(I||{}),v=(_0x2eb9eb=>(_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x19c)]=0x0]=_0x12b56c(0x19c),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1c5)]=0x1]=_0x12b56c(0x1c5),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1e6)]=0x2]=_0x12b56c(0x1e6),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1c7)]=0x3]=_0x12b56c(0x1c7),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1dc)]=0x4]=_0x12b56c(0x1dc),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1d8)]=0x5]=_0x12b56c(0x1d8),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1c6)]=-0x1]=_0x12b56c(0x1c6),_0x2eb9eb))(v||{});const D=_0x59c67d=>_0x471f42(new Date(+_0x59c67d))[_0x12b56c(0x1b9)](_0x12b56c(0x1ea)),B=async(_0x28c461,_0x2fda40)=>{const _0x4426f8=_0x12b56c,_0x95603c=_0x28c461['get'](_0x49fe3b),_0x36971b=_0x28c461[_0x4426f8(0x1b3)](_0x397a0a);_0x2fda40['forEach'](_0x134d6b=>{const _0x4b5b00=_0x4426f8;_0x95603c[_0x4b5b00(0x1af)](_0x134d6b)&&_0x2fda40[_0x4b5b00(0x1d5)](_0x134d6b);}),_0x2fda40[_0x4426f8(0x1f6)]&&(await _0x36971b[_0x4426f8(0x1b3)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2fda40]}}))[_0x4426f8(0x1b8)][_0x4426f8(0x1aa)][_0x4426f8(0x1d1)](_0x242a8d=>{const _0x39c586=_0x4426f8;_0x242a8d&&_0x95603c[_0x39c586(0x1e8)](_0x242a8d);});};var K=Object[_0x12b56c(0x1e1)],V=(_0x49dddd,_0x2f2948,_0x1f4f6d,_0x4d5bbc)=>{const _0x397ab9=_0x12b56c;for(var _0x1de8a2=_0x4d5bbc>0x1?void 0x0:_0x4d5bbc?K(_0x2f2948,_0x1f4f6d):_0x2f2948,_0x15a2d9=_0x49dddd[_0x397ab9(0x1f5)]-0x1,_0x145d0a;_0x15a2d9>=0x0;_0x15a2d9--)(_0x145d0a=_0x49dddd[_0x15a2d9])&&(_0x1de8a2=_0x145d0a(_0x1de8a2)||_0x1de8a2);return _0x1de8a2;},p=(_0x1c2670,_0x51ff8a)=>(_0x16d015,_0x31b19e)=>_0x51ff8a(_0x16d015,_0x31b19e,_0x1c2670);let S=class extends _0x2461f3{constructor(_0x37664f,_0x3415c1,_0x35fd08,_0x3135cd){const _0x57ca06=_0x12b56c;super(),this['_commentService']=_0x37664f,this[_0x57ca06(0x1e3)]=_0x3415c1,this[_0x57ca06(0x1ee)]=_0x35fd08,this[_0x57ca06(0x1ed)]=_0x3135cd,this[_0x57ca06(0x1c2)](),this['_initUserSync']();}['_initUserSync'](){const _0xd74971=_0x12b56c;this[_0xd74971(0x1f3)](this[_0xd74971(0x1e3)][_0xd74971(0x1f1)][_0xd74971(0x19f)](_0x212897(0x10))[_0xd74971(0x1c8)](_0x299557=>{const _0x539ecf=_0xd74971,_0x56e015=new Set();_0x299557[_0x539ecf(0x1d1)](_0x5509a8=>{const _0x37ad16=_0x539ecf;switch(_0x5509a8['type']){case _0x37ad16(0x1cf):{const _0x458f6c=_0x5509a8['payload'][_0x37ad16(0x1bd)];_0x56e015[_0x37ad16(0x1cf)](_0x458f6c);break;}}}),B(this[_0x539ecf(0x1ed)],_0x56e015);}));}[_0x12b56c(0x1c2)](){const _0xb948cb=_0x12b56c;this[_0xb948cb(0x1f3)](this['_commentService'][_0xb948cb(0x1f1)][_0xb948cb(0x1c8)](async _0x5338d9=>{const _0x2b6797=_0xb948cb;var _0x3102cd,_0x591ee7,_0x2ed96c,_0x189afb;const _0x37ba69=(_0x3102cd=this[_0x2b6797(0x1e3)][_0x2b6797(0x198)](_0x5338d9[_0x2b6797(0x1a5)])[_0x2b6797(0x1cb)](_0x44decd=>_0x44decd[_0x2b6797(0x19a)]===_0x5338d9[_0x2b6797(0x19a)]))==null?void 0x0:_0x3102cd[_0x2b6797(0x1a0)];if(!_0x37ba69)return;const {unitId:_0x474aba,subUnitId:_0x58e080}=_0x37ba69;switch(_0x5338d9[_0x2b6797(0x1f9)]&&this['_userService'][_0x2b6797(0x1e8)](_0x5338d9[_0x2b6797(0x1f9)]),_0x5338d9[_0x2b6797(0x19e)]){case v[_0x2b6797(0x1c5)]:break;case v[_0x2b6797(0x1e6)]:{this[_0x2b6797(0x1e3)][_0x2b6797(0x1f7)](_0x474aba,_0x58e080,{'unitId':_0x474aba,'subUnitId':_0x58e080,'ref':'','id':_0x5338d9[_0x2b6797(0x1da)],'dT':D(+_0x5338d9[_0x2b6797(0x1ec)]),'threadId':_0x5338d9[_0x2b6797(0x19a)],'personId':(_0x2ed96c=(_0x591ee7=_0x5338d9[_0x2b6797(0x1f9)])==null?void 0x0:_0x591ee7[_0x2b6797(0x1b5)])!=null?_0x2ed96c:_0x5338d9[_0x2b6797(0x1ce)],'text':JSON['parse'](_0x5338d9['content']),'parentId':_0x37ba69['id']});break;}case v['Delete']:{const _0x3cb262=this[_0x2b6797(0x1e3)][_0x2b6797(0x1df)](_0x474aba,_0x58e080,_0x5338d9[_0x2b6797(0x1da)]);_0x3cb262&&_0x3cb262[_0x2b6797(0x1e5)]&&this['_threadCommentModel'][_0x2b6797(0x1a1)](_0x474aba,_0x58e080,_0x5338d9[_0x2b6797(0x1da)]);break;}case v[_0x2b6797(0x1c7)]:{this['_threadCommentModel'][_0x2b6797(0x1b1)](_0x474aba,_0x58e080,{'commentId':_0x5338d9['replyId'],'text':JSON[_0x2b6797(0x1ab)](_0x5338d9[_0x2b6797(0x1de)])});break;}case v[_0x2b6797(0x1d8)]:{const _0x16464f=(_0x189afb=this[_0x2b6797(0x1e3)][_0x2b6797(0x198)](_0x5338d9[_0x2b6797(0x1a5)])[_0x2b6797(0x1cb)](_0x361be3=>_0x361be3['threadId']===_0x5338d9[_0x2b6797(0x19a)]))==null?void 0x0:_0x189afb[_0x2b6797(0x1a0)];_0x16464f&&this[_0x2b6797(0x1e3)][_0x2b6797(0x1e7)](_0x474aba,_0x58e080,_0x16464f['id'],_0x5338d9['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x39b796(_0x4961eb)),p(0x1,_0x39b796(_0xd98492)),p(0x2,_0x39b796(_0x49fe3b)),p(0x3,_0x39b796(_0x424bef))],S);const z=_0x12b56c(0x1ef),M={};var k=Object[_0x12b56c(0x1e1)],Q=(_0x5d2e38,_0x2770b6,_0x4ed512,_0x4829a2)=>{const _0x5765dc=_0x12b56c;for(var _0x3f8544=_0x4829a2>0x1?void 0x0:_0x4829a2?k(_0x2770b6,_0x4ed512):_0x2770b6,_0x58b16a=_0x5d2e38[_0x5765dc(0x1f5)]-0x1,_0x449da5;_0x58b16a>=0x0;_0x58b16a--)(_0x449da5=_0x5d2e38[_0x58b16a])&&(_0x3f8544=_0x449da5(_0x3f8544)||_0x3f8544);return _0x3f8544;},_=(_0x499741,_0x242072)=>(_0x1250f3,_0x4e5125)=>_0x242072(_0x1250f3,_0x4e5125,_0x499741);function X(_0xcb7f20,_0x2c6057){const _0x397d31=_0x12b56c,_0x5b0c32=_0xcb7f20['replies'][0x0];return{..._0x2c6057,'id':_0x5b0c32['replyId'],'resolved':_0xcb7f20[_0x397d31(0x1bc)]===0x1,'dT':D(_0x5b0c32[_0x397d31(0x1ec)]),'personId':_0x5b0c32[_0x397d31(0x1ce)],'threadId':_0x5b0c32[_0x397d31(0x19a)]};}function ee(_0x494b40,_0x57abb2,_0x404687){const _0x42a50e=_0x12b56c;var _0x206ca9,_0x238f14;if(((_0x238f14=(_0x206ca9=_0x494b40==null?void 0x0:_0x494b40[_0x42a50e(0x199)])==null?void 0x0:_0x206ca9['length'])!=null?_0x238f14:0x0)>0x0){const _0x5d06ff=(_0x4b9736,_0x580b0b)=>({'id':_0x4b9736[_0x42a50e(0x1da)],'threadId':_0x4b9736[_0x42a50e(0x19a)],'dT':D(_0x4b9736['createTimestamp']),'personId':_0x4b9736[_0x42a50e(0x1ce)],'resolved':_0x494b40[_0x42a50e(0x1bc)]===I[_0x42a50e(0x1a8)],'unitId':_0x57abb2,'subUnitId':_0x404687,'text':JSON[_0x42a50e(0x1ab)](_0x4b9736[_0x42a50e(0x1de)]),'parentId':_0x580b0b}),_0x214db7=_0x5d06ff(_0x494b40[_0x42a50e(0x199)][0x0]);return{..._0x214db7,'children':_0x494b40[_0x42a50e(0x199)]['slice'](0x1)[_0x42a50e(0x1ae)](_0x5ad52e=>_0x5d06ff(_0x5ad52e,_0x214db7['id']))};}return null;}let f=class{constructor(_0x5274cf,_0x30f7e5,_0x20a447,_0x406063){const _0x2a4dc7=_0x12b56c;this[_0x2a4dc7(0x1f8)]=_0x5274cf,this['_userService']=_0x30f7e5,this[_0x2a4dc7(0x1f4)]=_0x20a447,this[_0x2a4dc7(0x1ed)]=_0x406063;}async['addComment'](_0x1c0eac){const _0x4f63a9=_0x12b56c;var _0x26aeb3,_0x2c362f;const {parentId:_0x2c5e69,unitId:_0x5c1e49,text:_0x36ec8e,threadId:_0x5bd0aa}=_0x1c0eac,_0x110a9c=(_0x2c362f=(_0x26aeb3=_0x36ec8e[_0x4f63a9(0x19b)])==null?void 0x0:_0x26aeb3[_0x4f63a9(0x1b2)](_0x2fd52c=>_0x2fd52c[_0x4f63a9(0x1e2)]===_0x3f7c3c['COMMENT'])['map'](_0xad4890=>_0xad4890[_0x4f63a9(0x1db)]))!=null?_0x2c362f:[],_0x52b941=JSON[_0x4f63a9(0x1c4)](_0x36ec8e),_0x1a8f8b=(await this[_0x4f63a9(0x1f4)]['requireSession'](_0x5c1e49))[_0x4f63a9(0x1eb)]();if(_0x2c5e69){const _0x419575={'memberId':_0x1a8f8b,'unitId':_0x5c1e49,'content':_0x52b941,'mention':_0x110a9c,'threadId':_0x5bd0aa},_0x5a1d8f=(await this[_0x4f63a9(0x1f8)][_0x4f63a9(0x1bb)](_0x4f63a9(0x1d4)+_0x5c1e49+'/reply',{'body':_0x419575}))[_0x4f63a9(0x1b8)][_0x4f63a9(0x1b4)];return{..._0x1c0eac,'id':_0x5a1d8f[_0x4f63a9(0x1da)],'dT':_0x471f42(+_0x5a1d8f[_0x4f63a9(0x1ec)])[_0x4f63a9(0x1b9)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5a1d8f[_0x4f63a9(0x1ce)]};}else{const _0xc58149={'memberId':_0x1a8f8b,'unitId':_0x5c1e49,'content':_0x52b941,'mention':_0x110a9c},_0x357b2c=await this['_httpService'][_0x4f63a9(0x1bb)](_0x4f63a9(0x1d4)+_0x5c1e49+_0x4f63a9(0x1d6),{'body':_0xc58149});return X(_0x357b2c[_0x4f63a9(0x1b8)][_0x4f63a9(0x1a3)],_0x1c0eac);}}async['updateComment'](_0x1dc244){const _0x13dac0=_0x12b56c;var _0xf84e6a,_0x46404c;const {text:_0x2c6bea,unitId:_0x273e79}=_0x1dc244,_0x52252f=(_0x46404c=(_0xf84e6a=_0x2c6bea[_0x13dac0(0x19b)])==null?void 0x0:_0xf84e6a[_0x13dac0(0x1b2)](_0x485391=>_0x485391[_0x13dac0(0x1e2)]===_0x3f7c3c['COMMENT'])[_0x13dac0(0x1ae)](_0x36e49f=>_0x36e49f[_0x13dac0(0x1db)]))!=null?_0x46404c:[],_0x4ef4be=JSON[_0x13dac0(0x1c4)](_0x2c6bea),_0x57cd05=_0x1dc244[_0x13dac0(0x19a)],_0x3a1684=_0x1dc244['id'],_0x36cb59={'memberId':(await this[_0x13dac0(0x1f4)][_0x13dac0(0x1d3)](_0x273e79))[_0x13dac0(0x1eb)](),'unitId':_0x273e79,'threadId':_0x57cd05,'mention':_0x52252f,'content':_0x4ef4be,'replyId':_0x3a1684},_0x562e3c=await this[_0x13dac0(0x1f8)][_0x13dac0(0x1bb)](_0x13dac0(0x1d4)+_0x273e79+'/edit',{'body':_0x36cb59});return!_0x562e3c[_0x13dac0(0x1b8)][_0x13dac0(0x1bf)]||_0x562e3c[_0x13dac0(0x1b8)]['error'][_0x13dac0(0x1c3)]===0x1;}async[_0x12b56c(0x1e7)](_0x400644){const _0x3d0046=_0x12b56c,{unitId:_0x2e15c8}=_0x400644,_0x4be0ef=_0x400644['threadId'],_0x51070c={'memberId':this[_0x3d0046(0x1ee)][_0x3d0046(0x1d2)]()['userID'],'unitId':_0x2e15c8,'threadId':_0x4be0ef,'solved':_0x400644['resolved']?I[_0x3d0046(0x1a8)]:I[_0x3d0046(0x1e9)]},_0x1cabff=await this['_httpService'][_0x3d0046(0x1bb)]('/universer-api/comment/unit/'+_0x2e15c8+'/solved',{'body':_0x51070c});return!_0x1cabff[_0x3d0046(0x1b8)][_0x3d0046(0x1bf)]||_0x1cabff[_0x3d0046(0x1b8)][_0x3d0046(0x1bf)][_0x3d0046(0x1c3)]===0x1;}async['deleteComment'](_0x33f749,_0x4a8dd0,_0x3dc8d8,_0x7080){const _0x1edd4e=_0x12b56c,_0x35b9af={'memberId':(await this[_0x1edd4e(0x1f4)][_0x1edd4e(0x1d3)](_0x33f749))['getMemberID'](),'threadId':_0x3dc8d8,'replyId':_0x7080,'unitId':_0x33f749},_0x13a547=await this[_0x1edd4e(0x1f8)][_0x1edd4e(0x1bb)](_0x1edd4e(0x1d4)+_0x33f749+_0x1edd4e(0x1be),{'body':_0x35b9af});return!_0x13a547[_0x1edd4e(0x1b8)]['error']||_0x13a547[_0x1edd4e(0x1b8)]['error'][_0x1edd4e(0x1c3)]===0x1;}async[_0x12b56c(0x1cd)](_0x30a587,_0x2a0dd9,_0x29e4b1){const _0x345ca0=_0x12b56c,_0x14e0fb={'unitId':_0x30a587,'threadId':_0x29e4b1},_0x2edb5c=await this['_httpService'][_0x345ca0(0x1bb)](_0x345ca0(0x1d4)+_0x30a587+'/list',{'body':_0x14e0fb}),_0x9970c=_0x29e4b1[_0x345ca0(0x1ae)](_0x55961a=>ee(_0x2edb5c[_0x345ca0(0x1b8)]['comments'][_0x55961a],_0x30a587,_0x2a0dd9))['filter'](Boolean);return Object['values'](_0x2edb5c[_0x345ca0(0x1b8)][_0x345ca0(0x1aa)])['forEach'](_0x1d9cbf=>{const _0x32aa6c=_0x345ca0;this[_0x32aa6c(0x1ee)][_0x32aa6c(0x1e8)](_0x1d9cbf);}),_0x9970c;}[_0x12b56c(0x1cc)](_0x31306f){const _0x3f49c8=_0x12b56c;return{'id':_0x31306f['id'],'threadId':_0x31306f[_0x3f49c8(0x19a)],'ref':_0x31306f[_0x3f49c8(0x1ad)]};}};f=Q([_(0x0,_0x39b796(_0x397a0a)),_(0x1,_0x39b796(_0x49fe3b)),_(0x2,_0x39b796(_0x29ed8b)),_(0x3,_0x39b796(_0x424bef))],f);var re=Object[_0x12b56c(0x1e1)],te=(_0x195d00,_0x3804a4,_0x32fccf,_0x11799b)=>{const _0x1f94d9=_0x12b56c;for(var _0x247dde=_0x11799b>0x1?void 0x0:_0x11799b?re(_0x3804a4,_0x32fccf):_0x3804a4,_0xdaeddd=_0x195d00[_0x1f94d9(0x1f5)]-0x1,_0x5f3674;_0xdaeddd>=0x0;_0xdaeddd--)(_0x5f3674=_0x195d00[_0xdaeddd])&&(_0x247dde=_0x5f3674(_0x247dde)||_0x247dde);return _0x247dde;},N=(_0x14a4e0,_0x366d79)=>(_0x56242a,_0x57b7b4)=>_0x366d79(_0x56242a,_0x57b7b4,_0x14a4e0);function _0xce34(){const _0x4ad063=['parentId','Reply','resolveComment','addUser','OpenOrReOpen','YYYY/MM/DD\x20HH:mm','getMemberID','createTimestamp','_injector','_userService','thread-comment-data-source.config','450885yUTaLy','commentUpdate$','175BvaMsD','disposeWithMe','_sessionService','length','size','addComment','_httpService','user','getUnit','replies','threadId','customRanges','Unknown','UNIVER_UNKNOWN','type','pipe','root','deleteComment','dataSource','comment','731232bYBsLZ','unitId','defineProperty','_config','Solved','symbol','users','parse','_threadCommentDataSource','ref','map','getUser','pluginName','updateComment','filter','get','reply','userID','_threadCommentDataSourceService','538904vtzFOm','body','format','1118307pxPZje','post','solved','personId','/delete','error','36zrKTBX','11hAPOoA','_init','code','stringify','Add','UNRECOGNIZED','Edit','subscribe','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initDataSource','find','saveCommentToSnapshot','listComments','userId','add','26454HqJiae','forEach','getCurrentUser','requireSession','/universer-api/comment/unit/','delete','/add','11385430nAKAIF','Solve','setConfig','replyId','rangeId','Delete','2HdmDbf','content','getComment','_configService','getOwnPropertyDescriptor','rangeType','_threadCommentModel','97462rCBWoe'];_0xce34=function(){return _0x4ad063;};return _0xce34();}let g=class extends _0x2461f3{constructor(_0x3c357d,_0x166fdb){const _0x5c8294=_0x12b56c;super(),this[_0x5c8294(0x1b6)]=_0x3c357d,this[_0x5c8294(0x1ac)]=_0x166fdb,this[_0x5c8294(0x1ca)]();}[_0x12b56c(0x1ca)](){const _0x50baa6=_0x12b56c;this[_0x50baa6(0x1b6)][_0x50baa6(0x1a2)]=this[_0x50baa6(0x1ac)],this[_0x50baa6(0x1b6)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x91912c),N(0x1,_0x39b796(f))],g);var se=Object[_0x12b56c(0x1a6)],oe=Object[_0x12b56c(0x1e1)],ne=(_0x37a0d9,_0xb50cc6,_0x7beabe)=>_0xb50cc6 in _0x37a0d9?se(_0x37a0d9,_0xb50cc6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x7beabe}):_0x37a0d9[_0xb50cc6]=_0x7beabe,ie=(_0x40b3a8,_0xc0a831,_0xace0f5,_0x73095e)=>{const _0x4fb9ce=_0x12b56c;for(var _0x16d76e=_0x73095e>0x1?void 0x0:_0x73095e?oe(_0xc0a831,_0xace0f5):_0xc0a831,_0x52c5a3=_0x40b3a8[_0x4fb9ce(0x1f5)]-0x1,_0x39d5d6;_0x52c5a3>=0x0;_0x52c5a3--)(_0x39d5d6=_0x40b3a8[_0x52c5a3])&&(_0x16d76e=_0x39d5d6(_0x16d76e)||_0x16d76e);return _0x16d76e;},w=(_0x369b6d,_0x4a6cb7)=>(_0x55b64e,_0x11fe55)=>_0x4a6cb7(_0x55b64e,_0x11fe55,_0x369b6d),$=(_0x5d71be,_0x93677f,_0x3dd09e)=>ne(_0x5d71be,typeof _0x93677f!=_0x12b56c(0x1a9)?_0x93677f+'':_0x93677f,_0x3dd09e);let b=class extends _0x3a42a6{constructor(_0x14eaa1=M,_0x57a787,_0x4237b3){const _0x3d2193=_0x12b56c;super(),this[_0x3d2193(0x1a7)]=_0x14eaa1,this[_0x3d2193(0x1ed)]=_0x57a787,this[_0x3d2193(0x1e0)]=_0x4237b3;const {..._0x2f5890}=_0x720492({},M,this[_0x3d2193(0x1a7)]);this['_configService'][_0x3d2193(0x1d9)](z,_0x2f5890);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x51bc9d=>{const _0x7b6389=_0x10d6;this[_0x7b6389(0x1ed)]['add'](_0x51bc9d);});}['onReady'](){const _0x456ea9=_0x12b56c;this[_0x456ea9(0x1ed)][_0x456ea9(0x1b3)](g),this[_0x456ea9(0x1ed)]['get'](S);}};$(b,_0x12b56c(0x1b0),W),$(b,'type',_0x823561[_0x12b56c(0x19d)]),b=ie([_0x21a168(_0x3dd3a8,_0x34c6e6,_0x109dd0),w(0x1,_0x39b796(_0x424bef)),w(0x2,_0x560613)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x3c63ed=_0x686a;(function(_0x404739,_0x224a0e){const _0x3b87b4=_0x686a,_0x239fda=_0x404739();while(!![]){try{const _0x14235d=parseInt(_0x3b87b4(0x18c))/0x1+parseInt(_0x3b87b4(0x177))/0x2*(-parseInt(_0x3b87b4(0x1a8))/0x3)+-parseInt(_0x3b87b4(0x19c))/0x4*(parseInt(_0x3b87b4(0x16b))/0x5)+parseInt(_0x3b87b4(0x166))/0x6+-parseInt(_0x3b87b4(0x181))/0x7*(parseInt(_0x3b87b4(0x158))/0x8)+-parseInt(_0x3b87b4(0x185))/0x9+parseInt(_0x3b87b4(0x167))/0xa;if(_0x14235d===_0x224a0e)break;else _0x239fda['push'](_0x239fda['shift']());}catch(_0x5a5390){_0x239fda['push'](_0x239fda['shift']());}}}(_0x3bff,0x58c59));import{CommentService as _0x1f5f6e,CollaborationSessionService as _0x30fdc0,UniverCollaborationClientPlugin as _0x1f70fd}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1df8ef}from'@univerjs-pro/license';import{dayjs as _0x14457b,UserManagerService as _0x317ae9,Inject as _0x425bc5,Injector as _0x344a66,Disposable as _0x2716e8,CustomRangeType as _0x4c58ab,UniverInstanceType as _0xe14618,DependentOn as _0x440a04,IConfigService as _0x5bacb3,Plugin as _0x417ad6,merge as _0x4aed61}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x21fc1f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x59fb27,IThreadCommentDataSourceService as _0x581906}from'@univerjs/thread-comment';import{bufferTime as _0x96ccfa}from'rxjs';import{HTTPService as _0x304e86}from'@univerjs/network';const W=_0x3c63ed(0x1aa);var I=(_0x2e779d=>(_0x2e779d[_0x2e779d[_0x3c63ed(0x1a7)]=0x0]=_0x3c63ed(0x1a7),_0x2e779d[_0x2e779d[_0x3c63ed(0x189)]=0x1]=_0x3c63ed(0x189),_0x2e779d[_0x2e779d[_0x3c63ed(0x19b)]=-0x1]=_0x3c63ed(0x19b),_0x2e779d))(I||{}),v=(_0x55c348=>(_0x55c348[_0x55c348[_0x3c63ed(0x1ac)]=0x0]=_0x3c63ed(0x1ac),_0x55c348[_0x55c348[_0x3c63ed(0x18e)]=0x1]=_0x3c63ed(0x18e),_0x55c348[_0x55c348[_0x3c63ed(0x151)]=0x2]=_0x3c63ed(0x151),_0x55c348[_0x55c348[_0x3c63ed(0x1b2)]=0x3]=_0x3c63ed(0x1b2),_0x55c348[_0x55c348['Delete']=0x4]='Delete',_0x55c348[_0x55c348['Solve']=0x5]=_0x3c63ed(0x196),_0x55c348[_0x55c348[_0x3c63ed(0x19b)]=-0x1]='UNRECOGNIZED',_0x55c348))(v||{});const D=_0x3fe9d5=>_0x14457b(new Date(+_0x3fe9d5))[_0x3c63ed(0x19a)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x1663fe,_0x58047a)=>{const _0x4cad74=_0x3c63ed,_0x572cc1=_0x1663fe[_0x4cad74(0x171)](_0x317ae9),_0x35d323=_0x1663fe[_0x4cad74(0x171)](_0x304e86);_0x58047a[_0x4cad74(0x16c)](_0x2f3979=>{_0x572cc1['getUser'](_0x2f3979)&&_0x58047a['delete'](_0x2f3979);}),_0x58047a['size']&&(await _0x35d323['get'](_0x4cad74(0x15b),{'params':{'userIDs':[..._0x58047a]}}))[_0x4cad74(0x172)]['users'][_0x4cad74(0x16c)](_0x5d1c9d=>{const _0x451b88=_0x4cad74;_0x5d1c9d&&_0x572cc1[_0x451b88(0x1a1)](_0x5d1c9d);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x451b27,_0x283e3c,_0x2793f8,_0x1b07cd)=>{const _0x58b18b=_0x3c63ed;for(var _0x6418b7=_0x1b07cd>0x1?void 0x0:_0x1b07cd?K(_0x283e3c,_0x2793f8):_0x283e3c,_0x14aaac=_0x451b27[_0x58b18b(0x183)]-0x1,_0x3c8ced;_0x14aaac>=0x0;_0x14aaac--)(_0x3c8ced=_0x451b27[_0x14aaac])&&(_0x6418b7=_0x3c8ced(_0x6418b7)||_0x6418b7);return _0x6418b7;},p=(_0x4f1aa2,_0x4012d1)=>(_0xa393cb,_0x26d387)=>_0x4012d1(_0xa393cb,_0x26d387,_0x4f1aa2);let S=class extends _0x2716e8{constructor(_0x23c5b7,_0x745ff8,_0x56678e,_0x128501){const _0xfa3853=_0x3c63ed;super(),this['_commentService']=_0x23c5b7,this[_0xfa3853(0x1a9)]=_0x745ff8,this[_0xfa3853(0x17d)]=_0x56678e,this[_0xfa3853(0x15c)]=_0x128501,this[_0xfa3853(0x14d)](),this[_0xfa3853(0x159)]();}[_0x3c63ed(0x159)](){const _0x5e4b01=_0x3c63ed;this['disposeWithMe'](this['_threadCommentModel'][_0x5e4b01(0x18a)][_0x5e4b01(0x18f)](_0x96ccfa(0x10))[_0x5e4b01(0x1a2)](_0x2682e5=>{const _0x480d90=_0x5e4b01,_0x32e5b3=new Set();_0x2682e5[_0x480d90(0x16c)](_0x3623e6=>{const _0x5bc62f=_0x480d90;switch(_0x3623e6[_0x5bc62f(0x165)]){case _0x5bc62f(0x164):{const _0x436779=_0x3623e6[_0x5bc62f(0x162)][_0x5bc62f(0x17e)];_0x32e5b3['add'](_0x436779);break;}}}),B(this[_0x480d90(0x15c)],_0x32e5b3);}));}[_0x3c63ed(0x14d)](){const _0xae3974=_0x3c63ed;this[_0xae3974(0x17a)](this[_0xae3974(0x1a6)][_0xae3974(0x18a)][_0xae3974(0x1a2)](async _0x5cc814=>{const _0x222feb=_0xae3974;var _0x3e32e0,_0x44e89d,_0x1eaf2e,_0x3f3b6e;const _0x2afde6=(_0x3e32e0=this[_0x222feb(0x1a9)][_0x222feb(0x195)](_0x5cc814[_0x222feb(0x173)])[_0x222feb(0x14c)](_0x475902=>_0x475902[_0x222feb(0x14f)]===_0x5cc814['threadId']))==null?void 0x0:_0x3e32e0[_0x222feb(0x180)];if(!_0x2afde6)return;const {unitId:_0x36011c,subUnitId:_0xa120c9}=_0x2afde6;switch(_0x5cc814[_0x222feb(0x150)]&&this[_0x222feb(0x17d)][_0x222feb(0x1a1)](_0x5cc814[_0x222feb(0x150)]),_0x5cc814[_0x222feb(0x165)]){case v['Add']:break;case v[_0x222feb(0x151)]:{this[_0x222feb(0x1a9)][_0x222feb(0x156)](_0x36011c,_0xa120c9,{'unitId':_0x36011c,'subUnitId':_0xa120c9,'ref':'','id':_0x5cc814[_0x222feb(0x15d)],'dT':D(+_0x5cc814[_0x222feb(0x15e)]),'threadId':_0x5cc814['threadId'],'personId':(_0x1eaf2e=(_0x44e89d=_0x5cc814[_0x222feb(0x150)])==null?void 0x0:_0x44e89d[_0x222feb(0x192)])!=null?_0x1eaf2e:_0x5cc814[_0x222feb(0x193)],'text':JSON['parse'](_0x5cc814[_0x222feb(0x1a5)]),'parentId':_0x2afde6['id']});break;}case v[_0x222feb(0x184)]:{const _0x3ebf55=this[_0x222feb(0x1a9)]['getComment'](_0x36011c,_0xa120c9,_0x5cc814[_0x222feb(0x15d)]);_0x3ebf55&&_0x3ebf55[_0x222feb(0x18d)]&&this[_0x222feb(0x1a9)][_0x222feb(0x1ad)](_0x36011c,_0xa120c9,_0x5cc814[_0x222feb(0x15d)]);break;}case v[_0x222feb(0x1b2)]:{this[_0x222feb(0x1a9)][_0x222feb(0x16f)](_0x36011c,_0xa120c9,{'commentId':_0x5cc814[_0x222feb(0x15d)],'text':JSON['parse'](_0x5cc814[_0x222feb(0x1a5)])});break;}case v[_0x222feb(0x196)]:{const _0x426ab9=(_0x3f3b6e=this['_threadCommentModel'][_0x222feb(0x195)](_0x5cc814[_0x222feb(0x173)])[_0x222feb(0x14c)](_0x5b4af8=>_0x5b4af8['threadId']===_0x5cc814['threadId']))==null?void 0x0:_0x3f3b6e[_0x222feb(0x180)];_0x426ab9&&this[_0x222feb(0x1a9)][_0x222feb(0x191)](_0x36011c,_0xa120c9,_0x426ab9['id'],_0x5cc814['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x425bc5(_0x1f5f6e)),p(0x1,_0x425bc5(_0x59fb27)),p(0x2,_0x425bc5(_0x317ae9)),p(0x3,_0x425bc5(_0x344a66))],S);const z=_0x3c63ed(0x174),M={};function _0x3bff(){const _0x355f1=['root','7xabFUC','code','length','Delete','6131556mzMgCx','post','YYYY/MM/DD\x20HH:mm','/list','Solved','commentUpdate$','comment','115822UkcxlL','parentId','Add','pipe','dataSource','resolveComment','userID','userId','map','getUnit','Solve','UNIVER_UNKNOWN','/edit','error','format','UNRECOGNIZED','2208904qfMuHp','symbol','_threadCommentDataSourceService','getOwnPropertyDescriptor','rangeId','addUser','subscribe','rangeType','/add','content','_commentService','OpenOrReOpen','98922IlwSnS','_threadCommentModel','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','setConfig','Unknown','deleteComment','getMemberID','_httpService','solved','values','Edit','resolved','/universer-api/comment/unit/','find','_init','getCurrentUser','threadId','user','Reply','ref','_threadCommentDataSource','_sessionService','COMMENT','addComment','_config','4588808VLXIcy','_initUserSync','/solved','/universer-api/user/list','_injector','replyId','createTimestamp','defineProperty','syncUpdateMutationToColla','/delete','payload','slice','add','type','1837644xLbrNr','24740520IWwCBE','comments','parse','_configService','5gdDrDg','forEach','stringify','_initDataSource','updateComment','replies','get','body','unitId','thread-comment-data-source.config','filter','customRanges','44WDSRZx','users','requireSession','disposeWithMe','pluginName','saveCommentToSnapshot','_userService','personId','onReady'];_0x3bff=function(){return _0x355f1;};return _0x3bff();}var k=Object[_0x3c63ed(0x19f)],Q=(_0x2a53df,_0x46ffd6,_0x3eaaf3,_0x6fd965)=>{const _0x5ef11b=_0x3c63ed;for(var _0x41d4fc=_0x6fd965>0x1?void 0x0:_0x6fd965?k(_0x46ffd6,_0x3eaaf3):_0x46ffd6,_0x2b3a8a=_0x2a53df[_0x5ef11b(0x183)]-0x1,_0xdcbdb3;_0x2b3a8a>=0x0;_0x2b3a8a--)(_0xdcbdb3=_0x2a53df[_0x2b3a8a])&&(_0x41d4fc=_0xdcbdb3(_0x41d4fc)||_0x41d4fc);return _0x41d4fc;},_=(_0x307121,_0x2a147f)=>(_0x3b7da5,_0x296027)=>_0x2a147f(_0x3b7da5,_0x296027,_0x307121);function X(_0x24292c,_0x1654b7){const _0x52c8bd=_0x3c63ed,_0x1abff8=_0x24292c['replies'][0x0];return{..._0x1654b7,'id':_0x1abff8[_0x52c8bd(0x15d)],'resolved':_0x24292c[_0x52c8bd(0x1b0)]===0x1,'dT':D(_0x1abff8[_0x52c8bd(0x15e)]),'personId':_0x1abff8['userId'],'threadId':_0x1abff8[_0x52c8bd(0x14f)]};}function _0x686a(_0x5c6a6e,_0x288393){const _0x3bff5c=_0x3bff();return _0x686a=function(_0x686a8c,_0x412f48){_0x686a8c=_0x686a8c-0x14a;let _0x5f3735=_0x3bff5c[_0x686a8c];return _0x5f3735;},_0x686a(_0x5c6a6e,_0x288393);}function ee(_0x3305ff,_0x51a84d,_0x50c7b9){const _0x52f9b2=_0x3c63ed;var _0x477239,_0x4c047a;if(((_0x4c047a=(_0x477239=_0x3305ff==null?void 0x0:_0x3305ff['replies'])==null?void 0x0:_0x477239[_0x52f9b2(0x183)])!=null?_0x4c047a:0x0)>0x0){const _0x100400=(_0x20adbf,_0x20531b)=>({'id':_0x20adbf['replyId'],'threadId':_0x20adbf[_0x52f9b2(0x14f)],'dT':D(_0x20adbf[_0x52f9b2(0x15e)]),'personId':_0x20adbf[_0x52f9b2(0x193)],'resolved':_0x3305ff[_0x52f9b2(0x1b0)]===I['Solved'],'unitId':_0x51a84d,'subUnitId':_0x50c7b9,'text':JSON[_0x52f9b2(0x169)](_0x20adbf[_0x52f9b2(0x1a5)]),'parentId':_0x20531b}),_0xdd1115=_0x100400(_0x3305ff[_0x52f9b2(0x170)][0x0]);return{..._0xdd1115,'children':_0x3305ff[_0x52f9b2(0x170)][_0x52f9b2(0x163)](0x1)[_0x52f9b2(0x194)](_0x332701=>_0x100400(_0x332701,_0xdd1115['id']))};}return null;}let f=class{constructor(_0x47b64e,_0x425db8,_0x1cffad,_0x49b19a){const _0x2422cb=_0x3c63ed;this['_httpService']=_0x47b64e,this['_userService']=_0x425db8,this[_0x2422cb(0x154)]=_0x1cffad,this[_0x2422cb(0x15c)]=_0x49b19a;}async['addComment'](_0x18a112){const _0x37b0b0=_0x3c63ed;var _0x4de9cd,_0x5cc8a4;const {parentId:_0x18c17b,unitId:_0x268d8f,text:_0x13845d,threadId:_0x141ba7}=_0x18a112,_0xa56beb=(_0x5cc8a4=(_0x4de9cd=_0x13845d['customRanges'])==null?void 0x0:_0x4de9cd[_0x37b0b0(0x175)](_0x3e5fcd=>_0x3e5fcd['rangeType']===_0x4c58ab[_0x37b0b0(0x155)])[_0x37b0b0(0x194)](_0x5eea5a=>_0x5eea5a[_0x37b0b0(0x1a0)]))!=null?_0x5cc8a4:[],_0x1a54a2=JSON[_0x37b0b0(0x16d)](_0x13845d),_0x437d03=(await this[_0x37b0b0(0x154)]['requireSession'](_0x268d8f))[_0x37b0b0(0x1ae)]();if(_0x18c17b){const _0x440ce9={'memberId':_0x437d03,'unitId':_0x268d8f,'content':_0x1a54a2,'mention':_0xa56beb,'threadId':_0x141ba7},_0x2889dd=(await this[_0x37b0b0(0x1af)][_0x37b0b0(0x186)]('/universer-api/comment/unit/'+_0x268d8f+'/reply',{'body':_0x440ce9}))[_0x37b0b0(0x172)]['reply'];return{..._0x18a112,'id':_0x2889dd[_0x37b0b0(0x15d)],'dT':_0x14457b(+_0x2889dd[_0x37b0b0(0x15e)])[_0x37b0b0(0x19a)](_0x37b0b0(0x187)),'personId':_0x2889dd[_0x37b0b0(0x193)]};}else{const _0x5020e4={'memberId':_0x437d03,'unitId':_0x268d8f,'content':_0x1a54a2,'mention':_0xa56beb},_0x2e81b4=await this[_0x37b0b0(0x1af)]['post'](_0x37b0b0(0x14b)+_0x268d8f+_0x37b0b0(0x1a4),{'body':_0x5020e4});return X(_0x2e81b4[_0x37b0b0(0x172)][_0x37b0b0(0x18b)],_0x18a112);}}async[_0x3c63ed(0x16f)](_0x249932){const _0x5f4b14=_0x3c63ed;var _0x3ec8a5,_0x4e2358;const {text:_0x197fc4,unitId:_0x7f71fa}=_0x249932,_0x23abbe=(_0x4e2358=(_0x3ec8a5=_0x197fc4[_0x5f4b14(0x176)])==null?void 0x0:_0x3ec8a5[_0x5f4b14(0x175)](_0x444088=>_0x444088[_0x5f4b14(0x1a3)]===_0x4c58ab[_0x5f4b14(0x155)])[_0x5f4b14(0x194)](_0x367d9b=>_0x367d9b[_0x5f4b14(0x1a0)]))!=null?_0x4e2358:[],_0x4cbbb6=JSON[_0x5f4b14(0x16d)](_0x197fc4),_0x1aa320=_0x249932[_0x5f4b14(0x14f)],_0x46b9da=_0x249932['id'],_0x35c560={'memberId':(await this[_0x5f4b14(0x154)][_0x5f4b14(0x179)](_0x7f71fa))[_0x5f4b14(0x1ae)](),'unitId':_0x7f71fa,'threadId':_0x1aa320,'mention':_0x23abbe,'content':_0x4cbbb6,'replyId':_0x46b9da},_0x4f1b47=await this[_0x5f4b14(0x1af)][_0x5f4b14(0x186)](_0x5f4b14(0x14b)+_0x7f71fa+_0x5f4b14(0x198),{'body':_0x35c560});return!_0x4f1b47['body'][_0x5f4b14(0x199)]||_0x4f1b47[_0x5f4b14(0x172)][_0x5f4b14(0x199)][_0x5f4b14(0x182)]===0x1;}async[_0x3c63ed(0x191)](_0x392ce4){const _0x27730d=_0x3c63ed,{unitId:_0x2867dd}=_0x392ce4,_0x1d2b9d=_0x392ce4[_0x27730d(0x14f)],_0x4f08c0={'memberId':this['_userService'][_0x27730d(0x14e)]()[_0x27730d(0x192)],'unitId':_0x2867dd,'threadId':_0x1d2b9d,'solved':_0x392ce4[_0x27730d(0x14a)]?I[_0x27730d(0x189)]:I[_0x27730d(0x1a7)]},_0x5dd1d7=await this['_httpService'][_0x27730d(0x186)](_0x27730d(0x14b)+_0x2867dd+_0x27730d(0x15a),{'body':_0x4f08c0});return!_0x5dd1d7[_0x27730d(0x172)][_0x27730d(0x199)]||_0x5dd1d7[_0x27730d(0x172)][_0x27730d(0x199)][_0x27730d(0x182)]===0x1;}async[_0x3c63ed(0x1ad)](_0x94fe1e,_0x2ef399,_0x20550b,_0x294995){const _0xd1603e=_0x3c63ed,_0x12c4e1={'memberId':(await this['_sessionService'][_0xd1603e(0x179)](_0x94fe1e))[_0xd1603e(0x1ae)](),'threadId':_0x20550b,'replyId':_0x294995,'unitId':_0x94fe1e},_0x5481e4=await this[_0xd1603e(0x1af)][_0xd1603e(0x186)]('/universer-api/comment/unit/'+_0x94fe1e+_0xd1603e(0x161),{'body':_0x12c4e1});return!_0x5481e4['body'][_0xd1603e(0x199)]||_0x5481e4['body'][_0xd1603e(0x199)]['code']===0x1;}async['listComments'](_0x321d5c,_0x4b8858,_0xac451c){const _0x2c0667=_0x3c63ed,_0x25052d={'unitId':_0x321d5c,'threadId':_0xac451c},_0x1e52a4=await this[_0x2c0667(0x1af)]['post'](_0x2c0667(0x14b)+_0x321d5c+_0x2c0667(0x188),{'body':_0x25052d}),_0x56a9dd=_0xac451c['map'](_0x3a1138=>ee(_0x1e52a4['body'][_0x2c0667(0x168)][_0x3a1138],_0x321d5c,_0x4b8858))[_0x2c0667(0x175)](Boolean);return Object[_0x2c0667(0x1b1)](_0x1e52a4[_0x2c0667(0x172)][_0x2c0667(0x178)])[_0x2c0667(0x16c)](_0x1fc7b3=>{const _0x439cf7=_0x2c0667;this[_0x439cf7(0x17d)][_0x439cf7(0x1a1)](_0x1fc7b3);}),_0x56a9dd;}[_0x3c63ed(0x17c)](_0x537f4b){const _0x21bf08=_0x3c63ed;return{'id':_0x537f4b['id'],'threadId':_0x537f4b[_0x21bf08(0x14f)],'ref':_0x537f4b[_0x21bf08(0x152)]};}};f=Q([_(0x0,_0x425bc5(_0x304e86)),_(0x1,_0x425bc5(_0x317ae9)),_(0x2,_0x425bc5(_0x30fdc0)),_(0x3,_0x425bc5(_0x344a66))],f);var re=Object[_0x3c63ed(0x19f)],te=(_0x34183c,_0x4e4908,_0x4231c3,_0x40a9a0)=>{const _0x5da59a=_0x3c63ed;for(var _0x235181=_0x40a9a0>0x1?void 0x0:_0x40a9a0?re(_0x4e4908,_0x4231c3):_0x4e4908,_0x237e65=_0x34183c[_0x5da59a(0x183)]-0x1,_0x2f0892;_0x237e65>=0x0;_0x237e65--)(_0x2f0892=_0x34183c[_0x237e65])&&(_0x235181=_0x2f0892(_0x235181)||_0x235181);return _0x235181;},N=(_0x31157a,_0x51530e)=>(_0x543ed6,_0x1076f5)=>_0x51530e(_0x543ed6,_0x1076f5,_0x31157a);let g=class extends _0x2716e8{constructor(_0x2cd2c9,_0x51b281){const _0x365d70=_0x3c63ed;super(),this[_0x365d70(0x19e)]=_0x2cd2c9,this[_0x365d70(0x153)]=_0x51b281,this[_0x365d70(0x16e)]();}[_0x3c63ed(0x16e)](){const _0x2e4853=_0x3c63ed;this[_0x2e4853(0x19e)][_0x2e4853(0x190)]=this[_0x2e4853(0x153)],this['_threadCommentDataSourceService'][_0x2e4853(0x160)]=!0x1;}};g=te([N(0x0,_0x581906),N(0x1,_0x425bc5(f))],g);var se=Object[_0x3c63ed(0x15f)],oe=Object[_0x3c63ed(0x19f)],ne=(_0x479751,_0x4511e8,_0xd8d38)=>_0x4511e8 in _0x479751?se(_0x479751,_0x4511e8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd8d38}):_0x479751[_0x4511e8]=_0xd8d38,ie=(_0x5b84ea,_0x10579c,_0x4e461a,_0x1ea4d7)=>{const _0x44fd1d=_0x3c63ed;for(var _0x496f45=_0x1ea4d7>0x1?void 0x0:_0x1ea4d7?oe(_0x10579c,_0x4e461a):_0x10579c,_0x50cf11=_0x5b84ea[_0x44fd1d(0x183)]-0x1,_0x132741;_0x50cf11>=0x0;_0x50cf11--)(_0x132741=_0x5b84ea[_0x50cf11])&&(_0x496f45=_0x132741(_0x496f45)||_0x496f45);return _0x496f45;},w=(_0xcff464,_0x3f2ac1)=>(_0x1c76e7,_0x4831f0)=>_0x3f2ac1(_0x1c76e7,_0x4831f0,_0xcff464),$=(_0x26f3f0,_0x38520f,_0x2a7ef9)=>ne(_0x26f3f0,typeof _0x38520f!=_0x3c63ed(0x19d)?_0x38520f+'':_0x38520f,_0x2a7ef9);let b=class extends _0x417ad6{constructor(_0x15f88f=M,_0x160114,_0x298029){const _0x11e597=_0x3c63ed;super(),this[_0x11e597(0x157)]=_0x15f88f,this[_0x11e597(0x15c)]=_0x160114,this[_0x11e597(0x16a)]=_0x298029;const {..._0x35d6f0}=_0x4aed61({},M,this['_config']);this[_0x11e597(0x16a)][_0x11e597(0x1ab)](z,_0x35d6f0);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x5dac36=>{const _0x153554=_0x686a;this[_0x153554(0x15c)]['add'](_0x5dac36);});}[_0x3c63ed(0x17f)](){const _0x5ef403=_0x3c63ed;this[_0x5ef403(0x15c)]['get'](g),this['_injector'][_0x5ef403(0x171)](S);}};$(b,_0x3c63ed(0x17b),W),$(b,_0x3c63ed(0x165),_0xe14618[_0x3c63ed(0x197)]),b=ie([_0x440a04(_0x21fc1f,_0x1f70fd,_0x1df8ef),w(0x1,_0x425bc5(_0x344a66)),w(0x2,_0x5bacb3)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x1a3b(){const _0x5f4946=['22337090QKcsGM','reply','@univerjs/core','parse','_injector','get','@univerjs-pro/collaboration-client','9PJStME','addComment','UniverInstanceType','UniverThreadComment','Inject','pluginName','post','DependentOn','/list','add','find','type','root','@univerjs/thread-comment-ui','amd','UniverThreadCommentUIPlugin','thread-comment-data-source.config','@univerjs/network','rxjs','UniverCore','content','merge','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/solved','replyId','object','_configService','rangeType','map','31ZngTWj','UniverLicensePlugin','Solve','createTimestamp','setConfig','ThreadCommentModel','Injector','customRanges','_threadCommentModel','_init','onStarting','_sessionService','length','Delete','getComment','8pSHgIR','7731126ylLhFH','/universer-api/comment/unit/','/delete','values','parentId','personId','UniverNetwork','UserManagerService','getOwnPropertyDescriptor','/add','_threadCommentDataSourceService','commentUpdate$','_httpService','error','getMemberID','disposeWithMe','_initUserSync','ref','updateComment','1479948okIVtE','rangeId','_initDataSource','stringify','UNRECOGNIZED','delete','6349912NdYvAp','UniverProThreadCommentDatasource','filter','resolved','Edit','YYYY/MM/DD\x20HH:mm','Add','_commentService','Solved','OpenOrReOpen','IConfigService','getUnit','@univerjs-pro/license','UniverThreadCommentDataSourcePlugin','user','listComments','code','UniverThreadCommentUi','CollaborationSessionService','_config','Module','dayjs','8860159wyNqKh','body','CustomRangeType','requireSession','COMMENT','79334iFLXHJ','2155435uxpaYa','Disposable','saveCommentToSnapshot','slice','solved','@univerjs/thread-comment','format','subscribe','threadId','_threadCommentDataSource','forEach','HTTPService','/universer-api/user/list','getUser','comment','pipe','resolveComment','userId','addUser','replies','_userService','deleteComment','Reply','bufferTime','Unknown'];_0x1a3b=function(){return _0x5f4946;};return _0x1a3b();}function _0x3d08(_0xefa884,_0x12b092){const _0x1a3b03=_0x1a3b();return _0x3d08=function(_0x3d08f2,_0x489b3f){_0x3d08f2=_0x3d08f2-0x1da;let _0x185430=_0x1a3b03[_0x3d08f2];return _0x185430;},_0x3d08(_0xefa884,_0x12b092);}(function(_0x352dba,_0x5aba1b){const _0x2c6a1e=_0x3d08,_0x395d72=_0x352dba();while(!![]){try{const _0x9385c1=parseInt(_0x2c6a1e(0x20c))/0x1*(-parseInt(_0x2c6a1e(0x250))/0x2)+-parseInt(_0x2c6a1e(0x22f))/0x3*(-parseInt(_0x2c6a1e(0x21b))/0x4)+parseInt(_0x2c6a1e(0x251))/0x5+-parseInt(_0x2c6a1e(0x21c))/0x6+-parseInt(_0x2c6a1e(0x24b))/0x7+parseInt(_0x2c6a1e(0x235))/0x8+parseInt(_0x2c6a1e(0x1ef))/0x9*(parseInt(_0x2c6a1e(0x1e8))/0xa);if(_0x9385c1===_0x5aba1b)break;else _0x395d72['push'](_0x395d72['shift']());}catch(_0xd39e8a){_0x395d72['push'](_0x395d72['shift']());}}}(_0x1a3b,0xa16f0),function(_0x4f9d2c,_0xa10ccd){const _0x5ad4c7=_0x3d08;typeof exports==_0x5ad4c7(0x208)&&typeof module<'u'?_0xa10ccd(exports,require(_0x5ad4c7(0x1ee)),require(_0x5ad4c7(0x241)),require(_0x5ad4c7(0x1ea)),require(_0x5ad4c7(0x1fc)),require(_0x5ad4c7(0x256)),require('rxjs'),require(_0x5ad4c7(0x200))):typeof define=='function'&&define[_0x5ad4c7(0x1fd)]?define(['exports','@univerjs-pro/collaboration-client','@univerjs-pro/license','@univerjs/core',_0x5ad4c7(0x1fc),'@univerjs/thread-comment',_0x5ad4c7(0x201),_0x5ad4c7(0x200)],_0xa10ccd):(_0x4f9d2c=typeof globalThis<'u'?globalThis:_0x4f9d2c||self,_0xa10ccd(_0x4f9d2c[_0x5ad4c7(0x236)]={},_0x4f9d2c['UniverProCollaborationClient'],_0x4f9d2c['UniverProLicense'],_0x4f9d2c[_0x5ad4c7(0x202)],_0x4f9d2c[_0x5ad4c7(0x246)],_0x4f9d2c[_0x5ad4c7(0x1f2)],_0x4f9d2c[_0x5ad4c7(0x201)],_0x4f9d2c[_0x5ad4c7(0x222)]));}(this,function(_0x5d58c4,_0x3c22ee,_0x5e75e3,_0x34997e,_0x438e4f,_0x2dc169,_0x1cb9ba,_0x26368c){'use strict';const _0x14e1d3=_0x3d08;const _0x404f18=_0x14e1d3(0x205);var _0x3e00c0=(_0x278d7d=>(_0x278d7d[_0x278d7d['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x278d7d[_0x278d7d['Solved']=0x1]='Solved',_0x278d7d[_0x278d7d[_0x14e1d3(0x233)]=-0x1]=_0x14e1d3(0x233),_0x278d7d))(_0x3e00c0||{}),_0x460808=(_0x188360=>(_0x188360[_0x188360[_0x14e1d3(0x1e7)]=0x0]='Unknown',_0x188360[_0x188360[_0x14e1d3(0x23b)]=0x1]='Add',_0x188360[_0x188360['Reply']=0x2]=_0x14e1d3(0x1e5),_0x188360[_0x188360[_0x14e1d3(0x239)]=0x3]=_0x14e1d3(0x239),_0x188360[_0x188360['Delete']=0x4]=_0x14e1d3(0x219),_0x188360[_0x188360[_0x14e1d3(0x20e)]=0x5]='Solve',_0x188360[_0x188360['UNRECOGNIZED']=-0x1]=_0x14e1d3(0x233),_0x188360))(_0x460808||{});const _0x11f57c=_0x8b9dc=>_0x34997e['dayjs'](new Date(+_0x8b9dc))[_0x14e1d3(0x257)](_0x14e1d3(0x23a)),_0x2cb561=async(_0x5850b3,_0xcd6991)=>{const _0xfffec1=_0x14e1d3,_0x42a9ca=_0x5850b3[_0xfffec1(0x1ed)](_0x34997e[_0xfffec1(0x223)]),_0x4913ea=_0x5850b3[_0xfffec1(0x1ed)](_0x26368c[_0xfffec1(0x1da)]);_0xcd6991['forEach'](_0x22a325=>{const _0x15d322=_0xfffec1;_0x42a9ca[_0x15d322(0x1dc)](_0x22a325)&&_0xcd6991[_0x15d322(0x234)](_0x22a325);}),_0xcd6991['size']&&(await _0x4913ea[_0xfffec1(0x1ed)](_0xfffec1(0x1db),{'params':{'userIDs':[..._0xcd6991]}}))[_0xfffec1(0x24c)]['users'][_0xfffec1(0x25b)](_0x27d92b=>{const _0x492d92=_0xfffec1;_0x27d92b&&_0x42a9ca[_0x492d92(0x1e1)](_0x27d92b);});};var _0x4b552b=Object[_0x14e1d3(0x224)],_0x6c0dc8=(_0x3c21ce,_0x2ee4e4,_0x539223,_0x3351cc)=>{const _0x51cfd4=_0x14e1d3;for(var _0x49befa=_0x3351cc>0x1?void 0x0:_0x3351cc?_0x4b552b(_0x2ee4e4,_0x539223):_0x2ee4e4,_0x1ba067=_0x3c21ce[_0x51cfd4(0x218)]-0x1,_0x35ae9f;_0x1ba067>=0x0;_0x1ba067--)(_0x35ae9f=_0x3c21ce[_0x1ba067])&&(_0x49befa=_0x35ae9f(_0x49befa)||_0x49befa);return _0x49befa;},_0x201133=(_0xb23236,_0x221b04)=>(_0xc1eee7,_0x4f0996)=>_0x221b04(_0xc1eee7,_0x4f0996,_0xb23236);let _0x219890=class extends _0x34997e[_0x14e1d3(0x252)]{constructor(_0xeb6fed,_0x48fcfb,_0xc2573b,_0x46d009){const _0x4fa084=_0x14e1d3;super(),this[_0x4fa084(0x23c)]=_0xeb6fed,this['_threadCommentModel']=_0x48fcfb,this['_userService']=_0xc2573b,this[_0x4fa084(0x1ec)]=_0x46d009,this[_0x4fa084(0x215)](),this[_0x4fa084(0x22c)]();}[_0x14e1d3(0x22c)](){const _0x2a003d=_0x14e1d3;this[_0x2a003d(0x22b)](this['_threadCommentModel'][_0x2a003d(0x227)][_0x2a003d(0x1de)](_0x1cb9ba[_0x2a003d(0x1e6)](0x10))['subscribe'](_0x3e0eb6=>{const _0xa625e5=_0x2a003d,_0x5e0dcc=new Set();_0x3e0eb6[_0xa625e5(0x25b)](_0x438e4c=>{const _0x5e705c=_0xa625e5;switch(_0x438e4c[_0x5e705c(0x1fa)]){case _0x5e705c(0x1f8):{const _0x3fd311=_0x438e4c['payload'][_0x5e705c(0x221)];_0x5e0dcc['add'](_0x3fd311);break;}}}),_0x2cb561(this[_0xa625e5(0x1ec)],_0x5e0dcc);}));}[_0x14e1d3(0x215)](){const _0x2ea736=_0x14e1d3;this['disposeWithMe'](this[_0x2ea736(0x23c)][_0x2ea736(0x227)][_0x2ea736(0x258)](async _0x5e306c=>{const _0x21e224=_0x2ea736;var _0x154bfa,_0x4a0179,_0x56442f,_0x293449;const _0x264373=(_0x154bfa=this['_threadCommentModel'][_0x21e224(0x240)](_0x5e306c['unitId'])[_0x21e224(0x1f9)](_0x5a07bf=>_0x5a07bf[_0x21e224(0x259)]===_0x5e306c[_0x21e224(0x259)]))==null?void 0x0:_0x154bfa[_0x21e224(0x1fb)];if(!_0x264373)return;const {unitId:_0x3f930b,subUnitId:_0x3ec814}=_0x264373;switch(_0x5e306c['user']&&this['_userService']['addUser'](_0x5e306c[_0x21e224(0x243)]),_0x5e306c['type']){case _0x460808[_0x21e224(0x23b)]:break;case _0x460808['Reply']:{this[_0x21e224(0x214)][_0x21e224(0x1f0)](_0x3f930b,_0x3ec814,{'unitId':_0x3f930b,'subUnitId':_0x3ec814,'ref':'','id':_0x5e306c[_0x21e224(0x207)],'dT':_0x11f57c(+_0x5e306c[_0x21e224(0x20f)]),'threadId':_0x5e306c[_0x21e224(0x259)],'personId':(_0x56442f=(_0x4a0179=_0x5e306c[_0x21e224(0x243)])==null?void 0x0:_0x4a0179['userID'])!=null?_0x56442f:_0x5e306c[_0x21e224(0x1e0)],'text':JSON[_0x21e224(0x1eb)](_0x5e306c[_0x21e224(0x203)]),'parentId':_0x264373['id']});break;}case _0x460808[_0x21e224(0x219)]:{const _0x1e0eba=this[_0x21e224(0x214)][_0x21e224(0x21a)](_0x3f930b,_0x3ec814,_0x5e306c['replyId']);_0x1e0eba&&_0x1e0eba[_0x21e224(0x220)]&&this[_0x21e224(0x214)]['deleteComment'](_0x3f930b,_0x3ec814,_0x5e306c[_0x21e224(0x207)]);break;}case _0x460808['Edit']:{this[_0x21e224(0x214)][_0x21e224(0x22e)](_0x3f930b,_0x3ec814,{'commentId':_0x5e306c['replyId'],'text':JSON[_0x21e224(0x1eb)](_0x5e306c[_0x21e224(0x203)])});break;}case _0x460808[_0x21e224(0x20e)]:{const _0x1d55bc=(_0x293449=this[_0x21e224(0x214)][_0x21e224(0x240)](_0x5e306c['unitId'])[_0x21e224(0x1f9)](_0x555cb7=>_0x555cb7['threadId']===_0x5e306c[_0x21e224(0x259)]))==null?void 0x0:_0x293449[_0x21e224(0x1fb)];_0x1d55bc&&this['_threadCommentModel'][_0x21e224(0x1df)](_0x3f930b,_0x3ec814,_0x1d55bc['id'],_0x5e306c[_0x21e224(0x255)]===_0x3e00c0['Solved']);break;}}}));}};_0x219890=_0x6c0dc8([_0x201133(0x0,_0x34997e[_0x14e1d3(0x1f3)](_0x3c22ee['CommentService'])),_0x201133(0x1,_0x34997e[_0x14e1d3(0x1f3)](_0x2dc169[_0x14e1d3(0x211)])),_0x201133(0x2,_0x34997e[_0x14e1d3(0x1f3)](_0x34997e[_0x14e1d3(0x223)])),_0x201133(0x3,_0x34997e['Inject'](_0x34997e[_0x14e1d3(0x212)]))],_0x219890);const _0x219f2d=_0x14e1d3(0x1ff),_0x40e0d1={};var _0x259a8d=Object[_0x14e1d3(0x224)],_0x1fc87a=(_0x2e4dfe,_0x2e753b,_0x26fdfa,_0x64c699)=>{const _0x4b5b39=_0x14e1d3;for(var _0x217336=_0x64c699>0x1?void 0x0:_0x64c699?_0x259a8d(_0x2e753b,_0x26fdfa):_0x2e753b,_0x56aba1=_0x2e4dfe[_0x4b5b39(0x218)]-0x1,_0x4462c0;_0x56aba1>=0x0;_0x56aba1--)(_0x4462c0=_0x2e4dfe[_0x56aba1])&&(_0x217336=_0x4462c0(_0x217336)||_0x217336);return _0x217336;},_0x14f142=(_0x365acf,_0x28d2ee)=>(_0x476f9b,_0x50053e)=>_0x28d2ee(_0x476f9b,_0x50053e,_0x365acf);function _0x349a8f(_0x50a91f,_0x2fceb6){const _0x1334b2=_0x14e1d3,_0x58490e=_0x50a91f[_0x1334b2(0x1e2)][0x0];return{..._0x2fceb6,'id':_0x58490e['replyId'],'resolved':_0x50a91f[_0x1334b2(0x255)]===0x1,'dT':_0x11f57c(_0x58490e[_0x1334b2(0x20f)]),'personId':_0x58490e[_0x1334b2(0x1e0)],'threadId':_0x58490e[_0x1334b2(0x259)]};}function _0x57d166(_0x90ee81,_0x1d4184,_0x477318){const _0x623ddd=_0x14e1d3;var _0x5cc5aa,_0x59d989;if(((_0x59d989=(_0x5cc5aa=_0x90ee81==null?void 0x0:_0x90ee81['replies'])==null?void 0x0:_0x5cc5aa['length'])!=null?_0x59d989:0x0)>0x0){const _0x460214=(_0x69c6fc,_0xe33c6d)=>({'id':_0x69c6fc[_0x623ddd(0x207)],'threadId':_0x69c6fc[_0x623ddd(0x259)],'dT':_0x11f57c(_0x69c6fc[_0x623ddd(0x20f)]),'personId':_0x69c6fc[_0x623ddd(0x1e0)],'resolved':_0x90ee81[_0x623ddd(0x255)]===_0x3e00c0[_0x623ddd(0x23d)],'unitId':_0x1d4184,'subUnitId':_0x477318,'text':JSON[_0x623ddd(0x1eb)](_0x69c6fc[_0x623ddd(0x203)]),'parentId':_0xe33c6d}),_0x4ed3f8=_0x460214(_0x90ee81['replies'][0x0]);return{..._0x4ed3f8,'children':_0x90ee81['replies'][_0x623ddd(0x254)](0x1)[_0x623ddd(0x20b)](_0x2dbc23=>_0x460214(_0x2dbc23,_0x4ed3f8['id']))};}return null;}let _0x3113e2=class{constructor(_0x1aa023,_0x2821d1,_0x30ebb,_0xe8b0c6){const _0x4af897=_0x14e1d3;this[_0x4af897(0x228)]=_0x1aa023,this[_0x4af897(0x1e3)]=_0x2821d1,this[_0x4af897(0x217)]=_0x30ebb,this[_0x4af897(0x1ec)]=_0xe8b0c6;}async[_0x14e1d3(0x1f0)](_0x4a7d34){const _0x353891=_0x14e1d3;var _0x129b13,_0x32791f;const {parentId:_0xb8c2fa,unitId:_0x122e83,text:_0x257e1f,threadId:_0x3e8e77}=_0x4a7d34,_0x20512=(_0x32791f=(_0x129b13=_0x257e1f[_0x353891(0x213)])==null?void 0x0:_0x129b13[_0x353891(0x237)](_0x570a00=>_0x570a00[_0x353891(0x20a)]===_0x34997e[_0x353891(0x24d)]['COMMENT'])[_0x353891(0x20b)](_0x360b48=>_0x360b48['rangeId']))!=null?_0x32791f:[],_0x3dad73=JSON[_0x353891(0x232)](_0x257e1f),_0x14f24f=(await this[_0x353891(0x217)][_0x353891(0x24e)](_0x122e83))[_0x353891(0x22a)]();if(_0xb8c2fa){const _0x3634f0={'memberId':_0x14f24f,'unitId':_0x122e83,'content':_0x3dad73,'mention':_0x20512,'threadId':_0x3e8e77},_0x43bb2=(await this['_httpService'][_0x353891(0x1f5)]('/universer-api/comment/unit/'+_0x122e83+'/reply',{'body':_0x3634f0}))['body'][_0x353891(0x1e9)];return{..._0x4a7d34,'id':_0x43bb2[_0x353891(0x207)],'dT':_0x34997e[_0x353891(0x24a)](+_0x43bb2[_0x353891(0x20f)])['format'](_0x353891(0x23a)),'personId':_0x43bb2[_0x353891(0x1e0)]};}else{const _0x5d6317={'memberId':_0x14f24f,'unitId':_0x122e83,'content':_0x3dad73,'mention':_0x20512},_0x49e0ee=await this['_httpService'][_0x353891(0x1f5)](_0x353891(0x21d)+_0x122e83+_0x353891(0x225),{'body':_0x5d6317});return _0x349a8f(_0x49e0ee[_0x353891(0x24c)][_0x353891(0x1dd)],_0x4a7d34);}}async[_0x14e1d3(0x22e)](_0x25b942){const _0x5b38b0=_0x14e1d3;var _0x5cd0fe,_0x43496f;const {text:_0x31a95b,unitId:_0x1e2c6c}=_0x25b942,_0x530513=(_0x43496f=(_0x5cd0fe=_0x31a95b[_0x5b38b0(0x213)])==null?void 0x0:_0x5cd0fe[_0x5b38b0(0x237)](_0x2c11be=>_0x2c11be[_0x5b38b0(0x20a)]===_0x34997e[_0x5b38b0(0x24d)][_0x5b38b0(0x24f)])[_0x5b38b0(0x20b)](_0xbd5b15=>_0xbd5b15[_0x5b38b0(0x230)]))!=null?_0x43496f:[],_0x51f19a=JSON['stringify'](_0x31a95b),_0xec6e91=_0x25b942[_0x5b38b0(0x259)],_0x2b1eab=_0x25b942['id'],_0x4691ad={'memberId':(await this['_sessionService'][_0x5b38b0(0x24e)](_0x1e2c6c))[_0x5b38b0(0x22a)](),'unitId':_0x1e2c6c,'threadId':_0xec6e91,'mention':_0x530513,'content':_0x51f19a,'replyId':_0x2b1eab},_0x4b3b78=await this[_0x5b38b0(0x228)][_0x5b38b0(0x1f5)](_0x5b38b0(0x21d)+_0x1e2c6c+'/edit',{'body':_0x4691ad});return!_0x4b3b78['body'][_0x5b38b0(0x229)]||_0x4b3b78['body']['error'][_0x5b38b0(0x245)]===0x1;}async['resolveComment'](_0x1fafcb){const _0x5df248=_0x14e1d3,{unitId:_0x36fcaf}=_0x1fafcb,_0x597812=_0x1fafcb[_0x5df248(0x259)],_0x443a1c={'memberId':this[_0x5df248(0x1e3)]['getCurrentUser']()['userID'],'unitId':_0x36fcaf,'threadId':_0x597812,'solved':_0x1fafcb[_0x5df248(0x238)]?_0x3e00c0[_0x5df248(0x23d)]:_0x3e00c0[_0x5df248(0x23e)]},_0x48fbde=await this['_httpService'][_0x5df248(0x1f5)](_0x5df248(0x21d)+_0x36fcaf+_0x5df248(0x206),{'body':_0x443a1c});return!_0x48fbde['body']['error']||_0x48fbde[_0x5df248(0x24c)][_0x5df248(0x229)][_0x5df248(0x245)]===0x1;}async[_0x14e1d3(0x1e4)](_0x5f1967,_0x51bf3a,_0x390939,_0x31ee6a){const _0x1de6aa=_0x14e1d3,_0x35ca10={'memberId':(await this[_0x1de6aa(0x217)][_0x1de6aa(0x24e)](_0x5f1967))['getMemberID'](),'threadId':_0x390939,'replyId':_0x31ee6a,'unitId':_0x5f1967},_0x1f66e0=await this['_httpService'][_0x1de6aa(0x1f5)](_0x1de6aa(0x21d)+_0x5f1967+_0x1de6aa(0x21e),{'body':_0x35ca10});return!_0x1f66e0[_0x1de6aa(0x24c)][_0x1de6aa(0x229)]||_0x1f66e0[_0x1de6aa(0x24c)]['error']['code']===0x1;}async[_0x14e1d3(0x244)](_0x992956,_0x132549,_0x12a19){const _0x467ac3=_0x14e1d3,_0x429ebc={'unitId':_0x992956,'threadId':_0x12a19},_0x100985=await this[_0x467ac3(0x228)]['post'](_0x467ac3(0x21d)+_0x992956+_0x467ac3(0x1f7),{'body':_0x429ebc}),_0x38c4ca=_0x12a19[_0x467ac3(0x20b)](_0x4a8cf8=>_0x57d166(_0x100985[_0x467ac3(0x24c)]['comments'][_0x4a8cf8],_0x992956,_0x132549))['filter'](Boolean);return Object[_0x467ac3(0x21f)](_0x100985[_0x467ac3(0x24c)]['users'])[_0x467ac3(0x25b)](_0x20cc85=>{const _0x230443=_0x467ac3;this[_0x230443(0x1e3)][_0x230443(0x1e1)](_0x20cc85);}),_0x38c4ca;}[_0x14e1d3(0x253)](_0x9b58d){const _0x9ba0e3=_0x14e1d3;return{'id':_0x9b58d['id'],'threadId':_0x9b58d['threadId'],'ref':_0x9b58d[_0x9ba0e3(0x22d)]};}};_0x3113e2=_0x1fc87a([_0x14f142(0x0,_0x34997e[_0x14e1d3(0x1f3)](_0x26368c[_0x14e1d3(0x1da)])),_0x14f142(0x1,_0x34997e[_0x14e1d3(0x1f3)](_0x34997e['UserManagerService'])),_0x14f142(0x2,_0x34997e['Inject'](_0x3c22ee[_0x14e1d3(0x247)])),_0x14f142(0x3,_0x34997e[_0x14e1d3(0x1f3)](_0x34997e['Injector']))],_0x3113e2);var _0x364e8e=Object[_0x14e1d3(0x224)],_0x4c5a77=(_0x4f508b,_0x43710b,_0x53e5e6,_0x552bfd)=>{const _0x528999=_0x14e1d3;for(var _0x5a7ad8=_0x552bfd>0x1?void 0x0:_0x552bfd?_0x364e8e(_0x43710b,_0x53e5e6):_0x43710b,_0xac2530=_0x4f508b[_0x528999(0x218)]-0x1,_0x1c9561;_0xac2530>=0x0;_0xac2530--)(_0x1c9561=_0x4f508b[_0xac2530])&&(_0x5a7ad8=_0x1c9561(_0x5a7ad8)||_0x5a7ad8);return _0x5a7ad8;},_0x1ca1d5=(_0x2d74bc,_0x401883)=>(_0x24d92c,_0x5bf1f7)=>_0x401883(_0x24d92c,_0x5bf1f7,_0x2d74bc);let _0x34c2ef=class extends _0x34997e[_0x14e1d3(0x252)]{constructor(_0x31f41e,_0x347547){const _0x5b6df8=_0x14e1d3;super(),this[_0x5b6df8(0x226)]=_0x31f41e,this[_0x5b6df8(0x25a)]=_0x347547,this[_0x5b6df8(0x231)]();}[_0x14e1d3(0x231)](){const _0xd44fef=_0x14e1d3;this['_threadCommentDataSourceService']['dataSource']=this[_0xd44fef(0x25a)],this[_0xd44fef(0x226)]['syncUpdateMutationToColla']=!0x1;}};_0x34c2ef=_0x4c5a77([_0x1ca1d5(0x0,_0x2dc169['IThreadCommentDataSourceService']),_0x1ca1d5(0x1,_0x34997e[_0x14e1d3(0x1f3)](_0x3113e2))],_0x34c2ef);var _0x5cf7ee=Object['defineProperty'],_0x81077c=Object[_0x14e1d3(0x224)],_0x9ffec6=(_0x2e077f,_0x2a1922,_0x2e6a04)=>_0x2a1922 in _0x2e077f?_0x5cf7ee(_0x2e077f,_0x2a1922,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2e6a04}):_0x2e077f[_0x2a1922]=_0x2e6a04,_0xe0623c=(_0x590ebe,_0x19f1d3,_0x461d14,_0x55a07c)=>{const _0x483153=_0x14e1d3;for(var _0x1f7857=_0x55a07c>0x1?void 0x0:_0x55a07c?_0x81077c(_0x19f1d3,_0x461d14):_0x19f1d3,_0x450586=_0x590ebe[_0x483153(0x218)]-0x1,_0x20fd4e;_0x450586>=0x0;_0x450586--)(_0x20fd4e=_0x590ebe[_0x450586])&&(_0x1f7857=_0x20fd4e(_0x1f7857)||_0x1f7857);return _0x1f7857;},_0xc64092=(_0x2dce45,_0x290dec)=>(_0x400ce9,_0x342bfa)=>_0x290dec(_0x400ce9,_0x342bfa,_0x2dce45),_0x53b8cb=(_0x9ad304,_0x64fec3,_0x4ee082)=>_0x9ffec6(_0x9ad304,typeof _0x64fec3!='symbol'?_0x64fec3+'':_0x64fec3,_0x4ee082);_0x5d58c4[_0x14e1d3(0x242)]=class extends _0x34997e['Plugin']{constructor(_0x174c86=_0x40e0d1,_0x362f6b,_0x220d45){const _0x2c32cc=_0x14e1d3;super(),this[_0x2c32cc(0x248)]=_0x174c86,this[_0x2c32cc(0x1ec)]=_0x362f6b,this['_configService']=_0x220d45;const {..._0x36e29b}=_0x34997e[_0x2c32cc(0x204)]({},_0x40e0d1,this[_0x2c32cc(0x248)]);this[_0x2c32cc(0x209)][_0x2c32cc(0x210)](_0x219f2d,_0x36e29b);}[_0x14e1d3(0x216)](){[[_0x3113e2],[_0x34c2ef],[_0x219890]]['forEach'](_0x3f7ca7=>{this['_injector']['add'](_0x3f7ca7);});}['onReady'](){const _0x23ce61=_0x14e1d3;this[_0x23ce61(0x1ec)]['get'](_0x34c2ef),this[_0x23ce61(0x1ec)][_0x23ce61(0x1ed)](_0x219890);}},_0x53b8cb(_0x5d58c4[_0x14e1d3(0x242)],_0x14e1d3(0x1f4),_0x404f18),_0x53b8cb(_0x5d58c4[_0x14e1d3(0x242)],_0x14e1d3(0x1fa),_0x34997e[_0x14e1d3(0x1f1)]['UNIVER_UNKNOWN']),_0x5d58c4[_0x14e1d3(0x242)]=_0xe0623c([_0x34997e[_0x14e1d3(0x1f6)](_0x438e4f[_0x14e1d3(0x1fe)],_0x3c22ee['UniverCollaborationClientPlugin'],_0x5e75e3[_0x14e1d3(0x20d)]),_0xc64092(0x1,_0x34997e[_0x14e1d3(0x1f3)](_0x34997e[_0x14e1d3(0x212)])),_0xc64092(0x2,_0x34997e[_0x14e1d3(0x23f)])],_0x5d58c4[_0x14e1d3(0x242)]),Object['defineProperty'](_0x5d58c4,Symbol['toStringTag'],{'value':_0x14e1d3(0x249)});}));
1
+ (function(_0x4f425f,_0x553422){const _0x56e436=_0x1b96,_0x5700fa=_0x4f425f();while(!![]){try{const _0x1bb94c=-parseInt(_0x56e436(0x187))/0x1*(parseInt(_0x56e436(0x18a))/0x2)+parseInt(_0x56e436(0x169))/0x3+parseInt(_0x56e436(0x16d))/0x4*(-parseInt(_0x56e436(0x160))/0x5)+parseInt(_0x56e436(0x1c2))/0x6+parseInt(_0x56e436(0x1bb))/0x7*(-parseInt(_0x56e436(0x1a8))/0x8)+parseInt(_0x56e436(0x1d4))/0x9*(-parseInt(_0x56e436(0x164))/0xa)+-parseInt(_0x56e436(0x168))/0xb*(-parseInt(_0x56e436(0x195))/0xc);if(_0x1bb94c===_0x553422)break;else _0x5700fa['push'](_0x5700fa['shift']());}catch(_0x527b31){_0x5700fa['push'](_0x5700fa['shift']());}}}(_0xf592,0x1fb5d),function(_0x205938,_0x36ef6b){const _0x2b9140=_0x1b96;typeof exports=='object'&&typeof module<'u'?_0x36ef6b(exports,require(_0x2b9140(0x19a)),require(_0x2b9140(0x1b7)),require(_0x2b9140(0x182)),require(_0x2b9140(0x1d3)),require(_0x2b9140(0x1a7)),require('rxjs'),require(_0x2b9140(0x184))):typeof define==_0x2b9140(0x1c3)&&define[_0x2b9140(0x1c8)]?define([_0x2b9140(0x17f),_0x2b9140(0x19a),_0x2b9140(0x1b7),'@univerjs/core',_0x2b9140(0x1d3),_0x2b9140(0x1a7),_0x2b9140(0x199),_0x2b9140(0x184)],_0x36ef6b):(_0x205938=typeof globalThis<'u'?globalThis:_0x205938||self,_0x36ef6b(_0x205938['UniverProThreadCommentDatasource']={},_0x205938[_0x2b9140(0x1b2)],_0x205938[_0x2b9140(0x194)],_0x205938['UniverCore'],_0x205938['UniverThreadCommentUi'],_0x205938[_0x2b9140(0x186)],_0x205938[_0x2b9140(0x199)],_0x205938['UniverNetwork']));}(this,function(_0x5f2d29,_0x3114cb,_0xe7522b,_0x5a4584,_0x53ff76,_0x1d5bd1,_0x425f98,_0x5eae30){'use strict';const _0x523c32=_0x1b96;const _0x1891ac=_0x523c32(0x1d9);var _0x560a64=(_0x5bac7a=>(_0x5bac7a[_0x5bac7a[_0x523c32(0x191)]=0x0]='OpenOrReOpen',_0x5bac7a[_0x5bac7a[_0x523c32(0x1c0)]=0x1]=_0x523c32(0x1c0),_0x5bac7a[_0x5bac7a[_0x523c32(0x171)]=-0x1]=_0x523c32(0x171),_0x5bac7a))(_0x560a64||{}),_0x5a5ab7=(_0x497d86=>(_0x497d86[_0x497d86['Unknown']=0x0]='Unknown',_0x497d86[_0x497d86[_0x523c32(0x1b1)]=0x1]=_0x523c32(0x1b1),_0x497d86[_0x497d86[_0x523c32(0x19c)]=0x2]='Reply',_0x497d86[_0x497d86[_0x523c32(0x1a3)]=0x3]='Edit',_0x497d86[_0x497d86[_0x523c32(0x1dc)]=0x4]=_0x523c32(0x1dc),_0x497d86[_0x497d86[_0x523c32(0x190)]=0x5]='Solve',_0x497d86[_0x497d86[_0x523c32(0x171)]=-0x1]=_0x523c32(0x171),_0x497d86))(_0x5a5ab7||{});const _0x571b60=_0x1b4cfe=>_0x5a4584['dayjs'](new Date(+_0x1b4cfe))['format'](_0x523c32(0x16c)),_0x4b38a0=async(_0x3dd1b5,_0x435f88)=>{const _0x1f154c=_0x523c32,_0x28cd9c=_0x3dd1b5[_0x1f154c(0x1b0)](_0x5a4584[_0x1f154c(0x170)]),_0x20e528=_0x3dd1b5[_0x1f154c(0x1b0)](_0x5eae30[_0x1f154c(0x181)]);_0x435f88[_0x1f154c(0x192)](_0x50f032=>{const _0x4dd7ba=_0x1f154c;_0x28cd9c[_0x4dd7ba(0x178)](_0x50f032)&&_0x435f88['delete'](_0x50f032);}),_0x435f88[_0x1f154c(0x1c4)]&&(await _0x20e528[_0x1f154c(0x1b0)](_0x1f154c(0x166),{'params':{'userIDs':[..._0x435f88]}}))[_0x1f154c(0x1e0)][_0x1f154c(0x185)][_0x1f154c(0x192)](_0x19643a=>{const _0x16d852=_0x1f154c;_0x19643a&&_0x28cd9c[_0x16d852(0x1d0)](_0x19643a);});};var _0x3cbd06=Object[_0x523c32(0x1bc)],_0x489706=(_0x4f8e9f,_0x4ca9eb,_0x44603e,_0x2dd702)=>{const _0x3f6f39=_0x523c32;for(var _0x130810=_0x2dd702>0x1?void 0x0:_0x2dd702?_0x3cbd06(_0x4ca9eb,_0x44603e):_0x4ca9eb,_0x10549e=_0x4f8e9f[_0x3f6f39(0x188)]-0x1,_0x21ef0d;_0x10549e>=0x0;_0x10549e--)(_0x21ef0d=_0x4f8e9f[_0x10549e])&&(_0x130810=_0x21ef0d(_0x130810)||_0x130810);return _0x130810;},_0x203176=(_0x547b22,_0x5480fc)=>(_0x3b364e,_0x43a11c)=>_0x5480fc(_0x3b364e,_0x43a11c,_0x547b22);let _0x36954c=class extends _0x5a4584[_0x523c32(0x1a2)]{constructor(_0x4a336f,_0x5da394,_0x8a09c,_0x2203b3){const _0x1543be=_0x523c32;super(),this[_0x1543be(0x1aa)]=_0x4a336f,this[_0x1543be(0x183)]=_0x5da394,this[_0x1543be(0x17d)]=_0x8a09c,this[_0x1543be(0x167)]=_0x2203b3,this[_0x1543be(0x179)](),this['_initUserSync']();}['_initUserSync'](){const _0x11c5e4=_0x523c32;this['disposeWithMe'](this[_0x11c5e4(0x183)][_0x11c5e4(0x162)][_0x11c5e4(0x1a9)](_0x425f98['bufferTime'](0x10))[_0x11c5e4(0x1c6)](_0x4a3820=>{const _0x1674c4=_0x11c5e4,_0x6b65f0=new Set();_0x4a3820[_0x1674c4(0x192)](_0x3be6ce=>{const _0x11e75e=_0x1674c4;switch(_0x3be6ce[_0x11e75e(0x1c5)]){case'add':{const _0x56d92e=_0x3be6ce[_0x11e75e(0x1da)][_0x11e75e(0x1c7)];_0x6b65f0[_0x11e75e(0x16a)](_0x56d92e);break;}}}),_0x4b38a0(this[_0x1674c4(0x167)],_0x6b65f0);}));}['_init'](){const _0x180834=_0x523c32;this[_0x180834(0x1e3)](this[_0x180834(0x1aa)][_0x180834(0x162)][_0x180834(0x1c6)](async _0x11ff8b=>{const _0x44774c=_0x180834;var _0x138bde,_0x32e228,_0x99230,_0x283095;const _0x2a8ead=(_0x138bde=this[_0x44774c(0x183)]['getUnit'](_0x11ff8b['unitId'])[_0x44774c(0x180)](_0x520a14=>_0x520a14[_0x44774c(0x1a6)]===_0x11ff8b[_0x44774c(0x1a6)]))==null?void 0x0:_0x138bde[_0x44774c(0x173)];if(!_0x2a8ead)return;const {unitId:_0x13d5c1,subUnitId:_0x51e12a}=_0x2a8ead;switch(_0x11ff8b[_0x44774c(0x172)]&&this[_0x44774c(0x17d)][_0x44774c(0x1d0)](_0x11ff8b[_0x44774c(0x172)]),_0x11ff8b[_0x44774c(0x1c5)]){case _0x5a5ab7[_0x44774c(0x1b1)]:break;case _0x5a5ab7[_0x44774c(0x19c)]:{this[_0x44774c(0x183)][_0x44774c(0x1b6)](_0x13d5c1,_0x51e12a,{'unitId':_0x13d5c1,'subUnitId':_0x51e12a,'ref':'','id':_0x11ff8b['replyId'],'dT':_0x571b60(+_0x11ff8b[_0x44774c(0x1c1)]),'threadId':_0x11ff8b['threadId'],'personId':(_0x99230=(_0x32e228=_0x11ff8b[_0x44774c(0x172)])==null?void 0x0:_0x32e228[_0x44774c(0x17e)])!=null?_0x99230:_0x11ff8b[_0x44774c(0x1cc)],'text':JSON['parse'](_0x11ff8b[_0x44774c(0x17c)]),'parentId':_0x2a8ead['id']});break;}case _0x5a5ab7['Delete']:{const _0x4b5275=this['_threadCommentModel'][_0x44774c(0x174)](_0x13d5c1,_0x51e12a,_0x11ff8b[_0x44774c(0x1df)]);_0x4b5275&&_0x4b5275[_0x44774c(0x1d7)]&&this[_0x44774c(0x183)][_0x44774c(0x163)](_0x13d5c1,_0x51e12a,_0x11ff8b[_0x44774c(0x1df)]);break;}case _0x5a5ab7[_0x44774c(0x1a3)]:{this[_0x44774c(0x183)]['updateComment'](_0x13d5c1,_0x51e12a,{'commentId':_0x11ff8b[_0x44774c(0x1df)],'text':JSON['parse'](_0x11ff8b[_0x44774c(0x17c)])});break;}case _0x5a5ab7[_0x44774c(0x190)]:{const _0x42a482=(_0x283095=this[_0x44774c(0x183)][_0x44774c(0x19f)](_0x11ff8b['unitId'])[_0x44774c(0x180)](_0x4964cb=>_0x4964cb['threadId']===_0x11ff8b[_0x44774c(0x1a6)]))==null?void 0x0:_0x283095[_0x44774c(0x173)];_0x42a482&&this[_0x44774c(0x183)][_0x44774c(0x1b9)](_0x13d5c1,_0x51e12a,_0x42a482['id'],_0x11ff8b[_0x44774c(0x193)]===_0x560a64['Solved']);break;}}}));}};_0x36954c=_0x489706([_0x203176(0x0,_0x5a4584['Inject'](_0x3114cb[_0x523c32(0x1ab)])),_0x203176(0x1,_0x5a4584[_0x523c32(0x16e)](_0x1d5bd1[_0x523c32(0x19b)])),_0x203176(0x2,_0x5a4584['Inject'](_0x5a4584[_0x523c32(0x170)])),_0x203176(0x3,_0x5a4584[_0x523c32(0x16e)](_0x5a4584[_0x523c32(0x197)]))],_0x36954c);const _0x984f58=_0x523c32(0x1ac),_0x39a2df={};var _0x2c5f27=Object[_0x523c32(0x1bc)],_0x1013b6=(_0x1499a7,_0x7bd32a,_0x194dd3,_0xe76220)=>{const _0xa4ff4d=_0x523c32;for(var _0x57ed29=_0xe76220>0x1?void 0x0:_0xe76220?_0x2c5f27(_0x7bd32a,_0x194dd3):_0x7bd32a,_0x442813=_0x1499a7[_0xa4ff4d(0x188)]-0x1,_0x128bbd;_0x442813>=0x0;_0x442813--)(_0x128bbd=_0x1499a7[_0x442813])&&(_0x57ed29=_0x128bbd(_0x57ed29)||_0x57ed29);return _0x57ed29;},_0x2ad279=(_0x3cea7e,_0x418e71)=>(_0x45bd4d,_0xb58a7e)=>_0x418e71(_0x45bd4d,_0xb58a7e,_0x3cea7e);function _0x5aea21(_0x120db0,_0x39962b){const _0x186ea6=_0x523c32,_0x3806a6=_0x120db0[_0x186ea6(0x1bf)][0x0];return{..._0x39962b,'id':_0x3806a6[_0x186ea6(0x1df)],'resolved':_0x120db0['solved']===0x1,'dT':_0x571b60(_0x3806a6['createTimestamp']),'personId':_0x3806a6[_0x186ea6(0x1cc)],'threadId':_0x3806a6[_0x186ea6(0x1a6)]};}function _0x2d932d(_0xde81d0,_0x3379de,_0xa0f14){const _0x37f801=_0x523c32;var _0x780ccd,_0x5c0110;if(((_0x5c0110=(_0x780ccd=_0xde81d0==null?void 0x0:_0xde81d0[_0x37f801(0x1bf)])==null?void 0x0:_0x780ccd[_0x37f801(0x188)])!=null?_0x5c0110:0x0)>0x0){const _0x5309ab=(_0x4c7e82,_0xfaf77)=>({'id':_0x4c7e82['replyId'],'threadId':_0x4c7e82[_0x37f801(0x1a6)],'dT':_0x571b60(_0x4c7e82['createTimestamp']),'personId':_0x4c7e82['userId'],'resolved':_0xde81d0[_0x37f801(0x193)]===_0x560a64[_0x37f801(0x1c0)],'unitId':_0x3379de,'subUnitId':_0xa0f14,'text':JSON[_0x37f801(0x15d)](_0x4c7e82['content']),'parentId':_0xfaf77}),_0x31c47d=_0x5309ab(_0xde81d0[_0x37f801(0x1bf)][0x0]);return{..._0x31c47d,'children':_0xde81d0['replies'][_0x37f801(0x16b)](0x1)[_0x37f801(0x18f)](_0x4005b4=>_0x5309ab(_0x4005b4,_0x31c47d['id']))};}return null;}let _0x6b5dff=class{constructor(_0x184193,_0x151e82,_0x1d0121,_0x5053dc){const _0x39d7e4=_0x523c32;this[_0x39d7e4(0x15e)]=_0x184193,this[_0x39d7e4(0x17d)]=_0x151e82,this[_0x39d7e4(0x1a0)]=_0x1d0121,this[_0x39d7e4(0x167)]=_0x5053dc;}async['addComment'](_0x58e7cd){const _0x4410ae=_0x523c32;var _0x367885,_0x2fa9dd;const {parentId:_0x1820b9,unitId:_0x2032e1,text:_0x26360d,threadId:_0x217f3e}=_0x58e7cd,_0xe85873=(_0x2fa9dd=(_0x367885=_0x26360d[_0x4410ae(0x175)])==null?void 0x0:_0x367885['filter'](_0x5d6b3e=>_0x5d6b3e['rangeType']===_0x5a4584[_0x4410ae(0x18e)]['COMMENT'])['map'](_0x543560=>_0x543560[_0x4410ae(0x1de)]))!=null?_0x2fa9dd:[],_0x4b1225=JSON[_0x4410ae(0x1db)](_0x26360d),_0x5b8c16=(await this['_sessionService'][_0x4410ae(0x17b)](_0x2032e1))[_0x4410ae(0x161)]();if(_0x1820b9){const _0x5a61fd={'memberId':_0x5b8c16,'unitId':_0x2032e1,'content':_0x4b1225,'mention':_0xe85873,'threadId':_0x217f3e},_0x4872e4=(await this[_0x4410ae(0x15e)]['post'](_0x4410ae(0x1cd)+_0x2032e1+_0x4410ae(0x1b5),{'body':_0x5a61fd}))[_0x4410ae(0x1e0)][_0x4410ae(0x1cb)];return{..._0x58e7cd,'id':_0x4872e4[_0x4410ae(0x1df)],'dT':_0x5a4584['dayjs'](+_0x4872e4[_0x4410ae(0x1c1)])[_0x4410ae(0x1bd)](_0x4410ae(0x16c)),'personId':_0x4872e4[_0x4410ae(0x1cc)]};}else{const _0x426e7c={'memberId':_0x5b8c16,'unitId':_0x2032e1,'content':_0x4b1225,'mention':_0xe85873},_0x571881=await this[_0x4410ae(0x15e)][_0x4410ae(0x1dd)](_0x4410ae(0x1cd)+_0x2032e1+_0x4410ae(0x196),{'body':_0x426e7c});return _0x5aea21(_0x571881[_0x4410ae(0x1e0)][_0x4410ae(0x18d)],_0x58e7cd);}}async[_0x523c32(0x15f)](_0x355415){const _0x1d1911=_0x523c32;var _0x4692f9,_0x5c5c00;const {text:_0x3ba571,unitId:_0x15d66a}=_0x355415,_0xc8b0a8=(_0x5c5c00=(_0x4692f9=_0x3ba571[_0x1d1911(0x175)])==null?void 0x0:_0x4692f9[_0x1d1911(0x18b)](_0x1c0372=>_0x1c0372['rangeType']===_0x5a4584['CustomRangeType']['COMMENT'])[_0x1d1911(0x18f)](_0x408293=>_0x408293['rangeId']))!=null?_0x5c5c00:[],_0x4a15b6=JSON[_0x1d1911(0x1db)](_0x3ba571),_0x3449e7=_0x355415[_0x1d1911(0x1a6)],_0x45d0bc=_0x355415['id'],_0x1a490c={'memberId':(await this[_0x1d1911(0x1a0)][_0x1d1911(0x17b)](_0x15d66a))['getMemberID'](),'unitId':_0x15d66a,'threadId':_0x3449e7,'mention':_0xc8b0a8,'content':_0x4a15b6,'replyId':_0x45d0bc},_0x359370=await this[_0x1d1911(0x15e)]['post'](_0x1d1911(0x1cd)+_0x15d66a+_0x1d1911(0x1d1),{'body':_0x1a490c});return!_0x359370['body'][_0x1d1911(0x1a4)]||_0x359370[_0x1d1911(0x1e0)]['error'][_0x1d1911(0x177)]===0x1;}async[_0x523c32(0x1b9)](_0x2c62f1){const _0x3a96e7=_0x523c32,{unitId:_0x241de6}=_0x2c62f1,_0x317ed7=_0x2c62f1[_0x3a96e7(0x1a6)],_0x430810={'memberId':this[_0x3a96e7(0x17d)]['getCurrentUser']()[_0x3a96e7(0x17e)],'unitId':_0x241de6,'threadId':_0x317ed7,'solved':_0x2c62f1[_0x3a96e7(0x1d5)]?_0x560a64[_0x3a96e7(0x1c0)]:_0x560a64[_0x3a96e7(0x191)]},_0xd4c93b=await this[_0x3a96e7(0x15e)][_0x3a96e7(0x1dd)](_0x3a96e7(0x1cd)+_0x241de6+_0x3a96e7(0x19e),{'body':_0x430810});return!_0xd4c93b[_0x3a96e7(0x1e0)][_0x3a96e7(0x1a4)]||_0xd4c93b[_0x3a96e7(0x1e0)][_0x3a96e7(0x1a4)]['code']===0x1;}async['deleteComment'](_0x49256c,_0x4ec05c,_0x18ff4c,_0x1f74f7){const _0x4f5490=_0x523c32,_0x865bfb={'memberId':(await this['_sessionService'][_0x4f5490(0x17b)](_0x49256c))[_0x4f5490(0x161)](),'threadId':_0x18ff4c,'replyId':_0x1f74f7,'unitId':_0x49256c},_0x2c2329=await this['_httpService'][_0x4f5490(0x1dd)](_0x4f5490(0x1cd)+_0x49256c+_0x4f5490(0x1a5),{'body':_0x865bfb});return!_0x2c2329[_0x4f5490(0x1e0)][_0x4f5490(0x1a4)]||_0x2c2329[_0x4f5490(0x1e0)][_0x4f5490(0x1a4)][_0x4f5490(0x177)]===0x1;}async[_0x523c32(0x16f)](_0x2cf57a,_0x1824d7,_0x13418d){const _0x3eb49a=_0x523c32,_0x482ddd={'unitId':_0x2cf57a,'threadId':_0x13418d},_0xb8653d=await this[_0x3eb49a(0x15e)]['post'](_0x3eb49a(0x1cd)+_0x2cf57a+'/list',{'body':_0x482ddd}),_0x1019f2=_0x13418d[_0x3eb49a(0x18f)](_0x3da56a=>_0x2d932d(_0xb8653d[_0x3eb49a(0x1e0)]['comments'][_0x3da56a],_0x2cf57a,_0x1824d7))[_0x3eb49a(0x18b)](Boolean);return Object[_0x3eb49a(0x165)](_0xb8653d['body'][_0x3eb49a(0x185)])[_0x3eb49a(0x192)](_0x54c671=>{const _0x3aa476=_0x3eb49a;this[_0x3aa476(0x17d)][_0x3aa476(0x1d0)](_0x54c671);}),_0x1019f2;}[_0x523c32(0x1d2)](_0x5e8519){const _0x34494b=_0x523c32;return{'id':_0x5e8519['id'],'threadId':_0x5e8519[_0x34494b(0x1a6)],'ref':_0x5e8519[_0x34494b(0x1ad)]};}};_0x6b5dff=_0x1013b6([_0x2ad279(0x0,_0x5a4584[_0x523c32(0x16e)](_0x5eae30[_0x523c32(0x181)])),_0x2ad279(0x1,_0x5a4584[_0x523c32(0x16e)](_0x5a4584[_0x523c32(0x170)])),_0x2ad279(0x2,_0x5a4584['Inject'](_0x3114cb[_0x523c32(0x1ae)])),_0x2ad279(0x3,_0x5a4584[_0x523c32(0x16e)](_0x5a4584[_0x523c32(0x197)]))],_0x6b5dff);var _0x47818f=Object[_0x523c32(0x1bc)],_0x1d7b98=(_0x435dde,_0x2446ba,_0x1adb9d,_0xa54e68)=>{const _0xdaf0fa=_0x523c32;for(var _0x484cc2=_0xa54e68>0x1?void 0x0:_0xa54e68?_0x47818f(_0x2446ba,_0x1adb9d):_0x2446ba,_0xabb17b=_0x435dde[_0xdaf0fa(0x188)]-0x1,_0x1cc669;_0xabb17b>=0x0;_0xabb17b--)(_0x1cc669=_0x435dde[_0xabb17b])&&(_0x484cc2=_0x1cc669(_0x484cc2)||_0x484cc2);return _0x484cc2;},_0x48d4dc=(_0x110433,_0xd394e7)=>(_0x13d46d,_0x18a322)=>_0xd394e7(_0x13d46d,_0x18a322,_0x110433);let _0x3d2a45=class extends _0x5a4584['Disposable']{constructor(_0x24338f,_0x1b343a){const _0x396fd7=_0x523c32;super(),this[_0x396fd7(0x1b4)]=_0x24338f,this[_0x396fd7(0x1b8)]=_0x1b343a,this[_0x396fd7(0x1be)]();}[_0x523c32(0x1be)](){const _0x353d0e=_0x523c32;this[_0x353d0e(0x1b4)]['dataSource']=this[_0x353d0e(0x1b8)],this[_0x353d0e(0x1b4)][_0x353d0e(0x1e2)]=!0x1;}};_0x3d2a45=_0x1d7b98([_0x48d4dc(0x0,_0x1d5bd1[_0x523c32(0x176)]),_0x48d4dc(0x1,_0x5a4584[_0x523c32(0x16e)](_0x6b5dff))],_0x3d2a45);var _0x21e692=Object[_0x523c32(0x198)],_0x376899=Object[_0x523c32(0x1bc)],_0x12c9b0=(_0x54e692,_0x5c3a12,_0x371a2a)=>_0x5c3a12 in _0x54e692?_0x21e692(_0x54e692,_0x5c3a12,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x371a2a}):_0x54e692[_0x5c3a12]=_0x371a2a,_0x4177ba=(_0x3c85e7,_0x17ce88,_0x57c1ab,_0x28efd7)=>{const _0x108b2f=_0x523c32;for(var _0x23da03=_0x28efd7>0x1?void 0x0:_0x28efd7?_0x376899(_0x17ce88,_0x57c1ab):_0x17ce88,_0x17edd0=_0x3c85e7[_0x108b2f(0x188)]-0x1,_0xa0502d;_0x17edd0>=0x0;_0x17edd0--)(_0xa0502d=_0x3c85e7[_0x17edd0])&&(_0x23da03=_0xa0502d(_0x23da03)||_0x23da03);return _0x23da03;},_0x5259a4=(_0x1700e3,_0x1f65a4)=>(_0x1ae344,_0xe7a688)=>_0x1f65a4(_0x1ae344,_0xe7a688,_0x1700e3),_0x3e40b9=(_0x43aff6,_0x5eb7f8,_0x5195ab)=>_0x12c9b0(_0x43aff6,typeof _0x5eb7f8!='symbol'?_0x5eb7f8+'':_0x5eb7f8,_0x5195ab);_0x5f2d29['UniverThreadCommentDataSourcePlugin']=class extends _0x5a4584[_0x523c32(0x19d)]{constructor(_0x4cc9cc=_0x39a2df,_0x145dd8,_0x352bd0){const _0x299eb6=_0x523c32;super(),this[_0x299eb6(0x18c)]=_0x4cc9cc,this['_injector']=_0x145dd8,this[_0x299eb6(0x1d6)]=_0x352bd0;const {..._0x4fc6f1}=_0x5a4584['merge']({},_0x39a2df,this[_0x299eb6(0x18c)]);this[_0x299eb6(0x1d6)][_0x299eb6(0x1d8)](_0x984f58,_0x4fc6f1);}[_0x523c32(0x1a1)](){[[_0x6b5dff],[_0x3d2a45],[_0x36954c]]['forEach'](_0x5f1d0b=>{const _0x5a8e27=_0x1b96;this[_0x5a8e27(0x167)]['add'](_0x5f1d0b);});}['onReady'](){const _0x5c548e=_0x523c32;this[_0x5c548e(0x167)][_0x5c548e(0x1b0)](_0x3d2a45),this['_injector'][_0x5c548e(0x1b0)](_0x36954c);}},_0x3e40b9(_0x5f2d29[_0x523c32(0x1ba)],_0x523c32(0x1ce),_0x1891ac),_0x3e40b9(_0x5f2d29[_0x523c32(0x1ba)],_0x523c32(0x1c5),_0x5a4584[_0x523c32(0x1c9)][_0x523c32(0x1ca)]),_0x5f2d29[_0x523c32(0x1ba)]=_0x4177ba([_0x5a4584[_0x523c32(0x1cf)](_0x53ff76[_0x523c32(0x17a)],_0x3114cb[_0x523c32(0x1af)],_0xe7522b['UniverLicensePlugin']),_0x5259a4(0x1,_0x5a4584[_0x523c32(0x16e)](_0x5a4584[_0x523c32(0x197)])),_0x5259a4(0x2,_0x5a4584[_0x523c32(0x1b3)])],_0x5f2d29[_0x523c32(0x1ba)]),Object[_0x523c32(0x198)](_0x5f2d29,Symbol[_0x523c32(0x1e1)],{'value':_0x523c32(0x189)});}));function _0x1b96(_0x48bb6d,_0x225f6a){const _0xf59250=_0xf592();return _0x1b96=function(_0x1b96d1,_0x48ef0b){_0x1b96d1=_0x1b96d1-0x15d;let _0x1e17e8=_0xf59250[_0x1b96d1];return _0x1e17e8;},_0x1b96(_0x48bb6d,_0x225f6a);}function _0xf592(){const _0x48a465=['/reply','addComment','@univerjs-pro/license','_threadCommentDataSource','resolveComment','UniverThreadCommentDataSourcePlugin','49CdaOPX','getOwnPropertyDescriptor','format','_initDataSource','replies','Solved','createTimestamp','560388JndqEk','function','size','type','subscribe','personId','amd','UniverInstanceType','UNIVER_UNKNOWN','reply','userId','/universer-api/comment/unit/','pluginName','DependentOn','addUser','/edit','saveCommentToSnapshot','@univerjs/thread-comment-ui','27LMHwTo','resolved','_configService','parentId','setConfig','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','payload','stringify','Delete','post','rangeId','replyId','body','toStringTag','syncUpdateMutationToColla','disposeWithMe','parse','_httpService','updateComment','184015wghJvz','getMemberID','commentUpdate$','deleteComment','635980AvlcRI','values','/universer-api/user/list','_injector','131659TJiQAZ','597324gJBwzl','add','slice','YYYY/MM/DD\x20HH:mm','16yTLzfV','Inject','listComments','UserManagerService','UNRECOGNIZED','user','root','getComment','customRanges','IThreadCommentDataSourceService','code','getUser','_init','UniverThreadCommentUIPlugin','requireSession','content','_userService','userID','exports','find','HTTPService','@univerjs/core','_threadCommentModel','@univerjs/network','users','UniverThreadComment','486aFpQVG','length','Module','36arWYgC','filter','_config','comment','CustomRangeType','map','Solve','OpenOrReOpen','forEach','solved','UniverProLicense','276iieizD','/add','Injector','defineProperty','rxjs','@univerjs-pro/collaboration-client','ThreadCommentModel','Reply','Plugin','/solved','getUnit','_sessionService','onStarting','Disposable','Edit','error','/delete','threadId','@univerjs/thread-comment','104176pCyoJZ','pipe','_commentService','CommentService','thread-comment-data-source.config','ref','CollaborationSessionService','UniverCollaborationClientPlugin','get','Add','UniverProCollaborationClient','IConfigService','_threadCommentDataSourceService'];_0xf592=function(){return _0x48a465;};return _0xf592();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.8.1-nightly.202506161607",
3
+ "version": "0.8.1-nightly.202506181607",
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.1-nightly.202506161607",
49
- "@univerjs-pro/license": "0.8.1-nightly.202506161607",
48
+ "@univerjs-pro/license": "0.8.1-nightly.202506181607",
49
+ "@univerjs/network": "0.8.1-nightly.202506181607",
50
+ "@univerjs/core": "0.8.1-nightly.202506181607",
51
+ "@univerjs-pro/collaboration-client": "0.8.1-nightly.202506181607",
50
52
  "@univerjs/protocol": "0.1.47-alpha.0",
51
- "@univerjs/network": "0.8.1-nightly.202506161607",
52
- "@univerjs/core": "0.8.1-nightly.202506161607",
53
- "@univerjs/thread-comment": "0.8.1-nightly.202506161607",
54
- "@univerjs/thread-comment-ui": "0.8.1-nightly.202506161607"
53
+ "@univerjs/thread-comment": "0.8.1-nightly.202506181607",
54
+ "@univerjs/thread-comment-ui": "0.8.1-nightly.202506181607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",