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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x233612=_0x22f2;(function(_0x4f3314,_0x25f9a7){const _0x5c1f1d=_0x22f2,_0xf66fde=_0x4f3314();while(!![]){try{const _0x500b0d=parseInt(_0x5c1f1d(0x24d))/0x1+-parseInt(_0x5c1f1d(0x1f7))/0x2*(parseInt(_0x5c1f1d(0x246))/0x3)+parseInt(_0x5c1f1d(0x208))/0x4+parseInt(_0x5c1f1d(0x24f))/0x5*(-parseInt(_0x5c1f1d(0x1f1))/0x6)+parseInt(_0x5c1f1d(0x251))/0x7*(-parseInt(_0x5c1f1d(0x22f))/0x8)+parseInt(_0x5c1f1d(0x20b))/0x9+-parseInt(_0x5c1f1d(0x222))/0xa;if(_0x500b0d===_0x25f9a7)break;else _0xf66fde['push'](_0xf66fde['shift']());}catch(_0x55d7af){_0xf66fde['push'](_0xf66fde['shift']());}}}(_0x5185,0xb4bb7));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x233612(0x1e6)});function _0x22f2(_0xc31f51,_0x538bb0){const _0x5185e1=_0x5185();return _0x22f2=function(_0x22f23c,_0x3bbe7d){_0x22f23c=_0x22f23c-0x1e3;let _0x1ec4a9=_0x5185e1[_0x22f23c];return _0x1ec4a9;},_0x22f2(_0xc31f51,_0x538bb0);}const b=require(_0x233612(0x25d)),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require(_0x233612(0x1eb)),M=require(_0x233612(0x1ec)),w=require(_0x233612(0x25c)),P=require('@univerjs/network'),U=_0x233612(0x1f5);var I=(_0x2fe11b=>(_0x2fe11b[_0x2fe11b[_0x233612(0x23f)]=0x0]=_0x233612(0x23f),_0x2fe11b[_0x2fe11b['Solved']=0x1]=_0x233612(0x203),_0x2fe11b[_0x2fe11b[_0x233612(0x247)]=-0x1]=_0x233612(0x247),_0x2fe11b))(I||{}),v=(_0xd7380c=>(_0xd7380c[_0xd7380c[_0x233612(0x253)]=0x0]=_0x233612(0x253),_0xd7380c[_0xd7380c['Add']=0x1]=_0x233612(0x22d),_0xd7380c[_0xd7380c['Reply']=0x2]=_0x233612(0x257),_0xd7380c[_0xd7380c[_0x233612(0x241)]=0x3]=_0x233612(0x241),_0xd7380c[_0xd7380c[_0x233612(0x1ee)]=0x4]=_0x233612(0x1ee),_0xd7380c[_0xd7380c[_0x233612(0x225)]=0x5]=_0x233612(0x225),_0xd7380c[_0xd7380c[_0x233612(0x247)]=-0x1]=_0x233612(0x247),_0xd7380c))(v||{});const f=_0x3deb1d=>c[_0x233612(0x243)](new Date(+_0x3deb1d))['format'](_0x233612(0x229)),R=async(_0x2541f9,_0x5e465f)=>{const _0x4ab893=_0x233612,_0x3e44a4=_0x2541f9[_0x4ab893(0x21c)](c[_0x4ab893(0x23c)]),_0x1ff8ba=_0x2541f9[_0x4ab893(0x21c)](P[_0x4ab893(0x242)]);_0x5e465f[_0x4ab893(0x250)](_0x5ebc2f=>{const _0x147c63=_0x4ab893;_0x3e44a4[_0x147c63(0x22a)](_0x5ebc2f)&&_0x5e465f[_0x147c63(0x211)](_0x5ebc2f);}),_0x5e465f[_0x4ab893(0x21b)]&&(await _0x1ff8ba['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x5e465f]}}))[_0x4ab893(0x213)][_0x4ab893(0x21a)][_0x4ab893(0x250)](_0x58d94d=>{const _0x291f03=_0x4ab893;_0x58d94d&&_0x3e44a4[_0x291f03(0x209)](_0x58d94d);});};var $=Object[_0x233612(0x228)],E=(_0x25f2d2,_0x47d4e9,_0x1605d5,_0x407a8a)=>{const _0x154c33=_0x233612;for(var _0x20f72c=_0x407a8a>0x1?void 0x0:_0x407a8a?$(_0x47d4e9,_0x1605d5):_0x47d4e9,_0x56713a=_0x25f2d2[_0x154c33(0x24a)]-0x1,_0x1461c7;_0x56713a>=0x0;_0x56713a--)(_0x1461c7=_0x25f2d2[_0x56713a])&&(_0x20f72c=_0x1461c7(_0x20f72c)||_0x20f72c);return _0x20f72c;},S=(_0x5d7ea1,_0x114359)=>(_0x5e7e5e,_0x182b48)=>_0x114359(_0x5e7e5e,_0x182b48,_0x5d7ea1);function _0x5185(){const _0x1f717b=['createTimestamp','resolved','resolveComment','Module','disposeWithMe','add','UniverThreadCommentUIPlugin','userID','@univerjs/thread-comment-ui','@univerjs/thread-comment','addComment','Delete','filter','replyId','6Yaygmv','pipe','rangeType','_commentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','type','4maojRu','content','Plugin','parse','comments','slice','/universer-api/comment/unit/','parentId','_threadCommentDataSource','_configService','requireSession','values','Solved','error','stringify','listComments','dataSource','4902980qAWFrr','addUser','unitId','12677616uCCKfO','_initUserSync','map','merge','rangeId','user','delete','Disposable','body','_injector','replies','Inject','getUnit','syncUpdateMutationToColla','payload','users','size','get','getMemberID','defineProperty','solved','pluginName','root','22956970TyqRih','UniverCollaborationClientPlugin','personId','Solve','code','_userService','getOwnPropertyDescriptor','YYYY/MM/DD\x20HH:mm','getUser','customRanges','onReady','Add','threadId','16XNwQro','UniverThreadCommentDataSourcePlugin','UniverInstanceType','_threadCommentModel','_httpService','comment','thread-comment-data-source.config','/delete','_config','subscribe','ref','UNIVER_UNKNOWN','commentUpdate$','UserManagerService','format','_sessionService','OpenOrReOpen','symbol','Edit','HTTPService','dayjs','getCurrentUser','userId','94641ybIjdF','UNRECOGNIZED','Injector','IConfigService','length','/edit','deleteComment','994375CEdOkx','_threadCommentDataSourceService','569570DCTjgl','forEach','1455160CuHcDg','/add','Unknown','bufferTime','_init','CustomRangeType','Reply','CollaborationSessionService','post','updateComment','COMMENT','rxjs','@univerjs-pro/collaboration-client'];_0x5185=function(){return _0x1f717b;};return _0x5185();}let p=class extends c[_0x233612(0x212)]{constructor(_0x2a6d85,_0x480a59,_0x39a318,_0x24686d){const _0x585a87=_0x233612;super(),this[_0x585a87(0x1f4)]=_0x2a6d85,this[_0x585a87(0x232)]=_0x480a59,this['_userService']=_0x39a318,this['_injector']=_0x24686d,this[_0x585a87(0x255)](),this[_0x585a87(0x20c)]();}[_0x233612(0x20c)](){const _0x6a6c48=_0x233612;this[_0x6a6c48(0x1e7)](this['_threadCommentModel'][_0x6a6c48(0x23b)][_0x6a6c48(0x1f2)](w[_0x6a6c48(0x254)](0x10))['subscribe'](_0xced36d=>{const _0x310b7d=_0x6a6c48,_0x40f7b2=new Set();_0xced36d[_0x310b7d(0x250)](_0x572fb1=>{const _0xb715b0=_0x310b7d;switch(_0x572fb1[_0xb715b0(0x1f6)]){case _0xb715b0(0x1e8):{const _0x163193=_0x572fb1[_0xb715b0(0x219)][_0xb715b0(0x224)];_0x40f7b2[_0xb715b0(0x1e8)](_0x163193);break;}}}),R(this[_0x310b7d(0x214)],_0x40f7b2);}));}[_0x233612(0x255)](){const _0x5429fd=_0x233612;this['disposeWithMe'](this[_0x5429fd(0x1f4)][_0x5429fd(0x23b)][_0x5429fd(0x238)](async _0x530729=>{const _0x522299=_0x5429fd;var _0x4d802a,_0x7c49f,_0x4b3e12,_0x361c4f;const _0x76dde=(_0x4d802a=this[_0x522299(0x232)][_0x522299(0x217)](_0x530729['unitId'])['find'](_0x410b40=>_0x410b40[_0x522299(0x22e)]===_0x530729[_0x522299(0x22e)]))==null?void 0x0:_0x4d802a['root'];if(!_0x76dde)return;const {unitId:_0x2e997c,subUnitId:_0x3be476}=_0x76dde;switch(_0x530729[_0x522299(0x210)]&&this['_userService']['addUser'](_0x530729['user']),_0x530729[_0x522299(0x1f6)]){case v[_0x522299(0x22d)]:break;case v[_0x522299(0x257)]:{this[_0x522299(0x232)][_0x522299(0x1ed)](_0x2e997c,_0x3be476,{'unitId':_0x2e997c,'subUnitId':_0x3be476,'ref':'','id':_0x530729['replyId'],'dT':f(+_0x530729[_0x522299(0x1e3)]),'threadId':_0x530729[_0x522299(0x22e)],'personId':(_0x4b3e12=(_0x7c49f=_0x530729[_0x522299(0x210)])==null?void 0x0:_0x7c49f['userID'])!=null?_0x4b3e12:_0x530729['userId'],'text':JSON['parse'](_0x530729[_0x522299(0x1f8)]),'parentId':_0x76dde['id']});break;}case v['Delete']:{const _0x2fe960=this[_0x522299(0x232)]['getComment'](_0x2e997c,_0x3be476,_0x530729[_0x522299(0x1f0)]);_0x2fe960&&_0x2fe960[_0x522299(0x1fe)]&&this[_0x522299(0x232)][_0x522299(0x24c)](_0x2e997c,_0x3be476,_0x530729[_0x522299(0x1f0)]);break;}case v[_0x522299(0x241)]:{this[_0x522299(0x232)][_0x522299(0x25a)](_0x2e997c,_0x3be476,{'commentId':_0x530729[_0x522299(0x1f0)],'text':JSON['parse'](_0x530729[_0x522299(0x1f8)])});break;}case v[_0x522299(0x225)]:{const _0x5963ba=(_0x361c4f=this[_0x522299(0x232)]['getUnit'](_0x530729[_0x522299(0x20a)])['find'](_0x4d7e67=>_0x4d7e67['threadId']===_0x530729[_0x522299(0x22e)]))==null?void 0x0:_0x361c4f[_0x522299(0x221)];_0x5963ba&&this[_0x522299(0x232)][_0x522299(0x1e5)](_0x2e997c,_0x3be476,_0x5963ba['id'],_0x530729[_0x522299(0x21f)]===I['Solved']);break;}}}));}};p=E([S(0x0,c['Inject'](b['CommentService'])),S(0x1,c[_0x233612(0x216)](M['ThreadCommentModel'])),S(0x2,c[_0x233612(0x216)](c[_0x233612(0x23c)])),S(0x3,c[_0x233612(0x216)](c['Injector']))],p);const q=_0x233612(0x235),D={};var A=Object[_0x233612(0x228)],x=(_0x442f4a,_0x45f50d,_0x834657,_0xd505d3)=>{const _0x8eb6a8=_0x233612;for(var _0x174d37=_0xd505d3>0x1?void 0x0:_0xd505d3?A(_0x45f50d,_0x834657):_0x45f50d,_0x5c3f84=_0x442f4a[_0x8eb6a8(0x24a)]-0x1,_0x2679fa;_0x5c3f84>=0x0;_0x5c3f84--)(_0x2679fa=_0x442f4a[_0x5c3f84])&&(_0x174d37=_0x2679fa(_0x174d37)||_0x174d37);return _0x174d37;},_=(_0x427785,_0x2b9748)=>(_0xac2876,_0x3e0bc3)=>_0x2b9748(_0xac2876,_0x3e0bc3,_0x427785);function Y(_0x2c86eb,_0x5e4056){const _0x37e9b5=_0x233612,_0xfab92=_0x2c86eb[_0x37e9b5(0x215)][0x0];return{..._0x5e4056,'id':_0xfab92[_0x37e9b5(0x1f0)],'resolved':_0x2c86eb[_0x37e9b5(0x21f)]===0x1,'dT':f(_0xfab92[_0x37e9b5(0x1e3)]),'personId':_0xfab92['userId'],'threadId':_0xfab92['threadId']};}function G(_0xd47af3,_0x4e521e,_0x3f7036){const _0xd3963b=_0x233612;var _0x352adf,_0x241dfa;if(((_0x241dfa=(_0x352adf=_0xd47af3==null?void 0x0:_0xd47af3[_0xd3963b(0x215)])==null?void 0x0:_0x352adf[_0xd3963b(0x24a)])!=null?_0x241dfa:0x0)>0x0){const _0x5a5326=(_0x5c062a,_0xc6266f)=>({'id':_0x5c062a[_0xd3963b(0x1f0)],'threadId':_0x5c062a[_0xd3963b(0x22e)],'dT':f(_0x5c062a[_0xd3963b(0x1e3)]),'personId':_0x5c062a[_0xd3963b(0x245)],'resolved':_0xd47af3[_0xd3963b(0x21f)]===I['Solved'],'unitId':_0x4e521e,'subUnitId':_0x3f7036,'text':JSON[_0xd3963b(0x1fa)](_0x5c062a[_0xd3963b(0x1f8)]),'parentId':_0xc6266f}),_0x389851=_0x5a5326(_0xd47af3[_0xd3963b(0x215)][0x0]);return{..._0x389851,'children':_0xd47af3['replies'][_0xd3963b(0x1fc)](0x1)['map'](_0x205dc5=>_0x5a5326(_0x205dc5,_0x389851['id']))};}return null;}let g=class{constructor(_0x870b9c,_0x460ad0,_0x441476,_0x426f1c){const _0xffb88=_0x233612;this[_0xffb88(0x233)]=_0x870b9c,this[_0xffb88(0x227)]=_0x460ad0,this[_0xffb88(0x23e)]=_0x441476,this[_0xffb88(0x214)]=_0x426f1c;}async[_0x233612(0x1ed)](_0x15d7e0){const _0x28f652=_0x233612;var _0x406194,_0x1cc1af;const {parentId:_0x3a2e16,unitId:_0xb7f8a4,text:_0x1dbacc,threadId:_0x443840}=_0x15d7e0,_0x27c346=(_0x1cc1af=(_0x406194=_0x1dbacc['customRanges'])==null?void 0x0:_0x406194[_0x28f652(0x1ef)](_0x5a440b=>_0x5a440b[_0x28f652(0x1f3)]===c[_0x28f652(0x256)][_0x28f652(0x25b)])['map'](_0x21d089=>_0x21d089['rangeId']))!=null?_0x1cc1af:[],_0x1357dc=JSON[_0x28f652(0x205)](_0x1dbacc),_0x4edbe7=(await this[_0x28f652(0x23e)]['requireSession'](_0xb7f8a4))[_0x28f652(0x21d)]();if(_0x3a2e16){const _0x2a919e={'memberId':_0x4edbe7,'unitId':_0xb7f8a4,'content':_0x1357dc,'mention':_0x27c346,'threadId':_0x443840},_0x4f3def=(await this[_0x28f652(0x233)][_0x28f652(0x259)](_0x28f652(0x1fd)+_0xb7f8a4+'/reply',{'body':_0x2a919e}))[_0x28f652(0x213)]['reply'];return{..._0x15d7e0,'id':_0x4f3def[_0x28f652(0x1f0)],'dT':c[_0x28f652(0x243)](+_0x4f3def[_0x28f652(0x1e3)])[_0x28f652(0x23d)](_0x28f652(0x229)),'personId':_0x4f3def[_0x28f652(0x245)]};}else{const _0x55c9a7={'memberId':_0x4edbe7,'unitId':_0xb7f8a4,'content':_0x1357dc,'mention':_0x27c346},_0x1d94c4=await this[_0x28f652(0x233)]['post'](_0x28f652(0x1fd)+_0xb7f8a4+_0x28f652(0x252),{'body':_0x55c9a7});return Y(_0x1d94c4[_0x28f652(0x213)][_0x28f652(0x234)],_0x15d7e0);}}async['updateComment'](_0x32e1ab){const _0x22a2a7=_0x233612;var _0x1cb374,_0x1b5369;const {text:_0x120de6,unitId:_0xc0f58b}=_0x32e1ab,_0x129ea5=(_0x1b5369=(_0x1cb374=_0x120de6[_0x22a2a7(0x22b)])==null?void 0x0:_0x1cb374[_0x22a2a7(0x1ef)](_0x251c09=>_0x251c09[_0x22a2a7(0x1f3)]===c[_0x22a2a7(0x256)][_0x22a2a7(0x25b)])[_0x22a2a7(0x20d)](_0x11d3b6=>_0x11d3b6[_0x22a2a7(0x20f)]))!=null?_0x1b5369:[],_0x4af19d=JSON[_0x22a2a7(0x205)](_0x120de6),_0x50c34a=_0x32e1ab[_0x22a2a7(0x22e)],_0x163008=_0x32e1ab['id'],_0x282f71={'memberId':(await this[_0x22a2a7(0x23e)][_0x22a2a7(0x201)](_0xc0f58b))['getMemberID'](),'unitId':_0xc0f58b,'threadId':_0x50c34a,'mention':_0x129ea5,'content':_0x4af19d,'replyId':_0x163008},_0x1904ae=await this[_0x22a2a7(0x233)][_0x22a2a7(0x259)](_0x22a2a7(0x1fd)+_0xc0f58b+_0x22a2a7(0x24b),{'body':_0x282f71});return!_0x1904ae['body'][_0x22a2a7(0x204)]||_0x1904ae[_0x22a2a7(0x213)][_0x22a2a7(0x204)][_0x22a2a7(0x226)]===0x1;}async['resolveComment'](_0x5d0ef3){const _0x4056a2=_0x233612,{unitId:_0x5b0467}=_0x5d0ef3,_0x5925af=_0x5d0ef3['threadId'],_0x58786b={'memberId':this[_0x4056a2(0x227)][_0x4056a2(0x244)]()[_0x4056a2(0x1ea)],'unitId':_0x5b0467,'threadId':_0x5925af,'solved':_0x5d0ef3[_0x4056a2(0x1e4)]?I[_0x4056a2(0x203)]:I[_0x4056a2(0x23f)]},_0x5f441a=await this[_0x4056a2(0x233)][_0x4056a2(0x259)](_0x4056a2(0x1fd)+_0x5b0467+'/solved',{'body':_0x58786b});return!_0x5f441a[_0x4056a2(0x213)][_0x4056a2(0x204)]||_0x5f441a[_0x4056a2(0x213)]['error'][_0x4056a2(0x226)]===0x1;}async[_0x233612(0x24c)](_0x4fd157,_0x45ad58,_0x5440e2,_0xb248fd){const _0x1682a7=_0x233612,_0xd9cc49={'memberId':(await this['_sessionService']['requireSession'](_0x4fd157))[_0x1682a7(0x21d)](),'threadId':_0x5440e2,'replyId':_0xb248fd,'unitId':_0x4fd157},_0x2280d5=await this[_0x1682a7(0x233)][_0x1682a7(0x259)](_0x1682a7(0x1fd)+_0x4fd157+_0x1682a7(0x236),{'body':_0xd9cc49});return!_0x2280d5[_0x1682a7(0x213)]['error']||_0x2280d5[_0x1682a7(0x213)]['error'][_0x1682a7(0x226)]===0x1;}async[_0x233612(0x206)](_0xf3a628,_0x547bc3,_0x495987){const _0x9178cf=_0x233612,_0x34a3f0={'unitId':_0xf3a628,'threadId':_0x495987},_0x2ecd89=await this[_0x9178cf(0x233)][_0x9178cf(0x259)]('/universer-api/comment/unit/'+_0xf3a628+'/list',{'body':_0x34a3f0}),_0x42ecb7=_0x495987[_0x9178cf(0x20d)](_0x25854d=>G(_0x2ecd89['body'][_0x9178cf(0x1fb)][_0x25854d],_0xf3a628,_0x547bc3))[_0x9178cf(0x1ef)](Boolean);return Object[_0x9178cf(0x202)](_0x2ecd89['body']['users'])[_0x9178cf(0x250)](_0x4c4fbf=>{const _0x26e7ea=_0x9178cf;this[_0x26e7ea(0x227)][_0x26e7ea(0x209)](_0x4c4fbf);}),_0x42ecb7;}['saveCommentToSnapshot'](_0x31344b){const _0x36e729=_0x233612;return{'id':_0x31344b['id'],'threadId':_0x31344b[_0x36e729(0x22e)],'ref':_0x31344b[_0x36e729(0x239)]};}};g=x([_(0x0,c[_0x233612(0x216)](P[_0x233612(0x242)])),_(0x1,c[_0x233612(0x216)](c[_0x233612(0x23c)])),_(0x2,c['Inject'](b[_0x233612(0x258)])),_(0x3,c[_0x233612(0x216)](c['Injector']))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x698595,_0x3fa914,_0x35544e,_0x21dde3)=>{const _0x1039f7=_0x233612;for(var _0x5eedec=_0x21dde3>0x1?void 0x0:_0x21dde3?H(_0x3fa914,_0x35544e):_0x3fa914,_0x44ebd5=_0x698595[_0x1039f7(0x24a)]-0x1,_0x5ece2c;_0x44ebd5>=0x0;_0x44ebd5--)(_0x5ece2c=_0x698595[_0x44ebd5])&&(_0x5eedec=_0x5ece2c(_0x5eedec)||_0x5eedec);return _0x5eedec;},y=(_0x45b5af,_0x5a0a2a)=>(_0x86ffcf,_0x3aae58)=>_0x5a0a2a(_0x86ffcf,_0x3aae58,_0x45b5af);let C=class extends c[_0x233612(0x212)]{constructor(_0x56e2d2,_0x19bd30){const _0x23981d=_0x233612;super(),this[_0x23981d(0x24e)]=_0x56e2d2,this[_0x23981d(0x1ff)]=_0x19bd30,this['_initDataSource']();}['_initDataSource'](){const _0x21dea6=_0x233612;this[_0x21dea6(0x24e)][_0x21dea6(0x207)]=this[_0x21dea6(0x1ff)],this[_0x21dea6(0x24e)][_0x21dea6(0x218)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x233612(0x216)](g))],C);var F=Object[_0x233612(0x21e)],L=Object[_0x233612(0x228)],Z=(_0x428173,_0x482c80,_0x59cf8f)=>_0x482c80 in _0x428173?F(_0x428173,_0x482c80,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x59cf8f}):_0x428173[_0x482c80]=_0x59cf8f,W=(_0x371f47,_0x235737,_0x3666c8,_0x174f32)=>{const _0x11e660=_0x233612;for(var _0x2b65e=_0x174f32>0x1?void 0x0:_0x174f32?L(_0x235737,_0x3666c8):_0x235737,_0x4e986a=_0x371f47[_0x11e660(0x24a)]-0x1,_0x57cbd6;_0x4e986a>=0x0;_0x4e986a--)(_0x57cbd6=_0x371f47[_0x4e986a])&&(_0x2b65e=_0x57cbd6(_0x2b65e)||_0x2b65e);return _0x2b65e;},O=(_0x533abe,_0x43bc27)=>(_0x342e3b,_0x2cfe7e)=>_0x43bc27(_0x342e3b,_0x2cfe7e,_0x533abe),N=(_0x43f192,_0x1954a6,_0x2fc08b)=>Z(_0x43f192,typeof _0x1954a6!=_0x233612(0x240)?_0x1954a6+'':_0x1954a6,_0x2fc08b);exports[_0x233612(0x230)]=class extends c[_0x233612(0x1f9)]{constructor(_0x4a0936=D,_0x409c83,_0x4cac2a){const _0x47d230=_0x233612;super(),this[_0x47d230(0x237)]=_0x4a0936,this['_injector']=_0x409c83,this[_0x47d230(0x200)]=_0x4cac2a;const {..._0x3a86ee}=c[_0x47d230(0x20e)]({},D,this['_config']);this[_0x47d230(0x200)]['setConfig'](q,_0x3a86ee);}['onStarting'](){const _0x2fccd7=_0x233612;[[g],[C],[p]][_0x2fccd7(0x250)](_0x3278e1=>{const _0x24af72=_0x2fccd7;this[_0x24af72(0x214)][_0x24af72(0x1e8)](_0x3278e1);});}[_0x233612(0x22c)](){const _0x31ff71=_0x233612;this[_0x31ff71(0x214)][_0x31ff71(0x21c)](C),this[_0x31ff71(0x214)][_0x31ff71(0x21c)](p);}},N(exports[_0x233612(0x230)],_0x233612(0x220),U),N(exports[_0x233612(0x230)],'type',c[_0x233612(0x231)][_0x233612(0x23a)]),exports[_0x233612(0x230)]=W([c['DependentOn'](j[_0x233612(0x1e9)],b[_0x233612(0x223)],T['UniverLicensePlugin']),O(0x1,c[_0x233612(0x216)](c[_0x233612(0x248)])),O(0x2,c[_0x233612(0x249)])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0x528a9f=_0x22fc;(function(_0x38529b,_0x571ac0){const _0x5af93b=_0x22fc,_0x350212=_0x38529b();while(!![]){try{const _0x3cdf22=parseInt(_0x5af93b(0x1c5))/0x1+parseInt(_0x5af93b(0x22b))/0x2*(parseInt(_0x5af93b(0x20d))/0x3)+parseInt(_0x5af93b(0x20e))/0x4+parseInt(_0x5af93b(0x230))/0x5*(-parseInt(_0x5af93b(0x1e5))/0x6)+-parseInt(_0x5af93b(0x1f0))/0x7+parseInt(_0x5af93b(0x1fb))/0x8*(parseInt(_0x5af93b(0x1db))/0x9)+-parseInt(_0x5af93b(0x1c7))/0xa*(-parseInt(_0x5af93b(0x1e8))/0xb);if(_0x3cdf22===_0x571ac0)break;else _0x350212['push'](_0x350212['shift']());}catch(_0x158956){_0x350212['push'](_0x350212['shift']());}}}(_0x52c7,0x35c3a));Object['defineProperty'](exports,Symbol[_0x528a9f(0x215)],{'value':'Module'});const b=require(_0x528a9f(0x1ca)),T=require(_0x528a9f(0x205)),c=require(_0x528a9f(0x20c)),j=require(_0x528a9f(0x1f6)),M=require(_0x528a9f(0x1d9)),w=require(_0x528a9f(0x214)),P=require('@univerjs/network'),U=_0x528a9f(0x22f);var I=(_0x426b0a=>(_0x426b0a[_0x426b0a['OpenOrReOpen']=0x0]=_0x528a9f(0x236),_0x426b0a[_0x426b0a[_0x528a9f(0x233)]=0x1]='Solved',_0x426b0a[_0x426b0a['UNRECOGNIZED']=-0x1]=_0x528a9f(0x20b),_0x426b0a))(I||{}),v=(_0x1b3ad5=>(_0x1b3ad5[_0x1b3ad5[_0x528a9f(0x1e7)]=0x0]=_0x528a9f(0x1e7),_0x1b3ad5[_0x1b3ad5['Add']=0x1]=_0x528a9f(0x232),_0x1b3ad5[_0x1b3ad5[_0x528a9f(0x1f5)]=0x2]=_0x528a9f(0x1f5),_0x1b3ad5[_0x1b3ad5[_0x528a9f(0x1f1)]=0x3]='Edit',_0x1b3ad5[_0x1b3ad5[_0x528a9f(0x231)]=0x4]=_0x528a9f(0x231),_0x1b3ad5[_0x1b3ad5['Solve']=0x5]=_0x528a9f(0x243),_0x1b3ad5[_0x1b3ad5[_0x528a9f(0x20b)]=-0x1]=_0x528a9f(0x20b),_0x1b3ad5))(v||{});const f=_0x5e7254=>c[_0x528a9f(0x229)](new Date(+_0x5e7254))[_0x528a9f(0x1ce)](_0x528a9f(0x23d)),R=async(_0x4e30e5,_0x2b897d)=>{const _0x10acc0=_0x528a9f,_0x43eb36=_0x4e30e5[_0x10acc0(0x1eb)](c['UserManagerService']),_0x2d3f21=_0x4e30e5['get'](P['HTTPService']);_0x2b897d[_0x10acc0(0x1d4)](_0x3237b0=>{const _0x2c8e31=_0x10acc0;_0x43eb36[_0x2c8e31(0x216)](_0x3237b0)&&_0x2b897d['delete'](_0x3237b0);}),_0x2b897d['size']&&(await _0x2d3f21[_0x10acc0(0x1eb)](_0x10acc0(0x1cc),{'params':{'userIDs':[..._0x2b897d]}}))[_0x10acc0(0x1f3)][_0x10acc0(0x1e6)][_0x10acc0(0x1d4)](_0x150cd0=>{const _0x387f38=_0x10acc0;_0x150cd0&&_0x43eb36[_0x387f38(0x225)](_0x150cd0);});};function _0x52c7(){const _0x2848c6=['338544XHclVb','values','148860zpvlpK','comments','/reply','@univerjs-pro/collaboration-client','type','/universer-api/user/list','slice','format','IThreadCommentDataSourceService','deleteComment','UserManagerService','/edit','reply','forEach','bufferTime','post','UniverThreadCommentDataSourcePlugin','CollaborationSessionService','@univerjs/thread-comment','comment','9iAzWfu','CommentService','getUnit','subscribe','/delete','payload','_threadCommentModel','unitId','Disposable','error','150054JLDxwc','users','Unknown','66UcdUeY','createTimestamp','COMMENT','get','userId','content','add','IConfigService','2848650PdrHbL','Edit','getOwnPropertyDescriptor','body','ThreadCommentModel','Reply','@univerjs/thread-comment-ui','getCurrentUser','/universer-api/comment/unit/','rangeId','_configService','2040584HkWsbc','find','Plugin','_injector','DependentOn','threadId','filter','_threadCommentDataSource','getComment','_threadCommentDataSourceService','@univerjs-pro/license','addComment','UniverCollaborationClientPlugin','commentUpdate$','userID','/solved','UNRECOGNIZED','@univerjs/core','4308TAzNal','447504KPTgRn','getMemberID','_userService','_initDataSource','customRanges','HTTPService','rxjs','toStringTag','getUser','disposeWithMe','pipe','user','ref','Injector','symbol','defineProperty','root','length','pluginName','/add','/list','setConfig','updateComment','addUser','rangeType','_sessionService','UniverLicensePlugin','dayjs','onReady','80enXzNA','stringify','replyId','map','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','45XTzIpZ','Delete','Add','Solved','_httpService','dataSource','OpenOrReOpen','Inject','_initUserSync','CustomRangeType','solved','_init','_config','YYYY/MM/DD\x20HH:mm','code','onStarting','parentId','replies','resolveComment','Solve'];_0x52c7=function(){return _0x2848c6;};return _0x52c7();}var $=Object[_0x528a9f(0x1f2)],E=(_0x1e0879,_0x59bd40,_0xde60c2,_0x4503d7)=>{for(var _0x3ba808=_0x4503d7>0x1?void 0x0:_0x4503d7?$(_0x59bd40,_0xde60c2):_0x59bd40,_0x1b4815=_0x1e0879['length']-0x1,_0x1872d1;_0x1b4815>=0x0;_0x1b4815--)(_0x1872d1=_0x1e0879[_0x1b4815])&&(_0x3ba808=_0x1872d1(_0x3ba808)||_0x3ba808);return _0x3ba808;},S=(_0x39f939,_0x33b9d4)=>(_0x3d790a,_0x3bec44)=>_0x33b9d4(_0x3d790a,_0x3bec44,_0x39f939);let p=class extends c[_0x528a9f(0x1e3)]{constructor(_0x4634c7,_0x48d69a,_0x2c4846,_0x68e41f){const _0x30b1b6=_0x528a9f;super(),this['_commentService']=_0x4634c7,this[_0x30b1b6(0x1e1)]=_0x48d69a,this[_0x30b1b6(0x210)]=_0x2c4846,this['_injector']=_0x68e41f,this['_init'](),this[_0x30b1b6(0x238)]();}['_initUserSync'](){const _0x372829=_0x528a9f;this[_0x372829(0x217)](this[_0x372829(0x1e1)][_0x372829(0x208)][_0x372829(0x218)](w[_0x372829(0x1d5)](0x10))['subscribe'](_0x3de0bf=>{const _0x46c4b7=_0x372829,_0x4994cc=new Set();_0x3de0bf[_0x46c4b7(0x1d4)](_0xb33cb6=>{const _0x249d44=_0x46c4b7;switch(_0xb33cb6[_0x249d44(0x1cb)]){case'add':{const _0x32c6d9=_0xb33cb6[_0x249d44(0x1e0)]['personId'];_0x4994cc['add'](_0x32c6d9);break;}}}),R(this[_0x46c4b7(0x1fe)],_0x4994cc);}));}[_0x528a9f(0x23b)](){const _0x1a9c69=_0x528a9f;this[_0x1a9c69(0x217)](this['_commentService'][_0x1a9c69(0x208)][_0x1a9c69(0x1de)](async _0x43c818=>{const _0x550967=_0x1a9c69;var _0x2a2919,_0x191d76,_0x3577de,_0x3b58c6;const _0x284b82=(_0x2a2919=this[_0x550967(0x1e1)][_0x550967(0x1dd)](_0x43c818[_0x550967(0x1e2)])['find'](_0x55c186=>_0x55c186['threadId']===_0x43c818['threadId']))==null?void 0x0:_0x2a2919[_0x550967(0x21e)];if(!_0x284b82)return;const {unitId:_0x3d482f,subUnitId:_0x31dc7d}=_0x284b82;switch(_0x43c818[_0x550967(0x219)]&&this['_userService']['addUser'](_0x43c818['user']),_0x43c818[_0x550967(0x1cb)]){case v[_0x550967(0x232)]:break;case v[_0x550967(0x1f5)]:{this['_threadCommentModel'][_0x550967(0x206)](_0x3d482f,_0x31dc7d,{'unitId':_0x3d482f,'subUnitId':_0x31dc7d,'ref':'','id':_0x43c818[_0x550967(0x22d)],'dT':f(+_0x43c818[_0x550967(0x1e9)]),'threadId':_0x43c818[_0x550967(0x200)],'personId':(_0x3577de=(_0x191d76=_0x43c818[_0x550967(0x219)])==null?void 0x0:_0x191d76[_0x550967(0x209)])!=null?_0x3577de:_0x43c818[_0x550967(0x1ec)],'text':JSON['parse'](_0x43c818[_0x550967(0x1ed)]),'parentId':_0x284b82['id']});break;}case v['Delete']:{const _0x2d04c7=this['_threadCommentModel'][_0x550967(0x203)](_0x3d482f,_0x31dc7d,_0x43c818['replyId']);_0x2d04c7&&_0x2d04c7[_0x550967(0x240)]&&this[_0x550967(0x1e1)][_0x550967(0x1d0)](_0x3d482f,_0x31dc7d,_0x43c818['replyId']);break;}case v[_0x550967(0x1f1)]:{this['_threadCommentModel'][_0x550967(0x224)](_0x3d482f,_0x31dc7d,{'commentId':_0x43c818[_0x550967(0x22d)],'text':JSON['parse'](_0x43c818[_0x550967(0x1ed)])});break;}case v[_0x550967(0x243)]:{const _0x756157=(_0x3b58c6=this[_0x550967(0x1e1)][_0x550967(0x1dd)](_0x43c818['unitId'])[_0x550967(0x1fc)](_0xecde27=>_0xecde27['threadId']===_0x43c818['threadId']))==null?void 0x0:_0x3b58c6['root'];_0x756157&&this[_0x550967(0x1e1)][_0x550967(0x242)](_0x3d482f,_0x31dc7d,_0x756157['id'],_0x43c818[_0x550967(0x23a)]===I[_0x550967(0x233)]);break;}}}));}};p=E([S(0x0,c[_0x528a9f(0x237)](b[_0x528a9f(0x1dc)])),S(0x1,c[_0x528a9f(0x237)](M[_0x528a9f(0x1f4)])),S(0x2,c[_0x528a9f(0x237)](c[_0x528a9f(0x1d1)])),S(0x3,c[_0x528a9f(0x237)](c[_0x528a9f(0x21b)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x528a9f(0x1f2)],x=(_0x34e8a2,_0x881297,_0x4b1afd,_0x58b4d8)=>{const _0xf6f8bf=_0x528a9f;for(var _0x5dcd95=_0x58b4d8>0x1?void 0x0:_0x58b4d8?A(_0x881297,_0x4b1afd):_0x881297,_0x1b55be=_0x34e8a2[_0xf6f8bf(0x21f)]-0x1,_0x56f4e4;_0x1b55be>=0x0;_0x1b55be--)(_0x56f4e4=_0x34e8a2[_0x1b55be])&&(_0x5dcd95=_0x56f4e4(_0x5dcd95)||_0x5dcd95);return _0x5dcd95;},_=(_0x205199,_0x1e6b02)=>(_0x3d89f1,_0x559b1d)=>_0x1e6b02(_0x3d89f1,_0x559b1d,_0x205199);function Y(_0x3d7c29,_0x425a4a){const _0x5ed7c3=_0x528a9f,_0x338de8=_0x3d7c29[_0x5ed7c3(0x241)][0x0];return{..._0x425a4a,'id':_0x338de8['replyId'],'resolved':_0x3d7c29[_0x5ed7c3(0x23a)]===0x1,'dT':f(_0x338de8['createTimestamp']),'personId':_0x338de8[_0x5ed7c3(0x1ec)],'threadId':_0x338de8['threadId']};}function G(_0x4aab2b,_0x47da3d,_0x259d4d){const _0x539362=_0x528a9f;var _0x28f627,_0x13b0c6;if(((_0x13b0c6=(_0x28f627=_0x4aab2b==null?void 0x0:_0x4aab2b[_0x539362(0x241)])==null?void 0x0:_0x28f627[_0x539362(0x21f)])!=null?_0x13b0c6:0x0)>0x0){const _0x534bfc=(_0x4d5031,_0x50620f)=>({'id':_0x4d5031[_0x539362(0x22d)],'threadId':_0x4d5031[_0x539362(0x200)],'dT':f(_0x4d5031[_0x539362(0x1e9)]),'personId':_0x4d5031[_0x539362(0x1ec)],'resolved':_0x4aab2b['solved']===I[_0x539362(0x233)],'unitId':_0x47da3d,'subUnitId':_0x259d4d,'text':JSON['parse'](_0x4d5031['content']),'parentId':_0x50620f}),_0x692d71=_0x534bfc(_0x4aab2b[_0x539362(0x241)][0x0]);return{..._0x692d71,'children':_0x4aab2b[_0x539362(0x241)][_0x539362(0x1cd)](0x1)[_0x539362(0x22e)](_0x4a0880=>_0x534bfc(_0x4a0880,_0x692d71['id']))};}return null;}let g=class{constructor(_0x13ab9e,_0xfd725b,_0x311f96,_0x52745c){const _0xe9f54f=_0x528a9f;this['_httpService']=_0x13ab9e,this[_0xe9f54f(0x210)]=_0xfd725b,this[_0xe9f54f(0x227)]=_0x311f96,this[_0xe9f54f(0x1fe)]=_0x52745c;}async[_0x528a9f(0x206)](_0x35187e){const _0x45066c=_0x528a9f;var _0x4cbd1d,_0x211ba9;const {parentId:_0x5e21ee,unitId:_0x1071bb,text:_0x55e839,threadId:_0x438433}=_0x35187e,_0xc8f11e=(_0x211ba9=(_0x4cbd1d=_0x55e839[_0x45066c(0x212)])==null?void 0x0:_0x4cbd1d['filter'](_0x58f6b6=>_0x58f6b6[_0x45066c(0x226)]===c[_0x45066c(0x239)][_0x45066c(0x1ea)])[_0x45066c(0x22e)](_0x1bd1d7=>_0x1bd1d7[_0x45066c(0x1f9)]))!=null?_0x211ba9:[],_0x49db3a=JSON[_0x45066c(0x22c)](_0x55e839),_0x2018f8=(await this[_0x45066c(0x227)]['requireSession'](_0x1071bb))[_0x45066c(0x20f)]();if(_0x5e21ee){const _0x3af894={'memberId':_0x2018f8,'unitId':_0x1071bb,'content':_0x49db3a,'mention':_0xc8f11e,'threadId':_0x438433},_0x279f2f=(await this[_0x45066c(0x234)][_0x45066c(0x1d6)](_0x45066c(0x1f8)+_0x1071bb+_0x45066c(0x1c9),{'body':_0x3af894}))[_0x45066c(0x1f3)][_0x45066c(0x1d3)];return{..._0x35187e,'id':_0x279f2f[_0x45066c(0x22d)],'dT':c[_0x45066c(0x229)](+_0x279f2f[_0x45066c(0x1e9)])[_0x45066c(0x1ce)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x279f2f[_0x45066c(0x1ec)]};}else{const _0x246bf6={'memberId':_0x2018f8,'unitId':_0x1071bb,'content':_0x49db3a,'mention':_0xc8f11e},_0x250a28=await this['_httpService'][_0x45066c(0x1d6)]('/universer-api/comment/unit/'+_0x1071bb+_0x45066c(0x221),{'body':_0x246bf6});return Y(_0x250a28[_0x45066c(0x1f3)][_0x45066c(0x1da)],_0x35187e);}}async[_0x528a9f(0x224)](_0x881abc){const _0x124743=_0x528a9f;var _0x4c9b17,_0x229ec8;const {text:_0x4a9d0f,unitId:_0x582b46}=_0x881abc,_0x440c0c=(_0x229ec8=(_0x4c9b17=_0x4a9d0f[_0x124743(0x212)])==null?void 0x0:_0x4c9b17['filter'](_0x25d690=>_0x25d690['rangeType']===c['CustomRangeType'][_0x124743(0x1ea)])[_0x124743(0x22e)](_0x3d95aa=>_0x3d95aa['rangeId']))!=null?_0x229ec8:[],_0x53f81e=JSON[_0x124743(0x22c)](_0x4a9d0f),_0x34eb15=_0x881abc[_0x124743(0x200)],_0x28fcce=_0x881abc['id'],_0x12a32b={'memberId':(await this[_0x124743(0x227)]['requireSession'](_0x582b46))[_0x124743(0x20f)](),'unitId':_0x582b46,'threadId':_0x34eb15,'mention':_0x440c0c,'content':_0x53f81e,'replyId':_0x28fcce},_0x4d5556=await this[_0x124743(0x234)]['post'](_0x124743(0x1f8)+_0x582b46+_0x124743(0x1d2),{'body':_0x12a32b});return!_0x4d5556[_0x124743(0x1f3)][_0x124743(0x1e4)]||_0x4d5556[_0x124743(0x1f3)][_0x124743(0x1e4)][_0x124743(0x23e)]===0x1;}async[_0x528a9f(0x242)](_0x3dfddc){const _0x34edde=_0x528a9f,{unitId:_0x582ee1}=_0x3dfddc,_0x31392f=_0x3dfddc['threadId'],_0x162c51={'memberId':this[_0x34edde(0x210)][_0x34edde(0x1f7)]()[_0x34edde(0x209)],'unitId':_0x582ee1,'threadId':_0x31392f,'solved':_0x3dfddc['resolved']?I[_0x34edde(0x233)]:I[_0x34edde(0x236)]},_0x392c0a=await this[_0x34edde(0x234)]['post'](_0x34edde(0x1f8)+_0x582ee1+_0x34edde(0x20a),{'body':_0x162c51});return!_0x392c0a['body']['error']||_0x392c0a[_0x34edde(0x1f3)][_0x34edde(0x1e4)]['code']===0x1;}async[_0x528a9f(0x1d0)](_0xd34e41,_0x445aab,_0x165778,_0x17fce1){const _0x2c038e=_0x528a9f,_0x506472={'memberId':(await this[_0x2c038e(0x227)]['requireSession'](_0xd34e41))[_0x2c038e(0x20f)](),'threadId':_0x165778,'replyId':_0x17fce1,'unitId':_0xd34e41},_0x4c5873=await this[_0x2c038e(0x234)][_0x2c038e(0x1d6)](_0x2c038e(0x1f8)+_0xd34e41+_0x2c038e(0x1df),{'body':_0x506472});return!_0x4c5873[_0x2c038e(0x1f3)][_0x2c038e(0x1e4)]||_0x4c5873[_0x2c038e(0x1f3)][_0x2c038e(0x1e4)]['code']===0x1;}async['listComments'](_0x19aa31,_0x5db856,_0x25feaf){const _0x58fedd=_0x528a9f,_0x9dd90a={'unitId':_0x19aa31,'threadId':_0x25feaf},_0x319b0e=await this[_0x58fedd(0x234)][_0x58fedd(0x1d6)]('/universer-api/comment/unit/'+_0x19aa31+_0x58fedd(0x222),{'body':_0x9dd90a}),_0x1b5121=_0x25feaf[_0x58fedd(0x22e)](_0x3242f1=>G(_0x319b0e[_0x58fedd(0x1f3)][_0x58fedd(0x1c8)][_0x3242f1],_0x19aa31,_0x5db856))[_0x58fedd(0x201)](Boolean);return Object[_0x58fedd(0x1c6)](_0x319b0e[_0x58fedd(0x1f3)][_0x58fedd(0x1e6)])[_0x58fedd(0x1d4)](_0x492f29=>{const _0x21df10=_0x58fedd;this[_0x21df10(0x210)][_0x21df10(0x225)](_0x492f29);}),_0x1b5121;}['saveCommentToSnapshot'](_0x574726){const _0x20a576=_0x528a9f;return{'id':_0x574726['id'],'threadId':_0x574726[_0x20a576(0x200)],'ref':_0x574726[_0x20a576(0x21a)]};}};g=x([_(0x0,c[_0x528a9f(0x237)](P[_0x528a9f(0x213)])),_(0x1,c['Inject'](c['UserManagerService'])),_(0x2,c['Inject'](b[_0x528a9f(0x1d8)])),_(0x3,c[_0x528a9f(0x237)](c['Injector']))],g);var H=Object[_0x528a9f(0x1f2)],J=(_0x2efa6d,_0x5aa7eb,_0x51a721,_0x526af)=>{const _0x34d6cb=_0x528a9f;for(var _0x3044e0=_0x526af>0x1?void 0x0:_0x526af?H(_0x5aa7eb,_0x51a721):_0x5aa7eb,_0x7c4bd=_0x2efa6d[_0x34d6cb(0x21f)]-0x1,_0x47d1a2;_0x7c4bd>=0x0;_0x7c4bd--)(_0x47d1a2=_0x2efa6d[_0x7c4bd])&&(_0x3044e0=_0x47d1a2(_0x3044e0)||_0x3044e0);return _0x3044e0;},y=(_0x17a08a,_0x56cb54)=>(_0x51d4b2,_0x17c85c)=>_0x56cb54(_0x51d4b2,_0x17c85c,_0x17a08a);let C=class extends c[_0x528a9f(0x1e3)]{constructor(_0x326ab0,_0x5a5a20){const _0x262592=_0x528a9f;super(),this[_0x262592(0x204)]=_0x326ab0,this[_0x262592(0x202)]=_0x5a5a20,this[_0x262592(0x211)]();}[_0x528a9f(0x211)](){const _0x44aadd=_0x528a9f;this[_0x44aadd(0x204)][_0x44aadd(0x235)]=this[_0x44aadd(0x202)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x528a9f(0x1cf)]),y(0x1,c[_0x528a9f(0x237)](g))],C);var F=Object[_0x528a9f(0x21d)],L=Object['getOwnPropertyDescriptor'],Z=(_0x321fc2,_0x2e4a25,_0x52c14b)=>_0x2e4a25 in _0x321fc2?F(_0x321fc2,_0x2e4a25,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x52c14b}):_0x321fc2[_0x2e4a25]=_0x52c14b,W=(_0x8c1f87,_0x1ee9b5,_0x7d4c95,_0x263330)=>{const _0x4b49bd=_0x528a9f;for(var _0x40d63d=_0x263330>0x1?void 0x0:_0x263330?L(_0x1ee9b5,_0x7d4c95):_0x1ee9b5,_0x10e348=_0x8c1f87[_0x4b49bd(0x21f)]-0x1,_0x1e6e60;_0x10e348>=0x0;_0x10e348--)(_0x1e6e60=_0x8c1f87[_0x10e348])&&(_0x40d63d=_0x1e6e60(_0x40d63d)||_0x40d63d);return _0x40d63d;},O=(_0x16c76a,_0x39a1b3)=>(_0x32aed6,_0x573215)=>_0x39a1b3(_0x32aed6,_0x573215,_0x16c76a),N=(_0x501822,_0x25f780,_0xde2ecf)=>Z(_0x501822,typeof _0x25f780!=_0x528a9f(0x21c)?_0x25f780+'':_0x25f780,_0xde2ecf);function _0x22fc(_0x5ccc09,_0x3e818c){const _0x52c716=_0x52c7();return _0x22fc=function(_0x22fc16,_0x29e243){_0x22fc16=_0x22fc16-0x1c5;let _0x53435e=_0x52c716[_0x22fc16];return _0x53435e;},_0x22fc(_0x5ccc09,_0x3e818c);}exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x528a9f(0x1fd)]{constructor(_0x182f21=D,_0xf67d75,_0x27d8ff){const _0x1ee348=_0x528a9f;super(),this[_0x1ee348(0x23c)]=_0x182f21,this[_0x1ee348(0x1fe)]=_0xf67d75,this[_0x1ee348(0x1fa)]=_0x27d8ff;const {..._0x5d5d09}=c['merge']({},D,this[_0x1ee348(0x23c)]);this[_0x1ee348(0x1fa)][_0x1ee348(0x223)](q,_0x5d5d09);}[_0x528a9f(0x23f)](){const _0x20ffc3=_0x528a9f;[[g],[C],[p]][_0x20ffc3(0x1d4)](_0x4ca1d1=>{const _0x365cf7=_0x20ffc3;this['_injector'][_0x365cf7(0x1ee)](_0x4ca1d1);});}[_0x528a9f(0x22a)](){const _0x5e2dd8=_0x528a9f;this[_0x5e2dd8(0x1fe)][_0x5e2dd8(0x1eb)](C),this[_0x5e2dd8(0x1fe)][_0x5e2dd8(0x1eb)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x528a9f(0x220),U),N(exports[_0x528a9f(0x1d7)],_0x528a9f(0x1cb),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x528a9f(0x1ff)](j['UniverThreadCommentUIPlugin'],b[_0x528a9f(0x207)],T[_0x528a9f(0x228)]),O(0x1,c[_0x528a9f(0x237)](c['Injector'])),O(0x2,c[_0x528a9f(0x1ef)])],exports[_0x528a9f(0x1d7)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x2d8ddf=_0x581c;(function(_0x3a474b,_0x336e0c){const _0x9912a3=_0x581c,_0x247516=_0x3a474b();while(!![]){try{const _0x12b175=parseInt(_0x9912a3(0x185))/0x1*(-parseInt(_0x9912a3(0x173))/0x2)+-parseInt(_0x9912a3(0x193))/0x3+parseInt(_0x9912a3(0x1a8))/0x4*(parseInt(_0x9912a3(0x190))/0x5)+parseInt(_0x9912a3(0x1a1))/0x6*(-parseInt(_0x9912a3(0x17f))/0x7)+parseInt(_0x9912a3(0x19d))/0x8+parseInt(_0x9912a3(0x1a3))/0x9*(-parseInt(_0x9912a3(0x1a4))/0xa)+-parseInt(_0x9912a3(0x14e))/0xb*(-parseInt(_0x9912a3(0x198))/0xc);if(_0x12b175===_0x336e0c)break;else _0x247516['push'](_0x247516['shift']());}catch(_0x3ab2f1){_0x247516['push'](_0x247516['shift']());}}}(_0x1b6f,0xb7162));import{CommentService as _0x3b3e81,CollaborationSessionService as _0x300307,UniverCollaborationClientPlugin as _0x4b4a79}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x242cb8}from'@univerjs-pro/license';import{dayjs as _0x2a10a6,UserManagerService as _0x3428f3,Inject as _0x56e3c7,Injector as _0x24c6dc,Disposable as _0x27d718,CustomRangeType as _0x3b6fb4,UniverInstanceType as _0x2cbf4f,DependentOn as _0x106b69,IConfigService as _0x56bccc,Plugin as _0x421e16,merge as _0x1ad3c8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x52c2ef}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2c28e4,IThreadCommentDataSourceService as _0x4e6c1c}from'@univerjs/thread-comment';import{bufferTime as _0xbabfd}from'rxjs';import{HTTPService as _0x49e4f5}from'@univerjs/network';const W=_0x2d8ddf(0x156);var I=(_0xa1c2c2=>(_0xa1c2c2[_0xa1c2c2['OpenOrReOpen']=0x0]='OpenOrReOpen',_0xa1c2c2[_0xa1c2c2[_0x2d8ddf(0x181)]=0x1]=_0x2d8ddf(0x181),_0xa1c2c2[_0xa1c2c2[_0x2d8ddf(0x199)]=-0x1]=_0x2d8ddf(0x199),_0xa1c2c2))(I||{}),v=(_0x410362=>(_0x410362[_0x410362[_0x2d8ddf(0x187)]=0x0]=_0x2d8ddf(0x187),_0x410362[_0x410362[_0x2d8ddf(0x167)]=0x1]='Add',_0x410362[_0x410362[_0x2d8ddf(0x142)]=0x2]=_0x2d8ddf(0x142),_0x410362[_0x410362[_0x2d8ddf(0x169)]=0x3]='Edit',_0x410362[_0x410362['Delete']=0x4]=_0x2d8ddf(0x150),_0x410362[_0x410362[_0x2d8ddf(0x16c)]=0x5]=_0x2d8ddf(0x16c),_0x410362[_0x410362[_0x2d8ddf(0x199)]=-0x1]=_0x2d8ddf(0x199),_0x410362))(v||{});const D=_0x3e52bc=>_0x2a10a6(new Date(+_0x3e52bc))[_0x2d8ddf(0x188)](_0x2d8ddf(0x15d)),B=async(_0x4eb45c,_0x1ea478)=>{const _0x860404=_0x2d8ddf,_0x4bf51e=_0x4eb45c['get'](_0x3428f3),_0x50143c=_0x4eb45c[_0x860404(0x18b)](_0x49e4f5);_0x1ea478['forEach'](_0x3d2b02=>{const _0x65f855=_0x860404;_0x4bf51e[_0x65f855(0x1a5)](_0x3d2b02)&&_0x1ea478['delete'](_0x3d2b02);}),_0x1ea478[_0x860404(0x184)]&&(await _0x50143c[_0x860404(0x18b)](_0x860404(0x182),{'params':{'userIDs':[..._0x1ea478]}}))[_0x860404(0x15c)][_0x860404(0x145)]['forEach'](_0x48452f=>{_0x48452f&&_0x4bf51e['addUser'](_0x48452f);});};function _0x581c(_0x2022b0,_0x52c476){const _0x1b6f87=_0x1b6f();return _0x581c=function(_0x581cdd,_0x598857){_0x581cdd=_0x581cdd-0x142;let _0xffd5ad=_0x1b6f87[_0x581cdd];return _0xffd5ad;},_0x581c(_0x2022b0,_0x52c476);}var K=Object[_0x2d8ddf(0x19b)],V=(_0x5bc90a,_0x3428d1,_0x42bc52,_0x1f0ac8)=>{const _0x475880=_0x2d8ddf;for(var _0x5a64ee=_0x1f0ac8>0x1?void 0x0:_0x1f0ac8?K(_0x3428d1,_0x42bc52):_0x3428d1,_0x13396d=_0x5bc90a[_0x475880(0x15b)]-0x1,_0x1b1107;_0x13396d>=0x0;_0x13396d--)(_0x1b1107=_0x5bc90a[_0x13396d])&&(_0x5a64ee=_0x1b1107(_0x5a64ee)||_0x5a64ee);return _0x5a64ee;},p=(_0x2e58e4,_0x1bad0c)=>(_0x5250c4,_0x2b5066)=>_0x1bad0c(_0x5250c4,_0x2b5066,_0x2e58e4);let S=class extends _0x27d718{constructor(_0x55bffe,_0x26b70f,_0x3dd8a8,_0xa3f144){const _0x270245=_0x2d8ddf;super(),this['_commentService']=_0x55bffe,this[_0x270245(0x17e)]=_0x26b70f,this[_0x270245(0x153)]=_0x3dd8a8,this[_0x270245(0x16f)]=_0xa3f144,this['_init'](),this['_initUserSync']();}[_0x2d8ddf(0x19e)](){const _0xbe1e65=_0x2d8ddf;this[_0xbe1e65(0x14c)](this[_0xbe1e65(0x17e)][_0xbe1e65(0x159)][_0xbe1e65(0x14f)](_0xbabfd(0x10))['subscribe'](_0x59e2a7=>{const _0x301427=_0xbe1e65,_0x1e327d=new Set();_0x59e2a7[_0x301427(0x17d)](_0x4ce315=>{const _0x4d5d55=_0x301427;switch(_0x4ce315[_0x4d5d55(0x1a6)]){case _0x4d5d55(0x160):{const _0x60d25f=_0x4ce315[_0x4d5d55(0x1a2)][_0x4d5d55(0x196)];_0x1e327d['add'](_0x60d25f);break;}}}),B(this[_0x301427(0x16f)],_0x1e327d);}));}[_0x2d8ddf(0x16e)](){const _0x2a7e4f=_0x2d8ddf;this[_0x2a7e4f(0x14c)](this[_0x2a7e4f(0x195)][_0x2a7e4f(0x159)][_0x2a7e4f(0x17c)](async _0x5e57fb=>{const _0xa6aca1=_0x2a7e4f;var _0x4fd8f5,_0x3265b5,_0x375168,_0x52deef;const _0x457f45=(_0x4fd8f5=this['_threadCommentModel'][_0xa6aca1(0x158)](_0x5e57fb['unitId'])[_0xa6aca1(0x197)](_0x1e4520=>_0x1e4520[_0xa6aca1(0x163)]===_0x5e57fb[_0xa6aca1(0x163)]))==null?void 0x0:_0x4fd8f5[_0xa6aca1(0x162)];if(!_0x457f45)return;const {unitId:_0x13ce99,subUnitId:_0xcc5e07}=_0x457f45;switch(_0x5e57fb[_0xa6aca1(0x1a9)]&&this[_0xa6aca1(0x153)][_0xa6aca1(0x176)](_0x5e57fb[_0xa6aca1(0x1a9)]),_0x5e57fb['type']){case v[_0xa6aca1(0x167)]:break;case v['Reply']:{this[_0xa6aca1(0x17e)][_0xa6aca1(0x16a)](_0x13ce99,_0xcc5e07,{'unitId':_0x13ce99,'subUnitId':_0xcc5e07,'ref':'','id':_0x5e57fb['replyId'],'dT':D(+_0x5e57fb[_0xa6aca1(0x17b)]),'threadId':_0x5e57fb[_0xa6aca1(0x163)],'personId':(_0x375168=(_0x3265b5=_0x5e57fb['user'])==null?void 0x0:_0x3265b5[_0xa6aca1(0x14d)])!=null?_0x375168:_0x5e57fb[_0xa6aca1(0x18a)],'text':JSON[_0xa6aca1(0x164)](_0x5e57fb[_0xa6aca1(0x149)]),'parentId':_0x457f45['id']});break;}case v[_0xa6aca1(0x150)]:{const _0x219d85=this[_0xa6aca1(0x17e)][_0xa6aca1(0x189)](_0x13ce99,_0xcc5e07,_0x5e57fb[_0xa6aca1(0x19a)]);_0x219d85&&_0x219d85[_0xa6aca1(0x16d)]&&this[_0xa6aca1(0x17e)]['deleteComment'](_0x13ce99,_0xcc5e07,_0x5e57fb[_0xa6aca1(0x19a)]);break;}case v[_0xa6aca1(0x169)]:{this[_0xa6aca1(0x17e)][_0xa6aca1(0x177)](_0x13ce99,_0xcc5e07,{'commentId':_0x5e57fb['replyId'],'text':JSON[_0xa6aca1(0x164)](_0x5e57fb[_0xa6aca1(0x149)])});break;}case v[_0xa6aca1(0x16c)]:{const _0x17ab63=(_0x52deef=this[_0xa6aca1(0x17e)][_0xa6aca1(0x158)](_0x5e57fb[_0xa6aca1(0x15e)])[_0xa6aca1(0x197)](_0x4c1b4b=>_0x4c1b4b[_0xa6aca1(0x163)]===_0x5e57fb[_0xa6aca1(0x163)]))==null?void 0x0:_0x52deef[_0xa6aca1(0x162)];_0x17ab63&&this[_0xa6aca1(0x17e)][_0xa6aca1(0x18f)](_0x13ce99,_0xcc5e07,_0x17ab63['id'],_0x5e57fb[_0xa6aca1(0x166)]===I[_0xa6aca1(0x181)]);break;}}}));}};S=V([p(0x0,_0x56e3c7(_0x3b3e81)),p(0x1,_0x56e3c7(_0x2c28e4)),p(0x2,_0x56e3c7(_0x3428f3)),p(0x3,_0x56e3c7(_0x24c6dc))],S);const z=_0x2d8ddf(0x144),M={};var k=Object[_0x2d8ddf(0x19b)],Q=(_0x3a2e77,_0x4c1b91,_0x57740e,_0x45661b)=>{for(var _0x314a25=_0x45661b>0x1?void 0x0:_0x45661b?k(_0x4c1b91,_0x57740e):_0x4c1b91,_0x2de47=_0x3a2e77['length']-0x1,_0x5f396f;_0x2de47>=0x0;_0x2de47--)(_0x5f396f=_0x3a2e77[_0x2de47])&&(_0x314a25=_0x5f396f(_0x314a25)||_0x314a25);return _0x314a25;},_=(_0x3ade8f,_0x4ad7a5)=>(_0x49490e,_0x7acace)=>_0x4ad7a5(_0x49490e,_0x7acace,_0x3ade8f);function X(_0x1cbaa3,_0xc1b122){const _0x2ee030=_0x2d8ddf,_0x427bac=_0x1cbaa3[_0x2ee030(0x147)][0x0];return{..._0xc1b122,'id':_0x427bac[_0x2ee030(0x19a)],'resolved':_0x1cbaa3[_0x2ee030(0x166)]===0x1,'dT':D(_0x427bac[_0x2ee030(0x17b)]),'personId':_0x427bac[_0x2ee030(0x18a)],'threadId':_0x427bac[_0x2ee030(0x163)]};}function ee(_0xe38bd5,_0x828308,_0x430ea8){const _0x431f05=_0x2d8ddf;var _0x39b4ad,_0xd4bc7e;if(((_0xd4bc7e=(_0x39b4ad=_0xe38bd5==null?void 0x0:_0xe38bd5[_0x431f05(0x147)])==null?void 0x0:_0x39b4ad[_0x431f05(0x15b)])!=null?_0xd4bc7e:0x0)>0x0){const _0x36c6bc=(_0x2e9bba,_0x23e3a6)=>({'id':_0x2e9bba[_0x431f05(0x19a)],'threadId':_0x2e9bba[_0x431f05(0x163)],'dT':D(_0x2e9bba[_0x431f05(0x17b)]),'personId':_0x2e9bba['userId'],'resolved':_0xe38bd5[_0x431f05(0x166)]===I['Solved'],'unitId':_0x828308,'subUnitId':_0x430ea8,'text':JSON['parse'](_0x2e9bba[_0x431f05(0x149)]),'parentId':_0x23e3a6}),_0x10504c=_0x36c6bc(_0xe38bd5[_0x431f05(0x147)][0x0]);return{..._0x10504c,'children':_0xe38bd5['replies'][_0x431f05(0x180)](0x1)[_0x431f05(0x146)](_0x4a69bf=>_0x36c6bc(_0x4a69bf,_0x10504c['id']))};}return null;}let f=class{constructor(_0x5227c1,_0x5c9800,_0x39ca03,_0x57654a){const _0x589feb=_0x2d8ddf;this[_0x589feb(0x1a0)]=_0x5227c1,this[_0x589feb(0x153)]=_0x5c9800,this['_sessionService']=_0x39ca03,this[_0x589feb(0x16f)]=_0x57654a;}async[_0x2d8ddf(0x16a)](_0x5ffde4){const _0x667f8=_0x2d8ddf;var _0x5661f7,_0x44c2d9;const {parentId:_0x5819b4,unitId:_0x1ec086,text:_0x4df2c5,threadId:_0x172f06}=_0x5ffde4,_0x2e361a=(_0x44c2d9=(_0x5661f7=_0x4df2c5['customRanges'])==null?void 0x0:_0x5661f7['filter'](_0x43e19a=>_0x43e19a[_0x667f8(0x154)]===_0x3b6fb4[_0x667f8(0x16b)])[_0x667f8(0x146)](_0x148573=>_0x148573[_0x667f8(0x155)]))!=null?_0x44c2d9:[],_0xa8987a=JSON[_0x667f8(0x170)](_0x4df2c5),_0x51f0ea=(await this['_sessionService'][_0x667f8(0x165)](_0x1ec086))[_0x667f8(0x171)]();if(_0x5819b4){const _0x2f14fb={'memberId':_0x51f0ea,'unitId':_0x1ec086,'content':_0xa8987a,'mention':_0x2e361a,'threadId':_0x172f06},_0x3b4bcf=(await this[_0x667f8(0x1a0)][_0x667f8(0x172)]('/universer-api/comment/unit/'+_0x1ec086+'/reply',{'body':_0x2f14fb}))[_0x667f8(0x15c)][_0x667f8(0x194)];return{..._0x5ffde4,'id':_0x3b4bcf['replyId'],'dT':_0x2a10a6(+_0x3b4bcf[_0x667f8(0x17b)])[_0x667f8(0x188)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3b4bcf['userId']};}else{const _0xadb612={'memberId':_0x51f0ea,'unitId':_0x1ec086,'content':_0xa8987a,'mention':_0x2e361a},_0x484536=await this[_0x667f8(0x1a0)]['post'](_0x667f8(0x148)+_0x1ec086+_0x667f8(0x17a),{'body':_0xadb612});return X(_0x484536['body'][_0x667f8(0x1a7)],_0x5ffde4);}}async[_0x2d8ddf(0x177)](_0x203b47){const _0x28eae4=_0x2d8ddf;var _0x3a4cc0,_0x1cdfe3;const {text:_0x1bb512,unitId:_0x382116}=_0x203b47,_0x596f8f=(_0x1cdfe3=(_0x3a4cc0=_0x1bb512['customRanges'])==null?void 0x0:_0x3a4cc0[_0x28eae4(0x18c)](_0x296d80=>_0x296d80[_0x28eae4(0x154)]===_0x3b6fb4[_0x28eae4(0x16b)])[_0x28eae4(0x146)](_0xe9b547=>_0xe9b547[_0x28eae4(0x155)]))!=null?_0x1cdfe3:[],_0x18b0cb=JSON[_0x28eae4(0x170)](_0x1bb512),_0x219bf4=_0x203b47['threadId'],_0x39b835=_0x203b47['id'],_0x3e12c9={'memberId':(await this[_0x28eae4(0x151)][_0x28eae4(0x165)](_0x382116))[_0x28eae4(0x171)](),'unitId':_0x382116,'threadId':_0x219bf4,'mention':_0x596f8f,'content':_0x18b0cb,'replyId':_0x39b835},_0x5d73ac=await this[_0x28eae4(0x1a0)]['post'](_0x28eae4(0x148)+_0x382116+_0x28eae4(0x19f),{'body':_0x3e12c9});return!_0x5d73ac[_0x28eae4(0x15c)][_0x28eae4(0x186)]||_0x5d73ac[_0x28eae4(0x15c)]['error'][_0x28eae4(0x168)]===0x1;}async['resolveComment'](_0x22d2e6){const _0x399ed2=_0x2d8ddf,{unitId:_0xdbe0c}=_0x22d2e6,_0x457a11=_0x22d2e6[_0x399ed2(0x163)],_0x271e15={'memberId':this[_0x399ed2(0x153)]['getCurrentUser']()[_0x399ed2(0x14d)],'unitId':_0xdbe0c,'threadId':_0x457a11,'solved':_0x22d2e6[_0x399ed2(0x179)]?I[_0x399ed2(0x181)]:I['OpenOrReOpen']},_0x2825c7=await this[_0x399ed2(0x1a0)][_0x399ed2(0x172)](_0x399ed2(0x148)+_0xdbe0c+'/solved',{'body':_0x271e15});return!_0x2825c7[_0x399ed2(0x15c)][_0x399ed2(0x186)]||_0x2825c7['body'][_0x399ed2(0x186)][_0x399ed2(0x168)]===0x1;}async[_0x2d8ddf(0x192)](_0x183bc3,_0x21c3f4,_0x25d619,_0x4c6253){const _0x1eccae=_0x2d8ddf,_0x16d190={'memberId':(await this[_0x1eccae(0x151)]['requireSession'](_0x183bc3))[_0x1eccae(0x171)](),'threadId':_0x25d619,'replyId':_0x4c6253,'unitId':_0x183bc3},_0x5e2fbd=await this[_0x1eccae(0x1a0)][_0x1eccae(0x172)](_0x1eccae(0x148)+_0x183bc3+_0x1eccae(0x143),{'body':_0x16d190});return!_0x5e2fbd[_0x1eccae(0x15c)][_0x1eccae(0x186)]||_0x5e2fbd['body'][_0x1eccae(0x186)][_0x1eccae(0x168)]===0x1;}async[_0x2d8ddf(0x15f)](_0x43c498,_0x2038dc,_0x27a557){const _0x316469=_0x2d8ddf,_0x23050a={'unitId':_0x43c498,'threadId':_0x27a557},_0x44bfa1=await this[_0x316469(0x1a0)][_0x316469(0x172)](_0x316469(0x148)+_0x43c498+'/list',{'body':_0x23050a}),_0x3dfe29=_0x27a557['map'](_0x57bcf6=>ee(_0x44bfa1[_0x316469(0x15c)][_0x316469(0x14b)][_0x57bcf6],_0x43c498,_0x2038dc))[_0x316469(0x18c)](Boolean);return Object[_0x316469(0x175)](_0x44bfa1[_0x316469(0x15c)]['users'])[_0x316469(0x17d)](_0x189322=>{const _0x1f8aa2=_0x316469;this[_0x1f8aa2(0x153)][_0x1f8aa2(0x176)](_0x189322);}),_0x3dfe29;}[_0x2d8ddf(0x152)](_0x35bd8f){const _0x55023d=_0x2d8ddf;return{'id':_0x35bd8f['id'],'threadId':_0x35bd8f[_0x55023d(0x163)],'ref':_0x35bd8f[_0x55023d(0x14a)]};}};f=Q([_(0x0,_0x56e3c7(_0x49e4f5)),_(0x1,_0x56e3c7(_0x3428f3)),_(0x2,_0x56e3c7(_0x300307)),_(0x3,_0x56e3c7(_0x24c6dc))],f);var re=Object[_0x2d8ddf(0x19b)],te=(_0x5ac03f,_0x5cc703,_0x48b08a,_0x500634)=>{const _0x40d356=_0x2d8ddf;for(var _0x32ad90=_0x500634>0x1?void 0x0:_0x500634?re(_0x5cc703,_0x48b08a):_0x5cc703,_0x132087=_0x5ac03f[_0x40d356(0x15b)]-0x1,_0x2943fd;_0x132087>=0x0;_0x132087--)(_0x2943fd=_0x5ac03f[_0x132087])&&(_0x32ad90=_0x2943fd(_0x32ad90)||_0x32ad90);return _0x32ad90;},N=(_0x409c23,_0x10a28e)=>(_0x433408,_0x49f019)=>_0x10a28e(_0x433408,_0x49f019,_0x409c23);let g=class extends _0x27d718{constructor(_0x1e2399,_0x17138b){const _0x421d42=_0x2d8ddf;super(),this[_0x421d42(0x157)]=_0x1e2399,this[_0x421d42(0x15a)]=_0x17138b,this[_0x421d42(0x161)]();}['_initDataSource'](){const _0x350b93=_0x2d8ddf;this['_threadCommentDataSourceService']['dataSource']=this[_0x350b93(0x15a)],this[_0x350b93(0x157)][_0x350b93(0x178)]=!0x1;}};function _0x1b6f(){const _0x3faff3=['code','Edit','addComment','COMMENT','Solve','parentId','_init','_injector','stringify','getMemberID','post','89768yIYoNF','_configService','values','addUser','updateComment','syncUpdateMutationToColla','resolved','/add','createTimestamp','subscribe','forEach','_threadCommentModel','847IIjioy','slice','Solved','/universer-api/user/list','onStarting','size','18PhkNYT','error','Unknown','format','getComment','userId','get','filter','symbol','pluginName','resolveComment','3452030wQRpti','onReady','deleteComment','2173527NgEyjA','reply','_commentService','personId','find','126156AoASFr','UNRECOGNIZED','replyId','getOwnPropertyDescriptor','UNIVER_UNKNOWN','4115216GvusCd','_initUserSync','/edit','_httpService','71346QxWJrU','payload','16839cEhXHP','6030ezXSal','getUser','type','comment','8dCaZwZ','user','Reply','/delete','thread-comment-data-source.config','users','map','replies','/universer-api/comment/unit/','content','ref','comments','disposeWithMe','userID','3091grvgYr','pipe','Delete','_sessionService','saveCommentToSnapshot','_userService','rangeType','rangeId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentDataSourceService','getUnit','commentUpdate$','_threadCommentDataSource','length','body','YYYY/MM/DD\x20HH:mm','unitId','listComments','add','_initDataSource','root','threadId','parse','requireSession','solved','Add'];_0x1b6f=function(){return _0x3faff3;};return _0x1b6f();}g=te([N(0x0,_0x4e6c1c),N(0x1,_0x56e3c7(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0xddf6f9,_0x4b5c63,_0x409517)=>_0x4b5c63 in _0xddf6f9?se(_0xddf6f9,_0x4b5c63,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x409517}):_0xddf6f9[_0x4b5c63]=_0x409517,ie=(_0x25ec58,_0x277884,_0x294e91,_0x33b8b7)=>{const _0x38e927=_0x2d8ddf;for(var _0x986ae2=_0x33b8b7>0x1?void 0x0:_0x33b8b7?oe(_0x277884,_0x294e91):_0x277884,_0x38d22d=_0x25ec58[_0x38e927(0x15b)]-0x1,_0x5ad3b6;_0x38d22d>=0x0;_0x38d22d--)(_0x5ad3b6=_0x25ec58[_0x38d22d])&&(_0x986ae2=_0x5ad3b6(_0x986ae2)||_0x986ae2);return _0x986ae2;},w=(_0x4ca070,_0x353427)=>(_0x453490,_0x23198a)=>_0x353427(_0x453490,_0x23198a,_0x4ca070),$=(_0x30b31c,_0x2020f6,_0x13f556)=>ne(_0x30b31c,typeof _0x2020f6!=_0x2d8ddf(0x18d)?_0x2020f6+'':_0x2020f6,_0x13f556);let b=class extends _0x421e16{constructor(_0x278d6d=M,_0x29c842,_0x13d276){const _0x1e670d=_0x2d8ddf;super(),this['_config']=_0x278d6d,this[_0x1e670d(0x16f)]=_0x29c842,this[_0x1e670d(0x174)]=_0x13d276;const {..._0x4a7f4c}=_0x1ad3c8({},M,this['_config']);this[_0x1e670d(0x174)]['setConfig'](z,_0x4a7f4c);}[_0x2d8ddf(0x183)](){const _0x10ed45=_0x2d8ddf;[[f],[g],[S]][_0x10ed45(0x17d)](_0x40f7ca=>{const _0x2b764e=_0x10ed45;this[_0x2b764e(0x16f)][_0x2b764e(0x160)](_0x40f7ca);});}[_0x2d8ddf(0x191)](){const _0x4b306f=_0x2d8ddf;this['_injector']['get'](g),this[_0x4b306f(0x16f)][_0x4b306f(0x18b)](S);}};$(b,_0x2d8ddf(0x18e),W),$(b,_0x2d8ddf(0x1a6),_0x2cbf4f[_0x2d8ddf(0x19c)]),b=ie([_0x106b69(_0x52c2ef,_0x4b4a79,_0x242cb8),w(0x1,_0x56e3c7(_0x24c6dc)),w(0x2,_0x56bccc)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x32e807=_0x4476;(function(_0x196e4b,_0x53f5c8){const _0x14fb33=_0x4476,_0x203376=_0x196e4b();while(!![]){try{const _0x514d95=-parseInt(_0x14fb33(0x170))/0x1+-parseInt(_0x14fb33(0x163))/0x2+parseInt(_0x14fb33(0x186))/0x3*(parseInt(_0x14fb33(0x14d))/0x4)+parseInt(_0x14fb33(0x167))/0x5*(-parseInt(_0x14fb33(0x1a1))/0x6)+parseInt(_0x14fb33(0x19e))/0x7*(-parseInt(_0x14fb33(0x182))/0x8)+parseInt(_0x14fb33(0x141))/0x9+-parseInt(_0x14fb33(0x19b))/0xa*(-parseInt(_0x14fb33(0x196))/0xb);if(_0x514d95===_0x53f5c8)break;else _0x203376['push'](_0x203376['shift']());}catch(_0x3a5873){_0x203376['push'](_0x203376['shift']());}}}(_0x1bce,0x647c4));import{CommentService as _0x12f7f5,CollaborationSessionService as _0x307a0a,UniverCollaborationClientPlugin as _0x40e60c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xcfd646}from'@univerjs-pro/license';import{dayjs as _0xa47b16,UserManagerService as _0x3a2f14,Inject as _0x2829ff,Injector as _0x2a4fc8,Disposable as _0x2e1c60,CustomRangeType as _0x5d6a87,UniverInstanceType as _0xd4c5e1,DependentOn as _0xe03605,IConfigService as _0x5c82ef,Plugin as _0x5d5f99,merge as _0x1eb38a}from'@univerjs/core';function _0x1bce(){const _0x2b93a9=['73636LCOYQF','userID','replyId','type','25uWlVaF','users','Solve','/reply','_threadCommentDataSourceService','setConfig','addUser','_initUserSync','_initDataSource','247326ttyqTa','format','add','forEach','/solved','syncUpdateMutationToColla','get','rangeType','stringify','find','/add','_config','resolveComment','_userService','_threadCommentDataSource','updateComment','UNIVER_UNKNOWN','defineProperty','641848dqYYHn','size','code','user','9pMggjU','_init','saveCommentToSnapshot','Solved','comment','unitId','userId','symbol','body','_httpService','getOwnPropertyDescriptor','comments','personId','Delete','createTimestamp','_sessionService','9097GZJPGv','addComment','Reply','onReady','commentUpdate$','5180XeWhLs','parse','/delete','7yTFnRh','solved','_threadCommentModel','85842lSwjTI','map','delete','_commentService','getUnit','/universer-api/user/list','570699YQiMKp','UNRECOGNIZED','reply','subscribe','_injector','requireSession','threadId','payload','/universer-api/comment/unit/','dataSource','YYYY/MM/DD\x20HH:mm','/edit','474268XPBGtP','length','rangeId','filter','deleteComment','OpenOrReOpen','customRanges','getMemberID','content','disposeWithMe','pluginName','COMMENT','Unknown','getUser','replies','error','values','listComments','Edit','Add','onStarting','post'];_0x1bce=function(){return _0x2b93a9;};return _0x1bce();}import{UniverThreadCommentUIPlugin as _0x2bfb63}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3cc6a8,IThreadCommentDataSourceService as _0x3047aa}from'@univerjs/thread-comment';import{bufferTime as _0x314186}from'rxjs';import{HTTPService as _0x382c33}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3a95a7=>(_0x3a95a7[_0x3a95a7[_0x32e807(0x152)]=0x0]='OpenOrReOpen',_0x3a95a7[_0x3a95a7[_0x32e807(0x189)]=0x1]=_0x32e807(0x189),_0x3a95a7[_0x3a95a7[_0x32e807(0x142)]=-0x1]=_0x32e807(0x142),_0x3a95a7))(I||{}),v=(_0x5a05af=>(_0x5a05af[_0x5a05af[_0x32e807(0x159)]=0x0]=_0x32e807(0x159),_0x5a05af[_0x5a05af[_0x32e807(0x160)]=0x1]=_0x32e807(0x160),_0x5a05af[_0x5a05af[_0x32e807(0x198)]=0x2]='Reply',_0x5a05af[_0x5a05af['Edit']=0x3]='Edit',_0x5a05af[_0x5a05af[_0x32e807(0x193)]=0x4]=_0x32e807(0x193),_0x5a05af[_0x5a05af[_0x32e807(0x169)]=0x5]='Solve',_0x5a05af[_0x5a05af[_0x32e807(0x142)]=-0x1]=_0x32e807(0x142),_0x5a05af))(v||{});const D=_0x91474b=>_0xa47b16(new Date(+_0x91474b))[_0x32e807(0x171)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4c3f24,_0x219510)=>{const _0x483072=_0x32e807,_0x4f5f0d=_0x4c3f24[_0x483072(0x176)](_0x3a2f14),_0x53b718=_0x4c3f24['get'](_0x382c33);_0x219510[_0x483072(0x173)](_0x2137f8=>{const _0x15a67d=_0x483072;_0x4f5f0d[_0x15a67d(0x15a)](_0x2137f8)&&_0x219510[_0x15a67d(0x1a3)](_0x2137f8);}),_0x219510[_0x483072(0x183)]&&(await _0x53b718[_0x483072(0x176)](_0x483072(0x140),{'params':{'userIDs':[..._0x219510]}}))[_0x483072(0x18e)][_0x483072(0x168)]['forEach'](_0x242d2e=>{const _0x50326b=_0x483072;_0x242d2e&&_0x4f5f0d[_0x50326b(0x16d)](_0x242d2e);});};var K=Object[_0x32e807(0x190)],V=(_0x154698,_0x4459af,_0x288650,_0x323267)=>{const _0xf55b8f=_0x32e807;for(var _0x3d4b83=_0x323267>0x1?void 0x0:_0x323267?K(_0x4459af,_0x288650):_0x4459af,_0x567c79=_0x154698[_0xf55b8f(0x14e)]-0x1,_0x237049;_0x567c79>=0x0;_0x567c79--)(_0x237049=_0x154698[_0x567c79])&&(_0x3d4b83=_0x237049(_0x3d4b83)||_0x3d4b83);return _0x3d4b83;},p=(_0x33dad5,_0x139e2c)=>(_0x399b49,_0x248c7b)=>_0x139e2c(_0x399b49,_0x248c7b,_0x33dad5);let S=class extends _0x2e1c60{constructor(_0x2cd379,_0x28a325,_0x1860e8,_0x241e90){const _0x459d88=_0x32e807;super(),this[_0x459d88(0x1a4)]=_0x2cd379,this[_0x459d88(0x1a0)]=_0x28a325,this[_0x459d88(0x17d)]=_0x1860e8,this[_0x459d88(0x145)]=_0x241e90,this[_0x459d88(0x187)](),this['_initUserSync']();}[_0x32e807(0x16e)](){const _0x5f18f0=_0x32e807;this[_0x5f18f0(0x156)](this[_0x5f18f0(0x1a0)]['commentUpdate$']['pipe'](_0x314186(0x10))[_0x5f18f0(0x144)](_0x4a9db1=>{const _0x21681b=new Set();_0x4a9db1['forEach'](_0x4d98b0=>{const _0x49f3ed=_0x4476;switch(_0x4d98b0[_0x49f3ed(0x166)]){case _0x49f3ed(0x172):{const _0xa701b3=_0x4d98b0[_0x49f3ed(0x148)][_0x49f3ed(0x192)];_0x21681b[_0x49f3ed(0x172)](_0xa701b3);break;}}}),B(this['_injector'],_0x21681b);}));}[_0x32e807(0x187)](){const _0x221b32=_0x32e807;this[_0x221b32(0x156)](this['_commentService'][_0x221b32(0x19a)][_0x221b32(0x144)](async _0x1ed94b=>{const _0x1e4463=_0x221b32;var _0x2c37f5,_0x2f251b,_0x3ef3e4,_0x17c7ca;const _0xaafa6d=(_0x2c37f5=this['_threadCommentModel'][_0x1e4463(0x13f)](_0x1ed94b[_0x1e4463(0x18b)])[_0x1e4463(0x179)](_0x2ace29=>_0x2ace29['threadId']===_0x1ed94b[_0x1e4463(0x147)]))==null?void 0x0:_0x2c37f5['root'];if(!_0xaafa6d)return;const {unitId:_0x4bce15,subUnitId:_0x5c9007}=_0xaafa6d;switch(_0x1ed94b[_0x1e4463(0x185)]&&this['_userService'][_0x1e4463(0x16d)](_0x1ed94b['user']),_0x1ed94b[_0x1e4463(0x166)]){case v[_0x1e4463(0x160)]:break;case v[_0x1e4463(0x198)]:{this[_0x1e4463(0x1a0)][_0x1e4463(0x197)](_0x4bce15,_0x5c9007,{'unitId':_0x4bce15,'subUnitId':_0x5c9007,'ref':'','id':_0x1ed94b[_0x1e4463(0x165)],'dT':D(+_0x1ed94b['createTimestamp']),'threadId':_0x1ed94b[_0x1e4463(0x147)],'personId':(_0x3ef3e4=(_0x2f251b=_0x1ed94b[_0x1e4463(0x185)])==null?void 0x0:_0x2f251b[_0x1e4463(0x164)])!=null?_0x3ef3e4:_0x1ed94b['userId'],'text':JSON['parse'](_0x1ed94b[_0x1e4463(0x155)]),'parentId':_0xaafa6d['id']});break;}case v['Delete']:{const _0x412077=this[_0x1e4463(0x1a0)]['getComment'](_0x4bce15,_0x5c9007,_0x1ed94b[_0x1e4463(0x165)]);_0x412077&&_0x412077['parentId']&&this[_0x1e4463(0x1a0)][_0x1e4463(0x151)](_0x4bce15,_0x5c9007,_0x1ed94b[_0x1e4463(0x165)]);break;}case v[_0x1e4463(0x15f)]:{this[_0x1e4463(0x1a0)][_0x1e4463(0x17f)](_0x4bce15,_0x5c9007,{'commentId':_0x1ed94b[_0x1e4463(0x165)],'text':JSON[_0x1e4463(0x19c)](_0x1ed94b[_0x1e4463(0x155)])});break;}case v['Solve']:{const _0x9d9a8f=(_0x17c7ca=this['_threadCommentModel'][_0x1e4463(0x13f)](_0x1ed94b['unitId'])[_0x1e4463(0x179)](_0x5e87b=>_0x5e87b[_0x1e4463(0x147)]===_0x1ed94b[_0x1e4463(0x147)]))==null?void 0x0:_0x17c7ca['root'];_0x9d9a8f&&this[_0x1e4463(0x1a0)][_0x1e4463(0x17c)](_0x4bce15,_0x5c9007,_0x9d9a8f['id'],_0x1ed94b[_0x1e4463(0x19f)]===I[_0x1e4463(0x189)]);break;}}}));}};S=V([p(0x0,_0x2829ff(_0x12f7f5)),p(0x1,_0x2829ff(_0x3cc6a8)),p(0x2,_0x2829ff(_0x3a2f14)),p(0x3,_0x2829ff(_0x2a4fc8))],S);function _0x4476(_0x2d2148,_0x46df1f){const _0x1bcefa=_0x1bce();return _0x4476=function(_0x44764f,_0x1aecd0){_0x44764f=_0x44764f-0x13f;let _0x1a0903=_0x1bcefa[_0x44764f];return _0x1a0903;},_0x4476(_0x2d2148,_0x46df1f);}const z='thread-comment-data-source.config',M={};var k=Object[_0x32e807(0x190)],Q=(_0x185955,_0x1b8521,_0x1aefcf,_0x40c70b)=>{const _0x23888e=_0x32e807;for(var _0x4cbd4e=_0x40c70b>0x1?void 0x0:_0x40c70b?k(_0x1b8521,_0x1aefcf):_0x1b8521,_0x3f9b78=_0x185955[_0x23888e(0x14e)]-0x1,_0x5d33bd;_0x3f9b78>=0x0;_0x3f9b78--)(_0x5d33bd=_0x185955[_0x3f9b78])&&(_0x4cbd4e=_0x5d33bd(_0x4cbd4e)||_0x4cbd4e);return _0x4cbd4e;},_=(_0x2dc7ed,_0x507198)=>(_0x391d90,_0x394dd3)=>_0x507198(_0x391d90,_0x394dd3,_0x2dc7ed);function X(_0x1080f0,_0x19b150){const _0x3a20bf=_0x32e807,_0x14717a=_0x1080f0['replies'][0x0];return{..._0x19b150,'id':_0x14717a[_0x3a20bf(0x165)],'resolved':_0x1080f0[_0x3a20bf(0x19f)]===0x1,'dT':D(_0x14717a[_0x3a20bf(0x194)]),'personId':_0x14717a['userId'],'threadId':_0x14717a[_0x3a20bf(0x147)]};}function ee(_0x14a8f9,_0x51acfd,_0x5c98eb){const _0x44ba27=_0x32e807;var _0x5490de,_0x51ce0e;if(((_0x51ce0e=(_0x5490de=_0x14a8f9==null?void 0x0:_0x14a8f9[_0x44ba27(0x15b)])==null?void 0x0:_0x5490de[_0x44ba27(0x14e)])!=null?_0x51ce0e:0x0)>0x0){const _0x30de3c=(_0x182695,_0x4ed258)=>({'id':_0x182695['replyId'],'threadId':_0x182695[_0x44ba27(0x147)],'dT':D(_0x182695[_0x44ba27(0x194)]),'personId':_0x182695['userId'],'resolved':_0x14a8f9[_0x44ba27(0x19f)]===I[_0x44ba27(0x189)],'unitId':_0x51acfd,'subUnitId':_0x5c98eb,'text':JSON[_0x44ba27(0x19c)](_0x182695[_0x44ba27(0x155)]),'parentId':_0x4ed258}),_0x4f224e=_0x30de3c(_0x14a8f9[_0x44ba27(0x15b)][0x0]);return{..._0x4f224e,'children':_0x14a8f9[_0x44ba27(0x15b)]['slice'](0x1)[_0x44ba27(0x1a2)](_0x258445=>_0x30de3c(_0x258445,_0x4f224e['id']))};}return null;}let f=class{constructor(_0x21c918,_0x5d2f6e,_0x49539f,_0x455f1f){const _0xe8d59e=_0x32e807;this[_0xe8d59e(0x18f)]=_0x21c918,this[_0xe8d59e(0x17d)]=_0x5d2f6e,this[_0xe8d59e(0x195)]=_0x49539f,this['_injector']=_0x455f1f;}async[_0x32e807(0x197)](_0x92fc1){const _0x25cd56=_0x32e807;var _0x3b05de,_0x2406a8;const {parentId:_0x24040e,unitId:_0x4d11c1,text:_0x456396,threadId:_0x5b115f}=_0x92fc1,_0xdfff1d=(_0x2406a8=(_0x3b05de=_0x456396[_0x25cd56(0x153)])==null?void 0x0:_0x3b05de['filter'](_0x5c41ca=>_0x5c41ca[_0x25cd56(0x177)]===_0x5d6a87[_0x25cd56(0x158)])[_0x25cd56(0x1a2)](_0x4dd386=>_0x4dd386[_0x25cd56(0x14f)]))!=null?_0x2406a8:[],_0x34eb7c=JSON[_0x25cd56(0x178)](_0x456396),_0x3643dc=(await this[_0x25cd56(0x195)]['requireSession'](_0x4d11c1))[_0x25cd56(0x154)]();if(_0x24040e){const _0x5445ab={'memberId':_0x3643dc,'unitId':_0x4d11c1,'content':_0x34eb7c,'mention':_0xdfff1d,'threadId':_0x5b115f},_0xf10b74=(await this[_0x25cd56(0x18f)][_0x25cd56(0x162)](_0x25cd56(0x149)+_0x4d11c1+_0x25cd56(0x16a),{'body':_0x5445ab}))[_0x25cd56(0x18e)][_0x25cd56(0x143)];return{..._0x92fc1,'id':_0xf10b74[_0x25cd56(0x165)],'dT':_0xa47b16(+_0xf10b74[_0x25cd56(0x194)])['format'](_0x25cd56(0x14b)),'personId':_0xf10b74[_0x25cd56(0x18c)]};}else{const _0x57ff6a={'memberId':_0x3643dc,'unitId':_0x4d11c1,'content':_0x34eb7c,'mention':_0xdfff1d},_0x3a3072=await this[_0x25cd56(0x18f)]['post'](_0x25cd56(0x149)+_0x4d11c1+_0x25cd56(0x17a),{'body':_0x57ff6a});return X(_0x3a3072[_0x25cd56(0x18e)][_0x25cd56(0x18a)],_0x92fc1);}}async['updateComment'](_0x55c954){const _0x45ea3d=_0x32e807;var _0x2e9d1f,_0xf1f4e9;const {text:_0x512393,unitId:_0x482091}=_0x55c954,_0x2066f5=(_0xf1f4e9=(_0x2e9d1f=_0x512393[_0x45ea3d(0x153)])==null?void 0x0:_0x2e9d1f[_0x45ea3d(0x150)](_0x104c9a=>_0x104c9a[_0x45ea3d(0x177)]===_0x5d6a87['COMMENT'])[_0x45ea3d(0x1a2)](_0x2e7e89=>_0x2e7e89[_0x45ea3d(0x14f)]))!=null?_0xf1f4e9:[],_0x422c9e=JSON['stringify'](_0x512393),_0x575cd7=_0x55c954[_0x45ea3d(0x147)],_0x2d5f61=_0x55c954['id'],_0x5b5b08={'memberId':(await this[_0x45ea3d(0x195)]['requireSession'](_0x482091))[_0x45ea3d(0x154)](),'unitId':_0x482091,'threadId':_0x575cd7,'mention':_0x2066f5,'content':_0x422c9e,'replyId':_0x2d5f61},_0x4c6a88=await this[_0x45ea3d(0x18f)][_0x45ea3d(0x162)](_0x45ea3d(0x149)+_0x482091+_0x45ea3d(0x14c),{'body':_0x5b5b08});return!_0x4c6a88[_0x45ea3d(0x18e)][_0x45ea3d(0x15c)]||_0x4c6a88['body'][_0x45ea3d(0x15c)][_0x45ea3d(0x184)]===0x1;}async[_0x32e807(0x17c)](_0x2f7daf){const _0x89ad27=_0x32e807,{unitId:_0x40e601}=_0x2f7daf,_0xea795b=_0x2f7daf[_0x89ad27(0x147)],_0x31ffa6={'memberId':this[_0x89ad27(0x17d)]['getCurrentUser']()[_0x89ad27(0x164)],'unitId':_0x40e601,'threadId':_0xea795b,'solved':_0x2f7daf['resolved']?I['Solved']:I[_0x89ad27(0x152)]},_0x141238=await this[_0x89ad27(0x18f)][_0x89ad27(0x162)]('/universer-api/comment/unit/'+_0x40e601+_0x89ad27(0x174),{'body':_0x31ffa6});return!_0x141238['body']['error']||_0x141238['body'][_0x89ad27(0x15c)][_0x89ad27(0x184)]===0x1;}async[_0x32e807(0x151)](_0x4bd2ae,_0x1b2fb7,_0x46c209,_0x419a4b){const _0x53c921=_0x32e807,_0x90d404={'memberId':(await this['_sessionService'][_0x53c921(0x146)](_0x4bd2ae))['getMemberID'](),'threadId':_0x46c209,'replyId':_0x419a4b,'unitId':_0x4bd2ae},_0x3b8728=await this[_0x53c921(0x18f)][_0x53c921(0x162)]('/universer-api/comment/unit/'+_0x4bd2ae+_0x53c921(0x19d),{'body':_0x90d404});return!_0x3b8728[_0x53c921(0x18e)][_0x53c921(0x15c)]||_0x3b8728[_0x53c921(0x18e)]['error'][_0x53c921(0x184)]===0x1;}async[_0x32e807(0x15e)](_0x3e1ab3,_0x548a8c,_0x125fd7){const _0x82f234=_0x32e807,_0x1bc0b3={'unitId':_0x3e1ab3,'threadId':_0x125fd7},_0x19b85d=await this['_httpService'][_0x82f234(0x162)]('/universer-api/comment/unit/'+_0x3e1ab3+'/list',{'body':_0x1bc0b3}),_0x301a64=_0x125fd7[_0x82f234(0x1a2)](_0x5e6c98=>ee(_0x19b85d[_0x82f234(0x18e)][_0x82f234(0x191)][_0x5e6c98],_0x3e1ab3,_0x548a8c))['filter'](Boolean);return Object[_0x82f234(0x15d)](_0x19b85d[_0x82f234(0x18e)][_0x82f234(0x168)])[_0x82f234(0x173)](_0xdf3a61=>{this['_userService']['addUser'](_0xdf3a61);}),_0x301a64;}[_0x32e807(0x188)](_0x4e174e){const _0x37d5ce=_0x32e807;return{'id':_0x4e174e['id'],'threadId':_0x4e174e[_0x37d5ce(0x147)],'ref':_0x4e174e['ref']};}};f=Q([_(0x0,_0x2829ff(_0x382c33)),_(0x1,_0x2829ff(_0x3a2f14)),_(0x2,_0x2829ff(_0x307a0a)),_(0x3,_0x2829ff(_0x2a4fc8))],f);var re=Object[_0x32e807(0x190)],te=(_0x27fe5e,_0x2986c1,_0x43f4e4,_0x375d69)=>{const _0x335fc1=_0x32e807;for(var _0x2a480e=_0x375d69>0x1?void 0x0:_0x375d69?re(_0x2986c1,_0x43f4e4):_0x2986c1,_0x4c574e=_0x27fe5e[_0x335fc1(0x14e)]-0x1,_0x17ac10;_0x4c574e>=0x0;_0x4c574e--)(_0x17ac10=_0x27fe5e[_0x4c574e])&&(_0x2a480e=_0x17ac10(_0x2a480e)||_0x2a480e);return _0x2a480e;},N=(_0x3dd2ac,_0x5151d6)=>(_0x4b3fe7,_0x55bc28)=>_0x5151d6(_0x4b3fe7,_0x55bc28,_0x3dd2ac);let g=class extends _0x2e1c60{constructor(_0x2a7e7e,_0x32d749){const _0x4ec5c7=_0x32e807;super(),this[_0x4ec5c7(0x16b)]=_0x2a7e7e,this['_threadCommentDataSource']=_0x32d749,this[_0x4ec5c7(0x16f)]();}[_0x32e807(0x16f)](){const _0x519bab=_0x32e807;this[_0x519bab(0x16b)][_0x519bab(0x14a)]=this[_0x519bab(0x17e)],this[_0x519bab(0x16b)][_0x519bab(0x175)]=!0x1;}};g=te([N(0x0,_0x3047aa),N(0x1,_0x2829ff(f))],g);var se=Object[_0x32e807(0x181)],oe=Object[_0x32e807(0x190)],ne=(_0x4d954b,_0x5666fe,_0x1fec59)=>_0x5666fe in _0x4d954b?se(_0x4d954b,_0x5666fe,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1fec59}):_0x4d954b[_0x5666fe]=_0x1fec59,ie=(_0x55092d,_0x4d1819,_0x595d7d,_0x432597)=>{const _0x3255a7=_0x32e807;for(var _0x2b3eef=_0x432597>0x1?void 0x0:_0x432597?oe(_0x4d1819,_0x595d7d):_0x4d1819,_0x538402=_0x55092d[_0x3255a7(0x14e)]-0x1,_0x48f900;_0x538402>=0x0;_0x538402--)(_0x48f900=_0x55092d[_0x538402])&&(_0x2b3eef=_0x48f900(_0x2b3eef)||_0x2b3eef);return _0x2b3eef;},w=(_0x53b011,_0x2ecc64)=>(_0x5e7c5d,_0x2ee9b0)=>_0x2ecc64(_0x5e7c5d,_0x2ee9b0,_0x53b011),$=(_0x3411e5,_0x5b2c1f,_0x50df34)=>ne(_0x3411e5,typeof _0x5b2c1f!=_0x32e807(0x18d)?_0x5b2c1f+'':_0x5b2c1f,_0x50df34);let b=class extends _0x5d5f99{constructor(_0x5336b5=M,_0x136ddf,_0x57007d){const _0xb2cbb2=_0x32e807;super(),this['_config']=_0x5336b5,this[_0xb2cbb2(0x145)]=_0x136ddf,this['_configService']=_0x57007d;const {..._0x15e441}=_0x1eb38a({},M,this[_0xb2cbb2(0x17b)]);this['_configService'][_0xb2cbb2(0x16c)](z,_0x15e441);}[_0x32e807(0x161)](){const _0x59456f=_0x32e807;[[f],[g],[S]][_0x59456f(0x173)](_0x4667ce=>{const _0x5688b0=_0x59456f;this[_0x5688b0(0x145)][_0x5688b0(0x172)](_0x4667ce);});}[_0x32e807(0x199)](){const _0x59d14f=_0x32e807;this['_injector'][_0x59d14f(0x176)](g),this[_0x59d14f(0x145)][_0x59d14f(0x176)](S);}};$(b,_0x32e807(0x157),W),$(b,_0x32e807(0x166),_0xd4c5e1[_0x32e807(0x180)]),b=ie([_0xe03605(_0x2bfb63,_0x40e60c,_0xcfd646),w(0x1,_0x2829ff(_0x2a4fc8)),w(0x2,_0x5c82ef)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x2d8ddf=_0x581c;(function(_0x3a474b,_0x336e0c){const _0x9912a3=_0x581c,_0x247516=_0x3a474b();while(!![]){try{const _0x12b175=parseInt(_0x9912a3(0x185))/0x1*(-parseInt(_0x9912a3(0x173))/0x2)+-parseInt(_0x9912a3(0x193))/0x3+parseInt(_0x9912a3(0x1a8))/0x4*(parseInt(_0x9912a3(0x190))/0x5)+parseInt(_0x9912a3(0x1a1))/0x6*(-parseInt(_0x9912a3(0x17f))/0x7)+parseInt(_0x9912a3(0x19d))/0x8+parseInt(_0x9912a3(0x1a3))/0x9*(-parseInt(_0x9912a3(0x1a4))/0xa)+-parseInt(_0x9912a3(0x14e))/0xb*(-parseInt(_0x9912a3(0x198))/0xc);if(_0x12b175===_0x336e0c)break;else _0x247516['push'](_0x247516['shift']());}catch(_0x3ab2f1){_0x247516['push'](_0x247516['shift']());}}}(_0x1b6f,0xb7162));import{CommentService as _0x3b3e81,CollaborationSessionService as _0x300307,UniverCollaborationClientPlugin as _0x4b4a79}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x242cb8}from'@univerjs-pro/license';import{dayjs as _0x2a10a6,UserManagerService as _0x3428f3,Inject as _0x56e3c7,Injector as _0x24c6dc,Disposable as _0x27d718,CustomRangeType as _0x3b6fb4,UniverInstanceType as _0x2cbf4f,DependentOn as _0x106b69,IConfigService as _0x56bccc,Plugin as _0x421e16,merge as _0x1ad3c8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x52c2ef}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2c28e4,IThreadCommentDataSourceService as _0x4e6c1c}from'@univerjs/thread-comment';import{bufferTime as _0xbabfd}from'rxjs';import{HTTPService as _0x49e4f5}from'@univerjs/network';const W=_0x2d8ddf(0x156);var I=(_0xa1c2c2=>(_0xa1c2c2[_0xa1c2c2['OpenOrReOpen']=0x0]='OpenOrReOpen',_0xa1c2c2[_0xa1c2c2[_0x2d8ddf(0x181)]=0x1]=_0x2d8ddf(0x181),_0xa1c2c2[_0xa1c2c2[_0x2d8ddf(0x199)]=-0x1]=_0x2d8ddf(0x199),_0xa1c2c2))(I||{}),v=(_0x410362=>(_0x410362[_0x410362[_0x2d8ddf(0x187)]=0x0]=_0x2d8ddf(0x187),_0x410362[_0x410362[_0x2d8ddf(0x167)]=0x1]='Add',_0x410362[_0x410362[_0x2d8ddf(0x142)]=0x2]=_0x2d8ddf(0x142),_0x410362[_0x410362[_0x2d8ddf(0x169)]=0x3]='Edit',_0x410362[_0x410362['Delete']=0x4]=_0x2d8ddf(0x150),_0x410362[_0x410362[_0x2d8ddf(0x16c)]=0x5]=_0x2d8ddf(0x16c),_0x410362[_0x410362[_0x2d8ddf(0x199)]=-0x1]=_0x2d8ddf(0x199),_0x410362))(v||{});const D=_0x3e52bc=>_0x2a10a6(new Date(+_0x3e52bc))[_0x2d8ddf(0x188)](_0x2d8ddf(0x15d)),B=async(_0x4eb45c,_0x1ea478)=>{const _0x860404=_0x2d8ddf,_0x4bf51e=_0x4eb45c['get'](_0x3428f3),_0x50143c=_0x4eb45c[_0x860404(0x18b)](_0x49e4f5);_0x1ea478['forEach'](_0x3d2b02=>{const _0x65f855=_0x860404;_0x4bf51e[_0x65f855(0x1a5)](_0x3d2b02)&&_0x1ea478['delete'](_0x3d2b02);}),_0x1ea478[_0x860404(0x184)]&&(await _0x50143c[_0x860404(0x18b)](_0x860404(0x182),{'params':{'userIDs':[..._0x1ea478]}}))[_0x860404(0x15c)][_0x860404(0x145)]['forEach'](_0x48452f=>{_0x48452f&&_0x4bf51e['addUser'](_0x48452f);});};function _0x581c(_0x2022b0,_0x52c476){const _0x1b6f87=_0x1b6f();return _0x581c=function(_0x581cdd,_0x598857){_0x581cdd=_0x581cdd-0x142;let _0xffd5ad=_0x1b6f87[_0x581cdd];return _0xffd5ad;},_0x581c(_0x2022b0,_0x52c476);}var K=Object[_0x2d8ddf(0x19b)],V=(_0x5bc90a,_0x3428d1,_0x42bc52,_0x1f0ac8)=>{const _0x475880=_0x2d8ddf;for(var _0x5a64ee=_0x1f0ac8>0x1?void 0x0:_0x1f0ac8?K(_0x3428d1,_0x42bc52):_0x3428d1,_0x13396d=_0x5bc90a[_0x475880(0x15b)]-0x1,_0x1b1107;_0x13396d>=0x0;_0x13396d--)(_0x1b1107=_0x5bc90a[_0x13396d])&&(_0x5a64ee=_0x1b1107(_0x5a64ee)||_0x5a64ee);return _0x5a64ee;},p=(_0x2e58e4,_0x1bad0c)=>(_0x5250c4,_0x2b5066)=>_0x1bad0c(_0x5250c4,_0x2b5066,_0x2e58e4);let S=class extends _0x27d718{constructor(_0x55bffe,_0x26b70f,_0x3dd8a8,_0xa3f144){const _0x270245=_0x2d8ddf;super(),this['_commentService']=_0x55bffe,this[_0x270245(0x17e)]=_0x26b70f,this[_0x270245(0x153)]=_0x3dd8a8,this[_0x270245(0x16f)]=_0xa3f144,this['_init'](),this['_initUserSync']();}[_0x2d8ddf(0x19e)](){const _0xbe1e65=_0x2d8ddf;this[_0xbe1e65(0x14c)](this[_0xbe1e65(0x17e)][_0xbe1e65(0x159)][_0xbe1e65(0x14f)](_0xbabfd(0x10))['subscribe'](_0x59e2a7=>{const _0x301427=_0xbe1e65,_0x1e327d=new Set();_0x59e2a7[_0x301427(0x17d)](_0x4ce315=>{const _0x4d5d55=_0x301427;switch(_0x4ce315[_0x4d5d55(0x1a6)]){case _0x4d5d55(0x160):{const _0x60d25f=_0x4ce315[_0x4d5d55(0x1a2)][_0x4d5d55(0x196)];_0x1e327d['add'](_0x60d25f);break;}}}),B(this[_0x301427(0x16f)],_0x1e327d);}));}[_0x2d8ddf(0x16e)](){const _0x2a7e4f=_0x2d8ddf;this[_0x2a7e4f(0x14c)](this[_0x2a7e4f(0x195)][_0x2a7e4f(0x159)][_0x2a7e4f(0x17c)](async _0x5e57fb=>{const _0xa6aca1=_0x2a7e4f;var _0x4fd8f5,_0x3265b5,_0x375168,_0x52deef;const _0x457f45=(_0x4fd8f5=this['_threadCommentModel'][_0xa6aca1(0x158)](_0x5e57fb['unitId'])[_0xa6aca1(0x197)](_0x1e4520=>_0x1e4520[_0xa6aca1(0x163)]===_0x5e57fb[_0xa6aca1(0x163)]))==null?void 0x0:_0x4fd8f5[_0xa6aca1(0x162)];if(!_0x457f45)return;const {unitId:_0x13ce99,subUnitId:_0xcc5e07}=_0x457f45;switch(_0x5e57fb[_0xa6aca1(0x1a9)]&&this[_0xa6aca1(0x153)][_0xa6aca1(0x176)](_0x5e57fb[_0xa6aca1(0x1a9)]),_0x5e57fb['type']){case v[_0xa6aca1(0x167)]:break;case v['Reply']:{this[_0xa6aca1(0x17e)][_0xa6aca1(0x16a)](_0x13ce99,_0xcc5e07,{'unitId':_0x13ce99,'subUnitId':_0xcc5e07,'ref':'','id':_0x5e57fb['replyId'],'dT':D(+_0x5e57fb[_0xa6aca1(0x17b)]),'threadId':_0x5e57fb[_0xa6aca1(0x163)],'personId':(_0x375168=(_0x3265b5=_0x5e57fb['user'])==null?void 0x0:_0x3265b5[_0xa6aca1(0x14d)])!=null?_0x375168:_0x5e57fb[_0xa6aca1(0x18a)],'text':JSON[_0xa6aca1(0x164)](_0x5e57fb[_0xa6aca1(0x149)]),'parentId':_0x457f45['id']});break;}case v[_0xa6aca1(0x150)]:{const _0x219d85=this[_0xa6aca1(0x17e)][_0xa6aca1(0x189)](_0x13ce99,_0xcc5e07,_0x5e57fb[_0xa6aca1(0x19a)]);_0x219d85&&_0x219d85[_0xa6aca1(0x16d)]&&this[_0xa6aca1(0x17e)]['deleteComment'](_0x13ce99,_0xcc5e07,_0x5e57fb[_0xa6aca1(0x19a)]);break;}case v[_0xa6aca1(0x169)]:{this[_0xa6aca1(0x17e)][_0xa6aca1(0x177)](_0x13ce99,_0xcc5e07,{'commentId':_0x5e57fb['replyId'],'text':JSON[_0xa6aca1(0x164)](_0x5e57fb[_0xa6aca1(0x149)])});break;}case v[_0xa6aca1(0x16c)]:{const _0x17ab63=(_0x52deef=this[_0xa6aca1(0x17e)][_0xa6aca1(0x158)](_0x5e57fb[_0xa6aca1(0x15e)])[_0xa6aca1(0x197)](_0x4c1b4b=>_0x4c1b4b[_0xa6aca1(0x163)]===_0x5e57fb[_0xa6aca1(0x163)]))==null?void 0x0:_0x52deef[_0xa6aca1(0x162)];_0x17ab63&&this[_0xa6aca1(0x17e)][_0xa6aca1(0x18f)](_0x13ce99,_0xcc5e07,_0x17ab63['id'],_0x5e57fb[_0xa6aca1(0x166)]===I[_0xa6aca1(0x181)]);break;}}}));}};S=V([p(0x0,_0x56e3c7(_0x3b3e81)),p(0x1,_0x56e3c7(_0x2c28e4)),p(0x2,_0x56e3c7(_0x3428f3)),p(0x3,_0x56e3c7(_0x24c6dc))],S);const z=_0x2d8ddf(0x144),M={};var k=Object[_0x2d8ddf(0x19b)],Q=(_0x3a2e77,_0x4c1b91,_0x57740e,_0x45661b)=>{for(var _0x314a25=_0x45661b>0x1?void 0x0:_0x45661b?k(_0x4c1b91,_0x57740e):_0x4c1b91,_0x2de47=_0x3a2e77['length']-0x1,_0x5f396f;_0x2de47>=0x0;_0x2de47--)(_0x5f396f=_0x3a2e77[_0x2de47])&&(_0x314a25=_0x5f396f(_0x314a25)||_0x314a25);return _0x314a25;},_=(_0x3ade8f,_0x4ad7a5)=>(_0x49490e,_0x7acace)=>_0x4ad7a5(_0x49490e,_0x7acace,_0x3ade8f);function X(_0x1cbaa3,_0xc1b122){const _0x2ee030=_0x2d8ddf,_0x427bac=_0x1cbaa3[_0x2ee030(0x147)][0x0];return{..._0xc1b122,'id':_0x427bac[_0x2ee030(0x19a)],'resolved':_0x1cbaa3[_0x2ee030(0x166)]===0x1,'dT':D(_0x427bac[_0x2ee030(0x17b)]),'personId':_0x427bac[_0x2ee030(0x18a)],'threadId':_0x427bac[_0x2ee030(0x163)]};}function ee(_0xe38bd5,_0x828308,_0x430ea8){const _0x431f05=_0x2d8ddf;var _0x39b4ad,_0xd4bc7e;if(((_0xd4bc7e=(_0x39b4ad=_0xe38bd5==null?void 0x0:_0xe38bd5[_0x431f05(0x147)])==null?void 0x0:_0x39b4ad[_0x431f05(0x15b)])!=null?_0xd4bc7e:0x0)>0x0){const _0x36c6bc=(_0x2e9bba,_0x23e3a6)=>({'id':_0x2e9bba[_0x431f05(0x19a)],'threadId':_0x2e9bba[_0x431f05(0x163)],'dT':D(_0x2e9bba[_0x431f05(0x17b)]),'personId':_0x2e9bba['userId'],'resolved':_0xe38bd5[_0x431f05(0x166)]===I['Solved'],'unitId':_0x828308,'subUnitId':_0x430ea8,'text':JSON['parse'](_0x2e9bba[_0x431f05(0x149)]),'parentId':_0x23e3a6}),_0x10504c=_0x36c6bc(_0xe38bd5[_0x431f05(0x147)][0x0]);return{..._0x10504c,'children':_0xe38bd5['replies'][_0x431f05(0x180)](0x1)[_0x431f05(0x146)](_0x4a69bf=>_0x36c6bc(_0x4a69bf,_0x10504c['id']))};}return null;}let f=class{constructor(_0x5227c1,_0x5c9800,_0x39ca03,_0x57654a){const _0x589feb=_0x2d8ddf;this[_0x589feb(0x1a0)]=_0x5227c1,this[_0x589feb(0x153)]=_0x5c9800,this['_sessionService']=_0x39ca03,this[_0x589feb(0x16f)]=_0x57654a;}async[_0x2d8ddf(0x16a)](_0x5ffde4){const _0x667f8=_0x2d8ddf;var _0x5661f7,_0x44c2d9;const {parentId:_0x5819b4,unitId:_0x1ec086,text:_0x4df2c5,threadId:_0x172f06}=_0x5ffde4,_0x2e361a=(_0x44c2d9=(_0x5661f7=_0x4df2c5['customRanges'])==null?void 0x0:_0x5661f7['filter'](_0x43e19a=>_0x43e19a[_0x667f8(0x154)]===_0x3b6fb4[_0x667f8(0x16b)])[_0x667f8(0x146)](_0x148573=>_0x148573[_0x667f8(0x155)]))!=null?_0x44c2d9:[],_0xa8987a=JSON[_0x667f8(0x170)](_0x4df2c5),_0x51f0ea=(await this['_sessionService'][_0x667f8(0x165)](_0x1ec086))[_0x667f8(0x171)]();if(_0x5819b4){const _0x2f14fb={'memberId':_0x51f0ea,'unitId':_0x1ec086,'content':_0xa8987a,'mention':_0x2e361a,'threadId':_0x172f06},_0x3b4bcf=(await this[_0x667f8(0x1a0)][_0x667f8(0x172)]('/universer-api/comment/unit/'+_0x1ec086+'/reply',{'body':_0x2f14fb}))[_0x667f8(0x15c)][_0x667f8(0x194)];return{..._0x5ffde4,'id':_0x3b4bcf['replyId'],'dT':_0x2a10a6(+_0x3b4bcf[_0x667f8(0x17b)])[_0x667f8(0x188)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3b4bcf['userId']};}else{const _0xadb612={'memberId':_0x51f0ea,'unitId':_0x1ec086,'content':_0xa8987a,'mention':_0x2e361a},_0x484536=await this[_0x667f8(0x1a0)]['post'](_0x667f8(0x148)+_0x1ec086+_0x667f8(0x17a),{'body':_0xadb612});return X(_0x484536['body'][_0x667f8(0x1a7)],_0x5ffde4);}}async[_0x2d8ddf(0x177)](_0x203b47){const _0x28eae4=_0x2d8ddf;var _0x3a4cc0,_0x1cdfe3;const {text:_0x1bb512,unitId:_0x382116}=_0x203b47,_0x596f8f=(_0x1cdfe3=(_0x3a4cc0=_0x1bb512['customRanges'])==null?void 0x0:_0x3a4cc0[_0x28eae4(0x18c)](_0x296d80=>_0x296d80[_0x28eae4(0x154)]===_0x3b6fb4[_0x28eae4(0x16b)])[_0x28eae4(0x146)](_0xe9b547=>_0xe9b547[_0x28eae4(0x155)]))!=null?_0x1cdfe3:[],_0x18b0cb=JSON[_0x28eae4(0x170)](_0x1bb512),_0x219bf4=_0x203b47['threadId'],_0x39b835=_0x203b47['id'],_0x3e12c9={'memberId':(await this[_0x28eae4(0x151)][_0x28eae4(0x165)](_0x382116))[_0x28eae4(0x171)](),'unitId':_0x382116,'threadId':_0x219bf4,'mention':_0x596f8f,'content':_0x18b0cb,'replyId':_0x39b835},_0x5d73ac=await this[_0x28eae4(0x1a0)]['post'](_0x28eae4(0x148)+_0x382116+_0x28eae4(0x19f),{'body':_0x3e12c9});return!_0x5d73ac[_0x28eae4(0x15c)][_0x28eae4(0x186)]||_0x5d73ac[_0x28eae4(0x15c)]['error'][_0x28eae4(0x168)]===0x1;}async['resolveComment'](_0x22d2e6){const _0x399ed2=_0x2d8ddf,{unitId:_0xdbe0c}=_0x22d2e6,_0x457a11=_0x22d2e6[_0x399ed2(0x163)],_0x271e15={'memberId':this[_0x399ed2(0x153)]['getCurrentUser']()[_0x399ed2(0x14d)],'unitId':_0xdbe0c,'threadId':_0x457a11,'solved':_0x22d2e6[_0x399ed2(0x179)]?I[_0x399ed2(0x181)]:I['OpenOrReOpen']},_0x2825c7=await this[_0x399ed2(0x1a0)][_0x399ed2(0x172)](_0x399ed2(0x148)+_0xdbe0c+'/solved',{'body':_0x271e15});return!_0x2825c7[_0x399ed2(0x15c)][_0x399ed2(0x186)]||_0x2825c7['body'][_0x399ed2(0x186)][_0x399ed2(0x168)]===0x1;}async[_0x2d8ddf(0x192)](_0x183bc3,_0x21c3f4,_0x25d619,_0x4c6253){const _0x1eccae=_0x2d8ddf,_0x16d190={'memberId':(await this[_0x1eccae(0x151)]['requireSession'](_0x183bc3))[_0x1eccae(0x171)](),'threadId':_0x25d619,'replyId':_0x4c6253,'unitId':_0x183bc3},_0x5e2fbd=await this[_0x1eccae(0x1a0)][_0x1eccae(0x172)](_0x1eccae(0x148)+_0x183bc3+_0x1eccae(0x143),{'body':_0x16d190});return!_0x5e2fbd[_0x1eccae(0x15c)][_0x1eccae(0x186)]||_0x5e2fbd['body'][_0x1eccae(0x186)][_0x1eccae(0x168)]===0x1;}async[_0x2d8ddf(0x15f)](_0x43c498,_0x2038dc,_0x27a557){const _0x316469=_0x2d8ddf,_0x23050a={'unitId':_0x43c498,'threadId':_0x27a557},_0x44bfa1=await this[_0x316469(0x1a0)][_0x316469(0x172)](_0x316469(0x148)+_0x43c498+'/list',{'body':_0x23050a}),_0x3dfe29=_0x27a557['map'](_0x57bcf6=>ee(_0x44bfa1[_0x316469(0x15c)][_0x316469(0x14b)][_0x57bcf6],_0x43c498,_0x2038dc))[_0x316469(0x18c)](Boolean);return Object[_0x316469(0x175)](_0x44bfa1[_0x316469(0x15c)]['users'])[_0x316469(0x17d)](_0x189322=>{const _0x1f8aa2=_0x316469;this[_0x1f8aa2(0x153)][_0x1f8aa2(0x176)](_0x189322);}),_0x3dfe29;}[_0x2d8ddf(0x152)](_0x35bd8f){const _0x55023d=_0x2d8ddf;return{'id':_0x35bd8f['id'],'threadId':_0x35bd8f[_0x55023d(0x163)],'ref':_0x35bd8f[_0x55023d(0x14a)]};}};f=Q([_(0x0,_0x56e3c7(_0x49e4f5)),_(0x1,_0x56e3c7(_0x3428f3)),_(0x2,_0x56e3c7(_0x300307)),_(0x3,_0x56e3c7(_0x24c6dc))],f);var re=Object[_0x2d8ddf(0x19b)],te=(_0x5ac03f,_0x5cc703,_0x48b08a,_0x500634)=>{const _0x40d356=_0x2d8ddf;for(var _0x32ad90=_0x500634>0x1?void 0x0:_0x500634?re(_0x5cc703,_0x48b08a):_0x5cc703,_0x132087=_0x5ac03f[_0x40d356(0x15b)]-0x1,_0x2943fd;_0x132087>=0x0;_0x132087--)(_0x2943fd=_0x5ac03f[_0x132087])&&(_0x32ad90=_0x2943fd(_0x32ad90)||_0x32ad90);return _0x32ad90;},N=(_0x409c23,_0x10a28e)=>(_0x433408,_0x49f019)=>_0x10a28e(_0x433408,_0x49f019,_0x409c23);let g=class extends _0x27d718{constructor(_0x1e2399,_0x17138b){const _0x421d42=_0x2d8ddf;super(),this[_0x421d42(0x157)]=_0x1e2399,this[_0x421d42(0x15a)]=_0x17138b,this[_0x421d42(0x161)]();}['_initDataSource'](){const _0x350b93=_0x2d8ddf;this['_threadCommentDataSourceService']['dataSource']=this[_0x350b93(0x15a)],this[_0x350b93(0x157)][_0x350b93(0x178)]=!0x1;}};function _0x1b6f(){const _0x3faff3=['code','Edit','addComment','COMMENT','Solve','parentId','_init','_injector','stringify','getMemberID','post','89768yIYoNF','_configService','values','addUser','updateComment','syncUpdateMutationToColla','resolved','/add','createTimestamp','subscribe','forEach','_threadCommentModel','847IIjioy','slice','Solved','/universer-api/user/list','onStarting','size','18PhkNYT','error','Unknown','format','getComment','userId','get','filter','symbol','pluginName','resolveComment','3452030wQRpti','onReady','deleteComment','2173527NgEyjA','reply','_commentService','personId','find','126156AoASFr','UNRECOGNIZED','replyId','getOwnPropertyDescriptor','UNIVER_UNKNOWN','4115216GvusCd','_initUserSync','/edit','_httpService','71346QxWJrU','payload','16839cEhXHP','6030ezXSal','getUser','type','comment','8dCaZwZ','user','Reply','/delete','thread-comment-data-source.config','users','map','replies','/universer-api/comment/unit/','content','ref','comments','disposeWithMe','userID','3091grvgYr','pipe','Delete','_sessionService','saveCommentToSnapshot','_userService','rangeType','rangeId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentDataSourceService','getUnit','commentUpdate$','_threadCommentDataSource','length','body','YYYY/MM/DD\x20HH:mm','unitId','listComments','add','_initDataSource','root','threadId','parse','requireSession','solved','Add'];_0x1b6f=function(){return _0x3faff3;};return _0x1b6f();}g=te([N(0x0,_0x4e6c1c),N(0x1,_0x56e3c7(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0xddf6f9,_0x4b5c63,_0x409517)=>_0x4b5c63 in _0xddf6f9?se(_0xddf6f9,_0x4b5c63,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x409517}):_0xddf6f9[_0x4b5c63]=_0x409517,ie=(_0x25ec58,_0x277884,_0x294e91,_0x33b8b7)=>{const _0x38e927=_0x2d8ddf;for(var _0x986ae2=_0x33b8b7>0x1?void 0x0:_0x33b8b7?oe(_0x277884,_0x294e91):_0x277884,_0x38d22d=_0x25ec58[_0x38e927(0x15b)]-0x1,_0x5ad3b6;_0x38d22d>=0x0;_0x38d22d--)(_0x5ad3b6=_0x25ec58[_0x38d22d])&&(_0x986ae2=_0x5ad3b6(_0x986ae2)||_0x986ae2);return _0x986ae2;},w=(_0x4ca070,_0x353427)=>(_0x453490,_0x23198a)=>_0x353427(_0x453490,_0x23198a,_0x4ca070),$=(_0x30b31c,_0x2020f6,_0x13f556)=>ne(_0x30b31c,typeof _0x2020f6!=_0x2d8ddf(0x18d)?_0x2020f6+'':_0x2020f6,_0x13f556);let b=class extends _0x421e16{constructor(_0x278d6d=M,_0x29c842,_0x13d276){const _0x1e670d=_0x2d8ddf;super(),this['_config']=_0x278d6d,this[_0x1e670d(0x16f)]=_0x29c842,this[_0x1e670d(0x174)]=_0x13d276;const {..._0x4a7f4c}=_0x1ad3c8({},M,this['_config']);this[_0x1e670d(0x174)]['setConfig'](z,_0x4a7f4c);}[_0x2d8ddf(0x183)](){const _0x10ed45=_0x2d8ddf;[[f],[g],[S]][_0x10ed45(0x17d)](_0x40f7ca=>{const _0x2b764e=_0x10ed45;this[_0x2b764e(0x16f)][_0x2b764e(0x160)](_0x40f7ca);});}[_0x2d8ddf(0x191)](){const _0x4b306f=_0x2d8ddf;this['_injector']['get'](g),this[_0x4b306f(0x16f)][_0x4b306f(0x18b)](S);}};$(b,_0x2d8ddf(0x18e),W),$(b,_0x2d8ddf(0x1a6),_0x2cbf4f[_0x2d8ddf(0x19c)]),b=ie([_0x106b69(_0x52c2ef,_0x4b4a79,_0x242cb8),w(0x1,_0x56e3c7(_0x24c6dc)),w(0x2,_0x56bccc)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x32e807=_0x4476;(function(_0x196e4b,_0x53f5c8){const _0x14fb33=_0x4476,_0x203376=_0x196e4b();while(!![]){try{const _0x514d95=-parseInt(_0x14fb33(0x170))/0x1+-parseInt(_0x14fb33(0x163))/0x2+parseInt(_0x14fb33(0x186))/0x3*(parseInt(_0x14fb33(0x14d))/0x4)+parseInt(_0x14fb33(0x167))/0x5*(-parseInt(_0x14fb33(0x1a1))/0x6)+parseInt(_0x14fb33(0x19e))/0x7*(-parseInt(_0x14fb33(0x182))/0x8)+parseInt(_0x14fb33(0x141))/0x9+-parseInt(_0x14fb33(0x19b))/0xa*(-parseInt(_0x14fb33(0x196))/0xb);if(_0x514d95===_0x53f5c8)break;else _0x203376['push'](_0x203376['shift']());}catch(_0x3a5873){_0x203376['push'](_0x203376['shift']());}}}(_0x1bce,0x647c4));import{CommentService as _0x12f7f5,CollaborationSessionService as _0x307a0a,UniverCollaborationClientPlugin as _0x40e60c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xcfd646}from'@univerjs-pro/license';import{dayjs as _0xa47b16,UserManagerService as _0x3a2f14,Inject as _0x2829ff,Injector as _0x2a4fc8,Disposable as _0x2e1c60,CustomRangeType as _0x5d6a87,UniverInstanceType as _0xd4c5e1,DependentOn as _0xe03605,IConfigService as _0x5c82ef,Plugin as _0x5d5f99,merge as _0x1eb38a}from'@univerjs/core';function _0x1bce(){const _0x2b93a9=['73636LCOYQF','userID','replyId','type','25uWlVaF','users','Solve','/reply','_threadCommentDataSourceService','setConfig','addUser','_initUserSync','_initDataSource','247326ttyqTa','format','add','forEach','/solved','syncUpdateMutationToColla','get','rangeType','stringify','find','/add','_config','resolveComment','_userService','_threadCommentDataSource','updateComment','UNIVER_UNKNOWN','defineProperty','641848dqYYHn','size','code','user','9pMggjU','_init','saveCommentToSnapshot','Solved','comment','unitId','userId','symbol','body','_httpService','getOwnPropertyDescriptor','comments','personId','Delete','createTimestamp','_sessionService','9097GZJPGv','addComment','Reply','onReady','commentUpdate$','5180XeWhLs','parse','/delete','7yTFnRh','solved','_threadCommentModel','85842lSwjTI','map','delete','_commentService','getUnit','/universer-api/user/list','570699YQiMKp','UNRECOGNIZED','reply','subscribe','_injector','requireSession','threadId','payload','/universer-api/comment/unit/','dataSource','YYYY/MM/DD\x20HH:mm','/edit','474268XPBGtP','length','rangeId','filter','deleteComment','OpenOrReOpen','customRanges','getMemberID','content','disposeWithMe','pluginName','COMMENT','Unknown','getUser','replies','error','values','listComments','Edit','Add','onStarting','post'];_0x1bce=function(){return _0x2b93a9;};return _0x1bce();}import{UniverThreadCommentUIPlugin as _0x2bfb63}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3cc6a8,IThreadCommentDataSourceService as _0x3047aa}from'@univerjs/thread-comment';import{bufferTime as _0x314186}from'rxjs';import{HTTPService as _0x382c33}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3a95a7=>(_0x3a95a7[_0x3a95a7[_0x32e807(0x152)]=0x0]='OpenOrReOpen',_0x3a95a7[_0x3a95a7[_0x32e807(0x189)]=0x1]=_0x32e807(0x189),_0x3a95a7[_0x3a95a7[_0x32e807(0x142)]=-0x1]=_0x32e807(0x142),_0x3a95a7))(I||{}),v=(_0x5a05af=>(_0x5a05af[_0x5a05af[_0x32e807(0x159)]=0x0]=_0x32e807(0x159),_0x5a05af[_0x5a05af[_0x32e807(0x160)]=0x1]=_0x32e807(0x160),_0x5a05af[_0x5a05af[_0x32e807(0x198)]=0x2]='Reply',_0x5a05af[_0x5a05af['Edit']=0x3]='Edit',_0x5a05af[_0x5a05af[_0x32e807(0x193)]=0x4]=_0x32e807(0x193),_0x5a05af[_0x5a05af[_0x32e807(0x169)]=0x5]='Solve',_0x5a05af[_0x5a05af[_0x32e807(0x142)]=-0x1]=_0x32e807(0x142),_0x5a05af))(v||{});const D=_0x91474b=>_0xa47b16(new Date(+_0x91474b))[_0x32e807(0x171)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4c3f24,_0x219510)=>{const _0x483072=_0x32e807,_0x4f5f0d=_0x4c3f24[_0x483072(0x176)](_0x3a2f14),_0x53b718=_0x4c3f24['get'](_0x382c33);_0x219510[_0x483072(0x173)](_0x2137f8=>{const _0x15a67d=_0x483072;_0x4f5f0d[_0x15a67d(0x15a)](_0x2137f8)&&_0x219510[_0x15a67d(0x1a3)](_0x2137f8);}),_0x219510[_0x483072(0x183)]&&(await _0x53b718[_0x483072(0x176)](_0x483072(0x140),{'params':{'userIDs':[..._0x219510]}}))[_0x483072(0x18e)][_0x483072(0x168)]['forEach'](_0x242d2e=>{const _0x50326b=_0x483072;_0x242d2e&&_0x4f5f0d[_0x50326b(0x16d)](_0x242d2e);});};var K=Object[_0x32e807(0x190)],V=(_0x154698,_0x4459af,_0x288650,_0x323267)=>{const _0xf55b8f=_0x32e807;for(var _0x3d4b83=_0x323267>0x1?void 0x0:_0x323267?K(_0x4459af,_0x288650):_0x4459af,_0x567c79=_0x154698[_0xf55b8f(0x14e)]-0x1,_0x237049;_0x567c79>=0x0;_0x567c79--)(_0x237049=_0x154698[_0x567c79])&&(_0x3d4b83=_0x237049(_0x3d4b83)||_0x3d4b83);return _0x3d4b83;},p=(_0x33dad5,_0x139e2c)=>(_0x399b49,_0x248c7b)=>_0x139e2c(_0x399b49,_0x248c7b,_0x33dad5);let S=class extends _0x2e1c60{constructor(_0x2cd379,_0x28a325,_0x1860e8,_0x241e90){const _0x459d88=_0x32e807;super(),this[_0x459d88(0x1a4)]=_0x2cd379,this[_0x459d88(0x1a0)]=_0x28a325,this[_0x459d88(0x17d)]=_0x1860e8,this[_0x459d88(0x145)]=_0x241e90,this[_0x459d88(0x187)](),this['_initUserSync']();}[_0x32e807(0x16e)](){const _0x5f18f0=_0x32e807;this[_0x5f18f0(0x156)](this[_0x5f18f0(0x1a0)]['commentUpdate$']['pipe'](_0x314186(0x10))[_0x5f18f0(0x144)](_0x4a9db1=>{const _0x21681b=new Set();_0x4a9db1['forEach'](_0x4d98b0=>{const _0x49f3ed=_0x4476;switch(_0x4d98b0[_0x49f3ed(0x166)]){case _0x49f3ed(0x172):{const _0xa701b3=_0x4d98b0[_0x49f3ed(0x148)][_0x49f3ed(0x192)];_0x21681b[_0x49f3ed(0x172)](_0xa701b3);break;}}}),B(this['_injector'],_0x21681b);}));}[_0x32e807(0x187)](){const _0x221b32=_0x32e807;this[_0x221b32(0x156)](this['_commentService'][_0x221b32(0x19a)][_0x221b32(0x144)](async _0x1ed94b=>{const _0x1e4463=_0x221b32;var _0x2c37f5,_0x2f251b,_0x3ef3e4,_0x17c7ca;const _0xaafa6d=(_0x2c37f5=this['_threadCommentModel'][_0x1e4463(0x13f)](_0x1ed94b[_0x1e4463(0x18b)])[_0x1e4463(0x179)](_0x2ace29=>_0x2ace29['threadId']===_0x1ed94b[_0x1e4463(0x147)]))==null?void 0x0:_0x2c37f5['root'];if(!_0xaafa6d)return;const {unitId:_0x4bce15,subUnitId:_0x5c9007}=_0xaafa6d;switch(_0x1ed94b[_0x1e4463(0x185)]&&this['_userService'][_0x1e4463(0x16d)](_0x1ed94b['user']),_0x1ed94b[_0x1e4463(0x166)]){case v[_0x1e4463(0x160)]:break;case v[_0x1e4463(0x198)]:{this[_0x1e4463(0x1a0)][_0x1e4463(0x197)](_0x4bce15,_0x5c9007,{'unitId':_0x4bce15,'subUnitId':_0x5c9007,'ref':'','id':_0x1ed94b[_0x1e4463(0x165)],'dT':D(+_0x1ed94b['createTimestamp']),'threadId':_0x1ed94b[_0x1e4463(0x147)],'personId':(_0x3ef3e4=(_0x2f251b=_0x1ed94b[_0x1e4463(0x185)])==null?void 0x0:_0x2f251b[_0x1e4463(0x164)])!=null?_0x3ef3e4:_0x1ed94b['userId'],'text':JSON['parse'](_0x1ed94b[_0x1e4463(0x155)]),'parentId':_0xaafa6d['id']});break;}case v['Delete']:{const _0x412077=this[_0x1e4463(0x1a0)]['getComment'](_0x4bce15,_0x5c9007,_0x1ed94b[_0x1e4463(0x165)]);_0x412077&&_0x412077['parentId']&&this[_0x1e4463(0x1a0)][_0x1e4463(0x151)](_0x4bce15,_0x5c9007,_0x1ed94b[_0x1e4463(0x165)]);break;}case v[_0x1e4463(0x15f)]:{this[_0x1e4463(0x1a0)][_0x1e4463(0x17f)](_0x4bce15,_0x5c9007,{'commentId':_0x1ed94b[_0x1e4463(0x165)],'text':JSON[_0x1e4463(0x19c)](_0x1ed94b[_0x1e4463(0x155)])});break;}case v['Solve']:{const _0x9d9a8f=(_0x17c7ca=this['_threadCommentModel'][_0x1e4463(0x13f)](_0x1ed94b['unitId'])[_0x1e4463(0x179)](_0x5e87b=>_0x5e87b[_0x1e4463(0x147)]===_0x1ed94b[_0x1e4463(0x147)]))==null?void 0x0:_0x17c7ca['root'];_0x9d9a8f&&this[_0x1e4463(0x1a0)][_0x1e4463(0x17c)](_0x4bce15,_0x5c9007,_0x9d9a8f['id'],_0x1ed94b[_0x1e4463(0x19f)]===I[_0x1e4463(0x189)]);break;}}}));}};S=V([p(0x0,_0x2829ff(_0x12f7f5)),p(0x1,_0x2829ff(_0x3cc6a8)),p(0x2,_0x2829ff(_0x3a2f14)),p(0x3,_0x2829ff(_0x2a4fc8))],S);function _0x4476(_0x2d2148,_0x46df1f){const _0x1bcefa=_0x1bce();return _0x4476=function(_0x44764f,_0x1aecd0){_0x44764f=_0x44764f-0x13f;let _0x1a0903=_0x1bcefa[_0x44764f];return _0x1a0903;},_0x4476(_0x2d2148,_0x46df1f);}const z='thread-comment-data-source.config',M={};var k=Object[_0x32e807(0x190)],Q=(_0x185955,_0x1b8521,_0x1aefcf,_0x40c70b)=>{const _0x23888e=_0x32e807;for(var _0x4cbd4e=_0x40c70b>0x1?void 0x0:_0x40c70b?k(_0x1b8521,_0x1aefcf):_0x1b8521,_0x3f9b78=_0x185955[_0x23888e(0x14e)]-0x1,_0x5d33bd;_0x3f9b78>=0x0;_0x3f9b78--)(_0x5d33bd=_0x185955[_0x3f9b78])&&(_0x4cbd4e=_0x5d33bd(_0x4cbd4e)||_0x4cbd4e);return _0x4cbd4e;},_=(_0x2dc7ed,_0x507198)=>(_0x391d90,_0x394dd3)=>_0x507198(_0x391d90,_0x394dd3,_0x2dc7ed);function X(_0x1080f0,_0x19b150){const _0x3a20bf=_0x32e807,_0x14717a=_0x1080f0['replies'][0x0];return{..._0x19b150,'id':_0x14717a[_0x3a20bf(0x165)],'resolved':_0x1080f0[_0x3a20bf(0x19f)]===0x1,'dT':D(_0x14717a[_0x3a20bf(0x194)]),'personId':_0x14717a['userId'],'threadId':_0x14717a[_0x3a20bf(0x147)]};}function ee(_0x14a8f9,_0x51acfd,_0x5c98eb){const _0x44ba27=_0x32e807;var _0x5490de,_0x51ce0e;if(((_0x51ce0e=(_0x5490de=_0x14a8f9==null?void 0x0:_0x14a8f9[_0x44ba27(0x15b)])==null?void 0x0:_0x5490de[_0x44ba27(0x14e)])!=null?_0x51ce0e:0x0)>0x0){const _0x30de3c=(_0x182695,_0x4ed258)=>({'id':_0x182695['replyId'],'threadId':_0x182695[_0x44ba27(0x147)],'dT':D(_0x182695[_0x44ba27(0x194)]),'personId':_0x182695['userId'],'resolved':_0x14a8f9[_0x44ba27(0x19f)]===I[_0x44ba27(0x189)],'unitId':_0x51acfd,'subUnitId':_0x5c98eb,'text':JSON[_0x44ba27(0x19c)](_0x182695[_0x44ba27(0x155)]),'parentId':_0x4ed258}),_0x4f224e=_0x30de3c(_0x14a8f9[_0x44ba27(0x15b)][0x0]);return{..._0x4f224e,'children':_0x14a8f9[_0x44ba27(0x15b)]['slice'](0x1)[_0x44ba27(0x1a2)](_0x258445=>_0x30de3c(_0x258445,_0x4f224e['id']))};}return null;}let f=class{constructor(_0x21c918,_0x5d2f6e,_0x49539f,_0x455f1f){const _0xe8d59e=_0x32e807;this[_0xe8d59e(0x18f)]=_0x21c918,this[_0xe8d59e(0x17d)]=_0x5d2f6e,this[_0xe8d59e(0x195)]=_0x49539f,this['_injector']=_0x455f1f;}async[_0x32e807(0x197)](_0x92fc1){const _0x25cd56=_0x32e807;var _0x3b05de,_0x2406a8;const {parentId:_0x24040e,unitId:_0x4d11c1,text:_0x456396,threadId:_0x5b115f}=_0x92fc1,_0xdfff1d=(_0x2406a8=(_0x3b05de=_0x456396[_0x25cd56(0x153)])==null?void 0x0:_0x3b05de['filter'](_0x5c41ca=>_0x5c41ca[_0x25cd56(0x177)]===_0x5d6a87[_0x25cd56(0x158)])[_0x25cd56(0x1a2)](_0x4dd386=>_0x4dd386[_0x25cd56(0x14f)]))!=null?_0x2406a8:[],_0x34eb7c=JSON[_0x25cd56(0x178)](_0x456396),_0x3643dc=(await this[_0x25cd56(0x195)]['requireSession'](_0x4d11c1))[_0x25cd56(0x154)]();if(_0x24040e){const _0x5445ab={'memberId':_0x3643dc,'unitId':_0x4d11c1,'content':_0x34eb7c,'mention':_0xdfff1d,'threadId':_0x5b115f},_0xf10b74=(await this[_0x25cd56(0x18f)][_0x25cd56(0x162)](_0x25cd56(0x149)+_0x4d11c1+_0x25cd56(0x16a),{'body':_0x5445ab}))[_0x25cd56(0x18e)][_0x25cd56(0x143)];return{..._0x92fc1,'id':_0xf10b74[_0x25cd56(0x165)],'dT':_0xa47b16(+_0xf10b74[_0x25cd56(0x194)])['format'](_0x25cd56(0x14b)),'personId':_0xf10b74[_0x25cd56(0x18c)]};}else{const _0x57ff6a={'memberId':_0x3643dc,'unitId':_0x4d11c1,'content':_0x34eb7c,'mention':_0xdfff1d},_0x3a3072=await this[_0x25cd56(0x18f)]['post'](_0x25cd56(0x149)+_0x4d11c1+_0x25cd56(0x17a),{'body':_0x57ff6a});return X(_0x3a3072[_0x25cd56(0x18e)][_0x25cd56(0x18a)],_0x92fc1);}}async['updateComment'](_0x55c954){const _0x45ea3d=_0x32e807;var _0x2e9d1f,_0xf1f4e9;const {text:_0x512393,unitId:_0x482091}=_0x55c954,_0x2066f5=(_0xf1f4e9=(_0x2e9d1f=_0x512393[_0x45ea3d(0x153)])==null?void 0x0:_0x2e9d1f[_0x45ea3d(0x150)](_0x104c9a=>_0x104c9a[_0x45ea3d(0x177)]===_0x5d6a87['COMMENT'])[_0x45ea3d(0x1a2)](_0x2e7e89=>_0x2e7e89[_0x45ea3d(0x14f)]))!=null?_0xf1f4e9:[],_0x422c9e=JSON['stringify'](_0x512393),_0x575cd7=_0x55c954[_0x45ea3d(0x147)],_0x2d5f61=_0x55c954['id'],_0x5b5b08={'memberId':(await this[_0x45ea3d(0x195)]['requireSession'](_0x482091))[_0x45ea3d(0x154)](),'unitId':_0x482091,'threadId':_0x575cd7,'mention':_0x2066f5,'content':_0x422c9e,'replyId':_0x2d5f61},_0x4c6a88=await this[_0x45ea3d(0x18f)][_0x45ea3d(0x162)](_0x45ea3d(0x149)+_0x482091+_0x45ea3d(0x14c),{'body':_0x5b5b08});return!_0x4c6a88[_0x45ea3d(0x18e)][_0x45ea3d(0x15c)]||_0x4c6a88['body'][_0x45ea3d(0x15c)][_0x45ea3d(0x184)]===0x1;}async[_0x32e807(0x17c)](_0x2f7daf){const _0x89ad27=_0x32e807,{unitId:_0x40e601}=_0x2f7daf,_0xea795b=_0x2f7daf[_0x89ad27(0x147)],_0x31ffa6={'memberId':this[_0x89ad27(0x17d)]['getCurrentUser']()[_0x89ad27(0x164)],'unitId':_0x40e601,'threadId':_0xea795b,'solved':_0x2f7daf['resolved']?I['Solved']:I[_0x89ad27(0x152)]},_0x141238=await this[_0x89ad27(0x18f)][_0x89ad27(0x162)]('/universer-api/comment/unit/'+_0x40e601+_0x89ad27(0x174),{'body':_0x31ffa6});return!_0x141238['body']['error']||_0x141238['body'][_0x89ad27(0x15c)][_0x89ad27(0x184)]===0x1;}async[_0x32e807(0x151)](_0x4bd2ae,_0x1b2fb7,_0x46c209,_0x419a4b){const _0x53c921=_0x32e807,_0x90d404={'memberId':(await this['_sessionService'][_0x53c921(0x146)](_0x4bd2ae))['getMemberID'](),'threadId':_0x46c209,'replyId':_0x419a4b,'unitId':_0x4bd2ae},_0x3b8728=await this[_0x53c921(0x18f)][_0x53c921(0x162)]('/universer-api/comment/unit/'+_0x4bd2ae+_0x53c921(0x19d),{'body':_0x90d404});return!_0x3b8728[_0x53c921(0x18e)][_0x53c921(0x15c)]||_0x3b8728[_0x53c921(0x18e)]['error'][_0x53c921(0x184)]===0x1;}async[_0x32e807(0x15e)](_0x3e1ab3,_0x548a8c,_0x125fd7){const _0x82f234=_0x32e807,_0x1bc0b3={'unitId':_0x3e1ab3,'threadId':_0x125fd7},_0x19b85d=await this['_httpService'][_0x82f234(0x162)]('/universer-api/comment/unit/'+_0x3e1ab3+'/list',{'body':_0x1bc0b3}),_0x301a64=_0x125fd7[_0x82f234(0x1a2)](_0x5e6c98=>ee(_0x19b85d[_0x82f234(0x18e)][_0x82f234(0x191)][_0x5e6c98],_0x3e1ab3,_0x548a8c))['filter'](Boolean);return Object[_0x82f234(0x15d)](_0x19b85d[_0x82f234(0x18e)][_0x82f234(0x168)])[_0x82f234(0x173)](_0xdf3a61=>{this['_userService']['addUser'](_0xdf3a61);}),_0x301a64;}[_0x32e807(0x188)](_0x4e174e){const _0x37d5ce=_0x32e807;return{'id':_0x4e174e['id'],'threadId':_0x4e174e[_0x37d5ce(0x147)],'ref':_0x4e174e['ref']};}};f=Q([_(0x0,_0x2829ff(_0x382c33)),_(0x1,_0x2829ff(_0x3a2f14)),_(0x2,_0x2829ff(_0x307a0a)),_(0x3,_0x2829ff(_0x2a4fc8))],f);var re=Object[_0x32e807(0x190)],te=(_0x27fe5e,_0x2986c1,_0x43f4e4,_0x375d69)=>{const _0x335fc1=_0x32e807;for(var _0x2a480e=_0x375d69>0x1?void 0x0:_0x375d69?re(_0x2986c1,_0x43f4e4):_0x2986c1,_0x4c574e=_0x27fe5e[_0x335fc1(0x14e)]-0x1,_0x17ac10;_0x4c574e>=0x0;_0x4c574e--)(_0x17ac10=_0x27fe5e[_0x4c574e])&&(_0x2a480e=_0x17ac10(_0x2a480e)||_0x2a480e);return _0x2a480e;},N=(_0x3dd2ac,_0x5151d6)=>(_0x4b3fe7,_0x55bc28)=>_0x5151d6(_0x4b3fe7,_0x55bc28,_0x3dd2ac);let g=class extends _0x2e1c60{constructor(_0x2a7e7e,_0x32d749){const _0x4ec5c7=_0x32e807;super(),this[_0x4ec5c7(0x16b)]=_0x2a7e7e,this['_threadCommentDataSource']=_0x32d749,this[_0x4ec5c7(0x16f)]();}[_0x32e807(0x16f)](){const _0x519bab=_0x32e807;this[_0x519bab(0x16b)][_0x519bab(0x14a)]=this[_0x519bab(0x17e)],this[_0x519bab(0x16b)][_0x519bab(0x175)]=!0x1;}};g=te([N(0x0,_0x3047aa),N(0x1,_0x2829ff(f))],g);var se=Object[_0x32e807(0x181)],oe=Object[_0x32e807(0x190)],ne=(_0x4d954b,_0x5666fe,_0x1fec59)=>_0x5666fe in _0x4d954b?se(_0x4d954b,_0x5666fe,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1fec59}):_0x4d954b[_0x5666fe]=_0x1fec59,ie=(_0x55092d,_0x4d1819,_0x595d7d,_0x432597)=>{const _0x3255a7=_0x32e807;for(var _0x2b3eef=_0x432597>0x1?void 0x0:_0x432597?oe(_0x4d1819,_0x595d7d):_0x4d1819,_0x538402=_0x55092d[_0x3255a7(0x14e)]-0x1,_0x48f900;_0x538402>=0x0;_0x538402--)(_0x48f900=_0x55092d[_0x538402])&&(_0x2b3eef=_0x48f900(_0x2b3eef)||_0x2b3eef);return _0x2b3eef;},w=(_0x53b011,_0x2ecc64)=>(_0x5e7c5d,_0x2ee9b0)=>_0x2ecc64(_0x5e7c5d,_0x2ee9b0,_0x53b011),$=(_0x3411e5,_0x5b2c1f,_0x50df34)=>ne(_0x3411e5,typeof _0x5b2c1f!=_0x32e807(0x18d)?_0x5b2c1f+'':_0x5b2c1f,_0x50df34);let b=class extends _0x5d5f99{constructor(_0x5336b5=M,_0x136ddf,_0x57007d){const _0xb2cbb2=_0x32e807;super(),this['_config']=_0x5336b5,this[_0xb2cbb2(0x145)]=_0x136ddf,this['_configService']=_0x57007d;const {..._0x15e441}=_0x1eb38a({},M,this[_0xb2cbb2(0x17b)]);this['_configService'][_0xb2cbb2(0x16c)](z,_0x15e441);}[_0x32e807(0x161)](){const _0x59456f=_0x32e807;[[f],[g],[S]][_0x59456f(0x173)](_0x4667ce=>{const _0x5688b0=_0x59456f;this[_0x5688b0(0x145)][_0x5688b0(0x172)](_0x4667ce);});}[_0x32e807(0x199)](){const _0x59d14f=_0x32e807;this['_injector'][_0x59d14f(0x176)](g),this[_0x59d14f(0x145)][_0x59d14f(0x176)](S);}};$(b,_0x32e807(0x157),W),$(b,_0x32e807(0x166),_0xd4c5e1[_0x32e807(0x180)]),b=ie([_0xe03605(_0x2bfb63,_0x40e60c,_0xcfd646),w(0x1,_0x2829ff(_0x2a4fc8)),w(0x2,_0x5c82ef)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x4164(_0x2d82ec,_0x4c07b6){const _0x1fe063=_0x1fe0();return _0x4164=function(_0x416457,_0x405841){_0x416457=_0x416457-0x65;let _0x10e41c=_0x1fe063[_0x416457];return _0x10e41c;},_0x4164(_0x2d82ec,_0x4c07b6);}(function(_0x4b2b50,_0x151460){const _0x533c98=_0x4164,_0x40f6fa=_0x4b2b50();while(!![]){try{const _0x349ba4=-parseInt(_0x533c98(0xe6))/0x1*(parseInt(_0x533c98(0xd3))/0x2)+-parseInt(_0x533c98(0xbc))/0x3*(parseInt(_0x533c98(0x98))/0x4)+parseInt(_0x533c98(0x9e))/0x5*(-parseInt(_0x533c98(0xd6))/0x6)+parseInt(_0x533c98(0x68))/0x7+-parseInt(_0x533c98(0xbe))/0x8*(-parseInt(_0x533c98(0xb8))/0x9)+parseInt(_0x533c98(0xc5))/0xa+parseInt(_0x533c98(0x9c))/0xb;if(_0x349ba4===_0x151460)break;else _0x40f6fa['push'](_0x40f6fa['shift']());}catch(_0x36014b){_0x40f6fa['push'](_0x40f6fa['shift']());}}}(_0x1fe0,0x8116f),function(_0x1eed9d,_0x2880dd){const _0x2de457=_0x4164;typeof exports==_0x2de457(0xc8)&&typeof module<'u'?_0x2880dd(exports,require(_0x2de457(0xa0)),require(_0x2de457(0x69)),require(_0x2de457(0x92)),require(_0x2de457(0x6c)),require('@univerjs/thread-comment'),require(_0x2de457(0xf0)),require(_0x2de457(0x83))):typeof define==_0x2de457(0xad)&&define[_0x2de457(0x84)]?define([_0x2de457(0x9d),_0x2de457(0xa0),'@univerjs-pro/license','@univerjs/core',_0x2de457(0x6c),_0x2de457(0x90),'rxjs',_0x2de457(0x83)],_0x2880dd):(_0x1eed9d=typeof globalThis<'u'?globalThis:_0x1eed9d||self,_0x2880dd(_0x1eed9d[_0x2de457(0xcb)]={},_0x1eed9d[_0x2de457(0x9f)],_0x1eed9d[_0x2de457(0xd5)],_0x1eed9d['UniverCore'],_0x1eed9d[_0x2de457(0xa3)],_0x1eed9d[_0x2de457(0xef)],_0x1eed9d['rxjs'],_0x1eed9d[_0x2de457(0x67)]));}(this,function(_0x323bde,_0x4d3d6b,_0x543dec,_0x394557,_0x30fdc7,_0x4ed6f0,_0x3ff968,_0x1d250c){'use strict';const _0x205072=_0x4164;const _0x989351=_0x205072(0x77);var _0x13a704=(_0x4a6617=>(_0x4a6617[_0x4a6617['OpenOrReOpen']=0x0]=_0x205072(0xcd),_0x4a6617[_0x4a6617[_0x205072(0xaa)]=0x1]=_0x205072(0xaa),_0x4a6617[_0x4a6617[_0x205072(0x91)]=-0x1]=_0x205072(0x91),_0x4a6617))(_0x13a704||{}),_0x19e2d3=(_0x5154ea=>(_0x5154ea[_0x5154ea['Unknown']=0x0]=_0x205072(0xcf),_0x5154ea[_0x5154ea['Add']=0x1]=_0x205072(0x73),_0x5154ea[_0x5154ea[_0x205072(0x9b)]=0x2]=_0x205072(0x9b),_0x5154ea[_0x5154ea[_0x205072(0xb5)]=0x3]=_0x205072(0xb5),_0x5154ea[_0x5154ea[_0x205072(0xe8)]=0x4]=_0x205072(0xe8),_0x5154ea[_0x5154ea[_0x205072(0x89)]=0x5]=_0x205072(0x89),_0x5154ea[_0x5154ea[_0x205072(0x91)]=-0x1]=_0x205072(0x91),_0x5154ea))(_0x19e2d3||{});const _0x2cdef5=_0x5be655=>_0x394557[_0x205072(0x6f)](new Date(+_0x5be655))[_0x205072(0xe1)](_0x205072(0xe0)),_0x3f1a1f=async(_0x5683f2,_0x1b533b)=>{const _0x438ed8=_0x205072,_0x32d074=_0x5683f2['get'](_0x394557[_0x438ed8(0xc7)]),_0x386814=_0x5683f2[_0x438ed8(0xcc)](_0x1d250c[_0x438ed8(0x8b)]);_0x1b533b[_0x438ed8(0xdd)](_0x5ee1c6=>{const _0x34827d=_0x438ed8;_0x32d074[_0x34827d(0x7d)](_0x5ee1c6)&&_0x1b533b[_0x34827d(0x74)](_0x5ee1c6);}),_0x1b533b['size']&&(await _0x386814[_0x438ed8(0xcc)](_0x438ed8(0xa9),{'params':{'userIDs':[..._0x1b533b]}}))[_0x438ed8(0x7b)][_0x438ed8(0x94)]['forEach'](_0x183e07=>{const _0x3fed56=_0x438ed8;_0x183e07&&_0x32d074[_0x3fed56(0x97)](_0x183e07);});};var _0x48767a=Object[_0x205072(0x78)],_0x304182=(_0x3b1a36,_0x572933,_0xff954d,_0x3d3939)=>{const _0x2435d5=_0x205072;for(var _0x4f7ae7=_0x3d3939>0x1?void 0x0:_0x3d3939?_0x48767a(_0x572933,_0xff954d):_0x572933,_0x115f83=_0x3b1a36[_0x2435d5(0xa4)]-0x1,_0x358789;_0x115f83>=0x0;_0x115f83--)(_0x358789=_0x3b1a36[_0x115f83])&&(_0x4f7ae7=_0x358789(_0x4f7ae7)||_0x4f7ae7);return _0x4f7ae7;},_0x2b76a3=(_0x4be5db,_0x38b2e1)=>(_0x5b6c7d,_0x363380)=>_0x38b2e1(_0x5b6c7d,_0x363380,_0x4be5db);let _0x11293b=class extends _0x394557['Disposable']{constructor(_0x30794,_0x421884,_0x32ee9b,_0x1b0ebc){const _0x18b0ce=_0x205072;super(),this['_commentService']=_0x30794,this[_0x18b0ce(0xba)]=_0x421884,this[_0x18b0ce(0xa8)]=_0x32ee9b,this['_injector']=_0x1b0ebc,this[_0x18b0ce(0xc6)](),this[_0x18b0ce(0x87)]();}[_0x205072(0x87)](){const _0x3bbf19=_0x205072;this[_0x3bbf19(0xc3)](this[_0x3bbf19(0xba)][_0x3bbf19(0xbb)][_0x3bbf19(0xd2)](_0x3ff968['bufferTime'](0x10))[_0x3bbf19(0x7f)](_0x19d627=>{const _0x1726f5=_0x3bbf19,_0x7e0db0=new Set();_0x19d627[_0x1726f5(0xdd)](_0xf289cc=>{const _0x4b189f=_0x1726f5;switch(_0xf289cc[_0x4b189f(0xd0)]){case'add':{const _0x577978=_0xf289cc[_0x4b189f(0xd7)]['personId'];_0x7e0db0['add'](_0x577978);break;}}}),_0x3f1a1f(this[_0x1726f5(0xeb)],_0x7e0db0);}));}['_init'](){const _0x115a66=_0x205072;this[_0x115a66(0xc3)](this[_0x115a66(0xc4)][_0x115a66(0xbb)]['subscribe'](async _0x561762=>{const _0x50a1d1=_0x115a66;var _0x310d5e,_0x4fd85,_0x4ea511,_0x5ef2d6;const _0x3a7fe2=(_0x310d5e=this[_0x50a1d1(0xba)]['getUnit'](_0x561762[_0x50a1d1(0xbd)])[_0x50a1d1(0x88)](_0x5828b8=>_0x5828b8[_0x50a1d1(0xa1)]===_0x561762[_0x50a1d1(0xa1)]))==null?void 0x0:_0x310d5e[_0x50a1d1(0x8e)];if(!_0x3a7fe2)return;const {unitId:_0x20fa8c,subUnitId:_0x3f12e9}=_0x3a7fe2;switch(_0x561762[_0x50a1d1(0xb2)]&&this[_0x50a1d1(0xa8)][_0x50a1d1(0x97)](_0x561762[_0x50a1d1(0xb2)]),_0x561762[_0x50a1d1(0xd0)]){case _0x19e2d3['Add']:break;case _0x19e2d3['Reply']:{this['_threadCommentModel'][_0x50a1d1(0x85)](_0x20fa8c,_0x3f12e9,{'unitId':_0x20fa8c,'subUnitId':_0x3f12e9,'ref':'','id':_0x561762[_0x50a1d1(0xe3)],'dT':_0x2cdef5(+_0x561762[_0x50a1d1(0x9a)]),'threadId':_0x561762[_0x50a1d1(0xa1)],'personId':(_0x4ea511=(_0x4fd85=_0x561762[_0x50a1d1(0xb2)])==null?void 0x0:_0x4fd85[_0x50a1d1(0xec)])!=null?_0x4ea511:_0x561762[_0x50a1d1(0x72)],'text':JSON[_0x50a1d1(0xb3)](_0x561762[_0x50a1d1(0x6e)]),'parentId':_0x3a7fe2['id']});break;}case _0x19e2d3[_0x50a1d1(0xe8)]:{const _0x148dc3=this[_0x50a1d1(0xba)][_0x50a1d1(0xaf)](_0x20fa8c,_0x3f12e9,_0x561762['replyId']);_0x148dc3&&_0x148dc3[_0x50a1d1(0xee)]&&this['_threadCommentModel'][_0x50a1d1(0x86)](_0x20fa8c,_0x3f12e9,_0x561762[_0x50a1d1(0xe3)]);break;}case _0x19e2d3['Edit']:{this[_0x50a1d1(0xba)][_0x50a1d1(0xc0)](_0x20fa8c,_0x3f12e9,{'commentId':_0x561762[_0x50a1d1(0xe3)],'text':JSON['parse'](_0x561762['content'])});break;}case _0x19e2d3['Solve']:{const _0x28c3e4=(_0x5ef2d6=this['_threadCommentModel'][_0x50a1d1(0xe7)](_0x561762[_0x50a1d1(0xbd)])['find'](_0x249fad=>_0x249fad[_0x50a1d1(0xa1)]===_0x561762[_0x50a1d1(0xa1)]))==null?void 0x0:_0x5ef2d6['root'];_0x28c3e4&&this['_threadCommentModel'][_0x50a1d1(0xb0)](_0x20fa8c,_0x3f12e9,_0x28c3e4['id'],_0x561762[_0x50a1d1(0x65)]===_0x13a704['Solved']);break;}}}));}};_0x11293b=_0x304182([_0x2b76a3(0x0,_0x394557[_0x205072(0xb9)](_0x4d3d6b[_0x205072(0x99)])),_0x2b76a3(0x1,_0x394557[_0x205072(0xb9)](_0x4ed6f0[_0x205072(0x70)])),_0x2b76a3(0x2,_0x394557[_0x205072(0xb9)](_0x394557[_0x205072(0xc7)])),_0x2b76a3(0x3,_0x394557['Inject'](_0x394557[_0x205072(0x7e)]))],_0x11293b);const _0x154246=_0x205072(0x82),_0x312504={};var _0x495b20=Object[_0x205072(0x78)],_0xf59fd7=(_0x51eedf,_0x35bd64,_0x44c174,_0xc14794)=>{const _0x423b82=_0x205072;for(var _0x5a4b6a=_0xc14794>0x1?void 0x0:_0xc14794?_0x495b20(_0x35bd64,_0x44c174):_0x35bd64,_0x1b94b3=_0x51eedf[_0x423b82(0xa4)]-0x1,_0x396d41;_0x1b94b3>=0x0;_0x1b94b3--)(_0x396d41=_0x51eedf[_0x1b94b3])&&(_0x5a4b6a=_0x396d41(_0x5a4b6a)||_0x5a4b6a);return _0x5a4b6a;},_0x556675=(_0x1aad2e,_0x4ec42e)=>(_0x328f84,_0x211531)=>_0x4ec42e(_0x328f84,_0x211531,_0x1aad2e);function _0x4e00d0(_0x18041c,_0x4586ff){const _0x39bc79=_0x205072,_0x3bd5cd=_0x18041c[_0x39bc79(0x8d)][0x0];return{..._0x4586ff,'id':_0x3bd5cd['replyId'],'resolved':_0x18041c[_0x39bc79(0x65)]===0x1,'dT':_0x2cdef5(_0x3bd5cd[_0x39bc79(0x9a)]),'personId':_0x3bd5cd[_0x39bc79(0x72)],'threadId':_0x3bd5cd[_0x39bc79(0xa1)]};}function _0x2c7e5a(_0xff57d6,_0x2a989f,_0x5f3601){const _0x113993=_0x205072;var _0x99938a,_0x31ce4f;if(((_0x31ce4f=(_0x99938a=_0xff57d6==null?void 0x0:_0xff57d6['replies'])==null?void 0x0:_0x99938a[_0x113993(0xa4)])!=null?_0x31ce4f:0x0)>0x0){const _0x197652=(_0x1d017a,_0x19390d)=>({'id':_0x1d017a[_0x113993(0xe3)],'threadId':_0x1d017a[_0x113993(0xa1)],'dT':_0x2cdef5(_0x1d017a['createTimestamp']),'personId':_0x1d017a[_0x113993(0x72)],'resolved':_0xff57d6[_0x113993(0x65)]===_0x13a704[_0x113993(0xaa)],'unitId':_0x2a989f,'subUnitId':_0x5f3601,'text':JSON[_0x113993(0xb3)](_0x1d017a[_0x113993(0x6e)]),'parentId':_0x19390d}),_0x28aecc=_0x197652(_0xff57d6[_0x113993(0x8d)][0x0]);return{..._0x28aecc,'children':_0xff57d6[_0x113993(0x8d)]['slice'](0x1)[_0x113993(0xca)](_0xa2e3ff=>_0x197652(_0xa2e3ff,_0x28aecc['id']))};}return null;}let _0x4a6c43=class{constructor(_0x4b926b,_0x304e37,_0x3adfb8,_0x45255c){const _0x132464=_0x205072;this[_0x132464(0x7c)]=_0x4b926b,this[_0x132464(0xa8)]=_0x304e37,this[_0x132464(0x96)]=_0x3adfb8,this['_injector']=_0x45255c;}async[_0x205072(0x85)](_0x9e62ba){const _0x23f7c5=_0x205072;var _0x296ef8,_0x1e871e;const {parentId:_0x37d09d,unitId:_0x459ab3,text:_0x4674f7,threadId:_0x37bab9}=_0x9e62ba,_0x2ae0ba=(_0x1e871e=(_0x296ef8=_0x4674f7['customRanges'])==null?void 0x0:_0x296ef8[_0x23f7c5(0x6b)](_0x35281d=>_0x35281d['rangeType']===_0x394557['CustomRangeType'][_0x23f7c5(0xe9)])[_0x23f7c5(0xca)](_0xdf2e5d=>_0xdf2e5d[_0x23f7c5(0x7a)]))!=null?_0x1e871e:[],_0x408576=JSON[_0x23f7c5(0xb4)](_0x4674f7),_0x28147e=(await this[_0x23f7c5(0x96)][_0x23f7c5(0xa5)](_0x459ab3))[_0x23f7c5(0xab)]();if(_0x37d09d){const _0x173391={'memberId':_0x28147e,'unitId':_0x459ab3,'content':_0x408576,'mention':_0x2ae0ba,'threadId':_0x37bab9},_0x542194=(await this[_0x23f7c5(0x7c)][_0x23f7c5(0xc2)]('/universer-api/comment/unit/'+_0x459ab3+'/reply',{'body':_0x173391}))[_0x23f7c5(0x7b)][_0x23f7c5(0x79)];return{..._0x9e62ba,'id':_0x542194['replyId'],'dT':_0x394557[_0x23f7c5(0x6f)](+_0x542194['createTimestamp'])['format'](_0x23f7c5(0xe0)),'personId':_0x542194[_0x23f7c5(0x72)]};}else{const _0x3d11b1={'memberId':_0x28147e,'unitId':_0x459ab3,'content':_0x408576,'mention':_0x2ae0ba},_0x36fb2a=await this[_0x23f7c5(0x7c)][_0x23f7c5(0xc2)](_0x23f7c5(0x8c)+_0x459ab3+_0x23f7c5(0xc9),{'body':_0x3d11b1});return _0x4e00d0(_0x36fb2a[_0x23f7c5(0x7b)][_0x23f7c5(0x6d)],_0x9e62ba);}}async[_0x205072(0xc0)](_0x59de14){const _0x43ca18=_0x205072;var _0x3ee104,_0x2e7d3e;const {text:_0x2bcb53,unitId:_0x144924}=_0x59de14,_0x45be27=(_0x2e7d3e=(_0x3ee104=_0x2bcb53[_0x43ca18(0x71)])==null?void 0x0:_0x3ee104[_0x43ca18(0x6b)](_0xbb45ae=>_0xbb45ae[_0x43ca18(0xa2)]===_0x394557[_0x43ca18(0xb6)][_0x43ca18(0xe9)])[_0x43ca18(0xca)](_0x235556=>_0x235556['rangeId']))!=null?_0x2e7d3e:[],_0x3546ce=JSON['stringify'](_0x2bcb53),_0x20acca=_0x59de14[_0x43ca18(0xa1)],_0xaea9d7=_0x59de14['id'],_0x13797a={'memberId':(await this[_0x43ca18(0x96)][_0x43ca18(0xa5)](_0x144924))[_0x43ca18(0xab)](),'unitId':_0x144924,'threadId':_0x20acca,'mention':_0x45be27,'content':_0x3546ce,'replyId':_0xaea9d7},_0x2d9906=await this[_0x43ca18(0x7c)][_0x43ca18(0xc2)](_0x43ca18(0x8c)+_0x144924+_0x43ca18(0xae),{'body':_0x13797a});return!_0x2d9906[_0x43ca18(0x7b)][_0x43ca18(0xd9)]||_0x2d9906[_0x43ca18(0x7b)][_0x43ca18(0xd9)][_0x43ca18(0xb1)]===0x1;}async['resolveComment'](_0xae4502){const _0x6f07e7=_0x205072,{unitId:_0x422860}=_0xae4502,_0x59e02a=_0xae4502[_0x6f07e7(0xa1)],_0x16f72a={'memberId':this[_0x6f07e7(0xa8)][_0x6f07e7(0xdf)]()['userID'],'unitId':_0x422860,'threadId':_0x59e02a,'solved':_0xae4502[_0x6f07e7(0xac)]?_0x13a704[_0x6f07e7(0xaa)]:_0x13a704[_0x6f07e7(0xcd)]},_0x132bb2=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x422860+_0x6f07e7(0xb7),{'body':_0x16f72a});return!_0x132bb2[_0x6f07e7(0x7b)]['error']||_0x132bb2[_0x6f07e7(0x7b)]['error']['code']===0x1;}async['deleteComment'](_0x15b2e0,_0x5d1ec8,_0x23d1da,_0x624d6e){const _0x5d2b74=_0x205072,_0x50dfbf={'memberId':(await this['_sessionService'][_0x5d2b74(0xa5)](_0x15b2e0))[_0x5d2b74(0xab)](),'threadId':_0x23d1da,'replyId':_0x624d6e,'unitId':_0x15b2e0},_0x5418d8=await this[_0x5d2b74(0x7c)][_0x5d2b74(0xc2)](_0x5d2b74(0x8c)+_0x15b2e0+_0x5d2b74(0xc1),{'body':_0x50dfbf});return!_0x5418d8[_0x5d2b74(0x7b)][_0x5d2b74(0xd9)]||_0x5418d8['body'][_0x5d2b74(0xd9)]['code']===0x1;}async['listComments'](_0x28c0fa,_0x4b1cd3,_0x2e8c14){const _0xe5ea49=_0x205072,_0x5331fd={'unitId':_0x28c0fa,'threadId':_0x2e8c14},_0x5be7a3=await this['_httpService']['post'](_0xe5ea49(0x8c)+_0x28c0fa+_0xe5ea49(0xd1),{'body':_0x5331fd}),_0x40a748=_0x2e8c14[_0xe5ea49(0xca)](_0x1388f7=>_0x2c7e5a(_0x5be7a3[_0xe5ea49(0x7b)]['comments'][_0x1388f7],_0x28c0fa,_0x4b1cd3))[_0xe5ea49(0x6b)](Boolean);return Object[_0xe5ea49(0xde)](_0x5be7a3['body'][_0xe5ea49(0x94)])[_0xe5ea49(0xdd)](_0x594bee=>{const _0x17c9be=_0xe5ea49;this[_0x17c9be(0xa8)]['addUser'](_0x594bee);}),_0x40a748;}[_0x205072(0xa6)](_0x59068d){const _0x91502f=_0x205072;return{'id':_0x59068d['id'],'threadId':_0x59068d[_0x91502f(0xa1)],'ref':_0x59068d[_0x91502f(0xea)]};}};_0x4a6c43=_0xf59fd7([_0x556675(0x0,_0x394557[_0x205072(0xb9)](_0x1d250c['HTTPService'])),_0x556675(0x1,_0x394557[_0x205072(0xb9)](_0x394557[_0x205072(0xc7)])),_0x556675(0x2,_0x394557[_0x205072(0xb9)](_0x4d3d6b[_0x205072(0xd8)])),_0x556675(0x3,_0x394557[_0x205072(0xb9)](_0x394557[_0x205072(0x7e)]))],_0x4a6c43);var _0x5c2b3a=Object[_0x205072(0x78)],_0x5ec2b4=(_0x294f73,_0x13c760,_0x549286,_0x5b2b83)=>{const _0x4b5567=_0x205072;for(var _0x141805=_0x5b2b83>0x1?void 0x0:_0x5b2b83?_0x5c2b3a(_0x13c760,_0x549286):_0x13c760,_0x5722d6=_0x294f73[_0x4b5567(0xa4)]-0x1,_0x599558;_0x5722d6>=0x0;_0x5722d6--)(_0x599558=_0x294f73[_0x5722d6])&&(_0x141805=_0x599558(_0x141805)||_0x141805);return _0x141805;},_0x23f8e6=(_0x405ee7,_0x4c535c)=>(_0x104b6e,_0x1a8665)=>_0x4c535c(_0x104b6e,_0x1a8665,_0x405ee7);let _0x325eaa=class extends _0x394557['Disposable']{constructor(_0x5f417e,_0x4ebb90){const _0x198d09=_0x205072;super(),this['_threadCommentDataSourceService']=_0x5f417e,this[_0x198d09(0x80)]=_0x4ebb90,this[_0x198d09(0xdc)]();}['_initDataSource'](){const _0x472cb2=_0x205072;this[_0x472cb2(0x8f)][_0x472cb2(0xe5)]=this[_0x472cb2(0x80)],this['_threadCommentDataSourceService'][_0x472cb2(0x8a)]=!0x1;}};_0x325eaa=_0x5ec2b4([_0x23f8e6(0x0,_0x4ed6f0[_0x205072(0xa7)]),_0x23f8e6(0x1,_0x394557['Inject'](_0x4a6c43))],_0x325eaa);var _0x27c8e8=Object[_0x205072(0xd4)],_0x379c17=Object[_0x205072(0x78)],_0x24a62e=(_0x475855,_0x43ff36,_0x528c19)=>_0x43ff36 in _0x475855?_0x27c8e8(_0x475855,_0x43ff36,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x528c19}):_0x475855[_0x43ff36]=_0x528c19,_0x3b5900=(_0x1f36c8,_0x389a89,_0x53e238,_0xa10a3b)=>{const _0x1c7f12=_0x205072;for(var _0x3f4fe0=_0xa10a3b>0x1?void 0x0:_0xa10a3b?_0x379c17(_0x389a89,_0x53e238):_0x389a89,_0x595980=_0x1f36c8[_0x1c7f12(0xa4)]-0x1,_0x5c881c;_0x595980>=0x0;_0x595980--)(_0x5c881c=_0x1f36c8[_0x595980])&&(_0x3f4fe0=_0x5c881c(_0x3f4fe0)||_0x3f4fe0);return _0x3f4fe0;},_0x2b273f=(_0x3ed987,_0x11afda)=>(_0x56d209,_0x531e4b)=>_0x11afda(_0x56d209,_0x531e4b,_0x3ed987),_0x2ad8d4=(_0x323d42,_0x39244b,_0x5b6de0)=>_0x24a62e(_0x323d42,typeof _0x39244b!=_0x205072(0xda)?_0x39244b+'':_0x39244b,_0x5b6de0);_0x323bde[_0x205072(0x76)]=class extends _0x394557['Plugin']{constructor(_0x589f4d=_0x312504,_0x28b0df,_0x41792b){const _0xace6c4=_0x205072;super(),this[_0xace6c4(0xe2)]=_0x589f4d,this[_0xace6c4(0xeb)]=_0x28b0df,this[_0xace6c4(0x66)]=_0x41792b;const {..._0x1f9416}=_0x394557[_0xace6c4(0x93)]({},_0x312504,this['_config']);this[_0xace6c4(0x66)][_0xace6c4(0xbf)](_0x154246,_0x1f9416);}['onStarting'](){const _0xcb9256=_0x205072;[[_0x4a6c43],[_0x325eaa],[_0x11293b]][_0xcb9256(0xdd)](_0x3adde9=>{const _0x41bb4e=_0xcb9256;this[_0x41bb4e(0xeb)][_0x41bb4e(0xed)](_0x3adde9);});}[_0x205072(0xe4)](){const _0x13855d=_0x205072;this[_0x13855d(0xeb)][_0x13855d(0xcc)](_0x325eaa),this[_0x13855d(0xeb)][_0x13855d(0xcc)](_0x11293b);}},_0x2ad8d4(_0x323bde['UniverThreadCommentDataSourcePlugin'],_0x205072(0x95),_0x989351),_0x2ad8d4(_0x323bde[_0x205072(0x76)],'type',_0x394557['UniverInstanceType'][_0x205072(0xf1)]),_0x323bde[_0x205072(0x76)]=_0x3b5900([_0x394557['DependentOn'](_0x30fdc7[_0x205072(0x81)],_0x4d3d6b[_0x205072(0xce)],_0x543dec['UniverLicensePlugin']),_0x2b273f(0x1,_0x394557['Inject'](_0x394557[_0x205072(0x7e)])),_0x2b273f(0x2,_0x394557[_0x205072(0x6a)])],_0x323bde[_0x205072(0x76)]),Object['defineProperty'](_0x323bde,Symbol[_0x205072(0xdb)],{'value':_0x205072(0x75)});}));function _0x1fe0(){const _0x1960c5=['_threadCommentDataSourceService','@univerjs/thread-comment','UNRECOGNIZED','@univerjs/core','merge','users','pluginName','_sessionService','addUser','437956WAvWGM','CommentService','createTimestamp','Reply','4198568odCJcr','exports','804875IqmrgL','UniverProCollaborationClient','@univerjs-pro/collaboration-client','threadId','rangeType','UniverThreadCommentUi','length','requireSession','saveCommentToSnapshot','IThreadCommentDataSourceService','_userService','/universer-api/user/list','Solved','getMemberID','resolved','function','/edit','getComment','resolveComment','code','user','parse','stringify','Edit','CustomRangeType','/solved','2799SRhfsx','Inject','_threadCommentModel','commentUpdate$','21ooaAnV','unitId','13152IObsiE','setConfig','updateComment','/delete','post','disposeWithMe','_commentService','1547860eTAxzn','_init','UserManagerService','object','/add','map','UniverProThreadCommentDatasource','get','OpenOrReOpen','UniverCollaborationClientPlugin','Unknown','type','/list','pipe','4ZYOYWv','defineProperty','UniverProLicense','24WwefMD','payload','CollaborationSessionService','error','symbol','toStringTag','_initDataSource','forEach','values','getCurrentUser','YYYY/MM/DD\x20HH:mm','format','_config','replyId','onReady','dataSource','39864nBnPoy','getUnit','Delete','COMMENT','ref','_injector','userID','add','parentId','UniverThreadComment','rxjs','UNIVER_UNKNOWN','solved','_configService','UniverNetwork','6797308Raabyi','@univerjs-pro/license','IConfigService','filter','@univerjs/thread-comment-ui','comment','content','dayjs','ThreadCommentModel','customRanges','userId','Add','delete','Module','UniverThreadCommentDataSourcePlugin','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getOwnPropertyDescriptor','reply','rangeId','body','_httpService','getUser','Injector','subscribe','_threadCommentDataSource','UniverThreadCommentUIPlugin','thread-comment-data-source.config','@univerjs/network','amd','addComment','deleteComment','_initUserSync','find','Solve','syncUpdateMutationToColla','HTTPService','/universer-api/comment/unit/','replies','root'];_0x1fe0=function(){return _0x1960c5;};return _0x1fe0();}
1
+ function _0x23c6(){const _0xc1d6b9=['type','UniverProCollaborationClient','resolveComment','length','subscribe','Unknown','UniverProThreadCommentDatasource','IThreadCommentDataSourceService','forEach','rxjs','2518824CeNMHV','user','parentId','get','personId','ThreadCommentModel','UniverCollaborationClientPlugin','2185794uiHNpa','Disposable','_configService','Solve','UniverLicensePlugin','UniverInstanceType','delete','resolved','Edit','_httpService','UniverProLicense','requireSession','listComments','users','symbol','getComment','IConfigService','979PxONii','/universer-api/comment/unit/','CommentService','UniverThreadCommentDataSourcePlugin','threadId','format','size','getUser','body','add','/add','/list','comment','_config','syncUpdateMutationToColla','Add','pipe','commentUpdate$','merge','slice','updateComment','875244CMptyc','_threadCommentModel','4hnMbNM','127930YZJzOK','payload','814zUnoqe','setConfig','replies','amd','Reply','25063116sGGKKt','@univerjs-pro/license','getMemberID','_threadCommentDataSourceService','/solved','values','UniverNetwork','parse','@univerjs/core','deleteComment','/universer-api/user/list','_initDataSource','CollaborationSessionService','unitId','_threadCommentDataSource','reply','rangeType','7JhvkaE','@univerjs-pro/collaboration-client','getOwnPropertyDescriptor','replyId','post','_initUserSync','userId','@univerjs/thread-comment-ui','UNRECOGNIZED','find','addComment','_init','defineProperty','rangeId','/delete','getCurrentUser','createTimestamp','Module','disposeWithMe','Delete','684YLorFO','content','stringify','UniverCore','/reply','addUser','_commentService','getUnit','@univerjs/network','Inject','solved','code','Injector','toStringTag','onReady','Plugin','HTTPService','function','map','OpenOrReOpen','_userService','/edit','@univerjs/thread-comment','comments','object','customRanges','CustomRangeType','11AvXBTb','COMMENT','error','_sessionService','saveCommentToSnapshot','Solved','filter','dayjs','DependentOn','_injector','pluginName','thread-comment-data-source.config','UserManagerService','2697310ZoLcvA'];_0x23c6=function(){return _0xc1d6b9;};return _0x23c6();}function _0xcabc(_0x268a6d,_0x29f57f){const _0x23c6eb=_0x23c6();return _0xcabc=function(_0xcabce5,_0x2a9ea4){_0xcabce5=_0xcabce5-0xa9;let _0x318bb9=_0x23c6eb[_0xcabce5];return _0x318bb9;},_0xcabc(_0x268a6d,_0x29f57f);}(function(_0x3ca7fd,_0x1c5ec8){const _0x5e7c48=_0xcabc,_0x126a44=_0x3ca7fd();while(!![]){try{const _0x43eefa=-parseInt(_0x5e7c48(0x135))/0x1*(parseInt(_0x5e7c48(0xc0))/0x2)+parseInt(_0x5e7c48(0xbb))/0x3*(parseInt(_0x5e7c48(0xbd))/0x4)+-parseInt(_0x5e7c48(0x112))/0x5+parseInt(_0x5e7c48(0x124))/0x6+parseInt(_0x5e7c48(0xd6))/0x7*(-parseInt(_0x5e7c48(0x11d))/0x8)+parseInt(_0x5e7c48(0xea))/0x9*(-parseInt(_0x5e7c48(0xbe))/0xa)+parseInt(_0x5e7c48(0x105))/0xb*(parseInt(_0x5e7c48(0xc5))/0xc);if(_0x43eefa===_0x1c5ec8)break;else _0x126a44['push'](_0x126a44['shift']());}catch(_0x36c7b1){_0x126a44['push'](_0x126a44['shift']());}}}(_0x23c6,0x7edb4),function(_0x37ec81,_0x5d062c){const _0x5cf8a1=_0xcabc;typeof exports==_0x5cf8a1(0x102)&&typeof module<'u'?_0x5d062c(exports,require(_0x5cf8a1(0xd7)),require(_0x5cf8a1(0xc6)),require(_0x5cf8a1(0xcd)),require('@univerjs/thread-comment-ui'),require(_0x5cf8a1(0x100)),require(_0x5cf8a1(0x11c)),require(_0x5cf8a1(0xf2))):typeof define==_0x5cf8a1(0xfb)&&define[_0x5cf8a1(0xc3)]?define(['exports',_0x5cf8a1(0xd7),_0x5cf8a1(0xc6),_0x5cf8a1(0xcd),_0x5cf8a1(0xdd),_0x5cf8a1(0x100),'rxjs',_0x5cf8a1(0xf2)],_0x5d062c):(_0x37ec81=typeof globalThis<'u'?globalThis:_0x37ec81||self,_0x5d062c(_0x37ec81[_0x5cf8a1(0x119)]={},_0x37ec81[_0x5cf8a1(0x114)],_0x37ec81[_0x5cf8a1(0x12e)],_0x37ec81[_0x5cf8a1(0xed)],_0x37ec81['UniverThreadCommentUi'],_0x37ec81['UniverThreadComment'],_0x37ec81[_0x5cf8a1(0x11c)],_0x37ec81[_0x5cf8a1(0xcb)]));}(this,function(_0x436e08,_0x9d204b,_0x39e458,_0x3777e4,_0x24e3d7,_0xabdbc4,_0x3069ce,_0x47855e){'use strict';const _0x5dba39=_0xcabc;const _0x48cf41='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x583558=(_0x5c76b6=>(_0x5c76b6[_0x5c76b6[_0x5dba39(0xfd)]=0x0]=_0x5dba39(0xfd),_0x5c76b6[_0x5c76b6[_0x5dba39(0x10a)]=0x1]=_0x5dba39(0x10a),_0x5c76b6[_0x5c76b6[_0x5dba39(0xde)]=-0x1]='UNRECOGNIZED',_0x5c76b6))(_0x583558||{}),_0x329f22=(_0x4dd219=>(_0x4dd219[_0x4dd219[_0x5dba39(0x118)]=0x0]=_0x5dba39(0x118),_0x4dd219[_0x4dd219['Add']=0x1]=_0x5dba39(0xb5),_0x4dd219[_0x4dd219[_0x5dba39(0xc4)]=0x2]='Reply',_0x4dd219[_0x4dd219[_0x5dba39(0x12c)]=0x3]=_0x5dba39(0x12c),_0x4dd219[_0x4dd219[_0x5dba39(0xe9)]=0x4]=_0x5dba39(0xe9),_0x4dd219[_0x4dd219[_0x5dba39(0x127)]=0x5]=_0x5dba39(0x127),_0x4dd219[_0x4dd219[_0x5dba39(0xde)]=-0x1]=_0x5dba39(0xde),_0x4dd219))(_0x329f22||{});const _0x37df52=_0x1ccfd4=>_0x3777e4['dayjs'](new Date(+_0x1ccfd4))[_0x5dba39(0xab)]('YYYY/MM/DD\x20HH:mm'),_0xd96371=async(_0x1c3ac5,_0x36e96c)=>{const _0x2913d3=_0x5dba39,_0x29f621=_0x1c3ac5[_0x2913d3(0x120)](_0x3777e4[_0x2913d3(0x111)]),_0x49a08f=_0x1c3ac5[_0x2913d3(0x120)](_0x47855e['HTTPService']);_0x36e96c[_0x2913d3(0x11b)](_0x136568=>{const _0x4511d2=_0x2913d3;_0x29f621[_0x4511d2(0xad)](_0x136568)&&_0x36e96c[_0x4511d2(0x12a)](_0x136568);}),_0x36e96c[_0x2913d3(0xac)]&&(await _0x49a08f[_0x2913d3(0x120)](_0x2913d3(0xcf),{'params':{'userIDs':[..._0x36e96c]}}))[_0x2913d3(0xae)]['users'][_0x2913d3(0x11b)](_0x2f596e=>{const _0x3ae5a0=_0x2913d3;_0x2f596e&&_0x29f621[_0x3ae5a0(0xef)](_0x2f596e);});};var _0x38b556=Object['getOwnPropertyDescriptor'],_0x388c65=(_0x301c6d,_0x296be0,_0x431eae,_0x4a9911)=>{const _0x11af2b=_0x5dba39;for(var _0x3aa80d=_0x4a9911>0x1?void 0x0:_0x4a9911?_0x38b556(_0x296be0,_0x431eae):_0x296be0,_0x59b883=_0x301c6d[_0x11af2b(0x116)]-0x1,_0x17b0d0;_0x59b883>=0x0;_0x59b883--)(_0x17b0d0=_0x301c6d[_0x59b883])&&(_0x3aa80d=_0x17b0d0(_0x3aa80d)||_0x3aa80d);return _0x3aa80d;},_0xceaef5=(_0x40afa7,_0x2956d7)=>(_0xd8b5e3,_0x2b4ff8)=>_0x2956d7(_0xd8b5e3,_0x2b4ff8,_0x40afa7);let _0x31d783=class extends _0x3777e4['Disposable']{constructor(_0x4f7e64,_0x4a9109,_0x4628ac,_0x18509d){const _0x2ea4c2=_0x5dba39;super(),this[_0x2ea4c2(0xf0)]=_0x4f7e64,this[_0x2ea4c2(0xbc)]=_0x4a9109,this[_0x2ea4c2(0xfe)]=_0x4628ac,this[_0x2ea4c2(0x10e)]=_0x18509d,this[_0x2ea4c2(0xe1)](),this['_initUserSync']();}[_0x5dba39(0xdb)](){const _0x3eef96=_0x5dba39;this['disposeWithMe'](this['_threadCommentModel'][_0x3eef96(0xb7)][_0x3eef96(0xb6)](_0x3069ce['bufferTime'](0x10))[_0x3eef96(0x117)](_0x4a41ab=>{const _0x9a6dda=_0x3eef96,_0x2997ec=new Set();_0x4a41ab[_0x9a6dda(0x11b)](_0x37ff32=>{const _0x4482af=_0x9a6dda;switch(_0x37ff32[_0x4482af(0x113)]){case _0x4482af(0xaf):{const _0x349020=_0x37ff32[_0x4482af(0xbf)][_0x4482af(0x121)];_0x2997ec['add'](_0x349020);break;}}}),_0xd96371(this['_injector'],_0x2997ec);}));}[_0x5dba39(0xe1)](){const _0x383714=_0x5dba39;this[_0x383714(0xe8)](this[_0x383714(0xf0)][_0x383714(0xb7)][_0x383714(0x117)](async _0xad7a3a=>{const _0x1af3af=_0x383714;var _0x140ca6,_0x3e1ed4,_0x4b6f8c,_0x267a2b;const _0x2ab658=(_0x140ca6=this['_threadCommentModel'][_0x1af3af(0xf1)](_0xad7a3a[_0x1af3af(0xd2)])[_0x1af3af(0xdf)](_0x236fea=>_0x236fea[_0x1af3af(0xaa)]===_0xad7a3a[_0x1af3af(0xaa)]))==null?void 0x0:_0x140ca6['root'];if(!_0x2ab658)return;const {unitId:_0xb5eca0,subUnitId:_0x91e78e}=_0x2ab658;switch(_0xad7a3a[_0x1af3af(0x11e)]&&this[_0x1af3af(0xfe)][_0x1af3af(0xef)](_0xad7a3a[_0x1af3af(0x11e)]),_0xad7a3a[_0x1af3af(0x113)]){case _0x329f22[_0x1af3af(0xb5)]:break;case _0x329f22[_0x1af3af(0xc4)]:{this[_0x1af3af(0xbc)][_0x1af3af(0xe0)](_0xb5eca0,_0x91e78e,{'unitId':_0xb5eca0,'subUnitId':_0x91e78e,'ref':'','id':_0xad7a3a[_0x1af3af(0xd9)],'dT':_0x37df52(+_0xad7a3a[_0x1af3af(0xe6)]),'threadId':_0xad7a3a[_0x1af3af(0xaa)],'personId':(_0x4b6f8c=(_0x3e1ed4=_0xad7a3a[_0x1af3af(0x11e)])==null?void 0x0:_0x3e1ed4['userID'])!=null?_0x4b6f8c:_0xad7a3a['userId'],'text':JSON[_0x1af3af(0xcc)](_0xad7a3a[_0x1af3af(0xeb)]),'parentId':_0x2ab658['id']});break;}case _0x329f22['Delete']:{const _0x47ba93=this['_threadCommentModel'][_0x1af3af(0x133)](_0xb5eca0,_0x91e78e,_0xad7a3a[_0x1af3af(0xd9)]);_0x47ba93&&_0x47ba93[_0x1af3af(0x11f)]&&this[_0x1af3af(0xbc)][_0x1af3af(0xce)](_0xb5eca0,_0x91e78e,_0xad7a3a[_0x1af3af(0xd9)]);break;}case _0x329f22['Edit']:{this[_0x1af3af(0xbc)][_0x1af3af(0xba)](_0xb5eca0,_0x91e78e,{'commentId':_0xad7a3a[_0x1af3af(0xd9)],'text':JSON[_0x1af3af(0xcc)](_0xad7a3a['content'])});break;}case _0x329f22['Solve']:{const _0x34e30d=(_0x267a2b=this[_0x1af3af(0xbc)][_0x1af3af(0xf1)](_0xad7a3a[_0x1af3af(0xd2)])[_0x1af3af(0xdf)](_0x251efd=>_0x251efd[_0x1af3af(0xaa)]===_0xad7a3a[_0x1af3af(0xaa)]))==null?void 0x0:_0x267a2b['root'];_0x34e30d&&this[_0x1af3af(0xbc)][_0x1af3af(0x115)](_0xb5eca0,_0x91e78e,_0x34e30d['id'],_0xad7a3a[_0x1af3af(0xf4)]===_0x583558[_0x1af3af(0x10a)]);break;}}}));}};_0x31d783=_0x388c65([_0xceaef5(0x0,_0x3777e4[_0x5dba39(0xf3)](_0x9d204b[_0x5dba39(0x137)])),_0xceaef5(0x1,_0x3777e4[_0x5dba39(0xf3)](_0xabdbc4[_0x5dba39(0x122)])),_0xceaef5(0x2,_0x3777e4[_0x5dba39(0xf3)](_0x3777e4[_0x5dba39(0x111)])),_0xceaef5(0x3,_0x3777e4[_0x5dba39(0xf3)](_0x3777e4['Injector']))],_0x31d783);const _0x47e529=_0x5dba39(0x110),_0x490629={};var _0x498a30=Object[_0x5dba39(0xd8)],_0x1d2106=(_0x1b4979,_0x1b372f,_0x4645d4,_0x3f5429)=>{const _0xc397bb=_0x5dba39;for(var _0xc9509e=_0x3f5429>0x1?void 0x0:_0x3f5429?_0x498a30(_0x1b372f,_0x4645d4):_0x1b372f,_0x12904e=_0x1b4979[_0xc397bb(0x116)]-0x1,_0x383cce;_0x12904e>=0x0;_0x12904e--)(_0x383cce=_0x1b4979[_0x12904e])&&(_0xc9509e=_0x383cce(_0xc9509e)||_0xc9509e);return _0xc9509e;},_0x39f735=(_0x168817,_0x1a8b2e)=>(_0x2bc438,_0xb91fc8)=>_0x1a8b2e(_0x2bc438,_0xb91fc8,_0x168817);function _0x4d3383(_0x1db3d8,_0x53ba04){const _0x2a9e8a=_0x5dba39,_0x369912=_0x1db3d8['replies'][0x0];return{..._0x53ba04,'id':_0x369912['replyId'],'resolved':_0x1db3d8[_0x2a9e8a(0xf4)]===0x1,'dT':_0x37df52(_0x369912['createTimestamp']),'personId':_0x369912['userId'],'threadId':_0x369912['threadId']};}function _0x56e0d3(_0x13b697,_0x312a61,_0x3b3639){const _0x3e81c4=_0x5dba39;var _0xfa6b1c,_0x3d945a;if(((_0x3d945a=(_0xfa6b1c=_0x13b697==null?void 0x0:_0x13b697[_0x3e81c4(0xc2)])==null?void 0x0:_0xfa6b1c[_0x3e81c4(0x116)])!=null?_0x3d945a:0x0)>0x0){const _0x32bb42=(_0xf8a5a4,_0x251707)=>({'id':_0xf8a5a4[_0x3e81c4(0xd9)],'threadId':_0xf8a5a4[_0x3e81c4(0xaa)],'dT':_0x37df52(_0xf8a5a4[_0x3e81c4(0xe6)]),'personId':_0xf8a5a4[_0x3e81c4(0xdc)],'resolved':_0x13b697[_0x3e81c4(0xf4)]===_0x583558[_0x3e81c4(0x10a)],'unitId':_0x312a61,'subUnitId':_0x3b3639,'text':JSON['parse'](_0xf8a5a4[_0x3e81c4(0xeb)]),'parentId':_0x251707}),_0xc3fef2=_0x32bb42(_0x13b697[_0x3e81c4(0xc2)][0x0]);return{..._0xc3fef2,'children':_0x13b697[_0x3e81c4(0xc2)][_0x3e81c4(0xb9)](0x1)[_0x3e81c4(0xfc)](_0x5c7c5f=>_0x32bb42(_0x5c7c5f,_0xc3fef2['id']))};}return null;}let _0x3ad2c7=class{constructor(_0x1353f0,_0x13fbf4,_0x1e19cf,_0x20610d){const _0x26dd3f=_0x5dba39;this[_0x26dd3f(0x12d)]=_0x1353f0,this[_0x26dd3f(0xfe)]=_0x13fbf4,this[_0x26dd3f(0x108)]=_0x1e19cf,this[_0x26dd3f(0x10e)]=_0x20610d;}async[_0x5dba39(0xe0)](_0x1d3c32){const _0x43533e=_0x5dba39;var _0x2ac945,_0x7bb07e;const {parentId:_0x2ef3cf,unitId:_0x52b8bb,text:_0x268d2f,threadId:_0x407a74}=_0x1d3c32,_0x47fb2f=(_0x7bb07e=(_0x2ac945=_0x268d2f[_0x43533e(0x103)])==null?void 0x0:_0x2ac945[_0x43533e(0x10b)](_0x21f8ad=>_0x21f8ad[_0x43533e(0xd5)]===_0x3777e4[_0x43533e(0x104)]['COMMENT'])[_0x43533e(0xfc)](_0x18197f=>_0x18197f[_0x43533e(0xe3)]))!=null?_0x7bb07e:[],_0xb1a62c=JSON[_0x43533e(0xec)](_0x268d2f),_0x83a77d=(await this[_0x43533e(0x108)]['requireSession'](_0x52b8bb))[_0x43533e(0xc7)]();if(_0x2ef3cf){const _0x25327e={'memberId':_0x83a77d,'unitId':_0x52b8bb,'content':_0xb1a62c,'mention':_0x47fb2f,'threadId':_0x407a74},_0x3e96d7=(await this[_0x43533e(0x12d)][_0x43533e(0xda)]('/universer-api/comment/unit/'+_0x52b8bb+_0x43533e(0xee),{'body':_0x25327e}))[_0x43533e(0xae)][_0x43533e(0xd4)];return{..._0x1d3c32,'id':_0x3e96d7[_0x43533e(0xd9)],'dT':_0x3777e4[_0x43533e(0x10c)](+_0x3e96d7[_0x43533e(0xe6)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x3e96d7[_0x43533e(0xdc)]};}else{const _0x56f2f5={'memberId':_0x83a77d,'unitId':_0x52b8bb,'content':_0xb1a62c,'mention':_0x47fb2f},_0x1b000a=await this[_0x43533e(0x12d)][_0x43533e(0xda)](_0x43533e(0x136)+_0x52b8bb+_0x43533e(0xb0),{'body':_0x56f2f5});return _0x4d3383(_0x1b000a[_0x43533e(0xae)][_0x43533e(0xb2)],_0x1d3c32);}}async[_0x5dba39(0xba)](_0x4db649){const _0x2af52a=_0x5dba39;var _0x31c5e6,_0x48dd90;const {text:_0x515839,unitId:_0x23ccc2}=_0x4db649,_0x4e87f2=(_0x48dd90=(_0x31c5e6=_0x515839[_0x2af52a(0x103)])==null?void 0x0:_0x31c5e6[_0x2af52a(0x10b)](_0x43f33d=>_0x43f33d[_0x2af52a(0xd5)]===_0x3777e4[_0x2af52a(0x104)][_0x2af52a(0x106)])[_0x2af52a(0xfc)](_0x6c4557=>_0x6c4557[_0x2af52a(0xe3)]))!=null?_0x48dd90:[],_0x2b9dd8=JSON[_0x2af52a(0xec)](_0x515839),_0xf6948b=_0x4db649[_0x2af52a(0xaa)],_0x376e39=_0x4db649['id'],_0x3edb1a={'memberId':(await this[_0x2af52a(0x108)][_0x2af52a(0x12f)](_0x23ccc2))[_0x2af52a(0xc7)](),'unitId':_0x23ccc2,'threadId':_0xf6948b,'mention':_0x4e87f2,'content':_0x2b9dd8,'replyId':_0x376e39},_0x504745=await this['_httpService'][_0x2af52a(0xda)]('/universer-api/comment/unit/'+_0x23ccc2+_0x2af52a(0xff),{'body':_0x3edb1a});return!_0x504745[_0x2af52a(0xae)][_0x2af52a(0x107)]||_0x504745[_0x2af52a(0xae)][_0x2af52a(0x107)][_0x2af52a(0xf5)]===0x1;}async['resolveComment'](_0x3e6027){const _0x5d45d5=_0x5dba39,{unitId:_0x42ad83}=_0x3e6027,_0x843216=_0x3e6027[_0x5d45d5(0xaa)],_0x214581={'memberId':this[_0x5d45d5(0xfe)][_0x5d45d5(0xe5)]()['userID'],'unitId':_0x42ad83,'threadId':_0x843216,'solved':_0x3e6027[_0x5d45d5(0x12b)]?_0x583558['Solved']:_0x583558[_0x5d45d5(0xfd)]},_0x38ef32=await this[_0x5d45d5(0x12d)][_0x5d45d5(0xda)](_0x5d45d5(0x136)+_0x42ad83+_0x5d45d5(0xc9),{'body':_0x214581});return!_0x38ef32[_0x5d45d5(0xae)][_0x5d45d5(0x107)]||_0x38ef32['body'][_0x5d45d5(0x107)][_0x5d45d5(0xf5)]===0x1;}async[_0x5dba39(0xce)](_0x45941f,_0x189c9c,_0x4de7d1,_0x45e1de){const _0x1a5fd9=_0x5dba39,_0x5d0bbe={'memberId':(await this[_0x1a5fd9(0x108)][_0x1a5fd9(0x12f)](_0x45941f))[_0x1a5fd9(0xc7)](),'threadId':_0x4de7d1,'replyId':_0x45e1de,'unitId':_0x45941f},_0xaf361c=await this[_0x1a5fd9(0x12d)][_0x1a5fd9(0xda)](_0x1a5fd9(0x136)+_0x45941f+_0x1a5fd9(0xe4),{'body':_0x5d0bbe});return!_0xaf361c[_0x1a5fd9(0xae)][_0x1a5fd9(0x107)]||_0xaf361c[_0x1a5fd9(0xae)][_0x1a5fd9(0x107)][_0x1a5fd9(0xf5)]===0x1;}async[_0x5dba39(0x130)](_0x27b85e,_0x3f7e8f,_0x150fcf){const _0x35fbaa=_0x5dba39,_0x173497={'unitId':_0x27b85e,'threadId':_0x150fcf},_0x402ffe=await this[_0x35fbaa(0x12d)]['post'](_0x35fbaa(0x136)+_0x27b85e+_0x35fbaa(0xb1),{'body':_0x173497}),_0x49ceae=_0x150fcf[_0x35fbaa(0xfc)](_0x4202e1=>_0x56e0d3(_0x402ffe[_0x35fbaa(0xae)][_0x35fbaa(0x101)][_0x4202e1],_0x27b85e,_0x3f7e8f))['filter'](Boolean);return Object[_0x35fbaa(0xca)](_0x402ffe[_0x35fbaa(0xae)][_0x35fbaa(0x131)])[_0x35fbaa(0x11b)](_0x13b36e=>{const _0x3ac8ad=_0x35fbaa;this[_0x3ac8ad(0xfe)]['addUser'](_0x13b36e);}),_0x49ceae;}[_0x5dba39(0x109)](_0x45fd88){const _0x562672=_0x5dba39;return{'id':_0x45fd88['id'],'threadId':_0x45fd88[_0x562672(0xaa)],'ref':_0x45fd88['ref']};}};_0x3ad2c7=_0x1d2106([_0x39f735(0x0,_0x3777e4[_0x5dba39(0xf3)](_0x47855e[_0x5dba39(0xfa)])),_0x39f735(0x1,_0x3777e4[_0x5dba39(0xf3)](_0x3777e4[_0x5dba39(0x111)])),_0x39f735(0x2,_0x3777e4['Inject'](_0x9d204b[_0x5dba39(0xd1)])),_0x39f735(0x3,_0x3777e4[_0x5dba39(0xf3)](_0x3777e4[_0x5dba39(0xf6)]))],_0x3ad2c7);var _0x534494=Object[_0x5dba39(0xd8)],_0x16e760=(_0x5dc478,_0x199edf,_0x1a9220,_0x1882a2)=>{const _0x2cf8db=_0x5dba39;for(var _0x22cdde=_0x1882a2>0x1?void 0x0:_0x1882a2?_0x534494(_0x199edf,_0x1a9220):_0x199edf,_0x5f3c09=_0x5dc478[_0x2cf8db(0x116)]-0x1,_0x379d27;_0x5f3c09>=0x0;_0x5f3c09--)(_0x379d27=_0x5dc478[_0x5f3c09])&&(_0x22cdde=_0x379d27(_0x22cdde)||_0x22cdde);return _0x22cdde;},_0xb45429=(_0x197ff1,_0x3a566b)=>(_0x186d53,_0x5493cf)=>_0x3a566b(_0x186d53,_0x5493cf,_0x197ff1);let _0x1d0090=class extends _0x3777e4[_0x5dba39(0x125)]{constructor(_0x34acad,_0x5d4a6d){const _0x5df932=_0x5dba39;super(),this['_threadCommentDataSourceService']=_0x34acad,this[_0x5df932(0xd3)]=_0x5d4a6d,this[_0x5df932(0xd0)]();}[_0x5dba39(0xd0)](){const _0x22de98=_0x5dba39;this[_0x22de98(0xc8)]['dataSource']=this[_0x22de98(0xd3)],this[_0x22de98(0xc8)][_0x22de98(0xb4)]=!0x1;}};_0x1d0090=_0x16e760([_0xb45429(0x0,_0xabdbc4[_0x5dba39(0x11a)]),_0xb45429(0x1,_0x3777e4[_0x5dba39(0xf3)](_0x3ad2c7))],_0x1d0090);var _0x457362=Object[_0x5dba39(0xe2)],_0x33d040=Object[_0x5dba39(0xd8)],_0x361ec0=(_0x4930c6,_0x547a2e,_0x2170a3)=>_0x547a2e in _0x4930c6?_0x457362(_0x4930c6,_0x547a2e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2170a3}):_0x4930c6[_0x547a2e]=_0x2170a3,_0x298e95=(_0xbd0ba1,_0x4c193b,_0x1ad22c,_0x4b0e74)=>{const _0x18ee6b=_0x5dba39;for(var _0x284529=_0x4b0e74>0x1?void 0x0:_0x4b0e74?_0x33d040(_0x4c193b,_0x1ad22c):_0x4c193b,_0x44e791=_0xbd0ba1[_0x18ee6b(0x116)]-0x1,_0x6ee4e4;_0x44e791>=0x0;_0x44e791--)(_0x6ee4e4=_0xbd0ba1[_0x44e791])&&(_0x284529=_0x6ee4e4(_0x284529)||_0x284529);return _0x284529;},_0x30c6c5=(_0x212244,_0x5c905b)=>(_0x1bff08,_0x331eeb)=>_0x5c905b(_0x1bff08,_0x331eeb,_0x212244),_0x1867ba=(_0x17e8c9,_0x70581f,_0x1f285c)=>_0x361ec0(_0x17e8c9,typeof _0x70581f!=_0x5dba39(0x132)?_0x70581f+'':_0x70581f,_0x1f285c);_0x436e08[_0x5dba39(0xa9)]=class extends _0x3777e4[_0x5dba39(0xf9)]{constructor(_0x2146fc=_0x490629,_0x31336a,_0x3d8d32){const _0xaa436c=_0x5dba39;super(),this[_0xaa436c(0xb3)]=_0x2146fc,this['_injector']=_0x31336a,this['_configService']=_0x3d8d32;const {..._0x583d54}=_0x3777e4[_0xaa436c(0xb8)]({},_0x490629,this['_config']);this[_0xaa436c(0x126)][_0xaa436c(0xc1)](_0x47e529,_0x583d54);}['onStarting'](){const _0x3bf3fc=_0x5dba39;[[_0x3ad2c7],[_0x1d0090],[_0x31d783]][_0x3bf3fc(0x11b)](_0x42b645=>{const _0x4bdb0f=_0x3bf3fc;this[_0x4bdb0f(0x10e)]['add'](_0x42b645);});}[_0x5dba39(0xf8)](){const _0x1d6870=_0x5dba39;this['_injector'][_0x1d6870(0x120)](_0x1d0090),this['_injector'][_0x1d6870(0x120)](_0x31d783);}},_0x1867ba(_0x436e08[_0x5dba39(0xa9)],_0x5dba39(0x10f),_0x48cf41),_0x1867ba(_0x436e08[_0x5dba39(0xa9)],_0x5dba39(0x113),_0x3777e4[_0x5dba39(0x129)]['UNIVER_UNKNOWN']),_0x436e08[_0x5dba39(0xa9)]=_0x298e95([_0x3777e4[_0x5dba39(0x10d)](_0x24e3d7['UniverThreadCommentUIPlugin'],_0x9d204b[_0x5dba39(0x123)],_0x39e458[_0x5dba39(0x128)]),_0x30c6c5(0x1,_0x3777e4[_0x5dba39(0xf3)](_0x3777e4[_0x5dba39(0xf6)])),_0x30c6c5(0x2,_0x3777e4[_0x5dba39(0x134)])],_0x436e08[_0x5dba39(0xa9)]),Object[_0x5dba39(0xe2)](_0x436e08,Symbol[_0x5dba39(0xf7)],{'value':_0x5dba39(0xe7)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.7.0-nightly.202505161607",
3
+ "version": "0.7.0-nightly.202505171606",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.7.0-nightly.202505161607",
49
- "@univerjs-pro/license": "0.7.0-nightly.202505161607",
50
- "@univerjs/core": "0.7.0-nightly.202505161607",
48
+ "@univerjs-pro/collaboration-client": "0.7.0-nightly.202505171606",
49
+ "@univerjs-pro/license": "0.7.0-nightly.202505171606",
50
+ "@univerjs/core": "0.7.0-nightly.202505171606",
51
51
  "@univerjs/protocol": "0.1.46-alpha.3",
52
- "@univerjs/network": "0.7.0-nightly.202505161607",
53
- "@univerjs/thread-comment-ui": "0.7.0-nightly.202505161607",
54
- "@univerjs/thread-comment": "0.7.0-nightly.202505161607"
52
+ "@univerjs/thread-comment": "0.7.0-nightly.202505171606",
53
+ "@univerjs/thread-comment-ui": "0.7.0-nightly.202505171606",
54
+ "@univerjs/network": "0.7.0-nightly.202505171606"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",