@univerjs-pro/thread-comment-datasource 0.10.14-nightly.202511070640 → 0.10.14-nightly.202511080715

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';function _0xeebf(){const _0x571f90=['parse','code','requireSession','symbol','_sessionService','_threadCommentModel','addUser','ThreadCommentModel','/list','/add','/universer-api/comment/unit/','commentUpdate$','UNIVER_UNKNOWN','Injector','_injector','saveCommentToSnapshot','createTimestamp','stringify','format','subscribe','CustomRangeType','dayjs','Solve','CommentService','replies','pluginName','delete','IThreadCommentDataSourceService','getMemberID','deleteComment','216egMSgq','disposeWithMe','UniverThreadCommentDataSourcePlugin','_config','Edit','getOwnPropertyDescriptor','Module','UNRECOGNIZED','UniverCollaborationClientPlugin','replyId','/edit','onReady','length','userId','users','getCurrentUser','COMMENT','comments','_initUserSync','_userService','_initDataSource','unitId','_httpService','UniverInstanceType','syncUpdateMutationToColla','userID','5qVZMjy','175740TtaFKF','Disposable','UniverThreadCommentUIPlugin','85041aZUAzz','error','merge','dataSource','toStringTag','threadId','4675180ZQwaUU','payload','Unknown','forEach','map','1619548qLFovl','Reply','_threadCommentDataSource','HTTPService','add','_configService','Delete','get','CollaborationSessionService','filter','378888cftDHQ','customRanges','_threadCommentDataSourceService','getComment','size','type','post','/universer-api/user/list','3UuvXuO','_commentService','defineProperty','549396Pzgyni','Add','user','content','_init','addComment','values','UserManagerService','Solved','comment','/solved','root','reply','find','solved','394564BIqpBh','parentId','Inject','updateComment','resolveComment','body','YYYY/MM/DD\x20HH:mm','rangeId','thread-comment-data-source.config','UniverLicensePlugin','listComments','/reply','OpenOrReOpen','rangeType','personId','resolved'];_0xeebf=function(){return _0x571f90;};return _0xeebf();}const _0x343277=_0x1e16;(function(_0x253fe7,_0x2830ac){const _0x50a770=_0x1e16,_0x33b538=_0x253fe7();while(!![]){try{const _0x5add5b=parseInt(_0x50a770(0x185))/0x1+parseInt(_0x50a770(0x1b7))/0x2*(parseInt(_0x50a770(0x1a5))/0x3)+parseInt(_0x50a770(0x19d))/0x4*(-parseInt(_0x50a770(0x184))/0x5)+-parseInt(_0x50a770(0x1a8))/0x6+-parseInt(_0x50a770(0x193))/0x7+-parseInt(_0x50a770(0x1e5))/0x8*(parseInt(_0x50a770(0x188))/0x9)+parseInt(_0x50a770(0x18e))/0xa;if(_0x5add5b===_0x2830ac)break;else _0x33b538['push'](_0x33b538['shift']());}catch(_0x49459e){_0x33b538['push'](_0x33b538['shift']());}}}(_0xeebf,0x28f55));Object[_0x343277(0x1a7)](exports,Symbol[_0x343277(0x18c)],{'value':_0x343277(0x1eb)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x543549=>(_0x543549[_0x543549[_0x343277(0x1c3)]=0x0]=_0x343277(0x1c3),_0x543549[_0x543549['Solved']=0x1]=_0x343277(0x1b0),_0x543549[_0x543549[_0x343277(0x1ec)]=-0x1]=_0x343277(0x1ec),_0x543549))(I||{}),v=(_0x1c095f=>(_0x1c095f[_0x1c095f[_0x343277(0x190)]=0x0]=_0x343277(0x190),_0x1c095f[_0x1c095f[_0x343277(0x1a9)]=0x1]=_0x343277(0x1a9),_0x1c095f[_0x1c095f[_0x343277(0x194)]=0x2]='Reply',_0x1c095f[_0x1c095f[_0x343277(0x1e9)]=0x3]=_0x343277(0x1e9),_0x1c095f[_0x1c095f[_0x343277(0x199)]=0x4]='Delete',_0x1c095f[_0x1c095f[_0x343277(0x1dd)]=0x5]=_0x343277(0x1dd),_0x1c095f[_0x1c095f[_0x343277(0x1ec)]=-0x1]=_0x343277(0x1ec),_0x1c095f))(v||{});const f=_0x5cc7b8=>c[_0x343277(0x1dc)](new Date(+_0x5cc7b8))['format'](_0x343277(0x1bd)),R=async(_0x1e8863,_0x2f8f6e)=>{const _0x278a82=_0x343277,_0x2a201a=_0x1e8863['get'](c[_0x278a82(0x1af)]),_0x2dc413=_0x1e8863[_0x278a82(0x19a)](P[_0x278a82(0x196)]);_0x2f8f6e['forEach'](_0xdb69bb=>{const _0x4bf723=_0x278a82;_0x2a201a['getUser'](_0xdb69bb)&&_0x2f8f6e[_0x4bf723(0x1e1)](_0xdb69bb);}),_0x2f8f6e[_0x278a82(0x1a1)]&&(await _0x2dc413['get'](_0x278a82(0x1a4),{'params':{'userIDs':[..._0x2f8f6e]}}))[_0x278a82(0x1bc)][_0x278a82(0x178)][_0x278a82(0x191)](_0x5cd1eb=>{const _0x1b88ea=_0x278a82;_0x5cd1eb&&_0x2a201a[_0x1b88ea(0x1cd)](_0x5cd1eb);});};var $=Object[_0x343277(0x1ea)],E=(_0x3049d0,_0x3e2ad6,_0x14e003,_0x5c8bb9)=>{const _0x4085a6=_0x343277;for(var _0x592e34=_0x5c8bb9>0x1?void 0x0:_0x5c8bb9?$(_0x3e2ad6,_0x14e003):_0x3e2ad6,_0x3408af=_0x3049d0[_0x4085a6(0x176)]-0x1,_0x4eafdd;_0x3408af>=0x0;_0x3408af--)(_0x4eafdd=_0x3049d0[_0x3408af])&&(_0x592e34=_0x4eafdd(_0x592e34)||_0x592e34);return _0x592e34;},S=(_0x5034f3,_0x4d8d85)=>(_0x3f3739,_0x4b5992)=>_0x4d8d85(_0x3f3739,_0x4b5992,_0x5034f3);let _=class extends c[_0x343277(0x186)]{constructor(_0x28cc22,_0x45cc9e,_0x2a18ac,_0x276156){const _0x40c795=_0x343277;super(),this[_0x40c795(0x1a6)]=_0x28cc22,this[_0x40c795(0x1cc)]=_0x45cc9e,this[_0x40c795(0x17d)]=_0x2a18ac,this[_0x40c795(0x1d5)]=_0x276156,this[_0x40c795(0x1ac)](),this[_0x40c795(0x17c)]();}[_0x343277(0x17c)](){const _0x531d3e=_0x343277;this['disposeWithMe'](this['_threadCommentModel'][_0x531d3e(0x1d2)]['pipe'](j['bufferTime'](0x10))[_0x531d3e(0x1da)](_0x1f9fe8=>{const _0x2a1c47=_0x531d3e,_0x2f8933=new Set();_0x1f9fe8[_0x2a1c47(0x191)](_0x49c74d=>{const _0x4dd2a2=_0x2a1c47;switch(_0x49c74d['type']){case _0x4dd2a2(0x197):{const _0x337b09=_0x49c74d[_0x4dd2a2(0x18f)][_0x4dd2a2(0x1c5)];_0x2f8933[_0x4dd2a2(0x197)](_0x337b09);break;}}}),R(this[_0x2a1c47(0x1d5)],_0x2f8933);}));}[_0x343277(0x1ac)](){const _0x418cf2=_0x343277;this[_0x418cf2(0x1e6)](this[_0x418cf2(0x1a6)]['commentUpdate$']['subscribe'](async _0x2607ab=>{const _0x3b8392=_0x418cf2;var _0x35b83e,_0x58df92,_0x33ce5f,_0x22421c;const _0x2595bf=(_0x35b83e=this[_0x3b8392(0x1cc)]['getUnit'](_0x2607ab[_0x3b8392(0x17f)])[_0x3b8392(0x1b5)](_0xf2cd3a=>_0xf2cd3a[_0x3b8392(0x18d)]===_0x2607ab[_0x3b8392(0x18d)]))==null?void 0x0:_0x35b83e[_0x3b8392(0x1b3)];if(!_0x2595bf)return;const {unitId:_0x3cb9f5,subUnitId:_0x5f06ba}=_0x2595bf;switch(_0x2607ab[_0x3b8392(0x1aa)]&&this[_0x3b8392(0x17d)][_0x3b8392(0x1cd)](_0x2607ab['user']),_0x2607ab['type']){case v['Add']:break;case v['Reply']:{this[_0x3b8392(0x1cc)]['addComment'](_0x3cb9f5,_0x5f06ba,{'unitId':_0x3cb9f5,'subUnitId':_0x5f06ba,'ref':'','id':_0x2607ab[_0x3b8392(0x1ee)],'dT':f(+_0x2607ab['createTimestamp']),'threadId':_0x2607ab['threadId'],'personId':(_0x33ce5f=(_0x58df92=_0x2607ab['user'])==null?void 0x0:_0x58df92['userID'])!=null?_0x33ce5f:_0x2607ab[_0x3b8392(0x177)],'text':JSON['parse'](_0x2607ab['content']),'parentId':_0x2595bf['id']});break;}case v[_0x3b8392(0x199)]:{const _0x577316=this[_0x3b8392(0x1cc)][_0x3b8392(0x1a0)](_0x3cb9f5,_0x5f06ba,_0x2607ab[_0x3b8392(0x1ee)]);_0x577316&&_0x577316[_0x3b8392(0x1b8)]&&this[_0x3b8392(0x1cc)]['deleteComment'](_0x3cb9f5,_0x5f06ba,_0x2607ab[_0x3b8392(0x1ee)]);break;}case v[_0x3b8392(0x1e9)]:{this[_0x3b8392(0x1cc)]['updateComment'](_0x3cb9f5,_0x5f06ba,{'commentId':_0x2607ab['replyId'],'text':JSON[_0x3b8392(0x1c7)](_0x2607ab[_0x3b8392(0x1ab)])});break;}case v['Solve']:{const _0x7847de=(_0x22421c=this[_0x3b8392(0x1cc)]['getUnit'](_0x2607ab['unitId'])[_0x3b8392(0x1b5)](_0x4cf7ec=>_0x4cf7ec[_0x3b8392(0x18d)]===_0x2607ab[_0x3b8392(0x18d)]))==null?void 0x0:_0x22421c[_0x3b8392(0x1b3)];_0x7847de&&this[_0x3b8392(0x1cc)][_0x3b8392(0x1bb)](_0x3cb9f5,_0x5f06ba,_0x7847de['id'],_0x2607ab[_0x3b8392(0x1b6)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x343277(0x1b9)](b[_0x343277(0x1de)])),S(0x1,c[_0x343277(0x1b9)](M[_0x343277(0x1ce)])),S(0x2,c['Inject'](c[_0x343277(0x1af)])),S(0x3,c[_0x343277(0x1b9)](c['Injector']))],_);const q=_0x343277(0x1bf),D={};var A=Object[_0x343277(0x1ea)],x=(_0x544170,_0x2231f4,_0x3340af,_0x938d7)=>{const _0x114875=_0x343277;for(var _0x2fc965=_0x938d7>0x1?void 0x0:_0x938d7?A(_0x2231f4,_0x3340af):_0x2231f4,_0x5477d4=_0x544170[_0x114875(0x176)]-0x1,_0x2c63fa;_0x5477d4>=0x0;_0x5477d4--)(_0x2c63fa=_0x544170[_0x5477d4])&&(_0x2fc965=_0x2c63fa(_0x2fc965)||_0x2fc965);return _0x2fc965;},C=(_0x728044,_0x49f86d)=>(_0x306ab8,_0x233d6b)=>_0x49f86d(_0x306ab8,_0x233d6b,_0x728044);function Y(_0x2e9565,_0x33f623){const _0x34258f=_0x343277,_0x39b164=_0x2e9565['replies'][0x0];return{..._0x33f623,'id':_0x39b164['replyId'],'resolved':_0x2e9565[_0x34258f(0x1b6)]===0x1,'dT':f(_0x39b164[_0x34258f(0x1d7)]),'personId':_0x39b164['userId'],'threadId':_0x39b164['threadId']};}function G(_0x4fb167,_0x53f968,_0x160d5b){const _0x4f74b6=_0x343277;var _0x3ccd20,_0x241c12;if(((_0x241c12=(_0x3ccd20=_0x4fb167==null?void 0x0:_0x4fb167[_0x4f74b6(0x1df)])==null?void 0x0:_0x3ccd20[_0x4f74b6(0x176)])!=null?_0x241c12:0x0)>0x0){const _0x31dae8=(_0x2db5a3,_0x2300a3)=>({'id':_0x2db5a3[_0x4f74b6(0x1ee)],'threadId':_0x2db5a3[_0x4f74b6(0x18d)],'dT':f(_0x2db5a3['createTimestamp']),'personId':_0x2db5a3[_0x4f74b6(0x177)],'resolved':_0x4fb167[_0x4f74b6(0x1b6)]===I[_0x4f74b6(0x1b0)],'unitId':_0x53f968,'subUnitId':_0x160d5b,'text':JSON[_0x4f74b6(0x1c7)](_0x2db5a3[_0x4f74b6(0x1ab)]),'parentId':_0x2300a3}),_0x41ada5=_0x31dae8(_0x4fb167['replies'][0x0]);return{..._0x41ada5,'children':_0x4fb167[_0x4f74b6(0x1df)]['slice'](0x1)[_0x4f74b6(0x192)](_0x1ea079=>_0x31dae8(_0x1ea079,_0x41ada5['id']))};}return null;}let p=class{constructor(_0x103b13,_0x5a34e6,_0x21be92){const _0x712b1d=_0x343277;this[_0x712b1d(0x180)]=_0x103b13,this[_0x712b1d(0x17d)]=_0x5a34e6,this['_sessionService']=_0x21be92;}async[_0x343277(0x1ad)](_0x550185){const _0x3fa8e0=_0x343277;var _0xc6a894,_0x5bf9cb;const {parentId:_0x1fe7b3,unitId:_0x213a19,text:_0x2ce286,threadId:_0x3bbb97}=_0x550185,_0x185b6f=(_0x5bf9cb=(_0xc6a894=_0x2ce286[_0x3fa8e0(0x19e)])==null?void 0x0:_0xc6a894[_0x3fa8e0(0x19c)](_0x39a279=>_0x39a279['rangeType']===c['CustomRangeType'][_0x3fa8e0(0x17a)])['map'](_0x5cd10c=>_0x5cd10c[_0x3fa8e0(0x1be)]))!=null?_0x5bf9cb:[],_0x4cd6b5=JSON[_0x3fa8e0(0x1d8)](_0x2ce286),_0x20fab7=(await this[_0x3fa8e0(0x1cb)][_0x3fa8e0(0x1c9)](_0x213a19))[_0x3fa8e0(0x1e3)]();if(_0x1fe7b3){const _0x459c0d={'memberId':_0x20fab7,'unitId':_0x213a19,'content':_0x4cd6b5,'mention':_0x185b6f,'threadId':_0x3bbb97},_0x207ff2=(await this['_httpService']['post']('/universer-api/comment/unit/'+_0x213a19+_0x3fa8e0(0x1c2),{'body':_0x459c0d}))['body'][_0x3fa8e0(0x1b4)];return{..._0x550185,'id':_0x207ff2[_0x3fa8e0(0x1ee)],'dT':c[_0x3fa8e0(0x1dc)](+_0x207ff2[_0x3fa8e0(0x1d7)])[_0x3fa8e0(0x1d9)](_0x3fa8e0(0x1bd)),'personId':_0x207ff2[_0x3fa8e0(0x177)]};}else{const _0x1dbbfd={'memberId':_0x20fab7,'unitId':_0x213a19,'content':_0x4cd6b5,'mention':_0x185b6f},_0x267f6e=await this[_0x3fa8e0(0x180)][_0x3fa8e0(0x1a3)]('/universer-api/comment/unit/'+_0x213a19+_0x3fa8e0(0x1d0),{'body':_0x1dbbfd});return Y(_0x267f6e[_0x3fa8e0(0x1bc)][_0x3fa8e0(0x1b1)],_0x550185);}}async[_0x343277(0x1ba)](_0x3c1a2d){const _0x4cf655=_0x343277;var _0x257cfa,_0x4f4e49;const {text:_0x39c906,unitId:_0x8d856d}=_0x3c1a2d,_0xb395d9=(_0x4f4e49=(_0x257cfa=_0x39c906[_0x4cf655(0x19e)])==null?void 0x0:_0x257cfa[_0x4cf655(0x19c)](_0x58c8a0=>_0x58c8a0[_0x4cf655(0x1c4)]===c[_0x4cf655(0x1db)]['COMMENT'])[_0x4cf655(0x192)](_0x8974ac=>_0x8974ac[_0x4cf655(0x1be)]))!=null?_0x4f4e49:[],_0xaea036=JSON[_0x4cf655(0x1d8)](_0x39c906),_0x168574=_0x3c1a2d[_0x4cf655(0x18d)],_0x51d246=_0x3c1a2d['id'],_0x20134b={'memberId':(await this[_0x4cf655(0x1cb)][_0x4cf655(0x1c9)](_0x8d856d))[_0x4cf655(0x1e3)](),'unitId':_0x8d856d,'threadId':_0x168574,'mention':_0xb395d9,'content':_0xaea036,'replyId':_0x51d246},_0x513fcf=await this[_0x4cf655(0x180)][_0x4cf655(0x1a3)](_0x4cf655(0x1d1)+_0x8d856d+_0x4cf655(0x1ef),{'body':_0x20134b});return!_0x513fcf[_0x4cf655(0x1bc)][_0x4cf655(0x189)]||_0x513fcf[_0x4cf655(0x1bc)][_0x4cf655(0x189)][_0x4cf655(0x1c8)]===0x1;}async[_0x343277(0x1bb)](_0x2483f9){const _0x4c0a50=_0x343277,{unitId:_0x14b36e}=_0x2483f9,_0x3f1e1d=_0x2483f9[_0x4c0a50(0x18d)],_0x28b2d2={'memberId':this[_0x4c0a50(0x17d)][_0x4c0a50(0x179)]()[_0x4c0a50(0x183)],'unitId':_0x14b36e,'threadId':_0x3f1e1d,'solved':_0x2483f9[_0x4c0a50(0x1c6)]?I[_0x4c0a50(0x1b0)]:I[_0x4c0a50(0x1c3)]},_0xaf4aad=await this[_0x4c0a50(0x180)][_0x4c0a50(0x1a3)](_0x4c0a50(0x1d1)+_0x14b36e+_0x4c0a50(0x1b2),{'body':_0x28b2d2});return!_0xaf4aad['body']['error']||_0xaf4aad[_0x4c0a50(0x1bc)][_0x4c0a50(0x189)][_0x4c0a50(0x1c8)]===0x1;}async[_0x343277(0x1e4)](_0x57bd4b,_0x22b8bb,_0x4433ec,_0x25b20e){const _0x3cc841=_0x343277,_0x488665={'memberId':(await this[_0x3cc841(0x1cb)]['requireSession'](_0x57bd4b))['getMemberID'](),'threadId':_0x4433ec,'replyId':_0x25b20e,'unitId':_0x57bd4b},_0x3e94f1=await this[_0x3cc841(0x180)][_0x3cc841(0x1a3)](_0x3cc841(0x1d1)+_0x57bd4b+'/delete',{'body':_0x488665});return!_0x3e94f1[_0x3cc841(0x1bc)][_0x3cc841(0x189)]||_0x3e94f1[_0x3cc841(0x1bc)][_0x3cc841(0x189)][_0x3cc841(0x1c8)]===0x1;}async[_0x343277(0x1c1)](_0x44c0fa,_0x21e513,_0x153997){const _0x316190=_0x343277,_0x5079d3={'unitId':_0x44c0fa,'threadId':_0x153997},_0x1b8594=await this[_0x316190(0x180)][_0x316190(0x1a3)]('/universer-api/comment/unit/'+_0x44c0fa+_0x316190(0x1cf),{'body':_0x5079d3}),_0x47f2ea=_0x153997['map'](_0x2b60c0=>G(_0x1b8594[_0x316190(0x1bc)][_0x316190(0x17b)][_0x2b60c0],_0x44c0fa,_0x21e513))[_0x316190(0x19c)](Boolean);return Object[_0x316190(0x1ae)](_0x1b8594[_0x316190(0x1bc)][_0x316190(0x178)])[_0x316190(0x191)](_0x697836=>{const _0xfa3978=_0x316190;this[_0xfa3978(0x17d)][_0xfa3978(0x1cd)](_0x697836);}),_0x47f2ea;}[_0x343277(0x1d6)](_0x1b4ec9){const _0x437636=_0x343277;return{'id':_0x1b4ec9['id'],'threadId':_0x1b4ec9[_0x437636(0x18d)],'ref':_0x1b4ec9['ref']};}};p=x([C(0x0,c[_0x343277(0x1b9)](P['HTTPService'])),C(0x1,c['Inject'](c[_0x343277(0x1af)])),C(0x2,c[_0x343277(0x1b9)](b[_0x343277(0x19b)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x1cef70,_0x2216fc,_0x5be4c6,_0x378d7f)=>{const _0x4e6573=_0x343277;for(var _0x4b8a97=_0x378d7f>0x1?void 0x0:_0x378d7f?H(_0x2216fc,_0x5be4c6):_0x2216fc,_0x5f56fc=_0x1cef70[_0x4e6573(0x176)]-0x1,_0x39aa2e;_0x5f56fc>=0x0;_0x5f56fc--)(_0x39aa2e=_0x1cef70[_0x5f56fc])&&(_0x4b8a97=_0x39aa2e(_0x4b8a97)||_0x4b8a97);return _0x4b8a97;},y=(_0x187aec,_0x112785)=>(_0x1f4bbf,_0x996a4d)=>_0x112785(_0x1f4bbf,_0x996a4d,_0x187aec);let g=class extends c[_0x343277(0x186)]{constructor(_0xff1d42,_0x2819e9){const _0x830f97=_0x343277;super(),this['_threadCommentDataSourceService']=_0xff1d42,this[_0x830f97(0x195)]=_0x2819e9,this[_0x830f97(0x17e)]();}['_initDataSource'](){const _0x3520fc=_0x343277;this['_threadCommentDataSourceService'][_0x3520fc(0x18b)]=this['_threadCommentDataSource'],this[_0x3520fc(0x19f)][_0x3520fc(0x182)]=!0x1;}};function _0x1e16(_0x3701c3,_0x51a83b){const _0xeebf9c=_0xeebf();return _0x1e16=function(_0x1e1638,_0x30674b){_0x1e1638=_0x1e1638-0x175;let _0x1831fb=_0xeebf9c[_0x1e1638];return _0x1831fb;},_0x1e16(_0x3701c3,_0x51a83b);}g=J([y(0x0,M[_0x343277(0x1e2)]),y(0x1,c['Inject'](p))],g);var F=Object[_0x343277(0x1a7)],L=Object['getOwnPropertyDescriptor'],Z=(_0x4fbbb0,_0x14deaa,_0x14a2c7)=>_0x14deaa in _0x4fbbb0?F(_0x4fbbb0,_0x14deaa,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x14a2c7}):_0x4fbbb0[_0x14deaa]=_0x14a2c7,W=(_0x10c2fa,_0x41444b,_0x3be036,_0x3b5be8)=>{const _0x12192e=_0x343277;for(var _0x3db597=_0x3b5be8>0x1?void 0x0:_0x3b5be8?L(_0x41444b,_0x3be036):_0x41444b,_0x55f01f=_0x10c2fa[_0x12192e(0x176)]-0x1,_0x349c68;_0x55f01f>=0x0;_0x55f01f--)(_0x349c68=_0x10c2fa[_0x55f01f])&&(_0x3db597=_0x349c68(_0x3db597)||_0x3db597);return _0x3db597;},O=(_0x54dcac,_0x5a0a87)=>(_0x204c55,_0xf363ba)=>_0x5a0a87(_0x204c55,_0xf363ba,_0x54dcac),N=(_0x252faf,_0x18d33f,_0x4b8c23)=>Z(_0x252faf,typeof _0x18d33f!=_0x343277(0x1ca)?_0x18d33f+'':_0x18d33f,_0x4b8c23);exports[_0x343277(0x1e7)]=class extends c['Plugin']{constructor(_0x5a2fcd=D,_0x203d03,_0xa81f46){const _0x53f8e=_0x343277;super(),this[_0x53f8e(0x1e8)]=_0x5a2fcd,this[_0x53f8e(0x1d5)]=_0x203d03,this[_0x53f8e(0x198)]=_0xa81f46;const {..._0xd3836d}=c[_0x53f8e(0x18a)]({},D,this['_config']);this[_0x53f8e(0x198)]['setConfig'](q,_0xd3836d);}['onStarting'](){const _0x2ef9d6=_0x343277;[[p],[g],[_]][_0x2ef9d6(0x191)](_0x8db7a=>{const _0x569310=_0x2ef9d6;this[_0x569310(0x1d5)][_0x569310(0x197)](_0x8db7a);});}[_0x343277(0x175)](){const _0x2bc8b4=_0x343277;this['_injector'][_0x2bc8b4(0x19a)](g),this[_0x2bc8b4(0x1d5)][_0x2bc8b4(0x19a)](_);}},N(exports[_0x343277(0x1e7)],_0x343277(0x1e0),U),N(exports[_0x343277(0x1e7)],_0x343277(0x1a2),c[_0x343277(0x181)][_0x343277(0x1d3)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](w[_0x343277(0x187)],b[_0x343277(0x1ed)],T[_0x343277(0x1c0)]),O(0x1,c[_0x343277(0x1b9)](c[_0x343277(0x1d4)])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0x3a32e5=_0x30fa;(function(_0x4c5e70,_0xdc00e0){const _0x20ec03=_0x30fa,_0x115ae6=_0x4c5e70();while(!![]){try{const _0x5e587d=-parseInt(_0x20ec03(0x1b2))/0x1*(-parseInt(_0x20ec03(0x1d6))/0x2)+-parseInt(_0x20ec03(0x1c1))/0x3+-parseInt(_0x20ec03(0x1eb))/0x4*(-parseInt(_0x20ec03(0x1bd))/0x5)+-parseInt(_0x20ec03(0x1dd))/0x6+parseInt(_0x20ec03(0x1c8))/0x7*(parseInt(_0x20ec03(0x1bf))/0x8)+-parseInt(_0x20ec03(0x1cb))/0x9+parseInt(_0x20ec03(0x1d3))/0xa;if(_0x5e587d===_0xdc00e0)break;else _0x115ae6['push'](_0x115ae6['shift']());}catch(_0x1a959c){_0x115ae6['push'](_0x115ae6['shift']());}}}(_0x47b9,0xaf3d0));Object[_0x3a32e5(0x19a)](exports,Symbol[_0x3a32e5(0x1da)],{'value':_0x3a32e5(0x1b0)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x3a32e5(0x196);var I=(_0x215d4e=>(_0x215d4e[_0x215d4e['OpenOrReOpen']=0x0]=_0x3a32e5(0x1de),_0x215d4e[_0x215d4e[_0x3a32e5(0x1cc)]=0x1]='Solved',_0x215d4e[_0x215d4e[_0x3a32e5(0x1f2)]=-0x1]=_0x3a32e5(0x1f2),_0x215d4e))(I||{}),v=(_0x3a2dbf=>(_0x3a2dbf[_0x3a2dbf[_0x3a32e5(0x1d4)]=0x0]=_0x3a32e5(0x1d4),_0x3a2dbf[_0x3a2dbf['Add']=0x1]=_0x3a32e5(0x1aa),_0x3a2dbf[_0x3a2dbf[_0x3a32e5(0x1f6)]=0x2]=_0x3a32e5(0x1f6),_0x3a2dbf[_0x3a2dbf[_0x3a32e5(0x1b8)]=0x3]=_0x3a32e5(0x1b8),_0x3a2dbf[_0x3a2dbf['Delete']=0x4]=_0x3a32e5(0x1d2),_0x3a2dbf[_0x3a2dbf['Solve']=0x5]=_0x3a32e5(0x1a1),_0x3a2dbf[_0x3a2dbf[_0x3a32e5(0x1f2)]=-0x1]=_0x3a32e5(0x1f2),_0x3a2dbf))(v||{});const f=_0x262b70=>c['dayjs'](new Date(+_0x262b70))[_0x3a32e5(0x1fb)](_0x3a32e5(0x1b7)),R=async(_0xf4d149,_0xb529dc)=>{const _0x46873b=_0x3a32e5,_0x1e274e=_0xf4d149['get'](c[_0x46873b(0x1fe)]),_0x5cbde6=_0xf4d149['get'](P['HTTPService']);_0xb529dc[_0x46873b(0x19c)](_0x396792=>{_0x1e274e['getUser'](_0x396792)&&_0xb529dc['delete'](_0x396792);}),_0xb529dc[_0x46873b(0x205)]&&(await _0x5cbde6[_0x46873b(0x1e9)](_0x46873b(0x1ea),{'params':{'userIDs':[..._0xb529dc]}}))[_0x46873b(0x1b9)][_0x46873b(0x1dc)]['forEach'](_0x58daa4=>{_0x58daa4&&_0x1e274e['addUser'](_0x58daa4);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x47208e,_0x2c12da,_0x518cbd,_0x2dd0f1)=>{const _0x4a9a71=_0x3a32e5;for(var _0x3379fc=_0x2dd0f1>0x1?void 0x0:_0x2dd0f1?$(_0x2c12da,_0x518cbd):_0x2c12da,_0x571f4f=_0x47208e[_0x4a9a71(0x1ed)]-0x1,_0x4d0233;_0x571f4f>=0x0;_0x571f4f--)(_0x4d0233=_0x47208e[_0x571f4f])&&(_0x3379fc=_0x4d0233(_0x3379fc)||_0x3379fc);return _0x3379fc;},S=(_0x382d9b,_0x17ee40)=>(_0x494e5e,_0x6d9c6f)=>_0x17ee40(_0x494e5e,_0x6d9c6f,_0x382d9b);let _=class extends c['Disposable']{constructor(_0x127ffb,_0xd658de,_0x3d1c55,_0xb5bd94){const _0x37679=_0x3a32e5;super(),this[_0x37679(0x1cf)]=_0x127ffb,this[_0x37679(0x1f9)]=_0xd658de,this['_userService']=_0x3d1c55,this[_0x37679(0x1f8)]=_0xb5bd94,this[_0x37679(0x1c5)](),this['_initUserSync']();}[_0x3a32e5(0x1a0)](){const _0x158f5b=_0x3a32e5;this[_0x158f5b(0x1d5)](this[_0x158f5b(0x1f9)]['commentUpdate$'][_0x158f5b(0x1d0)](j[_0x158f5b(0x1b6)](0x10))[_0x158f5b(0x202)](_0x4ce40b=>{const _0x17c61c=_0x158f5b,_0x2ff53c=new Set();_0x4ce40b[_0x17c61c(0x19c)](_0x57f868=>{const _0x18dee0=_0x17c61c;switch(_0x57f868[_0x18dee0(0x1ec)]){case'add':{const _0x492995=_0x57f868['payload'][_0x18dee0(0x1c7)];_0x2ff53c['add'](_0x492995);break;}}}),R(this[_0x17c61c(0x1f8)],_0x2ff53c);}));}['_init'](){const _0xd35ffc=_0x3a32e5;this[_0xd35ffc(0x1d5)](this['_commentService']['commentUpdate$'][_0xd35ffc(0x202)](async _0x578956=>{const _0xcaac1f=_0xd35ffc;var _0x449f40,_0x1418ec,_0xa732a3,_0x1d2f88;const _0x321a8d=(_0x449f40=this[_0xcaac1f(0x1f9)][_0xcaac1f(0x197)](_0x578956[_0xcaac1f(0x1e8)])['find'](_0x364282=>_0x364282['threadId']===_0x578956['threadId']))==null?void 0x0:_0x449f40[_0xcaac1f(0x19f)];if(!_0x321a8d)return;const {unitId:_0x303f30,subUnitId:_0x150198}=_0x321a8d;switch(_0x578956[_0xcaac1f(0x1ce)]&&this[_0xcaac1f(0x1e5)][_0xcaac1f(0x207)](_0x578956[_0xcaac1f(0x1ce)]),_0x578956[_0xcaac1f(0x1ec)]){case v[_0xcaac1f(0x1aa)]:break;case v[_0xcaac1f(0x1f6)]:{this[_0xcaac1f(0x1f9)][_0xcaac1f(0x1a4)](_0x303f30,_0x150198,{'unitId':_0x303f30,'subUnitId':_0x150198,'ref':'','id':_0x578956['replyId'],'dT':f(+_0x578956[_0xcaac1f(0x1e0)]),'threadId':_0x578956['threadId'],'personId':(_0xa732a3=(_0x1418ec=_0x578956[_0xcaac1f(0x1ce)])==null?void 0x0:_0x1418ec[_0xcaac1f(0x1ef)])!=null?_0xa732a3:_0x578956[_0xcaac1f(0x1f3)],'text':JSON[_0xcaac1f(0x1a9)](_0x578956['content']),'parentId':_0x321a8d['id']});break;}case v['Delete']:{const _0x18bdc2=this[_0xcaac1f(0x1f9)][_0xcaac1f(0x1e3)](_0x303f30,_0x150198,_0x578956[_0xcaac1f(0x1e4)]);_0x18bdc2&&_0x18bdc2[_0xcaac1f(0x1ab)]&&this[_0xcaac1f(0x1f9)][_0xcaac1f(0x1fd)](_0x303f30,_0x150198,_0x578956['replyId']);break;}case v[_0xcaac1f(0x1b8)]:{this[_0xcaac1f(0x1f9)][_0xcaac1f(0x1a8)](_0x303f30,_0x150198,{'commentId':_0x578956[_0xcaac1f(0x1e4)],'text':JSON[_0xcaac1f(0x1a9)](_0x578956[_0xcaac1f(0x1a2)])});break;}case v[_0xcaac1f(0x1a1)]:{const _0x4c11bf=(_0x1d2f88=this['_threadCommentModel'][_0xcaac1f(0x197)](_0x578956[_0xcaac1f(0x1e8)])['find'](_0xc3d57f=>_0xc3d57f[_0xcaac1f(0x1a3)]===_0x578956[_0xcaac1f(0x1a3)]))==null?void 0x0:_0x1d2f88[_0xcaac1f(0x19f)];_0x4c11bf&&this[_0xcaac1f(0x1f9)]['resolveComment'](_0x303f30,_0x150198,_0x4c11bf['id'],_0x578956['solved']===I[_0xcaac1f(0x1cc)]);break;}}}));}};function _0x47b9(){const _0x41ed58=['createTimestamp','COMMENT','_threadCommentDataSourceService','getComment','replyId','_userService','UNIVER_UNKNOWN','getMemberID','unitId','get','/universer-api/user/list','22540xRTPen','type','length','/list','userID','add','symbol','UNRECOGNIZED','userId','code','slice','Reply','ThreadCommentModel','_injector','_threadCommentModel','HTTPService','format','CollaborationSessionService','deleteComment','UserManagerService','resolved','_config','_initDataSource','subscribe','CustomRangeType','map','size','saveCommentToSnapshot','addUser','listComments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getUnit','dataSource','error','defineProperty','_configService','forEach','_httpService','_sessionService','root','_initUserSync','Solve','content','threadId','addComment','post','IThreadCommentDataSourceService','Injector','updateComment','parse','Add','parentId','ref','resolveComment','replies','DependentOn','Module','UniverLicensePlugin','2833nJuVmm','getCurrentUser','getOwnPropertyDescriptor','stringify','bufferTime','YYYY/MM/DD\x20HH:mm','Edit','body','onReady','merge','/universer-api/comment/unit/','595PXSqSc','syncUpdateMutationToColla','8IgFzVu','UniverThreadCommentDataSourcePlugin','1103226LxxQpj','/add','comment','solved','_init','Inject','personId','1011423ULRhAq','_threadCommentDataSource','/edit','3873105nwotKm','Solved','customRanges','user','_commentService','pipe','/reply','Delete','5052740NhTEtG','Unknown','disposeWithMe','446DeTftm','requireSession','CommentService','values','toStringTag','filter','users','2617344wjukZk','OpenOrReOpen','Plugin'];_0x47b9=function(){return _0x41ed58;};return _0x47b9();}function _0x30fa(_0x11a2a3,_0x36a1af){const _0x47b920=_0x47b9();return _0x30fa=function(_0x30fa4b,_0x554d78){_0x30fa4b=_0x30fa4b-0x195;let _0x167ad8=_0x47b920[_0x30fa4b];return _0x167ad8;},_0x30fa(_0x11a2a3,_0x36a1af);}_=E([S(0x0,c[_0x3a32e5(0x1c6)](b[_0x3a32e5(0x1d8)])),S(0x1,c[_0x3a32e5(0x1c6)](M[_0x3a32e5(0x1f7)])),S(0x2,c['Inject'](c[_0x3a32e5(0x1fe)])),S(0x3,c[_0x3a32e5(0x1c6)](c['Injector']))],_);const q='thread-comment-data-source.config',D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x5f2901,_0x1362cc,_0x276acf,_0x4b2706)=>{for(var _0x12d662=_0x4b2706>0x1?void 0x0:_0x4b2706?A(_0x1362cc,_0x276acf):_0x1362cc,_0x360f6e=_0x5f2901['length']-0x1,_0xd435ff;_0x360f6e>=0x0;_0x360f6e--)(_0xd435ff=_0x5f2901[_0x360f6e])&&(_0x12d662=_0xd435ff(_0x12d662)||_0x12d662);return _0x12d662;},C=(_0x2ee262,_0x2d45c5)=>(_0x54b1a1,_0x56fde0)=>_0x2d45c5(_0x54b1a1,_0x56fde0,_0x2ee262);function Y(_0x1b6efd,_0x99ed39){const _0x2f21d9=_0x3a32e5,_0x3df327=_0x1b6efd['replies'][0x0];return{..._0x99ed39,'id':_0x3df327[_0x2f21d9(0x1e4)],'resolved':_0x1b6efd[_0x2f21d9(0x1c4)]===0x1,'dT':f(_0x3df327['createTimestamp']),'personId':_0x3df327[_0x2f21d9(0x1f3)],'threadId':_0x3df327['threadId']};}function G(_0x48ca10,_0x304141,_0x4a80b1){const _0xbe42db=_0x3a32e5;var _0x1c2e64,_0xc0ba43;if(((_0xc0ba43=(_0x1c2e64=_0x48ca10==null?void 0x0:_0x48ca10[_0xbe42db(0x1ae)])==null?void 0x0:_0x1c2e64[_0xbe42db(0x1ed)])!=null?_0xc0ba43:0x0)>0x0){const _0x5738cf=(_0x254b26,_0x17f83c)=>({'id':_0x254b26[_0xbe42db(0x1e4)],'threadId':_0x254b26[_0xbe42db(0x1a3)],'dT':f(_0x254b26[_0xbe42db(0x1e0)]),'personId':_0x254b26[_0xbe42db(0x1f3)],'resolved':_0x48ca10[_0xbe42db(0x1c4)]===I[_0xbe42db(0x1cc)],'unitId':_0x304141,'subUnitId':_0x4a80b1,'text':JSON['parse'](_0x254b26[_0xbe42db(0x1a2)]),'parentId':_0x17f83c}),_0x4f2af9=_0x5738cf(_0x48ca10['replies'][0x0]);return{..._0x4f2af9,'children':_0x48ca10['replies'][_0xbe42db(0x1f5)](0x1)[_0xbe42db(0x204)](_0xbee81a=>_0x5738cf(_0xbee81a,_0x4f2af9['id']))};}return null;}let p=class{constructor(_0x1a562e,_0x2d8316,_0x512b8f){const _0x43d65c=_0x3a32e5;this[_0x43d65c(0x19d)]=_0x1a562e,this[_0x43d65c(0x1e5)]=_0x2d8316,this[_0x43d65c(0x19e)]=_0x512b8f;}async['addComment'](_0x395119){const _0x3bad9a=_0x3a32e5;var _0x291497,_0x4dbd8f;const {parentId:_0x234497,unitId:_0x1123c5,text:_0x265f14,threadId:_0x207da8}=_0x395119,_0x217f9f=(_0x4dbd8f=(_0x291497=_0x265f14[_0x3bad9a(0x1cd)])==null?void 0x0:_0x291497[_0x3bad9a(0x1db)](_0x1a9c07=>_0x1a9c07['rangeType']===c[_0x3bad9a(0x203)][_0x3bad9a(0x1e1)])[_0x3bad9a(0x204)](_0x1ab73b=>_0x1ab73b['rangeId']))!=null?_0x4dbd8f:[],_0x844cd8=JSON['stringify'](_0x265f14),_0x65e6a8=(await this['_sessionService'][_0x3bad9a(0x1d7)](_0x1123c5))[_0x3bad9a(0x1e7)]();if(_0x234497){const _0x4c3112={'memberId':_0x65e6a8,'unitId':_0x1123c5,'content':_0x844cd8,'mention':_0x217f9f,'threadId':_0x207da8},_0x290096=(await this[_0x3bad9a(0x19d)][_0x3bad9a(0x1a5)](_0x3bad9a(0x1bc)+_0x1123c5+_0x3bad9a(0x1d1),{'body':_0x4c3112}))[_0x3bad9a(0x1b9)]['reply'];return{..._0x395119,'id':_0x290096[_0x3bad9a(0x1e4)],'dT':c['dayjs'](+_0x290096['createTimestamp'])['format'](_0x3bad9a(0x1b7)),'personId':_0x290096[_0x3bad9a(0x1f3)]};}else{const _0x45266a={'memberId':_0x65e6a8,'unitId':_0x1123c5,'content':_0x844cd8,'mention':_0x217f9f},_0x5677f6=await this['_httpService'][_0x3bad9a(0x1a5)](_0x3bad9a(0x1bc)+_0x1123c5+_0x3bad9a(0x1c2),{'body':_0x45266a});return Y(_0x5677f6[_0x3bad9a(0x1b9)][_0x3bad9a(0x1c3)],_0x395119);}}async[_0x3a32e5(0x1a8)](_0x2397b4){const _0x38eaec=_0x3a32e5;var _0x5616a2,_0x5e83c9;const {text:_0x5d0aa0,unitId:_0x1b7d65}=_0x2397b4,_0x37c1da=(_0x5e83c9=(_0x5616a2=_0x5d0aa0[_0x38eaec(0x1cd)])==null?void 0x0:_0x5616a2[_0x38eaec(0x1db)](_0xdd7d44=>_0xdd7d44['rangeType']===c[_0x38eaec(0x203)][_0x38eaec(0x1e1)])[_0x38eaec(0x204)](_0x40f669=>_0x40f669['rangeId']))!=null?_0x5e83c9:[],_0x1a10ed=JSON[_0x38eaec(0x1b5)](_0x5d0aa0),_0x4adb0d=_0x2397b4['threadId'],_0x652e4b=_0x2397b4['id'],_0x3d62a6={'memberId':(await this[_0x38eaec(0x19e)][_0x38eaec(0x1d7)](_0x1b7d65))[_0x38eaec(0x1e7)](),'unitId':_0x1b7d65,'threadId':_0x4adb0d,'mention':_0x37c1da,'content':_0x1a10ed,'replyId':_0x652e4b},_0x460691=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x1b7d65+_0x38eaec(0x1ca),{'body':_0x3d62a6});return!_0x460691[_0x38eaec(0x1b9)]['error']||_0x460691[_0x38eaec(0x1b9)]['error'][_0x38eaec(0x1f4)]===0x1;}async[_0x3a32e5(0x1ad)](_0x1c498c){const _0x468d7e=_0x3a32e5,{unitId:_0x109351}=_0x1c498c,_0x3e389a=_0x1c498c['threadId'],_0x29fe75={'memberId':this[_0x468d7e(0x1e5)][_0x468d7e(0x1b3)]()[_0x468d7e(0x1ef)],'unitId':_0x109351,'threadId':_0x3e389a,'solved':_0x1c498c[_0x468d7e(0x1ff)]?I[_0x468d7e(0x1cc)]:I[_0x468d7e(0x1de)]},_0x57ea25=await this[_0x468d7e(0x19d)][_0x468d7e(0x1a5)](_0x468d7e(0x1bc)+_0x109351+'/solved',{'body':_0x29fe75});return!_0x57ea25[_0x468d7e(0x1b9)][_0x468d7e(0x199)]||_0x57ea25[_0x468d7e(0x1b9)][_0x468d7e(0x199)][_0x468d7e(0x1f4)]===0x1;}async[_0x3a32e5(0x1fd)](_0x513042,_0x3333c5,_0x763f4f,_0x47e288){const _0x94d4ad=_0x3a32e5,_0x38c468={'memberId':(await this['_sessionService'][_0x94d4ad(0x1d7)](_0x513042))['getMemberID'](),'threadId':_0x763f4f,'replyId':_0x47e288,'unitId':_0x513042},_0x9a021d=await this[_0x94d4ad(0x19d)]['post'](_0x94d4ad(0x1bc)+_0x513042+'/delete',{'body':_0x38c468});return!_0x9a021d[_0x94d4ad(0x1b9)][_0x94d4ad(0x199)]||_0x9a021d['body'][_0x94d4ad(0x199)][_0x94d4ad(0x1f4)]===0x1;}async[_0x3a32e5(0x195)](_0x29e710,_0x55741a,_0x1415ee){const _0x135e6e=_0x3a32e5,_0x29d55d={'unitId':_0x29e710,'threadId':_0x1415ee},_0x4e2168=await this[_0x135e6e(0x19d)][_0x135e6e(0x1a5)]('/universer-api/comment/unit/'+_0x29e710+_0x135e6e(0x1ee),{'body':_0x29d55d}),_0xf9d037=_0x1415ee[_0x135e6e(0x204)](_0x45a288=>G(_0x4e2168['body']['comments'][_0x45a288],_0x29e710,_0x55741a))[_0x135e6e(0x1db)](Boolean);return Object[_0x135e6e(0x1d9)](_0x4e2168[_0x135e6e(0x1b9)][_0x135e6e(0x1dc)])[_0x135e6e(0x19c)](_0x2fb0c4=>{const _0x2c100d=_0x135e6e;this[_0x2c100d(0x1e5)][_0x2c100d(0x207)](_0x2fb0c4);}),_0xf9d037;}[_0x3a32e5(0x206)](_0x569c4b){const _0x1c60c2=_0x3a32e5;return{'id':_0x569c4b['id'],'threadId':_0x569c4b[_0x1c60c2(0x1a3)],'ref':_0x569c4b[_0x1c60c2(0x1ac)]};}};p=x([C(0x0,c[_0x3a32e5(0x1c6)](P[_0x3a32e5(0x1fa)])),C(0x1,c[_0x3a32e5(0x1c6)](c[_0x3a32e5(0x1fe)])),C(0x2,c[_0x3a32e5(0x1c6)](b[_0x3a32e5(0x1fc)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x29687d,_0x2cd2c2,_0x10fbe4,_0x3672bf)=>{const _0x43368e=_0x3a32e5;for(var _0x5ee990=_0x3672bf>0x1?void 0x0:_0x3672bf?H(_0x2cd2c2,_0x10fbe4):_0x2cd2c2,_0x252d2e=_0x29687d[_0x43368e(0x1ed)]-0x1,_0x4b92c8;_0x252d2e>=0x0;_0x252d2e--)(_0x4b92c8=_0x29687d[_0x252d2e])&&(_0x5ee990=_0x4b92c8(_0x5ee990)||_0x5ee990);return _0x5ee990;},y=(_0x23f988,_0x5098ea)=>(_0x1d8a45,_0x33e99a)=>_0x5098ea(_0x1d8a45,_0x33e99a,_0x23f988);let g=class extends c['Disposable']{constructor(_0x3353c9,_0x18671c){const _0x3d0eeb=_0x3a32e5;super(),this[_0x3d0eeb(0x1e2)]=_0x3353c9,this['_threadCommentDataSource']=_0x18671c,this[_0x3d0eeb(0x201)]();}[_0x3a32e5(0x201)](){const _0x1442ba=_0x3a32e5;this[_0x1442ba(0x1e2)][_0x1442ba(0x198)]=this[_0x1442ba(0x1c9)],this['_threadCommentDataSourceService'][_0x1442ba(0x1be)]=!0x1;}};g=J([y(0x0,M[_0x3a32e5(0x1a6)]),y(0x1,c[_0x3a32e5(0x1c6)](p))],g);var F=Object['defineProperty'],L=Object[_0x3a32e5(0x1b4)],Z=(_0x4fbf5f,_0x21bcf0,_0x64a33a)=>_0x21bcf0 in _0x4fbf5f?F(_0x4fbf5f,_0x21bcf0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x64a33a}):_0x4fbf5f[_0x21bcf0]=_0x64a33a,W=(_0x18633a,_0x2ff6d7,_0x9287fc,_0x7b527e)=>{const _0x2e6413=_0x3a32e5;for(var _0x279c95=_0x7b527e>0x1?void 0x0:_0x7b527e?L(_0x2ff6d7,_0x9287fc):_0x2ff6d7,_0x43af33=_0x18633a[_0x2e6413(0x1ed)]-0x1,_0x3fad4c;_0x43af33>=0x0;_0x43af33--)(_0x3fad4c=_0x18633a[_0x43af33])&&(_0x279c95=_0x3fad4c(_0x279c95)||_0x279c95);return _0x279c95;},O=(_0x10cde2,_0x40766c)=>(_0x1b883d,_0x5a0289)=>_0x40766c(_0x1b883d,_0x5a0289,_0x10cde2),N=(_0x17f545,_0x43a73f,_0x5e4c42)=>Z(_0x17f545,typeof _0x43a73f!=_0x3a32e5(0x1f1)?_0x43a73f+'':_0x43a73f,_0x5e4c42);exports[_0x3a32e5(0x1c0)]=class extends c[_0x3a32e5(0x1df)]{constructor(_0x4011d0=D,_0x1f9479,_0x411dd5){const _0x581988=_0x3a32e5;super(),this[_0x581988(0x200)]=_0x4011d0,this['_injector']=_0x1f9479,this[_0x581988(0x19b)]=_0x411dd5;const {..._0x4e3328}=c[_0x581988(0x1bb)]({},D,this[_0x581988(0x200)]);this[_0x581988(0x19b)]['setConfig'](q,_0x4e3328);}['onStarting'](){const _0x1acbd3=_0x3a32e5;[[p],[g],[_]][_0x1acbd3(0x19c)](_0x32480a=>{const _0x4db583=_0x1acbd3;this[_0x4db583(0x1f8)][_0x4db583(0x1f0)](_0x32480a);});}[_0x3a32e5(0x1ba)](){const _0xaf8e77=_0x3a32e5;this[_0xaf8e77(0x1f8)]['get'](g),this['_injector'][_0xaf8e77(0x1e9)](_);}},N(exports[_0x3a32e5(0x1c0)],'pluginName',U),N(exports[_0x3a32e5(0x1c0)],_0x3a32e5(0x1ec),c['UniverInstanceType'][_0x3a32e5(0x1e6)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x3a32e5(0x1af)](w['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T[_0x3a32e5(0x1b1)]),O(0x1,c[_0x3a32e5(0x1c6)](c[_0x3a32e5(0x1a7)])),O(0x2,c['IConfigService'])],exports[_0x3a32e5(0x1c0)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x2c6192=_0x20aa;(function(_0x4ba2b4,_0x231167){const _0x493961=_0x20aa,_0x3fa76b=_0x4ba2b4();while(!![]){try{const _0x57146a=parseInt(_0x493961(0x138))/0x1+parseInt(_0x493961(0x100))/0x2*(parseInt(_0x493961(0x12e))/0x3)+parseInt(_0x493961(0x145))/0x4*(parseInt(_0x493961(0xe7))/0x5)+parseInt(_0x493961(0xfe))/0x6*(parseInt(_0x493961(0x139))/0x7)+-parseInt(_0x493961(0xf3))/0x8*(parseInt(_0x493961(0xfa))/0x9)+-parseInt(_0x493961(0x130))/0xa*(-parseInt(_0x493961(0xf1))/0xb)+parseInt(_0x493961(0x12c))/0xc*(-parseInt(_0x493961(0x124))/0xd);if(_0x57146a===_0x231167)break;else _0x3fa76b['push'](_0x3fa76b['shift']());}catch(_0x1010a3){_0x3fa76b['push'](_0x3fa76b['shift']());}}}(_0x4376,0xbfd71));import{CommentService as _0x41b3b3,CollaborationSessionService as _0x383878,UniverCollaborationClientPlugin as _0x381338}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x57d8a2}from'@univerjs-pro/license';import{dayjs as _0x467eaf,UserManagerService as _0x4a7b0a,Inject as _0x456bc0,Injector as _0x3ea938,Disposable as _0x1d3d60,CustomRangeType as _0x4ea2eb,UniverInstanceType as _0x59ce6a,DependentOn as _0x382d7b,IConfigService as _0x1b12f1,Plugin as _0xe039a3,merge as _0x5c49b5}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5af108}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x8816bb,IThreadCommentDataSourceService as _0x2e8119}from'@univerjs/thread-comment';import{bufferTime as _0x325882}from'rxjs';import{HTTPService as _0x75c698}from'@univerjs/network';const W=_0x2c6192(0xfc);var I=(_0x5e53c0=>(_0x5e53c0[_0x5e53c0[_0x2c6192(0x125)]=0x0]=_0x2c6192(0x125),_0x5e53c0[_0x5e53c0[_0x2c6192(0xf2)]=0x1]=_0x2c6192(0xf2),_0x5e53c0[_0x5e53c0[_0x2c6192(0x133)]=-0x1]=_0x2c6192(0x133),_0x5e53c0))(I||{}),v=(_0x233151=>(_0x233151[_0x233151['Unknown']=0x0]=_0x2c6192(0xea),_0x233151[_0x233151[_0x2c6192(0x126)]=0x1]=_0x2c6192(0x126),_0x233151[_0x233151['Reply']=0x2]=_0x2c6192(0x12d),_0x233151[_0x233151[_0x2c6192(0x143)]=0x3]=_0x2c6192(0x143),_0x233151[_0x233151[_0x2c6192(0x11f)]=0x4]=_0x2c6192(0x11f),_0x233151[_0x233151[_0x2c6192(0x114)]=0x5]=_0x2c6192(0x114),_0x233151[_0x233151[_0x2c6192(0x133)]=-0x1]=_0x2c6192(0x133),_0x233151))(v||{});const y=_0x439d06=>_0x467eaf(new Date(+_0x439d06))[_0x2c6192(0x10b)](_0x2c6192(0x147)),B=async(_0x2a42b0,_0x3799a7)=>{const _0x26959d=_0x2c6192,_0x1184b6=_0x2a42b0['get'](_0x4a7b0a),_0x29dc02=_0x2a42b0['get'](_0x75c698);_0x3799a7[_0x26959d(0x136)](_0xe88892=>{const _0x4cd617=_0x26959d;_0x1184b6[_0x4cd617(0x105)](_0xe88892)&&_0x3799a7[_0x4cd617(0xee)](_0xe88892);}),_0x3799a7['size']&&(await _0x29dc02[_0x26959d(0x10f)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3799a7]}}))[_0x26959d(0xe6)][_0x26959d(0x146)][_0x26959d(0x136)](_0x425d25=>{const _0x1dc57d=_0x26959d;_0x425d25&&_0x1184b6[_0x1dc57d(0x132)](_0x425d25);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x5dde4b,_0x4f576c,_0x997ff3,_0x6d4fd)=>{const _0x437ff9=_0x2c6192;for(var _0x22352c=_0x6d4fd>0x1?void 0x0:_0x6d4fd?K(_0x4f576c,_0x997ff3):_0x4f576c,_0x274a15=_0x5dde4b[_0x437ff9(0xf4)]-0x1,_0x30b816;_0x274a15>=0x0;_0x274a15--)(_0x30b816=_0x5dde4b[_0x274a15])&&(_0x22352c=_0x30b816(_0x22352c)||_0x22352c);return _0x22352c;},p=(_0x6ddc67,_0x50d158)=>(_0x480fa5,_0x10a9b6)=>_0x50d158(_0x480fa5,_0x10a9b6,_0x6ddc67);function _0x20aa(_0x5e8bda,_0x281d53){const _0x43768d=_0x4376();return _0x20aa=function(_0x20aaee,_0x2d9bd3){_0x20aaee=_0x20aaee-0xe6;let _0x3abc9f=_0x43768d[_0x20aaee];return _0x3abc9f;},_0x20aa(_0x5e8bda,_0x281d53);}let _=class extends _0x1d3d60{constructor(_0x1f5b0b,_0x2519bc,_0x5f6c25,_0x5a7ea7){const _0x259f15=_0x2c6192;super(),this[_0x259f15(0x113)]=_0x1f5b0b,this[_0x259f15(0x120)]=_0x2519bc,this['_userService']=_0x5f6c25,this[_0x259f15(0x14a)]=_0x5a7ea7,this[_0x259f15(0x134)](),this[_0x259f15(0x12f)]();}[_0x2c6192(0x12f)](){const _0x789e91=_0x2c6192;this['disposeWithMe'](this[_0x789e91(0x120)][_0x789e91(0x111)][_0x789e91(0x110)](_0x325882(0x10))[_0x789e91(0x122)](_0x308897=>{const _0x478a98=_0x789e91,_0xd88602=new Set();_0x308897[_0x478a98(0x136)](_0x398e79=>{const _0x4b127e=_0x478a98;switch(_0x398e79[_0x4b127e(0xff)]){case'add':{const _0x55bbaa=_0x398e79['payload'][_0x4b127e(0x10d)];_0xd88602[_0x4b127e(0x11d)](_0x55bbaa);break;}}}),B(this[_0x478a98(0x14a)],_0xd88602);}));}['_init'](){const _0x291468=_0x2c6192;this['disposeWithMe'](this['_commentService'][_0x291468(0x111)][_0x291468(0x122)](async _0x4220ac=>{const _0x3d40ab=_0x291468;var _0x434088,_0x5573ef,_0x430ec1,_0x4cb245;const _0x4d8cbc=(_0x434088=this[_0x3d40ab(0x120)][_0x3d40ab(0x129)](_0x4220ac[_0x3d40ab(0x10a)])[_0x3d40ab(0xe8)](_0x262d37=>_0x262d37[_0x3d40ab(0xf5)]===_0x4220ac[_0x3d40ab(0xf5)]))==null?void 0x0:_0x434088[_0x3d40ab(0x13e)];if(!_0x4d8cbc)return;const {unitId:_0x3343c7,subUnitId:_0xc3c71c}=_0x4d8cbc;switch(_0x4220ac[_0x3d40ab(0x131)]&&this[_0x3d40ab(0x10c)][_0x3d40ab(0x132)](_0x4220ac[_0x3d40ab(0x131)]),_0x4220ac[_0x3d40ab(0xff)]){case v['Add']:break;case v['Reply']:{this[_0x3d40ab(0x120)][_0x3d40ab(0xed)](_0x3343c7,_0xc3c71c,{'unitId':_0x3343c7,'subUnitId':_0xc3c71c,'ref':'','id':_0x4220ac[_0x3d40ab(0x116)],'dT':y(+_0x4220ac[_0x3d40ab(0x106)]),'threadId':_0x4220ac['threadId'],'personId':(_0x430ec1=(_0x5573ef=_0x4220ac[_0x3d40ab(0x131)])==null?void 0x0:_0x5573ef[_0x3d40ab(0x104)])!=null?_0x430ec1:_0x4220ac[_0x3d40ab(0x119)],'text':JSON[_0x3d40ab(0x10e)](_0x4220ac[_0x3d40ab(0x144)]),'parentId':_0x4d8cbc['id']});break;}case v[_0x3d40ab(0x11f)]:{const _0x443f15=this['_threadCommentModel'][_0x3d40ab(0x103)](_0x3343c7,_0xc3c71c,_0x4220ac[_0x3d40ab(0x116)]);_0x443f15&&_0x443f15[_0x3d40ab(0x117)]&&this['_threadCommentModel'][_0x3d40ab(0x11a)](_0x3343c7,_0xc3c71c,_0x4220ac['replyId']);break;}case v[_0x3d40ab(0x143)]:{this[_0x3d40ab(0x120)][_0x3d40ab(0xec)](_0x3343c7,_0xc3c71c,{'commentId':_0x4220ac[_0x3d40ab(0x116)],'text':JSON[_0x3d40ab(0x10e)](_0x4220ac[_0x3d40ab(0x144)])});break;}case v[_0x3d40ab(0x114)]:{const _0x4e1a98=(_0x4cb245=this['_threadCommentModel'][_0x3d40ab(0x129)](_0x4220ac[_0x3d40ab(0x10a)])[_0x3d40ab(0xe8)](_0x456ba5=>_0x456ba5[_0x3d40ab(0xf5)]===_0x4220ac[_0x3d40ab(0xf5)]))==null?void 0x0:_0x4cb245[_0x3d40ab(0x13e)];_0x4e1a98&&this['_threadCommentModel']['resolveComment'](_0x3343c7,_0xc3c71c,_0x4e1a98['id'],_0x4220ac[_0x3d40ab(0xfd)]===I[_0x3d40ab(0xf2)]);break;}}}));}};_=V([p(0x0,_0x456bc0(_0x41b3b3)),p(0x1,_0x456bc0(_0x8816bb)),p(0x2,_0x456bc0(_0x4a7b0a)),p(0x3,_0x456bc0(_0x3ea938))],_);const z=_0x2c6192(0x112),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1d9e33,_0x42949c,_0xcaf546,_0x12acea)=>{const _0x1969f7=_0x2c6192;for(var _0x1b13b5=_0x12acea>0x1?void 0x0:_0x12acea?k(_0x42949c,_0xcaf546):_0x42949c,_0x3fc7ca=_0x1d9e33[_0x1969f7(0xf4)]-0x1,_0x5d3752;_0x3fc7ca>=0x0;_0x3fc7ca--)(_0x5d3752=_0x1d9e33[_0x3fc7ca])&&(_0x1b13b5=_0x5d3752(_0x1b13b5)||_0x1b13b5);return _0x1b13b5;},b=(_0x24c94a,_0x1e6b2f)=>(_0x5186e8,_0x55185d)=>_0x1e6b2f(_0x5186e8,_0x55185d,_0x24c94a);function X(_0x34b79b,_0x38d265){const _0x6b32f7=_0x2c6192,_0x548fa8=_0x34b79b[_0x6b32f7(0x127)][0x0];return{..._0x38d265,'id':_0x548fa8[_0x6b32f7(0x116)],'resolved':_0x34b79b[_0x6b32f7(0xfd)]===0x1,'dT':y(_0x548fa8[_0x6b32f7(0x106)]),'personId':_0x548fa8[_0x6b32f7(0x119)],'threadId':_0x548fa8[_0x6b32f7(0xf5)]};}function ee(_0x4ac389,_0x29471f,_0x1f6156){const _0x2068d9=_0x2c6192;var _0x56c8d7,_0x3248f6;if(((_0x3248f6=(_0x56c8d7=_0x4ac389==null?void 0x0:_0x4ac389[_0x2068d9(0x127)])==null?void 0x0:_0x56c8d7[_0x2068d9(0xf4)])!=null?_0x3248f6:0x0)>0x0){const _0x5066d6=(_0xf096fc,_0x203f09)=>({'id':_0xf096fc[_0x2068d9(0x116)],'threadId':_0xf096fc[_0x2068d9(0xf5)],'dT':y(_0xf096fc[_0x2068d9(0x106)]),'personId':_0xf096fc[_0x2068d9(0x119)],'resolved':_0x4ac389[_0x2068d9(0xfd)]===I[_0x2068d9(0xf2)],'unitId':_0x29471f,'subUnitId':_0x1f6156,'text':JSON[_0x2068d9(0x10e)](_0xf096fc[_0x2068d9(0x144)]),'parentId':_0x203f09}),_0x4d5b0c=_0x5066d6(_0x4ac389[_0x2068d9(0x127)][0x0]);return{..._0x4d5b0c,'children':_0x4ac389[_0x2068d9(0x127)][_0x2068d9(0x11c)](0x1)['map'](_0x2102d5=>_0x5066d6(_0x2102d5,_0x4d5b0c['id']))};}return null;}let S=class{constructor(_0x94668e,_0x6e30b,_0x5507b7){const _0x3310d4=_0x2c6192;this[_0x3310d4(0xeb)]=_0x94668e,this[_0x3310d4(0x10c)]=_0x6e30b,this['_sessionService']=_0x5507b7;}async[_0x2c6192(0xed)](_0x2d871c){const _0x1efe27=_0x2c6192;var _0x26e8e3,_0x18578c;const {parentId:_0x439026,unitId:_0x4de833,text:_0x10487e,threadId:_0x3141fe}=_0x2d871c,_0x599310=(_0x18578c=(_0x26e8e3=_0x10487e[_0x1efe27(0x11b)])==null?void 0x0:_0x26e8e3[_0x1efe27(0x13f)](_0x5af6b0=>_0x5af6b0[_0x1efe27(0x14c)]===_0x4ea2eb[_0x1efe27(0x107)])[_0x1efe27(0x101)](_0x4e95a3=>_0x4e95a3[_0x1efe27(0xe9)]))!=null?_0x18578c:[],_0x5ade3f=JSON[_0x1efe27(0x140)](_0x10487e),_0x225012=(await this[_0x1efe27(0xfb)][_0x1efe27(0x149)](_0x4de833))[_0x1efe27(0x121)]();if(_0x439026){const _0x50f06b={'memberId':_0x225012,'unitId':_0x4de833,'content':_0x5ade3f,'mention':_0x599310,'threadId':_0x3141fe},_0x2b99ea=(await this[_0x1efe27(0xeb)][_0x1efe27(0xf9)](_0x1efe27(0x148)+_0x4de833+_0x1efe27(0x108),{'body':_0x50f06b}))[_0x1efe27(0xe6)]['reply'];return{..._0x2d871c,'id':_0x2b99ea[_0x1efe27(0x116)],'dT':_0x467eaf(+_0x2b99ea['createTimestamp'])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x2b99ea['userId']};}else{const _0x17997c={'memberId':_0x225012,'unitId':_0x4de833,'content':_0x5ade3f,'mention':_0x599310},_0x52166a=await this[_0x1efe27(0xeb)][_0x1efe27(0xf9)](_0x1efe27(0x148)+_0x4de833+_0x1efe27(0xf7),{'body':_0x17997c});return X(_0x52166a['body'][_0x1efe27(0xef)],_0x2d871c);}}async['updateComment'](_0x170f0e){const _0x52f2ab=_0x2c6192;var _0x14dabc,_0x20c4ea;const {text:_0x32163e,unitId:_0x676789}=_0x170f0e,_0x238a20=(_0x20c4ea=(_0x14dabc=_0x32163e['customRanges'])==null?void 0x0:_0x14dabc[_0x52f2ab(0x13f)](_0xad761=>_0xad761[_0x52f2ab(0x14c)]===_0x4ea2eb[_0x52f2ab(0x107)])['map'](_0x3c9667=>_0x3c9667[_0x52f2ab(0xe9)]))!=null?_0x20c4ea:[],_0x15b254=JSON[_0x52f2ab(0x140)](_0x32163e),_0x5aa8ba=_0x170f0e[_0x52f2ab(0xf5)],_0x1af6e5=_0x170f0e['id'],_0x591e13={'memberId':(await this['_sessionService'][_0x52f2ab(0x149)](_0x676789))[_0x52f2ab(0x121)](),'unitId':_0x676789,'threadId':_0x5aa8ba,'mention':_0x238a20,'content':_0x15b254,'replyId':_0x1af6e5},_0x4728e4=await this[_0x52f2ab(0xeb)][_0x52f2ab(0xf9)]('/universer-api/comment/unit/'+_0x676789+_0x52f2ab(0x115),{'body':_0x591e13});return!_0x4728e4[_0x52f2ab(0xe6)][_0x52f2ab(0x118)]||_0x4728e4[_0x52f2ab(0xe6)][_0x52f2ab(0x118)][_0x52f2ab(0x109)]===0x1;}async[_0x2c6192(0x11e)](_0x3c87a1){const _0x17fbb8=_0x2c6192,{unitId:_0x29b19c}=_0x3c87a1,_0x46c644=_0x3c87a1[_0x17fbb8(0xf5)],_0x18a29f={'memberId':this[_0x17fbb8(0x10c)][_0x17fbb8(0xf6)]()[_0x17fbb8(0x104)],'unitId':_0x29b19c,'threadId':_0x46c644,'solved':_0x3c87a1[_0x17fbb8(0xf8)]?I['Solved']:I[_0x17fbb8(0x125)]},_0x242433=await this['_httpService'][_0x17fbb8(0xf9)]('/universer-api/comment/unit/'+_0x29b19c+_0x17fbb8(0x135),{'body':_0x18a29f});return!_0x242433[_0x17fbb8(0xe6)][_0x17fbb8(0x118)]||_0x242433[_0x17fbb8(0xe6)][_0x17fbb8(0x118)]['code']===0x1;}async['deleteComment'](_0x38c03e,_0x2302c5,_0x2ed212,_0x55e9b1){const _0x3f9769=_0x2c6192,_0x4c1017={'memberId':(await this[_0x3f9769(0xfb)][_0x3f9769(0x149)](_0x38c03e))['getMemberID'](),'threadId':_0x2ed212,'replyId':_0x55e9b1,'unitId':_0x38c03e},_0x22bfcd=await this[_0x3f9769(0xeb)][_0x3f9769(0xf9)](_0x3f9769(0x148)+_0x38c03e+_0x3f9769(0x137),{'body':_0x4c1017});return!_0x22bfcd['body'][_0x3f9769(0x118)]||_0x22bfcd[_0x3f9769(0xe6)][_0x3f9769(0x118)][_0x3f9769(0x109)]===0x1;}async['listComments'](_0x3a9339,_0x2f40e1,_0xbd02c1){const _0x269639=_0x2c6192,_0x4c06e4={'unitId':_0x3a9339,'threadId':_0xbd02c1},_0x2232b3=await this[_0x269639(0xeb)]['post']('/universer-api/comment/unit/'+_0x3a9339+_0x269639(0x12a),{'body':_0x4c06e4}),_0x72e265=_0xbd02c1[_0x269639(0x101)](_0x5e9da1=>ee(_0x2232b3[_0x269639(0xe6)]['comments'][_0x5e9da1],_0x3a9339,_0x2f40e1))[_0x269639(0x13f)](Boolean);return Object['values'](_0x2232b3[_0x269639(0xe6)]['users'])['forEach'](_0x374944=>{const _0x5adf7b=_0x269639;this[_0x5adf7b(0x10c)][_0x5adf7b(0x132)](_0x374944);}),_0x72e265;}[_0x2c6192(0x13c)](_0x36259c){return{'id':_0x36259c['id'],'threadId':_0x36259c['threadId'],'ref':_0x36259c['ref']};}};S=Q([b(0x0,_0x456bc0(_0x75c698)),b(0x1,_0x456bc0(_0x4a7b0a)),b(0x2,_0x456bc0(_0x383878))],S);var re=Object[_0x2c6192(0x14b)],te=(_0x13ab35,_0x295903,_0x42a7f5,_0x2c3d6e)=>{for(var _0x5bcc98=_0x2c3d6e>0x1?void 0x0:_0x2c3d6e?re(_0x295903,_0x42a7f5):_0x295903,_0x1e39d5=_0x13ab35['length']-0x1,_0x510ba0;_0x1e39d5>=0x0;_0x1e39d5--)(_0x510ba0=_0x13ab35[_0x1e39d5])&&(_0x5bcc98=_0x510ba0(_0x5bcc98)||_0x5bcc98);return _0x5bcc98;},M=(_0x21d752,_0x40e211)=>(_0x196a8d,_0x5f0eb7)=>_0x40e211(_0x196a8d,_0x5f0eb7,_0x21d752);let f=class extends _0x1d3d60{constructor(_0x45342f,_0xfa11ec){const _0x3a7fc4=_0x2c6192;super(),this[_0x3a7fc4(0x12b)]=_0x45342f,this[_0x3a7fc4(0x14d)]=_0xfa11ec,this['_initDataSource']();}[_0x2c6192(0x142)](){const _0x22589e=_0x2c6192;this[_0x22589e(0x12b)][_0x22589e(0xf0)]=this[_0x22589e(0x14d)],this[_0x22589e(0x12b)][_0x22589e(0x141)]=!0x1;}};f=te([M(0x0,_0x2e8119),M(0x1,_0x456bc0(S))],f);var se=Object['defineProperty'],oe=Object[_0x2c6192(0x14b)],ne=(_0xb20337,_0x7d5553,_0x21ee0e)=>_0x7d5553 in _0xb20337?se(_0xb20337,_0x7d5553,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x21ee0e}):_0xb20337[_0x7d5553]=_0x21ee0e,ie=(_0x226092,_0xf4bef2,_0x64a980,_0x2ae7d5)=>{const _0x153b5b=_0x2c6192;for(var _0x42a8c2=_0x2ae7d5>0x1?void 0x0:_0x2ae7d5?oe(_0xf4bef2,_0x64a980):_0xf4bef2,_0x4f368e=_0x226092[_0x153b5b(0xf4)]-0x1,_0x345cb1;_0x4f368e>=0x0;_0x4f368e--)(_0x345cb1=_0x226092[_0x4f368e])&&(_0x42a8c2=_0x345cb1(_0x42a8c2)||_0x42a8c2);return _0x42a8c2;},N=(_0x2721ba,_0x152e1c)=>(_0x40bd89,_0x252b4c)=>_0x152e1c(_0x40bd89,_0x252b4c,_0x2721ba),$=(_0x4a041d,_0x52a9c0,_0x4e19ae)=>ne(_0x4a041d,typeof _0x52a9c0!=_0x2c6192(0x128)?_0x52a9c0+'':_0x52a9c0,_0x4e19ae);let g=class extends _0xe039a3{constructor(_0x4e2929=O,_0x51dd18,_0x245b5c){const _0x594f3c=_0x2c6192;super(),this[_0x594f3c(0x102)]=_0x4e2929,this[_0x594f3c(0x14a)]=_0x51dd18,this[_0x594f3c(0x13a)]=_0x245b5c;const {..._0x195f0a}=_0x5c49b5({},O,this[_0x594f3c(0x102)]);this[_0x594f3c(0x13a)][_0x594f3c(0x13b)](z,_0x195f0a);}['onStarting'](){const _0x44b3af=_0x2c6192;[[S],[f],[_]][_0x44b3af(0x136)](_0x5abfde=>{const _0x47fc87=_0x44b3af;this[_0x47fc87(0x14a)][_0x47fc87(0x11d)](_0x5abfde);});}[_0x2c6192(0x123)](){const _0x2cd597=_0x2c6192;this[_0x2cd597(0x14a)][_0x2cd597(0x10f)](f),this[_0x2cd597(0x14a)]['get'](_);}};$(g,'pluginName',W),$(g,_0x2c6192(0xff),_0x59ce6a[_0x2c6192(0x13d)]),g=ie([_0x382d7b(_0x5af108,_0x381338,_0x57d8a2),N(0x1,_0x456bc0(_0x3ea938)),N(0x2,_0x1b12f1)],g);export{g as UniverThreadCommentDataSourcePlugin};function _0x4376(){const _0x50f6a0=['users','YYYY/MM/DD\x20HH:mm','/universer-api/comment/unit/','requireSession','_injector','getOwnPropertyDescriptor','rangeType','_threadCommentDataSource','body','1140OKkdcQ','find','rangeId','Unknown','_httpService','updateComment','addComment','delete','comment','dataSource','4066843mQEscJ','Solved','592kCMtHe','length','threadId','getCurrentUser','/add','resolved','post','109692YksFTw','_sessionService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','750270BbsWMn','type','38432qrgzeD','map','_config','getComment','userID','getUser','createTimestamp','COMMENT','/reply','code','unitId','format','_userService','personId','parse','get','pipe','commentUpdate$','thread-comment-data-source.config','_commentService','Solve','/edit','replyId','parentId','error','userId','deleteComment','customRanges','slice','add','resolveComment','Delete','_threadCommentModel','getMemberID','subscribe','onReady','28085434aqIrCM','OpenOrReOpen','Add','replies','symbol','getUnit','/list','_threadCommentDataSourceService','12ykPgzg','Reply','228cYeZlx','_initUserSync','30gnSfPQ','user','addUser','UNRECOGNIZED','_init','/solved','forEach','/delete','26936UaCPPA','56klzanT','_configService','setConfig','saveCommentToSnapshot','UNIVER_UNKNOWN','root','filter','stringify','syncUpdateMutationToColla','_initDataSource','Edit','content','4408dyaCMk'];_0x4376=function(){return _0x50f6a0;};return _0x4376();}
1
+ const _0x5710f0=_0x46a6;(function(_0x24d318,_0x3d86a4){const _0x4fee20=_0x46a6,_0x5a94ed=_0x24d318();while(!![]){try{const _0x4bd371=parseInt(_0x4fee20(0x13e))/0x1*(-parseInt(_0x4fee20(0x15a))/0x2)+parseInt(_0x4fee20(0x128))/0x3*(-parseInt(_0x4fee20(0xfb))/0x4)+-parseInt(_0x4fee20(0x115))/0x5*(parseInt(_0x4fee20(0x112))/0x6)+-parseInt(_0x4fee20(0x12d))/0x7*(-parseInt(_0x4fee20(0x132))/0x8)+parseInt(_0x4fee20(0x10b))/0x9+-parseInt(_0x4fee20(0xff))/0xa*(parseInt(_0x4fee20(0x117))/0xb)+parseInt(_0x4fee20(0x152))/0xc;if(_0x4bd371===_0x3d86a4)break;else _0x5a94ed['push'](_0x5a94ed['shift']());}catch(_0x20abac){_0x5a94ed['push'](_0x5a94ed['shift']());}}}(_0x4cdf,0xa4d9c));import{CommentService as _0x3e3bb9,CollaborationSessionService as _0x3d2bd0,UniverCollaborationClientPlugin as _0x4b79ae}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xe029df}from'@univerjs-pro/license';import{dayjs as _0x2f01c3,UserManagerService as _0x52fde5,Inject as _0x2c279d,Injector as _0x128802,Disposable as _0x314433,CustomRangeType as _0x23136f,UniverInstanceType as _0x3a1d37,DependentOn as _0x18845d,IConfigService as _0x4e2c49,Plugin as _0x20e7f7,merge as _0x5677ba}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5331da}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3833b2,IThreadCommentDataSourceService as _0x42ea6b}from'@univerjs/thread-comment';import{bufferTime as _0x35226e}from'rxjs';import{HTTPService as _0x39aee6}from'@univerjs/network';const W=_0x5710f0(0x11e);var I=(_0x375bf6=>(_0x375bf6[_0x375bf6[_0x5710f0(0xfd)]=0x0]='OpenOrReOpen',_0x375bf6[_0x375bf6['Solved']=0x1]=_0x5710f0(0x10d),_0x375bf6[_0x375bf6['UNRECOGNIZED']=-0x1]=_0x5710f0(0x104),_0x375bf6))(I||{}),v=(_0x22341b=>(_0x22341b[_0x22341b[_0x5710f0(0x150)]=0x0]='Unknown',_0x22341b[_0x22341b[_0x5710f0(0x140)]=0x1]='Add',_0x22341b[_0x22341b['Reply']=0x2]=_0x5710f0(0x121),_0x22341b[_0x22341b[_0x5710f0(0x129)]=0x3]='Edit',_0x22341b[_0x22341b[_0x5710f0(0xf7)]=0x4]='Delete',_0x22341b[_0x22341b[_0x5710f0(0x102)]=0x5]=_0x5710f0(0x102),_0x22341b[_0x22341b[_0x5710f0(0x104)]=-0x1]=_0x5710f0(0x104),_0x22341b))(v||{});const y=_0x447518=>_0x2f01c3(new Date(+_0x447518))['format'](_0x5710f0(0x116)),B=async(_0x628de6,_0x1b1e27)=>{const _0x42e7ce=_0x5710f0,_0x2fc743=_0x628de6[_0x42e7ce(0x14f)](_0x52fde5),_0x3415a1=_0x628de6[_0x42e7ce(0x14f)](_0x39aee6);_0x1b1e27[_0x42e7ce(0x105)](_0x9ac313=>{const _0x1a7887=_0x42e7ce;_0x2fc743[_0x1a7887(0xf5)](_0x9ac313)&&_0x1b1e27[_0x1a7887(0x130)](_0x9ac313);}),_0x1b1e27[_0x42e7ce(0x14b)]&&(await _0x3415a1[_0x42e7ce(0x14f)](_0x42e7ce(0x12c),{'params':{'userIDs':[..._0x1b1e27]}}))[_0x42e7ce(0xf9)][_0x42e7ce(0x111)][_0x42e7ce(0x105)](_0x1162ff=>{const _0x487e7b=_0x42e7ce;_0x1162ff&&_0x2fc743[_0x487e7b(0x108)](_0x1162ff);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x1c7fdc,_0x38eff9,_0x5c6d7f,_0x5db005)=>{const _0x30b4d2=_0x5710f0;for(var _0x18edb8=_0x5db005>0x1?void 0x0:_0x5db005?K(_0x38eff9,_0x5c6d7f):_0x38eff9,_0x4fd357=_0x1c7fdc[_0x30b4d2(0xfa)]-0x1,_0x851ac3;_0x4fd357>=0x0;_0x4fd357--)(_0x851ac3=_0x1c7fdc[_0x4fd357])&&(_0x18edb8=_0x851ac3(_0x18edb8)||_0x18edb8);return _0x18edb8;},p=(_0x24bdc5,_0x50bfdf)=>(_0x4b3f3f,_0x4acf02)=>_0x50bfdf(_0x4b3f3f,_0x4acf02,_0x24bdc5);let _=class extends _0x314433{constructor(_0x5f1e67,_0x13361e,_0x2e9249,_0x4fb600){const _0x22e73a=_0x5710f0;super(),this[_0x22e73a(0x126)]=_0x5f1e67,this[_0x22e73a(0x149)]=_0x13361e,this[_0x22e73a(0x15e)]=_0x2e9249,this[_0x22e73a(0x142)]=_0x4fb600,this[_0x22e73a(0x144)](),this[_0x22e73a(0x148)]();}[_0x5710f0(0x148)](){const _0x1822c5=_0x5710f0;this[_0x1822c5(0x155)](this[_0x1822c5(0x149)][_0x1822c5(0x11c)][_0x1822c5(0x110)](_0x35226e(0x10))[_0x1822c5(0x158)](_0x16ada9=>{const _0x11296a=_0x1822c5,_0x17ec32=new Set();_0x16ada9[_0x11296a(0x105)](_0x209776=>{const _0x2ea530=_0x11296a;switch(_0x209776['type']){case _0x2ea530(0x125):{const _0x5e610e=_0x209776[_0x2ea530(0xf8)][_0x2ea530(0x124)];_0x17ec32[_0x2ea530(0x125)](_0x5e610e);break;}}}),B(this[_0x11296a(0x142)],_0x17ec32);}));}[_0x5710f0(0x144)](){const _0x35da05=_0x5710f0;this[_0x35da05(0x155)](this[_0x35da05(0x126)][_0x35da05(0x11c)][_0x35da05(0x158)](async _0x41d32d=>{const _0x25b455=_0x35da05;var _0x5af97f,_0xce78f7,_0x42bb72,_0x584dda;const _0x3a53ad=(_0x5af97f=this[_0x25b455(0x149)][_0x25b455(0x13f)](_0x41d32d[_0x25b455(0x15d)])[_0x25b455(0xf3)](_0x37ac43=>_0x37ac43[_0x25b455(0x133)]===_0x41d32d[_0x25b455(0x133)]))==null?void 0x0:_0x5af97f[_0x25b455(0x131)];if(!_0x3a53ad)return;const {unitId:_0x2aa469,subUnitId:_0x34b33b}=_0x3a53ad;switch(_0x41d32d[_0x25b455(0x13c)]&&this[_0x25b455(0x15e)][_0x25b455(0x108)](_0x41d32d[_0x25b455(0x13c)]),_0x41d32d[_0x25b455(0x12b)]){case v[_0x25b455(0x140)]:break;case v[_0x25b455(0x121)]:{this[_0x25b455(0x149)]['addComment'](_0x2aa469,_0x34b33b,{'unitId':_0x2aa469,'subUnitId':_0x34b33b,'ref':'','id':_0x41d32d[_0x25b455(0x15b)],'dT':y(+_0x41d32d[_0x25b455(0x11a)]),'threadId':_0x41d32d[_0x25b455(0x133)],'personId':(_0x42bb72=(_0xce78f7=_0x41d32d[_0x25b455(0x13c)])==null?void 0x0:_0xce78f7['userID'])!=null?_0x42bb72:_0x41d32d[_0x25b455(0xf4)],'text':JSON['parse'](_0x41d32d[_0x25b455(0x127)]),'parentId':_0x3a53ad['id']});break;}case v['Delete']:{const _0x757218=this[_0x25b455(0x149)][_0x25b455(0x118)](_0x2aa469,_0x34b33b,_0x41d32d['replyId']);_0x757218&&_0x757218[_0x25b455(0x146)]&&this[_0x25b455(0x149)][_0x25b455(0x141)](_0x2aa469,_0x34b33b,_0x41d32d[_0x25b455(0x15b)]);break;}case v[_0x25b455(0x129)]:{this['_threadCommentModel'][_0x25b455(0x147)](_0x2aa469,_0x34b33b,{'commentId':_0x41d32d[_0x25b455(0x15b)],'text':JSON[_0x25b455(0x10f)](_0x41d32d[_0x25b455(0x127)])});break;}case v[_0x25b455(0x102)]:{const _0x2c39e7=(_0x584dda=this[_0x25b455(0x149)][_0x25b455(0x13f)](_0x41d32d[_0x25b455(0x15d)])[_0x25b455(0xf3)](_0x93297b=>_0x93297b[_0x25b455(0x133)]===_0x41d32d[_0x25b455(0x133)]))==null?void 0x0:_0x584dda['root'];_0x2c39e7&&this['_threadCommentModel'][_0x25b455(0x10e)](_0x2aa469,_0x34b33b,_0x2c39e7['id'],_0x41d32d[_0x25b455(0x154)]===I[_0x25b455(0x10d)]);break;}}}));}};_=V([p(0x0,_0x2c279d(_0x3e3bb9)),p(0x1,_0x2c279d(_0x3833b2)),p(0x2,_0x2c279d(_0x52fde5)),p(0x3,_0x2c279d(_0x128802))],_);const z=_0x5710f0(0x14c),O={};var k=Object[_0x5710f0(0xf6)],Q=(_0x35206a,_0x1cc8aa,_0x48b5c6,_0x15eaf3)=>{const _0x1ae83d=_0x5710f0;for(var _0x23376e=_0x15eaf3>0x1?void 0x0:_0x15eaf3?k(_0x1cc8aa,_0x48b5c6):_0x1cc8aa,_0x526271=_0x35206a[_0x1ae83d(0xfa)]-0x1,_0x5a351f;_0x526271>=0x0;_0x526271--)(_0x5a351f=_0x35206a[_0x526271])&&(_0x23376e=_0x5a351f(_0x23376e)||_0x23376e);return _0x23376e;},b=(_0x28266b,_0x5bb050)=>(_0x606ce6,_0x598981)=>_0x5bb050(_0x606ce6,_0x598981,_0x28266b);function _0x4cdf(){const _0x2796a1=['_config','map','get','Unknown','/universer-api/comment/unit/','50191680pjcbtl','format','solved','disposeWithMe','onStarting','onReady','subscribe','comments','64726kJuAGO','replyId','symbol','unitId','_userService','code','customRanges','find','userId','getUser','getOwnPropertyDescriptor','Delete','payload','body','length','12NQgYPf','/edit','OpenOrReOpen','reply','29570iYNwrj','filter','defineProperty','Solve','rangeId','UNRECOGNIZED','forEach','userID','resolved','addUser','getCurrentUser','getMemberID','4127229RmpxuK','listComments','Solved','resolveComment','parse','pipe','users','930vnycBN','_httpService','_sessionService','28745ilvGNo','YYYY/MM/DD\x20HH:mm','4279mTyxPR','getComment','requireSession','createTimestamp','values','commentUpdate$','comment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','COMMENT','_initDataSource','Reply','replies','pluginName','personId','add','_commentService','content','1002279zIXDcC','Edit','error','type','/universer-api/user/list','3129BGRwAa','stringify','rangeType','delete','root','1448FBydir','threadId','_configService','_threadCommentDataSource','ref','dataSource','addComment','/reply','_threadCommentDataSourceService','/list','user','post','31aMvSys','getUnit','Add','deleteComment','_injector','slice','_init','saveCommentToSnapshot','parentId','updateComment','_initUserSync','_threadCommentModel','syncUpdateMutationToColla','size','thread-comment-data-source.config'];_0x4cdf=function(){return _0x2796a1;};return _0x4cdf();}function X(_0xf7d48a,_0x331336){const _0x1bcd4a=_0x5710f0,_0x4d74cd=_0xf7d48a[_0x1bcd4a(0x122)][0x0];return{..._0x331336,'id':_0x4d74cd[_0x1bcd4a(0x15b)],'resolved':_0xf7d48a['solved']===0x1,'dT':y(_0x4d74cd[_0x1bcd4a(0x11a)]),'personId':_0x4d74cd[_0x1bcd4a(0xf4)],'threadId':_0x4d74cd['threadId']};}function ee(_0x5d7260,_0x127170,_0x594cab){const _0xe82e8c=_0x5710f0;var _0x234b5e,_0x1d808b;if(((_0x1d808b=(_0x234b5e=_0x5d7260==null?void 0x0:_0x5d7260[_0xe82e8c(0x122)])==null?void 0x0:_0x234b5e['length'])!=null?_0x1d808b:0x0)>0x0){const _0x3ef892=(_0x12b057,_0x195b79)=>({'id':_0x12b057[_0xe82e8c(0x15b)],'threadId':_0x12b057[_0xe82e8c(0x133)],'dT':y(_0x12b057[_0xe82e8c(0x11a)]),'personId':_0x12b057[_0xe82e8c(0xf4)],'resolved':_0x5d7260['solved']===I[_0xe82e8c(0x10d)],'unitId':_0x127170,'subUnitId':_0x594cab,'text':JSON[_0xe82e8c(0x10f)](_0x12b057[_0xe82e8c(0x127)]),'parentId':_0x195b79}),_0x288755=_0x3ef892(_0x5d7260['replies'][0x0]);return{..._0x288755,'children':_0x5d7260[_0xe82e8c(0x122)][_0xe82e8c(0x143)](0x1)[_0xe82e8c(0x14e)](_0x2e28e3=>_0x3ef892(_0x2e28e3,_0x288755['id']))};}return null;}function _0x46a6(_0x51283c,_0x137219){const _0x4cdf9c=_0x4cdf();return _0x46a6=function(_0x46a6af,_0x73b7b8){_0x46a6af=_0x46a6af-0xf1;let _0x49095a=_0x4cdf9c[_0x46a6af];return _0x49095a;},_0x46a6(_0x51283c,_0x137219);}let S=class{constructor(_0xe7450a,_0x3a8458,_0x50eda){const _0x223708=_0x5710f0;this['_httpService']=_0xe7450a,this[_0x223708(0x15e)]=_0x3a8458,this['_sessionService']=_0x50eda;}async[_0x5710f0(0x138)](_0x582f8f){const _0xf005c7=_0x5710f0;var _0x44093d,_0x5d4643;const {parentId:_0x2ff9b0,unitId:_0x583a73,text:_0x133440,threadId:_0x4bd495}=_0x582f8f,_0x56d357=(_0x5d4643=(_0x44093d=_0x133440[_0xf005c7(0xf2)])==null?void 0x0:_0x44093d[_0xf005c7(0x100)](_0x33621e=>_0x33621e[_0xf005c7(0x12f)]===_0x23136f[_0xf005c7(0x11f)])['map'](_0x31eec7=>_0x31eec7[_0xf005c7(0x103)]))!=null?_0x5d4643:[],_0x32e1d2=JSON[_0xf005c7(0x12e)](_0x133440),_0x39a538=(await this[_0xf005c7(0x114)]['requireSession'](_0x583a73))[_0xf005c7(0x10a)]();if(_0x2ff9b0){const _0x162d6b={'memberId':_0x39a538,'unitId':_0x583a73,'content':_0x32e1d2,'mention':_0x56d357,'threadId':_0x4bd495},_0x31259e=(await this[_0xf005c7(0x113)][_0xf005c7(0x13d)]('/universer-api/comment/unit/'+_0x583a73+_0xf005c7(0x139),{'body':_0x162d6b}))[_0xf005c7(0xf9)][_0xf005c7(0xfe)];return{..._0x582f8f,'id':_0x31259e[_0xf005c7(0x15b)],'dT':_0x2f01c3(+_0x31259e['createTimestamp'])[_0xf005c7(0x153)](_0xf005c7(0x116)),'personId':_0x31259e[_0xf005c7(0xf4)]};}else{const _0x5cc230={'memberId':_0x39a538,'unitId':_0x583a73,'content':_0x32e1d2,'mention':_0x56d357},_0x562efd=await this[_0xf005c7(0x113)]['post'](_0xf005c7(0x151)+_0x583a73+'/add',{'body':_0x5cc230});return X(_0x562efd[_0xf005c7(0xf9)][_0xf005c7(0x11d)],_0x582f8f);}}async[_0x5710f0(0x147)](_0x49697c){const _0x45e821=_0x5710f0;var _0x191ece,_0x2a2c9e;const {text:_0x2a46f0,unitId:_0x4fbc5d}=_0x49697c,_0x3dd7a1=(_0x2a2c9e=(_0x191ece=_0x2a46f0['customRanges'])==null?void 0x0:_0x191ece[_0x45e821(0x100)](_0xffb3fe=>_0xffb3fe[_0x45e821(0x12f)]===_0x23136f[_0x45e821(0x11f)])[_0x45e821(0x14e)](_0x2b9ad8=>_0x2b9ad8[_0x45e821(0x103)]))!=null?_0x2a2c9e:[],_0x1e7a44=JSON[_0x45e821(0x12e)](_0x2a46f0),_0x15ecc8=_0x49697c['threadId'],_0x51769d=_0x49697c['id'],_0x56f537={'memberId':(await this[_0x45e821(0x114)]['requireSession'](_0x4fbc5d))[_0x45e821(0x10a)](),'unitId':_0x4fbc5d,'threadId':_0x15ecc8,'mention':_0x3dd7a1,'content':_0x1e7a44,'replyId':_0x51769d},_0x2af42e=await this['_httpService']['post'](_0x45e821(0x151)+_0x4fbc5d+_0x45e821(0xfc),{'body':_0x56f537});return!_0x2af42e[_0x45e821(0xf9)][_0x45e821(0x12a)]||_0x2af42e['body']['error'][_0x45e821(0xf1)]===0x1;}async[_0x5710f0(0x10e)](_0x5f02b2){const _0x20907b=_0x5710f0,{unitId:_0x3b87a9}=_0x5f02b2,_0x3b6101=_0x5f02b2['threadId'],_0x4e22ec={'memberId':this[_0x20907b(0x15e)][_0x20907b(0x109)]()[_0x20907b(0x106)],'unitId':_0x3b87a9,'threadId':_0x3b6101,'solved':_0x5f02b2[_0x20907b(0x107)]?I['Solved']:I[_0x20907b(0xfd)]},_0x49eb72=await this[_0x20907b(0x113)][_0x20907b(0x13d)](_0x20907b(0x151)+_0x3b87a9+'/solved',{'body':_0x4e22ec});return!_0x49eb72['body']['error']||_0x49eb72['body'][_0x20907b(0x12a)][_0x20907b(0xf1)]===0x1;}async[_0x5710f0(0x141)](_0x517c5f,_0x5d5760,_0x576f90,_0x31cd70){const _0x2ea1a2=_0x5710f0,_0x35de41={'memberId':(await this[_0x2ea1a2(0x114)][_0x2ea1a2(0x119)](_0x517c5f))[_0x2ea1a2(0x10a)](),'threadId':_0x576f90,'replyId':_0x31cd70,'unitId':_0x517c5f},_0x2cf5ee=await this[_0x2ea1a2(0x113)]['post']('/universer-api/comment/unit/'+_0x517c5f+'/delete',{'body':_0x35de41});return!_0x2cf5ee[_0x2ea1a2(0xf9)][_0x2ea1a2(0x12a)]||_0x2cf5ee[_0x2ea1a2(0xf9)]['error'][_0x2ea1a2(0xf1)]===0x1;}async[_0x5710f0(0x10c)](_0x1d143b,_0x47d831,_0x5cf4e5){const _0x40924e=_0x5710f0,_0x244fc5={'unitId':_0x1d143b,'threadId':_0x5cf4e5},_0x380c16=await this[_0x40924e(0x113)][_0x40924e(0x13d)](_0x40924e(0x151)+_0x1d143b+_0x40924e(0x13b),{'body':_0x244fc5}),_0x4f4538=_0x5cf4e5[_0x40924e(0x14e)](_0x51a1c7=>ee(_0x380c16[_0x40924e(0xf9)][_0x40924e(0x159)][_0x51a1c7],_0x1d143b,_0x47d831))[_0x40924e(0x100)](Boolean);return Object[_0x40924e(0x11b)](_0x380c16[_0x40924e(0xf9)][_0x40924e(0x111)])['forEach'](_0x31eac1=>{const _0x2b03b7=_0x40924e;this[_0x2b03b7(0x15e)][_0x2b03b7(0x108)](_0x31eac1);}),_0x4f4538;}[_0x5710f0(0x145)](_0x37bc86){const _0x9353e8=_0x5710f0;return{'id':_0x37bc86['id'],'threadId':_0x37bc86[_0x9353e8(0x133)],'ref':_0x37bc86[_0x9353e8(0x136)]};}};S=Q([b(0x0,_0x2c279d(_0x39aee6)),b(0x1,_0x2c279d(_0x52fde5)),b(0x2,_0x2c279d(_0x3d2bd0))],S);var re=Object[_0x5710f0(0xf6)],te=(_0x376e78,_0x41a05e,_0x4c22bb,_0x5ae43a)=>{const _0x5a82c2=_0x5710f0;for(var _0x244d6e=_0x5ae43a>0x1?void 0x0:_0x5ae43a?re(_0x41a05e,_0x4c22bb):_0x41a05e,_0xabfad=_0x376e78[_0x5a82c2(0xfa)]-0x1,_0x3bea6f;_0xabfad>=0x0;_0xabfad--)(_0x3bea6f=_0x376e78[_0xabfad])&&(_0x244d6e=_0x3bea6f(_0x244d6e)||_0x244d6e);return _0x244d6e;},M=(_0x39a714,_0x2548fb)=>(_0x1e1d82,_0x583c86)=>_0x2548fb(_0x1e1d82,_0x583c86,_0x39a714);let f=class extends _0x314433{constructor(_0x2682a0,_0x160c69){const _0x34da56=_0x5710f0;super(),this['_threadCommentDataSourceService']=_0x2682a0,this[_0x34da56(0x135)]=_0x160c69,this[_0x34da56(0x120)]();}[_0x5710f0(0x120)](){const _0x45107b=_0x5710f0;this['_threadCommentDataSourceService'][_0x45107b(0x137)]=this[_0x45107b(0x135)],this[_0x45107b(0x13a)][_0x45107b(0x14a)]=!0x1;}};f=te([M(0x0,_0x42ea6b),M(0x1,_0x2c279d(S))],f);var se=Object[_0x5710f0(0x101)],oe=Object[_0x5710f0(0xf6)],ne=(_0x1b7274,_0x3eaad2,_0x3ebc8d)=>_0x3eaad2 in _0x1b7274?se(_0x1b7274,_0x3eaad2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3ebc8d}):_0x1b7274[_0x3eaad2]=_0x3ebc8d,ie=(_0x2b4808,_0x2b6001,_0x473be0,_0x495aad)=>{for(var _0x152503=_0x495aad>0x1?void 0x0:_0x495aad?oe(_0x2b6001,_0x473be0):_0x2b6001,_0x1bf900=_0x2b4808['length']-0x1,_0x18c29b;_0x1bf900>=0x0;_0x1bf900--)(_0x18c29b=_0x2b4808[_0x1bf900])&&(_0x152503=_0x18c29b(_0x152503)||_0x152503);return _0x152503;},N=(_0x40daa1,_0x1ad28c)=>(_0x51d8c8,_0x5ca195)=>_0x1ad28c(_0x51d8c8,_0x5ca195,_0x40daa1),$=(_0x33d37e,_0x269221,_0x4d5375)=>ne(_0x33d37e,typeof _0x269221!=_0x5710f0(0x15c)?_0x269221+'':_0x269221,_0x4d5375);let g=class extends _0x20e7f7{constructor(_0x1c1542=O,_0x3f3c3b,_0x3f2609){const _0x4197ed=_0x5710f0;super(),this['_config']=_0x1c1542,this[_0x4197ed(0x142)]=_0x3f3c3b,this[_0x4197ed(0x134)]=_0x3f2609;const {..._0x34e392}=_0x5677ba({},O,this[_0x4197ed(0x14d)]);this[_0x4197ed(0x134)]['setConfig'](z,_0x34e392);}[_0x5710f0(0x156)](){[[S],[f],[_]]['forEach'](_0x104081=>{const _0x4da23c=_0x46a6;this['_injector'][_0x4da23c(0x125)](_0x104081);});}[_0x5710f0(0x157)](){const _0x482291=_0x5710f0;this['_injector'][_0x482291(0x14f)](f),this['_injector']['get'](_);}};$(g,_0x5710f0(0x123),W),$(g,_0x5710f0(0x12b),_0x3a1d37['UNIVER_UNKNOWN']),g=ie([_0x18845d(_0x5331da,_0x4b79ae,_0xe029df),N(0x1,_0x2c279d(_0x128802)),N(0x2,_0x4e2c49)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x2c6192=_0x20aa;(function(_0x4ba2b4,_0x231167){const _0x493961=_0x20aa,_0x3fa76b=_0x4ba2b4();while(!![]){try{const _0x57146a=parseInt(_0x493961(0x138))/0x1+parseInt(_0x493961(0x100))/0x2*(parseInt(_0x493961(0x12e))/0x3)+parseInt(_0x493961(0x145))/0x4*(parseInt(_0x493961(0xe7))/0x5)+parseInt(_0x493961(0xfe))/0x6*(parseInt(_0x493961(0x139))/0x7)+-parseInt(_0x493961(0xf3))/0x8*(parseInt(_0x493961(0xfa))/0x9)+-parseInt(_0x493961(0x130))/0xa*(-parseInt(_0x493961(0xf1))/0xb)+parseInt(_0x493961(0x12c))/0xc*(-parseInt(_0x493961(0x124))/0xd);if(_0x57146a===_0x231167)break;else _0x3fa76b['push'](_0x3fa76b['shift']());}catch(_0x1010a3){_0x3fa76b['push'](_0x3fa76b['shift']());}}}(_0x4376,0xbfd71));import{CommentService as _0x41b3b3,CollaborationSessionService as _0x383878,UniverCollaborationClientPlugin as _0x381338}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x57d8a2}from'@univerjs-pro/license';import{dayjs as _0x467eaf,UserManagerService as _0x4a7b0a,Inject as _0x456bc0,Injector as _0x3ea938,Disposable as _0x1d3d60,CustomRangeType as _0x4ea2eb,UniverInstanceType as _0x59ce6a,DependentOn as _0x382d7b,IConfigService as _0x1b12f1,Plugin as _0xe039a3,merge as _0x5c49b5}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5af108}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x8816bb,IThreadCommentDataSourceService as _0x2e8119}from'@univerjs/thread-comment';import{bufferTime as _0x325882}from'rxjs';import{HTTPService as _0x75c698}from'@univerjs/network';const W=_0x2c6192(0xfc);var I=(_0x5e53c0=>(_0x5e53c0[_0x5e53c0[_0x2c6192(0x125)]=0x0]=_0x2c6192(0x125),_0x5e53c0[_0x5e53c0[_0x2c6192(0xf2)]=0x1]=_0x2c6192(0xf2),_0x5e53c0[_0x5e53c0[_0x2c6192(0x133)]=-0x1]=_0x2c6192(0x133),_0x5e53c0))(I||{}),v=(_0x233151=>(_0x233151[_0x233151['Unknown']=0x0]=_0x2c6192(0xea),_0x233151[_0x233151[_0x2c6192(0x126)]=0x1]=_0x2c6192(0x126),_0x233151[_0x233151['Reply']=0x2]=_0x2c6192(0x12d),_0x233151[_0x233151[_0x2c6192(0x143)]=0x3]=_0x2c6192(0x143),_0x233151[_0x233151[_0x2c6192(0x11f)]=0x4]=_0x2c6192(0x11f),_0x233151[_0x233151[_0x2c6192(0x114)]=0x5]=_0x2c6192(0x114),_0x233151[_0x233151[_0x2c6192(0x133)]=-0x1]=_0x2c6192(0x133),_0x233151))(v||{});const y=_0x439d06=>_0x467eaf(new Date(+_0x439d06))[_0x2c6192(0x10b)](_0x2c6192(0x147)),B=async(_0x2a42b0,_0x3799a7)=>{const _0x26959d=_0x2c6192,_0x1184b6=_0x2a42b0['get'](_0x4a7b0a),_0x29dc02=_0x2a42b0['get'](_0x75c698);_0x3799a7[_0x26959d(0x136)](_0xe88892=>{const _0x4cd617=_0x26959d;_0x1184b6[_0x4cd617(0x105)](_0xe88892)&&_0x3799a7[_0x4cd617(0xee)](_0xe88892);}),_0x3799a7['size']&&(await _0x29dc02[_0x26959d(0x10f)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3799a7]}}))[_0x26959d(0xe6)][_0x26959d(0x146)][_0x26959d(0x136)](_0x425d25=>{const _0x1dc57d=_0x26959d;_0x425d25&&_0x1184b6[_0x1dc57d(0x132)](_0x425d25);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x5dde4b,_0x4f576c,_0x997ff3,_0x6d4fd)=>{const _0x437ff9=_0x2c6192;for(var _0x22352c=_0x6d4fd>0x1?void 0x0:_0x6d4fd?K(_0x4f576c,_0x997ff3):_0x4f576c,_0x274a15=_0x5dde4b[_0x437ff9(0xf4)]-0x1,_0x30b816;_0x274a15>=0x0;_0x274a15--)(_0x30b816=_0x5dde4b[_0x274a15])&&(_0x22352c=_0x30b816(_0x22352c)||_0x22352c);return _0x22352c;},p=(_0x6ddc67,_0x50d158)=>(_0x480fa5,_0x10a9b6)=>_0x50d158(_0x480fa5,_0x10a9b6,_0x6ddc67);function _0x20aa(_0x5e8bda,_0x281d53){const _0x43768d=_0x4376();return _0x20aa=function(_0x20aaee,_0x2d9bd3){_0x20aaee=_0x20aaee-0xe6;let _0x3abc9f=_0x43768d[_0x20aaee];return _0x3abc9f;},_0x20aa(_0x5e8bda,_0x281d53);}let _=class extends _0x1d3d60{constructor(_0x1f5b0b,_0x2519bc,_0x5f6c25,_0x5a7ea7){const _0x259f15=_0x2c6192;super(),this[_0x259f15(0x113)]=_0x1f5b0b,this[_0x259f15(0x120)]=_0x2519bc,this['_userService']=_0x5f6c25,this[_0x259f15(0x14a)]=_0x5a7ea7,this[_0x259f15(0x134)](),this[_0x259f15(0x12f)]();}[_0x2c6192(0x12f)](){const _0x789e91=_0x2c6192;this['disposeWithMe'](this[_0x789e91(0x120)][_0x789e91(0x111)][_0x789e91(0x110)](_0x325882(0x10))[_0x789e91(0x122)](_0x308897=>{const _0x478a98=_0x789e91,_0xd88602=new Set();_0x308897[_0x478a98(0x136)](_0x398e79=>{const _0x4b127e=_0x478a98;switch(_0x398e79[_0x4b127e(0xff)]){case'add':{const _0x55bbaa=_0x398e79['payload'][_0x4b127e(0x10d)];_0xd88602[_0x4b127e(0x11d)](_0x55bbaa);break;}}}),B(this[_0x478a98(0x14a)],_0xd88602);}));}['_init'](){const _0x291468=_0x2c6192;this['disposeWithMe'](this['_commentService'][_0x291468(0x111)][_0x291468(0x122)](async _0x4220ac=>{const _0x3d40ab=_0x291468;var _0x434088,_0x5573ef,_0x430ec1,_0x4cb245;const _0x4d8cbc=(_0x434088=this[_0x3d40ab(0x120)][_0x3d40ab(0x129)](_0x4220ac[_0x3d40ab(0x10a)])[_0x3d40ab(0xe8)](_0x262d37=>_0x262d37[_0x3d40ab(0xf5)]===_0x4220ac[_0x3d40ab(0xf5)]))==null?void 0x0:_0x434088[_0x3d40ab(0x13e)];if(!_0x4d8cbc)return;const {unitId:_0x3343c7,subUnitId:_0xc3c71c}=_0x4d8cbc;switch(_0x4220ac[_0x3d40ab(0x131)]&&this[_0x3d40ab(0x10c)][_0x3d40ab(0x132)](_0x4220ac[_0x3d40ab(0x131)]),_0x4220ac[_0x3d40ab(0xff)]){case v['Add']:break;case v['Reply']:{this[_0x3d40ab(0x120)][_0x3d40ab(0xed)](_0x3343c7,_0xc3c71c,{'unitId':_0x3343c7,'subUnitId':_0xc3c71c,'ref':'','id':_0x4220ac[_0x3d40ab(0x116)],'dT':y(+_0x4220ac[_0x3d40ab(0x106)]),'threadId':_0x4220ac['threadId'],'personId':(_0x430ec1=(_0x5573ef=_0x4220ac[_0x3d40ab(0x131)])==null?void 0x0:_0x5573ef[_0x3d40ab(0x104)])!=null?_0x430ec1:_0x4220ac[_0x3d40ab(0x119)],'text':JSON[_0x3d40ab(0x10e)](_0x4220ac[_0x3d40ab(0x144)]),'parentId':_0x4d8cbc['id']});break;}case v[_0x3d40ab(0x11f)]:{const _0x443f15=this['_threadCommentModel'][_0x3d40ab(0x103)](_0x3343c7,_0xc3c71c,_0x4220ac[_0x3d40ab(0x116)]);_0x443f15&&_0x443f15[_0x3d40ab(0x117)]&&this['_threadCommentModel'][_0x3d40ab(0x11a)](_0x3343c7,_0xc3c71c,_0x4220ac['replyId']);break;}case v[_0x3d40ab(0x143)]:{this[_0x3d40ab(0x120)][_0x3d40ab(0xec)](_0x3343c7,_0xc3c71c,{'commentId':_0x4220ac[_0x3d40ab(0x116)],'text':JSON[_0x3d40ab(0x10e)](_0x4220ac[_0x3d40ab(0x144)])});break;}case v[_0x3d40ab(0x114)]:{const _0x4e1a98=(_0x4cb245=this['_threadCommentModel'][_0x3d40ab(0x129)](_0x4220ac[_0x3d40ab(0x10a)])[_0x3d40ab(0xe8)](_0x456ba5=>_0x456ba5[_0x3d40ab(0xf5)]===_0x4220ac[_0x3d40ab(0xf5)]))==null?void 0x0:_0x4cb245[_0x3d40ab(0x13e)];_0x4e1a98&&this['_threadCommentModel']['resolveComment'](_0x3343c7,_0xc3c71c,_0x4e1a98['id'],_0x4220ac[_0x3d40ab(0xfd)]===I[_0x3d40ab(0xf2)]);break;}}}));}};_=V([p(0x0,_0x456bc0(_0x41b3b3)),p(0x1,_0x456bc0(_0x8816bb)),p(0x2,_0x456bc0(_0x4a7b0a)),p(0x3,_0x456bc0(_0x3ea938))],_);const z=_0x2c6192(0x112),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1d9e33,_0x42949c,_0xcaf546,_0x12acea)=>{const _0x1969f7=_0x2c6192;for(var _0x1b13b5=_0x12acea>0x1?void 0x0:_0x12acea?k(_0x42949c,_0xcaf546):_0x42949c,_0x3fc7ca=_0x1d9e33[_0x1969f7(0xf4)]-0x1,_0x5d3752;_0x3fc7ca>=0x0;_0x3fc7ca--)(_0x5d3752=_0x1d9e33[_0x3fc7ca])&&(_0x1b13b5=_0x5d3752(_0x1b13b5)||_0x1b13b5);return _0x1b13b5;},b=(_0x24c94a,_0x1e6b2f)=>(_0x5186e8,_0x55185d)=>_0x1e6b2f(_0x5186e8,_0x55185d,_0x24c94a);function X(_0x34b79b,_0x38d265){const _0x6b32f7=_0x2c6192,_0x548fa8=_0x34b79b[_0x6b32f7(0x127)][0x0];return{..._0x38d265,'id':_0x548fa8[_0x6b32f7(0x116)],'resolved':_0x34b79b[_0x6b32f7(0xfd)]===0x1,'dT':y(_0x548fa8[_0x6b32f7(0x106)]),'personId':_0x548fa8[_0x6b32f7(0x119)],'threadId':_0x548fa8[_0x6b32f7(0xf5)]};}function ee(_0x4ac389,_0x29471f,_0x1f6156){const _0x2068d9=_0x2c6192;var _0x56c8d7,_0x3248f6;if(((_0x3248f6=(_0x56c8d7=_0x4ac389==null?void 0x0:_0x4ac389[_0x2068d9(0x127)])==null?void 0x0:_0x56c8d7[_0x2068d9(0xf4)])!=null?_0x3248f6:0x0)>0x0){const _0x5066d6=(_0xf096fc,_0x203f09)=>({'id':_0xf096fc[_0x2068d9(0x116)],'threadId':_0xf096fc[_0x2068d9(0xf5)],'dT':y(_0xf096fc[_0x2068d9(0x106)]),'personId':_0xf096fc[_0x2068d9(0x119)],'resolved':_0x4ac389[_0x2068d9(0xfd)]===I[_0x2068d9(0xf2)],'unitId':_0x29471f,'subUnitId':_0x1f6156,'text':JSON[_0x2068d9(0x10e)](_0xf096fc[_0x2068d9(0x144)]),'parentId':_0x203f09}),_0x4d5b0c=_0x5066d6(_0x4ac389[_0x2068d9(0x127)][0x0]);return{..._0x4d5b0c,'children':_0x4ac389[_0x2068d9(0x127)][_0x2068d9(0x11c)](0x1)['map'](_0x2102d5=>_0x5066d6(_0x2102d5,_0x4d5b0c['id']))};}return null;}let S=class{constructor(_0x94668e,_0x6e30b,_0x5507b7){const _0x3310d4=_0x2c6192;this[_0x3310d4(0xeb)]=_0x94668e,this[_0x3310d4(0x10c)]=_0x6e30b,this['_sessionService']=_0x5507b7;}async[_0x2c6192(0xed)](_0x2d871c){const _0x1efe27=_0x2c6192;var _0x26e8e3,_0x18578c;const {parentId:_0x439026,unitId:_0x4de833,text:_0x10487e,threadId:_0x3141fe}=_0x2d871c,_0x599310=(_0x18578c=(_0x26e8e3=_0x10487e[_0x1efe27(0x11b)])==null?void 0x0:_0x26e8e3[_0x1efe27(0x13f)](_0x5af6b0=>_0x5af6b0[_0x1efe27(0x14c)]===_0x4ea2eb[_0x1efe27(0x107)])[_0x1efe27(0x101)](_0x4e95a3=>_0x4e95a3[_0x1efe27(0xe9)]))!=null?_0x18578c:[],_0x5ade3f=JSON[_0x1efe27(0x140)](_0x10487e),_0x225012=(await this[_0x1efe27(0xfb)][_0x1efe27(0x149)](_0x4de833))[_0x1efe27(0x121)]();if(_0x439026){const _0x50f06b={'memberId':_0x225012,'unitId':_0x4de833,'content':_0x5ade3f,'mention':_0x599310,'threadId':_0x3141fe},_0x2b99ea=(await this[_0x1efe27(0xeb)][_0x1efe27(0xf9)](_0x1efe27(0x148)+_0x4de833+_0x1efe27(0x108),{'body':_0x50f06b}))[_0x1efe27(0xe6)]['reply'];return{..._0x2d871c,'id':_0x2b99ea[_0x1efe27(0x116)],'dT':_0x467eaf(+_0x2b99ea['createTimestamp'])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x2b99ea['userId']};}else{const _0x17997c={'memberId':_0x225012,'unitId':_0x4de833,'content':_0x5ade3f,'mention':_0x599310},_0x52166a=await this[_0x1efe27(0xeb)][_0x1efe27(0xf9)](_0x1efe27(0x148)+_0x4de833+_0x1efe27(0xf7),{'body':_0x17997c});return X(_0x52166a['body'][_0x1efe27(0xef)],_0x2d871c);}}async['updateComment'](_0x170f0e){const _0x52f2ab=_0x2c6192;var _0x14dabc,_0x20c4ea;const {text:_0x32163e,unitId:_0x676789}=_0x170f0e,_0x238a20=(_0x20c4ea=(_0x14dabc=_0x32163e['customRanges'])==null?void 0x0:_0x14dabc[_0x52f2ab(0x13f)](_0xad761=>_0xad761[_0x52f2ab(0x14c)]===_0x4ea2eb[_0x52f2ab(0x107)])['map'](_0x3c9667=>_0x3c9667[_0x52f2ab(0xe9)]))!=null?_0x20c4ea:[],_0x15b254=JSON[_0x52f2ab(0x140)](_0x32163e),_0x5aa8ba=_0x170f0e[_0x52f2ab(0xf5)],_0x1af6e5=_0x170f0e['id'],_0x591e13={'memberId':(await this['_sessionService'][_0x52f2ab(0x149)](_0x676789))[_0x52f2ab(0x121)](),'unitId':_0x676789,'threadId':_0x5aa8ba,'mention':_0x238a20,'content':_0x15b254,'replyId':_0x1af6e5},_0x4728e4=await this[_0x52f2ab(0xeb)][_0x52f2ab(0xf9)]('/universer-api/comment/unit/'+_0x676789+_0x52f2ab(0x115),{'body':_0x591e13});return!_0x4728e4[_0x52f2ab(0xe6)][_0x52f2ab(0x118)]||_0x4728e4[_0x52f2ab(0xe6)][_0x52f2ab(0x118)][_0x52f2ab(0x109)]===0x1;}async[_0x2c6192(0x11e)](_0x3c87a1){const _0x17fbb8=_0x2c6192,{unitId:_0x29b19c}=_0x3c87a1,_0x46c644=_0x3c87a1[_0x17fbb8(0xf5)],_0x18a29f={'memberId':this[_0x17fbb8(0x10c)][_0x17fbb8(0xf6)]()[_0x17fbb8(0x104)],'unitId':_0x29b19c,'threadId':_0x46c644,'solved':_0x3c87a1[_0x17fbb8(0xf8)]?I['Solved']:I[_0x17fbb8(0x125)]},_0x242433=await this['_httpService'][_0x17fbb8(0xf9)]('/universer-api/comment/unit/'+_0x29b19c+_0x17fbb8(0x135),{'body':_0x18a29f});return!_0x242433[_0x17fbb8(0xe6)][_0x17fbb8(0x118)]||_0x242433[_0x17fbb8(0xe6)][_0x17fbb8(0x118)]['code']===0x1;}async['deleteComment'](_0x38c03e,_0x2302c5,_0x2ed212,_0x55e9b1){const _0x3f9769=_0x2c6192,_0x4c1017={'memberId':(await this[_0x3f9769(0xfb)][_0x3f9769(0x149)](_0x38c03e))['getMemberID'](),'threadId':_0x2ed212,'replyId':_0x55e9b1,'unitId':_0x38c03e},_0x22bfcd=await this[_0x3f9769(0xeb)][_0x3f9769(0xf9)](_0x3f9769(0x148)+_0x38c03e+_0x3f9769(0x137),{'body':_0x4c1017});return!_0x22bfcd['body'][_0x3f9769(0x118)]||_0x22bfcd[_0x3f9769(0xe6)][_0x3f9769(0x118)][_0x3f9769(0x109)]===0x1;}async['listComments'](_0x3a9339,_0x2f40e1,_0xbd02c1){const _0x269639=_0x2c6192,_0x4c06e4={'unitId':_0x3a9339,'threadId':_0xbd02c1},_0x2232b3=await this[_0x269639(0xeb)]['post']('/universer-api/comment/unit/'+_0x3a9339+_0x269639(0x12a),{'body':_0x4c06e4}),_0x72e265=_0xbd02c1[_0x269639(0x101)](_0x5e9da1=>ee(_0x2232b3[_0x269639(0xe6)]['comments'][_0x5e9da1],_0x3a9339,_0x2f40e1))[_0x269639(0x13f)](Boolean);return Object['values'](_0x2232b3[_0x269639(0xe6)]['users'])['forEach'](_0x374944=>{const _0x5adf7b=_0x269639;this[_0x5adf7b(0x10c)][_0x5adf7b(0x132)](_0x374944);}),_0x72e265;}[_0x2c6192(0x13c)](_0x36259c){return{'id':_0x36259c['id'],'threadId':_0x36259c['threadId'],'ref':_0x36259c['ref']};}};S=Q([b(0x0,_0x456bc0(_0x75c698)),b(0x1,_0x456bc0(_0x4a7b0a)),b(0x2,_0x456bc0(_0x383878))],S);var re=Object[_0x2c6192(0x14b)],te=(_0x13ab35,_0x295903,_0x42a7f5,_0x2c3d6e)=>{for(var _0x5bcc98=_0x2c3d6e>0x1?void 0x0:_0x2c3d6e?re(_0x295903,_0x42a7f5):_0x295903,_0x1e39d5=_0x13ab35['length']-0x1,_0x510ba0;_0x1e39d5>=0x0;_0x1e39d5--)(_0x510ba0=_0x13ab35[_0x1e39d5])&&(_0x5bcc98=_0x510ba0(_0x5bcc98)||_0x5bcc98);return _0x5bcc98;},M=(_0x21d752,_0x40e211)=>(_0x196a8d,_0x5f0eb7)=>_0x40e211(_0x196a8d,_0x5f0eb7,_0x21d752);let f=class extends _0x1d3d60{constructor(_0x45342f,_0xfa11ec){const _0x3a7fc4=_0x2c6192;super(),this[_0x3a7fc4(0x12b)]=_0x45342f,this[_0x3a7fc4(0x14d)]=_0xfa11ec,this['_initDataSource']();}[_0x2c6192(0x142)](){const _0x22589e=_0x2c6192;this[_0x22589e(0x12b)][_0x22589e(0xf0)]=this[_0x22589e(0x14d)],this[_0x22589e(0x12b)][_0x22589e(0x141)]=!0x1;}};f=te([M(0x0,_0x2e8119),M(0x1,_0x456bc0(S))],f);var se=Object['defineProperty'],oe=Object[_0x2c6192(0x14b)],ne=(_0xb20337,_0x7d5553,_0x21ee0e)=>_0x7d5553 in _0xb20337?se(_0xb20337,_0x7d5553,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x21ee0e}):_0xb20337[_0x7d5553]=_0x21ee0e,ie=(_0x226092,_0xf4bef2,_0x64a980,_0x2ae7d5)=>{const _0x153b5b=_0x2c6192;for(var _0x42a8c2=_0x2ae7d5>0x1?void 0x0:_0x2ae7d5?oe(_0xf4bef2,_0x64a980):_0xf4bef2,_0x4f368e=_0x226092[_0x153b5b(0xf4)]-0x1,_0x345cb1;_0x4f368e>=0x0;_0x4f368e--)(_0x345cb1=_0x226092[_0x4f368e])&&(_0x42a8c2=_0x345cb1(_0x42a8c2)||_0x42a8c2);return _0x42a8c2;},N=(_0x2721ba,_0x152e1c)=>(_0x40bd89,_0x252b4c)=>_0x152e1c(_0x40bd89,_0x252b4c,_0x2721ba),$=(_0x4a041d,_0x52a9c0,_0x4e19ae)=>ne(_0x4a041d,typeof _0x52a9c0!=_0x2c6192(0x128)?_0x52a9c0+'':_0x52a9c0,_0x4e19ae);let g=class extends _0xe039a3{constructor(_0x4e2929=O,_0x51dd18,_0x245b5c){const _0x594f3c=_0x2c6192;super(),this[_0x594f3c(0x102)]=_0x4e2929,this[_0x594f3c(0x14a)]=_0x51dd18,this[_0x594f3c(0x13a)]=_0x245b5c;const {..._0x195f0a}=_0x5c49b5({},O,this[_0x594f3c(0x102)]);this[_0x594f3c(0x13a)][_0x594f3c(0x13b)](z,_0x195f0a);}['onStarting'](){const _0x44b3af=_0x2c6192;[[S],[f],[_]][_0x44b3af(0x136)](_0x5abfde=>{const _0x47fc87=_0x44b3af;this[_0x47fc87(0x14a)][_0x47fc87(0x11d)](_0x5abfde);});}[_0x2c6192(0x123)](){const _0x2cd597=_0x2c6192;this[_0x2cd597(0x14a)][_0x2cd597(0x10f)](f),this[_0x2cd597(0x14a)]['get'](_);}};$(g,'pluginName',W),$(g,_0x2c6192(0xff),_0x59ce6a[_0x2c6192(0x13d)]),g=ie([_0x382d7b(_0x5af108,_0x381338,_0x57d8a2),N(0x1,_0x456bc0(_0x3ea938)),N(0x2,_0x1b12f1)],g);export{g as UniverThreadCommentDataSourcePlugin};function _0x4376(){const _0x50f6a0=['users','YYYY/MM/DD\x20HH:mm','/universer-api/comment/unit/','requireSession','_injector','getOwnPropertyDescriptor','rangeType','_threadCommentDataSource','body','1140OKkdcQ','find','rangeId','Unknown','_httpService','updateComment','addComment','delete','comment','dataSource','4066843mQEscJ','Solved','592kCMtHe','length','threadId','getCurrentUser','/add','resolved','post','109692YksFTw','_sessionService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','750270BbsWMn','type','38432qrgzeD','map','_config','getComment','userID','getUser','createTimestamp','COMMENT','/reply','code','unitId','format','_userService','personId','parse','get','pipe','commentUpdate$','thread-comment-data-source.config','_commentService','Solve','/edit','replyId','parentId','error','userId','deleteComment','customRanges','slice','add','resolveComment','Delete','_threadCommentModel','getMemberID','subscribe','onReady','28085434aqIrCM','OpenOrReOpen','Add','replies','symbol','getUnit','/list','_threadCommentDataSourceService','12ykPgzg','Reply','228cYeZlx','_initUserSync','30gnSfPQ','user','addUser','UNRECOGNIZED','_init','/solved','forEach','/delete','26936UaCPPA','56klzanT','_configService','setConfig','saveCommentToSnapshot','UNIVER_UNKNOWN','root','filter','stringify','syncUpdateMutationToColla','_initDataSource','Edit','content','4408dyaCMk'];_0x4376=function(){return _0x50f6a0;};return _0x4376();}
1
+ const _0x5710f0=_0x46a6;(function(_0x24d318,_0x3d86a4){const _0x4fee20=_0x46a6,_0x5a94ed=_0x24d318();while(!![]){try{const _0x4bd371=parseInt(_0x4fee20(0x13e))/0x1*(-parseInt(_0x4fee20(0x15a))/0x2)+parseInt(_0x4fee20(0x128))/0x3*(-parseInt(_0x4fee20(0xfb))/0x4)+-parseInt(_0x4fee20(0x115))/0x5*(parseInt(_0x4fee20(0x112))/0x6)+-parseInt(_0x4fee20(0x12d))/0x7*(-parseInt(_0x4fee20(0x132))/0x8)+parseInt(_0x4fee20(0x10b))/0x9+-parseInt(_0x4fee20(0xff))/0xa*(parseInt(_0x4fee20(0x117))/0xb)+parseInt(_0x4fee20(0x152))/0xc;if(_0x4bd371===_0x3d86a4)break;else _0x5a94ed['push'](_0x5a94ed['shift']());}catch(_0x20abac){_0x5a94ed['push'](_0x5a94ed['shift']());}}}(_0x4cdf,0xa4d9c));import{CommentService as _0x3e3bb9,CollaborationSessionService as _0x3d2bd0,UniverCollaborationClientPlugin as _0x4b79ae}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xe029df}from'@univerjs-pro/license';import{dayjs as _0x2f01c3,UserManagerService as _0x52fde5,Inject as _0x2c279d,Injector as _0x128802,Disposable as _0x314433,CustomRangeType as _0x23136f,UniverInstanceType as _0x3a1d37,DependentOn as _0x18845d,IConfigService as _0x4e2c49,Plugin as _0x20e7f7,merge as _0x5677ba}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5331da}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3833b2,IThreadCommentDataSourceService as _0x42ea6b}from'@univerjs/thread-comment';import{bufferTime as _0x35226e}from'rxjs';import{HTTPService as _0x39aee6}from'@univerjs/network';const W=_0x5710f0(0x11e);var I=(_0x375bf6=>(_0x375bf6[_0x375bf6[_0x5710f0(0xfd)]=0x0]='OpenOrReOpen',_0x375bf6[_0x375bf6['Solved']=0x1]=_0x5710f0(0x10d),_0x375bf6[_0x375bf6['UNRECOGNIZED']=-0x1]=_0x5710f0(0x104),_0x375bf6))(I||{}),v=(_0x22341b=>(_0x22341b[_0x22341b[_0x5710f0(0x150)]=0x0]='Unknown',_0x22341b[_0x22341b[_0x5710f0(0x140)]=0x1]='Add',_0x22341b[_0x22341b['Reply']=0x2]=_0x5710f0(0x121),_0x22341b[_0x22341b[_0x5710f0(0x129)]=0x3]='Edit',_0x22341b[_0x22341b[_0x5710f0(0xf7)]=0x4]='Delete',_0x22341b[_0x22341b[_0x5710f0(0x102)]=0x5]=_0x5710f0(0x102),_0x22341b[_0x22341b[_0x5710f0(0x104)]=-0x1]=_0x5710f0(0x104),_0x22341b))(v||{});const y=_0x447518=>_0x2f01c3(new Date(+_0x447518))['format'](_0x5710f0(0x116)),B=async(_0x628de6,_0x1b1e27)=>{const _0x42e7ce=_0x5710f0,_0x2fc743=_0x628de6[_0x42e7ce(0x14f)](_0x52fde5),_0x3415a1=_0x628de6[_0x42e7ce(0x14f)](_0x39aee6);_0x1b1e27[_0x42e7ce(0x105)](_0x9ac313=>{const _0x1a7887=_0x42e7ce;_0x2fc743[_0x1a7887(0xf5)](_0x9ac313)&&_0x1b1e27[_0x1a7887(0x130)](_0x9ac313);}),_0x1b1e27[_0x42e7ce(0x14b)]&&(await _0x3415a1[_0x42e7ce(0x14f)](_0x42e7ce(0x12c),{'params':{'userIDs':[..._0x1b1e27]}}))[_0x42e7ce(0xf9)][_0x42e7ce(0x111)][_0x42e7ce(0x105)](_0x1162ff=>{const _0x487e7b=_0x42e7ce;_0x1162ff&&_0x2fc743[_0x487e7b(0x108)](_0x1162ff);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x1c7fdc,_0x38eff9,_0x5c6d7f,_0x5db005)=>{const _0x30b4d2=_0x5710f0;for(var _0x18edb8=_0x5db005>0x1?void 0x0:_0x5db005?K(_0x38eff9,_0x5c6d7f):_0x38eff9,_0x4fd357=_0x1c7fdc[_0x30b4d2(0xfa)]-0x1,_0x851ac3;_0x4fd357>=0x0;_0x4fd357--)(_0x851ac3=_0x1c7fdc[_0x4fd357])&&(_0x18edb8=_0x851ac3(_0x18edb8)||_0x18edb8);return _0x18edb8;},p=(_0x24bdc5,_0x50bfdf)=>(_0x4b3f3f,_0x4acf02)=>_0x50bfdf(_0x4b3f3f,_0x4acf02,_0x24bdc5);let _=class extends _0x314433{constructor(_0x5f1e67,_0x13361e,_0x2e9249,_0x4fb600){const _0x22e73a=_0x5710f0;super(),this[_0x22e73a(0x126)]=_0x5f1e67,this[_0x22e73a(0x149)]=_0x13361e,this[_0x22e73a(0x15e)]=_0x2e9249,this[_0x22e73a(0x142)]=_0x4fb600,this[_0x22e73a(0x144)](),this[_0x22e73a(0x148)]();}[_0x5710f0(0x148)](){const _0x1822c5=_0x5710f0;this[_0x1822c5(0x155)](this[_0x1822c5(0x149)][_0x1822c5(0x11c)][_0x1822c5(0x110)](_0x35226e(0x10))[_0x1822c5(0x158)](_0x16ada9=>{const _0x11296a=_0x1822c5,_0x17ec32=new Set();_0x16ada9[_0x11296a(0x105)](_0x209776=>{const _0x2ea530=_0x11296a;switch(_0x209776['type']){case _0x2ea530(0x125):{const _0x5e610e=_0x209776[_0x2ea530(0xf8)][_0x2ea530(0x124)];_0x17ec32[_0x2ea530(0x125)](_0x5e610e);break;}}}),B(this[_0x11296a(0x142)],_0x17ec32);}));}[_0x5710f0(0x144)](){const _0x35da05=_0x5710f0;this[_0x35da05(0x155)](this[_0x35da05(0x126)][_0x35da05(0x11c)][_0x35da05(0x158)](async _0x41d32d=>{const _0x25b455=_0x35da05;var _0x5af97f,_0xce78f7,_0x42bb72,_0x584dda;const _0x3a53ad=(_0x5af97f=this[_0x25b455(0x149)][_0x25b455(0x13f)](_0x41d32d[_0x25b455(0x15d)])[_0x25b455(0xf3)](_0x37ac43=>_0x37ac43[_0x25b455(0x133)]===_0x41d32d[_0x25b455(0x133)]))==null?void 0x0:_0x5af97f[_0x25b455(0x131)];if(!_0x3a53ad)return;const {unitId:_0x2aa469,subUnitId:_0x34b33b}=_0x3a53ad;switch(_0x41d32d[_0x25b455(0x13c)]&&this[_0x25b455(0x15e)][_0x25b455(0x108)](_0x41d32d[_0x25b455(0x13c)]),_0x41d32d[_0x25b455(0x12b)]){case v[_0x25b455(0x140)]:break;case v[_0x25b455(0x121)]:{this[_0x25b455(0x149)]['addComment'](_0x2aa469,_0x34b33b,{'unitId':_0x2aa469,'subUnitId':_0x34b33b,'ref':'','id':_0x41d32d[_0x25b455(0x15b)],'dT':y(+_0x41d32d[_0x25b455(0x11a)]),'threadId':_0x41d32d[_0x25b455(0x133)],'personId':(_0x42bb72=(_0xce78f7=_0x41d32d[_0x25b455(0x13c)])==null?void 0x0:_0xce78f7['userID'])!=null?_0x42bb72:_0x41d32d[_0x25b455(0xf4)],'text':JSON['parse'](_0x41d32d[_0x25b455(0x127)]),'parentId':_0x3a53ad['id']});break;}case v['Delete']:{const _0x757218=this[_0x25b455(0x149)][_0x25b455(0x118)](_0x2aa469,_0x34b33b,_0x41d32d['replyId']);_0x757218&&_0x757218[_0x25b455(0x146)]&&this[_0x25b455(0x149)][_0x25b455(0x141)](_0x2aa469,_0x34b33b,_0x41d32d[_0x25b455(0x15b)]);break;}case v[_0x25b455(0x129)]:{this['_threadCommentModel'][_0x25b455(0x147)](_0x2aa469,_0x34b33b,{'commentId':_0x41d32d[_0x25b455(0x15b)],'text':JSON[_0x25b455(0x10f)](_0x41d32d[_0x25b455(0x127)])});break;}case v[_0x25b455(0x102)]:{const _0x2c39e7=(_0x584dda=this[_0x25b455(0x149)][_0x25b455(0x13f)](_0x41d32d[_0x25b455(0x15d)])[_0x25b455(0xf3)](_0x93297b=>_0x93297b[_0x25b455(0x133)]===_0x41d32d[_0x25b455(0x133)]))==null?void 0x0:_0x584dda['root'];_0x2c39e7&&this['_threadCommentModel'][_0x25b455(0x10e)](_0x2aa469,_0x34b33b,_0x2c39e7['id'],_0x41d32d[_0x25b455(0x154)]===I[_0x25b455(0x10d)]);break;}}}));}};_=V([p(0x0,_0x2c279d(_0x3e3bb9)),p(0x1,_0x2c279d(_0x3833b2)),p(0x2,_0x2c279d(_0x52fde5)),p(0x3,_0x2c279d(_0x128802))],_);const z=_0x5710f0(0x14c),O={};var k=Object[_0x5710f0(0xf6)],Q=(_0x35206a,_0x1cc8aa,_0x48b5c6,_0x15eaf3)=>{const _0x1ae83d=_0x5710f0;for(var _0x23376e=_0x15eaf3>0x1?void 0x0:_0x15eaf3?k(_0x1cc8aa,_0x48b5c6):_0x1cc8aa,_0x526271=_0x35206a[_0x1ae83d(0xfa)]-0x1,_0x5a351f;_0x526271>=0x0;_0x526271--)(_0x5a351f=_0x35206a[_0x526271])&&(_0x23376e=_0x5a351f(_0x23376e)||_0x23376e);return _0x23376e;},b=(_0x28266b,_0x5bb050)=>(_0x606ce6,_0x598981)=>_0x5bb050(_0x606ce6,_0x598981,_0x28266b);function _0x4cdf(){const _0x2796a1=['_config','map','get','Unknown','/universer-api/comment/unit/','50191680pjcbtl','format','solved','disposeWithMe','onStarting','onReady','subscribe','comments','64726kJuAGO','replyId','symbol','unitId','_userService','code','customRanges','find','userId','getUser','getOwnPropertyDescriptor','Delete','payload','body','length','12NQgYPf','/edit','OpenOrReOpen','reply','29570iYNwrj','filter','defineProperty','Solve','rangeId','UNRECOGNIZED','forEach','userID','resolved','addUser','getCurrentUser','getMemberID','4127229RmpxuK','listComments','Solved','resolveComment','parse','pipe','users','930vnycBN','_httpService','_sessionService','28745ilvGNo','YYYY/MM/DD\x20HH:mm','4279mTyxPR','getComment','requireSession','createTimestamp','values','commentUpdate$','comment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','COMMENT','_initDataSource','Reply','replies','pluginName','personId','add','_commentService','content','1002279zIXDcC','Edit','error','type','/universer-api/user/list','3129BGRwAa','stringify','rangeType','delete','root','1448FBydir','threadId','_configService','_threadCommentDataSource','ref','dataSource','addComment','/reply','_threadCommentDataSourceService','/list','user','post','31aMvSys','getUnit','Add','deleteComment','_injector','slice','_init','saveCommentToSnapshot','parentId','updateComment','_initUserSync','_threadCommentModel','syncUpdateMutationToColla','size','thread-comment-data-source.config'];_0x4cdf=function(){return _0x2796a1;};return _0x4cdf();}function X(_0xf7d48a,_0x331336){const _0x1bcd4a=_0x5710f0,_0x4d74cd=_0xf7d48a[_0x1bcd4a(0x122)][0x0];return{..._0x331336,'id':_0x4d74cd[_0x1bcd4a(0x15b)],'resolved':_0xf7d48a['solved']===0x1,'dT':y(_0x4d74cd[_0x1bcd4a(0x11a)]),'personId':_0x4d74cd[_0x1bcd4a(0xf4)],'threadId':_0x4d74cd['threadId']};}function ee(_0x5d7260,_0x127170,_0x594cab){const _0xe82e8c=_0x5710f0;var _0x234b5e,_0x1d808b;if(((_0x1d808b=(_0x234b5e=_0x5d7260==null?void 0x0:_0x5d7260[_0xe82e8c(0x122)])==null?void 0x0:_0x234b5e['length'])!=null?_0x1d808b:0x0)>0x0){const _0x3ef892=(_0x12b057,_0x195b79)=>({'id':_0x12b057[_0xe82e8c(0x15b)],'threadId':_0x12b057[_0xe82e8c(0x133)],'dT':y(_0x12b057[_0xe82e8c(0x11a)]),'personId':_0x12b057[_0xe82e8c(0xf4)],'resolved':_0x5d7260['solved']===I[_0xe82e8c(0x10d)],'unitId':_0x127170,'subUnitId':_0x594cab,'text':JSON[_0xe82e8c(0x10f)](_0x12b057[_0xe82e8c(0x127)]),'parentId':_0x195b79}),_0x288755=_0x3ef892(_0x5d7260['replies'][0x0]);return{..._0x288755,'children':_0x5d7260[_0xe82e8c(0x122)][_0xe82e8c(0x143)](0x1)[_0xe82e8c(0x14e)](_0x2e28e3=>_0x3ef892(_0x2e28e3,_0x288755['id']))};}return null;}function _0x46a6(_0x51283c,_0x137219){const _0x4cdf9c=_0x4cdf();return _0x46a6=function(_0x46a6af,_0x73b7b8){_0x46a6af=_0x46a6af-0xf1;let _0x49095a=_0x4cdf9c[_0x46a6af];return _0x49095a;},_0x46a6(_0x51283c,_0x137219);}let S=class{constructor(_0xe7450a,_0x3a8458,_0x50eda){const _0x223708=_0x5710f0;this['_httpService']=_0xe7450a,this[_0x223708(0x15e)]=_0x3a8458,this['_sessionService']=_0x50eda;}async[_0x5710f0(0x138)](_0x582f8f){const _0xf005c7=_0x5710f0;var _0x44093d,_0x5d4643;const {parentId:_0x2ff9b0,unitId:_0x583a73,text:_0x133440,threadId:_0x4bd495}=_0x582f8f,_0x56d357=(_0x5d4643=(_0x44093d=_0x133440[_0xf005c7(0xf2)])==null?void 0x0:_0x44093d[_0xf005c7(0x100)](_0x33621e=>_0x33621e[_0xf005c7(0x12f)]===_0x23136f[_0xf005c7(0x11f)])['map'](_0x31eec7=>_0x31eec7[_0xf005c7(0x103)]))!=null?_0x5d4643:[],_0x32e1d2=JSON[_0xf005c7(0x12e)](_0x133440),_0x39a538=(await this[_0xf005c7(0x114)]['requireSession'](_0x583a73))[_0xf005c7(0x10a)]();if(_0x2ff9b0){const _0x162d6b={'memberId':_0x39a538,'unitId':_0x583a73,'content':_0x32e1d2,'mention':_0x56d357,'threadId':_0x4bd495},_0x31259e=(await this[_0xf005c7(0x113)][_0xf005c7(0x13d)]('/universer-api/comment/unit/'+_0x583a73+_0xf005c7(0x139),{'body':_0x162d6b}))[_0xf005c7(0xf9)][_0xf005c7(0xfe)];return{..._0x582f8f,'id':_0x31259e[_0xf005c7(0x15b)],'dT':_0x2f01c3(+_0x31259e['createTimestamp'])[_0xf005c7(0x153)](_0xf005c7(0x116)),'personId':_0x31259e[_0xf005c7(0xf4)]};}else{const _0x5cc230={'memberId':_0x39a538,'unitId':_0x583a73,'content':_0x32e1d2,'mention':_0x56d357},_0x562efd=await this[_0xf005c7(0x113)]['post'](_0xf005c7(0x151)+_0x583a73+'/add',{'body':_0x5cc230});return X(_0x562efd[_0xf005c7(0xf9)][_0xf005c7(0x11d)],_0x582f8f);}}async[_0x5710f0(0x147)](_0x49697c){const _0x45e821=_0x5710f0;var _0x191ece,_0x2a2c9e;const {text:_0x2a46f0,unitId:_0x4fbc5d}=_0x49697c,_0x3dd7a1=(_0x2a2c9e=(_0x191ece=_0x2a46f0['customRanges'])==null?void 0x0:_0x191ece[_0x45e821(0x100)](_0xffb3fe=>_0xffb3fe[_0x45e821(0x12f)]===_0x23136f[_0x45e821(0x11f)])[_0x45e821(0x14e)](_0x2b9ad8=>_0x2b9ad8[_0x45e821(0x103)]))!=null?_0x2a2c9e:[],_0x1e7a44=JSON[_0x45e821(0x12e)](_0x2a46f0),_0x15ecc8=_0x49697c['threadId'],_0x51769d=_0x49697c['id'],_0x56f537={'memberId':(await this[_0x45e821(0x114)]['requireSession'](_0x4fbc5d))[_0x45e821(0x10a)](),'unitId':_0x4fbc5d,'threadId':_0x15ecc8,'mention':_0x3dd7a1,'content':_0x1e7a44,'replyId':_0x51769d},_0x2af42e=await this['_httpService']['post'](_0x45e821(0x151)+_0x4fbc5d+_0x45e821(0xfc),{'body':_0x56f537});return!_0x2af42e[_0x45e821(0xf9)][_0x45e821(0x12a)]||_0x2af42e['body']['error'][_0x45e821(0xf1)]===0x1;}async[_0x5710f0(0x10e)](_0x5f02b2){const _0x20907b=_0x5710f0,{unitId:_0x3b87a9}=_0x5f02b2,_0x3b6101=_0x5f02b2['threadId'],_0x4e22ec={'memberId':this[_0x20907b(0x15e)][_0x20907b(0x109)]()[_0x20907b(0x106)],'unitId':_0x3b87a9,'threadId':_0x3b6101,'solved':_0x5f02b2[_0x20907b(0x107)]?I['Solved']:I[_0x20907b(0xfd)]},_0x49eb72=await this[_0x20907b(0x113)][_0x20907b(0x13d)](_0x20907b(0x151)+_0x3b87a9+'/solved',{'body':_0x4e22ec});return!_0x49eb72['body']['error']||_0x49eb72['body'][_0x20907b(0x12a)][_0x20907b(0xf1)]===0x1;}async[_0x5710f0(0x141)](_0x517c5f,_0x5d5760,_0x576f90,_0x31cd70){const _0x2ea1a2=_0x5710f0,_0x35de41={'memberId':(await this[_0x2ea1a2(0x114)][_0x2ea1a2(0x119)](_0x517c5f))[_0x2ea1a2(0x10a)](),'threadId':_0x576f90,'replyId':_0x31cd70,'unitId':_0x517c5f},_0x2cf5ee=await this[_0x2ea1a2(0x113)]['post']('/universer-api/comment/unit/'+_0x517c5f+'/delete',{'body':_0x35de41});return!_0x2cf5ee[_0x2ea1a2(0xf9)][_0x2ea1a2(0x12a)]||_0x2cf5ee[_0x2ea1a2(0xf9)]['error'][_0x2ea1a2(0xf1)]===0x1;}async[_0x5710f0(0x10c)](_0x1d143b,_0x47d831,_0x5cf4e5){const _0x40924e=_0x5710f0,_0x244fc5={'unitId':_0x1d143b,'threadId':_0x5cf4e5},_0x380c16=await this[_0x40924e(0x113)][_0x40924e(0x13d)](_0x40924e(0x151)+_0x1d143b+_0x40924e(0x13b),{'body':_0x244fc5}),_0x4f4538=_0x5cf4e5[_0x40924e(0x14e)](_0x51a1c7=>ee(_0x380c16[_0x40924e(0xf9)][_0x40924e(0x159)][_0x51a1c7],_0x1d143b,_0x47d831))[_0x40924e(0x100)](Boolean);return Object[_0x40924e(0x11b)](_0x380c16[_0x40924e(0xf9)][_0x40924e(0x111)])['forEach'](_0x31eac1=>{const _0x2b03b7=_0x40924e;this[_0x2b03b7(0x15e)][_0x2b03b7(0x108)](_0x31eac1);}),_0x4f4538;}[_0x5710f0(0x145)](_0x37bc86){const _0x9353e8=_0x5710f0;return{'id':_0x37bc86['id'],'threadId':_0x37bc86[_0x9353e8(0x133)],'ref':_0x37bc86[_0x9353e8(0x136)]};}};S=Q([b(0x0,_0x2c279d(_0x39aee6)),b(0x1,_0x2c279d(_0x52fde5)),b(0x2,_0x2c279d(_0x3d2bd0))],S);var re=Object[_0x5710f0(0xf6)],te=(_0x376e78,_0x41a05e,_0x4c22bb,_0x5ae43a)=>{const _0x5a82c2=_0x5710f0;for(var _0x244d6e=_0x5ae43a>0x1?void 0x0:_0x5ae43a?re(_0x41a05e,_0x4c22bb):_0x41a05e,_0xabfad=_0x376e78[_0x5a82c2(0xfa)]-0x1,_0x3bea6f;_0xabfad>=0x0;_0xabfad--)(_0x3bea6f=_0x376e78[_0xabfad])&&(_0x244d6e=_0x3bea6f(_0x244d6e)||_0x244d6e);return _0x244d6e;},M=(_0x39a714,_0x2548fb)=>(_0x1e1d82,_0x583c86)=>_0x2548fb(_0x1e1d82,_0x583c86,_0x39a714);let f=class extends _0x314433{constructor(_0x2682a0,_0x160c69){const _0x34da56=_0x5710f0;super(),this['_threadCommentDataSourceService']=_0x2682a0,this[_0x34da56(0x135)]=_0x160c69,this[_0x34da56(0x120)]();}[_0x5710f0(0x120)](){const _0x45107b=_0x5710f0;this['_threadCommentDataSourceService'][_0x45107b(0x137)]=this[_0x45107b(0x135)],this[_0x45107b(0x13a)][_0x45107b(0x14a)]=!0x1;}};f=te([M(0x0,_0x42ea6b),M(0x1,_0x2c279d(S))],f);var se=Object[_0x5710f0(0x101)],oe=Object[_0x5710f0(0xf6)],ne=(_0x1b7274,_0x3eaad2,_0x3ebc8d)=>_0x3eaad2 in _0x1b7274?se(_0x1b7274,_0x3eaad2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3ebc8d}):_0x1b7274[_0x3eaad2]=_0x3ebc8d,ie=(_0x2b4808,_0x2b6001,_0x473be0,_0x495aad)=>{for(var _0x152503=_0x495aad>0x1?void 0x0:_0x495aad?oe(_0x2b6001,_0x473be0):_0x2b6001,_0x1bf900=_0x2b4808['length']-0x1,_0x18c29b;_0x1bf900>=0x0;_0x1bf900--)(_0x18c29b=_0x2b4808[_0x1bf900])&&(_0x152503=_0x18c29b(_0x152503)||_0x152503);return _0x152503;},N=(_0x40daa1,_0x1ad28c)=>(_0x51d8c8,_0x5ca195)=>_0x1ad28c(_0x51d8c8,_0x5ca195,_0x40daa1),$=(_0x33d37e,_0x269221,_0x4d5375)=>ne(_0x33d37e,typeof _0x269221!=_0x5710f0(0x15c)?_0x269221+'':_0x269221,_0x4d5375);let g=class extends _0x20e7f7{constructor(_0x1c1542=O,_0x3f3c3b,_0x3f2609){const _0x4197ed=_0x5710f0;super(),this['_config']=_0x1c1542,this[_0x4197ed(0x142)]=_0x3f3c3b,this[_0x4197ed(0x134)]=_0x3f2609;const {..._0x34e392}=_0x5677ba({},O,this[_0x4197ed(0x14d)]);this[_0x4197ed(0x134)]['setConfig'](z,_0x34e392);}[_0x5710f0(0x156)](){[[S],[f],[_]]['forEach'](_0x104081=>{const _0x4da23c=_0x46a6;this['_injector'][_0x4da23c(0x125)](_0x104081);});}[_0x5710f0(0x157)](){const _0x482291=_0x5710f0;this['_injector'][_0x482291(0x14f)](f),this['_injector']['get'](_);}};$(g,_0x5710f0(0x123),W),$(g,_0x5710f0(0x12b),_0x3a1d37['UNIVER_UNKNOWN']),g=ie([_0x18845d(_0x5331da,_0x4b79ae,_0xe029df),N(0x1,_0x2c279d(_0x128802)),N(0x2,_0x4e2c49)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x22a6(_0x419804,_0xdee646){const _0x31cc1a=_0x31cc();return _0x22a6=function(_0x22a686,_0x304ef3){_0x22a686=_0x22a686-0xbf;let _0x5c7ff7=_0x31cc1a[_0x22a686];return _0x5c7ff7;},_0x22a6(_0x419804,_0xdee646);}(function(_0x294f1e,_0x172fe6){const _0x3b4f1c=_0x22a6,_0x53da08=_0x294f1e();while(!![]){try{const _0x245cb3=parseInt(_0x3b4f1c(0x103))/0x1*(parseInt(_0x3b4f1c(0x126))/0x2)+parseInt(_0x3b4f1c(0xc1))/0x3+-parseInt(_0x3b4f1c(0x132))/0x4*(parseInt(_0x3b4f1c(0xf0))/0x5)+-parseInt(_0x3b4f1c(0xc0))/0x6+parseInt(_0x3b4f1c(0xf4))/0x7+-parseInt(_0x3b4f1c(0x10c))/0x8+parseInt(_0x3b4f1c(0xe6))/0x9;if(_0x245cb3===_0x172fe6)break;else _0x53da08['push'](_0x53da08['shift']());}catch(_0x407e9d){_0x53da08['push'](_0x53da08['shift']());}}}(_0x31cc,0x2b498),function(_0x59d4af,_0xa7c9fe){const _0x1f0330=_0x22a6;typeof exports==_0x1f0330(0x13b)&&typeof module<'u'?_0xa7c9fe(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x1f0330(0xe3)]?define([_0x1f0330(0x141),_0x1f0330(0x100),'@univerjs-pro/license','@univerjs/core',_0x1f0330(0xc2),_0x1f0330(0x12d),_0x1f0330(0xdd),_0x1f0330(0x131)],_0xa7c9fe):(_0x59d4af=typeof globalThis<'u'?globalThis:_0x59d4af||self,_0xa7c9fe(_0x59d4af['UniverProThreadCommentDatasource']={},_0x59d4af[_0x1f0330(0x101)],_0x59d4af[_0x1f0330(0xea)],_0x59d4af[_0x1f0330(0x121)],_0x59d4af[_0x1f0330(0xc9)],_0x59d4af[_0x1f0330(0xff)],_0x59d4af[_0x1f0330(0xdd)],_0x59d4af[_0x1f0330(0x114)]));}(this,function(_0x243787,_0x502bd1,_0x202b06,_0x18f897,_0x3f5e55,_0x56d817,_0xee20,_0x3117ec){'use strict';const _0x3c178a=_0x22a6;const _0x3d4d00=_0x3c178a(0x119);var _0x357142=(_0x55d121=>(_0x55d121[_0x55d121[_0x3c178a(0x130)]=0x0]=_0x3c178a(0x130),_0x55d121[_0x55d121[_0x3c178a(0xe9)]=0x1]=_0x3c178a(0xe9),_0x55d121[_0x55d121[_0x3c178a(0xcc)]=-0x1]=_0x3c178a(0xcc),_0x55d121))(_0x357142||{}),_0x3adca7=(_0x44e039=>(_0x44e039[_0x44e039['Unknown']=0x0]=_0x3c178a(0x110),_0x44e039[_0x44e039['Add']=0x1]='Add',_0x44e039[_0x44e039[_0x3c178a(0xc3)]=0x2]=_0x3c178a(0xc3),_0x44e039[_0x44e039[_0x3c178a(0xe2)]=0x3]=_0x3c178a(0xe2),_0x44e039[_0x44e039[_0x3c178a(0x10e)]=0x4]=_0x3c178a(0x10e),_0x44e039[_0x44e039[_0x3c178a(0x136)]=0x5]=_0x3c178a(0x136),_0x44e039[_0x44e039[_0x3c178a(0xcc)]=-0x1]=_0x3c178a(0xcc),_0x44e039))(_0x3adca7||{});const _0x1a4050=_0x434f06=>_0x18f897[_0x3c178a(0xc8)](new Date(+_0x434f06))[_0x3c178a(0x12f)]('YYYY/MM/DD\x20HH:mm'),_0x306df8=async(_0x2e5bbf,_0x15c608)=>{const _0x36f4a3=_0x3c178a,_0x2cb2e8=_0x2e5bbf[_0x36f4a3(0xc6)](_0x18f897[_0x36f4a3(0x11d)]),_0x2be29d=_0x2e5bbf['get'](_0x3117ec[_0x36f4a3(0x138)]);_0x15c608[_0x36f4a3(0x125)](_0x3e2699=>{const _0x3b9f97=_0x36f4a3;_0x2cb2e8[_0x3b9f97(0xe1)](_0x3e2699)&&_0x15c608[_0x3b9f97(0xda)](_0x3e2699);}),_0x15c608[_0x36f4a3(0x133)]&&(await _0x2be29d[_0x36f4a3(0xc6)](_0x36f4a3(0xdb),{'params':{'userIDs':[..._0x15c608]}}))[_0x36f4a3(0xf8)][_0x36f4a3(0x12a)][_0x36f4a3(0x125)](_0x406e68=>{const _0x6e7f0b=_0x36f4a3;_0x406e68&&_0x2cb2e8[_0x6e7f0b(0xd6)](_0x406e68);});};var _0x30a999=Object['getOwnPropertyDescriptor'],_0x460654=(_0x1668c4,_0x417b4f,_0x40da8f,_0x312f99)=>{const _0x2140aa=_0x3c178a;for(var _0x2bade3=_0x312f99>0x1?void 0x0:_0x312f99?_0x30a999(_0x417b4f,_0x40da8f):_0x417b4f,_0x520a6e=_0x1668c4[_0x2140aa(0xfc)]-0x1,_0x73bb09;_0x520a6e>=0x0;_0x520a6e--)(_0x73bb09=_0x1668c4[_0x520a6e])&&(_0x2bade3=_0x73bb09(_0x2bade3)||_0x2bade3);return _0x2bade3;},_0x155543=(_0x4302ad,_0x5ec3e9)=>(_0x30f4eb,_0x1bf27b)=>_0x5ec3e9(_0x30f4eb,_0x1bf27b,_0x4302ad);let _0x167433=class extends _0x18f897['Disposable']{constructor(_0x21f979,_0x5f14a9,_0x531055,_0x39bf6d){const _0x536207=_0x3c178a;super(),this[_0x536207(0x122)]=_0x21f979,this[_0x536207(0x10f)]=_0x5f14a9,this['_userService']=_0x531055,this[_0x536207(0xc5)]=_0x39bf6d,this[_0x536207(0xf7)](),this['_initUserSync']();}['_initUserSync'](){const _0x25feb6=_0x3c178a;this[_0x25feb6(0xd9)](this[_0x25feb6(0x10f)]['commentUpdate$'][_0x25feb6(0xf1)](_0xee20['bufferTime'](0x10))[_0x25feb6(0xdf)](_0x2cfabf=>{const _0x3f8b3a=_0x25feb6,_0x17935b=new Set();_0x2cfabf[_0x3f8b3a(0x125)](_0x59e2aa=>{const _0x32f25f=_0x3f8b3a;switch(_0x59e2aa[_0x32f25f(0x11e)]){case _0x32f25f(0x104):{const _0x44a26a=_0x59e2aa[_0x32f25f(0xeb)]['personId'];_0x17935b[_0x32f25f(0x104)](_0x44a26a);break;}}}),_0x306df8(this[_0x3f8b3a(0xc5)],_0x17935b);}));}[_0x3c178a(0xf7)](){const _0x1a981b=_0x3c178a;this[_0x1a981b(0xd9)](this[_0x1a981b(0x122)]['commentUpdate$']['subscribe'](async _0x420eb4=>{const _0x2e5a47=_0x1a981b;var _0x191df1,_0xcd698b,_0x586aa2,_0x3540ea;const _0x5d1010=(_0x191df1=this[_0x2e5a47(0x10f)][_0x2e5a47(0x10d)](_0x420eb4[_0x2e5a47(0xbf)])[_0x2e5a47(0x105)](_0x35ed5c=>_0x35ed5c[_0x2e5a47(0xf5)]===_0x420eb4[_0x2e5a47(0xf5)]))==null?void 0x0:_0x191df1[_0x2e5a47(0x128)];if(!_0x5d1010)return;const {unitId:_0x2ef8e5,subUnitId:_0x5db400}=_0x5d1010;switch(_0x420eb4[_0x2e5a47(0xd8)]&&this['_userService'][_0x2e5a47(0xd6)](_0x420eb4[_0x2e5a47(0xd8)]),_0x420eb4[_0x2e5a47(0x11e)]){case _0x3adca7[_0x2e5a47(0x139)]:break;case _0x3adca7['Reply']:{this['_threadCommentModel'][_0x2e5a47(0xf9)](_0x2ef8e5,_0x5db400,{'unitId':_0x2ef8e5,'subUnitId':_0x5db400,'ref':'','id':_0x420eb4[_0x2e5a47(0xcf)],'dT':_0x1a4050(+_0x420eb4[_0x2e5a47(0xe5)]),'threadId':_0x420eb4[_0x2e5a47(0xf5)],'personId':(_0x586aa2=(_0xcd698b=_0x420eb4['user'])==null?void 0x0:_0xcd698b['userID'])!=null?_0x586aa2:_0x420eb4[_0x2e5a47(0xd2)],'text':JSON[_0x2e5a47(0x112)](_0x420eb4['content']),'parentId':_0x5d1010['id']});break;}case _0x3adca7[_0x2e5a47(0x10e)]:{const _0x1a4e40=this[_0x2e5a47(0x10f)][_0x2e5a47(0x120)](_0x2ef8e5,_0x5db400,_0x420eb4[_0x2e5a47(0xcf)]);_0x1a4e40&&_0x1a4e40[_0x2e5a47(0xe7)]&&this[_0x2e5a47(0x10f)][_0x2e5a47(0xe4)](_0x2ef8e5,_0x5db400,_0x420eb4[_0x2e5a47(0xcf)]);break;}case _0x3adca7[_0x2e5a47(0xe2)]:{this[_0x2e5a47(0x10f)]['updateComment'](_0x2ef8e5,_0x5db400,{'commentId':_0x420eb4[_0x2e5a47(0xcf)],'text':JSON[_0x2e5a47(0x112)](_0x420eb4[_0x2e5a47(0x129)])});break;}case _0x3adca7[_0x2e5a47(0x136)]:{const _0x2c46c5=(_0x3540ea=this[_0x2e5a47(0x10f)][_0x2e5a47(0x10d)](_0x420eb4[_0x2e5a47(0xbf)])['find'](_0x5be5c0=>_0x5be5c0[_0x2e5a47(0xf5)]===_0x420eb4['threadId']))==null?void 0x0:_0x3540ea[_0x2e5a47(0x128)];_0x2c46c5&&this[_0x2e5a47(0x10f)][_0x2e5a47(0xf3)](_0x2ef8e5,_0x5db400,_0x2c46c5['id'],_0x420eb4[_0x2e5a47(0x124)]===_0x357142[_0x2e5a47(0xe9)]);break;}}}));}};_0x167433=_0x460654([_0x155543(0x0,_0x18f897[_0x3c178a(0x123)](_0x502bd1['CommentService'])),_0x155543(0x1,_0x18f897[_0x3c178a(0x123)](_0x56d817[_0x3c178a(0xca)])),_0x155543(0x2,_0x18f897['Inject'](_0x18f897['UserManagerService'])),_0x155543(0x3,_0x18f897['Inject'](_0x18f897[_0x3c178a(0xf6)]))],_0x167433);const _0x4fafca=_0x3c178a(0x11c),_0x50de83={};var _0x44595d=Object[_0x3c178a(0x118)],_0xa0bbd0=(_0x41ef90,_0x3d07c9,_0xea53e0,_0x1e840c)=>{const _0x1d417c=_0x3c178a;for(var _0x1cecfd=_0x1e840c>0x1?void 0x0:_0x1e840c?_0x44595d(_0x3d07c9,_0xea53e0):_0x3d07c9,_0x32ff63=_0x41ef90[_0x1d417c(0xfc)]-0x1,_0x4dcbd8;_0x32ff63>=0x0;_0x32ff63--)(_0x4dcbd8=_0x41ef90[_0x32ff63])&&(_0x1cecfd=_0x4dcbd8(_0x1cecfd)||_0x1cecfd);return _0x1cecfd;},_0x3a60a8=(_0x4735c2,_0x948371)=>(_0x470f74,_0x1135bc)=>_0x948371(_0x470f74,_0x1135bc,_0x4735c2);function _0x19a2ab(_0x3b0acf,_0x2c957a){const _0x2aa4f3=_0x3c178a,_0x108b3f=_0x3b0acf[_0x2aa4f3(0xfd)][0x0];return{..._0x2c957a,'id':_0x108b3f['replyId'],'resolved':_0x3b0acf['solved']===0x1,'dT':_0x1a4050(_0x108b3f[_0x2aa4f3(0xe5)]),'personId':_0x108b3f[_0x2aa4f3(0xd2)],'threadId':_0x108b3f['threadId']};}function _0x3d4c28(_0x39a742,_0x157313,_0x2312e1){const _0x459cb6=_0x3c178a;var _0x438ff,_0x4a445c;if(((_0x4a445c=(_0x438ff=_0x39a742==null?void 0x0:_0x39a742[_0x459cb6(0xfd)])==null?void 0x0:_0x438ff['length'])!=null?_0x4a445c:0x0)>0x0){const _0x8c464f=(_0xccc072,_0x16cdd6)=>({'id':_0xccc072[_0x459cb6(0xcf)],'threadId':_0xccc072[_0x459cb6(0xf5)],'dT':_0x1a4050(_0xccc072[_0x459cb6(0xe5)]),'personId':_0xccc072[_0x459cb6(0xd2)],'resolved':_0x39a742[_0x459cb6(0x124)]===_0x357142[_0x459cb6(0xe9)],'unitId':_0x157313,'subUnitId':_0x2312e1,'text':JSON[_0x459cb6(0x112)](_0xccc072[_0x459cb6(0x129)]),'parentId':_0x16cdd6}),_0x4ca69c=_0x8c464f(_0x39a742[_0x459cb6(0xfd)][0x0]);return{..._0x4ca69c,'children':_0x39a742[_0x459cb6(0xfd)][_0x459cb6(0x13e)](0x1)[_0x459cb6(0xf2)](_0x1fa2c3=>_0x8c464f(_0x1fa2c3,_0x4ca69c['id']))};}return null;}let _0x1f8a13=class{constructor(_0x55215f,_0x17e638,_0x2254a4){const _0x3c7340=_0x3c178a;this[_0x3c7340(0x116)]=_0x55215f,this['_userService']=_0x17e638,this[_0x3c7340(0xed)]=_0x2254a4;}async['addComment'](_0x44b159){const _0x252bbd=_0x3c178a;var _0x5d50c2,_0x63c049;const {parentId:_0x5b961f,unitId:_0x7c792d,text:_0x368ab0,threadId:_0x5c5136}=_0x44b159,_0x40f682=(_0x63c049=(_0x5d50c2=_0x368ab0[_0x252bbd(0x12b)])==null?void 0x0:_0x5d50c2['filter'](_0x8f0cc7=>_0x8f0cc7['rangeType']===_0x18f897[_0x252bbd(0xfa)]['COMMENT'])['map'](_0x3338b6=>_0x3338b6[_0x252bbd(0x12e)]))!=null?_0x63c049:[],_0x43cbd1=JSON[_0x252bbd(0x107)](_0x368ab0),_0x8b1753=(await this['_sessionService'][_0x252bbd(0xd4)](_0x7c792d))[_0x252bbd(0xd5)]();if(_0x5b961f){const _0x2bd84a={'memberId':_0x8b1753,'unitId':_0x7c792d,'content':_0x43cbd1,'mention':_0x40f682,'threadId':_0x5c5136},_0x1bc25a=(await this[_0x252bbd(0x116)][_0x252bbd(0xd0)](_0x252bbd(0x10a)+_0x7c792d+'/reply',{'body':_0x2bd84a}))['body'][_0x252bbd(0x12c)];return{..._0x44b159,'id':_0x1bc25a[_0x252bbd(0xcf)],'dT':_0x18f897['dayjs'](+_0x1bc25a[_0x252bbd(0xe5)])[_0x252bbd(0x12f)](_0x252bbd(0x127)),'personId':_0x1bc25a[_0x252bbd(0xd2)]};}else{const _0x31ac71={'memberId':_0x8b1753,'unitId':_0x7c792d,'content':_0x43cbd1,'mention':_0x40f682},_0xe6c72c=await this[_0x252bbd(0x116)][_0x252bbd(0xd0)](_0x252bbd(0x10a)+_0x7c792d+_0x252bbd(0x13f),{'body':_0x31ac71});return _0x19a2ab(_0xe6c72c['body'][_0x252bbd(0xcd)],_0x44b159);}}async[_0x3c178a(0xef)](_0x5b311e){const _0x6f7536=_0x3c178a;var _0x18a316,_0x580694;const {text:_0xe8ae00,unitId:_0xda708c}=_0x5b311e,_0x20e6e4=(_0x580694=(_0x18a316=_0xe8ae00[_0x6f7536(0x12b)])==null?void 0x0:_0x18a316[_0x6f7536(0x134)](_0x167e5c=>_0x167e5c[_0x6f7536(0x10b)]===_0x18f897[_0x6f7536(0xfa)]['COMMENT'])['map'](_0x13ed50=>_0x13ed50[_0x6f7536(0x12e)]))!=null?_0x580694:[],_0x148540=JSON[_0x6f7536(0x107)](_0xe8ae00),_0x2c0c54=_0x5b311e[_0x6f7536(0xf5)],_0x13449c=_0x5b311e['id'],_0x5776ed={'memberId':(await this[_0x6f7536(0xed)]['requireSession'](_0xda708c))[_0x6f7536(0xd5)](),'unitId':_0xda708c,'threadId':_0x2c0c54,'mention':_0x20e6e4,'content':_0x148540,'replyId':_0x13449c},_0x131f98=await this[_0x6f7536(0x116)][_0x6f7536(0xd0)](_0x6f7536(0x10a)+_0xda708c+_0x6f7536(0x108),{'body':_0x5776ed});return!_0x131f98[_0x6f7536(0xf8)]['error']||_0x131f98['body'][_0x6f7536(0x11f)][_0x6f7536(0x13d)]===0x1;}async[_0x3c178a(0xf3)](_0x169833){const _0x1c757e=_0x3c178a,{unitId:_0x4403d6}=_0x169833,_0x98012d=_0x169833[_0x1c757e(0xf5)],_0x1b77d7={'memberId':this['_userService'][_0x1c757e(0x142)]()[_0x1c757e(0xdc)],'unitId':_0x4403d6,'threadId':_0x98012d,'solved':_0x169833[_0x1c757e(0xd3)]?_0x357142[_0x1c757e(0xe9)]:_0x357142[_0x1c757e(0x130)]},_0x25c586=await this[_0x1c757e(0x116)]['post']('/universer-api/comment/unit/'+_0x4403d6+_0x1c757e(0x140),{'body':_0x1b77d7});return!_0x25c586[_0x1c757e(0xf8)][_0x1c757e(0x11f)]||_0x25c586[_0x1c757e(0xf8)][_0x1c757e(0x11f)]['code']===0x1;}async[_0x3c178a(0xe4)](_0x925fb6,_0x4821d8,_0x2b93b3,_0x2d2e9b){const _0x3c57ba=_0x3c178a,_0x1ea47c={'memberId':(await this['_sessionService'][_0x3c57ba(0xd4)](_0x925fb6))[_0x3c57ba(0xd5)](),'threadId':_0x2b93b3,'replyId':_0x2d2e9b,'unitId':_0x925fb6},_0x191ac7=await this[_0x3c57ba(0x116)]['post'](_0x3c57ba(0x10a)+_0x925fb6+'/delete',{'body':_0x1ea47c});return!_0x191ac7[_0x3c57ba(0xf8)][_0x3c57ba(0x11f)]||_0x191ac7[_0x3c57ba(0xf8)]['error'][_0x3c57ba(0x13d)]===0x1;}async[_0x3c178a(0x109)](_0x5931d0,_0x2f9e4a,_0x1fa66b){const _0x3e1e22=_0x3c178a,_0x4213a5={'unitId':_0x5931d0,'threadId':_0x1fa66b},_0x73be5b=await this[_0x3e1e22(0x116)][_0x3e1e22(0xd0)]('/universer-api/comment/unit/'+_0x5931d0+_0x3e1e22(0x13a),{'body':_0x4213a5}),_0x3f7678=_0x1fa66b[_0x3e1e22(0xf2)](_0x5ed43d=>_0x3d4c28(_0x73be5b[_0x3e1e22(0xf8)][_0x3e1e22(0x13c)][_0x5ed43d],_0x5931d0,_0x2f9e4a))[_0x3e1e22(0x134)](Boolean);return Object[_0x3e1e22(0x106)](_0x73be5b['body'][_0x3e1e22(0x12a)])[_0x3e1e22(0x125)](_0x625c5=>{const _0x668594=_0x3e1e22;this[_0x668594(0xfe)]['addUser'](_0x625c5);}),_0x3f7678;}[_0x3c178a(0xce)](_0x14b099){const _0x5d6050=_0x3c178a;return{'id':_0x14b099['id'],'threadId':_0x14b099[_0x5d6050(0xf5)],'ref':_0x14b099['ref']};}};_0x1f8a13=_0xa0bbd0([_0x3a60a8(0x0,_0x18f897[_0x3c178a(0x123)](_0x3117ec[_0x3c178a(0x138)])),_0x3a60a8(0x1,_0x18f897[_0x3c178a(0x123)](_0x18f897['UserManagerService'])),_0x3a60a8(0x2,_0x18f897['Inject'](_0x502bd1[_0x3c178a(0xd7)]))],_0x1f8a13);var _0xeb0d32=Object[_0x3c178a(0x118)],_0x5a8a9f=(_0x242a39,_0x2252a0,_0x39f488,_0x12a6ed)=>{const _0x224115=_0x3c178a;for(var _0x599f93=_0x12a6ed>0x1?void 0x0:_0x12a6ed?_0xeb0d32(_0x2252a0,_0x39f488):_0x2252a0,_0x3584b9=_0x242a39[_0x224115(0xfc)]-0x1,_0x308ba4;_0x3584b9>=0x0;_0x3584b9--)(_0x308ba4=_0x242a39[_0x3584b9])&&(_0x599f93=_0x308ba4(_0x599f93)||_0x599f93);return _0x599f93;},_0x3acd58=(_0x22f0a1,_0x3e9633)=>(_0x2f67e2,_0x1f0ae7)=>_0x3e9633(_0x2f67e2,_0x1f0ae7,_0x22f0a1);let _0x30438a=class extends _0x18f897[_0x3c178a(0x111)]{constructor(_0x3654c7,_0x1f48f0){const _0x5e636b=_0x3c178a;super(),this[_0x5e636b(0x11a)]=_0x3654c7,this['_threadCommentDataSource']=_0x1f48f0,this[_0x5e636b(0xec)]();}['_initDataSource'](){const _0x2ab420=_0x3c178a;this[_0x2ab420(0x11a)][_0x2ab420(0xde)]=this[_0x2ab420(0x113)],this[_0x2ab420(0x11a)][_0x2ab420(0xe8)]=!0x1;}};_0x30438a=_0x5a8a9f([_0x3acd58(0x0,_0x56d817['IThreadCommentDataSourceService']),_0x3acd58(0x1,_0x18f897[_0x3c178a(0x123)](_0x1f8a13))],_0x30438a);var _0x2d9d46=Object[_0x3c178a(0xc7)],_0x385914=Object[_0x3c178a(0x118)],_0x38067e=(_0x4daafd,_0x497a27,_0x4734c5)=>_0x497a27 in _0x4daafd?_0x2d9d46(_0x4daafd,_0x497a27,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4734c5}):_0x4daafd[_0x497a27]=_0x4734c5,_0x46b08a=(_0x1ec1ca,_0x518719,_0x202a3e,_0xe98453)=>{const _0x3ba571=_0x3c178a;for(var _0x2149f0=_0xe98453>0x1?void 0x0:_0xe98453?_0x385914(_0x518719,_0x202a3e):_0x518719,_0x5da5d0=_0x1ec1ca[_0x3ba571(0xfc)]-0x1,_0x3e4c63;_0x5da5d0>=0x0;_0x5da5d0--)(_0x3e4c63=_0x1ec1ca[_0x5da5d0])&&(_0x2149f0=_0x3e4c63(_0x2149f0)||_0x2149f0);return _0x2149f0;},_0x42334c=(_0x35c083,_0x1861b9)=>(_0x11d970,_0x577ed3)=>_0x1861b9(_0x11d970,_0x577ed3,_0x35c083),_0x6549fc=(_0x366b18,_0x30557d,_0x56b8b0)=>_0x38067e(_0x366b18,typeof _0x30557d!='symbol'?_0x30557d+'':_0x30557d,_0x56b8b0);_0x243787['UniverThreadCommentDataSourcePlugin']=class extends _0x18f897[_0x3c178a(0xcb)]{constructor(_0x36e243=_0x50de83,_0x53c994,_0x3b0fa5){const _0x10c369=_0x3c178a;super(),this[_0x10c369(0x11b)]=_0x36e243,this[_0x10c369(0xc5)]=_0x53c994,this[_0x10c369(0xee)]=_0x3b0fa5;const {..._0x18ab64}=_0x18f897['merge']({},_0x50de83,this[_0x10c369(0x11b)]);this[_0x10c369(0xee)]['setConfig'](_0x4fafca,_0x18ab64);}[_0x3c178a(0x137)](){const _0x3fb8f2=_0x3c178a;[[_0x1f8a13],[_0x30438a],[_0x167433]][_0x3fb8f2(0x125)](_0x4231e9=>{const _0x58be02=_0x3fb8f2;this['_injector'][_0x58be02(0x104)](_0x4231e9);});}[_0x3c178a(0x135)](){const _0x142dfc=_0x3c178a;this[_0x142dfc(0xc5)][_0x142dfc(0xc6)](_0x30438a),this[_0x142dfc(0xc5)][_0x142dfc(0xc6)](_0x167433);}},_0x6549fc(_0x243787[_0x3c178a(0xc4)],'pluginName',_0x3d4d00),_0x6549fc(_0x243787[_0x3c178a(0xc4)],_0x3c178a(0x11e),_0x18f897['UniverInstanceType'][_0x3c178a(0xe0)]),_0x243787['UniverThreadCommentDataSourcePlugin']=_0x46b08a([_0x18f897[_0x3c178a(0x117)](_0x3f5e55[_0x3c178a(0x115)],_0x502bd1[_0x3c178a(0xfb)],_0x202b06[_0x3c178a(0x143)]),_0x42334c(0x1,_0x18f897[_0x3c178a(0x123)](_0x18f897[_0x3c178a(0xf6)])),_0x42334c(0x2,_0x18f897[_0x3c178a(0xd1)])],_0x243787[_0x3c178a(0xc4)]),Object[_0x3c178a(0xc7)](_0x243787,Symbol['toStringTag'],{'value':_0x3c178a(0x102)});}));function _0x31cc(){const _0x55ee7d=['getOwnPropertyDescriptor','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentDataSourceService','_config','thread-comment-data-source.config','UserManagerService','type','error','getComment','UniverCore','_commentService','Inject','solved','forEach','2jROPFk','YYYY/MM/DD\x20HH:mm','root','content','users','customRanges','reply','@univerjs/thread-comment','rangeId','format','OpenOrReOpen','@univerjs/network','236GccEAp','size','filter','onReady','Solve','onStarting','HTTPService','Add','/list','object','comments','code','slice','/add','/solved','exports','getCurrentUser','UniverLicensePlugin','unitId','212712LwDaPB','55143YgVmbC','@univerjs/thread-comment-ui','Reply','UniverThreadCommentDataSourcePlugin','_injector','get','defineProperty','dayjs','UniverThreadCommentUi','ThreadCommentModel','Plugin','UNRECOGNIZED','comment','saveCommentToSnapshot','replyId','post','IConfigService','userId','resolved','requireSession','getMemberID','addUser','CollaborationSessionService','user','disposeWithMe','delete','/universer-api/user/list','userID','rxjs','dataSource','subscribe','UNIVER_UNKNOWN','getUser','Edit','amd','deleteComment','createTimestamp','4066857PdarRv','parentId','syncUpdateMutationToColla','Solved','UniverProLicense','payload','_initDataSource','_sessionService','_configService','updateComment','12235RfoFHZ','pipe','map','resolveComment','432068hngZzF','threadId','Injector','_init','body','addComment','CustomRangeType','UniverCollaborationClientPlugin','length','replies','_userService','UniverThreadComment','@univerjs-pro/collaboration-client','UniverProCollaborationClient','Module','109189vzjuoy','add','find','values','stringify','/edit','listComments','/universer-api/comment/unit/','rangeType','2272304pVWhGL','getUnit','Delete','_threadCommentModel','Unknown','Disposable','parse','_threadCommentDataSource','UniverNetwork','UniverThreadCommentUIPlugin','_httpService','DependentOn'];_0x31cc=function(){return _0x55ee7d;};return _0x31cc();}
1
+ function _0xa300(_0x4b8ef8,_0x5038d6){const _0x4874dc=_0x4874();return _0xa300=function(_0xa3007,_0x40c937){_0xa3007=_0xa3007-0x1d4;let _0x1d0153=_0x4874dc[_0xa3007];return _0x1d0153;},_0xa300(_0x4b8ef8,_0x5038d6);}(function(_0x1b2fd1,_0x26fa00){const _0x166fc9=_0xa300,_0x3c3476=_0x1b2fd1();while(!![]){try{const _0x17890f=-parseInt(_0x166fc9(0x255))/0x1*(-parseInt(_0x166fc9(0x1e0))/0x2)+parseInt(_0x166fc9(0x236))/0x3+parseInt(_0x166fc9(0x226))/0x4*(parseInt(_0x166fc9(0x1f8))/0x5)+-parseInt(_0x166fc9(0x248))/0x6*(parseInt(_0x166fc9(0x1db))/0x7)+-parseInt(_0x166fc9(0x231))/0x8+-parseInt(_0x166fc9(0x1de))/0x9*(parseInt(_0x166fc9(0x1fa))/0xa)+-parseInt(_0x166fc9(0x23d))/0xb*(parseInt(_0x166fc9(0x258))/0xc);if(_0x17890f===_0x26fa00)break;else _0x3c3476['push'](_0x3c3476['shift']());}catch(_0x30d7bb){_0x3c3476['push'](_0x3c3476['shift']());}}}(_0x4874,0xbc9da),function(_0x298869,_0x29a67e){const _0x458d8f=_0xa300;typeof exports==_0x458d8f(0x1e9)&&typeof module<'u'?_0x29a67e(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x458d8f(0x230)]?define([_0x458d8f(0x225),_0x458d8f(0x247),_0x458d8f(0x1f5),'@univerjs/core',_0x458d8f(0x1ec),_0x458d8f(0x1d8),_0x458d8f(0x24f),_0x458d8f(0x215)],_0x29a67e):(_0x298869=typeof globalThis<'u'?globalThis:_0x298869||self,_0x29a67e(_0x298869[_0x458d8f(0x209)]={},_0x298869[_0x458d8f(0x1e8)],_0x298869[_0x458d8f(0x1f6)],_0x298869[_0x458d8f(0x1f0)],_0x298869[_0x458d8f(0x246)],_0x298869[_0x458d8f(0x20f)],_0x298869[_0x458d8f(0x24f)],_0x298869['UniverNetwork']));}(this,function(_0x54ff32,_0xb179c0,_0x47efa6,_0x1cb672,_0x3e6c0d,_0x5c1e74,_0xbe5a39,_0x560120){'use strict';const _0x39d058=_0xa300;const _0x4275b8=_0x39d058(0x208);var _0x27a358=(_0x560897=>(_0x560897[_0x560897[_0x39d058(0x257)]=0x0]=_0x39d058(0x257),_0x560897[_0x560897['Solved']=0x1]=_0x39d058(0x21e),_0x560897[_0x560897[_0x39d058(0x223)]=-0x1]=_0x39d058(0x223),_0x560897))(_0x27a358||{}),_0x4c8fce=(_0x22f70d=>(_0x22f70d[_0x22f70d['Unknown']=0x0]=_0x39d058(0x24c),_0x22f70d[_0x22f70d[_0x39d058(0x21c)]=0x1]='Add',_0x22f70d[_0x22f70d[_0x39d058(0x21b)]=0x2]=_0x39d058(0x21b),_0x22f70d[_0x22f70d['Edit']=0x3]=_0x39d058(0x205),_0x22f70d[_0x22f70d[_0x39d058(0x1e3)]=0x4]=_0x39d058(0x1e3),_0x22f70d[_0x22f70d[_0x39d058(0x203)]=0x5]=_0x39d058(0x203),_0x22f70d[_0x22f70d[_0x39d058(0x223)]=-0x1]=_0x39d058(0x223),_0x22f70d))(_0x4c8fce||{});const _0x4dc081=_0x88c67d=>_0x1cb672[_0x39d058(0x228)](new Date(+_0x88c67d))[_0x39d058(0x256)]('YYYY/MM/DD\x20HH:mm'),_0x4f3015=async(_0x22bff0,_0x4ed0c8)=>{const _0x4a7b0f=_0x39d058,_0xe2edec=_0x22bff0[_0x4a7b0f(0x1ee)](_0x1cb672[_0x4a7b0f(0x213)]),_0x10c61b=_0x22bff0[_0x4a7b0f(0x1ee)](_0x560120[_0x4a7b0f(0x1fc)]);_0x4ed0c8[_0x4a7b0f(0x22b)](_0x3b68df=>{const _0x3a9360=_0x4a7b0f;_0xe2edec[_0x3a9360(0x20e)](_0x3b68df)&&_0x4ed0c8['delete'](_0x3b68df);}),_0x4ed0c8['size']&&(await _0x10c61b[_0x4a7b0f(0x1ee)](_0x4a7b0f(0x200),{'params':{'userIDs':[..._0x4ed0c8]}}))['body'][_0x4a7b0f(0x1dc)][_0x4a7b0f(0x22b)](_0x5210aa=>{const _0x218193=_0x4a7b0f;_0x5210aa&&_0xe2edec[_0x218193(0x1fd)](_0x5210aa);});};var _0x1ca544=Object[_0x39d058(0x235)],_0x43d4a4=(_0x34a5a3,_0x30200a,_0x58a36b,_0x37c430)=>{for(var _0xef0f65=_0x37c430>0x1?void 0x0:_0x37c430?_0x1ca544(_0x30200a,_0x58a36b):_0x30200a,_0x200e87=_0x34a5a3['length']-0x1,_0x55371d;_0x200e87>=0x0;_0x200e87--)(_0x55371d=_0x34a5a3[_0x200e87])&&(_0xef0f65=_0x55371d(_0xef0f65)||_0xef0f65);return _0xef0f65;},_0x2734fd=(_0xe917ab,_0x5c0329)=>(_0x490177,_0x709c1e)=>_0x5c0329(_0x490177,_0x709c1e,_0xe917ab);let _0x92b7bd=class extends _0x1cb672[_0x39d058(0x24e)]{constructor(_0x51d1f6,_0x27e1aa,_0x4594f4,_0xeb71a1){const _0x462ebe=_0x39d058;super(),this['_commentService']=_0x51d1f6,this['_threadCommentModel']=_0x27e1aa,this['_userService']=_0x4594f4,this[_0x462ebe(0x207)]=_0xeb71a1,this[_0x462ebe(0x1d4)](),this['_initUserSync']();}[_0x39d058(0x1e1)](){const _0x4122a5=_0x39d058;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$'][_0x4122a5(0x1e5)](_0xbe5a39['bufferTime'](0x10))[_0x4122a5(0x1ef)](_0x2693b5=>{const _0x479528=_0x4122a5,_0x5d5cef=new Set();_0x2693b5[_0x479528(0x22b)](_0x19428d=>{const _0x3d1f44=_0x479528;switch(_0x19428d[_0x3d1f44(0x1e6)]){case'add':{const _0x50632d=_0x19428d[_0x3d1f44(0x249)]['personId'];_0x5d5cef[_0x3d1f44(0x1da)](_0x50632d);break;}}}),_0x4f3015(this[_0x479528(0x207)],_0x5d5cef);}));}[_0x39d058(0x1d4)](){const _0x2fdab5=_0x39d058;this[_0x2fdab5(0x259)](this[_0x2fdab5(0x254)][_0x2fdab5(0x1fb)][_0x2fdab5(0x1ef)](async _0x136642=>{const _0x2110cc=_0x2fdab5;var _0x39a0ce,_0x5dbf6a,_0x10ffa7,_0xcc71b0;const _0x3e69e8=(_0x39a0ce=this[_0x2110cc(0x206)][_0x2110cc(0x218)](_0x136642[_0x2110cc(0x1f1)])[_0x2110cc(0x20b)](_0x25a97c=>_0x25a97c[_0x2110cc(0x22c)]===_0x136642['threadId']))==null?void 0x0:_0x39a0ce[_0x2110cc(0x24a)];if(!_0x3e69e8)return;const {unitId:_0x5412fb,subUnitId:_0x3d79fe}=_0x3e69e8;switch(_0x136642[_0x2110cc(0x22d)]&&this[_0x2110cc(0x243)]['addUser'](_0x136642[_0x2110cc(0x22d)]),_0x136642[_0x2110cc(0x1e6)]){case _0x4c8fce['Add']:break;case _0x4c8fce[_0x2110cc(0x21b)]:{this['_threadCommentModel']['addComment'](_0x5412fb,_0x3d79fe,{'unitId':_0x5412fb,'subUnitId':_0x3d79fe,'ref':'','id':_0x136642['replyId'],'dT':_0x4dc081(+_0x136642[_0x2110cc(0x1f4)]),'threadId':_0x136642[_0x2110cc(0x22c)],'personId':(_0x10ffa7=(_0x5dbf6a=_0x136642[_0x2110cc(0x22d)])==null?void 0x0:_0x5dbf6a['userID'])!=null?_0x10ffa7:_0x136642[_0x2110cc(0x237)],'text':JSON[_0x2110cc(0x211)](_0x136642[_0x2110cc(0x22a)]),'parentId':_0x3e69e8['id']});break;}case _0x4c8fce['Delete']:{const _0x285dd1=this[_0x2110cc(0x206)][_0x2110cc(0x21f)](_0x5412fb,_0x3d79fe,_0x136642['replyId']);_0x285dd1&&_0x285dd1[_0x2110cc(0x253)]&&this[_0x2110cc(0x206)][_0x2110cc(0x20c)](_0x5412fb,_0x3d79fe,_0x136642['replyId']);break;}case _0x4c8fce[_0x2110cc(0x205)]:{this[_0x2110cc(0x206)][_0x2110cc(0x23b)](_0x5412fb,_0x3d79fe,{'commentId':_0x136642[_0x2110cc(0x1df)],'text':JSON['parse'](_0x136642['content'])});break;}case _0x4c8fce[_0x2110cc(0x203)]:{const _0x114b53=(_0xcc71b0=this[_0x2110cc(0x206)]['getUnit'](_0x136642['unitId'])['find'](_0x2c0b57=>_0x2c0b57['threadId']===_0x136642['threadId']))==null?void 0x0:_0xcc71b0[_0x2110cc(0x24a)];_0x114b53&&this[_0x2110cc(0x206)]['resolveComment'](_0x5412fb,_0x3d79fe,_0x114b53['id'],_0x136642[_0x2110cc(0x233)]===_0x27a358[_0x2110cc(0x21e)]);break;}}}));}};_0x92b7bd=_0x43d4a4([_0x2734fd(0x0,_0x1cb672[_0x39d058(0x1dd)](_0xb179c0[_0x39d058(0x1d5)])),_0x2734fd(0x1,_0x1cb672['Inject'](_0x5c1e74[_0x39d058(0x1e7)])),_0x2734fd(0x2,_0x1cb672[_0x39d058(0x1dd)](_0x1cb672['UserManagerService'])),_0x2734fd(0x3,_0x1cb672[_0x39d058(0x1dd)](_0x1cb672[_0x39d058(0x21a)]))],_0x92b7bd);const _0x484b90=_0x39d058(0x21d),_0x196c5b={};var _0x38f8e0=Object['getOwnPropertyDescriptor'],_0x991da7=(_0x5b22e4,_0x56aac4,_0x2e57ee,_0x252f8c)=>{const _0x10326c=_0x39d058;for(var _0x5395f0=_0x252f8c>0x1?void 0x0:_0x252f8c?_0x38f8e0(_0x56aac4,_0x2e57ee):_0x56aac4,_0x2a6ba6=_0x5b22e4[_0x10326c(0x23c)]-0x1,_0x2b3a06;_0x2a6ba6>=0x0;_0x2a6ba6--)(_0x2b3a06=_0x5b22e4[_0x2a6ba6])&&(_0x5395f0=_0x2b3a06(_0x5395f0)||_0x5395f0);return _0x5395f0;},_0xc778ed=(_0x4d6cfb,_0x425c8a)=>(_0x41791a,_0x499782)=>_0x425c8a(_0x41791a,_0x499782,_0x4d6cfb);function _0x37ae4f(_0xa208fc,_0x593b7b){const _0x40a354=_0x39d058,_0x5ac087=_0xa208fc[_0x40a354(0x22f)][0x0];return{..._0x593b7b,'id':_0x5ac087[_0x40a354(0x1df)],'resolved':_0xa208fc[_0x40a354(0x233)]===0x1,'dT':_0x4dc081(_0x5ac087[_0x40a354(0x1f4)]),'personId':_0x5ac087[_0x40a354(0x237)],'threadId':_0x5ac087['threadId']};}function _0x2a4b13(_0x3b025f,_0x3b292f,_0x3e757b){const _0x25bc70=_0x39d058;var _0x2d0624,_0x55ab00;if(((_0x55ab00=(_0x2d0624=_0x3b025f==null?void 0x0:_0x3b025f[_0x25bc70(0x22f)])==null?void 0x0:_0x2d0624['length'])!=null?_0x55ab00:0x0)>0x0){const _0x5312d0=(_0x5a9210,_0xd9f18b)=>({'id':_0x5a9210[_0x25bc70(0x1df)],'threadId':_0x5a9210[_0x25bc70(0x22c)],'dT':_0x4dc081(_0x5a9210[_0x25bc70(0x1f4)]),'personId':_0x5a9210[_0x25bc70(0x237)],'resolved':_0x3b025f[_0x25bc70(0x233)]===_0x27a358[_0x25bc70(0x21e)],'unitId':_0x3b292f,'subUnitId':_0x3e757b,'text':JSON[_0x25bc70(0x211)](_0x5a9210[_0x25bc70(0x22a)]),'parentId':_0xd9f18b}),_0xc149d0=_0x5312d0(_0x3b025f[_0x25bc70(0x22f)][0x0]);return{..._0xc149d0,'children':_0x3b025f[_0x25bc70(0x22f)]['slice'](0x1)['map'](_0x2310dd=>_0x5312d0(_0x2310dd,_0xc149d0['id']))};}return null;}let _0x280562=class{constructor(_0x3034b6,_0x24afe6,_0x140edc){const _0x124063=_0x39d058;this['_httpService']=_0x3034b6,this['_userService']=_0x24afe6,this[_0x124063(0x212)]=_0x140edc;}async['addComment'](_0x19b20d){const _0x2596a7=_0x39d058;var _0x9c1959,_0x76927e;const {parentId:_0x22aa5a,unitId:_0x877bd,text:_0x5784dd,threadId:_0x4e2faf}=_0x19b20d,_0x55183d=(_0x76927e=(_0x9c1959=_0x5784dd[_0x2596a7(0x217)])==null?void 0x0:_0x9c1959['filter'](_0x343300=>_0x343300['rangeType']===_0x1cb672[_0x2596a7(0x24d)]['COMMENT'])[_0x2596a7(0x1ea)](_0x1bc0a7=>_0x1bc0a7[_0x2596a7(0x210)]))!=null?_0x76927e:[],_0x4331a3=JSON[_0x2596a7(0x23f)](_0x5784dd),_0x5c957c=(await this[_0x2596a7(0x212)][_0x2596a7(0x1e4)](_0x877bd))[_0x2596a7(0x23e)]();if(_0x22aa5a){const _0x3d1e6a={'memberId':_0x5c957c,'unitId':_0x877bd,'content':_0x4331a3,'mention':_0x55183d,'threadId':_0x4e2faf},_0xfb6721=(await this['_httpService'][_0x2596a7(0x20d)](_0x2596a7(0x229)+_0x877bd+'/reply',{'body':_0x3d1e6a}))[_0x2596a7(0x220)][_0x2596a7(0x1f3)];return{..._0x19b20d,'id':_0xfb6721[_0x2596a7(0x1df)],'dT':_0x1cb672[_0x2596a7(0x228)](+_0xfb6721[_0x2596a7(0x1f4)])[_0x2596a7(0x256)](_0x2596a7(0x239)),'personId':_0xfb6721['userId']};}else{const _0x22e4e8={'memberId':_0x5c957c,'unitId':_0x877bd,'content':_0x4331a3,'mention':_0x55183d},_0x254fea=await this[_0x2596a7(0x252)][_0x2596a7(0x20d)](_0x2596a7(0x229)+_0x877bd+'/add',{'body':_0x22e4e8});return _0x37ae4f(_0x254fea[_0x2596a7(0x220)][_0x2596a7(0x242)],_0x19b20d);}}async[_0x39d058(0x23b)](_0xa133b8){const _0x4a4042=_0x39d058;var _0x57bbb7,_0x2811cc;const {text:_0x3cf775,unitId:_0x4eb78f}=_0xa133b8,_0x2cfda4=(_0x2811cc=(_0x57bbb7=_0x3cf775[_0x4a4042(0x217)])==null?void 0x0:_0x57bbb7[_0x4a4042(0x219)](_0x3b6b3d=>_0x3b6b3d[_0x4a4042(0x1eb)]===_0x1cb672['CustomRangeType'][_0x4a4042(0x250)])['map'](_0x26e95e=>_0x26e95e[_0x4a4042(0x210)]))!=null?_0x2811cc:[],_0x32b395=JSON[_0x4a4042(0x23f)](_0x3cf775),_0x1b0e90=_0xa133b8[_0x4a4042(0x22c)],_0x5bc5fb=_0xa133b8['id'],_0x4f2b85={'memberId':(await this[_0x4a4042(0x212)]['requireSession'](_0x4eb78f))[_0x4a4042(0x23e)](),'unitId':_0x4eb78f,'threadId':_0x1b0e90,'mention':_0x2cfda4,'content':_0x32b395,'replyId':_0x5bc5fb},_0x27fc89=await this['_httpService'][_0x4a4042(0x20d)](_0x4a4042(0x229)+_0x4eb78f+_0x4a4042(0x241),{'body':_0x4f2b85});return!_0x27fc89[_0x4a4042(0x220)]['error']||_0x27fc89[_0x4a4042(0x220)][_0x4a4042(0x221)][_0x4a4042(0x201)]===0x1;}async[_0x39d058(0x1f2)](_0x2270fb){const _0xff1ed3=_0x39d058,{unitId:_0xf90698}=_0x2270fb,_0xf3e521=_0x2270fb['threadId'],_0x18dfdf={'memberId':this['_userService'][_0xff1ed3(0x1ed)]()[_0xff1ed3(0x1f7)],'unitId':_0xf90698,'threadId':_0xf3e521,'solved':_0x2270fb[_0xff1ed3(0x24b)]?_0x27a358[_0xff1ed3(0x21e)]:_0x27a358[_0xff1ed3(0x257)]},_0x589b3d=await this[_0xff1ed3(0x252)][_0xff1ed3(0x20d)](_0xff1ed3(0x229)+_0xf90698+_0xff1ed3(0x216),{'body':_0x18dfdf});return!_0x589b3d[_0xff1ed3(0x220)][_0xff1ed3(0x221)]||_0x589b3d[_0xff1ed3(0x220)][_0xff1ed3(0x221)]['code']===0x1;}async[_0x39d058(0x20c)](_0x518e9b,_0x1b911a,_0x488b12,_0x3102a6){const _0x5b8d12=_0x39d058,_0x1ebd78={'memberId':(await this[_0x5b8d12(0x212)][_0x5b8d12(0x1e4)](_0x518e9b))['getMemberID'](),'threadId':_0x488b12,'replyId':_0x3102a6,'unitId':_0x518e9b},_0x28b1c8=await this[_0x5b8d12(0x252)][_0x5b8d12(0x20d)]('/universer-api/comment/unit/'+_0x518e9b+_0x5b8d12(0x22e),{'body':_0x1ebd78});return!_0x28b1c8[_0x5b8d12(0x220)][_0x5b8d12(0x221)]||_0x28b1c8[_0x5b8d12(0x220)][_0x5b8d12(0x221)][_0x5b8d12(0x201)]===0x1;}async[_0x39d058(0x1ff)](_0x594579,_0x14bcbe,_0x50205d){const _0x1127a1=_0x39d058,_0x288412={'unitId':_0x594579,'threadId':_0x50205d},_0x28ba38=await this['_httpService'][_0x1127a1(0x20d)](_0x1127a1(0x229)+_0x594579+'/list',{'body':_0x288412}),_0x536c34=_0x50205d[_0x1127a1(0x1ea)](_0xee7424=>_0x2a4b13(_0x28ba38[_0x1127a1(0x220)][_0x1127a1(0x244)][_0xee7424],_0x594579,_0x14bcbe))[_0x1127a1(0x219)](Boolean);return Object['values'](_0x28ba38[_0x1127a1(0x220)]['users'])['forEach'](_0x401d97=>{const _0xfa367c=_0x1127a1;this[_0xfa367c(0x243)][_0xfa367c(0x1fd)](_0x401d97);}),_0x536c34;}['saveCommentToSnapshot'](_0x19495f){const _0x8be416=_0x39d058;return{'id':_0x19495f['id'],'threadId':_0x19495f[_0x8be416(0x22c)],'ref':_0x19495f[_0x8be416(0x222)]};}};_0x280562=_0x991da7([_0xc778ed(0x0,_0x1cb672[_0x39d058(0x1dd)](_0x560120[_0x39d058(0x1fc)])),_0xc778ed(0x1,_0x1cb672[_0x39d058(0x1dd)](_0x1cb672[_0x39d058(0x213)])),_0xc778ed(0x2,_0x1cb672[_0x39d058(0x1dd)](_0xb179c0[_0x39d058(0x202)]))],_0x280562);var _0x560d1c=Object[_0x39d058(0x235)],_0x36b89b=(_0x8b3682,_0x38f593,_0x2b3826,_0x23a34c)=>{const _0x2bf0f3=_0x39d058;for(var _0x4742e9=_0x23a34c>0x1?void 0x0:_0x23a34c?_0x560d1c(_0x38f593,_0x2b3826):_0x38f593,_0x35e84e=_0x8b3682[_0x2bf0f3(0x23c)]-0x1,_0x5f22d2;_0x35e84e>=0x0;_0x35e84e--)(_0x5f22d2=_0x8b3682[_0x35e84e])&&(_0x4742e9=_0x5f22d2(_0x4742e9)||_0x4742e9);return _0x4742e9;},_0x23b51e=(_0x5335ca,_0x4603ea)=>(_0x46ddc4,_0x4c6985)=>_0x4603ea(_0x46ddc4,_0x4c6985,_0x5335ca);let _0x3a49c1=class extends _0x1cb672['Disposable']{constructor(_0x434cf2,_0x591701){const _0x432a16=_0x39d058;super(),this[_0x432a16(0x1d9)]=_0x434cf2,this[_0x432a16(0x227)]=_0x591701,this[_0x432a16(0x20a)]();}['_initDataSource'](){const _0x367dbb=_0x39d058;this[_0x367dbb(0x1d9)]['dataSource']=this[_0x367dbb(0x227)],this[_0x367dbb(0x1d9)][_0x367dbb(0x1fe)]=!0x1;}};_0x3a49c1=_0x36b89b([_0x23b51e(0x0,_0x5c1e74[_0x39d058(0x214)]),_0x23b51e(0x1,_0x1cb672[_0x39d058(0x1dd)](_0x280562))],_0x3a49c1);var _0x40a60f=Object[_0x39d058(0x1d6)],_0x14f7f2=Object[_0x39d058(0x235)],_0x39c8f3=(_0x290fd9,_0x1e8939,_0x4bf910)=>_0x1e8939 in _0x290fd9?_0x40a60f(_0x290fd9,_0x1e8939,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4bf910}):_0x290fd9[_0x1e8939]=_0x4bf910,_0xf7718d=(_0x4686cd,_0x6c805,_0x41bb38,_0x393a17)=>{const _0x2e9f50=_0x39d058;for(var _0x1a7638=_0x393a17>0x1?void 0x0:_0x393a17?_0x14f7f2(_0x6c805,_0x41bb38):_0x6c805,_0x326f79=_0x4686cd[_0x2e9f50(0x23c)]-0x1,_0x4419d7;_0x326f79>=0x0;_0x326f79--)(_0x4419d7=_0x4686cd[_0x326f79])&&(_0x1a7638=_0x4419d7(_0x1a7638)||_0x1a7638);return _0x1a7638;},_0x207f17=(_0x38b8d2,_0x4e986c)=>(_0x593a51,_0x545007)=>_0x4e986c(_0x593a51,_0x545007,_0x38b8d2),_0x535813=(_0x13eddd,_0x1790f6,_0x488f1d)=>_0x39c8f3(_0x13eddd,typeof _0x1790f6!='symbol'?_0x1790f6+'':_0x1790f6,_0x488f1d);_0x54ff32[_0x39d058(0x224)]=class extends _0x1cb672[_0x39d058(0x232)]{constructor(_0x2b6c8e=_0x196c5b,_0x1f0000,_0x102ec5){const _0x49aabf=_0x39d058;super(),this['_config']=_0x2b6c8e,this[_0x49aabf(0x207)]=_0x1f0000,this[_0x49aabf(0x245)]=_0x102ec5;const {..._0x2e186d}=_0x1cb672['merge']({},_0x196c5b,this[_0x49aabf(0x1f9)]);this[_0x49aabf(0x245)][_0x49aabf(0x1e2)](_0x484b90,_0x2e186d);}['onStarting'](){const _0x1b8fce=_0x39d058;[[_0x280562],[_0x3a49c1],[_0x92b7bd]][_0x1b8fce(0x22b)](_0x20ea5d=>{const _0x305eaa=_0x1b8fce;this[_0x305eaa(0x207)][_0x305eaa(0x1da)](_0x20ea5d);});}[_0x39d058(0x238)](){const _0x133eea=_0x39d058;this[_0x133eea(0x207)][_0x133eea(0x1ee)](_0x3a49c1),this[_0x133eea(0x207)][_0x133eea(0x1ee)](_0x92b7bd);}},_0x535813(_0x54ff32[_0x39d058(0x224)],_0x39d058(0x23a),_0x4275b8),_0x535813(_0x54ff32[_0x39d058(0x224)],_0x39d058(0x1e6),_0x1cb672[_0x39d058(0x25a)]['UNIVER_UNKNOWN']),_0x54ff32[_0x39d058(0x224)]=_0xf7718d([_0x1cb672['DependentOn'](_0x3e6c0d[_0x39d058(0x251)],_0xb179c0[_0x39d058(0x204)],_0x47efa6[_0x39d058(0x240)]),_0x207f17(0x1,_0x1cb672['Inject'](_0x1cb672['Injector'])),_0x207f17(0x2,_0x1cb672[_0x39d058(0x234)])],_0x54ff32['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x54ff32,Symbol['toStringTag'],{'value':_0x39d058(0x1d7)});}));function _0x4874(){const _0x2e2b11=['20tuixxH','_threadCommentDataSource','dayjs','/universer-api/comment/unit/','content','forEach','threadId','user','/delete','replies','amd','7626400NauTPV','Plugin','solved','IConfigService','getOwnPropertyDescriptor','4615977gQGiAe','userId','onReady','YYYY/MM/DD\x20HH:mm','pluginName','updateComment','length','1243891EkOuRt','getMemberID','stringify','UniverLicensePlugin','/edit','comment','_userService','comments','_configService','UniverThreadCommentUi','@univerjs-pro/collaboration-client','157344MdVOAg','payload','root','resolved','Unknown','CustomRangeType','Disposable','rxjs','COMMENT','UniverThreadCommentUIPlugin','_httpService','parentId','_commentService','112533PrzGGN','format','OpenOrReOpen','168bdgrWp','disposeWithMe','UniverInstanceType','_init','CommentService','defineProperty','Module','@univerjs/thread-comment','_threadCommentDataSourceService','add','133gsHtpU','users','Inject','97551mOpsxi','replyId','18WcWFVn','_initUserSync','setConfig','Delete','requireSession','pipe','type','ThreadCommentModel','UniverProCollaborationClient','object','map','rangeType','@univerjs/thread-comment-ui','getCurrentUser','get','subscribe','UniverCore','unitId','resolveComment','reply','createTimestamp','@univerjs-pro/license','UniverProLicense','userID','1353355sAaZFK','_config','90ROqQWL','commentUpdate$','HTTPService','addUser','syncUpdateMutationToColla','listComments','/universer-api/user/list','code','CollaborationSessionService','Solve','UniverCollaborationClientPlugin','Edit','_threadCommentModel','_injector','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverProThreadCommentDatasource','_initDataSource','find','deleteComment','post','getUser','UniverThreadComment','rangeId','parse','_sessionService','UserManagerService','IThreadCommentDataSourceService','@univerjs/network','/solved','customRanges','getUnit','filter','Injector','Reply','Add','thread-comment-data-source.config','Solved','getComment','body','error','ref','UNRECOGNIZED','UniverThreadCommentDataSourcePlugin','exports'];_0x4874=function(){return _0x2e2b11;};return _0x4874();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.10.14-nightly.202511070640",
3
+ "version": "0.10.14-nightly.202511080715",
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/license": "0.10.14-nightly.202511070640",
49
- "@univerjs-pro/collaboration-client": "0.10.14-nightly.202511070640",
50
- "@univerjs/core": "0.10.14-nightly.202511070640",
51
- "@univerjs/network": "0.10.14-nightly.202511070640",
52
- "@univerjs/thread-comment": "0.10.14-nightly.202511070640",
48
+ "@univerjs-pro/collaboration-client": "0.10.14-nightly.202511080715",
49
+ "@univerjs-pro/license": "0.10.14-nightly.202511080715",
50
+ "@univerjs/core": "0.10.14-nightly.202511080715",
51
+ "@univerjs/network": "0.10.14-nightly.202511080715",
53
52
  "@univerjs/protocol": "0.1.47",
54
- "@univerjs/thread-comment-ui": "0.10.14-nightly.202511070640"
53
+ "@univerjs/thread-comment": "0.10.14-nightly.202511080715",
54
+ "@univerjs/thread-comment-ui": "0.10.14-nightly.202511080715"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",