@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202505151607 → 0.7.0-nightly.202505161607

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 _0xa0fa3b=_0x339d;(function(_0x3975f7,_0x145c70){const _0x4ca372=_0x339d,_0x336cec=_0x3975f7();while(!![]){try{const _0x142900=-parseInt(_0x4ca372(0x177))/0x1*(parseInt(_0x4ca372(0x178))/0x2)+parseInt(_0x4ca372(0x15f))/0x3+parseInt(_0x4ca372(0x190))/0x4*(-parseInt(_0x4ca372(0x186))/0x5)+-parseInt(_0x4ca372(0x1b6))/0x6+parseInt(_0x4ca372(0x17c))/0x7*(parseInt(_0x4ca372(0x1bd))/0x8)+-parseInt(_0x4ca372(0x1ad))/0x9+-parseInt(_0x4ca372(0x195))/0xa*(-parseInt(_0x4ca372(0x15d))/0xb);if(_0x142900===_0x145c70)break;else _0x336cec['push'](_0x336cec['shift']());}catch(_0x3ce330){_0x336cec['push'](_0x336cec['shift']());}}}(_0x373c,0xd335e));Object['defineProperty'](exports,Symbol[_0xa0fa3b(0x17d)],{'value':_0xa0fa3b(0x1a7)});const b=require(_0xa0fa3b(0x196)),T=require(_0xa0fa3b(0x188)),c=require(_0xa0fa3b(0x1a1)),j=require(_0xa0fa3b(0x16b)),M=require(_0xa0fa3b(0x1a2)),w=require(_0xa0fa3b(0x18f)),P=require(_0xa0fa3b(0x1ab)),U=_0xa0fa3b(0x19f);var I=(_0x163a9d=>(_0x163a9d[_0x163a9d[_0xa0fa3b(0x1b1)]=0x0]=_0xa0fa3b(0x1b1),_0x163a9d[_0x163a9d['Solved']=0x1]=_0xa0fa3b(0x194),_0x163a9d[_0x163a9d[_0xa0fa3b(0x1a5)]=-0x1]='UNRECOGNIZED',_0x163a9d))(I||{}),v=(_0x4b301f=>(_0x4b301f[_0x4b301f[_0xa0fa3b(0x18b)]=0x0]=_0xa0fa3b(0x18b),_0x4b301f[_0x4b301f[_0xa0fa3b(0x191)]=0x1]='Add',_0x4b301f[_0x4b301f[_0xa0fa3b(0x162)]=0x2]='Reply',_0x4b301f[_0x4b301f['Edit']=0x3]=_0xa0fa3b(0x1b0),_0x4b301f[_0x4b301f['Delete']=0x4]=_0xa0fa3b(0x1bb),_0x4b301f[_0x4b301f[_0xa0fa3b(0x1b2)]=0x5]=_0xa0fa3b(0x1b2),_0x4b301f[_0x4b301f[_0xa0fa3b(0x1a5)]=-0x1]=_0xa0fa3b(0x1a5),_0x4b301f))(v||{});const f=_0x54d32b=>c[_0xa0fa3b(0x154)](new Date(+_0x54d32b))[_0xa0fa3b(0x1c7)](_0xa0fa3b(0x1af)),R=async(_0x378057,_0x572d40)=>{const _0x11517=_0xa0fa3b,_0x55a1ab=_0x378057[_0x11517(0x179)](c['UserManagerService']),_0x2b8ea3=_0x378057[_0x11517(0x179)](P[_0x11517(0x187)]);_0x572d40[_0x11517(0x1a8)](_0x3dcac9=>{const _0x130785=_0x11517;_0x55a1ab[_0x130785(0x1a9)](_0x3dcac9)&&_0x572d40[_0x130785(0x15e)](_0x3dcac9);}),_0x572d40[_0x11517(0x197)]&&(await _0x2b8ea3[_0x11517(0x179)](_0x11517(0x19c),{'params':{'userIDs':[..._0x572d40]}}))[_0x11517(0x181)][_0x11517(0x1cd)]['forEach'](_0x8f2184=>{const _0x52ca30=_0x11517;_0x8f2184&&_0x55a1ab[_0x52ca30(0x1be)](_0x8f2184);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x32dd92,_0x4f0f59,_0x2a7f68,_0x2b081b)=>{const _0x6f8f1=_0xa0fa3b;for(var _0x1b9daf=_0x2b081b>0x1?void 0x0:_0x2b081b?$(_0x4f0f59,_0x2a7f68):_0x4f0f59,_0x3e7b83=_0x32dd92[_0x6f8f1(0x1c4)]-0x1,_0x266dc1;_0x3e7b83>=0x0;_0x3e7b83--)(_0x266dc1=_0x32dd92[_0x3e7b83])&&(_0x1b9daf=_0x266dc1(_0x1b9daf)||_0x1b9daf);return _0x1b9daf;},S=(_0x306c27,_0xab2978)=>(_0x26ebbb,_0x1b3611)=>_0xab2978(_0x26ebbb,_0x1b3611,_0x306c27);let p=class extends c[_0xa0fa3b(0x1a6)]{constructor(_0x1395d1,_0x9f8d7d,_0x293a38,_0x543f41){const _0x49d226=_0xa0fa3b;super(),this[_0x49d226(0x1cc)]=_0x1395d1,this[_0x49d226(0x193)]=_0x9f8d7d,this['_userService']=_0x293a38,this[_0x49d226(0x1c5)]=_0x543f41,this['_init'](),this[_0x49d226(0x170)]();}['_initUserSync'](){const _0x397f70=_0xa0fa3b;this['disposeWithMe'](this[_0x397f70(0x193)][_0x397f70(0x1c1)]['pipe'](w[_0x397f70(0x157)](0x10))['subscribe'](_0x2bb4cd=>{const _0x1e9f74=_0x397f70,_0x388f0f=new Set();_0x2bb4cd[_0x1e9f74(0x1a8)](_0x3c0908=>{const _0x4c5ec3=_0x1e9f74;switch(_0x3c0908[_0x4c5ec3(0x1ba)]){case _0x4c5ec3(0x1c2):{const _0x4eab73=_0x3c0908[_0x4c5ec3(0x164)][_0x4c5ec3(0x1b8)];_0x388f0f[_0x4c5ec3(0x1c2)](_0x4eab73);break;}}}),R(this[_0x1e9f74(0x1c5)],_0x388f0f);}));}[_0xa0fa3b(0x174)](){const _0x29dcf4=_0xa0fa3b;this[_0x29dcf4(0x1ce)](this[_0x29dcf4(0x1cc)][_0x29dcf4(0x1c1)]['subscribe'](async _0xf5ec0a=>{const _0x347551=_0x29dcf4;var _0x24fdf0,_0x49e96e,_0x148fdb,_0x3f3bd6;const _0x306463=(_0x24fdf0=this['_threadCommentModel'][_0x347551(0x19a)](_0xf5ec0a['unitId'])[_0x347551(0x185)](_0x5a3c64=>_0x5a3c64[_0x347551(0x1b5)]===_0xf5ec0a['threadId']))==null?void 0x0:_0x24fdf0['root'];if(!_0x306463)return;const {unitId:_0x4fceee,subUnitId:_0x2f56b2}=_0x306463;switch(_0xf5ec0a[_0x347551(0x184)]&&this[_0x347551(0x156)][_0x347551(0x1be)](_0xf5ec0a['user']),_0xf5ec0a[_0x347551(0x1ba)]){case v[_0x347551(0x191)]:break;case v[_0x347551(0x162)]:{this[_0x347551(0x193)][_0x347551(0x175)](_0x4fceee,_0x2f56b2,{'unitId':_0x4fceee,'subUnitId':_0x2f56b2,'ref':'','id':_0xf5ec0a[_0x347551(0x169)],'dT':f(+_0xf5ec0a[_0x347551(0x1ca)]),'threadId':_0xf5ec0a[_0x347551(0x1b5)],'personId':(_0x148fdb=(_0x49e96e=_0xf5ec0a[_0x347551(0x184)])==null?void 0x0:_0x49e96e['userID'])!=null?_0x148fdb:_0xf5ec0a['userId'],'text':JSON[_0x347551(0x161)](_0xf5ec0a[_0x347551(0x15c)]),'parentId':_0x306463['id']});break;}case v[_0x347551(0x1bb)]:{const _0x1b1969=this['_threadCommentModel'][_0x347551(0x189)](_0x4fceee,_0x2f56b2,_0xf5ec0a['replyId']);_0x1b1969&&_0x1b1969['parentId']&&this[_0x347551(0x193)][_0x347551(0x18c)](_0x4fceee,_0x2f56b2,_0xf5ec0a[_0x347551(0x169)]);break;}case v[_0x347551(0x1b0)]:{this[_0x347551(0x193)][_0x347551(0x1a4)](_0x4fceee,_0x2f56b2,{'commentId':_0xf5ec0a[_0x347551(0x169)],'text':JSON[_0x347551(0x161)](_0xf5ec0a[_0x347551(0x15c)])});break;}case v['Solve']:{const _0x20ffc5=(_0x3f3bd6=this[_0x347551(0x193)][_0x347551(0x19a)](_0xf5ec0a[_0x347551(0x17b)])[_0x347551(0x185)](_0x17fafb=>_0x17fafb[_0x347551(0x1b5)]===_0xf5ec0a[_0x347551(0x1b5)]))==null?void 0x0:_0x3f3bd6[_0x347551(0x18d)];_0x20ffc5&&this['_threadCommentModel'][_0x347551(0x1bc)](_0x4fceee,_0x2f56b2,_0x20ffc5['id'],_0xf5ec0a[_0x347551(0x17a)]===I[_0x347551(0x194)]);break;}}}));}};function _0x339d(_0x6aaa3f,_0x34a84c){const _0x373ccb=_0x373c();return _0x339d=function(_0x339d98,_0x1b010a){_0x339d98=_0x339d98-0x150;let _0x2280ac=_0x373ccb[_0x339d98];return _0x2280ac;},_0x339d(_0x6aaa3f,_0x34a84c);}p=E([S(0x0,c['Inject'](b[_0xa0fa3b(0x19e)])),S(0x1,c[_0xa0fa3b(0x150)](M[_0xa0fa3b(0x1b7)])),S(0x2,c['Inject'](c['UserManagerService'])),S(0x3,c[_0xa0fa3b(0x150)](c[_0xa0fa3b(0x155)]))],p);const q=_0xa0fa3b(0x1c6),D={};function _0x373c(){const _0x50ba59=['get','solved','unitId','77ptIgQt','toStringTag','getMemberID','setConfig','UniverThreadCommentDataSourcePlugin','body','CustomRangeType','code','user','find','4896665dYbSaH','HTTPService','@univerjs-pro/license','getComment','COMMENT','Unknown','deleteComment','root','/delete','rxjs','4eUyGbm','Add','/solved','_threadCommentModel','Solved','20144710XpxoYb','@univerjs-pro/collaboration-client','size','userId','onStarting','getUnit','_threadCommentDataSourceService','/universer-api/user/list','userID','CommentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','filter','@univerjs/core','@univerjs/thread-comment','onReady','updateComment','UNRECOGNIZED','Disposable','Module','forEach','getUser','defineProperty','@univerjs/network','UniverLicensePlugin','368712ngVTcR','/universer-api/comment/unit/','YYYY/MM/DD\x20HH:mm','Edit','OpenOrReOpen','Solve','_config','CollaborationSessionService','threadId','7001724gHnLIP','ThreadCommentModel','personId','_configService','type','Delete','resolveComment','720152PdvONs','addUser','map','comments','commentUpdate$','add','values','length','_injector','thread-comment-data-source.config','format','stringify','rangeType','createTimestamp','merge','_commentService','users','disposeWithMe','error','Inject','dataSource','requireSession','ref','dayjs','Injector','_userService','bufferTime','saveCommentToSnapshot','/list','symbol','replies','content','11hXUGWa','delete','1597740CGSldc','getOwnPropertyDescriptor','parse','Reply','UniverInstanceType','payload','_threadCommentDataSource','_httpService','UniverCollaborationClientPlugin','post','replyId','_initDataSource','@univerjs/thread-comment-ui','listComments','IConfigService','_sessionService','/edit','_initUserSync','rangeId','customRanges','UniverThreadCommentUIPlugin','_init','addComment','getCurrentUser','484887niZgan','2qpSbTA'];_0x373c=function(){return _0x50ba59;};return _0x373c();}var A=Object['getOwnPropertyDescriptor'],x=(_0x907657,_0x400d34,_0x1f9232,_0x1f4bdc)=>{const _0x420433=_0xa0fa3b;for(var _0x48bf7b=_0x1f4bdc>0x1?void 0x0:_0x1f4bdc?A(_0x400d34,_0x1f9232):_0x400d34,_0x20ac40=_0x907657[_0x420433(0x1c4)]-0x1,_0x8b6f17;_0x20ac40>=0x0;_0x20ac40--)(_0x8b6f17=_0x907657[_0x20ac40])&&(_0x48bf7b=_0x8b6f17(_0x48bf7b)||_0x48bf7b);return _0x48bf7b;},_=(_0x1f2af6,_0x9c5661)=>(_0xa3a6ce,_0xe5677f)=>_0x9c5661(_0xa3a6ce,_0xe5677f,_0x1f2af6);function Y(_0x3e3d35,_0x125cfa){const _0x1a0da7=_0xa0fa3b,_0x294c91=_0x3e3d35[_0x1a0da7(0x15b)][0x0];return{..._0x125cfa,'id':_0x294c91[_0x1a0da7(0x169)],'resolved':_0x3e3d35[_0x1a0da7(0x17a)]===0x1,'dT':f(_0x294c91[_0x1a0da7(0x1ca)]),'personId':_0x294c91[_0x1a0da7(0x198)],'threadId':_0x294c91['threadId']};}function G(_0x542494,_0x591cd8,_0x5d475e){const _0x513e50=_0xa0fa3b;var _0x4fd4ab,_0x5e7ef1;if(((_0x5e7ef1=(_0x4fd4ab=_0x542494==null?void 0x0:_0x542494[_0x513e50(0x15b)])==null?void 0x0:_0x4fd4ab['length'])!=null?_0x5e7ef1:0x0)>0x0){const _0x279be6=(_0x47d089,_0x2d19af)=>({'id':_0x47d089[_0x513e50(0x169)],'threadId':_0x47d089['threadId'],'dT':f(_0x47d089[_0x513e50(0x1ca)]),'personId':_0x47d089[_0x513e50(0x198)],'resolved':_0x542494[_0x513e50(0x17a)]===I['Solved'],'unitId':_0x591cd8,'subUnitId':_0x5d475e,'text':JSON[_0x513e50(0x161)](_0x47d089[_0x513e50(0x15c)]),'parentId':_0x2d19af}),_0xaa1a76=_0x279be6(_0x542494[_0x513e50(0x15b)][0x0]);return{..._0xaa1a76,'children':_0x542494[_0x513e50(0x15b)]['slice'](0x1)['map'](_0x22aa2c=>_0x279be6(_0x22aa2c,_0xaa1a76['id']))};}return null;}let g=class{constructor(_0x1c6a55,_0x43cfff,_0x93c214,_0x3d0e2b){const _0x1d6316=_0xa0fa3b;this[_0x1d6316(0x166)]=_0x1c6a55,this[_0x1d6316(0x156)]=_0x43cfff,this[_0x1d6316(0x16e)]=_0x93c214,this['_injector']=_0x3d0e2b;}async[_0xa0fa3b(0x175)](_0x2ed79f){const _0xb0066a=_0xa0fa3b;var _0x12e5ea,_0x5da371;const {parentId:_0x38be63,unitId:_0xb81520,text:_0x1e40f1,threadId:_0x10aa18}=_0x2ed79f,_0x5d5def=(_0x5da371=(_0x12e5ea=_0x1e40f1[_0xb0066a(0x172)])==null?void 0x0:_0x12e5ea[_0xb0066a(0x1a0)](_0xa5797f=>_0xa5797f[_0xb0066a(0x1c9)]===c['CustomRangeType'][_0xb0066a(0x18a)])[_0xb0066a(0x1bf)](_0x17a958=>_0x17a958[_0xb0066a(0x171)]))!=null?_0x5da371:[],_0x3310f8=JSON[_0xb0066a(0x1c8)](_0x1e40f1),_0x15e0af=(await this[_0xb0066a(0x16e)][_0xb0066a(0x152)](_0xb81520))[_0xb0066a(0x17e)]();if(_0x38be63){const _0x4c58a1={'memberId':_0x15e0af,'unitId':_0xb81520,'content':_0x3310f8,'mention':_0x5d5def,'threadId':_0x10aa18},_0x49ee2e=(await this[_0xb0066a(0x166)][_0xb0066a(0x168)](_0xb0066a(0x1ae)+_0xb81520+'/reply',{'body':_0x4c58a1}))[_0xb0066a(0x181)]['reply'];return{..._0x2ed79f,'id':_0x49ee2e['replyId'],'dT':c[_0xb0066a(0x154)](+_0x49ee2e[_0xb0066a(0x1ca)])[_0xb0066a(0x1c7)](_0xb0066a(0x1af)),'personId':_0x49ee2e[_0xb0066a(0x198)]};}else{const _0x29dd9c={'memberId':_0x15e0af,'unitId':_0xb81520,'content':_0x3310f8,'mention':_0x5d5def},_0x209307=await this[_0xb0066a(0x166)]['post'](_0xb0066a(0x1ae)+_0xb81520+'/add',{'body':_0x29dd9c});return Y(_0x209307[_0xb0066a(0x181)]['comment'],_0x2ed79f);}}async[_0xa0fa3b(0x1a4)](_0x2312ac){const _0x20081b=_0xa0fa3b;var _0x587f2f,_0x4d51d3;const {text:_0x33ccf1,unitId:_0x5b8022}=_0x2312ac,_0x31ca88=(_0x4d51d3=(_0x587f2f=_0x33ccf1['customRanges'])==null?void 0x0:_0x587f2f[_0x20081b(0x1a0)](_0xbab391=>_0xbab391['rangeType']===c[_0x20081b(0x182)][_0x20081b(0x18a)])[_0x20081b(0x1bf)](_0x57f11b=>_0x57f11b[_0x20081b(0x171)]))!=null?_0x4d51d3:[],_0x1ec525=JSON['stringify'](_0x33ccf1),_0x3918af=_0x2312ac[_0x20081b(0x1b5)],_0x222a10=_0x2312ac['id'],_0x17c01f={'memberId':(await this['_sessionService']['requireSession'](_0x5b8022))[_0x20081b(0x17e)](),'unitId':_0x5b8022,'threadId':_0x3918af,'mention':_0x31ca88,'content':_0x1ec525,'replyId':_0x222a10},_0x592e57=await this[_0x20081b(0x166)][_0x20081b(0x168)](_0x20081b(0x1ae)+_0x5b8022+_0x20081b(0x16f),{'body':_0x17c01f});return!_0x592e57[_0x20081b(0x181)]['error']||_0x592e57[_0x20081b(0x181)]['error'][_0x20081b(0x183)]===0x1;}async['resolveComment'](_0x9d9653){const _0x2af040=_0xa0fa3b,{unitId:_0x76b739}=_0x9d9653,_0x42afd1=_0x9d9653[_0x2af040(0x1b5)],_0x7ec7f0={'memberId':this[_0x2af040(0x156)][_0x2af040(0x176)]()[_0x2af040(0x19d)],'unitId':_0x76b739,'threadId':_0x42afd1,'solved':_0x9d9653['resolved']?I[_0x2af040(0x194)]:I[_0x2af040(0x1b1)]},_0x219b86=await this[_0x2af040(0x166)][_0x2af040(0x168)](_0x2af040(0x1ae)+_0x76b739+_0x2af040(0x192),{'body':_0x7ec7f0});return!_0x219b86[_0x2af040(0x181)][_0x2af040(0x1cf)]||_0x219b86[_0x2af040(0x181)][_0x2af040(0x1cf)][_0x2af040(0x183)]===0x1;}async[_0xa0fa3b(0x18c)](_0x410e20,_0x479098,_0x28ed2d,_0x2de48f){const _0x48f258=_0xa0fa3b,_0x2cde6c={'memberId':(await this[_0x48f258(0x16e)][_0x48f258(0x152)](_0x410e20))[_0x48f258(0x17e)](),'threadId':_0x28ed2d,'replyId':_0x2de48f,'unitId':_0x410e20},_0x497ef6=await this[_0x48f258(0x166)][_0x48f258(0x168)]('/universer-api/comment/unit/'+_0x410e20+_0x48f258(0x18e),{'body':_0x2cde6c});return!_0x497ef6[_0x48f258(0x181)][_0x48f258(0x1cf)]||_0x497ef6[_0x48f258(0x181)][_0x48f258(0x1cf)][_0x48f258(0x183)]===0x1;}async[_0xa0fa3b(0x16c)](_0x366488,_0x2f1966,_0x3b98cf){const _0xf9cf79=_0xa0fa3b,_0x40df4e={'unitId':_0x366488,'threadId':_0x3b98cf},_0x2c22cb=await this['_httpService'][_0xf9cf79(0x168)](_0xf9cf79(0x1ae)+_0x366488+_0xf9cf79(0x159),{'body':_0x40df4e}),_0x53072c=_0x3b98cf['map'](_0x4afcaa=>G(_0x2c22cb[_0xf9cf79(0x181)][_0xf9cf79(0x1c0)][_0x4afcaa],_0x366488,_0x2f1966))['filter'](Boolean);return Object[_0xf9cf79(0x1c3)](_0x2c22cb['body'][_0xf9cf79(0x1cd)])[_0xf9cf79(0x1a8)](_0xbcc9de=>{const _0xa22538=_0xf9cf79;this['_userService'][_0xa22538(0x1be)](_0xbcc9de);}),_0x53072c;}[_0xa0fa3b(0x158)](_0xebbdaa){const _0x27c9f5=_0xa0fa3b;return{'id':_0xebbdaa['id'],'threadId':_0xebbdaa[_0x27c9f5(0x1b5)],'ref':_0xebbdaa[_0x27c9f5(0x153)]};}};g=x([_(0x0,c['Inject'](P[_0xa0fa3b(0x187)])),_(0x1,c[_0xa0fa3b(0x150)](c['UserManagerService'])),_(0x2,c[_0xa0fa3b(0x150)](b[_0xa0fa3b(0x1b4)])),_(0x3,c[_0xa0fa3b(0x150)](c[_0xa0fa3b(0x155)]))],g);var H=Object[_0xa0fa3b(0x160)],J=(_0x4ac583,_0xbc1bcc,_0xc091c2,_0x65c597)=>{const _0x46d984=_0xa0fa3b;for(var _0x8336d8=_0x65c597>0x1?void 0x0:_0x65c597?H(_0xbc1bcc,_0xc091c2):_0xbc1bcc,_0x3e94ed=_0x4ac583[_0x46d984(0x1c4)]-0x1,_0x3d9f01;_0x3e94ed>=0x0;_0x3e94ed--)(_0x3d9f01=_0x4ac583[_0x3e94ed])&&(_0x8336d8=_0x3d9f01(_0x8336d8)||_0x8336d8);return _0x8336d8;},y=(_0x55863d,_0x1fc6d0)=>(_0x4b2c71,_0x17c5a7)=>_0x1fc6d0(_0x4b2c71,_0x17c5a7,_0x55863d);let C=class extends c[_0xa0fa3b(0x1a6)]{constructor(_0x48dec3,_0x3427d0){const _0x198d7a=_0xa0fa3b;super(),this[_0x198d7a(0x19b)]=_0x48dec3,this[_0x198d7a(0x165)]=_0x3427d0,this[_0x198d7a(0x16a)]();}[_0xa0fa3b(0x16a)](){const _0x1f9483=_0xa0fa3b;this[_0x1f9483(0x19b)][_0x1f9483(0x151)]=this[_0x1f9483(0x165)],this[_0x1f9483(0x19b)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0xa0fa3b(0x150)](g))],C);var F=Object[_0xa0fa3b(0x1aa)],L=Object[_0xa0fa3b(0x160)],Z=(_0x57efcd,_0x47c3fb,_0x3d0e27)=>_0x47c3fb in _0x57efcd?F(_0x57efcd,_0x47c3fb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3d0e27}):_0x57efcd[_0x47c3fb]=_0x3d0e27,W=(_0x58e867,_0x59a7db,_0x17b8af,_0x45b1d8)=>{for(var _0x575f77=_0x45b1d8>0x1?void 0x0:_0x45b1d8?L(_0x59a7db,_0x17b8af):_0x59a7db,_0x277ef3=_0x58e867['length']-0x1,_0x238556;_0x277ef3>=0x0;_0x277ef3--)(_0x238556=_0x58e867[_0x277ef3])&&(_0x575f77=_0x238556(_0x575f77)||_0x575f77);return _0x575f77;},O=(_0x22c9a8,_0x1f0be7)=>(_0x2c8b1d,_0x1f556b)=>_0x1f0be7(_0x2c8b1d,_0x1f556b,_0x22c9a8),N=(_0x205b14,_0x36ced0,_0x4ff549)=>Z(_0x205b14,typeof _0x36ced0!=_0xa0fa3b(0x15a)?_0x36ced0+'':_0x36ced0,_0x4ff549);exports[_0xa0fa3b(0x180)]=class extends c['Plugin']{constructor(_0x9543ce=D,_0x2c8610,_0x10bc5b){const _0x26e76a=_0xa0fa3b;super(),this[_0x26e76a(0x1b3)]=_0x9543ce,this['_injector']=_0x2c8610,this[_0x26e76a(0x1b9)]=_0x10bc5b;const {..._0x880a0b}=c[_0x26e76a(0x1cb)]({},D,this[_0x26e76a(0x1b3)]);this[_0x26e76a(0x1b9)][_0x26e76a(0x17f)](q,_0x880a0b);}[_0xa0fa3b(0x199)](){const _0x26c282=_0xa0fa3b;[[g],[C],[p]][_0x26c282(0x1a8)](_0x1558dc=>{const _0x493c6f=_0x26c282;this[_0x493c6f(0x1c5)][_0x493c6f(0x1c2)](_0x1558dc);});}[_0xa0fa3b(0x1a3)](){const _0x485aaa=_0xa0fa3b;this[_0x485aaa(0x1c5)][_0x485aaa(0x179)](C),this[_0x485aaa(0x1c5)][_0x485aaa(0x179)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0xa0fa3b(0x1ba),c[_0xa0fa3b(0x163)]['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](j[_0xa0fa3b(0x173)],b[_0xa0fa3b(0x167)],T[_0xa0fa3b(0x1ac)]),O(0x1,c['Inject'](c['Injector'])),O(0x2,c[_0xa0fa3b(0x16d)])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0x233612=_0x22f2;(function(_0x4f3314,_0x25f9a7){const _0x5c1f1d=_0x22f2,_0xf66fde=_0x4f3314();while(!![]){try{const _0x500b0d=parseInt(_0x5c1f1d(0x24d))/0x1+-parseInt(_0x5c1f1d(0x1f7))/0x2*(parseInt(_0x5c1f1d(0x246))/0x3)+parseInt(_0x5c1f1d(0x208))/0x4+parseInt(_0x5c1f1d(0x24f))/0x5*(-parseInt(_0x5c1f1d(0x1f1))/0x6)+parseInt(_0x5c1f1d(0x251))/0x7*(-parseInt(_0x5c1f1d(0x22f))/0x8)+parseInt(_0x5c1f1d(0x20b))/0x9+-parseInt(_0x5c1f1d(0x222))/0xa;if(_0x500b0d===_0x25f9a7)break;else _0xf66fde['push'](_0xf66fde['shift']());}catch(_0x55d7af){_0xf66fde['push'](_0xf66fde['shift']());}}}(_0x5185,0xb4bb7));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x233612(0x1e6)});function _0x22f2(_0xc31f51,_0x538bb0){const _0x5185e1=_0x5185();return _0x22f2=function(_0x22f23c,_0x3bbe7d){_0x22f23c=_0x22f23c-0x1e3;let _0x1ec4a9=_0x5185e1[_0x22f23c];return _0x1ec4a9;},_0x22f2(_0xc31f51,_0x538bb0);}const b=require(_0x233612(0x25d)),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require(_0x233612(0x1eb)),M=require(_0x233612(0x1ec)),w=require(_0x233612(0x25c)),P=require('@univerjs/network'),U=_0x233612(0x1f5);var I=(_0x2fe11b=>(_0x2fe11b[_0x2fe11b[_0x233612(0x23f)]=0x0]=_0x233612(0x23f),_0x2fe11b[_0x2fe11b['Solved']=0x1]=_0x233612(0x203),_0x2fe11b[_0x2fe11b[_0x233612(0x247)]=-0x1]=_0x233612(0x247),_0x2fe11b))(I||{}),v=(_0xd7380c=>(_0xd7380c[_0xd7380c[_0x233612(0x253)]=0x0]=_0x233612(0x253),_0xd7380c[_0xd7380c['Add']=0x1]=_0x233612(0x22d),_0xd7380c[_0xd7380c['Reply']=0x2]=_0x233612(0x257),_0xd7380c[_0xd7380c[_0x233612(0x241)]=0x3]=_0x233612(0x241),_0xd7380c[_0xd7380c[_0x233612(0x1ee)]=0x4]=_0x233612(0x1ee),_0xd7380c[_0xd7380c[_0x233612(0x225)]=0x5]=_0x233612(0x225),_0xd7380c[_0xd7380c[_0x233612(0x247)]=-0x1]=_0x233612(0x247),_0xd7380c))(v||{});const f=_0x3deb1d=>c[_0x233612(0x243)](new Date(+_0x3deb1d))['format'](_0x233612(0x229)),R=async(_0x2541f9,_0x5e465f)=>{const _0x4ab893=_0x233612,_0x3e44a4=_0x2541f9[_0x4ab893(0x21c)](c[_0x4ab893(0x23c)]),_0x1ff8ba=_0x2541f9[_0x4ab893(0x21c)](P[_0x4ab893(0x242)]);_0x5e465f[_0x4ab893(0x250)](_0x5ebc2f=>{const _0x147c63=_0x4ab893;_0x3e44a4[_0x147c63(0x22a)](_0x5ebc2f)&&_0x5e465f[_0x147c63(0x211)](_0x5ebc2f);}),_0x5e465f[_0x4ab893(0x21b)]&&(await _0x1ff8ba['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x5e465f]}}))[_0x4ab893(0x213)][_0x4ab893(0x21a)][_0x4ab893(0x250)](_0x58d94d=>{const _0x291f03=_0x4ab893;_0x58d94d&&_0x3e44a4[_0x291f03(0x209)](_0x58d94d);});};var $=Object[_0x233612(0x228)],E=(_0x25f2d2,_0x47d4e9,_0x1605d5,_0x407a8a)=>{const _0x154c33=_0x233612;for(var _0x20f72c=_0x407a8a>0x1?void 0x0:_0x407a8a?$(_0x47d4e9,_0x1605d5):_0x47d4e9,_0x56713a=_0x25f2d2[_0x154c33(0x24a)]-0x1,_0x1461c7;_0x56713a>=0x0;_0x56713a--)(_0x1461c7=_0x25f2d2[_0x56713a])&&(_0x20f72c=_0x1461c7(_0x20f72c)||_0x20f72c);return _0x20f72c;},S=(_0x5d7ea1,_0x114359)=>(_0x5e7e5e,_0x182b48)=>_0x114359(_0x5e7e5e,_0x182b48,_0x5d7ea1);function _0x5185(){const _0x1f717b=['createTimestamp','resolved','resolveComment','Module','disposeWithMe','add','UniverThreadCommentUIPlugin','userID','@univerjs/thread-comment-ui','@univerjs/thread-comment','addComment','Delete','filter','replyId','6Yaygmv','pipe','rangeType','_commentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','type','4maojRu','content','Plugin','parse','comments','slice','/universer-api/comment/unit/','parentId','_threadCommentDataSource','_configService','requireSession','values','Solved','error','stringify','listComments','dataSource','4902980qAWFrr','addUser','unitId','12677616uCCKfO','_initUserSync','map','merge','rangeId','user','delete','Disposable','body','_injector','replies','Inject','getUnit','syncUpdateMutationToColla','payload','users','size','get','getMemberID','defineProperty','solved','pluginName','root','22956970TyqRih','UniverCollaborationClientPlugin','personId','Solve','code','_userService','getOwnPropertyDescriptor','YYYY/MM/DD\x20HH:mm','getUser','customRanges','onReady','Add','threadId','16XNwQro','UniverThreadCommentDataSourcePlugin','UniverInstanceType','_threadCommentModel','_httpService','comment','thread-comment-data-source.config','/delete','_config','subscribe','ref','UNIVER_UNKNOWN','commentUpdate$','UserManagerService','format','_sessionService','OpenOrReOpen','symbol','Edit','HTTPService','dayjs','getCurrentUser','userId','94641ybIjdF','UNRECOGNIZED','Injector','IConfigService','length','/edit','deleteComment','994375CEdOkx','_threadCommentDataSourceService','569570DCTjgl','forEach','1455160CuHcDg','/add','Unknown','bufferTime','_init','CustomRangeType','Reply','CollaborationSessionService','post','updateComment','COMMENT','rxjs','@univerjs-pro/collaboration-client'];_0x5185=function(){return _0x1f717b;};return _0x5185();}let p=class extends c[_0x233612(0x212)]{constructor(_0x2a6d85,_0x480a59,_0x39a318,_0x24686d){const _0x585a87=_0x233612;super(),this[_0x585a87(0x1f4)]=_0x2a6d85,this[_0x585a87(0x232)]=_0x480a59,this['_userService']=_0x39a318,this['_injector']=_0x24686d,this[_0x585a87(0x255)](),this[_0x585a87(0x20c)]();}[_0x233612(0x20c)](){const _0x6a6c48=_0x233612;this[_0x6a6c48(0x1e7)](this['_threadCommentModel'][_0x6a6c48(0x23b)][_0x6a6c48(0x1f2)](w[_0x6a6c48(0x254)](0x10))['subscribe'](_0xced36d=>{const _0x310b7d=_0x6a6c48,_0x40f7b2=new Set();_0xced36d[_0x310b7d(0x250)](_0x572fb1=>{const _0xb715b0=_0x310b7d;switch(_0x572fb1[_0xb715b0(0x1f6)]){case _0xb715b0(0x1e8):{const _0x163193=_0x572fb1[_0xb715b0(0x219)][_0xb715b0(0x224)];_0x40f7b2[_0xb715b0(0x1e8)](_0x163193);break;}}}),R(this[_0x310b7d(0x214)],_0x40f7b2);}));}[_0x233612(0x255)](){const _0x5429fd=_0x233612;this['disposeWithMe'](this[_0x5429fd(0x1f4)][_0x5429fd(0x23b)][_0x5429fd(0x238)](async _0x530729=>{const _0x522299=_0x5429fd;var _0x4d802a,_0x7c49f,_0x4b3e12,_0x361c4f;const _0x76dde=(_0x4d802a=this[_0x522299(0x232)][_0x522299(0x217)](_0x530729['unitId'])['find'](_0x410b40=>_0x410b40[_0x522299(0x22e)]===_0x530729[_0x522299(0x22e)]))==null?void 0x0:_0x4d802a['root'];if(!_0x76dde)return;const {unitId:_0x2e997c,subUnitId:_0x3be476}=_0x76dde;switch(_0x530729[_0x522299(0x210)]&&this['_userService']['addUser'](_0x530729['user']),_0x530729[_0x522299(0x1f6)]){case v[_0x522299(0x22d)]:break;case v[_0x522299(0x257)]:{this[_0x522299(0x232)][_0x522299(0x1ed)](_0x2e997c,_0x3be476,{'unitId':_0x2e997c,'subUnitId':_0x3be476,'ref':'','id':_0x530729['replyId'],'dT':f(+_0x530729[_0x522299(0x1e3)]),'threadId':_0x530729[_0x522299(0x22e)],'personId':(_0x4b3e12=(_0x7c49f=_0x530729[_0x522299(0x210)])==null?void 0x0:_0x7c49f['userID'])!=null?_0x4b3e12:_0x530729['userId'],'text':JSON['parse'](_0x530729[_0x522299(0x1f8)]),'parentId':_0x76dde['id']});break;}case v['Delete']:{const _0x2fe960=this[_0x522299(0x232)]['getComment'](_0x2e997c,_0x3be476,_0x530729[_0x522299(0x1f0)]);_0x2fe960&&_0x2fe960[_0x522299(0x1fe)]&&this[_0x522299(0x232)][_0x522299(0x24c)](_0x2e997c,_0x3be476,_0x530729[_0x522299(0x1f0)]);break;}case v[_0x522299(0x241)]:{this[_0x522299(0x232)][_0x522299(0x25a)](_0x2e997c,_0x3be476,{'commentId':_0x530729[_0x522299(0x1f0)],'text':JSON['parse'](_0x530729[_0x522299(0x1f8)])});break;}case v[_0x522299(0x225)]:{const _0x5963ba=(_0x361c4f=this[_0x522299(0x232)]['getUnit'](_0x530729[_0x522299(0x20a)])['find'](_0x4d7e67=>_0x4d7e67['threadId']===_0x530729[_0x522299(0x22e)]))==null?void 0x0:_0x361c4f[_0x522299(0x221)];_0x5963ba&&this[_0x522299(0x232)][_0x522299(0x1e5)](_0x2e997c,_0x3be476,_0x5963ba['id'],_0x530729[_0x522299(0x21f)]===I['Solved']);break;}}}));}};p=E([S(0x0,c['Inject'](b['CommentService'])),S(0x1,c[_0x233612(0x216)](M['ThreadCommentModel'])),S(0x2,c[_0x233612(0x216)](c[_0x233612(0x23c)])),S(0x3,c[_0x233612(0x216)](c['Injector']))],p);const q=_0x233612(0x235),D={};var A=Object[_0x233612(0x228)],x=(_0x442f4a,_0x45f50d,_0x834657,_0xd505d3)=>{const _0x8eb6a8=_0x233612;for(var _0x174d37=_0xd505d3>0x1?void 0x0:_0xd505d3?A(_0x45f50d,_0x834657):_0x45f50d,_0x5c3f84=_0x442f4a[_0x8eb6a8(0x24a)]-0x1,_0x2679fa;_0x5c3f84>=0x0;_0x5c3f84--)(_0x2679fa=_0x442f4a[_0x5c3f84])&&(_0x174d37=_0x2679fa(_0x174d37)||_0x174d37);return _0x174d37;},_=(_0x427785,_0x2b9748)=>(_0xac2876,_0x3e0bc3)=>_0x2b9748(_0xac2876,_0x3e0bc3,_0x427785);function Y(_0x2c86eb,_0x5e4056){const _0x37e9b5=_0x233612,_0xfab92=_0x2c86eb[_0x37e9b5(0x215)][0x0];return{..._0x5e4056,'id':_0xfab92[_0x37e9b5(0x1f0)],'resolved':_0x2c86eb[_0x37e9b5(0x21f)]===0x1,'dT':f(_0xfab92[_0x37e9b5(0x1e3)]),'personId':_0xfab92['userId'],'threadId':_0xfab92['threadId']};}function G(_0xd47af3,_0x4e521e,_0x3f7036){const _0xd3963b=_0x233612;var _0x352adf,_0x241dfa;if(((_0x241dfa=(_0x352adf=_0xd47af3==null?void 0x0:_0xd47af3[_0xd3963b(0x215)])==null?void 0x0:_0x352adf[_0xd3963b(0x24a)])!=null?_0x241dfa:0x0)>0x0){const _0x5a5326=(_0x5c062a,_0xc6266f)=>({'id':_0x5c062a[_0xd3963b(0x1f0)],'threadId':_0x5c062a[_0xd3963b(0x22e)],'dT':f(_0x5c062a[_0xd3963b(0x1e3)]),'personId':_0x5c062a[_0xd3963b(0x245)],'resolved':_0xd47af3[_0xd3963b(0x21f)]===I['Solved'],'unitId':_0x4e521e,'subUnitId':_0x3f7036,'text':JSON[_0xd3963b(0x1fa)](_0x5c062a[_0xd3963b(0x1f8)]),'parentId':_0xc6266f}),_0x389851=_0x5a5326(_0xd47af3[_0xd3963b(0x215)][0x0]);return{..._0x389851,'children':_0xd47af3['replies'][_0xd3963b(0x1fc)](0x1)['map'](_0x205dc5=>_0x5a5326(_0x205dc5,_0x389851['id']))};}return null;}let g=class{constructor(_0x870b9c,_0x460ad0,_0x441476,_0x426f1c){const _0xffb88=_0x233612;this[_0xffb88(0x233)]=_0x870b9c,this[_0xffb88(0x227)]=_0x460ad0,this[_0xffb88(0x23e)]=_0x441476,this[_0xffb88(0x214)]=_0x426f1c;}async[_0x233612(0x1ed)](_0x15d7e0){const _0x28f652=_0x233612;var _0x406194,_0x1cc1af;const {parentId:_0x3a2e16,unitId:_0xb7f8a4,text:_0x1dbacc,threadId:_0x443840}=_0x15d7e0,_0x27c346=(_0x1cc1af=(_0x406194=_0x1dbacc['customRanges'])==null?void 0x0:_0x406194[_0x28f652(0x1ef)](_0x5a440b=>_0x5a440b[_0x28f652(0x1f3)]===c[_0x28f652(0x256)][_0x28f652(0x25b)])['map'](_0x21d089=>_0x21d089['rangeId']))!=null?_0x1cc1af:[],_0x1357dc=JSON[_0x28f652(0x205)](_0x1dbacc),_0x4edbe7=(await this[_0x28f652(0x23e)]['requireSession'](_0xb7f8a4))[_0x28f652(0x21d)]();if(_0x3a2e16){const _0x2a919e={'memberId':_0x4edbe7,'unitId':_0xb7f8a4,'content':_0x1357dc,'mention':_0x27c346,'threadId':_0x443840},_0x4f3def=(await this[_0x28f652(0x233)][_0x28f652(0x259)](_0x28f652(0x1fd)+_0xb7f8a4+'/reply',{'body':_0x2a919e}))[_0x28f652(0x213)]['reply'];return{..._0x15d7e0,'id':_0x4f3def[_0x28f652(0x1f0)],'dT':c[_0x28f652(0x243)](+_0x4f3def[_0x28f652(0x1e3)])[_0x28f652(0x23d)](_0x28f652(0x229)),'personId':_0x4f3def[_0x28f652(0x245)]};}else{const _0x55c9a7={'memberId':_0x4edbe7,'unitId':_0xb7f8a4,'content':_0x1357dc,'mention':_0x27c346},_0x1d94c4=await this[_0x28f652(0x233)]['post'](_0x28f652(0x1fd)+_0xb7f8a4+_0x28f652(0x252),{'body':_0x55c9a7});return Y(_0x1d94c4[_0x28f652(0x213)][_0x28f652(0x234)],_0x15d7e0);}}async['updateComment'](_0x32e1ab){const _0x22a2a7=_0x233612;var _0x1cb374,_0x1b5369;const {text:_0x120de6,unitId:_0xc0f58b}=_0x32e1ab,_0x129ea5=(_0x1b5369=(_0x1cb374=_0x120de6[_0x22a2a7(0x22b)])==null?void 0x0:_0x1cb374[_0x22a2a7(0x1ef)](_0x251c09=>_0x251c09[_0x22a2a7(0x1f3)]===c[_0x22a2a7(0x256)][_0x22a2a7(0x25b)])[_0x22a2a7(0x20d)](_0x11d3b6=>_0x11d3b6[_0x22a2a7(0x20f)]))!=null?_0x1b5369:[],_0x4af19d=JSON[_0x22a2a7(0x205)](_0x120de6),_0x50c34a=_0x32e1ab[_0x22a2a7(0x22e)],_0x163008=_0x32e1ab['id'],_0x282f71={'memberId':(await this[_0x22a2a7(0x23e)][_0x22a2a7(0x201)](_0xc0f58b))['getMemberID'](),'unitId':_0xc0f58b,'threadId':_0x50c34a,'mention':_0x129ea5,'content':_0x4af19d,'replyId':_0x163008},_0x1904ae=await this[_0x22a2a7(0x233)][_0x22a2a7(0x259)](_0x22a2a7(0x1fd)+_0xc0f58b+_0x22a2a7(0x24b),{'body':_0x282f71});return!_0x1904ae['body'][_0x22a2a7(0x204)]||_0x1904ae[_0x22a2a7(0x213)][_0x22a2a7(0x204)][_0x22a2a7(0x226)]===0x1;}async['resolveComment'](_0x5d0ef3){const _0x4056a2=_0x233612,{unitId:_0x5b0467}=_0x5d0ef3,_0x5925af=_0x5d0ef3['threadId'],_0x58786b={'memberId':this[_0x4056a2(0x227)][_0x4056a2(0x244)]()[_0x4056a2(0x1ea)],'unitId':_0x5b0467,'threadId':_0x5925af,'solved':_0x5d0ef3[_0x4056a2(0x1e4)]?I[_0x4056a2(0x203)]:I[_0x4056a2(0x23f)]},_0x5f441a=await this[_0x4056a2(0x233)][_0x4056a2(0x259)](_0x4056a2(0x1fd)+_0x5b0467+'/solved',{'body':_0x58786b});return!_0x5f441a[_0x4056a2(0x213)][_0x4056a2(0x204)]||_0x5f441a[_0x4056a2(0x213)]['error'][_0x4056a2(0x226)]===0x1;}async[_0x233612(0x24c)](_0x4fd157,_0x45ad58,_0x5440e2,_0xb248fd){const _0x1682a7=_0x233612,_0xd9cc49={'memberId':(await this['_sessionService']['requireSession'](_0x4fd157))[_0x1682a7(0x21d)](),'threadId':_0x5440e2,'replyId':_0xb248fd,'unitId':_0x4fd157},_0x2280d5=await this[_0x1682a7(0x233)][_0x1682a7(0x259)](_0x1682a7(0x1fd)+_0x4fd157+_0x1682a7(0x236),{'body':_0xd9cc49});return!_0x2280d5[_0x1682a7(0x213)]['error']||_0x2280d5[_0x1682a7(0x213)]['error'][_0x1682a7(0x226)]===0x1;}async[_0x233612(0x206)](_0xf3a628,_0x547bc3,_0x495987){const _0x9178cf=_0x233612,_0x34a3f0={'unitId':_0xf3a628,'threadId':_0x495987},_0x2ecd89=await this[_0x9178cf(0x233)][_0x9178cf(0x259)]('/universer-api/comment/unit/'+_0xf3a628+'/list',{'body':_0x34a3f0}),_0x42ecb7=_0x495987[_0x9178cf(0x20d)](_0x25854d=>G(_0x2ecd89['body'][_0x9178cf(0x1fb)][_0x25854d],_0xf3a628,_0x547bc3))[_0x9178cf(0x1ef)](Boolean);return Object[_0x9178cf(0x202)](_0x2ecd89['body']['users'])[_0x9178cf(0x250)](_0x4c4fbf=>{const _0x26e7ea=_0x9178cf;this[_0x26e7ea(0x227)][_0x26e7ea(0x209)](_0x4c4fbf);}),_0x42ecb7;}['saveCommentToSnapshot'](_0x31344b){const _0x36e729=_0x233612;return{'id':_0x31344b['id'],'threadId':_0x31344b[_0x36e729(0x22e)],'ref':_0x31344b[_0x36e729(0x239)]};}};g=x([_(0x0,c[_0x233612(0x216)](P[_0x233612(0x242)])),_(0x1,c[_0x233612(0x216)](c[_0x233612(0x23c)])),_(0x2,c['Inject'](b[_0x233612(0x258)])),_(0x3,c[_0x233612(0x216)](c['Injector']))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x698595,_0x3fa914,_0x35544e,_0x21dde3)=>{const _0x1039f7=_0x233612;for(var _0x5eedec=_0x21dde3>0x1?void 0x0:_0x21dde3?H(_0x3fa914,_0x35544e):_0x3fa914,_0x44ebd5=_0x698595[_0x1039f7(0x24a)]-0x1,_0x5ece2c;_0x44ebd5>=0x0;_0x44ebd5--)(_0x5ece2c=_0x698595[_0x44ebd5])&&(_0x5eedec=_0x5ece2c(_0x5eedec)||_0x5eedec);return _0x5eedec;},y=(_0x45b5af,_0x5a0a2a)=>(_0x86ffcf,_0x3aae58)=>_0x5a0a2a(_0x86ffcf,_0x3aae58,_0x45b5af);let C=class extends c[_0x233612(0x212)]{constructor(_0x56e2d2,_0x19bd30){const _0x23981d=_0x233612;super(),this[_0x23981d(0x24e)]=_0x56e2d2,this[_0x23981d(0x1ff)]=_0x19bd30,this['_initDataSource']();}['_initDataSource'](){const _0x21dea6=_0x233612;this[_0x21dea6(0x24e)][_0x21dea6(0x207)]=this[_0x21dea6(0x1ff)],this[_0x21dea6(0x24e)][_0x21dea6(0x218)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x233612(0x216)](g))],C);var F=Object[_0x233612(0x21e)],L=Object[_0x233612(0x228)],Z=(_0x428173,_0x482c80,_0x59cf8f)=>_0x482c80 in _0x428173?F(_0x428173,_0x482c80,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x59cf8f}):_0x428173[_0x482c80]=_0x59cf8f,W=(_0x371f47,_0x235737,_0x3666c8,_0x174f32)=>{const _0x11e660=_0x233612;for(var _0x2b65e=_0x174f32>0x1?void 0x0:_0x174f32?L(_0x235737,_0x3666c8):_0x235737,_0x4e986a=_0x371f47[_0x11e660(0x24a)]-0x1,_0x57cbd6;_0x4e986a>=0x0;_0x4e986a--)(_0x57cbd6=_0x371f47[_0x4e986a])&&(_0x2b65e=_0x57cbd6(_0x2b65e)||_0x2b65e);return _0x2b65e;},O=(_0x533abe,_0x43bc27)=>(_0x342e3b,_0x2cfe7e)=>_0x43bc27(_0x342e3b,_0x2cfe7e,_0x533abe),N=(_0x43f192,_0x1954a6,_0x2fc08b)=>Z(_0x43f192,typeof _0x1954a6!=_0x233612(0x240)?_0x1954a6+'':_0x1954a6,_0x2fc08b);exports[_0x233612(0x230)]=class extends c[_0x233612(0x1f9)]{constructor(_0x4a0936=D,_0x409c83,_0x4cac2a){const _0x47d230=_0x233612;super(),this[_0x47d230(0x237)]=_0x4a0936,this['_injector']=_0x409c83,this[_0x47d230(0x200)]=_0x4cac2a;const {..._0x3a86ee}=c[_0x47d230(0x20e)]({},D,this['_config']);this[_0x47d230(0x200)]['setConfig'](q,_0x3a86ee);}['onStarting'](){const _0x2fccd7=_0x233612;[[g],[C],[p]][_0x2fccd7(0x250)](_0x3278e1=>{const _0x24af72=_0x2fccd7;this[_0x24af72(0x214)][_0x24af72(0x1e8)](_0x3278e1);});}[_0x233612(0x22c)](){const _0x31ff71=_0x233612;this[_0x31ff71(0x214)][_0x31ff71(0x21c)](C),this[_0x31ff71(0x214)][_0x31ff71(0x21c)](p);}},N(exports[_0x233612(0x230)],_0x233612(0x220),U),N(exports[_0x233612(0x230)],'type',c[_0x233612(0x231)][_0x233612(0x23a)]),exports[_0x233612(0x230)]=W([c['DependentOn'](j[_0x233612(0x1e9)],b[_0x233612(0x223)],T['UniverLicensePlugin']),O(0x1,c[_0x233612(0x216)](c[_0x233612(0x248)])),O(0x2,c[_0x233612(0x249)])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- function _0x2690(_0x275a34,_0x3fc05c){const _0x331c48=_0x331c();return _0x2690=function(_0x2690f3,_0x74ad54){_0x2690f3=_0x2690f3-0x1e0;let _0xddce5d=_0x331c48[_0x2690f3];return _0xddce5d;},_0x2690(_0x275a34,_0x3fc05c);}const _0x5f512f=_0x2690;(function(_0x55dc9d,_0x286886){const _0x34393a=_0x2690,_0x138f78=_0x55dc9d();while(!![]){try{const _0xfb5746=parseInt(_0x34393a(0x20e))/0x1+-parseInt(_0x34393a(0x1fd))/0x2+-parseInt(_0x34393a(0x23e))/0x3*(parseInt(_0x34393a(0x215))/0x4)+parseInt(_0x34393a(0x1fa))/0x5*(-parseInt(_0x34393a(0x22d))/0x6)+parseInt(_0x34393a(0x21a))/0x7+-parseInt(_0x34393a(0x228))/0x8+-parseInt(_0x34393a(0x21e))/0x9*(-parseInt(_0x34393a(0x233))/0xa);if(_0xfb5746===_0x286886)break;else _0x138f78['push'](_0x138f78['shift']());}catch(_0x31f50e){_0x138f78['push'](_0x138f78['shift']());}}}(_0x331c,0xf1342));import{CommentService as _0x4a90e7,CollaborationSessionService as _0x3972dd,UniverCollaborationClientPlugin as _0x56fb88}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x178fe6}from'@univerjs-pro/license';import{dayjs as _0x367654,UserManagerService as _0x56b3c1,Inject as _0x4134b7,Injector as _0x49d01d,Disposable as _0x70aa62,CustomRangeType as _0xcd641e,UniverInstanceType as _0x481279,DependentOn as _0x12da24,IConfigService as _0x340ede,Plugin as _0x2729e6,merge as _0x5cb88c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xc44fe2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x9f961a,IThreadCommentDataSourceService as _0x4289de}from'@univerjs/thread-comment';import{bufferTime as _0x55e3f7}from'rxjs';import{HTTPService as _0x1c96c6}from'@univerjs/network';const W=_0x5f512f(0x241);var I=(_0x4c2cd1=>(_0x4c2cd1[_0x4c2cd1[_0x5f512f(0x23a)]=0x0]=_0x5f512f(0x23a),_0x4c2cd1[_0x4c2cd1[_0x5f512f(0x1e0)]=0x1]=_0x5f512f(0x1e0),_0x4c2cd1[_0x4c2cd1[_0x5f512f(0x20d)]=-0x1]='UNRECOGNIZED',_0x4c2cd1))(I||{}),v=(_0x2aeac3=>(_0x2aeac3[_0x2aeac3[_0x5f512f(0x23b)]=0x0]='Unknown',_0x2aeac3[_0x2aeac3[_0x5f512f(0x23d)]=0x1]=_0x5f512f(0x23d),_0x2aeac3[_0x2aeac3['Reply']=0x2]='Reply',_0x2aeac3[_0x2aeac3[_0x5f512f(0x1f4)]=0x3]='Edit',_0x2aeac3[_0x2aeac3[_0x5f512f(0x206)]=0x4]='Delete',_0x2aeac3[_0x2aeac3[_0x5f512f(0x238)]=0x5]='Solve',_0x2aeac3[_0x2aeac3['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2aeac3))(v||{});const D=_0x2b6b8f=>_0x367654(new Date(+_0x2b6b8f))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x1a3d74,_0x167ee9)=>{const _0x16ce51=_0x5f512f,_0x3f7a68=_0x1a3d74[_0x16ce51(0x234)](_0x56b3c1),_0xcf6ca=_0x1a3d74[_0x16ce51(0x234)](_0x1c96c6);_0x167ee9[_0x16ce51(0x1e4)](_0x2b6f06=>{const _0x2d7d19=_0x16ce51;_0x3f7a68[_0x2d7d19(0x1e2)](_0x2b6f06)&&_0x167ee9['delete'](_0x2b6f06);}),_0x167ee9[_0x16ce51(0x21b)]&&(await _0xcf6ca[_0x16ce51(0x234)](_0x16ce51(0x207),{'params':{'userIDs':[..._0x167ee9]}}))[_0x16ce51(0x218)][_0x16ce51(0x23c)]['forEach'](_0x309d8c=>{const _0x5006a7=_0x16ce51;_0x309d8c&&_0x3f7a68[_0x5006a7(0x22e)](_0x309d8c);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x453a46,_0x2ec752,_0x13c8f1,_0x370670)=>{const _0x5b75c0=_0x5f512f;for(var _0x31b1e7=_0x370670>0x1?void 0x0:_0x370670?K(_0x2ec752,_0x13c8f1):_0x2ec752,_0x4715d7=_0x453a46[_0x5b75c0(0x21c)]-0x1,_0x2eb42b;_0x4715d7>=0x0;_0x4715d7--)(_0x2eb42b=_0x453a46[_0x4715d7])&&(_0x31b1e7=_0x2eb42b(_0x31b1e7)||_0x31b1e7);return _0x31b1e7;},p=(_0x4ed916,_0x2c56ae)=>(_0x96d4a1,_0x282a6e)=>_0x2c56ae(_0x96d4a1,_0x282a6e,_0x4ed916);let S=class extends _0x70aa62{constructor(_0x27d7a3,_0x4d403b,_0x1d5f7a,_0x5a2cd7){const _0x2a3afd=_0x5f512f;super(),this['_commentService']=_0x27d7a3,this[_0x2a3afd(0x20c)]=_0x4d403b,this[_0x2a3afd(0x230)]=_0x1d5f7a,this[_0x2a3afd(0x237)]=_0x5a2cd7,this[_0x2a3afd(0x232)](),this[_0x2a3afd(0x1f3)]();}[_0x5f512f(0x1f3)](){const _0x3f559a=_0x5f512f;this[_0x3f559a(0x1f1)](this['_threadCommentModel'][_0x3f559a(0x214)][_0x3f559a(0x1f5)](_0x55e3f7(0x10))[_0x3f559a(0x1f7)](_0x1d5704=>{const _0x2b2b07=_0x3f559a,_0xcc0146=new Set();_0x1d5704[_0x2b2b07(0x1e4)](_0x209dfc=>{const _0x4c7d7c=_0x2b2b07;switch(_0x209dfc[_0x4c7d7c(0x201)]){case _0x4c7d7c(0x227):{const _0x53c754=_0x209dfc[_0x4c7d7c(0x213)]['personId'];_0xcc0146[_0x4c7d7c(0x227)](_0x53c754);break;}}}),B(this['_injector'],_0xcc0146);}));}[_0x5f512f(0x232)](){const _0x43451a=_0x5f512f;this[_0x43451a(0x1f1)](this[_0x43451a(0x203)][_0x43451a(0x214)][_0x43451a(0x1f7)](async _0x5aa859=>{const _0x1f1ba0=_0x43451a;var _0x5ab4ed,_0x435963,_0x58ccef,_0x552987;const _0x2f931d=(_0x5ab4ed=this['_threadCommentModel']['getUnit'](_0x5aa859['unitId'])[_0x1f1ba0(0x1ec)](_0x121db5=>_0x121db5['threadId']===_0x5aa859['threadId']))==null?void 0x0:_0x5ab4ed['root'];if(!_0x2f931d)return;const {unitId:_0x3fc686,subUnitId:_0x116f72}=_0x2f931d;switch(_0x5aa859['user']&&this[_0x1f1ba0(0x230)][_0x1f1ba0(0x22e)](_0x5aa859[_0x1f1ba0(0x229)]),_0x5aa859[_0x1f1ba0(0x201)]){case v[_0x1f1ba0(0x23d)]:break;case v[_0x1f1ba0(0x22a)]:{this[_0x1f1ba0(0x20c)][_0x1f1ba0(0x208)](_0x3fc686,_0x116f72,{'unitId':_0x3fc686,'subUnitId':_0x116f72,'ref':'','id':_0x5aa859[_0x1f1ba0(0x202)],'dT':D(+_0x5aa859[_0x1f1ba0(0x239)]),'threadId':_0x5aa859[_0x1f1ba0(0x243)],'personId':(_0x58ccef=(_0x435963=_0x5aa859[_0x1f1ba0(0x229)])==null?void 0x0:_0x435963[_0x1f1ba0(0x22b)])!=null?_0x58ccef:_0x5aa859['userId'],'text':JSON['parse'](_0x5aa859[_0x1f1ba0(0x1ed)]),'parentId':_0x2f931d['id']});break;}case v[_0x1f1ba0(0x206)]:{const _0x1315e=this[_0x1f1ba0(0x20c)][_0x1f1ba0(0x244)](_0x3fc686,_0x116f72,_0x5aa859[_0x1f1ba0(0x202)]);_0x1315e&&_0x1315e[_0x1f1ba0(0x222)]&&this[_0x1f1ba0(0x20c)][_0x1f1ba0(0x1fc)](_0x3fc686,_0x116f72,_0x5aa859[_0x1f1ba0(0x202)]);break;}case v[_0x1f1ba0(0x1f4)]:{this[_0x1f1ba0(0x20c)]['updateComment'](_0x3fc686,_0x116f72,{'commentId':_0x5aa859['replyId'],'text':JSON[_0x1f1ba0(0x205)](_0x5aa859['content'])});break;}case v[_0x1f1ba0(0x238)]:{const _0x11af7e=(_0x552987=this[_0x1f1ba0(0x20c)][_0x1f1ba0(0x21f)](_0x5aa859['unitId'])['find'](_0x59a861=>_0x59a861['threadId']===_0x5aa859[_0x1f1ba0(0x243)]))==null?void 0x0:_0x552987[_0x1f1ba0(0x1f6)];_0x11af7e&&this['_threadCommentModel']['resolveComment'](_0x3fc686,_0x116f72,_0x11af7e['id'],_0x5aa859[_0x1f1ba0(0x224)]===I[_0x1f1ba0(0x1e0)]);break;}}}));}};S=V([p(0x0,_0x4134b7(_0x4a90e7)),p(0x1,_0x4134b7(_0x9f961a)),p(0x2,_0x4134b7(_0x56b3c1)),p(0x3,_0x4134b7(_0x49d01d))],S);const z=_0x5f512f(0x200),M={};var k=Object[_0x5f512f(0x235)],Q=(_0x12af47,_0x2e9fa3,_0x2970c2,_0x3f4336)=>{for(var _0x43079b=_0x3f4336>0x1?void 0x0:_0x3f4336?k(_0x2e9fa3,_0x2970c2):_0x2e9fa3,_0x3c4e8c=_0x12af47['length']-0x1,_0x302ec0;_0x3c4e8c>=0x0;_0x3c4e8c--)(_0x302ec0=_0x12af47[_0x3c4e8c])&&(_0x43079b=_0x302ec0(_0x43079b)||_0x43079b);return _0x43079b;},_=(_0x481cd1,_0x2edb55)=>(_0x3ae6eb,_0xa5f839)=>_0x2edb55(_0x3ae6eb,_0xa5f839,_0x481cd1);function X(_0x3736ca,_0x257494){const _0x3cd3af=_0x5f512f,_0x3afd22=_0x3736ca[_0x3cd3af(0x1e3)][0x0];return{..._0x257494,'id':_0x3afd22[_0x3cd3af(0x202)],'resolved':_0x3736ca[_0x3cd3af(0x224)]===0x1,'dT':D(_0x3afd22['createTimestamp']),'personId':_0x3afd22[_0x3cd3af(0x1fe)],'threadId':_0x3afd22[_0x3cd3af(0x243)]};}function ee(_0x5e1e64,_0x1341dc,_0x254677){const _0x474ae0=_0x5f512f;var _0x66e996,_0x57e595;if(((_0x57e595=(_0x66e996=_0x5e1e64==null?void 0x0:_0x5e1e64[_0x474ae0(0x1e3)])==null?void 0x0:_0x66e996[_0x474ae0(0x21c)])!=null?_0x57e595:0x0)>0x0){const _0x2bbf98=(_0x246322,_0x3d38df)=>({'id':_0x246322[_0x474ae0(0x202)],'threadId':_0x246322[_0x474ae0(0x243)],'dT':D(_0x246322[_0x474ae0(0x239)]),'personId':_0x246322['userId'],'resolved':_0x5e1e64['solved']===I[_0x474ae0(0x1e0)],'unitId':_0x1341dc,'subUnitId':_0x254677,'text':JSON[_0x474ae0(0x205)](_0x246322[_0x474ae0(0x1ed)]),'parentId':_0x3d38df}),_0x5c6e90=_0x2bbf98(_0x5e1e64[_0x474ae0(0x1e3)][0x0]);return{..._0x5c6e90,'children':_0x5e1e64[_0x474ae0(0x1e3)]['slice'](0x1)['map'](_0x49fe45=>_0x2bbf98(_0x49fe45,_0x5c6e90['id']))};}return null;}let f=class{constructor(_0x3b5361,_0xd08da4,_0x1ef7b1,_0x2e4a5b){const _0x477e6c=_0x5f512f;this['_httpService']=_0x3b5361,this[_0x477e6c(0x230)]=_0xd08da4,this['_sessionService']=_0x1ef7b1,this['_injector']=_0x2e4a5b;}async[_0x5f512f(0x208)](_0x537fe1){const _0x239360=_0x5f512f;var _0xadeeb6,_0x6df5d6;const {parentId:_0x4b650f,unitId:_0x58cdba,text:_0x1f2107,threadId:_0x5e615a}=_0x537fe1,_0x39f67f=(_0x6df5d6=(_0xadeeb6=_0x1f2107[_0x239360(0x1ea)])==null?void 0x0:_0xadeeb6[_0x239360(0x217)](_0x5a359d=>_0x5a359d['rangeType']===_0xcd641e['COMMENT'])[_0x239360(0x1ff)](_0x5af0e4=>_0x5af0e4[_0x239360(0x212)]))!=null?_0x6df5d6:[],_0x29870c=JSON[_0x239360(0x226)](_0x1f2107),_0x21f69c=(await this[_0x239360(0x211)][_0x239360(0x240)](_0x58cdba))['getMemberID']();if(_0x4b650f){const _0x36c57a={'memberId':_0x21f69c,'unitId':_0x58cdba,'content':_0x29870c,'mention':_0x39f67f,'threadId':_0x5e615a},_0x1639dd=(await this[_0x239360(0x236)][_0x239360(0x242)](_0x239360(0x1e1)+_0x58cdba+_0x239360(0x1f9),{'body':_0x36c57a}))[_0x239360(0x218)][_0x239360(0x220)];return{..._0x537fe1,'id':_0x1639dd[_0x239360(0x202)],'dT':_0x367654(+_0x1639dd['createTimestamp'])['format'](_0x239360(0x210)),'personId':_0x1639dd[_0x239360(0x1fe)]};}else{const _0x28f7b0={'memberId':_0x21f69c,'unitId':_0x58cdba,'content':_0x29870c,'mention':_0x39f67f},_0x3e314e=await this['_httpService'][_0x239360(0x242)]('/universer-api/comment/unit/'+_0x58cdba+_0x239360(0x20b),{'body':_0x28f7b0});return X(_0x3e314e[_0x239360(0x218)][_0x239360(0x1e7)],_0x537fe1);}}async[_0x5f512f(0x21d)](_0x2a6273){const _0x3e02b4=_0x5f512f;var _0x2a8364,_0x5822f3;const {text:_0x216c66,unitId:_0xcd70b6}=_0x2a6273,_0x4d32d8=(_0x5822f3=(_0x2a8364=_0x216c66['customRanges'])==null?void 0x0:_0x2a8364[_0x3e02b4(0x217)](_0x5c8722=>_0x5c8722[_0x3e02b4(0x1e6)]===_0xcd641e[_0x3e02b4(0x1eb)])[_0x3e02b4(0x1ff)](_0x39e0a9=>_0x39e0a9[_0x3e02b4(0x212)]))!=null?_0x5822f3:[],_0x2314c6=JSON[_0x3e02b4(0x226)](_0x216c66),_0x638294=_0x2a6273[_0x3e02b4(0x243)],_0x38171a=_0x2a6273['id'],_0x70dd23={'memberId':(await this['_sessionService']['requireSession'](_0xcd70b6))[_0x3e02b4(0x221)](),'unitId':_0xcd70b6,'threadId':_0x638294,'mention':_0x4d32d8,'content':_0x2314c6,'replyId':_0x38171a},_0x14c459=await this[_0x3e02b4(0x236)][_0x3e02b4(0x242)](_0x3e02b4(0x1e1)+_0xcd70b6+_0x3e02b4(0x219),{'body':_0x70dd23});return!_0x14c459[_0x3e02b4(0x218)][_0x3e02b4(0x1f8)]||_0x14c459[_0x3e02b4(0x218)][_0x3e02b4(0x1f8)][_0x3e02b4(0x1f2)]===0x1;}async[_0x5f512f(0x225)](_0x1e1a37){const _0x230fb8=_0x5f512f,{unitId:_0x2ec259}=_0x1e1a37,_0xce83ab=_0x1e1a37[_0x230fb8(0x243)],_0xacfe6={'memberId':this[_0x230fb8(0x230)][_0x230fb8(0x1e8)]()['userID'],'unitId':_0x2ec259,'threadId':_0xce83ab,'solved':_0x1e1a37[_0x230fb8(0x1ef)]?I['Solved']:I[_0x230fb8(0x23a)]},_0x340f6d=await this[_0x230fb8(0x236)][_0x230fb8(0x242)]('/universer-api/comment/unit/'+_0x2ec259+_0x230fb8(0x20f),{'body':_0xacfe6});return!_0x340f6d[_0x230fb8(0x218)][_0x230fb8(0x1f8)]||_0x340f6d[_0x230fb8(0x218)][_0x230fb8(0x1f8)]['code']===0x1;}async[_0x5f512f(0x1fc)](_0x1733dd,_0xa9d96d,_0xec82a4,_0x305a59){const _0x397ca0=_0x5f512f,_0x527c72={'memberId':(await this['_sessionService'][_0x397ca0(0x240)](_0x1733dd))['getMemberID'](),'threadId':_0xec82a4,'replyId':_0x305a59,'unitId':_0x1733dd},_0x3d37d4=await this[_0x397ca0(0x236)][_0x397ca0(0x242)](_0x397ca0(0x1e1)+_0x1733dd+_0x397ca0(0x216),{'body':_0x527c72});return!_0x3d37d4[_0x397ca0(0x218)][_0x397ca0(0x1f8)]||_0x3d37d4[_0x397ca0(0x218)][_0x397ca0(0x1f8)][_0x397ca0(0x1f2)]===0x1;}async[_0x5f512f(0x1ee)](_0x39c6e4,_0x29fb1c,_0x18edb7){const _0x207e3d=_0x5f512f,_0x13e022={'unitId':_0x39c6e4,'threadId':_0x18edb7},_0x4d6fa3=await this[_0x207e3d(0x236)][_0x207e3d(0x242)](_0x207e3d(0x1e1)+_0x39c6e4+_0x207e3d(0x23f),{'body':_0x13e022}),_0x6dea79=_0x18edb7[_0x207e3d(0x1ff)](_0x373315=>ee(_0x4d6fa3['body']['comments'][_0x373315],_0x39c6e4,_0x29fb1c))[_0x207e3d(0x217)](Boolean);return Object['values'](_0x4d6fa3[_0x207e3d(0x218)][_0x207e3d(0x23c)])[_0x207e3d(0x1e4)](_0x524e73=>{const _0x40a0b1=_0x207e3d;this[_0x40a0b1(0x230)][_0x40a0b1(0x22e)](_0x524e73);}),_0x6dea79;}['saveCommentToSnapshot'](_0x4f9ed5){return{'id':_0x4f9ed5['id'],'threadId':_0x4f9ed5['threadId'],'ref':_0x4f9ed5['ref']};}};f=Q([_(0x0,_0x4134b7(_0x1c96c6)),_(0x1,_0x4134b7(_0x56b3c1)),_(0x2,_0x4134b7(_0x3972dd)),_(0x3,_0x4134b7(_0x49d01d))],f);var re=Object[_0x5f512f(0x235)],te=(_0xafe116,_0x3f965e,_0x2723e8,_0x16cf5d)=>{for(var _0x35e1e8=_0x16cf5d>0x1?void 0x0:_0x16cf5d?re(_0x3f965e,_0x2723e8):_0x3f965e,_0x54d3d6=_0xafe116['length']-0x1,_0x533170;_0x54d3d6>=0x0;_0x54d3d6--)(_0x533170=_0xafe116[_0x54d3d6])&&(_0x35e1e8=_0x533170(_0x35e1e8)||_0x35e1e8);return _0x35e1e8;},N=(_0x21c5d4,_0x2acda2)=>(_0x3ce39e,_0x283832)=>_0x2acda2(_0x3ce39e,_0x283832,_0x21c5d4);function _0x331c(){const _0x2345a0=['YYYY/MM/DD\x20HH:mm','_sessionService','rangeId','payload','commentUpdate$','68oePUCK','/delete','filter','body','/edit','6157235iecjUm','size','length','updateComment','214713KinzKg','getUnit','reply','getMemberID','parentId','_initDataSource','solved','resolveComment','stringify','add','2537688ukPjoA','user','Reply','userID','syncUpdateMutationToColla','6JfghLa','addUser','onStarting','_userService','setConfig','_init','1960mETIYO','get','getOwnPropertyDescriptor','_httpService','_injector','Solve','createTimestamp','OpenOrReOpen','Unknown','users','Add','201483YTXGHj','/list','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','post','threadId','getComment','dataSource','Solved','/universer-api/comment/unit/','getUser','replies','forEach','defineProperty','rangeType','comment','getCurrentUser','_configService','customRanges','COMMENT','find','content','listComments','resolved','symbol','disposeWithMe','code','_initUserSync','Edit','pipe','root','subscribe','error','/reply','7636285cHptWi','_threadCommentDataSource','deleteComment','3245288KoPkKa','userId','map','thread-comment-data-source.config','type','replyId','_commentService','_threadCommentDataSourceService','parse','Delete','/universer-api/user/list','addComment','UNIVER_UNKNOWN','_config','/add','_threadCommentModel','UNRECOGNIZED','41242tkpxDV','/solved'];_0x331c=function(){return _0x2345a0;};return _0x331c();}let g=class extends _0x70aa62{constructor(_0x1e6a5d,_0x468038){const _0x48e122=_0x5f512f;super(),this[_0x48e122(0x204)]=_0x1e6a5d,this[_0x48e122(0x1fb)]=_0x468038,this['_initDataSource']();}[_0x5f512f(0x223)](){const _0xf33ab7=_0x5f512f;this['_threadCommentDataSourceService'][_0xf33ab7(0x245)]=this[_0xf33ab7(0x1fb)],this[_0xf33ab7(0x204)][_0xf33ab7(0x22c)]=!0x1;}};g=te([N(0x0,_0x4289de),N(0x1,_0x4134b7(f))],g);var se=Object[_0x5f512f(0x1e5)],oe=Object[_0x5f512f(0x235)],ne=(_0x6381b4,_0x5d062a,_0xe2daff)=>_0x5d062a in _0x6381b4?se(_0x6381b4,_0x5d062a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xe2daff}):_0x6381b4[_0x5d062a]=_0xe2daff,ie=(_0x23453e,_0x57a033,_0x57748d,_0x154baa)=>{const _0x5163b9=_0x5f512f;for(var _0x580690=_0x154baa>0x1?void 0x0:_0x154baa?oe(_0x57a033,_0x57748d):_0x57a033,_0x5e0b3b=_0x23453e[_0x5163b9(0x21c)]-0x1,_0x1a5ddb;_0x5e0b3b>=0x0;_0x5e0b3b--)(_0x1a5ddb=_0x23453e[_0x5e0b3b])&&(_0x580690=_0x1a5ddb(_0x580690)||_0x580690);return _0x580690;},w=(_0x5957b5,_0x43e028)=>(_0x1f6ffa,_0x36a940)=>_0x43e028(_0x1f6ffa,_0x36a940,_0x5957b5),$=(_0x55c00c,_0x3c1a14,_0x316a6a)=>ne(_0x55c00c,typeof _0x3c1a14!=_0x5f512f(0x1f0)?_0x3c1a14+'':_0x3c1a14,_0x316a6a);let b=class extends _0x2729e6{constructor(_0x30f7d7=M,_0x1c1056,_0x176320){const _0x4151c6=_0x5f512f;super(),this[_0x4151c6(0x20a)]=_0x30f7d7,this['_injector']=_0x1c1056,this[_0x4151c6(0x1e9)]=_0x176320;const {..._0x21faec}=_0x5cb88c({},M,this[_0x4151c6(0x20a)]);this[_0x4151c6(0x1e9)][_0x4151c6(0x231)](z,_0x21faec);}[_0x5f512f(0x22f)](){[[f],[g],[S]]['forEach'](_0x26d077=>{this['_injector']['add'](_0x26d077);});}['onReady'](){const _0x4670f8=_0x5f512f;this[_0x4670f8(0x237)][_0x4670f8(0x234)](g),this[_0x4670f8(0x237)][_0x4670f8(0x234)](S);}};$(b,'pluginName',W),$(b,_0x5f512f(0x201),_0x481279[_0x5f512f(0x209)]),b=ie([_0x12da24(_0xc44fe2,_0x56fb88,_0x178fe6),w(0x1,_0x4134b7(_0x49d01d)),w(0x2,_0x340ede)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x2d8ddf=_0x581c;(function(_0x3a474b,_0x336e0c){const _0x9912a3=_0x581c,_0x247516=_0x3a474b();while(!![]){try{const _0x12b175=parseInt(_0x9912a3(0x185))/0x1*(-parseInt(_0x9912a3(0x173))/0x2)+-parseInt(_0x9912a3(0x193))/0x3+parseInt(_0x9912a3(0x1a8))/0x4*(parseInt(_0x9912a3(0x190))/0x5)+parseInt(_0x9912a3(0x1a1))/0x6*(-parseInt(_0x9912a3(0x17f))/0x7)+parseInt(_0x9912a3(0x19d))/0x8+parseInt(_0x9912a3(0x1a3))/0x9*(-parseInt(_0x9912a3(0x1a4))/0xa)+-parseInt(_0x9912a3(0x14e))/0xb*(-parseInt(_0x9912a3(0x198))/0xc);if(_0x12b175===_0x336e0c)break;else _0x247516['push'](_0x247516['shift']());}catch(_0x3ab2f1){_0x247516['push'](_0x247516['shift']());}}}(_0x1b6f,0xb7162));import{CommentService as _0x3b3e81,CollaborationSessionService as _0x300307,UniverCollaborationClientPlugin as _0x4b4a79}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x242cb8}from'@univerjs-pro/license';import{dayjs as _0x2a10a6,UserManagerService as _0x3428f3,Inject as _0x56e3c7,Injector as _0x24c6dc,Disposable as _0x27d718,CustomRangeType as _0x3b6fb4,UniverInstanceType as _0x2cbf4f,DependentOn as _0x106b69,IConfigService as _0x56bccc,Plugin as _0x421e16,merge as _0x1ad3c8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x52c2ef}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2c28e4,IThreadCommentDataSourceService as _0x4e6c1c}from'@univerjs/thread-comment';import{bufferTime as _0xbabfd}from'rxjs';import{HTTPService as _0x49e4f5}from'@univerjs/network';const W=_0x2d8ddf(0x156);var I=(_0xa1c2c2=>(_0xa1c2c2[_0xa1c2c2['OpenOrReOpen']=0x0]='OpenOrReOpen',_0xa1c2c2[_0xa1c2c2[_0x2d8ddf(0x181)]=0x1]=_0x2d8ddf(0x181),_0xa1c2c2[_0xa1c2c2[_0x2d8ddf(0x199)]=-0x1]=_0x2d8ddf(0x199),_0xa1c2c2))(I||{}),v=(_0x410362=>(_0x410362[_0x410362[_0x2d8ddf(0x187)]=0x0]=_0x2d8ddf(0x187),_0x410362[_0x410362[_0x2d8ddf(0x167)]=0x1]='Add',_0x410362[_0x410362[_0x2d8ddf(0x142)]=0x2]=_0x2d8ddf(0x142),_0x410362[_0x410362[_0x2d8ddf(0x169)]=0x3]='Edit',_0x410362[_0x410362['Delete']=0x4]=_0x2d8ddf(0x150),_0x410362[_0x410362[_0x2d8ddf(0x16c)]=0x5]=_0x2d8ddf(0x16c),_0x410362[_0x410362[_0x2d8ddf(0x199)]=-0x1]=_0x2d8ddf(0x199),_0x410362))(v||{});const D=_0x3e52bc=>_0x2a10a6(new Date(+_0x3e52bc))[_0x2d8ddf(0x188)](_0x2d8ddf(0x15d)),B=async(_0x4eb45c,_0x1ea478)=>{const _0x860404=_0x2d8ddf,_0x4bf51e=_0x4eb45c['get'](_0x3428f3),_0x50143c=_0x4eb45c[_0x860404(0x18b)](_0x49e4f5);_0x1ea478['forEach'](_0x3d2b02=>{const _0x65f855=_0x860404;_0x4bf51e[_0x65f855(0x1a5)](_0x3d2b02)&&_0x1ea478['delete'](_0x3d2b02);}),_0x1ea478[_0x860404(0x184)]&&(await _0x50143c[_0x860404(0x18b)](_0x860404(0x182),{'params':{'userIDs':[..._0x1ea478]}}))[_0x860404(0x15c)][_0x860404(0x145)]['forEach'](_0x48452f=>{_0x48452f&&_0x4bf51e['addUser'](_0x48452f);});};function _0x581c(_0x2022b0,_0x52c476){const _0x1b6f87=_0x1b6f();return _0x581c=function(_0x581cdd,_0x598857){_0x581cdd=_0x581cdd-0x142;let _0xffd5ad=_0x1b6f87[_0x581cdd];return _0xffd5ad;},_0x581c(_0x2022b0,_0x52c476);}var K=Object[_0x2d8ddf(0x19b)],V=(_0x5bc90a,_0x3428d1,_0x42bc52,_0x1f0ac8)=>{const _0x475880=_0x2d8ddf;for(var _0x5a64ee=_0x1f0ac8>0x1?void 0x0:_0x1f0ac8?K(_0x3428d1,_0x42bc52):_0x3428d1,_0x13396d=_0x5bc90a[_0x475880(0x15b)]-0x1,_0x1b1107;_0x13396d>=0x0;_0x13396d--)(_0x1b1107=_0x5bc90a[_0x13396d])&&(_0x5a64ee=_0x1b1107(_0x5a64ee)||_0x5a64ee);return _0x5a64ee;},p=(_0x2e58e4,_0x1bad0c)=>(_0x5250c4,_0x2b5066)=>_0x1bad0c(_0x5250c4,_0x2b5066,_0x2e58e4);let S=class extends _0x27d718{constructor(_0x55bffe,_0x26b70f,_0x3dd8a8,_0xa3f144){const _0x270245=_0x2d8ddf;super(),this['_commentService']=_0x55bffe,this[_0x270245(0x17e)]=_0x26b70f,this[_0x270245(0x153)]=_0x3dd8a8,this[_0x270245(0x16f)]=_0xa3f144,this['_init'](),this['_initUserSync']();}[_0x2d8ddf(0x19e)](){const _0xbe1e65=_0x2d8ddf;this[_0xbe1e65(0x14c)](this[_0xbe1e65(0x17e)][_0xbe1e65(0x159)][_0xbe1e65(0x14f)](_0xbabfd(0x10))['subscribe'](_0x59e2a7=>{const _0x301427=_0xbe1e65,_0x1e327d=new Set();_0x59e2a7[_0x301427(0x17d)](_0x4ce315=>{const _0x4d5d55=_0x301427;switch(_0x4ce315[_0x4d5d55(0x1a6)]){case _0x4d5d55(0x160):{const _0x60d25f=_0x4ce315[_0x4d5d55(0x1a2)][_0x4d5d55(0x196)];_0x1e327d['add'](_0x60d25f);break;}}}),B(this[_0x301427(0x16f)],_0x1e327d);}));}[_0x2d8ddf(0x16e)](){const _0x2a7e4f=_0x2d8ddf;this[_0x2a7e4f(0x14c)](this[_0x2a7e4f(0x195)][_0x2a7e4f(0x159)][_0x2a7e4f(0x17c)](async _0x5e57fb=>{const _0xa6aca1=_0x2a7e4f;var _0x4fd8f5,_0x3265b5,_0x375168,_0x52deef;const _0x457f45=(_0x4fd8f5=this['_threadCommentModel'][_0xa6aca1(0x158)](_0x5e57fb['unitId'])[_0xa6aca1(0x197)](_0x1e4520=>_0x1e4520[_0xa6aca1(0x163)]===_0x5e57fb[_0xa6aca1(0x163)]))==null?void 0x0:_0x4fd8f5[_0xa6aca1(0x162)];if(!_0x457f45)return;const {unitId:_0x13ce99,subUnitId:_0xcc5e07}=_0x457f45;switch(_0x5e57fb[_0xa6aca1(0x1a9)]&&this[_0xa6aca1(0x153)][_0xa6aca1(0x176)](_0x5e57fb[_0xa6aca1(0x1a9)]),_0x5e57fb['type']){case v[_0xa6aca1(0x167)]:break;case v['Reply']:{this[_0xa6aca1(0x17e)][_0xa6aca1(0x16a)](_0x13ce99,_0xcc5e07,{'unitId':_0x13ce99,'subUnitId':_0xcc5e07,'ref':'','id':_0x5e57fb['replyId'],'dT':D(+_0x5e57fb[_0xa6aca1(0x17b)]),'threadId':_0x5e57fb[_0xa6aca1(0x163)],'personId':(_0x375168=(_0x3265b5=_0x5e57fb['user'])==null?void 0x0:_0x3265b5[_0xa6aca1(0x14d)])!=null?_0x375168:_0x5e57fb[_0xa6aca1(0x18a)],'text':JSON[_0xa6aca1(0x164)](_0x5e57fb[_0xa6aca1(0x149)]),'parentId':_0x457f45['id']});break;}case v[_0xa6aca1(0x150)]:{const _0x219d85=this[_0xa6aca1(0x17e)][_0xa6aca1(0x189)](_0x13ce99,_0xcc5e07,_0x5e57fb[_0xa6aca1(0x19a)]);_0x219d85&&_0x219d85[_0xa6aca1(0x16d)]&&this[_0xa6aca1(0x17e)]['deleteComment'](_0x13ce99,_0xcc5e07,_0x5e57fb[_0xa6aca1(0x19a)]);break;}case v[_0xa6aca1(0x169)]:{this[_0xa6aca1(0x17e)][_0xa6aca1(0x177)](_0x13ce99,_0xcc5e07,{'commentId':_0x5e57fb['replyId'],'text':JSON[_0xa6aca1(0x164)](_0x5e57fb[_0xa6aca1(0x149)])});break;}case v[_0xa6aca1(0x16c)]:{const _0x17ab63=(_0x52deef=this[_0xa6aca1(0x17e)][_0xa6aca1(0x158)](_0x5e57fb[_0xa6aca1(0x15e)])[_0xa6aca1(0x197)](_0x4c1b4b=>_0x4c1b4b[_0xa6aca1(0x163)]===_0x5e57fb[_0xa6aca1(0x163)]))==null?void 0x0:_0x52deef[_0xa6aca1(0x162)];_0x17ab63&&this[_0xa6aca1(0x17e)][_0xa6aca1(0x18f)](_0x13ce99,_0xcc5e07,_0x17ab63['id'],_0x5e57fb[_0xa6aca1(0x166)]===I[_0xa6aca1(0x181)]);break;}}}));}};S=V([p(0x0,_0x56e3c7(_0x3b3e81)),p(0x1,_0x56e3c7(_0x2c28e4)),p(0x2,_0x56e3c7(_0x3428f3)),p(0x3,_0x56e3c7(_0x24c6dc))],S);const z=_0x2d8ddf(0x144),M={};var k=Object[_0x2d8ddf(0x19b)],Q=(_0x3a2e77,_0x4c1b91,_0x57740e,_0x45661b)=>{for(var _0x314a25=_0x45661b>0x1?void 0x0:_0x45661b?k(_0x4c1b91,_0x57740e):_0x4c1b91,_0x2de47=_0x3a2e77['length']-0x1,_0x5f396f;_0x2de47>=0x0;_0x2de47--)(_0x5f396f=_0x3a2e77[_0x2de47])&&(_0x314a25=_0x5f396f(_0x314a25)||_0x314a25);return _0x314a25;},_=(_0x3ade8f,_0x4ad7a5)=>(_0x49490e,_0x7acace)=>_0x4ad7a5(_0x49490e,_0x7acace,_0x3ade8f);function X(_0x1cbaa3,_0xc1b122){const _0x2ee030=_0x2d8ddf,_0x427bac=_0x1cbaa3[_0x2ee030(0x147)][0x0];return{..._0xc1b122,'id':_0x427bac[_0x2ee030(0x19a)],'resolved':_0x1cbaa3[_0x2ee030(0x166)]===0x1,'dT':D(_0x427bac[_0x2ee030(0x17b)]),'personId':_0x427bac[_0x2ee030(0x18a)],'threadId':_0x427bac[_0x2ee030(0x163)]};}function ee(_0xe38bd5,_0x828308,_0x430ea8){const _0x431f05=_0x2d8ddf;var _0x39b4ad,_0xd4bc7e;if(((_0xd4bc7e=(_0x39b4ad=_0xe38bd5==null?void 0x0:_0xe38bd5[_0x431f05(0x147)])==null?void 0x0:_0x39b4ad[_0x431f05(0x15b)])!=null?_0xd4bc7e:0x0)>0x0){const _0x36c6bc=(_0x2e9bba,_0x23e3a6)=>({'id':_0x2e9bba[_0x431f05(0x19a)],'threadId':_0x2e9bba[_0x431f05(0x163)],'dT':D(_0x2e9bba[_0x431f05(0x17b)]),'personId':_0x2e9bba['userId'],'resolved':_0xe38bd5[_0x431f05(0x166)]===I['Solved'],'unitId':_0x828308,'subUnitId':_0x430ea8,'text':JSON['parse'](_0x2e9bba[_0x431f05(0x149)]),'parentId':_0x23e3a6}),_0x10504c=_0x36c6bc(_0xe38bd5[_0x431f05(0x147)][0x0]);return{..._0x10504c,'children':_0xe38bd5['replies'][_0x431f05(0x180)](0x1)[_0x431f05(0x146)](_0x4a69bf=>_0x36c6bc(_0x4a69bf,_0x10504c['id']))};}return null;}let f=class{constructor(_0x5227c1,_0x5c9800,_0x39ca03,_0x57654a){const _0x589feb=_0x2d8ddf;this[_0x589feb(0x1a0)]=_0x5227c1,this[_0x589feb(0x153)]=_0x5c9800,this['_sessionService']=_0x39ca03,this[_0x589feb(0x16f)]=_0x57654a;}async[_0x2d8ddf(0x16a)](_0x5ffde4){const _0x667f8=_0x2d8ddf;var _0x5661f7,_0x44c2d9;const {parentId:_0x5819b4,unitId:_0x1ec086,text:_0x4df2c5,threadId:_0x172f06}=_0x5ffde4,_0x2e361a=(_0x44c2d9=(_0x5661f7=_0x4df2c5['customRanges'])==null?void 0x0:_0x5661f7['filter'](_0x43e19a=>_0x43e19a[_0x667f8(0x154)]===_0x3b6fb4[_0x667f8(0x16b)])[_0x667f8(0x146)](_0x148573=>_0x148573[_0x667f8(0x155)]))!=null?_0x44c2d9:[],_0xa8987a=JSON[_0x667f8(0x170)](_0x4df2c5),_0x51f0ea=(await this['_sessionService'][_0x667f8(0x165)](_0x1ec086))[_0x667f8(0x171)]();if(_0x5819b4){const _0x2f14fb={'memberId':_0x51f0ea,'unitId':_0x1ec086,'content':_0xa8987a,'mention':_0x2e361a,'threadId':_0x172f06},_0x3b4bcf=(await this[_0x667f8(0x1a0)][_0x667f8(0x172)]('/universer-api/comment/unit/'+_0x1ec086+'/reply',{'body':_0x2f14fb}))[_0x667f8(0x15c)][_0x667f8(0x194)];return{..._0x5ffde4,'id':_0x3b4bcf['replyId'],'dT':_0x2a10a6(+_0x3b4bcf[_0x667f8(0x17b)])[_0x667f8(0x188)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3b4bcf['userId']};}else{const _0xadb612={'memberId':_0x51f0ea,'unitId':_0x1ec086,'content':_0xa8987a,'mention':_0x2e361a},_0x484536=await this[_0x667f8(0x1a0)]['post'](_0x667f8(0x148)+_0x1ec086+_0x667f8(0x17a),{'body':_0xadb612});return X(_0x484536['body'][_0x667f8(0x1a7)],_0x5ffde4);}}async[_0x2d8ddf(0x177)](_0x203b47){const _0x28eae4=_0x2d8ddf;var _0x3a4cc0,_0x1cdfe3;const {text:_0x1bb512,unitId:_0x382116}=_0x203b47,_0x596f8f=(_0x1cdfe3=(_0x3a4cc0=_0x1bb512['customRanges'])==null?void 0x0:_0x3a4cc0[_0x28eae4(0x18c)](_0x296d80=>_0x296d80[_0x28eae4(0x154)]===_0x3b6fb4[_0x28eae4(0x16b)])[_0x28eae4(0x146)](_0xe9b547=>_0xe9b547[_0x28eae4(0x155)]))!=null?_0x1cdfe3:[],_0x18b0cb=JSON[_0x28eae4(0x170)](_0x1bb512),_0x219bf4=_0x203b47['threadId'],_0x39b835=_0x203b47['id'],_0x3e12c9={'memberId':(await this[_0x28eae4(0x151)][_0x28eae4(0x165)](_0x382116))[_0x28eae4(0x171)](),'unitId':_0x382116,'threadId':_0x219bf4,'mention':_0x596f8f,'content':_0x18b0cb,'replyId':_0x39b835},_0x5d73ac=await this[_0x28eae4(0x1a0)]['post'](_0x28eae4(0x148)+_0x382116+_0x28eae4(0x19f),{'body':_0x3e12c9});return!_0x5d73ac[_0x28eae4(0x15c)][_0x28eae4(0x186)]||_0x5d73ac[_0x28eae4(0x15c)]['error'][_0x28eae4(0x168)]===0x1;}async['resolveComment'](_0x22d2e6){const _0x399ed2=_0x2d8ddf,{unitId:_0xdbe0c}=_0x22d2e6,_0x457a11=_0x22d2e6[_0x399ed2(0x163)],_0x271e15={'memberId':this[_0x399ed2(0x153)]['getCurrentUser']()[_0x399ed2(0x14d)],'unitId':_0xdbe0c,'threadId':_0x457a11,'solved':_0x22d2e6[_0x399ed2(0x179)]?I[_0x399ed2(0x181)]:I['OpenOrReOpen']},_0x2825c7=await this[_0x399ed2(0x1a0)][_0x399ed2(0x172)](_0x399ed2(0x148)+_0xdbe0c+'/solved',{'body':_0x271e15});return!_0x2825c7[_0x399ed2(0x15c)][_0x399ed2(0x186)]||_0x2825c7['body'][_0x399ed2(0x186)][_0x399ed2(0x168)]===0x1;}async[_0x2d8ddf(0x192)](_0x183bc3,_0x21c3f4,_0x25d619,_0x4c6253){const _0x1eccae=_0x2d8ddf,_0x16d190={'memberId':(await this[_0x1eccae(0x151)]['requireSession'](_0x183bc3))[_0x1eccae(0x171)](),'threadId':_0x25d619,'replyId':_0x4c6253,'unitId':_0x183bc3},_0x5e2fbd=await this[_0x1eccae(0x1a0)][_0x1eccae(0x172)](_0x1eccae(0x148)+_0x183bc3+_0x1eccae(0x143),{'body':_0x16d190});return!_0x5e2fbd[_0x1eccae(0x15c)][_0x1eccae(0x186)]||_0x5e2fbd['body'][_0x1eccae(0x186)][_0x1eccae(0x168)]===0x1;}async[_0x2d8ddf(0x15f)](_0x43c498,_0x2038dc,_0x27a557){const _0x316469=_0x2d8ddf,_0x23050a={'unitId':_0x43c498,'threadId':_0x27a557},_0x44bfa1=await this[_0x316469(0x1a0)][_0x316469(0x172)](_0x316469(0x148)+_0x43c498+'/list',{'body':_0x23050a}),_0x3dfe29=_0x27a557['map'](_0x57bcf6=>ee(_0x44bfa1[_0x316469(0x15c)][_0x316469(0x14b)][_0x57bcf6],_0x43c498,_0x2038dc))[_0x316469(0x18c)](Boolean);return Object[_0x316469(0x175)](_0x44bfa1[_0x316469(0x15c)]['users'])[_0x316469(0x17d)](_0x189322=>{const _0x1f8aa2=_0x316469;this[_0x1f8aa2(0x153)][_0x1f8aa2(0x176)](_0x189322);}),_0x3dfe29;}[_0x2d8ddf(0x152)](_0x35bd8f){const _0x55023d=_0x2d8ddf;return{'id':_0x35bd8f['id'],'threadId':_0x35bd8f[_0x55023d(0x163)],'ref':_0x35bd8f[_0x55023d(0x14a)]};}};f=Q([_(0x0,_0x56e3c7(_0x49e4f5)),_(0x1,_0x56e3c7(_0x3428f3)),_(0x2,_0x56e3c7(_0x300307)),_(0x3,_0x56e3c7(_0x24c6dc))],f);var re=Object[_0x2d8ddf(0x19b)],te=(_0x5ac03f,_0x5cc703,_0x48b08a,_0x500634)=>{const _0x40d356=_0x2d8ddf;for(var _0x32ad90=_0x500634>0x1?void 0x0:_0x500634?re(_0x5cc703,_0x48b08a):_0x5cc703,_0x132087=_0x5ac03f[_0x40d356(0x15b)]-0x1,_0x2943fd;_0x132087>=0x0;_0x132087--)(_0x2943fd=_0x5ac03f[_0x132087])&&(_0x32ad90=_0x2943fd(_0x32ad90)||_0x32ad90);return _0x32ad90;},N=(_0x409c23,_0x10a28e)=>(_0x433408,_0x49f019)=>_0x10a28e(_0x433408,_0x49f019,_0x409c23);let g=class extends _0x27d718{constructor(_0x1e2399,_0x17138b){const _0x421d42=_0x2d8ddf;super(),this[_0x421d42(0x157)]=_0x1e2399,this[_0x421d42(0x15a)]=_0x17138b,this[_0x421d42(0x161)]();}['_initDataSource'](){const _0x350b93=_0x2d8ddf;this['_threadCommentDataSourceService']['dataSource']=this[_0x350b93(0x15a)],this[_0x350b93(0x157)][_0x350b93(0x178)]=!0x1;}};function _0x1b6f(){const _0x3faff3=['code','Edit','addComment','COMMENT','Solve','parentId','_init','_injector','stringify','getMemberID','post','89768yIYoNF','_configService','values','addUser','updateComment','syncUpdateMutationToColla','resolved','/add','createTimestamp','subscribe','forEach','_threadCommentModel','847IIjioy','slice','Solved','/universer-api/user/list','onStarting','size','18PhkNYT','error','Unknown','format','getComment','userId','get','filter','symbol','pluginName','resolveComment','3452030wQRpti','onReady','deleteComment','2173527NgEyjA','reply','_commentService','personId','find','126156AoASFr','UNRECOGNIZED','replyId','getOwnPropertyDescriptor','UNIVER_UNKNOWN','4115216GvusCd','_initUserSync','/edit','_httpService','71346QxWJrU','payload','16839cEhXHP','6030ezXSal','getUser','type','comment','8dCaZwZ','user','Reply','/delete','thread-comment-data-source.config','users','map','replies','/universer-api/comment/unit/','content','ref','comments','disposeWithMe','userID','3091grvgYr','pipe','Delete','_sessionService','saveCommentToSnapshot','_userService','rangeType','rangeId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentDataSourceService','getUnit','commentUpdate$','_threadCommentDataSource','length','body','YYYY/MM/DD\x20HH:mm','unitId','listComments','add','_initDataSource','root','threadId','parse','requireSession','solved','Add'];_0x1b6f=function(){return _0x3faff3;};return _0x1b6f();}g=te([N(0x0,_0x4e6c1c),N(0x1,_0x56e3c7(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0xddf6f9,_0x4b5c63,_0x409517)=>_0x4b5c63 in _0xddf6f9?se(_0xddf6f9,_0x4b5c63,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x409517}):_0xddf6f9[_0x4b5c63]=_0x409517,ie=(_0x25ec58,_0x277884,_0x294e91,_0x33b8b7)=>{const _0x38e927=_0x2d8ddf;for(var _0x986ae2=_0x33b8b7>0x1?void 0x0:_0x33b8b7?oe(_0x277884,_0x294e91):_0x277884,_0x38d22d=_0x25ec58[_0x38e927(0x15b)]-0x1,_0x5ad3b6;_0x38d22d>=0x0;_0x38d22d--)(_0x5ad3b6=_0x25ec58[_0x38d22d])&&(_0x986ae2=_0x5ad3b6(_0x986ae2)||_0x986ae2);return _0x986ae2;},w=(_0x4ca070,_0x353427)=>(_0x453490,_0x23198a)=>_0x353427(_0x453490,_0x23198a,_0x4ca070),$=(_0x30b31c,_0x2020f6,_0x13f556)=>ne(_0x30b31c,typeof _0x2020f6!=_0x2d8ddf(0x18d)?_0x2020f6+'':_0x2020f6,_0x13f556);let b=class extends _0x421e16{constructor(_0x278d6d=M,_0x29c842,_0x13d276){const _0x1e670d=_0x2d8ddf;super(),this['_config']=_0x278d6d,this[_0x1e670d(0x16f)]=_0x29c842,this[_0x1e670d(0x174)]=_0x13d276;const {..._0x4a7f4c}=_0x1ad3c8({},M,this['_config']);this[_0x1e670d(0x174)]['setConfig'](z,_0x4a7f4c);}[_0x2d8ddf(0x183)](){const _0x10ed45=_0x2d8ddf;[[f],[g],[S]][_0x10ed45(0x17d)](_0x40f7ca=>{const _0x2b764e=_0x10ed45;this[_0x2b764e(0x16f)][_0x2b764e(0x160)](_0x40f7ca);});}[_0x2d8ddf(0x191)](){const _0x4b306f=_0x2d8ddf;this['_injector']['get'](g),this[_0x4b306f(0x16f)][_0x4b306f(0x18b)](S);}};$(b,_0x2d8ddf(0x18e),W),$(b,_0x2d8ddf(0x1a6),_0x2cbf4f[_0x2d8ddf(0x19c)]),b=ie([_0x106b69(_0x52c2ef,_0x4b4a79,_0x242cb8),w(0x1,_0x56e3c7(_0x24c6dc)),w(0x2,_0x56bccc)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- function _0x2690(_0x275a34,_0x3fc05c){const _0x331c48=_0x331c();return _0x2690=function(_0x2690f3,_0x74ad54){_0x2690f3=_0x2690f3-0x1e0;let _0xddce5d=_0x331c48[_0x2690f3];return _0xddce5d;},_0x2690(_0x275a34,_0x3fc05c);}const _0x5f512f=_0x2690;(function(_0x55dc9d,_0x286886){const _0x34393a=_0x2690,_0x138f78=_0x55dc9d();while(!![]){try{const _0xfb5746=parseInt(_0x34393a(0x20e))/0x1+-parseInt(_0x34393a(0x1fd))/0x2+-parseInt(_0x34393a(0x23e))/0x3*(parseInt(_0x34393a(0x215))/0x4)+parseInt(_0x34393a(0x1fa))/0x5*(-parseInt(_0x34393a(0x22d))/0x6)+parseInt(_0x34393a(0x21a))/0x7+-parseInt(_0x34393a(0x228))/0x8+-parseInt(_0x34393a(0x21e))/0x9*(-parseInt(_0x34393a(0x233))/0xa);if(_0xfb5746===_0x286886)break;else _0x138f78['push'](_0x138f78['shift']());}catch(_0x31f50e){_0x138f78['push'](_0x138f78['shift']());}}}(_0x331c,0xf1342));import{CommentService as _0x4a90e7,CollaborationSessionService as _0x3972dd,UniverCollaborationClientPlugin as _0x56fb88}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x178fe6}from'@univerjs-pro/license';import{dayjs as _0x367654,UserManagerService as _0x56b3c1,Inject as _0x4134b7,Injector as _0x49d01d,Disposable as _0x70aa62,CustomRangeType as _0xcd641e,UniverInstanceType as _0x481279,DependentOn as _0x12da24,IConfigService as _0x340ede,Plugin as _0x2729e6,merge as _0x5cb88c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xc44fe2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x9f961a,IThreadCommentDataSourceService as _0x4289de}from'@univerjs/thread-comment';import{bufferTime as _0x55e3f7}from'rxjs';import{HTTPService as _0x1c96c6}from'@univerjs/network';const W=_0x5f512f(0x241);var I=(_0x4c2cd1=>(_0x4c2cd1[_0x4c2cd1[_0x5f512f(0x23a)]=0x0]=_0x5f512f(0x23a),_0x4c2cd1[_0x4c2cd1[_0x5f512f(0x1e0)]=0x1]=_0x5f512f(0x1e0),_0x4c2cd1[_0x4c2cd1[_0x5f512f(0x20d)]=-0x1]='UNRECOGNIZED',_0x4c2cd1))(I||{}),v=(_0x2aeac3=>(_0x2aeac3[_0x2aeac3[_0x5f512f(0x23b)]=0x0]='Unknown',_0x2aeac3[_0x2aeac3[_0x5f512f(0x23d)]=0x1]=_0x5f512f(0x23d),_0x2aeac3[_0x2aeac3['Reply']=0x2]='Reply',_0x2aeac3[_0x2aeac3[_0x5f512f(0x1f4)]=0x3]='Edit',_0x2aeac3[_0x2aeac3[_0x5f512f(0x206)]=0x4]='Delete',_0x2aeac3[_0x2aeac3[_0x5f512f(0x238)]=0x5]='Solve',_0x2aeac3[_0x2aeac3['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2aeac3))(v||{});const D=_0x2b6b8f=>_0x367654(new Date(+_0x2b6b8f))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x1a3d74,_0x167ee9)=>{const _0x16ce51=_0x5f512f,_0x3f7a68=_0x1a3d74[_0x16ce51(0x234)](_0x56b3c1),_0xcf6ca=_0x1a3d74[_0x16ce51(0x234)](_0x1c96c6);_0x167ee9[_0x16ce51(0x1e4)](_0x2b6f06=>{const _0x2d7d19=_0x16ce51;_0x3f7a68[_0x2d7d19(0x1e2)](_0x2b6f06)&&_0x167ee9['delete'](_0x2b6f06);}),_0x167ee9[_0x16ce51(0x21b)]&&(await _0xcf6ca[_0x16ce51(0x234)](_0x16ce51(0x207),{'params':{'userIDs':[..._0x167ee9]}}))[_0x16ce51(0x218)][_0x16ce51(0x23c)]['forEach'](_0x309d8c=>{const _0x5006a7=_0x16ce51;_0x309d8c&&_0x3f7a68[_0x5006a7(0x22e)](_0x309d8c);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x453a46,_0x2ec752,_0x13c8f1,_0x370670)=>{const _0x5b75c0=_0x5f512f;for(var _0x31b1e7=_0x370670>0x1?void 0x0:_0x370670?K(_0x2ec752,_0x13c8f1):_0x2ec752,_0x4715d7=_0x453a46[_0x5b75c0(0x21c)]-0x1,_0x2eb42b;_0x4715d7>=0x0;_0x4715d7--)(_0x2eb42b=_0x453a46[_0x4715d7])&&(_0x31b1e7=_0x2eb42b(_0x31b1e7)||_0x31b1e7);return _0x31b1e7;},p=(_0x4ed916,_0x2c56ae)=>(_0x96d4a1,_0x282a6e)=>_0x2c56ae(_0x96d4a1,_0x282a6e,_0x4ed916);let S=class extends _0x70aa62{constructor(_0x27d7a3,_0x4d403b,_0x1d5f7a,_0x5a2cd7){const _0x2a3afd=_0x5f512f;super(),this['_commentService']=_0x27d7a3,this[_0x2a3afd(0x20c)]=_0x4d403b,this[_0x2a3afd(0x230)]=_0x1d5f7a,this[_0x2a3afd(0x237)]=_0x5a2cd7,this[_0x2a3afd(0x232)](),this[_0x2a3afd(0x1f3)]();}[_0x5f512f(0x1f3)](){const _0x3f559a=_0x5f512f;this[_0x3f559a(0x1f1)](this['_threadCommentModel'][_0x3f559a(0x214)][_0x3f559a(0x1f5)](_0x55e3f7(0x10))[_0x3f559a(0x1f7)](_0x1d5704=>{const _0x2b2b07=_0x3f559a,_0xcc0146=new Set();_0x1d5704[_0x2b2b07(0x1e4)](_0x209dfc=>{const _0x4c7d7c=_0x2b2b07;switch(_0x209dfc[_0x4c7d7c(0x201)]){case _0x4c7d7c(0x227):{const _0x53c754=_0x209dfc[_0x4c7d7c(0x213)]['personId'];_0xcc0146[_0x4c7d7c(0x227)](_0x53c754);break;}}}),B(this['_injector'],_0xcc0146);}));}[_0x5f512f(0x232)](){const _0x43451a=_0x5f512f;this[_0x43451a(0x1f1)](this[_0x43451a(0x203)][_0x43451a(0x214)][_0x43451a(0x1f7)](async _0x5aa859=>{const _0x1f1ba0=_0x43451a;var _0x5ab4ed,_0x435963,_0x58ccef,_0x552987;const _0x2f931d=(_0x5ab4ed=this['_threadCommentModel']['getUnit'](_0x5aa859['unitId'])[_0x1f1ba0(0x1ec)](_0x121db5=>_0x121db5['threadId']===_0x5aa859['threadId']))==null?void 0x0:_0x5ab4ed['root'];if(!_0x2f931d)return;const {unitId:_0x3fc686,subUnitId:_0x116f72}=_0x2f931d;switch(_0x5aa859['user']&&this[_0x1f1ba0(0x230)][_0x1f1ba0(0x22e)](_0x5aa859[_0x1f1ba0(0x229)]),_0x5aa859[_0x1f1ba0(0x201)]){case v[_0x1f1ba0(0x23d)]:break;case v[_0x1f1ba0(0x22a)]:{this[_0x1f1ba0(0x20c)][_0x1f1ba0(0x208)](_0x3fc686,_0x116f72,{'unitId':_0x3fc686,'subUnitId':_0x116f72,'ref':'','id':_0x5aa859[_0x1f1ba0(0x202)],'dT':D(+_0x5aa859[_0x1f1ba0(0x239)]),'threadId':_0x5aa859[_0x1f1ba0(0x243)],'personId':(_0x58ccef=(_0x435963=_0x5aa859[_0x1f1ba0(0x229)])==null?void 0x0:_0x435963[_0x1f1ba0(0x22b)])!=null?_0x58ccef:_0x5aa859['userId'],'text':JSON['parse'](_0x5aa859[_0x1f1ba0(0x1ed)]),'parentId':_0x2f931d['id']});break;}case v[_0x1f1ba0(0x206)]:{const _0x1315e=this[_0x1f1ba0(0x20c)][_0x1f1ba0(0x244)](_0x3fc686,_0x116f72,_0x5aa859[_0x1f1ba0(0x202)]);_0x1315e&&_0x1315e[_0x1f1ba0(0x222)]&&this[_0x1f1ba0(0x20c)][_0x1f1ba0(0x1fc)](_0x3fc686,_0x116f72,_0x5aa859[_0x1f1ba0(0x202)]);break;}case v[_0x1f1ba0(0x1f4)]:{this[_0x1f1ba0(0x20c)]['updateComment'](_0x3fc686,_0x116f72,{'commentId':_0x5aa859['replyId'],'text':JSON[_0x1f1ba0(0x205)](_0x5aa859['content'])});break;}case v[_0x1f1ba0(0x238)]:{const _0x11af7e=(_0x552987=this[_0x1f1ba0(0x20c)][_0x1f1ba0(0x21f)](_0x5aa859['unitId'])['find'](_0x59a861=>_0x59a861['threadId']===_0x5aa859[_0x1f1ba0(0x243)]))==null?void 0x0:_0x552987[_0x1f1ba0(0x1f6)];_0x11af7e&&this['_threadCommentModel']['resolveComment'](_0x3fc686,_0x116f72,_0x11af7e['id'],_0x5aa859[_0x1f1ba0(0x224)]===I[_0x1f1ba0(0x1e0)]);break;}}}));}};S=V([p(0x0,_0x4134b7(_0x4a90e7)),p(0x1,_0x4134b7(_0x9f961a)),p(0x2,_0x4134b7(_0x56b3c1)),p(0x3,_0x4134b7(_0x49d01d))],S);const z=_0x5f512f(0x200),M={};var k=Object[_0x5f512f(0x235)],Q=(_0x12af47,_0x2e9fa3,_0x2970c2,_0x3f4336)=>{for(var _0x43079b=_0x3f4336>0x1?void 0x0:_0x3f4336?k(_0x2e9fa3,_0x2970c2):_0x2e9fa3,_0x3c4e8c=_0x12af47['length']-0x1,_0x302ec0;_0x3c4e8c>=0x0;_0x3c4e8c--)(_0x302ec0=_0x12af47[_0x3c4e8c])&&(_0x43079b=_0x302ec0(_0x43079b)||_0x43079b);return _0x43079b;},_=(_0x481cd1,_0x2edb55)=>(_0x3ae6eb,_0xa5f839)=>_0x2edb55(_0x3ae6eb,_0xa5f839,_0x481cd1);function X(_0x3736ca,_0x257494){const _0x3cd3af=_0x5f512f,_0x3afd22=_0x3736ca[_0x3cd3af(0x1e3)][0x0];return{..._0x257494,'id':_0x3afd22[_0x3cd3af(0x202)],'resolved':_0x3736ca[_0x3cd3af(0x224)]===0x1,'dT':D(_0x3afd22['createTimestamp']),'personId':_0x3afd22[_0x3cd3af(0x1fe)],'threadId':_0x3afd22[_0x3cd3af(0x243)]};}function ee(_0x5e1e64,_0x1341dc,_0x254677){const _0x474ae0=_0x5f512f;var _0x66e996,_0x57e595;if(((_0x57e595=(_0x66e996=_0x5e1e64==null?void 0x0:_0x5e1e64[_0x474ae0(0x1e3)])==null?void 0x0:_0x66e996[_0x474ae0(0x21c)])!=null?_0x57e595:0x0)>0x0){const _0x2bbf98=(_0x246322,_0x3d38df)=>({'id':_0x246322[_0x474ae0(0x202)],'threadId':_0x246322[_0x474ae0(0x243)],'dT':D(_0x246322[_0x474ae0(0x239)]),'personId':_0x246322['userId'],'resolved':_0x5e1e64['solved']===I[_0x474ae0(0x1e0)],'unitId':_0x1341dc,'subUnitId':_0x254677,'text':JSON[_0x474ae0(0x205)](_0x246322[_0x474ae0(0x1ed)]),'parentId':_0x3d38df}),_0x5c6e90=_0x2bbf98(_0x5e1e64[_0x474ae0(0x1e3)][0x0]);return{..._0x5c6e90,'children':_0x5e1e64[_0x474ae0(0x1e3)]['slice'](0x1)['map'](_0x49fe45=>_0x2bbf98(_0x49fe45,_0x5c6e90['id']))};}return null;}let f=class{constructor(_0x3b5361,_0xd08da4,_0x1ef7b1,_0x2e4a5b){const _0x477e6c=_0x5f512f;this['_httpService']=_0x3b5361,this[_0x477e6c(0x230)]=_0xd08da4,this['_sessionService']=_0x1ef7b1,this['_injector']=_0x2e4a5b;}async[_0x5f512f(0x208)](_0x537fe1){const _0x239360=_0x5f512f;var _0xadeeb6,_0x6df5d6;const {parentId:_0x4b650f,unitId:_0x58cdba,text:_0x1f2107,threadId:_0x5e615a}=_0x537fe1,_0x39f67f=(_0x6df5d6=(_0xadeeb6=_0x1f2107[_0x239360(0x1ea)])==null?void 0x0:_0xadeeb6[_0x239360(0x217)](_0x5a359d=>_0x5a359d['rangeType']===_0xcd641e['COMMENT'])[_0x239360(0x1ff)](_0x5af0e4=>_0x5af0e4[_0x239360(0x212)]))!=null?_0x6df5d6:[],_0x29870c=JSON[_0x239360(0x226)](_0x1f2107),_0x21f69c=(await this[_0x239360(0x211)][_0x239360(0x240)](_0x58cdba))['getMemberID']();if(_0x4b650f){const _0x36c57a={'memberId':_0x21f69c,'unitId':_0x58cdba,'content':_0x29870c,'mention':_0x39f67f,'threadId':_0x5e615a},_0x1639dd=(await this[_0x239360(0x236)][_0x239360(0x242)](_0x239360(0x1e1)+_0x58cdba+_0x239360(0x1f9),{'body':_0x36c57a}))[_0x239360(0x218)][_0x239360(0x220)];return{..._0x537fe1,'id':_0x1639dd[_0x239360(0x202)],'dT':_0x367654(+_0x1639dd['createTimestamp'])['format'](_0x239360(0x210)),'personId':_0x1639dd[_0x239360(0x1fe)]};}else{const _0x28f7b0={'memberId':_0x21f69c,'unitId':_0x58cdba,'content':_0x29870c,'mention':_0x39f67f},_0x3e314e=await this['_httpService'][_0x239360(0x242)]('/universer-api/comment/unit/'+_0x58cdba+_0x239360(0x20b),{'body':_0x28f7b0});return X(_0x3e314e[_0x239360(0x218)][_0x239360(0x1e7)],_0x537fe1);}}async[_0x5f512f(0x21d)](_0x2a6273){const _0x3e02b4=_0x5f512f;var _0x2a8364,_0x5822f3;const {text:_0x216c66,unitId:_0xcd70b6}=_0x2a6273,_0x4d32d8=(_0x5822f3=(_0x2a8364=_0x216c66['customRanges'])==null?void 0x0:_0x2a8364[_0x3e02b4(0x217)](_0x5c8722=>_0x5c8722[_0x3e02b4(0x1e6)]===_0xcd641e[_0x3e02b4(0x1eb)])[_0x3e02b4(0x1ff)](_0x39e0a9=>_0x39e0a9[_0x3e02b4(0x212)]))!=null?_0x5822f3:[],_0x2314c6=JSON[_0x3e02b4(0x226)](_0x216c66),_0x638294=_0x2a6273[_0x3e02b4(0x243)],_0x38171a=_0x2a6273['id'],_0x70dd23={'memberId':(await this['_sessionService']['requireSession'](_0xcd70b6))[_0x3e02b4(0x221)](),'unitId':_0xcd70b6,'threadId':_0x638294,'mention':_0x4d32d8,'content':_0x2314c6,'replyId':_0x38171a},_0x14c459=await this[_0x3e02b4(0x236)][_0x3e02b4(0x242)](_0x3e02b4(0x1e1)+_0xcd70b6+_0x3e02b4(0x219),{'body':_0x70dd23});return!_0x14c459[_0x3e02b4(0x218)][_0x3e02b4(0x1f8)]||_0x14c459[_0x3e02b4(0x218)][_0x3e02b4(0x1f8)][_0x3e02b4(0x1f2)]===0x1;}async[_0x5f512f(0x225)](_0x1e1a37){const _0x230fb8=_0x5f512f,{unitId:_0x2ec259}=_0x1e1a37,_0xce83ab=_0x1e1a37[_0x230fb8(0x243)],_0xacfe6={'memberId':this[_0x230fb8(0x230)][_0x230fb8(0x1e8)]()['userID'],'unitId':_0x2ec259,'threadId':_0xce83ab,'solved':_0x1e1a37[_0x230fb8(0x1ef)]?I['Solved']:I[_0x230fb8(0x23a)]},_0x340f6d=await this[_0x230fb8(0x236)][_0x230fb8(0x242)]('/universer-api/comment/unit/'+_0x2ec259+_0x230fb8(0x20f),{'body':_0xacfe6});return!_0x340f6d[_0x230fb8(0x218)][_0x230fb8(0x1f8)]||_0x340f6d[_0x230fb8(0x218)][_0x230fb8(0x1f8)]['code']===0x1;}async[_0x5f512f(0x1fc)](_0x1733dd,_0xa9d96d,_0xec82a4,_0x305a59){const _0x397ca0=_0x5f512f,_0x527c72={'memberId':(await this['_sessionService'][_0x397ca0(0x240)](_0x1733dd))['getMemberID'](),'threadId':_0xec82a4,'replyId':_0x305a59,'unitId':_0x1733dd},_0x3d37d4=await this[_0x397ca0(0x236)][_0x397ca0(0x242)](_0x397ca0(0x1e1)+_0x1733dd+_0x397ca0(0x216),{'body':_0x527c72});return!_0x3d37d4[_0x397ca0(0x218)][_0x397ca0(0x1f8)]||_0x3d37d4[_0x397ca0(0x218)][_0x397ca0(0x1f8)][_0x397ca0(0x1f2)]===0x1;}async[_0x5f512f(0x1ee)](_0x39c6e4,_0x29fb1c,_0x18edb7){const _0x207e3d=_0x5f512f,_0x13e022={'unitId':_0x39c6e4,'threadId':_0x18edb7},_0x4d6fa3=await this[_0x207e3d(0x236)][_0x207e3d(0x242)](_0x207e3d(0x1e1)+_0x39c6e4+_0x207e3d(0x23f),{'body':_0x13e022}),_0x6dea79=_0x18edb7[_0x207e3d(0x1ff)](_0x373315=>ee(_0x4d6fa3['body']['comments'][_0x373315],_0x39c6e4,_0x29fb1c))[_0x207e3d(0x217)](Boolean);return Object['values'](_0x4d6fa3[_0x207e3d(0x218)][_0x207e3d(0x23c)])[_0x207e3d(0x1e4)](_0x524e73=>{const _0x40a0b1=_0x207e3d;this[_0x40a0b1(0x230)][_0x40a0b1(0x22e)](_0x524e73);}),_0x6dea79;}['saveCommentToSnapshot'](_0x4f9ed5){return{'id':_0x4f9ed5['id'],'threadId':_0x4f9ed5['threadId'],'ref':_0x4f9ed5['ref']};}};f=Q([_(0x0,_0x4134b7(_0x1c96c6)),_(0x1,_0x4134b7(_0x56b3c1)),_(0x2,_0x4134b7(_0x3972dd)),_(0x3,_0x4134b7(_0x49d01d))],f);var re=Object[_0x5f512f(0x235)],te=(_0xafe116,_0x3f965e,_0x2723e8,_0x16cf5d)=>{for(var _0x35e1e8=_0x16cf5d>0x1?void 0x0:_0x16cf5d?re(_0x3f965e,_0x2723e8):_0x3f965e,_0x54d3d6=_0xafe116['length']-0x1,_0x533170;_0x54d3d6>=0x0;_0x54d3d6--)(_0x533170=_0xafe116[_0x54d3d6])&&(_0x35e1e8=_0x533170(_0x35e1e8)||_0x35e1e8);return _0x35e1e8;},N=(_0x21c5d4,_0x2acda2)=>(_0x3ce39e,_0x283832)=>_0x2acda2(_0x3ce39e,_0x283832,_0x21c5d4);function _0x331c(){const _0x2345a0=['YYYY/MM/DD\x20HH:mm','_sessionService','rangeId','payload','commentUpdate$','68oePUCK','/delete','filter','body','/edit','6157235iecjUm','size','length','updateComment','214713KinzKg','getUnit','reply','getMemberID','parentId','_initDataSource','solved','resolveComment','stringify','add','2537688ukPjoA','user','Reply','userID','syncUpdateMutationToColla','6JfghLa','addUser','onStarting','_userService','setConfig','_init','1960mETIYO','get','getOwnPropertyDescriptor','_httpService','_injector','Solve','createTimestamp','OpenOrReOpen','Unknown','users','Add','201483YTXGHj','/list','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','post','threadId','getComment','dataSource','Solved','/universer-api/comment/unit/','getUser','replies','forEach','defineProperty','rangeType','comment','getCurrentUser','_configService','customRanges','COMMENT','find','content','listComments','resolved','symbol','disposeWithMe','code','_initUserSync','Edit','pipe','root','subscribe','error','/reply','7636285cHptWi','_threadCommentDataSource','deleteComment','3245288KoPkKa','userId','map','thread-comment-data-source.config','type','replyId','_commentService','_threadCommentDataSourceService','parse','Delete','/universer-api/user/list','addComment','UNIVER_UNKNOWN','_config','/add','_threadCommentModel','UNRECOGNIZED','41242tkpxDV','/solved'];_0x331c=function(){return _0x2345a0;};return _0x331c();}let g=class extends _0x70aa62{constructor(_0x1e6a5d,_0x468038){const _0x48e122=_0x5f512f;super(),this[_0x48e122(0x204)]=_0x1e6a5d,this[_0x48e122(0x1fb)]=_0x468038,this['_initDataSource']();}[_0x5f512f(0x223)](){const _0xf33ab7=_0x5f512f;this['_threadCommentDataSourceService'][_0xf33ab7(0x245)]=this[_0xf33ab7(0x1fb)],this[_0xf33ab7(0x204)][_0xf33ab7(0x22c)]=!0x1;}};g=te([N(0x0,_0x4289de),N(0x1,_0x4134b7(f))],g);var se=Object[_0x5f512f(0x1e5)],oe=Object[_0x5f512f(0x235)],ne=(_0x6381b4,_0x5d062a,_0xe2daff)=>_0x5d062a in _0x6381b4?se(_0x6381b4,_0x5d062a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xe2daff}):_0x6381b4[_0x5d062a]=_0xe2daff,ie=(_0x23453e,_0x57a033,_0x57748d,_0x154baa)=>{const _0x5163b9=_0x5f512f;for(var _0x580690=_0x154baa>0x1?void 0x0:_0x154baa?oe(_0x57a033,_0x57748d):_0x57a033,_0x5e0b3b=_0x23453e[_0x5163b9(0x21c)]-0x1,_0x1a5ddb;_0x5e0b3b>=0x0;_0x5e0b3b--)(_0x1a5ddb=_0x23453e[_0x5e0b3b])&&(_0x580690=_0x1a5ddb(_0x580690)||_0x580690);return _0x580690;},w=(_0x5957b5,_0x43e028)=>(_0x1f6ffa,_0x36a940)=>_0x43e028(_0x1f6ffa,_0x36a940,_0x5957b5),$=(_0x55c00c,_0x3c1a14,_0x316a6a)=>ne(_0x55c00c,typeof _0x3c1a14!=_0x5f512f(0x1f0)?_0x3c1a14+'':_0x3c1a14,_0x316a6a);let b=class extends _0x2729e6{constructor(_0x30f7d7=M,_0x1c1056,_0x176320){const _0x4151c6=_0x5f512f;super(),this[_0x4151c6(0x20a)]=_0x30f7d7,this['_injector']=_0x1c1056,this[_0x4151c6(0x1e9)]=_0x176320;const {..._0x21faec}=_0x5cb88c({},M,this[_0x4151c6(0x20a)]);this[_0x4151c6(0x1e9)][_0x4151c6(0x231)](z,_0x21faec);}[_0x5f512f(0x22f)](){[[f],[g],[S]]['forEach'](_0x26d077=>{this['_injector']['add'](_0x26d077);});}['onReady'](){const _0x4670f8=_0x5f512f;this[_0x4670f8(0x237)][_0x4670f8(0x234)](g),this[_0x4670f8(0x237)][_0x4670f8(0x234)](S);}};$(b,'pluginName',W),$(b,_0x5f512f(0x201),_0x481279[_0x5f512f(0x209)]),b=ie([_0x12da24(_0xc44fe2,_0x56fb88,_0x178fe6),w(0x1,_0x4134b7(_0x49d01d)),w(0x2,_0x340ede)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x2d8ddf=_0x581c;(function(_0x3a474b,_0x336e0c){const _0x9912a3=_0x581c,_0x247516=_0x3a474b();while(!![]){try{const _0x12b175=parseInt(_0x9912a3(0x185))/0x1*(-parseInt(_0x9912a3(0x173))/0x2)+-parseInt(_0x9912a3(0x193))/0x3+parseInt(_0x9912a3(0x1a8))/0x4*(parseInt(_0x9912a3(0x190))/0x5)+parseInt(_0x9912a3(0x1a1))/0x6*(-parseInt(_0x9912a3(0x17f))/0x7)+parseInt(_0x9912a3(0x19d))/0x8+parseInt(_0x9912a3(0x1a3))/0x9*(-parseInt(_0x9912a3(0x1a4))/0xa)+-parseInt(_0x9912a3(0x14e))/0xb*(-parseInt(_0x9912a3(0x198))/0xc);if(_0x12b175===_0x336e0c)break;else _0x247516['push'](_0x247516['shift']());}catch(_0x3ab2f1){_0x247516['push'](_0x247516['shift']());}}}(_0x1b6f,0xb7162));import{CommentService as _0x3b3e81,CollaborationSessionService as _0x300307,UniverCollaborationClientPlugin as _0x4b4a79}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x242cb8}from'@univerjs-pro/license';import{dayjs as _0x2a10a6,UserManagerService as _0x3428f3,Inject as _0x56e3c7,Injector as _0x24c6dc,Disposable as _0x27d718,CustomRangeType as _0x3b6fb4,UniverInstanceType as _0x2cbf4f,DependentOn as _0x106b69,IConfigService as _0x56bccc,Plugin as _0x421e16,merge as _0x1ad3c8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x52c2ef}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2c28e4,IThreadCommentDataSourceService as _0x4e6c1c}from'@univerjs/thread-comment';import{bufferTime as _0xbabfd}from'rxjs';import{HTTPService as _0x49e4f5}from'@univerjs/network';const W=_0x2d8ddf(0x156);var I=(_0xa1c2c2=>(_0xa1c2c2[_0xa1c2c2['OpenOrReOpen']=0x0]='OpenOrReOpen',_0xa1c2c2[_0xa1c2c2[_0x2d8ddf(0x181)]=0x1]=_0x2d8ddf(0x181),_0xa1c2c2[_0xa1c2c2[_0x2d8ddf(0x199)]=-0x1]=_0x2d8ddf(0x199),_0xa1c2c2))(I||{}),v=(_0x410362=>(_0x410362[_0x410362[_0x2d8ddf(0x187)]=0x0]=_0x2d8ddf(0x187),_0x410362[_0x410362[_0x2d8ddf(0x167)]=0x1]='Add',_0x410362[_0x410362[_0x2d8ddf(0x142)]=0x2]=_0x2d8ddf(0x142),_0x410362[_0x410362[_0x2d8ddf(0x169)]=0x3]='Edit',_0x410362[_0x410362['Delete']=0x4]=_0x2d8ddf(0x150),_0x410362[_0x410362[_0x2d8ddf(0x16c)]=0x5]=_0x2d8ddf(0x16c),_0x410362[_0x410362[_0x2d8ddf(0x199)]=-0x1]=_0x2d8ddf(0x199),_0x410362))(v||{});const D=_0x3e52bc=>_0x2a10a6(new Date(+_0x3e52bc))[_0x2d8ddf(0x188)](_0x2d8ddf(0x15d)),B=async(_0x4eb45c,_0x1ea478)=>{const _0x860404=_0x2d8ddf,_0x4bf51e=_0x4eb45c['get'](_0x3428f3),_0x50143c=_0x4eb45c[_0x860404(0x18b)](_0x49e4f5);_0x1ea478['forEach'](_0x3d2b02=>{const _0x65f855=_0x860404;_0x4bf51e[_0x65f855(0x1a5)](_0x3d2b02)&&_0x1ea478['delete'](_0x3d2b02);}),_0x1ea478[_0x860404(0x184)]&&(await _0x50143c[_0x860404(0x18b)](_0x860404(0x182),{'params':{'userIDs':[..._0x1ea478]}}))[_0x860404(0x15c)][_0x860404(0x145)]['forEach'](_0x48452f=>{_0x48452f&&_0x4bf51e['addUser'](_0x48452f);});};function _0x581c(_0x2022b0,_0x52c476){const _0x1b6f87=_0x1b6f();return _0x581c=function(_0x581cdd,_0x598857){_0x581cdd=_0x581cdd-0x142;let _0xffd5ad=_0x1b6f87[_0x581cdd];return _0xffd5ad;},_0x581c(_0x2022b0,_0x52c476);}var K=Object[_0x2d8ddf(0x19b)],V=(_0x5bc90a,_0x3428d1,_0x42bc52,_0x1f0ac8)=>{const _0x475880=_0x2d8ddf;for(var _0x5a64ee=_0x1f0ac8>0x1?void 0x0:_0x1f0ac8?K(_0x3428d1,_0x42bc52):_0x3428d1,_0x13396d=_0x5bc90a[_0x475880(0x15b)]-0x1,_0x1b1107;_0x13396d>=0x0;_0x13396d--)(_0x1b1107=_0x5bc90a[_0x13396d])&&(_0x5a64ee=_0x1b1107(_0x5a64ee)||_0x5a64ee);return _0x5a64ee;},p=(_0x2e58e4,_0x1bad0c)=>(_0x5250c4,_0x2b5066)=>_0x1bad0c(_0x5250c4,_0x2b5066,_0x2e58e4);let S=class extends _0x27d718{constructor(_0x55bffe,_0x26b70f,_0x3dd8a8,_0xa3f144){const _0x270245=_0x2d8ddf;super(),this['_commentService']=_0x55bffe,this[_0x270245(0x17e)]=_0x26b70f,this[_0x270245(0x153)]=_0x3dd8a8,this[_0x270245(0x16f)]=_0xa3f144,this['_init'](),this['_initUserSync']();}[_0x2d8ddf(0x19e)](){const _0xbe1e65=_0x2d8ddf;this[_0xbe1e65(0x14c)](this[_0xbe1e65(0x17e)][_0xbe1e65(0x159)][_0xbe1e65(0x14f)](_0xbabfd(0x10))['subscribe'](_0x59e2a7=>{const _0x301427=_0xbe1e65,_0x1e327d=new Set();_0x59e2a7[_0x301427(0x17d)](_0x4ce315=>{const _0x4d5d55=_0x301427;switch(_0x4ce315[_0x4d5d55(0x1a6)]){case _0x4d5d55(0x160):{const _0x60d25f=_0x4ce315[_0x4d5d55(0x1a2)][_0x4d5d55(0x196)];_0x1e327d['add'](_0x60d25f);break;}}}),B(this[_0x301427(0x16f)],_0x1e327d);}));}[_0x2d8ddf(0x16e)](){const _0x2a7e4f=_0x2d8ddf;this[_0x2a7e4f(0x14c)](this[_0x2a7e4f(0x195)][_0x2a7e4f(0x159)][_0x2a7e4f(0x17c)](async _0x5e57fb=>{const _0xa6aca1=_0x2a7e4f;var _0x4fd8f5,_0x3265b5,_0x375168,_0x52deef;const _0x457f45=(_0x4fd8f5=this['_threadCommentModel'][_0xa6aca1(0x158)](_0x5e57fb['unitId'])[_0xa6aca1(0x197)](_0x1e4520=>_0x1e4520[_0xa6aca1(0x163)]===_0x5e57fb[_0xa6aca1(0x163)]))==null?void 0x0:_0x4fd8f5[_0xa6aca1(0x162)];if(!_0x457f45)return;const {unitId:_0x13ce99,subUnitId:_0xcc5e07}=_0x457f45;switch(_0x5e57fb[_0xa6aca1(0x1a9)]&&this[_0xa6aca1(0x153)][_0xa6aca1(0x176)](_0x5e57fb[_0xa6aca1(0x1a9)]),_0x5e57fb['type']){case v[_0xa6aca1(0x167)]:break;case v['Reply']:{this[_0xa6aca1(0x17e)][_0xa6aca1(0x16a)](_0x13ce99,_0xcc5e07,{'unitId':_0x13ce99,'subUnitId':_0xcc5e07,'ref':'','id':_0x5e57fb['replyId'],'dT':D(+_0x5e57fb[_0xa6aca1(0x17b)]),'threadId':_0x5e57fb[_0xa6aca1(0x163)],'personId':(_0x375168=(_0x3265b5=_0x5e57fb['user'])==null?void 0x0:_0x3265b5[_0xa6aca1(0x14d)])!=null?_0x375168:_0x5e57fb[_0xa6aca1(0x18a)],'text':JSON[_0xa6aca1(0x164)](_0x5e57fb[_0xa6aca1(0x149)]),'parentId':_0x457f45['id']});break;}case v[_0xa6aca1(0x150)]:{const _0x219d85=this[_0xa6aca1(0x17e)][_0xa6aca1(0x189)](_0x13ce99,_0xcc5e07,_0x5e57fb[_0xa6aca1(0x19a)]);_0x219d85&&_0x219d85[_0xa6aca1(0x16d)]&&this[_0xa6aca1(0x17e)]['deleteComment'](_0x13ce99,_0xcc5e07,_0x5e57fb[_0xa6aca1(0x19a)]);break;}case v[_0xa6aca1(0x169)]:{this[_0xa6aca1(0x17e)][_0xa6aca1(0x177)](_0x13ce99,_0xcc5e07,{'commentId':_0x5e57fb['replyId'],'text':JSON[_0xa6aca1(0x164)](_0x5e57fb[_0xa6aca1(0x149)])});break;}case v[_0xa6aca1(0x16c)]:{const _0x17ab63=(_0x52deef=this[_0xa6aca1(0x17e)][_0xa6aca1(0x158)](_0x5e57fb[_0xa6aca1(0x15e)])[_0xa6aca1(0x197)](_0x4c1b4b=>_0x4c1b4b[_0xa6aca1(0x163)]===_0x5e57fb[_0xa6aca1(0x163)]))==null?void 0x0:_0x52deef[_0xa6aca1(0x162)];_0x17ab63&&this[_0xa6aca1(0x17e)][_0xa6aca1(0x18f)](_0x13ce99,_0xcc5e07,_0x17ab63['id'],_0x5e57fb[_0xa6aca1(0x166)]===I[_0xa6aca1(0x181)]);break;}}}));}};S=V([p(0x0,_0x56e3c7(_0x3b3e81)),p(0x1,_0x56e3c7(_0x2c28e4)),p(0x2,_0x56e3c7(_0x3428f3)),p(0x3,_0x56e3c7(_0x24c6dc))],S);const z=_0x2d8ddf(0x144),M={};var k=Object[_0x2d8ddf(0x19b)],Q=(_0x3a2e77,_0x4c1b91,_0x57740e,_0x45661b)=>{for(var _0x314a25=_0x45661b>0x1?void 0x0:_0x45661b?k(_0x4c1b91,_0x57740e):_0x4c1b91,_0x2de47=_0x3a2e77['length']-0x1,_0x5f396f;_0x2de47>=0x0;_0x2de47--)(_0x5f396f=_0x3a2e77[_0x2de47])&&(_0x314a25=_0x5f396f(_0x314a25)||_0x314a25);return _0x314a25;},_=(_0x3ade8f,_0x4ad7a5)=>(_0x49490e,_0x7acace)=>_0x4ad7a5(_0x49490e,_0x7acace,_0x3ade8f);function X(_0x1cbaa3,_0xc1b122){const _0x2ee030=_0x2d8ddf,_0x427bac=_0x1cbaa3[_0x2ee030(0x147)][0x0];return{..._0xc1b122,'id':_0x427bac[_0x2ee030(0x19a)],'resolved':_0x1cbaa3[_0x2ee030(0x166)]===0x1,'dT':D(_0x427bac[_0x2ee030(0x17b)]),'personId':_0x427bac[_0x2ee030(0x18a)],'threadId':_0x427bac[_0x2ee030(0x163)]};}function ee(_0xe38bd5,_0x828308,_0x430ea8){const _0x431f05=_0x2d8ddf;var _0x39b4ad,_0xd4bc7e;if(((_0xd4bc7e=(_0x39b4ad=_0xe38bd5==null?void 0x0:_0xe38bd5[_0x431f05(0x147)])==null?void 0x0:_0x39b4ad[_0x431f05(0x15b)])!=null?_0xd4bc7e:0x0)>0x0){const _0x36c6bc=(_0x2e9bba,_0x23e3a6)=>({'id':_0x2e9bba[_0x431f05(0x19a)],'threadId':_0x2e9bba[_0x431f05(0x163)],'dT':D(_0x2e9bba[_0x431f05(0x17b)]),'personId':_0x2e9bba['userId'],'resolved':_0xe38bd5[_0x431f05(0x166)]===I['Solved'],'unitId':_0x828308,'subUnitId':_0x430ea8,'text':JSON['parse'](_0x2e9bba[_0x431f05(0x149)]),'parentId':_0x23e3a6}),_0x10504c=_0x36c6bc(_0xe38bd5[_0x431f05(0x147)][0x0]);return{..._0x10504c,'children':_0xe38bd5['replies'][_0x431f05(0x180)](0x1)[_0x431f05(0x146)](_0x4a69bf=>_0x36c6bc(_0x4a69bf,_0x10504c['id']))};}return null;}let f=class{constructor(_0x5227c1,_0x5c9800,_0x39ca03,_0x57654a){const _0x589feb=_0x2d8ddf;this[_0x589feb(0x1a0)]=_0x5227c1,this[_0x589feb(0x153)]=_0x5c9800,this['_sessionService']=_0x39ca03,this[_0x589feb(0x16f)]=_0x57654a;}async[_0x2d8ddf(0x16a)](_0x5ffde4){const _0x667f8=_0x2d8ddf;var _0x5661f7,_0x44c2d9;const {parentId:_0x5819b4,unitId:_0x1ec086,text:_0x4df2c5,threadId:_0x172f06}=_0x5ffde4,_0x2e361a=(_0x44c2d9=(_0x5661f7=_0x4df2c5['customRanges'])==null?void 0x0:_0x5661f7['filter'](_0x43e19a=>_0x43e19a[_0x667f8(0x154)]===_0x3b6fb4[_0x667f8(0x16b)])[_0x667f8(0x146)](_0x148573=>_0x148573[_0x667f8(0x155)]))!=null?_0x44c2d9:[],_0xa8987a=JSON[_0x667f8(0x170)](_0x4df2c5),_0x51f0ea=(await this['_sessionService'][_0x667f8(0x165)](_0x1ec086))[_0x667f8(0x171)]();if(_0x5819b4){const _0x2f14fb={'memberId':_0x51f0ea,'unitId':_0x1ec086,'content':_0xa8987a,'mention':_0x2e361a,'threadId':_0x172f06},_0x3b4bcf=(await this[_0x667f8(0x1a0)][_0x667f8(0x172)]('/universer-api/comment/unit/'+_0x1ec086+'/reply',{'body':_0x2f14fb}))[_0x667f8(0x15c)][_0x667f8(0x194)];return{..._0x5ffde4,'id':_0x3b4bcf['replyId'],'dT':_0x2a10a6(+_0x3b4bcf[_0x667f8(0x17b)])[_0x667f8(0x188)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3b4bcf['userId']};}else{const _0xadb612={'memberId':_0x51f0ea,'unitId':_0x1ec086,'content':_0xa8987a,'mention':_0x2e361a},_0x484536=await this[_0x667f8(0x1a0)]['post'](_0x667f8(0x148)+_0x1ec086+_0x667f8(0x17a),{'body':_0xadb612});return X(_0x484536['body'][_0x667f8(0x1a7)],_0x5ffde4);}}async[_0x2d8ddf(0x177)](_0x203b47){const _0x28eae4=_0x2d8ddf;var _0x3a4cc0,_0x1cdfe3;const {text:_0x1bb512,unitId:_0x382116}=_0x203b47,_0x596f8f=(_0x1cdfe3=(_0x3a4cc0=_0x1bb512['customRanges'])==null?void 0x0:_0x3a4cc0[_0x28eae4(0x18c)](_0x296d80=>_0x296d80[_0x28eae4(0x154)]===_0x3b6fb4[_0x28eae4(0x16b)])[_0x28eae4(0x146)](_0xe9b547=>_0xe9b547[_0x28eae4(0x155)]))!=null?_0x1cdfe3:[],_0x18b0cb=JSON[_0x28eae4(0x170)](_0x1bb512),_0x219bf4=_0x203b47['threadId'],_0x39b835=_0x203b47['id'],_0x3e12c9={'memberId':(await this[_0x28eae4(0x151)][_0x28eae4(0x165)](_0x382116))[_0x28eae4(0x171)](),'unitId':_0x382116,'threadId':_0x219bf4,'mention':_0x596f8f,'content':_0x18b0cb,'replyId':_0x39b835},_0x5d73ac=await this[_0x28eae4(0x1a0)]['post'](_0x28eae4(0x148)+_0x382116+_0x28eae4(0x19f),{'body':_0x3e12c9});return!_0x5d73ac[_0x28eae4(0x15c)][_0x28eae4(0x186)]||_0x5d73ac[_0x28eae4(0x15c)]['error'][_0x28eae4(0x168)]===0x1;}async['resolveComment'](_0x22d2e6){const _0x399ed2=_0x2d8ddf,{unitId:_0xdbe0c}=_0x22d2e6,_0x457a11=_0x22d2e6[_0x399ed2(0x163)],_0x271e15={'memberId':this[_0x399ed2(0x153)]['getCurrentUser']()[_0x399ed2(0x14d)],'unitId':_0xdbe0c,'threadId':_0x457a11,'solved':_0x22d2e6[_0x399ed2(0x179)]?I[_0x399ed2(0x181)]:I['OpenOrReOpen']},_0x2825c7=await this[_0x399ed2(0x1a0)][_0x399ed2(0x172)](_0x399ed2(0x148)+_0xdbe0c+'/solved',{'body':_0x271e15});return!_0x2825c7[_0x399ed2(0x15c)][_0x399ed2(0x186)]||_0x2825c7['body'][_0x399ed2(0x186)][_0x399ed2(0x168)]===0x1;}async[_0x2d8ddf(0x192)](_0x183bc3,_0x21c3f4,_0x25d619,_0x4c6253){const _0x1eccae=_0x2d8ddf,_0x16d190={'memberId':(await this[_0x1eccae(0x151)]['requireSession'](_0x183bc3))[_0x1eccae(0x171)](),'threadId':_0x25d619,'replyId':_0x4c6253,'unitId':_0x183bc3},_0x5e2fbd=await this[_0x1eccae(0x1a0)][_0x1eccae(0x172)](_0x1eccae(0x148)+_0x183bc3+_0x1eccae(0x143),{'body':_0x16d190});return!_0x5e2fbd[_0x1eccae(0x15c)][_0x1eccae(0x186)]||_0x5e2fbd['body'][_0x1eccae(0x186)][_0x1eccae(0x168)]===0x1;}async[_0x2d8ddf(0x15f)](_0x43c498,_0x2038dc,_0x27a557){const _0x316469=_0x2d8ddf,_0x23050a={'unitId':_0x43c498,'threadId':_0x27a557},_0x44bfa1=await this[_0x316469(0x1a0)][_0x316469(0x172)](_0x316469(0x148)+_0x43c498+'/list',{'body':_0x23050a}),_0x3dfe29=_0x27a557['map'](_0x57bcf6=>ee(_0x44bfa1[_0x316469(0x15c)][_0x316469(0x14b)][_0x57bcf6],_0x43c498,_0x2038dc))[_0x316469(0x18c)](Boolean);return Object[_0x316469(0x175)](_0x44bfa1[_0x316469(0x15c)]['users'])[_0x316469(0x17d)](_0x189322=>{const _0x1f8aa2=_0x316469;this[_0x1f8aa2(0x153)][_0x1f8aa2(0x176)](_0x189322);}),_0x3dfe29;}[_0x2d8ddf(0x152)](_0x35bd8f){const _0x55023d=_0x2d8ddf;return{'id':_0x35bd8f['id'],'threadId':_0x35bd8f[_0x55023d(0x163)],'ref':_0x35bd8f[_0x55023d(0x14a)]};}};f=Q([_(0x0,_0x56e3c7(_0x49e4f5)),_(0x1,_0x56e3c7(_0x3428f3)),_(0x2,_0x56e3c7(_0x300307)),_(0x3,_0x56e3c7(_0x24c6dc))],f);var re=Object[_0x2d8ddf(0x19b)],te=(_0x5ac03f,_0x5cc703,_0x48b08a,_0x500634)=>{const _0x40d356=_0x2d8ddf;for(var _0x32ad90=_0x500634>0x1?void 0x0:_0x500634?re(_0x5cc703,_0x48b08a):_0x5cc703,_0x132087=_0x5ac03f[_0x40d356(0x15b)]-0x1,_0x2943fd;_0x132087>=0x0;_0x132087--)(_0x2943fd=_0x5ac03f[_0x132087])&&(_0x32ad90=_0x2943fd(_0x32ad90)||_0x32ad90);return _0x32ad90;},N=(_0x409c23,_0x10a28e)=>(_0x433408,_0x49f019)=>_0x10a28e(_0x433408,_0x49f019,_0x409c23);let g=class extends _0x27d718{constructor(_0x1e2399,_0x17138b){const _0x421d42=_0x2d8ddf;super(),this[_0x421d42(0x157)]=_0x1e2399,this[_0x421d42(0x15a)]=_0x17138b,this[_0x421d42(0x161)]();}['_initDataSource'](){const _0x350b93=_0x2d8ddf;this['_threadCommentDataSourceService']['dataSource']=this[_0x350b93(0x15a)],this[_0x350b93(0x157)][_0x350b93(0x178)]=!0x1;}};function _0x1b6f(){const _0x3faff3=['code','Edit','addComment','COMMENT','Solve','parentId','_init','_injector','stringify','getMemberID','post','89768yIYoNF','_configService','values','addUser','updateComment','syncUpdateMutationToColla','resolved','/add','createTimestamp','subscribe','forEach','_threadCommentModel','847IIjioy','slice','Solved','/universer-api/user/list','onStarting','size','18PhkNYT','error','Unknown','format','getComment','userId','get','filter','symbol','pluginName','resolveComment','3452030wQRpti','onReady','deleteComment','2173527NgEyjA','reply','_commentService','personId','find','126156AoASFr','UNRECOGNIZED','replyId','getOwnPropertyDescriptor','UNIVER_UNKNOWN','4115216GvusCd','_initUserSync','/edit','_httpService','71346QxWJrU','payload','16839cEhXHP','6030ezXSal','getUser','type','comment','8dCaZwZ','user','Reply','/delete','thread-comment-data-source.config','users','map','replies','/universer-api/comment/unit/','content','ref','comments','disposeWithMe','userID','3091grvgYr','pipe','Delete','_sessionService','saveCommentToSnapshot','_userService','rangeType','rangeId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentDataSourceService','getUnit','commentUpdate$','_threadCommentDataSource','length','body','YYYY/MM/DD\x20HH:mm','unitId','listComments','add','_initDataSource','root','threadId','parse','requireSession','solved','Add'];_0x1b6f=function(){return _0x3faff3;};return _0x1b6f();}g=te([N(0x0,_0x4e6c1c),N(0x1,_0x56e3c7(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0xddf6f9,_0x4b5c63,_0x409517)=>_0x4b5c63 in _0xddf6f9?se(_0xddf6f9,_0x4b5c63,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x409517}):_0xddf6f9[_0x4b5c63]=_0x409517,ie=(_0x25ec58,_0x277884,_0x294e91,_0x33b8b7)=>{const _0x38e927=_0x2d8ddf;for(var _0x986ae2=_0x33b8b7>0x1?void 0x0:_0x33b8b7?oe(_0x277884,_0x294e91):_0x277884,_0x38d22d=_0x25ec58[_0x38e927(0x15b)]-0x1,_0x5ad3b6;_0x38d22d>=0x0;_0x38d22d--)(_0x5ad3b6=_0x25ec58[_0x38d22d])&&(_0x986ae2=_0x5ad3b6(_0x986ae2)||_0x986ae2);return _0x986ae2;},w=(_0x4ca070,_0x353427)=>(_0x453490,_0x23198a)=>_0x353427(_0x453490,_0x23198a,_0x4ca070),$=(_0x30b31c,_0x2020f6,_0x13f556)=>ne(_0x30b31c,typeof _0x2020f6!=_0x2d8ddf(0x18d)?_0x2020f6+'':_0x2020f6,_0x13f556);let b=class extends _0x421e16{constructor(_0x278d6d=M,_0x29c842,_0x13d276){const _0x1e670d=_0x2d8ddf;super(),this['_config']=_0x278d6d,this[_0x1e670d(0x16f)]=_0x29c842,this[_0x1e670d(0x174)]=_0x13d276;const {..._0x4a7f4c}=_0x1ad3c8({},M,this['_config']);this[_0x1e670d(0x174)]['setConfig'](z,_0x4a7f4c);}[_0x2d8ddf(0x183)](){const _0x10ed45=_0x2d8ddf;[[f],[g],[S]][_0x10ed45(0x17d)](_0x40f7ca=>{const _0x2b764e=_0x10ed45;this[_0x2b764e(0x16f)][_0x2b764e(0x160)](_0x40f7ca);});}[_0x2d8ddf(0x191)](){const _0x4b306f=_0x2d8ddf;this['_injector']['get'](g),this[_0x4b306f(0x16f)][_0x4b306f(0x18b)](S);}};$(b,_0x2d8ddf(0x18e),W),$(b,_0x2d8ddf(0x1a6),_0x2cbf4f[_0x2d8ddf(0x19c)]),b=ie([_0x106b69(_0x52c2ef,_0x4b4a79,_0x242cb8),w(0x1,_0x56e3c7(_0x24c6dc)),w(0x2,_0x56bccc)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x536c7e,_0x38c772){const _0x157513=_0x4f8c,_0x40eea9=_0x536c7e();while(!![]){try{const _0x5576ab=parseInt(_0x157513(0x109))/0x1*(-parseInt(_0x157513(0x143))/0x2)+parseInt(_0x157513(0x11c))/0x3+parseInt(_0x157513(0x15d))/0x4*(parseInt(_0x157513(0xf0))/0x5)+-parseInt(_0x157513(0xe9))/0x6*(-parseInt(_0x157513(0x105))/0x7)+-parseInt(_0x157513(0x149))/0x8*(-parseInt(_0x157513(0x12e))/0x9)+-parseInt(_0x157513(0x138))/0xa*(-parseInt(_0x157513(0xf9))/0xb)+-parseInt(_0x157513(0xe0))/0xc;if(_0x5576ab===_0x38c772)break;else _0x40eea9['push'](_0x40eea9['shift']());}catch(_0x50cac7){_0x40eea9['push'](_0x40eea9['shift']());}}}(_0x1451,0x9e6fd),function(_0x22393a,_0x1dc2dc){const _0x1ad7e8=_0x4f8c;typeof exports=='object'&&typeof module<'u'?_0x1dc2dc(exports,require(_0x1ad7e8(0x13b)),require(_0x1ad7e8(0x12b)),require(_0x1ad7e8(0x150)),require('@univerjs/thread-comment-ui'),require(_0x1ad7e8(0x108)),require('rxjs'),require(_0x1ad7e8(0xfe))):typeof define==_0x1ad7e8(0xf2)&&define[_0x1ad7e8(0x128)]?define([_0x1ad7e8(0x158),_0x1ad7e8(0x13b),_0x1ad7e8(0x12b),'@univerjs/core',_0x1ad7e8(0x130),'@univerjs/thread-comment','rxjs',_0x1ad7e8(0xfe)],_0x1dc2dc):(_0x22393a=typeof globalThis<'u'?globalThis:_0x22393a||self,_0x1dc2dc(_0x22393a[_0x1ad7e8(0x114)]={},_0x22393a['UniverProCollaborationClient'],_0x22393a['UniverProLicense'],_0x22393a[_0x1ad7e8(0x14b)],_0x22393a['UniverThreadCommentUi'],_0x22393a[_0x1ad7e8(0xdd)],_0x22393a[_0x1ad7e8(0xd8)],_0x22393a[_0x1ad7e8(0x157)]));}(this,function(_0x44299d,_0x3eeda6,_0x1920d3,_0x4be09a,_0x4d0909,_0x1d9654,_0x6ad529,_0x29551a){'use strict';const _0x18460f=_0x4f8c;const _0x208a5e=_0x18460f(0xfa);var _0xa324b1=(_0x59e1ff=>(_0x59e1ff[_0x59e1ff[_0x18460f(0x135)]=0x0]=_0x18460f(0x135),_0x59e1ff[_0x59e1ff['Solved']=0x1]=_0x18460f(0x121),_0x59e1ff[_0x59e1ff['UNRECOGNIZED']=-0x1]=_0x18460f(0xf8),_0x59e1ff))(_0xa324b1||{}),_0x589ef9=(_0x2d51b5=>(_0x2d51b5[_0x2d51b5['Unknown']=0x0]=_0x18460f(0x10c),_0x2d51b5[_0x2d51b5[_0x18460f(0x120)]=0x1]='Add',_0x2d51b5[_0x2d51b5[_0x18460f(0x107)]=0x2]='Reply',_0x2d51b5[_0x2d51b5[_0x18460f(0x113)]=0x3]=_0x18460f(0x113),_0x2d51b5[_0x2d51b5[_0x18460f(0xf7)]=0x4]='Delete',_0x2d51b5[_0x2d51b5[_0x18460f(0x144)]=0x5]=_0x18460f(0x144),_0x2d51b5[_0x2d51b5[_0x18460f(0xf8)]=-0x1]=_0x18460f(0xf8),_0x2d51b5))(_0x589ef9||{});const _0x11921c=_0xb8081=>_0x4be09a['dayjs'](new Date(+_0xb8081))[_0x18460f(0x103)]('YYYY/MM/DD\x20HH:mm'),_0x1da3c9=async(_0x7daad1,_0x18615f)=>{const _0x2f627e=_0x18460f,_0x43b51b=_0x7daad1[_0x2f627e(0x10d)](_0x4be09a['UserManagerService']),_0x529411=_0x7daad1[_0x2f627e(0x10d)](_0x29551a[_0x2f627e(0xe5)]);_0x18615f['forEach'](_0x26b8de=>{const _0x1b3b70=_0x2f627e;_0x43b51b[_0x1b3b70(0xdb)](_0x26b8de)&&_0x18615f[_0x1b3b70(0x119)](_0x26b8de);}),_0x18615f['size']&&(await _0x529411[_0x2f627e(0x10d)]('/universer-api/user/list',{'params':{'userIDs':[..._0x18615f]}}))[_0x2f627e(0xf6)][_0x2f627e(0x126)][_0x2f627e(0xda)](_0xf9690c=>{const _0x1862ef=_0x2f627e;_0xf9690c&&_0x43b51b[_0x1862ef(0x112)](_0xf9690c);});};var _0x39cd81=Object[_0x18460f(0x133)],_0x1a18b7=(_0x4c966e,_0x476043,_0x2d4202,_0x3b0138)=>{for(var _0x4e7225=_0x3b0138>0x1?void 0x0:_0x3b0138?_0x39cd81(_0x476043,_0x2d4202):_0x476043,_0x115a27=_0x4c966e['length']-0x1,_0x72eedb;_0x115a27>=0x0;_0x115a27--)(_0x72eedb=_0x4c966e[_0x115a27])&&(_0x4e7225=_0x72eedb(_0x4e7225)||_0x4e7225);return _0x4e7225;},_0xa15a01=(_0x463d3c,_0x57e254)=>(_0x49c65a,_0x3dbe92)=>_0x57e254(_0x49c65a,_0x3dbe92,_0x463d3c);let _0x23f937=class extends _0x4be09a[_0x18460f(0x11f)]{constructor(_0xce1fd,_0xf67090,_0x337cb3,_0x3d8f8a){const _0x3644f6=_0x18460f;super(),this['_commentService']=_0xce1fd,this[_0x3644f6(0x132)]=_0xf67090,this[_0x3644f6(0x155)]=_0x337cb3,this[_0x3644f6(0x123)]=_0x3d8f8a,this[_0x3644f6(0xe2)](),this[_0x3644f6(0x152)]();}[_0x18460f(0x152)](){const _0x51f5e4=_0x18460f;this[_0x51f5e4(0x106)](this[_0x51f5e4(0x132)]['commentUpdate$'][_0x51f5e4(0x154)](_0x6ad529['bufferTime'](0x10))[_0x51f5e4(0x15a)](_0x2818ca=>{const _0x22e1ee=_0x51f5e4,_0x57bb84=new Set();_0x2818ca['forEach'](_0x11d7f2=>{const _0x500a13=_0x4f8c;switch(_0x11d7f2[_0x500a13(0x110)]){case _0x500a13(0xfb):{const _0x55b229=_0x11d7f2['payload']['personId'];_0x57bb84[_0x500a13(0xfb)](_0x55b229);break;}}}),_0x1da3c9(this[_0x22e1ee(0x123)],_0x57bb84);}));}[_0x18460f(0xe2)](){const _0x5c757d=_0x18460f;this[_0x5c757d(0x106)](this['_commentService'][_0x5c757d(0x13d)][_0x5c757d(0x15a)](async _0x5a01f2=>{const _0x201c87=_0x5c757d;var _0x4cb26c,_0x59f82b,_0xc8bd9a,_0x10ff72;const _0x21fd94=(_0x4cb26c=this['_threadCommentModel'][_0x201c87(0x12d)](_0x5a01f2['unitId'])[_0x201c87(0x156)](_0x5c2313=>_0x5c2313[_0x201c87(0xf1)]===_0x5a01f2[_0x201c87(0xf1)]))==null?void 0x0:_0x4cb26c[_0x201c87(0x14c)];if(!_0x21fd94)return;const {unitId:_0x578ec7,subUnitId:_0x559c66}=_0x21fd94;switch(_0x5a01f2[_0x201c87(0xec)]&&this['_userService'][_0x201c87(0x112)](_0x5a01f2['user']),_0x5a01f2[_0x201c87(0x110)]){case _0x589ef9[_0x201c87(0x120)]:break;case _0x589ef9[_0x201c87(0x107)]:{this[_0x201c87(0x132)][_0x201c87(0xeb)](_0x578ec7,_0x559c66,{'unitId':_0x578ec7,'subUnitId':_0x559c66,'ref':'','id':_0x5a01f2[_0x201c87(0xed)],'dT':_0x11921c(+_0x5a01f2[_0x201c87(0x131)]),'threadId':_0x5a01f2[_0x201c87(0xf1)],'personId':(_0xc8bd9a=(_0x59f82b=_0x5a01f2['user'])==null?void 0x0:_0x59f82b['userID'])!=null?_0xc8bd9a:_0x5a01f2[_0x201c87(0xff)],'text':JSON['parse'](_0x5a01f2['content']),'parentId':_0x21fd94['id']});break;}case _0x589ef9[_0x201c87(0xf7)]:{const _0x100d3d=this[_0x201c87(0x132)][_0x201c87(0x13f)](_0x578ec7,_0x559c66,_0x5a01f2[_0x201c87(0xed)]);_0x100d3d&&_0x100d3d[_0x201c87(0x13a)]&&this[_0x201c87(0x132)][_0x201c87(0xee)](_0x578ec7,_0x559c66,_0x5a01f2[_0x201c87(0xed)]);break;}case _0x589ef9[_0x201c87(0x113)]:{this[_0x201c87(0x132)]['updateComment'](_0x578ec7,_0x559c66,{'commentId':_0x5a01f2[_0x201c87(0xed)],'text':JSON[_0x201c87(0x11e)](_0x5a01f2['content'])});break;}case _0x589ef9['Solve']:{const _0x261d5a=(_0x10ff72=this[_0x201c87(0x132)][_0x201c87(0x12d)](_0x5a01f2[_0x201c87(0x116)])[_0x201c87(0x156)](_0x347293=>_0x347293[_0x201c87(0xf1)]===_0x5a01f2[_0x201c87(0xf1)]))==null?void 0x0:_0x10ff72[_0x201c87(0x14c)];_0x261d5a&&this[_0x201c87(0x132)][_0x201c87(0x102)](_0x578ec7,_0x559c66,_0x261d5a['id'],_0x5a01f2[_0x201c87(0x11d)]===_0xa324b1['Solved']);break;}}}));}};_0x23f937=_0x1a18b7([_0xa15a01(0x0,_0x4be09a['Inject'](_0x3eeda6[_0x18460f(0x136)])),_0xa15a01(0x1,_0x4be09a[_0x18460f(0x139)](_0x1d9654[_0x18460f(0x159)])),_0xa15a01(0x2,_0x4be09a['Inject'](_0x4be09a[_0x18460f(0xf3)])),_0xa15a01(0x3,_0x4be09a['Inject'](_0x4be09a[_0x18460f(0x101)]))],_0x23f937);const _0x22dcd4=_0x18460f(0x10a),_0x4ac3b0={};var _0x405c56=Object[_0x18460f(0x133)],_0x16dd08=(_0x19226a,_0x387d47,_0x418488,_0x58f396)=>{const _0x549dda=_0x18460f;for(var _0x48c0bb=_0x58f396>0x1?void 0x0:_0x58f396?_0x405c56(_0x387d47,_0x418488):_0x387d47,_0x283ad0=_0x19226a[_0x549dda(0x153)]-0x1,_0x2e8d3f;_0x283ad0>=0x0;_0x283ad0--)(_0x2e8d3f=_0x19226a[_0x283ad0])&&(_0x48c0bb=_0x2e8d3f(_0x48c0bb)||_0x48c0bb);return _0x48c0bb;},_0x58de65=(_0x3184ee,_0x12dcbd)=>(_0x1f332b,_0x222287)=>_0x12dcbd(_0x1f332b,_0x222287,_0x3184ee);function _0x478c57(_0x18dd2b,_0xfcb319){const _0x3220bd=_0x18460f,_0x2f15d4=_0x18dd2b[_0x3220bd(0x137)][0x0];return{..._0xfcb319,'id':_0x2f15d4[_0x3220bd(0xed)],'resolved':_0x18dd2b[_0x3220bd(0x11d)]===0x1,'dT':_0x11921c(_0x2f15d4[_0x3220bd(0x131)]),'personId':_0x2f15d4[_0x3220bd(0xff)],'threadId':_0x2f15d4[_0x3220bd(0xf1)]};}function _0x5952a2(_0x1f56a9,_0x448707,_0x120b02){const _0x3c5ba0=_0x18460f;var _0x4460f1,_0x442baf;if(((_0x442baf=(_0x4460f1=_0x1f56a9==null?void 0x0:_0x1f56a9[_0x3c5ba0(0x137)])==null?void 0x0:_0x4460f1[_0x3c5ba0(0x153)])!=null?_0x442baf:0x0)>0x0){const _0x3f5169=(_0x55fe3f,_0x5a104d)=>({'id':_0x55fe3f[_0x3c5ba0(0xed)],'threadId':_0x55fe3f[_0x3c5ba0(0xf1)],'dT':_0x11921c(_0x55fe3f[_0x3c5ba0(0x131)]),'personId':_0x55fe3f[_0x3c5ba0(0xff)],'resolved':_0x1f56a9['solved']===_0xa324b1[_0x3c5ba0(0x121)],'unitId':_0x448707,'subUnitId':_0x120b02,'text':JSON[_0x3c5ba0(0x11e)](_0x55fe3f[_0x3c5ba0(0x12a)]),'parentId':_0x5a104d}),_0x7495a0=_0x3f5169(_0x1f56a9['replies'][0x0]);return{..._0x7495a0,'children':_0x1f56a9['replies'][_0x3c5ba0(0x11b)](0x1)['map'](_0x37f13c=>_0x3f5169(_0x37f13c,_0x7495a0['id']))};}return null;}let _0x75b208=class{constructor(_0x40765a,_0x230614,_0x1028e1,_0x2a4f20){const _0x42fa75=_0x18460f;this[_0x42fa75(0xf4)]=_0x40765a,this[_0x42fa75(0x155)]=_0x230614,this[_0x42fa75(0xdf)]=_0x1028e1,this[_0x42fa75(0x123)]=_0x2a4f20;}async[_0x18460f(0xeb)](_0xccb0a){const _0x1e9c14=_0x18460f;var _0x2c6771,_0xefc3f0;const {parentId:_0x5c0f98,unitId:_0x5da079,text:_0x5668a4,threadId:_0x2fc376}=_0xccb0a,_0x257bfb=(_0xefc3f0=(_0x2c6771=_0x5668a4[_0x1e9c14(0xf5)])==null?void 0x0:_0x2c6771['filter'](_0x5ae58a=>_0x5ae58a['rangeType']===_0x4be09a['CustomRangeType'][_0x1e9c14(0x115)])[_0x1e9c14(0x124)](_0x50aff1=>_0x50aff1[_0x1e9c14(0x118)]))!=null?_0xefc3f0:[],_0xc17b8a=JSON[_0x1e9c14(0x142)](_0x5668a4),_0x520ff5=(await this[_0x1e9c14(0xdf)][_0x1e9c14(0x145)](_0x5da079))[_0x1e9c14(0xea)]();if(_0x5c0f98){const _0x2ff8e2={'memberId':_0x520ff5,'unitId':_0x5da079,'content':_0xc17b8a,'mention':_0x257bfb,'threadId':_0x2fc376},_0x743dd=(await this['_httpService'][_0x1e9c14(0x14e)](_0x1e9c14(0x140)+_0x5da079+_0x1e9c14(0x125),{'body':_0x2ff8e2}))[_0x1e9c14(0xf6)][_0x1e9c14(0x14f)];return{..._0xccb0a,'id':_0x743dd[_0x1e9c14(0xed)],'dT':_0x4be09a[_0x1e9c14(0x117)](+_0x743dd['createTimestamp'])[_0x1e9c14(0x103)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x743dd[_0x1e9c14(0xff)]};}else{const _0x3a382a={'memberId':_0x520ff5,'unitId':_0x5da079,'content':_0xc17b8a,'mention':_0x257bfb},_0x2a4a4d=await this[_0x1e9c14(0xf4)][_0x1e9c14(0x14e)](_0x1e9c14(0x140)+_0x5da079+_0x1e9c14(0x12f),{'body':_0x3a382a});return _0x478c57(_0x2a4a4d[_0x1e9c14(0xf6)]['comment'],_0xccb0a);}}async[_0x18460f(0xe8)](_0x2edd7c){const _0x4ba507=_0x18460f;var _0x369108,_0x42499e;const {text:_0x3613bd,unitId:_0x4cb646}=_0x2edd7c,_0x3d7e07=(_0x42499e=(_0x369108=_0x3613bd['customRanges'])==null?void 0x0:_0x369108[_0x4ba507(0xef)](_0x3025ef=>_0x3025ef['rangeType']===_0x4be09a[_0x4ba507(0xe3)][_0x4ba507(0x115)])[_0x4ba507(0x124)](_0x2192a3=>_0x2192a3[_0x4ba507(0x118)]))!=null?_0x42499e:[],_0x350575=JSON[_0x4ba507(0x142)](_0x3613bd),_0x37830c=_0x2edd7c[_0x4ba507(0xf1)],_0x148d4f=_0x2edd7c['id'],_0x3c8024={'memberId':(await this['_sessionService'][_0x4ba507(0x145)](_0x4cb646))['getMemberID'](),'unitId':_0x4cb646,'threadId':_0x37830c,'mention':_0x3d7e07,'content':_0x350575,'replyId':_0x148d4f},_0x35943f=await this[_0x4ba507(0xf4)][_0x4ba507(0x14e)](_0x4ba507(0x140)+_0x4cb646+_0x4ba507(0x10b),{'body':_0x3c8024});return!_0x35943f['body']['error']||_0x35943f[_0x4ba507(0xf6)]['error'][_0x4ba507(0x14d)]===0x1;}async[_0x18460f(0x102)](_0x2613af){const _0x226aa2=_0x18460f,{unitId:_0xaa88ec}=_0x2613af,_0x46c5fe=_0x2613af['threadId'],_0x588251={'memberId':this['_userService'][_0x226aa2(0x13c)]()[_0x226aa2(0xe1)],'unitId':_0xaa88ec,'threadId':_0x46c5fe,'solved':_0x2613af[_0x226aa2(0xfc)]?_0xa324b1[_0x226aa2(0x121)]:_0xa324b1['OpenOrReOpen']},_0x3f80f4=await this['_httpService'][_0x226aa2(0x14e)](_0x226aa2(0x140)+_0xaa88ec+_0x226aa2(0x151),{'body':_0x588251});return!_0x3f80f4[_0x226aa2(0xf6)]['error']||_0x3f80f4[_0x226aa2(0xf6)][_0x226aa2(0x12c)]['code']===0x1;}async['deleteComment'](_0x1220ee,_0x14742e,_0x22812b,_0x20c597){const _0x3120db=_0x18460f,_0x28875b={'memberId':(await this[_0x3120db(0xdf)][_0x3120db(0x145)](_0x1220ee))[_0x3120db(0xea)](),'threadId':_0x22812b,'replyId':_0x20c597,'unitId':_0x1220ee},_0x504ce3=await this[_0x3120db(0xf4)][_0x3120db(0x14e)]('/universer-api/comment/unit/'+_0x1220ee+_0x3120db(0x111),{'body':_0x28875b});return!_0x504ce3[_0x3120db(0xf6)][_0x3120db(0x12c)]||_0x504ce3[_0x3120db(0xf6)]['error'][_0x3120db(0x14d)]===0x1;}async[_0x18460f(0x148)](_0x5b4a94,_0x27838c,_0x382b48){const _0x21cb2e=_0x18460f,_0x4377d3={'unitId':_0x5b4a94,'threadId':_0x382b48},_0x1140aa=await this['_httpService'][_0x21cb2e(0x14e)](_0x21cb2e(0x140)+_0x5b4a94+_0x21cb2e(0x122),{'body':_0x4377d3}),_0x1e8de0=_0x382b48[_0x21cb2e(0x124)](_0x423191=>_0x5952a2(_0x1140aa[_0x21cb2e(0xf6)][_0x21cb2e(0xe6)][_0x423191],_0x5b4a94,_0x27838c))[_0x21cb2e(0xef)](Boolean);return Object['values'](_0x1140aa[_0x21cb2e(0xf6)]['users'])[_0x21cb2e(0xda)](_0x47f623=>{const _0x40f01f=_0x21cb2e;this[_0x40f01f(0x155)][_0x40f01f(0x112)](_0x47f623);}),_0x1e8de0;}['saveCommentToSnapshot'](_0x133917){const _0x1d39ee=_0x18460f;return{'id':_0x133917['id'],'threadId':_0x133917[_0x1d39ee(0xf1)],'ref':_0x133917[_0x1d39ee(0xdc)]};}};_0x75b208=_0x16dd08([_0x58de65(0x0,_0x4be09a[_0x18460f(0x139)](_0x29551a[_0x18460f(0xe5)])),_0x58de65(0x1,_0x4be09a['Inject'](_0x4be09a['UserManagerService'])),_0x58de65(0x2,_0x4be09a['Inject'](_0x3eeda6[_0x18460f(0x15c)])),_0x58de65(0x3,_0x4be09a[_0x18460f(0x139)](_0x4be09a['Injector']))],_0x75b208);var _0x3f523c=Object[_0x18460f(0x133)],_0x578462=(_0xb780be,_0x4f5980,_0x1fd2a6,_0xd7229)=>{const _0x20caf2=_0x18460f;for(var _0x5d1b0b=_0xd7229>0x1?void 0x0:_0xd7229?_0x3f523c(_0x4f5980,_0x1fd2a6):_0x4f5980,_0x3111e8=_0xb780be[_0x20caf2(0x153)]-0x1,_0x35acd1;_0x3111e8>=0x0;_0x3111e8--)(_0x35acd1=_0xb780be[_0x3111e8])&&(_0x5d1b0b=_0x35acd1(_0x5d1b0b)||_0x5d1b0b);return _0x5d1b0b;},_0x4241d9=(_0x28209c,_0x3cf66c)=>(_0x18ce09,_0x1a6dcf)=>_0x3cf66c(_0x18ce09,_0x1a6dcf,_0x28209c);let _0x2c7013=class extends _0x4be09a['Disposable']{constructor(_0x200e7c,_0x4fe6cb){const _0x196752=_0x18460f;super(),this['_threadCommentDataSourceService']=_0x200e7c,this[_0x196752(0x104)]=_0x4fe6cb,this[_0x196752(0x134)]();}['_initDataSource'](){const _0x5f0173=_0x18460f;this['_threadCommentDataSourceService'][_0x5f0173(0x11a)]=this[_0x5f0173(0x104)],this['_threadCommentDataSourceService'][_0x5f0173(0xe4)]=!0x1;}};_0x2c7013=_0x578462([_0x4241d9(0x0,_0x1d9654[_0x18460f(0x141)]),_0x4241d9(0x1,_0x4be09a[_0x18460f(0x139)](_0x75b208))],_0x2c7013);var _0x4782c7=Object[_0x18460f(0x15b)],_0x16cffa=Object[_0x18460f(0x133)],_0x1ac04e=(_0x4f01a1,_0x110190,_0x1e11be)=>_0x110190 in _0x4f01a1?_0x4782c7(_0x4f01a1,_0x110190,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1e11be}):_0x4f01a1[_0x110190]=_0x1e11be,_0x5ef195=(_0x4b712b,_0x549022,_0x23c121,_0x3e2919)=>{for(var _0x2b1080=_0x3e2919>0x1?void 0x0:_0x3e2919?_0x16cffa(_0x549022,_0x23c121):_0x549022,_0x10b2ae=_0x4b712b['length']-0x1,_0xd1e9a2;_0x10b2ae>=0x0;_0x10b2ae--)(_0xd1e9a2=_0x4b712b[_0x10b2ae])&&(_0x2b1080=_0xd1e9a2(_0x2b1080)||_0x2b1080);return _0x2b1080;},_0x5624ed=(_0x1009d5,_0xacea84)=>(_0x37f169,_0x1f2324)=>_0xacea84(_0x37f169,_0x1f2324,_0x1009d5),_0x35eaa5=(_0x45bb11,_0x1a8aa0,_0x29e4a3)=>_0x1ac04e(_0x45bb11,typeof _0x1a8aa0!=_0x18460f(0x147)?_0x1a8aa0+'':_0x1a8aa0,_0x29e4a3);_0x44299d[_0x18460f(0xfd)]=class extends _0x4be09a[_0x18460f(0x13e)]{constructor(_0x416558=_0x4ac3b0,_0x547585,_0x9eba62){const _0x321841=_0x18460f;super(),this[_0x321841(0xde)]=_0x416558,this[_0x321841(0x123)]=_0x547585,this[_0x321841(0x14a)]=_0x9eba62;const {..._0x8d2b83}=_0x4be09a[_0x321841(0x10e)]({},_0x4ac3b0,this[_0x321841(0xde)]);this[_0x321841(0x14a)]['setConfig'](_0x22dcd4,_0x8d2b83);}[_0x18460f(0xd7)](){const _0x2e912e=_0x18460f;[[_0x75b208],[_0x2c7013],[_0x23f937]][_0x2e912e(0xda)](_0x2108c8=>{const _0x3eb642=_0x2e912e;this[_0x3eb642(0x123)][_0x3eb642(0xfb)](_0x2108c8);});}['onReady'](){const _0xf95927=_0x18460f;this[_0xf95927(0x123)]['get'](_0x2c7013),this['_injector'][_0xf95927(0x10d)](_0x23f937);}},_0x35eaa5(_0x44299d[_0x18460f(0xfd)],_0x18460f(0x146),_0x208a5e),_0x35eaa5(_0x44299d[_0x18460f(0xfd)],_0x18460f(0x110),_0x4be09a[_0x18460f(0xd9)]['UNIVER_UNKNOWN']),_0x44299d['UniverThreadCommentDataSourcePlugin']=_0x5ef195([_0x4be09a[_0x18460f(0x129)](_0x4d0909[_0x18460f(0xe7)],_0x3eeda6[_0x18460f(0x127)],_0x1920d3[_0x18460f(0x10f)]),_0x5624ed(0x1,_0x4be09a['Inject'](_0x4be09a[_0x18460f(0x101)])),_0x5624ed(0x2,_0x4be09a['IConfigService'])],_0x44299d[_0x18460f(0xfd)]),Object[_0x18460f(0x15b)](_0x44299d,Symbol[_0x18460f(0x100)],{'value':'Module'});}));function _0x4f8c(_0x309c45,_0x2525bf){const _0x145147=_0x1451();return _0x4f8c=function(_0x4f8cf3,_0x23a8d0){_0x4f8cf3=_0x4f8cf3-0xd7;let _0x5e5468=_0x145147[_0x4f8cf3];return _0x5e5468;},_0x4f8c(_0x309c45,_0x2525bf);}function _0x1451(){const _0x401c28=['users','UniverCollaborationClientPlugin','amd','DependentOn','content','@univerjs-pro/license','error','getUnit','49392KKSidI','/add','@univerjs/thread-comment-ui','createTimestamp','_threadCommentModel','getOwnPropertyDescriptor','_initDataSource','OpenOrReOpen','CommentService','replies','30PKsLun','Inject','parentId','@univerjs-pro/collaboration-client','getCurrentUser','commentUpdate$','Plugin','getComment','/universer-api/comment/unit/','IThreadCommentDataSourceService','stringify','58rQBtgZ','Solve','requireSession','pluginName','symbol','listComments','1312TNyVjk','_configService','UniverCore','root','code','post','reply','@univerjs/core','/solved','_initUserSync','length','pipe','_userService','find','UniverNetwork','exports','ThreadCommentModel','subscribe','defineProperty','CollaborationSessionService','4XLKuAe','onStarting','rxjs','UniverInstanceType','forEach','getUser','ref','UniverThreadComment','_config','_sessionService','39555132GXMTNw','userID','_init','CustomRangeType','syncUpdateMutationToColla','HTTPService','comments','UniverThreadCommentUIPlugin','updateComment','505068ewQKDO','getMemberID','addComment','user','replyId','deleteComment','filter','1392410iRwbrK','threadId','function','UserManagerService','_httpService','customRanges','body','Delete','UNRECOGNIZED','4681061oRBJDW','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','add','resolved','UniverThreadCommentDataSourcePlugin','@univerjs/network','userId','toStringTag','Injector','resolveComment','format','_threadCommentDataSource','21Upgbij','disposeWithMe','Reply','@univerjs/thread-comment','647bdkYlN','thread-comment-data-source.config','/edit','Unknown','get','merge','UniverLicensePlugin','type','/delete','addUser','Edit','UniverProThreadCommentDatasource','COMMENT','unitId','dayjs','rangeId','delete','dataSource','slice','3768840cJMneR','solved','parse','Disposable','Add','Solved','/list','_injector','map','/reply'];_0x1451=function(){return _0x401c28;};return _0x1451();}
1
+ function _0x4164(_0x2d82ec,_0x4c07b6){const _0x1fe063=_0x1fe0();return _0x4164=function(_0x416457,_0x405841){_0x416457=_0x416457-0x65;let _0x10e41c=_0x1fe063[_0x416457];return _0x10e41c;},_0x4164(_0x2d82ec,_0x4c07b6);}(function(_0x4b2b50,_0x151460){const _0x533c98=_0x4164,_0x40f6fa=_0x4b2b50();while(!![]){try{const _0x349ba4=-parseInt(_0x533c98(0xe6))/0x1*(parseInt(_0x533c98(0xd3))/0x2)+-parseInt(_0x533c98(0xbc))/0x3*(parseInt(_0x533c98(0x98))/0x4)+parseInt(_0x533c98(0x9e))/0x5*(-parseInt(_0x533c98(0xd6))/0x6)+parseInt(_0x533c98(0x68))/0x7+-parseInt(_0x533c98(0xbe))/0x8*(-parseInt(_0x533c98(0xb8))/0x9)+parseInt(_0x533c98(0xc5))/0xa+parseInt(_0x533c98(0x9c))/0xb;if(_0x349ba4===_0x151460)break;else _0x40f6fa['push'](_0x40f6fa['shift']());}catch(_0x36014b){_0x40f6fa['push'](_0x40f6fa['shift']());}}}(_0x1fe0,0x8116f),function(_0x1eed9d,_0x2880dd){const _0x2de457=_0x4164;typeof exports==_0x2de457(0xc8)&&typeof module<'u'?_0x2880dd(exports,require(_0x2de457(0xa0)),require(_0x2de457(0x69)),require(_0x2de457(0x92)),require(_0x2de457(0x6c)),require('@univerjs/thread-comment'),require(_0x2de457(0xf0)),require(_0x2de457(0x83))):typeof define==_0x2de457(0xad)&&define[_0x2de457(0x84)]?define([_0x2de457(0x9d),_0x2de457(0xa0),'@univerjs-pro/license','@univerjs/core',_0x2de457(0x6c),_0x2de457(0x90),'rxjs',_0x2de457(0x83)],_0x2880dd):(_0x1eed9d=typeof globalThis<'u'?globalThis:_0x1eed9d||self,_0x2880dd(_0x1eed9d[_0x2de457(0xcb)]={},_0x1eed9d[_0x2de457(0x9f)],_0x1eed9d[_0x2de457(0xd5)],_0x1eed9d['UniverCore'],_0x1eed9d[_0x2de457(0xa3)],_0x1eed9d[_0x2de457(0xef)],_0x1eed9d['rxjs'],_0x1eed9d[_0x2de457(0x67)]));}(this,function(_0x323bde,_0x4d3d6b,_0x543dec,_0x394557,_0x30fdc7,_0x4ed6f0,_0x3ff968,_0x1d250c){'use strict';const _0x205072=_0x4164;const _0x989351=_0x205072(0x77);var _0x13a704=(_0x4a6617=>(_0x4a6617[_0x4a6617['OpenOrReOpen']=0x0]=_0x205072(0xcd),_0x4a6617[_0x4a6617[_0x205072(0xaa)]=0x1]=_0x205072(0xaa),_0x4a6617[_0x4a6617[_0x205072(0x91)]=-0x1]=_0x205072(0x91),_0x4a6617))(_0x13a704||{}),_0x19e2d3=(_0x5154ea=>(_0x5154ea[_0x5154ea['Unknown']=0x0]=_0x205072(0xcf),_0x5154ea[_0x5154ea['Add']=0x1]=_0x205072(0x73),_0x5154ea[_0x5154ea[_0x205072(0x9b)]=0x2]=_0x205072(0x9b),_0x5154ea[_0x5154ea[_0x205072(0xb5)]=0x3]=_0x205072(0xb5),_0x5154ea[_0x5154ea[_0x205072(0xe8)]=0x4]=_0x205072(0xe8),_0x5154ea[_0x5154ea[_0x205072(0x89)]=0x5]=_0x205072(0x89),_0x5154ea[_0x5154ea[_0x205072(0x91)]=-0x1]=_0x205072(0x91),_0x5154ea))(_0x19e2d3||{});const _0x2cdef5=_0x5be655=>_0x394557[_0x205072(0x6f)](new Date(+_0x5be655))[_0x205072(0xe1)](_0x205072(0xe0)),_0x3f1a1f=async(_0x5683f2,_0x1b533b)=>{const _0x438ed8=_0x205072,_0x32d074=_0x5683f2['get'](_0x394557[_0x438ed8(0xc7)]),_0x386814=_0x5683f2[_0x438ed8(0xcc)](_0x1d250c[_0x438ed8(0x8b)]);_0x1b533b[_0x438ed8(0xdd)](_0x5ee1c6=>{const _0x34827d=_0x438ed8;_0x32d074[_0x34827d(0x7d)](_0x5ee1c6)&&_0x1b533b[_0x34827d(0x74)](_0x5ee1c6);}),_0x1b533b['size']&&(await _0x386814[_0x438ed8(0xcc)](_0x438ed8(0xa9),{'params':{'userIDs':[..._0x1b533b]}}))[_0x438ed8(0x7b)][_0x438ed8(0x94)]['forEach'](_0x183e07=>{const _0x3fed56=_0x438ed8;_0x183e07&&_0x32d074[_0x3fed56(0x97)](_0x183e07);});};var _0x48767a=Object[_0x205072(0x78)],_0x304182=(_0x3b1a36,_0x572933,_0xff954d,_0x3d3939)=>{const _0x2435d5=_0x205072;for(var _0x4f7ae7=_0x3d3939>0x1?void 0x0:_0x3d3939?_0x48767a(_0x572933,_0xff954d):_0x572933,_0x115f83=_0x3b1a36[_0x2435d5(0xa4)]-0x1,_0x358789;_0x115f83>=0x0;_0x115f83--)(_0x358789=_0x3b1a36[_0x115f83])&&(_0x4f7ae7=_0x358789(_0x4f7ae7)||_0x4f7ae7);return _0x4f7ae7;},_0x2b76a3=(_0x4be5db,_0x38b2e1)=>(_0x5b6c7d,_0x363380)=>_0x38b2e1(_0x5b6c7d,_0x363380,_0x4be5db);let _0x11293b=class extends _0x394557['Disposable']{constructor(_0x30794,_0x421884,_0x32ee9b,_0x1b0ebc){const _0x18b0ce=_0x205072;super(),this['_commentService']=_0x30794,this[_0x18b0ce(0xba)]=_0x421884,this[_0x18b0ce(0xa8)]=_0x32ee9b,this['_injector']=_0x1b0ebc,this[_0x18b0ce(0xc6)](),this[_0x18b0ce(0x87)]();}[_0x205072(0x87)](){const _0x3bbf19=_0x205072;this[_0x3bbf19(0xc3)](this[_0x3bbf19(0xba)][_0x3bbf19(0xbb)][_0x3bbf19(0xd2)](_0x3ff968['bufferTime'](0x10))[_0x3bbf19(0x7f)](_0x19d627=>{const _0x1726f5=_0x3bbf19,_0x7e0db0=new Set();_0x19d627[_0x1726f5(0xdd)](_0xf289cc=>{const _0x4b189f=_0x1726f5;switch(_0xf289cc[_0x4b189f(0xd0)]){case'add':{const _0x577978=_0xf289cc[_0x4b189f(0xd7)]['personId'];_0x7e0db0['add'](_0x577978);break;}}}),_0x3f1a1f(this[_0x1726f5(0xeb)],_0x7e0db0);}));}['_init'](){const _0x115a66=_0x205072;this[_0x115a66(0xc3)](this[_0x115a66(0xc4)][_0x115a66(0xbb)]['subscribe'](async _0x561762=>{const _0x50a1d1=_0x115a66;var _0x310d5e,_0x4fd85,_0x4ea511,_0x5ef2d6;const _0x3a7fe2=(_0x310d5e=this[_0x50a1d1(0xba)]['getUnit'](_0x561762[_0x50a1d1(0xbd)])[_0x50a1d1(0x88)](_0x5828b8=>_0x5828b8[_0x50a1d1(0xa1)]===_0x561762[_0x50a1d1(0xa1)]))==null?void 0x0:_0x310d5e[_0x50a1d1(0x8e)];if(!_0x3a7fe2)return;const {unitId:_0x20fa8c,subUnitId:_0x3f12e9}=_0x3a7fe2;switch(_0x561762[_0x50a1d1(0xb2)]&&this[_0x50a1d1(0xa8)][_0x50a1d1(0x97)](_0x561762[_0x50a1d1(0xb2)]),_0x561762[_0x50a1d1(0xd0)]){case _0x19e2d3['Add']:break;case _0x19e2d3['Reply']:{this['_threadCommentModel'][_0x50a1d1(0x85)](_0x20fa8c,_0x3f12e9,{'unitId':_0x20fa8c,'subUnitId':_0x3f12e9,'ref':'','id':_0x561762[_0x50a1d1(0xe3)],'dT':_0x2cdef5(+_0x561762[_0x50a1d1(0x9a)]),'threadId':_0x561762[_0x50a1d1(0xa1)],'personId':(_0x4ea511=(_0x4fd85=_0x561762[_0x50a1d1(0xb2)])==null?void 0x0:_0x4fd85[_0x50a1d1(0xec)])!=null?_0x4ea511:_0x561762[_0x50a1d1(0x72)],'text':JSON[_0x50a1d1(0xb3)](_0x561762[_0x50a1d1(0x6e)]),'parentId':_0x3a7fe2['id']});break;}case _0x19e2d3[_0x50a1d1(0xe8)]:{const _0x148dc3=this[_0x50a1d1(0xba)][_0x50a1d1(0xaf)](_0x20fa8c,_0x3f12e9,_0x561762['replyId']);_0x148dc3&&_0x148dc3[_0x50a1d1(0xee)]&&this['_threadCommentModel'][_0x50a1d1(0x86)](_0x20fa8c,_0x3f12e9,_0x561762[_0x50a1d1(0xe3)]);break;}case _0x19e2d3['Edit']:{this[_0x50a1d1(0xba)][_0x50a1d1(0xc0)](_0x20fa8c,_0x3f12e9,{'commentId':_0x561762[_0x50a1d1(0xe3)],'text':JSON['parse'](_0x561762['content'])});break;}case _0x19e2d3['Solve']:{const _0x28c3e4=(_0x5ef2d6=this['_threadCommentModel'][_0x50a1d1(0xe7)](_0x561762[_0x50a1d1(0xbd)])['find'](_0x249fad=>_0x249fad[_0x50a1d1(0xa1)]===_0x561762[_0x50a1d1(0xa1)]))==null?void 0x0:_0x5ef2d6['root'];_0x28c3e4&&this['_threadCommentModel'][_0x50a1d1(0xb0)](_0x20fa8c,_0x3f12e9,_0x28c3e4['id'],_0x561762[_0x50a1d1(0x65)]===_0x13a704['Solved']);break;}}}));}};_0x11293b=_0x304182([_0x2b76a3(0x0,_0x394557[_0x205072(0xb9)](_0x4d3d6b[_0x205072(0x99)])),_0x2b76a3(0x1,_0x394557[_0x205072(0xb9)](_0x4ed6f0[_0x205072(0x70)])),_0x2b76a3(0x2,_0x394557[_0x205072(0xb9)](_0x394557[_0x205072(0xc7)])),_0x2b76a3(0x3,_0x394557['Inject'](_0x394557[_0x205072(0x7e)]))],_0x11293b);const _0x154246=_0x205072(0x82),_0x312504={};var _0x495b20=Object[_0x205072(0x78)],_0xf59fd7=(_0x51eedf,_0x35bd64,_0x44c174,_0xc14794)=>{const _0x423b82=_0x205072;for(var _0x5a4b6a=_0xc14794>0x1?void 0x0:_0xc14794?_0x495b20(_0x35bd64,_0x44c174):_0x35bd64,_0x1b94b3=_0x51eedf[_0x423b82(0xa4)]-0x1,_0x396d41;_0x1b94b3>=0x0;_0x1b94b3--)(_0x396d41=_0x51eedf[_0x1b94b3])&&(_0x5a4b6a=_0x396d41(_0x5a4b6a)||_0x5a4b6a);return _0x5a4b6a;},_0x556675=(_0x1aad2e,_0x4ec42e)=>(_0x328f84,_0x211531)=>_0x4ec42e(_0x328f84,_0x211531,_0x1aad2e);function _0x4e00d0(_0x18041c,_0x4586ff){const _0x39bc79=_0x205072,_0x3bd5cd=_0x18041c[_0x39bc79(0x8d)][0x0];return{..._0x4586ff,'id':_0x3bd5cd['replyId'],'resolved':_0x18041c[_0x39bc79(0x65)]===0x1,'dT':_0x2cdef5(_0x3bd5cd[_0x39bc79(0x9a)]),'personId':_0x3bd5cd[_0x39bc79(0x72)],'threadId':_0x3bd5cd[_0x39bc79(0xa1)]};}function _0x2c7e5a(_0xff57d6,_0x2a989f,_0x5f3601){const _0x113993=_0x205072;var _0x99938a,_0x31ce4f;if(((_0x31ce4f=(_0x99938a=_0xff57d6==null?void 0x0:_0xff57d6['replies'])==null?void 0x0:_0x99938a[_0x113993(0xa4)])!=null?_0x31ce4f:0x0)>0x0){const _0x197652=(_0x1d017a,_0x19390d)=>({'id':_0x1d017a[_0x113993(0xe3)],'threadId':_0x1d017a[_0x113993(0xa1)],'dT':_0x2cdef5(_0x1d017a['createTimestamp']),'personId':_0x1d017a[_0x113993(0x72)],'resolved':_0xff57d6[_0x113993(0x65)]===_0x13a704[_0x113993(0xaa)],'unitId':_0x2a989f,'subUnitId':_0x5f3601,'text':JSON[_0x113993(0xb3)](_0x1d017a[_0x113993(0x6e)]),'parentId':_0x19390d}),_0x28aecc=_0x197652(_0xff57d6[_0x113993(0x8d)][0x0]);return{..._0x28aecc,'children':_0xff57d6[_0x113993(0x8d)]['slice'](0x1)[_0x113993(0xca)](_0xa2e3ff=>_0x197652(_0xa2e3ff,_0x28aecc['id']))};}return null;}let _0x4a6c43=class{constructor(_0x4b926b,_0x304e37,_0x3adfb8,_0x45255c){const _0x132464=_0x205072;this[_0x132464(0x7c)]=_0x4b926b,this[_0x132464(0xa8)]=_0x304e37,this[_0x132464(0x96)]=_0x3adfb8,this['_injector']=_0x45255c;}async[_0x205072(0x85)](_0x9e62ba){const _0x23f7c5=_0x205072;var _0x296ef8,_0x1e871e;const {parentId:_0x37d09d,unitId:_0x459ab3,text:_0x4674f7,threadId:_0x37bab9}=_0x9e62ba,_0x2ae0ba=(_0x1e871e=(_0x296ef8=_0x4674f7['customRanges'])==null?void 0x0:_0x296ef8[_0x23f7c5(0x6b)](_0x35281d=>_0x35281d['rangeType']===_0x394557['CustomRangeType'][_0x23f7c5(0xe9)])[_0x23f7c5(0xca)](_0xdf2e5d=>_0xdf2e5d[_0x23f7c5(0x7a)]))!=null?_0x1e871e:[],_0x408576=JSON[_0x23f7c5(0xb4)](_0x4674f7),_0x28147e=(await this[_0x23f7c5(0x96)][_0x23f7c5(0xa5)](_0x459ab3))[_0x23f7c5(0xab)]();if(_0x37d09d){const _0x173391={'memberId':_0x28147e,'unitId':_0x459ab3,'content':_0x408576,'mention':_0x2ae0ba,'threadId':_0x37bab9},_0x542194=(await this[_0x23f7c5(0x7c)][_0x23f7c5(0xc2)]('/universer-api/comment/unit/'+_0x459ab3+'/reply',{'body':_0x173391}))[_0x23f7c5(0x7b)][_0x23f7c5(0x79)];return{..._0x9e62ba,'id':_0x542194['replyId'],'dT':_0x394557[_0x23f7c5(0x6f)](+_0x542194['createTimestamp'])['format'](_0x23f7c5(0xe0)),'personId':_0x542194[_0x23f7c5(0x72)]};}else{const _0x3d11b1={'memberId':_0x28147e,'unitId':_0x459ab3,'content':_0x408576,'mention':_0x2ae0ba},_0x36fb2a=await this[_0x23f7c5(0x7c)][_0x23f7c5(0xc2)](_0x23f7c5(0x8c)+_0x459ab3+_0x23f7c5(0xc9),{'body':_0x3d11b1});return _0x4e00d0(_0x36fb2a[_0x23f7c5(0x7b)][_0x23f7c5(0x6d)],_0x9e62ba);}}async[_0x205072(0xc0)](_0x59de14){const _0x43ca18=_0x205072;var _0x3ee104,_0x2e7d3e;const {text:_0x2bcb53,unitId:_0x144924}=_0x59de14,_0x45be27=(_0x2e7d3e=(_0x3ee104=_0x2bcb53[_0x43ca18(0x71)])==null?void 0x0:_0x3ee104[_0x43ca18(0x6b)](_0xbb45ae=>_0xbb45ae[_0x43ca18(0xa2)]===_0x394557[_0x43ca18(0xb6)][_0x43ca18(0xe9)])[_0x43ca18(0xca)](_0x235556=>_0x235556['rangeId']))!=null?_0x2e7d3e:[],_0x3546ce=JSON['stringify'](_0x2bcb53),_0x20acca=_0x59de14[_0x43ca18(0xa1)],_0xaea9d7=_0x59de14['id'],_0x13797a={'memberId':(await this[_0x43ca18(0x96)][_0x43ca18(0xa5)](_0x144924))[_0x43ca18(0xab)](),'unitId':_0x144924,'threadId':_0x20acca,'mention':_0x45be27,'content':_0x3546ce,'replyId':_0xaea9d7},_0x2d9906=await this[_0x43ca18(0x7c)][_0x43ca18(0xc2)](_0x43ca18(0x8c)+_0x144924+_0x43ca18(0xae),{'body':_0x13797a});return!_0x2d9906[_0x43ca18(0x7b)][_0x43ca18(0xd9)]||_0x2d9906[_0x43ca18(0x7b)][_0x43ca18(0xd9)][_0x43ca18(0xb1)]===0x1;}async['resolveComment'](_0xae4502){const _0x6f07e7=_0x205072,{unitId:_0x422860}=_0xae4502,_0x59e02a=_0xae4502[_0x6f07e7(0xa1)],_0x16f72a={'memberId':this[_0x6f07e7(0xa8)][_0x6f07e7(0xdf)]()['userID'],'unitId':_0x422860,'threadId':_0x59e02a,'solved':_0xae4502[_0x6f07e7(0xac)]?_0x13a704[_0x6f07e7(0xaa)]:_0x13a704[_0x6f07e7(0xcd)]},_0x132bb2=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x422860+_0x6f07e7(0xb7),{'body':_0x16f72a});return!_0x132bb2[_0x6f07e7(0x7b)]['error']||_0x132bb2[_0x6f07e7(0x7b)]['error']['code']===0x1;}async['deleteComment'](_0x15b2e0,_0x5d1ec8,_0x23d1da,_0x624d6e){const _0x5d2b74=_0x205072,_0x50dfbf={'memberId':(await this['_sessionService'][_0x5d2b74(0xa5)](_0x15b2e0))[_0x5d2b74(0xab)](),'threadId':_0x23d1da,'replyId':_0x624d6e,'unitId':_0x15b2e0},_0x5418d8=await this[_0x5d2b74(0x7c)][_0x5d2b74(0xc2)](_0x5d2b74(0x8c)+_0x15b2e0+_0x5d2b74(0xc1),{'body':_0x50dfbf});return!_0x5418d8[_0x5d2b74(0x7b)][_0x5d2b74(0xd9)]||_0x5418d8['body'][_0x5d2b74(0xd9)]['code']===0x1;}async['listComments'](_0x28c0fa,_0x4b1cd3,_0x2e8c14){const _0xe5ea49=_0x205072,_0x5331fd={'unitId':_0x28c0fa,'threadId':_0x2e8c14},_0x5be7a3=await this['_httpService']['post'](_0xe5ea49(0x8c)+_0x28c0fa+_0xe5ea49(0xd1),{'body':_0x5331fd}),_0x40a748=_0x2e8c14[_0xe5ea49(0xca)](_0x1388f7=>_0x2c7e5a(_0x5be7a3[_0xe5ea49(0x7b)]['comments'][_0x1388f7],_0x28c0fa,_0x4b1cd3))[_0xe5ea49(0x6b)](Boolean);return Object[_0xe5ea49(0xde)](_0x5be7a3['body'][_0xe5ea49(0x94)])[_0xe5ea49(0xdd)](_0x594bee=>{const _0x17c9be=_0xe5ea49;this[_0x17c9be(0xa8)]['addUser'](_0x594bee);}),_0x40a748;}[_0x205072(0xa6)](_0x59068d){const _0x91502f=_0x205072;return{'id':_0x59068d['id'],'threadId':_0x59068d[_0x91502f(0xa1)],'ref':_0x59068d[_0x91502f(0xea)]};}};_0x4a6c43=_0xf59fd7([_0x556675(0x0,_0x394557[_0x205072(0xb9)](_0x1d250c['HTTPService'])),_0x556675(0x1,_0x394557[_0x205072(0xb9)](_0x394557[_0x205072(0xc7)])),_0x556675(0x2,_0x394557[_0x205072(0xb9)](_0x4d3d6b[_0x205072(0xd8)])),_0x556675(0x3,_0x394557[_0x205072(0xb9)](_0x394557[_0x205072(0x7e)]))],_0x4a6c43);var _0x5c2b3a=Object[_0x205072(0x78)],_0x5ec2b4=(_0x294f73,_0x13c760,_0x549286,_0x5b2b83)=>{const _0x4b5567=_0x205072;for(var _0x141805=_0x5b2b83>0x1?void 0x0:_0x5b2b83?_0x5c2b3a(_0x13c760,_0x549286):_0x13c760,_0x5722d6=_0x294f73[_0x4b5567(0xa4)]-0x1,_0x599558;_0x5722d6>=0x0;_0x5722d6--)(_0x599558=_0x294f73[_0x5722d6])&&(_0x141805=_0x599558(_0x141805)||_0x141805);return _0x141805;},_0x23f8e6=(_0x405ee7,_0x4c535c)=>(_0x104b6e,_0x1a8665)=>_0x4c535c(_0x104b6e,_0x1a8665,_0x405ee7);let _0x325eaa=class extends _0x394557['Disposable']{constructor(_0x5f417e,_0x4ebb90){const _0x198d09=_0x205072;super(),this['_threadCommentDataSourceService']=_0x5f417e,this[_0x198d09(0x80)]=_0x4ebb90,this[_0x198d09(0xdc)]();}['_initDataSource'](){const _0x472cb2=_0x205072;this[_0x472cb2(0x8f)][_0x472cb2(0xe5)]=this[_0x472cb2(0x80)],this['_threadCommentDataSourceService'][_0x472cb2(0x8a)]=!0x1;}};_0x325eaa=_0x5ec2b4([_0x23f8e6(0x0,_0x4ed6f0[_0x205072(0xa7)]),_0x23f8e6(0x1,_0x394557['Inject'](_0x4a6c43))],_0x325eaa);var _0x27c8e8=Object[_0x205072(0xd4)],_0x379c17=Object[_0x205072(0x78)],_0x24a62e=(_0x475855,_0x43ff36,_0x528c19)=>_0x43ff36 in _0x475855?_0x27c8e8(_0x475855,_0x43ff36,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x528c19}):_0x475855[_0x43ff36]=_0x528c19,_0x3b5900=(_0x1f36c8,_0x389a89,_0x53e238,_0xa10a3b)=>{const _0x1c7f12=_0x205072;for(var _0x3f4fe0=_0xa10a3b>0x1?void 0x0:_0xa10a3b?_0x379c17(_0x389a89,_0x53e238):_0x389a89,_0x595980=_0x1f36c8[_0x1c7f12(0xa4)]-0x1,_0x5c881c;_0x595980>=0x0;_0x595980--)(_0x5c881c=_0x1f36c8[_0x595980])&&(_0x3f4fe0=_0x5c881c(_0x3f4fe0)||_0x3f4fe0);return _0x3f4fe0;},_0x2b273f=(_0x3ed987,_0x11afda)=>(_0x56d209,_0x531e4b)=>_0x11afda(_0x56d209,_0x531e4b,_0x3ed987),_0x2ad8d4=(_0x323d42,_0x39244b,_0x5b6de0)=>_0x24a62e(_0x323d42,typeof _0x39244b!=_0x205072(0xda)?_0x39244b+'':_0x39244b,_0x5b6de0);_0x323bde[_0x205072(0x76)]=class extends _0x394557['Plugin']{constructor(_0x589f4d=_0x312504,_0x28b0df,_0x41792b){const _0xace6c4=_0x205072;super(),this[_0xace6c4(0xe2)]=_0x589f4d,this[_0xace6c4(0xeb)]=_0x28b0df,this[_0xace6c4(0x66)]=_0x41792b;const {..._0x1f9416}=_0x394557[_0xace6c4(0x93)]({},_0x312504,this['_config']);this[_0xace6c4(0x66)][_0xace6c4(0xbf)](_0x154246,_0x1f9416);}['onStarting'](){const _0xcb9256=_0x205072;[[_0x4a6c43],[_0x325eaa],[_0x11293b]][_0xcb9256(0xdd)](_0x3adde9=>{const _0x41bb4e=_0xcb9256;this[_0x41bb4e(0xeb)][_0x41bb4e(0xed)](_0x3adde9);});}[_0x205072(0xe4)](){const _0x13855d=_0x205072;this[_0x13855d(0xeb)][_0x13855d(0xcc)](_0x325eaa),this[_0x13855d(0xeb)][_0x13855d(0xcc)](_0x11293b);}},_0x2ad8d4(_0x323bde['UniverThreadCommentDataSourcePlugin'],_0x205072(0x95),_0x989351),_0x2ad8d4(_0x323bde[_0x205072(0x76)],'type',_0x394557['UniverInstanceType'][_0x205072(0xf1)]),_0x323bde[_0x205072(0x76)]=_0x3b5900([_0x394557['DependentOn'](_0x30fdc7[_0x205072(0x81)],_0x4d3d6b[_0x205072(0xce)],_0x543dec['UniverLicensePlugin']),_0x2b273f(0x1,_0x394557['Inject'](_0x394557[_0x205072(0x7e)])),_0x2b273f(0x2,_0x394557[_0x205072(0x6a)])],_0x323bde[_0x205072(0x76)]),Object['defineProperty'](_0x323bde,Symbol[_0x205072(0xdb)],{'value':_0x205072(0x75)});}));function _0x1fe0(){const _0x1960c5=['_threadCommentDataSourceService','@univerjs/thread-comment','UNRECOGNIZED','@univerjs/core','merge','users','pluginName','_sessionService','addUser','437956WAvWGM','CommentService','createTimestamp','Reply','4198568odCJcr','exports','804875IqmrgL','UniverProCollaborationClient','@univerjs-pro/collaboration-client','threadId','rangeType','UniverThreadCommentUi','length','requireSession','saveCommentToSnapshot','IThreadCommentDataSourceService','_userService','/universer-api/user/list','Solved','getMemberID','resolved','function','/edit','getComment','resolveComment','code','user','parse','stringify','Edit','CustomRangeType','/solved','2799SRhfsx','Inject','_threadCommentModel','commentUpdate$','21ooaAnV','unitId','13152IObsiE','setConfig','updateComment','/delete','post','disposeWithMe','_commentService','1547860eTAxzn','_init','UserManagerService','object','/add','map','UniverProThreadCommentDatasource','get','OpenOrReOpen','UniverCollaborationClientPlugin','Unknown','type','/list','pipe','4ZYOYWv','defineProperty','UniverProLicense','24WwefMD','payload','CollaborationSessionService','error','symbol','toStringTag','_initDataSource','forEach','values','getCurrentUser','YYYY/MM/DD\x20HH:mm','format','_config','replyId','onReady','dataSource','39864nBnPoy','getUnit','Delete','COMMENT','ref','_injector','userID','add','parentId','UniverThreadComment','rxjs','UNIVER_UNKNOWN','solved','_configService','UniverNetwork','6797308Raabyi','@univerjs-pro/license','IConfigService','filter','@univerjs/thread-comment-ui','comment','content','dayjs','ThreadCommentModel','customRanges','userId','Add','delete','Module','UniverThreadCommentDataSourcePlugin','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getOwnPropertyDescriptor','reply','rangeId','body','_httpService','getUser','Injector','subscribe','_threadCommentDataSource','UniverThreadCommentUIPlugin','thread-comment-data-source.config','@univerjs/network','amd','addComment','deleteComment','_initUserSync','find','Solve','syncUpdateMutationToColla','HTTPService','/universer-api/comment/unit/','replies','root'];_0x1fe0=function(){return _0x1960c5;};return _0x1fe0();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.7.0-nightly.202505151607",
3
+ "version": "0.7.0-nightly.202505161607",
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.7.0-nightly.202505151607",
49
- "@univerjs-pro/license": "0.7.0-nightly.202505151607",
50
- "@univerjs/core": "0.7.0-nightly.202505151607",
51
- "@univerjs/network": "0.7.0-nightly.202505151607",
52
- "@univerjs/thread-comment": "0.7.0-nightly.202505151607",
48
+ "@univerjs-pro/collaboration-client": "0.7.0-nightly.202505161607",
49
+ "@univerjs-pro/license": "0.7.0-nightly.202505161607",
50
+ "@univerjs/core": "0.7.0-nightly.202505161607",
53
51
  "@univerjs/protocol": "0.1.46-alpha.3",
54
- "@univerjs/thread-comment-ui": "0.7.0-nightly.202505151607"
52
+ "@univerjs/network": "0.7.0-nightly.202505161607",
53
+ "@univerjs/thread-comment-ui": "0.7.0-nightly.202505161607",
54
+ "@univerjs/thread-comment": "0.7.0-nightly.202505161607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",