@univerjs-pro/thread-comment-datasource 0.5.2-nightly.202501031606 → 0.5.3-experimental.20250106-e3b7a39

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 _0x55b59=_0x4fcc;(function(_0x438e8a,_0x13b19d){const _0x55482e=_0x4fcc,_0x12a6c1=_0x438e8a();while(!![]){try{const _0x195c94=parseInt(_0x55482e(0x1f7))/0x1+-parseInt(_0x55482e(0x245))/0x2*(parseInt(_0x55482e(0x1f4))/0x3)+-parseInt(_0x55482e(0x20d))/0x4+parseInt(_0x55482e(0x225))/0x5*(-parseInt(_0x55482e(0x1ec))/0x6)+-parseInt(_0x55482e(0x246))/0x7*(parseInt(_0x55482e(0x1e5))/0x8)+-parseInt(_0x55482e(0x208))/0x9*(-parseInt(_0x55482e(0x21a))/0xa)+parseInt(_0x55482e(0x22f))/0xb;if(_0x195c94===_0x13b19d)break;else _0x12a6c1['push'](_0x12a6c1['shift']());}catch(_0x471fe5){_0x12a6c1['push'](_0x12a6c1['shift']());}}}(_0xe1f9,0xa0a73));Object[_0x55b59(0x22b)](exports,Symbol[_0x55b59(0x21d)],{'value':'Module'});const C=require(_0x55b59(0x21c)),T=require('@univerjs-pro/license'),c=require(_0x55b59(0x250)),w=require(_0x55b59(0x1ee)),P=require(_0x55b59(0x233)),U=require('rxjs'),M=require(_0x55b59(0x226)),R=_0x55b59(0x214);var I=(_0x1925bf=>(_0x1925bf[_0x1925bf[_0x55b59(0x213)]=0x0]=_0x55b59(0x213),_0x1925bf[_0x1925bf[_0x55b59(0x219)]=0x1]=_0x55b59(0x219),_0x1925bf[_0x1925bf[_0x55b59(0x1fd)]=-0x1]='UNRECOGNIZED',_0x1925bf))(I||{}),v=(_0x38c6b2=>(_0x38c6b2[_0x38c6b2['Unknown']=0x0]=_0x55b59(0x205),_0x38c6b2[_0x38c6b2['Add']=0x1]=_0x55b59(0x217),_0x38c6b2[_0x38c6b2[_0x55b59(0x257)]=0x2]=_0x55b59(0x257),_0x38c6b2[_0x38c6b2[_0x55b59(0x24c)]=0x3]=_0x55b59(0x24c),_0x38c6b2[_0x38c6b2[_0x55b59(0x1f6)]=0x4]=_0x55b59(0x1f6),_0x38c6b2[_0x38c6b2[_0x55b59(0x239)]=0x5]=_0x55b59(0x239),_0x38c6b2[_0x38c6b2[_0x55b59(0x1fd)]=-0x1]=_0x55b59(0x1fd),_0x38c6b2))(v||{});function _0x4fcc(_0x5ee159,_0x432902){const _0xe1f91d=_0xe1f9();return _0x4fcc=function(_0x4fcc9c,_0x2f647c){_0x4fcc9c=_0x4fcc9c-0x1df;let _0x42d1db=_0xe1f91d[_0x4fcc9c];return _0x42d1db;},_0x4fcc(_0x5ee159,_0x432902);}const g=_0x2cf0d6=>c[_0x55b59(0x253)](new Date(+_0x2cf0d6))['format'](_0x55b59(0x240)),$=async(_0x5b669c,_0x4bbdeb)=>{const _0x4876c0=_0x55b59,_0x34d7b=_0x5b669c[_0x4876c0(0x24d)](c['UserManagerService']),_0x5eca42=_0x5b669c['get'](M[_0x4876c0(0x1fa)]);_0x4bbdeb[_0x4876c0(0x1f1)](_0x406215=>{const _0x212d74=_0x4876c0;_0x34d7b[_0x212d74(0x206)](_0x406215)&&_0x4bbdeb[_0x212d74(0x1f2)](_0x406215);}),_0x4bbdeb['size']&&(await _0x5eca42[_0x4876c0(0x24d)](_0x4876c0(0x252),{'params':{'userIDs':[..._0x4bbdeb]}}))[_0x4876c0(0x23f)]['users'][_0x4876c0(0x1f1)](_0x39c2ad=>{const _0x597c72=_0x4876c0;_0x39c2ad&&_0x34d7b[_0x597c72(0x241)](_0x39c2ad);});};var E=Object['defineProperty'],q=Object[_0x55b59(0x251)],A=(_0x197e1f,_0x1be572,_0x477008,_0x1790ca)=>{const _0x1edab7=_0x55b59;for(var _0x3be1f4=_0x1790ca>0x1?void 0x0:_0x1790ca?q(_0x1be572,_0x477008):_0x1be572,_0x39c47f=_0x197e1f[_0x1edab7(0x231)]-0x1,_0x24a51a;_0x39c47f>=0x0;_0x39c47f--)(_0x24a51a=_0x197e1f[_0x39c47f])&&(_0x3be1f4=(_0x1790ca?_0x24a51a(_0x1be572,_0x477008,_0x3be1f4):_0x24a51a(_0x3be1f4))||_0x3be1f4);return _0x1790ca&&_0x3be1f4&&E(_0x1be572,_0x477008,_0x3be1f4),_0x3be1f4;},_=(_0x2990aa,_0x60eb70)=>(_0x364cdc,_0x52dbf4)=>_0x60eb70(_0x364cdc,_0x52dbf4,_0x2990aa);let S=class extends c['Disposable']{constructor(_0x5efb22,_0x40d525,_0x3be199,_0x12382a){const _0x592b18=_0x55b59;super(),this[_0x592b18(0x23d)]=_0x5efb22,this['_threadCommentModel']=_0x40d525,this[_0x592b18(0x212)]=_0x3be199,this[_0x592b18(0x24b)]=_0x12382a,this[_0x592b18(0x25d)](),this['_initUserSync']();}[_0x55b59(0x209)](){const _0x81812=_0x55b59;this['disposeWithMe'](this[_0x81812(0x20b)][_0x81812(0x224)][_0x81812(0x1e0)](U[_0x81812(0x23e)](0x10))['subscribe'](_0xd2ac37=>{const _0x3364e1=_0x81812,_0x2940a0=new Set();_0xd2ac37[_0x3364e1(0x1f1)](_0x111572=>{const _0x278090=_0x3364e1;switch(_0x111572[_0x278090(0x21f)]){case'add':{const _0x354cfc=_0x111572[_0x278090(0x1f0)][_0x278090(0x1ff)];_0x2940a0[_0x278090(0x201)](_0x354cfc);break;}}}),$(this[_0x3364e1(0x24b)],_0x2940a0);}));}[_0x55b59(0x25d)](){const _0x31f9d3=_0x55b59;this['disposeWithMe'](this[_0x31f9d3(0x23d)][_0x31f9d3(0x224)][_0x31f9d3(0x255)](async _0x524214=>{const _0x151a0a=_0x31f9d3;var _0x146df1,_0xa8ea18,_0x1c07b6,_0x16679b;const _0x1464a1=(_0x146df1=this[_0x151a0a(0x20b)][_0x151a0a(0x25b)](_0x524214[_0x151a0a(0x204)])[_0x151a0a(0x22e)](_0x5d770c=>_0x5d770c['threadId']===_0x524214['threadId']))==null?void 0x0:_0x146df1[_0x151a0a(0x247)];if(!_0x1464a1)return;const {unitId:_0x17b35a,subUnitId:_0x6ef6e1}=_0x1464a1;switch(_0x524214[_0x151a0a(0x1f3)]&&this['_userService']['addUser'](_0x524214[_0x151a0a(0x1f3)]),_0x524214[_0x151a0a(0x21f)]){case v['Add']:break;case v[_0x151a0a(0x257)]:{this[_0x151a0a(0x20b)][_0x151a0a(0x218)](_0x17b35a,_0x6ef6e1,{'unitId':_0x17b35a,'subUnitId':_0x6ef6e1,'ref':'','id':_0x524214[_0x151a0a(0x24f)],'dT':g(+_0x524214[_0x151a0a(0x1ed)]),'threadId':_0x524214[_0x151a0a(0x237)],'personId':(_0x1c07b6=(_0xa8ea18=_0x524214[_0x151a0a(0x1f3)])==null?void 0x0:_0xa8ea18['userID'])!=null?_0x1c07b6:_0x524214[_0x151a0a(0x20e)],'text':JSON[_0x151a0a(0x254)](_0x524214[_0x151a0a(0x24e)]),'parentId':_0x1464a1['id']});break;}case v[_0x151a0a(0x1f6)]:{const _0x21d04e=this[_0x151a0a(0x20b)][_0x151a0a(0x259)](_0x17b35a,_0x6ef6e1,_0x524214['replyId']);_0x21d04e&&_0x21d04e[_0x151a0a(0x1fe)]&&this[_0x151a0a(0x20b)][_0x151a0a(0x1f8)](_0x17b35a,_0x6ef6e1,_0x524214[_0x151a0a(0x24f)]);break;}case v[_0x151a0a(0x24c)]:{this[_0x151a0a(0x20b)]['updateComment'](_0x17b35a,_0x6ef6e1,{'commentId':_0x524214[_0x151a0a(0x24f)],'text':JSON[_0x151a0a(0x254)](_0x524214[_0x151a0a(0x24e)])});break;}case v[_0x151a0a(0x239)]:{const _0x5cad7c=(_0x16679b=this[_0x151a0a(0x20b)][_0x151a0a(0x25b)](_0x524214[_0x151a0a(0x204)])['find'](_0x5ad90b=>_0x5ad90b[_0x151a0a(0x237)]===_0x524214[_0x151a0a(0x237)]))==null?void 0x0:_0x16679b[_0x151a0a(0x247)];_0x5cad7c&&this['_threadCommentModel'][_0x151a0a(0x1e6)](_0x17b35a,_0x6ef6e1,_0x5cad7c['id'],_0x524214[_0x151a0a(0x1df)]===I[_0x151a0a(0x219)]);break;}}}));}};S=A([_(0x0,c['Inject'](C[_0x55b59(0x21b)])),_(0x1,c[_0x55b59(0x1eb)](P['ThreadCommentModel'])),_(0x2,c['Inject'](c[_0x55b59(0x221)])),_(0x3,c[_0x55b59(0x1eb)](c[_0x55b59(0x229)]))],S);const x=_0x55b59(0x1e1),D={};var Y=Object[_0x55b59(0x22b)],G=Object[_0x55b59(0x251)],H=(_0xf694e7,_0x5c6189,_0x453b7c,_0x520945)=>{for(var _0x230058=_0x520945>0x1?void 0x0:_0x520945?G(_0x5c6189,_0x453b7c):_0x5c6189,_0x1b1d8f=_0xf694e7['length']-0x1,_0x1ba44f;_0x1b1d8f>=0x0;_0x1b1d8f--)(_0x1ba44f=_0xf694e7[_0x1b1d8f])&&(_0x230058=(_0x520945?_0x1ba44f(_0x5c6189,_0x453b7c,_0x230058):_0x1ba44f(_0x230058))||_0x230058);return _0x520945&&_0x230058&&Y(_0x5c6189,_0x453b7c,_0x230058),_0x230058;},p=(_0x166447,_0x347efc)=>(_0x5f04f0,_0x40ac0e)=>_0x347efc(_0x5f04f0,_0x40ac0e,_0x166447);function J(_0x568174,_0x38ca6d){const _0x22e2b3=_0x55b59,_0x2f81db=_0x568174[_0x22e2b3(0x1e2)][0x0];return{..._0x38ca6d,'id':_0x2f81db[_0x22e2b3(0x24f)],'resolved':_0x568174['solved']===0x1,'dT':g(_0x2f81db[_0x22e2b3(0x1ed)]),'personId':_0x2f81db[_0x22e2b3(0x20e)],'threadId':_0x2f81db[_0x22e2b3(0x237)]};}function F(_0x43b42e,_0xd2680c,_0x5f00d0){const _0x36366e=_0x55b59;var _0x266483,_0x50b1e6;if(((_0x50b1e6=(_0x266483=_0x43b42e==null?void 0x0:_0x43b42e[_0x36366e(0x1e2)])==null?void 0x0:_0x266483[_0x36366e(0x231)])!=null?_0x50b1e6:0x0)>0x0){const _0x335fbc=(_0x367ed4,_0x18915a)=>({'id':_0x367ed4[_0x36366e(0x24f)],'threadId':_0x367ed4['threadId'],'dT':g(_0x367ed4['createTimestamp']),'personId':_0x367ed4['userId'],'resolved':_0x43b42e[_0x36366e(0x1df)]===I['Solved'],'unitId':_0xd2680c,'subUnitId':_0x5f00d0,'text':JSON['parse'](_0x367ed4[_0x36366e(0x24e)]),'parentId':_0x18915a}),_0x2d6516=_0x335fbc(_0x43b42e[_0x36366e(0x1e2)][0x0]);return{..._0x2d6516,'children':_0x43b42e[_0x36366e(0x1e2)][_0x36366e(0x244)](0x1)[_0x36366e(0x22c)](_0x45346d=>_0x335fbc(_0x45346d,_0x2d6516['id']))};}return null;}let f=class{constructor(_0x331867,_0x365333,_0x344ced,_0x17ada4){const _0x2586ab=_0x55b59;this[_0x2586ab(0x242)]=_0x331867,this[_0x2586ab(0x212)]=_0x365333,this[_0x2586ab(0x25e)]=_0x344ced,this[_0x2586ab(0x24b)]=_0x17ada4;}async['addComment'](_0x53708b){const _0x1b544e=_0x55b59;var _0x31a47b,_0x3eebea;const {parentId:_0x54721b,unitId:_0x5ec88e,text:_0x593b8f,threadId:_0x49453d}=_0x53708b,_0x3ef21e=(_0x3eebea=(_0x31a47b=_0x593b8f['customRanges'])==null?void 0x0:_0x31a47b[_0x1b544e(0x23b)](_0x2ab11f=>_0x2ab11f[_0x1b544e(0x260)]===c[_0x1b544e(0x249)]['COMMENT'])[_0x1b544e(0x22c)](_0x47a1ef=>_0x47a1ef[_0x1b544e(0x1e8)]))!=null?_0x3eebea:[],_0x1cdd87=JSON[_0x1b544e(0x258)](_0x593b8f),_0x38d76e=(await this[_0x1b544e(0x25e)][_0x1b544e(0x243)](_0x5ec88e))['getMemberID']();if(_0x54721b){const _0xb7b5c0={'memberId':_0x38d76e,'unitId':_0x5ec88e,'content':_0x1cdd87,'mention':_0x3ef21e,'threadId':_0x49453d},_0x1e9080=(await this[_0x1b544e(0x242)][_0x1b544e(0x236)](_0x1b544e(0x1e7)+_0x5ec88e+'/reply',{'body':_0xb7b5c0}))[_0x1b544e(0x23f)]['reply'];return{..._0x53708b,'id':_0x1e9080[_0x1b544e(0x24f)],'dT':c[_0x1b544e(0x253)](+_0x1e9080[_0x1b544e(0x1ed)])[_0x1b544e(0x1ea)](_0x1b544e(0x240)),'personId':_0x1e9080['userId']};}else{const _0x119e98={'memberId':_0x38d76e,'unitId':_0x5ec88e,'content':_0x1cdd87,'mention':_0x3ef21e},_0x322367=await this[_0x1b544e(0x242)][_0x1b544e(0x236)](_0x1b544e(0x1e7)+_0x5ec88e+_0x1b544e(0x1e3),{'body':_0x119e98});return J(_0x322367['body'][_0x1b544e(0x234)],_0x53708b);}}async[_0x55b59(0x200)](_0x5ba6d7){const _0x3c69a5=_0x55b59;var _0x189089,_0x3a3c5e;const {text:_0x52547c,unitId:_0x4b83a5}=_0x5ba6d7,_0x13a52b=(_0x3a3c5e=(_0x189089=_0x52547c[_0x3c69a5(0x1f9)])==null?void 0x0:_0x189089[_0x3c69a5(0x23b)](_0x1fd14f=>_0x1fd14f[_0x3c69a5(0x260)]===c[_0x3c69a5(0x249)][_0x3c69a5(0x21e)])[_0x3c69a5(0x22c)](_0x239eee=>_0x239eee['rangeId']))!=null?_0x3a3c5e:[],_0x24ef3c=JSON['stringify'](_0x52547c),_0x220723=_0x5ba6d7['threadId'],_0x42a4b4=_0x5ba6d7['id'],_0x3d0236={'memberId':(await this[_0x3c69a5(0x25e)][_0x3c69a5(0x243)](_0x4b83a5))[_0x3c69a5(0x235)](),'unitId':_0x4b83a5,'threadId':_0x220723,'mention':_0x13a52b,'content':_0x24ef3c,'replyId':_0x42a4b4},_0x39786c=await this[_0x3c69a5(0x242)]['post'](_0x3c69a5(0x1e7)+_0x4b83a5+_0x3c69a5(0x1ef),{'body':_0x3d0236});return!_0x39786c[_0x3c69a5(0x23f)][_0x3c69a5(0x230)]||_0x39786c[_0x3c69a5(0x23f)][_0x3c69a5(0x230)]['code']===0x1;}async[_0x55b59(0x1e6)](_0x26ae81){const _0x57d314=_0x55b59,{unitId:_0x18139c}=_0x26ae81,_0x3b3929=_0x26ae81[_0x57d314(0x237)],_0x3cf249={'memberId':this[_0x57d314(0x212)]['getCurrentUser']()['userID'],'unitId':_0x18139c,'threadId':_0x3b3929,'solved':_0x26ae81['resolved']?I[_0x57d314(0x219)]:I[_0x57d314(0x213)]},_0x484a21=await this[_0x57d314(0x242)][_0x57d314(0x236)](_0x57d314(0x1e7)+_0x18139c+_0x57d314(0x20c),{'body':_0x3cf249});return!_0x484a21[_0x57d314(0x23f)][_0x57d314(0x230)]||_0x484a21[_0x57d314(0x23f)][_0x57d314(0x230)][_0x57d314(0x227)]===0x1;}async[_0x55b59(0x1f8)](_0x4b84f5,_0xf0488c,_0x58cda5,_0x2c2eae){const _0x37dc44=_0x55b59,_0x3bcff1={'memberId':(await this[_0x37dc44(0x25e)][_0x37dc44(0x243)](_0x4b84f5))[_0x37dc44(0x235)](),'threadId':_0x58cda5,'replyId':_0x2c2eae,'unitId':_0x4b84f5},_0x59b947=await this[_0x37dc44(0x242)][_0x37dc44(0x236)](_0x37dc44(0x1e7)+_0x4b84f5+_0x37dc44(0x1f5),{'body':_0x3bcff1});return!_0x59b947[_0x37dc44(0x23f)]['error']||_0x59b947[_0x37dc44(0x23f)][_0x37dc44(0x230)][_0x37dc44(0x227)]===0x1;}async[_0x55b59(0x20f)](_0x10e4f4,_0x142c63,_0x4406c3){const _0x4ac80b=_0x55b59,_0x33a18b={'unitId':_0x10e4f4,'threadId':_0x4406c3},_0x85f269=await this['_httpService']['post'](_0x4ac80b(0x1e7)+_0x10e4f4+_0x4ac80b(0x20a),{'body':_0x33a18b}),_0x665023=_0x4406c3[_0x4ac80b(0x22c)](_0x159634=>F(_0x85f269['body'][_0x4ac80b(0x248)][_0x159634],_0x10e4f4,_0x142c63))[_0x4ac80b(0x23b)](Boolean);return Object[_0x4ac80b(0x1e9)](_0x85f269['body'][_0x4ac80b(0x228)])[_0x4ac80b(0x1f1)](_0x1332e9=>{const _0x37e6d4=_0x4ac80b;this[_0x37e6d4(0x212)][_0x37e6d4(0x241)](_0x1332e9);}),_0x665023;}[_0x55b59(0x232)](_0x142cf0){const _0x1b0fc=_0x55b59;return{'id':_0x142cf0['id'],'threadId':_0x142cf0[_0x1b0fc(0x237)],'ref':_0x142cf0[_0x1b0fc(0x256)]};}};function _0xe1f9(){const _0x1e8094=['/solved','4785712tZRnLY','userId','listComments','UNIVER_UNKNOWN','pluginName','_userService','OpenOrReOpen','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverCollaborationClientPlugin','Plugin','Add','addComment','Solved','410gAperP','CommentService','@univerjs-pro/collaboration-client','toStringTag','COMMENT','type','IThreadCommentDataSourceService','UserManagerService','CollaborationSessionService','dataSource','commentUpdate$','795quxizb','@univerjs/network','code','users','Injector','_threadCommentDataSourceService','defineProperty','map','symbol','find','32409201iQoJCM','error','length','saveCommentToSnapshot','@univerjs/thread-comment','comment','getMemberID','post','threadId','onReady','Solve','_config','filter','UniverLicensePlugin','_commentService','bufferTime','body','YYYY/MM/DD\x20HH:mm','addUser','_httpService','requireSession','slice','832942TTZQUV','1297163dxwkIJ','root','comments','CustomRangeType','DependentOn','_injector','Edit','get','content','replyId','@univerjs/core','getOwnPropertyDescriptor','/universer-api/user/list','dayjs','parse','subscribe','ref','Reply','stringify','getComment','syncUpdateMutationToColla','getUnit','_initDataSource','_init','_sessionService','UniverInstanceType','rangeType','solved','pipe','thread-comment-data-source.config','replies','/add','UniverThreadCommentDataSourcePlugin','40EUXmLF','resolveComment','/universer-api/comment/unit/','rangeId','values','format','Inject','6378htwUgo','createTimestamp','@univerjs/thread-comment-ui','/edit','payload','forEach','delete','user','3waKnUi','/delete','Delete','366126wKsEcu','deleteComment','customRanges','HTTPService','_configService','IConfigService','UNRECOGNIZED','parentId','personId','updateComment','add','_threadCommentDataSource','merge','unitId','Unknown','getUser','setConfig','11871TkZJDB','_initUserSync','/list','_threadCommentModel'];_0xe1f9=function(){return _0x1e8094;};return _0xe1f9();}f=H([p(0x0,c['Inject'](M[_0x55b59(0x1fa)])),p(0x1,c['Inject'](c[_0x55b59(0x221)])),p(0x2,c[_0x55b59(0x1eb)](C[_0x55b59(0x222)])),p(0x3,c[_0x55b59(0x1eb)](c[_0x55b59(0x229)]))],f);var L=Object[_0x55b59(0x22b)],Z=Object[_0x55b59(0x251)],W=(_0xaff444,_0x9ef037,_0x22d1c9,_0x3d9cb8)=>{const _0x4444a6=_0x55b59;for(var _0x553736=_0x3d9cb8>0x1?void 0x0:_0x3d9cb8?Z(_0x9ef037,_0x22d1c9):_0x9ef037,_0xf7f990=_0xaff444[_0x4444a6(0x231)]-0x1,_0x4c53bf;_0xf7f990>=0x0;_0xf7f990--)(_0x4c53bf=_0xaff444[_0xf7f990])&&(_0x553736=(_0x3d9cb8?_0x4c53bf(_0x9ef037,_0x22d1c9,_0x553736):_0x4c53bf(_0x553736))||_0x553736);return _0x3d9cb8&&_0x553736&&L(_0x9ef037,_0x22d1c9,_0x553736),_0x553736;},O=(_0x2bbe4d,_0x1e77b6)=>(_0x551e56,_0x4a622b)=>_0x1e77b6(_0x551e56,_0x4a622b,_0x2bbe4d);let b=class extends c['Disposable']{constructor(_0x652154,_0x1741b1){const _0x3b9191=_0x55b59;super(),this[_0x3b9191(0x22a)]=_0x652154,this[_0x3b9191(0x202)]=_0x1741b1,this[_0x3b9191(0x25c)]();}['_initDataSource'](){const _0xb2a64=_0x55b59;this[_0xb2a64(0x22a)][_0xb2a64(0x223)]=this[_0xb2a64(0x202)],this['_threadCommentDataSourceService'][_0xb2a64(0x25a)]=!0x1;}};b=W([O(0x0,P[_0x55b59(0x220)]),O(0x1,c[_0x55b59(0x1eb)](f))],b);var j=Object[_0x55b59(0x22b)],B=Object[_0x55b59(0x251)],K=(_0x14644a,_0x57b942,_0x417ad9)=>_0x57b942 in _0x14644a?j(_0x14644a,_0x57b942,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x417ad9}):_0x14644a[_0x57b942]=_0x417ad9,V=(_0x412459,_0x7c3f7c,_0x287181,_0x466166)=>{const _0x480a8a=_0x55b59;for(var _0x511214=_0x466166>0x1?void 0x0:_0x466166?B(_0x7c3f7c,_0x287181):_0x7c3f7c,_0x26d9ff=_0x412459[_0x480a8a(0x231)]-0x1,_0x4cad18;_0x26d9ff>=0x0;_0x26d9ff--)(_0x4cad18=_0x412459[_0x26d9ff])&&(_0x511214=(_0x466166?_0x4cad18(_0x7c3f7c,_0x287181,_0x511214):_0x4cad18(_0x511214))||_0x511214);return _0x466166&&_0x511214&&j(_0x7c3f7c,_0x287181,_0x511214),_0x511214;},y=(_0x329360,_0x777c34)=>(_0x29e58a,_0x55bb49)=>_0x777c34(_0x29e58a,_0x55bb49,_0x329360),N=(_0x11a17a,_0x2a0ca6,_0x4bb7ba)=>K(_0x11a17a,typeof _0x2a0ca6!=_0x55b59(0x22d)?_0x2a0ca6+'':_0x2a0ca6,_0x4bb7ba);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x55b59(0x216)]{constructor(_0x354f36=D,_0xc366eb,_0x2b6dcd){const _0x2ce44b=_0x55b59;super(),this[_0x2ce44b(0x23a)]=_0x354f36,this['_injector']=_0xc366eb,this[_0x2ce44b(0x1fb)]=_0x2b6dcd;const {..._0x26e5a3}=c[_0x2ce44b(0x203)]({},D,this[_0x2ce44b(0x23a)]);this[_0x2ce44b(0x1fb)][_0x2ce44b(0x207)](x,_0x26e5a3);}['onStarting'](){const _0x2088c7=_0x55b59;[[f],[b],[S]][_0x2088c7(0x1f1)](_0x4e6a74=>{const _0x224421=_0x2088c7;this[_0x224421(0x24b)][_0x224421(0x201)](_0x4e6a74);});}[_0x55b59(0x238)](){const _0x178c49=_0x55b59;this[_0x178c49(0x24b)][_0x178c49(0x24d)](b),this[_0x178c49(0x24b)][_0x178c49(0x24d)](S);}},N(exports[_0x55b59(0x1e4)],_0x55b59(0x211),R),N(exports['UniverThreadCommentDataSourcePlugin'],_0x55b59(0x21f),c[_0x55b59(0x25f)][_0x55b59(0x210)]),exports[_0x55b59(0x1e4)]=V([c[_0x55b59(0x24a)](w['UniverThreadCommentUIPlugin'],C[_0x55b59(0x215)],T[_0x55b59(0x23c)]),y(0x1,c['Inject'](c['Injector'])),y(0x2,c[_0x55b59(0x1fc)])],exports[_0x55b59(0x1e4)]);
1
+ 'use strict';const _0x4449da=_0xc73f;(function(_0xbeff76,_0x102059){const _0x22f8c4=_0xc73f,_0x5d3d4f=_0xbeff76();while(!![]){try{const _0x6ff9a1=-parseInt(_0x22f8c4(0xe5))/0x1+-parseInt(_0x22f8c4(0xbf))/0x2+-parseInt(_0x22f8c4(0x9d))/0x3*(parseInt(_0x22f8c4(0xaf))/0x4)+-parseInt(_0x22f8c4(0xb0))/0x5+-parseInt(_0x22f8c4(0xb2))/0x6+parseInt(_0x22f8c4(0xb7))/0x7*(-parseInt(_0x22f8c4(0xab))/0x8)+parseInt(_0x22f8c4(0xe0))/0x9;if(_0x6ff9a1===_0x102059)break;else _0x5d3d4f['push'](_0x5d3d4f['shift']());}catch(_0xd9809){_0x5d3d4f['push'](_0x5d3d4f['shift']());}}}(_0x43cf,0x20be4));Object[_0x4449da(0x89)](exports,Symbol['toStringTag'],{'value':'Module'});const C=require('@univerjs-pro/collaboration-client'),T=require(_0x4449da(0xd6)),c=require('@univerjs/core'),w=require(_0x4449da(0xe2)),P=require(_0x4449da(0xe8)),U=require('rxjs'),M=require(_0x4449da(0xee)),R=_0x4449da(0xca);var I=(_0x50ae21=>(_0x50ae21[_0x50ae21['OpenOrReOpen']=0x0]=_0x4449da(0xc0),_0x50ae21[_0x50ae21[_0x4449da(0xf6)]=0x1]=_0x4449da(0xf6),_0x50ae21[_0x50ae21['UNRECOGNIZED']=-0x1]=_0x4449da(0xa8),_0x50ae21))(I||{}),v=(_0x402ff5=>(_0x402ff5[_0x402ff5[_0x4449da(0xb9)]=0x0]=_0x4449da(0xb9),_0x402ff5[_0x402ff5[_0x4449da(0x9a)]=0x1]=_0x4449da(0x9a),_0x402ff5[_0x402ff5['Reply']=0x2]=_0x4449da(0x8c),_0x402ff5[_0x402ff5[_0x4449da(0xed)]=0x3]='Edit',_0x402ff5[_0x402ff5[_0x4449da(0xd8)]=0x4]='Delete',_0x402ff5[_0x402ff5[_0x4449da(0xb4)]=0x5]=_0x4449da(0xb4),_0x402ff5[_0x402ff5[_0x4449da(0xa8)]=-0x1]=_0x4449da(0xa8),_0x402ff5))(v||{});function _0xc73f(_0x4b8a8a,_0x2137ef){const _0x43cfaa=_0x43cf();return _0xc73f=function(_0xc73ff5,_0x15704b){_0xc73ff5=_0xc73ff5-0x83;let _0x23310a=_0x43cfaa[_0xc73ff5];return _0x23310a;},_0xc73f(_0x4b8a8a,_0x2137ef);}function _0x43cf(){const _0x4bcebf=['UNIVER_UNKNOWN','_commentService','_threadCommentDataSource','threadId','/add','addComment','addUser','listComments','@univerjs-pro/license','createTimestamp','Delete','type','_init','thread-comment-data-source.config','format','userId','_userService','_injector','8737497OoURim','HTTPService','@univerjs/thread-comment-ui','_config','CollaborationSessionService','234415ltkLDa','comments','length','@univerjs/thread-comment','symbol','rangeType','userID','slice','Edit','@univerjs/network','getUser','CustomRangeType','Inject','_sessionService','deleteComment','map','COMMENT','Solved','getMemberID','onReady','/edit','commentUpdate$','_initUserSync','pipe','defineProperty','rangeId','merge','Reply','values','ThreadCommentModel','Disposable','UniverThreadCommentDataSourcePlugin','_threadCommentDataSourceService','_threadCommentModel','UniverThreadCommentUIPlugin','root','disposeWithMe','_httpService','body','getOwnPropertyDescriptor','_configService','Add','code','parentId','3ZEhvyE','solved','filter','resolved','subscribe','UniverLicensePlugin','updateComment','replyId','bufferTime','users','_initDataSource','UNRECOGNIZED','find','onStarting','464sJvFiw','/reply','customRanges','error','896452duXoeO','154160VAjvaJ','payload','57978woTrQI','post','Solve','stringify','get','23891TspWHv','requireSession','Unknown','/solved','reply','UniverInstanceType','UniverCollaborationClientPlugin','parse','279480NDEtKa','OpenOrReOpen','/universer-api/comment/unit/','replies','Injector','resolveComment','Plugin','UserManagerService','/universer-api/user/list','forEach','user','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getUnit','content','add'];_0x43cf=function(){return _0x4bcebf;};return _0x43cf();}const g=_0x2bef63=>c['dayjs'](new Date(+_0x2bef63))[_0x4449da(0xdc)]('YYYY/MM/DD\x20HH:mm'),$=async(_0x5622f4,_0x126c17)=>{const _0x4a0534=_0x4449da,_0x18a837=_0x5622f4['get'](c['UserManagerService']),_0x8f4990=_0x5622f4[_0x4a0534(0xb6)](M[_0x4a0534(0xe1)]);_0x126c17['forEach'](_0x36ec49=>{const _0xc8f852=_0x4a0534;_0x18a837[_0xc8f852(0xef)](_0x36ec49)&&_0x126c17['delete'](_0x36ec49);}),_0x126c17['size']&&(await _0x8f4990[_0x4a0534(0xb6)](_0x4a0534(0xc7),{'params':{'userIDs':[..._0x126c17]}}))[_0x4a0534(0x97)]['users'][_0x4a0534(0xc8)](_0x4eb19a=>{_0x4eb19a&&_0x18a837['addUser'](_0x4eb19a);});};var E=Object[_0x4449da(0x89)],q=Object[_0x4449da(0x98)],A=(_0x165381,_0x410a98,_0x2fb7c1,_0x2007f9)=>{const _0x5863cb=_0x4449da;for(var _0x52cec4=_0x2007f9>0x1?void 0x0:_0x2007f9?q(_0x410a98,_0x2fb7c1):_0x410a98,_0x26d031=_0x165381[_0x5863cb(0xe7)]-0x1,_0xf666a8;_0x26d031>=0x0;_0x26d031--)(_0xf666a8=_0x165381[_0x26d031])&&(_0x52cec4=(_0x2007f9?_0xf666a8(_0x410a98,_0x2fb7c1,_0x52cec4):_0xf666a8(_0x52cec4))||_0x52cec4);return _0x2007f9&&_0x52cec4&&E(_0x410a98,_0x2fb7c1,_0x52cec4),_0x52cec4;},_=(_0x42eea0,_0x200240)=>(_0xebee76,_0x2d047a)=>_0x200240(_0xebee76,_0x2d047a,_0x42eea0);let S=class extends c['Disposable']{constructor(_0x54b2c3,_0x528ef5,_0x226af3,_0x3d6c40){const _0x24c490=_0x4449da;super(),this[_0x24c490(0xcf)]=_0x54b2c3,this['_threadCommentModel']=_0x528ef5,this['_userService']=_0x226af3,this[_0x24c490(0xdf)]=_0x3d6c40,this['_init'](),this['_initUserSync']();}[_0x4449da(0x87)](){const _0x21ca26=_0x4449da;this[_0x21ca26(0x95)](this[_0x21ca26(0x92)][_0x21ca26(0x86)][_0x21ca26(0x88)](U[_0x21ca26(0xa5)](0x10))['subscribe'](_0x5e848d=>{const _0x104c35=_0x21ca26,_0x3b5323=new Set();_0x5e848d['forEach'](_0x416a52=>{const _0x117618=_0xc73f;switch(_0x416a52[_0x117618(0xd9)]){case'add':{const _0x239607=_0x416a52[_0x117618(0xb1)]['personId'];_0x3b5323[_0x117618(0xcd)](_0x239607);break;}}}),$(this[_0x104c35(0xdf)],_0x3b5323);}));}[_0x4449da(0xda)](){const _0xb707d7=_0x4449da;this[_0xb707d7(0x95)](this[_0xb707d7(0xcf)][_0xb707d7(0x86)][_0xb707d7(0xa1)](async _0x4b9fdf=>{const _0x53262a=_0xb707d7;var _0x33cfb1,_0x2c4525,_0x45df72,_0x2d0192;const _0x1a672b=(_0x33cfb1=this[_0x53262a(0x92)][_0x53262a(0xcb)](_0x4b9fdf['unitId'])['find'](_0x4d54dd=>_0x4d54dd['threadId']===_0x4b9fdf[_0x53262a(0xd1)]))==null?void 0x0:_0x33cfb1[_0x53262a(0x94)];if(!_0x1a672b)return;const {unitId:_0xd89840,subUnitId:_0x1f206d}=_0x1a672b;switch(_0x4b9fdf[_0x53262a(0xc9)]&&this[_0x53262a(0xde)][_0x53262a(0xd4)](_0x4b9fdf[_0x53262a(0xc9)]),_0x4b9fdf[_0x53262a(0xd9)]){case v[_0x53262a(0x9a)]:break;case v[_0x53262a(0x8c)]:{this[_0x53262a(0x92)][_0x53262a(0xd3)](_0xd89840,_0x1f206d,{'unitId':_0xd89840,'subUnitId':_0x1f206d,'ref':'','id':_0x4b9fdf['replyId'],'dT':g(+_0x4b9fdf['createTimestamp']),'threadId':_0x4b9fdf['threadId'],'personId':(_0x45df72=(_0x2c4525=_0x4b9fdf['user'])==null?void 0x0:_0x2c4525[_0x53262a(0xeb)])!=null?_0x45df72:_0x4b9fdf[_0x53262a(0xdd)],'text':JSON[_0x53262a(0xbe)](_0x4b9fdf[_0x53262a(0xcc)]),'parentId':_0x1a672b['id']});break;}case v[_0x53262a(0xd8)]:{const _0x56fb6a=this['_threadCommentModel']['getComment'](_0xd89840,_0x1f206d,_0x4b9fdf[_0x53262a(0xa4)]);_0x56fb6a&&_0x56fb6a[_0x53262a(0x9c)]&&this[_0x53262a(0x92)][_0x53262a(0xf3)](_0xd89840,_0x1f206d,_0x4b9fdf['replyId']);break;}case v[_0x53262a(0xed)]:{this[_0x53262a(0x92)][_0x53262a(0xa3)](_0xd89840,_0x1f206d,{'commentId':_0x4b9fdf['replyId'],'text':JSON[_0x53262a(0xbe)](_0x4b9fdf[_0x53262a(0xcc)])});break;}case v[_0x53262a(0xb4)]:{const _0x5c1ec8=(_0x2d0192=this['_threadCommentModel'][_0x53262a(0xcb)](_0x4b9fdf['unitId'])[_0x53262a(0xa9)](_0x547885=>_0x547885[_0x53262a(0xd1)]===_0x4b9fdf[_0x53262a(0xd1)]))==null?void 0x0:_0x2d0192[_0x53262a(0x94)];_0x5c1ec8&&this[_0x53262a(0x92)][_0x53262a(0xc4)](_0xd89840,_0x1f206d,_0x5c1ec8['id'],_0x4b9fdf[_0x53262a(0x9e)]===I['Solved']);break;}}}));}};S=A([_(0x0,c[_0x4449da(0xf1)](C['CommentService'])),_(0x1,c['Inject'](P[_0x4449da(0x8e)])),_(0x2,c['Inject'](c[_0x4449da(0xc6)])),_(0x3,c[_0x4449da(0xf1)](c[_0x4449da(0xc3)]))],S);const x=_0x4449da(0xdb),D={};var Y=Object[_0x4449da(0x89)],G=Object[_0x4449da(0x98)],H=(_0xafabd9,_0x477707,_0x321717,_0x1218df)=>{for(var _0x1e7ef7=_0x1218df>0x1?void 0x0:_0x1218df?G(_0x477707,_0x321717):_0x477707,_0x4f550d=_0xafabd9['length']-0x1,_0x58e59a;_0x4f550d>=0x0;_0x4f550d--)(_0x58e59a=_0xafabd9[_0x4f550d])&&(_0x1e7ef7=(_0x1218df?_0x58e59a(_0x477707,_0x321717,_0x1e7ef7):_0x58e59a(_0x1e7ef7))||_0x1e7ef7);return _0x1218df&&_0x1e7ef7&&Y(_0x477707,_0x321717,_0x1e7ef7),_0x1e7ef7;},p=(_0x5ae09a,_0x592dda)=>(_0xf46f3c,_0x3b7467)=>_0x592dda(_0xf46f3c,_0x3b7467,_0x5ae09a);function J(_0x2279d7,_0x1ebdf2){const _0x2cd111=_0x4449da,_0x269792=_0x2279d7[_0x2cd111(0xc2)][0x0];return{..._0x1ebdf2,'id':_0x269792[_0x2cd111(0xa4)],'resolved':_0x2279d7[_0x2cd111(0x9e)]===0x1,'dT':g(_0x269792[_0x2cd111(0xd7)]),'personId':_0x269792[_0x2cd111(0xdd)],'threadId':_0x269792[_0x2cd111(0xd1)]};}function F(_0x5774a3,_0x34353b,_0x3ba214){const _0x3dec89=_0x4449da;var _0x47592c,_0x4cf0a9;if(((_0x4cf0a9=(_0x47592c=_0x5774a3==null?void 0x0:_0x5774a3['replies'])==null?void 0x0:_0x47592c[_0x3dec89(0xe7)])!=null?_0x4cf0a9:0x0)>0x0){const _0x7f874b=(_0x1ff52b,_0x27c2e7)=>({'id':_0x1ff52b['replyId'],'threadId':_0x1ff52b['threadId'],'dT':g(_0x1ff52b[_0x3dec89(0xd7)]),'personId':_0x1ff52b['userId'],'resolved':_0x5774a3[_0x3dec89(0x9e)]===I['Solved'],'unitId':_0x34353b,'subUnitId':_0x3ba214,'text':JSON[_0x3dec89(0xbe)](_0x1ff52b[_0x3dec89(0xcc)]),'parentId':_0x27c2e7}),_0x4fdf0d=_0x7f874b(_0x5774a3[_0x3dec89(0xc2)][0x0]);return{..._0x4fdf0d,'children':_0x5774a3[_0x3dec89(0xc2)][_0x3dec89(0xec)](0x1)[_0x3dec89(0xf4)](_0x47730f=>_0x7f874b(_0x47730f,_0x4fdf0d['id']))};}return null;}let f=class{constructor(_0x1de2df,_0x404d00,_0x3aaa48,_0xe9eb94){const _0x139911=_0x4449da;this[_0x139911(0x96)]=_0x1de2df,this[_0x139911(0xde)]=_0x404d00,this[_0x139911(0xf2)]=_0x3aaa48,this[_0x139911(0xdf)]=_0xe9eb94;}async[_0x4449da(0xd3)](_0x58ef71){const _0x11b9bf=_0x4449da;var _0x4153c4,_0x3fc188;const {parentId:_0x462d09,unitId:_0x31aff0,text:_0x162191,threadId:_0x31c5d9}=_0x58ef71,_0x4c5c98=(_0x3fc188=(_0x4153c4=_0x162191[_0x11b9bf(0xad)])==null?void 0x0:_0x4153c4[_0x11b9bf(0x9f)](_0x4418d2=>_0x4418d2[_0x11b9bf(0xea)]===c[_0x11b9bf(0xf0)][_0x11b9bf(0xf5)])[_0x11b9bf(0xf4)](_0x59c46b=>_0x59c46b[_0x11b9bf(0x8a)]))!=null?_0x3fc188:[],_0x5b932c=JSON['stringify'](_0x162191),_0x1ad73c=(await this[_0x11b9bf(0xf2)]['requireSession'](_0x31aff0))['getMemberID']();if(_0x462d09){const _0x586a1c={'memberId':_0x1ad73c,'unitId':_0x31aff0,'content':_0x5b932c,'mention':_0x4c5c98,'threadId':_0x31c5d9},_0x1aab2f=(await this[_0x11b9bf(0x96)][_0x11b9bf(0xb3)](_0x11b9bf(0xc1)+_0x31aff0+_0x11b9bf(0xac),{'body':_0x586a1c}))[_0x11b9bf(0x97)][_0x11b9bf(0xbb)];return{..._0x58ef71,'id':_0x1aab2f[_0x11b9bf(0xa4)],'dT':c['dayjs'](+_0x1aab2f[_0x11b9bf(0xd7)])[_0x11b9bf(0xdc)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1aab2f['userId']};}else{const _0xafd6ff={'memberId':_0x1ad73c,'unitId':_0x31aff0,'content':_0x5b932c,'mention':_0x4c5c98},_0x47ea9b=await this['_httpService'][_0x11b9bf(0xb3)](_0x11b9bf(0xc1)+_0x31aff0+_0x11b9bf(0xd2),{'body':_0xafd6ff});return J(_0x47ea9b['body']['comment'],_0x58ef71);}}async['updateComment'](_0x30eaee){const _0x98997c=_0x4449da;var _0x5dede6,_0x55bfe0;const {text:_0x206904,unitId:_0x58df80}=_0x30eaee,_0x4a2076=(_0x55bfe0=(_0x5dede6=_0x206904[_0x98997c(0xad)])==null?void 0x0:_0x5dede6[_0x98997c(0x9f)](_0x52a5d8=>_0x52a5d8[_0x98997c(0xea)]===c[_0x98997c(0xf0)]['COMMENT'])[_0x98997c(0xf4)](_0x599483=>_0x599483[_0x98997c(0x8a)]))!=null?_0x55bfe0:[],_0x1bb65a=JSON[_0x98997c(0xb5)](_0x206904),_0xb4f5d5=_0x30eaee[_0x98997c(0xd1)],_0x5ca109=_0x30eaee['id'],_0x127b86={'memberId':(await this[_0x98997c(0xf2)][_0x98997c(0xb8)](_0x58df80))[_0x98997c(0x83)](),'unitId':_0x58df80,'threadId':_0xb4f5d5,'mention':_0x4a2076,'content':_0x1bb65a,'replyId':_0x5ca109},_0x5b1026=await this[_0x98997c(0x96)]['post']('/universer-api/comment/unit/'+_0x58df80+_0x98997c(0x85),{'body':_0x127b86});return!_0x5b1026[_0x98997c(0x97)]['error']||_0x5b1026['body']['error'][_0x98997c(0x9b)]===0x1;}async['resolveComment'](_0x50be44){const _0x23ffc2=_0x4449da,{unitId:_0x2c2363}=_0x50be44,_0x50f1c2=_0x50be44[_0x23ffc2(0xd1)],_0x5b9cba={'memberId':this[_0x23ffc2(0xde)]['getCurrentUser']()[_0x23ffc2(0xeb)],'unitId':_0x2c2363,'threadId':_0x50f1c2,'solved':_0x50be44[_0x23ffc2(0xa0)]?I[_0x23ffc2(0xf6)]:I['OpenOrReOpen']},_0x39aa63=await this[_0x23ffc2(0x96)][_0x23ffc2(0xb3)]('/universer-api/comment/unit/'+_0x2c2363+_0x23ffc2(0xba),{'body':_0x5b9cba});return!_0x39aa63['body'][_0x23ffc2(0xae)]||_0x39aa63[_0x23ffc2(0x97)][_0x23ffc2(0xae)][_0x23ffc2(0x9b)]===0x1;}async[_0x4449da(0xf3)](_0x32f392,_0x2bc7b9,_0x15ba97,_0x453821){const _0x479f74=_0x4449da,_0xf2c572={'memberId':(await this[_0x479f74(0xf2)][_0x479f74(0xb8)](_0x32f392))[_0x479f74(0x83)](),'threadId':_0x15ba97,'replyId':_0x453821,'unitId':_0x32f392},_0x1a69f6=await this[_0x479f74(0x96)][_0x479f74(0xb3)]('/universer-api/comment/unit/'+_0x32f392+'/delete',{'body':_0xf2c572});return!_0x1a69f6[_0x479f74(0x97)]['error']||_0x1a69f6['body']['error']['code']===0x1;}async[_0x4449da(0xd5)](_0x3e6633,_0x4bbd13,_0x4b64f3){const _0x16e628=_0x4449da,_0x3ff503={'unitId':_0x3e6633,'threadId':_0x4b64f3},_0x21fbe1=await this['_httpService']['post'](_0x16e628(0xc1)+_0x3e6633+'/list',{'body':_0x3ff503}),_0x25d358=_0x4b64f3[_0x16e628(0xf4)](_0x5ac91b=>F(_0x21fbe1[_0x16e628(0x97)][_0x16e628(0xe6)][_0x5ac91b],_0x3e6633,_0x4bbd13))['filter'](Boolean);return Object[_0x16e628(0x8d)](_0x21fbe1[_0x16e628(0x97)][_0x16e628(0xa6)])['forEach'](_0x23a091=>{const _0x1401b0=_0x16e628;this[_0x1401b0(0xde)][_0x1401b0(0xd4)](_0x23a091);}),_0x25d358;}['saveCommentToSnapshot'](_0x4e0800){return{'id':_0x4e0800['id'],'threadId':_0x4e0800['threadId'],'ref':_0x4e0800['ref']};}};f=H([p(0x0,c[_0x4449da(0xf1)](M[_0x4449da(0xe1)])),p(0x1,c[_0x4449da(0xf1)](c[_0x4449da(0xc6)])),p(0x2,c[_0x4449da(0xf1)](C[_0x4449da(0xe4)])),p(0x3,c[_0x4449da(0xf1)](c['Injector']))],f);var L=Object[_0x4449da(0x89)],Z=Object[_0x4449da(0x98)],W=(_0x4bc478,_0x3b0d74,_0x588403,_0x2657ed)=>{const _0x38afbf=_0x4449da;for(var _0x253749=_0x2657ed>0x1?void 0x0:_0x2657ed?Z(_0x3b0d74,_0x588403):_0x3b0d74,_0x260baa=_0x4bc478[_0x38afbf(0xe7)]-0x1,_0x88a01d;_0x260baa>=0x0;_0x260baa--)(_0x88a01d=_0x4bc478[_0x260baa])&&(_0x253749=(_0x2657ed?_0x88a01d(_0x3b0d74,_0x588403,_0x253749):_0x88a01d(_0x253749))||_0x253749);return _0x2657ed&&_0x253749&&L(_0x3b0d74,_0x588403,_0x253749),_0x253749;},O=(_0x365380,_0x5635b0)=>(_0x445f19,_0x492774)=>_0x5635b0(_0x445f19,_0x492774,_0x365380);let b=class extends c[_0x4449da(0x8f)]{constructor(_0x55c80e,_0x1e6b47){const _0x1c8253=_0x4449da;super(),this['_threadCommentDataSourceService']=_0x55c80e,this[_0x1c8253(0xd0)]=_0x1e6b47,this['_initDataSource']();}[_0x4449da(0xa7)](){const _0x36f6d7=_0x4449da;this[_0x36f6d7(0x91)]['dataSource']=this[_0x36f6d7(0xd0)],this[_0x36f6d7(0x91)]['syncUpdateMutationToColla']=!0x1;}};b=W([O(0x0,P['IThreadCommentDataSourceService']),O(0x1,c[_0x4449da(0xf1)](f))],b);var j=Object[_0x4449da(0x89)],B=Object['getOwnPropertyDescriptor'],K=(_0x1f64d3,_0x5c9327,_0x30a82a)=>_0x5c9327 in _0x1f64d3?j(_0x1f64d3,_0x5c9327,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x30a82a}):_0x1f64d3[_0x5c9327]=_0x30a82a,V=(_0x495429,_0x3cc05f,_0x1c072a,_0x3234f2)=>{for(var _0x355d84=_0x3234f2>0x1?void 0x0:_0x3234f2?B(_0x3cc05f,_0x1c072a):_0x3cc05f,_0x16aedb=_0x495429['length']-0x1,_0x383441;_0x16aedb>=0x0;_0x16aedb--)(_0x383441=_0x495429[_0x16aedb])&&(_0x355d84=(_0x3234f2?_0x383441(_0x3cc05f,_0x1c072a,_0x355d84):_0x383441(_0x355d84))||_0x355d84);return _0x3234f2&&_0x355d84&&j(_0x3cc05f,_0x1c072a,_0x355d84),_0x355d84;},y=(_0x49219f,_0x2ec08b)=>(_0x7217fa,_0x3835b5)=>_0x2ec08b(_0x7217fa,_0x3835b5,_0x49219f),N=(_0x4a5d7c,_0x1f898b,_0x348ec8)=>K(_0x4a5d7c,typeof _0x1f898b!=_0x4449da(0xe9)?_0x1f898b+'':_0x1f898b,_0x348ec8);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x4449da(0xc5)]{constructor(_0xb826f7=D,_0x1d320e,_0x30b663){const _0x2c0a8f=_0x4449da;super(),this[_0x2c0a8f(0xe3)]=_0xb826f7,this[_0x2c0a8f(0xdf)]=_0x1d320e,this[_0x2c0a8f(0x99)]=_0x30b663;const {..._0x1349d2}=c[_0x2c0a8f(0x8b)]({},D,this['_config']);this['_configService']['setConfig'](x,_0x1349d2);}[_0x4449da(0xaa)](){const _0x186154=_0x4449da;[[f],[b],[S]][_0x186154(0xc8)](_0x4cbc19=>{const _0x477b60=_0x186154;this[_0x477b60(0xdf)][_0x477b60(0xcd)](_0x4cbc19);});}[_0x4449da(0x84)](){const _0x173764=_0x4449da;this[_0x173764(0xdf)][_0x173764(0xb6)](b),this['_injector'][_0x173764(0xb6)](S);}},N(exports[_0x4449da(0x90)],'pluginName',R),N(exports[_0x4449da(0x90)],_0x4449da(0xd9),c[_0x4449da(0xbc)][_0x4449da(0xce)]),exports[_0x4449da(0x90)]=V([c['DependentOn'](w[_0x4449da(0x93)],C[_0x4449da(0xbd)],T[_0x4449da(0xa2)]),y(0x1,c[_0x4449da(0xf1)](c['Injector'])),y(0x2,c['IConfigService'])],exports[_0x4449da(0x90)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x46332e=_0x4d30;(function(_0x47ced1,_0x7e3b30){const _0x40a86b=_0x4d30,_0x41fdf0=_0x47ced1();while(!![]){try{const _0x920e0d=-parseInt(_0x40a86b(0xa5))/0x1+-parseInt(_0x40a86b(0x9d))/0x2*(parseInt(_0x40a86b(0xb7))/0x3)+-parseInt(_0x40a86b(0x8b))/0x4*(parseInt(_0x40a86b(0xe5))/0x5)+-parseInt(_0x40a86b(0xb0))/0x6+parseInt(_0x40a86b(0xca))/0x7+-parseInt(_0x40a86b(0xc3))/0x8*(-parseInt(_0x40a86b(0xad))/0x9)+-parseInt(_0x40a86b(0xd6))/0xa*(-parseInt(_0x40a86b(0xf1))/0xb);if(_0x920e0d===_0x7e3b30)break;else _0x41fdf0['push'](_0x41fdf0['shift']());}catch(_0x2516c9){_0x41fdf0['push'](_0x41fdf0['shift']());}}}(_0x1843,0x76db5));import{CommentService as _0x1a639e,CollaborationSessionService as _0x339d63,UniverCollaborationClientPlugin as _0x4d77bf}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4c609e}from'@univerjs-pro/license';import{dayjs as _0x26e67d,UserManagerService as _0x230e55,Inject as _0x266c4e,Injector as _0x5b23b5,Disposable as _0x316e16,CustomRangeType as _0x227b33,UniverInstanceType as _0x230c92,DependentOn as _0x32332f,Plugin as _0x29f977,merge as _0x483361,IConfigService as _0x4ae22a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3c491e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4b6449,IThreadCommentDataSourceService as _0x30c092}from'@univerjs/thread-comment';import{bufferTime as _0x2cc78b}from'rxjs';import{HTTPService as _0x3413dc}from'@univerjs/network';const B=_0x46332e(0xcd);var v=(_0x143d14=>(_0x143d14[_0x143d14['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x143d14[_0x143d14[_0x46332e(0x90)]=0x1]=_0x46332e(0x90),_0x143d14[_0x143d14[_0x46332e(0xb5)]=-0x1]=_0x46332e(0xb5),_0x143d14))(v||{}),p=(_0x48e72f=>(_0x48e72f[_0x48e72f[_0x46332e(0x9e)]=0x0]='Unknown',_0x48e72f[_0x48e72f[_0x46332e(0xb9)]=0x1]=_0x46332e(0xb9),_0x48e72f[_0x48e72f[_0x46332e(0xea)]=0x2]=_0x46332e(0xea),_0x48e72f[_0x48e72f[_0x46332e(0xa7)]=0x3]=_0x46332e(0xa7),_0x48e72f[_0x48e72f[_0x46332e(0x9c)]=0x4]=_0x46332e(0x9c),_0x48e72f[_0x48e72f[_0x46332e(0x96)]=0x5]=_0x46332e(0x96),_0x48e72f[_0x48e72f['UNRECOGNIZED']=-0x1]=_0x46332e(0xb5),_0x48e72f))(p||{});const O=_0x3df9f1=>_0x26e67d(new Date(+_0x3df9f1))['format'](_0x46332e(0xf2)),K=async(_0x437479,_0x2ab71b)=>{const _0x1709bb=_0x46332e,_0x4a70ca=_0x437479[_0x1709bb(0xdd)](_0x230e55),_0x3db256=_0x437479[_0x1709bb(0xdd)](_0x3413dc);_0x2ab71b[_0x1709bb(0xd3)](_0xd0f72d=>{const _0x23f949=_0x1709bb;_0x4a70ca[_0x23f949(0xd4)](_0xd0f72d)&&_0x2ab71b[_0x23f949(0xbd)](_0xd0f72d);}),_0x2ab71b[_0x1709bb(0x87)]&&(await _0x3db256['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x2ab71b]}}))[_0x1709bb(0xc5)][_0x1709bb(0xb8)][_0x1709bb(0xd3)](_0x1941c5=>{const _0x577970=_0x1709bb;_0x1941c5&&_0x4a70ca[_0x577970(0xb1)](_0x1941c5);});};var V=Object[_0x46332e(0xae)],z=Object[_0x46332e(0xeb)],Q=(_0x2f3f26,_0x3fbe11,_0x42123c,_0x4ddad4)=>{const _0x2d4ae7=_0x46332e;for(var _0x2fffe3=_0x4ddad4>0x1?void 0x0:_0x4ddad4?z(_0x3fbe11,_0x42123c):_0x3fbe11,_0x475ca4=_0x2f3f26[_0x2d4ae7(0xe4)]-0x1,_0x321217;_0x475ca4>=0x0;_0x475ca4--)(_0x321217=_0x2f3f26[_0x475ca4])&&(_0x2fffe3=(_0x4ddad4?_0x321217(_0x3fbe11,_0x42123c,_0x2fffe3):_0x321217(_0x2fffe3))||_0x2fffe3);return _0x4ddad4&&_0x2fffe3&&V(_0x3fbe11,_0x42123c,_0x2fffe3),_0x2fffe3;},_=(_0x1ca99d,_0x11e5bc)=>(_0x2d45ba,_0x225141)=>_0x11e5bc(_0x2d45ba,_0x225141,_0x1ca99d);function _0x1843(){const _0xf7a97=['userId','getMemberID','updateComment','2841796DbHFtc','_sessionService','requireSession','_configService','getComment','Solved','OpenOrReOpen','stringify','symbol','comment','rangeId','Solve','COMMENT','rangeType','_injector','_threadCommentModel','getCurrentUser','Delete','22894VIrVVV','Unknown','onReady','deleteComment','thread-comment-data-source.config','ref','pipe','solved','32821HgPeLR','resolveComment','Edit','filter','_initDataSource','_initUserSync','UNIVER_UNKNOWN','customRanges','198CGeoGx','defineProperty','/solved','4182714TjcAow','addUser','post','code','unitId','UNRECOGNIZED','reply','87IZNENH','users','Add','content','_threadCommentDataSourceService','comments','delete','_config','user','root','map','addComment','22216WqNpPR','createTimestamp','body','resolved','/reply','personId','saveCommentToSnapshot','240807VdVLcE','parse','_threadCommentDataSource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_userService','commentUpdate$','disposeWithMe','payload','slice','forEach','getUser','type','10upKGja','/edit','_httpService','error','setConfig','replyId','/universer-api/comment/unit/','get','pluginName','subscribe','getUnit','_init','add','replies','length','5qFlAAe','userID','/add','/delete','parentId','Reply','getOwnPropertyDescriptor','threadId','format','/list','syncUpdateMutationToColla','onStarting','23800634ObYSQU','YYYY/MM/DD\x20HH:mm','size'];_0x1843=function(){return _0xf7a97;};return _0x1843();}let f=class extends _0x316e16{constructor(_0xfe3b07,_0xf1e29a,_0x2bc999,_0x12faa3){const _0x1bcb7d=_0x46332e;super(),this['_commentService']=_0xfe3b07,this[_0x1bcb7d(0x9a)]=_0xf1e29a,this[_0x1bcb7d(0xce)]=_0x2bc999,this[_0x1bcb7d(0x99)]=_0x12faa3,this[_0x1bcb7d(0xe1)](),this[_0x1bcb7d(0xaa)]();}['_initUserSync'](){const _0x5c6aa0=_0x46332e;this[_0x5c6aa0(0xd0)](this['_threadCommentModel'][_0x5c6aa0(0xcf)][_0x5c6aa0(0xa3)](_0x2cc78b(0x10))[_0x5c6aa0(0xdf)](_0x957239=>{const _0x557be2=_0x5c6aa0,_0x5c8b45=new Set();_0x957239[_0x557be2(0xd3)](_0x16e865=>{const _0x5a33ab=_0x557be2;switch(_0x16e865[_0x5a33ab(0xd5)]){case _0x5a33ab(0xe2):{const _0x3b1258=_0x16e865[_0x5a33ab(0xd1)][_0x5a33ab(0xc8)];_0x5c8b45[_0x5a33ab(0xe2)](_0x3b1258);break;}}}),K(this[_0x557be2(0x99)],_0x5c8b45);}));}[_0x46332e(0xe1)](){const _0x5d4e0b=_0x46332e;this['disposeWithMe'](this['_commentService'][_0x5d4e0b(0xcf)][_0x5d4e0b(0xdf)](async _0x1b74b7=>{const _0x275cea=_0x5d4e0b;var _0x1eaa5b,_0x1f79b3,_0x386e79,_0x3fbfcd;const _0x52cdef=(_0x1eaa5b=this[_0x275cea(0x9a)][_0x275cea(0xe0)](_0x1b74b7[_0x275cea(0xb4)])['find'](_0x2490c5=>_0x2490c5[_0x275cea(0xec)]===_0x1b74b7[_0x275cea(0xec)]))==null?void 0x0:_0x1eaa5b[_0x275cea(0xc0)];if(!_0x52cdef)return;const {unitId:_0x14c767,subUnitId:_0x318032}=_0x52cdef;switch(_0x1b74b7['user']&&this['_userService']['addUser'](_0x1b74b7['user']),_0x1b74b7[_0x275cea(0xd5)]){case p[_0x275cea(0xb9)]:break;case p[_0x275cea(0xea)]:{this[_0x275cea(0x9a)][_0x275cea(0xc2)](_0x14c767,_0x318032,{'unitId':_0x14c767,'subUnitId':_0x318032,'ref':'','id':_0x1b74b7[_0x275cea(0xdb)],'dT':O(+_0x1b74b7[_0x275cea(0xc4)]),'threadId':_0x1b74b7[_0x275cea(0xec)],'personId':(_0x386e79=(_0x1f79b3=_0x1b74b7[_0x275cea(0xbf)])==null?void 0x0:_0x1f79b3[_0x275cea(0xe6)])!=null?_0x386e79:_0x1b74b7[_0x275cea(0x88)],'text':JSON['parse'](_0x1b74b7[_0x275cea(0xba)]),'parentId':_0x52cdef['id']});break;}case p[_0x275cea(0x9c)]:{const _0x4a59ed=this[_0x275cea(0x9a)][_0x275cea(0x8f)](_0x14c767,_0x318032,_0x1b74b7[_0x275cea(0xdb)]);_0x4a59ed&&_0x4a59ed[_0x275cea(0xe9)]&&this[_0x275cea(0x9a)][_0x275cea(0xa0)](_0x14c767,_0x318032,_0x1b74b7[_0x275cea(0xdb)]);break;}case p[_0x275cea(0xa7)]:{this[_0x275cea(0x9a)]['updateComment'](_0x14c767,_0x318032,{'commentId':_0x1b74b7[_0x275cea(0xdb)],'text':JSON[_0x275cea(0xcb)](_0x1b74b7[_0x275cea(0xba)])});break;}case p['Solve']:{const _0x5a749b=(_0x3fbfcd=this[_0x275cea(0x9a)][_0x275cea(0xe0)](_0x1b74b7[_0x275cea(0xb4)])['find'](_0x591ece=>_0x591ece[_0x275cea(0xec)]===_0x1b74b7[_0x275cea(0xec)]))==null?void 0x0:_0x3fbfcd[_0x275cea(0xc0)];_0x5a749b&&this[_0x275cea(0x9a)][_0x275cea(0xa6)](_0x14c767,_0x318032,_0x5a749b['id'],_0x1b74b7[_0x275cea(0xa4)]===v[_0x275cea(0x90)]);break;}}}));}};f=Q([_(0x0,_0x266c4e(_0x1a639e)),_(0x1,_0x266c4e(_0x4b6449)),_(0x2,_0x266c4e(_0x230e55)),_(0x3,_0x266c4e(_0x5b23b5))],f);const X=_0x46332e(0xa1),P={};var k=Object[_0x46332e(0xae)],ee=Object[_0x46332e(0xeb)],re=(_0x56034,_0x172064,_0x267cd7,_0x4662be)=>{const _0xb15ad3=_0x46332e;for(var _0x2e2501=_0x4662be>0x1?void 0x0:_0x4662be?ee(_0x172064,_0x267cd7):_0x172064,_0x240c67=_0x56034[_0xb15ad3(0xe4)]-0x1,_0x5c3932;_0x240c67>=0x0;_0x240c67--)(_0x5c3932=_0x56034[_0x240c67])&&(_0x2e2501=(_0x4662be?_0x5c3932(_0x172064,_0x267cd7,_0x2e2501):_0x5c3932(_0x2e2501))||_0x2e2501);return _0x4662be&&_0x2e2501&&k(_0x172064,_0x267cd7,_0x2e2501),_0x2e2501;},I=(_0x31920d,_0x51fd17)=>(_0x2c98b4,_0x574af5)=>_0x51fd17(_0x2c98b4,_0x574af5,_0x31920d);function te(_0x16c704,_0x178d52){const _0x1aaab5=_0x46332e,_0x3bc7a8=_0x16c704['replies'][0x0];return{..._0x178d52,'id':_0x3bc7a8[_0x1aaab5(0xdb)],'resolved':_0x16c704[_0x1aaab5(0xa4)]===0x1,'dT':O(_0x3bc7a8[_0x1aaab5(0xc4)]),'personId':_0x3bc7a8[_0x1aaab5(0x88)],'threadId':_0x3bc7a8[_0x1aaab5(0xec)]};}function se(_0x2887fe,_0x3ad5e1,_0x52dd6b){const _0x4b46db=_0x46332e;var _0x2c6141,_0x13b4b7;if(((_0x13b4b7=(_0x2c6141=_0x2887fe==null?void 0x0:_0x2887fe[_0x4b46db(0xe3)])==null?void 0x0:_0x2c6141[_0x4b46db(0xe4)])!=null?_0x13b4b7:0x0)>0x0){const _0x349f31=(_0x21be13,_0x443074)=>({'id':_0x21be13[_0x4b46db(0xdb)],'threadId':_0x21be13[_0x4b46db(0xec)],'dT':O(_0x21be13[_0x4b46db(0xc4)]),'personId':_0x21be13['userId'],'resolved':_0x2887fe[_0x4b46db(0xa4)]===v[_0x4b46db(0x90)],'unitId':_0x3ad5e1,'subUnitId':_0x52dd6b,'text':JSON[_0x4b46db(0xcb)](_0x21be13[_0x4b46db(0xba)]),'parentId':_0x443074}),_0x2aa786=_0x349f31(_0x2887fe['replies'][0x0]);return{..._0x2aa786,'children':_0x2887fe[_0x4b46db(0xe3)][_0x4b46db(0xd2)](0x1)['map'](_0x30b342=>_0x349f31(_0x30b342,_0x2aa786['id']))};}return null;}let S=class{constructor(_0x40bb61,_0x1e8e5b,_0x3e424d,_0x3a147a){const _0xc8c78=_0x46332e;this[_0xc8c78(0xd8)]=_0x40bb61,this['_userService']=_0x1e8e5b,this[_0xc8c78(0x8c)]=_0x3e424d,this['_injector']=_0x3a147a;}async['addComment'](_0x1d8f5d){const _0x4491ec=_0x46332e;var _0x49d586,_0x44a221;const {parentId:_0x27d5ee,unitId:_0x4b778f,text:_0x3e8245,threadId:_0x40691b}=_0x1d8f5d,_0x74e4fd=(_0x44a221=(_0x49d586=_0x3e8245[_0x4491ec(0xac)])==null?void 0x0:_0x49d586[_0x4491ec(0xa8)](_0x69bf6=>_0x69bf6[_0x4491ec(0x98)]===_0x227b33[_0x4491ec(0x97)])[_0x4491ec(0xc1)](_0x5bec0d=>_0x5bec0d[_0x4491ec(0x95)]))!=null?_0x44a221:[],_0x2c1f12=JSON[_0x4491ec(0x92)](_0x3e8245),_0x1dd8d=(await this['_sessionService']['requireSession'](_0x4b778f))[_0x4491ec(0x89)]();if(_0x27d5ee){const _0x4cc006={'memberId':_0x1dd8d,'unitId':_0x4b778f,'content':_0x2c1f12,'mention':_0x74e4fd,'threadId':_0x40691b},_0x3c8de6=(await this[_0x4491ec(0xd8)][_0x4491ec(0xb2)](_0x4491ec(0xdc)+_0x4b778f+_0x4491ec(0xc7),{'body':_0x4cc006}))['body'][_0x4491ec(0xb6)];return{..._0x1d8f5d,'id':_0x3c8de6['replyId'],'dT':_0x26e67d(+_0x3c8de6[_0x4491ec(0xc4)])[_0x4491ec(0xed)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3c8de6[_0x4491ec(0x88)]};}else{const _0x5dea21={'memberId':_0x1dd8d,'unitId':_0x4b778f,'content':_0x2c1f12,'mention':_0x74e4fd},_0x2fe190=await this[_0x4491ec(0xd8)][_0x4491ec(0xb2)](_0x4491ec(0xdc)+_0x4b778f+_0x4491ec(0xe7),{'body':_0x5dea21});return te(_0x2fe190[_0x4491ec(0xc5)][_0x4491ec(0x94)],_0x1d8f5d);}}async[_0x46332e(0x8a)](_0x4bf3fb){const _0x35c4e8=_0x46332e;var _0x3dd528,_0xd49fd8;const {text:_0x416cfc,unitId:_0x291789}=_0x4bf3fb,_0x5d467e=(_0xd49fd8=(_0x3dd528=_0x416cfc[_0x35c4e8(0xac)])==null?void 0x0:_0x3dd528['filter'](_0x4b0cc7=>_0x4b0cc7[_0x35c4e8(0x98)]===_0x227b33['COMMENT'])[_0x35c4e8(0xc1)](_0x1a682=>_0x1a682['rangeId']))!=null?_0xd49fd8:[],_0x1d9af9=JSON[_0x35c4e8(0x92)](_0x416cfc),_0x406c63=_0x4bf3fb[_0x35c4e8(0xec)],_0x293064=_0x4bf3fb['id'],_0x36dfe7={'memberId':(await this[_0x35c4e8(0x8c)][_0x35c4e8(0x8d)](_0x291789))['getMemberID'](),'unitId':_0x291789,'threadId':_0x406c63,'mention':_0x5d467e,'content':_0x1d9af9,'replyId':_0x293064},_0x81f98e=await this[_0x35c4e8(0xd8)]['post'](_0x35c4e8(0xdc)+_0x291789+_0x35c4e8(0xd7),{'body':_0x36dfe7});return!_0x81f98e['body'][_0x35c4e8(0xd9)]||_0x81f98e['body'][_0x35c4e8(0xd9)][_0x35c4e8(0xb3)]===0x1;}async[_0x46332e(0xa6)](_0x2e90dd){const _0x370d81=_0x46332e,{unitId:_0x459ffe}=_0x2e90dd,_0x534cb5=_0x2e90dd[_0x370d81(0xec)],_0x2e3b33={'memberId':this['_userService'][_0x370d81(0x9b)]()['userID'],'unitId':_0x459ffe,'threadId':_0x534cb5,'solved':_0x2e90dd[_0x370d81(0xc6)]?v['Solved']:v[_0x370d81(0x91)]},_0x3ff446=await this[_0x370d81(0xd8)][_0x370d81(0xb2)](_0x370d81(0xdc)+_0x459ffe+_0x370d81(0xaf),{'body':_0x2e3b33});return!_0x3ff446[_0x370d81(0xc5)]['error']||_0x3ff446['body'][_0x370d81(0xd9)][_0x370d81(0xb3)]===0x1;}async[_0x46332e(0xa0)](_0x44134e,_0x4d6c9e,_0x45dc82,_0x58700a){const _0x547048=_0x46332e,_0x158cec={'memberId':(await this[_0x547048(0x8c)][_0x547048(0x8d)](_0x44134e))[_0x547048(0x89)](),'threadId':_0x45dc82,'replyId':_0x58700a,'unitId':_0x44134e},_0x1fc5c2=await this[_0x547048(0xd8)][_0x547048(0xb2)](_0x547048(0xdc)+_0x44134e+_0x547048(0xe8),{'body':_0x158cec});return!_0x1fc5c2['body']['error']||_0x1fc5c2[_0x547048(0xc5)][_0x547048(0xd9)][_0x547048(0xb3)]===0x1;}async['listComments'](_0x26149c,_0x360e53,_0x41dafb){const _0x9369da=_0x46332e,_0x25fdfc={'unitId':_0x26149c,'threadId':_0x41dafb},_0x549630=await this[_0x9369da(0xd8)][_0x9369da(0xb2)](_0x9369da(0xdc)+_0x26149c+_0x9369da(0xee),{'body':_0x25fdfc}),_0x8ae5ca=_0x41dafb[_0x9369da(0xc1)](_0x1f919f=>se(_0x549630[_0x9369da(0xc5)][_0x9369da(0xbc)][_0x1f919f],_0x26149c,_0x360e53))[_0x9369da(0xa8)](Boolean);return Object['values'](_0x549630['body']['users'])[_0x9369da(0xd3)](_0x134352=>{const _0x43b623=_0x9369da;this[_0x43b623(0xce)][_0x43b623(0xb1)](_0x134352);}),_0x8ae5ca;}[_0x46332e(0xc9)](_0x1a51c0){const _0x4c9286=_0x46332e;return{'id':_0x1a51c0['id'],'threadId':_0x1a51c0[_0x4c9286(0xec)],'ref':_0x1a51c0[_0x4c9286(0xa2)]};}};S=re([I(0x0,_0x266c4e(_0x3413dc)),I(0x1,_0x266c4e(_0x230e55)),I(0x2,_0x266c4e(_0x339d63)),I(0x3,_0x266c4e(_0x5b23b5))],S);var oe=Object['defineProperty'],ne=Object['getOwnPropertyDescriptor'],ie=(_0x2ac714,_0x474c04,_0x458d00,_0x427648)=>{const _0x19106f=_0x46332e;for(var _0x5bbcc8=_0x427648>0x1?void 0x0:_0x427648?ne(_0x474c04,_0x458d00):_0x474c04,_0x327c31=_0x2ac714[_0x19106f(0xe4)]-0x1,_0x7d769d;_0x327c31>=0x0;_0x327c31--)(_0x7d769d=_0x2ac714[_0x327c31])&&(_0x5bbcc8=(_0x427648?_0x7d769d(_0x474c04,_0x458d00,_0x5bbcc8):_0x7d769d(_0x5bbcc8))||_0x5bbcc8);return _0x427648&&_0x5bbcc8&&oe(_0x474c04,_0x458d00,_0x5bbcc8),_0x5bbcc8;},M=(_0x16d37c,_0x233b0d)=>(_0x582ea0,_0x221322)=>_0x233b0d(_0x582ea0,_0x221322,_0x16d37c);function _0x4d30(_0x39b7d4,_0x119ff6){const _0x1843e3=_0x1843();return _0x4d30=function(_0x4d3007,_0x21f533){_0x4d3007=_0x4d3007-0x87;let _0x1834c3=_0x1843e3[_0x4d3007];return _0x1834c3;},_0x4d30(_0x39b7d4,_0x119ff6);}let b=class extends _0x316e16{constructor(_0xd09c82,_0x399ea1){const _0x2bdf1e=_0x46332e;super(),this[_0x2bdf1e(0xbb)]=_0xd09c82,this[_0x2bdf1e(0xcc)]=_0x399ea1,this[_0x2bdf1e(0xa9)]();}[_0x46332e(0xa9)](){const _0x2ee262=_0x46332e;this[_0x2ee262(0xbb)]['dataSource']=this[_0x2ee262(0xcc)],this[_0x2ee262(0xbb)][_0x2ee262(0xef)]=!0x1;}};b=ie([M(0x0,_0x30c092),M(0x1,_0x266c4e(S))],b);var $=Object['defineProperty'],ce=Object[_0x46332e(0xeb)],ae=(_0xe4d9c1,_0xbf1cee,_0x4f7b80)=>_0xbf1cee in _0xe4d9c1?$(_0xe4d9c1,_0xbf1cee,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4f7b80}):_0xe4d9c1[_0xbf1cee]=_0x4f7b80,de=(_0x27dda0,_0x1e0737,_0x5e1f4b,_0xfcefad)=>{const _0x27904e=_0x46332e;for(var _0x468ada=_0xfcefad>0x1?void 0x0:_0xfcefad?ce(_0x1e0737,_0x5e1f4b):_0x1e0737,_0x5c1967=_0x27dda0[_0x27904e(0xe4)]-0x1,_0x3639d3;_0x5c1967>=0x0;_0x5c1967--)(_0x3639d3=_0x27dda0[_0x5c1967])&&(_0x468ada=(_0xfcefad?_0x3639d3(_0x1e0737,_0x5e1f4b,_0x468ada):_0x3639d3(_0x468ada))||_0x468ada);return _0xfcefad&&_0x468ada&&$(_0x1e0737,_0x5e1f4b,_0x468ada),_0x468ada;},N=(_0x1f185b,_0x34abb9)=>(_0x110b29,_0x30cf43)=>_0x34abb9(_0x110b29,_0x30cf43,_0x1f185b),j=(_0x1a44ef,_0x4feabe,_0x444723)=>ae(_0x1a44ef,typeof _0x4feabe!=_0x46332e(0x93)?_0x4feabe+'':_0x4feabe,_0x444723);let C=class extends _0x29f977{constructor(_0x1df6ed=P,_0x4d8755,_0x4ea201){const _0xfec900=_0x46332e;super(),this[_0xfec900(0xbe)]=_0x1df6ed,this[_0xfec900(0x99)]=_0x4d8755,this[_0xfec900(0x8e)]=_0x4ea201;const {..._0x1d0686}=_0x483361({},P,this[_0xfec900(0xbe)]);this[_0xfec900(0x8e)][_0xfec900(0xda)](X,_0x1d0686);}[_0x46332e(0xf0)](){const _0xc5217f=_0x46332e;[[S],[b],[f]][_0xc5217f(0xd3)](_0x4e5067=>{const _0xe77e18=_0xc5217f;this[_0xe77e18(0x99)][_0xe77e18(0xe2)](_0x4e5067);});}[_0x46332e(0x9f)](){const _0x5870f1=_0x46332e;this[_0x5870f1(0x99)]['get'](b),this[_0x5870f1(0x99)]['get'](f);}};j(C,_0x46332e(0xde),B),j(C,_0x46332e(0xd5),_0x230c92[_0x46332e(0xab)]),C=de([_0x32332f(_0x3c491e,_0x4d77bf,_0x4c609e),N(0x1,_0x266c4e(_0x5b23b5)),N(0x2,_0x4ae22a)],C);export{C as UniverThreadCommentDataSourcePlugin};
1
+ const _0x483a87=_0x4978;(function(_0x2ed3fe,_0x2da360){const _0xaef6f8=_0x4978,_0x1d91e3=_0x2ed3fe();while(!![]){try{const _0x45df9e=parseInt(_0xaef6f8(0xbf))/0x1+parseInt(_0xaef6f8(0xe5))/0x2+-parseInt(_0xaef6f8(0xa0))/0x3+-parseInt(_0xaef6f8(0xb8))/0x4+-parseInt(_0xaef6f8(0xaf))/0x5*(-parseInt(_0xaef6f8(0x94))/0x6)+parseInt(_0xaef6f8(0xc1))/0x7+-parseInt(_0xaef6f8(0xd9))/0x8;if(_0x45df9e===_0x2da360)break;else _0x1d91e3['push'](_0x1d91e3['shift']());}catch(_0x17693d){_0x1d91e3['push'](_0x1d91e3['shift']());}}}(_0x5bb2,0x553a0));import{CommentService as _0xea8c4d,CollaborationSessionService as _0xf43820,UniverCollaborationClientPlugin as _0x53f4e0}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4d0fa9}from'@univerjs-pro/license';function _0x5bb2(){const _0x4f0d10=['parse','COMMENT','syncUpdateMutationToColla','addComment','Edit','error','createTimestamp','dataSource','values','get','reply','rangeType','rangeId','post','resolved','3555024wJbOUf','user','slice','_configService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_userService','resolveComment','_config','type','/delete','personId','/reply','844804RZFfmX','Add','getUser','Delete','threadId','_threadCommentDataSource','payload','onStarting','stringify','/add','root','subscribe','Reply','getComment','_init','_initDataSource','add','requireSession','pipe','/solved','disposeWithMe','_initUserSync','94086dpIIdY','updateComment','find','forEach','UNRECOGNIZED','_threadCommentDataSourceService','format','replyId','_injector','defineProperty','users','_threadCommentModel','1373508fbgOpI','thread-comment-data-source.config','customRanges','commentUpdate$','_sessionService','Solve','YYYY/MM/DD\x20HH:mm','/universer-api/comment/unit/','getMemberID','getOwnPropertyDescriptor','_httpService','/universer-api/user/list','getUnit','getCurrentUser','map','55LmpZYG','_commentService','size','Unknown','Solved','userID','content','solved','replies','101492AXVFKB','length','OpenOrReOpen','code','symbol','filter','setConfig','487372mShWom','UNIVER_UNKNOWN','1360870aYEtKQ','onReady','userId','deleteComment','saveCommentToSnapshot','addUser','/edit','/list','body'];_0x5bb2=function(){return _0x4f0d10;};return _0x5bb2();}import{dayjs as _0x5ac57a,UserManagerService as _0x4b74f8,Inject as _0x1c3f7e,Injector as _0x333bd3,Disposable as _0x2cb0ba,CustomRangeType as _0x1dbbcc,UniverInstanceType as _0x310767,DependentOn as _0x305b34,Plugin as _0x3efe4c,merge as _0x1947cd,IConfigService as _0x58d764}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x22cb8}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x319e88,IThreadCommentDataSourceService as _0x35b8ff}from'@univerjs/thread-comment';import{bufferTime as _0x21ee96}from'rxjs';import{HTTPService as _0x33040e}from'@univerjs/network';const B=_0x483a87(0xdd);var v=(_0x158edc=>(_0x158edc[_0x158edc[_0x483a87(0xba)]=0x0]=_0x483a87(0xba),_0x158edc[_0x158edc[_0x483a87(0xb3)]=0x1]=_0x483a87(0xb3),_0x158edc[_0x158edc[_0x483a87(0x98)]=-0x1]=_0x483a87(0x98),_0x158edc))(v||{}),p=(_0x18486a=>(_0x18486a[_0x18486a[_0x483a87(0xb2)]=0x0]=_0x483a87(0xb2),_0x18486a[_0x18486a[_0x483a87(0xe6)]=0x1]=_0x483a87(0xe6),_0x18486a[_0x18486a[_0x483a87(0xf1)]=0x2]=_0x483a87(0xf1),_0x18486a[_0x18486a[_0x483a87(0xce)]=0x3]='Edit',_0x18486a[_0x18486a[_0x483a87(0xe8)]=0x4]='Delete',_0x18486a[_0x18486a['Solve']=0x5]=_0x483a87(0xa5),_0x18486a[_0x18486a['UNRECOGNIZED']=-0x1]=_0x483a87(0x98),_0x18486a))(p||{});const O=_0x33ad30=>_0x5ac57a(new Date(+_0x33ad30))[_0x483a87(0x9a)]('YYYY/MM/DD\x20HH:mm'),K=async(_0x8fd83d,_0x45ae9f)=>{const _0x4674be=_0x483a87,_0x599b96=_0x8fd83d[_0x4674be(0xd3)](_0x4b74f8),_0x1d3c17=_0x8fd83d[_0x4674be(0xd3)](_0x33040e);_0x45ae9f['forEach'](_0x292593=>{const _0x1855a2=_0x4674be;_0x599b96[_0x1855a2(0xe7)](_0x292593)&&_0x45ae9f['delete'](_0x292593);}),_0x45ae9f[_0x4674be(0xb1)]&&(await _0x1d3c17[_0x4674be(0xd3)](_0x4674be(0xab),{'params':{'userIDs':[..._0x45ae9f]}}))[_0x4674be(0xc9)]['users']['forEach'](_0x4df09a=>{const _0x10cd21=_0x4674be;_0x4df09a&&_0x599b96[_0x10cd21(0xc6)](_0x4df09a);});};var V=Object['defineProperty'],z=Object[_0x483a87(0xa9)],Q=(_0x26e3b5,_0x44d901,_0x2f5a15,_0x4d0978)=>{const _0x39d81e=_0x483a87;for(var _0x27123f=_0x4d0978>0x1?void 0x0:_0x4d0978?z(_0x44d901,_0x2f5a15):_0x44d901,_0x1da4c1=_0x26e3b5[_0x39d81e(0xb9)]-0x1,_0x491e37;_0x1da4c1>=0x0;_0x1da4c1--)(_0x491e37=_0x26e3b5[_0x1da4c1])&&(_0x27123f=(_0x4d0978?_0x491e37(_0x44d901,_0x2f5a15,_0x27123f):_0x491e37(_0x27123f))||_0x27123f);return _0x4d0978&&_0x27123f&&V(_0x44d901,_0x2f5a15,_0x27123f),_0x27123f;},_=(_0x506023,_0x4af030)=>(_0x4f06d6,_0x37aa7f)=>_0x4af030(_0x4f06d6,_0x37aa7f,_0x506023);let f=class extends _0x2cb0ba{constructor(_0xe41f1d,_0x49fb59,_0x49a375,_0x3b9927){const _0x24319d=_0x483a87;super(),this[_0x24319d(0xb0)]=_0xe41f1d,this[_0x24319d(0x9f)]=_0x49fb59,this[_0x24319d(0xde)]=_0x49a375,this['_injector']=_0x3b9927,this[_0x24319d(0x8c)](),this[_0x24319d(0x93)]();}['_initUserSync'](){const _0x4770fb=_0x483a87;this[_0x4770fb(0x92)](this[_0x4770fb(0x9f)][_0x4770fb(0xa3)][_0x4770fb(0x90)](_0x21ee96(0x10))[_0x4770fb(0xf0)](_0x36991b=>{const _0x511a5a=_0x4770fb,_0x5a5a91=new Set();_0x36991b[_0x511a5a(0x97)](_0x52ba1b=>{const _0x3a35aa=_0x511a5a;switch(_0x52ba1b['type']){case'add':{const _0x3f0437=_0x52ba1b[_0x3a35aa(0xeb)][_0x3a35aa(0xe3)];_0x5a5a91[_0x3a35aa(0x8e)](_0x3f0437);break;}}}),K(this[_0x511a5a(0x9c)],_0x5a5a91);}));}[_0x483a87(0x8c)](){const _0xdf37ff=_0x483a87;this[_0xdf37ff(0x92)](this[_0xdf37ff(0xb0)][_0xdf37ff(0xa3)][_0xdf37ff(0xf0)](async _0x6284df=>{const _0x2165a3=_0xdf37ff;var _0x47995e,_0x2f44dc,_0x3ac679,_0x2b6a41;const _0x5166c1=(_0x47995e=this[_0x2165a3(0x9f)][_0x2165a3(0xac)](_0x6284df['unitId'])[_0x2165a3(0x96)](_0x4518c2=>_0x4518c2[_0x2165a3(0xe9)]===_0x6284df[_0x2165a3(0xe9)]))==null?void 0x0:_0x47995e['root'];if(!_0x5166c1)return;const {unitId:_0x2a8a90,subUnitId:_0x2eb574}=_0x5166c1;switch(_0x6284df[_0x2165a3(0xda)]&&this[_0x2165a3(0xde)]['addUser'](_0x6284df['user']),_0x6284df[_0x2165a3(0xe1)]){case p[_0x2165a3(0xe6)]:break;case p[_0x2165a3(0xf1)]:{this[_0x2165a3(0x9f)][_0x2165a3(0xcd)](_0x2a8a90,_0x2eb574,{'unitId':_0x2a8a90,'subUnitId':_0x2eb574,'ref':'','id':_0x6284df[_0x2165a3(0x9b)],'dT':O(+_0x6284df[_0x2165a3(0xd0)]),'threadId':_0x6284df[_0x2165a3(0xe9)],'personId':(_0x3ac679=(_0x2f44dc=_0x6284df['user'])==null?void 0x0:_0x2f44dc[_0x2165a3(0xb4)])!=null?_0x3ac679:_0x6284df[_0x2165a3(0xc3)],'text':JSON[_0x2165a3(0xca)](_0x6284df[_0x2165a3(0xb5)]),'parentId':_0x5166c1['id']});break;}case p[_0x2165a3(0xe8)]:{const _0x1ed2c9=this[_0x2165a3(0x9f)][_0x2165a3(0xf2)](_0x2a8a90,_0x2eb574,_0x6284df['replyId']);_0x1ed2c9&&_0x1ed2c9['parentId']&&this[_0x2165a3(0x9f)]['deleteComment'](_0x2a8a90,_0x2eb574,_0x6284df[_0x2165a3(0x9b)]);break;}case p[_0x2165a3(0xce)]:{this[_0x2165a3(0x9f)][_0x2165a3(0x95)](_0x2a8a90,_0x2eb574,{'commentId':_0x6284df[_0x2165a3(0x9b)],'text':JSON[_0x2165a3(0xca)](_0x6284df['content'])});break;}case p[_0x2165a3(0xa5)]:{const _0x59d5ad=(_0x2b6a41=this[_0x2165a3(0x9f)]['getUnit'](_0x6284df['unitId'])[_0x2165a3(0x96)](_0x20a9bd=>_0x20a9bd[_0x2165a3(0xe9)]===_0x6284df[_0x2165a3(0xe9)]))==null?void 0x0:_0x2b6a41[_0x2165a3(0xef)];_0x59d5ad&&this[_0x2165a3(0x9f)][_0x2165a3(0xdf)](_0x2a8a90,_0x2eb574,_0x59d5ad['id'],_0x6284df[_0x2165a3(0xb6)]===v['Solved']);break;}}}));}};f=Q([_(0x0,_0x1c3f7e(_0xea8c4d)),_(0x1,_0x1c3f7e(_0x319e88)),_(0x2,_0x1c3f7e(_0x4b74f8)),_(0x3,_0x1c3f7e(_0x333bd3))],f);const X=_0x483a87(0xa1),P={};var k=Object[_0x483a87(0x9d)],ee=Object['getOwnPropertyDescriptor'],re=(_0x4650a2,_0xfa25fe,_0x3c005e,_0x54d2c2)=>{const _0x5c175f=_0x483a87;for(var _0xbd98d6=_0x54d2c2>0x1?void 0x0:_0x54d2c2?ee(_0xfa25fe,_0x3c005e):_0xfa25fe,_0x2322d1=_0x4650a2[_0x5c175f(0xb9)]-0x1,_0xb802d7;_0x2322d1>=0x0;_0x2322d1--)(_0xb802d7=_0x4650a2[_0x2322d1])&&(_0xbd98d6=(_0x54d2c2?_0xb802d7(_0xfa25fe,_0x3c005e,_0xbd98d6):_0xb802d7(_0xbd98d6))||_0xbd98d6);return _0x54d2c2&&_0xbd98d6&&k(_0xfa25fe,_0x3c005e,_0xbd98d6),_0xbd98d6;},I=(_0x5bb6ea,_0x46b968)=>(_0x595235,_0x3ad416)=>_0x46b968(_0x595235,_0x3ad416,_0x5bb6ea);function te(_0x23aaa5,_0x5dcefe){const _0x38262a=_0x483a87,_0x5018dc=_0x23aaa5[_0x38262a(0xb7)][0x0];return{..._0x5dcefe,'id':_0x5018dc[_0x38262a(0x9b)],'resolved':_0x23aaa5[_0x38262a(0xb6)]===0x1,'dT':O(_0x5018dc['createTimestamp']),'personId':_0x5018dc['userId'],'threadId':_0x5018dc[_0x38262a(0xe9)]};}function se(_0x135ab1,_0x55c51e,_0x305460){const _0x1c7213=_0x483a87;var _0x39b9f8,_0x3c1917;if(((_0x3c1917=(_0x39b9f8=_0x135ab1==null?void 0x0:_0x135ab1[_0x1c7213(0xb7)])==null?void 0x0:_0x39b9f8['length'])!=null?_0x3c1917:0x0)>0x0){const _0x48b875=(_0x35f431,_0x5119f2)=>({'id':_0x35f431[_0x1c7213(0x9b)],'threadId':_0x35f431[_0x1c7213(0xe9)],'dT':O(_0x35f431['createTimestamp']),'personId':_0x35f431[_0x1c7213(0xc3)],'resolved':_0x135ab1[_0x1c7213(0xb6)]===v[_0x1c7213(0xb3)],'unitId':_0x55c51e,'subUnitId':_0x305460,'text':JSON[_0x1c7213(0xca)](_0x35f431[_0x1c7213(0xb5)]),'parentId':_0x5119f2}),_0x330ced=_0x48b875(_0x135ab1[_0x1c7213(0xb7)][0x0]);return{..._0x330ced,'children':_0x135ab1[_0x1c7213(0xb7)][_0x1c7213(0xdb)](0x1)['map'](_0x3dfbfd=>_0x48b875(_0x3dfbfd,_0x330ced['id']))};}return null;}let S=class{constructor(_0x53f626,_0x2a78c7,_0x4720aa,_0x465693){const _0x49eebf=_0x483a87;this[_0x49eebf(0xaa)]=_0x53f626,this[_0x49eebf(0xde)]=_0x2a78c7,this[_0x49eebf(0xa4)]=_0x4720aa,this[_0x49eebf(0x9c)]=_0x465693;}async[_0x483a87(0xcd)](_0x5d4e33){const _0x308473=_0x483a87;var _0xaed305,_0x398bdf;const {parentId:_0x11efdf,unitId:_0x1ec9e2,text:_0x720741,threadId:_0x38ceac}=_0x5d4e33,_0x45599b=(_0x398bdf=(_0xaed305=_0x720741[_0x308473(0xa2)])==null?void 0x0:_0xaed305[_0x308473(0xbd)](_0x5b598a=>_0x5b598a[_0x308473(0xd5)]===_0x1dbbcc['COMMENT'])[_0x308473(0xae)](_0x45e244=>_0x45e244[_0x308473(0xd6)]))!=null?_0x398bdf:[],_0x1ed378=JSON['stringify'](_0x720741),_0x1d8565=(await this[_0x308473(0xa4)][_0x308473(0x8f)](_0x1ec9e2))[_0x308473(0xa8)]();if(_0x11efdf){const _0x16614e={'memberId':_0x1d8565,'unitId':_0x1ec9e2,'content':_0x1ed378,'mention':_0x45599b,'threadId':_0x38ceac},_0xd479c8=(await this[_0x308473(0xaa)][_0x308473(0xd7)](_0x308473(0xa7)+_0x1ec9e2+_0x308473(0xe4),{'body':_0x16614e}))['body'][_0x308473(0xd4)];return{..._0x5d4e33,'id':_0xd479c8[_0x308473(0x9b)],'dT':_0x5ac57a(+_0xd479c8[_0x308473(0xd0)])[_0x308473(0x9a)](_0x308473(0xa6)),'personId':_0xd479c8[_0x308473(0xc3)]};}else{const _0x4c25b8={'memberId':_0x1d8565,'unitId':_0x1ec9e2,'content':_0x1ed378,'mention':_0x45599b},_0xd07fc9=await this[_0x308473(0xaa)][_0x308473(0xd7)](_0x308473(0xa7)+_0x1ec9e2+_0x308473(0xee),{'body':_0x4c25b8});return te(_0xd07fc9[_0x308473(0xc9)]['comment'],_0x5d4e33);}}async[_0x483a87(0x95)](_0x6b9e84){const _0x1bed3d=_0x483a87;var _0x1258bc,_0x20bb47;const {text:_0x1df47e,unitId:_0x2a44b8}=_0x6b9e84,_0x413222=(_0x20bb47=(_0x1258bc=_0x1df47e[_0x1bed3d(0xa2)])==null?void 0x0:_0x1258bc[_0x1bed3d(0xbd)](_0x4bc9a5=>_0x4bc9a5[_0x1bed3d(0xd5)]===_0x1dbbcc[_0x1bed3d(0xcb)])['map'](_0xcf99bd=>_0xcf99bd[_0x1bed3d(0xd6)]))!=null?_0x20bb47:[],_0x519217=JSON[_0x1bed3d(0xed)](_0x1df47e),_0x229c38=_0x6b9e84[_0x1bed3d(0xe9)],_0x1f2cb8=_0x6b9e84['id'],_0x4e6852={'memberId':(await this['_sessionService']['requireSession'](_0x2a44b8))[_0x1bed3d(0xa8)](),'unitId':_0x2a44b8,'threadId':_0x229c38,'mention':_0x413222,'content':_0x519217,'replyId':_0x1f2cb8},_0x2417b3=await this['_httpService'][_0x1bed3d(0xd7)](_0x1bed3d(0xa7)+_0x2a44b8+_0x1bed3d(0xc7),{'body':_0x4e6852});return!_0x2417b3['body']['error']||_0x2417b3[_0x1bed3d(0xc9)][_0x1bed3d(0xcf)][_0x1bed3d(0xbb)]===0x1;}async[_0x483a87(0xdf)](_0x587a37){const _0x82b465=_0x483a87,{unitId:_0x3698bd}=_0x587a37,_0xa0eb19=_0x587a37['threadId'],_0x37fca7={'memberId':this['_userService'][_0x82b465(0xad)]()[_0x82b465(0xb4)],'unitId':_0x3698bd,'threadId':_0xa0eb19,'solved':_0x587a37[_0x82b465(0xd8)]?v[_0x82b465(0xb3)]:v[_0x82b465(0xba)]},_0x35b7f2=await this['_httpService'][_0x82b465(0xd7)](_0x82b465(0xa7)+_0x3698bd+_0x82b465(0x91),{'body':_0x37fca7});return!_0x35b7f2[_0x82b465(0xc9)][_0x82b465(0xcf)]||_0x35b7f2[_0x82b465(0xc9)][_0x82b465(0xcf)]['code']===0x1;}async[_0x483a87(0xc4)](_0x2d21af,_0xb0d414,_0x47c860,_0x190a95){const _0x335c42=_0x483a87,_0x2e57e7={'memberId':(await this[_0x335c42(0xa4)]['requireSession'](_0x2d21af))[_0x335c42(0xa8)](),'threadId':_0x47c860,'replyId':_0x190a95,'unitId':_0x2d21af},_0x1fe506=await this['_httpService'][_0x335c42(0xd7)](_0x335c42(0xa7)+_0x2d21af+_0x335c42(0xe2),{'body':_0x2e57e7});return!_0x1fe506['body'][_0x335c42(0xcf)]||_0x1fe506['body']['error']['code']===0x1;}async['listComments'](_0xf701e2,_0x330f11,_0x2c37bd){const _0x40e3cd=_0x483a87,_0x37e883={'unitId':_0xf701e2,'threadId':_0x2c37bd},_0x3a4b4e=await this['_httpService']['post'](_0x40e3cd(0xa7)+_0xf701e2+_0x40e3cd(0xc8),{'body':_0x37e883}),_0x4095cc=_0x2c37bd[_0x40e3cd(0xae)](_0x1961f8=>se(_0x3a4b4e['body']['comments'][_0x1961f8],_0xf701e2,_0x330f11))[_0x40e3cd(0xbd)](Boolean);return Object[_0x40e3cd(0xd2)](_0x3a4b4e[_0x40e3cd(0xc9)][_0x40e3cd(0x9e)])['forEach'](_0x5666ee=>{const _0x2b095c=_0x40e3cd;this[_0x2b095c(0xde)][_0x2b095c(0xc6)](_0x5666ee);}),_0x4095cc;}[_0x483a87(0xc5)](_0x58b772){const _0x25e50e=_0x483a87;return{'id':_0x58b772['id'],'threadId':_0x58b772[_0x25e50e(0xe9)],'ref':_0x58b772['ref']};}};S=re([I(0x0,_0x1c3f7e(_0x33040e)),I(0x1,_0x1c3f7e(_0x4b74f8)),I(0x2,_0x1c3f7e(_0xf43820)),I(0x3,_0x1c3f7e(_0x333bd3))],S);var oe=Object[_0x483a87(0x9d)],ne=Object[_0x483a87(0xa9)],ie=(_0x2fc68e,_0x15bd0a,_0x4b8eb6,_0x43d511)=>{const _0x5c38f6=_0x483a87;for(var _0x38bebe=_0x43d511>0x1?void 0x0:_0x43d511?ne(_0x15bd0a,_0x4b8eb6):_0x15bd0a,_0x542050=_0x2fc68e[_0x5c38f6(0xb9)]-0x1,_0x5a8b19;_0x542050>=0x0;_0x542050--)(_0x5a8b19=_0x2fc68e[_0x542050])&&(_0x38bebe=(_0x43d511?_0x5a8b19(_0x15bd0a,_0x4b8eb6,_0x38bebe):_0x5a8b19(_0x38bebe))||_0x38bebe);return _0x43d511&&_0x38bebe&&oe(_0x15bd0a,_0x4b8eb6,_0x38bebe),_0x38bebe;},M=(_0x3ce58d,_0x216ce0)=>(_0x32c5a6,_0x3bcaa6)=>_0x216ce0(_0x32c5a6,_0x3bcaa6,_0x3ce58d);let b=class extends _0x2cb0ba{constructor(_0x57ca82,_0xe3319c){const _0x7a4733=_0x483a87;super(),this[_0x7a4733(0x99)]=_0x57ca82,this[_0x7a4733(0xea)]=_0xe3319c,this[_0x7a4733(0x8d)]();}[_0x483a87(0x8d)](){const _0x1fa01d=_0x483a87;this[_0x1fa01d(0x99)][_0x1fa01d(0xd1)]=this[_0x1fa01d(0xea)],this[_0x1fa01d(0x99)][_0x1fa01d(0xcc)]=!0x1;}};b=ie([M(0x0,_0x35b8ff),M(0x1,_0x1c3f7e(S))],b);var $=Object['defineProperty'],ce=Object[_0x483a87(0xa9)],ae=(_0x558e0c,_0x46be64,_0x312e25)=>_0x46be64 in _0x558e0c?$(_0x558e0c,_0x46be64,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x312e25}):_0x558e0c[_0x46be64]=_0x312e25,de=(_0x3eb319,_0x170ff2,_0x37913e,_0x4066ea)=>{const _0x2c1e36=_0x483a87;for(var _0x32091f=_0x4066ea>0x1?void 0x0:_0x4066ea?ce(_0x170ff2,_0x37913e):_0x170ff2,_0x1fbf2d=_0x3eb319[_0x2c1e36(0xb9)]-0x1,_0x275101;_0x1fbf2d>=0x0;_0x1fbf2d--)(_0x275101=_0x3eb319[_0x1fbf2d])&&(_0x32091f=(_0x4066ea?_0x275101(_0x170ff2,_0x37913e,_0x32091f):_0x275101(_0x32091f))||_0x32091f);return _0x4066ea&&_0x32091f&&$(_0x170ff2,_0x37913e,_0x32091f),_0x32091f;},N=(_0x50b079,_0xdac1a4)=>(_0x148262,_0x4b642d)=>_0xdac1a4(_0x148262,_0x4b642d,_0x50b079),j=(_0x25d3a2,_0x3e3dc3,_0xcd2929)=>ae(_0x25d3a2,typeof _0x3e3dc3!=_0x483a87(0xbc)?_0x3e3dc3+'':_0x3e3dc3,_0xcd2929);function _0x4978(_0x57c95e,_0x2451af){const _0x5bb291=_0x5bb2();return _0x4978=function(_0x4978ae,_0x484911){_0x4978ae=_0x4978ae-0x8c;let _0x131e0c=_0x5bb291[_0x4978ae];return _0x131e0c;},_0x4978(_0x57c95e,_0x2451af);}let C=class extends _0x3efe4c{constructor(_0x4f2bc0=P,_0x479687,_0x5c9a1f){const _0x154fd2=_0x483a87;super(),this['_config']=_0x4f2bc0,this[_0x154fd2(0x9c)]=_0x479687,this[_0x154fd2(0xdc)]=_0x5c9a1f;const {..._0x328f12}=_0x1947cd({},P,this[_0x154fd2(0xe0)]);this[_0x154fd2(0xdc)][_0x154fd2(0xbe)](X,_0x328f12);}[_0x483a87(0xec)](){[[S],[b],[f]]['forEach'](_0xf2b0a1=>{const _0xddc4a5=_0x4978;this[_0xddc4a5(0x9c)][_0xddc4a5(0x8e)](_0xf2b0a1);});}[_0x483a87(0xc2)](){const _0x1e91a0=_0x483a87;this['_injector'][_0x1e91a0(0xd3)](b),this['_injector'][_0x1e91a0(0xd3)](f);}};j(C,'pluginName',B),j(C,_0x483a87(0xe1),_0x310767[_0x483a87(0xc0)]),C=de([_0x305b34(_0x22cb8,_0x53f4e0,_0x4d0fa9),N(0x1,_0x1c3f7e(_0x333bd3)),N(0x2,_0x58d764)],C);export{C as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x112e(){const _0xb1c7cd=['Delete','saveCommentToSnapshot','_threadCommentModel','@univerjs/network','forEach','requireSession','/reply','@univerjs/core','object','defineProperty','parse','UNRECOGNIZED','CustomRangeType','customRanges','listComments','_httpService','setConfig','dataSource','comment','filter','commentUpdate$','map','/list','onStarting','error','UniverThreadCommentUIPlugin','_init','rangeId','getUnit','IThreadCommentDataSourceService','deleteComment','addUser','getMemberID','HTTPService','COMMENT','userID','/add','getUser','Solved','addComment','resolveComment','@univerjs/thread-comment-ui','UniverCore','symbol','/universer-api/comment/unit/','subscribe','_injector','_threadCommentDataSource','size','/solved','Inject','stringify','function','UniverThreadCommentDataSourcePlugin','post','1066xYzobq','UniverProCollaborationClient','OpenOrReOpen','@univerjs-pro/collaboration-client','593724SbHdin','216024DSJlyh','UniverProThreadCommentDatasource','onReady','87tnXGGA','6513300DbFDDH','Injector','syncUpdateMutationToColla','unitId','/delete','add','1095073NEBJeS','rxjs','YYYY/MM/DD\x20HH:mm','ThreadCommentModel','_sessionService','_configService','UserManagerService','_initDataSource','type','userId','205cWUfNW','getComment','447150vsXPVH','getCurrentUser','content','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','code','toStringTag','DependentOn','Unknown','CommentService','getOwnPropertyDescriptor','_config','_initUserSync','disposeWithMe','updateComment','replyId','@univerjs-pro/license','Disposable','user','Module','slice','Add','format','replies','createTimestamp','UniverLicensePlugin','rangeType','Plugin','dayjs','_userService','Solve','solved','length','@univerjs/thread-comment','root','values','UniverProLicense','UniverThreadCommentUi','thread-comment-data-source.config','body','bufferTime','_threadCommentDataSourceService','find','IConfigService','reply','threadId','UniverThreadComment','UniverCollaborationClientPlugin','UniverInstanceType','UNIVER_UNKNOWN','get','amd','Reply','Edit','_commentService','81XQTnAP','16532pYliCZ'];_0x112e=function(){return _0xb1c7cd;};return _0x112e();}function _0x4446(_0x5b9ca3,_0x41d462){const _0x112ef8=_0x112e();return _0x4446=function(_0x4446ee,_0x520df9){_0x4446ee=_0x4446ee-0x163;let _0x4d58f2=_0x112ef8[_0x4446ee];return _0x4d58f2;},_0x4446(_0x5b9ca3,_0x41d462);}(function(_0x2ec8dc,_0x3c6068){const _0x1a4125=_0x4446,_0x22ef7f=_0x2ec8dc();while(!![]){try{const _0x4a0480=parseInt(_0x1a4125(0x187))/0x1*(-parseInt(_0x1a4125(0x17f))/0x2)+parseInt(_0x1a4125(0x183))/0x3+-parseInt(_0x1a4125(0x1d2))/0x4*(-parseInt(_0x1a4125(0x198))/0x5)+parseInt(_0x1a4125(0x19a))/0x6+parseInt(_0x1a4125(0x18e))/0x7+parseInt(_0x1a4125(0x184))/0x8*(parseInt(_0x1a4125(0x1d1))/0x9)+-parseInt(_0x1a4125(0x188))/0xa;if(_0x4a0480===_0x3c6068)break;else _0x22ef7f['push'](_0x22ef7f['shift']());}catch(_0x8d9fc7){_0x22ef7f['push'](_0x22ef7f['shift']());}}}(_0x112e,0x23123),function(_0x59bf5f,_0x4cbbc2){const _0x20f9c7=_0x4446;typeof exports==_0x20f9c7(0x1db)&&typeof module<'u'?_0x4cbbc2(exports,require('@univerjs-pro/collaboration-client'),require(_0x20f9c7(0x1aa)),require(_0x20f9c7(0x1da)),require(_0x20f9c7(0x171)),require(_0x20f9c7(0x1bb)),require(_0x20f9c7(0x18f)),require(_0x20f9c7(0x1d6))):typeof define==_0x20f9c7(0x17c)&&define[_0x20f9c7(0x1cd)]?define(['exports',_0x20f9c7(0x182),_0x20f9c7(0x1aa),'@univerjs/core',_0x20f9c7(0x171),_0x20f9c7(0x1bb),_0x20f9c7(0x18f),'@univerjs/network'],_0x4cbbc2):(_0x59bf5f=typeof globalThis<'u'?globalThis:_0x59bf5f||self,_0x4cbbc2(_0x59bf5f[_0x20f9c7(0x185)]={},_0x59bf5f[_0x20f9c7(0x180)],_0x59bf5f[_0x20f9c7(0x1be)],_0x59bf5f[_0x20f9c7(0x172)],_0x59bf5f[_0x20f9c7(0x1bf)],_0x59bf5f[_0x20f9c7(0x1c8)],_0x59bf5f[_0x20f9c7(0x18f)],_0x59bf5f['UniverNetwork']));}(this,function(_0x145b5,_0x327acb,_0x449190,_0x2b0b97,_0xfca50d,_0x3b6208,_0x41c0ae,_0x532fa9){'use strict';const _0x19d907=_0x4446;const _0x471ad8=_0x19d907(0x19e);var _0x438bff=(_0xc2a157=>(_0xc2a157[_0xc2a157['OpenOrReOpen']=0x0]=_0x19d907(0x181),_0xc2a157[_0xc2a157[_0x19d907(0x16e)]=0x1]=_0x19d907(0x16e),_0xc2a157[_0xc2a157[_0x19d907(0x1de)]=-0x1]=_0x19d907(0x1de),_0xc2a157))(_0x438bff||{}),_0x2f7bff=(_0x3a122b=>(_0x3a122b[_0x3a122b[_0x19d907(0x1a2)]=0x0]=_0x19d907(0x1a2),_0x3a122b[_0x3a122b[_0x19d907(0x1af)]=0x1]=_0x19d907(0x1af),_0x3a122b[_0x3a122b[_0x19d907(0x1ce)]=0x2]=_0x19d907(0x1ce),_0x3a122b[_0x3a122b['Edit']=0x3]=_0x19d907(0x1cf),_0x3a122b[_0x3a122b[_0x19d907(0x1d3)]=0x4]='Delete',_0x3a122b[_0x3a122b['Solve']=0x5]=_0x19d907(0x1b8),_0x3a122b[_0x3a122b[_0x19d907(0x1de)]=-0x1]=_0x19d907(0x1de),_0x3a122b))(_0x2f7bff||{});const _0x46f85c=_0x58744f=>_0x2b0b97[_0x19d907(0x1b6)](new Date(+_0x58744f))[_0x19d907(0x1b0)]('YYYY/MM/DD\x20HH:mm'),_0x36d07a=async(_0x13357f,_0x34e349)=>{const _0x5c074d=_0x19d907,_0x5bf585=_0x13357f[_0x5c074d(0x1cc)](_0x2b0b97[_0x5c074d(0x194)]),_0x25b122=_0x13357f['get'](_0x532fa9[_0x5c074d(0x169)]);_0x34e349[_0x5c074d(0x1d7)](_0x45ce23=>{const _0x2352cb=_0x5c074d;_0x5bf585[_0x2352cb(0x16d)](_0x45ce23)&&_0x34e349['delete'](_0x45ce23);}),_0x34e349[_0x5c074d(0x178)]&&(await _0x25b122[_0x5c074d(0x1cc)]('/universer-api/user/list',{'params':{'userIDs':[..._0x34e349]}}))[_0x5c074d(0x1c1)][_0x5c074d(0x19d)][_0x5c074d(0x1d7)](_0x5ecb3a=>{const _0x688200=_0x5c074d;_0x5ecb3a&&_0x5bf585[_0x688200(0x167)](_0x5ecb3a);});};var _0x2c47d9=Object[_0x19d907(0x1dc)],_0x3aa088=Object[_0x19d907(0x1a4)],_0x5c73af=(_0x2dc8bd,_0x3c37d8,_0x18da5f,_0x2bf727)=>{const _0x1288c9=_0x19d907;for(var _0x29c824=_0x2bf727>0x1?void 0x0:_0x2bf727?_0x3aa088(_0x3c37d8,_0x18da5f):_0x3c37d8,_0x2c91de=_0x2dc8bd[_0x1288c9(0x1ba)]-0x1,_0x23bb19;_0x2c91de>=0x0;_0x2c91de--)(_0x23bb19=_0x2dc8bd[_0x2c91de])&&(_0x29c824=(_0x2bf727?_0x23bb19(_0x3c37d8,_0x18da5f,_0x29c824):_0x23bb19(_0x29c824))||_0x29c824);return _0x2bf727&&_0x29c824&&_0x2c47d9(_0x3c37d8,_0x18da5f,_0x29c824),_0x29c824;},_0x5cd49b=(_0x1215aa,_0x5a7c0e)=>(_0x30a694,_0xf26e7a)=>_0x5a7c0e(_0x30a694,_0xf26e7a,_0x1215aa);let _0x5fe89a=class extends _0x2b0b97[_0x19d907(0x1ab)]{constructor(_0x18b811,_0x5aa373,_0x23c8de,_0x4cba02){const _0x5c1892=_0x19d907;super(),this[_0x5c1892(0x1d0)]=_0x18b811,this['_threadCommentModel']=_0x5aa373,this[_0x5c1892(0x1b7)]=_0x23c8de,this['_injector']=_0x4cba02,this[_0x5c1892(0x1ed)](),this[_0x5c1892(0x1a6)]();}[_0x19d907(0x1a6)](){const _0x5b635b=_0x19d907;this[_0x5b635b(0x1a7)](this[_0x5b635b(0x1d5)]['commentUpdate$']['pipe'](_0x41c0ae[_0x5b635b(0x1c2)](0x10))['subscribe'](_0x2e5ad7=>{const _0x167362=_0x5b635b,_0xb927c5=new Set();_0x2e5ad7[_0x167362(0x1d7)](_0x59be6f=>{const _0x49584e=_0x167362;switch(_0x59be6f[_0x49584e(0x196)]){case _0x49584e(0x18d):{const _0x6d0511=_0x59be6f['payload']['personId'];_0xb927c5[_0x49584e(0x18d)](_0x6d0511);break;}}}),_0x36d07a(this[_0x167362(0x176)],_0xb927c5);}));}[_0x19d907(0x1ed)](){const _0x4c6b69=_0x19d907;this[_0x4c6b69(0x1a7)](this[_0x4c6b69(0x1d0)][_0x4c6b69(0x1e7)][_0x4c6b69(0x175)](async _0x76dad8=>{const _0x5b3273=_0x4c6b69;var _0x2b8851,_0x52cd2c,_0x349c28,_0x3186bd;const _0x3044b9=(_0x2b8851=this[_0x5b3273(0x1d5)]['getUnit'](_0x76dad8[_0x5b3273(0x18b)])['find'](_0x3f5713=>_0x3f5713[_0x5b3273(0x1c7)]===_0x76dad8[_0x5b3273(0x1c7)]))==null?void 0x0:_0x2b8851[_0x5b3273(0x1bc)];if(!_0x3044b9)return;const {unitId:_0xda76bb,subUnitId:_0x223c75}=_0x3044b9;switch(_0x76dad8[_0x5b3273(0x1ac)]&&this[_0x5b3273(0x1b7)][_0x5b3273(0x167)](_0x76dad8['user']),_0x76dad8[_0x5b3273(0x196)]){case _0x2f7bff[_0x5b3273(0x1af)]:break;case _0x2f7bff['Reply']:{this[_0x5b3273(0x1d5)]['addComment'](_0xda76bb,_0x223c75,{'unitId':_0xda76bb,'subUnitId':_0x223c75,'ref':'','id':_0x76dad8[_0x5b3273(0x1a9)],'dT':_0x46f85c(+_0x76dad8[_0x5b3273(0x1b2)]),'threadId':_0x76dad8[_0x5b3273(0x1c7)],'personId':(_0x349c28=(_0x52cd2c=_0x76dad8[_0x5b3273(0x1ac)])==null?void 0x0:_0x52cd2c[_0x5b3273(0x16b)])!=null?_0x349c28:_0x76dad8['userId'],'text':JSON[_0x5b3273(0x1dd)](_0x76dad8['content']),'parentId':_0x3044b9['id']});break;}case _0x2f7bff[_0x5b3273(0x1d3)]:{const _0x495143=this[_0x5b3273(0x1d5)][_0x5b3273(0x199)](_0xda76bb,_0x223c75,_0x76dad8[_0x5b3273(0x1a9)]);_0x495143&&_0x495143['parentId']&&this[_0x5b3273(0x1d5)][_0x5b3273(0x166)](_0xda76bb,_0x223c75,_0x76dad8['replyId']);break;}case _0x2f7bff[_0x5b3273(0x1cf)]:{this[_0x5b3273(0x1d5)][_0x5b3273(0x1a8)](_0xda76bb,_0x223c75,{'commentId':_0x76dad8[_0x5b3273(0x1a9)],'text':JSON['parse'](_0x76dad8['content'])});break;}case _0x2f7bff[_0x5b3273(0x1b8)]:{const _0xbc246d=(_0x3186bd=this['_threadCommentModel'][_0x5b3273(0x164)](_0x76dad8[_0x5b3273(0x18b)])[_0x5b3273(0x1c4)](_0x314e5a=>_0x314e5a[_0x5b3273(0x1c7)]===_0x76dad8[_0x5b3273(0x1c7)]))==null?void 0x0:_0x3186bd[_0x5b3273(0x1bc)];_0xbc246d&&this[_0x5b3273(0x1d5)][_0x5b3273(0x170)](_0xda76bb,_0x223c75,_0xbc246d['id'],_0x76dad8[_0x5b3273(0x1b9)]===_0x438bff[_0x5b3273(0x16e)]);break;}}}));}};_0x5fe89a=_0x5c73af([_0x5cd49b(0x0,_0x2b0b97['Inject'](_0x327acb[_0x19d907(0x1a3)])),_0x5cd49b(0x1,_0x2b0b97[_0x19d907(0x17a)](_0x3b6208[_0x19d907(0x191)])),_0x5cd49b(0x2,_0x2b0b97['Inject'](_0x2b0b97[_0x19d907(0x194)])),_0x5cd49b(0x3,_0x2b0b97['Inject'](_0x2b0b97[_0x19d907(0x189)]))],_0x5fe89a);const _0xeeba06=_0x19d907(0x1c0),_0x49f837={};var _0x5d6e99=Object[_0x19d907(0x1dc)],_0x1007c8=Object[_0x19d907(0x1a4)],_0x117968=(_0x33e2df,_0x13d981,_0x1ff1b1,_0x104d94)=>{const _0x15c7f6=_0x19d907;for(var _0x347b54=_0x104d94>0x1?void 0x0:_0x104d94?_0x1007c8(_0x13d981,_0x1ff1b1):_0x13d981,_0x3ce6f0=_0x33e2df[_0x15c7f6(0x1ba)]-0x1,_0x36f7db;_0x3ce6f0>=0x0;_0x3ce6f0--)(_0x36f7db=_0x33e2df[_0x3ce6f0])&&(_0x347b54=(_0x104d94?_0x36f7db(_0x13d981,_0x1ff1b1,_0x347b54):_0x36f7db(_0x347b54))||_0x347b54);return _0x104d94&&_0x347b54&&_0x5d6e99(_0x13d981,_0x1ff1b1,_0x347b54),_0x347b54;},_0x2732cd=(_0xd7434b,_0x38c780)=>(_0x4956c7,_0x39d796)=>_0x38c780(_0x4956c7,_0x39d796,_0xd7434b);function _0x48dffe(_0x252ec0,_0x3b4bc0){const _0x1ec9bf=_0x19d907,_0x7522b9=_0x252ec0[_0x1ec9bf(0x1b1)][0x0];return{..._0x3b4bc0,'id':_0x7522b9[_0x1ec9bf(0x1a9)],'resolved':_0x252ec0[_0x1ec9bf(0x1b9)]===0x1,'dT':_0x46f85c(_0x7522b9[_0x1ec9bf(0x1b2)]),'personId':_0x7522b9[_0x1ec9bf(0x197)],'threadId':_0x7522b9[_0x1ec9bf(0x1c7)]};}function _0x40dc11(_0x2d7b0d,_0x20ac77,_0x1c8169){const _0x37935e=_0x19d907;var _0x358c01,_0x5e4722;if(((_0x5e4722=(_0x358c01=_0x2d7b0d==null?void 0x0:_0x2d7b0d[_0x37935e(0x1b1)])==null?void 0x0:_0x358c01['length'])!=null?_0x5e4722:0x0)>0x0){const _0x13c51b=(_0x574d38,_0x4de7e2)=>({'id':_0x574d38['replyId'],'threadId':_0x574d38[_0x37935e(0x1c7)],'dT':_0x46f85c(_0x574d38[_0x37935e(0x1b2)]),'personId':_0x574d38[_0x37935e(0x197)],'resolved':_0x2d7b0d['solved']===_0x438bff[_0x37935e(0x16e)],'unitId':_0x20ac77,'subUnitId':_0x1c8169,'text':JSON['parse'](_0x574d38[_0x37935e(0x19c)]),'parentId':_0x4de7e2}),_0x483187=_0x13c51b(_0x2d7b0d[_0x37935e(0x1b1)][0x0]);return{..._0x483187,'children':_0x2d7b0d[_0x37935e(0x1b1)][_0x37935e(0x1ae)](0x1)[_0x37935e(0x1e8)](_0x3098e4=>_0x13c51b(_0x3098e4,_0x483187['id']))};}return null;}let _0x4db848=class{constructor(_0x24ede2,_0x254ac7,_0x320107,_0x3a06f3){const _0x52f1a8=_0x19d907;this[_0x52f1a8(0x1e2)]=_0x24ede2,this['_userService']=_0x254ac7,this['_sessionService']=_0x320107,this[_0x52f1a8(0x176)]=_0x3a06f3;}async[_0x19d907(0x16f)](_0x5ec4e2){const _0xebee4c=_0x19d907;var _0x19e91b,_0x5154e8;const {parentId:_0x337003,unitId:_0x5d8ec1,text:_0x280db0,threadId:_0x5ba126}=_0x5ec4e2,_0x5ce8ad=(_0x5154e8=(_0x19e91b=_0x280db0[_0xebee4c(0x1e0)])==null?void 0x0:_0x19e91b[_0xebee4c(0x1e6)](_0x33c471=>_0x33c471[_0xebee4c(0x1b4)]===_0x2b0b97['CustomRangeType'][_0xebee4c(0x16a)])['map'](_0x4c2ee1=>_0x4c2ee1[_0xebee4c(0x163)]))!=null?_0x5154e8:[],_0x148732=JSON['stringify'](_0x280db0),_0x280069=(await this[_0xebee4c(0x192)][_0xebee4c(0x1d8)](_0x5d8ec1))[_0xebee4c(0x168)]();if(_0x337003){const _0x454669={'memberId':_0x280069,'unitId':_0x5d8ec1,'content':_0x148732,'mention':_0x5ce8ad,'threadId':_0x5ba126},_0x4d780a=(await this[_0xebee4c(0x1e2)]['post'](_0xebee4c(0x174)+_0x5d8ec1+_0xebee4c(0x1d9),{'body':_0x454669}))['body'][_0xebee4c(0x1c6)];return{..._0x5ec4e2,'id':_0x4d780a[_0xebee4c(0x1a9)],'dT':_0x2b0b97['dayjs'](+_0x4d780a[_0xebee4c(0x1b2)])[_0xebee4c(0x1b0)](_0xebee4c(0x190)),'personId':_0x4d780a[_0xebee4c(0x197)]};}else{const _0x58635b={'memberId':_0x280069,'unitId':_0x5d8ec1,'content':_0x148732,'mention':_0x5ce8ad},_0x5465ca=await this['_httpService'][_0xebee4c(0x17e)]('/universer-api/comment/unit/'+_0x5d8ec1+_0xebee4c(0x16c),{'body':_0x58635b});return _0x48dffe(_0x5465ca[_0xebee4c(0x1c1)][_0xebee4c(0x1e5)],_0x5ec4e2);}}async[_0x19d907(0x1a8)](_0x134a73){const _0x554266=_0x19d907;var _0x3c5827,_0x54851c;const {text:_0x30687d,unitId:_0x3abc51}=_0x134a73,_0x10b1d2=(_0x54851c=(_0x3c5827=_0x30687d[_0x554266(0x1e0)])==null?void 0x0:_0x3c5827[_0x554266(0x1e6)](_0xb0a7bf=>_0xb0a7bf[_0x554266(0x1b4)]===_0x2b0b97[_0x554266(0x1df)]['COMMENT'])['map'](_0x38893a=>_0x38893a[_0x554266(0x163)]))!=null?_0x54851c:[],_0x397b25=JSON[_0x554266(0x17b)](_0x30687d),_0x48a5d8=_0x134a73[_0x554266(0x1c7)],_0x1b7a5b=_0x134a73['id'],_0x4370c3={'memberId':(await this['_sessionService'][_0x554266(0x1d8)](_0x3abc51))[_0x554266(0x168)](),'unitId':_0x3abc51,'threadId':_0x48a5d8,'mention':_0x10b1d2,'content':_0x397b25,'replyId':_0x1b7a5b},_0x188d55=await this['_httpService'][_0x554266(0x17e)](_0x554266(0x174)+_0x3abc51+'/edit',{'body':_0x4370c3});return!_0x188d55[_0x554266(0x1c1)]['error']||_0x188d55[_0x554266(0x1c1)][_0x554266(0x1eb)]['code']===0x1;}async[_0x19d907(0x170)](_0x5923c0){const _0xa5a7f6=_0x19d907,{unitId:_0x4592df}=_0x5923c0,_0x44be54=_0x5923c0[_0xa5a7f6(0x1c7)],_0x589602={'memberId':this[_0xa5a7f6(0x1b7)][_0xa5a7f6(0x19b)]()[_0xa5a7f6(0x16b)],'unitId':_0x4592df,'threadId':_0x44be54,'solved':_0x5923c0['resolved']?_0x438bff[_0xa5a7f6(0x16e)]:_0x438bff[_0xa5a7f6(0x181)]},_0x4782ab=await this[_0xa5a7f6(0x1e2)]['post']('/universer-api/comment/unit/'+_0x4592df+_0xa5a7f6(0x179),{'body':_0x589602});return!_0x4782ab['body'][_0xa5a7f6(0x1eb)]||_0x4782ab[_0xa5a7f6(0x1c1)][_0xa5a7f6(0x1eb)][_0xa5a7f6(0x19f)]===0x1;}async[_0x19d907(0x166)](_0x3f96ff,_0x5f43f9,_0x245a62,_0xd70663){const _0x176d28=_0x19d907,_0x31ebe6={'memberId':(await this['_sessionService'][_0x176d28(0x1d8)](_0x3f96ff))[_0x176d28(0x168)](),'threadId':_0x245a62,'replyId':_0xd70663,'unitId':_0x3f96ff},_0x5dbef4=await this[_0x176d28(0x1e2)][_0x176d28(0x17e)](_0x176d28(0x174)+_0x3f96ff+_0x176d28(0x18c),{'body':_0x31ebe6});return!_0x5dbef4[_0x176d28(0x1c1)][_0x176d28(0x1eb)]||_0x5dbef4['body']['error'][_0x176d28(0x19f)]===0x1;}async[_0x19d907(0x1e1)](_0x4d53ba,_0x157dea,_0x3c69ec){const _0x565310=_0x19d907,_0x4a0061={'unitId':_0x4d53ba,'threadId':_0x3c69ec},_0x1e7a8b=await this[_0x565310(0x1e2)][_0x565310(0x17e)](_0x565310(0x174)+_0x4d53ba+_0x565310(0x1e9),{'body':_0x4a0061}),_0xe495d5=_0x3c69ec[_0x565310(0x1e8)](_0x2c3912=>_0x40dc11(_0x1e7a8b['body']['comments'][_0x2c3912],_0x4d53ba,_0x157dea))[_0x565310(0x1e6)](Boolean);return Object[_0x565310(0x1bd)](_0x1e7a8b[_0x565310(0x1c1)]['users'])[_0x565310(0x1d7)](_0x2c17a9=>{const _0x19095b=_0x565310;this[_0x19095b(0x1b7)][_0x19095b(0x167)](_0x2c17a9);}),_0xe495d5;}[_0x19d907(0x1d4)](_0x35705c){const _0xe981c6=_0x19d907;return{'id':_0x35705c['id'],'threadId':_0x35705c[_0xe981c6(0x1c7)],'ref':_0x35705c['ref']};}};_0x4db848=_0x117968([_0x2732cd(0x0,_0x2b0b97[_0x19d907(0x17a)](_0x532fa9['HTTPService'])),_0x2732cd(0x1,_0x2b0b97[_0x19d907(0x17a)](_0x2b0b97[_0x19d907(0x194)])),_0x2732cd(0x2,_0x2b0b97[_0x19d907(0x17a)](_0x327acb['CollaborationSessionService'])),_0x2732cd(0x3,_0x2b0b97[_0x19d907(0x17a)](_0x2b0b97['Injector']))],_0x4db848);var _0x3cc2cf=Object[_0x19d907(0x1dc)],_0x48b096=Object[_0x19d907(0x1a4)],_0xf60edf=(_0x5470f8,_0x4d390b,_0x3dde02,_0x3cea24)=>{const _0x23af93=_0x19d907;for(var _0x2247a8=_0x3cea24>0x1?void 0x0:_0x3cea24?_0x48b096(_0x4d390b,_0x3dde02):_0x4d390b,_0xae2645=_0x5470f8[_0x23af93(0x1ba)]-0x1,_0x15abad;_0xae2645>=0x0;_0xae2645--)(_0x15abad=_0x5470f8[_0xae2645])&&(_0x2247a8=(_0x3cea24?_0x15abad(_0x4d390b,_0x3dde02,_0x2247a8):_0x15abad(_0x2247a8))||_0x2247a8);return _0x3cea24&&_0x2247a8&&_0x3cc2cf(_0x4d390b,_0x3dde02,_0x2247a8),_0x2247a8;},_0x5e6c36=(_0x48ff4d,_0x153b23)=>(_0x374c20,_0x25fe42)=>_0x153b23(_0x374c20,_0x25fe42,_0x48ff4d);let _0xa3a53f=class extends _0x2b0b97[_0x19d907(0x1ab)]{constructor(_0x4c8c96,_0x2754a6){const _0x1290b4=_0x19d907;super(),this[_0x1290b4(0x1c3)]=_0x4c8c96,this['_threadCommentDataSource']=_0x2754a6,this[_0x1290b4(0x195)]();}[_0x19d907(0x195)](){const _0x4935e5=_0x19d907;this[_0x4935e5(0x1c3)][_0x4935e5(0x1e4)]=this[_0x4935e5(0x177)],this['_threadCommentDataSourceService'][_0x4935e5(0x18a)]=!0x1;}};_0xa3a53f=_0xf60edf([_0x5e6c36(0x0,_0x3b6208[_0x19d907(0x165)]),_0x5e6c36(0x1,_0x2b0b97[_0x19d907(0x17a)](_0x4db848))],_0xa3a53f);var _0x45e1bf=Object[_0x19d907(0x1dc)],_0x6fac2f=Object[_0x19d907(0x1a4)],_0x3cc636=(_0xd875dc,_0x2c96c4,_0x54f2bd)=>_0x2c96c4 in _0xd875dc?_0x45e1bf(_0xd875dc,_0x2c96c4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x54f2bd}):_0xd875dc[_0x2c96c4]=_0x54f2bd,_0x3c9be8=(_0x20525c,_0x225dc0,_0x4a7291,_0x8e2f6)=>{const _0x122cd4=_0x19d907;for(var _0x39adb5=_0x8e2f6>0x1?void 0x0:_0x8e2f6?_0x6fac2f(_0x225dc0,_0x4a7291):_0x225dc0,_0x3b901b=_0x20525c[_0x122cd4(0x1ba)]-0x1,_0x464956;_0x3b901b>=0x0;_0x3b901b--)(_0x464956=_0x20525c[_0x3b901b])&&(_0x39adb5=(_0x8e2f6?_0x464956(_0x225dc0,_0x4a7291,_0x39adb5):_0x464956(_0x39adb5))||_0x39adb5);return _0x8e2f6&&_0x39adb5&&_0x45e1bf(_0x225dc0,_0x4a7291,_0x39adb5),_0x39adb5;},_0x515ec5=(_0x2b528c,_0x39c7ab)=>(_0x4953c9,_0x56fa9e)=>_0x39c7ab(_0x4953c9,_0x56fa9e,_0x2b528c),_0x469274=(_0x1b3cdb,_0x36f7e4,_0x7c397f)=>_0x3cc636(_0x1b3cdb,typeof _0x36f7e4!=_0x19d907(0x173)?_0x36f7e4+'':_0x36f7e4,_0x7c397f);_0x145b5[_0x19d907(0x17d)]=class extends _0x2b0b97[_0x19d907(0x1b5)]{constructor(_0x42d738=_0x49f837,_0x3cb99d,_0x889fbb){const _0x51a881=_0x19d907;super(),this[_0x51a881(0x1a5)]=_0x42d738,this[_0x51a881(0x176)]=_0x3cb99d,this[_0x51a881(0x193)]=_0x889fbb;const {..._0x1781e4}=_0x2b0b97['merge']({},_0x49f837,this[_0x51a881(0x1a5)]);this[_0x51a881(0x193)][_0x51a881(0x1e3)](_0xeeba06,_0x1781e4);}[_0x19d907(0x1ea)](){[[_0x4db848],[_0xa3a53f],[_0x5fe89a]]['forEach'](_0x165307=>{const _0x52225e=_0x4446;this[_0x52225e(0x176)][_0x52225e(0x18d)](_0x165307);});}[_0x19d907(0x186)](){const _0x1da8dd=_0x19d907;this[_0x1da8dd(0x176)][_0x1da8dd(0x1cc)](_0xa3a53f),this[_0x1da8dd(0x176)][_0x1da8dd(0x1cc)](_0x5fe89a);}},_0x469274(_0x145b5[_0x19d907(0x17d)],'pluginName',_0x471ad8),_0x469274(_0x145b5[_0x19d907(0x17d)],'type',_0x2b0b97[_0x19d907(0x1ca)][_0x19d907(0x1cb)]),_0x145b5[_0x19d907(0x17d)]=_0x3c9be8([_0x2b0b97[_0x19d907(0x1a1)](_0xfca50d[_0x19d907(0x1ec)],_0x327acb[_0x19d907(0x1c9)],_0x449190[_0x19d907(0x1b3)]),_0x515ec5(0x1,_0x2b0b97[_0x19d907(0x17a)](_0x2b0b97[_0x19d907(0x189)])),_0x515ec5(0x2,_0x2b0b97[_0x19d907(0x1c5)])],_0x145b5['UniverThreadCommentDataSourcePlugin']),Object[_0x19d907(0x1dc)](_0x145b5,Symbol[_0x19d907(0x1a0)],{'value':_0x19d907(0x1ad)});}));
1
+ function _0x120b(_0x17cad6,_0x38053f){const _0x69fa84=_0x69fa();return _0x120b=function(_0x120b17,_0x2173f5){_0x120b17=_0x120b17-0x1c8;let _0x267bd9=_0x69fa84[_0x120b17];return _0x267bd9;},_0x120b(_0x17cad6,_0x38053f);}(function(_0x9874fb,_0x2fda36){const _0x561e2b=_0x120b,_0x1077e3=_0x9874fb();while(!![]){try{const _0x4300d9=-parseInt(_0x561e2b(0x233))/0x1*(-parseInt(_0x561e2b(0x1ea))/0x2)+-parseInt(_0x561e2b(0x226))/0x3+-parseInt(_0x561e2b(0x1d4))/0x4+-parseInt(_0x561e2b(0x203))/0x5*(-parseInt(_0x561e2b(0x1f7))/0x6)+-parseInt(_0x561e2b(0x207))/0x7*(-parseInt(_0x561e2b(0x213))/0x8)+parseInt(_0x561e2b(0x20c))/0x9+-parseInt(_0x561e2b(0x24a))/0xa;if(_0x4300d9===_0x2fda36)break;else _0x1077e3['push'](_0x1077e3['shift']());}catch(_0x3f44bd){_0x1077e3['push'](_0x1077e3['shift']());}}}(_0x69fa,0xdd5a0),function(_0x127791,_0x3764fc){const _0xf11bec=_0x120b;typeof exports==_0xf11bec(0x1db)&&typeof module<'u'?_0x3764fc(exports,require(_0xf11bec(0x1e1)),require(_0xf11bec(0x1fb)),require(_0xf11bec(0x204)),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require(_0xf11bec(0x240)),require(_0xf11bec(0x242))):typeof define==_0xf11bec(0x225)&&define[_0xf11bec(0x237)]?define([_0xf11bec(0x206),_0xf11bec(0x1e1),_0xf11bec(0x1fb),'@univerjs/core','@univerjs/thread-comment-ui','@univerjs/thread-comment',_0xf11bec(0x240),_0xf11bec(0x242)],_0x3764fc):(_0x127791=typeof globalThis<'u'?globalThis:_0x127791||self,_0x3764fc(_0x127791[_0xf11bec(0x1f6)]={},_0x127791[_0xf11bec(0x1d6)],_0x127791['UniverProLicense'],_0x127791[_0xf11bec(0x220)],_0x127791[_0xf11bec(0x22d)],_0x127791['UniverThreadComment'],_0x127791[_0xf11bec(0x240)],_0x127791[_0xf11bec(0x1d3)]));}(this,function(_0x49a0d4,_0x4b2ae7,_0x27a9e0,_0x3a212d,_0xbd58f2,_0x1e89df,_0x1b6005,_0x2f3a4f){'use strict';const _0x4b6dc2=_0x120b;const _0x3b2a12=_0x4b6dc2(0x20d);var _0x3179e6=(_0x1232af=>(_0x1232af[_0x1232af[_0x4b6dc2(0x210)]=0x0]=_0x4b6dc2(0x210),_0x1232af[_0x1232af[_0x4b6dc2(0x1c9)]=0x1]=_0x4b6dc2(0x1c9),_0x1232af[_0x1232af[_0x4b6dc2(0x1eb)]=-0x1]=_0x4b6dc2(0x1eb),_0x1232af))(_0x3179e6||{}),_0x5a666e=(_0x294f53=>(_0x294f53[_0x294f53[_0x4b6dc2(0x1d5)]=0x0]=_0x4b6dc2(0x1d5),_0x294f53[_0x294f53[_0x4b6dc2(0x227)]=0x1]=_0x4b6dc2(0x227),_0x294f53[_0x294f53['Reply']=0x2]=_0x4b6dc2(0x1ff),_0x294f53[_0x294f53[_0x4b6dc2(0x241)]=0x3]=_0x4b6dc2(0x241),_0x294f53[_0x294f53[_0x4b6dc2(0x24e)]=0x4]=_0x4b6dc2(0x24e),_0x294f53[_0x294f53['Solve']=0x5]=_0x4b6dc2(0x20b),_0x294f53[_0x294f53['UNRECOGNIZED']=-0x1]=_0x4b6dc2(0x1eb),_0x294f53))(_0x5a666e||{});const _0x175d87=_0x39e42b=>_0x3a212d['dayjs'](new Date(+_0x39e42b))['format'](_0x4b6dc2(0x1da)),_0x5310ee=async(_0x163db7,_0x16aa4f)=>{const _0x393967=_0x4b6dc2,_0x2b1f29=_0x163db7[_0x393967(0x22e)](_0x3a212d[_0x393967(0x24d)]),_0x2410f0=_0x163db7[_0x393967(0x22e)](_0x2f3a4f[_0x393967(0x1dc)]);_0x16aa4f[_0x393967(0x246)](_0xb6e7a=>{const _0x3401cb=_0x393967;_0x2b1f29[_0x3401cb(0x1ee)](_0xb6e7a)&&_0x16aa4f[_0x3401cb(0x1f3)](_0xb6e7a);}),_0x16aa4f[_0x393967(0x248)]&&(await _0x2410f0[_0x393967(0x22e)]('/universer-api/user/list',{'params':{'userIDs':[..._0x16aa4f]}}))[_0x393967(0x235)][_0x393967(0x249)]['forEach'](_0x587efe=>{const _0x581ca8=_0x393967;_0x587efe&&_0x2b1f29[_0x581ca8(0x1e6)](_0x587efe);});};var _0x463919=Object[_0x4b6dc2(0x239)],_0xdf3ece=Object[_0x4b6dc2(0x1e9)],_0x439c08=(_0x5336d4,_0x4d5ac3,_0x830c64,_0x2f9f15)=>{const _0x41b6be=_0x4b6dc2;for(var _0x6f4c07=_0x2f9f15>0x1?void 0x0:_0x2f9f15?_0xdf3ece(_0x4d5ac3,_0x830c64):_0x4d5ac3,_0x55d89f=_0x5336d4[_0x41b6be(0x222)]-0x1,_0x98241e;_0x55d89f>=0x0;_0x55d89f--)(_0x98241e=_0x5336d4[_0x55d89f])&&(_0x6f4c07=(_0x2f9f15?_0x98241e(_0x4d5ac3,_0x830c64,_0x6f4c07):_0x98241e(_0x6f4c07))||_0x6f4c07);return _0x2f9f15&&_0x6f4c07&&_0x463919(_0x4d5ac3,_0x830c64,_0x6f4c07),_0x6f4c07;},_0x505c49=(_0x4180f5,_0x2fb0ea)=>(_0x88c043,_0x586651)=>_0x2fb0ea(_0x88c043,_0x586651,_0x4180f5);let _0x24dc24=class extends _0x3a212d[_0x4b6dc2(0x1e7)]{constructor(_0x56fe95,_0xb65a1c,_0x4db834,_0x400696){const _0x3dbbd2=_0x4b6dc2;super(),this[_0x3dbbd2(0x1c8)]=_0x56fe95,this[_0x3dbbd2(0x1cb)]=_0xb65a1c,this[_0x3dbbd2(0x1fd)]=_0x4db834,this[_0x3dbbd2(0x20f)]=_0x400696,this[_0x3dbbd2(0x22f)](),this[_0x3dbbd2(0x1e3)]();}[_0x4b6dc2(0x1e3)](){const _0x2b0b59=_0x4b6dc2;this[_0x2b0b59(0x22c)](this[_0x2b0b59(0x1cb)]['commentUpdate$']['pipe'](_0x1b6005[_0x2b0b59(0x247)](0x10))[_0x2b0b59(0x221)](_0x3e581e=>{const _0x1cd954=_0x2b0b59,_0x5e2efb=new Set();_0x3e581e[_0x1cd954(0x246)](_0x5676d7=>{const _0x5e30a6=_0x1cd954;switch(_0x5676d7[_0x5e30a6(0x217)]){case _0x5e30a6(0x224):{const _0x2c4e4f=_0x5676d7['payload'][_0x5e30a6(0x20e)];_0x5e2efb[_0x5e30a6(0x224)](_0x2c4e4f);break;}}}),_0x5310ee(this['_injector'],_0x5e2efb);}));}[_0x4b6dc2(0x22f)](){const _0x5a0c87=_0x4b6dc2;this[_0x5a0c87(0x22c)](this[_0x5a0c87(0x1c8)][_0x5a0c87(0x1ed)][_0x5a0c87(0x221)](async _0x58b7ed=>{const _0x1c25e=_0x5a0c87;var _0x150a2a,_0x2d7b76,_0x22388e,_0x342e20;const _0x14dbf3=(_0x150a2a=this[_0x1c25e(0x1cb)][_0x1c25e(0x1e0)](_0x58b7ed['unitId'])['find'](_0x5c694e=>_0x5c694e[_0x1c25e(0x214)]===_0x58b7ed['threadId']))==null?void 0x0:_0x150a2a[_0x1c25e(0x1f4)];if(!_0x14dbf3)return;const {unitId:_0x1bded5,subUnitId:_0x377206}=_0x14dbf3;switch(_0x58b7ed[_0x1c25e(0x211)]&&this[_0x1c25e(0x1fd)][_0x1c25e(0x1e6)](_0x58b7ed['user']),_0x58b7ed['type']){case _0x5a666e[_0x1c25e(0x227)]:break;case _0x5a666e[_0x1c25e(0x1ff)]:{this[_0x1c25e(0x1cb)]['addComment'](_0x1bded5,_0x377206,{'unitId':_0x1bded5,'subUnitId':_0x377206,'ref':'','id':_0x58b7ed[_0x1c25e(0x1fa)],'dT':_0x175d87(+_0x58b7ed[_0x1c25e(0x243)]),'threadId':_0x58b7ed[_0x1c25e(0x214)],'personId':(_0x22388e=(_0x2d7b76=_0x58b7ed['user'])==null?void 0x0:_0x2d7b76[_0x1c25e(0x1d0)])!=null?_0x22388e:_0x58b7ed[_0x1c25e(0x236)],'text':JSON[_0x1c25e(0x23b)](_0x58b7ed['content']),'parentId':_0x14dbf3['id']});break;}case _0x5a666e[_0x1c25e(0x24e)]:{const _0x3c2f0a=this[_0x1c25e(0x1cb)][_0x1c25e(0x23a)](_0x1bded5,_0x377206,_0x58b7ed[_0x1c25e(0x1fa)]);_0x3c2f0a&&_0x3c2f0a[_0x1c25e(0x23e)]&&this['_threadCommentModel'][_0x1c25e(0x23f)](_0x1bded5,_0x377206,_0x58b7ed[_0x1c25e(0x1fa)]);break;}case _0x5a666e[_0x1c25e(0x241)]:{this[_0x1c25e(0x1cb)][_0x1c25e(0x21c)](_0x1bded5,_0x377206,{'commentId':_0x58b7ed[_0x1c25e(0x1fa)],'text':JSON[_0x1c25e(0x23b)](_0x58b7ed[_0x1c25e(0x1f1)])});break;}case _0x5a666e[_0x1c25e(0x20b)]:{const _0x6f61ee=(_0x342e20=this[_0x1c25e(0x1cb)][_0x1c25e(0x1e0)](_0x58b7ed[_0x1c25e(0x21d)])[_0x1c25e(0x230)](_0x52edf5=>_0x52edf5[_0x1c25e(0x214)]===_0x58b7ed[_0x1c25e(0x214)]))==null?void 0x0:_0x342e20[_0x1c25e(0x1f4)];_0x6f61ee&&this[_0x1c25e(0x1cb)][_0x1c25e(0x1dd)](_0x1bded5,_0x377206,_0x6f61ee['id'],_0x58b7ed[_0x1c25e(0x229)]===_0x3179e6[_0x1c25e(0x1c9)]);break;}}}));}};_0x24dc24=_0x439c08([_0x505c49(0x0,_0x3a212d['Inject'](_0x4b2ae7[_0x4b6dc2(0x208)])),_0x505c49(0x1,_0x3a212d[_0x4b6dc2(0x1e8)](_0x1e89df['ThreadCommentModel'])),_0x505c49(0x2,_0x3a212d[_0x4b6dc2(0x1e8)](_0x3a212d[_0x4b6dc2(0x24d)])),_0x505c49(0x3,_0x3a212d[_0x4b6dc2(0x1e8)](_0x3a212d[_0x4b6dc2(0x228)]))],_0x24dc24);const _0x444c84=_0x4b6dc2(0x245),_0x4bddc2={};var _0x35dae1=Object[_0x4b6dc2(0x239)],_0x47627a=Object['getOwnPropertyDescriptor'],_0x566803=(_0x31fc45,_0x3493ba,_0x2ae390,_0x5e4575)=>{const _0x24ee90=_0x4b6dc2;for(var _0xe00e97=_0x5e4575>0x1?void 0x0:_0x5e4575?_0x47627a(_0x3493ba,_0x2ae390):_0x3493ba,_0x54fc77=_0x31fc45[_0x24ee90(0x222)]-0x1,_0x457753;_0x54fc77>=0x0;_0x54fc77--)(_0x457753=_0x31fc45[_0x54fc77])&&(_0xe00e97=(_0x5e4575?_0x457753(_0x3493ba,_0x2ae390,_0xe00e97):_0x457753(_0xe00e97))||_0xe00e97);return _0x5e4575&&_0xe00e97&&_0x35dae1(_0x3493ba,_0x2ae390,_0xe00e97),_0xe00e97;},_0xf7a449=(_0x29a6c4,_0x3fc015)=>(_0x5117e5,_0x4233b2)=>_0x3fc015(_0x5117e5,_0x4233b2,_0x29a6c4);function _0x2451ab(_0x427dd0,_0x4b3654){const _0x87ddae=_0x4b6dc2,_0x5e9f70=_0x427dd0[_0x87ddae(0x1f2)][0x0];return{..._0x4b3654,'id':_0x5e9f70[_0x87ddae(0x1fa)],'resolved':_0x427dd0[_0x87ddae(0x229)]===0x1,'dT':_0x175d87(_0x5e9f70[_0x87ddae(0x243)]),'personId':_0x5e9f70[_0x87ddae(0x236)],'threadId':_0x5e9f70[_0x87ddae(0x214)]};}function _0x277862(_0x5455e8,_0x576e4d,_0x21f0dd){const _0x544df0=_0x4b6dc2;var _0x58fb5a,_0x3219f0;if(((_0x3219f0=(_0x58fb5a=_0x5455e8==null?void 0x0:_0x5455e8[_0x544df0(0x1f2)])==null?void 0x0:_0x58fb5a[_0x544df0(0x222)])!=null?_0x3219f0:0x0)>0x0){const _0x4a9c50=(_0x328a1d,_0x69b0b8)=>({'id':_0x328a1d['replyId'],'threadId':_0x328a1d['threadId'],'dT':_0x175d87(_0x328a1d[_0x544df0(0x243)]),'personId':_0x328a1d[_0x544df0(0x236)],'resolved':_0x5455e8[_0x544df0(0x229)]===_0x3179e6['Solved'],'unitId':_0x576e4d,'subUnitId':_0x21f0dd,'text':JSON['parse'](_0x328a1d[_0x544df0(0x1f1)]),'parentId':_0x69b0b8}),_0x4e6b71=_0x4a9c50(_0x5455e8[_0x544df0(0x1f2)][0x0]);return{..._0x4e6b71,'children':_0x5455e8[_0x544df0(0x1f2)]['slice'](0x1)['map'](_0x4580ec=>_0x4a9c50(_0x4580ec,_0x4e6b71['id']))};}return null;}let _0xa5c8d5=class{constructor(_0x1854e6,_0x30849e,_0x137850,_0x2beb13){const _0x18621b=_0x4b6dc2;this[_0x18621b(0x1f0)]=_0x1854e6,this['_userService']=_0x30849e,this[_0x18621b(0x1fe)]=_0x137850,this[_0x18621b(0x20f)]=_0x2beb13;}async[_0x4b6dc2(0x1ec)](_0xeedcca){const _0x459eb6=_0x4b6dc2;var _0x51ce3d,_0x48304e;const {parentId:_0x12e46f,unitId:_0x3cc05f,text:_0x4c6281,threadId:_0x3a7ac3}=_0xeedcca,_0x1568a8=(_0x48304e=(_0x51ce3d=_0x4c6281['customRanges'])==null?void 0x0:_0x51ce3d['filter'](_0x2da844=>_0x2da844[_0x459eb6(0x209)]===_0x3a212d[_0x459eb6(0x1f5)][_0x459eb6(0x223)])[_0x459eb6(0x1f8)](_0x3650d7=>_0x3650d7[_0x459eb6(0x1ef)]))!=null?_0x48304e:[],_0x1c2b5a=JSON[_0x459eb6(0x20a)](_0x4c6281),_0x517aae=(await this['_sessionService'][_0x459eb6(0x202)](_0x3cc05f))['getMemberID']();if(_0x12e46f){const _0x42a83b={'memberId':_0x517aae,'unitId':_0x3cc05f,'content':_0x1c2b5a,'mention':_0x1568a8,'threadId':_0x3a7ac3},_0x2ccc3b=(await this['_httpService'][_0x459eb6(0x23c)](_0x459eb6(0x23d)+_0x3cc05f+'/reply',{'body':_0x42a83b}))[_0x459eb6(0x235)][_0x459eb6(0x1d8)];return{..._0xeedcca,'id':_0x2ccc3b[_0x459eb6(0x1fa)],'dT':_0x3a212d['dayjs'](+_0x2ccc3b[_0x459eb6(0x243)])['format'](_0x459eb6(0x1da)),'personId':_0x2ccc3b[_0x459eb6(0x236)]};}else{const _0xeb3444={'memberId':_0x517aae,'unitId':_0x3cc05f,'content':_0x1c2b5a,'mention':_0x1568a8},_0x55698e=await this[_0x459eb6(0x1f0)][_0x459eb6(0x23c)](_0x459eb6(0x23d)+_0x3cc05f+_0x459eb6(0x1d2),{'body':_0xeb3444});return _0x2451ab(_0x55698e[_0x459eb6(0x235)][_0x459eb6(0x1ca)],_0xeedcca);}}async[_0x4b6dc2(0x21c)](_0x3aed67){const _0x1db610=_0x4b6dc2;var _0x345a5f,_0x57b7b9;const {text:_0x41a427,unitId:_0x1ad152}=_0x3aed67,_0x3b4178=(_0x57b7b9=(_0x345a5f=_0x41a427[_0x1db610(0x1e2)])==null?void 0x0:_0x345a5f[_0x1db610(0x1e4)](_0x413280=>_0x413280[_0x1db610(0x209)]===_0x3a212d[_0x1db610(0x1f5)][_0x1db610(0x223)])[_0x1db610(0x1f8)](_0x317132=>_0x317132[_0x1db610(0x1ef)]))!=null?_0x57b7b9:[],_0x18e6ae=JSON[_0x1db610(0x20a)](_0x41a427),_0x35bb13=_0x3aed67[_0x1db610(0x214)],_0x1d1fbb=_0x3aed67['id'],_0x1d7816={'memberId':(await this[_0x1db610(0x1fe)][_0x1db610(0x202)](_0x1ad152))['getMemberID'](),'unitId':_0x1ad152,'threadId':_0x35bb13,'mention':_0x3b4178,'content':_0x18e6ae,'replyId':_0x1d1fbb},_0x13fe48=await this[_0x1db610(0x1f0)][_0x1db610(0x23c)](_0x1db610(0x23d)+_0x1ad152+_0x1db610(0x1d1),{'body':_0x1d7816});return!_0x13fe48[_0x1db610(0x235)][_0x1db610(0x1f9)]||_0x13fe48['body'][_0x1db610(0x1f9)]['code']===0x1;}async[_0x4b6dc2(0x1dd)](_0x2f62d7){const _0x1a616c=_0x4b6dc2,{unitId:_0xd1abce}=_0x2f62d7,_0x30ccaf=_0x2f62d7[_0x1a616c(0x214)],_0x5a7a30={'memberId':this['_userService'][_0x1a616c(0x1de)]()[_0x1a616c(0x1d0)],'unitId':_0xd1abce,'threadId':_0x30ccaf,'solved':_0x2f62d7[_0x1a616c(0x231)]?_0x3179e6[_0x1a616c(0x1c9)]:_0x3179e6[_0x1a616c(0x210)]},_0x2de6fa=await this[_0x1a616c(0x1f0)][_0x1a616c(0x23c)](_0x1a616c(0x23d)+_0xd1abce+_0x1a616c(0x21f),{'body':_0x5a7a30});return!_0x2de6fa[_0x1a616c(0x235)]['error']||_0x2de6fa['body'][_0x1a616c(0x1f9)][_0x1a616c(0x1ce)]===0x1;}async[_0x4b6dc2(0x23f)](_0x4b48f4,_0x466e0b,_0x23551b,_0x57a05f){const _0x152227=_0x4b6dc2,_0x5c683e={'memberId':(await this[_0x152227(0x1fe)][_0x152227(0x202)](_0x4b48f4))[_0x152227(0x232)](),'threadId':_0x23551b,'replyId':_0x57a05f,'unitId':_0x4b48f4},_0x15736e=await this[_0x152227(0x1f0)][_0x152227(0x23c)](_0x152227(0x23d)+_0x4b48f4+_0x152227(0x212),{'body':_0x5c683e});return!_0x15736e[_0x152227(0x235)][_0x152227(0x1f9)]||_0x15736e['body'][_0x152227(0x1f9)]['code']===0x1;}async['listComments'](_0x5b6de5,_0xd36424,_0x153958){const _0x5ab173=_0x4b6dc2,_0x45297c={'unitId':_0x5b6de5,'threadId':_0x153958},_0x32a35c=await this[_0x5ab173(0x1f0)][_0x5ab173(0x23c)]('/universer-api/comment/unit/'+_0x5b6de5+_0x5ab173(0x215),{'body':_0x45297c}),_0x154936=_0x153958[_0x5ab173(0x1f8)](_0x27bbb5=>_0x277862(_0x32a35c[_0x5ab173(0x235)][_0x5ab173(0x24c)][_0x27bbb5],_0x5b6de5,_0xd36424))[_0x5ab173(0x1e4)](Boolean);return Object[_0x5ab173(0x21a)](_0x32a35c['body'][_0x5ab173(0x249)])['forEach'](_0x168710=>{const _0x28fe3b=_0x5ab173;this['_userService'][_0x28fe3b(0x1e6)](_0x168710);}),_0x154936;}[_0x4b6dc2(0x21e)](_0x3e4c63){const _0x1a3df2=_0x4b6dc2;return{'id':_0x3e4c63['id'],'threadId':_0x3e4c63[_0x1a3df2(0x214)],'ref':_0x3e4c63['ref']};}};_0xa5c8d5=_0x566803([_0xf7a449(0x0,_0x3a212d[_0x4b6dc2(0x1e8)](_0x2f3a4f[_0x4b6dc2(0x1dc)])),_0xf7a449(0x1,_0x3a212d[_0x4b6dc2(0x1e8)](_0x3a212d[_0x4b6dc2(0x24d)])),_0xf7a449(0x2,_0x3a212d[_0x4b6dc2(0x1e8)](_0x4b2ae7[_0x4b6dc2(0x238)])),_0xf7a449(0x3,_0x3a212d[_0x4b6dc2(0x1e8)](_0x3a212d[_0x4b6dc2(0x228)]))],_0xa5c8d5);var _0x39dd26=Object[_0x4b6dc2(0x239)],_0x12e5de=Object[_0x4b6dc2(0x1e9)],_0x4aa846=(_0x15e091,_0x3214be,_0x4506b0,_0x4b258e)=>{const _0xc2fd3c=_0x4b6dc2;for(var _0x38f66f=_0x4b258e>0x1?void 0x0:_0x4b258e?_0x12e5de(_0x3214be,_0x4506b0):_0x3214be,_0x5746c2=_0x15e091[_0xc2fd3c(0x222)]-0x1,_0x435a93;_0x5746c2>=0x0;_0x5746c2--)(_0x435a93=_0x15e091[_0x5746c2])&&(_0x38f66f=(_0x4b258e?_0x435a93(_0x3214be,_0x4506b0,_0x38f66f):_0x435a93(_0x38f66f))||_0x38f66f);return _0x4b258e&&_0x38f66f&&_0x39dd26(_0x3214be,_0x4506b0,_0x38f66f),_0x38f66f;},_0x1b0f71=(_0x4b8a6b,_0x5d7bbd)=>(_0x1ad5c8,_0x2277fb)=>_0x5d7bbd(_0x1ad5c8,_0x2277fb,_0x4b8a6b);let _0x2dbcfd=class extends _0x3a212d[_0x4b6dc2(0x1e7)]{constructor(_0x1f8d8e,_0x30d187){const _0x43e511=_0x4b6dc2;super(),this[_0x43e511(0x1cd)]=_0x1f8d8e,this['_threadCommentDataSource']=_0x30d187,this['_initDataSource']();}[_0x4b6dc2(0x21b)](){const _0x9bd3c8=_0x4b6dc2;this[_0x9bd3c8(0x1cd)]['dataSource']=this[_0x9bd3c8(0x1d9)],this[_0x9bd3c8(0x1cd)][_0x9bd3c8(0x22a)]=!0x1;}};_0x2dbcfd=_0x4aa846([_0x1b0f71(0x0,_0x1e89df[_0x4b6dc2(0x1d7)]),_0x1b0f71(0x1,_0x3a212d[_0x4b6dc2(0x1e8)](_0xa5c8d5))],_0x2dbcfd);var _0xfa0b83=Object['defineProperty'],_0xcffbc4=Object['getOwnPropertyDescriptor'],_0xa3922a=(_0x5681ca,_0x595f8f,_0x48cf73)=>_0x595f8f in _0x5681ca?_0xfa0b83(_0x5681ca,_0x595f8f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x48cf73}):_0x5681ca[_0x595f8f]=_0x48cf73,_0x48fe1a=(_0x7a4dbf,_0x233270,_0x5a426d,_0x2ff901)=>{const _0x449181=_0x4b6dc2;for(var _0x31cc0c=_0x2ff901>0x1?void 0x0:_0x2ff901?_0xcffbc4(_0x233270,_0x5a426d):_0x233270,_0x1f1d32=_0x7a4dbf[_0x449181(0x222)]-0x1,_0x1b5a71;_0x1f1d32>=0x0;_0x1f1d32--)(_0x1b5a71=_0x7a4dbf[_0x1f1d32])&&(_0x31cc0c=(_0x2ff901?_0x1b5a71(_0x233270,_0x5a426d,_0x31cc0c):_0x1b5a71(_0x31cc0c))||_0x31cc0c);return _0x2ff901&&_0x31cc0c&&_0xfa0b83(_0x233270,_0x5a426d,_0x31cc0c),_0x31cc0c;},_0x24eb0d=(_0x5c81a0,_0x2ae940)=>(_0x4e2393,_0x159112)=>_0x2ae940(_0x4e2393,_0x159112,_0x5c81a0),_0x28e21c=(_0xa6e6d1,_0x3e62be,_0x5caaf5)=>_0xa3922a(_0xa6e6d1,typeof _0x3e62be!='symbol'?_0x3e62be+'':_0x3e62be,_0x5caaf5);_0x49a0d4[_0x4b6dc2(0x1e5)]=class extends _0x3a212d[_0x4b6dc2(0x1cc)]{constructor(_0x2949ba=_0x4bddc2,_0x1628e2,_0x41bd62){const _0x320d2c=_0x4b6dc2;super(),this[_0x320d2c(0x24b)]=_0x2949ba,this[_0x320d2c(0x20f)]=_0x1628e2,this[_0x320d2c(0x234)]=_0x41bd62;const {..._0x1bf912}=_0x3a212d[_0x320d2c(0x22b)]({},_0x4bddc2,this[_0x320d2c(0x24b)]);this[_0x320d2c(0x234)][_0x320d2c(0x218)](_0x444c84,_0x1bf912);}[_0x4b6dc2(0x201)](){const _0x3e867e=_0x4b6dc2;[[_0xa5c8d5],[_0x2dbcfd],[_0x24dc24]][_0x3e867e(0x246)](_0x44e47f=>{this['_injector']['add'](_0x44e47f);});}[_0x4b6dc2(0x244)](){const _0x3bd27b=_0x4b6dc2;this[_0x3bd27b(0x20f)][_0x3bd27b(0x22e)](_0x2dbcfd),this[_0x3bd27b(0x20f)]['get'](_0x24dc24);}},_0x28e21c(_0x49a0d4[_0x4b6dc2(0x1e5)],'pluginName',_0x3b2a12),_0x28e21c(_0x49a0d4[_0x4b6dc2(0x1e5)],_0x4b6dc2(0x217),_0x3a212d[_0x4b6dc2(0x1fc)][_0x4b6dc2(0x216)]),_0x49a0d4[_0x4b6dc2(0x1e5)]=_0x48fe1a([_0x3a212d[_0x4b6dc2(0x205)](_0xbd58f2[_0x4b6dc2(0x219)],_0x4b2ae7[_0x4b6dc2(0x1cf)],_0x27a9e0['UniverLicensePlugin']),_0x24eb0d(0x1,_0x3a212d[_0x4b6dc2(0x1e8)](_0x3a212d[_0x4b6dc2(0x228)])),_0x24eb0d(0x2,_0x3a212d[_0x4b6dc2(0x200)])],_0x49a0d4['UniverThreadCommentDataSourcePlugin']),Object[_0x4b6dc2(0x239)](_0x49a0d4,Symbol[_0x4b6dc2(0x1df)],{'value':'Module'});}));function _0x69fa(){const _0x16defd=['userId','amd','CollaborationSessionService','defineProperty','getComment','parse','post','/universer-api/comment/unit/','parentId','deleteComment','rxjs','Edit','@univerjs/network','createTimestamp','onReady','thread-comment-data-source.config','forEach','bufferTime','size','users','5094020VmiwXt','_config','comments','UserManagerService','Delete','_commentService','Solved','comment','_threadCommentModel','Plugin','_threadCommentDataSourceService','code','UniverCollaborationClientPlugin','userID','/edit','/add','UniverNetwork','6327584pRiaVW','Unknown','UniverProCollaborationClient','IThreadCommentDataSourceService','reply','_threadCommentDataSource','YYYY/MM/DD\x20HH:mm','object','HTTPService','resolveComment','getCurrentUser','toStringTag','getUnit','@univerjs-pro/collaboration-client','customRanges','_initUserSync','filter','UniverThreadCommentDataSourcePlugin','addUser','Disposable','Inject','getOwnPropertyDescriptor','8sUpEVk','UNRECOGNIZED','addComment','commentUpdate$','getUser','rangeId','_httpService','content','replies','delete','root','CustomRangeType','UniverProThreadCommentDatasource','1414092gnRBXN','map','error','replyId','@univerjs-pro/license','UniverInstanceType','_userService','_sessionService','Reply','IConfigService','onStarting','requireSession','35Fohfwu','@univerjs/core','DependentOn','exports','5395551bfZhEg','CommentService','rangeType','stringify','Solve','6232833ODuzSr','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','personId','_injector','OpenOrReOpen','user','/delete','8spStif','threadId','/list','UNIVER_UNKNOWN','type','setConfig','UniverThreadCommentUIPlugin','values','_initDataSource','updateComment','unitId','saveCommentToSnapshot','/solved','UniverCore','subscribe','length','COMMENT','add','function','3824802khYIBa','Add','Injector','solved','syncUpdateMutationToColla','merge','disposeWithMe','UniverThreadCommentUi','get','_init','find','resolved','getMemberID','289946Adnthw','_configService','body'];_0x69fa=function(){return _0x16defd;};return _0x69fa();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.5.2-nightly.202501031606",
3
+ "version": "0.5.3-experimental.20250106-e3b7a39",
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.5.2-nightly.202501031606",
49
- "@univerjs/core": "0.5.2-nightly.202501031606",
50
- "@univerjs/network": "0.5.2-nightly.202501031606",
51
- "@univerjs-pro/license": "0.5.2-nightly.202501031606",
48
+ "@univerjs-pro/collaboration-client": "0.5.3-experimental.20250106-e3b7a39",
49
+ "@univerjs-pro/license": "0.5.3-experimental.20250106-e3b7a39",
50
+ "@univerjs/core": "0.5.3-experimental.20250106-e3b7a39",
52
51
  "@univerjs/protocol": "0.1.40-alpha.10",
53
- "@univerjs/thread-comment": "0.5.2-nightly.202501031606",
54
- "@univerjs/thread-comment-ui": "0.5.2-nightly.202501031606"
52
+ "@univerjs/thread-comment-ui": "0.5.3-experimental.20250106-e3b7a39",
53
+ "@univerjs/network": "0.5.3-experimental.20250106-e3b7a39",
54
+ "@univerjs/thread-comment": "0.5.3-experimental.20250106-e3b7a39"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",
58
58
  "typescript": "^5.7.2",
59
59
  "vite": "^6.0.6",
60
60
  "vitest": "^2.1.8",
61
- "@univerjs-infra/shared": "0.5.2"
61
+ "@univerjs-infra/shared": "0.5.3"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",