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

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 _0x4c88de=_0x8573;(function(_0x4d606e,_0x4cf289){const _0x1b45a8=_0x8573,_0xc90cfe=_0x4d606e();while(!![]){try{const _0x1d02f5=-parseInt(_0x1b45a8(0xc9))/0x1+parseInt(_0x1b45a8(0xca))/0x2*(-parseInt(_0x1b45a8(0x10d))/0x3)+-parseInt(_0x1b45a8(0xe3))/0x4*(-parseInt(_0x1b45a8(0x118))/0x5)+-parseInt(_0x1b45a8(0x11c))/0x6+-parseInt(_0x1b45a8(0xf3))/0x7+-parseInt(_0x1b45a8(0xc3))/0x8*(parseInt(_0x1b45a8(0xad))/0x9)+parseInt(_0x1b45a8(0xda))/0xa*(parseInt(_0x1b45a8(0xc6))/0xb);if(_0x1d02f5===_0x4cf289)break;else _0xc90cfe['push'](_0xc90cfe['shift']());}catch(_0x3e54f6){_0xc90cfe['push'](_0xc90cfe['shift']());}}}(_0x530f,0xad2d4));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x4c88de(0xff)});const b=require(_0x4c88de(0xd3)),T=require(_0x4c88de(0xa9)),c=require(_0x4c88de(0x107)),j=require(_0x4c88de(0x101)),M=require(_0x4c88de(0x116)),w=require(_0x4c88de(0xbc)),P=require(_0x4c88de(0xec)),U=_0x4c88de(0x10a);var I=(_0x16b073=>(_0x16b073[_0x16b073['OpenOrReOpen']=0x0]=_0x4c88de(0xb0),_0x16b073[_0x16b073[_0x4c88de(0xc2)]=0x1]='Solved',_0x16b073[_0x16b073[_0x4c88de(0xa6)]=-0x1]=_0x4c88de(0xa6),_0x16b073))(I||{}),v=(_0x52a311=>(_0x52a311[_0x52a311[_0x4c88de(0xbd)]=0x0]=_0x4c88de(0xbd),_0x52a311[_0x52a311[_0x4c88de(0x10f)]=0x1]=_0x4c88de(0x10f),_0x52a311[_0x52a311[_0x4c88de(0x121)]=0x2]='Reply',_0x52a311[_0x52a311[_0x4c88de(0xd7)]=0x3]='Edit',_0x52a311[_0x52a311[_0x4c88de(0x120)]=0x4]=_0x4c88de(0x120),_0x52a311[_0x52a311[_0x4c88de(0xb6)]=0x5]='Solve',_0x52a311[_0x52a311[_0x4c88de(0xa6)]=-0x1]=_0x4c88de(0xa6),_0x52a311))(v||{});const f=_0x5f35dc=>c['dayjs'](new Date(+_0x5f35dc))['format'](_0x4c88de(0xf7)),R=async(_0x1c3af7,_0x2f8461)=>{const _0x5f2b59=_0x4c88de,_0x11dc1e=_0x1c3af7[_0x5f2b59(0x122)](c['UserManagerService']),_0x4c36f7=_0x1c3af7[_0x5f2b59(0x122)](P[_0x5f2b59(0xa7)]);_0x2f8461[_0x5f2b59(0xfc)](_0x3ae7c9=>{const _0x40303e=_0x5f2b59;_0x11dc1e['getUser'](_0x3ae7c9)&&_0x2f8461[_0x40303e(0xb7)](_0x3ae7c9);}),_0x2f8461[_0x5f2b59(0xbe)]&&(await _0x4c36f7[_0x5f2b59(0x122)](_0x5f2b59(0xc5),{'params':{'userIDs':[..._0x2f8461]}}))[_0x5f2b59(0x11b)][_0x5f2b59(0xaf)][_0x5f2b59(0xfc)](_0x283e6b=>{const _0x1c0718=_0x5f2b59;_0x283e6b&&_0x11dc1e[_0x1c0718(0xf1)](_0x283e6b);});};var $=Object[_0x4c88de(0xcf)],E=(_0x369e14,_0x34318b,_0x3679e8,_0x410f57)=>{const _0xfcdf8e=_0x4c88de;for(var _0x2b2279=_0x410f57>0x1?void 0x0:_0x410f57?$(_0x34318b,_0x3679e8):_0x34318b,_0x53ce26=_0x369e14[_0xfcdf8e(0xf2)]-0x1,_0x37fa1a;_0x53ce26>=0x0;_0x53ce26--)(_0x37fa1a=_0x369e14[_0x53ce26])&&(_0x2b2279=_0x37fa1a(_0x2b2279)||_0x2b2279);return _0x2b2279;},S=(_0x405b5b,_0x4071b4)=>(_0x35da1e,_0x4b571f)=>_0x4071b4(_0x35da1e,_0x4b571f,_0x405b5b);let p=class extends c[_0x4c88de(0xce)]{constructor(_0x174f78,_0x1029b9,_0x59d3e0,_0x3ab0b4){const _0x498a15=_0x4c88de;super(),this[_0x498a15(0x10e)]=_0x174f78,this[_0x498a15(0x124)]=_0x1029b9,this[_0x498a15(0x11e)]=_0x59d3e0,this[_0x498a15(0xe0)]=_0x3ab0b4,this['_init'](),this[_0x498a15(0xc0)]();}[_0x4c88de(0xc0)](){const _0x1f3d3c=_0x4c88de;this[_0x1f3d3c(0xc4)](this[_0x1f3d3c(0x124)]['commentUpdate$'][_0x1f3d3c(0xb1)](w[_0x1f3d3c(0x110)](0x10))['subscribe'](_0x346017=>{const _0x1520f6=_0x1f3d3c,_0x4661fa=new Set();_0x346017[_0x1520f6(0xfc)](_0x141be1=>{const _0x522b3a=_0x1520f6;switch(_0x141be1[_0x522b3a(0x111)]){case _0x522b3a(0xd9):{const _0xa76929=_0x141be1['payload'][_0x522b3a(0x100)];_0x4661fa[_0x522b3a(0xd9)](_0xa76929);break;}}}),R(this[_0x1520f6(0xe0)],_0x4661fa);}));}[_0x4c88de(0xbf)](){const _0x5f5cd6=_0x4c88de;this[_0x5f5cd6(0xc4)](this[_0x5f5cd6(0x10e)][_0x5f5cd6(0xc1)][_0x5f5cd6(0xe2)](async _0x215788=>{const _0x9d33f7=_0x5f5cd6;var _0x4956e5,_0x3c4418,_0x22f4e1,_0x1b5454;const _0x4fa5f1=(_0x4956e5=this[_0x9d33f7(0x124)][_0x9d33f7(0xe8)](_0x215788[_0x9d33f7(0x123)])[_0x9d33f7(0xef)](_0x108fd2=>_0x108fd2['threadId']===_0x215788[_0x9d33f7(0xb8)]))==null?void 0x0:_0x4956e5[_0x9d33f7(0xb2)];if(!_0x4fa5f1)return;const {unitId:_0x30df7d,subUnitId:_0x4874bc}=_0x4fa5f1;switch(_0x215788[_0x9d33f7(0xd2)]&&this[_0x9d33f7(0x11e)]['addUser'](_0x215788[_0x9d33f7(0xd2)]),_0x215788['type']){case v[_0x9d33f7(0x10f)]:break;case v['Reply']:{this[_0x9d33f7(0x124)]['addComment'](_0x30df7d,_0x4874bc,{'unitId':_0x30df7d,'subUnitId':_0x4874bc,'ref':'','id':_0x215788[_0x9d33f7(0x102)],'dT':f(+_0x215788['createTimestamp']),'threadId':_0x215788[_0x9d33f7(0xb8)],'personId':(_0x22f4e1=(_0x3c4418=_0x215788[_0x9d33f7(0xd2)])==null?void 0x0:_0x3c4418[_0x9d33f7(0xf0)])!=null?_0x22f4e1:_0x215788[_0x9d33f7(0x114)],'text':JSON[_0x9d33f7(0xea)](_0x215788[_0x9d33f7(0xdf)]),'parentId':_0x4fa5f1['id']});break;}case v[_0x9d33f7(0x120)]:{const _0x399684=this['_threadCommentModel'][_0x9d33f7(0x113)](_0x30df7d,_0x4874bc,_0x215788[_0x9d33f7(0x102)]);_0x399684&&_0x399684[_0x9d33f7(0x10b)]&&this[_0x9d33f7(0x124)][_0x9d33f7(0x103)](_0x30df7d,_0x4874bc,_0x215788[_0x9d33f7(0x102)]);break;}case v[_0x9d33f7(0xd7)]:{this[_0x9d33f7(0x124)]['updateComment'](_0x30df7d,_0x4874bc,{'commentId':_0x215788[_0x9d33f7(0x102)],'text':JSON[_0x9d33f7(0xea)](_0x215788[_0x9d33f7(0xdf)])});break;}case v[_0x9d33f7(0xb6)]:{const _0xc78090=(_0x1b5454=this[_0x9d33f7(0x124)][_0x9d33f7(0xe8)](_0x215788[_0x9d33f7(0x123)])['find'](_0x14de45=>_0x14de45[_0x9d33f7(0xb8)]===_0x215788[_0x9d33f7(0xb8)]))==null?void 0x0:_0x1b5454[_0x9d33f7(0xb2)];_0xc78090&&this[_0x9d33f7(0x124)][_0x9d33f7(0xd6)](_0x30df7d,_0x4874bc,_0xc78090['id'],_0x215788[_0x9d33f7(0xac)]===I[_0x9d33f7(0xc2)]);break;}}}));}};p=E([S(0x0,c[_0x4c88de(0x108)](b[_0x4c88de(0xf8)])),S(0x1,c[_0x4c88de(0x108)](M[_0x4c88de(0xb9)])),S(0x2,c[_0x4c88de(0x108)](c[_0x4c88de(0x104)])),S(0x3,c[_0x4c88de(0x108)](c[_0x4c88de(0xb4)]))],p);const q=_0x4c88de(0xde),D={};var A=Object[_0x4c88de(0xcf)],x=(_0xe35a9c,_0x4dae2c,_0x3d74dd,_0x1d5432)=>{const _0x4c16db=_0x4c88de;for(var _0xb8d9c0=_0x1d5432>0x1?void 0x0:_0x1d5432?A(_0x4dae2c,_0x3d74dd):_0x4dae2c,_0x413c10=_0xe35a9c[_0x4c16db(0xf2)]-0x1,_0x3cb522;_0x413c10>=0x0;_0x413c10--)(_0x3cb522=_0xe35a9c[_0x413c10])&&(_0xb8d9c0=_0x3cb522(_0xb8d9c0)||_0xb8d9c0);return _0xb8d9c0;},_=(_0x38396e,_0x3938ad)=>(_0x1f981c,_0xb4c87a)=>_0x3938ad(_0x1f981c,_0xb4c87a,_0x38396e);function Y(_0x1cec11,_0x2de4fb){const _0x20737c=_0x4c88de,_0x545d99=_0x1cec11['replies'][0x0];return{..._0x2de4fb,'id':_0x545d99[_0x20737c(0x102)],'resolved':_0x1cec11['solved']===0x1,'dT':f(_0x545d99[_0x20737c(0xd5)]),'personId':_0x545d99[_0x20737c(0x114)],'threadId':_0x545d99[_0x20737c(0xb8)]};}function G(_0x5afd5c,_0x1b18e8,_0x1439c9){const _0x172abb=_0x4c88de;var _0xdf9adb,_0x51c4f8;if(((_0x51c4f8=(_0xdf9adb=_0x5afd5c==null?void 0x0:_0x5afd5c[_0x172abb(0xcd)])==null?void 0x0:_0xdf9adb[_0x172abb(0xf2)])!=null?_0x51c4f8:0x0)>0x0){const _0xb7f97c=(_0x3bf557,_0x1b36f0)=>({'id':_0x3bf557[_0x172abb(0x102)],'threadId':_0x3bf557[_0x172abb(0xb8)],'dT':f(_0x3bf557['createTimestamp']),'personId':_0x3bf557[_0x172abb(0x114)],'resolved':_0x5afd5c['solved']===I[_0x172abb(0xc2)],'unitId':_0x1b18e8,'subUnitId':_0x1439c9,'text':JSON['parse'](_0x3bf557['content']),'parentId':_0x1b36f0}),_0x3d7040=_0xb7f97c(_0x5afd5c['replies'][0x0]);return{..._0x3d7040,'children':_0x5afd5c[_0x172abb(0xcd)][_0x172abb(0x115)](0x1)[_0x172abb(0x112)](_0x1faf37=>_0xb7f97c(_0x1faf37,_0x3d7040['id']))};}return null;}let g=class{constructor(_0x3a8dcf,_0x50b2d1,_0x4fa1a3,_0x1f8dd6){const _0x3b42c4=_0x4c88de;this[_0x3b42c4(0x11d)]=_0x3a8dcf,this[_0x3b42c4(0x11e)]=_0x50b2d1,this['_sessionService']=_0x4fa1a3,this[_0x3b42c4(0xe0)]=_0x1f8dd6;}async['addComment'](_0xa0b70d){const _0x124772=_0x4c88de;var _0x55b3ad,_0x164e59;const {parentId:_0x5a2d36,unitId:_0x1ad543,text:_0x13c9f2,threadId:_0x177b9a}=_0xa0b70d,_0x54c55c=(_0x164e59=(_0x55b3ad=_0x13c9f2[_0x124772(0x109)])==null?void 0x0:_0x55b3ad['filter'](_0xe1a6f0=>_0xe1a6f0[_0x124772(0xfd)]===c[_0x124772(0xe6)][_0x124772(0xfa)])[_0x124772(0x112)](_0x47c715=>_0x47c715[_0x124772(0x106)]))!=null?_0x164e59:[],_0x1ce384=JSON[_0x124772(0xf5)](_0x13c9f2),_0x2a7f49=(await this[_0x124772(0xe7)][_0x124772(0xeb)](_0x1ad543))[_0x124772(0xba)]();if(_0x5a2d36){const _0x3dd42b={'memberId':_0x2a7f49,'unitId':_0x1ad543,'content':_0x1ce384,'mention':_0x54c55c,'threadId':_0x177b9a},_0x551c4a=(await this[_0x124772(0x11d)]['post'](_0x124772(0x119)+_0x1ad543+'/reply',{'body':_0x3dd42b}))['body'][_0x124772(0x105)];return{..._0xa0b70d,'id':_0x551c4a[_0x124772(0x102)],'dT':c[_0x124772(0xd0)](+_0x551c4a[_0x124772(0xd5)])[_0x124772(0xf9)](_0x124772(0xf7)),'personId':_0x551c4a['userId']};}else{const _0x20518d={'memberId':_0x2a7f49,'unitId':_0x1ad543,'content':_0x1ce384,'mention':_0x54c55c},_0x14f883=await this[_0x124772(0x11d)][_0x124772(0xc8)](_0x124772(0x119)+_0x1ad543+_0x124772(0xe5),{'body':_0x20518d});return Y(_0x14f883['body']['comment'],_0xa0b70d);}}async['updateComment'](_0x599f4f){const _0xe7e994=_0x4c88de;var _0x184924,_0x16db31;const {text:_0x10a4d4,unitId:_0x5939bb}=_0x599f4f,_0x2010fa=(_0x16db31=(_0x184924=_0x10a4d4[_0xe7e994(0x109)])==null?void 0x0:_0x184924[_0xe7e994(0xaa)](_0x565985=>_0x565985[_0xe7e994(0xfd)]===c[_0xe7e994(0xe6)][_0xe7e994(0xfa)])[_0xe7e994(0x112)](_0x531fce=>_0x531fce['rangeId']))!=null?_0x16db31:[],_0xd20448=JSON[_0xe7e994(0xf5)](_0x10a4d4),_0x35317b=_0x599f4f[_0xe7e994(0xb8)],_0x58390d=_0x599f4f['id'],_0x2efda8={'memberId':(await this['_sessionService']['requireSession'](_0x5939bb))[_0xe7e994(0xba)](),'unitId':_0x5939bb,'threadId':_0x35317b,'mention':_0x2010fa,'content':_0xd20448,'replyId':_0x58390d},_0x5be125=await this[_0xe7e994(0x11d)][_0xe7e994(0xc8)](_0xe7e994(0x119)+_0x5939bb+_0xe7e994(0xc7),{'body':_0x2efda8});return!_0x5be125['body'][_0xe7e994(0xfb)]||_0x5be125['body']['error'][_0xe7e994(0xdc)]===0x1;}async['resolveComment'](_0xf50bc1){const _0x5c3e71=_0x4c88de,{unitId:_0x1951cd}=_0xf50bc1,_0x5bf4e6=_0xf50bc1[_0x5c3e71(0xb8)],_0x21e95e={'memberId':this[_0x5c3e71(0x11e)][_0x5c3e71(0x10c)]()[_0x5c3e71(0xf0)],'unitId':_0x1951cd,'threadId':_0x5bf4e6,'solved':_0xf50bc1[_0x5c3e71(0xd1)]?I[_0x5c3e71(0xc2)]:I[_0x5c3e71(0xb0)]},_0x24b8f5=await this[_0x5c3e71(0x11d)][_0x5c3e71(0xc8)](_0x5c3e71(0x119)+_0x1951cd+_0x5c3e71(0xd4),{'body':_0x21e95e});return!_0x24b8f5[_0x5c3e71(0x11b)]['error']||_0x24b8f5[_0x5c3e71(0x11b)]['error'][_0x5c3e71(0xdc)]===0x1;}async['deleteComment'](_0x468820,_0x1c6a20,_0x20b454,_0x59c383){const _0x3ecfa5=_0x4c88de,_0x386b3d={'memberId':(await this[_0x3ecfa5(0xe7)][_0x3ecfa5(0xeb)](_0x468820))[_0x3ecfa5(0xba)](),'threadId':_0x20b454,'replyId':_0x59c383,'unitId':_0x468820},_0x5b9fcb=await this[_0x3ecfa5(0x11d)][_0x3ecfa5(0xc8)](_0x3ecfa5(0x119)+_0x468820+'/delete',{'body':_0x386b3d});return!_0x5b9fcb[_0x3ecfa5(0x11b)][_0x3ecfa5(0xfb)]||_0x5b9fcb['body'][_0x3ecfa5(0xfb)][_0x3ecfa5(0xdc)]===0x1;}async[_0x4c88de(0x11a)](_0x286659,_0x32448f,_0x2c3aa1){const _0x175ae9=_0x4c88de,_0x4684a3={'unitId':_0x286659,'threadId':_0x2c3aa1},_0x4392e1=await this[_0x175ae9(0x11d)][_0x175ae9(0xc8)](_0x175ae9(0x119)+_0x286659+_0x175ae9(0xee),{'body':_0x4684a3}),_0x52bbce=_0x2c3aa1[_0x175ae9(0x112)](_0x8f4496=>G(_0x4392e1[_0x175ae9(0x11b)][_0x175ae9(0xf4)][_0x8f4496],_0x286659,_0x32448f))[_0x175ae9(0xaa)](Boolean);return Object[_0x175ae9(0xe9)](_0x4392e1[_0x175ae9(0x11b)][_0x175ae9(0xaf)])[_0x175ae9(0xfc)](_0x332e87=>{const _0x9ccad1=_0x175ae9;this[_0x9ccad1(0x11e)][_0x9ccad1(0xf1)](_0x332e87);}),_0x52bbce;}['saveCommentToSnapshot'](_0x359f5b){const _0x5de62f=_0x4c88de;return{'id':_0x359f5b['id'],'threadId':_0x359f5b[_0x5de62f(0xb8)],'ref':_0x359f5b['ref']};}};function _0x530f(){const _0x4cc208=['onStarting','Injector','_configService','Solve','delete','threadId','ThreadCommentModel','getMemberID','setConfig','rxjs','Unknown','size','_init','_initUserSync','commentUpdate$','Solved','8BBuaRb','disposeWithMe','/universer-api/user/list','22kKZKeC','/edit','post','1261955VcGYbc','1007534kSWPAt','_threadCommentDataSource','_initDataSource','replies','Disposable','getOwnPropertyDescriptor','dayjs','resolved','user','@univerjs-pro/collaboration-client','/solved','createTimestamp','resolveComment','Edit','UniverInstanceType','add','17974340srtrqI','UniverThreadCommentDataSourcePlugin','code','IConfigService','thread-comment-data-source.config','content','_injector','dataSource','subscribe','3971676LPsqCc','merge','/add','CustomRangeType','_sessionService','getUnit','values','parse','requireSession','@univerjs/network','_config','/list','find','userID','addUser','length','8808688IVorKZ','comments','stringify','pluginName','YYYY/MM/DD\x20HH:mm','CommentService','format','COMMENT','error','forEach','rangeType','IThreadCommentDataSourceService','Module','personId','@univerjs/thread-comment-ui','replyId','deleteComment','UserManagerService','reply','rangeId','@univerjs/core','Inject','customRanges','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','parentId','getCurrentUser','3XNPccL','_commentService','Add','bufferTime','type','map','getComment','userId','slice','@univerjs/thread-comment','_threadCommentDataSourceService','5dsouYy','/universer-api/comment/unit/','listComments','body','760308BvHOdx','_httpService','_userService','Plugin','Delete','Reply','get','unitId','_threadCommentModel','onReady','UNRECOGNIZED','HTTPService','UNIVER_UNKNOWN','@univerjs-pro/license','filter','defineProperty','solved','6548679MkQWGF','symbol','users','OpenOrReOpen','pipe','root'];_0x530f=function(){return _0x4cc208;};return _0x530f();}g=x([_(0x0,c[_0x4c88de(0x108)](P[_0x4c88de(0xa7)])),_(0x1,c['Inject'](c['UserManagerService'])),_(0x2,c[_0x4c88de(0x108)](b['CollaborationSessionService'])),_(0x3,c[_0x4c88de(0x108)](c[_0x4c88de(0xb4)]))],g);var H=Object[_0x4c88de(0xcf)],J=(_0x4ae716,_0x41a2f9,_0x1d4047,_0x4c57f5)=>{for(var _0x19591a=_0x4c57f5>0x1?void 0x0:_0x4c57f5?H(_0x41a2f9,_0x1d4047):_0x41a2f9,_0x9dd3a4=_0x4ae716['length']-0x1,_0x589d09;_0x9dd3a4>=0x0;_0x9dd3a4--)(_0x589d09=_0x4ae716[_0x9dd3a4])&&(_0x19591a=_0x589d09(_0x19591a)||_0x19591a);return _0x19591a;},y=(_0x12ce44,_0x1d3e81)=>(_0x3c98a1,_0x3fd810)=>_0x1d3e81(_0x3c98a1,_0x3fd810,_0x12ce44);let C=class extends c[_0x4c88de(0xce)]{constructor(_0x2232e5,_0x324d31){const _0x4cdc2b=_0x4c88de;super(),this[_0x4cdc2b(0x117)]=_0x2232e5,this[_0x4cdc2b(0xcb)]=_0x324d31,this[_0x4cdc2b(0xcc)]();}[_0x4c88de(0xcc)](){const _0x4d330d=_0x4c88de;this['_threadCommentDataSourceService'][_0x4d330d(0xe1)]=this[_0x4d330d(0xcb)],this[_0x4d330d(0x117)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x4c88de(0xfe)]),y(0x1,c[_0x4c88de(0x108)](g))],C);function _0x8573(_0x31d457,_0x52fb7f){const _0x530f70=_0x530f();return _0x8573=function(_0x8573d8,_0x244932){_0x8573d8=_0x8573d8-0xa6;let _0x5539d8=_0x530f70[_0x8573d8];return _0x5539d8;},_0x8573(_0x31d457,_0x52fb7f);}var F=Object[_0x4c88de(0xab)],L=Object['getOwnPropertyDescriptor'],Z=(_0x338955,_0x172973,_0x2c4d83)=>_0x172973 in _0x338955?F(_0x338955,_0x172973,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2c4d83}):_0x338955[_0x172973]=_0x2c4d83,W=(_0x50129c,_0x3b5204,_0x37ee09,_0x612bb2)=>{const _0x5f553a=_0x4c88de;for(var _0x229399=_0x612bb2>0x1?void 0x0:_0x612bb2?L(_0x3b5204,_0x37ee09):_0x3b5204,_0x28ad38=_0x50129c[_0x5f553a(0xf2)]-0x1,_0x803942;_0x28ad38>=0x0;_0x28ad38--)(_0x803942=_0x50129c[_0x28ad38])&&(_0x229399=_0x803942(_0x229399)||_0x229399);return _0x229399;},O=(_0x3a8acf,_0x29fa5a)=>(_0x51b7ba,_0x7deae7)=>_0x29fa5a(_0x51b7ba,_0x7deae7,_0x3a8acf),N=(_0xa77771,_0x2932c4,_0x35f4af)=>Z(_0xa77771,typeof _0x2932c4!=_0x4c88de(0xae)?_0x2932c4+'':_0x2932c4,_0x35f4af);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x4c88de(0x11f)]{constructor(_0x581c26=D,_0x13000f,_0x3350b7){const _0x2f6cb8=_0x4c88de;super(),this[_0x2f6cb8(0xed)]=_0x581c26,this[_0x2f6cb8(0xe0)]=_0x13000f,this[_0x2f6cb8(0xb5)]=_0x3350b7;const {..._0x4d380a}=c[_0x2f6cb8(0xe4)]({},D,this[_0x2f6cb8(0xed)]);this[_0x2f6cb8(0xb5)][_0x2f6cb8(0xbb)](q,_0x4d380a);}[_0x4c88de(0xb3)](){[[g],[C],[p]]['forEach'](_0x200305=>{const _0x1eda1b=_0x8573;this['_injector'][_0x1eda1b(0xd9)](_0x200305);});}[_0x4c88de(0x125)](){const _0x1fd12c=_0x4c88de;this[_0x1fd12c(0xe0)][_0x1fd12c(0x122)](C),this['_injector'][_0x1fd12c(0x122)](p);}},N(exports[_0x4c88de(0xdb)],_0x4c88de(0xf6),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x4c88de(0x111),c[_0x4c88de(0xd8)][_0x4c88de(0xa8)]),exports[_0x4c88de(0xdb)]=W([c['DependentOn'](j['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c[_0x4c88de(0x108)](c[_0x4c88de(0xb4)])),O(0x2,c[_0x4c88de(0xdd)])],exports['UniverThreadCommentDataSourcePlugin']);
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 _0xd3216e=_0x586b;(function(_0x22c8e5,_0x3f9307){const _0x54fb4e=_0x586b,_0x218f47=_0x22c8e5();while(!![]){try{const _0x20c050=parseInt(_0x54fb4e(0x13a))/0x1*(parseInt(_0x54fb4e(0x113))/0x2)+parseInt(_0x54fb4e(0xed))/0x3+parseInt(_0x54fb4e(0x120))/0x4+-parseInt(_0x54fb4e(0x11f))/0x5+parseInt(_0x54fb4e(0x134))/0x6*(-parseInt(_0x54fb4e(0xef))/0x7)+-parseInt(_0x54fb4e(0x145))/0x8+-parseInt(_0x54fb4e(0x114))/0x9*(parseInt(_0x54fb4e(0x10e))/0xa);if(_0x20c050===_0x3f9307)break;else _0x218f47['push'](_0x218f47['shift']());}catch(_0x408bfd){_0x218f47['push'](_0x218f47['shift']());}}}(_0x9c85,0x80583));import{CommentService as _0x67df09,CollaborationSessionService as _0x41d110,UniverCollaborationClientPlugin as _0x4ed5e1}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1c7e69}from'@univerjs-pro/license';import{dayjs as _0x20ef59,UserManagerService as _0x40b3f1,Inject as _0x44f5e1,Injector as _0x58e5e7,Disposable as _0x1b4e61,CustomRangeType as _0x4ab199,UniverInstanceType as _0x37bca2,DependentOn as _0x83fc12,IConfigService as _0x20992b,Plugin as _0x323721,merge as _0x67d16f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x49bd5f}from'@univerjs/thread-comment-ui';function _0x586b(_0x5325d1,_0x4b4180){const _0x9c85e1=_0x9c85();return _0x586b=function(_0x586b50,_0x3604e5){_0x586b50=_0x586b50-0xe8;let _0x5c460a=_0x9c85e1[_0x586b50];return _0x5c460a;},_0x586b(_0x5325d1,_0x4b4180);}import{ThreadCommentModel as _0x700cee,IThreadCommentDataSourceService as _0x12b23a}from'@univerjs/thread-comment';import{bufferTime as _0x1a9a9a}from'rxjs';function _0x9c85(){const _0x407200=['users','userID','user','_initDataSource','getCurrentUser','getMemberID','_init','Solve','_sessionService','deleteComment','419658wxUmig','OpenOrReOpen','disposeWithMe','type','userId','requireSession','113gkkshO','Unknown','comments','payload','personId','updateComment','customRanges','rangeType','createTimestamp','body','content','4240896tLZfyP','replyId','Reply','UNRECOGNIZED','reply','getUnit','/universer-api/user/list','_configService','code','solved','getOwnPropertyDescriptor','symbol','YYYY/MM/DD\x20HH:mm','/edit','767598yGlVsz','comment','7ZLHvhe','_commentService','/solved','_threadCommentDataSource','_httpService','/universer-api/comment/unit/','COMMENT','subscribe','/list','size','_threadCommentDataSourceService','post','syncUpdateMutationToColla','filter','delete','get','unitId','forEach','add','addUser','threadId','error','find','_threadCommentModel','Delete','thread-comment-data-source.config','/delete','/add','pipe','_userService','addComment','450BzGMxr','map','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initUserSync','parentId','15534atJLgL','35676HgIESP','rangeId','_injector','length','slice','onReady','Add','format','pluginName','getComment','commentUpdate$','2137165ENxGuP','2392120ciQfvE','getUser','root','replies','stringify','_config','Edit','parse','resolveComment','Solved'];_0x9c85=function(){return _0x407200;};return _0x9c85();}import{HTTPService as _0x38707a}from'@univerjs/network';const W=_0xd3216e(0x110);var I=(_0x34644b=>(_0x34644b[_0x34644b['OpenOrReOpen']=0x0]=_0xd3216e(0x135),_0x34644b[_0x34644b[_0xd3216e(0x129)]=0x1]='Solved',_0x34644b[_0x34644b[_0xd3216e(0x148)]=-0x1]=_0xd3216e(0x148),_0x34644b))(I||{}),v=(_0x5a6ae8=>(_0x5a6ae8[_0x5a6ae8['Unknown']=0x0]=_0xd3216e(0x13b),_0x5a6ae8[_0x5a6ae8[_0xd3216e(0x11a)]=0x1]=_0xd3216e(0x11a),_0x5a6ae8[_0x5a6ae8[_0xd3216e(0x147)]=0x2]='Reply',_0x5a6ae8[_0x5a6ae8[_0xd3216e(0x126)]=0x3]=_0xd3216e(0x126),_0x5a6ae8[_0x5a6ae8['Delete']=0x4]='Delete',_0x5a6ae8[_0x5a6ae8[_0xd3216e(0x131)]=0x5]=_0xd3216e(0x131),_0x5a6ae8[_0x5a6ae8[_0xd3216e(0x148)]=-0x1]=_0xd3216e(0x148),_0x5a6ae8))(v||{});const D=_0x36e24f=>_0x20ef59(new Date(+_0x36e24f))[_0xd3216e(0x11b)](_0xd3216e(0xeb)),B=async(_0x1344df,_0x4b7d37)=>{const _0x396a93=_0xd3216e,_0x3dafdb=_0x1344df['get'](_0x40b3f1),_0x55b8bc=_0x1344df[_0x396a93(0xfe)](_0x38707a);_0x4b7d37['forEach'](_0x4103c3=>{const _0x732a2c=_0x396a93;_0x3dafdb[_0x732a2c(0x121)](_0x4103c3)&&_0x4b7d37[_0x732a2c(0xfd)](_0x4103c3);}),_0x4b7d37[_0x396a93(0xf8)]&&(await _0x55b8bc[_0x396a93(0xfe)](_0x396a93(0x14b),{'params':{'userIDs':[..._0x4b7d37]}}))[_0x396a93(0x143)][_0x396a93(0x12a)][_0x396a93(0x100)](_0x477a09=>{const _0x2fb1ea=_0x396a93;_0x477a09&&_0x3dafdb[_0x2fb1ea(0x102)](_0x477a09);});};var K=Object[_0xd3216e(0xe9)],V=(_0x31706f,_0x5658bc,_0xd74f1b,_0x5ec9b7)=>{const _0x515d23=_0xd3216e;for(var _0x149e06=_0x5ec9b7>0x1?void 0x0:_0x5ec9b7?K(_0x5658bc,_0xd74f1b):_0x5658bc,_0x1b285c=_0x31706f[_0x515d23(0x117)]-0x1,_0x42af4e;_0x1b285c>=0x0;_0x1b285c--)(_0x42af4e=_0x31706f[_0x1b285c])&&(_0x149e06=_0x42af4e(_0x149e06)||_0x149e06);return _0x149e06;},p=(_0x594d18,_0x1f8570)=>(_0x39abcc,_0x55474d)=>_0x1f8570(_0x39abcc,_0x55474d,_0x594d18);let S=class extends _0x1b4e61{constructor(_0x511efc,_0x31069c,_0x1403a0,_0x556254){const _0x366c7f=_0xd3216e;super(),this['_commentService']=_0x511efc,this[_0x366c7f(0x106)]=_0x31069c,this[_0x366c7f(0x10c)]=_0x1403a0,this[_0x366c7f(0x116)]=_0x556254,this['_init'](),this[_0x366c7f(0x111)]();}[_0xd3216e(0x111)](){const _0x7a7bb0=_0xd3216e;this[_0x7a7bb0(0x136)](this[_0x7a7bb0(0x106)][_0x7a7bb0(0x11e)][_0x7a7bb0(0x10b)](_0x1a9a9a(0x10))['subscribe'](_0x374198=>{const _0x20c4f7=_0x7a7bb0,_0x54ab82=new Set();_0x374198['forEach'](_0xe0228c=>{const _0x50419c=_0x586b;switch(_0xe0228c[_0x50419c(0x137)]){case _0x50419c(0x101):{const _0x402882=_0xe0228c[_0x50419c(0x13d)][_0x50419c(0x13e)];_0x54ab82[_0x50419c(0x101)](_0x402882);break;}}}),B(this[_0x20c4f7(0x116)],_0x54ab82);}));}[_0xd3216e(0x130)](){const _0x38ebf5=_0xd3216e;this[_0x38ebf5(0x136)](this[_0x38ebf5(0xf0)][_0x38ebf5(0x11e)][_0x38ebf5(0xf6)](async _0x31c229=>{const _0x4ef882=_0x38ebf5;var _0x312950,_0x1f28a8,_0x323e9b,_0x2a94f0;const _0x59625d=(_0x312950=this[_0x4ef882(0x106)][_0x4ef882(0x14a)](_0x31c229[_0x4ef882(0xff)])[_0x4ef882(0x105)](_0x45a0db=>_0x45a0db[_0x4ef882(0x103)]===_0x31c229[_0x4ef882(0x103)]))==null?void 0x0:_0x312950['root'];if(!_0x59625d)return;const {unitId:_0x386981,subUnitId:_0x5e6a56}=_0x59625d;switch(_0x31c229[_0x4ef882(0x12c)]&&this[_0x4ef882(0x10c)]['addUser'](_0x31c229[_0x4ef882(0x12c)]),_0x31c229['type']){case v[_0x4ef882(0x11a)]:break;case v[_0x4ef882(0x147)]:{this['_threadCommentModel']['addComment'](_0x386981,_0x5e6a56,{'unitId':_0x386981,'subUnitId':_0x5e6a56,'ref':'','id':_0x31c229[_0x4ef882(0x146)],'dT':D(+_0x31c229[_0x4ef882(0x142)]),'threadId':_0x31c229['threadId'],'personId':(_0x323e9b=(_0x1f28a8=_0x31c229[_0x4ef882(0x12c)])==null?void 0x0:_0x1f28a8[_0x4ef882(0x12b)])!=null?_0x323e9b:_0x31c229[_0x4ef882(0x138)],'text':JSON[_0x4ef882(0x127)](_0x31c229['content']),'parentId':_0x59625d['id']});break;}case v[_0x4ef882(0x107)]:{const _0x5a5085=this[_0x4ef882(0x106)][_0x4ef882(0x11d)](_0x386981,_0x5e6a56,_0x31c229['replyId']);_0x5a5085&&_0x5a5085[_0x4ef882(0x112)]&&this[_0x4ef882(0x106)][_0x4ef882(0x133)](_0x386981,_0x5e6a56,_0x31c229['replyId']);break;}case v[_0x4ef882(0x126)]:{this[_0x4ef882(0x106)][_0x4ef882(0x13f)](_0x386981,_0x5e6a56,{'commentId':_0x31c229['replyId'],'text':JSON[_0x4ef882(0x127)](_0x31c229[_0x4ef882(0x144)])});break;}case v[_0x4ef882(0x131)]:{const _0x5bc1b6=(_0x2a94f0=this['_threadCommentModel'][_0x4ef882(0x14a)](_0x31c229[_0x4ef882(0xff)])[_0x4ef882(0x105)](_0x447cf0=>_0x447cf0[_0x4ef882(0x103)]===_0x31c229[_0x4ef882(0x103)]))==null?void 0x0:_0x2a94f0[_0x4ef882(0x122)];_0x5bc1b6&&this['_threadCommentModel']['resolveComment'](_0x386981,_0x5e6a56,_0x5bc1b6['id'],_0x31c229[_0x4ef882(0xe8)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x44f5e1(_0x67df09)),p(0x1,_0x44f5e1(_0x700cee)),p(0x2,_0x44f5e1(_0x40b3f1)),p(0x3,_0x44f5e1(_0x58e5e7))],S);const z=_0xd3216e(0x108),M={};var k=Object[_0xd3216e(0xe9)],Q=(_0x536f2d,_0x1c1e1a,_0x5afd63,_0x13be80)=>{const _0x234cd8=_0xd3216e;for(var _0x230fc4=_0x13be80>0x1?void 0x0:_0x13be80?k(_0x1c1e1a,_0x5afd63):_0x1c1e1a,_0x4b10a9=_0x536f2d[_0x234cd8(0x117)]-0x1,_0x1bf5ad;_0x4b10a9>=0x0;_0x4b10a9--)(_0x1bf5ad=_0x536f2d[_0x4b10a9])&&(_0x230fc4=_0x1bf5ad(_0x230fc4)||_0x230fc4);return _0x230fc4;},_=(_0x5aa1cf,_0x24fe43)=>(_0x3e576f,_0x55cd1a)=>_0x24fe43(_0x3e576f,_0x55cd1a,_0x5aa1cf);function X(_0xbfc9ec,_0x4cfcd9){const _0x2f203c=_0xd3216e,_0x11c5d5=_0xbfc9ec[_0x2f203c(0x123)][0x0];return{..._0x4cfcd9,'id':_0x11c5d5[_0x2f203c(0x146)],'resolved':_0xbfc9ec['solved']===0x1,'dT':D(_0x11c5d5[_0x2f203c(0x142)]),'personId':_0x11c5d5['userId'],'threadId':_0x11c5d5[_0x2f203c(0x103)]};}function ee(_0x53c2f9,_0x19bf08,_0x51d1b7){const _0xe522ac=_0xd3216e;var _0x57f858,_0x528677;if(((_0x528677=(_0x57f858=_0x53c2f9==null?void 0x0:_0x53c2f9[_0xe522ac(0x123)])==null?void 0x0:_0x57f858[_0xe522ac(0x117)])!=null?_0x528677:0x0)>0x0){const _0x3e0b84=(_0x35c3bf,_0x2a9813)=>({'id':_0x35c3bf['replyId'],'threadId':_0x35c3bf[_0xe522ac(0x103)],'dT':D(_0x35c3bf[_0xe522ac(0x142)]),'personId':_0x35c3bf[_0xe522ac(0x138)],'resolved':_0x53c2f9[_0xe522ac(0xe8)]===I[_0xe522ac(0x129)],'unitId':_0x19bf08,'subUnitId':_0x51d1b7,'text':JSON[_0xe522ac(0x127)](_0x35c3bf[_0xe522ac(0x144)]),'parentId':_0x2a9813}),_0x4cd1c4=_0x3e0b84(_0x53c2f9[_0xe522ac(0x123)][0x0]);return{..._0x4cd1c4,'children':_0x53c2f9[_0xe522ac(0x123)][_0xe522ac(0x118)](0x1)['map'](_0x367808=>_0x3e0b84(_0x367808,_0x4cd1c4['id']))};}return null;}let f=class{constructor(_0x2a3828,_0xb64f44,_0x4d2b89,_0x4433ee){const _0x4bbd33=_0xd3216e;this[_0x4bbd33(0xf3)]=_0x2a3828,this[_0x4bbd33(0x10c)]=_0xb64f44,this[_0x4bbd33(0x132)]=_0x4d2b89,this[_0x4bbd33(0x116)]=_0x4433ee;}async[_0xd3216e(0x10d)](_0x2c74c){const _0x2c6fd6=_0xd3216e;var _0x553c3b,_0x48284c;const {parentId:_0x448fde,unitId:_0x273f47,text:_0x59e12e,threadId:_0x412fe4}=_0x2c74c,_0x156609=(_0x48284c=(_0x553c3b=_0x59e12e[_0x2c6fd6(0x140)])==null?void 0x0:_0x553c3b[_0x2c6fd6(0xfc)](_0x4e4263=>_0x4e4263[_0x2c6fd6(0x141)]===_0x4ab199[_0x2c6fd6(0xf5)])[_0x2c6fd6(0x10f)](_0x5d7f2f=>_0x5d7f2f[_0x2c6fd6(0x115)]))!=null?_0x48284c:[],_0x3289cf=JSON[_0x2c6fd6(0x124)](_0x59e12e),_0x3ddbd0=(await this[_0x2c6fd6(0x132)][_0x2c6fd6(0x139)](_0x273f47))[_0x2c6fd6(0x12f)]();if(_0x448fde){const _0x53e926={'memberId':_0x3ddbd0,'unitId':_0x273f47,'content':_0x3289cf,'mention':_0x156609,'threadId':_0x412fe4},_0x176bc7=(await this[_0x2c6fd6(0xf3)][_0x2c6fd6(0xfa)](_0x2c6fd6(0xf4)+_0x273f47+'/reply',{'body':_0x53e926}))[_0x2c6fd6(0x143)][_0x2c6fd6(0x149)];return{..._0x2c74c,'id':_0x176bc7[_0x2c6fd6(0x146)],'dT':_0x20ef59(+_0x176bc7[_0x2c6fd6(0x142)])[_0x2c6fd6(0x11b)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x176bc7['userId']};}else{const _0x3402a7={'memberId':_0x3ddbd0,'unitId':_0x273f47,'content':_0x3289cf,'mention':_0x156609},_0xabd233=await this[_0x2c6fd6(0xf3)]['post']('/universer-api/comment/unit/'+_0x273f47+_0x2c6fd6(0x10a),{'body':_0x3402a7});return X(_0xabd233['body'][_0x2c6fd6(0xee)],_0x2c74c);}}async[_0xd3216e(0x13f)](_0x2807e8){const _0xd92e92=_0xd3216e;var _0x39a968,_0x16f1e7;const {text:_0x4fd718,unitId:_0x2c3675}=_0x2807e8,_0x1dbf83=(_0x16f1e7=(_0x39a968=_0x4fd718[_0xd92e92(0x140)])==null?void 0x0:_0x39a968[_0xd92e92(0xfc)](_0x357215=>_0x357215[_0xd92e92(0x141)]===_0x4ab199[_0xd92e92(0xf5)])[_0xd92e92(0x10f)](_0x45b2da=>_0x45b2da[_0xd92e92(0x115)]))!=null?_0x16f1e7:[],_0x1f9ff2=JSON['stringify'](_0x4fd718),_0x5d4d3a=_0x2807e8[_0xd92e92(0x103)],_0x26831d=_0x2807e8['id'],_0x3a5058={'memberId':(await this[_0xd92e92(0x132)][_0xd92e92(0x139)](_0x2c3675))[_0xd92e92(0x12f)](),'unitId':_0x2c3675,'threadId':_0x5d4d3a,'mention':_0x1dbf83,'content':_0x1f9ff2,'replyId':_0x26831d},_0x34ee16=await this[_0xd92e92(0xf3)][_0xd92e92(0xfa)]('/universer-api/comment/unit/'+_0x2c3675+_0xd92e92(0xec),{'body':_0x3a5058});return!_0x34ee16[_0xd92e92(0x143)][_0xd92e92(0x104)]||_0x34ee16[_0xd92e92(0x143)]['error'][_0xd92e92(0x14d)]===0x1;}async[_0xd3216e(0x128)](_0x591bbd){const _0x30aac6=_0xd3216e,{unitId:_0x56dd20}=_0x591bbd,_0x14de69=_0x591bbd['threadId'],_0x4c94cc={'memberId':this[_0x30aac6(0x10c)][_0x30aac6(0x12e)]()[_0x30aac6(0x12b)],'unitId':_0x56dd20,'threadId':_0x14de69,'solved':_0x591bbd['resolved']?I['Solved']:I['OpenOrReOpen']},_0x19ebb3=await this[_0x30aac6(0xf3)][_0x30aac6(0xfa)](_0x30aac6(0xf4)+_0x56dd20+_0x30aac6(0xf1),{'body':_0x4c94cc});return!_0x19ebb3['body'][_0x30aac6(0x104)]||_0x19ebb3[_0x30aac6(0x143)][_0x30aac6(0x104)][_0x30aac6(0x14d)]===0x1;}async[_0xd3216e(0x133)](_0x5f2d93,_0x9dedba,_0xe6c608,_0xbc7115){const _0x25c46b=_0xd3216e,_0x5308db={'memberId':(await this[_0x25c46b(0x132)][_0x25c46b(0x139)](_0x5f2d93))['getMemberID'](),'threadId':_0xe6c608,'replyId':_0xbc7115,'unitId':_0x5f2d93},_0x1c6d15=await this[_0x25c46b(0xf3)][_0x25c46b(0xfa)](_0x25c46b(0xf4)+_0x5f2d93+_0x25c46b(0x109),{'body':_0x5308db});return!_0x1c6d15[_0x25c46b(0x143)][_0x25c46b(0x104)]||_0x1c6d15[_0x25c46b(0x143)][_0x25c46b(0x104)]['code']===0x1;}async['listComments'](_0x4a9fad,_0x52232a,_0x1c0b25){const _0x2420a2=_0xd3216e,_0x6b7e28={'unitId':_0x4a9fad,'threadId':_0x1c0b25},_0x10be8e=await this[_0x2420a2(0xf3)][_0x2420a2(0xfa)]('/universer-api/comment/unit/'+_0x4a9fad+_0x2420a2(0xf7),{'body':_0x6b7e28}),_0x51c729=_0x1c0b25[_0x2420a2(0x10f)](_0x4d35f0=>ee(_0x10be8e[_0x2420a2(0x143)][_0x2420a2(0x13c)][_0x4d35f0],_0x4a9fad,_0x52232a))[_0x2420a2(0xfc)](Boolean);return Object['values'](_0x10be8e['body']['users'])['forEach'](_0x164820=>{const _0x2b5f4b=_0x2420a2;this[_0x2b5f4b(0x10c)][_0x2b5f4b(0x102)](_0x164820);}),_0x51c729;}['saveCommentToSnapshot'](_0x91b87a){const _0x17161f=_0xd3216e;return{'id':_0x91b87a['id'],'threadId':_0x91b87a[_0x17161f(0x103)],'ref':_0x91b87a['ref']};}};f=Q([_(0x0,_0x44f5e1(_0x38707a)),_(0x1,_0x44f5e1(_0x40b3f1)),_(0x2,_0x44f5e1(_0x41d110)),_(0x3,_0x44f5e1(_0x58e5e7))],f);var re=Object[_0xd3216e(0xe9)],te=(_0x3cf2bf,_0x2e6f79,_0xa9403d,_0xc2372d)=>{for(var _0x2be11d=_0xc2372d>0x1?void 0x0:_0xc2372d?re(_0x2e6f79,_0xa9403d):_0x2e6f79,_0x551c44=_0x3cf2bf['length']-0x1,_0x1aaa47;_0x551c44>=0x0;_0x551c44--)(_0x1aaa47=_0x3cf2bf[_0x551c44])&&(_0x2be11d=_0x1aaa47(_0x2be11d)||_0x2be11d);return _0x2be11d;},N=(_0x5789f1,_0x4b641a)=>(_0x47a6d7,_0x33ce02)=>_0x4b641a(_0x47a6d7,_0x33ce02,_0x5789f1);let g=class extends _0x1b4e61{constructor(_0x2d97e5,_0x38d672){const _0x57cc43=_0xd3216e;super(),this[_0x57cc43(0xf9)]=_0x2d97e5,this[_0x57cc43(0xf2)]=_0x38d672,this[_0x57cc43(0x12d)]();}[_0xd3216e(0x12d)](){const _0x93161a=_0xd3216e;this[_0x93161a(0xf9)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x93161a(0xfb)]=!0x1;}};g=te([N(0x0,_0x12b23a),N(0x1,_0x44f5e1(f))],g);var se=Object['defineProperty'],oe=Object[_0xd3216e(0xe9)],ne=(_0x4491b0,_0x59cfb4,_0x46b6a3)=>_0x59cfb4 in _0x4491b0?se(_0x4491b0,_0x59cfb4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x46b6a3}):_0x4491b0[_0x59cfb4]=_0x46b6a3,ie=(_0x4f198b,_0x30244d,_0x162e04,_0x433009)=>{const _0x1c8ac5=_0xd3216e;for(var _0x1ddd54=_0x433009>0x1?void 0x0:_0x433009?oe(_0x30244d,_0x162e04):_0x30244d,_0x2c7c59=_0x4f198b[_0x1c8ac5(0x117)]-0x1,_0x33dba1;_0x2c7c59>=0x0;_0x2c7c59--)(_0x33dba1=_0x4f198b[_0x2c7c59])&&(_0x1ddd54=_0x33dba1(_0x1ddd54)||_0x1ddd54);return _0x1ddd54;},w=(_0x4c6027,_0x2b4b58)=>(_0x3bb3cf,_0x336562)=>_0x2b4b58(_0x3bb3cf,_0x336562,_0x4c6027),$=(_0x66c4b9,_0x29b27e,_0x1df97a)=>ne(_0x66c4b9,typeof _0x29b27e!=_0xd3216e(0xea)?_0x29b27e+'':_0x29b27e,_0x1df97a);let b=class extends _0x323721{constructor(_0x1c0732=M,_0x421891,_0x4f209a){const _0x5e4b68=_0xd3216e;super(),this[_0x5e4b68(0x125)]=_0x1c0732,this[_0x5e4b68(0x116)]=_0x421891,this[_0x5e4b68(0x14c)]=_0x4f209a;const {..._0x38ecbe}=_0x67d16f({},M,this[_0x5e4b68(0x125)]);this[_0x5e4b68(0x14c)]['setConfig'](z,_0x38ecbe);}['onStarting'](){const _0x6a015=_0xd3216e;[[f],[g],[S]][_0x6a015(0x100)](_0x336f50=>{const _0x3ab620=_0x6a015;this['_injector'][_0x3ab620(0x101)](_0x336f50);});}[_0xd3216e(0x119)](){const _0x50184a=_0xd3216e;this[_0x50184a(0x116)]['get'](g),this[_0x50184a(0x116)][_0x50184a(0xfe)](S);}};$(b,_0xd3216e(0x11c),W),$(b,_0xd3216e(0x137),_0x37bca2['UNIVER_UNKNOWN']),b=ie([_0x83fc12(_0x49bd5f,_0x4ed5e1,_0x1c7e69),w(0x1,_0x44f5e1(_0x58e5e7)),w(0x2,_0x20992b)],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 _0xd3216e=_0x586b;(function(_0x22c8e5,_0x3f9307){const _0x54fb4e=_0x586b,_0x218f47=_0x22c8e5();while(!![]){try{const _0x20c050=parseInt(_0x54fb4e(0x13a))/0x1*(parseInt(_0x54fb4e(0x113))/0x2)+parseInt(_0x54fb4e(0xed))/0x3+parseInt(_0x54fb4e(0x120))/0x4+-parseInt(_0x54fb4e(0x11f))/0x5+parseInt(_0x54fb4e(0x134))/0x6*(-parseInt(_0x54fb4e(0xef))/0x7)+-parseInt(_0x54fb4e(0x145))/0x8+-parseInt(_0x54fb4e(0x114))/0x9*(parseInt(_0x54fb4e(0x10e))/0xa);if(_0x20c050===_0x3f9307)break;else _0x218f47['push'](_0x218f47['shift']());}catch(_0x408bfd){_0x218f47['push'](_0x218f47['shift']());}}}(_0x9c85,0x80583));import{CommentService as _0x67df09,CollaborationSessionService as _0x41d110,UniverCollaborationClientPlugin as _0x4ed5e1}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1c7e69}from'@univerjs-pro/license';import{dayjs as _0x20ef59,UserManagerService as _0x40b3f1,Inject as _0x44f5e1,Injector as _0x58e5e7,Disposable as _0x1b4e61,CustomRangeType as _0x4ab199,UniverInstanceType as _0x37bca2,DependentOn as _0x83fc12,IConfigService as _0x20992b,Plugin as _0x323721,merge as _0x67d16f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x49bd5f}from'@univerjs/thread-comment-ui';function _0x586b(_0x5325d1,_0x4b4180){const _0x9c85e1=_0x9c85();return _0x586b=function(_0x586b50,_0x3604e5){_0x586b50=_0x586b50-0xe8;let _0x5c460a=_0x9c85e1[_0x586b50];return _0x5c460a;},_0x586b(_0x5325d1,_0x4b4180);}import{ThreadCommentModel as _0x700cee,IThreadCommentDataSourceService as _0x12b23a}from'@univerjs/thread-comment';import{bufferTime as _0x1a9a9a}from'rxjs';function _0x9c85(){const _0x407200=['users','userID','user','_initDataSource','getCurrentUser','getMemberID','_init','Solve','_sessionService','deleteComment','419658wxUmig','OpenOrReOpen','disposeWithMe','type','userId','requireSession','113gkkshO','Unknown','comments','payload','personId','updateComment','customRanges','rangeType','createTimestamp','body','content','4240896tLZfyP','replyId','Reply','UNRECOGNIZED','reply','getUnit','/universer-api/user/list','_configService','code','solved','getOwnPropertyDescriptor','symbol','YYYY/MM/DD\x20HH:mm','/edit','767598yGlVsz','comment','7ZLHvhe','_commentService','/solved','_threadCommentDataSource','_httpService','/universer-api/comment/unit/','COMMENT','subscribe','/list','size','_threadCommentDataSourceService','post','syncUpdateMutationToColla','filter','delete','get','unitId','forEach','add','addUser','threadId','error','find','_threadCommentModel','Delete','thread-comment-data-source.config','/delete','/add','pipe','_userService','addComment','450BzGMxr','map','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initUserSync','parentId','15534atJLgL','35676HgIESP','rangeId','_injector','length','slice','onReady','Add','format','pluginName','getComment','commentUpdate$','2137165ENxGuP','2392120ciQfvE','getUser','root','replies','stringify','_config','Edit','parse','resolveComment','Solved'];_0x9c85=function(){return _0x407200;};return _0x9c85();}import{HTTPService as _0x38707a}from'@univerjs/network';const W=_0xd3216e(0x110);var I=(_0x34644b=>(_0x34644b[_0x34644b['OpenOrReOpen']=0x0]=_0xd3216e(0x135),_0x34644b[_0x34644b[_0xd3216e(0x129)]=0x1]='Solved',_0x34644b[_0x34644b[_0xd3216e(0x148)]=-0x1]=_0xd3216e(0x148),_0x34644b))(I||{}),v=(_0x5a6ae8=>(_0x5a6ae8[_0x5a6ae8['Unknown']=0x0]=_0xd3216e(0x13b),_0x5a6ae8[_0x5a6ae8[_0xd3216e(0x11a)]=0x1]=_0xd3216e(0x11a),_0x5a6ae8[_0x5a6ae8[_0xd3216e(0x147)]=0x2]='Reply',_0x5a6ae8[_0x5a6ae8[_0xd3216e(0x126)]=0x3]=_0xd3216e(0x126),_0x5a6ae8[_0x5a6ae8['Delete']=0x4]='Delete',_0x5a6ae8[_0x5a6ae8[_0xd3216e(0x131)]=0x5]=_0xd3216e(0x131),_0x5a6ae8[_0x5a6ae8[_0xd3216e(0x148)]=-0x1]=_0xd3216e(0x148),_0x5a6ae8))(v||{});const D=_0x36e24f=>_0x20ef59(new Date(+_0x36e24f))[_0xd3216e(0x11b)](_0xd3216e(0xeb)),B=async(_0x1344df,_0x4b7d37)=>{const _0x396a93=_0xd3216e,_0x3dafdb=_0x1344df['get'](_0x40b3f1),_0x55b8bc=_0x1344df[_0x396a93(0xfe)](_0x38707a);_0x4b7d37['forEach'](_0x4103c3=>{const _0x732a2c=_0x396a93;_0x3dafdb[_0x732a2c(0x121)](_0x4103c3)&&_0x4b7d37[_0x732a2c(0xfd)](_0x4103c3);}),_0x4b7d37[_0x396a93(0xf8)]&&(await _0x55b8bc[_0x396a93(0xfe)](_0x396a93(0x14b),{'params':{'userIDs':[..._0x4b7d37]}}))[_0x396a93(0x143)][_0x396a93(0x12a)][_0x396a93(0x100)](_0x477a09=>{const _0x2fb1ea=_0x396a93;_0x477a09&&_0x3dafdb[_0x2fb1ea(0x102)](_0x477a09);});};var K=Object[_0xd3216e(0xe9)],V=(_0x31706f,_0x5658bc,_0xd74f1b,_0x5ec9b7)=>{const _0x515d23=_0xd3216e;for(var _0x149e06=_0x5ec9b7>0x1?void 0x0:_0x5ec9b7?K(_0x5658bc,_0xd74f1b):_0x5658bc,_0x1b285c=_0x31706f[_0x515d23(0x117)]-0x1,_0x42af4e;_0x1b285c>=0x0;_0x1b285c--)(_0x42af4e=_0x31706f[_0x1b285c])&&(_0x149e06=_0x42af4e(_0x149e06)||_0x149e06);return _0x149e06;},p=(_0x594d18,_0x1f8570)=>(_0x39abcc,_0x55474d)=>_0x1f8570(_0x39abcc,_0x55474d,_0x594d18);let S=class extends _0x1b4e61{constructor(_0x511efc,_0x31069c,_0x1403a0,_0x556254){const _0x366c7f=_0xd3216e;super(),this['_commentService']=_0x511efc,this[_0x366c7f(0x106)]=_0x31069c,this[_0x366c7f(0x10c)]=_0x1403a0,this[_0x366c7f(0x116)]=_0x556254,this['_init'](),this[_0x366c7f(0x111)]();}[_0xd3216e(0x111)](){const _0x7a7bb0=_0xd3216e;this[_0x7a7bb0(0x136)](this[_0x7a7bb0(0x106)][_0x7a7bb0(0x11e)][_0x7a7bb0(0x10b)](_0x1a9a9a(0x10))['subscribe'](_0x374198=>{const _0x20c4f7=_0x7a7bb0,_0x54ab82=new Set();_0x374198['forEach'](_0xe0228c=>{const _0x50419c=_0x586b;switch(_0xe0228c[_0x50419c(0x137)]){case _0x50419c(0x101):{const _0x402882=_0xe0228c[_0x50419c(0x13d)][_0x50419c(0x13e)];_0x54ab82[_0x50419c(0x101)](_0x402882);break;}}}),B(this[_0x20c4f7(0x116)],_0x54ab82);}));}[_0xd3216e(0x130)](){const _0x38ebf5=_0xd3216e;this[_0x38ebf5(0x136)](this[_0x38ebf5(0xf0)][_0x38ebf5(0x11e)][_0x38ebf5(0xf6)](async _0x31c229=>{const _0x4ef882=_0x38ebf5;var _0x312950,_0x1f28a8,_0x323e9b,_0x2a94f0;const _0x59625d=(_0x312950=this[_0x4ef882(0x106)][_0x4ef882(0x14a)](_0x31c229[_0x4ef882(0xff)])[_0x4ef882(0x105)](_0x45a0db=>_0x45a0db[_0x4ef882(0x103)]===_0x31c229[_0x4ef882(0x103)]))==null?void 0x0:_0x312950['root'];if(!_0x59625d)return;const {unitId:_0x386981,subUnitId:_0x5e6a56}=_0x59625d;switch(_0x31c229[_0x4ef882(0x12c)]&&this[_0x4ef882(0x10c)]['addUser'](_0x31c229[_0x4ef882(0x12c)]),_0x31c229['type']){case v[_0x4ef882(0x11a)]:break;case v[_0x4ef882(0x147)]:{this['_threadCommentModel']['addComment'](_0x386981,_0x5e6a56,{'unitId':_0x386981,'subUnitId':_0x5e6a56,'ref':'','id':_0x31c229[_0x4ef882(0x146)],'dT':D(+_0x31c229[_0x4ef882(0x142)]),'threadId':_0x31c229['threadId'],'personId':(_0x323e9b=(_0x1f28a8=_0x31c229[_0x4ef882(0x12c)])==null?void 0x0:_0x1f28a8[_0x4ef882(0x12b)])!=null?_0x323e9b:_0x31c229[_0x4ef882(0x138)],'text':JSON[_0x4ef882(0x127)](_0x31c229['content']),'parentId':_0x59625d['id']});break;}case v[_0x4ef882(0x107)]:{const _0x5a5085=this[_0x4ef882(0x106)][_0x4ef882(0x11d)](_0x386981,_0x5e6a56,_0x31c229['replyId']);_0x5a5085&&_0x5a5085[_0x4ef882(0x112)]&&this[_0x4ef882(0x106)][_0x4ef882(0x133)](_0x386981,_0x5e6a56,_0x31c229['replyId']);break;}case v[_0x4ef882(0x126)]:{this[_0x4ef882(0x106)][_0x4ef882(0x13f)](_0x386981,_0x5e6a56,{'commentId':_0x31c229['replyId'],'text':JSON[_0x4ef882(0x127)](_0x31c229[_0x4ef882(0x144)])});break;}case v[_0x4ef882(0x131)]:{const _0x5bc1b6=(_0x2a94f0=this['_threadCommentModel'][_0x4ef882(0x14a)](_0x31c229[_0x4ef882(0xff)])[_0x4ef882(0x105)](_0x447cf0=>_0x447cf0[_0x4ef882(0x103)]===_0x31c229[_0x4ef882(0x103)]))==null?void 0x0:_0x2a94f0[_0x4ef882(0x122)];_0x5bc1b6&&this['_threadCommentModel']['resolveComment'](_0x386981,_0x5e6a56,_0x5bc1b6['id'],_0x31c229[_0x4ef882(0xe8)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x44f5e1(_0x67df09)),p(0x1,_0x44f5e1(_0x700cee)),p(0x2,_0x44f5e1(_0x40b3f1)),p(0x3,_0x44f5e1(_0x58e5e7))],S);const z=_0xd3216e(0x108),M={};var k=Object[_0xd3216e(0xe9)],Q=(_0x536f2d,_0x1c1e1a,_0x5afd63,_0x13be80)=>{const _0x234cd8=_0xd3216e;for(var _0x230fc4=_0x13be80>0x1?void 0x0:_0x13be80?k(_0x1c1e1a,_0x5afd63):_0x1c1e1a,_0x4b10a9=_0x536f2d[_0x234cd8(0x117)]-0x1,_0x1bf5ad;_0x4b10a9>=0x0;_0x4b10a9--)(_0x1bf5ad=_0x536f2d[_0x4b10a9])&&(_0x230fc4=_0x1bf5ad(_0x230fc4)||_0x230fc4);return _0x230fc4;},_=(_0x5aa1cf,_0x24fe43)=>(_0x3e576f,_0x55cd1a)=>_0x24fe43(_0x3e576f,_0x55cd1a,_0x5aa1cf);function X(_0xbfc9ec,_0x4cfcd9){const _0x2f203c=_0xd3216e,_0x11c5d5=_0xbfc9ec[_0x2f203c(0x123)][0x0];return{..._0x4cfcd9,'id':_0x11c5d5[_0x2f203c(0x146)],'resolved':_0xbfc9ec['solved']===0x1,'dT':D(_0x11c5d5[_0x2f203c(0x142)]),'personId':_0x11c5d5['userId'],'threadId':_0x11c5d5[_0x2f203c(0x103)]};}function ee(_0x53c2f9,_0x19bf08,_0x51d1b7){const _0xe522ac=_0xd3216e;var _0x57f858,_0x528677;if(((_0x528677=(_0x57f858=_0x53c2f9==null?void 0x0:_0x53c2f9[_0xe522ac(0x123)])==null?void 0x0:_0x57f858[_0xe522ac(0x117)])!=null?_0x528677:0x0)>0x0){const _0x3e0b84=(_0x35c3bf,_0x2a9813)=>({'id':_0x35c3bf['replyId'],'threadId':_0x35c3bf[_0xe522ac(0x103)],'dT':D(_0x35c3bf[_0xe522ac(0x142)]),'personId':_0x35c3bf[_0xe522ac(0x138)],'resolved':_0x53c2f9[_0xe522ac(0xe8)]===I[_0xe522ac(0x129)],'unitId':_0x19bf08,'subUnitId':_0x51d1b7,'text':JSON[_0xe522ac(0x127)](_0x35c3bf[_0xe522ac(0x144)]),'parentId':_0x2a9813}),_0x4cd1c4=_0x3e0b84(_0x53c2f9[_0xe522ac(0x123)][0x0]);return{..._0x4cd1c4,'children':_0x53c2f9[_0xe522ac(0x123)][_0xe522ac(0x118)](0x1)['map'](_0x367808=>_0x3e0b84(_0x367808,_0x4cd1c4['id']))};}return null;}let f=class{constructor(_0x2a3828,_0xb64f44,_0x4d2b89,_0x4433ee){const _0x4bbd33=_0xd3216e;this[_0x4bbd33(0xf3)]=_0x2a3828,this[_0x4bbd33(0x10c)]=_0xb64f44,this[_0x4bbd33(0x132)]=_0x4d2b89,this[_0x4bbd33(0x116)]=_0x4433ee;}async[_0xd3216e(0x10d)](_0x2c74c){const _0x2c6fd6=_0xd3216e;var _0x553c3b,_0x48284c;const {parentId:_0x448fde,unitId:_0x273f47,text:_0x59e12e,threadId:_0x412fe4}=_0x2c74c,_0x156609=(_0x48284c=(_0x553c3b=_0x59e12e[_0x2c6fd6(0x140)])==null?void 0x0:_0x553c3b[_0x2c6fd6(0xfc)](_0x4e4263=>_0x4e4263[_0x2c6fd6(0x141)]===_0x4ab199[_0x2c6fd6(0xf5)])[_0x2c6fd6(0x10f)](_0x5d7f2f=>_0x5d7f2f[_0x2c6fd6(0x115)]))!=null?_0x48284c:[],_0x3289cf=JSON[_0x2c6fd6(0x124)](_0x59e12e),_0x3ddbd0=(await this[_0x2c6fd6(0x132)][_0x2c6fd6(0x139)](_0x273f47))[_0x2c6fd6(0x12f)]();if(_0x448fde){const _0x53e926={'memberId':_0x3ddbd0,'unitId':_0x273f47,'content':_0x3289cf,'mention':_0x156609,'threadId':_0x412fe4},_0x176bc7=(await this[_0x2c6fd6(0xf3)][_0x2c6fd6(0xfa)](_0x2c6fd6(0xf4)+_0x273f47+'/reply',{'body':_0x53e926}))[_0x2c6fd6(0x143)][_0x2c6fd6(0x149)];return{..._0x2c74c,'id':_0x176bc7[_0x2c6fd6(0x146)],'dT':_0x20ef59(+_0x176bc7[_0x2c6fd6(0x142)])[_0x2c6fd6(0x11b)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x176bc7['userId']};}else{const _0x3402a7={'memberId':_0x3ddbd0,'unitId':_0x273f47,'content':_0x3289cf,'mention':_0x156609},_0xabd233=await this[_0x2c6fd6(0xf3)]['post']('/universer-api/comment/unit/'+_0x273f47+_0x2c6fd6(0x10a),{'body':_0x3402a7});return X(_0xabd233['body'][_0x2c6fd6(0xee)],_0x2c74c);}}async[_0xd3216e(0x13f)](_0x2807e8){const _0xd92e92=_0xd3216e;var _0x39a968,_0x16f1e7;const {text:_0x4fd718,unitId:_0x2c3675}=_0x2807e8,_0x1dbf83=(_0x16f1e7=(_0x39a968=_0x4fd718[_0xd92e92(0x140)])==null?void 0x0:_0x39a968[_0xd92e92(0xfc)](_0x357215=>_0x357215[_0xd92e92(0x141)]===_0x4ab199[_0xd92e92(0xf5)])[_0xd92e92(0x10f)](_0x45b2da=>_0x45b2da[_0xd92e92(0x115)]))!=null?_0x16f1e7:[],_0x1f9ff2=JSON['stringify'](_0x4fd718),_0x5d4d3a=_0x2807e8[_0xd92e92(0x103)],_0x26831d=_0x2807e8['id'],_0x3a5058={'memberId':(await this[_0xd92e92(0x132)][_0xd92e92(0x139)](_0x2c3675))[_0xd92e92(0x12f)](),'unitId':_0x2c3675,'threadId':_0x5d4d3a,'mention':_0x1dbf83,'content':_0x1f9ff2,'replyId':_0x26831d},_0x34ee16=await this[_0xd92e92(0xf3)][_0xd92e92(0xfa)]('/universer-api/comment/unit/'+_0x2c3675+_0xd92e92(0xec),{'body':_0x3a5058});return!_0x34ee16[_0xd92e92(0x143)][_0xd92e92(0x104)]||_0x34ee16[_0xd92e92(0x143)]['error'][_0xd92e92(0x14d)]===0x1;}async[_0xd3216e(0x128)](_0x591bbd){const _0x30aac6=_0xd3216e,{unitId:_0x56dd20}=_0x591bbd,_0x14de69=_0x591bbd['threadId'],_0x4c94cc={'memberId':this[_0x30aac6(0x10c)][_0x30aac6(0x12e)]()[_0x30aac6(0x12b)],'unitId':_0x56dd20,'threadId':_0x14de69,'solved':_0x591bbd['resolved']?I['Solved']:I['OpenOrReOpen']},_0x19ebb3=await this[_0x30aac6(0xf3)][_0x30aac6(0xfa)](_0x30aac6(0xf4)+_0x56dd20+_0x30aac6(0xf1),{'body':_0x4c94cc});return!_0x19ebb3['body'][_0x30aac6(0x104)]||_0x19ebb3[_0x30aac6(0x143)][_0x30aac6(0x104)][_0x30aac6(0x14d)]===0x1;}async[_0xd3216e(0x133)](_0x5f2d93,_0x9dedba,_0xe6c608,_0xbc7115){const _0x25c46b=_0xd3216e,_0x5308db={'memberId':(await this[_0x25c46b(0x132)][_0x25c46b(0x139)](_0x5f2d93))['getMemberID'](),'threadId':_0xe6c608,'replyId':_0xbc7115,'unitId':_0x5f2d93},_0x1c6d15=await this[_0x25c46b(0xf3)][_0x25c46b(0xfa)](_0x25c46b(0xf4)+_0x5f2d93+_0x25c46b(0x109),{'body':_0x5308db});return!_0x1c6d15[_0x25c46b(0x143)][_0x25c46b(0x104)]||_0x1c6d15[_0x25c46b(0x143)][_0x25c46b(0x104)]['code']===0x1;}async['listComments'](_0x4a9fad,_0x52232a,_0x1c0b25){const _0x2420a2=_0xd3216e,_0x6b7e28={'unitId':_0x4a9fad,'threadId':_0x1c0b25},_0x10be8e=await this[_0x2420a2(0xf3)][_0x2420a2(0xfa)]('/universer-api/comment/unit/'+_0x4a9fad+_0x2420a2(0xf7),{'body':_0x6b7e28}),_0x51c729=_0x1c0b25[_0x2420a2(0x10f)](_0x4d35f0=>ee(_0x10be8e[_0x2420a2(0x143)][_0x2420a2(0x13c)][_0x4d35f0],_0x4a9fad,_0x52232a))[_0x2420a2(0xfc)](Boolean);return Object['values'](_0x10be8e['body']['users'])['forEach'](_0x164820=>{const _0x2b5f4b=_0x2420a2;this[_0x2b5f4b(0x10c)][_0x2b5f4b(0x102)](_0x164820);}),_0x51c729;}['saveCommentToSnapshot'](_0x91b87a){const _0x17161f=_0xd3216e;return{'id':_0x91b87a['id'],'threadId':_0x91b87a[_0x17161f(0x103)],'ref':_0x91b87a['ref']};}};f=Q([_(0x0,_0x44f5e1(_0x38707a)),_(0x1,_0x44f5e1(_0x40b3f1)),_(0x2,_0x44f5e1(_0x41d110)),_(0x3,_0x44f5e1(_0x58e5e7))],f);var re=Object[_0xd3216e(0xe9)],te=(_0x3cf2bf,_0x2e6f79,_0xa9403d,_0xc2372d)=>{for(var _0x2be11d=_0xc2372d>0x1?void 0x0:_0xc2372d?re(_0x2e6f79,_0xa9403d):_0x2e6f79,_0x551c44=_0x3cf2bf['length']-0x1,_0x1aaa47;_0x551c44>=0x0;_0x551c44--)(_0x1aaa47=_0x3cf2bf[_0x551c44])&&(_0x2be11d=_0x1aaa47(_0x2be11d)||_0x2be11d);return _0x2be11d;},N=(_0x5789f1,_0x4b641a)=>(_0x47a6d7,_0x33ce02)=>_0x4b641a(_0x47a6d7,_0x33ce02,_0x5789f1);let g=class extends _0x1b4e61{constructor(_0x2d97e5,_0x38d672){const _0x57cc43=_0xd3216e;super(),this[_0x57cc43(0xf9)]=_0x2d97e5,this[_0x57cc43(0xf2)]=_0x38d672,this[_0x57cc43(0x12d)]();}[_0xd3216e(0x12d)](){const _0x93161a=_0xd3216e;this[_0x93161a(0xf9)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x93161a(0xfb)]=!0x1;}};g=te([N(0x0,_0x12b23a),N(0x1,_0x44f5e1(f))],g);var se=Object['defineProperty'],oe=Object[_0xd3216e(0xe9)],ne=(_0x4491b0,_0x59cfb4,_0x46b6a3)=>_0x59cfb4 in _0x4491b0?se(_0x4491b0,_0x59cfb4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x46b6a3}):_0x4491b0[_0x59cfb4]=_0x46b6a3,ie=(_0x4f198b,_0x30244d,_0x162e04,_0x433009)=>{const _0x1c8ac5=_0xd3216e;for(var _0x1ddd54=_0x433009>0x1?void 0x0:_0x433009?oe(_0x30244d,_0x162e04):_0x30244d,_0x2c7c59=_0x4f198b[_0x1c8ac5(0x117)]-0x1,_0x33dba1;_0x2c7c59>=0x0;_0x2c7c59--)(_0x33dba1=_0x4f198b[_0x2c7c59])&&(_0x1ddd54=_0x33dba1(_0x1ddd54)||_0x1ddd54);return _0x1ddd54;},w=(_0x4c6027,_0x2b4b58)=>(_0x3bb3cf,_0x336562)=>_0x2b4b58(_0x3bb3cf,_0x336562,_0x4c6027),$=(_0x66c4b9,_0x29b27e,_0x1df97a)=>ne(_0x66c4b9,typeof _0x29b27e!=_0xd3216e(0xea)?_0x29b27e+'':_0x29b27e,_0x1df97a);let b=class extends _0x323721{constructor(_0x1c0732=M,_0x421891,_0x4f209a){const _0x5e4b68=_0xd3216e;super(),this[_0x5e4b68(0x125)]=_0x1c0732,this[_0x5e4b68(0x116)]=_0x421891,this[_0x5e4b68(0x14c)]=_0x4f209a;const {..._0x38ecbe}=_0x67d16f({},M,this[_0x5e4b68(0x125)]);this[_0x5e4b68(0x14c)]['setConfig'](z,_0x38ecbe);}['onStarting'](){const _0x6a015=_0xd3216e;[[f],[g],[S]][_0x6a015(0x100)](_0x336f50=>{const _0x3ab620=_0x6a015;this['_injector'][_0x3ab620(0x101)](_0x336f50);});}[_0xd3216e(0x119)](){const _0x50184a=_0xd3216e;this[_0x50184a(0x116)]['get'](g),this[_0x50184a(0x116)][_0x50184a(0xfe)](S);}};$(b,_0xd3216e(0x11c),W),$(b,_0xd3216e(0x137),_0x37bca2['UNIVER_UNKNOWN']),b=ie([_0x83fc12(_0x49bd5f,_0x4ed5e1,_0x1c7e69),w(0x1,_0x44f5e1(_0x58e5e7)),w(0x2,_0x20992b)],b);export{b as UniverThreadCommentDataSourcePlugin};
@@ -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(_0x24120b,_0xb4849e){const _0x38ef67=_0x3563,_0x3d3ad6=_0x24120b();while(!![]){try{const _0x4d0f64=parseInt(_0x38ef67(0x128))/0x1*(-parseInt(_0x38ef67(0x182))/0x2)+-parseInt(_0x38ef67(0x139))/0x3*(-parseInt(_0x38ef67(0x177))/0x4)+-parseInt(_0x38ef67(0x11c))/0x5+-parseInt(_0x38ef67(0x159))/0x6*(-parseInt(_0x38ef67(0x13d))/0x7)+parseInt(_0x38ef67(0x133))/0x8*(parseInt(_0x38ef67(0x12f))/0x9)+parseInt(_0x38ef67(0x127))/0xa+-parseInt(_0x38ef67(0x152))/0xb*(parseInt(_0x38ef67(0x130))/0xc);if(_0x4d0f64===_0xb4849e)break;else _0x3d3ad6['push'](_0x3d3ad6['shift']());}catch(_0x39900e){_0x3d3ad6['push'](_0x3d3ad6['shift']());}}}(_0x45bc,0x58379),function(_0x42644c,_0x186832){const _0x4196c5=_0x3563;typeof exports==_0x4196c5(0x157)&&typeof module<'u'?_0x186832(exports,require(_0x4196c5(0x13f)),require(_0x4196c5(0x121)),require(_0x4196c5(0x18f)),require('@univerjs/thread-comment-ui'),require(_0x4196c5(0x16c)),require(_0x4196c5(0x16e)),require(_0x4196c5(0x12a))):typeof define=='function'&&define[_0x4196c5(0x123)]?define([_0x4196c5(0x126),'@univerjs-pro/collaboration-client',_0x4196c5(0x121),_0x4196c5(0x18f),_0x4196c5(0x199),_0x4196c5(0x16c),_0x4196c5(0x16e),_0x4196c5(0x12a)],_0x186832):(_0x42644c=typeof globalThis<'u'?globalThis:_0x42644c||self,_0x186832(_0x42644c['UniverProThreadCommentDatasource']={},_0x42644c[_0x4196c5(0x15b)],_0x42644c[_0x4196c5(0x179)],_0x42644c[_0x4196c5(0x172)],_0x42644c[_0x4196c5(0x191)],_0x42644c[_0x4196c5(0x17e)],_0x42644c['rxjs'],_0x42644c['UniverNetwork']));}(this,function(_0x4356d4,_0x57ede3,_0x23dd2c,_0x1a3eec,_0x387b75,_0x1ac41c,_0x47b16d,_0x111a10){'use strict';const _0x54ff9a=_0x3563;const _0x312f13='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x484586=(_0x3ff615=>(_0x3ff615[_0x3ff615[_0x54ff9a(0x184)]=0x0]='OpenOrReOpen',_0x3ff615[_0x3ff615['Solved']=0x1]=_0x54ff9a(0x170),_0x3ff615[_0x3ff615['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x3ff615))(_0x484586||{}),_0x5e4060=(_0x1d67bc=>(_0x1d67bc[_0x1d67bc[_0x54ff9a(0x167)]=0x0]=_0x54ff9a(0x167),_0x1d67bc[_0x1d67bc[_0x54ff9a(0x19a)]=0x1]=_0x54ff9a(0x19a),_0x1d67bc[_0x1d67bc[_0x54ff9a(0x146)]=0x2]=_0x54ff9a(0x146),_0x1d67bc[_0x1d67bc[_0x54ff9a(0x175)]=0x3]=_0x54ff9a(0x175),_0x1d67bc[_0x1d67bc['Delete']=0x4]=_0x54ff9a(0x13c),_0x1d67bc[_0x1d67bc[_0x54ff9a(0x188)]=0x5]=_0x54ff9a(0x188),_0x1d67bc[_0x1d67bc[_0x54ff9a(0x18b)]=-0x1]=_0x54ff9a(0x18b),_0x1d67bc))(_0x5e4060||{});const _0x57bc42=_0x479324=>_0x1a3eec['dayjs'](new Date(+_0x479324))[_0x54ff9a(0x11b)]('YYYY/MM/DD\x20HH:mm'),_0x19ef1c=async(_0x1df545,_0x46eb19)=>{const _0x3f6471=_0x54ff9a,_0x4fb019=_0x1df545[_0x3f6471(0x142)](_0x1a3eec['UserManagerService']),_0x553edb=_0x1df545['get'](_0x111a10[_0x3f6471(0x166)]);_0x46eb19[_0x3f6471(0x131)](_0x251d45=>{const _0xb4eda6=_0x3f6471;_0x4fb019[_0xb4eda6(0x15a)](_0x251d45)&&_0x46eb19[_0xb4eda6(0x16a)](_0x251d45);}),_0x46eb19[_0x3f6471(0x124)]&&(await _0x553edb[_0x3f6471(0x142)](_0x3f6471(0x151),{'params':{'userIDs':[..._0x46eb19]}}))['body'][_0x3f6471(0x143)]['forEach'](_0x4dccb0=>{const _0x383c4f=_0x3f6471;_0x4dccb0&&_0x4fb019[_0x383c4f(0x1a1)](_0x4dccb0);});};var _0x1c8fce=Object[_0x54ff9a(0x144)],_0x276a2f=(_0x45606b,_0x5f3886,_0x39838a,_0x119bd1)=>{const _0x4c101a=_0x54ff9a;for(var _0x4cb5fc=_0x119bd1>0x1?void 0x0:_0x119bd1?_0x1c8fce(_0x5f3886,_0x39838a):_0x5f3886,_0x580784=_0x45606b[_0x4c101a(0x192)]-0x1,_0x2ce28a;_0x580784>=0x0;_0x580784--)(_0x2ce28a=_0x45606b[_0x580784])&&(_0x4cb5fc=_0x2ce28a(_0x4cb5fc)||_0x4cb5fc);return _0x4cb5fc;},_0x1b5d06=(_0x187450,_0x5be837)=>(_0x3378f4,_0x3d5d03)=>_0x5be837(_0x3378f4,_0x3d5d03,_0x187450);let _0x415376=class extends _0x1a3eec[_0x54ff9a(0x134)]{constructor(_0x5cb1ea,_0x1f249e,_0x9a1eac,_0x2efc86){const _0xcd84e5=_0x54ff9a;super(),this[_0xcd84e5(0x18c)]=_0x5cb1ea,this['_threadCommentModel']=_0x1f249e,this['_userService']=_0x9a1eac,this[_0xcd84e5(0x137)]=_0x2efc86,this['_init'](),this[_0xcd84e5(0x12e)]();}[_0x54ff9a(0x12e)](){const _0x1438e8=_0x54ff9a;this[_0x1438e8(0x153)](this[_0x1438e8(0x189)][_0x1438e8(0x13b)][_0x1438e8(0x17f)](_0x47b16d[_0x1438e8(0x132)](0x10))['subscribe'](_0x28f7c2=>{const _0x2b77b2=new Set();_0x28f7c2['forEach'](_0x4ac0a7=>{const _0x10902e=_0x3563;switch(_0x4ac0a7[_0x10902e(0x15d)]){case'add':{const _0x1cdbb1=_0x4ac0a7[_0x10902e(0x14c)]['personId'];_0x2b77b2[_0x10902e(0x194)](_0x1cdbb1);break;}}}),_0x19ef1c(this['_injector'],_0x2b77b2);}));}[_0x54ff9a(0x145)](){const _0x29ad7c=_0x54ff9a;this[_0x29ad7c(0x153)](this['_commentService'][_0x29ad7c(0x13b)][_0x29ad7c(0x18e)](async _0x53f64f=>{const _0x483eba=_0x29ad7c;var _0x458827,_0x403b9e,_0x22be36,_0x5df1bb;const _0x1efb05=(_0x458827=this[_0x483eba(0x189)][_0x483eba(0x19d)](_0x53f64f[_0x483eba(0x149)])[_0x483eba(0x185)](_0x407067=>_0x407067[_0x483eba(0x171)]===_0x53f64f[_0x483eba(0x171)]))==null?void 0x0:_0x458827[_0x483eba(0x122)];if(!_0x1efb05)return;const {unitId:_0x334b7e,subUnitId:_0x5edc04}=_0x1efb05;switch(_0x53f64f[_0x483eba(0x161)]&&this[_0x483eba(0x197)][_0x483eba(0x1a1)](_0x53f64f[_0x483eba(0x161)]),_0x53f64f[_0x483eba(0x15d)]){case _0x5e4060[_0x483eba(0x19a)]:break;case _0x5e4060[_0x483eba(0x146)]:{this[_0x483eba(0x189)]['addComment'](_0x334b7e,_0x5edc04,{'unitId':_0x334b7e,'subUnitId':_0x5edc04,'ref':'','id':_0x53f64f['replyId'],'dT':_0x57bc42(+_0x53f64f[_0x483eba(0x19e)]),'threadId':_0x53f64f[_0x483eba(0x171)],'personId':(_0x22be36=(_0x403b9e=_0x53f64f[_0x483eba(0x161)])==null?void 0x0:_0x403b9e[_0x483eba(0x13e)])!=null?_0x22be36:_0x53f64f['userId'],'text':JSON[_0x483eba(0x19b)](_0x53f64f[_0x483eba(0x19c)]),'parentId':_0x1efb05['id']});break;}case _0x5e4060[_0x483eba(0x13c)]:{const _0x3f1d12=this[_0x483eba(0x189)][_0x483eba(0x12b)](_0x334b7e,_0x5edc04,_0x53f64f[_0x483eba(0x15c)]);_0x3f1d12&&_0x3f1d12[_0x483eba(0x195)]&&this['_threadCommentModel']['deleteComment'](_0x334b7e,_0x5edc04,_0x53f64f[_0x483eba(0x15c)]);break;}case _0x5e4060[_0x483eba(0x175)]:{this[_0x483eba(0x189)]['updateComment'](_0x334b7e,_0x5edc04,{'commentId':_0x53f64f[_0x483eba(0x15c)],'text':JSON['parse'](_0x53f64f[_0x483eba(0x19c)])});break;}case _0x5e4060[_0x483eba(0x188)]:{const _0x5de41c=(_0x5df1bb=this[_0x483eba(0x189)][_0x483eba(0x19d)](_0x53f64f[_0x483eba(0x149)])[_0x483eba(0x185)](_0x4622e1=>_0x4622e1['threadId']===_0x53f64f[_0x483eba(0x171)]))==null?void 0x0:_0x5df1bb['root'];_0x5de41c&&this[_0x483eba(0x189)]['resolveComment'](_0x334b7e,_0x5edc04,_0x5de41c['id'],_0x53f64f[_0x483eba(0x11f)]===_0x484586[_0x483eba(0x170)]);break;}}}));}};_0x415376=_0x276a2f([_0x1b5d06(0x0,_0x1a3eec[_0x54ff9a(0x187)](_0x57ede3[_0x54ff9a(0x16d)])),_0x1b5d06(0x1,_0x1a3eec[_0x54ff9a(0x187)](_0x1ac41c['ThreadCommentModel'])),_0x1b5d06(0x2,_0x1a3eec['Inject'](_0x1a3eec[_0x54ff9a(0x16b)])),_0x1b5d06(0x3,_0x1a3eec['Inject'](_0x1a3eec[_0x54ff9a(0x140)]))],_0x415376);const _0x163bb3='thread-comment-data-source.config',_0x3b344e={};var _0x509b79=Object[_0x54ff9a(0x144)],_0x2a7d4b=(_0x2f64dc,_0x2157a7,_0x3cfab6,_0x100865)=>{const _0x568d4f=_0x54ff9a;for(var _0x984a49=_0x100865>0x1?void 0x0:_0x100865?_0x509b79(_0x2157a7,_0x3cfab6):_0x2157a7,_0x2000cf=_0x2f64dc[_0x568d4f(0x192)]-0x1,_0x21cab0;_0x2000cf>=0x0;_0x2000cf--)(_0x21cab0=_0x2f64dc[_0x2000cf])&&(_0x984a49=_0x21cab0(_0x984a49)||_0x984a49);return _0x984a49;},_0x170555=(_0x45228f,_0x257c38)=>(_0x59ffc7,_0x1e0ba0)=>_0x257c38(_0x59ffc7,_0x1e0ba0,_0x45228f);function _0x1d0b8d(_0xd1db15,_0x539d69){const _0x17734c=_0x54ff9a,_0x3073bc=_0xd1db15[_0x17734c(0x136)][0x0];return{..._0x539d69,'id':_0x3073bc[_0x17734c(0x15c)],'resolved':_0xd1db15[_0x17734c(0x11f)]===0x1,'dT':_0x57bc42(_0x3073bc[_0x17734c(0x19e)]),'personId':_0x3073bc['userId'],'threadId':_0x3073bc[_0x17734c(0x171)]};}function _0x49c300(_0x392df8,_0x4b5949,_0x5939e6){const _0x74b241=_0x54ff9a;var _0x2a4697,_0x409883;if(((_0x409883=(_0x2a4697=_0x392df8==null?void 0x0:_0x392df8['replies'])==null?void 0x0:_0x2a4697[_0x74b241(0x192)])!=null?_0x409883:0x0)>0x0){const _0x2b20e1=(_0x5cc7a5,_0x40390d)=>({'id':_0x5cc7a5[_0x74b241(0x15c)],'threadId':_0x5cc7a5[_0x74b241(0x171)],'dT':_0x57bc42(_0x5cc7a5[_0x74b241(0x19e)]),'personId':_0x5cc7a5[_0x74b241(0x17b)],'resolved':_0x392df8['solved']===_0x484586[_0x74b241(0x170)],'unitId':_0x4b5949,'subUnitId':_0x5939e6,'text':JSON[_0x74b241(0x19b)](_0x5cc7a5[_0x74b241(0x19c)]),'parentId':_0x40390d}),_0x865f3d=_0x2b20e1(_0x392df8['replies'][0x0]);return{..._0x865f3d,'children':_0x392df8[_0x74b241(0x136)][_0x74b241(0x193)](0x1)[_0x74b241(0x178)](_0x328f85=>_0x2b20e1(_0x328f85,_0x865f3d['id']))};}return null;}let _0x178f16=class{constructor(_0xbc9869,_0x1f98d3,_0x2f62d2,_0x31b0d9){const _0x23107c=_0x54ff9a;this[_0x23107c(0x154)]=_0xbc9869,this[_0x23107c(0x197)]=_0x1f98d3,this[_0x23107c(0x160)]=_0x2f62d2,this['_injector']=_0x31b0d9;}async[_0x54ff9a(0x119)](_0xf451e1){const _0xbc620=_0x54ff9a;var _0x46ca60,_0x210ce6;const {parentId:_0x265309,unitId:_0x247b85,text:_0x4aac96,threadId:_0x46f97a}=_0xf451e1,_0xea42d1=(_0x210ce6=(_0x46ca60=_0x4aac96[_0xbc620(0x138)])==null?void 0x0:_0x46ca60[_0xbc620(0x135)](_0x262b14=>_0x262b14[_0xbc620(0x150)]===_0x1a3eec[_0xbc620(0x1a0)]['COMMENT'])[_0xbc620(0x178)](_0x1c9498=>_0x1c9498[_0xbc620(0x163)]))!=null?_0x210ce6:[],_0x1f0504=JSON[_0xbc620(0x164)](_0x4aac96),_0x21be1b=(await this[_0xbc620(0x160)]['requireSession'](_0x247b85))[_0xbc620(0x11e)]();if(_0x265309){const _0x4d3106={'memberId':_0x21be1b,'unitId':_0x247b85,'content':_0x1f0504,'mention':_0xea42d1,'threadId':_0x46f97a},_0x4220f7=(await this['_httpService'][_0xbc620(0x12c)](_0xbc620(0x147)+_0x247b85+_0xbc620(0x14e),{'body':_0x4d3106}))[_0xbc620(0x17a)][_0xbc620(0x14f)];return{..._0xf451e1,'id':_0x4220f7['replyId'],'dT':_0x1a3eec[_0xbc620(0x148)](+_0x4220f7[_0xbc620(0x19e)])[_0xbc620(0x11b)](_0xbc620(0x174)),'personId':_0x4220f7[_0xbc620(0x17b)]};}else{const _0x4ebb12={'memberId':_0x21be1b,'unitId':_0x247b85,'content':_0x1f0504,'mention':_0xea42d1},_0x19d80d=await this[_0xbc620(0x154)]['post'](_0xbc620(0x147)+_0x247b85+_0xbc620(0x165),{'body':_0x4ebb12});return _0x1d0b8d(_0x19d80d[_0xbc620(0x17a)]['comment'],_0xf451e1);}}async[_0x54ff9a(0x129)](_0xc43afe){const _0x15361e=_0x54ff9a;var _0x46b271,_0x12de5b;const {text:_0x5c0737,unitId:_0xbfb042}=_0xc43afe,_0x5a3c93=(_0x12de5b=(_0x46b271=_0x5c0737[_0x15361e(0x138)])==null?void 0x0:_0x46b271['filter'](_0x277262=>_0x277262[_0x15361e(0x150)]===_0x1a3eec['CustomRangeType'][_0x15361e(0x14b)])[_0x15361e(0x178)](_0x327df2=>_0x327df2[_0x15361e(0x163)]))!=null?_0x12de5b:[],_0x736795=JSON[_0x15361e(0x164)](_0x5c0737),_0x50ecf0=_0xc43afe[_0x15361e(0x171)],_0x55a228=_0xc43afe['id'],_0x34b35f={'memberId':(await this[_0x15361e(0x160)][_0x15361e(0x196)](_0xbfb042))[_0x15361e(0x11e)](),'unitId':_0xbfb042,'threadId':_0x50ecf0,'mention':_0x5a3c93,'content':_0x736795,'replyId':_0x55a228},_0x366de8=await this[_0x15361e(0x154)][_0x15361e(0x12c)](_0x15361e(0x147)+_0xbfb042+_0x15361e(0x11d),{'body':_0x34b35f});return!_0x366de8[_0x15361e(0x17a)][_0x15361e(0x158)]||_0x366de8[_0x15361e(0x17a)][_0x15361e(0x158)]['code']===0x1;}async[_0x54ff9a(0x198)](_0x43a5b1){const _0x362f68=_0x54ff9a,{unitId:_0x42a82d}=_0x43a5b1,_0x3fbf26=_0x43a5b1[_0x362f68(0x171)],_0x586984={'memberId':this[_0x362f68(0x197)][_0x362f68(0x125)]()[_0x362f68(0x13e)],'unitId':_0x42a82d,'threadId':_0x3fbf26,'solved':_0x43a5b1['resolved']?_0x484586['Solved']:_0x484586['OpenOrReOpen']},_0x21afeb=await this[_0x362f68(0x154)][_0x362f68(0x12c)](_0x362f68(0x147)+_0x42a82d+'/solved',{'body':_0x586984});return!_0x21afeb[_0x362f68(0x17a)][_0x362f68(0x158)]||_0x21afeb['body'][_0x362f68(0x158)][_0x362f68(0x17c)]===0x1;}async[_0x54ff9a(0x13a)](_0x12d1de,_0x4d3d9d,_0x3e716e,_0x9d1428){const _0x94bfb0=_0x54ff9a,_0x47884c={'memberId':(await this[_0x94bfb0(0x160)][_0x94bfb0(0x196)](_0x12d1de))[_0x94bfb0(0x11e)](),'threadId':_0x3e716e,'replyId':_0x9d1428,'unitId':_0x12d1de},_0x526c73=await this['_httpService'][_0x94bfb0(0x12c)](_0x94bfb0(0x147)+_0x12d1de+_0x94bfb0(0x16f),{'body':_0x47884c});return!_0x526c73[_0x94bfb0(0x17a)]['error']||_0x526c73[_0x94bfb0(0x17a)][_0x94bfb0(0x158)][_0x94bfb0(0x17c)]===0x1;}async[_0x54ff9a(0x15f)](_0x2e8aad,_0x52ed14,_0x224fbf){const _0x4b7a34=_0x54ff9a,_0x55a4bc={'unitId':_0x2e8aad,'threadId':_0x224fbf},_0xada793=await this[_0x4b7a34(0x154)]['post'](_0x4b7a34(0x147)+_0x2e8aad+_0x4b7a34(0x180),{'body':_0x55a4bc}),_0x54c04e=_0x224fbf[_0x4b7a34(0x178)](_0x33e924=>_0x49c300(_0xada793[_0x4b7a34(0x17a)][_0x4b7a34(0x155)][_0x33e924],_0x2e8aad,_0x52ed14))[_0x4b7a34(0x135)](Boolean);return Object[_0x4b7a34(0x190)](_0xada793[_0x4b7a34(0x17a)][_0x4b7a34(0x143)])[_0x4b7a34(0x131)](_0x3f811e=>{const _0x4839f9=_0x4b7a34;this[_0x4839f9(0x197)][_0x4839f9(0x1a1)](_0x3f811e);}),_0x54c04e;}[_0x54ff9a(0x18a)](_0x536e28){const _0x21d60e=_0x54ff9a;return{'id':_0x536e28['id'],'threadId':_0x536e28[_0x21d60e(0x171)],'ref':_0x536e28[_0x21d60e(0x181)]};}};_0x178f16=_0x2a7d4b([_0x170555(0x0,_0x1a3eec['Inject'](_0x111a10[_0x54ff9a(0x166)])),_0x170555(0x1,_0x1a3eec[_0x54ff9a(0x187)](_0x1a3eec[_0x54ff9a(0x16b)])),_0x170555(0x2,_0x1a3eec[_0x54ff9a(0x187)](_0x57ede3[_0x54ff9a(0x183)])),_0x170555(0x3,_0x1a3eec[_0x54ff9a(0x187)](_0x1a3eec[_0x54ff9a(0x140)]))],_0x178f16);var _0x2ecc0b=Object[_0x54ff9a(0x144)],_0x34f39d=(_0x16c1f8,_0x1c1e81,_0x40dffa,_0x40b90f)=>{for(var _0x4407f4=_0x40b90f>0x1?void 0x0:_0x40b90f?_0x2ecc0b(_0x1c1e81,_0x40dffa):_0x1c1e81,_0x581811=_0x16c1f8['length']-0x1,_0x5b6295;_0x581811>=0x0;_0x581811--)(_0x5b6295=_0x16c1f8[_0x581811])&&(_0x4407f4=_0x5b6295(_0x4407f4)||_0x4407f4);return _0x4407f4;},_0x8a9c1b=(_0x4822a4,_0x26dae3)=>(_0x5010e6,_0x4d20d0)=>_0x26dae3(_0x5010e6,_0x4d20d0,_0x4822a4);let _0x3f38ed=class extends _0x1a3eec[_0x54ff9a(0x134)]{constructor(_0x18e9e7,_0x571dce){const _0xd97f33=_0x54ff9a;super(),this['_threadCommentDataSourceService']=_0x18e9e7,this[_0xd97f33(0x173)]=_0x571dce,this[_0xd97f33(0x168)]();}[_0x54ff9a(0x168)](){const _0x5dd4c7=_0x54ff9a;this[_0x5dd4c7(0x169)]['dataSource']=this[_0x5dd4c7(0x173)],this[_0x5dd4c7(0x169)][_0x5dd4c7(0x176)]=!0x1;}};_0x3f38ed=_0x34f39d([_0x8a9c1b(0x0,_0x1ac41c[_0x54ff9a(0x12d)]),_0x8a9c1b(0x1,_0x1a3eec[_0x54ff9a(0x187)](_0x178f16))],_0x3f38ed);var _0x335069=Object['defineProperty'],_0x1f0cd4=Object['getOwnPropertyDescriptor'],_0x247c1a=(_0x3b7c04,_0x1b2606,_0x7aba86)=>_0x1b2606 in _0x3b7c04?_0x335069(_0x3b7c04,_0x1b2606,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x7aba86}):_0x3b7c04[_0x1b2606]=_0x7aba86,_0x21cde3=(_0x2c5852,_0x54d285,_0x362d78,_0xf6fb5)=>{const _0x37f9b4=_0x54ff9a;for(var _0x4a05ad=_0xf6fb5>0x1?void 0x0:_0xf6fb5?_0x1f0cd4(_0x54d285,_0x362d78):_0x54d285,_0x5802fa=_0x2c5852[_0x37f9b4(0x192)]-0x1,_0x267d42;_0x5802fa>=0x0;_0x5802fa--)(_0x267d42=_0x2c5852[_0x5802fa])&&(_0x4a05ad=_0x267d42(_0x4a05ad)||_0x4a05ad);return _0x4a05ad;},_0x52a6ef=(_0x1b0364,_0x5c0ddb)=>(_0xcfa587,_0x21bdf2)=>_0x5c0ddb(_0xcfa587,_0x21bdf2,_0x1b0364),_0xb5282f=(_0x53c3c2,_0x55100a,_0x591ea5)=>_0x247c1a(_0x53c3c2,typeof _0x55100a!='symbol'?_0x55100a+'':_0x55100a,_0x591ea5);_0x4356d4[_0x54ff9a(0x141)]=class extends _0x1a3eec[_0x54ff9a(0x19f)]{constructor(_0x4e9b50=_0x3b344e,_0x3c5315,_0x44a5c2){const _0x4d85b0=_0x54ff9a;super(),this[_0x4d85b0(0x120)]=_0x4e9b50,this[_0x4d85b0(0x137)]=_0x3c5315,this[_0x4d85b0(0x14a)]=_0x44a5c2;const {..._0x50ad4a}=_0x1a3eec[_0x4d85b0(0x15e)]({},_0x3b344e,this[_0x4d85b0(0x120)]);this['_configService'][_0x4d85b0(0x14d)](_0x163bb3,_0x50ad4a);}['onStarting'](){const _0x359698=_0x54ff9a;[[_0x178f16],[_0x3f38ed],[_0x415376]][_0x359698(0x131)](_0x25c887=>{const _0x5791d5=_0x359698;this[_0x5791d5(0x137)][_0x5791d5(0x194)](_0x25c887);});}['onReady'](){const _0x3edc80=_0x54ff9a;this['_injector'][_0x3edc80(0x142)](_0x3f38ed),this[_0x3edc80(0x137)][_0x3edc80(0x142)](_0x415376);}},_0xb5282f(_0x4356d4['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x312f13),_0xb5282f(_0x4356d4[_0x54ff9a(0x141)],_0x54ff9a(0x15d),_0x1a3eec[_0x54ff9a(0x11a)]['UNIVER_UNKNOWN']),_0x4356d4[_0x54ff9a(0x141)]=_0x21cde3([_0x1a3eec['DependentOn'](_0x387b75[_0x54ff9a(0x156)],_0x57ede3['UniverCollaborationClientPlugin'],_0x23dd2c['UniverLicensePlugin']),_0x52a6ef(0x1,_0x1a3eec[_0x54ff9a(0x187)](_0x1a3eec[_0x54ff9a(0x140)])),_0x52a6ef(0x2,_0x1a3eec[_0x54ff9a(0x162)])],_0x4356d4['UniverThreadCommentDataSourcePlugin']),Object[_0x54ff9a(0x17d)](_0x4356d4,Symbol[_0x54ff9a(0x186)],{'value':_0x54ff9a(0x18d)});}));function _0x3563(_0x1ec659,_0x4c5a49){const _0x45bc6c=_0x45bc();return _0x3563=function(_0x356306,_0x5f1a7e){_0x356306=_0x356306-0x119;let _0x2379db=_0x45bc6c[_0x356306];return _0x2379db;},_0x3563(_0x1ec659,_0x4c5a49);}function _0x45bc(){const _0x1c2881=['3616VlXgnJ','map','UniverProLicense','body','userId','code','defineProperty','UniverThreadComment','pipe','/list','ref','740046eRuNzT','CollaborationSessionService','OpenOrReOpen','find','toStringTag','Inject','Solve','_threadCommentModel','saveCommentToSnapshot','UNRECOGNIZED','_commentService','Module','subscribe','@univerjs/core','values','UniverThreadCommentUi','length','slice','add','parentId','requireSession','_userService','resolveComment','@univerjs/thread-comment-ui','Add','parse','content','getUnit','createTimestamp','Plugin','CustomRangeType','addUser','addComment','UniverInstanceType','format','1055110vmTlFw','/edit','getMemberID','solved','_config','@univerjs-pro/license','root','amd','size','getCurrentUser','exports','774860LIVNoy','1gYEBgM','updateComment','@univerjs/network','getComment','post','IThreadCommentDataSourceService','_initUserSync','311013dgihtV','12jpMQbC','forEach','bufferTime','136QkuuOd','Disposable','filter','replies','_injector','customRanges','1500KXWArA','deleteComment','commentUpdate$','Delete','2907415LOtOBI','userID','@univerjs-pro/collaboration-client','Injector','UniverThreadCommentDataSourcePlugin','get','users','getOwnPropertyDescriptor','_init','Reply','/universer-api/comment/unit/','dayjs','unitId','_configService','COMMENT','payload','setConfig','/reply','reply','rangeType','/universer-api/user/list','6489098bPhkJo','disposeWithMe','_httpService','comments','UniverThreadCommentUIPlugin','object','error','6ySGsQt','getUser','UniverProCollaborationClient','replyId','type','merge','listComments','_sessionService','user','IConfigService','rangeId','stringify','/add','HTTPService','Unknown','_initDataSource','_threadCommentDataSourceService','delete','UserManagerService','@univerjs/thread-comment','CommentService','rxjs','/delete','Solved','threadId','UniverCore','_threadCommentDataSource','YYYY/MM/DD\x20HH:mm','Edit','syncUpdateMutationToColla'];_0x45bc=function(){return _0x1c2881;};return _0x45bc();}
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.202506271607",
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.202506271607",
49
+ "@univerjs-pro/license": "0.8.3-nightly.202506271607",
51
50
  "@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"
51
+ "@univerjs/network": "0.8.3-nightly.202506271607",
52
+ "@univerjs/core": "0.8.3-nightly.202506271607",
53
+ "@univerjs/thread-comment": "0.8.3-nightly.202506271607",
54
+ "@univerjs/thread-comment-ui": "0.8.3-nightly.202506271607"
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",