@univerjs-pro/thread-comment-datasource 0.8.2 → 0.8.3-nightly.202507010644

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 _0x35e1eb=_0x5736;(function(_0x5dc7ac,_0x4ac240){const _0x19488d=_0x5736,_0x2e976d=_0x5dc7ac();while(!![]){try{const _0x526c68=parseInt(_0x19488d(0x1b5))/0x1+parseInt(_0x19488d(0x1e2))/0x2+-parseInt(_0x19488d(0x1d7))/0x3*(parseInt(_0x19488d(0x21a))/0x4)+parseInt(_0x19488d(0x1e0))/0x5*(-parseInt(_0x19488d(0x1d2))/0x6)+-parseInt(_0x19488d(0x20d))/0x7+parseInt(_0x19488d(0x1cb))/0x8*(-parseInt(_0x19488d(0x1c1))/0x9)+parseInt(_0x19488d(0x222))/0xa*(parseInt(_0x19488d(0x204))/0xb);if(_0x526c68===_0x4ac240)break;else _0x2e976d['push'](_0x2e976d['shift']());}catch(_0x51d92c){_0x2e976d['push'](_0x2e976d['shift']());}}}(_0x5046,0xd8c10));function _0x5046(){const _0x10f8a5=['Edit','disposeWithMe','_threadCommentModel','addComment','UniverCollaborationClientPlugin','IConfigService','rxjs','threadId','531UMtQWQ','@univerjs/thread-comment-ui','content','rangeId','getUnit','updateComment','UNIVER_UNKNOWN','dayjs','toStringTag','_threadCommentDataSource','86200zPvmlc','CustomRangeType','_config','body','Module','UniverLicensePlugin','/list','318834jQeNDa','find','UniverThreadCommentDataSourcePlugin','user','size','181704xUTuXj','UniverInstanceType','Injector','HTTPService','onReady','replies','getMemberID','addUser','Delete','165gRJcoO','resolved','1250488Akqtrw','UserManagerService','@univerjs/thread-comment','CommentService','type','parse','delete','get','_userService','syncUpdateMutationToColla','userID','_sessionService','slice','unitId','pluginName','setConfig','symbol','listComments','format','length','getCurrentUser','defineProperty','createTimestamp','values','YYYY/MM/DD\x20HH:mm','map','COMMENT','requireSession','Solved','stringify','UniverThreadCommentUIPlugin','/add','customRanges','/universer-api/comment/unit/','23462857kDhAuX','CollaborationSessionService','bufferTime','users','forEach','_initUserSync','_httpService','_configService','subscribe','2739548fFjTIx','replyId','personId','userId','UNRECOGNIZED','Disposable','_initDataSource','/universer-api/user/list','_injector','solved','Reply','_commentService','code','20HykTFb','/edit','@univerjs-pro/collaboration-client','merge','_threadCommentDataSourceService','OpenOrReOpen','Unknown','error','10ASvMTM','filter','commentUpdate$','pipe','post','thread-comment-data-source.config','Solve','add','@univerjs-pro/license','getOwnPropertyDescriptor','@univerjs/core','onStarting','rangeType','Inject','Add','1213109yZwvAM','resolveComment','root','_init'];_0x5046=function(){return _0x10f8a5;};return _0x5046();}Object['defineProperty'](exports,Symbol[_0x35e1eb(0x1c9)],{'value':_0x35e1eb(0x1cf)});const b=require(_0x35e1eb(0x21c)),T=require(_0x35e1eb(0x1ae)),c=require(_0x35e1eb(0x1b0)),j=require(_0x35e1eb(0x1c2)),M=require(_0x35e1eb(0x1e4)),w=require(_0x35e1eb(0x1bf)),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x4f3bcc=>(_0x4f3bcc[_0x4f3bcc[_0x35e1eb(0x21f)]=0x0]='OpenOrReOpen',_0x4f3bcc[_0x4f3bcc[_0x35e1eb(0x1fe)]=0x1]=_0x35e1eb(0x1fe),_0x4f3bcc[_0x4f3bcc['UNRECOGNIZED']=-0x1]=_0x35e1eb(0x211),_0x4f3bcc))(I||{}),v=(_0x165961=>(_0x165961[_0x165961['Unknown']=0x0]=_0x35e1eb(0x220),_0x165961[_0x165961[_0x35e1eb(0x1b4)]=0x1]=_0x35e1eb(0x1b4),_0x165961[_0x165961[_0x35e1eb(0x217)]=0x2]=_0x35e1eb(0x217),_0x165961[_0x165961[_0x35e1eb(0x1b9)]=0x3]='Edit',_0x165961[_0x165961['Delete']=0x4]=_0x35e1eb(0x1df),_0x165961[_0x165961[_0x35e1eb(0x1ac)]=0x5]=_0x35e1eb(0x1ac),_0x165961[_0x165961[_0x35e1eb(0x211)]=-0x1]=_0x35e1eb(0x211),_0x165961))(v||{});const f=_0x37915f=>c[_0x35e1eb(0x1c8)](new Date(+_0x37915f))[_0x35e1eb(0x1f4)](_0x35e1eb(0x1fa)),R=async(_0xc128bb,_0x13bb89)=>{const _0x3432a3=_0x35e1eb,_0xc4c89b=_0xc128bb[_0x3432a3(0x1e9)](c[_0x3432a3(0x1e3)]),_0x1ce5a0=_0xc128bb[_0x3432a3(0x1e9)](P[_0x3432a3(0x1da)]);_0x13bb89['forEach'](_0x2e7fac=>{const _0x3ebd2f=_0x3432a3;_0xc4c89b['getUser'](_0x2e7fac)&&_0x13bb89[_0x3ebd2f(0x1e8)](_0x2e7fac);}),_0x13bb89[_0x3432a3(0x1d6)]&&(await _0x1ce5a0[_0x3432a3(0x1e9)](_0x3432a3(0x214),{'params':{'userIDs':[..._0x13bb89]}}))[_0x3432a3(0x1ce)][_0x3432a3(0x207)][_0x3432a3(0x208)](_0x332acf=>{const _0x1f9d1d=_0x3432a3;_0x332acf&&_0xc4c89b[_0x1f9d1d(0x1de)](_0x332acf);});};var $=Object[_0x35e1eb(0x1af)],E=(_0xe73c04,_0x4d525f,_0x4d4bcd,_0x4ecc06)=>{const _0x11d028=_0x35e1eb;for(var _0x1b3318=_0x4ecc06>0x1?void 0x0:_0x4ecc06?$(_0x4d525f,_0x4d4bcd):_0x4d525f,_0x140e2e=_0xe73c04[_0x11d028(0x1f5)]-0x1,_0x4e6a7a;_0x140e2e>=0x0;_0x140e2e--)(_0x4e6a7a=_0xe73c04[_0x140e2e])&&(_0x1b3318=_0x4e6a7a(_0x1b3318)||_0x1b3318);return _0x1b3318;},S=(_0x304e84,_0x42bdc1)=>(_0x189d24,_0x25bab5)=>_0x42bdc1(_0x189d24,_0x25bab5,_0x304e84);let p=class extends c['Disposable']{constructor(_0x2d7276,_0x2de50a,_0x477a8b,_0x38ba92){const _0xdf0361=_0x35e1eb;super(),this[_0xdf0361(0x218)]=_0x2d7276,this['_threadCommentModel']=_0x2de50a,this[_0xdf0361(0x1ea)]=_0x477a8b,this[_0xdf0361(0x215)]=_0x38ba92,this[_0xdf0361(0x1b8)](),this[_0xdf0361(0x209)]();}['_initUserSync'](){const _0x42b612=_0x35e1eb;this[_0x42b612(0x1ba)](this['_threadCommentModel'][_0x42b612(0x224)][_0x42b612(0x1a9)](w[_0x42b612(0x206)](0x10))[_0x42b612(0x20c)](_0x51e805=>{const _0x87491c=_0x42b612,_0x34d1e5=new Set();_0x51e805[_0x87491c(0x208)](_0x109329=>{const _0x5ce027=_0x87491c;switch(_0x109329[_0x5ce027(0x1e6)]){case _0x5ce027(0x1ad):{const _0x287f7f=_0x109329['payload'][_0x5ce027(0x20f)];_0x34d1e5['add'](_0x287f7f);break;}}}),R(this[_0x87491c(0x215)],_0x34d1e5);}));}[_0x35e1eb(0x1b8)](){const _0x88635f=_0x35e1eb;this[_0x88635f(0x1ba)](this[_0x88635f(0x218)][_0x88635f(0x224)][_0x88635f(0x20c)](async _0x5d0126=>{const _0x28795c=_0x88635f;var _0x33ec7f,_0x57fde7,_0x52853d,_0x283371;const _0x385d5f=(_0x33ec7f=this[_0x28795c(0x1bb)][_0x28795c(0x1c5)](_0x5d0126[_0x28795c(0x1ef)])[_0x28795c(0x1d3)](_0x583f5f=>_0x583f5f[_0x28795c(0x1c0)]===_0x5d0126[_0x28795c(0x1c0)]))==null?void 0x0:_0x33ec7f[_0x28795c(0x1b7)];if(!_0x385d5f)return;const {unitId:_0x13db76,subUnitId:_0xe28fc5}=_0x385d5f;switch(_0x5d0126['user']&&this[_0x28795c(0x1ea)]['addUser'](_0x5d0126[_0x28795c(0x1d5)]),_0x5d0126['type']){case v[_0x28795c(0x1b4)]:break;case v[_0x28795c(0x217)]:{this[_0x28795c(0x1bb)][_0x28795c(0x1bc)](_0x13db76,_0xe28fc5,{'unitId':_0x13db76,'subUnitId':_0xe28fc5,'ref':'','id':_0x5d0126[_0x28795c(0x20e)],'dT':f(+_0x5d0126[_0x28795c(0x1f8)]),'threadId':_0x5d0126[_0x28795c(0x1c0)],'personId':(_0x52853d=(_0x57fde7=_0x5d0126['user'])==null?void 0x0:_0x57fde7['userID'])!=null?_0x52853d:_0x5d0126['userId'],'text':JSON[_0x28795c(0x1e7)](_0x5d0126[_0x28795c(0x1c3)]),'parentId':_0x385d5f['id']});break;}case v[_0x28795c(0x1df)]:{const _0x27786d=this[_0x28795c(0x1bb)]['getComment'](_0x13db76,_0xe28fc5,_0x5d0126[_0x28795c(0x20e)]);_0x27786d&&_0x27786d['parentId']&&this[_0x28795c(0x1bb)]['deleteComment'](_0x13db76,_0xe28fc5,_0x5d0126[_0x28795c(0x20e)]);break;}case v[_0x28795c(0x1b9)]:{this['_threadCommentModel'][_0x28795c(0x1c6)](_0x13db76,_0xe28fc5,{'commentId':_0x5d0126[_0x28795c(0x20e)],'text':JSON[_0x28795c(0x1e7)](_0x5d0126[_0x28795c(0x1c3)])});break;}case v['Solve']:{const _0x57721d=(_0x283371=this[_0x28795c(0x1bb)]['getUnit'](_0x5d0126[_0x28795c(0x1ef)])[_0x28795c(0x1d3)](_0x36b693=>_0x36b693[_0x28795c(0x1c0)]===_0x5d0126['threadId']))==null?void 0x0:_0x283371[_0x28795c(0x1b7)];_0x57721d&&this[_0x28795c(0x1bb)][_0x28795c(0x1b6)](_0x13db76,_0xe28fc5,_0x57721d['id'],_0x5d0126[_0x28795c(0x216)]===I[_0x28795c(0x1fe)]);break;}}}));}};p=E([S(0x0,c[_0x35e1eb(0x1b3)](b[_0x35e1eb(0x1e5)])),S(0x1,c[_0x35e1eb(0x1b3)](M['ThreadCommentModel'])),S(0x2,c[_0x35e1eb(0x1b3)](c[_0x35e1eb(0x1e3)])),S(0x3,c[_0x35e1eb(0x1b3)](c[_0x35e1eb(0x1d9)]))],p);const q=_0x35e1eb(0x1ab),D={};var A=Object[_0x35e1eb(0x1af)],x=(_0x4b1d79,_0x423d88,_0x20efa0,_0x410955)=>{const _0x5595fb=_0x35e1eb;for(var _0x5933b6=_0x410955>0x1?void 0x0:_0x410955?A(_0x423d88,_0x20efa0):_0x423d88,_0x3966f1=_0x4b1d79[_0x5595fb(0x1f5)]-0x1,_0x42fc31;_0x3966f1>=0x0;_0x3966f1--)(_0x42fc31=_0x4b1d79[_0x3966f1])&&(_0x5933b6=_0x42fc31(_0x5933b6)||_0x5933b6);return _0x5933b6;},_=(_0x481e7c,_0x42e483)=>(_0x20527c,_0x33c48c)=>_0x42e483(_0x20527c,_0x33c48c,_0x481e7c);function Y(_0x4818d9,_0x40df53){const _0x375bb5=_0x35e1eb,_0x145604=_0x4818d9[_0x375bb5(0x1dc)][0x0];return{..._0x40df53,'id':_0x145604[_0x375bb5(0x20e)],'resolved':_0x4818d9[_0x375bb5(0x216)]===0x1,'dT':f(_0x145604['createTimestamp']),'personId':_0x145604['userId'],'threadId':_0x145604['threadId']};}function _0x5736(_0xe558e6,_0x2be086){const _0x5046b9=_0x5046();return _0x5736=function(_0x57368a,_0x40b533){_0x57368a=_0x57368a-0x1a9;let _0xa422f7=_0x5046b9[_0x57368a];return _0xa422f7;},_0x5736(_0xe558e6,_0x2be086);}function G(_0x189228,_0xd25bf3,_0x5b57c7){const _0x36526f=_0x35e1eb;var _0x2d4082,_0x324eda;if(((_0x324eda=(_0x2d4082=_0x189228==null?void 0x0:_0x189228[_0x36526f(0x1dc)])==null?void 0x0:_0x2d4082['length'])!=null?_0x324eda:0x0)>0x0){const _0x393485=(_0x1c5a99,_0x16d93d)=>({'id':_0x1c5a99[_0x36526f(0x20e)],'threadId':_0x1c5a99[_0x36526f(0x1c0)],'dT':f(_0x1c5a99['createTimestamp']),'personId':_0x1c5a99[_0x36526f(0x210)],'resolved':_0x189228[_0x36526f(0x216)]===I[_0x36526f(0x1fe)],'unitId':_0xd25bf3,'subUnitId':_0x5b57c7,'text':JSON[_0x36526f(0x1e7)](_0x1c5a99[_0x36526f(0x1c3)]),'parentId':_0x16d93d}),_0x2d45ab=_0x393485(_0x189228[_0x36526f(0x1dc)][0x0]);return{..._0x2d45ab,'children':_0x189228[_0x36526f(0x1dc)][_0x36526f(0x1ee)](0x1)['map'](_0x4efdc8=>_0x393485(_0x4efdc8,_0x2d45ab['id']))};}return null;}let g=class{constructor(_0x5e620f,_0xb52abc,_0x52b318,_0xaf19d6){const _0x224ede=_0x35e1eb;this[_0x224ede(0x20a)]=_0x5e620f,this['_userService']=_0xb52abc,this[_0x224ede(0x1ed)]=_0x52b318,this['_injector']=_0xaf19d6;}async[_0x35e1eb(0x1bc)](_0x45e7a2){const _0x3f6525=_0x35e1eb;var _0xfc67b8,_0x2565b6;const {parentId:_0x53fac4,unitId:_0x3e9f6e,text:_0x5137cd,threadId:_0x30c241}=_0x45e7a2,_0x447c85=(_0x2565b6=(_0xfc67b8=_0x5137cd[_0x3f6525(0x202)])==null?void 0x0:_0xfc67b8[_0x3f6525(0x223)](_0x527a88=>_0x527a88[_0x3f6525(0x1b2)]===c[_0x3f6525(0x1cc)][_0x3f6525(0x1fc)])[_0x3f6525(0x1fb)](_0x216826=>_0x216826[_0x3f6525(0x1c4)]))!=null?_0x2565b6:[],_0x206b8e=JSON[_0x3f6525(0x1ff)](_0x5137cd),_0x4d4164=(await this[_0x3f6525(0x1ed)]['requireSession'](_0x3e9f6e))[_0x3f6525(0x1dd)]();if(_0x53fac4){const _0x273344={'memberId':_0x4d4164,'unitId':_0x3e9f6e,'content':_0x206b8e,'mention':_0x447c85,'threadId':_0x30c241},_0x5c9d62=(await this['_httpService'][_0x3f6525(0x1aa)](_0x3f6525(0x203)+_0x3e9f6e+'/reply',{'body':_0x273344}))[_0x3f6525(0x1ce)]['reply'];return{..._0x45e7a2,'id':_0x5c9d62[_0x3f6525(0x20e)],'dT':c['dayjs'](+_0x5c9d62[_0x3f6525(0x1f8)])[_0x3f6525(0x1f4)](_0x3f6525(0x1fa)),'personId':_0x5c9d62[_0x3f6525(0x210)]};}else{const _0x5a6903={'memberId':_0x4d4164,'unitId':_0x3e9f6e,'content':_0x206b8e,'mention':_0x447c85},_0x2ea5d6=await this[_0x3f6525(0x20a)]['post']('/universer-api/comment/unit/'+_0x3e9f6e+_0x3f6525(0x201),{'body':_0x5a6903});return Y(_0x2ea5d6[_0x3f6525(0x1ce)]['comment'],_0x45e7a2);}}async['updateComment'](_0x58c5d8){const _0x47e37e=_0x35e1eb;var _0xc9882,_0x3a3dc6;const {text:_0x34e90b,unitId:_0x2af8da}=_0x58c5d8,_0x14b918=(_0x3a3dc6=(_0xc9882=_0x34e90b[_0x47e37e(0x202)])==null?void 0x0:_0xc9882[_0x47e37e(0x223)](_0x14bd37=>_0x14bd37['rangeType']===c['CustomRangeType'][_0x47e37e(0x1fc)])['map'](_0x5e0a2c=>_0x5e0a2c['rangeId']))!=null?_0x3a3dc6:[],_0x3ab1b2=JSON['stringify'](_0x34e90b),_0x2bb5d3=_0x58c5d8[_0x47e37e(0x1c0)],_0x289449=_0x58c5d8['id'],_0x172873={'memberId':(await this[_0x47e37e(0x1ed)]['requireSession'](_0x2af8da))[_0x47e37e(0x1dd)](),'unitId':_0x2af8da,'threadId':_0x2bb5d3,'mention':_0x14b918,'content':_0x3ab1b2,'replyId':_0x289449},_0xaf660e=await this['_httpService'][_0x47e37e(0x1aa)](_0x47e37e(0x203)+_0x2af8da+_0x47e37e(0x21b),{'body':_0x172873});return!_0xaf660e[_0x47e37e(0x1ce)][_0x47e37e(0x221)]||_0xaf660e[_0x47e37e(0x1ce)]['error'][_0x47e37e(0x219)]===0x1;}async[_0x35e1eb(0x1b6)](_0x15978c){const _0x540a22=_0x35e1eb,{unitId:_0x43eb27}=_0x15978c,_0xb07047=_0x15978c[_0x540a22(0x1c0)],_0x3f8115={'memberId':this[_0x540a22(0x1ea)][_0x540a22(0x1f6)]()[_0x540a22(0x1ec)],'unitId':_0x43eb27,'threadId':_0xb07047,'solved':_0x15978c[_0x540a22(0x1e1)]?I[_0x540a22(0x1fe)]:I['OpenOrReOpen']},_0x50e518=await this[_0x540a22(0x20a)][_0x540a22(0x1aa)]('/universer-api/comment/unit/'+_0x43eb27+'/solved',{'body':_0x3f8115});return!_0x50e518[_0x540a22(0x1ce)][_0x540a22(0x221)]||_0x50e518['body'][_0x540a22(0x221)][_0x540a22(0x219)]===0x1;}async['deleteComment'](_0x353ad8,_0x35ad3e,_0x6e747,_0x64bb12){const _0x424a6c=_0x35e1eb,_0x356759={'memberId':(await this[_0x424a6c(0x1ed)][_0x424a6c(0x1fd)](_0x353ad8))[_0x424a6c(0x1dd)](),'threadId':_0x6e747,'replyId':_0x64bb12,'unitId':_0x353ad8},_0x3d2f2d=await this[_0x424a6c(0x20a)]['post'](_0x424a6c(0x203)+_0x353ad8+'/delete',{'body':_0x356759});return!_0x3d2f2d[_0x424a6c(0x1ce)][_0x424a6c(0x221)]||_0x3d2f2d['body'][_0x424a6c(0x221)][_0x424a6c(0x219)]===0x1;}async[_0x35e1eb(0x1f3)](_0x3fe6c5,_0xab3b24,_0x45578d){const _0x23b4c0=_0x35e1eb,_0x3e80a2={'unitId':_0x3fe6c5,'threadId':_0x45578d},_0x468d9d=await this[_0x23b4c0(0x20a)]['post'](_0x23b4c0(0x203)+_0x3fe6c5+_0x23b4c0(0x1d1),{'body':_0x3e80a2}),_0x3c0fbe=_0x45578d[_0x23b4c0(0x1fb)](_0x2dd00d=>G(_0x468d9d['body']['comments'][_0x2dd00d],_0x3fe6c5,_0xab3b24))[_0x23b4c0(0x223)](Boolean);return Object[_0x23b4c0(0x1f9)](_0x468d9d[_0x23b4c0(0x1ce)][_0x23b4c0(0x207)])[_0x23b4c0(0x208)](_0x1c9bae=>{const _0x14e259=_0x23b4c0;this[_0x14e259(0x1ea)][_0x14e259(0x1de)](_0x1c9bae);}),_0x3c0fbe;}['saveCommentToSnapshot'](_0x3764e1){const _0x385934=_0x35e1eb;return{'id':_0x3764e1['id'],'threadId':_0x3764e1[_0x385934(0x1c0)],'ref':_0x3764e1['ref']};}};g=x([_(0x0,c['Inject'](P[_0x35e1eb(0x1da)])),_(0x1,c[_0x35e1eb(0x1b3)](c[_0x35e1eb(0x1e3)])),_(0x2,c[_0x35e1eb(0x1b3)](b[_0x35e1eb(0x205)])),_(0x3,c[_0x35e1eb(0x1b3)](c[_0x35e1eb(0x1d9)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0xeb86ed,_0x362e5e,_0x18a204,_0x215802)=>{const _0x477612=_0x35e1eb;for(var _0x34bad4=_0x215802>0x1?void 0x0:_0x215802?H(_0x362e5e,_0x18a204):_0x362e5e,_0x38a719=_0xeb86ed[_0x477612(0x1f5)]-0x1,_0x4718f9;_0x38a719>=0x0;_0x38a719--)(_0x4718f9=_0xeb86ed[_0x38a719])&&(_0x34bad4=_0x4718f9(_0x34bad4)||_0x34bad4);return _0x34bad4;},y=(_0x2767ba,_0x43f5fb)=>(_0x3f1147,_0x5eef15)=>_0x43f5fb(_0x3f1147,_0x5eef15,_0x2767ba);let C=class extends c[_0x35e1eb(0x212)]{constructor(_0x451958,_0x54cd37){const _0x2e0641=_0x35e1eb;super(),this[_0x2e0641(0x21e)]=_0x451958,this[_0x2e0641(0x1ca)]=_0x54cd37,this[_0x2e0641(0x213)]();}['_initDataSource'](){const _0x3da379=_0x35e1eb;this[_0x3da379(0x21e)]['dataSource']=this[_0x3da379(0x1ca)],this[_0x3da379(0x21e)][_0x3da379(0x1eb)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x35e1eb(0x1b3)](g))],C);var F=Object[_0x35e1eb(0x1f7)],L=Object['getOwnPropertyDescriptor'],Z=(_0x5a6d04,_0x19b0e9,_0x8c0d9d)=>_0x19b0e9 in _0x5a6d04?F(_0x5a6d04,_0x19b0e9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x8c0d9d}):_0x5a6d04[_0x19b0e9]=_0x8c0d9d,W=(_0x53ef3c,_0x52f358,_0x3bc9cf,_0xb85674)=>{const _0x56b8fd=_0x35e1eb;for(var _0x3a7da7=_0xb85674>0x1?void 0x0:_0xb85674?L(_0x52f358,_0x3bc9cf):_0x52f358,_0x2da7c3=_0x53ef3c[_0x56b8fd(0x1f5)]-0x1,_0x1e5b64;_0x2da7c3>=0x0;_0x2da7c3--)(_0x1e5b64=_0x53ef3c[_0x2da7c3])&&(_0x3a7da7=_0x1e5b64(_0x3a7da7)||_0x3a7da7);return _0x3a7da7;},O=(_0x329119,_0x130388)=>(_0x53fdd1,_0x583843)=>_0x130388(_0x53fdd1,_0x583843,_0x329119),N=(_0x599595,_0xbb0f27,_0x2b81e5)=>Z(_0x599595,typeof _0xbb0f27!=_0x35e1eb(0x1f2)?_0xbb0f27+'':_0xbb0f27,_0x2b81e5);exports[_0x35e1eb(0x1d4)]=class extends c['Plugin']{constructor(_0x312a43=D,_0x31d7fb,_0x38a85d){const _0x560b6e=_0x35e1eb;super(),this[_0x560b6e(0x1cd)]=_0x312a43,this[_0x560b6e(0x215)]=_0x31d7fb,this['_configService']=_0x38a85d;const {..._0x43e069}=c[_0x560b6e(0x21d)]({},D,this['_config']);this[_0x560b6e(0x20b)][_0x560b6e(0x1f1)](q,_0x43e069);}[_0x35e1eb(0x1b1)](){[[g],[C],[p]]['forEach'](_0x3dfc46=>{this['_injector']['add'](_0x3dfc46);});}[_0x35e1eb(0x1db)](){const _0x16ee8a=_0x35e1eb;this[_0x16ee8a(0x215)][_0x16ee8a(0x1e9)](C),this[_0x16ee8a(0x215)]['get'](p);}},N(exports[_0x35e1eb(0x1d4)],_0x35e1eb(0x1f0),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x35e1eb(0x1e6),c[_0x35e1eb(0x1d8)][_0x35e1eb(0x1c7)]),exports[_0x35e1eb(0x1d4)]=W([c['DependentOn'](j[_0x35e1eb(0x200)],b[_0x35e1eb(0x1bd)],T[_0x35e1eb(0x1d0)]),O(0x1,c[_0x35e1eb(0x1b3)](c[_0x35e1eb(0x1d9)])),O(0x2,c[_0x35e1eb(0x1be)])],exports[_0x35e1eb(0x1d4)]);
1
+ 'use strict';const _0x39019a=_0x20a6;(function(_0x5c0596,_0x5e0462){const _0x3a34be=_0x20a6,_0x1a7564=_0x5c0596();while(!![]){try{const _0x56f6bc=parseInt(_0x3a34be(0xef))/0x1*(-parseInt(_0x3a34be(0xb8))/0x2)+parseInt(_0x3a34be(0x108))/0x3+-parseInt(_0x3a34be(0x10c))/0x4+-parseInt(_0x3a34be(0x113))/0x5*(parseInt(_0x3a34be(0xd9))/0x6)+parseInt(_0x3a34be(0x10a))/0x7+-parseInt(_0x3a34be(0xc9))/0x8*(parseInt(_0x3a34be(0xd1))/0x9)+parseInt(_0x3a34be(0xfe))/0xa;if(_0x56f6bc===_0x5e0462)break;else _0x1a7564['push'](_0x1a7564['shift']());}catch(_0x282623){_0x1a7564['push'](_0x1a7564['shift']());}}}(_0x4105,0xb55c5));Object[_0x39019a(0x10b)](exports,Symbol['toStringTag'],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x39019a(0x101);var I=(_0xd3269f=>(_0xd3269f[_0xd3269f[_0x39019a(0x106)]=0x0]=_0x39019a(0x106),_0xd3269f[_0xd3269f[_0x39019a(0xc5)]=0x1]='Solved',_0xd3269f[_0xd3269f['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0xd3269f))(I||{}),v=(_0x109d9c=>(_0x109d9c[_0x109d9c['Unknown']=0x0]=_0x39019a(0xf7),_0x109d9c[_0x109d9c[_0x39019a(0xe5)]=0x1]=_0x39019a(0xe5),_0x109d9c[_0x109d9c[_0x39019a(0xd5)]=0x2]=_0x39019a(0xd5),_0x109d9c[_0x109d9c[_0x39019a(0xc4)]=0x3]=_0x39019a(0xc4),_0x109d9c[_0x109d9c[_0x39019a(0x105)]=0x4]=_0x39019a(0x105),_0x109d9c[_0x109d9c[_0x39019a(0xdf)]=0x5]=_0x39019a(0xdf),_0x109d9c[_0x109d9c['UNRECOGNIZED']=-0x1]=_0x39019a(0xb0),_0x109d9c))(v||{});const f=_0x5ae064=>c[_0x39019a(0xfa)](new Date(+_0x5ae064))[_0x39019a(0xbe)](_0x39019a(0xbb)),R=async(_0x4cc640,_0x396c5b)=>{const _0x391f0e=_0x39019a,_0x2a8b8b=_0x4cc640[_0x391f0e(0xf4)](c['UserManagerService']),_0x132b70=_0x4cc640[_0x391f0e(0xf4)](P[_0x391f0e(0x107)]);_0x396c5b['forEach'](_0x49ebc8=>{const _0x44c8a8=_0x391f0e;_0x2a8b8b[_0x44c8a8(0x112)](_0x49ebc8)&&_0x396c5b['delete'](_0x49ebc8);}),_0x396c5b['size']&&(await _0x132b70[_0x391f0e(0xf4)]('/universer-api/user/list',{'params':{'userIDs':[..._0x396c5b]}}))[_0x391f0e(0xed)][_0x391f0e(0xe2)]['forEach'](_0x277b41=>{_0x277b41&&_0x2a8b8b['addUser'](_0x277b41);});};var $=Object[_0x39019a(0xfd)],E=(_0x468be5,_0x2c9b55,_0x15e432,_0x50d7f3)=>{const _0xe5094d=_0x39019a;for(var _0x32dfe4=_0x50d7f3>0x1?void 0x0:_0x50d7f3?$(_0x2c9b55,_0x15e432):_0x2c9b55,_0x2b3e67=_0x468be5[_0xe5094d(0xcd)]-0x1,_0x4ea425;_0x2b3e67>=0x0;_0x2b3e67--)(_0x4ea425=_0x468be5[_0x2b3e67])&&(_0x32dfe4=_0x4ea425(_0x32dfe4)||_0x32dfe4);return _0x32dfe4;},S=(_0x4c3356,_0x37ebdf)=>(_0x2964b5,_0x3aa8aa)=>_0x37ebdf(_0x2964b5,_0x3aa8aa,_0x4c3356);let p=class extends c[_0x39019a(0xbf)]{constructor(_0x192718,_0x134170,_0x2dddbb,_0x560db8){const _0x247213=_0x39019a;super(),this[_0x247213(0xea)]=_0x192718,this[_0x247213(0xc1)]=_0x134170,this[_0x247213(0x109)]=_0x2dddbb,this[_0x247213(0x11a)]=_0x560db8,this[_0x247213(0x102)](),this[_0x247213(0xb1)]();}[_0x39019a(0xb1)](){const _0x3e5380=_0x39019a;this[_0x3e5380(0x116)](this[_0x3e5380(0xc1)][_0x3e5380(0x10f)]['pipe'](w['bufferTime'](0x10))['subscribe'](_0x5a32b0=>{const _0x19cecc=_0x3e5380,_0x2f2a6b=new Set();_0x5a32b0[_0x19cecc(0x11d)](_0x56e37d=>{const _0x4d04bf=_0x19cecc;switch(_0x56e37d[_0x4d04bf(0x119)]){case _0x4d04bf(0xd6):{const _0x2c169f=_0x56e37d[_0x4d04bf(0xf3)][_0x4d04bf(0xf1)];_0x2f2a6b[_0x4d04bf(0xd6)](_0x2c169f);break;}}}),R(this['_injector'],_0x2f2a6b);}));}[_0x39019a(0x102)](){const _0x4db1cd=_0x39019a;this[_0x4db1cd(0x116)](this[_0x4db1cd(0xea)][_0x4db1cd(0x10f)][_0x4db1cd(0xd8)](async _0x4111c3=>{const _0x3e083a=_0x4db1cd;var _0x1e95c2,_0x2a117f,_0x432c6b,_0x34bb83;const _0x3b9b75=(_0x1e95c2=this[_0x3e083a(0xc1)]['getUnit'](_0x4111c3[_0x3e083a(0x11c)])[_0x3e083a(0xda)](_0x30225c=>_0x30225c['threadId']===_0x4111c3[_0x3e083a(0x117)]))==null?void 0x0:_0x1e95c2[_0x3e083a(0xaf)];if(!_0x3b9b75)return;const {unitId:_0x3fcc31,subUnitId:_0x399d96}=_0x3b9b75;switch(_0x4111c3[_0x3e083a(0x100)]&&this[_0x3e083a(0x109)]['addUser'](_0x4111c3[_0x3e083a(0x100)]),_0x4111c3['type']){case v[_0x3e083a(0xe5)]:break;case v[_0x3e083a(0xd5)]:{this['_threadCommentModel'][_0x3e083a(0xf0)](_0x3fcc31,_0x399d96,{'unitId':_0x3fcc31,'subUnitId':_0x399d96,'ref':'','id':_0x4111c3[_0x3e083a(0xc7)],'dT':f(+_0x4111c3[_0x3e083a(0x118)]),'threadId':_0x4111c3['threadId'],'personId':(_0x432c6b=(_0x2a117f=_0x4111c3[_0x3e083a(0x100)])==null?void 0x0:_0x2a117f[_0x3e083a(0xf5)])!=null?_0x432c6b:_0x4111c3[_0x3e083a(0xf8)],'text':JSON[_0x3e083a(0xde)](_0x4111c3[_0x3e083a(0xd0)]),'parentId':_0x3b9b75['id']});break;}case v[_0x3e083a(0x105)]:{const _0x596a8a=this[_0x3e083a(0xc1)][_0x3e083a(0xe6)](_0x3fcc31,_0x399d96,_0x4111c3[_0x3e083a(0xc7)]);_0x596a8a&&_0x596a8a['parentId']&&this[_0x3e083a(0xc1)]['deleteComment'](_0x3fcc31,_0x399d96,_0x4111c3[_0x3e083a(0xc7)]);break;}case v[_0x3e083a(0xc4)]:{this[_0x3e083a(0xc1)][_0x3e083a(0xdc)](_0x3fcc31,_0x399d96,{'commentId':_0x4111c3['replyId'],'text':JSON[_0x3e083a(0xde)](_0x4111c3[_0x3e083a(0xd0)])});break;}case v['Solve']:{const _0x12e409=(_0x34bb83=this[_0x3e083a(0xc1)][_0x3e083a(0xf6)](_0x4111c3[_0x3e083a(0x11c)])['find'](_0x18745a=>_0x18745a[_0x3e083a(0x117)]===_0x4111c3['threadId']))==null?void 0x0:_0x34bb83[_0x3e083a(0xaf)];_0x12e409&&this[_0x3e083a(0xc1)][_0x3e083a(0x103)](_0x3fcc31,_0x399d96,_0x12e409['id'],_0x4111c3[_0x3e083a(0xce)]===I[_0x3e083a(0xc5)]);break;}}}));}};p=E([S(0x0,c[_0x39019a(0xdd)](b['CommentService'])),S(0x1,c[_0x39019a(0xdd)](M[_0x39019a(0x115)])),S(0x2,c[_0x39019a(0xdd)](c[_0x39019a(0xb4)])),S(0x3,c['Inject'](c['Injector']))],p);const q=_0x39019a(0xcb),D={};function _0x20a6(_0x2fd923,_0x349622){const _0x41054b=_0x4105();return _0x20a6=function(_0x20a647,_0x11ddc6){_0x20a647=_0x20a647-0xac;let _0x2b51a9=_0x41054b[_0x20a647];return _0x2b51a9;},_0x20a6(_0x2fd923,_0x349622);}var A=Object[_0x39019a(0xfd)],x=(_0x3bf36f,_0x1c2e5c,_0x7c40be,_0x5991be)=>{for(var _0x408da1=_0x5991be>0x1?void 0x0:_0x5991be?A(_0x1c2e5c,_0x7c40be):_0x1c2e5c,_0x2dc089=_0x3bf36f['length']-0x1,_0x36b15b;_0x2dc089>=0x0;_0x2dc089--)(_0x36b15b=_0x3bf36f[_0x2dc089])&&(_0x408da1=_0x36b15b(_0x408da1)||_0x408da1);return _0x408da1;},_=(_0x1acc37,_0x230ca0)=>(_0x5aee1b,_0xed20ab)=>_0x230ca0(_0x5aee1b,_0xed20ab,_0x1acc37);function Y(_0x13c5cc,_0x3c5f03){const _0x4c9474=_0x39019a,_0x1cdfb3=_0x13c5cc[_0x4c9474(0xc6)][0x0];return{..._0x3c5f03,'id':_0x1cdfb3[_0x4c9474(0xc7)],'resolved':_0x13c5cc[_0x4c9474(0xce)]===0x1,'dT':f(_0x1cdfb3['createTimestamp']),'personId':_0x1cdfb3[_0x4c9474(0xf8)],'threadId':_0x1cdfb3['threadId']};}function G(_0xd89636,_0x34d959,_0x5b8b02){const _0x175234=_0x39019a;var _0x1c14c9,_0x3d616e;if(((_0x3d616e=(_0x1c14c9=_0xd89636==null?void 0x0:_0xd89636['replies'])==null?void 0x0:_0x1c14c9[_0x175234(0xcd)])!=null?_0x3d616e:0x0)>0x0){const _0x1675e9=(_0x127ec8,_0x188062)=>({'id':_0x127ec8[_0x175234(0xc7)],'threadId':_0x127ec8[_0x175234(0x117)],'dT':f(_0x127ec8[_0x175234(0x118)]),'personId':_0x127ec8['userId'],'resolved':_0xd89636['solved']===I[_0x175234(0xc5)],'unitId':_0x34d959,'subUnitId':_0x5b8b02,'text':JSON[_0x175234(0xde)](_0x127ec8[_0x175234(0xd0)]),'parentId':_0x188062}),_0x19f8cc=_0x1675e9(_0xd89636[_0x175234(0xc6)][0x0]);return{..._0x19f8cc,'children':_0xd89636[_0x175234(0xc6)]['slice'](0x1)[_0x175234(0xac)](_0x5726d0=>_0x1675e9(_0x5726d0,_0x19f8cc['id']))};}return null;}let g=class{constructor(_0x404a1f,_0x4c0d9c,_0x322399,_0x50d001){const _0x283764=_0x39019a;this[_0x283764(0xff)]=_0x404a1f,this[_0x283764(0x109)]=_0x4c0d9c,this[_0x283764(0xfc)]=_0x322399,this['_injector']=_0x50d001;}async['addComment'](_0x132952){const _0x16720b=_0x39019a;var _0x3c8767,_0x2db275;const {parentId:_0x229ca9,unitId:_0xcdd3e8,text:_0x23e51d,threadId:_0x3c2809}=_0x132952,_0x2cf9ce=(_0x2db275=(_0x3c8767=_0x23e51d[_0x16720b(0xdb)])==null?void 0x0:_0x3c8767['filter'](_0x1bf71d=>_0x1bf71d['rangeType']===c[_0x16720b(0xb9)][_0x16720b(0xbc)])['map'](_0x5b59b7=>_0x5b59b7[_0x16720b(0xeb)]))!=null?_0x2db275:[],_0x4dade4=JSON['stringify'](_0x23e51d),_0x3f629f=(await this[_0x16720b(0xfc)][_0x16720b(0xee)](_0xcdd3e8))[_0x16720b(0xf2)]();if(_0x229ca9){const _0x2cb869={'memberId':_0x3f629f,'unitId':_0xcdd3e8,'content':_0x4dade4,'mention':_0x2cf9ce,'threadId':_0x3c2809},_0x452619=(await this[_0x16720b(0xff)][_0x16720b(0xc2)](_0x16720b(0xad)+_0xcdd3e8+_0x16720b(0xba),{'body':_0x2cb869}))[_0x16720b(0xed)][_0x16720b(0xb5)];return{..._0x132952,'id':_0x452619['replyId'],'dT':c[_0x16720b(0xfa)](+_0x452619[_0x16720b(0x118)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x452619['userId']};}else{const _0x1ca3f5={'memberId':_0x3f629f,'unitId':_0xcdd3e8,'content':_0x4dade4,'mention':_0x2cf9ce},_0x1e4606=await this[_0x16720b(0xff)][_0x16720b(0xc2)](_0x16720b(0xad)+_0xcdd3e8+'/add',{'body':_0x1ca3f5});return Y(_0x1e4606[_0x16720b(0xed)][_0x16720b(0xd4)],_0x132952);}}async['updateComment'](_0x4ed2a0){const _0x69c1dc=_0x39019a;var _0x583155,_0x30f9ff;const {text:_0x1a54c7,unitId:_0x26b75d}=_0x4ed2a0,_0x62c392=(_0x30f9ff=(_0x583155=_0x1a54c7['customRanges'])==null?void 0x0:_0x583155[_0x69c1dc(0xfb)](_0x358036=>_0x358036[_0x69c1dc(0xe7)]===c['CustomRangeType'][_0x69c1dc(0xbc)])[_0x69c1dc(0xac)](_0x111872=>_0x111872[_0x69c1dc(0xeb)]))!=null?_0x30f9ff:[],_0x81179d=JSON[_0x69c1dc(0xcf)](_0x1a54c7),_0x1fbc2d=_0x4ed2a0[_0x69c1dc(0x117)],_0x3fbd90=_0x4ed2a0['id'],_0x1f4052={'memberId':(await this['_sessionService']['requireSession'](_0x26b75d))[_0x69c1dc(0xf2)](),'unitId':_0x26b75d,'threadId':_0x1fbc2d,'mention':_0x62c392,'content':_0x81179d,'replyId':_0x3fbd90},_0x50408e=await this['_httpService'][_0x69c1dc(0xc2)](_0x69c1dc(0xad)+_0x26b75d+'/edit',{'body':_0x1f4052});return!_0x50408e[_0x69c1dc(0xed)][_0x69c1dc(0xe8)]||_0x50408e[_0x69c1dc(0xed)]['error'][_0x69c1dc(0x10e)]===0x1;}async[_0x39019a(0x103)](_0x2aadbd){const _0x306217=_0x39019a,{unitId:_0x25ab61}=_0x2aadbd,_0x40160e=_0x2aadbd[_0x306217(0x117)],_0x281f5f={'memberId':this[_0x306217(0x109)]['getCurrentUser']()[_0x306217(0xf5)],'unitId':_0x25ab61,'threadId':_0x40160e,'solved':_0x2aadbd[_0x306217(0xc8)]?I[_0x306217(0xc5)]:I[_0x306217(0x106)]},_0x53c138=await this[_0x306217(0xff)][_0x306217(0xc2)](_0x306217(0xad)+_0x25ab61+_0x306217(0xd3),{'body':_0x281f5f});return!_0x53c138[_0x306217(0xed)]['error']||_0x53c138[_0x306217(0xed)][_0x306217(0xe8)][_0x306217(0x10e)]===0x1;}async['deleteComment'](_0x252980,_0x7be464,_0x54a66e,_0x3bcf0d){const _0x124b04=_0x39019a,_0x36c417={'memberId':(await this[_0x124b04(0xfc)][_0x124b04(0xee)](_0x252980))['getMemberID'](),'threadId':_0x54a66e,'replyId':_0x3bcf0d,'unitId':_0x252980},_0x117e15=await this[_0x124b04(0xff)]['post'](_0x124b04(0xad)+_0x252980+_0x124b04(0x11b),{'body':_0x36c417});return!_0x117e15[_0x124b04(0xed)][_0x124b04(0xe8)]||_0x117e15[_0x124b04(0xed)][_0x124b04(0xe8)][_0x124b04(0x10e)]===0x1;}async['listComments'](_0x41c08d,_0x4f2ba1,_0x31938e){const _0x2c8617=_0x39019a,_0x1fd354={'unitId':_0x41c08d,'threadId':_0x31938e},_0x42e930=await this['_httpService'][_0x2c8617(0xc2)]('/universer-api/comment/unit/'+_0x41c08d+'/list',{'body':_0x1fd354}),_0x37cff0=_0x31938e[_0x2c8617(0xac)](_0x266c52=>G(_0x42e930[_0x2c8617(0xed)][_0x2c8617(0xec)][_0x266c52],_0x41c08d,_0x4f2ba1))[_0x2c8617(0xfb)](Boolean);return Object[_0x2c8617(0xb7)](_0x42e930[_0x2c8617(0xed)][_0x2c8617(0xe2)])[_0x2c8617(0x11d)](_0x18bfa0=>{const _0x38815a=_0x2c8617;this[_0x38815a(0x109)]['addUser'](_0x18bfa0);}),_0x37cff0;}[_0x39019a(0xd7)](_0x53d7fa){const _0x112bce=_0x39019a;return{'id':_0x53d7fa['id'],'threadId':_0x53d7fa[_0x112bce(0x117)],'ref':_0x53d7fa[_0x112bce(0x110)]};}};g=x([_(0x0,c[_0x39019a(0xdd)](P[_0x39019a(0x107)])),_(0x1,c['Inject'](c[_0x39019a(0xb4)])),_(0x2,c[_0x39019a(0xdd)](b[_0x39019a(0x104)])),_(0x3,c[_0x39019a(0xdd)](c[_0x39019a(0xe0)]))],g);var H=Object[_0x39019a(0xfd)],J=(_0x135d19,_0x3a7f0a,_0x45c9f1,_0x40ce6f)=>{const _0x94424f=_0x39019a;for(var _0x429361=_0x40ce6f>0x1?void 0x0:_0x40ce6f?H(_0x3a7f0a,_0x45c9f1):_0x3a7f0a,_0xe20fb2=_0x135d19[_0x94424f(0xcd)]-0x1,_0x111b25;_0xe20fb2>=0x0;_0xe20fb2--)(_0x111b25=_0x135d19[_0xe20fb2])&&(_0x429361=_0x111b25(_0x429361)||_0x429361);return _0x429361;},y=(_0xa59c59,_0x498c46)=>(_0x1f982f,_0x2e8b47)=>_0x498c46(_0x1f982f,_0x2e8b47,_0xa59c59);function _0x4105(){const _0x5df9b9=['symbol','length','solved','stringify','content','8426295mtFMSr','UniverThreadCommentDataSourcePlugin','/solved','comment','Reply','add','saveCommentToSnapshot','subscribe','6UCwxol','find','customRanges','updateComment','Inject','parse','Solve','Injector','syncUpdateMutationToColla','users','_configService','onReady','Add','getComment','rangeType','error','UNIVER_UNKNOWN','_commentService','rangeId','comments','body','requireSession','1TVgZWS','addComment','personId','getMemberID','payload','get','userID','getUnit','Unknown','userId','setConfig','dayjs','filter','_sessionService','getOwnPropertyDescriptor','13023770LrqoTj','_httpService','user','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_init','resolveComment','CollaborationSessionService','Delete','OpenOrReOpen','HTTPService','3917658gyPXKz','_userService','8677949cjMWXB','defineProperty','5442776ZXqkCP','UniverThreadCommentUIPlugin','code','commentUpdate$','ref','_initDataSource','getUser','3914410uMimFQ','UniverCollaborationClientPlugin','ThreadCommentModel','disposeWithMe','threadId','createTimestamp','type','_injector','/delete','unitId','forEach','map','/universer-api/comment/unit/','DependentOn','root','UNRECOGNIZED','_initUserSync','_config','_threadCommentDataSource','UserManagerService','reply','merge','values','50572JiRPUy','CustomRangeType','/reply','YYYY/MM/DD\x20HH:mm','COMMENT','_threadCommentDataSourceService','format','Disposable','Plugin','_threadCommentModel','post','UniverInstanceType','Edit','Solved','replies','replyId','resolved','8QqmfSV','UniverLicensePlugin','thread-comment-data-source.config'];_0x4105=function(){return _0x5df9b9;};return _0x4105();}let C=class extends c[_0x39019a(0xbf)]{constructor(_0x3199cd,_0x34d061){const _0x246258=_0x39019a;super(),this[_0x246258(0xbd)]=_0x3199cd,this['_threadCommentDataSource']=_0x34d061,this['_initDataSource']();}[_0x39019a(0x111)](){const _0x35a48b=_0x39019a;this[_0x35a48b(0xbd)]['dataSource']=this[_0x35a48b(0xb3)],this[_0x35a48b(0xbd)][_0x35a48b(0xe1)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x39019a(0xdd)](g))],C);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x16f042,_0xd4873b,_0x228eee)=>_0xd4873b in _0x16f042?F(_0x16f042,_0xd4873b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x228eee}):_0x16f042[_0xd4873b]=_0x228eee,W=(_0x5a1c65,_0x2f8cbb,_0x3983c6,_0x3fa279)=>{for(var _0x5a4195=_0x3fa279>0x1?void 0x0:_0x3fa279?L(_0x2f8cbb,_0x3983c6):_0x2f8cbb,_0x1f3983=_0x5a1c65['length']-0x1,_0xacbb2b;_0x1f3983>=0x0;_0x1f3983--)(_0xacbb2b=_0x5a1c65[_0x1f3983])&&(_0x5a4195=_0xacbb2b(_0x5a4195)||_0x5a4195);return _0x5a4195;},O=(_0x150e38,_0x299657)=>(_0x5e76e6,_0x45c57b)=>_0x299657(_0x5e76e6,_0x45c57b,_0x150e38),N=(_0x225c72,_0xdbcb19,_0x204314)=>Z(_0x225c72,typeof _0xdbcb19!=_0x39019a(0xcc)?_0xdbcb19+'':_0xdbcb19,_0x204314);exports[_0x39019a(0xd2)]=class extends c[_0x39019a(0xc0)]{constructor(_0xab130a=D,_0x5a72f7,_0xaf7685){const _0x4ee355=_0x39019a;super(),this[_0x4ee355(0xb2)]=_0xab130a,this['_injector']=_0x5a72f7,this[_0x4ee355(0xe3)]=_0xaf7685;const {..._0x2e4f2f}=c[_0x4ee355(0xb6)]({},D,this['_config']);this[_0x4ee355(0xe3)][_0x4ee355(0xf9)](q,_0x2e4f2f);}['onStarting'](){[[g],[C],[p]]['forEach'](_0xa2e3c8=>{const _0x3f82a9=_0x20a6;this[_0x3f82a9(0x11a)]['add'](_0xa2e3c8);});}[_0x39019a(0xe4)](){const _0x26e06f=_0x39019a;this[_0x26e06f(0x11a)]['get'](C),this['_injector'][_0x26e06f(0xf4)](p);}},N(exports[_0x39019a(0xd2)],'pluginName',U),N(exports[_0x39019a(0xd2)],'type',c[_0x39019a(0xc3)][_0x39019a(0xe9)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x39019a(0xae)](j[_0x39019a(0x10d)],b[_0x39019a(0x114)],T[_0x39019a(0xca)]),O(0x1,c[_0x39019a(0xdd)](c[_0x39019a(0xe0)])),O(0x2,c['IConfigService'])],exports[_0x39019a(0xd2)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x3125a2=_0x44fb;(function(_0x41e1e5,_0xe00b07){const _0x1c28cb=_0x44fb,_0x39dbf5=_0x41e1e5();while(!![]){try{const _0x17feb2=parseInt(_0x1c28cb(0x18f))/0x1*(-parseInt(_0x1c28cb(0x199))/0x2)+parseInt(_0x1c28cb(0x1a9))/0x3+-parseInt(_0x1c28cb(0x1a5))/0x4+-parseInt(_0x1c28cb(0x1d2))/0x5+-parseInt(_0x1c28cb(0x1a8))/0x6*(-parseInt(_0x1c28cb(0x1b1))/0x7)+-parseInt(_0x1c28cb(0x1d1))/0x8*(-parseInt(_0x1c28cb(0x1b7))/0x9)+parseInt(_0x1c28cb(0x1c9))/0xa*(parseInt(_0x1c28cb(0x1a2))/0xb);if(_0x17feb2===_0xe00b07)break;else _0x39dbf5['push'](_0x39dbf5['shift']());}catch(_0x24c704){_0x39dbf5['push'](_0x39dbf5['shift']());}}}(_0x2427,0xd6d34));import{CommentService as _0x28c565,CollaborationSessionService as _0x3cf7e3,UniverCollaborationClientPlugin as _0x12a624}from'@univerjs-pro/collaboration-client';function _0x2427(){const _0x2925b9=['payload','format','8dncZuI','1515075ShBbBd','_userService','parse','getMemberID','solved','find','resolveComment','unitId','Delete','delete','post','_commentService','pluginName','getUnit','UNRECOGNIZED','/add','Solve','_httpService','/universer-api/user/list','size','resolved','userId','root','_config','rangeType','Solved','onReady','syncUpdateMutationToColla','forEach','saveCommentToSnapshot','get','YYYY/MM/DD\x20HH:mm','comments','Add','OpenOrReOpen','subscribe','personId','requireSession','9bcyeDc','/universer-api/comment/unit/','userID','getComment','threadId','slice','Edit','_initDataSource','replies','_configService','356744Wubiae','body','commentUpdate$','Reply','rangeId','code','/delete','_sessionService','length','22bNUBak','stringify','customRanges','4074688hpXWEt','dataSource','reply','194478OnvweG','4268274oFerap','error','/edit','createTimestamp','pipe','/reply','deleteComment','parentId','98BfMYpU','_init','Unknown','replyId','_threadCommentModel','_initUserSync','11508309wjDKyO','addUser','_threadCommentDataSource','_threadCommentDataSourceService','COMMENT','getUser','users','add','disposeWithMe','_injector','setConfig','addComment','content','map','defineProperty','comment','user','ref','3258590oXsteK','UNIVER_UNKNOWN','updateComment','type','filter','getOwnPropertyDescriptor'];_0x2427=function(){return _0x2925b9;};return _0x2427();}function _0x44fb(_0x3ffcd7,_0x2b8992){const _0x24278a=_0x2427();return _0x44fb=function(_0x44fb18,_0x8e07fd){_0x44fb18=_0x44fb18-0x183;let _0x18e74e=_0x24278a[_0x44fb18];return _0x18e74e;},_0x44fb(_0x3ffcd7,_0x2b8992);}import{UniverLicensePlugin as _0x2e3ca3}from'@univerjs-pro/license';import{dayjs as _0x466984,UserManagerService as _0x877d29,Inject as _0x5223ea,Injector as _0x579925,Disposable as _0x2c471d,CustomRangeType as _0x1659d6,UniverInstanceType as _0x4f26b0,DependentOn as _0x3f95ef,IConfigService as _0x5a7661,Plugin as _0x42ff71,merge as _0x497adb}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x479164}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2de7ff,IThreadCommentDataSourceService as _0x1af45c}from'@univerjs/thread-comment';import{bufferTime as _0x5a8fb7}from'rxjs';import{HTTPService as _0x3180ef}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xe3f0c8=>(_0xe3f0c8[_0xe3f0c8[_0x3125a2(0x18b)]=0x0]='OpenOrReOpen',_0xe3f0c8[_0xe3f0c8[_0x3125a2(0x1eb)]=0x1]=_0x3125a2(0x1eb),_0xe3f0c8[_0xe3f0c8['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0xe3f0c8))(I||{}),v=(_0x4c5f55=>(_0x4c5f55[_0x4c5f55[_0x3125a2(0x1b3)]=0x0]=_0x3125a2(0x1b3),_0x4c5f55[_0x4c5f55['Add']=0x1]=_0x3125a2(0x18a),_0x4c5f55[_0x4c5f55[_0x3125a2(0x19c)]=0x2]=_0x3125a2(0x19c),_0x4c5f55[_0x4c5f55[_0x3125a2(0x195)]=0x3]=_0x3125a2(0x195),_0x4c5f55[_0x4c5f55[_0x3125a2(0x1da)]=0x4]=_0x3125a2(0x1da),_0x4c5f55[_0x4c5f55['Solve']=0x5]='Solve',_0x4c5f55[_0x4c5f55[_0x3125a2(0x1e0)]=-0x1]='UNRECOGNIZED',_0x4c5f55))(v||{});const D=_0x2b313a=>_0x466984(new Date(+_0x2b313a))[_0x3125a2(0x1d0)](_0x3125a2(0x188)),B=async(_0x3202d6,_0x270c55)=>{const _0x51211b=_0x3125a2,_0x1628b6=_0x3202d6[_0x51211b(0x187)](_0x877d29),_0x519477=_0x3202d6[_0x51211b(0x187)](_0x3180ef);_0x270c55[_0x51211b(0x185)](_0x42b6d9=>{const _0x4213e7=_0x51211b;_0x1628b6[_0x4213e7(0x1bc)](_0x42b6d9)&&_0x270c55[_0x4213e7(0x1db)](_0x42b6d9);}),_0x270c55[_0x51211b(0x1e5)]&&(await _0x519477['get'](_0x51211b(0x1e4),{'params':{'userIDs':[..._0x270c55]}}))[_0x51211b(0x19a)][_0x51211b(0x1bd)][_0x51211b(0x185)](_0x837705=>{const _0x2f9e68=_0x51211b;_0x837705&&_0x1628b6[_0x2f9e68(0x1b8)](_0x837705);});};var K=Object[_0x3125a2(0x1ce)],V=(_0x3a9b9d,_0x397d31,_0x59d0e8,_0x582354)=>{for(var _0x136155=_0x582354>0x1?void 0x0:_0x582354?K(_0x397d31,_0x59d0e8):_0x397d31,_0x11ff5a=_0x3a9b9d['length']-0x1,_0x5c633b;_0x11ff5a>=0x0;_0x11ff5a--)(_0x5c633b=_0x3a9b9d[_0x11ff5a])&&(_0x136155=_0x5c633b(_0x136155)||_0x136155);return _0x136155;},p=(_0x48c30e,_0x3f79eb)=>(_0x2d6beb,_0x41d856)=>_0x3f79eb(_0x2d6beb,_0x41d856,_0x48c30e);let S=class extends _0x2c471d{constructor(_0x2aa13d,_0x1c09b5,_0x3581e4,_0x53cd1c){const _0x396faf=_0x3125a2;super(),this['_commentService']=_0x2aa13d,this[_0x396faf(0x1b5)]=_0x1c09b5,this[_0x396faf(0x1d3)]=_0x3581e4,this[_0x396faf(0x1c0)]=_0x53cd1c,this['_init'](),this[_0x396faf(0x1b6)]();}[_0x3125a2(0x1b6)](){const _0x2ceda4=_0x3125a2;this[_0x2ceda4(0x1bf)](this[_0x2ceda4(0x1b5)]['commentUpdate$'][_0x2ceda4(0x1ad)](_0x5a8fb7(0x10))[_0x2ceda4(0x18c)](_0x424028=>{const _0x256207=_0x2ceda4,_0x5cf6ca=new Set();_0x424028['forEach'](_0x2c3930=>{const _0x4fb22f=_0x44fb;switch(_0x2c3930[_0x4fb22f(0x1cc)]){case _0x4fb22f(0x1be):{const _0x464d2d=_0x2c3930[_0x4fb22f(0x1cf)][_0x4fb22f(0x18d)];_0x5cf6ca[_0x4fb22f(0x1be)](_0x464d2d);break;}}}),B(this[_0x256207(0x1c0)],_0x5cf6ca);}));}[_0x3125a2(0x1b2)](){const _0x1bcace=_0x3125a2;this[_0x1bcace(0x1bf)](this[_0x1bcace(0x1dd)][_0x1bcace(0x19b)][_0x1bcace(0x18c)](async _0x431dcc=>{const _0x48128a=_0x1bcace;var _0x44c3ab,_0x26b813,_0x2dc8b6,_0xfdc3bc;const _0x3829b4=(_0x44c3ab=this[_0x48128a(0x1b5)][_0x48128a(0x1df)](_0x431dcc[_0x48128a(0x1d9)])['find'](_0x1b27dc=>_0x1b27dc[_0x48128a(0x193)]===_0x431dcc[_0x48128a(0x193)]))==null?void 0x0:_0x44c3ab[_0x48128a(0x1e8)];if(!_0x3829b4)return;const {unitId:_0x5101e9,subUnitId:_0x441c03}=_0x3829b4;switch(_0x431dcc[_0x48128a(0x1c7)]&&this[_0x48128a(0x1d3)]['addUser'](_0x431dcc[_0x48128a(0x1c7)]),_0x431dcc[_0x48128a(0x1cc)]){case v[_0x48128a(0x18a)]:break;case v[_0x48128a(0x19c)]:{this[_0x48128a(0x1b5)][_0x48128a(0x1c2)](_0x5101e9,_0x441c03,{'unitId':_0x5101e9,'subUnitId':_0x441c03,'ref':'','id':_0x431dcc['replyId'],'dT':D(+_0x431dcc[_0x48128a(0x1ac)]),'threadId':_0x431dcc[_0x48128a(0x193)],'personId':(_0x2dc8b6=(_0x26b813=_0x431dcc[_0x48128a(0x1c7)])==null?void 0x0:_0x26b813[_0x48128a(0x191)])!=null?_0x2dc8b6:_0x431dcc[_0x48128a(0x1e7)],'text':JSON[_0x48128a(0x1d4)](_0x431dcc[_0x48128a(0x1c3)]),'parentId':_0x3829b4['id']});break;}case v[_0x48128a(0x1da)]:{const _0x9fbc9a=this[_0x48128a(0x1b5)][_0x48128a(0x192)](_0x5101e9,_0x441c03,_0x431dcc['replyId']);_0x9fbc9a&&_0x9fbc9a[_0x48128a(0x1b0)]&&this[_0x48128a(0x1b5)][_0x48128a(0x1af)](_0x5101e9,_0x441c03,_0x431dcc[_0x48128a(0x1b4)]);break;}case v['Edit']:{this[_0x48128a(0x1b5)]['updateComment'](_0x5101e9,_0x441c03,{'commentId':_0x431dcc[_0x48128a(0x1b4)],'text':JSON[_0x48128a(0x1d4)](_0x431dcc[_0x48128a(0x1c3)])});break;}case v[_0x48128a(0x1e2)]:{const _0x9c79a4=(_0xfdc3bc=this[_0x48128a(0x1b5)][_0x48128a(0x1df)](_0x431dcc[_0x48128a(0x1d9)])[_0x48128a(0x1d7)](_0x4ee24d=>_0x4ee24d[_0x48128a(0x193)]===_0x431dcc[_0x48128a(0x193)]))==null?void 0x0:_0xfdc3bc[_0x48128a(0x1e8)];_0x9c79a4&&this[_0x48128a(0x1b5)][_0x48128a(0x1d8)](_0x5101e9,_0x441c03,_0x9c79a4['id'],_0x431dcc[_0x48128a(0x1d6)]===I[_0x48128a(0x1eb)]);break;}}}));}};S=V([p(0x0,_0x5223ea(_0x28c565)),p(0x1,_0x5223ea(_0x2de7ff)),p(0x2,_0x5223ea(_0x877d29)),p(0x3,_0x5223ea(_0x579925))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x339343,_0x5ca4ea,_0x515898,_0x5ad8d2)=>{const _0x562ed1=_0x3125a2;for(var _0x514722=_0x5ad8d2>0x1?void 0x0:_0x5ad8d2?k(_0x5ca4ea,_0x515898):_0x5ca4ea,_0x45b5b1=_0x339343[_0x562ed1(0x1a1)]-0x1,_0x5827c5;_0x45b5b1>=0x0;_0x45b5b1--)(_0x5827c5=_0x339343[_0x45b5b1])&&(_0x514722=_0x5827c5(_0x514722)||_0x514722);return _0x514722;},_=(_0x217570,_0x353cd8)=>(_0x34130b,_0x4bc6f3)=>_0x353cd8(_0x34130b,_0x4bc6f3,_0x217570);function X(_0x52403d,_0x146f9e){const _0x3523f6=_0x3125a2,_0x128473=_0x52403d[_0x3523f6(0x197)][0x0];return{..._0x146f9e,'id':_0x128473[_0x3523f6(0x1b4)],'resolved':_0x52403d[_0x3523f6(0x1d6)]===0x1,'dT':D(_0x128473[_0x3523f6(0x1ac)]),'personId':_0x128473[_0x3523f6(0x1e7)],'threadId':_0x128473[_0x3523f6(0x193)]};}function ee(_0x1db493,_0x512efd,_0xfd8a7f){const _0x2c1385=_0x3125a2;var _0x3b0383,_0xeaafa9;if(((_0xeaafa9=(_0x3b0383=_0x1db493==null?void 0x0:_0x1db493['replies'])==null?void 0x0:_0x3b0383[_0x2c1385(0x1a1)])!=null?_0xeaafa9:0x0)>0x0){const _0x28fc8a=(_0x3402db,_0x3712e2)=>({'id':_0x3402db[_0x2c1385(0x1b4)],'threadId':_0x3402db['threadId'],'dT':D(_0x3402db[_0x2c1385(0x1ac)]),'personId':_0x3402db[_0x2c1385(0x1e7)],'resolved':_0x1db493['solved']===I[_0x2c1385(0x1eb)],'unitId':_0x512efd,'subUnitId':_0xfd8a7f,'text':JSON[_0x2c1385(0x1d4)](_0x3402db['content']),'parentId':_0x3712e2}),_0x464864=_0x28fc8a(_0x1db493[_0x2c1385(0x197)][0x0]);return{..._0x464864,'children':_0x1db493[_0x2c1385(0x197)][_0x2c1385(0x194)](0x1)[_0x2c1385(0x1c4)](_0x443b83=>_0x28fc8a(_0x443b83,_0x464864['id']))};}return null;}let f=class{constructor(_0x5e7810,_0x244858,_0x16f12e,_0x4b3b62){const _0x85b0bf=_0x3125a2;this[_0x85b0bf(0x1e3)]=_0x5e7810,this[_0x85b0bf(0x1d3)]=_0x244858,this[_0x85b0bf(0x1a0)]=_0x16f12e,this[_0x85b0bf(0x1c0)]=_0x4b3b62;}async['addComment'](_0x3ee18f){const _0x1a78c9=_0x3125a2;var _0x133bf3,_0x3d7aa0;const {parentId:_0x5f38a5,unitId:_0x5cb725,text:_0x3a8071,threadId:_0x7bc1d3}=_0x3ee18f,_0x5b316b=(_0x3d7aa0=(_0x133bf3=_0x3a8071[_0x1a78c9(0x1a4)])==null?void 0x0:_0x133bf3[_0x1a78c9(0x1cd)](_0x4bd2d1=>_0x4bd2d1['rangeType']===_0x1659d6[_0x1a78c9(0x1bb)])[_0x1a78c9(0x1c4)](_0x1bb3bc=>_0x1bb3bc[_0x1a78c9(0x19d)]))!=null?_0x3d7aa0:[],_0x4b28c0=JSON[_0x1a78c9(0x1a3)](_0x3a8071),_0x33d650=(await this[_0x1a78c9(0x1a0)][_0x1a78c9(0x18e)](_0x5cb725))[_0x1a78c9(0x1d5)]();if(_0x5f38a5){const _0x2afe42={'memberId':_0x33d650,'unitId':_0x5cb725,'content':_0x4b28c0,'mention':_0x5b316b,'threadId':_0x7bc1d3},_0x1d8332=(await this[_0x1a78c9(0x1e3)][_0x1a78c9(0x1dc)](_0x1a78c9(0x190)+_0x5cb725+_0x1a78c9(0x1ae),{'body':_0x2afe42}))[_0x1a78c9(0x19a)][_0x1a78c9(0x1a7)];return{..._0x3ee18f,'id':_0x1d8332[_0x1a78c9(0x1b4)],'dT':_0x466984(+_0x1d8332['createTimestamp'])[_0x1a78c9(0x1d0)](_0x1a78c9(0x188)),'personId':_0x1d8332[_0x1a78c9(0x1e7)]};}else{const _0x41a107={'memberId':_0x33d650,'unitId':_0x5cb725,'content':_0x4b28c0,'mention':_0x5b316b},_0x2b65d3=await this[_0x1a78c9(0x1e3)]['post']('/universer-api/comment/unit/'+_0x5cb725+_0x1a78c9(0x1e1),{'body':_0x41a107});return X(_0x2b65d3[_0x1a78c9(0x19a)][_0x1a78c9(0x1c6)],_0x3ee18f);}}async[_0x3125a2(0x1cb)](_0x37eeec){const _0x25041b=_0x3125a2;var _0x121bec,_0x57373c;const {text:_0x5b7800,unitId:_0x5e4448}=_0x37eeec,_0x1f7640=(_0x57373c=(_0x121bec=_0x5b7800[_0x25041b(0x1a4)])==null?void 0x0:_0x121bec['filter'](_0x381e66=>_0x381e66[_0x25041b(0x1ea)]===_0x1659d6[_0x25041b(0x1bb)])[_0x25041b(0x1c4)](_0x3dedb5=>_0x3dedb5['rangeId']))!=null?_0x57373c:[],_0x311b66=JSON[_0x25041b(0x1a3)](_0x5b7800),_0x59f8fc=_0x37eeec[_0x25041b(0x193)],_0x25b162=_0x37eeec['id'],_0x30c16b={'memberId':(await this['_sessionService'][_0x25041b(0x18e)](_0x5e4448))['getMemberID'](),'unitId':_0x5e4448,'threadId':_0x59f8fc,'mention':_0x1f7640,'content':_0x311b66,'replyId':_0x25b162},_0x22749f=await this[_0x25041b(0x1e3)][_0x25041b(0x1dc)](_0x25041b(0x190)+_0x5e4448+_0x25041b(0x1ab),{'body':_0x30c16b});return!_0x22749f[_0x25041b(0x19a)]['error']||_0x22749f['body'][_0x25041b(0x1aa)]['code']===0x1;}async[_0x3125a2(0x1d8)](_0x2a14f8){const _0x40ccaf=_0x3125a2,{unitId:_0x489c2b}=_0x2a14f8,_0x52e3b4=_0x2a14f8['threadId'],_0x4e21bf={'memberId':this[_0x40ccaf(0x1d3)]['getCurrentUser']()[_0x40ccaf(0x191)],'unitId':_0x489c2b,'threadId':_0x52e3b4,'solved':_0x2a14f8[_0x40ccaf(0x1e6)]?I[_0x40ccaf(0x1eb)]:I[_0x40ccaf(0x18b)]},_0x1db968=await this[_0x40ccaf(0x1e3)][_0x40ccaf(0x1dc)]('/universer-api/comment/unit/'+_0x489c2b+'/solved',{'body':_0x4e21bf});return!_0x1db968[_0x40ccaf(0x19a)][_0x40ccaf(0x1aa)]||_0x1db968['body']['error'][_0x40ccaf(0x19e)]===0x1;}async[_0x3125a2(0x1af)](_0x47ea3b,_0x575d24,_0x5a38fc,_0x37576b){const _0x427b51=_0x3125a2,_0x20b236={'memberId':(await this[_0x427b51(0x1a0)][_0x427b51(0x18e)](_0x47ea3b))[_0x427b51(0x1d5)](),'threadId':_0x5a38fc,'replyId':_0x37576b,'unitId':_0x47ea3b},_0x29988b=await this[_0x427b51(0x1e3)]['post'](_0x427b51(0x190)+_0x47ea3b+_0x427b51(0x19f),{'body':_0x20b236});return!_0x29988b[_0x427b51(0x19a)][_0x427b51(0x1aa)]||_0x29988b[_0x427b51(0x19a)][_0x427b51(0x1aa)]['code']===0x1;}async['listComments'](_0x2bc9fe,_0x39697a,_0x40d39f){const _0x1cd8f2=_0x3125a2,_0x37e3a6={'unitId':_0x2bc9fe,'threadId':_0x40d39f},_0x4035ea=await this[_0x1cd8f2(0x1e3)][_0x1cd8f2(0x1dc)]('/universer-api/comment/unit/'+_0x2bc9fe+'/list',{'body':_0x37e3a6}),_0x5d87a3=_0x40d39f[_0x1cd8f2(0x1c4)](_0x3bfb6f=>ee(_0x4035ea[_0x1cd8f2(0x19a)][_0x1cd8f2(0x189)][_0x3bfb6f],_0x2bc9fe,_0x39697a))[_0x1cd8f2(0x1cd)](Boolean);return Object['values'](_0x4035ea[_0x1cd8f2(0x19a)][_0x1cd8f2(0x1bd)])[_0x1cd8f2(0x185)](_0x2d6c53=>{const _0x4c22e6=_0x1cd8f2;this[_0x4c22e6(0x1d3)][_0x4c22e6(0x1b8)](_0x2d6c53);}),_0x5d87a3;}[_0x3125a2(0x186)](_0x4e731a){const _0x1b5ee4=_0x3125a2;return{'id':_0x4e731a['id'],'threadId':_0x4e731a['threadId'],'ref':_0x4e731a[_0x1b5ee4(0x1c8)]};}};f=Q([_(0x0,_0x5223ea(_0x3180ef)),_(0x1,_0x5223ea(_0x877d29)),_(0x2,_0x5223ea(_0x3cf7e3)),_(0x3,_0x5223ea(_0x579925))],f);var re=Object[_0x3125a2(0x1ce)],te=(_0xd462e3,_0x16abe7,_0xe23e81,_0x459ecf)=>{const _0x26a76c=_0x3125a2;for(var _0x335403=_0x459ecf>0x1?void 0x0:_0x459ecf?re(_0x16abe7,_0xe23e81):_0x16abe7,_0x4be48d=_0xd462e3[_0x26a76c(0x1a1)]-0x1,_0x52836a;_0x4be48d>=0x0;_0x4be48d--)(_0x52836a=_0xd462e3[_0x4be48d])&&(_0x335403=_0x52836a(_0x335403)||_0x335403);return _0x335403;},N=(_0x96acf6,_0x39be77)=>(_0x214eb2,_0x18c445)=>_0x39be77(_0x214eb2,_0x18c445,_0x96acf6);let g=class extends _0x2c471d{constructor(_0x15a458,_0x597fbd){const _0x286543=_0x3125a2;super(),this[_0x286543(0x1ba)]=_0x15a458,this['_threadCommentDataSource']=_0x597fbd,this[_0x286543(0x196)]();}[_0x3125a2(0x196)](){const _0x50f769=_0x3125a2;this['_threadCommentDataSourceService'][_0x50f769(0x1a6)]=this[_0x50f769(0x1b9)],this[_0x50f769(0x1ba)][_0x50f769(0x184)]=!0x1;}};g=te([N(0x0,_0x1af45c),N(0x1,_0x5223ea(f))],g);var se=Object[_0x3125a2(0x1c5)],oe=Object[_0x3125a2(0x1ce)],ne=(_0x266f15,_0x503b35,_0x1e4829)=>_0x503b35 in _0x266f15?se(_0x266f15,_0x503b35,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1e4829}):_0x266f15[_0x503b35]=_0x1e4829,ie=(_0x56f65e,_0x129f98,_0x146749,_0x2413be)=>{const _0x2d529f=_0x3125a2;for(var _0x38eb4a=_0x2413be>0x1?void 0x0:_0x2413be?oe(_0x129f98,_0x146749):_0x129f98,_0x3d30d3=_0x56f65e[_0x2d529f(0x1a1)]-0x1,_0x54434a;_0x3d30d3>=0x0;_0x3d30d3--)(_0x54434a=_0x56f65e[_0x3d30d3])&&(_0x38eb4a=_0x54434a(_0x38eb4a)||_0x38eb4a);return _0x38eb4a;},w=(_0x4fb7e9,_0x58466c)=>(_0x1e8905,_0x2fd2c6)=>_0x58466c(_0x1e8905,_0x2fd2c6,_0x4fb7e9),$=(_0x22094a,_0x250a00,_0x46b1e7)=>ne(_0x22094a,typeof _0x250a00!='symbol'?_0x250a00+'':_0x250a00,_0x46b1e7);let b=class extends _0x42ff71{constructor(_0x58ce75=M,_0x22ad1f,_0x293b86){const _0xed3bcc=_0x3125a2;super(),this[_0xed3bcc(0x1e9)]=_0x58ce75,this[_0xed3bcc(0x1c0)]=_0x22ad1f,this[_0xed3bcc(0x198)]=_0x293b86;const {..._0x3d5040}=_0x497adb({},M,this['_config']);this['_configService'][_0xed3bcc(0x1c1)](z,_0x3d5040);}['onStarting'](){const _0x11568e=_0x3125a2;[[f],[g],[S]][_0x11568e(0x185)](_0x2bf256=>{const _0x465e08=_0x11568e;this['_injector'][_0x465e08(0x1be)](_0x2bf256);});}[_0x3125a2(0x183)](){const _0x4da96d=_0x3125a2;this[_0x4da96d(0x1c0)][_0x4da96d(0x187)](g),this[_0x4da96d(0x1c0)][_0x4da96d(0x187)](S);}};$(b,_0x3125a2(0x1de),W),$(b,'type',_0x4f26b0[_0x3125a2(0x1ca)]),b=ie([_0x3f95ef(_0x479164,_0x12a624,_0x2e3ca3),w(0x1,_0x5223ea(_0x579925)),w(0x2,_0x5a7661)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x33e44b=_0x1814;(function(_0x195a22,_0x872dbd){const _0x23408a=_0x1814,_0x263be5=_0x195a22();while(!![]){try{const _0x26a1ed=parseInt(_0x23408a(0x145))/0x1*(parseInt(_0x23408a(0x16d))/0x2)+parseInt(_0x23408a(0x198))/0x3+-parseInt(_0x23408a(0x169))/0x4+-parseInt(_0x23408a(0x15f))/0x5+-parseInt(_0x23408a(0x157))/0x6*(parseInt(_0x23408a(0x142))/0x7)+-parseInt(_0x23408a(0x146))/0x8+parseInt(_0x23408a(0x13f))/0x9;if(_0x26a1ed===_0x872dbd)break;else _0x263be5['push'](_0x263be5['shift']());}catch(_0xf1ed01){_0x263be5['push'](_0x263be5['shift']());}}}(_0x61ae,0xe9d10));import{CommentService as _0x1b43bb,CollaborationSessionService as _0x5a3e8e,UniverCollaborationClientPlugin as _0x35611b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x35b6ab}from'@univerjs-pro/license';import{dayjs as _0x1f8faa,UserManagerService as _0x32d721,Inject as _0xa81a04,Injector as _0x30a5b9,Disposable as _0x234e12,CustomRangeType as _0x49eeca,UniverInstanceType as _0x35e9a7,DependentOn as _0x2567c7,IConfigService as _0x54763b,Plugin as _0x21f70a,merge as _0x10f491}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x6f43cc}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x718fe,IThreadCommentDataSourceService as _0xfc7a2e}from'@univerjs/thread-comment';import{bufferTime as _0x364169}from'rxjs';import{HTTPService as _0x240bd7}from'@univerjs/network';function _0x1814(_0x19fcff,_0x2f00f2){const _0x61ae16=_0x61ae();return _0x1814=function(_0x18147a,_0x5e4737){_0x18147a=_0x18147a-0x139;let _0x165412=_0x61ae16[_0x18147a];return _0x165412;},_0x1814(_0x19fcff,_0x2f00f2);}const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x347a70=>(_0x347a70[_0x347a70[_0x33e44b(0x197)]=0x0]=_0x33e44b(0x197),_0x347a70[_0x347a70[_0x33e44b(0x191)]=0x1]='Solved',_0x347a70[_0x347a70[_0x33e44b(0x165)]=-0x1]=_0x33e44b(0x165),_0x347a70))(I||{}),v=(_0x2484a0=>(_0x2484a0[_0x2484a0[_0x33e44b(0x13d)]=0x0]=_0x33e44b(0x13d),_0x2484a0[_0x2484a0[_0x33e44b(0x15b)]=0x1]=_0x33e44b(0x15b),_0x2484a0[_0x2484a0[_0x33e44b(0x154)]=0x2]=_0x33e44b(0x154),_0x2484a0[_0x2484a0['Edit']=0x3]=_0x33e44b(0x13e),_0x2484a0[_0x2484a0[_0x33e44b(0x160)]=0x4]=_0x33e44b(0x160),_0x2484a0[_0x2484a0['Solve']=0x5]=_0x33e44b(0x18f),_0x2484a0[_0x2484a0[_0x33e44b(0x165)]=-0x1]=_0x33e44b(0x165),_0x2484a0))(v||{});const D=_0x5a8cae=>_0x1f8faa(new Date(+_0x5a8cae))[_0x33e44b(0x16a)](_0x33e44b(0x18b)),B=async(_0x13ef69,_0x30f6e2)=>{const _0x317ee0=_0x33e44b,_0x54b34d=_0x13ef69[_0x317ee0(0x178)](_0x32d721),_0x2523a5=_0x13ef69[_0x317ee0(0x178)](_0x240bd7);_0x30f6e2[_0x317ee0(0x192)](_0x36203a=>{const _0x33bf70=_0x317ee0;_0x54b34d[_0x33bf70(0x161)](_0x36203a)&&_0x30f6e2[_0x33bf70(0x17b)](_0x36203a);}),_0x30f6e2['size']&&(await _0x2523a5[_0x317ee0(0x178)](_0x317ee0(0x18a),{'params':{'userIDs':[..._0x30f6e2]}}))['body'][_0x317ee0(0x18d)][_0x317ee0(0x192)](_0x18fad2=>{const _0x542fd8=_0x317ee0;_0x18fad2&&_0x54b34d[_0x542fd8(0x13a)](_0x18fad2);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x201492,_0x1be307,_0x4eb997,_0x106951)=>{const _0x57a0a0=_0x33e44b;for(var _0x378a9c=_0x106951>0x1?void 0x0:_0x106951?K(_0x1be307,_0x4eb997):_0x1be307,_0x1f8311=_0x201492[_0x57a0a0(0x16f)]-0x1,_0xf61a94;_0x1f8311>=0x0;_0x1f8311--)(_0xf61a94=_0x201492[_0x1f8311])&&(_0x378a9c=_0xf61a94(_0x378a9c)||_0x378a9c);return _0x378a9c;},p=(_0x541783,_0x22a56f)=>(_0x3b00b6,_0x378187)=>_0x22a56f(_0x3b00b6,_0x378187,_0x541783);let S=class extends _0x234e12{constructor(_0x4161d6,_0x5d6f0d,_0x54c056,_0x4dcf0a){const _0x5bd590=_0x33e44b;super(),this['_commentService']=_0x4161d6,this[_0x5bd590(0x156)]=_0x5d6f0d,this[_0x5bd590(0x16c)]=_0x54c056,this['_injector']=_0x4dcf0a,this[_0x5bd590(0x16b)](),this[_0x5bd590(0x155)]();}[_0x33e44b(0x155)](){const _0x14a527=_0x33e44b;this[_0x14a527(0x13b)](this[_0x14a527(0x156)]['commentUpdate$'][_0x14a527(0x171)](_0x364169(0x10))[_0x14a527(0x15a)](_0x49fafa=>{const _0x34267a=_0x14a527,_0x4859ec=new Set();_0x49fafa[_0x34267a(0x192)](_0x3e448c=>{const _0x3f4fff=_0x34267a;switch(_0x3e448c[_0x3f4fff(0x153)]){case'add':{const _0x1b45ed=_0x3e448c[_0x3f4fff(0x15e)]['personId'];_0x4859ec[_0x3f4fff(0x174)](_0x1b45ed);break;}}}),B(this[_0x34267a(0x166)],_0x4859ec);}));}['_init'](){const _0x39c400=_0x33e44b;this['disposeWithMe'](this[_0x39c400(0x14e)]['commentUpdate$'][_0x39c400(0x15a)](async _0x55debe=>{const _0x33ddc5=_0x39c400;var _0x13ec1b,_0x3bf708,_0x4e3332,_0x12c2eb;const _0x83d487=(_0x13ec1b=this['_threadCommentModel'][_0x33ddc5(0x182)](_0x55debe[_0x33ddc5(0x17a)])['find'](_0x3fbc49=>_0x3fbc49[_0x33ddc5(0x196)]===_0x55debe[_0x33ddc5(0x196)]))==null?void 0x0:_0x13ec1b[_0x33ddc5(0x149)];if(!_0x83d487)return;const {unitId:_0xd5fbc3,subUnitId:_0x298ab9}=_0x83d487;switch(_0x55debe[_0x33ddc5(0x176)]&&this['_userService']['addUser'](_0x55debe[_0x33ddc5(0x176)]),_0x55debe[_0x33ddc5(0x153)]){case v[_0x33ddc5(0x15b)]:break;case v[_0x33ddc5(0x154)]:{this[_0x33ddc5(0x156)][_0x33ddc5(0x14b)](_0xd5fbc3,_0x298ab9,{'unitId':_0xd5fbc3,'subUnitId':_0x298ab9,'ref':'','id':_0x55debe[_0x33ddc5(0x162)],'dT':D(+_0x55debe[_0x33ddc5(0x188)]),'threadId':_0x55debe['threadId'],'personId':(_0x4e3332=(_0x3bf708=_0x55debe[_0x33ddc5(0x176)])==null?void 0x0:_0x3bf708[_0x33ddc5(0x15c)])!=null?_0x4e3332:_0x55debe[_0x33ddc5(0x194)],'text':JSON['parse'](_0x55debe['content']),'parentId':_0x83d487['id']});break;}case v[_0x33ddc5(0x160)]:{const _0x286dfd=this[_0x33ddc5(0x156)][_0x33ddc5(0x179)](_0xd5fbc3,_0x298ab9,_0x55debe[_0x33ddc5(0x162)]);_0x286dfd&&_0x286dfd[_0x33ddc5(0x164)]&&this[_0x33ddc5(0x156)][_0x33ddc5(0x13c)](_0xd5fbc3,_0x298ab9,_0x55debe[_0x33ddc5(0x162)]);break;}case v[_0x33ddc5(0x13e)]:{this[_0x33ddc5(0x156)][_0x33ddc5(0x193)](_0xd5fbc3,_0x298ab9,{'commentId':_0x55debe[_0x33ddc5(0x162)],'text':JSON[_0x33ddc5(0x159)](_0x55debe['content'])});break;}case v[_0x33ddc5(0x18f)]:{const _0x156455=(_0x12c2eb=this[_0x33ddc5(0x156)]['getUnit'](_0x55debe[_0x33ddc5(0x17a)])['find'](_0x27e031=>_0x27e031[_0x33ddc5(0x196)]===_0x55debe[_0x33ddc5(0x196)]))==null?void 0x0:_0x12c2eb['root'];_0x156455&&this[_0x33ddc5(0x156)]['resolveComment'](_0xd5fbc3,_0x298ab9,_0x156455['id'],_0x55debe[_0x33ddc5(0x183)]===I[_0x33ddc5(0x191)]);break;}}}));}};S=V([p(0x0,_0xa81a04(_0x1b43bb)),p(0x1,_0xa81a04(_0x718fe)),p(0x2,_0xa81a04(_0x32d721)),p(0x3,_0xa81a04(_0x30a5b9))],S);const z=_0x33e44b(0x144),M={};function _0x61ae(){const _0x2fcdb5=['/reply','pipe','resolved','map','add','replies','user','_sessionService','get','getComment','unitId','delete','UNIVER_UNKNOWN','/solved','requireSession','/delete','resolveComment','listComments','getUnit','solved','onStarting','_configService','error','values','createTimestamp','symbol','/universer-api/user/list','YYYY/MM/DD\x20HH:mm','slice','users','ref','Solve','getMemberID','Solved','forEach','updateComment','userId','/add','threadId','OpenOrReOpen','2374848bzaYuG','rangeId','addUser','disposeWithMe','deleteComment','Unknown','Edit','24403572jOgYdr','_threadCommentDataSourceService','_config','2639imQSlB','body','thread-comment-data-source.config','2cLhwQM','3016760YyPaJm','defineProperty','stringify','root','pluginName','addComment','_initDataSource','_httpService','_commentService','customRanges','getCurrentUser','code','content','type','Reply','_initUserSync','_threadCommentModel','17352xnDUVj','_threadCommentDataSource','parse','subscribe','Add','userID','filter','payload','5286465uVGwnn','Delete','getUser','replyId','COMMENT','parentId','UNRECOGNIZED','_injector','/list','/universer-api/comment/unit/','4855488FvkWjj','format','_init','_userService','1193132QAImPg','post','length'];_0x61ae=function(){return _0x2fcdb5;};return _0x61ae();}var k=Object['getOwnPropertyDescriptor'],Q=(_0xb63c92,_0x412e24,_0x400f49,_0x12acb2)=>{for(var _0x19b5a3=_0x12acb2>0x1?void 0x0:_0x12acb2?k(_0x412e24,_0x400f49):_0x412e24,_0x901cc4=_0xb63c92['length']-0x1,_0x33c4c9;_0x901cc4>=0x0;_0x901cc4--)(_0x33c4c9=_0xb63c92[_0x901cc4])&&(_0x19b5a3=_0x33c4c9(_0x19b5a3)||_0x19b5a3);return _0x19b5a3;},_=(_0x50f8c2,_0x5ed6b1)=>(_0x5382b2,_0x5da11b)=>_0x5ed6b1(_0x5382b2,_0x5da11b,_0x50f8c2);function X(_0x597caf,_0x4ae1b1){const _0x5efd8f=_0x33e44b,_0x2fc86e=_0x597caf[_0x5efd8f(0x175)][0x0];return{..._0x4ae1b1,'id':_0x2fc86e[_0x5efd8f(0x162)],'resolved':_0x597caf['solved']===0x1,'dT':D(_0x2fc86e[_0x5efd8f(0x188)]),'personId':_0x2fc86e[_0x5efd8f(0x194)],'threadId':_0x2fc86e[_0x5efd8f(0x196)]};}function ee(_0x452392,_0x6a07c2,_0x39cc24){const _0x504b20=_0x33e44b;var _0x261901,_0x179fc5;if(((_0x179fc5=(_0x261901=_0x452392==null?void 0x0:_0x452392[_0x504b20(0x175)])==null?void 0x0:_0x261901[_0x504b20(0x16f)])!=null?_0x179fc5:0x0)>0x0){const _0x4c470a=(_0x1202f2,_0x5e6750)=>({'id':_0x1202f2[_0x504b20(0x162)],'threadId':_0x1202f2[_0x504b20(0x196)],'dT':D(_0x1202f2[_0x504b20(0x188)]),'personId':_0x1202f2[_0x504b20(0x194)],'resolved':_0x452392[_0x504b20(0x183)]===I[_0x504b20(0x191)],'unitId':_0x6a07c2,'subUnitId':_0x39cc24,'text':JSON[_0x504b20(0x159)](_0x1202f2[_0x504b20(0x152)]),'parentId':_0x5e6750}),_0x2baedb=_0x4c470a(_0x452392[_0x504b20(0x175)][0x0]);return{..._0x2baedb,'children':_0x452392[_0x504b20(0x175)][_0x504b20(0x18c)](0x1)['map'](_0x25a538=>_0x4c470a(_0x25a538,_0x2baedb['id']))};}return null;}let f=class{constructor(_0x40c91b,_0x331edd,_0x2786d0,_0x208af3){const _0x5612d1=_0x33e44b;this['_httpService']=_0x40c91b,this[_0x5612d1(0x16c)]=_0x331edd,this[_0x5612d1(0x177)]=_0x2786d0,this[_0x5612d1(0x166)]=_0x208af3;}async[_0x33e44b(0x14b)](_0x188dfe){const _0x3ecf2a=_0x33e44b;var _0x25c102,_0x453824;const {parentId:_0x4d131c,unitId:_0x53081c,text:_0x457f56,threadId:_0xc1c935}=_0x188dfe,_0x562d63=(_0x453824=(_0x25c102=_0x457f56[_0x3ecf2a(0x14f)])==null?void 0x0:_0x25c102[_0x3ecf2a(0x15d)](_0x2218d9=>_0x2218d9['rangeType']===_0x49eeca[_0x3ecf2a(0x163)])[_0x3ecf2a(0x173)](_0x16cf04=>_0x16cf04[_0x3ecf2a(0x139)]))!=null?_0x453824:[],_0x4dd26e=JSON[_0x3ecf2a(0x148)](_0x457f56),_0x4c5f14=(await this['_sessionService'][_0x3ecf2a(0x17e)](_0x53081c))['getMemberID']();if(_0x4d131c){const _0x563418={'memberId':_0x4c5f14,'unitId':_0x53081c,'content':_0x4dd26e,'mention':_0x562d63,'threadId':_0xc1c935},_0x22a6d5=(await this['_httpService'][_0x3ecf2a(0x16e)](_0x3ecf2a(0x168)+_0x53081c+_0x3ecf2a(0x170),{'body':_0x563418}))[_0x3ecf2a(0x143)]['reply'];return{..._0x188dfe,'id':_0x22a6d5['replyId'],'dT':_0x1f8faa(+_0x22a6d5[_0x3ecf2a(0x188)])[_0x3ecf2a(0x16a)](_0x3ecf2a(0x18b)),'personId':_0x22a6d5[_0x3ecf2a(0x194)]};}else{const _0x525565={'memberId':_0x4c5f14,'unitId':_0x53081c,'content':_0x4dd26e,'mention':_0x562d63},_0x3ba475=await this[_0x3ecf2a(0x14d)]['post']('/universer-api/comment/unit/'+_0x53081c+_0x3ecf2a(0x195),{'body':_0x525565});return X(_0x3ba475[_0x3ecf2a(0x143)]['comment'],_0x188dfe);}}async['updateComment'](_0x4f3c05){const _0xa625aa=_0x33e44b;var _0x1a16a2,_0xac8ed7;const {text:_0x53d29b,unitId:_0x4767ac}=_0x4f3c05,_0x4b4ea5=(_0xac8ed7=(_0x1a16a2=_0x53d29b[_0xa625aa(0x14f)])==null?void 0x0:_0x1a16a2[_0xa625aa(0x15d)](_0x504a2d=>_0x504a2d['rangeType']===_0x49eeca['COMMENT'])['map'](_0x149f30=>_0x149f30['rangeId']))!=null?_0xac8ed7:[],_0x139d56=JSON[_0xa625aa(0x148)](_0x53d29b),_0x290533=_0x4f3c05[_0xa625aa(0x196)],_0x131041=_0x4f3c05['id'],_0x1cedb9={'memberId':(await this[_0xa625aa(0x177)][_0xa625aa(0x17e)](_0x4767ac))[_0xa625aa(0x190)](),'unitId':_0x4767ac,'threadId':_0x290533,'mention':_0x4b4ea5,'content':_0x139d56,'replyId':_0x131041},_0x4024b6=await this[_0xa625aa(0x14d)][_0xa625aa(0x16e)](_0xa625aa(0x168)+_0x4767ac+'/edit',{'body':_0x1cedb9});return!_0x4024b6[_0xa625aa(0x143)][_0xa625aa(0x186)]||_0x4024b6[_0xa625aa(0x143)][_0xa625aa(0x186)][_0xa625aa(0x151)]===0x1;}async[_0x33e44b(0x180)](_0x4e5da9){const _0x562026=_0x33e44b,{unitId:_0x5e5cf8}=_0x4e5da9,_0x333317=_0x4e5da9[_0x562026(0x196)],_0x15de05={'memberId':this[_0x562026(0x16c)][_0x562026(0x150)]()[_0x562026(0x15c)],'unitId':_0x5e5cf8,'threadId':_0x333317,'solved':_0x4e5da9[_0x562026(0x172)]?I[_0x562026(0x191)]:I['OpenOrReOpen']},_0x193b21=await this[_0x562026(0x14d)][_0x562026(0x16e)](_0x562026(0x168)+_0x5e5cf8+_0x562026(0x17d),{'body':_0x15de05});return!_0x193b21[_0x562026(0x143)][_0x562026(0x186)]||_0x193b21['body'][_0x562026(0x186)][_0x562026(0x151)]===0x1;}async['deleteComment'](_0x27c859,_0x10b0ab,_0x4fa416,_0x5fc2fb){const _0x4f5034=_0x33e44b,_0x5838b3={'memberId':(await this[_0x4f5034(0x177)][_0x4f5034(0x17e)](_0x27c859))['getMemberID'](),'threadId':_0x4fa416,'replyId':_0x5fc2fb,'unitId':_0x27c859},_0x47387e=await this['_httpService'][_0x4f5034(0x16e)](_0x4f5034(0x168)+_0x27c859+_0x4f5034(0x17f),{'body':_0x5838b3});return!_0x47387e[_0x4f5034(0x143)][_0x4f5034(0x186)]||_0x47387e[_0x4f5034(0x143)][_0x4f5034(0x186)]['code']===0x1;}async[_0x33e44b(0x181)](_0x4c0f1e,_0x84e585,_0x59945b){const _0x4dee12=_0x33e44b,_0x2839f8={'unitId':_0x4c0f1e,'threadId':_0x59945b},_0x59efc7=await this[_0x4dee12(0x14d)][_0x4dee12(0x16e)](_0x4dee12(0x168)+_0x4c0f1e+_0x4dee12(0x167),{'body':_0x2839f8}),_0x182448=_0x59945b[_0x4dee12(0x173)](_0x307dd2=>ee(_0x59efc7[_0x4dee12(0x143)]['comments'][_0x307dd2],_0x4c0f1e,_0x84e585))[_0x4dee12(0x15d)](Boolean);return Object[_0x4dee12(0x187)](_0x59efc7[_0x4dee12(0x143)][_0x4dee12(0x18d)])[_0x4dee12(0x192)](_0x4d5fe8=>{const _0xbcb1eb=_0x4dee12;this[_0xbcb1eb(0x16c)][_0xbcb1eb(0x13a)](_0x4d5fe8);}),_0x182448;}['saveCommentToSnapshot'](_0x22fa47){const _0x9d2d4c=_0x33e44b;return{'id':_0x22fa47['id'],'threadId':_0x22fa47[_0x9d2d4c(0x196)],'ref':_0x22fa47[_0x9d2d4c(0x18e)]};}};f=Q([_(0x0,_0xa81a04(_0x240bd7)),_(0x1,_0xa81a04(_0x32d721)),_(0x2,_0xa81a04(_0x5a3e8e)),_(0x3,_0xa81a04(_0x30a5b9))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x2db29d,_0x2266ac,_0xa0d49,_0x58b8e3)=>{const _0x2aabd9=_0x33e44b;for(var _0x4a5b8c=_0x58b8e3>0x1?void 0x0:_0x58b8e3?re(_0x2266ac,_0xa0d49):_0x2266ac,_0x2f91c5=_0x2db29d[_0x2aabd9(0x16f)]-0x1,_0x48c58e;_0x2f91c5>=0x0;_0x2f91c5--)(_0x48c58e=_0x2db29d[_0x2f91c5])&&(_0x4a5b8c=_0x48c58e(_0x4a5b8c)||_0x4a5b8c);return _0x4a5b8c;},N=(_0x63090c,_0x148c24)=>(_0x4aa630,_0x25aef5)=>_0x148c24(_0x4aa630,_0x25aef5,_0x63090c);let g=class extends _0x234e12{constructor(_0x318cc3,_0x10b625){const _0x5ec075=_0x33e44b;super(),this[_0x5ec075(0x140)]=_0x318cc3,this[_0x5ec075(0x158)]=_0x10b625,this[_0x5ec075(0x14c)]();}[_0x33e44b(0x14c)](){const _0x3ef9e4=_0x33e44b;this[_0x3ef9e4(0x140)]['dataSource']=this[_0x3ef9e4(0x158)],this[_0x3ef9e4(0x140)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0xfc7a2e),N(0x1,_0xa81a04(f))],g);var se=Object[_0x33e44b(0x147)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x298bbb,_0x57b2ec,_0xb7471d)=>_0x57b2ec in _0x298bbb?se(_0x298bbb,_0x57b2ec,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xb7471d}):_0x298bbb[_0x57b2ec]=_0xb7471d,ie=(_0x191339,_0x36b300,_0x36f3c3,_0x58c65d)=>{const _0x3b603a=_0x33e44b;for(var _0x570a1e=_0x58c65d>0x1?void 0x0:_0x58c65d?oe(_0x36b300,_0x36f3c3):_0x36b300,_0xd33c2d=_0x191339[_0x3b603a(0x16f)]-0x1,_0x377201;_0xd33c2d>=0x0;_0xd33c2d--)(_0x377201=_0x191339[_0xd33c2d])&&(_0x570a1e=_0x377201(_0x570a1e)||_0x570a1e);return _0x570a1e;},w=(_0x2bc0f8,_0x20fd8a)=>(_0x54480f,_0x4b6192)=>_0x20fd8a(_0x54480f,_0x4b6192,_0x2bc0f8),$=(_0x2caad2,_0x3d72f6,_0x4bdb62)=>ne(_0x2caad2,typeof _0x3d72f6!=_0x33e44b(0x189)?_0x3d72f6+'':_0x3d72f6,_0x4bdb62);let b=class extends _0x21f70a{constructor(_0x57572b=M,_0x56c523,_0x1baf7f){const _0x5be9bd=_0x33e44b;super(),this['_config']=_0x57572b,this[_0x5be9bd(0x166)]=_0x56c523,this[_0x5be9bd(0x185)]=_0x1baf7f;const {..._0x523092}=_0x10f491({},M,this[_0x5be9bd(0x141)]);this[_0x5be9bd(0x185)]['setConfig'](z,_0x523092);}[_0x33e44b(0x184)](){const _0x539a9c=_0x33e44b;[[f],[g],[S]][_0x539a9c(0x192)](_0x589f8a=>{const _0x1cdfed=_0x539a9c;this[_0x1cdfed(0x166)][_0x1cdfed(0x174)](_0x589f8a);});}['onReady'](){const _0x17946e=_0x33e44b;this['_injector'][_0x17946e(0x178)](g),this[_0x17946e(0x166)][_0x17946e(0x178)](S);}};$(b,_0x33e44b(0x14a),W),$(b,'type',_0x35e9a7[_0x33e44b(0x17c)]),b=ie([_0x2567c7(_0x6f43cc,_0x35611b,_0x35b6ab),w(0x1,_0xa81a04(_0x30a5b9)),w(0x2,_0x54763b)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x3125a2=_0x44fb;(function(_0x41e1e5,_0xe00b07){const _0x1c28cb=_0x44fb,_0x39dbf5=_0x41e1e5();while(!![]){try{const _0x17feb2=parseInt(_0x1c28cb(0x18f))/0x1*(-parseInt(_0x1c28cb(0x199))/0x2)+parseInt(_0x1c28cb(0x1a9))/0x3+-parseInt(_0x1c28cb(0x1a5))/0x4+-parseInt(_0x1c28cb(0x1d2))/0x5+-parseInt(_0x1c28cb(0x1a8))/0x6*(-parseInt(_0x1c28cb(0x1b1))/0x7)+-parseInt(_0x1c28cb(0x1d1))/0x8*(-parseInt(_0x1c28cb(0x1b7))/0x9)+parseInt(_0x1c28cb(0x1c9))/0xa*(parseInt(_0x1c28cb(0x1a2))/0xb);if(_0x17feb2===_0xe00b07)break;else _0x39dbf5['push'](_0x39dbf5['shift']());}catch(_0x24c704){_0x39dbf5['push'](_0x39dbf5['shift']());}}}(_0x2427,0xd6d34));import{CommentService as _0x28c565,CollaborationSessionService as _0x3cf7e3,UniverCollaborationClientPlugin as _0x12a624}from'@univerjs-pro/collaboration-client';function _0x2427(){const _0x2925b9=['payload','format','8dncZuI','1515075ShBbBd','_userService','parse','getMemberID','solved','find','resolveComment','unitId','Delete','delete','post','_commentService','pluginName','getUnit','UNRECOGNIZED','/add','Solve','_httpService','/universer-api/user/list','size','resolved','userId','root','_config','rangeType','Solved','onReady','syncUpdateMutationToColla','forEach','saveCommentToSnapshot','get','YYYY/MM/DD\x20HH:mm','comments','Add','OpenOrReOpen','subscribe','personId','requireSession','9bcyeDc','/universer-api/comment/unit/','userID','getComment','threadId','slice','Edit','_initDataSource','replies','_configService','356744Wubiae','body','commentUpdate$','Reply','rangeId','code','/delete','_sessionService','length','22bNUBak','stringify','customRanges','4074688hpXWEt','dataSource','reply','194478OnvweG','4268274oFerap','error','/edit','createTimestamp','pipe','/reply','deleteComment','parentId','98BfMYpU','_init','Unknown','replyId','_threadCommentModel','_initUserSync','11508309wjDKyO','addUser','_threadCommentDataSource','_threadCommentDataSourceService','COMMENT','getUser','users','add','disposeWithMe','_injector','setConfig','addComment','content','map','defineProperty','comment','user','ref','3258590oXsteK','UNIVER_UNKNOWN','updateComment','type','filter','getOwnPropertyDescriptor'];_0x2427=function(){return _0x2925b9;};return _0x2427();}function _0x44fb(_0x3ffcd7,_0x2b8992){const _0x24278a=_0x2427();return _0x44fb=function(_0x44fb18,_0x8e07fd){_0x44fb18=_0x44fb18-0x183;let _0x18e74e=_0x24278a[_0x44fb18];return _0x18e74e;},_0x44fb(_0x3ffcd7,_0x2b8992);}import{UniverLicensePlugin as _0x2e3ca3}from'@univerjs-pro/license';import{dayjs as _0x466984,UserManagerService as _0x877d29,Inject as _0x5223ea,Injector as _0x579925,Disposable as _0x2c471d,CustomRangeType as _0x1659d6,UniverInstanceType as _0x4f26b0,DependentOn as _0x3f95ef,IConfigService as _0x5a7661,Plugin as _0x42ff71,merge as _0x497adb}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x479164}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2de7ff,IThreadCommentDataSourceService as _0x1af45c}from'@univerjs/thread-comment';import{bufferTime as _0x5a8fb7}from'rxjs';import{HTTPService as _0x3180ef}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xe3f0c8=>(_0xe3f0c8[_0xe3f0c8[_0x3125a2(0x18b)]=0x0]='OpenOrReOpen',_0xe3f0c8[_0xe3f0c8[_0x3125a2(0x1eb)]=0x1]=_0x3125a2(0x1eb),_0xe3f0c8[_0xe3f0c8['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0xe3f0c8))(I||{}),v=(_0x4c5f55=>(_0x4c5f55[_0x4c5f55[_0x3125a2(0x1b3)]=0x0]=_0x3125a2(0x1b3),_0x4c5f55[_0x4c5f55['Add']=0x1]=_0x3125a2(0x18a),_0x4c5f55[_0x4c5f55[_0x3125a2(0x19c)]=0x2]=_0x3125a2(0x19c),_0x4c5f55[_0x4c5f55[_0x3125a2(0x195)]=0x3]=_0x3125a2(0x195),_0x4c5f55[_0x4c5f55[_0x3125a2(0x1da)]=0x4]=_0x3125a2(0x1da),_0x4c5f55[_0x4c5f55['Solve']=0x5]='Solve',_0x4c5f55[_0x4c5f55[_0x3125a2(0x1e0)]=-0x1]='UNRECOGNIZED',_0x4c5f55))(v||{});const D=_0x2b313a=>_0x466984(new Date(+_0x2b313a))[_0x3125a2(0x1d0)](_0x3125a2(0x188)),B=async(_0x3202d6,_0x270c55)=>{const _0x51211b=_0x3125a2,_0x1628b6=_0x3202d6[_0x51211b(0x187)](_0x877d29),_0x519477=_0x3202d6[_0x51211b(0x187)](_0x3180ef);_0x270c55[_0x51211b(0x185)](_0x42b6d9=>{const _0x4213e7=_0x51211b;_0x1628b6[_0x4213e7(0x1bc)](_0x42b6d9)&&_0x270c55[_0x4213e7(0x1db)](_0x42b6d9);}),_0x270c55[_0x51211b(0x1e5)]&&(await _0x519477['get'](_0x51211b(0x1e4),{'params':{'userIDs':[..._0x270c55]}}))[_0x51211b(0x19a)][_0x51211b(0x1bd)][_0x51211b(0x185)](_0x837705=>{const _0x2f9e68=_0x51211b;_0x837705&&_0x1628b6[_0x2f9e68(0x1b8)](_0x837705);});};var K=Object[_0x3125a2(0x1ce)],V=(_0x3a9b9d,_0x397d31,_0x59d0e8,_0x582354)=>{for(var _0x136155=_0x582354>0x1?void 0x0:_0x582354?K(_0x397d31,_0x59d0e8):_0x397d31,_0x11ff5a=_0x3a9b9d['length']-0x1,_0x5c633b;_0x11ff5a>=0x0;_0x11ff5a--)(_0x5c633b=_0x3a9b9d[_0x11ff5a])&&(_0x136155=_0x5c633b(_0x136155)||_0x136155);return _0x136155;},p=(_0x48c30e,_0x3f79eb)=>(_0x2d6beb,_0x41d856)=>_0x3f79eb(_0x2d6beb,_0x41d856,_0x48c30e);let S=class extends _0x2c471d{constructor(_0x2aa13d,_0x1c09b5,_0x3581e4,_0x53cd1c){const _0x396faf=_0x3125a2;super(),this['_commentService']=_0x2aa13d,this[_0x396faf(0x1b5)]=_0x1c09b5,this[_0x396faf(0x1d3)]=_0x3581e4,this[_0x396faf(0x1c0)]=_0x53cd1c,this['_init'](),this[_0x396faf(0x1b6)]();}[_0x3125a2(0x1b6)](){const _0x2ceda4=_0x3125a2;this[_0x2ceda4(0x1bf)](this[_0x2ceda4(0x1b5)]['commentUpdate$'][_0x2ceda4(0x1ad)](_0x5a8fb7(0x10))[_0x2ceda4(0x18c)](_0x424028=>{const _0x256207=_0x2ceda4,_0x5cf6ca=new Set();_0x424028['forEach'](_0x2c3930=>{const _0x4fb22f=_0x44fb;switch(_0x2c3930[_0x4fb22f(0x1cc)]){case _0x4fb22f(0x1be):{const _0x464d2d=_0x2c3930[_0x4fb22f(0x1cf)][_0x4fb22f(0x18d)];_0x5cf6ca[_0x4fb22f(0x1be)](_0x464d2d);break;}}}),B(this[_0x256207(0x1c0)],_0x5cf6ca);}));}[_0x3125a2(0x1b2)](){const _0x1bcace=_0x3125a2;this[_0x1bcace(0x1bf)](this[_0x1bcace(0x1dd)][_0x1bcace(0x19b)][_0x1bcace(0x18c)](async _0x431dcc=>{const _0x48128a=_0x1bcace;var _0x44c3ab,_0x26b813,_0x2dc8b6,_0xfdc3bc;const _0x3829b4=(_0x44c3ab=this[_0x48128a(0x1b5)][_0x48128a(0x1df)](_0x431dcc[_0x48128a(0x1d9)])['find'](_0x1b27dc=>_0x1b27dc[_0x48128a(0x193)]===_0x431dcc[_0x48128a(0x193)]))==null?void 0x0:_0x44c3ab[_0x48128a(0x1e8)];if(!_0x3829b4)return;const {unitId:_0x5101e9,subUnitId:_0x441c03}=_0x3829b4;switch(_0x431dcc[_0x48128a(0x1c7)]&&this[_0x48128a(0x1d3)]['addUser'](_0x431dcc[_0x48128a(0x1c7)]),_0x431dcc[_0x48128a(0x1cc)]){case v[_0x48128a(0x18a)]:break;case v[_0x48128a(0x19c)]:{this[_0x48128a(0x1b5)][_0x48128a(0x1c2)](_0x5101e9,_0x441c03,{'unitId':_0x5101e9,'subUnitId':_0x441c03,'ref':'','id':_0x431dcc['replyId'],'dT':D(+_0x431dcc[_0x48128a(0x1ac)]),'threadId':_0x431dcc[_0x48128a(0x193)],'personId':(_0x2dc8b6=(_0x26b813=_0x431dcc[_0x48128a(0x1c7)])==null?void 0x0:_0x26b813[_0x48128a(0x191)])!=null?_0x2dc8b6:_0x431dcc[_0x48128a(0x1e7)],'text':JSON[_0x48128a(0x1d4)](_0x431dcc[_0x48128a(0x1c3)]),'parentId':_0x3829b4['id']});break;}case v[_0x48128a(0x1da)]:{const _0x9fbc9a=this[_0x48128a(0x1b5)][_0x48128a(0x192)](_0x5101e9,_0x441c03,_0x431dcc['replyId']);_0x9fbc9a&&_0x9fbc9a[_0x48128a(0x1b0)]&&this[_0x48128a(0x1b5)][_0x48128a(0x1af)](_0x5101e9,_0x441c03,_0x431dcc[_0x48128a(0x1b4)]);break;}case v['Edit']:{this[_0x48128a(0x1b5)]['updateComment'](_0x5101e9,_0x441c03,{'commentId':_0x431dcc[_0x48128a(0x1b4)],'text':JSON[_0x48128a(0x1d4)](_0x431dcc[_0x48128a(0x1c3)])});break;}case v[_0x48128a(0x1e2)]:{const _0x9c79a4=(_0xfdc3bc=this[_0x48128a(0x1b5)][_0x48128a(0x1df)](_0x431dcc[_0x48128a(0x1d9)])[_0x48128a(0x1d7)](_0x4ee24d=>_0x4ee24d[_0x48128a(0x193)]===_0x431dcc[_0x48128a(0x193)]))==null?void 0x0:_0xfdc3bc[_0x48128a(0x1e8)];_0x9c79a4&&this[_0x48128a(0x1b5)][_0x48128a(0x1d8)](_0x5101e9,_0x441c03,_0x9c79a4['id'],_0x431dcc[_0x48128a(0x1d6)]===I[_0x48128a(0x1eb)]);break;}}}));}};S=V([p(0x0,_0x5223ea(_0x28c565)),p(0x1,_0x5223ea(_0x2de7ff)),p(0x2,_0x5223ea(_0x877d29)),p(0x3,_0x5223ea(_0x579925))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x339343,_0x5ca4ea,_0x515898,_0x5ad8d2)=>{const _0x562ed1=_0x3125a2;for(var _0x514722=_0x5ad8d2>0x1?void 0x0:_0x5ad8d2?k(_0x5ca4ea,_0x515898):_0x5ca4ea,_0x45b5b1=_0x339343[_0x562ed1(0x1a1)]-0x1,_0x5827c5;_0x45b5b1>=0x0;_0x45b5b1--)(_0x5827c5=_0x339343[_0x45b5b1])&&(_0x514722=_0x5827c5(_0x514722)||_0x514722);return _0x514722;},_=(_0x217570,_0x353cd8)=>(_0x34130b,_0x4bc6f3)=>_0x353cd8(_0x34130b,_0x4bc6f3,_0x217570);function X(_0x52403d,_0x146f9e){const _0x3523f6=_0x3125a2,_0x128473=_0x52403d[_0x3523f6(0x197)][0x0];return{..._0x146f9e,'id':_0x128473[_0x3523f6(0x1b4)],'resolved':_0x52403d[_0x3523f6(0x1d6)]===0x1,'dT':D(_0x128473[_0x3523f6(0x1ac)]),'personId':_0x128473[_0x3523f6(0x1e7)],'threadId':_0x128473[_0x3523f6(0x193)]};}function ee(_0x1db493,_0x512efd,_0xfd8a7f){const _0x2c1385=_0x3125a2;var _0x3b0383,_0xeaafa9;if(((_0xeaafa9=(_0x3b0383=_0x1db493==null?void 0x0:_0x1db493['replies'])==null?void 0x0:_0x3b0383[_0x2c1385(0x1a1)])!=null?_0xeaafa9:0x0)>0x0){const _0x28fc8a=(_0x3402db,_0x3712e2)=>({'id':_0x3402db[_0x2c1385(0x1b4)],'threadId':_0x3402db['threadId'],'dT':D(_0x3402db[_0x2c1385(0x1ac)]),'personId':_0x3402db[_0x2c1385(0x1e7)],'resolved':_0x1db493['solved']===I[_0x2c1385(0x1eb)],'unitId':_0x512efd,'subUnitId':_0xfd8a7f,'text':JSON[_0x2c1385(0x1d4)](_0x3402db['content']),'parentId':_0x3712e2}),_0x464864=_0x28fc8a(_0x1db493[_0x2c1385(0x197)][0x0]);return{..._0x464864,'children':_0x1db493[_0x2c1385(0x197)][_0x2c1385(0x194)](0x1)[_0x2c1385(0x1c4)](_0x443b83=>_0x28fc8a(_0x443b83,_0x464864['id']))};}return null;}let f=class{constructor(_0x5e7810,_0x244858,_0x16f12e,_0x4b3b62){const _0x85b0bf=_0x3125a2;this[_0x85b0bf(0x1e3)]=_0x5e7810,this[_0x85b0bf(0x1d3)]=_0x244858,this[_0x85b0bf(0x1a0)]=_0x16f12e,this[_0x85b0bf(0x1c0)]=_0x4b3b62;}async['addComment'](_0x3ee18f){const _0x1a78c9=_0x3125a2;var _0x133bf3,_0x3d7aa0;const {parentId:_0x5f38a5,unitId:_0x5cb725,text:_0x3a8071,threadId:_0x7bc1d3}=_0x3ee18f,_0x5b316b=(_0x3d7aa0=(_0x133bf3=_0x3a8071[_0x1a78c9(0x1a4)])==null?void 0x0:_0x133bf3[_0x1a78c9(0x1cd)](_0x4bd2d1=>_0x4bd2d1['rangeType']===_0x1659d6[_0x1a78c9(0x1bb)])[_0x1a78c9(0x1c4)](_0x1bb3bc=>_0x1bb3bc[_0x1a78c9(0x19d)]))!=null?_0x3d7aa0:[],_0x4b28c0=JSON[_0x1a78c9(0x1a3)](_0x3a8071),_0x33d650=(await this[_0x1a78c9(0x1a0)][_0x1a78c9(0x18e)](_0x5cb725))[_0x1a78c9(0x1d5)]();if(_0x5f38a5){const _0x2afe42={'memberId':_0x33d650,'unitId':_0x5cb725,'content':_0x4b28c0,'mention':_0x5b316b,'threadId':_0x7bc1d3},_0x1d8332=(await this[_0x1a78c9(0x1e3)][_0x1a78c9(0x1dc)](_0x1a78c9(0x190)+_0x5cb725+_0x1a78c9(0x1ae),{'body':_0x2afe42}))[_0x1a78c9(0x19a)][_0x1a78c9(0x1a7)];return{..._0x3ee18f,'id':_0x1d8332[_0x1a78c9(0x1b4)],'dT':_0x466984(+_0x1d8332['createTimestamp'])[_0x1a78c9(0x1d0)](_0x1a78c9(0x188)),'personId':_0x1d8332[_0x1a78c9(0x1e7)]};}else{const _0x41a107={'memberId':_0x33d650,'unitId':_0x5cb725,'content':_0x4b28c0,'mention':_0x5b316b},_0x2b65d3=await this[_0x1a78c9(0x1e3)]['post']('/universer-api/comment/unit/'+_0x5cb725+_0x1a78c9(0x1e1),{'body':_0x41a107});return X(_0x2b65d3[_0x1a78c9(0x19a)][_0x1a78c9(0x1c6)],_0x3ee18f);}}async[_0x3125a2(0x1cb)](_0x37eeec){const _0x25041b=_0x3125a2;var _0x121bec,_0x57373c;const {text:_0x5b7800,unitId:_0x5e4448}=_0x37eeec,_0x1f7640=(_0x57373c=(_0x121bec=_0x5b7800[_0x25041b(0x1a4)])==null?void 0x0:_0x121bec['filter'](_0x381e66=>_0x381e66[_0x25041b(0x1ea)]===_0x1659d6[_0x25041b(0x1bb)])[_0x25041b(0x1c4)](_0x3dedb5=>_0x3dedb5['rangeId']))!=null?_0x57373c:[],_0x311b66=JSON[_0x25041b(0x1a3)](_0x5b7800),_0x59f8fc=_0x37eeec[_0x25041b(0x193)],_0x25b162=_0x37eeec['id'],_0x30c16b={'memberId':(await this['_sessionService'][_0x25041b(0x18e)](_0x5e4448))['getMemberID'](),'unitId':_0x5e4448,'threadId':_0x59f8fc,'mention':_0x1f7640,'content':_0x311b66,'replyId':_0x25b162},_0x22749f=await this[_0x25041b(0x1e3)][_0x25041b(0x1dc)](_0x25041b(0x190)+_0x5e4448+_0x25041b(0x1ab),{'body':_0x30c16b});return!_0x22749f[_0x25041b(0x19a)]['error']||_0x22749f['body'][_0x25041b(0x1aa)]['code']===0x1;}async[_0x3125a2(0x1d8)](_0x2a14f8){const _0x40ccaf=_0x3125a2,{unitId:_0x489c2b}=_0x2a14f8,_0x52e3b4=_0x2a14f8['threadId'],_0x4e21bf={'memberId':this[_0x40ccaf(0x1d3)]['getCurrentUser']()[_0x40ccaf(0x191)],'unitId':_0x489c2b,'threadId':_0x52e3b4,'solved':_0x2a14f8[_0x40ccaf(0x1e6)]?I[_0x40ccaf(0x1eb)]:I[_0x40ccaf(0x18b)]},_0x1db968=await this[_0x40ccaf(0x1e3)][_0x40ccaf(0x1dc)]('/universer-api/comment/unit/'+_0x489c2b+'/solved',{'body':_0x4e21bf});return!_0x1db968[_0x40ccaf(0x19a)][_0x40ccaf(0x1aa)]||_0x1db968['body']['error'][_0x40ccaf(0x19e)]===0x1;}async[_0x3125a2(0x1af)](_0x47ea3b,_0x575d24,_0x5a38fc,_0x37576b){const _0x427b51=_0x3125a2,_0x20b236={'memberId':(await this[_0x427b51(0x1a0)][_0x427b51(0x18e)](_0x47ea3b))[_0x427b51(0x1d5)](),'threadId':_0x5a38fc,'replyId':_0x37576b,'unitId':_0x47ea3b},_0x29988b=await this[_0x427b51(0x1e3)]['post'](_0x427b51(0x190)+_0x47ea3b+_0x427b51(0x19f),{'body':_0x20b236});return!_0x29988b[_0x427b51(0x19a)][_0x427b51(0x1aa)]||_0x29988b[_0x427b51(0x19a)][_0x427b51(0x1aa)]['code']===0x1;}async['listComments'](_0x2bc9fe,_0x39697a,_0x40d39f){const _0x1cd8f2=_0x3125a2,_0x37e3a6={'unitId':_0x2bc9fe,'threadId':_0x40d39f},_0x4035ea=await this[_0x1cd8f2(0x1e3)][_0x1cd8f2(0x1dc)]('/universer-api/comment/unit/'+_0x2bc9fe+'/list',{'body':_0x37e3a6}),_0x5d87a3=_0x40d39f[_0x1cd8f2(0x1c4)](_0x3bfb6f=>ee(_0x4035ea[_0x1cd8f2(0x19a)][_0x1cd8f2(0x189)][_0x3bfb6f],_0x2bc9fe,_0x39697a))[_0x1cd8f2(0x1cd)](Boolean);return Object['values'](_0x4035ea[_0x1cd8f2(0x19a)][_0x1cd8f2(0x1bd)])[_0x1cd8f2(0x185)](_0x2d6c53=>{const _0x4c22e6=_0x1cd8f2;this[_0x4c22e6(0x1d3)][_0x4c22e6(0x1b8)](_0x2d6c53);}),_0x5d87a3;}[_0x3125a2(0x186)](_0x4e731a){const _0x1b5ee4=_0x3125a2;return{'id':_0x4e731a['id'],'threadId':_0x4e731a['threadId'],'ref':_0x4e731a[_0x1b5ee4(0x1c8)]};}};f=Q([_(0x0,_0x5223ea(_0x3180ef)),_(0x1,_0x5223ea(_0x877d29)),_(0x2,_0x5223ea(_0x3cf7e3)),_(0x3,_0x5223ea(_0x579925))],f);var re=Object[_0x3125a2(0x1ce)],te=(_0xd462e3,_0x16abe7,_0xe23e81,_0x459ecf)=>{const _0x26a76c=_0x3125a2;for(var _0x335403=_0x459ecf>0x1?void 0x0:_0x459ecf?re(_0x16abe7,_0xe23e81):_0x16abe7,_0x4be48d=_0xd462e3[_0x26a76c(0x1a1)]-0x1,_0x52836a;_0x4be48d>=0x0;_0x4be48d--)(_0x52836a=_0xd462e3[_0x4be48d])&&(_0x335403=_0x52836a(_0x335403)||_0x335403);return _0x335403;},N=(_0x96acf6,_0x39be77)=>(_0x214eb2,_0x18c445)=>_0x39be77(_0x214eb2,_0x18c445,_0x96acf6);let g=class extends _0x2c471d{constructor(_0x15a458,_0x597fbd){const _0x286543=_0x3125a2;super(),this[_0x286543(0x1ba)]=_0x15a458,this['_threadCommentDataSource']=_0x597fbd,this[_0x286543(0x196)]();}[_0x3125a2(0x196)](){const _0x50f769=_0x3125a2;this['_threadCommentDataSourceService'][_0x50f769(0x1a6)]=this[_0x50f769(0x1b9)],this[_0x50f769(0x1ba)][_0x50f769(0x184)]=!0x1;}};g=te([N(0x0,_0x1af45c),N(0x1,_0x5223ea(f))],g);var se=Object[_0x3125a2(0x1c5)],oe=Object[_0x3125a2(0x1ce)],ne=(_0x266f15,_0x503b35,_0x1e4829)=>_0x503b35 in _0x266f15?se(_0x266f15,_0x503b35,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1e4829}):_0x266f15[_0x503b35]=_0x1e4829,ie=(_0x56f65e,_0x129f98,_0x146749,_0x2413be)=>{const _0x2d529f=_0x3125a2;for(var _0x38eb4a=_0x2413be>0x1?void 0x0:_0x2413be?oe(_0x129f98,_0x146749):_0x129f98,_0x3d30d3=_0x56f65e[_0x2d529f(0x1a1)]-0x1,_0x54434a;_0x3d30d3>=0x0;_0x3d30d3--)(_0x54434a=_0x56f65e[_0x3d30d3])&&(_0x38eb4a=_0x54434a(_0x38eb4a)||_0x38eb4a);return _0x38eb4a;},w=(_0x4fb7e9,_0x58466c)=>(_0x1e8905,_0x2fd2c6)=>_0x58466c(_0x1e8905,_0x2fd2c6,_0x4fb7e9),$=(_0x22094a,_0x250a00,_0x46b1e7)=>ne(_0x22094a,typeof _0x250a00!='symbol'?_0x250a00+'':_0x250a00,_0x46b1e7);let b=class extends _0x42ff71{constructor(_0x58ce75=M,_0x22ad1f,_0x293b86){const _0xed3bcc=_0x3125a2;super(),this[_0xed3bcc(0x1e9)]=_0x58ce75,this[_0xed3bcc(0x1c0)]=_0x22ad1f,this[_0xed3bcc(0x198)]=_0x293b86;const {..._0x3d5040}=_0x497adb({},M,this['_config']);this['_configService'][_0xed3bcc(0x1c1)](z,_0x3d5040);}['onStarting'](){const _0x11568e=_0x3125a2;[[f],[g],[S]][_0x11568e(0x185)](_0x2bf256=>{const _0x465e08=_0x11568e;this['_injector'][_0x465e08(0x1be)](_0x2bf256);});}[_0x3125a2(0x183)](){const _0x4da96d=_0x3125a2;this[_0x4da96d(0x1c0)][_0x4da96d(0x187)](g),this[_0x4da96d(0x1c0)][_0x4da96d(0x187)](S);}};$(b,_0x3125a2(0x1de),W),$(b,'type',_0x4f26b0[_0x3125a2(0x1ca)]),b=ie([_0x3f95ef(_0x479164,_0x12a624,_0x2e3ca3),w(0x1,_0x5223ea(_0x579925)),w(0x2,_0x5a7661)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x33e44b=_0x1814;(function(_0x195a22,_0x872dbd){const _0x23408a=_0x1814,_0x263be5=_0x195a22();while(!![]){try{const _0x26a1ed=parseInt(_0x23408a(0x145))/0x1*(parseInt(_0x23408a(0x16d))/0x2)+parseInt(_0x23408a(0x198))/0x3+-parseInt(_0x23408a(0x169))/0x4+-parseInt(_0x23408a(0x15f))/0x5+-parseInt(_0x23408a(0x157))/0x6*(parseInt(_0x23408a(0x142))/0x7)+-parseInt(_0x23408a(0x146))/0x8+parseInt(_0x23408a(0x13f))/0x9;if(_0x26a1ed===_0x872dbd)break;else _0x263be5['push'](_0x263be5['shift']());}catch(_0xf1ed01){_0x263be5['push'](_0x263be5['shift']());}}}(_0x61ae,0xe9d10));import{CommentService as _0x1b43bb,CollaborationSessionService as _0x5a3e8e,UniverCollaborationClientPlugin as _0x35611b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x35b6ab}from'@univerjs-pro/license';import{dayjs as _0x1f8faa,UserManagerService as _0x32d721,Inject as _0xa81a04,Injector as _0x30a5b9,Disposable as _0x234e12,CustomRangeType as _0x49eeca,UniverInstanceType as _0x35e9a7,DependentOn as _0x2567c7,IConfigService as _0x54763b,Plugin as _0x21f70a,merge as _0x10f491}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x6f43cc}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x718fe,IThreadCommentDataSourceService as _0xfc7a2e}from'@univerjs/thread-comment';import{bufferTime as _0x364169}from'rxjs';import{HTTPService as _0x240bd7}from'@univerjs/network';function _0x1814(_0x19fcff,_0x2f00f2){const _0x61ae16=_0x61ae();return _0x1814=function(_0x18147a,_0x5e4737){_0x18147a=_0x18147a-0x139;let _0x165412=_0x61ae16[_0x18147a];return _0x165412;},_0x1814(_0x19fcff,_0x2f00f2);}const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x347a70=>(_0x347a70[_0x347a70[_0x33e44b(0x197)]=0x0]=_0x33e44b(0x197),_0x347a70[_0x347a70[_0x33e44b(0x191)]=0x1]='Solved',_0x347a70[_0x347a70[_0x33e44b(0x165)]=-0x1]=_0x33e44b(0x165),_0x347a70))(I||{}),v=(_0x2484a0=>(_0x2484a0[_0x2484a0[_0x33e44b(0x13d)]=0x0]=_0x33e44b(0x13d),_0x2484a0[_0x2484a0[_0x33e44b(0x15b)]=0x1]=_0x33e44b(0x15b),_0x2484a0[_0x2484a0[_0x33e44b(0x154)]=0x2]=_0x33e44b(0x154),_0x2484a0[_0x2484a0['Edit']=0x3]=_0x33e44b(0x13e),_0x2484a0[_0x2484a0[_0x33e44b(0x160)]=0x4]=_0x33e44b(0x160),_0x2484a0[_0x2484a0['Solve']=0x5]=_0x33e44b(0x18f),_0x2484a0[_0x2484a0[_0x33e44b(0x165)]=-0x1]=_0x33e44b(0x165),_0x2484a0))(v||{});const D=_0x5a8cae=>_0x1f8faa(new Date(+_0x5a8cae))[_0x33e44b(0x16a)](_0x33e44b(0x18b)),B=async(_0x13ef69,_0x30f6e2)=>{const _0x317ee0=_0x33e44b,_0x54b34d=_0x13ef69[_0x317ee0(0x178)](_0x32d721),_0x2523a5=_0x13ef69[_0x317ee0(0x178)](_0x240bd7);_0x30f6e2[_0x317ee0(0x192)](_0x36203a=>{const _0x33bf70=_0x317ee0;_0x54b34d[_0x33bf70(0x161)](_0x36203a)&&_0x30f6e2[_0x33bf70(0x17b)](_0x36203a);}),_0x30f6e2['size']&&(await _0x2523a5[_0x317ee0(0x178)](_0x317ee0(0x18a),{'params':{'userIDs':[..._0x30f6e2]}}))['body'][_0x317ee0(0x18d)][_0x317ee0(0x192)](_0x18fad2=>{const _0x542fd8=_0x317ee0;_0x18fad2&&_0x54b34d[_0x542fd8(0x13a)](_0x18fad2);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x201492,_0x1be307,_0x4eb997,_0x106951)=>{const _0x57a0a0=_0x33e44b;for(var _0x378a9c=_0x106951>0x1?void 0x0:_0x106951?K(_0x1be307,_0x4eb997):_0x1be307,_0x1f8311=_0x201492[_0x57a0a0(0x16f)]-0x1,_0xf61a94;_0x1f8311>=0x0;_0x1f8311--)(_0xf61a94=_0x201492[_0x1f8311])&&(_0x378a9c=_0xf61a94(_0x378a9c)||_0x378a9c);return _0x378a9c;},p=(_0x541783,_0x22a56f)=>(_0x3b00b6,_0x378187)=>_0x22a56f(_0x3b00b6,_0x378187,_0x541783);let S=class extends _0x234e12{constructor(_0x4161d6,_0x5d6f0d,_0x54c056,_0x4dcf0a){const _0x5bd590=_0x33e44b;super(),this['_commentService']=_0x4161d6,this[_0x5bd590(0x156)]=_0x5d6f0d,this[_0x5bd590(0x16c)]=_0x54c056,this['_injector']=_0x4dcf0a,this[_0x5bd590(0x16b)](),this[_0x5bd590(0x155)]();}[_0x33e44b(0x155)](){const _0x14a527=_0x33e44b;this[_0x14a527(0x13b)](this[_0x14a527(0x156)]['commentUpdate$'][_0x14a527(0x171)](_0x364169(0x10))[_0x14a527(0x15a)](_0x49fafa=>{const _0x34267a=_0x14a527,_0x4859ec=new Set();_0x49fafa[_0x34267a(0x192)](_0x3e448c=>{const _0x3f4fff=_0x34267a;switch(_0x3e448c[_0x3f4fff(0x153)]){case'add':{const _0x1b45ed=_0x3e448c[_0x3f4fff(0x15e)]['personId'];_0x4859ec[_0x3f4fff(0x174)](_0x1b45ed);break;}}}),B(this[_0x34267a(0x166)],_0x4859ec);}));}['_init'](){const _0x39c400=_0x33e44b;this['disposeWithMe'](this[_0x39c400(0x14e)]['commentUpdate$'][_0x39c400(0x15a)](async _0x55debe=>{const _0x33ddc5=_0x39c400;var _0x13ec1b,_0x3bf708,_0x4e3332,_0x12c2eb;const _0x83d487=(_0x13ec1b=this['_threadCommentModel'][_0x33ddc5(0x182)](_0x55debe[_0x33ddc5(0x17a)])['find'](_0x3fbc49=>_0x3fbc49[_0x33ddc5(0x196)]===_0x55debe[_0x33ddc5(0x196)]))==null?void 0x0:_0x13ec1b[_0x33ddc5(0x149)];if(!_0x83d487)return;const {unitId:_0xd5fbc3,subUnitId:_0x298ab9}=_0x83d487;switch(_0x55debe[_0x33ddc5(0x176)]&&this['_userService']['addUser'](_0x55debe[_0x33ddc5(0x176)]),_0x55debe[_0x33ddc5(0x153)]){case v[_0x33ddc5(0x15b)]:break;case v[_0x33ddc5(0x154)]:{this[_0x33ddc5(0x156)][_0x33ddc5(0x14b)](_0xd5fbc3,_0x298ab9,{'unitId':_0xd5fbc3,'subUnitId':_0x298ab9,'ref':'','id':_0x55debe[_0x33ddc5(0x162)],'dT':D(+_0x55debe[_0x33ddc5(0x188)]),'threadId':_0x55debe['threadId'],'personId':(_0x4e3332=(_0x3bf708=_0x55debe[_0x33ddc5(0x176)])==null?void 0x0:_0x3bf708[_0x33ddc5(0x15c)])!=null?_0x4e3332:_0x55debe[_0x33ddc5(0x194)],'text':JSON['parse'](_0x55debe['content']),'parentId':_0x83d487['id']});break;}case v[_0x33ddc5(0x160)]:{const _0x286dfd=this[_0x33ddc5(0x156)][_0x33ddc5(0x179)](_0xd5fbc3,_0x298ab9,_0x55debe[_0x33ddc5(0x162)]);_0x286dfd&&_0x286dfd[_0x33ddc5(0x164)]&&this[_0x33ddc5(0x156)][_0x33ddc5(0x13c)](_0xd5fbc3,_0x298ab9,_0x55debe[_0x33ddc5(0x162)]);break;}case v[_0x33ddc5(0x13e)]:{this[_0x33ddc5(0x156)][_0x33ddc5(0x193)](_0xd5fbc3,_0x298ab9,{'commentId':_0x55debe[_0x33ddc5(0x162)],'text':JSON[_0x33ddc5(0x159)](_0x55debe['content'])});break;}case v[_0x33ddc5(0x18f)]:{const _0x156455=(_0x12c2eb=this[_0x33ddc5(0x156)]['getUnit'](_0x55debe[_0x33ddc5(0x17a)])['find'](_0x27e031=>_0x27e031[_0x33ddc5(0x196)]===_0x55debe[_0x33ddc5(0x196)]))==null?void 0x0:_0x12c2eb['root'];_0x156455&&this[_0x33ddc5(0x156)]['resolveComment'](_0xd5fbc3,_0x298ab9,_0x156455['id'],_0x55debe[_0x33ddc5(0x183)]===I[_0x33ddc5(0x191)]);break;}}}));}};S=V([p(0x0,_0xa81a04(_0x1b43bb)),p(0x1,_0xa81a04(_0x718fe)),p(0x2,_0xa81a04(_0x32d721)),p(0x3,_0xa81a04(_0x30a5b9))],S);const z=_0x33e44b(0x144),M={};function _0x61ae(){const _0x2fcdb5=['/reply','pipe','resolved','map','add','replies','user','_sessionService','get','getComment','unitId','delete','UNIVER_UNKNOWN','/solved','requireSession','/delete','resolveComment','listComments','getUnit','solved','onStarting','_configService','error','values','createTimestamp','symbol','/universer-api/user/list','YYYY/MM/DD\x20HH:mm','slice','users','ref','Solve','getMemberID','Solved','forEach','updateComment','userId','/add','threadId','OpenOrReOpen','2374848bzaYuG','rangeId','addUser','disposeWithMe','deleteComment','Unknown','Edit','24403572jOgYdr','_threadCommentDataSourceService','_config','2639imQSlB','body','thread-comment-data-source.config','2cLhwQM','3016760YyPaJm','defineProperty','stringify','root','pluginName','addComment','_initDataSource','_httpService','_commentService','customRanges','getCurrentUser','code','content','type','Reply','_initUserSync','_threadCommentModel','17352xnDUVj','_threadCommentDataSource','parse','subscribe','Add','userID','filter','payload','5286465uVGwnn','Delete','getUser','replyId','COMMENT','parentId','UNRECOGNIZED','_injector','/list','/universer-api/comment/unit/','4855488FvkWjj','format','_init','_userService','1193132QAImPg','post','length'];_0x61ae=function(){return _0x2fcdb5;};return _0x61ae();}var k=Object['getOwnPropertyDescriptor'],Q=(_0xb63c92,_0x412e24,_0x400f49,_0x12acb2)=>{for(var _0x19b5a3=_0x12acb2>0x1?void 0x0:_0x12acb2?k(_0x412e24,_0x400f49):_0x412e24,_0x901cc4=_0xb63c92['length']-0x1,_0x33c4c9;_0x901cc4>=0x0;_0x901cc4--)(_0x33c4c9=_0xb63c92[_0x901cc4])&&(_0x19b5a3=_0x33c4c9(_0x19b5a3)||_0x19b5a3);return _0x19b5a3;},_=(_0x50f8c2,_0x5ed6b1)=>(_0x5382b2,_0x5da11b)=>_0x5ed6b1(_0x5382b2,_0x5da11b,_0x50f8c2);function X(_0x597caf,_0x4ae1b1){const _0x5efd8f=_0x33e44b,_0x2fc86e=_0x597caf[_0x5efd8f(0x175)][0x0];return{..._0x4ae1b1,'id':_0x2fc86e[_0x5efd8f(0x162)],'resolved':_0x597caf['solved']===0x1,'dT':D(_0x2fc86e[_0x5efd8f(0x188)]),'personId':_0x2fc86e[_0x5efd8f(0x194)],'threadId':_0x2fc86e[_0x5efd8f(0x196)]};}function ee(_0x452392,_0x6a07c2,_0x39cc24){const _0x504b20=_0x33e44b;var _0x261901,_0x179fc5;if(((_0x179fc5=(_0x261901=_0x452392==null?void 0x0:_0x452392[_0x504b20(0x175)])==null?void 0x0:_0x261901[_0x504b20(0x16f)])!=null?_0x179fc5:0x0)>0x0){const _0x4c470a=(_0x1202f2,_0x5e6750)=>({'id':_0x1202f2[_0x504b20(0x162)],'threadId':_0x1202f2[_0x504b20(0x196)],'dT':D(_0x1202f2[_0x504b20(0x188)]),'personId':_0x1202f2[_0x504b20(0x194)],'resolved':_0x452392[_0x504b20(0x183)]===I[_0x504b20(0x191)],'unitId':_0x6a07c2,'subUnitId':_0x39cc24,'text':JSON[_0x504b20(0x159)](_0x1202f2[_0x504b20(0x152)]),'parentId':_0x5e6750}),_0x2baedb=_0x4c470a(_0x452392[_0x504b20(0x175)][0x0]);return{..._0x2baedb,'children':_0x452392[_0x504b20(0x175)][_0x504b20(0x18c)](0x1)['map'](_0x25a538=>_0x4c470a(_0x25a538,_0x2baedb['id']))};}return null;}let f=class{constructor(_0x40c91b,_0x331edd,_0x2786d0,_0x208af3){const _0x5612d1=_0x33e44b;this['_httpService']=_0x40c91b,this[_0x5612d1(0x16c)]=_0x331edd,this[_0x5612d1(0x177)]=_0x2786d0,this[_0x5612d1(0x166)]=_0x208af3;}async[_0x33e44b(0x14b)](_0x188dfe){const _0x3ecf2a=_0x33e44b;var _0x25c102,_0x453824;const {parentId:_0x4d131c,unitId:_0x53081c,text:_0x457f56,threadId:_0xc1c935}=_0x188dfe,_0x562d63=(_0x453824=(_0x25c102=_0x457f56[_0x3ecf2a(0x14f)])==null?void 0x0:_0x25c102[_0x3ecf2a(0x15d)](_0x2218d9=>_0x2218d9['rangeType']===_0x49eeca[_0x3ecf2a(0x163)])[_0x3ecf2a(0x173)](_0x16cf04=>_0x16cf04[_0x3ecf2a(0x139)]))!=null?_0x453824:[],_0x4dd26e=JSON[_0x3ecf2a(0x148)](_0x457f56),_0x4c5f14=(await this['_sessionService'][_0x3ecf2a(0x17e)](_0x53081c))['getMemberID']();if(_0x4d131c){const _0x563418={'memberId':_0x4c5f14,'unitId':_0x53081c,'content':_0x4dd26e,'mention':_0x562d63,'threadId':_0xc1c935},_0x22a6d5=(await this['_httpService'][_0x3ecf2a(0x16e)](_0x3ecf2a(0x168)+_0x53081c+_0x3ecf2a(0x170),{'body':_0x563418}))[_0x3ecf2a(0x143)]['reply'];return{..._0x188dfe,'id':_0x22a6d5['replyId'],'dT':_0x1f8faa(+_0x22a6d5[_0x3ecf2a(0x188)])[_0x3ecf2a(0x16a)](_0x3ecf2a(0x18b)),'personId':_0x22a6d5[_0x3ecf2a(0x194)]};}else{const _0x525565={'memberId':_0x4c5f14,'unitId':_0x53081c,'content':_0x4dd26e,'mention':_0x562d63},_0x3ba475=await this[_0x3ecf2a(0x14d)]['post']('/universer-api/comment/unit/'+_0x53081c+_0x3ecf2a(0x195),{'body':_0x525565});return X(_0x3ba475[_0x3ecf2a(0x143)]['comment'],_0x188dfe);}}async['updateComment'](_0x4f3c05){const _0xa625aa=_0x33e44b;var _0x1a16a2,_0xac8ed7;const {text:_0x53d29b,unitId:_0x4767ac}=_0x4f3c05,_0x4b4ea5=(_0xac8ed7=(_0x1a16a2=_0x53d29b[_0xa625aa(0x14f)])==null?void 0x0:_0x1a16a2[_0xa625aa(0x15d)](_0x504a2d=>_0x504a2d['rangeType']===_0x49eeca['COMMENT'])['map'](_0x149f30=>_0x149f30['rangeId']))!=null?_0xac8ed7:[],_0x139d56=JSON[_0xa625aa(0x148)](_0x53d29b),_0x290533=_0x4f3c05[_0xa625aa(0x196)],_0x131041=_0x4f3c05['id'],_0x1cedb9={'memberId':(await this[_0xa625aa(0x177)][_0xa625aa(0x17e)](_0x4767ac))[_0xa625aa(0x190)](),'unitId':_0x4767ac,'threadId':_0x290533,'mention':_0x4b4ea5,'content':_0x139d56,'replyId':_0x131041},_0x4024b6=await this[_0xa625aa(0x14d)][_0xa625aa(0x16e)](_0xa625aa(0x168)+_0x4767ac+'/edit',{'body':_0x1cedb9});return!_0x4024b6[_0xa625aa(0x143)][_0xa625aa(0x186)]||_0x4024b6[_0xa625aa(0x143)][_0xa625aa(0x186)][_0xa625aa(0x151)]===0x1;}async[_0x33e44b(0x180)](_0x4e5da9){const _0x562026=_0x33e44b,{unitId:_0x5e5cf8}=_0x4e5da9,_0x333317=_0x4e5da9[_0x562026(0x196)],_0x15de05={'memberId':this[_0x562026(0x16c)][_0x562026(0x150)]()[_0x562026(0x15c)],'unitId':_0x5e5cf8,'threadId':_0x333317,'solved':_0x4e5da9[_0x562026(0x172)]?I[_0x562026(0x191)]:I['OpenOrReOpen']},_0x193b21=await this[_0x562026(0x14d)][_0x562026(0x16e)](_0x562026(0x168)+_0x5e5cf8+_0x562026(0x17d),{'body':_0x15de05});return!_0x193b21[_0x562026(0x143)][_0x562026(0x186)]||_0x193b21['body'][_0x562026(0x186)][_0x562026(0x151)]===0x1;}async['deleteComment'](_0x27c859,_0x10b0ab,_0x4fa416,_0x5fc2fb){const _0x4f5034=_0x33e44b,_0x5838b3={'memberId':(await this[_0x4f5034(0x177)][_0x4f5034(0x17e)](_0x27c859))['getMemberID'](),'threadId':_0x4fa416,'replyId':_0x5fc2fb,'unitId':_0x27c859},_0x47387e=await this['_httpService'][_0x4f5034(0x16e)](_0x4f5034(0x168)+_0x27c859+_0x4f5034(0x17f),{'body':_0x5838b3});return!_0x47387e[_0x4f5034(0x143)][_0x4f5034(0x186)]||_0x47387e[_0x4f5034(0x143)][_0x4f5034(0x186)]['code']===0x1;}async[_0x33e44b(0x181)](_0x4c0f1e,_0x84e585,_0x59945b){const _0x4dee12=_0x33e44b,_0x2839f8={'unitId':_0x4c0f1e,'threadId':_0x59945b},_0x59efc7=await this[_0x4dee12(0x14d)][_0x4dee12(0x16e)](_0x4dee12(0x168)+_0x4c0f1e+_0x4dee12(0x167),{'body':_0x2839f8}),_0x182448=_0x59945b[_0x4dee12(0x173)](_0x307dd2=>ee(_0x59efc7[_0x4dee12(0x143)]['comments'][_0x307dd2],_0x4c0f1e,_0x84e585))[_0x4dee12(0x15d)](Boolean);return Object[_0x4dee12(0x187)](_0x59efc7[_0x4dee12(0x143)][_0x4dee12(0x18d)])[_0x4dee12(0x192)](_0x4d5fe8=>{const _0xbcb1eb=_0x4dee12;this[_0xbcb1eb(0x16c)][_0xbcb1eb(0x13a)](_0x4d5fe8);}),_0x182448;}['saveCommentToSnapshot'](_0x22fa47){const _0x9d2d4c=_0x33e44b;return{'id':_0x22fa47['id'],'threadId':_0x22fa47[_0x9d2d4c(0x196)],'ref':_0x22fa47[_0x9d2d4c(0x18e)]};}};f=Q([_(0x0,_0xa81a04(_0x240bd7)),_(0x1,_0xa81a04(_0x32d721)),_(0x2,_0xa81a04(_0x5a3e8e)),_(0x3,_0xa81a04(_0x30a5b9))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x2db29d,_0x2266ac,_0xa0d49,_0x58b8e3)=>{const _0x2aabd9=_0x33e44b;for(var _0x4a5b8c=_0x58b8e3>0x1?void 0x0:_0x58b8e3?re(_0x2266ac,_0xa0d49):_0x2266ac,_0x2f91c5=_0x2db29d[_0x2aabd9(0x16f)]-0x1,_0x48c58e;_0x2f91c5>=0x0;_0x2f91c5--)(_0x48c58e=_0x2db29d[_0x2f91c5])&&(_0x4a5b8c=_0x48c58e(_0x4a5b8c)||_0x4a5b8c);return _0x4a5b8c;},N=(_0x63090c,_0x148c24)=>(_0x4aa630,_0x25aef5)=>_0x148c24(_0x4aa630,_0x25aef5,_0x63090c);let g=class extends _0x234e12{constructor(_0x318cc3,_0x10b625){const _0x5ec075=_0x33e44b;super(),this[_0x5ec075(0x140)]=_0x318cc3,this[_0x5ec075(0x158)]=_0x10b625,this[_0x5ec075(0x14c)]();}[_0x33e44b(0x14c)](){const _0x3ef9e4=_0x33e44b;this[_0x3ef9e4(0x140)]['dataSource']=this[_0x3ef9e4(0x158)],this[_0x3ef9e4(0x140)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0xfc7a2e),N(0x1,_0xa81a04(f))],g);var se=Object[_0x33e44b(0x147)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x298bbb,_0x57b2ec,_0xb7471d)=>_0x57b2ec in _0x298bbb?se(_0x298bbb,_0x57b2ec,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xb7471d}):_0x298bbb[_0x57b2ec]=_0xb7471d,ie=(_0x191339,_0x36b300,_0x36f3c3,_0x58c65d)=>{const _0x3b603a=_0x33e44b;for(var _0x570a1e=_0x58c65d>0x1?void 0x0:_0x58c65d?oe(_0x36b300,_0x36f3c3):_0x36b300,_0xd33c2d=_0x191339[_0x3b603a(0x16f)]-0x1,_0x377201;_0xd33c2d>=0x0;_0xd33c2d--)(_0x377201=_0x191339[_0xd33c2d])&&(_0x570a1e=_0x377201(_0x570a1e)||_0x570a1e);return _0x570a1e;},w=(_0x2bc0f8,_0x20fd8a)=>(_0x54480f,_0x4b6192)=>_0x20fd8a(_0x54480f,_0x4b6192,_0x2bc0f8),$=(_0x2caad2,_0x3d72f6,_0x4bdb62)=>ne(_0x2caad2,typeof _0x3d72f6!=_0x33e44b(0x189)?_0x3d72f6+'':_0x3d72f6,_0x4bdb62);let b=class extends _0x21f70a{constructor(_0x57572b=M,_0x56c523,_0x1baf7f){const _0x5be9bd=_0x33e44b;super(),this['_config']=_0x57572b,this[_0x5be9bd(0x166)]=_0x56c523,this[_0x5be9bd(0x185)]=_0x1baf7f;const {..._0x523092}=_0x10f491({},M,this[_0x5be9bd(0x141)]);this[_0x5be9bd(0x185)]['setConfig'](z,_0x523092);}[_0x33e44b(0x184)](){const _0x539a9c=_0x33e44b;[[f],[g],[S]][_0x539a9c(0x192)](_0x589f8a=>{const _0x1cdfed=_0x539a9c;this[_0x1cdfed(0x166)][_0x1cdfed(0x174)](_0x589f8a);});}['onReady'](){const _0x17946e=_0x33e44b;this['_injector'][_0x17946e(0x178)](g),this[_0x17946e(0x166)][_0x17946e(0x178)](S);}};$(b,_0x33e44b(0x14a),W),$(b,'type',_0x35e9a7[_0x33e44b(0x17c)]),b=ie([_0x2567c7(_0x6f43cc,_0x35611b,_0x35b6ab),w(0x1,_0xa81a04(_0x30a5b9)),w(0x2,_0x54763b)],b);export{b as UniverThreadCommentDataSourcePlugin};
@@ -1,6 +1,6 @@
1
+ import { CommentService } from '@univerjs-pro/collaboration-client';
1
2
  import { Disposable, Injector, UserManagerService } from '@univerjs/core';
2
3
  import { ThreadCommentModel } from '@univerjs/thread-comment';
3
- import { CommentService } from '@univerjs-pro/collaboration-client';
4
4
  export declare class ThreadCommentCollaUpdateController extends Disposable {
5
5
  private readonly _commentService;
6
6
  private readonly _threadCommentModel;
@@ -1 +1,2 @@
1
1
  export { UniverThreadCommentDataSourcePlugin } from './plugin';
2
+ export type { IUniverThreadCommentDataSourceConfig } from './controllers/config.schema';
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x22b4(_0x23faae,_0x4fbef8){const _0x3f88c2=_0x3f88();return _0x22b4=function(_0x22b4c1,_0x3469b3){_0x22b4c1=_0x22b4c1-0x186;let _0x581788=_0x3f88c2[_0x22b4c1];return _0x581788;},_0x22b4(_0x23faae,_0x4fbef8);}function _0x3f88(){const _0x2f3c6b=['personId','@univerjs/thread-comment-ui','Solved','getOwnPropertyDescriptor','Injector','ThreadCommentModel','thread-comment-data-source.config','@univerjs-pro/license','UniverCore','IThreadCommentDataSourceService','format','_init','object','Disposable','8744016tabNpd','symbol','resolved','UniverProThreadCommentDatasource','_initUserSync','comments','907811WhcnTO','requireSession','unitId','type','@univerjs-pro/collaboration-client','ref','commentUpdate$','addUser','_threadCommentDataSource','_threadCommentDataSourceService','exports','replies','Plugin','dayjs','Edit','14CWajsn','add','createTimestamp','_injector','post','payload','IConfigService','_config','rangeType','getMemberID','/edit','userID','threadId','3539730qTFvuA','_configService','/reply','DependentOn','_httpService','onStarting','@univerjs/network','CommentService','content','/add','UniverProLicense','OpenOrReOpen','userId','root','comment','UniverThreadCommentUIPlugin','parse','syncUpdateMutationToColla','body','Add','@univerjs/core','989465bwhLXh','4214064WuuNyK','getCurrentUser','_userService','Solve','UniverProCollaborationClient','COMMENT','YYYY/MM/DD\x20HH:mm','/delete','_sessionService','map','2bfWrSJ','UniverNetwork','16gwhxzv','UniverInstanceType','replyId','deleteComment','Inject','length','forEach','getComment','4202604OVPEEC','error','users','customRanges','UNIVER_UNKNOWN','Unknown','dataSource','_commentService','slice','toStringTag','disposeWithMe','HTTPService','Module','/universer-api/comment/unit/','filter','UNRECOGNIZED','UniverThreadCommentDataSourcePlugin','delete','defineProperty','_threadCommentModel','CustomRangeType','stringify','getUnit','@univerjs/thread-comment','/list','amd','bufferTime','rxjs','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','rangeId','user','solved','subscribe','Delete','UserManagerService','2256546hYHxgE','Reply','/solved','updateComment','code','addComment','values','get','UniverThreadComment'];_0x3f88=function(){return _0x2f3c6b;};return _0x3f88();}(function(_0x1de59d,_0x5891e4){const _0x475848=_0x22b4,_0x37f964=_0x1de59d();while(!![]){try{const _0x1af85c=-parseInt(_0x475848(0x206))/0x1*(-parseInt(_0x475848(0x1bc))/0x2)+-parseInt(_0x475848(0x1e9))/0x3+-parseInt(_0x475848(0x1be))/0x4*(-parseInt(_0x475848(0x1b1))/0x5)+parseInt(_0x475848(0x1b2))/0x6*(-parseInt(_0x475848(0x18f))/0x7)+parseInt(_0x475848(0x200))/0x8+parseInt(_0x475848(0x1c6))/0x9+-parseInt(_0x475848(0x19c))/0xa;if(_0x1af85c===_0x5891e4)break;else _0x37f964['push'](_0x37f964['shift']());}catch(_0x54c95e){_0x37f964['push'](_0x37f964['shift']());}}}(_0x3f88,0xb6bd2),function(_0xf771dd,_0x5b9a34){const _0x2053c3=_0x22b4;typeof exports==_0x2053c3(0x1fe)&&typeof module<'u'?_0x5b9a34(exports,require(_0x2053c3(0x20a)),require(_0x2053c3(0x1f9)),require(_0x2053c3(0x1b0)),require(_0x2053c3(0x1f3)),require(_0x2053c3(0x1dd)),require(_0x2053c3(0x1e1)),require(_0x2053c3(0x1a2))):typeof define=='function'&&define[_0x2053c3(0x1df)]?define([_0x2053c3(0x18a),_0x2053c3(0x20a),'@univerjs-pro/license',_0x2053c3(0x1b0),_0x2053c3(0x1f3),_0x2053c3(0x1dd),_0x2053c3(0x1e1),'@univerjs/network'],_0x5b9a34):(_0xf771dd=typeof globalThis<'u'?globalThis:_0xf771dd||self,_0x5b9a34(_0xf771dd[_0x2053c3(0x203)]={},_0xf771dd[_0x2053c3(0x1b6)],_0xf771dd[_0x2053c3(0x1a6)],_0xf771dd[_0x2053c3(0x1fa)],_0xf771dd['UniverThreadCommentUi'],_0xf771dd[_0x2053c3(0x1f1)],_0xf771dd[_0x2053c3(0x1e1)],_0xf771dd[_0x2053c3(0x1bd)]));}(this,function(_0x44af1f,_0x32c0b7,_0x43cd45,_0x22c7fc,_0x135374,_0x5ecf49,_0x4e7339,_0x4ec98e){'use strict';const _0x3d2e12=_0x22b4;const _0x47384a=_0x3d2e12(0x1e2);var _0x54f7d2=(_0x5de708=>(_0x5de708[_0x5de708[_0x3d2e12(0x1a7)]=0x0]='OpenOrReOpen',_0x5de708[_0x5de708[_0x3d2e12(0x1f4)]=0x1]=_0x3d2e12(0x1f4),_0x5de708[_0x5de708['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x5de708))(_0x54f7d2||{}),_0x3e2ea8=(_0x72cb28=>(_0x72cb28[_0x72cb28[_0x3d2e12(0x1cb)]=0x0]=_0x3d2e12(0x1cb),_0x72cb28[_0x72cb28[_0x3d2e12(0x1af)]=0x1]='Add',_0x72cb28[_0x72cb28[_0x3d2e12(0x1ea)]=0x2]=_0x3d2e12(0x1ea),_0x72cb28[_0x72cb28['Edit']=0x3]=_0x3d2e12(0x18e),_0x72cb28[_0x72cb28[_0x3d2e12(0x1e7)]=0x4]='Delete',_0x72cb28[_0x72cb28[_0x3d2e12(0x1b5)]=0x5]=_0x3d2e12(0x1b5),_0x72cb28[_0x72cb28[_0x3d2e12(0x1d5)]=-0x1]=_0x3d2e12(0x1d5),_0x72cb28))(_0x3e2ea8||{});const _0xb0f7b6=_0x155352=>_0x22c7fc[_0x3d2e12(0x18d)](new Date(+_0x155352))[_0x3d2e12(0x1fc)](_0x3d2e12(0x1b8)),_0x40db74=async(_0x4cea84,_0x430dce)=>{const _0x5d9e47=_0x3d2e12,_0x81c1a5=_0x4cea84[_0x5d9e47(0x1f0)](_0x22c7fc['UserManagerService']),_0x339945=_0x4cea84[_0x5d9e47(0x1f0)](_0x4ec98e[_0x5d9e47(0x1d1)]);_0x430dce['forEach'](_0x28cdea=>{const _0x262c4c=_0x5d9e47;_0x81c1a5['getUser'](_0x28cdea)&&_0x430dce[_0x262c4c(0x1d7)](_0x28cdea);}),_0x430dce['size']&&(await _0x339945[_0x5d9e47(0x1f0)]('/universer-api/user/list',{'params':{'userIDs':[..._0x430dce]}}))[_0x5d9e47(0x1ae)][_0x5d9e47(0x1c8)]['forEach'](_0x21b55a=>{const _0x2fa8cb=_0x5d9e47;_0x21b55a&&_0x81c1a5[_0x2fa8cb(0x187)](_0x21b55a);});};var _0xd011ec=Object[_0x3d2e12(0x1f5)],_0x1c0e4c=(_0x496c76,_0x26806b,_0x5d4771,_0x37865e)=>{const _0x2d2971=_0x3d2e12;for(var _0x42e407=_0x37865e>0x1?void 0x0:_0x37865e?_0xd011ec(_0x26806b,_0x5d4771):_0x26806b,_0x3c7e33=_0x496c76[_0x2d2971(0x1c3)]-0x1,_0x321fbf;_0x3c7e33>=0x0;_0x3c7e33--)(_0x321fbf=_0x496c76[_0x3c7e33])&&(_0x42e407=_0x321fbf(_0x42e407)||_0x42e407);return _0x42e407;},_0x37c6de=(_0x45da3c,_0x3443b7)=>(_0x2bba68,_0x46575b)=>_0x3443b7(_0x2bba68,_0x46575b,_0x45da3c);let _0x54f720=class extends _0x22c7fc[_0x3d2e12(0x1ff)]{constructor(_0x553255,_0x3e9403,_0x2441ed,_0xaed4f9){const _0x5cbb30=_0x3d2e12;super(),this[_0x5cbb30(0x1cd)]=_0x553255,this[_0x5cbb30(0x1d9)]=_0x3e9403,this['_userService']=_0x2441ed,this[_0x5cbb30(0x192)]=_0xaed4f9,this[_0x5cbb30(0x1fd)](),this[_0x5cbb30(0x204)]();}[_0x3d2e12(0x204)](){const _0x3064c7=_0x3d2e12;this[_0x3064c7(0x1d0)](this[_0x3064c7(0x1d9)][_0x3064c7(0x186)]['pipe'](_0x4e7339[_0x3064c7(0x1e0)](0x10))[_0x3064c7(0x1e6)](_0x5b0746=>{const _0x4bb6f3=_0x3064c7,_0x27d1f1=new Set();_0x5b0746[_0x4bb6f3(0x1c4)](_0x206bf6=>{const _0x171bae=_0x4bb6f3;switch(_0x206bf6['type']){case _0x171bae(0x190):{const _0x45efc2=_0x206bf6[_0x171bae(0x194)][_0x171bae(0x1f2)];_0x27d1f1[_0x171bae(0x190)](_0x45efc2);break;}}}),_0x40db74(this[_0x4bb6f3(0x192)],_0x27d1f1);}));}['_init'](){const _0x29d390=_0x3d2e12;this[_0x29d390(0x1d0)](this[_0x29d390(0x1cd)][_0x29d390(0x186)][_0x29d390(0x1e6)](async _0xdaf558=>{const _0x2f1118=_0x29d390;var _0x34ffac,_0x244b03,_0x2f7c1a,_0x279be7;const _0x40754d=(_0x34ffac=this[_0x2f1118(0x1d9)][_0x2f1118(0x1dc)](_0xdaf558[_0x2f1118(0x208)])['find'](_0x104b2a=>_0x104b2a[_0x2f1118(0x19b)]===_0xdaf558[_0x2f1118(0x19b)]))==null?void 0x0:_0x34ffac[_0x2f1118(0x1a9)];if(!_0x40754d)return;const {unitId:_0x1aae0b,subUnitId:_0xbf7fca}=_0x40754d;switch(_0xdaf558[_0x2f1118(0x1e4)]&&this[_0x2f1118(0x1b4)][_0x2f1118(0x187)](_0xdaf558[_0x2f1118(0x1e4)]),_0xdaf558[_0x2f1118(0x209)]){case _0x3e2ea8['Add']:break;case _0x3e2ea8[_0x2f1118(0x1ea)]:{this['_threadCommentModel'][_0x2f1118(0x1ee)](_0x1aae0b,_0xbf7fca,{'unitId':_0x1aae0b,'subUnitId':_0xbf7fca,'ref':'','id':_0xdaf558['replyId'],'dT':_0xb0f7b6(+_0xdaf558[_0x2f1118(0x191)]),'threadId':_0xdaf558[_0x2f1118(0x19b)],'personId':(_0x2f7c1a=(_0x244b03=_0xdaf558[_0x2f1118(0x1e4)])==null?void 0x0:_0x244b03[_0x2f1118(0x19a)])!=null?_0x2f7c1a:_0xdaf558[_0x2f1118(0x1a8)],'text':JSON[_0x2f1118(0x1ac)](_0xdaf558['content']),'parentId':_0x40754d['id']});break;}case _0x3e2ea8[_0x2f1118(0x1e7)]:{const _0x56b0ce=this[_0x2f1118(0x1d9)][_0x2f1118(0x1c5)](_0x1aae0b,_0xbf7fca,_0xdaf558[_0x2f1118(0x1c0)]);_0x56b0ce&&_0x56b0ce['parentId']&&this[_0x2f1118(0x1d9)][_0x2f1118(0x1c1)](_0x1aae0b,_0xbf7fca,_0xdaf558[_0x2f1118(0x1c0)]);break;}case _0x3e2ea8[_0x2f1118(0x18e)]:{this['_threadCommentModel'][_0x2f1118(0x1ec)](_0x1aae0b,_0xbf7fca,{'commentId':_0xdaf558[_0x2f1118(0x1c0)],'text':JSON[_0x2f1118(0x1ac)](_0xdaf558[_0x2f1118(0x1a4)])});break;}case _0x3e2ea8[_0x2f1118(0x1b5)]:{const _0x3c1317=(_0x279be7=this[_0x2f1118(0x1d9)][_0x2f1118(0x1dc)](_0xdaf558[_0x2f1118(0x208)])['find'](_0x293b6c=>_0x293b6c['threadId']===_0xdaf558[_0x2f1118(0x19b)]))==null?void 0x0:_0x279be7[_0x2f1118(0x1a9)];_0x3c1317&&this['_threadCommentModel']['resolveComment'](_0x1aae0b,_0xbf7fca,_0x3c1317['id'],_0xdaf558[_0x2f1118(0x1e5)]===_0x54f7d2[_0x2f1118(0x1f4)]);break;}}}));}};_0x54f720=_0x1c0e4c([_0x37c6de(0x0,_0x22c7fc['Inject'](_0x32c0b7[_0x3d2e12(0x1a3)])),_0x37c6de(0x1,_0x22c7fc[_0x3d2e12(0x1c2)](_0x5ecf49[_0x3d2e12(0x1f7)])),_0x37c6de(0x2,_0x22c7fc['Inject'](_0x22c7fc[_0x3d2e12(0x1e8)])),_0x37c6de(0x3,_0x22c7fc[_0x3d2e12(0x1c2)](_0x22c7fc[_0x3d2e12(0x1f6)]))],_0x54f720);const _0x1a8629=_0x3d2e12(0x1f8),_0x2febc9={};var _0x21edfe=Object['getOwnPropertyDescriptor'],_0x5535c6=(_0x42a6d1,_0x29966d,_0x2f7bc3,_0x1a33c3)=>{for(var _0xa5fa4=_0x1a33c3>0x1?void 0x0:_0x1a33c3?_0x21edfe(_0x29966d,_0x2f7bc3):_0x29966d,_0x377a8b=_0x42a6d1['length']-0x1,_0x5ac95a;_0x377a8b>=0x0;_0x377a8b--)(_0x5ac95a=_0x42a6d1[_0x377a8b])&&(_0xa5fa4=_0x5ac95a(_0xa5fa4)||_0xa5fa4);return _0xa5fa4;},_0x411192=(_0xde14e3,_0x3885b1)=>(_0x23abf5,_0x159632)=>_0x3885b1(_0x23abf5,_0x159632,_0xde14e3);function _0x3ba965(_0x231145,_0x46e3f6){const _0x12b351=_0x3d2e12,_0x1efa34=_0x231145[_0x12b351(0x18b)][0x0];return{..._0x46e3f6,'id':_0x1efa34[_0x12b351(0x1c0)],'resolved':_0x231145[_0x12b351(0x1e5)]===0x1,'dT':_0xb0f7b6(_0x1efa34[_0x12b351(0x191)]),'personId':_0x1efa34[_0x12b351(0x1a8)],'threadId':_0x1efa34[_0x12b351(0x19b)]};}function _0x2e992d(_0x1fbf2c,_0x92d8ba,_0x352e3d){const _0x8335f6=_0x3d2e12;var _0x183397,_0x5dcdd9;if(((_0x5dcdd9=(_0x183397=_0x1fbf2c==null?void 0x0:_0x1fbf2c[_0x8335f6(0x18b)])==null?void 0x0:_0x183397[_0x8335f6(0x1c3)])!=null?_0x5dcdd9:0x0)>0x0){const _0x2abaa3=(_0x1465d3,_0x220824)=>({'id':_0x1465d3['replyId'],'threadId':_0x1465d3[_0x8335f6(0x19b)],'dT':_0xb0f7b6(_0x1465d3[_0x8335f6(0x191)]),'personId':_0x1465d3[_0x8335f6(0x1a8)],'resolved':_0x1fbf2c[_0x8335f6(0x1e5)]===_0x54f7d2['Solved'],'unitId':_0x92d8ba,'subUnitId':_0x352e3d,'text':JSON[_0x8335f6(0x1ac)](_0x1465d3[_0x8335f6(0x1a4)]),'parentId':_0x220824}),_0x36313a=_0x2abaa3(_0x1fbf2c[_0x8335f6(0x18b)][0x0]);return{..._0x36313a,'children':_0x1fbf2c[_0x8335f6(0x18b)][_0x8335f6(0x1ce)](0x1)[_0x8335f6(0x1bb)](_0x3dcb1c=>_0x2abaa3(_0x3dcb1c,_0x36313a['id']))};}return null;}let _0x54ec02=class{constructor(_0x1c0032,_0x32483c,_0x3af658,_0x13152d){const _0x590657=_0x3d2e12;this[_0x590657(0x1a0)]=_0x1c0032,this[_0x590657(0x1b4)]=_0x32483c,this[_0x590657(0x1ba)]=_0x3af658,this['_injector']=_0x13152d;}async[_0x3d2e12(0x1ee)](_0x59efad){const _0x50f8eb=_0x3d2e12;var _0x4ca6f6,_0x230f6b;const {parentId:_0x5108ab,unitId:_0x1e18a9,text:_0x421418,threadId:_0xa2449f}=_0x59efad,_0x34001d=(_0x230f6b=(_0x4ca6f6=_0x421418[_0x50f8eb(0x1c9)])==null?void 0x0:_0x4ca6f6['filter'](_0x5bb648=>_0x5bb648[_0x50f8eb(0x197)]===_0x22c7fc['CustomRangeType'][_0x50f8eb(0x1b7)])[_0x50f8eb(0x1bb)](_0x5041c6=>_0x5041c6[_0x50f8eb(0x1e3)]))!=null?_0x230f6b:[],_0x4d8540=JSON[_0x50f8eb(0x1db)](_0x421418),_0x5a8297=(await this[_0x50f8eb(0x1ba)]['requireSession'](_0x1e18a9))[_0x50f8eb(0x198)]();if(_0x5108ab){const _0x220631={'memberId':_0x5a8297,'unitId':_0x1e18a9,'content':_0x4d8540,'mention':_0x34001d,'threadId':_0xa2449f},_0x1095f8=(await this[_0x50f8eb(0x1a0)][_0x50f8eb(0x193)](_0x50f8eb(0x1d3)+_0x1e18a9+_0x50f8eb(0x19e),{'body':_0x220631}))[_0x50f8eb(0x1ae)]['reply'];return{..._0x59efad,'id':_0x1095f8[_0x50f8eb(0x1c0)],'dT':_0x22c7fc[_0x50f8eb(0x18d)](+_0x1095f8['createTimestamp'])[_0x50f8eb(0x1fc)](_0x50f8eb(0x1b8)),'personId':_0x1095f8['userId']};}else{const _0x1a1528={'memberId':_0x5a8297,'unitId':_0x1e18a9,'content':_0x4d8540,'mention':_0x34001d},_0x4ac132=await this['_httpService'][_0x50f8eb(0x193)]('/universer-api/comment/unit/'+_0x1e18a9+_0x50f8eb(0x1a5),{'body':_0x1a1528});return _0x3ba965(_0x4ac132[_0x50f8eb(0x1ae)][_0x50f8eb(0x1aa)],_0x59efad);}}async[_0x3d2e12(0x1ec)](_0x587fea){const _0x390f8d=_0x3d2e12;var _0x346486,_0x4cebcd;const {text:_0x1eee9d,unitId:_0x23da7e}=_0x587fea,_0x360248=(_0x4cebcd=(_0x346486=_0x1eee9d[_0x390f8d(0x1c9)])==null?void 0x0:_0x346486[_0x390f8d(0x1d4)](_0x7f61e=>_0x7f61e['rangeType']===_0x22c7fc[_0x390f8d(0x1da)]['COMMENT'])['map'](_0x81b12b=>_0x81b12b[_0x390f8d(0x1e3)]))!=null?_0x4cebcd:[],_0x30d954=JSON[_0x390f8d(0x1db)](_0x1eee9d),_0x53cbe6=_0x587fea[_0x390f8d(0x19b)],_0x539260=_0x587fea['id'],_0x5d62e7={'memberId':(await this[_0x390f8d(0x1ba)][_0x390f8d(0x207)](_0x23da7e))[_0x390f8d(0x198)](),'unitId':_0x23da7e,'threadId':_0x53cbe6,'mention':_0x360248,'content':_0x30d954,'replyId':_0x539260},_0x14ac0c=await this[_0x390f8d(0x1a0)][_0x390f8d(0x193)]('/universer-api/comment/unit/'+_0x23da7e+_0x390f8d(0x199),{'body':_0x5d62e7});return!_0x14ac0c[_0x390f8d(0x1ae)][_0x390f8d(0x1c7)]||_0x14ac0c['body']['error'][_0x390f8d(0x1ed)]===0x1;}async['resolveComment'](_0x57c55e){const _0x345699=_0x3d2e12,{unitId:_0x22894e}=_0x57c55e,_0x115430=_0x57c55e[_0x345699(0x19b)],_0xcf782f={'memberId':this['_userService'][_0x345699(0x1b3)]()['userID'],'unitId':_0x22894e,'threadId':_0x115430,'solved':_0x57c55e[_0x345699(0x202)]?_0x54f7d2['Solved']:_0x54f7d2[_0x345699(0x1a7)]},_0x3c9e44=await this['_httpService'][_0x345699(0x193)]('/universer-api/comment/unit/'+_0x22894e+_0x345699(0x1eb),{'body':_0xcf782f});return!_0x3c9e44[_0x345699(0x1ae)][_0x345699(0x1c7)]||_0x3c9e44[_0x345699(0x1ae)][_0x345699(0x1c7)][_0x345699(0x1ed)]===0x1;}async[_0x3d2e12(0x1c1)](_0x76a791,_0x344be9,_0x286ad3,_0xbbf246){const _0x40d122=_0x3d2e12,_0x171f06={'memberId':(await this[_0x40d122(0x1ba)][_0x40d122(0x207)](_0x76a791))[_0x40d122(0x198)](),'threadId':_0x286ad3,'replyId':_0xbbf246,'unitId':_0x76a791},_0x6d3f82=await this['_httpService'][_0x40d122(0x193)](_0x40d122(0x1d3)+_0x76a791+_0x40d122(0x1b9),{'body':_0x171f06});return!_0x6d3f82['body']['error']||_0x6d3f82[_0x40d122(0x1ae)][_0x40d122(0x1c7)][_0x40d122(0x1ed)]===0x1;}async['listComments'](_0x4dc7e7,_0x5836b0,_0x4bbe05){const _0x3a6768=_0x3d2e12,_0x423243={'unitId':_0x4dc7e7,'threadId':_0x4bbe05},_0x55838f=await this['_httpService'][_0x3a6768(0x193)](_0x3a6768(0x1d3)+_0x4dc7e7+_0x3a6768(0x1de),{'body':_0x423243}),_0xcae242=_0x4bbe05['map'](_0x11de5e=>_0x2e992d(_0x55838f[_0x3a6768(0x1ae)][_0x3a6768(0x205)][_0x11de5e],_0x4dc7e7,_0x5836b0))[_0x3a6768(0x1d4)](Boolean);return Object[_0x3a6768(0x1ef)](_0x55838f['body'][_0x3a6768(0x1c8)])[_0x3a6768(0x1c4)](_0x2adf6a=>{const _0x48e6a5=_0x3a6768;this[_0x48e6a5(0x1b4)][_0x48e6a5(0x187)](_0x2adf6a);}),_0xcae242;}['saveCommentToSnapshot'](_0x3a404b){const _0x18dd35=_0x3d2e12;return{'id':_0x3a404b['id'],'threadId':_0x3a404b[_0x18dd35(0x19b)],'ref':_0x3a404b[_0x18dd35(0x20b)]};}};_0x54ec02=_0x5535c6([_0x411192(0x0,_0x22c7fc[_0x3d2e12(0x1c2)](_0x4ec98e[_0x3d2e12(0x1d1)])),_0x411192(0x1,_0x22c7fc['Inject'](_0x22c7fc[_0x3d2e12(0x1e8)])),_0x411192(0x2,_0x22c7fc[_0x3d2e12(0x1c2)](_0x32c0b7['CollaborationSessionService'])),_0x411192(0x3,_0x22c7fc[_0x3d2e12(0x1c2)](_0x22c7fc[_0x3d2e12(0x1f6)]))],_0x54ec02);var _0x450704=Object[_0x3d2e12(0x1f5)],_0x31b63e=(_0x177251,_0x35fef4,_0x1fa207,_0x4ab15d)=>{for(var _0x571fe6=_0x4ab15d>0x1?void 0x0:_0x4ab15d?_0x450704(_0x35fef4,_0x1fa207):_0x35fef4,_0x2e7f55=_0x177251['length']-0x1,_0x461b5c;_0x2e7f55>=0x0;_0x2e7f55--)(_0x461b5c=_0x177251[_0x2e7f55])&&(_0x571fe6=_0x461b5c(_0x571fe6)||_0x571fe6);return _0x571fe6;},_0x3193ad=(_0x26fcd2,_0x16bddc)=>(_0xf1651d,_0x4971f3)=>_0x16bddc(_0xf1651d,_0x4971f3,_0x26fcd2);let _0x5b5926=class extends _0x22c7fc[_0x3d2e12(0x1ff)]{constructor(_0x25c1ef,_0x55072a){const _0x3119f9=_0x3d2e12;super(),this[_0x3119f9(0x189)]=_0x25c1ef,this[_0x3119f9(0x188)]=_0x55072a,this['_initDataSource']();}['_initDataSource'](){const _0x2ed1aa=_0x3d2e12;this[_0x2ed1aa(0x189)][_0x2ed1aa(0x1cc)]=this['_threadCommentDataSource'],this[_0x2ed1aa(0x189)][_0x2ed1aa(0x1ad)]=!0x1;}};_0x5b5926=_0x31b63e([_0x3193ad(0x0,_0x5ecf49[_0x3d2e12(0x1fb)]),_0x3193ad(0x1,_0x22c7fc[_0x3d2e12(0x1c2)](_0x54ec02))],_0x5b5926);var _0x4c4ade=Object[_0x3d2e12(0x1d8)],_0xa741f5=Object[_0x3d2e12(0x1f5)],_0x38a5ae=(_0x336f01,_0x2a4066,_0x5492f3)=>_0x2a4066 in _0x336f01?_0x4c4ade(_0x336f01,_0x2a4066,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5492f3}):_0x336f01[_0x2a4066]=_0x5492f3,_0x3da4d0=(_0x56bdc0,_0x1bc516,_0xaf74ad,_0x6340fd)=>{const _0x3857f0=_0x3d2e12;for(var _0x571b65=_0x6340fd>0x1?void 0x0:_0x6340fd?_0xa741f5(_0x1bc516,_0xaf74ad):_0x1bc516,_0x5618bf=_0x56bdc0[_0x3857f0(0x1c3)]-0x1,_0x3bff84;_0x5618bf>=0x0;_0x5618bf--)(_0x3bff84=_0x56bdc0[_0x5618bf])&&(_0x571b65=_0x3bff84(_0x571b65)||_0x571b65);return _0x571b65;},_0x5a17ea=(_0x128078,_0x4663c0)=>(_0x2af8b3,_0x3524b9)=>_0x4663c0(_0x2af8b3,_0x3524b9,_0x128078),_0x5adf38=(_0x5c6d7b,_0x3568ca,_0x51a28c)=>_0x38a5ae(_0x5c6d7b,typeof _0x3568ca!=_0x3d2e12(0x201)?_0x3568ca+'':_0x3568ca,_0x51a28c);_0x44af1f['UniverThreadCommentDataSourcePlugin']=class extends _0x22c7fc[_0x3d2e12(0x18c)]{constructor(_0x411331=_0x2febc9,_0x354b39,_0xb3f2fa){const _0x2a1c10=_0x3d2e12;super(),this[_0x2a1c10(0x196)]=_0x411331,this[_0x2a1c10(0x192)]=_0x354b39,this['_configService']=_0xb3f2fa;const {..._0x143405}=_0x22c7fc['merge']({},_0x2febc9,this[_0x2a1c10(0x196)]);this[_0x2a1c10(0x19d)]['setConfig'](_0x1a8629,_0x143405);}[_0x3d2e12(0x1a1)](){const _0x15b0ad=_0x3d2e12;[[_0x54ec02],[_0x5b5926],[_0x54f720]][_0x15b0ad(0x1c4)](_0x5e01f3=>{const _0xaf3056=_0x15b0ad;this[_0xaf3056(0x192)]['add'](_0x5e01f3);});}['onReady'](){const _0x467ecb=_0x3d2e12;this[_0x467ecb(0x192)][_0x467ecb(0x1f0)](_0x5b5926),this['_injector'][_0x467ecb(0x1f0)](_0x54f720);}},_0x5adf38(_0x44af1f[_0x3d2e12(0x1d6)],'pluginName',_0x47384a),_0x5adf38(_0x44af1f['UniverThreadCommentDataSourcePlugin'],_0x3d2e12(0x209),_0x22c7fc[_0x3d2e12(0x1bf)][_0x3d2e12(0x1ca)]),_0x44af1f[_0x3d2e12(0x1d6)]=_0x3da4d0([_0x22c7fc[_0x3d2e12(0x19f)](_0x135374[_0x3d2e12(0x1ab)],_0x32c0b7['UniverCollaborationClientPlugin'],_0x43cd45['UniverLicensePlugin']),_0x5a17ea(0x1,_0x22c7fc[_0x3d2e12(0x1c2)](_0x22c7fc[_0x3d2e12(0x1f6)])),_0x5a17ea(0x2,_0x22c7fc[_0x3d2e12(0x195)])],_0x44af1f['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x44af1f,Symbol[_0x3d2e12(0x1cf)],{'value':_0x3d2e12(0x1d2)});}));
1
+ function _0x5c2a(_0x19a6ae,_0x5c71cb){const _0x549ba8=_0x549b();return _0x5c2a=function(_0x5c2a83,_0x57d9c0){_0x5c2a83=_0x5c2a83-0x1e9;let _0x4e035a=_0x549ba8[_0x5c2a83];return _0x4e035a;},_0x5c2a(_0x19a6ae,_0x5c71cb);}(function(_0x32d4c2,_0x31dd43){const _0x159e11=_0x5c2a,_0x19d29d=_0x32d4c2();while(!![]){try{const _0x468824=parseInt(_0x159e11(0x264))/0x1*(-parseInt(_0x159e11(0x22a))/0x2)+parseInt(_0x159e11(0x252))/0x3*(parseInt(_0x159e11(0x235))/0x4)+-parseInt(_0x159e11(0x1ea))/0x5*(parseInt(_0x159e11(0x1f6))/0x6)+parseInt(_0x159e11(0x1f9))/0x7*(parseInt(_0x159e11(0x20e))/0x8)+-parseInt(_0x159e11(0x236))/0x9*(parseInt(_0x159e11(0x1f0))/0xa)+parseInt(_0x159e11(0x26b))/0xb*(parseInt(_0x159e11(0x229))/0xc)+parseInt(_0x159e11(0x24b))/0xd*(parseInt(_0x159e11(0x231))/0xe);if(_0x468824===_0x31dd43)break;else _0x19d29d['push'](_0x19d29d['shift']());}catch(_0x12f06c){_0x19d29d['push'](_0x19d29d['shift']());}}}(_0x549b,0xd676d),function(_0x128ed0,_0x509d68){const _0x494867=_0x5c2a;typeof exports==_0x494867(0x222)&&typeof module<'u'?_0x509d68(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x494867(0x230)&&define[_0x494867(0x1fa)]?define([_0x494867(0x261),_0x494867(0x24d),'@univerjs-pro/license',_0x494867(0x20b),_0x494867(0x22d),_0x494867(0x20a),_0x494867(0x218),_0x494867(0x246)],_0x509d68):(_0x128ed0=typeof globalThis<'u'?globalThis:_0x128ed0||self,_0x509d68(_0x128ed0[_0x494867(0x1ec)]={},_0x128ed0['UniverProCollaborationClient'],_0x128ed0['UniverProLicense'],_0x128ed0[_0x494867(0x26f)],_0x128ed0[_0x494867(0x233)],_0x128ed0[_0x494867(0x25a)],_0x128ed0[_0x494867(0x218)],_0x128ed0[_0x494867(0x216)]));}(this,function(_0x1d62b6,_0x92ed58,_0x1ff71c,_0x29f4a9,_0x351f90,_0x572169,_0x358b88,_0x504172){'use strict';const _0x2181ea=_0x5c2a;const _0x5802bb=_0x2181ea(0x258);var _0x4eba9b=(_0x24f219=>(_0x24f219[_0x24f219['OpenOrReOpen']=0x0]=_0x2181ea(0x247),_0x24f219[_0x24f219[_0x2181ea(0x23e)]=0x1]=_0x2181ea(0x23e),_0x24f219[_0x24f219[_0x2181ea(0x1fd)]=-0x1]=_0x2181ea(0x1fd),_0x24f219))(_0x4eba9b||{}),_0x1cedac=(_0x2ad95e=>(_0x2ad95e[_0x2ad95e[_0x2181ea(0x243)]=0x0]=_0x2181ea(0x243),_0x2ad95e[_0x2ad95e['Add']=0x1]=_0x2181ea(0x267),_0x2ad95e[_0x2ad95e[_0x2181ea(0x253)]=0x2]=_0x2181ea(0x253),_0x2ad95e[_0x2ad95e[_0x2181ea(0x21a)]=0x3]=_0x2181ea(0x21a),_0x2ad95e[_0x2ad95e[_0x2181ea(0x241)]=0x4]=_0x2181ea(0x241),_0x2ad95e[_0x2ad95e['Solve']=0x5]=_0x2181ea(0x232),_0x2ad95e[_0x2ad95e['UNRECOGNIZED']=-0x1]=_0x2181ea(0x1fd),_0x2ad95e))(_0x1cedac||{});const _0x94ca74=_0x49658f=>_0x29f4a9[_0x2181ea(0x250)](new Date(+_0x49658f))[_0x2181ea(0x255)](_0x2181ea(0x256)),_0x22260a=async(_0x29b179,_0x470679)=>{const _0x42f388=_0x2181ea,_0x58698c=_0x29b179[_0x42f388(0x217)](_0x29f4a9['UserManagerService']),_0x4f24cb=_0x29b179[_0x42f388(0x217)](_0x504172['HTTPService']);_0x470679[_0x42f388(0x21b)](_0x5e33ac=>{const _0x63e98b=_0x42f388;_0x58698c[_0x63e98b(0x209)](_0x5e33ac)&&_0x470679[_0x63e98b(0x1fb)](_0x5e33ac);}),_0x470679[_0x42f388(0x20f)]&&(await _0x4f24cb[_0x42f388(0x217)](_0x42f388(0x238),{'params':{'userIDs':[..._0x470679]}}))[_0x42f388(0x1f5)][_0x42f388(0x210)]['forEach'](_0x1ef3a0=>{const _0x465293=_0x42f388;_0x1ef3a0&&_0x58698c[_0x465293(0x251)](_0x1ef3a0);});};var _0xa199d1=Object[_0x2181ea(0x237)],_0x417a9f=(_0x19811a,_0x2c76bd,_0x2b59fd,_0x442595)=>{const _0xbd4cc2=_0x2181ea;for(var _0xb3e3b8=_0x442595>0x1?void 0x0:_0x442595?_0xa199d1(_0x2c76bd,_0x2b59fd):_0x2c76bd,_0x7c2fe2=_0x19811a[_0xbd4cc2(0x1fe)]-0x1,_0x13bc50;_0x7c2fe2>=0x0;_0x7c2fe2--)(_0x13bc50=_0x19811a[_0x7c2fe2])&&(_0xb3e3b8=_0x13bc50(_0xb3e3b8)||_0xb3e3b8);return _0xb3e3b8;},_0x33df37=(_0x899cc3,_0x2d5347)=>(_0x3b1d9b,_0x521f98)=>_0x2d5347(_0x3b1d9b,_0x521f98,_0x899cc3);let _0x38bae6=class extends _0x29f4a9[_0x2181ea(0x21c)]{constructor(_0x52f176,_0x15033c,_0x237f76,_0x1fdd7f){const _0x1bb706=_0x2181ea;super(),this[_0x1bb706(0x1f1)]=_0x52f176,this[_0x1bb706(0x23a)]=_0x15033c,this[_0x1bb706(0x21d)]=_0x237f76,this[_0x1bb706(0x221)]=_0x1fdd7f,this[_0x1bb706(0x201)](),this[_0x1bb706(0x25d)]();}[_0x2181ea(0x25d)](){const _0x47268f=_0x2181ea;this[_0x47268f(0x224)](this[_0x47268f(0x23a)]['commentUpdate$'][_0x47268f(0x244)](_0x358b88[_0x47268f(0x257)](0x10))[_0x47268f(0x259)](_0x688417=>{const _0x5b7746=_0x47268f,_0x5ffede=new Set();_0x688417[_0x5b7746(0x21b)](_0x4e917d=>{const _0x17bd38=_0x5b7746;switch(_0x4e917d['type']){case _0x17bd38(0x223):{const _0x10971b=_0x4e917d[_0x17bd38(0x21e)][_0x17bd38(0x26c)];_0x5ffede[_0x17bd38(0x223)](_0x10971b);break;}}}),_0x22260a(this[_0x5b7746(0x221)],_0x5ffede);}));}[_0x2181ea(0x201)](){const _0x5b1385=_0x2181ea;this['disposeWithMe'](this[_0x5b1385(0x1f1)][_0x5b1385(0x266)][_0x5b1385(0x259)](async _0x1fb90d=>{const _0x59da79=_0x5b1385;var _0x33fc15,_0x4ba6fe,_0x48c111,_0x1b3853;const _0x12f5ba=(_0x33fc15=this[_0x59da79(0x23a)]['getUnit'](_0x1fb90d[_0x59da79(0x228)])[_0x59da79(0x225)](_0x4d28d3=>_0x4d28d3[_0x59da79(0x1fc)]===_0x1fb90d[_0x59da79(0x1fc)]))==null?void 0x0:_0x33fc15[_0x59da79(0x20c)];if(!_0x12f5ba)return;const {unitId:_0x42a6da,subUnitId:_0x360932}=_0x12f5ba;switch(_0x1fb90d['user']&&this['_userService'][_0x59da79(0x251)](_0x1fb90d[_0x59da79(0x248)]),_0x1fb90d[_0x59da79(0x204)]){case _0x1cedac[_0x59da79(0x267)]:break;case _0x1cedac[_0x59da79(0x253)]:{this[_0x59da79(0x23a)]['addComment'](_0x42a6da,_0x360932,{'unitId':_0x42a6da,'subUnitId':_0x360932,'ref':'','id':_0x1fb90d[_0x59da79(0x1f3)],'dT':_0x94ca74(+_0x1fb90d[_0x59da79(0x242)]),'threadId':_0x1fb90d[_0x59da79(0x1fc)],'personId':(_0x48c111=(_0x4ba6fe=_0x1fb90d['user'])==null?void 0x0:_0x4ba6fe[_0x59da79(0x265)])!=null?_0x48c111:_0x1fb90d[_0x59da79(0x1f4)],'text':JSON[_0x59da79(0x254)](_0x1fb90d[_0x59da79(0x26e)]),'parentId':_0x12f5ba['id']});break;}case _0x1cedac[_0x59da79(0x241)]:{const _0x1c0571=this[_0x59da79(0x23a)][_0x59da79(0x1ee)](_0x42a6da,_0x360932,_0x1fb90d['replyId']);_0x1c0571&&_0x1c0571[_0x59da79(0x227)]&&this[_0x59da79(0x23a)][_0x59da79(0x1f7)](_0x42a6da,_0x360932,_0x1fb90d[_0x59da79(0x1f3)]);break;}case _0x1cedac[_0x59da79(0x21a)]:{this[_0x59da79(0x23a)][_0x59da79(0x208)](_0x42a6da,_0x360932,{'commentId':_0x1fb90d['replyId'],'text':JSON['parse'](_0x1fb90d[_0x59da79(0x26e)])});break;}case _0x1cedac[_0x59da79(0x232)]:{const _0x37d329=(_0x1b3853=this['_threadCommentModel'][_0x59da79(0x25b)](_0x1fb90d[_0x59da79(0x228)])[_0x59da79(0x225)](_0x5286d5=>_0x5286d5[_0x59da79(0x1fc)]===_0x1fb90d[_0x59da79(0x1fc)]))==null?void 0x0:_0x1b3853['root'];_0x37d329&&this[_0x59da79(0x23a)][_0x59da79(0x211)](_0x42a6da,_0x360932,_0x37d329['id'],_0x1fb90d[_0x59da79(0x239)]===_0x4eba9b[_0x59da79(0x23e)]);break;}}}));}};_0x38bae6=_0x417a9f([_0x33df37(0x0,_0x29f4a9['Inject'](_0x92ed58[_0x2181ea(0x203)])),_0x33df37(0x1,_0x29f4a9[_0x2181ea(0x249)](_0x572169[_0x2181ea(0x1e9)])),_0x33df37(0x2,_0x29f4a9[_0x2181ea(0x249)](_0x29f4a9['UserManagerService'])),_0x33df37(0x3,_0x29f4a9[_0x2181ea(0x249)](_0x29f4a9[_0x2181ea(0x21f)]))],_0x38bae6);const _0x5de7e5='thread-comment-data-source.config',_0x2d364e={};var _0x4de006=Object['getOwnPropertyDescriptor'],_0x5e8d77=(_0x5700fc,_0x28f6dc,_0x35a64f,_0x21ae9e)=>{const _0x4069e9=_0x2181ea;for(var _0x5aab52=_0x21ae9e>0x1?void 0x0:_0x21ae9e?_0x4de006(_0x28f6dc,_0x35a64f):_0x28f6dc,_0x47db0f=_0x5700fc[_0x4069e9(0x1fe)]-0x1,_0x38bff5;_0x47db0f>=0x0;_0x47db0f--)(_0x38bff5=_0x5700fc[_0x47db0f])&&(_0x5aab52=_0x38bff5(_0x5aab52)||_0x5aab52);return _0x5aab52;},_0xf11922=(_0x145db5,_0x5a06a3)=>(_0x262780,_0x46ce68)=>_0x5a06a3(_0x262780,_0x46ce68,_0x145db5);function _0x5ec51e(_0x4b2f02,_0x26839e){const _0x26b1ae=_0x2181ea,_0x55f513=_0x4b2f02[_0x26b1ae(0x24a)][0x0];return{..._0x26839e,'id':_0x55f513[_0x26b1ae(0x1f3)],'resolved':_0x4b2f02[_0x26b1ae(0x239)]===0x1,'dT':_0x94ca74(_0x55f513['createTimestamp']),'personId':_0x55f513[_0x26b1ae(0x1f4)],'threadId':_0x55f513[_0x26b1ae(0x1fc)]};}function _0x4202ff(_0x275bee,_0x4f3085,_0x17c82a){const _0x583550=_0x2181ea;var _0xa56cad,_0x53990c;if(((_0x53990c=(_0xa56cad=_0x275bee==null?void 0x0:_0x275bee['replies'])==null?void 0x0:_0xa56cad[_0x583550(0x1fe)])!=null?_0x53990c:0x0)>0x0){const _0x29ae31=(_0x166ec2,_0x5d9071)=>({'id':_0x166ec2[_0x583550(0x1f3)],'threadId':_0x166ec2[_0x583550(0x1fc)],'dT':_0x94ca74(_0x166ec2[_0x583550(0x242)]),'personId':_0x166ec2[_0x583550(0x1f4)],'resolved':_0x275bee['solved']===_0x4eba9b['Solved'],'unitId':_0x4f3085,'subUnitId':_0x17c82a,'text':JSON[_0x583550(0x254)](_0x166ec2[_0x583550(0x26e)]),'parentId':_0x5d9071}),_0x1b0763=_0x29ae31(_0x275bee[_0x583550(0x24a)][0x0]);return{..._0x1b0763,'children':_0x275bee['replies'][_0x583550(0x234)](0x1)['map'](_0x537efa=>_0x29ae31(_0x537efa,_0x1b0763['id']))};}return null;}let _0x2bea4f=class{constructor(_0x4029b2,_0x2b94b6,_0x360fd3,_0x54c87b){const _0x2050a8=_0x2181ea;this['_httpService']=_0x4029b2,this['_userService']=_0x2b94b6,this[_0x2050a8(0x274)]=_0x360fd3,this[_0x2050a8(0x221)]=_0x54c87b;}async[_0x2181ea(0x214)](_0x2a3c22){const _0xa5e2e7=_0x2181ea;var _0x10e309,_0x3a3714;const {parentId:_0x1c4d6a,unitId:_0x2da87d,text:_0x18da47,threadId:_0x2d63a3}=_0x2a3c22,_0x472936=(_0x3a3714=(_0x10e309=_0x18da47[_0xa5e2e7(0x25f)])==null?void 0x0:_0x10e309[_0xa5e2e7(0x1f2)](_0xf2e544=>_0xf2e544['rangeType']===_0x29f4a9[_0xa5e2e7(0x23f)][_0xa5e2e7(0x1ed)])[_0xa5e2e7(0x268)](_0x33c05b=>_0x33c05b['rangeId']))!=null?_0x3a3714:[],_0x441065=JSON[_0xa5e2e7(0x262)](_0x18da47),_0x2426e2=(await this[_0xa5e2e7(0x274)]['requireSession'](_0x2da87d))['getMemberID']();if(_0x1c4d6a){const _0x36b527={'memberId':_0x2426e2,'unitId':_0x2da87d,'content':_0x441065,'mention':_0x472936,'threadId':_0x2d63a3},_0x527ccd=(await this[_0xa5e2e7(0x24c)][_0xa5e2e7(0x22c)](_0xa5e2e7(0x220)+_0x2da87d+_0xa5e2e7(0x22f),{'body':_0x36b527}))['body']['reply'];return{..._0x2a3c22,'id':_0x527ccd[_0xa5e2e7(0x1f3)],'dT':_0x29f4a9[_0xa5e2e7(0x250)](+_0x527ccd[_0xa5e2e7(0x242)])[_0xa5e2e7(0x255)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x527ccd['userId']};}else{const _0x2c3633={'memberId':_0x2426e2,'unitId':_0x2da87d,'content':_0x441065,'mention':_0x472936},_0xc26a=await this[_0xa5e2e7(0x24c)]['post'](_0xa5e2e7(0x220)+_0x2da87d+_0xa5e2e7(0x269),{'body':_0x2c3633});return _0x5ec51e(_0xc26a['body'][_0xa5e2e7(0x24f)],_0x2a3c22);}}async[_0x2181ea(0x208)](_0x321931){const _0x55e558=_0x2181ea;var _0x328b79,_0x4b9a74;const {text:_0x50276d,unitId:_0x5b618c}=_0x321931,_0x4aee5b=(_0x4b9a74=(_0x328b79=_0x50276d[_0x55e558(0x25f)])==null?void 0x0:_0x328b79[_0x55e558(0x1f2)](_0x214c36=>_0x214c36[_0x55e558(0x202)]===_0x29f4a9[_0x55e558(0x23f)][_0x55e558(0x1ed)])[_0x55e558(0x268)](_0x65f945=>_0x65f945[_0x55e558(0x270)]))!=null?_0x4b9a74:[],_0x549ba5=JSON['stringify'](_0x50276d),_0x3c1d6f=_0x321931['threadId'],_0x2e57a2=_0x321931['id'],_0x421748={'memberId':(await this[_0x55e558(0x274)][_0x55e558(0x1f8)](_0x5b618c))[_0x55e558(0x213)](),'unitId':_0x5b618c,'threadId':_0x3c1d6f,'mention':_0x4aee5b,'content':_0x549ba5,'replyId':_0x2e57a2},_0x4fc6dd=await this[_0x55e558(0x24c)]['post'](_0x55e558(0x220)+_0x5b618c+_0x55e558(0x207),{'body':_0x421748});return!_0x4fc6dd[_0x55e558(0x1f5)][_0x55e558(0x272)]||_0x4fc6dd[_0x55e558(0x1f5)]['error']['code']===0x1;}async[_0x2181ea(0x211)](_0x460dae){const _0x36e2bd=_0x2181ea,{unitId:_0x506021}=_0x460dae,_0x3ea2fb=_0x460dae[_0x36e2bd(0x1fc)],_0x27ab46={'memberId':this[_0x36e2bd(0x21d)]['getCurrentUser']()[_0x36e2bd(0x265)],'unitId':_0x506021,'threadId':_0x3ea2fb,'solved':_0x460dae[_0x36e2bd(0x1ef)]?_0x4eba9b['Solved']:_0x4eba9b[_0x36e2bd(0x247)]},_0x419fd9=await this[_0x36e2bd(0x24c)][_0x36e2bd(0x22c)](_0x36e2bd(0x220)+_0x506021+'/solved',{'body':_0x27ab46});return!_0x419fd9['body'][_0x36e2bd(0x272)]||_0x419fd9[_0x36e2bd(0x1f5)][_0x36e2bd(0x272)][_0x36e2bd(0x205)]===0x1;}async['deleteComment'](_0x4ab337,_0x3be897,_0x5d81cf,_0x43bc5b){const _0x188334=_0x2181ea,_0x2dc15a={'memberId':(await this[_0x188334(0x274)]['requireSession'](_0x4ab337))['getMemberID'](),'threadId':_0x5d81cf,'replyId':_0x43bc5b,'unitId':_0x4ab337},_0x637c30=await this[_0x188334(0x24c)]['post'](_0x188334(0x220)+_0x4ab337+_0x188334(0x260),{'body':_0x2dc15a});return!_0x637c30[_0x188334(0x1f5)][_0x188334(0x272)]||_0x637c30[_0x188334(0x1f5)]['error'][_0x188334(0x205)]===0x1;}async[_0x2181ea(0x219)](_0x368f8b,_0x5db104,_0x4ffc71){const _0x2bb9c7=_0x2181ea,_0x50fb8d={'unitId':_0x368f8b,'threadId':_0x4ffc71},_0x3a8283=await this[_0x2bb9c7(0x24c)][_0x2bb9c7(0x22c)]('/universer-api/comment/unit/'+_0x368f8b+'/list',{'body':_0x50fb8d}),_0x21295b=_0x4ffc71[_0x2bb9c7(0x268)](_0x1f6cab=>_0x4202ff(_0x3a8283['body']['comments'][_0x1f6cab],_0x368f8b,_0x5db104))[_0x2bb9c7(0x1f2)](Boolean);return Object[_0x2bb9c7(0x25c)](_0x3a8283[_0x2bb9c7(0x1f5)][_0x2bb9c7(0x210)])['forEach'](_0x4645ba=>{const _0x341d63=_0x2bb9c7;this[_0x341d63(0x21d)][_0x341d63(0x251)](_0x4645ba);}),_0x21295b;}['saveCommentToSnapshot'](_0x1f2bcf){const _0x1572a5=_0x2181ea;return{'id':_0x1f2bcf['id'],'threadId':_0x1f2bcf['threadId'],'ref':_0x1f2bcf[_0x1572a5(0x26a)]};}};_0x2bea4f=_0x5e8d77([_0xf11922(0x0,_0x29f4a9[_0x2181ea(0x249)](_0x504172[_0x2181ea(0x25e)])),_0xf11922(0x1,_0x29f4a9[_0x2181ea(0x249)](_0x29f4a9['UserManagerService'])),_0xf11922(0x2,_0x29f4a9[_0x2181ea(0x249)](_0x92ed58[_0x2181ea(0x271)])),_0xf11922(0x3,_0x29f4a9[_0x2181ea(0x249)](_0x29f4a9[_0x2181ea(0x21f)]))],_0x2bea4f);var _0x3ad209=Object[_0x2181ea(0x237)],_0x41e847=(_0x50c805,_0x1addaa,_0x50316d,_0x18a259)=>{for(var _0x360b50=_0x18a259>0x1?void 0x0:_0x18a259?_0x3ad209(_0x1addaa,_0x50316d):_0x1addaa,_0x503075=_0x50c805['length']-0x1,_0x4cc08e;_0x503075>=0x0;_0x503075--)(_0x4cc08e=_0x50c805[_0x503075])&&(_0x360b50=_0x4cc08e(_0x360b50)||_0x360b50);return _0x360b50;},_0x53a623=(_0x28920d,_0x48617a)=>(_0x1dc37a,_0x8709d)=>_0x48617a(_0x1dc37a,_0x8709d,_0x28920d);let _0xca5961=class extends _0x29f4a9['Disposable']{constructor(_0x2656d3,_0x106316){const _0x3933ab=_0x2181ea;super(),this['_threadCommentDataSourceService']=_0x2656d3,this[_0x3933ab(0x26d)]=_0x106316,this[_0x3933ab(0x215)]();}[_0x2181ea(0x215)](){const _0x91b79a=_0x2181ea;this[_0x91b79a(0x245)]['dataSource']=this[_0x91b79a(0x26d)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0xca5961=_0x41e847([_0x53a623(0x0,_0x572169[_0x2181ea(0x263)]),_0x53a623(0x1,_0x29f4a9[_0x2181ea(0x249)](_0x2bea4f))],_0xca5961);var _0xdb0ca6=Object[_0x2181ea(0x1ff)],_0x4e93b3=Object[_0x2181ea(0x237)],_0x19f388=(_0x5c95cc,_0x1e1784,_0x549b21)=>_0x1e1784 in _0x5c95cc?_0xdb0ca6(_0x5c95cc,_0x1e1784,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x549b21}):_0x5c95cc[_0x1e1784]=_0x549b21,_0x3acc60=(_0xb4e647,_0xf6971,_0x23ca6f,_0x594ae5)=>{const _0x36f55c=_0x2181ea;for(var _0x5d6332=_0x594ae5>0x1?void 0x0:_0x594ae5?_0x4e93b3(_0xf6971,_0x23ca6f):_0xf6971,_0x439c34=_0xb4e647[_0x36f55c(0x1fe)]-0x1,_0x3f7ab8;_0x439c34>=0x0;_0x439c34--)(_0x3f7ab8=_0xb4e647[_0x439c34])&&(_0x5d6332=_0x3f7ab8(_0x5d6332)||_0x5d6332);return _0x5d6332;},_0x2ef9bd=(_0x21e5a9,_0x2ee03e)=>(_0x2fd1af,_0x186f4c)=>_0x2ee03e(_0x2fd1af,_0x186f4c,_0x21e5a9),_0x4d8a04=(_0x3768e6,_0x3245e0,_0x31d63f)=>_0x19f388(_0x3768e6,typeof _0x3245e0!='symbol'?_0x3245e0+'':_0x3245e0,_0x31d63f);_0x1d62b6[_0x2181ea(0x206)]=class extends _0x29f4a9[_0x2181ea(0x23c)]{constructor(_0x27594a=_0x2d364e,_0x5d67b8,_0x585a6e){const _0x2fc2ce=_0x2181ea;super(),this[_0x2fc2ce(0x24e)]=_0x27594a,this[_0x2fc2ce(0x221)]=_0x5d67b8,this[_0x2fc2ce(0x23b)]=_0x585a6e;const {..._0xbc2e85}=_0x29f4a9['merge']({},_0x2d364e,this[_0x2fc2ce(0x24e)]);this[_0x2fc2ce(0x23b)][_0x2fc2ce(0x226)](_0x5de7e5,_0xbc2e85);}['onStarting'](){const _0x3acbba=_0x2181ea;[[_0x2bea4f],[_0xca5961],[_0x38bae6]][_0x3acbba(0x21b)](_0x5a88b7=>{const _0x12253a=_0x3acbba;this[_0x12253a(0x221)][_0x12253a(0x223)](_0x5a88b7);});}['onReady'](){const _0x35c24f=_0x2181ea;this[_0x35c24f(0x221)][_0x35c24f(0x217)](_0xca5961),this[_0x35c24f(0x221)][_0x35c24f(0x217)](_0x38bae6);}},_0x4d8a04(_0x1d62b6['UniverThreadCommentDataSourcePlugin'],_0x2181ea(0x240),_0x5802bb),_0x4d8a04(_0x1d62b6['UniverThreadCommentDataSourcePlugin'],_0x2181ea(0x204),_0x29f4a9[_0x2181ea(0x200)][_0x2181ea(0x23d)]),_0x1d62b6['UniverThreadCommentDataSourcePlugin']=_0x3acc60([_0x29f4a9[_0x2181ea(0x20d)](_0x351f90[_0x2181ea(0x22b)],_0x92ed58[_0x2181ea(0x1eb)],_0x1ff71c[_0x2181ea(0x22e)]),_0x2ef9bd(0x1,_0x29f4a9['Inject'](_0x29f4a9[_0x2181ea(0x21f)])),_0x2ef9bd(0x2,_0x29f4a9[_0x2181ea(0x273)])],_0x1d62b6['UniverThreadCommentDataSourcePlugin']),Object[_0x2181ea(0x1ff)](_0x1d62b6,Symbol['toStringTag'],{'value':_0x2181ea(0x212)});}));function _0x549b(){const _0x511855=['/delete','exports','stringify','IThreadCommentDataSourceService','783141mIZZcV','userID','commentUpdate$','Add','map','/add','ref','30635WIeZza','personId','_threadCommentDataSource','content','UniverCore','rangeId','CollaborationSessionService','error','IConfigService','_sessionService','ThreadCommentModel','25430eBwnjJ','UniverCollaborationClientPlugin','UniverProThreadCommentDatasource','COMMENT','getComment','resolved','1029580esWUyb','_commentService','filter','replyId','userId','body','1866FPJgVB','deleteComment','requireSession','14pWoJog','amd','delete','threadId','UNRECOGNIZED','length','defineProperty','UniverInstanceType','_init','rangeType','CommentService','type','code','UniverThreadCommentDataSourcePlugin','/edit','updateComment','getUser','@univerjs/thread-comment','@univerjs/core','root','DependentOn','6040432iUQgRY','size','users','resolveComment','Module','getMemberID','addComment','_initDataSource','UniverNetwork','get','rxjs','listComments','Edit','forEach','Disposable','_userService','payload','Injector','/universer-api/comment/unit/','_injector','object','add','disposeWithMe','find','setConfig','parentId','unitId','1188NSzBCk','2WRJLoy','UniverThreadCommentUIPlugin','post','@univerjs/thread-comment-ui','UniverLicensePlugin','/reply','function','24976JjDUrJ','Solve','UniverThreadCommentUi','slice','4XKUimd','18qJuKNZ','getOwnPropertyDescriptor','/universer-api/user/list','solved','_threadCommentModel','_configService','Plugin','UNIVER_UNKNOWN','Solved','CustomRangeType','pluginName','Delete','createTimestamp','Unknown','pipe','_threadCommentDataSourceService','@univerjs/network','OpenOrReOpen','user','Inject','replies','91vpUnJP','_httpService','@univerjs-pro/collaboration-client','_config','comment','dayjs','addUser','4952811ZdaAxm','Reply','parse','format','YYYY/MM/DD\x20HH:mm','bufferTime','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','subscribe','UniverThreadComment','getUnit','values','_initUserSync','HTTPService','customRanges'];_0x549b=function(){return _0x511855;};return _0x549b();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.8.2",
3
+ "version": "0.8.3-nightly.202507010644",
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/collaboration-client": "0.8.2",
49
- "@univerjs/core": "0.8.2",
50
- "@univerjs-pro/license": "0.8.2",
48
+ "@univerjs-pro/collaboration-client": "0.8.3-nightly.202507010644",
49
+ "@univerjs-pro/license": "0.8.3-nightly.202507010644",
50
+ "@univerjs/core": "0.8.3-nightly.202507010644",
51
51
  "@univerjs/protocol": "0.1.47-alpha.0",
52
- "@univerjs/thread-comment-ui": "0.8.2",
53
- "@univerjs/network": "0.8.2",
54
- "@univerjs/thread-comment": "0.8.2"
52
+ "@univerjs/thread-comment-ui": "0.8.3-nightly.202507010644",
53
+ "@univerjs/network": "0.8.3-nightly.202507010644",
54
+ "@univerjs/thread-comment": "0.8.3-nightly.202507010644"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.8.3",
59
59
  "vite": "^6.3.5",
60
- "vitest": "^3.2.3",
61
- "@univerjs-infra/shared": "0.8.2"
60
+ "vitest": "^3.2.4",
61
+ "@univerjs-infra/shared": "0.8.3"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",