@univerjs-pro/thread-comment-datasource 0.6.8 → 0.6.9-nightly.202504021607

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 _0x5a3c69=_0x140b;(function(_0x9012e,_0x204477){const _0x36e73f=_0x140b,_0x507a66=_0x9012e();while(!![]){try{const _0x10dafb=-parseInt(_0x36e73f(0x146))/0x1*(-parseInt(_0x36e73f(0x15a))/0x2)+-parseInt(_0x36e73f(0x183))/0x3*(-parseInt(_0x36e73f(0x196))/0x4)+-parseInt(_0x36e73f(0x1b5))/0x5+-parseInt(_0x36e73f(0x16c))/0x6*(-parseInt(_0x36e73f(0x1ae))/0x7)+-parseInt(_0x36e73f(0x187))/0x8+parseInt(_0x36e73f(0x172))/0x9+parseInt(_0x36e73f(0x149))/0xa*(-parseInt(_0x36e73f(0x14e))/0xb);if(_0x10dafb===_0x204477)break;else _0x507a66['push'](_0x507a66['shift']());}catch(_0x41bf0f){_0x507a66['push'](_0x507a66['shift']());}}}(_0x44a1,0x4c4fb));Object[_0x5a3c69(0x142)](exports,Symbol['toStringTag'],{'value':_0x5a3c69(0x1b6)});const b=require(_0x5a3c69(0x152)),T=require(_0x5a3c69(0x164)),c=require(_0x5a3c69(0x1a1)),j=require(_0x5a3c69(0x169)),M=require(_0x5a3c69(0x16d)),w=require(_0x5a3c69(0x153)),P=require(_0x5a3c69(0x1a4)),U=_0x5a3c69(0x14c);var I=(_0x5613f4=>(_0x5613f4[_0x5613f4[_0x5a3c69(0x168)]=0x0]=_0x5a3c69(0x168),_0x5613f4[_0x5613f4[_0x5a3c69(0x1ac)]=0x1]=_0x5a3c69(0x1ac),_0x5613f4[_0x5613f4[_0x5a3c69(0x1a3)]=-0x1]=_0x5a3c69(0x1a3),_0x5613f4))(I||{}),v=(_0x25dc11=>(_0x25dc11[_0x25dc11[_0x5a3c69(0x16b)]=0x0]=_0x5a3c69(0x16b),_0x25dc11[_0x25dc11[_0x5a3c69(0x14f)]=0x1]=_0x5a3c69(0x14f),_0x25dc11[_0x25dc11[_0x5a3c69(0x148)]=0x2]='Reply',_0x25dc11[_0x25dc11[_0x5a3c69(0x18b)]=0x3]=_0x5a3c69(0x18b),_0x25dc11[_0x25dc11[_0x5a3c69(0x15b)]=0x4]=_0x5a3c69(0x15b),_0x25dc11[_0x25dc11[_0x5a3c69(0x190)]=0x5]=_0x5a3c69(0x190),_0x25dc11[_0x25dc11[_0x5a3c69(0x1a3)]=-0x1]=_0x5a3c69(0x1a3),_0x25dc11))(v||{});function _0x140b(_0x1bfa92,_0x4a4b39){const _0x44a1b6=_0x44a1();return _0x140b=function(_0x140baa,_0x344645){_0x140baa=_0x140baa-0x137;let _0x433faf=_0x44a1b6[_0x140baa];return _0x433faf;},_0x140b(_0x1bfa92,_0x4a4b39);}const f=_0x4e7c01=>c['dayjs'](new Date(+_0x4e7c01))[_0x5a3c69(0x155)](_0x5a3c69(0x1b4)),R=async(_0x2da711,_0x4818d1)=>{const _0x6bc081=_0x5a3c69,_0x5ed615=_0x2da711[_0x6bc081(0x178)](c[_0x6bc081(0x15f)]),_0x3bb68f=_0x2da711['get'](P[_0x6bc081(0x15d)]);_0x4818d1[_0x6bc081(0x199)](_0x3b299e=>{const _0x2f7cca=_0x6bc081;_0x5ed615[_0x2f7cca(0x19e)](_0x3b299e)&&_0x4818d1[_0x2f7cca(0x163)](_0x3b299e);}),_0x4818d1[_0x6bc081(0x197)]&&(await _0x3bb68f[_0x6bc081(0x178)](_0x6bc081(0x1b1),{'params':{'userIDs':[..._0x4818d1]}}))[_0x6bc081(0x175)][_0x6bc081(0x160)][_0x6bc081(0x199)](_0x612d55=>{_0x612d55&&_0x5ed615['addUser'](_0x612d55);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x35898e,_0x24bb16,_0x83c1d0,_0x3dd96c)=>{const _0x2cc4f0=_0x5a3c69;for(var _0x514db0=_0x3dd96c>0x1?void 0x0:_0x3dd96c?$(_0x24bb16,_0x83c1d0):_0x24bb16,_0x34e430=_0x35898e[_0x2cc4f0(0x1b9)]-0x1,_0x77ef43;_0x34e430>=0x0;_0x34e430--)(_0x77ef43=_0x35898e[_0x34e430])&&(_0x514db0=_0x77ef43(_0x514db0)||_0x514db0);return _0x514db0;},S=(_0x155c37,_0x22d6ac)=>(_0x51bdfd,_0x63127c)=>_0x22d6ac(_0x51bdfd,_0x63127c,_0x155c37);function _0x44a1(){const _0x17d45d=['1978587jKpDpD','getMemberID','pipe','body','comments','rangeId','get','replyId','addComment','dataSource','type','getComment','_injector','find','saveCommentToSnapshot','add','/reply','92310jdhjIF','CommentService','_commentService','CustomRangeType','4419120mYmKON','createTimestamp','resolveComment','symbol','Edit','dayjs','setConfig','_userService','personId','Solve','merge','/delete','rangeType','onReady','getOwnPropertyDescriptor','48KwYzEF','size','disposeWithMe','forEach','userId','subscribe','UniverThreadCommentDataSourcePlugin','solved','getUser','/add','replies','@univerjs/core','slice','UNRECOGNIZED','@univerjs/network','ThreadCommentModel','commentUpdate$','Plugin','onStarting','UniverInstanceType','_initUserSync','COMMENT','Solved','payload','2472428lAjaRM','_threadCommentDataSource','_configService','/universer-api/user/list','deleteComment','thread-comment-data-source.config','YYYY/MM/DD\x20HH:mm','2229515NmAtYU','Module','userID','user','length','threadId','parse','Injector','addUser','IConfigService','UniverLicensePlugin','getUnit','UniverThreadCommentUIPlugin','comment','post','resolved','updateComment','defineProperty','/universer-api/comment/unit/','Inject','UNIVER_UNKNOWN','2158jToTEr','stringify','Reply','50QyCSHa','syncUpdateMutationToColla','_sessionService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getCurrentUser','228855iligto','Add','code','content','@univerjs-pro/collaboration-client','rxjs','values','format','error','_config','_threadCommentModel','map','438DTWEkZ','Delete','_init','HTTPService','/edit','UserManagerService','users','customRanges','CollaborationSessionService','delete','@univerjs-pro/license','unitId','_initDataSource','requireSession','OpenOrReOpen','@univerjs/thread-comment-ui','Disposable','Unknown','6WjsdTP','@univerjs/thread-comment','filter','_threadCommentDataSourceService','_httpService','/list'];_0x44a1=function(){return _0x17d45d;};return _0x44a1();}let p=class extends c[_0x5a3c69(0x16a)]{constructor(_0x230a78,_0x247e51,_0x107d1f,_0x59ad24){const _0x14c1c0=_0x5a3c69;super(),this['_commentService']=_0x230a78,this['_threadCommentModel']=_0x247e51,this[_0x14c1c0(0x18e)]=_0x107d1f,this['_injector']=_0x59ad24,this[_0x14c1c0(0x15c)](),this[_0x14c1c0(0x1aa)]();}[_0x5a3c69(0x1aa)](){const _0x45fab4=_0x5a3c69;this[_0x45fab4(0x198)](this[_0x45fab4(0x158)][_0x45fab4(0x1a6)][_0x45fab4(0x174)](w['bufferTime'](0x10))[_0x45fab4(0x19b)](_0x2ec14e=>{const _0x440dd1=_0x45fab4,_0x1ee88d=new Set();_0x2ec14e['forEach'](_0x50b414=>{const _0x4e94a4=_0x140b;switch(_0x50b414[_0x4e94a4(0x17c)]){case _0x4e94a4(0x181):{const _0x5a1663=_0x50b414[_0x4e94a4(0x1ad)][_0x4e94a4(0x18f)];_0x1ee88d[_0x4e94a4(0x181)](_0x5a1663);break;}}}),R(this[_0x440dd1(0x17e)],_0x1ee88d);}));}[_0x5a3c69(0x15c)](){const _0x12431d=_0x5a3c69;this[_0x12431d(0x198)](this[_0x12431d(0x185)][_0x12431d(0x1a6)][_0x12431d(0x19b)](async _0xb45c68=>{const _0x4a2d0c=_0x12431d;var _0x5daba8,_0x4b67a5,_0x3340ef,_0xf98eed;const _0x32b7c5=(_0x5daba8=this['_threadCommentModel'][_0x4a2d0c(0x13c)](_0xb45c68[_0x4a2d0c(0x165)])['find'](_0x10192e=>_0x10192e[_0x4a2d0c(0x1ba)]===_0xb45c68[_0x4a2d0c(0x1ba)]))==null?void 0x0:_0x5daba8['root'];if(!_0x32b7c5)return;const {unitId:_0x519560,subUnitId:_0x405374}=_0x32b7c5;switch(_0xb45c68[_0x4a2d0c(0x1b8)]&&this[_0x4a2d0c(0x18e)][_0x4a2d0c(0x139)](_0xb45c68[_0x4a2d0c(0x1b8)]),_0xb45c68[_0x4a2d0c(0x17c)]){case v['Add']:break;case v[_0x4a2d0c(0x148)]:{this[_0x4a2d0c(0x158)][_0x4a2d0c(0x17a)](_0x519560,_0x405374,{'unitId':_0x519560,'subUnitId':_0x405374,'ref':'','id':_0xb45c68[_0x4a2d0c(0x179)],'dT':f(+_0xb45c68[_0x4a2d0c(0x188)]),'threadId':_0xb45c68[_0x4a2d0c(0x1ba)],'personId':(_0x3340ef=(_0x4b67a5=_0xb45c68['user'])==null?void 0x0:_0x4b67a5[_0x4a2d0c(0x1b7)])!=null?_0x3340ef:_0xb45c68[_0x4a2d0c(0x19a)],'text':JSON[_0x4a2d0c(0x137)](_0xb45c68[_0x4a2d0c(0x151)]),'parentId':_0x32b7c5['id']});break;}case v[_0x4a2d0c(0x15b)]:{const _0x1a6c7e=this[_0x4a2d0c(0x158)][_0x4a2d0c(0x17d)](_0x519560,_0x405374,_0xb45c68[_0x4a2d0c(0x179)]);_0x1a6c7e&&_0x1a6c7e['parentId']&&this[_0x4a2d0c(0x158)][_0x4a2d0c(0x1b2)](_0x519560,_0x405374,_0xb45c68[_0x4a2d0c(0x179)]);break;}case v['Edit']:{this[_0x4a2d0c(0x158)]['updateComment'](_0x519560,_0x405374,{'commentId':_0xb45c68['replyId'],'text':JSON[_0x4a2d0c(0x137)](_0xb45c68[_0x4a2d0c(0x151)])});break;}case v['Solve']:{const _0x131cc2=(_0xf98eed=this[_0x4a2d0c(0x158)][_0x4a2d0c(0x13c)](_0xb45c68[_0x4a2d0c(0x165)])[_0x4a2d0c(0x17f)](_0x41c1f1=>_0x41c1f1[_0x4a2d0c(0x1ba)]===_0xb45c68[_0x4a2d0c(0x1ba)]))==null?void 0x0:_0xf98eed['root'];_0x131cc2&&this['_threadCommentModel'][_0x4a2d0c(0x189)](_0x519560,_0x405374,_0x131cc2['id'],_0xb45c68[_0x4a2d0c(0x19d)]===I[_0x4a2d0c(0x1ac)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x5a3c69(0x184)])),S(0x1,c[_0x5a3c69(0x144)](M[_0x5a3c69(0x1a5)])),S(0x2,c[_0x5a3c69(0x144)](c[_0x5a3c69(0x15f)])),S(0x3,c['Inject'](c[_0x5a3c69(0x138)]))],p);const q=_0x5a3c69(0x1b3),D={};var A=Object[_0x5a3c69(0x195)],x=(_0x1914ba,_0x355a4c,_0x4b1bf4,_0x2bd67e)=>{const _0x4ab245=_0x5a3c69;for(var _0x2df12e=_0x2bd67e>0x1?void 0x0:_0x2bd67e?A(_0x355a4c,_0x4b1bf4):_0x355a4c,_0x41d072=_0x1914ba[_0x4ab245(0x1b9)]-0x1,_0x135dee;_0x41d072>=0x0;_0x41d072--)(_0x135dee=_0x1914ba[_0x41d072])&&(_0x2df12e=_0x135dee(_0x2df12e)||_0x2df12e);return _0x2df12e;},_=(_0x35d003,_0x4b7c0f)=>(_0x227a18,_0x564a25)=>_0x4b7c0f(_0x227a18,_0x564a25,_0x35d003);function Y(_0x296a60,_0x64cd8e){const _0xb8db59=_0x5a3c69,_0x2ac498=_0x296a60['replies'][0x0];return{..._0x64cd8e,'id':_0x2ac498[_0xb8db59(0x179)],'resolved':_0x296a60['solved']===0x1,'dT':f(_0x2ac498[_0xb8db59(0x188)]),'personId':_0x2ac498['userId'],'threadId':_0x2ac498[_0xb8db59(0x1ba)]};}function G(_0x56f3c5,_0x3a4ce7,_0x379027){const _0x2902db=_0x5a3c69;var _0x25c30f,_0x274656;if(((_0x274656=(_0x25c30f=_0x56f3c5==null?void 0x0:_0x56f3c5[_0x2902db(0x1a0)])==null?void 0x0:_0x25c30f['length'])!=null?_0x274656:0x0)>0x0){const _0x21ecc1=(_0x5c7676,_0x4515b6)=>({'id':_0x5c7676[_0x2902db(0x179)],'threadId':_0x5c7676[_0x2902db(0x1ba)],'dT':f(_0x5c7676[_0x2902db(0x188)]),'personId':_0x5c7676['userId'],'resolved':_0x56f3c5[_0x2902db(0x19d)]===I['Solved'],'unitId':_0x3a4ce7,'subUnitId':_0x379027,'text':JSON['parse'](_0x5c7676[_0x2902db(0x151)]),'parentId':_0x4515b6}),_0x2ad800=_0x21ecc1(_0x56f3c5['replies'][0x0]);return{..._0x2ad800,'children':_0x56f3c5[_0x2902db(0x1a0)][_0x2902db(0x1a2)](0x1)[_0x2902db(0x159)](_0x33ecdc=>_0x21ecc1(_0x33ecdc,_0x2ad800['id']))};}return null;}let g=class{constructor(_0xdac1f,_0x53a2ed,_0x394c78,_0x4dc251){const _0x27e153=_0x5a3c69;this[_0x27e153(0x170)]=_0xdac1f,this['_userService']=_0x53a2ed,this['_sessionService']=_0x394c78,this[_0x27e153(0x17e)]=_0x4dc251;}async[_0x5a3c69(0x17a)](_0x41eac4){const _0x1a286f=_0x5a3c69;var _0x564753,_0x3a472d;const {parentId:_0x57d912,unitId:_0x42403f,text:_0x52ec1d,threadId:_0x2fc566}=_0x41eac4,_0x46083b=(_0x3a472d=(_0x564753=_0x52ec1d[_0x1a286f(0x161)])==null?void 0x0:_0x564753['filter'](_0x3f9187=>_0x3f9187[_0x1a286f(0x193)]===c[_0x1a286f(0x186)][_0x1a286f(0x1ab)])[_0x1a286f(0x159)](_0x271d42=>_0x271d42[_0x1a286f(0x177)]))!=null?_0x3a472d:[],_0x6129a7=JSON[_0x1a286f(0x147)](_0x52ec1d),_0x25a5c4=(await this[_0x1a286f(0x14b)]['requireSession'](_0x42403f))['getMemberID']();if(_0x57d912){const _0x590163={'memberId':_0x25a5c4,'unitId':_0x42403f,'content':_0x6129a7,'mention':_0x46083b,'threadId':_0x2fc566},_0x5c3823=(await this[_0x1a286f(0x170)]['post'](_0x1a286f(0x143)+_0x42403f+_0x1a286f(0x182),{'body':_0x590163}))[_0x1a286f(0x175)]['reply'];return{..._0x41eac4,'id':_0x5c3823[_0x1a286f(0x179)],'dT':c[_0x1a286f(0x18c)](+_0x5c3823[_0x1a286f(0x188)])[_0x1a286f(0x155)](_0x1a286f(0x1b4)),'personId':_0x5c3823[_0x1a286f(0x19a)]};}else{const _0x515097={'memberId':_0x25a5c4,'unitId':_0x42403f,'content':_0x6129a7,'mention':_0x46083b},_0x5b0cc3=await this[_0x1a286f(0x170)][_0x1a286f(0x13f)]('/universer-api/comment/unit/'+_0x42403f+_0x1a286f(0x19f),{'body':_0x515097});return Y(_0x5b0cc3[_0x1a286f(0x175)][_0x1a286f(0x13e)],_0x41eac4);}}async[_0x5a3c69(0x141)](_0x5f0576){const _0x3d44f4=_0x5a3c69;var _0x287cdb,_0x718189;const {text:_0xd1f03,unitId:_0x4ccb6c}=_0x5f0576,_0x5c0ab0=(_0x718189=(_0x287cdb=_0xd1f03[_0x3d44f4(0x161)])==null?void 0x0:_0x287cdb[_0x3d44f4(0x16e)](_0x39e58b=>_0x39e58b[_0x3d44f4(0x193)]===c[_0x3d44f4(0x186)][_0x3d44f4(0x1ab)])['map'](_0x1b3659=>_0x1b3659[_0x3d44f4(0x177)]))!=null?_0x718189:[],_0x12b1f3=JSON['stringify'](_0xd1f03),_0x24a8a4=_0x5f0576[_0x3d44f4(0x1ba)],_0x5e0d7d=_0x5f0576['id'],_0x64dfac={'memberId':(await this['_sessionService'][_0x3d44f4(0x167)](_0x4ccb6c))['getMemberID'](),'unitId':_0x4ccb6c,'threadId':_0x24a8a4,'mention':_0x5c0ab0,'content':_0x12b1f3,'replyId':_0x5e0d7d},_0x14dfc8=await this[_0x3d44f4(0x170)][_0x3d44f4(0x13f)](_0x3d44f4(0x143)+_0x4ccb6c+_0x3d44f4(0x15e),{'body':_0x64dfac});return!_0x14dfc8[_0x3d44f4(0x175)]['error']||_0x14dfc8[_0x3d44f4(0x175)][_0x3d44f4(0x156)]['code']===0x1;}async[_0x5a3c69(0x189)](_0x443223){const _0x7f5f4c=_0x5a3c69,{unitId:_0x53736a}=_0x443223,_0x342f13=_0x443223[_0x7f5f4c(0x1ba)],_0x43eb0c={'memberId':this[_0x7f5f4c(0x18e)][_0x7f5f4c(0x14d)]()[_0x7f5f4c(0x1b7)],'unitId':_0x53736a,'threadId':_0x342f13,'solved':_0x443223[_0x7f5f4c(0x140)]?I['Solved']:I[_0x7f5f4c(0x168)]},_0xe447d3=await this[_0x7f5f4c(0x170)]['post']('/universer-api/comment/unit/'+_0x53736a+'/solved',{'body':_0x43eb0c});return!_0xe447d3[_0x7f5f4c(0x175)][_0x7f5f4c(0x156)]||_0xe447d3[_0x7f5f4c(0x175)][_0x7f5f4c(0x156)][_0x7f5f4c(0x150)]===0x1;}async[_0x5a3c69(0x1b2)](_0x2cb015,_0x45d1cc,_0x599693,_0x2516e0){const _0x57d02e=_0x5a3c69,_0x25f0f7={'memberId':(await this[_0x57d02e(0x14b)]['requireSession'](_0x2cb015))[_0x57d02e(0x173)](),'threadId':_0x599693,'replyId':_0x2516e0,'unitId':_0x2cb015},_0x4ff191=await this[_0x57d02e(0x170)]['post'](_0x57d02e(0x143)+_0x2cb015+_0x57d02e(0x192),{'body':_0x25f0f7});return!_0x4ff191['body'][_0x57d02e(0x156)]||_0x4ff191[_0x57d02e(0x175)]['error'][_0x57d02e(0x150)]===0x1;}async['listComments'](_0x17bc2f,_0x5df002,_0x4eabc1){const _0x1afb95=_0x5a3c69,_0x540399={'unitId':_0x17bc2f,'threadId':_0x4eabc1},_0x47c451=await this[_0x1afb95(0x170)][_0x1afb95(0x13f)]('/universer-api/comment/unit/'+_0x17bc2f+_0x1afb95(0x171),{'body':_0x540399}),_0x33e5f3=_0x4eabc1[_0x1afb95(0x159)](_0x1b1db3=>G(_0x47c451['body'][_0x1afb95(0x176)][_0x1b1db3],_0x17bc2f,_0x5df002))[_0x1afb95(0x16e)](Boolean);return Object[_0x1afb95(0x154)](_0x47c451[_0x1afb95(0x175)][_0x1afb95(0x160)])['forEach'](_0x29a291=>{const _0x2b7c12=_0x1afb95;this[_0x2b7c12(0x18e)][_0x2b7c12(0x139)](_0x29a291);}),_0x33e5f3;}[_0x5a3c69(0x180)](_0x31caeb){return{'id':_0x31caeb['id'],'threadId':_0x31caeb['threadId'],'ref':_0x31caeb['ref']};}};g=x([_(0x0,c[_0x5a3c69(0x144)](P['HTTPService'])),_(0x1,c[_0x5a3c69(0x144)](c[_0x5a3c69(0x15f)])),_(0x2,c[_0x5a3c69(0x144)](b[_0x5a3c69(0x162)])),_(0x3,c['Inject'](c[_0x5a3c69(0x138)]))],g);var H=Object[_0x5a3c69(0x195)],J=(_0x40bbe8,_0x5521d0,_0x2042db,_0x531283)=>{const _0x33d6ee=_0x5a3c69;for(var _0x5140b1=_0x531283>0x1?void 0x0:_0x531283?H(_0x5521d0,_0x2042db):_0x5521d0,_0x530bf0=_0x40bbe8[_0x33d6ee(0x1b9)]-0x1,_0x3001c2;_0x530bf0>=0x0;_0x530bf0--)(_0x3001c2=_0x40bbe8[_0x530bf0])&&(_0x5140b1=_0x3001c2(_0x5140b1)||_0x5140b1);return _0x5140b1;},y=(_0x2dc495,_0x4f80cd)=>(_0x8c703b,_0xb9ded0)=>_0x4f80cd(_0x8c703b,_0xb9ded0,_0x2dc495);let C=class extends c[_0x5a3c69(0x16a)]{constructor(_0x195b02,_0x18d848){const _0x16baf0=_0x5a3c69;super(),this[_0x16baf0(0x16f)]=_0x195b02,this[_0x16baf0(0x1af)]=_0x18d848,this[_0x16baf0(0x166)]();}[_0x5a3c69(0x166)](){const _0x128821=_0x5a3c69;this[_0x128821(0x16f)][_0x128821(0x17b)]=this[_0x128821(0x1af)],this[_0x128821(0x16f)][_0x128821(0x14a)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](g))],C);var F=Object[_0x5a3c69(0x142)],L=Object[_0x5a3c69(0x195)],Z=(_0x14e2f7,_0x411723,_0x2c3e00)=>_0x411723 in _0x14e2f7?F(_0x14e2f7,_0x411723,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2c3e00}):_0x14e2f7[_0x411723]=_0x2c3e00,W=(_0x443807,_0x5baa14,_0x61a9e,_0x538994)=>{for(var _0x58f92e=_0x538994>0x1?void 0x0:_0x538994?L(_0x5baa14,_0x61a9e):_0x5baa14,_0x1d45b2=_0x443807['length']-0x1,_0x19d1ee;_0x1d45b2>=0x0;_0x1d45b2--)(_0x19d1ee=_0x443807[_0x1d45b2])&&(_0x58f92e=_0x19d1ee(_0x58f92e)||_0x58f92e);return _0x58f92e;},O=(_0x29d310,_0x144710)=>(_0x3c5370,_0x36ddfe)=>_0x144710(_0x3c5370,_0x36ddfe,_0x29d310),N=(_0x195bf6,_0x145681,_0x31f596)=>Z(_0x195bf6,typeof _0x145681!=_0x5a3c69(0x18a)?_0x145681+'':_0x145681,_0x31f596);exports[_0x5a3c69(0x19c)]=class extends c[_0x5a3c69(0x1a7)]{constructor(_0x59b77f=D,_0x169bab,_0x40b0be){const _0x52de6c=_0x5a3c69;super(),this[_0x52de6c(0x157)]=_0x59b77f,this[_0x52de6c(0x17e)]=_0x169bab,this[_0x52de6c(0x1b0)]=_0x40b0be;const {..._0x466abc}=c[_0x52de6c(0x191)]({},D,this['_config']);this[_0x52de6c(0x1b0)][_0x52de6c(0x18d)](q,_0x466abc);}[_0x5a3c69(0x1a8)](){const _0x51507e=_0x5a3c69;[[g],[C],[p]][_0x51507e(0x199)](_0x38429e=>{const _0x142474=_0x51507e;this[_0x142474(0x17e)][_0x142474(0x181)](_0x38429e);});}[_0x5a3c69(0x194)](){const _0x15a9e3=_0x5a3c69;this[_0x15a9e3(0x17e)][_0x15a9e3(0x178)](C),this[_0x15a9e3(0x17e)][_0x15a9e3(0x178)](p);}},N(exports[_0x5a3c69(0x19c)],'pluginName',U),N(exports[_0x5a3c69(0x19c)],_0x5a3c69(0x17c),c[_0x5a3c69(0x1a9)][_0x5a3c69(0x145)]),exports[_0x5a3c69(0x19c)]=W([c['DependentOn'](j[_0x5a3c69(0x13d)],b['UniverCollaborationClientPlugin'],T[_0x5a3c69(0x13b)]),O(0x1,c[_0x5a3c69(0x144)](c['Injector'])),O(0x2,c[_0x5a3c69(0x13a)])],exports[_0x5a3c69(0x19c)]);
1
+ 'use strict';const _0x2209f1=_0x4087;(function(_0x357202,_0x1ca33c){const _0x523a13=_0x4087,_0x8ca3b8=_0x357202();while(!![]){try{const _0x3ecb62=parseInt(_0x523a13(0x1f1))/0x1*(parseInt(_0x523a13(0x1f3))/0x2)+parseInt(_0x523a13(0x233))/0x3*(-parseInt(_0x523a13(0x208))/0x4)+parseInt(_0x523a13(0x219))/0x5+parseInt(_0x523a13(0x1c5))/0x6+parseInt(_0x523a13(0x23e))/0x7*(parseInt(_0x523a13(0x1e0))/0x8)+parseInt(_0x523a13(0x221))/0x9*(parseInt(_0x523a13(0x1e8))/0xa)+parseInt(_0x523a13(0x1f0))/0xb*(-parseInt(_0x523a13(0x1f7))/0xc);if(_0x3ecb62===_0x1ca33c)break;else _0x8ca3b8['push'](_0x8ca3b8['shift']());}catch(_0x204c06){_0x8ca3b8['push'](_0x8ca3b8['shift']());}}}(_0x518f,0x8b5e1));Object['defineProperty'](exports,Symbol[_0x2209f1(0x1fb)],{'value':_0x2209f1(0x22d)});const b=require(_0x2209f1(0x1d5)),T=require(_0x2209f1(0x216)),c=require(_0x2209f1(0x20b)),j=require(_0x2209f1(0x1e7)),M=require(_0x2209f1(0x23d)),w=require(_0x2209f1(0x1d8)),P=require(_0x2209f1(0x23b)),U=_0x2209f1(0x1fa);function _0x4087(_0x10ab2f,_0x1cd533){const _0x518f5e=_0x518f();return _0x4087=function(_0x40872e,_0x487807){_0x40872e=_0x40872e-0x1c1;let _0x9b6ff0=_0x518f5e[_0x40872e];return _0x9b6ff0;},_0x4087(_0x10ab2f,_0x1cd533);}var I=(_0x2e5aba=>(_0x2e5aba[_0x2e5aba[_0x2209f1(0x1d2)]=0x0]=_0x2209f1(0x1d2),_0x2e5aba[_0x2e5aba[_0x2209f1(0x20a)]=0x1]=_0x2209f1(0x20a),_0x2e5aba[_0x2e5aba['UNRECOGNIZED']=-0x1]=_0x2209f1(0x21d),_0x2e5aba))(I||{}),v=(_0x53452f=>(_0x53452f[_0x53452f[_0x2209f1(0x1ee)]=0x0]=_0x2209f1(0x1ee),_0x53452f[_0x53452f['Add']=0x1]='Add',_0x53452f[_0x53452f[_0x2209f1(0x239)]=0x2]=_0x2209f1(0x239),_0x53452f[_0x53452f[_0x2209f1(0x1da)]=0x3]=_0x2209f1(0x1da),_0x53452f[_0x53452f[_0x2209f1(0x1fe)]=0x4]=_0x2209f1(0x1fe),_0x53452f[_0x53452f[_0x2209f1(0x212)]=0x5]=_0x2209f1(0x212),_0x53452f[_0x53452f[_0x2209f1(0x21d)]=-0x1]='UNRECOGNIZED',_0x53452f))(v||{});const f=_0x41f62=>c['dayjs'](new Date(+_0x41f62))[_0x2209f1(0x1df)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x1d314b,_0x9ebe84)=>{const _0x24cd5d=_0x2209f1,_0x8d7d5d=_0x1d314b[_0x24cd5d(0x1f2)](c[_0x24cd5d(0x206)]),_0x274c9e=_0x1d314b[_0x24cd5d(0x1f2)](P[_0x24cd5d(0x1f4)]);_0x9ebe84[_0x24cd5d(0x1c1)](_0x1640da=>{const _0x411237=_0x24cd5d;_0x8d7d5d['getUser'](_0x1640da)&&_0x9ebe84[_0x411237(0x218)](_0x1640da);}),_0x9ebe84[_0x24cd5d(0x22a)]&&(await _0x274c9e[_0x24cd5d(0x1f2)](_0x24cd5d(0x235),{'params':{'userIDs':[..._0x9ebe84]}}))[_0x24cd5d(0x21c)]['users'][_0x24cd5d(0x1c1)](_0x491db6=>{const _0xcaa182=_0x24cd5d;_0x491db6&&_0x8d7d5d[_0xcaa182(0x1fd)](_0x491db6);});};var $=Object[_0x2209f1(0x1e4)],E=(_0x5d1fce,_0x836a2f,_0x2d971a,_0x30d13e)=>{for(var _0x38de7f=_0x30d13e>0x1?void 0x0:_0x30d13e?$(_0x836a2f,_0x2d971a):_0x836a2f,_0x47767d=_0x5d1fce['length']-0x1,_0xfd8c94;_0x47767d>=0x0;_0x47767d--)(_0xfd8c94=_0x5d1fce[_0x47767d])&&(_0x38de7f=_0xfd8c94(_0x38de7f)||_0x38de7f);return _0x38de7f;},S=(_0x59f7cd,_0x3b20d6)=>(_0xb8a3f8,_0x3f4b31)=>_0x3b20d6(_0xb8a3f8,_0x3f4b31,_0x59f7cd);let p=class extends c[_0x2209f1(0x225)]{constructor(_0x5a385d,_0x1a9321,_0x366c1c,_0x26c569){const _0x4e1d9e=_0x2209f1;super(),this[_0x4e1d9e(0x1e5)]=_0x5a385d,this[_0x4e1d9e(0x23f)]=_0x1a9321,this[_0x4e1d9e(0x1d7)]=_0x366c1c,this[_0x4e1d9e(0x1d0)]=_0x26c569,this[_0x4e1d9e(0x1eb)](),this['_initUserSync']();}[_0x2209f1(0x211)](){const _0x4cf2ca=_0x2209f1;this[_0x4cf2ca(0x201)](this[_0x4cf2ca(0x23f)]['commentUpdate$']['pipe'](w[_0x4cf2ca(0x238)](0x10))['subscribe'](_0x5ec6fc=>{const _0x1c5177=_0x4cf2ca,_0x334758=new Set();_0x5ec6fc[_0x1c5177(0x1c1)](_0x48d93f=>{const _0x197bf4=_0x1c5177;switch(_0x48d93f[_0x197bf4(0x1ed)]){case _0x197bf4(0x1f8):{const _0x319e11=_0x48d93f[_0x197bf4(0x231)][_0x197bf4(0x220)];_0x334758['add'](_0x319e11);break;}}}),R(this[_0x1c5177(0x1d0)],_0x334758);}));}[_0x2209f1(0x1eb)](){const _0x380645=_0x2209f1;this[_0x380645(0x201)](this['_commentService']['commentUpdate$']['subscribe'](async _0xa47ded=>{const _0x4cc57a=_0x380645;var _0x38c42b,_0x5c5c90,_0x46c68a,_0xbd4737;const _0x41e8d0=(_0x38c42b=this['_threadCommentModel']['getUnit'](_0xa47ded[_0x4cc57a(0x1c7)])[_0x4cc57a(0x215)](_0x1c1c23=>_0x1c1c23[_0x4cc57a(0x22e)]===_0xa47ded['threadId']))==null?void 0x0:_0x38c42b[_0x4cc57a(0x1c8)];if(!_0x41e8d0)return;const {unitId:_0x522663,subUnitId:_0x4d412f}=_0x41e8d0;switch(_0xa47ded['user']&&this['_userService'][_0x4cc57a(0x1fd)](_0xa47ded[_0x4cc57a(0x228)]),_0xa47ded['type']){case v[_0x4cc57a(0x20d)]:break;case v[_0x4cc57a(0x239)]:{this[_0x4cc57a(0x23f)][_0x4cc57a(0x1ec)](_0x522663,_0x4d412f,{'unitId':_0x522663,'subUnitId':_0x4d412f,'ref':'','id':_0xa47ded['replyId'],'dT':f(+_0xa47ded[_0x4cc57a(0x241)]),'threadId':_0xa47ded['threadId'],'personId':(_0x46c68a=(_0x5c5c90=_0xa47ded[_0x4cc57a(0x228)])==null?void 0x0:_0x5c5c90[_0x4cc57a(0x1ca)])!=null?_0x46c68a:_0xa47ded['userId'],'text':JSON['parse'](_0xa47ded[_0x4cc57a(0x230)]),'parentId':_0x41e8d0['id']});break;}case v[_0x4cc57a(0x1fe)]:{const _0x3ef2f7=this[_0x4cc57a(0x23f)][_0x4cc57a(0x1ef)](_0x522663,_0x4d412f,_0xa47ded[_0x4cc57a(0x200)]);_0x3ef2f7&&_0x3ef2f7[_0x4cc57a(0x1d3)]&&this[_0x4cc57a(0x23f)]['deleteComment'](_0x522663,_0x4d412f,_0xa47ded[_0x4cc57a(0x200)]);break;}case v[_0x4cc57a(0x1da)]:{this['_threadCommentModel'][_0x4cc57a(0x1de)](_0x522663,_0x4d412f,{'commentId':_0xa47ded[_0x4cc57a(0x200)],'text':JSON[_0x4cc57a(0x1ce)](_0xa47ded['content'])});break;}case v['Solve']:{const _0x46bce2=(_0xbd4737=this[_0x4cc57a(0x23f)][_0x4cc57a(0x214)](_0xa47ded[_0x4cc57a(0x1c7)])[_0x4cc57a(0x215)](_0x4a3bb4=>_0x4a3bb4[_0x4cc57a(0x22e)]===_0xa47ded[_0x4cc57a(0x22e)]))==null?void 0x0:_0xbd4737[_0x4cc57a(0x1c8)];_0x46bce2&&this[_0x4cc57a(0x23f)][_0x4cc57a(0x20f)](_0x522663,_0x4d412f,_0x46bce2['id'],_0xa47ded[_0x4cc57a(0x204)]===I['Solved']);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x2209f1(0x224)])),S(0x1,c[_0x2209f1(0x1dd)](M[_0x2209f1(0x1e6)])),S(0x2,c['Inject'](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x2209f1(0x1cb)]))],p);const q=_0x2209f1(0x1f9),D={};function _0x518f(){const _0x392d98=['deleteComment','pluginName','Module','threadId','code','content','payload','rangeId','30wlawBw','merge','/universer-api/user/list','_threadCommentDataSourceService','length','bufferTime','Reply','_sessionService','@univerjs/network','/add','@univerjs/thread-comment','861oTxHco','_threadCommentModel','UniverLicensePlugin','createTimestamp','requireSession','forEach','CustomRangeType','getCurrentUser','error','1287780PHaJZr','resolved','unitId','root','dayjs','userID','Injector','comments','filter','parse','_configService','_injector','/universer-api/comment/unit/','OpenOrReOpen','parentId','_httpService','@univerjs-pro/collaboration-client','YYYY/MM/DD\x20HH:mm','_userService','rxjs','Plugin','Edit','_threadCommentDataSource','map','Inject','updateComment','format','35256ZYoHMJ','_initDataSource','defineProperty','stringify','getOwnPropertyDescriptor','_commentService','ThreadCommentModel','@univerjs/thread-comment-ui','1240nJKKwa','comment','slice','_init','addComment','type','Unknown','getComment','363njxZKQ','83tCXJEB','get','17330phszrT','HTTPService','UniverCollaborationClientPlugin','UNIVER_UNKNOWN','810276NQeylW','add','thread-comment-data-source.config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','toStringTag','users','addUser','Delete','/reply','replyId','disposeWithMe','onReady','post','solved','CollaborationSessionService','UserManagerService','symbol','234704OdghNC','rangeType','Solved','@univerjs/core','ref','Add','getMemberID','resolveComment','onStarting','_initUserSync','Solve','dataSource','getUnit','find','@univerjs-pro/license','setConfig','delete','5524870KVwVpY','userId','COMMENT','body','UNRECOGNIZED','_config','/delete','personId','58428MDpqKX','values','UniverThreadCommentDataSourcePlugin','CommentService','Disposable','replies','/list','user','customRanges','size'];_0x518f=function(){return _0x392d98;};return _0x518f();}var A=Object[_0x2209f1(0x1e4)],x=(_0x4cc99f,_0xf1e534,_0x588e8b,_0x24d51b)=>{const _0x46c2bc=_0x2209f1;for(var _0x28a3a6=_0x24d51b>0x1?void 0x0:_0x24d51b?A(_0xf1e534,_0x588e8b):_0xf1e534,_0x2c0b8a=_0x4cc99f[_0x46c2bc(0x237)]-0x1,_0x532bff;_0x2c0b8a>=0x0;_0x2c0b8a--)(_0x532bff=_0x4cc99f[_0x2c0b8a])&&(_0x28a3a6=_0x532bff(_0x28a3a6)||_0x28a3a6);return _0x28a3a6;},_=(_0x2a3aa0,_0x29072b)=>(_0x5db34b,_0x571dd8)=>_0x29072b(_0x5db34b,_0x571dd8,_0x2a3aa0);function Y(_0x563a70,_0x2d3b0a){const _0x42c41e=_0x2209f1,_0x2af1ee=_0x563a70[_0x42c41e(0x226)][0x0];return{..._0x2d3b0a,'id':_0x2af1ee[_0x42c41e(0x200)],'resolved':_0x563a70[_0x42c41e(0x204)]===0x1,'dT':f(_0x2af1ee[_0x42c41e(0x241)]),'personId':_0x2af1ee[_0x42c41e(0x21a)],'threadId':_0x2af1ee[_0x42c41e(0x22e)]};}function G(_0x1e8af6,_0x2da984,_0x2401a6){const _0x17f71a=_0x2209f1;var _0x462188,_0x5dcd82;if(((_0x5dcd82=(_0x462188=_0x1e8af6==null?void 0x0:_0x1e8af6[_0x17f71a(0x226)])==null?void 0x0:_0x462188['length'])!=null?_0x5dcd82:0x0)>0x0){const _0xdabd47=(_0x4f78cd,_0xbfad0b)=>({'id':_0x4f78cd[_0x17f71a(0x200)],'threadId':_0x4f78cd[_0x17f71a(0x22e)],'dT':f(_0x4f78cd['createTimestamp']),'personId':_0x4f78cd[_0x17f71a(0x21a)],'resolved':_0x1e8af6[_0x17f71a(0x204)]===I[_0x17f71a(0x20a)],'unitId':_0x2da984,'subUnitId':_0x2401a6,'text':JSON[_0x17f71a(0x1ce)](_0x4f78cd[_0x17f71a(0x230)]),'parentId':_0xbfad0b}),_0x4f8a1e=_0xdabd47(_0x1e8af6['replies'][0x0]);return{..._0x4f8a1e,'children':_0x1e8af6[_0x17f71a(0x226)][_0x17f71a(0x1ea)](0x1)[_0x17f71a(0x1dc)](_0x30537a=>_0xdabd47(_0x30537a,_0x4f8a1e['id']))};}return null;}let g=class{constructor(_0x47bc5a,_0x32436c,_0xa35a36,_0x254cc2){const _0x45b965=_0x2209f1;this[_0x45b965(0x1d4)]=_0x47bc5a,this[_0x45b965(0x1d7)]=_0x32436c,this[_0x45b965(0x23a)]=_0xa35a36,this[_0x45b965(0x1d0)]=_0x254cc2;}async[_0x2209f1(0x1ec)](_0x1d650e){const _0x17a954=_0x2209f1;var _0x17863e,_0x5bf17b;const {parentId:_0x400602,unitId:_0x2523e8,text:_0x374922,threadId:_0x34f0be}=_0x1d650e,_0x25540a=(_0x5bf17b=(_0x17863e=_0x374922['customRanges'])==null?void 0x0:_0x17863e[_0x17a954(0x1cd)](_0x2c4e58=>_0x2c4e58[_0x17a954(0x209)]===c[_0x17a954(0x1c2)]['COMMENT'])[_0x17a954(0x1dc)](_0x3e9366=>_0x3e9366[_0x17a954(0x232)]))!=null?_0x5bf17b:[],_0x47c473=JSON[_0x17a954(0x1e3)](_0x374922),_0x4bcdf4=(await this['_sessionService']['requireSession'](_0x2523e8))[_0x17a954(0x20e)]();if(_0x400602){const _0x16e8d6={'memberId':_0x4bcdf4,'unitId':_0x2523e8,'content':_0x47c473,'mention':_0x25540a,'threadId':_0x34f0be},_0x3c3431=(await this[_0x17a954(0x1d4)][_0x17a954(0x203)](_0x17a954(0x1d1)+_0x2523e8+_0x17a954(0x1ff),{'body':_0x16e8d6}))['body']['reply'];return{..._0x1d650e,'id':_0x3c3431['replyId'],'dT':c[_0x17a954(0x1c9)](+_0x3c3431[_0x17a954(0x241)])[_0x17a954(0x1df)](_0x17a954(0x1d6)),'personId':_0x3c3431[_0x17a954(0x21a)]};}else{const _0xba9307={'memberId':_0x4bcdf4,'unitId':_0x2523e8,'content':_0x47c473,'mention':_0x25540a},_0x354c23=await this[_0x17a954(0x1d4)][_0x17a954(0x203)](_0x17a954(0x1d1)+_0x2523e8+_0x17a954(0x23c),{'body':_0xba9307});return Y(_0x354c23[_0x17a954(0x21c)][_0x17a954(0x1e9)],_0x1d650e);}}async[_0x2209f1(0x1de)](_0x42069d){const _0x23c618=_0x2209f1;var _0x11e3f9,_0x1c6893;const {text:_0x4982a2,unitId:_0x43ed5d}=_0x42069d,_0x131a12=(_0x1c6893=(_0x11e3f9=_0x4982a2[_0x23c618(0x229)])==null?void 0x0:_0x11e3f9[_0x23c618(0x1cd)](_0x3f2193=>_0x3f2193['rangeType']===c[_0x23c618(0x1c2)][_0x23c618(0x21b)])['map'](_0x61d6f4=>_0x61d6f4['rangeId']))!=null?_0x1c6893:[],_0x5c6e23=JSON[_0x23c618(0x1e3)](_0x4982a2),_0x2d7fd7=_0x42069d['threadId'],_0x1224d2=_0x42069d['id'],_0x5061b2={'memberId':(await this['_sessionService'][_0x23c618(0x242)](_0x43ed5d))[_0x23c618(0x20e)](),'unitId':_0x43ed5d,'threadId':_0x2d7fd7,'mention':_0x131a12,'content':_0x5c6e23,'replyId':_0x1224d2},_0xaf8129=await this[_0x23c618(0x1d4)][_0x23c618(0x203)]('/universer-api/comment/unit/'+_0x43ed5d+'/edit',{'body':_0x5061b2});return!_0xaf8129[_0x23c618(0x21c)][_0x23c618(0x1c4)]||_0xaf8129[_0x23c618(0x21c)][_0x23c618(0x1c4)][_0x23c618(0x22f)]===0x1;}async[_0x2209f1(0x20f)](_0x187c67){const _0x43522d=_0x2209f1,{unitId:_0x140174}=_0x187c67,_0x50aff9=_0x187c67[_0x43522d(0x22e)],_0x2f8e83={'memberId':this[_0x43522d(0x1d7)][_0x43522d(0x1c3)]()[_0x43522d(0x1ca)],'unitId':_0x140174,'threadId':_0x50aff9,'solved':_0x187c67[_0x43522d(0x1c6)]?I['Solved']:I[_0x43522d(0x1d2)]},_0xd282e5=await this['_httpService'][_0x43522d(0x203)]('/universer-api/comment/unit/'+_0x140174+'/solved',{'body':_0x2f8e83});return!_0xd282e5[_0x43522d(0x21c)][_0x43522d(0x1c4)]||_0xd282e5[_0x43522d(0x21c)][_0x43522d(0x1c4)]['code']===0x1;}async[_0x2209f1(0x22b)](_0x3f78d6,_0xea6414,_0x406c0c,_0x3c0dc5){const _0x447c9e=_0x2209f1,_0x1ed725={'memberId':(await this[_0x447c9e(0x23a)][_0x447c9e(0x242)](_0x3f78d6))[_0x447c9e(0x20e)](),'threadId':_0x406c0c,'replyId':_0x3c0dc5,'unitId':_0x3f78d6},_0x19203b=await this[_0x447c9e(0x1d4)][_0x447c9e(0x203)](_0x447c9e(0x1d1)+_0x3f78d6+_0x447c9e(0x21f),{'body':_0x1ed725});return!_0x19203b['body']['error']||_0x19203b[_0x447c9e(0x21c)]['error'][_0x447c9e(0x22f)]===0x1;}async['listComments'](_0x3e7223,_0x37bc45,_0x3b6831){const _0x313c87=_0x2209f1,_0x57dd77={'unitId':_0x3e7223,'threadId':_0x3b6831},_0x1e4ac6=await this[_0x313c87(0x1d4)][_0x313c87(0x203)](_0x313c87(0x1d1)+_0x3e7223+_0x313c87(0x227),{'body':_0x57dd77}),_0x3ba46c=_0x3b6831['map'](_0x21ed0f=>G(_0x1e4ac6[_0x313c87(0x21c)][_0x313c87(0x1cc)][_0x21ed0f],_0x3e7223,_0x37bc45))['filter'](Boolean);return Object[_0x313c87(0x222)](_0x1e4ac6[_0x313c87(0x21c)][_0x313c87(0x1fc)])[_0x313c87(0x1c1)](_0x1f8876=>{const _0x1fde9d=_0x313c87;this[_0x1fde9d(0x1d7)][_0x1fde9d(0x1fd)](_0x1f8876);}),_0x3ba46c;}['saveCommentToSnapshot'](_0x270f98){const _0x3b6adb=_0x2209f1;return{'id':_0x270f98['id'],'threadId':_0x270f98[_0x3b6adb(0x22e)],'ref':_0x270f98[_0x3b6adb(0x20c)]};}};g=x([_(0x0,c[_0x2209f1(0x1dd)](P[_0x2209f1(0x1f4)])),_(0x1,c[_0x2209f1(0x1dd)](c['UserManagerService'])),_(0x2,c[_0x2209f1(0x1dd)](b[_0x2209f1(0x205)])),_(0x3,c[_0x2209f1(0x1dd)](c[_0x2209f1(0x1cb)]))],g);var H=Object[_0x2209f1(0x1e4)],J=(_0xeb7cf0,_0x1632a0,_0x5d7b84,_0x58d44b)=>{const _0x408892=_0x2209f1;for(var _0x78bf58=_0x58d44b>0x1?void 0x0:_0x58d44b?H(_0x1632a0,_0x5d7b84):_0x1632a0,_0x7b00dc=_0xeb7cf0[_0x408892(0x237)]-0x1,_0x384e3a;_0x7b00dc>=0x0;_0x7b00dc--)(_0x384e3a=_0xeb7cf0[_0x7b00dc])&&(_0x78bf58=_0x384e3a(_0x78bf58)||_0x78bf58);return _0x78bf58;},y=(_0x622d77,_0x4a15d2)=>(_0x403b3b,_0xb323e7)=>_0x4a15d2(_0x403b3b,_0xb323e7,_0x622d77);let C=class extends c[_0x2209f1(0x225)]{constructor(_0x1164e0,_0x49a211){const _0x105516=_0x2209f1;super(),this[_0x105516(0x236)]=_0x1164e0,this[_0x105516(0x1db)]=_0x49a211,this['_initDataSource']();}[_0x2209f1(0x1e1)](){const _0xe843e6=_0x2209f1;this['_threadCommentDataSourceService'][_0xe843e6(0x213)]=this[_0xe843e6(0x1db)],this[_0xe843e6(0x236)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x2209f1(0x1dd)](g))],C);var F=Object[_0x2209f1(0x1e2)],L=Object['getOwnPropertyDescriptor'],Z=(_0x12c794,_0x59caf8,_0xc661bc)=>_0x59caf8 in _0x12c794?F(_0x12c794,_0x59caf8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xc661bc}):_0x12c794[_0x59caf8]=_0xc661bc,W=(_0x30c71c,_0x9d881c,_0x1786a0,_0x8483cf)=>{for(var _0x12ae6a=_0x8483cf>0x1?void 0x0:_0x8483cf?L(_0x9d881c,_0x1786a0):_0x9d881c,_0xe0e8a2=_0x30c71c['length']-0x1,_0x25c4b6;_0xe0e8a2>=0x0;_0xe0e8a2--)(_0x25c4b6=_0x30c71c[_0xe0e8a2])&&(_0x12ae6a=_0x25c4b6(_0x12ae6a)||_0x12ae6a);return _0x12ae6a;},O=(_0x3af0e0,_0x21cdd9)=>(_0xb53421,_0x274087)=>_0x21cdd9(_0xb53421,_0x274087,_0x3af0e0),N=(_0xc28c65,_0xa3f2f7,_0x58f240)=>Z(_0xc28c65,typeof _0xa3f2f7!=_0x2209f1(0x207)?_0xa3f2f7+'':_0xa3f2f7,_0x58f240);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x2209f1(0x1d9)]{constructor(_0x125b99=D,_0x3d2370,_0x390738){const _0x429945=_0x2209f1;super(),this['_config']=_0x125b99,this[_0x429945(0x1d0)]=_0x3d2370,this[_0x429945(0x1cf)]=_0x390738;const {..._0x503339}=c[_0x429945(0x234)]({},D,this[_0x429945(0x21e)]);this[_0x429945(0x1cf)][_0x429945(0x217)](q,_0x503339);}[_0x2209f1(0x210)](){const _0x1a1c21=_0x2209f1;[[g],[C],[p]][_0x1a1c21(0x1c1)](_0x448f3f=>{const _0x1001b0=_0x1a1c21;this[_0x1001b0(0x1d0)]['add'](_0x448f3f);});}[_0x2209f1(0x202)](){const _0x2dd933=_0x2209f1;this['_injector']['get'](C),this[_0x2dd933(0x1d0)][_0x2dd933(0x1f2)](p);}},N(exports[_0x2209f1(0x223)],_0x2209f1(0x22c),U),N(exports[_0x2209f1(0x223)],'type',c['UniverInstanceType'][_0x2209f1(0x1f6)]),exports[_0x2209f1(0x223)]=W([c['DependentOn'](j['UniverThreadCommentUIPlugin'],b[_0x2209f1(0x1f5)],T[_0x2209f1(0x240)]),O(0x1,c[_0x2209f1(0x1dd)](c[_0x2209f1(0x1cb)])),O(0x2,c['IConfigService'])],exports[_0x2209f1(0x223)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x5f5545=_0x1831;(function(_0x1eb6dc,_0x5de806){const _0x335203=_0x1831,_0x5086e1=_0x1eb6dc();while(!![]){try{const _0x22987a=-parseInt(_0x335203(0xc3))/0x1*(parseInt(_0x335203(0x91))/0x2)+-parseInt(_0x335203(0xb0))/0x3*(parseInt(_0x335203(0xa5))/0x4)+-parseInt(_0x335203(0xeb))/0x5+-parseInt(_0x335203(0xbd))/0x6+parseInt(_0x335203(0xcb))/0x7+parseInt(_0x335203(0xab))/0x8+parseInt(_0x335203(0xad))/0x9*(parseInt(_0x335203(0xf1))/0xa);if(_0x22987a===_0x5de806)break;else _0x5086e1['push'](_0x5086e1['shift']());}catch(_0x481641){_0x5086e1['push'](_0x5086e1['shift']());}}}(_0x4695,0x4d4f0));import{CommentService as _0x15a9b5,CollaborationSessionService as _0x500a18,UniverCollaborationClientPlugin as _0x2ffb99}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x42875c}from'@univerjs-pro/license';import{dayjs as _0x48433f,UserManagerService as _0x25f664,Inject as _0x40680a,Injector as _0x57ef01,Disposable as _0x272377,CustomRangeType as _0x2b2672,UniverInstanceType as _0x408419,DependentOn as _0x2c6962,IConfigService as _0x3260d3,Plugin as _0x43489b,merge as _0x32f219}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3407d6}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5e5ade,IThreadCommentDataSourceService as _0xf97d9d}from'@univerjs/thread-comment';import{bufferTime as _0x2add9b}from'rxjs';import{HTTPService as _0x470e80}from'@univerjs/network';const W=_0x5f5545(0xae);function _0x1831(_0x481add,_0x451078){const _0x469514=_0x4695();return _0x1831=function(_0x183183,_0x4a9da1){_0x183183=_0x183183-0x8f;let _0xb00138=_0x469514[_0x183183];return _0xb00138;},_0x1831(_0x481add,_0x451078);}var I=(_0x2a67c7=>(_0x2a67c7[_0x2a67c7[_0x5f5545(0x9c)]=0x0]='OpenOrReOpen',_0x2a67c7[_0x2a67c7[_0x5f5545(0x9d)]=0x1]=_0x5f5545(0x9d),_0x2a67c7[_0x2a67c7['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2a67c7))(I||{}),v=(_0x16f714=>(_0x16f714[_0x16f714[_0x5f5545(0xb6)]=0x0]=_0x5f5545(0xb6),_0x16f714[_0x16f714['Add']=0x1]='Add',_0x16f714[_0x16f714['Reply']=0x2]=_0x5f5545(0xd0),_0x16f714[_0x16f714[_0x5f5545(0x92)]=0x3]=_0x5f5545(0x92),_0x16f714[_0x16f714[_0x5f5545(0x94)]=0x4]=_0x5f5545(0x94),_0x16f714[_0x16f714[_0x5f5545(0xde)]=0x5]='Solve',_0x16f714[_0x16f714[_0x5f5545(0x8f)]=-0x1]=_0x5f5545(0x8f),_0x16f714))(v||{});const D=_0xc1d100=>_0x48433f(new Date(+_0xc1d100))[_0x5f5545(0xa6)](_0x5f5545(0xb1)),B=async(_0x2a49cb,_0x53c868)=>{const _0x16b647=_0x5f5545,_0x231d78=_0x2a49cb[_0x16b647(0xc5)](_0x25f664),_0x85d9e5=_0x2a49cb['get'](_0x470e80);_0x53c868[_0x16b647(0xef)](_0x385ef3=>{const _0x52ed65=_0x16b647;_0x231d78[_0x52ed65(0xe9)](_0x385ef3)&&_0x53c868[_0x52ed65(0xb2)](_0x385ef3);}),_0x53c868['size']&&(await _0x85d9e5['get'](_0x16b647(0xe6),{'params':{'userIDs':[..._0x53c868]}}))[_0x16b647(0xb3)]['users'][_0x16b647(0xef)](_0x1e90fd=>{const _0x19075c=_0x16b647;_0x1e90fd&&_0x231d78[_0x19075c(0xd9)](_0x1e90fd);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2c349b,_0x5887a2,_0x4fdd97,_0x2988da)=>{for(var _0x237d11=_0x2988da>0x1?void 0x0:_0x2988da?K(_0x5887a2,_0x4fdd97):_0x5887a2,_0x512315=_0x2c349b['length']-0x1,_0x44b818;_0x512315>=0x0;_0x512315--)(_0x44b818=_0x2c349b[_0x512315])&&(_0x237d11=_0x44b818(_0x237d11)||_0x237d11);return _0x237d11;},p=(_0x151ad7,_0xc5ce70)=>(_0x2a1fec,_0x1ee09f)=>_0xc5ce70(_0x2a1fec,_0x1ee09f,_0x151ad7);let S=class extends _0x272377{constructor(_0x69d3d5,_0x1884d3,_0x3b4d93,_0x4c6a7b){const _0x14e4b9=_0x5f5545;super(),this[_0x14e4b9(0xdb)]=_0x69d3d5,this['_threadCommentModel']=_0x1884d3,this[_0x14e4b9(0xe3)]=_0x3b4d93,this['_injector']=_0x4c6a7b,this[_0x14e4b9(0xbc)](),this[_0x14e4b9(0x96)]();}[_0x5f5545(0x96)](){const _0x516eed=_0x5f5545;this[_0x516eed(0xbb)](this['_threadCommentModel']['commentUpdate$'][_0x516eed(0xa4)](_0x2add9b(0x10))['subscribe'](_0x1d57ab=>{const _0x56d4e1=_0x516eed,_0x1d3825=new Set();_0x1d57ab[_0x56d4e1(0xef)](_0x238a85=>{const _0x17231d=_0x56d4e1;switch(_0x238a85[_0x17231d(0xa0)]){case _0x17231d(0xa8):{const _0x5dfb2b=_0x238a85[_0x17231d(0xb9)][_0x17231d(0xe7)];_0x1d3825[_0x17231d(0xa8)](_0x5dfb2b);break;}}}),B(this['_injector'],_0x1d3825);}));}[_0x5f5545(0xbc)](){const _0x569450=_0x5f5545;this['disposeWithMe'](this['_commentService']['commentUpdate$'][_0x569450(0xb8)](async _0x3528fc=>{const _0xde0344=_0x569450;var _0x1b8409,_0x4e1602,_0x16706b,_0x3b6e32;const _0x2389f0=(_0x1b8409=this['_threadCommentModel']['getUnit'](_0x3528fc[_0xde0344(0xd1)])[_0xde0344(0xa7)](_0xd1a1bb=>_0xd1a1bb['threadId']===_0x3528fc[_0xde0344(0xba)]))==null?void 0x0:_0x1b8409[_0xde0344(0x9b)];if(!_0x2389f0)return;const {unitId:_0x2b8a39,subUnitId:_0x3700b5}=_0x2389f0;switch(_0x3528fc[_0xde0344(0xdd)]&&this[_0xde0344(0xe3)][_0xde0344(0xd9)](_0x3528fc[_0xde0344(0xdd)]),_0x3528fc['type']){case v['Add']:break;case v['Reply']:{this[_0xde0344(0xdf)][_0xde0344(0xd6)](_0x2b8a39,_0x3700b5,{'unitId':_0x2b8a39,'subUnitId':_0x3700b5,'ref':'','id':_0x3528fc['replyId'],'dT':D(+_0x3528fc[_0xde0344(0xd4)]),'threadId':_0x3528fc['threadId'],'personId':(_0x16706b=(_0x4e1602=_0x3528fc[_0xde0344(0xdd)])==null?void 0x0:_0x4e1602['userID'])!=null?_0x16706b:_0x3528fc[_0xde0344(0xc8)],'text':JSON[_0xde0344(0x93)](_0x3528fc[_0xde0344(0xaa)]),'parentId':_0x2389f0['id']});break;}case v[_0xde0344(0x94)]:{const _0x3263d4=this[_0xde0344(0xdf)][_0xde0344(0xd8)](_0x2b8a39,_0x3700b5,_0x3528fc[_0xde0344(0xac)]);_0x3263d4&&_0x3263d4['parentId']&&this[_0xde0344(0xdf)][_0xde0344(0x97)](_0x2b8a39,_0x3700b5,_0x3528fc[_0xde0344(0xac)]);break;}case v[_0xde0344(0x92)]:{this['_threadCommentModel'][_0xde0344(0xcd)](_0x2b8a39,_0x3700b5,{'commentId':_0x3528fc[_0xde0344(0xac)],'text':JSON[_0xde0344(0x93)](_0x3528fc[_0xde0344(0xaa)])});break;}case v[_0xde0344(0xde)]:{const _0x2f3532=(_0x3b6e32=this[_0xde0344(0xdf)]['getUnit'](_0x3528fc['unitId'])[_0xde0344(0xa7)](_0x5d27b2=>_0x5d27b2[_0xde0344(0xba)]===_0x3528fc[_0xde0344(0xba)]))==null?void 0x0:_0x3b6e32[_0xde0344(0x9b)];_0x2f3532&&this[_0xde0344(0xdf)]['resolveComment'](_0x2b8a39,_0x3700b5,_0x2f3532['id'],_0x3528fc['solved']===I[_0xde0344(0x9d)]);break;}}}));}};S=V([p(0x0,_0x40680a(_0x15a9b5)),p(0x1,_0x40680a(_0x5e5ade)),p(0x2,_0x40680a(_0x25f664)),p(0x3,_0x40680a(_0x57ef01))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x5f5545(0xc1)],Q=(_0x34d57d,_0x36d811,_0x4fdc03,_0x241a19)=>{for(var _0x17ce6a=_0x241a19>0x1?void 0x0:_0x241a19?k(_0x36d811,_0x4fdc03):_0x36d811,_0x3a7411=_0x34d57d['length']-0x1,_0x181bfe;_0x3a7411>=0x0;_0x3a7411--)(_0x181bfe=_0x34d57d[_0x3a7411])&&(_0x17ce6a=_0x181bfe(_0x17ce6a)||_0x17ce6a);return _0x17ce6a;},_=(_0x55136f,_0x1a4648)=>(_0x194e55,_0x33710f)=>_0x1a4648(_0x194e55,_0x33710f,_0x55136f);function X(_0x3956ba,_0x8b482d){const _0x54c237=_0x5f5545,_0x5df23e=_0x3956ba[_0x54c237(0xc6)][0x0];return{..._0x8b482d,'id':_0x5df23e[_0x54c237(0xac)],'resolved':_0x3956ba[_0x54c237(0xb4)]===0x1,'dT':D(_0x5df23e[_0x54c237(0xd4)]),'personId':_0x5df23e[_0x54c237(0xc8)],'threadId':_0x5df23e[_0x54c237(0xba)]};}function ee(_0x369cf,_0x4b7f75,_0x6cea36){const _0x345c25=_0x5f5545;var _0x371ae6,_0x3c41ee;if(((_0x3c41ee=(_0x371ae6=_0x369cf==null?void 0x0:_0x369cf[_0x345c25(0xc6)])==null?void 0x0:_0x371ae6[_0x345c25(0x9f)])!=null?_0x3c41ee:0x0)>0x0){const _0x2d070e=(_0x8a14db,_0x16d296)=>({'id':_0x8a14db[_0x345c25(0xac)],'threadId':_0x8a14db['threadId'],'dT':D(_0x8a14db[_0x345c25(0xd4)]),'personId':_0x8a14db[_0x345c25(0xc8)],'resolved':_0x369cf[_0x345c25(0xb4)]===I[_0x345c25(0x9d)],'unitId':_0x4b7f75,'subUnitId':_0x6cea36,'text':JSON[_0x345c25(0x93)](_0x8a14db[_0x345c25(0xaa)]),'parentId':_0x16d296}),_0x2e7fc1=_0x2d070e(_0x369cf[_0x345c25(0xc6)][0x0]);return{..._0x2e7fc1,'children':_0x369cf[_0x345c25(0xc6)][_0x345c25(0xe4)](0x1)[_0x345c25(0xce)](_0x11a7c8=>_0x2d070e(_0x11a7c8,_0x2e7fc1['id']))};}return null;}let f=class{constructor(_0x4f6ac7,_0x5b5df2,_0x337650,_0x47dbad){const _0x55f29d=_0x5f5545;this[_0x55f29d(0x98)]=_0x4f6ac7,this[_0x55f29d(0xe3)]=_0x5b5df2,this[_0x55f29d(0xf0)]=_0x337650,this[_0x55f29d(0xe1)]=_0x47dbad;}async[_0x5f5545(0xd6)](_0x2c6d25){const _0x5a447d=_0x5f5545;var _0x26db16,_0xf3a1cf;const {parentId:_0x41dbd0,unitId:_0x3788a5,text:_0x2093c5,threadId:_0x13707a}=_0x2c6d25,_0x456d67=(_0xf3a1cf=(_0x26db16=_0x2093c5[_0x5a447d(0xa9)])==null?void 0x0:_0x26db16[_0x5a447d(0xc7)](_0x32fa4d=>_0x32fa4d[_0x5a447d(0xe0)]===_0x2b2672['COMMENT'])[_0x5a447d(0xce)](_0x7f2307=>_0x7f2307[_0x5a447d(0xcf)]))!=null?_0xf3a1cf:[],_0x394ffb=JSON[_0x5a447d(0xf2)](_0x2093c5),_0x55e8f6=(await this[_0x5a447d(0xf0)][_0x5a447d(0xb5)](_0x3788a5))[_0x5a447d(0xc0)]();if(_0x41dbd0){const _0x19970a={'memberId':_0x55e8f6,'unitId':_0x3788a5,'content':_0x394ffb,'mention':_0x456d67,'threadId':_0x13707a},_0x18c3ff=(await this[_0x5a447d(0x98)]['post'](_0x5a447d(0xec)+_0x3788a5+'/reply',{'body':_0x19970a}))[_0x5a447d(0xb3)][_0x5a447d(0x90)];return{..._0x2c6d25,'id':_0x18c3ff[_0x5a447d(0xac)],'dT':_0x48433f(+_0x18c3ff[_0x5a447d(0xd4)])[_0x5a447d(0xa6)](_0x5a447d(0xb1)),'personId':_0x18c3ff['userId']};}else{const _0x2d6d65={'memberId':_0x55e8f6,'unitId':_0x3788a5,'content':_0x394ffb,'mention':_0x456d67},_0x100e62=await this[_0x5a447d(0x98)]['post']('/universer-api/comment/unit/'+_0x3788a5+_0x5a447d(0xd5),{'body':_0x2d6d65});return X(_0x100e62[_0x5a447d(0xb3)][_0x5a447d(0xd3)],_0x2c6d25);}}async[_0x5f5545(0xcd)](_0x4ae5b4){const _0x372399=_0x5f5545;var _0x595a1b,_0x28b748;const {text:_0x4e05b3,unitId:_0x469f2c}=_0x4ae5b4,_0x3b5016=(_0x28b748=(_0x595a1b=_0x4e05b3[_0x372399(0xa9)])==null?void 0x0:_0x595a1b[_0x372399(0xc7)](_0x33a85a=>_0x33a85a[_0x372399(0xe0)]===_0x2b2672[_0x372399(0xa1)])[_0x372399(0xce)](_0x1186ee=>_0x1186ee[_0x372399(0xcf)]))!=null?_0x28b748:[],_0x5b9f30=JSON['stringify'](_0x4e05b3),_0x59e1c4=_0x4ae5b4[_0x372399(0xba)],_0xc72f0d=_0x4ae5b4['id'],_0x55d1d0={'memberId':(await this[_0x372399(0xf0)]['requireSession'](_0x469f2c))[_0x372399(0xc0)](),'unitId':_0x469f2c,'threadId':_0x59e1c4,'mention':_0x3b5016,'content':_0x5b9f30,'replyId':_0xc72f0d},_0x2dd45f=await this['_httpService'][_0x372399(0xd2)](_0x372399(0xec)+_0x469f2c+'/edit',{'body':_0x55d1d0});return!_0x2dd45f[_0x372399(0xb3)][_0x372399(0xd7)]||_0x2dd45f[_0x372399(0xb3)][_0x372399(0xd7)][_0x372399(0xb7)]===0x1;}async[_0x5f5545(0xdc)](_0x425b99){const _0x363dc4=_0x5f5545,{unitId:_0x47f27f}=_0x425b99,_0x5862e7=_0x425b99[_0x363dc4(0xba)],_0x323139={'memberId':this[_0x363dc4(0xe3)][_0x363dc4(0xee)]()['userID'],'unitId':_0x47f27f,'threadId':_0x5862e7,'solved':_0x425b99[_0x363dc4(0x95)]?I[_0x363dc4(0x9d)]:I[_0x363dc4(0x9c)]},_0x2b33e5=await this[_0x363dc4(0x98)][_0x363dc4(0xd2)](_0x363dc4(0xec)+_0x47f27f+_0x363dc4(0xbe),{'body':_0x323139});return!_0x2b33e5[_0x363dc4(0xb3)][_0x363dc4(0xd7)]||_0x2b33e5[_0x363dc4(0xb3)][_0x363dc4(0xd7)]['code']===0x1;}async[_0x5f5545(0x97)](_0x5883ba,_0x54c3bd,_0x22f0d3,_0x569f0d){const _0x48f910=_0x5f5545,_0x34b05a={'memberId':(await this['_sessionService']['requireSession'](_0x5883ba))[_0x48f910(0xc0)](),'threadId':_0x22f0d3,'replyId':_0x569f0d,'unitId':_0x5883ba},_0x591e34=await this[_0x48f910(0x98)][_0x48f910(0xd2)]('/universer-api/comment/unit/'+_0x5883ba+_0x48f910(0xe2),{'body':_0x34b05a});return!_0x591e34[_0x48f910(0xb3)][_0x48f910(0xd7)]||_0x591e34[_0x48f910(0xb3)][_0x48f910(0xd7)][_0x48f910(0xb7)]===0x1;}async['listComments'](_0x33333f,_0x545a05,_0x35d1f1){const _0x52d7e1=_0x5f5545,_0x39a092={'unitId':_0x33333f,'threadId':_0x35d1f1},_0x2d3a40=await this['_httpService'][_0x52d7e1(0xd2)](_0x52d7e1(0xec)+_0x33333f+_0x52d7e1(0xda),{'body':_0x39a092}),_0x239596=_0x35d1f1[_0x52d7e1(0xce)](_0x1920a0=>ee(_0x2d3a40['body']['comments'][_0x1920a0],_0x33333f,_0x545a05))[_0x52d7e1(0xc7)](Boolean);return Object[_0x52d7e1(0x99)](_0x2d3a40[_0x52d7e1(0xb3)][_0x52d7e1(0xc9)])[_0x52d7e1(0xef)](_0x2d69ff=>{const _0x2cc1ce=_0x52d7e1;this['_userService'][_0x2cc1ce(0xd9)](_0x2d69ff);}),_0x239596;}[_0x5f5545(0xca)](_0x2cdc3a){const _0x55e12a=_0x5f5545;return{'id':_0x2cdc3a['id'],'threadId':_0x2cdc3a['threadId'],'ref':_0x2cdc3a[_0x55e12a(0xa3)]};}};f=Q([_(0x0,_0x40680a(_0x470e80)),_(0x1,_0x40680a(_0x25f664)),_(0x2,_0x40680a(_0x500a18)),_(0x3,_0x40680a(_0x57ef01))],f);var re=Object[_0x5f5545(0xc1)],te=(_0x3cc6a9,_0x5bd1c1,_0xe8b522,_0x419de4)=>{const _0x2eee61=_0x5f5545;for(var _0x587ff7=_0x419de4>0x1?void 0x0:_0x419de4?re(_0x5bd1c1,_0xe8b522):_0x5bd1c1,_0x3128aa=_0x3cc6a9[_0x2eee61(0x9f)]-0x1,_0x3f195e;_0x3128aa>=0x0;_0x3128aa--)(_0x3f195e=_0x3cc6a9[_0x3128aa])&&(_0x587ff7=_0x3f195e(_0x587ff7)||_0x587ff7);return _0x587ff7;},N=(_0x27b4ca,_0x17e376)=>(_0x1d33e2,_0x2a1fe7)=>_0x17e376(_0x1d33e2,_0x2a1fe7,_0x27b4ca);let g=class extends _0x272377{constructor(_0xc98618,_0x24a201){const _0x55ea7f=_0x5f5545;super(),this[_0x55ea7f(0xc4)]=_0xc98618,this['_threadCommentDataSource']=_0x24a201,this[_0x55ea7f(0xe8)]();}[_0x5f5545(0xe8)](){const _0x4a5051=_0x5f5545;this[_0x4a5051(0xc4)][_0x4a5051(0xed)]=this[_0x4a5051(0xe5)],this['_threadCommentDataSourceService'][_0x4a5051(0x9a)]=!0x1;}};g=te([N(0x0,_0xf97d9d),N(0x1,_0x40680a(f))],g);var se=Object[_0x5f5545(0xcc)],oe=Object[_0x5f5545(0xc1)],ne=(_0x36d24d,_0x17dc88,_0x225aba)=>_0x17dc88 in _0x36d24d?se(_0x36d24d,_0x17dc88,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x225aba}):_0x36d24d[_0x17dc88]=_0x225aba,ie=(_0x42ca3a,_0x15b84c,_0x3473d2,_0x16a8ae)=>{const _0x27f953=_0x5f5545;for(var _0x4aff39=_0x16a8ae>0x1?void 0x0:_0x16a8ae?oe(_0x15b84c,_0x3473d2):_0x15b84c,_0x4be5d5=_0x42ca3a[_0x27f953(0x9f)]-0x1,_0x2c9e73;_0x4be5d5>=0x0;_0x4be5d5--)(_0x2c9e73=_0x42ca3a[_0x4be5d5])&&(_0x4aff39=_0x2c9e73(_0x4aff39)||_0x4aff39);return _0x4aff39;},w=(_0x5a96ae,_0x191494)=>(_0x3bf13d,_0x5b50aa)=>_0x191494(_0x3bf13d,_0x5b50aa,_0x5a96ae),$=(_0x7b1bc6,_0x3a5f6b,_0x1445ae)=>ne(_0x7b1bc6,typeof _0x3a5f6b!=_0x5f5545(0xea)?_0x3a5f6b+'':_0x3a5f6b,_0x1445ae);let b=class extends _0x43489b{constructor(_0x7cb831=M,_0x427f97,_0x3ff48d){const _0x6107da=_0x5f5545;super(),this[_0x6107da(0xa2)]=_0x7cb831,this[_0x6107da(0xe1)]=_0x427f97,this['_configService']=_0x3ff48d;const {..._0x257046}=_0x32f219({},M,this[_0x6107da(0xa2)]);this[_0x6107da(0xbf)][_0x6107da(0xc2)](z,_0x257046);}[_0x5f5545(0xaf)](){[[f],[g],[S]]['forEach'](_0x20913b=>{this['_injector']['add'](_0x20913b);});}[_0x5f5545(0x9e)](){const _0x31ad69=_0x5f5545;this[_0x31ad69(0xe1)][_0x31ad69(0xc5)](g),this['_injector'][_0x31ad69(0xc5)](S);}};$(b,'pluginName',W),$(b,_0x5f5545(0xa0),_0x408419['UNIVER_UNKNOWN']),b=ie([_0x2c6962(_0x3407d6,_0x2ffb99,_0x42875c),w(0x1,_0x40680a(_0x57ef01)),w(0x2,_0x3260d3)],b);export{b as UniverThreadCommentDataSourcePlugin};function _0x4695(){const _0x1cf8df=['dataSource','getCurrentUser','forEach','_sessionService','12130dWJNmV','stringify','UNRECOGNIZED','reply','458xeYoVm','Edit','parse','Delete','resolved','_initUserSync','deleteComment','_httpService','values','syncUpdateMutationToColla','root','OpenOrReOpen','Solved','onReady','length','type','COMMENT','_config','ref','pipe','1842664ykFBRW','format','find','add','customRanges','content','3166856DkSZqX','replyId','9423QbISLI','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','onStarting','3zevDcf','YYYY/MM/DD\x20HH:mm','delete','body','solved','requireSession','Unknown','code','subscribe','payload','threadId','disposeWithMe','_init','3397572YxxFUV','/solved','_configService','getMemberID','getOwnPropertyDescriptor','setConfig','379TrZnsL','_threadCommentDataSourceService','get','replies','filter','userId','users','saveCommentToSnapshot','2307676gmLsKV','defineProperty','updateComment','map','rangeId','Reply','unitId','post','comment','createTimestamp','/add','addComment','error','getComment','addUser','/list','_commentService','resolveComment','user','Solve','_threadCommentModel','rangeType','_injector','/delete','_userService','slice','_threadCommentDataSource','/universer-api/user/list','personId','_initDataSource','getUser','symbol','2825805beJAlX','/universer-api/comment/unit/'];_0x4695=function(){return _0x1cf8df;};return _0x4695();}
1
+ const _0x19b36e=_0x118a;(function(_0x32ecf3,_0x3359e0){const _0xf872ee=_0x118a,_0x52aaaa=_0x32ecf3();while(!![]){try{const _0x1c39b4=-parseInt(_0xf872ee(0x1c6))/0x1+-parseInt(_0xf872ee(0x196))/0x2*(parseInt(_0xf872ee(0x1dc))/0x3)+parseInt(_0xf872ee(0x1b6))/0x4+parseInt(_0xf872ee(0x1f0))/0x5*(-parseInt(_0xf872ee(0x1b3))/0x6)+parseInt(_0xf872ee(0x1d2))/0x7+-parseInt(_0xf872ee(0x1d9))/0x8+-parseInt(_0xf872ee(0x1d0))/0x9*(-parseInt(_0xf872ee(0x1ed))/0xa);if(_0x1c39b4===_0x3359e0)break;else _0x52aaaa['push'](_0x52aaaa['shift']());}catch(_0x2decc5){_0x52aaaa['push'](_0x52aaaa['shift']());}}}(_0x388b,0x195ee));import{CommentService as _0xc077b,CollaborationSessionService as _0x432e86,UniverCollaborationClientPlugin as _0xac1802}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x41a098}from'@univerjs-pro/license';import{dayjs as _0x59ba66,UserManagerService as _0x138e46,Inject as _0xf42808,Injector as _0x4e131e,Disposable as _0x36502f,CustomRangeType as _0x2096e7,UniverInstanceType as _0x32c84e,DependentOn as _0x3f4a63,IConfigService as _0x38e826,Plugin as _0xff9d47,merge as _0x52dbb1}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x420c06}from'@univerjs/thread-comment-ui';function _0x118a(_0x2f6a92,_0x185963){const _0x388b6d=_0x388b();return _0x118a=function(_0x118a15,_0x278cfc){_0x118a15=_0x118a15-0x189;let _0x213a54=_0x388b6d[_0x118a15];return _0x213a54;},_0x118a(_0x2f6a92,_0x185963);}import{ThreadCommentModel as _0x439133,IThreadCommentDataSourceService as _0x14b700}from'@univerjs/thread-comment';import{bufferTime as _0x593823}from'rxjs';import{HTTPService as _0x39f633}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x22e92a=>(_0x22e92a[_0x22e92a[_0x19b36e(0x1bf)]=0x0]=_0x19b36e(0x1bf),_0x22e92a[_0x22e92a['Solved']=0x1]=_0x19b36e(0x1b8),_0x22e92a[_0x22e92a[_0x19b36e(0x1f1)]=-0x1]=_0x19b36e(0x1f1),_0x22e92a))(I||{}),v=(_0xc6894d=>(_0xc6894d[_0xc6894d['Unknown']=0x0]=_0x19b36e(0x1d4),_0xc6894d[_0xc6894d[_0x19b36e(0x1a5)]=0x1]='Add',_0xc6894d[_0xc6894d[_0x19b36e(0x1ab)]=0x2]=_0x19b36e(0x1ab),_0xc6894d[_0xc6894d[_0x19b36e(0x1a6)]=0x3]=_0x19b36e(0x1a6),_0xc6894d[_0xc6894d[_0x19b36e(0x1cc)]=0x4]=_0x19b36e(0x1cc),_0xc6894d[_0xc6894d[_0x19b36e(0x1d5)]=0x5]='Solve',_0xc6894d[_0xc6894d['UNRECOGNIZED']=-0x1]=_0x19b36e(0x1f1),_0xc6894d))(v||{});const D=_0x4123b5=>_0x59ba66(new Date(+_0x4123b5))[_0x19b36e(0x1a9)](_0x19b36e(0x199)),B=async(_0x5e1d73,_0x1cb2ba)=>{const _0x5bba98=_0x19b36e,_0xb94c01=_0x5e1d73[_0x5bba98(0x1c9)](_0x138e46),_0x27899a=_0x5e1d73['get'](_0x39f633);_0x1cb2ba[_0x5bba98(0x1bb)](_0x454bcc=>{const _0x5c7ebe=_0x5bba98;_0xb94c01[_0x5c7ebe(0x1a1)](_0x454bcc)&&_0x1cb2ba[_0x5c7ebe(0x1e6)](_0x454bcc);}),_0x1cb2ba[_0x5bba98(0x1e4)]&&(await _0x27899a[_0x5bba98(0x1c9)](_0x5bba98(0x1c1),{'params':{'userIDs':[..._0x1cb2ba]}}))[_0x5bba98(0x1b5)][_0x5bba98(0x1c5)][_0x5bba98(0x1bb)](_0x4cdfe6=>{const _0x4c840b=_0x5bba98;_0x4cdfe6&&_0xb94c01[_0x4c840b(0x19c)](_0x4cdfe6);});};var K=Object[_0x19b36e(0x1b4)],V=(_0x4b047b,_0x4d638c,_0xf02af6,_0x2e46d4)=>{const _0x14b27f=_0x19b36e;for(var _0x348f91=_0x2e46d4>0x1?void 0x0:_0x2e46d4?K(_0x4d638c,_0xf02af6):_0x4d638c,_0x50908f=_0x4b047b[_0x14b27f(0x192)]-0x1,_0x5cd7c2;_0x50908f>=0x0;_0x50908f--)(_0x5cd7c2=_0x4b047b[_0x50908f])&&(_0x348f91=_0x5cd7c2(_0x348f91)||_0x348f91);return _0x348f91;},p=(_0x10795f,_0x20db52)=>(_0x19b66d,_0x11d3a0)=>_0x20db52(_0x19b66d,_0x11d3a0,_0x10795f);let S=class extends _0x36502f{constructor(_0x4bf284,_0x251668,_0x32a73c,_0x5b079f){const _0x1fc00b=_0x19b36e;super(),this['_commentService']=_0x4bf284,this['_threadCommentModel']=_0x251668,this[_0x1fc00b(0x18d)]=_0x32a73c,this[_0x1fc00b(0x1e0)]=_0x5b079f,this[_0x1fc00b(0x1cb)](),this[_0x1fc00b(0x1a7)]();}[_0x19b36e(0x1a7)](){const _0x59de94=_0x19b36e;this[_0x59de94(0x1a8)](this[_0x59de94(0x19e)][_0x59de94(0x1bd)]['pipe'](_0x593823(0x10))[_0x59de94(0x1cd)](_0x54da9b=>{const _0x1a1684=_0x59de94,_0x48578e=new Set();_0x54da9b[_0x1a1684(0x1bb)](_0x2a13e6=>{const _0x5bfbfb=_0x1a1684;switch(_0x2a13e6[_0x5bfbfb(0x1e9)]){case _0x5bfbfb(0x1ec):{const _0x1e710f=_0x2a13e6[_0x5bfbfb(0x1b2)][_0x5bfbfb(0x1d8)];_0x48578e[_0x5bfbfb(0x1ec)](_0x1e710f);break;}}}),B(this[_0x1a1684(0x1e0)],_0x48578e);}));}[_0x19b36e(0x1cb)](){const _0x2580e5=_0x19b36e;this[_0x2580e5(0x1a8)](this[_0x2580e5(0x193)][_0x2580e5(0x1bd)]['subscribe'](async _0x55c2e7=>{const _0x2e2119=_0x2580e5;var _0x1cb6e7,_0x57176f,_0x1ee570,_0x5a24c7;const _0xc1f340=(_0x1cb6e7=this['_threadCommentModel'][_0x2e2119(0x1dd)](_0x55c2e7['unitId'])['find'](_0x1c1a1f=>_0x1c1a1f['threadId']===_0x55c2e7['threadId']))==null?void 0x0:_0x1cb6e7['root'];if(!_0xc1f340)return;const {unitId:_0x37d7fc,subUnitId:_0x4fdd80}=_0xc1f340;switch(_0x55c2e7[_0x2e2119(0x1ba)]&&this['_userService']['addUser'](_0x55c2e7[_0x2e2119(0x1ba)]),_0x55c2e7[_0x2e2119(0x1e9)]){case v[_0x2e2119(0x1a5)]:break;case v['Reply']:{this[_0x2e2119(0x19e)]['addComment'](_0x37d7fc,_0x4fdd80,{'unitId':_0x37d7fc,'subUnitId':_0x4fdd80,'ref':'','id':_0x55c2e7['replyId'],'dT':D(+_0x55c2e7[_0x2e2119(0x1de)]),'threadId':_0x55c2e7[_0x2e2119(0x1b9)],'personId':(_0x1ee570=(_0x57176f=_0x55c2e7[_0x2e2119(0x1ba)])==null?void 0x0:_0x57176f['userID'])!=null?_0x1ee570:_0x55c2e7[_0x2e2119(0x195)],'text':JSON[_0x2e2119(0x1cf)](_0x55c2e7[_0x2e2119(0x1c8)]),'parentId':_0xc1f340['id']});break;}case v[_0x2e2119(0x1cc)]:{const _0x594cf6=this['_threadCommentModel'][_0x2e2119(0x1b1)](_0x37d7fc,_0x4fdd80,_0x55c2e7[_0x2e2119(0x1be)]);_0x594cf6&&_0x594cf6[_0x2e2119(0x198)]&&this['_threadCommentModel'][_0x2e2119(0x1e2)](_0x37d7fc,_0x4fdd80,_0x55c2e7['replyId']);break;}case v['Edit']:{this['_threadCommentModel'][_0x2e2119(0x19f)](_0x37d7fc,_0x4fdd80,{'commentId':_0x55c2e7[_0x2e2119(0x1be)],'text':JSON['parse'](_0x55c2e7[_0x2e2119(0x1c8)])});break;}case v[_0x2e2119(0x1d5)]:{const _0x33668c=(_0x5a24c7=this['_threadCommentModel'][_0x2e2119(0x1dd)](_0x55c2e7['unitId'])[_0x2e2119(0x18a)](_0x506fd1=>_0x506fd1[_0x2e2119(0x1b9)]===_0x55c2e7[_0x2e2119(0x1b9)]))==null?void 0x0:_0x5a24c7[_0x2e2119(0x1a0)];_0x33668c&&this[_0x2e2119(0x19e)]['resolveComment'](_0x37d7fc,_0x4fdd80,_0x33668c['id'],_0x55c2e7[_0x2e2119(0x18c)]===I[_0x2e2119(0x1b8)]);break;}}}));}};S=V([p(0x0,_0xf42808(_0xc077b)),p(0x1,_0xf42808(_0x439133)),p(0x2,_0xf42808(_0x138e46)),p(0x3,_0xf42808(_0x4e131e))],S);const z=_0x19b36e(0x19b),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x429358,_0x5418a9,_0x4aef05,_0x13f619)=>{for(var _0x44d320=_0x13f619>0x1?void 0x0:_0x13f619?k(_0x5418a9,_0x4aef05):_0x5418a9,_0x588790=_0x429358['length']-0x1,_0x41c59b;_0x588790>=0x0;_0x588790--)(_0x41c59b=_0x429358[_0x588790])&&(_0x44d320=_0x41c59b(_0x44d320)||_0x44d320);return _0x44d320;},_=(_0x10dde7,_0x2249d8)=>(_0x115344,_0x490b76)=>_0x2249d8(_0x115344,_0x490b76,_0x10dde7);function X(_0x52712a,_0x258bdc){const _0x575cbe=_0x19b36e,_0x25b22e=_0x52712a[_0x575cbe(0x1ef)][0x0];return{..._0x258bdc,'id':_0x25b22e[_0x575cbe(0x1be)],'resolved':_0x52712a[_0x575cbe(0x18c)]===0x1,'dT':D(_0x25b22e[_0x575cbe(0x1de)]),'personId':_0x25b22e[_0x575cbe(0x195)],'threadId':_0x25b22e[_0x575cbe(0x1b9)]};}function ee(_0x59601f,_0x18d81c,_0x4825b3){const _0x31955f=_0x19b36e;var _0x555bca,_0x508097;if(((_0x508097=(_0x555bca=_0x59601f==null?void 0x0:_0x59601f[_0x31955f(0x1ef)])==null?void 0x0:_0x555bca[_0x31955f(0x192)])!=null?_0x508097:0x0)>0x0){const _0x2b23f1=(_0x39b0e9,_0x51d627)=>({'id':_0x39b0e9[_0x31955f(0x1be)],'threadId':_0x39b0e9[_0x31955f(0x1b9)],'dT':D(_0x39b0e9[_0x31955f(0x1de)]),'personId':_0x39b0e9[_0x31955f(0x195)],'resolved':_0x59601f[_0x31955f(0x18c)]===I[_0x31955f(0x1b8)],'unitId':_0x18d81c,'subUnitId':_0x4825b3,'text':JSON[_0x31955f(0x1cf)](_0x39b0e9[_0x31955f(0x1c8)]),'parentId':_0x51d627}),_0x3c010e=_0x2b23f1(_0x59601f[_0x31955f(0x1ef)][0x0]);return{..._0x3c010e,'children':_0x59601f[_0x31955f(0x1ef)][_0x31955f(0x18e)](0x1)[_0x31955f(0x19a)](_0x59453d=>_0x2b23f1(_0x59453d,_0x3c010e['id']))};}return null;}let f=class{constructor(_0x121e8d,_0x2e7339,_0x59ba48,_0x4661a5){const _0x4aca92=_0x19b36e;this[_0x4aca92(0x1c7)]=_0x121e8d,this[_0x4aca92(0x18d)]=_0x2e7339,this['_sessionService']=_0x59ba48,this[_0x4aca92(0x1e0)]=_0x4661a5;}async[_0x19b36e(0x1d3)](_0x2fca80){const _0x16c6de=_0x19b36e;var _0x1502cd,_0x7caa1c;const {parentId:_0x16d37d,unitId:_0x2693b3,text:_0x595078,threadId:_0x4ece93}=_0x2fca80,_0x28c3dc=(_0x7caa1c=(_0x1502cd=_0x595078[_0x16c6de(0x1df)])==null?void 0x0:_0x1502cd[_0x16c6de(0x1d1)](_0x246ccb=>_0x246ccb[_0x16c6de(0x189)]===_0x2096e7[_0x16c6de(0x1e7)])[_0x16c6de(0x19a)](_0x1c5f58=>_0x1c5f58['rangeId']))!=null?_0x7caa1c:[],_0x212087=JSON[_0x16c6de(0x1ae)](_0x595078),_0x91b8c3=(await this['_sessionService'][_0x16c6de(0x1c3)](_0x2693b3))['getMemberID']();if(_0x16d37d){const _0x212186={'memberId':_0x91b8c3,'unitId':_0x2693b3,'content':_0x212087,'mention':_0x28c3dc,'threadId':_0x4ece93},_0x21bde8=(await this[_0x16c6de(0x1c7)][_0x16c6de(0x1a2)](_0x16c6de(0x1a4)+_0x2693b3+_0x16c6de(0x1ca),{'body':_0x212186}))[_0x16c6de(0x1b5)][_0x16c6de(0x1ad)];return{..._0x2fca80,'id':_0x21bde8[_0x16c6de(0x1be)],'dT':_0x59ba66(+_0x21bde8[_0x16c6de(0x1de)])['format'](_0x16c6de(0x199)),'personId':_0x21bde8[_0x16c6de(0x195)]};}else{const _0x4d5637={'memberId':_0x91b8c3,'unitId':_0x2693b3,'content':_0x212087,'mention':_0x28c3dc},_0x425c95=await this['_httpService'][_0x16c6de(0x1a2)](_0x16c6de(0x1a4)+_0x2693b3+_0x16c6de(0x1c0),{'body':_0x4d5637});return X(_0x425c95[_0x16c6de(0x1b5)][_0x16c6de(0x1ac)],_0x2fca80);}}async[_0x19b36e(0x19f)](_0x73151a){const _0x53e204=_0x19b36e;var _0x245b63,_0xa01b1;const {text:_0x5ec894,unitId:_0x1460a5}=_0x73151a,_0x554829=(_0xa01b1=(_0x245b63=_0x5ec894[_0x53e204(0x1df)])==null?void 0x0:_0x245b63[_0x53e204(0x1d1)](_0x3b31fb=>_0x3b31fb['rangeType']===_0x2096e7[_0x53e204(0x1e7)])[_0x53e204(0x19a)](_0x4dc44b=>_0x4dc44b[_0x53e204(0x1c2)]))!=null?_0xa01b1:[],_0xdcdd7=JSON[_0x53e204(0x1ae)](_0x5ec894),_0x6eb571=_0x73151a[_0x53e204(0x1b9)],_0x65f74d=_0x73151a['id'],_0x10bc24={'memberId':(await this[_0x53e204(0x1e3)]['requireSession'](_0x1460a5))['getMemberID'](),'unitId':_0x1460a5,'threadId':_0x6eb571,'mention':_0x554829,'content':_0xdcdd7,'replyId':_0x65f74d},_0xaa4db1=await this['_httpService'][_0x53e204(0x1a2)](_0x53e204(0x1a4)+_0x1460a5+_0x53e204(0x190),{'body':_0x10bc24});return!_0xaa4db1[_0x53e204(0x1b5)][_0x53e204(0x1e5)]||_0xaa4db1['body'][_0x53e204(0x1e5)][_0x53e204(0x1db)]===0x1;}async[_0x19b36e(0x19d)](_0x199d33){const _0x18f3b7=_0x19b36e,{unitId:_0x51df42}=_0x199d33,_0x48df19=_0x199d33['threadId'],_0x2937e2={'memberId':this['_userService']['getCurrentUser']()[_0x18f3b7(0x1eb)],'unitId':_0x51df42,'threadId':_0x48df19,'solved':_0x199d33['resolved']?I['Solved']:I[_0x18f3b7(0x1bf)]},_0x2333a0=await this[_0x18f3b7(0x1c7)][_0x18f3b7(0x1a2)](_0x18f3b7(0x1a4)+_0x51df42+_0x18f3b7(0x18b),{'body':_0x2937e2});return!_0x2333a0[_0x18f3b7(0x1b5)][_0x18f3b7(0x1e5)]||_0x2333a0[_0x18f3b7(0x1b5)][_0x18f3b7(0x1e5)]['code']===0x1;}async[_0x19b36e(0x1e2)](_0x18a5f9,_0x32fdd7,_0x597fee,_0xfe6937){const _0x60a45a=_0x19b36e,_0x143d11={'memberId':(await this[_0x60a45a(0x1e3)][_0x60a45a(0x1c3)](_0x18a5f9))['getMemberID'](),'threadId':_0x597fee,'replyId':_0xfe6937,'unitId':_0x18a5f9},_0x258327=await this[_0x60a45a(0x1c7)]['post'](_0x60a45a(0x1a4)+_0x18a5f9+'/delete',{'body':_0x143d11});return!_0x258327[_0x60a45a(0x1b5)][_0x60a45a(0x1e5)]||_0x258327[_0x60a45a(0x1b5)][_0x60a45a(0x1e5)]['code']===0x1;}async[_0x19b36e(0x1b7)](_0x5d3e22,_0x32553a,_0x527ffe){const _0x416068=_0x19b36e,_0xf6a496={'unitId':_0x5d3e22,'threadId':_0x527ffe},_0x3cf0c3=await this[_0x416068(0x1c7)][_0x416068(0x1a2)](_0x416068(0x1a4)+_0x5d3e22+_0x416068(0x197),{'body':_0xf6a496}),_0x519c88=_0x527ffe[_0x416068(0x19a)](_0x133036=>ee(_0x3cf0c3[_0x416068(0x1b5)][_0x416068(0x191)][_0x133036],_0x5d3e22,_0x32553a))[_0x416068(0x1d1)](Boolean);return Object[_0x416068(0x1d6)](_0x3cf0c3[_0x416068(0x1b5)][_0x416068(0x1c5)])['forEach'](_0x5ef5a2=>{const _0x500655=_0x416068;this[_0x500655(0x18d)][_0x500655(0x19c)](_0x5ef5a2);}),_0x519c88;}[_0x19b36e(0x194)](_0x597e28){const _0x1aba85=_0x19b36e;return{'id':_0x597e28['id'],'threadId':_0x597e28[_0x1aba85(0x1b9)],'ref':_0x597e28[_0x1aba85(0x1bc)]};}};f=Q([_(0x0,_0xf42808(_0x39f633)),_(0x1,_0xf42808(_0x138e46)),_(0x2,_0xf42808(_0x432e86)),_(0x3,_0xf42808(_0x4e131e))],f);var re=Object[_0x19b36e(0x1b4)],te=(_0x595232,_0x2c3eb5,_0x5d6949,_0xfe86b4)=>{for(var _0x106014=_0xfe86b4>0x1?void 0x0:_0xfe86b4?re(_0x2c3eb5,_0x5d6949):_0x2c3eb5,_0x326467=_0x595232['length']-0x1,_0x655a58;_0x326467>=0x0;_0x326467--)(_0x655a58=_0x595232[_0x326467])&&(_0x106014=_0x655a58(_0x106014)||_0x106014);return _0x106014;},N=(_0x1c6779,_0x26106e)=>(_0x5b45eb,_0x5b8b8b)=>_0x26106e(_0x5b45eb,_0x5b8b8b,_0x1c6779);let g=class extends _0x36502f{constructor(_0x260650,_0x426a14){const _0x4799f0=_0x19b36e;super(),this[_0x4799f0(0x1aa)]=_0x260650,this[_0x4799f0(0x1ce)]=_0x426a14,this[_0x4799f0(0x1e1)]();}[_0x19b36e(0x1e1)](){const _0x791c00=_0x19b36e;this[_0x791c00(0x1aa)][_0x791c00(0x1b0)]=this[_0x791c00(0x1ce)],this[_0x791c00(0x1aa)][_0x791c00(0x1c4)]=!0x1;}};g=te([N(0x0,_0x14b700),N(0x1,_0xf42808(f))],g);function _0x388b(){const _0x222f89=['find','/solved','solved','_userService','slice','setConfig','/edit','comments','length','_commentService','saveCommentToSnapshot','userId','87202ySiJmb','/list','parentId','YYYY/MM/DD\x20HH:mm','map','thread-comment-data-source.config','addUser','resolveComment','_threadCommentModel','updateComment','root','getUser','post','_configService','/universer-api/comment/unit/','Add','Edit','_initUserSync','disposeWithMe','format','_threadCommentDataSourceService','Reply','comment','reply','stringify','pluginName','dataSource','getComment','payload','92892YXuOfI','getOwnPropertyDescriptor','body','175068BsdnFC','listComments','Solved','threadId','user','forEach','ref','commentUpdate$','replyId','OpenOrReOpen','/add','/universer-api/user/list','rangeId','requireSession','syncUpdateMutationToColla','users','82911xBnhNy','_httpService','content','get','/reply','_init','Delete','subscribe','_threadCommentDataSource','parse','7740NspyJO','filter','379162YSbcBg','addComment','Unknown','Solve','values','onStarting','personId','544960NmpSmG','UNIVER_UNKNOWN','code','6vIzjjo','getUnit','createTimestamp','customRanges','_injector','_initDataSource','deleteComment','_sessionService','size','error','delete','COMMENT','_config','type','onReady','userID','add','4820hfybBR','symbol','replies','55uYBNeZ','UNRECOGNIZED','rangeType'];_0x388b=function(){return _0x222f89;};return _0x388b();}var se=Object['defineProperty'],oe=Object[_0x19b36e(0x1b4)],ne=(_0x2fcb67,_0x1e2037,_0x20b212)=>_0x1e2037 in _0x2fcb67?se(_0x2fcb67,_0x1e2037,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x20b212}):_0x2fcb67[_0x1e2037]=_0x20b212,ie=(_0x97259f,_0x34731a,_0x47f5bc,_0x4d3e37)=>{const _0xbe0eaa=_0x19b36e;for(var _0x1b8287=_0x4d3e37>0x1?void 0x0:_0x4d3e37?oe(_0x34731a,_0x47f5bc):_0x34731a,_0x5ab6e1=_0x97259f[_0xbe0eaa(0x192)]-0x1,_0x1ff7b1;_0x5ab6e1>=0x0;_0x5ab6e1--)(_0x1ff7b1=_0x97259f[_0x5ab6e1])&&(_0x1b8287=_0x1ff7b1(_0x1b8287)||_0x1b8287);return _0x1b8287;},w=(_0x20f7db,_0x53c999)=>(_0x427c43,_0x5a53a6)=>_0x53c999(_0x427c43,_0x5a53a6,_0x20f7db),$=(_0x57eff4,_0x1f9d39,_0x3fed6a)=>ne(_0x57eff4,typeof _0x1f9d39!=_0x19b36e(0x1ee)?_0x1f9d39+'':_0x1f9d39,_0x3fed6a);let b=class extends _0xff9d47{constructor(_0x5b1619=M,_0x49580f,_0x1b8520){const _0x145d8c=_0x19b36e;super(),this[_0x145d8c(0x1e8)]=_0x5b1619,this[_0x145d8c(0x1e0)]=_0x49580f,this['_configService']=_0x1b8520;const {..._0x464419}=_0x52dbb1({},M,this[_0x145d8c(0x1e8)]);this[_0x145d8c(0x1a3)][_0x145d8c(0x18f)](z,_0x464419);}[_0x19b36e(0x1d7)](){[[f],[g],[S]]['forEach'](_0x2634f1=>{const _0x23b443=_0x118a;this[_0x23b443(0x1e0)][_0x23b443(0x1ec)](_0x2634f1);});}[_0x19b36e(0x1ea)](){const _0x4064ae=_0x19b36e;this['_injector'][_0x4064ae(0x1c9)](g),this['_injector'][_0x4064ae(0x1c9)](S);}};$(b,_0x19b36e(0x1af),W),$(b,_0x19b36e(0x1e9),_0x32c84e[_0x19b36e(0x1da)]),b=ie([_0x3f4a63(_0x420c06,_0xac1802,_0x41a098),w(0x1,_0xf42808(_0x4e131e)),w(0x2,_0x38e826)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x5f5545=_0x1831;(function(_0x1eb6dc,_0x5de806){const _0x335203=_0x1831,_0x5086e1=_0x1eb6dc();while(!![]){try{const _0x22987a=-parseInt(_0x335203(0xc3))/0x1*(parseInt(_0x335203(0x91))/0x2)+-parseInt(_0x335203(0xb0))/0x3*(parseInt(_0x335203(0xa5))/0x4)+-parseInt(_0x335203(0xeb))/0x5+-parseInt(_0x335203(0xbd))/0x6+parseInt(_0x335203(0xcb))/0x7+parseInt(_0x335203(0xab))/0x8+parseInt(_0x335203(0xad))/0x9*(parseInt(_0x335203(0xf1))/0xa);if(_0x22987a===_0x5de806)break;else _0x5086e1['push'](_0x5086e1['shift']());}catch(_0x481641){_0x5086e1['push'](_0x5086e1['shift']());}}}(_0x4695,0x4d4f0));import{CommentService as _0x15a9b5,CollaborationSessionService as _0x500a18,UniverCollaborationClientPlugin as _0x2ffb99}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x42875c}from'@univerjs-pro/license';import{dayjs as _0x48433f,UserManagerService as _0x25f664,Inject as _0x40680a,Injector as _0x57ef01,Disposable as _0x272377,CustomRangeType as _0x2b2672,UniverInstanceType as _0x408419,DependentOn as _0x2c6962,IConfigService as _0x3260d3,Plugin as _0x43489b,merge as _0x32f219}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3407d6}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5e5ade,IThreadCommentDataSourceService as _0xf97d9d}from'@univerjs/thread-comment';import{bufferTime as _0x2add9b}from'rxjs';import{HTTPService as _0x470e80}from'@univerjs/network';const W=_0x5f5545(0xae);function _0x1831(_0x481add,_0x451078){const _0x469514=_0x4695();return _0x1831=function(_0x183183,_0x4a9da1){_0x183183=_0x183183-0x8f;let _0xb00138=_0x469514[_0x183183];return _0xb00138;},_0x1831(_0x481add,_0x451078);}var I=(_0x2a67c7=>(_0x2a67c7[_0x2a67c7[_0x5f5545(0x9c)]=0x0]='OpenOrReOpen',_0x2a67c7[_0x2a67c7[_0x5f5545(0x9d)]=0x1]=_0x5f5545(0x9d),_0x2a67c7[_0x2a67c7['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2a67c7))(I||{}),v=(_0x16f714=>(_0x16f714[_0x16f714[_0x5f5545(0xb6)]=0x0]=_0x5f5545(0xb6),_0x16f714[_0x16f714['Add']=0x1]='Add',_0x16f714[_0x16f714['Reply']=0x2]=_0x5f5545(0xd0),_0x16f714[_0x16f714[_0x5f5545(0x92)]=0x3]=_0x5f5545(0x92),_0x16f714[_0x16f714[_0x5f5545(0x94)]=0x4]=_0x5f5545(0x94),_0x16f714[_0x16f714[_0x5f5545(0xde)]=0x5]='Solve',_0x16f714[_0x16f714[_0x5f5545(0x8f)]=-0x1]=_0x5f5545(0x8f),_0x16f714))(v||{});const D=_0xc1d100=>_0x48433f(new Date(+_0xc1d100))[_0x5f5545(0xa6)](_0x5f5545(0xb1)),B=async(_0x2a49cb,_0x53c868)=>{const _0x16b647=_0x5f5545,_0x231d78=_0x2a49cb[_0x16b647(0xc5)](_0x25f664),_0x85d9e5=_0x2a49cb['get'](_0x470e80);_0x53c868[_0x16b647(0xef)](_0x385ef3=>{const _0x52ed65=_0x16b647;_0x231d78[_0x52ed65(0xe9)](_0x385ef3)&&_0x53c868[_0x52ed65(0xb2)](_0x385ef3);}),_0x53c868['size']&&(await _0x85d9e5['get'](_0x16b647(0xe6),{'params':{'userIDs':[..._0x53c868]}}))[_0x16b647(0xb3)]['users'][_0x16b647(0xef)](_0x1e90fd=>{const _0x19075c=_0x16b647;_0x1e90fd&&_0x231d78[_0x19075c(0xd9)](_0x1e90fd);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2c349b,_0x5887a2,_0x4fdd97,_0x2988da)=>{for(var _0x237d11=_0x2988da>0x1?void 0x0:_0x2988da?K(_0x5887a2,_0x4fdd97):_0x5887a2,_0x512315=_0x2c349b['length']-0x1,_0x44b818;_0x512315>=0x0;_0x512315--)(_0x44b818=_0x2c349b[_0x512315])&&(_0x237d11=_0x44b818(_0x237d11)||_0x237d11);return _0x237d11;},p=(_0x151ad7,_0xc5ce70)=>(_0x2a1fec,_0x1ee09f)=>_0xc5ce70(_0x2a1fec,_0x1ee09f,_0x151ad7);let S=class extends _0x272377{constructor(_0x69d3d5,_0x1884d3,_0x3b4d93,_0x4c6a7b){const _0x14e4b9=_0x5f5545;super(),this[_0x14e4b9(0xdb)]=_0x69d3d5,this['_threadCommentModel']=_0x1884d3,this[_0x14e4b9(0xe3)]=_0x3b4d93,this['_injector']=_0x4c6a7b,this[_0x14e4b9(0xbc)](),this[_0x14e4b9(0x96)]();}[_0x5f5545(0x96)](){const _0x516eed=_0x5f5545;this[_0x516eed(0xbb)](this['_threadCommentModel']['commentUpdate$'][_0x516eed(0xa4)](_0x2add9b(0x10))['subscribe'](_0x1d57ab=>{const _0x56d4e1=_0x516eed,_0x1d3825=new Set();_0x1d57ab[_0x56d4e1(0xef)](_0x238a85=>{const _0x17231d=_0x56d4e1;switch(_0x238a85[_0x17231d(0xa0)]){case _0x17231d(0xa8):{const _0x5dfb2b=_0x238a85[_0x17231d(0xb9)][_0x17231d(0xe7)];_0x1d3825[_0x17231d(0xa8)](_0x5dfb2b);break;}}}),B(this['_injector'],_0x1d3825);}));}[_0x5f5545(0xbc)](){const _0x569450=_0x5f5545;this['disposeWithMe'](this['_commentService']['commentUpdate$'][_0x569450(0xb8)](async _0x3528fc=>{const _0xde0344=_0x569450;var _0x1b8409,_0x4e1602,_0x16706b,_0x3b6e32;const _0x2389f0=(_0x1b8409=this['_threadCommentModel']['getUnit'](_0x3528fc[_0xde0344(0xd1)])[_0xde0344(0xa7)](_0xd1a1bb=>_0xd1a1bb['threadId']===_0x3528fc[_0xde0344(0xba)]))==null?void 0x0:_0x1b8409[_0xde0344(0x9b)];if(!_0x2389f0)return;const {unitId:_0x2b8a39,subUnitId:_0x3700b5}=_0x2389f0;switch(_0x3528fc[_0xde0344(0xdd)]&&this[_0xde0344(0xe3)][_0xde0344(0xd9)](_0x3528fc[_0xde0344(0xdd)]),_0x3528fc['type']){case v['Add']:break;case v['Reply']:{this[_0xde0344(0xdf)][_0xde0344(0xd6)](_0x2b8a39,_0x3700b5,{'unitId':_0x2b8a39,'subUnitId':_0x3700b5,'ref':'','id':_0x3528fc['replyId'],'dT':D(+_0x3528fc[_0xde0344(0xd4)]),'threadId':_0x3528fc['threadId'],'personId':(_0x16706b=(_0x4e1602=_0x3528fc[_0xde0344(0xdd)])==null?void 0x0:_0x4e1602['userID'])!=null?_0x16706b:_0x3528fc[_0xde0344(0xc8)],'text':JSON[_0xde0344(0x93)](_0x3528fc[_0xde0344(0xaa)]),'parentId':_0x2389f0['id']});break;}case v[_0xde0344(0x94)]:{const _0x3263d4=this[_0xde0344(0xdf)][_0xde0344(0xd8)](_0x2b8a39,_0x3700b5,_0x3528fc[_0xde0344(0xac)]);_0x3263d4&&_0x3263d4['parentId']&&this[_0xde0344(0xdf)][_0xde0344(0x97)](_0x2b8a39,_0x3700b5,_0x3528fc[_0xde0344(0xac)]);break;}case v[_0xde0344(0x92)]:{this['_threadCommentModel'][_0xde0344(0xcd)](_0x2b8a39,_0x3700b5,{'commentId':_0x3528fc[_0xde0344(0xac)],'text':JSON[_0xde0344(0x93)](_0x3528fc[_0xde0344(0xaa)])});break;}case v[_0xde0344(0xde)]:{const _0x2f3532=(_0x3b6e32=this[_0xde0344(0xdf)]['getUnit'](_0x3528fc['unitId'])[_0xde0344(0xa7)](_0x5d27b2=>_0x5d27b2[_0xde0344(0xba)]===_0x3528fc[_0xde0344(0xba)]))==null?void 0x0:_0x3b6e32[_0xde0344(0x9b)];_0x2f3532&&this[_0xde0344(0xdf)]['resolveComment'](_0x2b8a39,_0x3700b5,_0x2f3532['id'],_0x3528fc['solved']===I[_0xde0344(0x9d)]);break;}}}));}};S=V([p(0x0,_0x40680a(_0x15a9b5)),p(0x1,_0x40680a(_0x5e5ade)),p(0x2,_0x40680a(_0x25f664)),p(0x3,_0x40680a(_0x57ef01))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x5f5545(0xc1)],Q=(_0x34d57d,_0x36d811,_0x4fdc03,_0x241a19)=>{for(var _0x17ce6a=_0x241a19>0x1?void 0x0:_0x241a19?k(_0x36d811,_0x4fdc03):_0x36d811,_0x3a7411=_0x34d57d['length']-0x1,_0x181bfe;_0x3a7411>=0x0;_0x3a7411--)(_0x181bfe=_0x34d57d[_0x3a7411])&&(_0x17ce6a=_0x181bfe(_0x17ce6a)||_0x17ce6a);return _0x17ce6a;},_=(_0x55136f,_0x1a4648)=>(_0x194e55,_0x33710f)=>_0x1a4648(_0x194e55,_0x33710f,_0x55136f);function X(_0x3956ba,_0x8b482d){const _0x54c237=_0x5f5545,_0x5df23e=_0x3956ba[_0x54c237(0xc6)][0x0];return{..._0x8b482d,'id':_0x5df23e[_0x54c237(0xac)],'resolved':_0x3956ba[_0x54c237(0xb4)]===0x1,'dT':D(_0x5df23e[_0x54c237(0xd4)]),'personId':_0x5df23e[_0x54c237(0xc8)],'threadId':_0x5df23e[_0x54c237(0xba)]};}function ee(_0x369cf,_0x4b7f75,_0x6cea36){const _0x345c25=_0x5f5545;var _0x371ae6,_0x3c41ee;if(((_0x3c41ee=(_0x371ae6=_0x369cf==null?void 0x0:_0x369cf[_0x345c25(0xc6)])==null?void 0x0:_0x371ae6[_0x345c25(0x9f)])!=null?_0x3c41ee:0x0)>0x0){const _0x2d070e=(_0x8a14db,_0x16d296)=>({'id':_0x8a14db[_0x345c25(0xac)],'threadId':_0x8a14db['threadId'],'dT':D(_0x8a14db[_0x345c25(0xd4)]),'personId':_0x8a14db[_0x345c25(0xc8)],'resolved':_0x369cf[_0x345c25(0xb4)]===I[_0x345c25(0x9d)],'unitId':_0x4b7f75,'subUnitId':_0x6cea36,'text':JSON[_0x345c25(0x93)](_0x8a14db[_0x345c25(0xaa)]),'parentId':_0x16d296}),_0x2e7fc1=_0x2d070e(_0x369cf[_0x345c25(0xc6)][0x0]);return{..._0x2e7fc1,'children':_0x369cf[_0x345c25(0xc6)][_0x345c25(0xe4)](0x1)[_0x345c25(0xce)](_0x11a7c8=>_0x2d070e(_0x11a7c8,_0x2e7fc1['id']))};}return null;}let f=class{constructor(_0x4f6ac7,_0x5b5df2,_0x337650,_0x47dbad){const _0x55f29d=_0x5f5545;this[_0x55f29d(0x98)]=_0x4f6ac7,this[_0x55f29d(0xe3)]=_0x5b5df2,this[_0x55f29d(0xf0)]=_0x337650,this[_0x55f29d(0xe1)]=_0x47dbad;}async[_0x5f5545(0xd6)](_0x2c6d25){const _0x5a447d=_0x5f5545;var _0x26db16,_0xf3a1cf;const {parentId:_0x41dbd0,unitId:_0x3788a5,text:_0x2093c5,threadId:_0x13707a}=_0x2c6d25,_0x456d67=(_0xf3a1cf=(_0x26db16=_0x2093c5[_0x5a447d(0xa9)])==null?void 0x0:_0x26db16[_0x5a447d(0xc7)](_0x32fa4d=>_0x32fa4d[_0x5a447d(0xe0)]===_0x2b2672['COMMENT'])[_0x5a447d(0xce)](_0x7f2307=>_0x7f2307[_0x5a447d(0xcf)]))!=null?_0xf3a1cf:[],_0x394ffb=JSON[_0x5a447d(0xf2)](_0x2093c5),_0x55e8f6=(await this[_0x5a447d(0xf0)][_0x5a447d(0xb5)](_0x3788a5))[_0x5a447d(0xc0)]();if(_0x41dbd0){const _0x19970a={'memberId':_0x55e8f6,'unitId':_0x3788a5,'content':_0x394ffb,'mention':_0x456d67,'threadId':_0x13707a},_0x18c3ff=(await this[_0x5a447d(0x98)]['post'](_0x5a447d(0xec)+_0x3788a5+'/reply',{'body':_0x19970a}))[_0x5a447d(0xb3)][_0x5a447d(0x90)];return{..._0x2c6d25,'id':_0x18c3ff[_0x5a447d(0xac)],'dT':_0x48433f(+_0x18c3ff[_0x5a447d(0xd4)])[_0x5a447d(0xa6)](_0x5a447d(0xb1)),'personId':_0x18c3ff['userId']};}else{const _0x2d6d65={'memberId':_0x55e8f6,'unitId':_0x3788a5,'content':_0x394ffb,'mention':_0x456d67},_0x100e62=await this[_0x5a447d(0x98)]['post']('/universer-api/comment/unit/'+_0x3788a5+_0x5a447d(0xd5),{'body':_0x2d6d65});return X(_0x100e62[_0x5a447d(0xb3)][_0x5a447d(0xd3)],_0x2c6d25);}}async[_0x5f5545(0xcd)](_0x4ae5b4){const _0x372399=_0x5f5545;var _0x595a1b,_0x28b748;const {text:_0x4e05b3,unitId:_0x469f2c}=_0x4ae5b4,_0x3b5016=(_0x28b748=(_0x595a1b=_0x4e05b3[_0x372399(0xa9)])==null?void 0x0:_0x595a1b[_0x372399(0xc7)](_0x33a85a=>_0x33a85a[_0x372399(0xe0)]===_0x2b2672[_0x372399(0xa1)])[_0x372399(0xce)](_0x1186ee=>_0x1186ee[_0x372399(0xcf)]))!=null?_0x28b748:[],_0x5b9f30=JSON['stringify'](_0x4e05b3),_0x59e1c4=_0x4ae5b4[_0x372399(0xba)],_0xc72f0d=_0x4ae5b4['id'],_0x55d1d0={'memberId':(await this[_0x372399(0xf0)]['requireSession'](_0x469f2c))[_0x372399(0xc0)](),'unitId':_0x469f2c,'threadId':_0x59e1c4,'mention':_0x3b5016,'content':_0x5b9f30,'replyId':_0xc72f0d},_0x2dd45f=await this['_httpService'][_0x372399(0xd2)](_0x372399(0xec)+_0x469f2c+'/edit',{'body':_0x55d1d0});return!_0x2dd45f[_0x372399(0xb3)][_0x372399(0xd7)]||_0x2dd45f[_0x372399(0xb3)][_0x372399(0xd7)][_0x372399(0xb7)]===0x1;}async[_0x5f5545(0xdc)](_0x425b99){const _0x363dc4=_0x5f5545,{unitId:_0x47f27f}=_0x425b99,_0x5862e7=_0x425b99[_0x363dc4(0xba)],_0x323139={'memberId':this[_0x363dc4(0xe3)][_0x363dc4(0xee)]()['userID'],'unitId':_0x47f27f,'threadId':_0x5862e7,'solved':_0x425b99[_0x363dc4(0x95)]?I[_0x363dc4(0x9d)]:I[_0x363dc4(0x9c)]},_0x2b33e5=await this[_0x363dc4(0x98)][_0x363dc4(0xd2)](_0x363dc4(0xec)+_0x47f27f+_0x363dc4(0xbe),{'body':_0x323139});return!_0x2b33e5[_0x363dc4(0xb3)][_0x363dc4(0xd7)]||_0x2b33e5[_0x363dc4(0xb3)][_0x363dc4(0xd7)]['code']===0x1;}async[_0x5f5545(0x97)](_0x5883ba,_0x54c3bd,_0x22f0d3,_0x569f0d){const _0x48f910=_0x5f5545,_0x34b05a={'memberId':(await this['_sessionService']['requireSession'](_0x5883ba))[_0x48f910(0xc0)](),'threadId':_0x22f0d3,'replyId':_0x569f0d,'unitId':_0x5883ba},_0x591e34=await this[_0x48f910(0x98)][_0x48f910(0xd2)]('/universer-api/comment/unit/'+_0x5883ba+_0x48f910(0xe2),{'body':_0x34b05a});return!_0x591e34[_0x48f910(0xb3)][_0x48f910(0xd7)]||_0x591e34[_0x48f910(0xb3)][_0x48f910(0xd7)][_0x48f910(0xb7)]===0x1;}async['listComments'](_0x33333f,_0x545a05,_0x35d1f1){const _0x52d7e1=_0x5f5545,_0x39a092={'unitId':_0x33333f,'threadId':_0x35d1f1},_0x2d3a40=await this['_httpService'][_0x52d7e1(0xd2)](_0x52d7e1(0xec)+_0x33333f+_0x52d7e1(0xda),{'body':_0x39a092}),_0x239596=_0x35d1f1[_0x52d7e1(0xce)](_0x1920a0=>ee(_0x2d3a40['body']['comments'][_0x1920a0],_0x33333f,_0x545a05))[_0x52d7e1(0xc7)](Boolean);return Object[_0x52d7e1(0x99)](_0x2d3a40[_0x52d7e1(0xb3)][_0x52d7e1(0xc9)])[_0x52d7e1(0xef)](_0x2d69ff=>{const _0x2cc1ce=_0x52d7e1;this['_userService'][_0x2cc1ce(0xd9)](_0x2d69ff);}),_0x239596;}[_0x5f5545(0xca)](_0x2cdc3a){const _0x55e12a=_0x5f5545;return{'id':_0x2cdc3a['id'],'threadId':_0x2cdc3a['threadId'],'ref':_0x2cdc3a[_0x55e12a(0xa3)]};}};f=Q([_(0x0,_0x40680a(_0x470e80)),_(0x1,_0x40680a(_0x25f664)),_(0x2,_0x40680a(_0x500a18)),_(0x3,_0x40680a(_0x57ef01))],f);var re=Object[_0x5f5545(0xc1)],te=(_0x3cc6a9,_0x5bd1c1,_0xe8b522,_0x419de4)=>{const _0x2eee61=_0x5f5545;for(var _0x587ff7=_0x419de4>0x1?void 0x0:_0x419de4?re(_0x5bd1c1,_0xe8b522):_0x5bd1c1,_0x3128aa=_0x3cc6a9[_0x2eee61(0x9f)]-0x1,_0x3f195e;_0x3128aa>=0x0;_0x3128aa--)(_0x3f195e=_0x3cc6a9[_0x3128aa])&&(_0x587ff7=_0x3f195e(_0x587ff7)||_0x587ff7);return _0x587ff7;},N=(_0x27b4ca,_0x17e376)=>(_0x1d33e2,_0x2a1fe7)=>_0x17e376(_0x1d33e2,_0x2a1fe7,_0x27b4ca);let g=class extends _0x272377{constructor(_0xc98618,_0x24a201){const _0x55ea7f=_0x5f5545;super(),this[_0x55ea7f(0xc4)]=_0xc98618,this['_threadCommentDataSource']=_0x24a201,this[_0x55ea7f(0xe8)]();}[_0x5f5545(0xe8)](){const _0x4a5051=_0x5f5545;this[_0x4a5051(0xc4)][_0x4a5051(0xed)]=this[_0x4a5051(0xe5)],this['_threadCommentDataSourceService'][_0x4a5051(0x9a)]=!0x1;}};g=te([N(0x0,_0xf97d9d),N(0x1,_0x40680a(f))],g);var se=Object[_0x5f5545(0xcc)],oe=Object[_0x5f5545(0xc1)],ne=(_0x36d24d,_0x17dc88,_0x225aba)=>_0x17dc88 in _0x36d24d?se(_0x36d24d,_0x17dc88,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x225aba}):_0x36d24d[_0x17dc88]=_0x225aba,ie=(_0x42ca3a,_0x15b84c,_0x3473d2,_0x16a8ae)=>{const _0x27f953=_0x5f5545;for(var _0x4aff39=_0x16a8ae>0x1?void 0x0:_0x16a8ae?oe(_0x15b84c,_0x3473d2):_0x15b84c,_0x4be5d5=_0x42ca3a[_0x27f953(0x9f)]-0x1,_0x2c9e73;_0x4be5d5>=0x0;_0x4be5d5--)(_0x2c9e73=_0x42ca3a[_0x4be5d5])&&(_0x4aff39=_0x2c9e73(_0x4aff39)||_0x4aff39);return _0x4aff39;},w=(_0x5a96ae,_0x191494)=>(_0x3bf13d,_0x5b50aa)=>_0x191494(_0x3bf13d,_0x5b50aa,_0x5a96ae),$=(_0x7b1bc6,_0x3a5f6b,_0x1445ae)=>ne(_0x7b1bc6,typeof _0x3a5f6b!=_0x5f5545(0xea)?_0x3a5f6b+'':_0x3a5f6b,_0x1445ae);let b=class extends _0x43489b{constructor(_0x7cb831=M,_0x427f97,_0x3ff48d){const _0x6107da=_0x5f5545;super(),this[_0x6107da(0xa2)]=_0x7cb831,this[_0x6107da(0xe1)]=_0x427f97,this['_configService']=_0x3ff48d;const {..._0x257046}=_0x32f219({},M,this[_0x6107da(0xa2)]);this[_0x6107da(0xbf)][_0x6107da(0xc2)](z,_0x257046);}[_0x5f5545(0xaf)](){[[f],[g],[S]]['forEach'](_0x20913b=>{this['_injector']['add'](_0x20913b);});}[_0x5f5545(0x9e)](){const _0x31ad69=_0x5f5545;this[_0x31ad69(0xe1)][_0x31ad69(0xc5)](g),this['_injector'][_0x31ad69(0xc5)](S);}};$(b,'pluginName',W),$(b,_0x5f5545(0xa0),_0x408419['UNIVER_UNKNOWN']),b=ie([_0x2c6962(_0x3407d6,_0x2ffb99,_0x42875c),w(0x1,_0x40680a(_0x57ef01)),w(0x2,_0x3260d3)],b);export{b as UniverThreadCommentDataSourcePlugin};function _0x4695(){const _0x1cf8df=['dataSource','getCurrentUser','forEach','_sessionService','12130dWJNmV','stringify','UNRECOGNIZED','reply','458xeYoVm','Edit','parse','Delete','resolved','_initUserSync','deleteComment','_httpService','values','syncUpdateMutationToColla','root','OpenOrReOpen','Solved','onReady','length','type','COMMENT','_config','ref','pipe','1842664ykFBRW','format','find','add','customRanges','content','3166856DkSZqX','replyId','9423QbISLI','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','onStarting','3zevDcf','YYYY/MM/DD\x20HH:mm','delete','body','solved','requireSession','Unknown','code','subscribe','payload','threadId','disposeWithMe','_init','3397572YxxFUV','/solved','_configService','getMemberID','getOwnPropertyDescriptor','setConfig','379TrZnsL','_threadCommentDataSourceService','get','replies','filter','userId','users','saveCommentToSnapshot','2307676gmLsKV','defineProperty','updateComment','map','rangeId','Reply','unitId','post','comment','createTimestamp','/add','addComment','error','getComment','addUser','/list','_commentService','resolveComment','user','Solve','_threadCommentModel','rangeType','_injector','/delete','_userService','slice','_threadCommentDataSource','/universer-api/user/list','personId','_initDataSource','getUser','symbol','2825805beJAlX','/universer-api/comment/unit/'];_0x4695=function(){return _0x1cf8df;};return _0x4695();}
1
+ const _0x19b36e=_0x118a;(function(_0x32ecf3,_0x3359e0){const _0xf872ee=_0x118a,_0x52aaaa=_0x32ecf3();while(!![]){try{const _0x1c39b4=-parseInt(_0xf872ee(0x1c6))/0x1+-parseInt(_0xf872ee(0x196))/0x2*(parseInt(_0xf872ee(0x1dc))/0x3)+parseInt(_0xf872ee(0x1b6))/0x4+parseInt(_0xf872ee(0x1f0))/0x5*(-parseInt(_0xf872ee(0x1b3))/0x6)+parseInt(_0xf872ee(0x1d2))/0x7+-parseInt(_0xf872ee(0x1d9))/0x8+-parseInt(_0xf872ee(0x1d0))/0x9*(-parseInt(_0xf872ee(0x1ed))/0xa);if(_0x1c39b4===_0x3359e0)break;else _0x52aaaa['push'](_0x52aaaa['shift']());}catch(_0x2decc5){_0x52aaaa['push'](_0x52aaaa['shift']());}}}(_0x388b,0x195ee));import{CommentService as _0xc077b,CollaborationSessionService as _0x432e86,UniverCollaborationClientPlugin as _0xac1802}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x41a098}from'@univerjs-pro/license';import{dayjs as _0x59ba66,UserManagerService as _0x138e46,Inject as _0xf42808,Injector as _0x4e131e,Disposable as _0x36502f,CustomRangeType as _0x2096e7,UniverInstanceType as _0x32c84e,DependentOn as _0x3f4a63,IConfigService as _0x38e826,Plugin as _0xff9d47,merge as _0x52dbb1}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x420c06}from'@univerjs/thread-comment-ui';function _0x118a(_0x2f6a92,_0x185963){const _0x388b6d=_0x388b();return _0x118a=function(_0x118a15,_0x278cfc){_0x118a15=_0x118a15-0x189;let _0x213a54=_0x388b6d[_0x118a15];return _0x213a54;},_0x118a(_0x2f6a92,_0x185963);}import{ThreadCommentModel as _0x439133,IThreadCommentDataSourceService as _0x14b700}from'@univerjs/thread-comment';import{bufferTime as _0x593823}from'rxjs';import{HTTPService as _0x39f633}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x22e92a=>(_0x22e92a[_0x22e92a[_0x19b36e(0x1bf)]=0x0]=_0x19b36e(0x1bf),_0x22e92a[_0x22e92a['Solved']=0x1]=_0x19b36e(0x1b8),_0x22e92a[_0x22e92a[_0x19b36e(0x1f1)]=-0x1]=_0x19b36e(0x1f1),_0x22e92a))(I||{}),v=(_0xc6894d=>(_0xc6894d[_0xc6894d['Unknown']=0x0]=_0x19b36e(0x1d4),_0xc6894d[_0xc6894d[_0x19b36e(0x1a5)]=0x1]='Add',_0xc6894d[_0xc6894d[_0x19b36e(0x1ab)]=0x2]=_0x19b36e(0x1ab),_0xc6894d[_0xc6894d[_0x19b36e(0x1a6)]=0x3]=_0x19b36e(0x1a6),_0xc6894d[_0xc6894d[_0x19b36e(0x1cc)]=0x4]=_0x19b36e(0x1cc),_0xc6894d[_0xc6894d[_0x19b36e(0x1d5)]=0x5]='Solve',_0xc6894d[_0xc6894d['UNRECOGNIZED']=-0x1]=_0x19b36e(0x1f1),_0xc6894d))(v||{});const D=_0x4123b5=>_0x59ba66(new Date(+_0x4123b5))[_0x19b36e(0x1a9)](_0x19b36e(0x199)),B=async(_0x5e1d73,_0x1cb2ba)=>{const _0x5bba98=_0x19b36e,_0xb94c01=_0x5e1d73[_0x5bba98(0x1c9)](_0x138e46),_0x27899a=_0x5e1d73['get'](_0x39f633);_0x1cb2ba[_0x5bba98(0x1bb)](_0x454bcc=>{const _0x5c7ebe=_0x5bba98;_0xb94c01[_0x5c7ebe(0x1a1)](_0x454bcc)&&_0x1cb2ba[_0x5c7ebe(0x1e6)](_0x454bcc);}),_0x1cb2ba[_0x5bba98(0x1e4)]&&(await _0x27899a[_0x5bba98(0x1c9)](_0x5bba98(0x1c1),{'params':{'userIDs':[..._0x1cb2ba]}}))[_0x5bba98(0x1b5)][_0x5bba98(0x1c5)][_0x5bba98(0x1bb)](_0x4cdfe6=>{const _0x4c840b=_0x5bba98;_0x4cdfe6&&_0xb94c01[_0x4c840b(0x19c)](_0x4cdfe6);});};var K=Object[_0x19b36e(0x1b4)],V=(_0x4b047b,_0x4d638c,_0xf02af6,_0x2e46d4)=>{const _0x14b27f=_0x19b36e;for(var _0x348f91=_0x2e46d4>0x1?void 0x0:_0x2e46d4?K(_0x4d638c,_0xf02af6):_0x4d638c,_0x50908f=_0x4b047b[_0x14b27f(0x192)]-0x1,_0x5cd7c2;_0x50908f>=0x0;_0x50908f--)(_0x5cd7c2=_0x4b047b[_0x50908f])&&(_0x348f91=_0x5cd7c2(_0x348f91)||_0x348f91);return _0x348f91;},p=(_0x10795f,_0x20db52)=>(_0x19b66d,_0x11d3a0)=>_0x20db52(_0x19b66d,_0x11d3a0,_0x10795f);let S=class extends _0x36502f{constructor(_0x4bf284,_0x251668,_0x32a73c,_0x5b079f){const _0x1fc00b=_0x19b36e;super(),this['_commentService']=_0x4bf284,this['_threadCommentModel']=_0x251668,this[_0x1fc00b(0x18d)]=_0x32a73c,this[_0x1fc00b(0x1e0)]=_0x5b079f,this[_0x1fc00b(0x1cb)](),this[_0x1fc00b(0x1a7)]();}[_0x19b36e(0x1a7)](){const _0x59de94=_0x19b36e;this[_0x59de94(0x1a8)](this[_0x59de94(0x19e)][_0x59de94(0x1bd)]['pipe'](_0x593823(0x10))[_0x59de94(0x1cd)](_0x54da9b=>{const _0x1a1684=_0x59de94,_0x48578e=new Set();_0x54da9b[_0x1a1684(0x1bb)](_0x2a13e6=>{const _0x5bfbfb=_0x1a1684;switch(_0x2a13e6[_0x5bfbfb(0x1e9)]){case _0x5bfbfb(0x1ec):{const _0x1e710f=_0x2a13e6[_0x5bfbfb(0x1b2)][_0x5bfbfb(0x1d8)];_0x48578e[_0x5bfbfb(0x1ec)](_0x1e710f);break;}}}),B(this[_0x1a1684(0x1e0)],_0x48578e);}));}[_0x19b36e(0x1cb)](){const _0x2580e5=_0x19b36e;this[_0x2580e5(0x1a8)](this[_0x2580e5(0x193)][_0x2580e5(0x1bd)]['subscribe'](async _0x55c2e7=>{const _0x2e2119=_0x2580e5;var _0x1cb6e7,_0x57176f,_0x1ee570,_0x5a24c7;const _0xc1f340=(_0x1cb6e7=this['_threadCommentModel'][_0x2e2119(0x1dd)](_0x55c2e7['unitId'])['find'](_0x1c1a1f=>_0x1c1a1f['threadId']===_0x55c2e7['threadId']))==null?void 0x0:_0x1cb6e7['root'];if(!_0xc1f340)return;const {unitId:_0x37d7fc,subUnitId:_0x4fdd80}=_0xc1f340;switch(_0x55c2e7[_0x2e2119(0x1ba)]&&this['_userService']['addUser'](_0x55c2e7[_0x2e2119(0x1ba)]),_0x55c2e7[_0x2e2119(0x1e9)]){case v[_0x2e2119(0x1a5)]:break;case v['Reply']:{this[_0x2e2119(0x19e)]['addComment'](_0x37d7fc,_0x4fdd80,{'unitId':_0x37d7fc,'subUnitId':_0x4fdd80,'ref':'','id':_0x55c2e7['replyId'],'dT':D(+_0x55c2e7[_0x2e2119(0x1de)]),'threadId':_0x55c2e7[_0x2e2119(0x1b9)],'personId':(_0x1ee570=(_0x57176f=_0x55c2e7[_0x2e2119(0x1ba)])==null?void 0x0:_0x57176f['userID'])!=null?_0x1ee570:_0x55c2e7[_0x2e2119(0x195)],'text':JSON[_0x2e2119(0x1cf)](_0x55c2e7[_0x2e2119(0x1c8)]),'parentId':_0xc1f340['id']});break;}case v[_0x2e2119(0x1cc)]:{const _0x594cf6=this['_threadCommentModel'][_0x2e2119(0x1b1)](_0x37d7fc,_0x4fdd80,_0x55c2e7[_0x2e2119(0x1be)]);_0x594cf6&&_0x594cf6[_0x2e2119(0x198)]&&this['_threadCommentModel'][_0x2e2119(0x1e2)](_0x37d7fc,_0x4fdd80,_0x55c2e7['replyId']);break;}case v['Edit']:{this['_threadCommentModel'][_0x2e2119(0x19f)](_0x37d7fc,_0x4fdd80,{'commentId':_0x55c2e7[_0x2e2119(0x1be)],'text':JSON['parse'](_0x55c2e7[_0x2e2119(0x1c8)])});break;}case v[_0x2e2119(0x1d5)]:{const _0x33668c=(_0x5a24c7=this['_threadCommentModel'][_0x2e2119(0x1dd)](_0x55c2e7['unitId'])[_0x2e2119(0x18a)](_0x506fd1=>_0x506fd1[_0x2e2119(0x1b9)]===_0x55c2e7[_0x2e2119(0x1b9)]))==null?void 0x0:_0x5a24c7[_0x2e2119(0x1a0)];_0x33668c&&this[_0x2e2119(0x19e)]['resolveComment'](_0x37d7fc,_0x4fdd80,_0x33668c['id'],_0x55c2e7[_0x2e2119(0x18c)]===I[_0x2e2119(0x1b8)]);break;}}}));}};S=V([p(0x0,_0xf42808(_0xc077b)),p(0x1,_0xf42808(_0x439133)),p(0x2,_0xf42808(_0x138e46)),p(0x3,_0xf42808(_0x4e131e))],S);const z=_0x19b36e(0x19b),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x429358,_0x5418a9,_0x4aef05,_0x13f619)=>{for(var _0x44d320=_0x13f619>0x1?void 0x0:_0x13f619?k(_0x5418a9,_0x4aef05):_0x5418a9,_0x588790=_0x429358['length']-0x1,_0x41c59b;_0x588790>=0x0;_0x588790--)(_0x41c59b=_0x429358[_0x588790])&&(_0x44d320=_0x41c59b(_0x44d320)||_0x44d320);return _0x44d320;},_=(_0x10dde7,_0x2249d8)=>(_0x115344,_0x490b76)=>_0x2249d8(_0x115344,_0x490b76,_0x10dde7);function X(_0x52712a,_0x258bdc){const _0x575cbe=_0x19b36e,_0x25b22e=_0x52712a[_0x575cbe(0x1ef)][0x0];return{..._0x258bdc,'id':_0x25b22e[_0x575cbe(0x1be)],'resolved':_0x52712a[_0x575cbe(0x18c)]===0x1,'dT':D(_0x25b22e[_0x575cbe(0x1de)]),'personId':_0x25b22e[_0x575cbe(0x195)],'threadId':_0x25b22e[_0x575cbe(0x1b9)]};}function ee(_0x59601f,_0x18d81c,_0x4825b3){const _0x31955f=_0x19b36e;var _0x555bca,_0x508097;if(((_0x508097=(_0x555bca=_0x59601f==null?void 0x0:_0x59601f[_0x31955f(0x1ef)])==null?void 0x0:_0x555bca[_0x31955f(0x192)])!=null?_0x508097:0x0)>0x0){const _0x2b23f1=(_0x39b0e9,_0x51d627)=>({'id':_0x39b0e9[_0x31955f(0x1be)],'threadId':_0x39b0e9[_0x31955f(0x1b9)],'dT':D(_0x39b0e9[_0x31955f(0x1de)]),'personId':_0x39b0e9[_0x31955f(0x195)],'resolved':_0x59601f[_0x31955f(0x18c)]===I[_0x31955f(0x1b8)],'unitId':_0x18d81c,'subUnitId':_0x4825b3,'text':JSON[_0x31955f(0x1cf)](_0x39b0e9[_0x31955f(0x1c8)]),'parentId':_0x51d627}),_0x3c010e=_0x2b23f1(_0x59601f[_0x31955f(0x1ef)][0x0]);return{..._0x3c010e,'children':_0x59601f[_0x31955f(0x1ef)][_0x31955f(0x18e)](0x1)[_0x31955f(0x19a)](_0x59453d=>_0x2b23f1(_0x59453d,_0x3c010e['id']))};}return null;}let f=class{constructor(_0x121e8d,_0x2e7339,_0x59ba48,_0x4661a5){const _0x4aca92=_0x19b36e;this[_0x4aca92(0x1c7)]=_0x121e8d,this[_0x4aca92(0x18d)]=_0x2e7339,this['_sessionService']=_0x59ba48,this[_0x4aca92(0x1e0)]=_0x4661a5;}async[_0x19b36e(0x1d3)](_0x2fca80){const _0x16c6de=_0x19b36e;var _0x1502cd,_0x7caa1c;const {parentId:_0x16d37d,unitId:_0x2693b3,text:_0x595078,threadId:_0x4ece93}=_0x2fca80,_0x28c3dc=(_0x7caa1c=(_0x1502cd=_0x595078[_0x16c6de(0x1df)])==null?void 0x0:_0x1502cd[_0x16c6de(0x1d1)](_0x246ccb=>_0x246ccb[_0x16c6de(0x189)]===_0x2096e7[_0x16c6de(0x1e7)])[_0x16c6de(0x19a)](_0x1c5f58=>_0x1c5f58['rangeId']))!=null?_0x7caa1c:[],_0x212087=JSON[_0x16c6de(0x1ae)](_0x595078),_0x91b8c3=(await this['_sessionService'][_0x16c6de(0x1c3)](_0x2693b3))['getMemberID']();if(_0x16d37d){const _0x212186={'memberId':_0x91b8c3,'unitId':_0x2693b3,'content':_0x212087,'mention':_0x28c3dc,'threadId':_0x4ece93},_0x21bde8=(await this[_0x16c6de(0x1c7)][_0x16c6de(0x1a2)](_0x16c6de(0x1a4)+_0x2693b3+_0x16c6de(0x1ca),{'body':_0x212186}))[_0x16c6de(0x1b5)][_0x16c6de(0x1ad)];return{..._0x2fca80,'id':_0x21bde8[_0x16c6de(0x1be)],'dT':_0x59ba66(+_0x21bde8[_0x16c6de(0x1de)])['format'](_0x16c6de(0x199)),'personId':_0x21bde8[_0x16c6de(0x195)]};}else{const _0x4d5637={'memberId':_0x91b8c3,'unitId':_0x2693b3,'content':_0x212087,'mention':_0x28c3dc},_0x425c95=await this['_httpService'][_0x16c6de(0x1a2)](_0x16c6de(0x1a4)+_0x2693b3+_0x16c6de(0x1c0),{'body':_0x4d5637});return X(_0x425c95[_0x16c6de(0x1b5)][_0x16c6de(0x1ac)],_0x2fca80);}}async[_0x19b36e(0x19f)](_0x73151a){const _0x53e204=_0x19b36e;var _0x245b63,_0xa01b1;const {text:_0x5ec894,unitId:_0x1460a5}=_0x73151a,_0x554829=(_0xa01b1=(_0x245b63=_0x5ec894[_0x53e204(0x1df)])==null?void 0x0:_0x245b63[_0x53e204(0x1d1)](_0x3b31fb=>_0x3b31fb['rangeType']===_0x2096e7[_0x53e204(0x1e7)])[_0x53e204(0x19a)](_0x4dc44b=>_0x4dc44b[_0x53e204(0x1c2)]))!=null?_0xa01b1:[],_0xdcdd7=JSON[_0x53e204(0x1ae)](_0x5ec894),_0x6eb571=_0x73151a[_0x53e204(0x1b9)],_0x65f74d=_0x73151a['id'],_0x10bc24={'memberId':(await this[_0x53e204(0x1e3)]['requireSession'](_0x1460a5))['getMemberID'](),'unitId':_0x1460a5,'threadId':_0x6eb571,'mention':_0x554829,'content':_0xdcdd7,'replyId':_0x65f74d},_0xaa4db1=await this['_httpService'][_0x53e204(0x1a2)](_0x53e204(0x1a4)+_0x1460a5+_0x53e204(0x190),{'body':_0x10bc24});return!_0xaa4db1[_0x53e204(0x1b5)][_0x53e204(0x1e5)]||_0xaa4db1['body'][_0x53e204(0x1e5)][_0x53e204(0x1db)]===0x1;}async[_0x19b36e(0x19d)](_0x199d33){const _0x18f3b7=_0x19b36e,{unitId:_0x51df42}=_0x199d33,_0x48df19=_0x199d33['threadId'],_0x2937e2={'memberId':this['_userService']['getCurrentUser']()[_0x18f3b7(0x1eb)],'unitId':_0x51df42,'threadId':_0x48df19,'solved':_0x199d33['resolved']?I['Solved']:I[_0x18f3b7(0x1bf)]},_0x2333a0=await this[_0x18f3b7(0x1c7)][_0x18f3b7(0x1a2)](_0x18f3b7(0x1a4)+_0x51df42+_0x18f3b7(0x18b),{'body':_0x2937e2});return!_0x2333a0[_0x18f3b7(0x1b5)][_0x18f3b7(0x1e5)]||_0x2333a0[_0x18f3b7(0x1b5)][_0x18f3b7(0x1e5)]['code']===0x1;}async[_0x19b36e(0x1e2)](_0x18a5f9,_0x32fdd7,_0x597fee,_0xfe6937){const _0x60a45a=_0x19b36e,_0x143d11={'memberId':(await this[_0x60a45a(0x1e3)][_0x60a45a(0x1c3)](_0x18a5f9))['getMemberID'](),'threadId':_0x597fee,'replyId':_0xfe6937,'unitId':_0x18a5f9},_0x258327=await this[_0x60a45a(0x1c7)]['post'](_0x60a45a(0x1a4)+_0x18a5f9+'/delete',{'body':_0x143d11});return!_0x258327[_0x60a45a(0x1b5)][_0x60a45a(0x1e5)]||_0x258327[_0x60a45a(0x1b5)][_0x60a45a(0x1e5)]['code']===0x1;}async[_0x19b36e(0x1b7)](_0x5d3e22,_0x32553a,_0x527ffe){const _0x416068=_0x19b36e,_0xf6a496={'unitId':_0x5d3e22,'threadId':_0x527ffe},_0x3cf0c3=await this[_0x416068(0x1c7)][_0x416068(0x1a2)](_0x416068(0x1a4)+_0x5d3e22+_0x416068(0x197),{'body':_0xf6a496}),_0x519c88=_0x527ffe[_0x416068(0x19a)](_0x133036=>ee(_0x3cf0c3[_0x416068(0x1b5)][_0x416068(0x191)][_0x133036],_0x5d3e22,_0x32553a))[_0x416068(0x1d1)](Boolean);return Object[_0x416068(0x1d6)](_0x3cf0c3[_0x416068(0x1b5)][_0x416068(0x1c5)])['forEach'](_0x5ef5a2=>{const _0x500655=_0x416068;this[_0x500655(0x18d)][_0x500655(0x19c)](_0x5ef5a2);}),_0x519c88;}[_0x19b36e(0x194)](_0x597e28){const _0x1aba85=_0x19b36e;return{'id':_0x597e28['id'],'threadId':_0x597e28[_0x1aba85(0x1b9)],'ref':_0x597e28[_0x1aba85(0x1bc)]};}};f=Q([_(0x0,_0xf42808(_0x39f633)),_(0x1,_0xf42808(_0x138e46)),_(0x2,_0xf42808(_0x432e86)),_(0x3,_0xf42808(_0x4e131e))],f);var re=Object[_0x19b36e(0x1b4)],te=(_0x595232,_0x2c3eb5,_0x5d6949,_0xfe86b4)=>{for(var _0x106014=_0xfe86b4>0x1?void 0x0:_0xfe86b4?re(_0x2c3eb5,_0x5d6949):_0x2c3eb5,_0x326467=_0x595232['length']-0x1,_0x655a58;_0x326467>=0x0;_0x326467--)(_0x655a58=_0x595232[_0x326467])&&(_0x106014=_0x655a58(_0x106014)||_0x106014);return _0x106014;},N=(_0x1c6779,_0x26106e)=>(_0x5b45eb,_0x5b8b8b)=>_0x26106e(_0x5b45eb,_0x5b8b8b,_0x1c6779);let g=class extends _0x36502f{constructor(_0x260650,_0x426a14){const _0x4799f0=_0x19b36e;super(),this[_0x4799f0(0x1aa)]=_0x260650,this[_0x4799f0(0x1ce)]=_0x426a14,this[_0x4799f0(0x1e1)]();}[_0x19b36e(0x1e1)](){const _0x791c00=_0x19b36e;this[_0x791c00(0x1aa)][_0x791c00(0x1b0)]=this[_0x791c00(0x1ce)],this[_0x791c00(0x1aa)][_0x791c00(0x1c4)]=!0x1;}};g=te([N(0x0,_0x14b700),N(0x1,_0xf42808(f))],g);function _0x388b(){const _0x222f89=['find','/solved','solved','_userService','slice','setConfig','/edit','comments','length','_commentService','saveCommentToSnapshot','userId','87202ySiJmb','/list','parentId','YYYY/MM/DD\x20HH:mm','map','thread-comment-data-source.config','addUser','resolveComment','_threadCommentModel','updateComment','root','getUser','post','_configService','/universer-api/comment/unit/','Add','Edit','_initUserSync','disposeWithMe','format','_threadCommentDataSourceService','Reply','comment','reply','stringify','pluginName','dataSource','getComment','payload','92892YXuOfI','getOwnPropertyDescriptor','body','175068BsdnFC','listComments','Solved','threadId','user','forEach','ref','commentUpdate$','replyId','OpenOrReOpen','/add','/universer-api/user/list','rangeId','requireSession','syncUpdateMutationToColla','users','82911xBnhNy','_httpService','content','get','/reply','_init','Delete','subscribe','_threadCommentDataSource','parse','7740NspyJO','filter','379162YSbcBg','addComment','Unknown','Solve','values','onStarting','personId','544960NmpSmG','UNIVER_UNKNOWN','code','6vIzjjo','getUnit','createTimestamp','customRanges','_injector','_initDataSource','deleteComment','_sessionService','size','error','delete','COMMENT','_config','type','onReady','userID','add','4820hfybBR','symbol','replies','55uYBNeZ','UNRECOGNIZED','rangeType'];_0x388b=function(){return _0x222f89;};return _0x388b();}var se=Object['defineProperty'],oe=Object[_0x19b36e(0x1b4)],ne=(_0x2fcb67,_0x1e2037,_0x20b212)=>_0x1e2037 in _0x2fcb67?se(_0x2fcb67,_0x1e2037,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x20b212}):_0x2fcb67[_0x1e2037]=_0x20b212,ie=(_0x97259f,_0x34731a,_0x47f5bc,_0x4d3e37)=>{const _0xbe0eaa=_0x19b36e;for(var _0x1b8287=_0x4d3e37>0x1?void 0x0:_0x4d3e37?oe(_0x34731a,_0x47f5bc):_0x34731a,_0x5ab6e1=_0x97259f[_0xbe0eaa(0x192)]-0x1,_0x1ff7b1;_0x5ab6e1>=0x0;_0x5ab6e1--)(_0x1ff7b1=_0x97259f[_0x5ab6e1])&&(_0x1b8287=_0x1ff7b1(_0x1b8287)||_0x1b8287);return _0x1b8287;},w=(_0x20f7db,_0x53c999)=>(_0x427c43,_0x5a53a6)=>_0x53c999(_0x427c43,_0x5a53a6,_0x20f7db),$=(_0x57eff4,_0x1f9d39,_0x3fed6a)=>ne(_0x57eff4,typeof _0x1f9d39!=_0x19b36e(0x1ee)?_0x1f9d39+'':_0x1f9d39,_0x3fed6a);let b=class extends _0xff9d47{constructor(_0x5b1619=M,_0x49580f,_0x1b8520){const _0x145d8c=_0x19b36e;super(),this[_0x145d8c(0x1e8)]=_0x5b1619,this[_0x145d8c(0x1e0)]=_0x49580f,this['_configService']=_0x1b8520;const {..._0x464419}=_0x52dbb1({},M,this[_0x145d8c(0x1e8)]);this[_0x145d8c(0x1a3)][_0x145d8c(0x18f)](z,_0x464419);}[_0x19b36e(0x1d7)](){[[f],[g],[S]]['forEach'](_0x2634f1=>{const _0x23b443=_0x118a;this[_0x23b443(0x1e0)][_0x23b443(0x1ec)](_0x2634f1);});}[_0x19b36e(0x1ea)](){const _0x4064ae=_0x19b36e;this['_injector'][_0x4064ae(0x1c9)](g),this['_injector'][_0x4064ae(0x1c9)](S);}};$(b,_0x19b36e(0x1af),W),$(b,_0x19b36e(0x1e9),_0x32c84e[_0x19b36e(0x1da)]),b=ie([_0x3f4a63(_0x420c06,_0xac1802,_0x41a098),w(0x1,_0xf42808(_0x4e131e)),w(0x2,_0x38e826)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x1886(_0x5e0cba,_0x33f3d9){const _0x2ddd80=_0x2ddd();return _0x1886=function(_0x188607,_0x35377b){_0x188607=_0x188607-0x1e0;let _0x5a85f3=_0x2ddd80[_0x188607];return _0x5a85f3;},_0x1886(_0x5e0cba,_0x33f3d9);}function _0x2ddd(){const _0x5e8a1d=['/universer-api/user/list','find','UNRECOGNIZED','@univerjs-pro/collaboration-client','stringify','Inject','slice','Unknown','getComment','Plugin','onStarting','_configService','730863woHWtd','type','3knshiU','UserManagerService','@univerjs/core','UniverCollaborationClientPlugin','symbol','_initDataSource','getUser','customRanges','195BAnPMF','UniverThreadCommentUi','addUser','_threadCommentDataSource','UniverThreadCommentDataSourcePlugin','_initUserSync','5870zVQKGA','OpenOrReOpen','/add','addComment','content','16969AWoEyo','@univerjs/network','3448cLQQnS','post','rangeType','reply','pluginName','dataSource','disposeWithMe','Add','Disposable','UniverLicensePlugin','forEach','length','filter','map','Solved','@univerjs/thread-comment-ui','solved','replies','get','863308AkRiXS','IThreadCommentDataSourceService','3311QxOsJK','listComments','UniverThreadComment','_httpService','YYYY/MM/DD\x20HH:mm','getUnit','commentUpdate$','UniverCore','values','personId','rxjs','parentId','onReady','merge','Delete','/universer-api/comment/unit/','/list','syncUpdateMutationToColla','_threadCommentDataSourceService','updateComment','code','_config','@univerjs-pro/license','179158DXkWhn','subscribe','_threadCommentModel','rangeId','/solved','amd','dayjs','4807iMsoRb','comment','user','@univerjs/thread-comment','UNIVER_UNKNOWN','thread-comment-data-source.config','/edit','requireSession','pipe','_userService','bufferTime','Solve','userID','getOwnPropertyDescriptor','/reply','size','deleteComment','root','userId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','ref','setConfig','resolved','saveCommentToSnapshot','threadId','HTTPService','error','comments','exports','parse','UniverProLicense','toStringTag','_sessionService','UniverInstanceType','CustomRangeType','function','createTimestamp','Module','Reply','7218wAvFEq','_init','getMemberID','replyId','_injector','add','body','Edit','object','users','Injector','COMMENT','resolveComment','DependentOn','delete'];_0x2ddd=function(){return _0x5e8a1d;};return _0x2ddd();}(function(_0x300401,_0x1cff33){const _0x5e9c95=_0x1886,_0x589ae3=_0x300401();while(!![]){try{const _0x310316=parseInt(_0x5e9c95(0x251))/0x1+-parseInt(_0x5e9c95(0x1f3))/0x2+parseInt(_0x5e9c95(0x23e))/0x3*(parseInt(_0x5e9c95(0x266))/0x4)+parseInt(_0x5e9c95(0x246))/0x5*(-parseInt(_0x5e9c95(0x221))/0x6)+-parseInt(_0x5e9c95(0x268))/0x7*(-parseInt(_0x5e9c95(0x253))/0x8)+parseInt(_0x5e9c95(0x23c))/0x9+-parseInt(_0x5e9c95(0x24c))/0xa*(parseInt(_0x5e9c95(0x1fa))/0xb);if(_0x310316===_0x1cff33)break;else _0x589ae3['push'](_0x589ae3['shift']());}catch(_0x19b070){_0x589ae3['push'](_0x589ae3['shift']());}}}(_0x2ddd,0x1e7b3),function(_0x369f64,_0x5511c7){const _0x25f841=_0x1886;typeof exports==_0x25f841(0x229)&&typeof module<'u'?_0x5511c7(exports,require('@univerjs-pro/collaboration-client'),require(_0x25f841(0x1f2)),require(_0x25f841(0x240)),require(_0x25f841(0x262)),require(_0x25f841(0x1fd)),require(_0x25f841(0x1e6)),require(_0x25f841(0x252))):typeof define==_0x25f841(0x21d)&&define[_0x25f841(0x1f8)]?define([_0x25f841(0x216),_0x25f841(0x233),_0x25f841(0x1f2),_0x25f841(0x240),'@univerjs/thread-comment-ui',_0x25f841(0x1fd),_0x25f841(0x1e6),_0x25f841(0x252)],_0x5511c7):(_0x369f64=typeof globalThis<'u'?globalThis:_0x369f64||self,_0x5511c7(_0x369f64['UniverProThreadCommentDatasource']={},_0x369f64['UniverProCollaborationClient'],_0x369f64[_0x25f841(0x218)],_0x369f64[_0x25f841(0x1e3)],_0x369f64[_0x25f841(0x247)],_0x369f64[_0x25f841(0x26a)],_0x369f64[_0x25f841(0x1e6)],_0x369f64['UniverNetwork']));}(this,function(_0x196c1b,_0x2ed30a,_0x4644ff,_0x53ea67,_0x32dfc5,_0x4d3a93,_0x3107a4,_0x1e6624){'use strict';const _0x8d8e3d=_0x1886;const _0x35b4e4=_0x8d8e3d(0x20d);var _0x5a5666=(_0x293727=>(_0x293727[_0x293727[_0x8d8e3d(0x24d)]=0x0]='OpenOrReOpen',_0x293727[_0x293727[_0x8d8e3d(0x261)]=0x1]='Solved',_0x293727[_0x293727[_0x8d8e3d(0x232)]=-0x1]=_0x8d8e3d(0x232),_0x293727))(_0x5a5666||{}),_0x2d65d6=(_0x45f08b=>(_0x45f08b[_0x45f08b['Unknown']=0x0]=_0x8d8e3d(0x237),_0x45f08b[_0x45f08b['Add']=0x1]='Add',_0x45f08b[_0x45f08b[_0x8d8e3d(0x220)]=0x2]='Reply',_0x45f08b[_0x45f08b[_0x8d8e3d(0x228)]=0x3]=_0x8d8e3d(0x228),_0x45f08b[_0x45f08b[_0x8d8e3d(0x1ea)]=0x4]=_0x8d8e3d(0x1ea),_0x45f08b[_0x45f08b['Solve']=0x5]=_0x8d8e3d(0x205),_0x45f08b[_0x45f08b[_0x8d8e3d(0x232)]=-0x1]=_0x8d8e3d(0x232),_0x45f08b))(_0x2d65d6||{});const _0x45ccb4=_0x519299=>_0x53ea67[_0x8d8e3d(0x1f9)](new Date(+_0x519299))['format'](_0x8d8e3d(0x1e0)),_0x4a4ee9=async(_0x95deda,_0x4ca90e)=>{const _0x4e1ab2=_0x8d8e3d,_0x1f929e=_0x95deda[_0x4e1ab2(0x265)](_0x53ea67[_0x4e1ab2(0x23f)]),_0x2cdfa3=_0x95deda['get'](_0x1e6624[_0x4e1ab2(0x213)]);_0x4ca90e[_0x4e1ab2(0x25d)](_0x401e8e=>{const _0x2b4d87=_0x4e1ab2;_0x1f929e[_0x2b4d87(0x244)](_0x401e8e)&&_0x4ca90e[_0x2b4d87(0x22f)](_0x401e8e);}),_0x4ca90e[_0x4e1ab2(0x209)]&&(await _0x2cdfa3['get'](_0x4e1ab2(0x230),{'params':{'userIDs':[..._0x4ca90e]}}))[_0x4e1ab2(0x227)][_0x4e1ab2(0x22a)][_0x4e1ab2(0x25d)](_0x5eb121=>{const _0x3c503b=_0x4e1ab2;_0x5eb121&&_0x1f929e[_0x3c503b(0x248)](_0x5eb121);});};var _0x2086ac=Object['getOwnPropertyDescriptor'],_0x1a23da=(_0x2b2786,_0x3b8e43,_0x6ddc9f,_0x56a35d)=>{const _0x404826=_0x8d8e3d;for(var _0x12c580=_0x56a35d>0x1?void 0x0:_0x56a35d?_0x2086ac(_0x3b8e43,_0x6ddc9f):_0x3b8e43,_0x5ac9fc=_0x2b2786[_0x404826(0x25e)]-0x1,_0x4aaf8c;_0x5ac9fc>=0x0;_0x5ac9fc--)(_0x4aaf8c=_0x2b2786[_0x5ac9fc])&&(_0x12c580=_0x4aaf8c(_0x12c580)||_0x12c580);return _0x12c580;},_0x18b178=(_0x13f69d,_0x2a2906)=>(_0x1e3ba9,_0x34587e)=>_0x2a2906(_0x1e3ba9,_0x34587e,_0x13f69d);let _0x40513c=class extends _0x53ea67[_0x8d8e3d(0x25b)]{constructor(_0xa12e6b,_0x2ea3f0,_0x56d5c2,_0x4ab0fd){const _0x347ba5=_0x8d8e3d;super(),this['_commentService']=_0xa12e6b,this[_0x347ba5(0x1f5)]=_0x2ea3f0,this[_0x347ba5(0x203)]=_0x56d5c2,this[_0x347ba5(0x225)]=_0x4ab0fd,this[_0x347ba5(0x222)](),this[_0x347ba5(0x24b)]();}[_0x8d8e3d(0x24b)](){const _0x1ad9a3=_0x8d8e3d;this[_0x1ad9a3(0x259)](this[_0x1ad9a3(0x1f5)][_0x1ad9a3(0x1e2)][_0x1ad9a3(0x202)](_0x3107a4[_0x1ad9a3(0x204)](0x10))[_0x1ad9a3(0x1f4)](_0xfe9991=>{const _0x20d8c9=_0x1ad9a3,_0x228835=new Set();_0xfe9991[_0x20d8c9(0x25d)](_0x4a0391=>{const _0x5cf748=_0x20d8c9;switch(_0x4a0391[_0x5cf748(0x23d)]){case _0x5cf748(0x226):{const _0x55dcc5=_0x4a0391['payload'][_0x5cf748(0x1e5)];_0x228835[_0x5cf748(0x226)](_0x55dcc5);break;}}}),_0x4a4ee9(this[_0x20d8c9(0x225)],_0x228835);}));}[_0x8d8e3d(0x222)](){const _0x354d97=_0x8d8e3d;this[_0x354d97(0x259)](this['_commentService'][_0x354d97(0x1e2)][_0x354d97(0x1f4)](async _0x3d73ee=>{const _0xea572b=_0x354d97;var _0x513ad1,_0x2420be,_0x581dd4,_0x362012;const _0x293775=(_0x513ad1=this['_threadCommentModel'][_0xea572b(0x1e1)](_0x3d73ee['unitId'])['find'](_0xb4229d=>_0xb4229d['threadId']===_0x3d73ee[_0xea572b(0x212)]))==null?void 0x0:_0x513ad1[_0xea572b(0x20b)];if(!_0x293775)return;const {unitId:_0x4d1554,subUnitId:_0x108128}=_0x293775;switch(_0x3d73ee['user']&&this['_userService'][_0xea572b(0x248)](_0x3d73ee['user']),_0x3d73ee[_0xea572b(0x23d)]){case _0x2d65d6[_0xea572b(0x25a)]:break;case _0x2d65d6[_0xea572b(0x220)]:{this[_0xea572b(0x1f5)][_0xea572b(0x24f)](_0x4d1554,_0x108128,{'unitId':_0x4d1554,'subUnitId':_0x108128,'ref':'','id':_0x3d73ee[_0xea572b(0x224)],'dT':_0x45ccb4(+_0x3d73ee[_0xea572b(0x21e)]),'threadId':_0x3d73ee[_0xea572b(0x212)],'personId':(_0x581dd4=(_0x2420be=_0x3d73ee[_0xea572b(0x1fc)])==null?void 0x0:_0x2420be[_0xea572b(0x206)])!=null?_0x581dd4:_0x3d73ee[_0xea572b(0x20c)],'text':JSON[_0xea572b(0x217)](_0x3d73ee['content']),'parentId':_0x293775['id']});break;}case _0x2d65d6['Delete']:{const _0x43cda5=this[_0xea572b(0x1f5)][_0xea572b(0x238)](_0x4d1554,_0x108128,_0x3d73ee[_0xea572b(0x224)]);_0x43cda5&&_0x43cda5[_0xea572b(0x1e7)]&&this[_0xea572b(0x1f5)][_0xea572b(0x20a)](_0x4d1554,_0x108128,_0x3d73ee['replyId']);break;}case _0x2d65d6[_0xea572b(0x228)]:{this['_threadCommentModel'][_0xea572b(0x1ef)](_0x4d1554,_0x108128,{'commentId':_0x3d73ee[_0xea572b(0x224)],'text':JSON[_0xea572b(0x217)](_0x3d73ee['content'])});break;}case _0x2d65d6['Solve']:{const _0x30e102=(_0x362012=this[_0xea572b(0x1f5)][_0xea572b(0x1e1)](_0x3d73ee['unitId'])[_0xea572b(0x231)](_0x2b29f1=>_0x2b29f1['threadId']===_0x3d73ee[_0xea572b(0x212)]))==null?void 0x0:_0x362012[_0xea572b(0x20b)];_0x30e102&&this[_0xea572b(0x1f5)][_0xea572b(0x22d)](_0x4d1554,_0x108128,_0x30e102['id'],_0x3d73ee[_0xea572b(0x263)]===_0x5a5666[_0xea572b(0x261)]);break;}}}));}};_0x40513c=_0x1a23da([_0x18b178(0x0,_0x53ea67[_0x8d8e3d(0x235)](_0x2ed30a['CommentService'])),_0x18b178(0x1,_0x53ea67[_0x8d8e3d(0x235)](_0x4d3a93['ThreadCommentModel'])),_0x18b178(0x2,_0x53ea67[_0x8d8e3d(0x235)](_0x53ea67[_0x8d8e3d(0x23f)])),_0x18b178(0x3,_0x53ea67[_0x8d8e3d(0x235)](_0x53ea67[_0x8d8e3d(0x22b)]))],_0x40513c);const _0x269bef=_0x8d8e3d(0x1ff),_0x4f14c7={};var _0x2d560b=Object[_0x8d8e3d(0x207)],_0xa7fee2=(_0x678999,_0x3c8462,_0x5a7df7,_0x16df7e)=>{const _0x2d5b38=_0x8d8e3d;for(var _0x288621=_0x16df7e>0x1?void 0x0:_0x16df7e?_0x2d560b(_0x3c8462,_0x5a7df7):_0x3c8462,_0x895872=_0x678999[_0x2d5b38(0x25e)]-0x1,_0x3bf4de;_0x895872>=0x0;_0x895872--)(_0x3bf4de=_0x678999[_0x895872])&&(_0x288621=_0x3bf4de(_0x288621)||_0x288621);return _0x288621;},_0x489a18=(_0x3009f3,_0x4fd032)=>(_0x12e650,_0x23e3e0)=>_0x4fd032(_0x12e650,_0x23e3e0,_0x3009f3);function _0xa66f79(_0x208436,_0x3f445e){const _0x45cc2c=_0x8d8e3d,_0x5bb00b=_0x208436[_0x45cc2c(0x264)][0x0];return{..._0x3f445e,'id':_0x5bb00b[_0x45cc2c(0x224)],'resolved':_0x208436[_0x45cc2c(0x263)]===0x1,'dT':_0x45ccb4(_0x5bb00b['createTimestamp']),'personId':_0x5bb00b[_0x45cc2c(0x20c)],'threadId':_0x5bb00b[_0x45cc2c(0x212)]};}function _0x1deb81(_0x284ffc,_0x19eb47,_0x2513cb){const _0x3fd048=_0x8d8e3d;var _0x3137c4,_0x5e8511;if(((_0x5e8511=(_0x3137c4=_0x284ffc==null?void 0x0:_0x284ffc[_0x3fd048(0x264)])==null?void 0x0:_0x3137c4[_0x3fd048(0x25e)])!=null?_0x5e8511:0x0)>0x0){const _0x2ef2f4=(_0x2deb92,_0x40fddf)=>({'id':_0x2deb92[_0x3fd048(0x224)],'threadId':_0x2deb92[_0x3fd048(0x212)],'dT':_0x45ccb4(_0x2deb92[_0x3fd048(0x21e)]),'personId':_0x2deb92[_0x3fd048(0x20c)],'resolved':_0x284ffc[_0x3fd048(0x263)]===_0x5a5666[_0x3fd048(0x261)],'unitId':_0x19eb47,'subUnitId':_0x2513cb,'text':JSON[_0x3fd048(0x217)](_0x2deb92[_0x3fd048(0x250)]),'parentId':_0x40fddf}),_0x4dc30c=_0x2ef2f4(_0x284ffc[_0x3fd048(0x264)][0x0]);return{..._0x4dc30c,'children':_0x284ffc[_0x3fd048(0x264)][_0x3fd048(0x236)](0x1)[_0x3fd048(0x260)](_0x1e6c55=>_0x2ef2f4(_0x1e6c55,_0x4dc30c['id']))};}return null;}let _0x309cac=class{constructor(_0x20b2e4,_0x39c8f9,_0x27ccc8,_0x8774c4){const _0x36b956=_0x8d8e3d;this['_httpService']=_0x20b2e4,this[_0x36b956(0x203)]=_0x39c8f9,this[_0x36b956(0x21a)]=_0x27ccc8,this[_0x36b956(0x225)]=_0x8774c4;}async[_0x8d8e3d(0x24f)](_0x536a37){const _0x871a3a=_0x8d8e3d;var _0x1dd18e,_0x50e4b8;const {parentId:_0x5aec9c,unitId:_0x102a3f,text:_0x54485b,threadId:_0x3738b7}=_0x536a37,_0x104b8c=(_0x50e4b8=(_0x1dd18e=_0x54485b[_0x871a3a(0x245)])==null?void 0x0:_0x1dd18e['filter'](_0x5ed00e=>_0x5ed00e[_0x871a3a(0x255)]===_0x53ea67[_0x871a3a(0x21c)][_0x871a3a(0x22c)])[_0x871a3a(0x260)](_0x479efd=>_0x479efd[_0x871a3a(0x1f6)]))!=null?_0x50e4b8:[],_0x518544=JSON[_0x871a3a(0x234)](_0x54485b),_0x2c0255=(await this[_0x871a3a(0x21a)][_0x871a3a(0x201)](_0x102a3f))[_0x871a3a(0x223)]();if(_0x5aec9c){const _0x34094c={'memberId':_0x2c0255,'unitId':_0x102a3f,'content':_0x518544,'mention':_0x104b8c,'threadId':_0x3738b7},_0x418e65=(await this[_0x871a3a(0x26b)][_0x871a3a(0x254)]('/universer-api/comment/unit/'+_0x102a3f+_0x871a3a(0x208),{'body':_0x34094c}))['body'][_0x871a3a(0x256)];return{..._0x536a37,'id':_0x418e65[_0x871a3a(0x224)],'dT':_0x53ea67[_0x871a3a(0x1f9)](+_0x418e65['createTimestamp'])['format'](_0x871a3a(0x1e0)),'personId':_0x418e65[_0x871a3a(0x20c)]};}else{const _0x1134d9={'memberId':_0x2c0255,'unitId':_0x102a3f,'content':_0x518544,'mention':_0x104b8c},_0x4cbe3d=await this[_0x871a3a(0x26b)][_0x871a3a(0x254)](_0x871a3a(0x1eb)+_0x102a3f+_0x871a3a(0x24e),{'body':_0x1134d9});return _0xa66f79(_0x4cbe3d[_0x871a3a(0x227)][_0x871a3a(0x1fb)],_0x536a37);}}async[_0x8d8e3d(0x1ef)](_0x33e6a1){const _0x197984=_0x8d8e3d;var _0xd58beb,_0x142023;const {text:_0x4e8a20,unitId:_0x1e9337}=_0x33e6a1,_0x2728fa=(_0x142023=(_0xd58beb=_0x4e8a20['customRanges'])==null?void 0x0:_0xd58beb['filter'](_0x3306aa=>_0x3306aa[_0x197984(0x255)]===_0x53ea67[_0x197984(0x21c)]['COMMENT'])[_0x197984(0x260)](_0x1a46e9=>_0x1a46e9[_0x197984(0x1f6)]))!=null?_0x142023:[],_0x1f869b=JSON[_0x197984(0x234)](_0x4e8a20),_0x2e75e1=_0x33e6a1[_0x197984(0x212)],_0x15d194=_0x33e6a1['id'],_0x460dd6={'memberId':(await this[_0x197984(0x21a)][_0x197984(0x201)](_0x1e9337))[_0x197984(0x223)](),'unitId':_0x1e9337,'threadId':_0x2e75e1,'mention':_0x2728fa,'content':_0x1f869b,'replyId':_0x15d194},_0x2a5f81=await this['_httpService'][_0x197984(0x254)](_0x197984(0x1eb)+_0x1e9337+_0x197984(0x200),{'body':_0x460dd6});return!_0x2a5f81[_0x197984(0x227)]['error']||_0x2a5f81[_0x197984(0x227)][_0x197984(0x214)][_0x197984(0x1f0)]===0x1;}async[_0x8d8e3d(0x22d)](_0x483376){const _0x173fac=_0x8d8e3d,{unitId:_0x3dbb49}=_0x483376,_0x11d1ba=_0x483376[_0x173fac(0x212)],_0x56535e={'memberId':this[_0x173fac(0x203)]['getCurrentUser']()[_0x173fac(0x206)],'unitId':_0x3dbb49,'threadId':_0x11d1ba,'solved':_0x483376[_0x173fac(0x210)]?_0x5a5666['Solved']:_0x5a5666[_0x173fac(0x24d)]},_0x321d57=await this[_0x173fac(0x26b)][_0x173fac(0x254)](_0x173fac(0x1eb)+_0x3dbb49+_0x173fac(0x1f7),{'body':_0x56535e});return!_0x321d57[_0x173fac(0x227)]['error']||_0x321d57[_0x173fac(0x227)]['error'][_0x173fac(0x1f0)]===0x1;}async[_0x8d8e3d(0x20a)](_0x59b818,_0x1e73fe,_0x346667,_0x32ee47){const _0x5b3e84=_0x8d8e3d,_0x27cb76={'memberId':(await this['_sessionService']['requireSession'](_0x59b818))['getMemberID'](),'threadId':_0x346667,'replyId':_0x32ee47,'unitId':_0x59b818},_0x4ed956=await this[_0x5b3e84(0x26b)][_0x5b3e84(0x254)](_0x5b3e84(0x1eb)+_0x59b818+'/delete',{'body':_0x27cb76});return!_0x4ed956[_0x5b3e84(0x227)][_0x5b3e84(0x214)]||_0x4ed956['body'][_0x5b3e84(0x214)]['code']===0x1;}async[_0x8d8e3d(0x269)](_0x39fdc2,_0x2289b5,_0x30db5d){const _0x699f1f=_0x8d8e3d,_0x569ee4={'unitId':_0x39fdc2,'threadId':_0x30db5d},_0x5f49ae=await this[_0x699f1f(0x26b)][_0x699f1f(0x254)]('/universer-api/comment/unit/'+_0x39fdc2+_0x699f1f(0x1ec),{'body':_0x569ee4}),_0x222862=_0x30db5d['map'](_0x25925e=>_0x1deb81(_0x5f49ae[_0x699f1f(0x227)][_0x699f1f(0x215)][_0x25925e],_0x39fdc2,_0x2289b5))[_0x699f1f(0x25f)](Boolean);return Object[_0x699f1f(0x1e4)](_0x5f49ae[_0x699f1f(0x227)][_0x699f1f(0x22a)])[_0x699f1f(0x25d)](_0x4225e8=>{const _0x4ca643=_0x699f1f;this[_0x4ca643(0x203)][_0x4ca643(0x248)](_0x4225e8);}),_0x222862;}[_0x8d8e3d(0x211)](_0x4c5b61){const _0x2d854c=_0x8d8e3d;return{'id':_0x4c5b61['id'],'threadId':_0x4c5b61[_0x2d854c(0x212)],'ref':_0x4c5b61[_0x2d854c(0x20e)]};}};_0x309cac=_0xa7fee2([_0x489a18(0x0,_0x53ea67[_0x8d8e3d(0x235)](_0x1e6624[_0x8d8e3d(0x213)])),_0x489a18(0x1,_0x53ea67[_0x8d8e3d(0x235)](_0x53ea67[_0x8d8e3d(0x23f)])),_0x489a18(0x2,_0x53ea67[_0x8d8e3d(0x235)](_0x2ed30a['CollaborationSessionService'])),_0x489a18(0x3,_0x53ea67['Inject'](_0x53ea67[_0x8d8e3d(0x22b)]))],_0x309cac);var _0x5e2c06=Object[_0x8d8e3d(0x207)],_0x2177c4=(_0xfbb8b8,_0x3f5db0,_0x30b707,_0x225dcb)=>{const _0x40ba87=_0x8d8e3d;for(var _0x56f477=_0x225dcb>0x1?void 0x0:_0x225dcb?_0x5e2c06(_0x3f5db0,_0x30b707):_0x3f5db0,_0x48f39a=_0xfbb8b8[_0x40ba87(0x25e)]-0x1,_0x505a64;_0x48f39a>=0x0;_0x48f39a--)(_0x505a64=_0xfbb8b8[_0x48f39a])&&(_0x56f477=_0x505a64(_0x56f477)||_0x56f477);return _0x56f477;},_0xe4d41f=(_0x221f06,_0x26e419)=>(_0x18aeec,_0x5db64a)=>_0x26e419(_0x18aeec,_0x5db64a,_0x221f06);let _0x2219be=class extends _0x53ea67[_0x8d8e3d(0x25b)]{constructor(_0x515812,_0xe87665){const _0x531c26=_0x8d8e3d;super(),this[_0x531c26(0x1ee)]=_0x515812,this[_0x531c26(0x249)]=_0xe87665,this[_0x531c26(0x243)]();}[_0x8d8e3d(0x243)](){const _0x4973dc=_0x8d8e3d;this[_0x4973dc(0x1ee)][_0x4973dc(0x258)]=this['_threadCommentDataSource'],this[_0x4973dc(0x1ee)][_0x4973dc(0x1ed)]=!0x1;}};_0x2219be=_0x2177c4([_0xe4d41f(0x0,_0x4d3a93[_0x8d8e3d(0x267)]),_0xe4d41f(0x1,_0x53ea67[_0x8d8e3d(0x235)](_0x309cac))],_0x2219be);var _0x9be933=Object['defineProperty'],_0xdbe7bc=Object[_0x8d8e3d(0x207)],_0x3f13c1=(_0x4dcf6e,_0x424319,_0x8dd5ce)=>_0x424319 in _0x4dcf6e?_0x9be933(_0x4dcf6e,_0x424319,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x8dd5ce}):_0x4dcf6e[_0x424319]=_0x8dd5ce,_0x817ce2=(_0x3db1e6,_0x220de8,_0x2ab4df,_0x4898b5)=>{const _0x58190a=_0x8d8e3d;for(var _0x44df17=_0x4898b5>0x1?void 0x0:_0x4898b5?_0xdbe7bc(_0x220de8,_0x2ab4df):_0x220de8,_0x607ecc=_0x3db1e6[_0x58190a(0x25e)]-0x1,_0x43b042;_0x607ecc>=0x0;_0x607ecc--)(_0x43b042=_0x3db1e6[_0x607ecc])&&(_0x44df17=_0x43b042(_0x44df17)||_0x44df17);return _0x44df17;},_0x20b68c=(_0x310fb6,_0xd74139)=>(_0x3dbd7c,_0x5f2054)=>_0xd74139(_0x3dbd7c,_0x5f2054,_0x310fb6),_0x1dc1a9=(_0x4981dc,_0x58444f,_0x16732f)=>_0x3f13c1(_0x4981dc,typeof _0x58444f!=_0x8d8e3d(0x242)?_0x58444f+'':_0x58444f,_0x16732f);_0x196c1b[_0x8d8e3d(0x24a)]=class extends _0x53ea67[_0x8d8e3d(0x239)]{constructor(_0x511919=_0x4f14c7,_0x5ece5a,_0x2bc700){const _0x1a1526=_0x8d8e3d;super(),this[_0x1a1526(0x1f1)]=_0x511919,this[_0x1a1526(0x225)]=_0x5ece5a,this[_0x1a1526(0x23b)]=_0x2bc700;const {..._0x5d10a7}=_0x53ea67[_0x1a1526(0x1e9)]({},_0x4f14c7,this[_0x1a1526(0x1f1)]);this[_0x1a1526(0x23b)][_0x1a1526(0x20f)](_0x269bef,_0x5d10a7);}[_0x8d8e3d(0x23a)](){const _0x54ac1b=_0x8d8e3d;[[_0x309cac],[_0x2219be],[_0x40513c]][_0x54ac1b(0x25d)](_0x309e3a=>{const _0x29ba6a=_0x54ac1b;this[_0x29ba6a(0x225)][_0x29ba6a(0x226)](_0x309e3a);});}[_0x8d8e3d(0x1e8)](){const _0x500209=_0x8d8e3d;this[_0x500209(0x225)][_0x500209(0x265)](_0x2219be),this[_0x500209(0x225)][_0x500209(0x265)](_0x40513c);}},_0x1dc1a9(_0x196c1b[_0x8d8e3d(0x24a)],_0x8d8e3d(0x257),_0x35b4e4),_0x1dc1a9(_0x196c1b['UniverThreadCommentDataSourcePlugin'],'type',_0x53ea67[_0x8d8e3d(0x21b)][_0x8d8e3d(0x1fe)]),_0x196c1b[_0x8d8e3d(0x24a)]=_0x817ce2([_0x53ea67[_0x8d8e3d(0x22e)](_0x32dfc5['UniverThreadCommentUIPlugin'],_0x2ed30a[_0x8d8e3d(0x241)],_0x4644ff[_0x8d8e3d(0x25c)]),_0x20b68c(0x1,_0x53ea67['Inject'](_0x53ea67[_0x8d8e3d(0x22b)])),_0x20b68c(0x2,_0x53ea67['IConfigService'])],_0x196c1b[_0x8d8e3d(0x24a)]),Object['defineProperty'](_0x196c1b,Symbol[_0x8d8e3d(0x219)],{'value':_0x8d8e3d(0x21f)});}));
1
+ function _0x54ba(){const _0x58584c=['UNRECOGNIZED','onStarting','/delete','@univerjs-pro/collaboration-client','amd','30bFbdGY','_threadCommentDataSource','CommentService','onReady','resolveComment','solved','comment','personId','find','dataSource','filter','81117MMBFRA','parse','@univerjs/network','IConfigService','Injector','error','createTimestamp','UniverNetwork','UniverThreadCommentDataSourcePlugin','CustomRangeType','unitId','CollaborationSessionService','get','userID','@univerjs-pro/license','8RTxyCc','type','forEach','pipe','_threadCommentModel','Delete','slice','YYYY/MM/DD\x20HH:mm','@univerjs/thread-comment-ui','parentId','ref','threadId','Plugin','/universer-api/comment/unit/','function','@univerjs/core','UniverThreadCommentUIPlugin','HTTPService','format','1831340gCQwdP','replyId','_httpService','Reply','_configService','getUnit','add','_sessionService','608943pEgpZz','rangeType','symbol','UniverProLicense','_initUserSync','defineProperty','dayjs','UniverProThreadCommentDatasource','UniverLicensePlugin','rangeId','map','disposeWithMe','code','object','user','root','updateComment','UniverCollaborationClientPlugin','requireSession','Inject','1338205PQaJom','post','getMemberID','Module','reply','userId','length','merge','rxjs','@univerjs/thread-comment','UserManagerService','_userService','listComments','Solved','Add','users','toStringTag','exports','257745pqYABW','replies','Disposable','getCurrentUser','_initDataSource','UNIVER_UNKNOWN','/universer-api/user/list','Solve','54170JjyGCi','customRanges','_init','OpenOrReOpen','addUser','syncUpdateMutationToColla','addComment','content','getUser','_threadCommentDataSourceService','getOwnPropertyDescriptor','setConfig','_injector','comments','body','subscribe','UniverCore','90FTDYMP','379736oJcYAg','DependentOn','bufferTime','_commentService','Unknown','stringify','commentUpdate$','resolved','4jHRFhy','/add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','values','IThreadCommentDataSourceService'];_0x54ba=function(){return _0x58584c;};return _0x54ba();}function _0x10c8(_0x89588,_0x261e17){const _0x54bae6=_0x54ba();return _0x10c8=function(_0x10c8ef,_0x1bb630){_0x10c8ef=_0x10c8ef-0x1ce;let _0x312434=_0x54bae6[_0x10c8ef];return _0x312434;},_0x10c8(_0x89588,_0x261e17);}(function(_0x197d28,_0x3b0dbd){const _0x40867c=_0x10c8,_0x51d4e1=_0x197d28();while(!![]){try{const _0x15ed46=-parseInt(_0x40867c(0x237))/0x1+-parseInt(_0x40867c(0x249))/0x2+parseInt(_0x40867c(0x209))/0x3*(-parseInt(_0x40867c(0x251))/0x4)+-parseInt(_0x40867c(0x22f))/0x5*(parseInt(_0x40867c(0x1d4))/0x6)+-parseInt(_0x40867c(0x201))/0x7+-parseInt(_0x40867c(0x1ee))/0x8*(-parseInt(_0x40867c(0x1df))/0x9)+-parseInt(_0x40867c(0x248))/0xa*(-parseInt(_0x40867c(0x21d))/0xb);if(_0x15ed46===_0x3b0dbd)break;else _0x51d4e1['push'](_0x51d4e1['shift']());}catch(_0x5b97bd){_0x51d4e1['push'](_0x51d4e1['shift']());}}}(_0x54ba,0x21934),function(_0x59ead4,_0x48adcb){const _0x2a7acb=_0x10c8;typeof exports==_0x2a7acb(0x216)&&typeof module<'u'?_0x48adcb(exports,require(_0x2a7acb(0x1d2)),require(_0x2a7acb(0x1ed)),require(_0x2a7acb(0x1fd)),require(_0x2a7acb(0x1f6)),require(_0x2a7acb(0x226)),require(_0x2a7acb(0x225)),require(_0x2a7acb(0x1e1))):typeof define==_0x2a7acb(0x1fc)&&define[_0x2a7acb(0x1d3)]?define([_0x2a7acb(0x22e),_0x2a7acb(0x1d2),_0x2a7acb(0x1ed),'@univerjs/core',_0x2a7acb(0x1f6),_0x2a7acb(0x226),'rxjs','@univerjs/network'],_0x48adcb):(_0x59ead4=typeof globalThis<'u'?globalThis:_0x59ead4||self,_0x48adcb(_0x59ead4[_0x2a7acb(0x210)]={},_0x59ead4['UniverProCollaborationClient'],_0x59ead4[_0x2a7acb(0x20c)],_0x59ead4[_0x2a7acb(0x247)],_0x59ead4['UniverThreadCommentUi'],_0x59ead4['UniverThreadComment'],_0x59ead4['rxjs'],_0x59ead4[_0x2a7acb(0x1e6)]));}(this,function(_0x480aa,_0x33062a,_0x150096,_0x2806bf,_0x3ef08e,_0x4b7281,_0x1d4a53,_0x395f6a){'use strict';const _0xcc7740=_0x10c8;const _0x1c4516=_0xcc7740(0x253);var _0x3894ad=(_0x506ca8=>(_0x506ca8[_0x506ca8[_0xcc7740(0x23a)]=0x0]='OpenOrReOpen',_0x506ca8[_0x506ca8[_0xcc7740(0x22a)]=0x1]=_0xcc7740(0x22a),_0x506ca8[_0x506ca8['UNRECOGNIZED']=-0x1]=_0xcc7740(0x1cf),_0x506ca8))(_0x3894ad||{}),_0x2eb2c7=(_0x519bf4=>(_0x519bf4[_0x519bf4[_0xcc7740(0x24d)]=0x0]='Unknown',_0x519bf4[_0x519bf4[_0xcc7740(0x22b)]=0x1]=_0xcc7740(0x22b),_0x519bf4[_0x519bf4[_0xcc7740(0x204)]=0x2]='Reply',_0x519bf4[_0x519bf4[_0xcc7740(0x254)]=0x3]=_0xcc7740(0x254),_0x519bf4[_0x519bf4[_0xcc7740(0x1f3)]=0x4]='Delete',_0x519bf4[_0x519bf4[_0xcc7740(0x236)]=0x5]='Solve',_0x519bf4[_0x519bf4['UNRECOGNIZED']=-0x1]=_0xcc7740(0x1cf),_0x519bf4))(_0x2eb2c7||{});const _0xcdd055=_0x506fed=>_0x2806bf['dayjs'](new Date(+_0x506fed))[_0xcc7740(0x200)](_0xcc7740(0x1f5)),_0x46fa8b=async(_0x61e72,_0x36a004)=>{const _0x48dca9=_0xcc7740,_0x2a8d5f=_0x61e72[_0x48dca9(0x1eb)](_0x2806bf['UserManagerService']),_0x5948fd=_0x61e72[_0x48dca9(0x1eb)](_0x395f6a[_0x48dca9(0x1ff)]);_0x36a004[_0x48dca9(0x1f0)](_0x1e9525=>{const _0x312b80=_0x48dca9;_0x2a8d5f[_0x312b80(0x23f)](_0x1e9525)&&_0x36a004['delete'](_0x1e9525);}),_0x36a004['size']&&(await _0x5948fd[_0x48dca9(0x1eb)](_0x48dca9(0x235),{'params':{'userIDs':[..._0x36a004]}}))[_0x48dca9(0x245)][_0x48dca9(0x22c)][_0x48dca9(0x1f0)](_0x4491f7=>{const _0x32d776=_0x48dca9;_0x4491f7&&_0x2a8d5f[_0x32d776(0x23b)](_0x4491f7);});};var _0x238854=Object[_0xcc7740(0x241)],_0x3e1896=(_0x1c94dd,_0x204a21,_0x5c645a,_0x3e6a6e)=>{for(var _0x477aa4=_0x3e6a6e>0x1?void 0x0:_0x3e6a6e?_0x238854(_0x204a21,_0x5c645a):_0x204a21,_0x2ab741=_0x1c94dd['length']-0x1,_0x88efb0;_0x2ab741>=0x0;_0x2ab741--)(_0x88efb0=_0x1c94dd[_0x2ab741])&&(_0x477aa4=_0x88efb0(_0x477aa4)||_0x477aa4);return _0x477aa4;},_0x39d2af=(_0x5b5c75,_0x487ddf)=>(_0x3b5754,_0x1ec067)=>_0x487ddf(_0x3b5754,_0x1ec067,_0x5b5c75);let _0x3d0ad6=class extends _0x2806bf[_0xcc7740(0x231)]{constructor(_0x4aabda,_0x4cb921,_0x259cf9,_0x13903b){const _0x15f526=_0xcc7740;super(),this[_0x15f526(0x24c)]=_0x4aabda,this['_threadCommentModel']=_0x4cb921,this[_0x15f526(0x228)]=_0x259cf9,this['_injector']=_0x13903b,this['_init'](),this[_0x15f526(0x20d)]();}[_0xcc7740(0x20d)](){const _0x272c0a=_0xcc7740;this[_0x272c0a(0x214)](this[_0x272c0a(0x1f2)][_0x272c0a(0x24f)][_0x272c0a(0x1f1)](_0x1d4a53[_0x272c0a(0x24b)](0x10))[_0x272c0a(0x246)](_0x3309df=>{const _0x3655de=_0x272c0a,_0x25ae92=new Set();_0x3309df[_0x3655de(0x1f0)](_0x5ddeef=>{const _0x569fc5=_0x3655de;switch(_0x5ddeef[_0x569fc5(0x1ef)]){case _0x569fc5(0x207):{const _0x28d9da=_0x5ddeef['payload'][_0x569fc5(0x1db)];_0x25ae92[_0x569fc5(0x207)](_0x28d9da);break;}}}),_0x46fa8b(this[_0x3655de(0x243)],_0x25ae92);}));}[_0xcc7740(0x239)](){const _0x4569d4=_0xcc7740;this[_0x4569d4(0x214)](this[_0x4569d4(0x24c)][_0x4569d4(0x24f)][_0x4569d4(0x246)](async _0x35e54d=>{const _0x3eef62=_0x4569d4;var _0x14c9d2,_0x507e0b,_0x541823,_0x23e53e;const _0x2efd64=(_0x14c9d2=this['_threadCommentModel'][_0x3eef62(0x206)](_0x35e54d['unitId'])[_0x3eef62(0x1dc)](_0x1e5e05=>_0x1e5e05[_0x3eef62(0x1f9)]===_0x35e54d[_0x3eef62(0x1f9)]))==null?void 0x0:_0x14c9d2[_0x3eef62(0x218)];if(!_0x2efd64)return;const {unitId:_0x37d3a4,subUnitId:_0x5b34d0}=_0x2efd64;switch(_0x35e54d[_0x3eef62(0x217)]&&this['_userService'][_0x3eef62(0x23b)](_0x35e54d[_0x3eef62(0x217)]),_0x35e54d[_0x3eef62(0x1ef)]){case _0x2eb2c7[_0x3eef62(0x22b)]:break;case _0x2eb2c7['Reply']:{this[_0x3eef62(0x1f2)][_0x3eef62(0x23d)](_0x37d3a4,_0x5b34d0,{'unitId':_0x37d3a4,'subUnitId':_0x5b34d0,'ref':'','id':_0x35e54d[_0x3eef62(0x202)],'dT':_0xcdd055(+_0x35e54d['createTimestamp']),'threadId':_0x35e54d['threadId'],'personId':(_0x541823=(_0x507e0b=_0x35e54d[_0x3eef62(0x217)])==null?void 0x0:_0x507e0b[_0x3eef62(0x1ec)])!=null?_0x541823:_0x35e54d[_0x3eef62(0x222)],'text':JSON[_0x3eef62(0x1e0)](_0x35e54d[_0x3eef62(0x23e)]),'parentId':_0x2efd64['id']});break;}case _0x2eb2c7[_0x3eef62(0x1f3)]:{const _0x1189cc=this[_0x3eef62(0x1f2)]['getComment'](_0x37d3a4,_0x5b34d0,_0x35e54d[_0x3eef62(0x202)]);_0x1189cc&&_0x1189cc[_0x3eef62(0x1f7)]&&this[_0x3eef62(0x1f2)]['deleteComment'](_0x37d3a4,_0x5b34d0,_0x35e54d[_0x3eef62(0x202)]);break;}case _0x2eb2c7[_0x3eef62(0x254)]:{this[_0x3eef62(0x1f2)][_0x3eef62(0x219)](_0x37d3a4,_0x5b34d0,{'commentId':_0x35e54d[_0x3eef62(0x202)],'text':JSON[_0x3eef62(0x1e0)](_0x35e54d[_0x3eef62(0x23e)])});break;}case _0x2eb2c7[_0x3eef62(0x236)]:{const _0x7f74=(_0x23e53e=this[_0x3eef62(0x1f2)][_0x3eef62(0x206)](_0x35e54d[_0x3eef62(0x1e9)])[_0x3eef62(0x1dc)](_0x18e848=>_0x18e848[_0x3eef62(0x1f9)]===_0x35e54d['threadId']))==null?void 0x0:_0x23e53e[_0x3eef62(0x218)];_0x7f74&&this[_0x3eef62(0x1f2)]['resolveComment'](_0x37d3a4,_0x5b34d0,_0x7f74['id'],_0x35e54d[_0x3eef62(0x1d9)]===_0x3894ad[_0x3eef62(0x22a)]);break;}}}));}};_0x3d0ad6=_0x3e1896([_0x39d2af(0x0,_0x2806bf['Inject'](_0x33062a[_0xcc7740(0x1d6)])),_0x39d2af(0x1,_0x2806bf[_0xcc7740(0x21c)](_0x4b7281['ThreadCommentModel'])),_0x39d2af(0x2,_0x2806bf[_0xcc7740(0x21c)](_0x2806bf[_0xcc7740(0x227)])),_0x39d2af(0x3,_0x2806bf[_0xcc7740(0x21c)](_0x2806bf[_0xcc7740(0x1e3)]))],_0x3d0ad6);const _0x45f63b='thread-comment-data-source.config',_0x32320e={};var _0x204ce8=Object[_0xcc7740(0x241)],_0x1bb581=(_0x57e8c,_0x3a5a67,_0x1dc819,_0x3b154b)=>{const _0x2c45c1=_0xcc7740;for(var _0x1c1fb6=_0x3b154b>0x1?void 0x0:_0x3b154b?_0x204ce8(_0x3a5a67,_0x1dc819):_0x3a5a67,_0x43c169=_0x57e8c[_0x2c45c1(0x223)]-0x1,_0x55f874;_0x43c169>=0x0;_0x43c169--)(_0x55f874=_0x57e8c[_0x43c169])&&(_0x1c1fb6=_0x55f874(_0x1c1fb6)||_0x1c1fb6);return _0x1c1fb6;},_0x40aeb5=(_0x4c0cb7,_0xdc5a7d)=>(_0x216f7f,_0x3fe669)=>_0xdc5a7d(_0x216f7f,_0x3fe669,_0x4c0cb7);function _0x2df6e1(_0x56a74d,_0x1d3419){const _0x506f8d=_0xcc7740,_0x5c9299=_0x56a74d[_0x506f8d(0x230)][0x0];return{..._0x1d3419,'id':_0x5c9299['replyId'],'resolved':_0x56a74d[_0x506f8d(0x1d9)]===0x1,'dT':_0xcdd055(_0x5c9299[_0x506f8d(0x1e5)]),'personId':_0x5c9299['userId'],'threadId':_0x5c9299['threadId']};}function _0x41e89f(_0x141959,_0x510728,_0x59fbdb){const _0x1d55a5=_0xcc7740;var _0x4bf917,_0x4f2f58;if(((_0x4f2f58=(_0x4bf917=_0x141959==null?void 0x0:_0x141959[_0x1d55a5(0x230)])==null?void 0x0:_0x4bf917['length'])!=null?_0x4f2f58:0x0)>0x0){const _0x41d918=(_0x4d7c7c,_0x307021)=>({'id':_0x4d7c7c[_0x1d55a5(0x202)],'threadId':_0x4d7c7c[_0x1d55a5(0x1f9)],'dT':_0xcdd055(_0x4d7c7c[_0x1d55a5(0x1e5)]),'personId':_0x4d7c7c['userId'],'resolved':_0x141959['solved']===_0x3894ad[_0x1d55a5(0x22a)],'unitId':_0x510728,'subUnitId':_0x59fbdb,'text':JSON[_0x1d55a5(0x1e0)](_0x4d7c7c[_0x1d55a5(0x23e)]),'parentId':_0x307021}),_0x21f901=_0x41d918(_0x141959[_0x1d55a5(0x230)][0x0]);return{..._0x21f901,'children':_0x141959[_0x1d55a5(0x230)][_0x1d55a5(0x1f4)](0x1)[_0x1d55a5(0x213)](_0x41b58e=>_0x41d918(_0x41b58e,_0x21f901['id']))};}return null;}let _0x143f6e=class{constructor(_0xe26b64,_0x1332e1,_0x31ca01,_0x16366a){const _0x522e18=_0xcc7740;this[_0x522e18(0x203)]=_0xe26b64,this[_0x522e18(0x228)]=_0x1332e1,this['_sessionService']=_0x31ca01,this['_injector']=_0x16366a;}async[_0xcc7740(0x23d)](_0x5964c2){const _0x3fab22=_0xcc7740;var _0x12f509,_0x47f153;const {parentId:_0x32c6c0,unitId:_0x50aecf,text:_0x132dcb,threadId:_0x2f795e}=_0x5964c2,_0x225d67=(_0x47f153=(_0x12f509=_0x132dcb[_0x3fab22(0x238)])==null?void 0x0:_0x12f509[_0x3fab22(0x1de)](_0x63943b=>_0x63943b[_0x3fab22(0x20a)]===_0x2806bf[_0x3fab22(0x1e8)]['COMMENT'])[_0x3fab22(0x213)](_0x52b744=>_0x52b744[_0x3fab22(0x212)]))!=null?_0x47f153:[],_0x4dfd4f=JSON['stringify'](_0x132dcb),_0x3904ce=(await this[_0x3fab22(0x208)][_0x3fab22(0x21b)](_0x50aecf))[_0x3fab22(0x21f)]();if(_0x32c6c0){const _0x2f40ff={'memberId':_0x3904ce,'unitId':_0x50aecf,'content':_0x4dfd4f,'mention':_0x225d67,'threadId':_0x2f795e},_0x832f19=(await this['_httpService'][_0x3fab22(0x21e)](_0x3fab22(0x1fb)+_0x50aecf+'/reply',{'body':_0x2f40ff}))[_0x3fab22(0x245)][_0x3fab22(0x221)];return{..._0x5964c2,'id':_0x832f19[_0x3fab22(0x202)],'dT':_0x2806bf[_0x3fab22(0x20f)](+_0x832f19['createTimestamp'])[_0x3fab22(0x200)](_0x3fab22(0x1f5)),'personId':_0x832f19[_0x3fab22(0x222)]};}else{const _0x5408bc={'memberId':_0x3904ce,'unitId':_0x50aecf,'content':_0x4dfd4f,'mention':_0x225d67},_0x1c8167=await this[_0x3fab22(0x203)][_0x3fab22(0x21e)](_0x3fab22(0x1fb)+_0x50aecf+_0x3fab22(0x252),{'body':_0x5408bc});return _0x2df6e1(_0x1c8167[_0x3fab22(0x245)][_0x3fab22(0x1da)],_0x5964c2);}}async[_0xcc7740(0x219)](_0x27da25){const _0x562385=_0xcc7740;var _0x5b3e9d,_0x3e1150;const {text:_0x547f38,unitId:_0x5190e0}=_0x27da25,_0x965339=(_0x3e1150=(_0x5b3e9d=_0x547f38['customRanges'])==null?void 0x0:_0x5b3e9d[_0x562385(0x1de)](_0x1d9d7b=>_0x1d9d7b['rangeType']===_0x2806bf[_0x562385(0x1e8)]['COMMENT'])[_0x562385(0x213)](_0x29c38e=>_0x29c38e[_0x562385(0x212)]))!=null?_0x3e1150:[],_0x597328=JSON[_0x562385(0x24e)](_0x547f38),_0x5f02ed=_0x27da25['threadId'],_0x23c7ec=_0x27da25['id'],_0x5e09be={'memberId':(await this['_sessionService'][_0x562385(0x21b)](_0x5190e0))[_0x562385(0x21f)](),'unitId':_0x5190e0,'threadId':_0x5f02ed,'mention':_0x965339,'content':_0x597328,'replyId':_0x23c7ec},_0x2eb73a=await this[_0x562385(0x203)][_0x562385(0x21e)](_0x562385(0x1fb)+_0x5190e0+'/edit',{'body':_0x5e09be});return!_0x2eb73a[_0x562385(0x245)][_0x562385(0x1e4)]||_0x2eb73a[_0x562385(0x245)]['error'][_0x562385(0x215)]===0x1;}async[_0xcc7740(0x1d8)](_0x2703d8){const _0x34217d=_0xcc7740,{unitId:_0x428222}=_0x2703d8,_0x3cda0a=_0x2703d8[_0x34217d(0x1f9)],_0x2e0565={'memberId':this[_0x34217d(0x228)][_0x34217d(0x232)]()[_0x34217d(0x1ec)],'unitId':_0x428222,'threadId':_0x3cda0a,'solved':_0x2703d8[_0x34217d(0x250)]?_0x3894ad[_0x34217d(0x22a)]:_0x3894ad[_0x34217d(0x23a)]},_0x3f5393=await this['_httpService'][_0x34217d(0x21e)](_0x34217d(0x1fb)+_0x428222+'/solved',{'body':_0x2e0565});return!_0x3f5393[_0x34217d(0x245)]['error']||_0x3f5393[_0x34217d(0x245)]['error'][_0x34217d(0x215)]===0x1;}async['deleteComment'](_0x3b84cf,_0x5ccf1a,_0x13de60,_0x3e3c72){const _0x24c5a7=_0xcc7740,_0x19a2aa={'memberId':(await this[_0x24c5a7(0x208)][_0x24c5a7(0x21b)](_0x3b84cf))['getMemberID'](),'threadId':_0x13de60,'replyId':_0x3e3c72,'unitId':_0x3b84cf},_0x1814ad=await this[_0x24c5a7(0x203)][_0x24c5a7(0x21e)](_0x24c5a7(0x1fb)+_0x3b84cf+_0x24c5a7(0x1d1),{'body':_0x19a2aa});return!_0x1814ad[_0x24c5a7(0x245)]['error']||_0x1814ad['body'][_0x24c5a7(0x1e4)]['code']===0x1;}async[_0xcc7740(0x229)](_0x520a58,_0x39f6d2,_0x389c11){const _0x90ab5=_0xcc7740,_0x1d481b={'unitId':_0x520a58,'threadId':_0x389c11},_0x292ab9=await this[_0x90ab5(0x203)][_0x90ab5(0x21e)](_0x90ab5(0x1fb)+_0x520a58+'/list',{'body':_0x1d481b}),_0xf1bb22=_0x389c11[_0x90ab5(0x213)](_0x5de8ef=>_0x41e89f(_0x292ab9[_0x90ab5(0x245)][_0x90ab5(0x244)][_0x5de8ef],_0x520a58,_0x39f6d2))[_0x90ab5(0x1de)](Boolean);return Object[_0x90ab5(0x255)](_0x292ab9[_0x90ab5(0x245)][_0x90ab5(0x22c)])[_0x90ab5(0x1f0)](_0x5bc5c3=>{const _0x35cdee=_0x90ab5;this[_0x35cdee(0x228)][_0x35cdee(0x23b)](_0x5bc5c3);}),_0xf1bb22;}['saveCommentToSnapshot'](_0x4817cb){const _0x95eb83=_0xcc7740;return{'id':_0x4817cb['id'],'threadId':_0x4817cb[_0x95eb83(0x1f9)],'ref':_0x4817cb[_0x95eb83(0x1f8)]};}};_0x143f6e=_0x1bb581([_0x40aeb5(0x0,_0x2806bf[_0xcc7740(0x21c)](_0x395f6a[_0xcc7740(0x1ff)])),_0x40aeb5(0x1,_0x2806bf[_0xcc7740(0x21c)](_0x2806bf[_0xcc7740(0x227)])),_0x40aeb5(0x2,_0x2806bf[_0xcc7740(0x21c)](_0x33062a[_0xcc7740(0x1ea)])),_0x40aeb5(0x3,_0x2806bf[_0xcc7740(0x21c)](_0x2806bf['Injector']))],_0x143f6e);var _0x3fa2b7=Object[_0xcc7740(0x241)],_0x3d97cc=(_0x4c3a48,_0x4c44ba,_0x316e2d,_0x274541)=>{const _0x1d20eb=_0xcc7740;for(var _0x5055a9=_0x274541>0x1?void 0x0:_0x274541?_0x3fa2b7(_0x4c44ba,_0x316e2d):_0x4c44ba,_0x3fad9e=_0x4c3a48[_0x1d20eb(0x223)]-0x1,_0x3f7578;_0x3fad9e>=0x0;_0x3fad9e--)(_0x3f7578=_0x4c3a48[_0x3fad9e])&&(_0x5055a9=_0x3f7578(_0x5055a9)||_0x5055a9);return _0x5055a9;},_0x380e10=(_0x1f778d,_0x45c617)=>(_0x10dce0,_0xfcdf3c)=>_0x45c617(_0x10dce0,_0xfcdf3c,_0x1f778d);let _0x4fe7dc=class extends _0x2806bf[_0xcc7740(0x231)]{constructor(_0x143d4f,_0x30a4d9){const _0x3291e0=_0xcc7740;super(),this['_threadCommentDataSourceService']=_0x143d4f,this[_0x3291e0(0x1d5)]=_0x30a4d9,this[_0x3291e0(0x233)]();}[_0xcc7740(0x233)](){const _0x51d29b=_0xcc7740;this['_threadCommentDataSourceService'][_0x51d29b(0x1dd)]=this[_0x51d29b(0x1d5)],this[_0x51d29b(0x240)][_0x51d29b(0x23c)]=!0x1;}};_0x4fe7dc=_0x3d97cc([_0x380e10(0x0,_0x4b7281[_0xcc7740(0x1ce)]),_0x380e10(0x1,_0x2806bf['Inject'](_0x143f6e))],_0x4fe7dc);var _0x1aad34=Object[_0xcc7740(0x20e)],_0x1ee2d4=Object[_0xcc7740(0x241)],_0x48a83d=(_0x2d6fa5,_0x1b8a32,_0x1829b2)=>_0x1b8a32 in _0x2d6fa5?_0x1aad34(_0x2d6fa5,_0x1b8a32,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1829b2}):_0x2d6fa5[_0x1b8a32]=_0x1829b2,_0x3831fc=(_0x35419f,_0x26d7b0,_0x260d96,_0x59d645)=>{for(var _0x2ad552=_0x59d645>0x1?void 0x0:_0x59d645?_0x1ee2d4(_0x26d7b0,_0x260d96):_0x26d7b0,_0x32bb4e=_0x35419f['length']-0x1,_0x4fcb91;_0x32bb4e>=0x0;_0x32bb4e--)(_0x4fcb91=_0x35419f[_0x32bb4e])&&(_0x2ad552=_0x4fcb91(_0x2ad552)||_0x2ad552);return _0x2ad552;},_0x80e1ed=(_0x4077f6,_0x6e927)=>(_0x449c52,_0x5af349)=>_0x6e927(_0x449c52,_0x5af349,_0x4077f6),_0x15bf54=(_0x28dc25,_0x57d0ae,_0x10d366)=>_0x48a83d(_0x28dc25,typeof _0x57d0ae!=_0xcc7740(0x20b)?_0x57d0ae+'':_0x57d0ae,_0x10d366);_0x480aa[_0xcc7740(0x1e7)]=class extends _0x2806bf[_0xcc7740(0x1fa)]{constructor(_0x3b9a8a=_0x32320e,_0x4178b8,_0x5078b2){const _0x5ede5c=_0xcc7740;super(),this['_config']=_0x3b9a8a,this[_0x5ede5c(0x243)]=_0x4178b8,this[_0x5ede5c(0x205)]=_0x5078b2;const {..._0x2f4af0}=_0x2806bf[_0x5ede5c(0x224)]({},_0x32320e,this['_config']);this[_0x5ede5c(0x205)][_0x5ede5c(0x242)](_0x45f63b,_0x2f4af0);}[_0xcc7740(0x1d0)](){const _0x210e88=_0xcc7740;[[_0x143f6e],[_0x4fe7dc],[_0x3d0ad6]][_0x210e88(0x1f0)](_0x1e8e03=>{const _0xd54354=_0x210e88;this[_0xd54354(0x243)][_0xd54354(0x207)](_0x1e8e03);});}[_0xcc7740(0x1d7)](){const _0xa5f812=_0xcc7740;this[_0xa5f812(0x243)][_0xa5f812(0x1eb)](_0x4fe7dc),this[_0xa5f812(0x243)][_0xa5f812(0x1eb)](_0x3d0ad6);}},_0x15bf54(_0x480aa['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x1c4516),_0x15bf54(_0x480aa[_0xcc7740(0x1e7)],_0xcc7740(0x1ef),_0x2806bf['UniverInstanceType'][_0xcc7740(0x234)]),_0x480aa[_0xcc7740(0x1e7)]=_0x3831fc([_0x2806bf[_0xcc7740(0x24a)](_0x3ef08e[_0xcc7740(0x1fe)],_0x33062a[_0xcc7740(0x21a)],_0x150096[_0xcc7740(0x211)]),_0x80e1ed(0x1,_0x2806bf[_0xcc7740(0x21c)](_0x2806bf[_0xcc7740(0x1e3)])),_0x80e1ed(0x2,_0x2806bf[_0xcc7740(0x1e2)])],_0x480aa[_0xcc7740(0x1e7)]),Object[_0xcc7740(0x20e)](_0x480aa,Symbol[_0xcc7740(0x22d)],{'value':_0xcc7740(0x220)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.6.8",
3
+ "version": "0.6.9-nightly.202504021607",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/license": "0.6.8",
49
- "@univerjs-pro/collaboration-client": "0.6.8",
50
- "@univerjs/core": "0.6.8",
48
+ "@univerjs-pro/collaboration-client": "0.6.9-nightly.202504021607",
49
+ "@univerjs-pro/license": "0.6.9-nightly.202504021607",
50
+ "@univerjs/network": "0.6.9-nightly.202504021607",
51
51
  "@univerjs/protocol": "0.1.45",
52
- "@univerjs/network": "0.6.8",
53
- "@univerjs/thread-comment-ui": "0.6.8",
54
- "@univerjs/thread-comment": "0.6.8"
52
+ "@univerjs/thread-comment": "0.6.9-nightly.202504021607",
53
+ "@univerjs/thread-comment-ui": "0.6.9-nightly.202504021607",
54
+ "@univerjs/core": "0.6.9-nightly.202504021607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",
58
58
  "typescript": "^5.8.2",
59
59
  "vite": "^6.2.2",
60
60
  "vitest": "^3.0.9",
61
- "@univerjs-infra/shared": "0.6.8"
61
+ "@univerjs-infra/shared": "0.6.9"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",