@univerjs-pro/thread-comment-datasource 0.13.0-insiders.20251218-2062647 → 0.13.0-insiders.20251220-0a5ea4d

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';function _0x3584(){const _0x50b1a6=['thread-comment-data-source.config','Inject','DependentOn','/reply','_threadCommentModel','Injector','getOwnPropertyDescriptor','IThreadCommentDataSourceService','Add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','unitId','_userService','user','parse','customRanges','Solve','Module','UserManagerService','disposeWithMe','size','_initDataSource','UNRECOGNIZED','format','addComment','10AuxtrQ','Unknown','values','get','createTimestamp','Edit','merge','YYYY/MM/DD\x20HH:mm','post','error','_commentService','_initUserSync','5580330gHSVAb','root','getCurrentUser','subscribe','_httpService','comments','_threadCommentDataSourceService','users','UniverThreadCommentDataSourcePlugin','/delete','forEach','IConfigService','435192mrtami','/universer-api/user/list','code','_config','payload','userID','ThreadCommentModel','slice','content','map','Delete','ref','resolveComment','filter','add','setConfig','userId','reply','resolved','defineProperty','addUser','OpenOrReOpen','updateComment','CommentService','dataSource','_init','onStarting','listComments','commentUpdate$','replyId','/universer-api/comment/unit/','toStringTag','/add','deleteComment','1085114JERVmY','2RpTolI','/solved','find','type','HTTPService','onReady','UniverLicensePlugin','pluginName','COMMENT','comment','_sessionService','stringify','Reply','8653352JKSgJf','937071aUMlzd','_injector','getComment','getUnit','body','solved','rangeType','47383866OccVtQ','rangeId','delete','dayjs','threadId','CollaborationSessionService','5391540YhjDhJ','requireSession','personId','getMemberID','length','replies','saveCommentToSnapshot','CustomRangeType','Solved','Disposable'];_0x3584=function(){return _0x50b1a6;};return _0x3584();}const _0x5f45a4=_0x1444;(function(_0x262afb,_0x401723){const _0x1bbfee=_0x1444,_0x24036f=_0x262afb();while(!![]){try{const _0x49f0db=parseInt(_0x1bbfee(0x1b5))/0x1*(-parseInt(_0x1bbfee(0x1b4))/0x2)+-parseInt(_0x1bbfee(0x1c3))/0x3+-parseInt(_0x1bbfee(0x1d0))/0x4+-parseInt(_0x1bbfee(0x17a))/0x5*(-parseInt(_0x1bbfee(0x192))/0x6)+-parseInt(_0x1bbfee(0x186))/0x7+-parseInt(_0x1bbfee(0x1c2))/0x8+parseInt(_0x1bbfee(0x1ca))/0x9;if(_0x49f0db===_0x401723)break;else _0x24036f['push'](_0x24036f['shift']());}catch(_0x4886dc){_0x24036f['push'](_0x24036f['shift']());}}}(_0x3584,0xbfd3b));Object[_0x5f45a4(0x1a5)](exports,Symbol[_0x5f45a4(0x1b1)],{'value':_0x5f45a4(0x172)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x5f45a4(0x1e3);var I=(_0xf2a5f9=>(_0xf2a5f9[_0xf2a5f9[_0x5f45a4(0x1a7)]=0x0]=_0x5f45a4(0x1a7),_0xf2a5f9[_0xf2a5f9[_0x5f45a4(0x1d8)]=0x1]=_0x5f45a4(0x1d8),_0xf2a5f9[_0xf2a5f9[_0x5f45a4(0x177)]=-0x1]=_0x5f45a4(0x177),_0xf2a5f9))(I||{}),v=(_0x396f58=>(_0x396f58[_0x396f58[_0x5f45a4(0x17b)]=0x0]='Unknown',_0x396f58[_0x396f58[_0x5f45a4(0x1e2)]=0x1]='Add',_0x396f58[_0x396f58[_0x5f45a4(0x1c1)]=0x2]='Reply',_0x396f58[_0x396f58[_0x5f45a4(0x17f)]=0x3]=_0x5f45a4(0x17f),_0x396f58[_0x396f58[_0x5f45a4(0x19c)]=0x4]='Delete',_0x396f58[_0x396f58[_0x5f45a4(0x171)]=0x5]=_0x5f45a4(0x171),_0x396f58[_0x396f58[_0x5f45a4(0x177)]=-0x1]=_0x5f45a4(0x177),_0x396f58))(v||{});const f=_0x5213d2=>c[_0x5f45a4(0x1cd)](new Date(+_0x5213d2))[_0x5f45a4(0x178)](_0x5f45a4(0x181)),R=async(_0x4163de,_0x4a5113)=>{const _0x17d789=_0x5f45a4,_0x2400b3=_0x4163de['get'](c[_0x17d789(0x173)]),_0x1897b5=_0x4163de[_0x17d789(0x17d)](P['HTTPService']);_0x4a5113['forEach'](_0x4aeb4b=>{const _0x9b966d=_0x17d789;_0x2400b3['getUser'](_0x4aeb4b)&&_0x4a5113[_0x9b966d(0x1cc)](_0x4aeb4b);}),_0x4a5113[_0x17d789(0x175)]&&(await _0x1897b5['get'](_0x17d789(0x193),{'params':{'userIDs':[..._0x4a5113]}}))[_0x17d789(0x1c7)][_0x17d789(0x18d)]['forEach'](_0x5adc5f=>{const _0x167064=_0x17d789;_0x5adc5f&&_0x2400b3[_0x167064(0x1a6)](_0x5adc5f);});};var $=Object[_0x5f45a4(0x1e0)],E=(_0x1263f2,_0x1570f9,_0x2439f6,_0x676d41)=>{const _0x48b8d3=_0x5f45a4;for(var _0x5d52ac=_0x676d41>0x1?void 0x0:_0x676d41?$(_0x1570f9,_0x2439f6):_0x1570f9,_0xb4ac2=_0x1263f2[_0x48b8d3(0x1d4)]-0x1,_0x82b4b5;_0xb4ac2>=0x0;_0xb4ac2--)(_0x82b4b5=_0x1263f2[_0xb4ac2])&&(_0x5d52ac=_0x82b4b5(_0x5d52ac)||_0x5d52ac);return _0x5d52ac;},S=(_0xbb7323,_0x2c7627)=>(_0x2cf287,_0x1d28ad)=>_0x2c7627(_0x2cf287,_0x1d28ad,_0xbb7323);let _=class extends c[_0x5f45a4(0x1d9)]{constructor(_0x42d9ef,_0x5a8bfd,_0x1ddf7a,_0x15aa1d){const _0x11e1fc=_0x5f45a4;super(),this[_0x11e1fc(0x184)]=_0x42d9ef,this[_0x11e1fc(0x1de)]=_0x5a8bfd,this[_0x11e1fc(0x1e5)]=_0x1ddf7a,this[_0x11e1fc(0x1c4)]=_0x15aa1d,this['_init'](),this[_0x11e1fc(0x185)]();}[_0x5f45a4(0x185)](){const _0x26edc6=_0x5f45a4;this['disposeWithMe'](this[_0x26edc6(0x1de)][_0x26edc6(0x1ae)]['pipe'](j['bufferTime'](0x10))[_0x26edc6(0x189)](_0x6f8f1f=>{const _0x5ec1a2=_0x26edc6,_0x3755ba=new Set();_0x6f8f1f[_0x5ec1a2(0x190)](_0x240eca=>{const _0x3c9c1c=_0x5ec1a2;switch(_0x240eca[_0x3c9c1c(0x1b8)]){case _0x3c9c1c(0x1a0):{const _0x3a8809=_0x240eca[_0x3c9c1c(0x196)][_0x3c9c1c(0x1d2)];_0x3755ba[_0x3c9c1c(0x1a0)](_0x3a8809);break;}}}),R(this['_injector'],_0x3755ba);}));}[_0x5f45a4(0x1ab)](){const _0x2c88cb=_0x5f45a4;this[_0x2c88cb(0x174)](this['_commentService'][_0x2c88cb(0x1ae)][_0x2c88cb(0x189)](async _0x3e8dae=>{const _0x405b35=_0x2c88cb;var _0x503923,_0x5c7892,_0x368a32,_0xcad93d;const _0x5464af=(_0x503923=this[_0x405b35(0x1de)][_0x405b35(0x1c6)](_0x3e8dae[_0x405b35(0x1e4)])[_0x405b35(0x1b7)](_0x80ca6a=>_0x80ca6a[_0x405b35(0x1ce)]===_0x3e8dae['threadId']))==null?void 0x0:_0x503923['root'];if(!_0x5464af)return;const {unitId:_0x511381,subUnitId:_0x17ff6d}=_0x5464af;switch(_0x3e8dae['user']&&this['_userService']['addUser'](_0x3e8dae['user']),_0x3e8dae['type']){case v[_0x405b35(0x1e2)]:break;case v[_0x405b35(0x1c1)]:{this[_0x405b35(0x1de)][_0x405b35(0x179)](_0x511381,_0x17ff6d,{'unitId':_0x511381,'subUnitId':_0x17ff6d,'ref':'','id':_0x3e8dae['replyId'],'dT':f(+_0x3e8dae[_0x405b35(0x17e)]),'threadId':_0x3e8dae[_0x405b35(0x1ce)],'personId':(_0x368a32=(_0x5c7892=_0x3e8dae[_0x405b35(0x1e6)])==null?void 0x0:_0x5c7892['userID'])!=null?_0x368a32:_0x3e8dae['userId'],'text':JSON[_0x405b35(0x1e7)](_0x3e8dae['content']),'parentId':_0x5464af['id']});break;}case v[_0x405b35(0x19c)]:{const _0x4360e3=this[_0x405b35(0x1de)][_0x405b35(0x1c5)](_0x511381,_0x17ff6d,_0x3e8dae[_0x405b35(0x1af)]);_0x4360e3&&_0x4360e3['parentId']&&this[_0x405b35(0x1de)][_0x405b35(0x1b3)](_0x511381,_0x17ff6d,_0x3e8dae[_0x405b35(0x1af)]);break;}case v[_0x405b35(0x17f)]:{this[_0x405b35(0x1de)][_0x405b35(0x1a8)](_0x511381,_0x17ff6d,{'commentId':_0x3e8dae[_0x405b35(0x1af)],'text':JSON[_0x405b35(0x1e7)](_0x3e8dae[_0x405b35(0x19a)])});break;}case v[_0x405b35(0x171)]:{const _0x4c7de8=(_0xcad93d=this[_0x405b35(0x1de)]['getUnit'](_0x3e8dae[_0x405b35(0x1e4)])['find'](_0x392747=>_0x392747[_0x405b35(0x1ce)]===_0x3e8dae['threadId']))==null?void 0x0:_0xcad93d[_0x405b35(0x187)];_0x4c7de8&&this['_threadCommentModel'][_0x405b35(0x19e)](_0x511381,_0x17ff6d,_0x4c7de8['id'],_0x3e8dae[_0x405b35(0x1c8)]===I[_0x405b35(0x1d8)]);break;}}}));}};_=E([S(0x0,c[_0x5f45a4(0x1db)](b[_0x5f45a4(0x1a9)])),S(0x1,c[_0x5f45a4(0x1db)](M[_0x5f45a4(0x198)])),S(0x2,c['Inject'](c[_0x5f45a4(0x173)])),S(0x3,c[_0x5f45a4(0x1db)](c[_0x5f45a4(0x1df)]))],_);const q=_0x5f45a4(0x1da),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x472959,_0x119fc8,_0x5e5e52,_0x15a0e4)=>{for(var _0x14a426=_0x15a0e4>0x1?void 0x0:_0x15a0e4?A(_0x119fc8,_0x5e5e52):_0x119fc8,_0x17a3bf=_0x472959['length']-0x1,_0x4cc5d7;_0x17a3bf>=0x0;_0x17a3bf--)(_0x4cc5d7=_0x472959[_0x17a3bf])&&(_0x14a426=_0x4cc5d7(_0x14a426)||_0x14a426);return _0x14a426;},C=(_0x3aab8d,_0x5ab867)=>(_0x172dba,_0x2d72b1)=>_0x5ab867(_0x172dba,_0x2d72b1,_0x3aab8d);function Y(_0x5cf7aa,_0x3c7ab8){const _0x14c208=_0x5f45a4,_0x1cfbcd=_0x5cf7aa[_0x14c208(0x1d5)][0x0];return{..._0x3c7ab8,'id':_0x1cfbcd[_0x14c208(0x1af)],'resolved':_0x5cf7aa['solved']===0x1,'dT':f(_0x1cfbcd[_0x14c208(0x17e)]),'personId':_0x1cfbcd['userId'],'threadId':_0x1cfbcd[_0x14c208(0x1ce)]};}function G(_0x387779,_0x14f713,_0x43deae){const _0x4f20b3=_0x5f45a4;var _0xa97c37,_0x982c16;if(((_0x982c16=(_0xa97c37=_0x387779==null?void 0x0:_0x387779[_0x4f20b3(0x1d5)])==null?void 0x0:_0xa97c37[_0x4f20b3(0x1d4)])!=null?_0x982c16:0x0)>0x0){const _0xc8f535=(_0x37bf9a,_0x1c2cb4)=>({'id':_0x37bf9a['replyId'],'threadId':_0x37bf9a[_0x4f20b3(0x1ce)],'dT':f(_0x37bf9a['createTimestamp']),'personId':_0x37bf9a[_0x4f20b3(0x1a2)],'resolved':_0x387779[_0x4f20b3(0x1c8)]===I[_0x4f20b3(0x1d8)],'unitId':_0x14f713,'subUnitId':_0x43deae,'text':JSON[_0x4f20b3(0x1e7)](_0x37bf9a[_0x4f20b3(0x19a)]),'parentId':_0x1c2cb4}),_0x34a381=_0xc8f535(_0x387779[_0x4f20b3(0x1d5)][0x0]);return{..._0x34a381,'children':_0x387779[_0x4f20b3(0x1d5)][_0x4f20b3(0x199)](0x1)[_0x4f20b3(0x19b)](_0x24021b=>_0xc8f535(_0x24021b,_0x34a381['id']))};}return null;}let p=class{constructor(_0x1a946d,_0x563784,_0x71c5ad){const _0x41d49d=_0x5f45a4;this[_0x41d49d(0x18a)]=_0x1a946d,this[_0x41d49d(0x1e5)]=_0x563784,this['_sessionService']=_0x71c5ad;}async[_0x5f45a4(0x179)](_0x166def){const _0x29ce92=_0x5f45a4;var _0x237b29,_0x3f832c;const {parentId:_0x1c4803,unitId:_0x5c60af,text:_0x40ebe8,threadId:_0xcf5dd8}=_0x166def,_0x142825=(_0x3f832c=(_0x237b29=_0x40ebe8[_0x29ce92(0x1e8)])==null?void 0x0:_0x237b29[_0x29ce92(0x19f)](_0x43868c=>_0x43868c[_0x29ce92(0x1c9)]===c[_0x29ce92(0x1d7)][_0x29ce92(0x1bd)])[_0x29ce92(0x19b)](_0xbd2c5a=>_0xbd2c5a['rangeId']))!=null?_0x3f832c:[],_0x898519=JSON[_0x29ce92(0x1c0)](_0x40ebe8),_0x5113fb=(await this[_0x29ce92(0x1bf)][_0x29ce92(0x1d1)](_0x5c60af))['getMemberID']();if(_0x1c4803){const _0x1afba8={'memberId':_0x5113fb,'unitId':_0x5c60af,'content':_0x898519,'mention':_0x142825,'threadId':_0xcf5dd8},_0x3cec0d=(await this['_httpService'][_0x29ce92(0x182)](_0x29ce92(0x1b0)+_0x5c60af+_0x29ce92(0x1dd),{'body':_0x1afba8}))[_0x29ce92(0x1c7)][_0x29ce92(0x1a3)];return{..._0x166def,'id':_0x3cec0d['replyId'],'dT':c['dayjs'](+_0x3cec0d[_0x29ce92(0x17e)])['format'](_0x29ce92(0x181)),'personId':_0x3cec0d['userId']};}else{const _0x32c215={'memberId':_0x5113fb,'unitId':_0x5c60af,'content':_0x898519,'mention':_0x142825},_0x54bcb7=await this[_0x29ce92(0x18a)][_0x29ce92(0x182)](_0x29ce92(0x1b0)+_0x5c60af+_0x29ce92(0x1b2),{'body':_0x32c215});return Y(_0x54bcb7['body'][_0x29ce92(0x1be)],_0x166def);}}async[_0x5f45a4(0x1a8)](_0x1879f7){const _0xef4a1b=_0x5f45a4;var _0x12913b,_0x15937b;const {text:_0x5eafdd,unitId:_0x4d8a2e}=_0x1879f7,_0x3b3e56=(_0x15937b=(_0x12913b=_0x5eafdd[_0xef4a1b(0x1e8)])==null?void 0x0:_0x12913b[_0xef4a1b(0x19f)](_0x4ddf52=>_0x4ddf52[_0xef4a1b(0x1c9)]===c['CustomRangeType'][_0xef4a1b(0x1bd)])['map'](_0x3ad0bd=>_0x3ad0bd[_0xef4a1b(0x1cb)]))!=null?_0x15937b:[],_0x2caaa4=JSON[_0xef4a1b(0x1c0)](_0x5eafdd),_0x2383bc=_0x1879f7[_0xef4a1b(0x1ce)],_0x4829dd=_0x1879f7['id'],_0x5d635e={'memberId':(await this[_0xef4a1b(0x1bf)]['requireSession'](_0x4d8a2e))[_0xef4a1b(0x1d3)](),'unitId':_0x4d8a2e,'threadId':_0x2383bc,'mention':_0x3b3e56,'content':_0x2caaa4,'replyId':_0x4829dd},_0x701d1e=await this['_httpService'][_0xef4a1b(0x182)](_0xef4a1b(0x1b0)+_0x4d8a2e+'/edit',{'body':_0x5d635e});return!_0x701d1e[_0xef4a1b(0x1c7)][_0xef4a1b(0x183)]||_0x701d1e[_0xef4a1b(0x1c7)][_0xef4a1b(0x183)][_0xef4a1b(0x194)]===0x1;}async[_0x5f45a4(0x19e)](_0x57c8ef){const _0x1ec892=_0x5f45a4,{unitId:_0x558b19}=_0x57c8ef,_0x58f077=_0x57c8ef['threadId'],_0x126560={'memberId':this['_userService'][_0x1ec892(0x188)]()[_0x1ec892(0x197)],'unitId':_0x558b19,'threadId':_0x58f077,'solved':_0x57c8ef[_0x1ec892(0x1a4)]?I['Solved']:I[_0x1ec892(0x1a7)]},_0x4669c7=await this['_httpService'][_0x1ec892(0x182)](_0x1ec892(0x1b0)+_0x558b19+_0x1ec892(0x1b6),{'body':_0x126560});return!_0x4669c7['body'][_0x1ec892(0x183)]||_0x4669c7[_0x1ec892(0x1c7)][_0x1ec892(0x183)][_0x1ec892(0x194)]===0x1;}async[_0x5f45a4(0x1b3)](_0x48bb20,_0x5188f4,_0x68e7fb,_0x27c462){const _0x7408c9=_0x5f45a4,_0x123603={'memberId':(await this[_0x7408c9(0x1bf)][_0x7408c9(0x1d1)](_0x48bb20))[_0x7408c9(0x1d3)](),'threadId':_0x68e7fb,'replyId':_0x27c462,'unitId':_0x48bb20},_0x373488=await this[_0x7408c9(0x18a)]['post'](_0x7408c9(0x1b0)+_0x48bb20+_0x7408c9(0x18f),{'body':_0x123603});return!_0x373488[_0x7408c9(0x1c7)][_0x7408c9(0x183)]||_0x373488[_0x7408c9(0x1c7)]['error']['code']===0x1;}async[_0x5f45a4(0x1ad)](_0x506a55,_0x111f57,_0x23729f){const _0x1fb48a=_0x5f45a4,_0xd30a5e={'unitId':_0x506a55,'threadId':_0x23729f},_0x37e289=await this[_0x1fb48a(0x18a)]['post'](_0x1fb48a(0x1b0)+_0x506a55+'/list',{'body':_0xd30a5e}),_0x3deb2=_0x23729f[_0x1fb48a(0x19b)](_0x205123=>G(_0x37e289[_0x1fb48a(0x1c7)][_0x1fb48a(0x18b)][_0x205123],_0x506a55,_0x111f57))[_0x1fb48a(0x19f)](Boolean);return Object[_0x1fb48a(0x17c)](_0x37e289['body'][_0x1fb48a(0x18d)])[_0x1fb48a(0x190)](_0xf96ba4=>{const _0x3d4809=_0x1fb48a;this[_0x3d4809(0x1e5)][_0x3d4809(0x1a6)](_0xf96ba4);}),_0x3deb2;}[_0x5f45a4(0x1d6)](_0x139209){const _0x33e4eb=_0x5f45a4;return{'id':_0x139209['id'],'threadId':_0x139209['threadId'],'ref':_0x139209[_0x33e4eb(0x19d)]};}};p=x([C(0x0,c[_0x5f45a4(0x1db)](P[_0x5f45a4(0x1b9)])),C(0x1,c[_0x5f45a4(0x1db)](c['UserManagerService'])),C(0x2,c[_0x5f45a4(0x1db)](b[_0x5f45a4(0x1cf)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x28b87d,_0x62d820,_0x387c3f,_0xecd3a5)=>{const _0x377521=_0x5f45a4;for(var _0x4c6b46=_0xecd3a5>0x1?void 0x0:_0xecd3a5?H(_0x62d820,_0x387c3f):_0x62d820,_0x3d3767=_0x28b87d[_0x377521(0x1d4)]-0x1,_0x45f522;_0x3d3767>=0x0;_0x3d3767--)(_0x45f522=_0x28b87d[_0x3d3767])&&(_0x4c6b46=_0x45f522(_0x4c6b46)||_0x4c6b46);return _0x4c6b46;},y=(_0xb3adb2,_0x2648aa)=>(_0x5b3ec7,_0x3ab47a)=>_0x2648aa(_0x5b3ec7,_0x3ab47a,_0xb3adb2);let g=class extends c['Disposable']{constructor(_0x369789,_0x58a55f){const _0x5a8b57=_0x5f45a4;super(),this[_0x5a8b57(0x18c)]=_0x369789,this['_threadCommentDataSource']=_0x58a55f,this['_initDataSource']();}[_0x5f45a4(0x176)](){const _0x5f527c=_0x5f45a4;this[_0x5f527c(0x18c)][_0x5f527c(0x1aa)]=this['_threadCommentDataSource'],this[_0x5f527c(0x18c)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x5f45a4(0x1e1)]),y(0x1,c['Inject'](p))],g);var F=Object[_0x5f45a4(0x1a5)],L=Object[_0x5f45a4(0x1e0)],Z=(_0x33154d,_0x55b1cd,_0x37e4da)=>_0x55b1cd in _0x33154d?F(_0x33154d,_0x55b1cd,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x37e4da}):_0x33154d[_0x55b1cd]=_0x37e4da,W=(_0x316c26,_0x4227ae,_0x47fec4,_0x50d8d3)=>{const _0x2be59f=_0x5f45a4;for(var _0xe52bc0=_0x50d8d3>0x1?void 0x0:_0x50d8d3?L(_0x4227ae,_0x47fec4):_0x4227ae,_0xeacf29=_0x316c26[_0x2be59f(0x1d4)]-0x1,_0x4bac95;_0xeacf29>=0x0;_0xeacf29--)(_0x4bac95=_0x316c26[_0xeacf29])&&(_0xe52bc0=_0x4bac95(_0xe52bc0)||_0xe52bc0);return _0xe52bc0;},O=(_0x3cd7ec,_0x1798ee)=>(_0xb37364,_0x437a1f)=>_0x1798ee(_0xb37364,_0x437a1f,_0x3cd7ec),N=(_0x2e9a70,_0xe9e545,_0x55cc80)=>Z(_0x2e9a70,typeof _0xe9e545!='symbol'?_0xe9e545+'':_0xe9e545,_0x55cc80);function _0x1444(_0x223419,_0x5b0415){_0x223419=_0x223419-0x171;const _0x35843f=_0x3584();let _0x144494=_0x35843f[_0x223419];return _0x144494;}exports['UniverThreadCommentDataSourcePlugin']=class extends c['Plugin']{constructor(_0x110189=D,_0x14a32f,_0x67f013){const _0x3a576e=_0x5f45a4;super(),this[_0x3a576e(0x195)]=_0x110189,this[_0x3a576e(0x1c4)]=_0x14a32f,this['_configService']=_0x67f013;const {..._0x5e43ee}=c[_0x3a576e(0x180)]({},D,this['_config']);this['_configService'][_0x3a576e(0x1a1)](q,_0x5e43ee);}[_0x5f45a4(0x1ac)](){const _0x2a7889=_0x5f45a4;[[p],[g],[_]][_0x2a7889(0x190)](_0x1bc9ca=>{const _0x396623=_0x2a7889;this[_0x396623(0x1c4)][_0x396623(0x1a0)](_0x1bc9ca);});}[_0x5f45a4(0x1ba)](){const _0x49d572=_0x5f45a4;this[_0x49d572(0x1c4)][_0x49d572(0x17d)](g),this[_0x49d572(0x1c4)]['get'](_);}},N(exports[_0x5f45a4(0x18e)],_0x5f45a4(0x1bc),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x5f45a4(0x1b8),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports[_0x5f45a4(0x18e)]=W([c[_0x5f45a4(0x1dc)](w['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T[_0x5f45a4(0x1bb)]),O(0x1,c[_0x5f45a4(0x1db)](c[_0x5f45a4(0x1df)])),O(0x2,c[_0x5f45a4(0x191)])],exports[_0x5f45a4(0x18e)]);
1
+ 'use strict';const _0x579d36=_0x2c37;(function(_0x70311e,_0x481417){const _0x5c06fd=_0x2c37,_0x92ca55=_0x70311e();while(!![]){try{const _0x427b68=parseInt(_0x5c06fd(0xf2))/0x1+parseInt(_0x5c06fd(0x140))/0x2*(-parseInt(_0x5c06fd(0x139))/0x3)+-parseInt(_0x5c06fd(0x14e))/0x4*(parseInt(_0x5c06fd(0x11c))/0x5)+-parseInt(_0x5c06fd(0x136))/0x6*(parseInt(_0x5c06fd(0x144))/0x7)+parseInt(_0x5c06fd(0xfc))/0x8*(-parseInt(_0x5c06fd(0x129))/0x9)+-parseInt(_0x5c06fd(0x146))/0xa*(-parseInt(_0x5c06fd(0x162))/0xb)+parseInt(_0x5c06fd(0x13d))/0xc*(parseInt(_0x5c06fd(0x138))/0xd);if(_0x427b68===_0x481417)break;else _0x92ca55['push'](_0x92ca55['shift']());}catch(_0x4a74b6){_0x92ca55['push'](_0x92ca55['shift']());}}}(_0x4aa6,0xd160a));function _0x2c37(_0x1f4cb5,_0x5311ee){_0x1f4cb5=_0x1f4cb5-0xea;const _0x4aa675=_0x4aa6();let _0x2c3753=_0x4aa675[_0x1f4cb5];return _0x2c3753;}Object[_0x579d36(0x131)](exports,Symbol[_0x579d36(0x143)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x579d36(0x13c);var I=(_0x2c43fc=>(_0x2c43fc[_0x2c43fc[_0x579d36(0x164)]=0x0]=_0x579d36(0x164),_0x2c43fc[_0x2c43fc[_0x579d36(0x115)]=0x1]=_0x579d36(0x115),_0x2c43fc[_0x2c43fc[_0x579d36(0x159)]=-0x1]=_0x579d36(0x159),_0x2c43fc))(I||{}),v=(_0x316183=>(_0x316183[_0x316183[_0x579d36(0x102)]=0x0]=_0x579d36(0x102),_0x316183[_0x316183['Add']=0x1]=_0x579d36(0x111),_0x316183[_0x316183['Reply']=0x2]=_0x579d36(0x14f),_0x316183[_0x316183[_0x579d36(0xec)]=0x3]=_0x579d36(0xec),_0x316183[_0x316183[_0x579d36(0x126)]=0x4]=_0x579d36(0x126),_0x316183[_0x316183[_0x579d36(0x121)]=0x5]=_0x579d36(0x121),_0x316183[_0x316183[_0x579d36(0x159)]=-0x1]=_0x579d36(0x159),_0x316183))(v||{});const f=_0x31cac4=>c[_0x579d36(0xef)](new Date(+_0x31cac4))[_0x579d36(0x120)](_0x579d36(0xf8)),R=async(_0x119942,_0x9ecdd1)=>{const _0x148fe9=_0x579d36,_0x47d908=_0x119942[_0x148fe9(0x110)](c[_0x148fe9(0x118)]),_0x2b52e2=_0x119942[_0x148fe9(0x110)](P[_0x148fe9(0xfb)]);_0x9ecdd1[_0x148fe9(0x156)](_0x4cde72=>{const _0x214b72=_0x148fe9;_0x47d908['getUser'](_0x4cde72)&&_0x9ecdd1[_0x214b72(0xf5)](_0x4cde72);}),_0x9ecdd1['size']&&(await _0x2b52e2['get'](_0x148fe9(0x10a),{'params':{'userIDs':[..._0x9ecdd1]}}))[_0x148fe9(0xfe)][_0x148fe9(0x11a)]['forEach'](_0x1caba3=>{const _0x4505da=_0x148fe9;_0x1caba3&&_0x47d908[_0x4505da(0xf1)](_0x1caba3);});};var $=Object[_0x579d36(0x124)],E=(_0x14c572,_0x5de675,_0x211fe4,_0x4b1226)=>{const _0x12cb16=_0x579d36;for(var _0x26d32b=_0x4b1226>0x1?void 0x0:_0x4b1226?$(_0x5de675,_0x211fe4):_0x5de675,_0x15a9f5=_0x14c572[_0x12cb16(0x116)]-0x1,_0xa46c3c;_0x15a9f5>=0x0;_0x15a9f5--)(_0xa46c3c=_0x14c572[_0x15a9f5])&&(_0x26d32b=_0xa46c3c(_0x26d32b)||_0x26d32b);return _0x26d32b;},S=(_0x155510,_0x2661fa)=>(_0x26516d,_0x3742b4)=>_0x2661fa(_0x26516d,_0x3742b4,_0x155510);let _=class extends c['Disposable']{constructor(_0x478b1e,_0x54ef11,_0x9eb02,_0x15f325){const _0x2110fa=_0x579d36;super(),this['_commentService']=_0x478b1e,this[_0x2110fa(0x113)]=_0x54ef11,this['_userService']=_0x9eb02,this[_0x2110fa(0xf0)]=_0x15f325,this[_0x2110fa(0xf9)](),this[_0x2110fa(0x12a)]();}[_0x579d36(0x12a)](){const _0x4ad663=_0x579d36;this['disposeWithMe'](this[_0x4ad663(0x113)][_0x4ad663(0x12d)][_0x4ad663(0x114)](j[_0x4ad663(0x13f)](0x10))[_0x4ad663(0x142)](_0x1d894f=>{const _0x49f28b=_0x4ad663,_0x485091=new Set();_0x1d894f['forEach'](_0x24c8c2=>{const _0x1470b1=_0x2c37;switch(_0x24c8c2[_0x1470b1(0x154)]){case _0x1470b1(0x100):{const _0x203025=_0x24c8c2['payload']['personId'];_0x485091[_0x1470b1(0x100)](_0x203025);break;}}}),R(this[_0x49f28b(0xf0)],_0x485091);}));}['_init'](){const _0x35ed19=_0x579d36;this[_0x35ed19(0x141)](this['_commentService'][_0x35ed19(0x12d)][_0x35ed19(0x142)](async _0x268292=>{const _0x168c97=_0x35ed19;var _0x48f1e5,_0x3dd079,_0x1315fc,_0x5dec41;const _0x4dcf5e=(_0x48f1e5=this['_threadCommentModel'][_0x168c97(0xf6)](_0x268292['unitId'])[_0x168c97(0x109)](_0x5b7db5=>_0x5b7db5[_0x168c97(0x133)]===_0x268292[_0x168c97(0x133)]))==null?void 0x0:_0x48f1e5[_0x168c97(0x105)];if(!_0x4dcf5e)return;const {unitId:_0xe56ff3,subUnitId:_0x54c728}=_0x4dcf5e;switch(_0x268292[_0x168c97(0x163)]&&this['_userService'][_0x168c97(0xf1)](_0x268292[_0x168c97(0x163)]),_0x268292[_0x168c97(0x154)]){case v['Add']:break;case v[_0x168c97(0x14f)]:{this[_0x168c97(0x113)][_0x168c97(0x147)](_0xe56ff3,_0x54c728,{'unitId':_0xe56ff3,'subUnitId':_0x54c728,'ref':'','id':_0x268292[_0x168c97(0x13b)],'dT':f(+_0x268292[_0x168c97(0x11d)]),'threadId':_0x268292[_0x168c97(0x133)],'personId':(_0x1315fc=(_0x3dd079=_0x268292[_0x168c97(0x163)])==null?void 0x0:_0x3dd079['userID'])!=null?_0x1315fc:_0x268292['userId'],'text':JSON[_0x168c97(0x149)](_0x268292[_0x168c97(0x12c)]),'parentId':_0x4dcf5e['id']});break;}case v[_0x168c97(0x126)]:{const _0x1853e0=this[_0x168c97(0x113)][_0x168c97(0x15f)](_0xe56ff3,_0x54c728,_0x268292['replyId']);_0x1853e0&&_0x1853e0['parentId']&&this[_0x168c97(0x113)]['deleteComment'](_0xe56ff3,_0x54c728,_0x268292[_0x168c97(0x13b)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x168c97(0x13e)](_0xe56ff3,_0x54c728,{'commentId':_0x268292[_0x168c97(0x13b)],'text':JSON[_0x168c97(0x149)](_0x268292[_0x168c97(0x12c)])});break;}case v[_0x168c97(0x121)]:{const _0x37548e=(_0x5dec41=this[_0x168c97(0x113)]['getUnit'](_0x268292['unitId'])[_0x168c97(0x109)](_0x930446=>_0x930446['threadId']===_0x268292[_0x168c97(0x133)]))==null?void 0x0:_0x5dec41[_0x168c97(0x105)];_0x37548e&&this[_0x168c97(0x113)][_0x168c97(0x13a)](_0xe56ff3,_0x54c728,_0x37548e['id'],_0x268292[_0x168c97(0x132)]===I[_0x168c97(0x115)]);break;}}}));}};_=E([S(0x0,c[_0x579d36(0x12b)](b[_0x579d36(0xf7)])),S(0x1,c[_0x579d36(0x12b)](M[_0x579d36(0x161)])),S(0x2,c['Inject'](c['UserManagerService'])),S(0x3,c[_0x579d36(0x12b)](c[_0x579d36(0xee)]))],_);const q=_0x579d36(0x160),D={};var A=Object[_0x579d36(0x124)],x=(_0x130124,_0x58fa8b,_0x258828,_0x517956)=>{const _0x48f25a=_0x579d36;for(var _0x54c9ef=_0x517956>0x1?void 0x0:_0x517956?A(_0x58fa8b,_0x258828):_0x58fa8b,_0x430d47=_0x130124[_0x48f25a(0x116)]-0x1,_0x36d640;_0x430d47>=0x0;_0x430d47--)(_0x36d640=_0x130124[_0x430d47])&&(_0x54c9ef=_0x36d640(_0x54c9ef)||_0x54c9ef);return _0x54c9ef;},C=(_0x4e2857,_0x3de859)=>(_0x189736,_0x2d32a3)=>_0x3de859(_0x189736,_0x2d32a3,_0x4e2857);function Y(_0x5a246b,_0x1ddbd7){const _0x5e6954=_0x579d36,_0x5b69ca=_0x5a246b[_0x5e6954(0xfa)][0x0];return{..._0x1ddbd7,'id':_0x5b69ca[_0x5e6954(0x13b)],'resolved':_0x5a246b[_0x5e6954(0x132)]===0x1,'dT':f(_0x5b69ca[_0x5e6954(0x11d)]),'personId':_0x5b69ca[_0x5e6954(0x150)],'threadId':_0x5b69ca[_0x5e6954(0x133)]};}function G(_0x15e7f6,_0x1775e3,_0x349546){const _0x1f4c8e=_0x579d36;var _0x517e64,_0x2cccb2;if(((_0x2cccb2=(_0x517e64=_0x15e7f6==null?void 0x0:_0x15e7f6['replies'])==null?void 0x0:_0x517e64[_0x1f4c8e(0x116)])!=null?_0x2cccb2:0x0)>0x0){const _0x2a0d73=(_0x448027,_0xa0032f)=>({'id':_0x448027[_0x1f4c8e(0x13b)],'threadId':_0x448027[_0x1f4c8e(0x133)],'dT':f(_0x448027['createTimestamp']),'personId':_0x448027[_0x1f4c8e(0x150)],'resolved':_0x15e7f6[_0x1f4c8e(0x132)]===I[_0x1f4c8e(0x115)],'unitId':_0x1775e3,'subUnitId':_0x349546,'text':JSON[_0x1f4c8e(0x149)](_0x448027[_0x1f4c8e(0x12c)]),'parentId':_0xa0032f}),_0x56aae1=_0x2a0d73(_0x15e7f6[_0x1f4c8e(0xfa)][0x0]);return{..._0x56aae1,'children':_0x15e7f6[_0x1f4c8e(0xfa)][_0x1f4c8e(0x14c)](0x1)[_0x1f4c8e(0x10e)](_0x19801a=>_0x2a0d73(_0x19801a,_0x56aae1['id']))};}return null;}let p=class{constructor(_0x23a5f4,_0x36af16,_0x360710){const _0x179fb1=_0x579d36;this['_httpService']=_0x23a5f4,this[_0x179fb1(0x158)]=_0x36af16,this['_sessionService']=_0x360710;}async[_0x579d36(0x147)](_0xd5ddff){const _0x120447=_0x579d36;var _0x2c0585,_0x1818cb;const {parentId:_0x2b8784,unitId:_0x964da6,text:_0x1f6479,threadId:_0x3dfe86}=_0xd5ddff,_0xfab8d=(_0x1818cb=(_0x2c0585=_0x1f6479[_0x120447(0x14d)])==null?void 0x0:_0x2c0585[_0x120447(0x117)](_0x111dd7=>_0x111dd7[_0x120447(0xf3)]===c[_0x120447(0xea)][_0x120447(0x123)])[_0x120447(0x10e)](_0x3c92e5=>_0x3c92e5['rangeId']))!=null?_0x1818cb:[],_0x596832=JSON['stringify'](_0x1f6479),_0x59d07f=(await this[_0x120447(0x119)][_0x120447(0xff)](_0x964da6))[_0x120447(0x15b)]();if(_0x2b8784){const _0x4e9df4={'memberId':_0x59d07f,'unitId':_0x964da6,'content':_0x596832,'mention':_0xfab8d,'threadId':_0x3dfe86},_0x264146=(await this['_httpService'][_0x120447(0x101)](_0x120447(0x127)+_0x964da6+_0x120447(0x137),{'body':_0x4e9df4}))[_0x120447(0xfe)][_0x120447(0x128)];return{..._0xd5ddff,'id':_0x264146[_0x120447(0x13b)],'dT':c[_0x120447(0xef)](+_0x264146['createTimestamp'])[_0x120447(0x120)](_0x120447(0xf8)),'personId':_0x264146[_0x120447(0x150)]};}else{const _0x570ec4={'memberId':_0x59d07f,'unitId':_0x964da6,'content':_0x596832,'mention':_0xfab8d},_0x4c8c8e=await this[_0x120447(0x10c)]['post'](_0x120447(0x127)+_0x964da6+'/add',{'body':_0x570ec4});return Y(_0x4c8c8e[_0x120447(0xfe)]['comment'],_0xd5ddff);}}async['updateComment'](_0x6faaf7){const _0x2d0b0d=_0x579d36;var _0x3d5738,_0xdc934b;const {text:_0x1c3dcb,unitId:_0x5ea334}=_0x6faaf7,_0x5db2f0=(_0xdc934b=(_0x3d5738=_0x1c3dcb['customRanges'])==null?void 0x0:_0x3d5738[_0x2d0b0d(0x117)](_0x325776=>_0x325776[_0x2d0b0d(0xf3)]===c[_0x2d0b0d(0xea)][_0x2d0b0d(0x123)])[_0x2d0b0d(0x10e)](_0x174845=>_0x174845[_0x2d0b0d(0x125)]))!=null?_0xdc934b:[],_0x345717=JSON[_0x2d0b0d(0x14a)](_0x1c3dcb),_0x47f90a=_0x6faaf7[_0x2d0b0d(0x133)],_0x445235=_0x6faaf7['id'],_0x2d1c81={'memberId':(await this[_0x2d0b0d(0x119)]['requireSession'](_0x5ea334))[_0x2d0b0d(0x15b)](),'unitId':_0x5ea334,'threadId':_0x47f90a,'mention':_0x5db2f0,'content':_0x345717,'replyId':_0x445235},_0x9e0abb=await this[_0x2d0b0d(0x10c)]['post']('/universer-api/comment/unit/'+_0x5ea334+_0x2d0b0d(0x10f),{'body':_0x2d1c81});return!_0x9e0abb[_0x2d0b0d(0xfe)][_0x2d0b0d(0x107)]||_0x9e0abb[_0x2d0b0d(0xfe)][_0x2d0b0d(0x107)][_0x2d0b0d(0x106)]===0x1;}async[_0x579d36(0x13a)](_0x48c1a9){const _0x159941=_0x579d36,{unitId:_0x5c97b1}=_0x48c1a9,_0x8c5afb=_0x48c1a9[_0x159941(0x133)],_0x215055={'memberId':this[_0x159941(0x158)][_0x159941(0x122)]()[_0x159941(0x112)],'unitId':_0x5c97b1,'threadId':_0x8c5afb,'solved':_0x48c1a9[_0x159941(0x10d)]?I[_0x159941(0x115)]:I['OpenOrReOpen']},_0x199009=await this[_0x159941(0x10c)][_0x159941(0x101)]('/universer-api/comment/unit/'+_0x5c97b1+_0x159941(0x145),{'body':_0x215055});return!_0x199009[_0x159941(0xfe)][_0x159941(0x107)]||_0x199009[_0x159941(0xfe)]['error']['code']===0x1;}async['deleteComment'](_0x1ae354,_0x52ef47,_0x466947,_0x437135){const _0x1ce337=_0x579d36,_0x4d8c7b={'memberId':(await this['_sessionService'][_0x1ce337(0xff)](_0x1ae354))[_0x1ce337(0x15b)](),'threadId':_0x466947,'replyId':_0x437135,'unitId':_0x1ae354},_0x52c5f2=await this[_0x1ce337(0x10c)][_0x1ce337(0x101)]('/universer-api/comment/unit/'+_0x1ae354+_0x1ce337(0x15c),{'body':_0x4d8c7b});return!_0x52c5f2[_0x1ce337(0xfe)][_0x1ce337(0x107)]||_0x52c5f2['body'][_0x1ce337(0x107)][_0x1ce337(0x106)]===0x1;}async[_0x579d36(0x10b)](_0x3bb621,_0x31ef14,_0xabdd5d){const _0x40736b=_0x579d36,_0x37e54f={'unitId':_0x3bb621,'threadId':_0xabdd5d},_0x5ee48d=await this[_0x40736b(0x10c)][_0x40736b(0x101)](_0x40736b(0x127)+_0x3bb621+_0x40736b(0x15a),{'body':_0x37e54f}),_0x171397=_0xabdd5d[_0x40736b(0x10e)](_0x6da049=>G(_0x5ee48d['body'][_0x40736b(0x14b)][_0x6da049],_0x3bb621,_0x31ef14))['filter'](Boolean);return Object[_0x40736b(0xfd)](_0x5ee48d[_0x40736b(0xfe)][_0x40736b(0x11a)])[_0x40736b(0x156)](_0x48e7db=>{const _0x2d6db1=_0x40736b;this[_0x2d6db1(0x158)][_0x2d6db1(0xf1)](_0x48e7db);}),_0x171397;}[_0x579d36(0xed)](_0x5b032b){const _0xa0ec64=_0x579d36;return{'id':_0x5b032b['id'],'threadId':_0x5b032b[_0xa0ec64(0x133)],'ref':_0x5b032b[_0xa0ec64(0x130)]};}};p=x([C(0x0,c[_0x579d36(0x12b)](P[_0x579d36(0xfb)])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c[_0x579d36(0x12b)](b[_0x579d36(0x155)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x4553ad,_0x25e457,_0x343005,_0x1d8840)=>{const _0x19a47e=_0x579d36;for(var _0x140a81=_0x1d8840>0x1?void 0x0:_0x1d8840?H(_0x25e457,_0x343005):_0x25e457,_0x5ee7d0=_0x4553ad[_0x19a47e(0x116)]-0x1,_0x65c084;_0x5ee7d0>=0x0;_0x5ee7d0--)(_0x65c084=_0x4553ad[_0x5ee7d0])&&(_0x140a81=_0x65c084(_0x140a81)||_0x140a81);return _0x140a81;},y=(_0x58ec2b,_0x247d69)=>(_0x34d1fa,_0x2a2f39)=>_0x247d69(_0x34d1fa,_0x2a2f39,_0x58ec2b);let g=class extends c['Disposable']{constructor(_0x1b5e3d,_0x533e1d){const _0x1cdc09=_0x579d36;super(),this[_0x1cdc09(0x152)]=_0x1b5e3d,this[_0x1cdc09(0x11b)]=_0x533e1d,this[_0x1cdc09(0x104)]();}[_0x579d36(0x104)](){const _0x1ef151=_0x579d36;this[_0x1ef151(0x152)][_0x1ef151(0xf4)]=this[_0x1ef151(0x11b)],this[_0x1ef151(0x152)][_0x1ef151(0x151)]=!0x1;}};g=J([y(0x0,M[_0x579d36(0x108)]),y(0x1,c[_0x579d36(0x12b)](p))],g);var F=Object['defineProperty'],L=Object[_0x579d36(0x124)],Z=(_0x5089f8,_0x1be0c1,_0x5f45d0)=>_0x1be0c1 in _0x5089f8?F(_0x5089f8,_0x1be0c1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5f45d0}):_0x5089f8[_0x1be0c1]=_0x5f45d0,W=(_0x3b0802,_0x11a667,_0x146210,_0x3835dd)=>{const _0x331ca6=_0x579d36;for(var _0x57676a=_0x3835dd>0x1?void 0x0:_0x3835dd?L(_0x11a667,_0x146210):_0x11a667,_0x1fb751=_0x3b0802[_0x331ca6(0x116)]-0x1,_0x4eccec;_0x1fb751>=0x0;_0x1fb751--)(_0x4eccec=_0x3b0802[_0x1fb751])&&(_0x57676a=_0x4eccec(_0x57676a)||_0x57676a);return _0x57676a;},O=(_0x5741d7,_0x27ad9b)=>(_0x18cce0,_0x4a4992)=>_0x27ad9b(_0x18cce0,_0x4a4992,_0x5741d7),N=(_0x1929c7,_0x37e28d,_0x17697b)=>Z(_0x1929c7,typeof _0x37e28d!=_0x579d36(0x11e)?_0x37e28d+'':_0x37e28d,_0x17697b);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x579d36(0x135)]{constructor(_0x135806=D,_0x42a264,_0x5e7e3f){const _0x57a479=_0x579d36;super(),this[_0x57a479(0x11f)]=_0x135806,this[_0x57a479(0xf0)]=_0x42a264,this[_0x57a479(0x12f)]=_0x5e7e3f;const {..._0x3ee6e2}=c[_0x57a479(0x148)]({},D,this['_config']);this['_configService'][_0x57a479(0x134)](q,_0x3ee6e2);}[_0x579d36(0xeb)](){const _0x3e4fe2=_0x579d36;[[p],[g],[_]][_0x3e4fe2(0x156)](_0x37344f=>{const _0x466d64=_0x3e4fe2;this[_0x466d64(0xf0)][_0x466d64(0x100)](_0x37344f);});}['onReady'](){const _0x521309=_0x579d36;this[_0x521309(0xf0)][_0x521309(0x110)](g),this[_0x521309(0xf0)]['get'](_);}},N(exports[_0x579d36(0x12e)],_0x579d36(0x15d),U),N(exports[_0x579d36(0x12e)],_0x579d36(0x154),c[_0x579d36(0x153)][_0x579d36(0x157)]),exports[_0x579d36(0x12e)]=W([c[_0x579d36(0x103)](w['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c[_0x579d36(0x12b)](c['Injector'])),O(0x2,c[_0x579d36(0x15e)])],exports[_0x579d36(0x12e)]);function _0x4aa6(){const _0x2d71f0=['get','Add','userID','_threadCommentModel','pipe','Solved','length','filter','UserManagerService','_sessionService','users','_threadCommentDataSource','5NTzrMz','createTimestamp','symbol','_config','format','Solve','getCurrentUser','COMMENT','getOwnPropertyDescriptor','rangeId','Delete','/universer-api/comment/unit/','reply','2974644qLtDnS','_initUserSync','Inject','content','commentUpdate$','UniverThreadCommentDataSourcePlugin','_configService','ref','defineProperty','solved','threadId','setConfig','Plugin','414qZReTx','/reply','50278046vnCATG','16278MeXQto','resolveComment','replyId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','12zJBquM','updateComment','bufferTime','326PdEmJw','disposeWithMe','subscribe','toStringTag','153559FWyKFc','/solved','20dUTUOX','addComment','merge','parse','stringify','comments','slice','customRanges','6717324dxiDHM','Reply','userId','syncUpdateMutationToColla','_threadCommentDataSourceService','UniverInstanceType','type','CollaborationSessionService','forEach','UNIVER_UNKNOWN','_userService','UNRECOGNIZED','/list','getMemberID','/delete','pluginName','IConfigService','getComment','thread-comment-data-source.config','ThreadCommentModel','5956379uvxpFG','user','OpenOrReOpen','CustomRangeType','onStarting','Edit','saveCommentToSnapshot','Injector','dayjs','_injector','addUser','1637092eahgcp','rangeType','dataSource','delete','getUnit','CommentService','YYYY/MM/DD\x20HH:mm','_init','replies','HTTPService','40eusHbF','values','body','requireSession','add','post','Unknown','DependentOn','_initDataSource','root','code','error','IThreadCommentDataSourceService','find','/universer-api/user/list','listComments','_httpService','resolved','map','/edit'];_0x4aa6=function(){return _0x2d71f0;};return _0x4aa6();}
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x58a68b=_0x26d7;function _0x2d31(){const _0x1441b6=['YYYY/MM/DD\x20HH:mm','9rJLwcB','/reply','resolveComment','_sessionService','personId','getOwnPropertyDescriptor','2523165UPqAFW','4pyhItl','addUser','ref','rangeType','subscribe','format','_threadCommentModel','OpenOrReOpen','length','values','type','code','/universer-api/user/list','filter','7340712XRboqF','_config','12VQvIui','parentId','listComments','post','Reply','syncUpdateMutationToColla','_injector','get','666919vMqcnm','replyId','/add','Delete','pipe','_initDataSource','1763712yuhxwL','forEach','_threadCommentDataSourceService','Solve','getUnit','/delete','map','_init','/universer-api/comment/unit/','setConfig','40826577MVizQL','/list','getCurrentUser','424eVRNXy','getUser','_commentService','updateComment','_userService','requireSession','/edit','customRanges','getMemberID','disposeWithMe','Edit','symbol','Unknown','content','users','_httpService','unitId','replies','slice','thread-comment-data-source.config','commentUpdate$','userID','stringify','184408pULYsl','COMMENT','onReady','12Mmmdmx','deleteComment','error','body','size','parse','comments','getComment','createTimestamp','UNRECOGNIZED','/solved','_initUserSync','find','user','Solved','add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','4330150umnZfM','rangeId','userId','saveCommentToSnapshot','Add','solved','_configService','threadId','dataSource','root','defineProperty'];_0x2d31=function(){return _0x1441b6;};return _0x2d31();}(function(_0x362551,_0x49e7e7){const _0x2f7fa2=_0x26d7,_0x1fe2fa=_0x362551();while(!![]){try{const _0x441201=-parseInt(_0x2f7fa2(0x102))/0x1*(parseInt(_0x2f7fa2(0xea))/0x2)+parseInt(_0x2f7fa2(0x108))/0x3+-parseInt(_0x2f7fa2(0xfa))/0x4*(parseInt(_0x2f7fa2(0x152))/0x5)+parseInt(_0x2f7fa2(0xf8))/0x6+-parseInt(_0x2f7fa2(0x12c))/0x7*(parseInt(_0x2f7fa2(0x115))/0x8)+parseInt(_0x2f7fa2(0x14c))/0x9*(-parseInt(_0x2f7fa2(0x140))/0xa)+-parseInt(_0x2f7fa2(0x112))/0xb*(-parseInt(_0x2f7fa2(0x12f))/0xc);if(_0x441201===_0x49e7e7)break;else _0x1fe2fa['push'](_0x1fe2fa['shift']());}catch(_0x2d8da3){_0x1fe2fa['push'](_0x1fe2fa['shift']());}}}(_0x2d31,0xce837));import{CommentService as _0xbeb1bb,CollaborationSessionService as _0x5276ff,UniverCollaborationClientPlugin as _0xed0bc7}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xe241d6}from'@univerjs-pro/license';import{dayjs as _0x54f05b,UserManagerService as _0x1fa2aa,Inject as _0x31afa8,Injector as _0x2e8e75,Disposable as _0x1e5fc7,CustomRangeType as _0x6d9c98,UniverInstanceType as _0x4977eb,DependentOn as _0x2b7f20,IConfigService as _0x5c4f8c,Plugin as _0x5c853b,merge as _0x5d724b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5439b7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x43de76,IThreadCommentDataSourceService as _0x2b003d}from'@univerjs/thread-comment';import{bufferTime as _0x1043f3}from'rxjs';import{HTTPService as _0x38d411}from'@univerjs/network';const W=_0x58a68b(0x13f);var I=(_0x27d0f1=>(_0x27d0f1[_0x27d0f1[_0x58a68b(0xf1)]=0x0]=_0x58a68b(0xf1),_0x27d0f1[_0x27d0f1[_0x58a68b(0x13d)]=0x1]=_0x58a68b(0x13d),_0x27d0f1[_0x27d0f1['UNRECOGNIZED']=-0x1]=_0x58a68b(0x138),_0x27d0f1))(I||{}),v=(_0x9e673a=>(_0x9e673a[_0x9e673a[_0x58a68b(0x121)]=0x0]=_0x58a68b(0x121),_0x9e673a[_0x9e673a['Add']=0x1]=_0x58a68b(0x144),_0x9e673a[_0x9e673a[_0x58a68b(0xfe)]=0x2]=_0x58a68b(0xfe),_0x9e673a[_0x9e673a[_0x58a68b(0x11f)]=0x3]=_0x58a68b(0x11f),_0x9e673a[_0x9e673a[_0x58a68b(0x105)]=0x4]=_0x58a68b(0x105),_0x9e673a[_0x9e673a['Solve']=0x5]='Solve',_0x9e673a[_0x9e673a['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x9e673a))(v||{});const y=_0x2a0e79=>_0x54f05b(new Date(+_0x2a0e79))[_0x58a68b(0xef)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x91521f,_0x4cd23c)=>{const _0x62f67e=_0x58a68b,_0xd593ef=_0x91521f[_0x62f67e(0x101)](_0x1fa2aa),_0x2a0839=_0x91521f[_0x62f67e(0x101)](_0x38d411);_0x4cd23c[_0x62f67e(0x109)](_0x1c8691=>{const _0x54b365=_0x62f67e;_0xd593ef[_0x54b365(0x116)](_0x1c8691)&&_0x4cd23c['delete'](_0x1c8691);}),_0x4cd23c[_0x62f67e(0x133)]&&(await _0x2a0839[_0x62f67e(0x101)](_0x62f67e(0xf6),{'params':{'userIDs':[..._0x4cd23c]}}))[_0x62f67e(0x132)][_0x62f67e(0x123)][_0x62f67e(0x109)](_0x25817d=>{_0x25817d&&_0xd593ef['addUser'](_0x25817d);});};var K=Object[_0x58a68b(0x151)],V=(_0xe91c30,_0x131a7f,_0x48f4ac,_0x2151ea)=>{const _0x286b9d=_0x58a68b;for(var _0x39e349=_0x2151ea>0x1?void 0x0:_0x2151ea?K(_0x131a7f,_0x48f4ac):_0x131a7f,_0x8b7a06=_0xe91c30[_0x286b9d(0xf2)]-0x1,_0x116165;_0x8b7a06>=0x0;_0x8b7a06--)(_0x116165=_0xe91c30[_0x8b7a06])&&(_0x39e349=_0x116165(_0x39e349)||_0x39e349);return _0x39e349;},p=(_0x30c89c,_0xd8e8c0)=>(_0x3e0028,_0x1890b4)=>_0xd8e8c0(_0x3e0028,_0x1890b4,_0x30c89c);let _=class extends _0x1e5fc7{constructor(_0x50597e,_0x25c679,_0x3d3c03,_0x3d0cf6){const _0x13a76=_0x58a68b;super(),this[_0x13a76(0x117)]=_0x50597e,this[_0x13a76(0xf0)]=_0x25c679,this[_0x13a76(0x119)]=_0x3d3c03,this[_0x13a76(0x100)]=_0x3d0cf6,this[_0x13a76(0x10f)](),this['_initUserSync']();}[_0x58a68b(0x13a)](){const _0x931c51=_0x58a68b;this[_0x931c51(0x11e)](this[_0x931c51(0xf0)][_0x931c51(0x129)][_0x931c51(0x106)](_0x1043f3(0x10))[_0x931c51(0xee)](_0x5307c0=>{const _0x462b60=_0x931c51,_0x6bf5cb=new Set();_0x5307c0[_0x462b60(0x109)](_0x263a05=>{const _0x1d95c5=_0x462b60;switch(_0x263a05[_0x1d95c5(0xf4)]){case'add':{const _0x1023bc=_0x263a05['payload'][_0x1d95c5(0x150)];_0x6bf5cb[_0x1d95c5(0x13e)](_0x1023bc);break;}}}),B(this[_0x462b60(0x100)],_0x6bf5cb);}));}['_init'](){const _0x48c230=_0x58a68b;this['disposeWithMe'](this['_commentService'][_0x48c230(0x129)][_0x48c230(0xee)](async _0x2e0501=>{const _0x4bec93=_0x48c230;var _0x2d9dd0,_0x1eb95a,_0xcdb3eb,_0x215dfe;const _0x2cc35a=(_0x2d9dd0=this['_threadCommentModel'][_0x4bec93(0x10c)](_0x2e0501[_0x4bec93(0x125)])[_0x4bec93(0x13b)](_0x241e74=>_0x241e74['threadId']===_0x2e0501['threadId']))==null?void 0x0:_0x2d9dd0[_0x4bec93(0x149)];if(!_0x2cc35a)return;const {unitId:_0x4f3178,subUnitId:_0x16dcfc}=_0x2cc35a;switch(_0x2e0501[_0x4bec93(0x13c)]&&this['_userService'][_0x4bec93(0xeb)](_0x2e0501[_0x4bec93(0x13c)]),_0x2e0501['type']){case v[_0x4bec93(0x144)]:break;case v[_0x4bec93(0xfe)]:{this[_0x4bec93(0xf0)]['addComment'](_0x4f3178,_0x16dcfc,{'unitId':_0x4f3178,'subUnitId':_0x16dcfc,'ref':'','id':_0x2e0501[_0x4bec93(0x103)],'dT':y(+_0x2e0501['createTimestamp']),'threadId':_0x2e0501['threadId'],'personId':(_0xcdb3eb=(_0x1eb95a=_0x2e0501['user'])==null?void 0x0:_0x1eb95a[_0x4bec93(0x12a)])!=null?_0xcdb3eb:_0x2e0501[_0x4bec93(0x142)],'text':JSON[_0x4bec93(0x134)](_0x2e0501[_0x4bec93(0x122)]),'parentId':_0x2cc35a['id']});break;}case v[_0x4bec93(0x105)]:{const _0x340683=this['_threadCommentModel'][_0x4bec93(0x136)](_0x4f3178,_0x16dcfc,_0x2e0501[_0x4bec93(0x103)]);_0x340683&&_0x340683[_0x4bec93(0xfb)]&&this[_0x4bec93(0xf0)]['deleteComment'](_0x4f3178,_0x16dcfc,_0x2e0501[_0x4bec93(0x103)]);break;}case v[_0x4bec93(0x11f)]:{this[_0x4bec93(0xf0)][_0x4bec93(0x118)](_0x4f3178,_0x16dcfc,{'commentId':_0x2e0501[_0x4bec93(0x103)],'text':JSON[_0x4bec93(0x134)](_0x2e0501[_0x4bec93(0x122)])});break;}case v[_0x4bec93(0x10b)]:{const _0x51963e=(_0x215dfe=this[_0x4bec93(0xf0)][_0x4bec93(0x10c)](_0x2e0501['unitId'])['find'](_0x7495f3=>_0x7495f3[_0x4bec93(0x147)]===_0x2e0501[_0x4bec93(0x147)]))==null?void 0x0:_0x215dfe[_0x4bec93(0x149)];_0x51963e&&this[_0x4bec93(0xf0)][_0x4bec93(0x14e)](_0x4f3178,_0x16dcfc,_0x51963e['id'],_0x2e0501[_0x4bec93(0x145)]===I[_0x4bec93(0x13d)]);break;}}}));}};function _0x26d7(_0x446de5,_0x5070cc){_0x446de5=_0x446de5-0xea;const _0x2d3140=_0x2d31();let _0x26d731=_0x2d3140[_0x446de5];return _0x26d731;}_=V([p(0x0,_0x31afa8(_0xbeb1bb)),p(0x1,_0x31afa8(_0x43de76)),p(0x2,_0x31afa8(_0x1fa2aa)),p(0x3,_0x31afa8(_0x2e8e75))],_);const z=_0x58a68b(0x128),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1748e6,_0x46fc92,_0x1bf901,_0x4bacd8)=>{const _0x4f624f=_0x58a68b;for(var _0x1d693f=_0x4bacd8>0x1?void 0x0:_0x4bacd8?k(_0x46fc92,_0x1bf901):_0x46fc92,_0x3de32d=_0x1748e6[_0x4f624f(0xf2)]-0x1,_0x68820b;_0x3de32d>=0x0;_0x3de32d--)(_0x68820b=_0x1748e6[_0x3de32d])&&(_0x1d693f=_0x68820b(_0x1d693f)||_0x1d693f);return _0x1d693f;},b=(_0x4c49d6,_0x48f644)=>(_0x32de26,_0x27e4d0)=>_0x48f644(_0x32de26,_0x27e4d0,_0x4c49d6);function X(_0x4ec965,_0x1baf93){const _0x3b6f04=_0x58a68b,_0x34f0fa=_0x4ec965[_0x3b6f04(0x126)][0x0];return{..._0x1baf93,'id':_0x34f0fa[_0x3b6f04(0x103)],'resolved':_0x4ec965[_0x3b6f04(0x145)]===0x1,'dT':y(_0x34f0fa[_0x3b6f04(0x137)]),'personId':_0x34f0fa[_0x3b6f04(0x142)],'threadId':_0x34f0fa[_0x3b6f04(0x147)]};}function ee(_0x52026f,_0x1f563d,_0x1cf0e7){const _0x295a88=_0x58a68b;var _0xca8548,_0xcfb643;if(((_0xcfb643=(_0xca8548=_0x52026f==null?void 0x0:_0x52026f[_0x295a88(0x126)])==null?void 0x0:_0xca8548[_0x295a88(0xf2)])!=null?_0xcfb643:0x0)>0x0){const _0x58d58=(_0x23eb0b,_0x106109)=>({'id':_0x23eb0b['replyId'],'threadId':_0x23eb0b[_0x295a88(0x147)],'dT':y(_0x23eb0b['createTimestamp']),'personId':_0x23eb0b[_0x295a88(0x142)],'resolved':_0x52026f[_0x295a88(0x145)]===I[_0x295a88(0x13d)],'unitId':_0x1f563d,'subUnitId':_0x1cf0e7,'text':JSON[_0x295a88(0x134)](_0x23eb0b[_0x295a88(0x122)]),'parentId':_0x106109}),_0x4d34a8=_0x58d58(_0x52026f[_0x295a88(0x126)][0x0]);return{..._0x4d34a8,'children':_0x52026f[_0x295a88(0x126)][_0x295a88(0x127)](0x1)[_0x295a88(0x10e)](_0x54dbe8=>_0x58d58(_0x54dbe8,_0x4d34a8['id']))};}return null;}let S=class{constructor(_0x4907ce,_0x57e37a,_0x482e31){const _0x3f5431=_0x58a68b;this[_0x3f5431(0x124)]=_0x4907ce,this[_0x3f5431(0x119)]=_0x57e37a,this[_0x3f5431(0x14f)]=_0x482e31;}async['addComment'](_0xb58086){const _0x246e4b=_0x58a68b;var _0x51c686,_0x5b03db;const {parentId:_0x1e43a5,unitId:_0x2478f4,text:_0x3bcff4,threadId:_0x14e78c}=_0xb58086,_0x36803d=(_0x5b03db=(_0x51c686=_0x3bcff4['customRanges'])==null?void 0x0:_0x51c686[_0x246e4b(0xf7)](_0x5d07fe=>_0x5d07fe[_0x246e4b(0xed)]===_0x6d9c98['COMMENT'])[_0x246e4b(0x10e)](_0x9d6501=>_0x9d6501[_0x246e4b(0x141)]))!=null?_0x5b03db:[],_0x356fde=JSON[_0x246e4b(0x12b)](_0x3bcff4),_0x5cf5fd=(await this['_sessionService'][_0x246e4b(0x11a)](_0x2478f4))['getMemberID']();if(_0x1e43a5){const _0x11fff2={'memberId':_0x5cf5fd,'unitId':_0x2478f4,'content':_0x356fde,'mention':_0x36803d,'threadId':_0x14e78c},_0x964969=(await this[_0x246e4b(0x124)][_0x246e4b(0xfd)](_0x246e4b(0x110)+_0x2478f4+_0x246e4b(0x14d),{'body':_0x11fff2}))[_0x246e4b(0x132)]['reply'];return{..._0xb58086,'id':_0x964969['replyId'],'dT':_0x54f05b(+_0x964969[_0x246e4b(0x137)])[_0x246e4b(0xef)](_0x246e4b(0x14b)),'personId':_0x964969[_0x246e4b(0x142)]};}else{const _0x32020c={'memberId':_0x5cf5fd,'unitId':_0x2478f4,'content':_0x356fde,'mention':_0x36803d},_0x27fdea=await this[_0x246e4b(0x124)][_0x246e4b(0xfd)](_0x246e4b(0x110)+_0x2478f4+_0x246e4b(0x104),{'body':_0x32020c});return X(_0x27fdea[_0x246e4b(0x132)]['comment'],_0xb58086);}}async[_0x58a68b(0x118)](_0x44803c){const _0x203913=_0x58a68b;var _0x216b55,_0x441829;const {text:_0x528489,unitId:_0x23689a}=_0x44803c,_0x2ca6f6=(_0x441829=(_0x216b55=_0x528489[_0x203913(0x11c)])==null?void 0x0:_0x216b55[_0x203913(0xf7)](_0x17d955=>_0x17d955['rangeType']===_0x6d9c98[_0x203913(0x12d)])[_0x203913(0x10e)](_0x3f16cb=>_0x3f16cb['rangeId']))!=null?_0x441829:[],_0x25dd1b=JSON[_0x203913(0x12b)](_0x528489),_0x2a65c8=_0x44803c['threadId'],_0x11cacb=_0x44803c['id'],_0x13d144={'memberId':(await this[_0x203913(0x14f)][_0x203913(0x11a)](_0x23689a))['getMemberID'](),'unitId':_0x23689a,'threadId':_0x2a65c8,'mention':_0x2ca6f6,'content':_0x25dd1b,'replyId':_0x11cacb},_0x24d716=await this['_httpService'][_0x203913(0xfd)](_0x203913(0x110)+_0x23689a+_0x203913(0x11b),{'body':_0x13d144});return!_0x24d716[_0x203913(0x132)][_0x203913(0x131)]||_0x24d716[_0x203913(0x132)][_0x203913(0x131)]['code']===0x1;}async['resolveComment'](_0x5083e3){const _0x476103=_0x58a68b,{unitId:_0x2119c6}=_0x5083e3,_0xabddfb=_0x5083e3[_0x476103(0x147)],_0x2fce38={'memberId':this[_0x476103(0x119)][_0x476103(0x114)]()[_0x476103(0x12a)],'unitId':_0x2119c6,'threadId':_0xabddfb,'solved':_0x5083e3['resolved']?I['Solved']:I[_0x476103(0xf1)]},_0x2bb6a9=await this['_httpService'][_0x476103(0xfd)]('/universer-api/comment/unit/'+_0x2119c6+_0x476103(0x139),{'body':_0x2fce38});return!_0x2bb6a9[_0x476103(0x132)][_0x476103(0x131)]||_0x2bb6a9[_0x476103(0x132)][_0x476103(0x131)][_0x476103(0xf5)]===0x1;}async[_0x58a68b(0x130)](_0x2a19fc,_0x280d60,_0x5ce1ca,_0xfc1e8e){const _0x47c9cc=_0x58a68b,_0x30fcb6={'memberId':(await this[_0x47c9cc(0x14f)][_0x47c9cc(0x11a)](_0x2a19fc))[_0x47c9cc(0x11d)](),'threadId':_0x5ce1ca,'replyId':_0xfc1e8e,'unitId':_0x2a19fc},_0x969f6c=await this[_0x47c9cc(0x124)][_0x47c9cc(0xfd)](_0x47c9cc(0x110)+_0x2a19fc+_0x47c9cc(0x10d),{'body':_0x30fcb6});return!_0x969f6c[_0x47c9cc(0x132)]['error']||_0x969f6c[_0x47c9cc(0x132)]['error']['code']===0x1;}async[_0x58a68b(0xfc)](_0x3bcf7f,_0x2b6708,_0x580f25){const _0x254ad1=_0x58a68b,_0x1283bc={'unitId':_0x3bcf7f,'threadId':_0x580f25},_0x233066=await this['_httpService'][_0x254ad1(0xfd)](_0x254ad1(0x110)+_0x3bcf7f+_0x254ad1(0x113),{'body':_0x1283bc}),_0x28b951=_0x580f25[_0x254ad1(0x10e)](_0x304381=>ee(_0x233066[_0x254ad1(0x132)][_0x254ad1(0x135)][_0x304381],_0x3bcf7f,_0x2b6708))[_0x254ad1(0xf7)](Boolean);return Object[_0x254ad1(0xf3)](_0x233066[_0x254ad1(0x132)]['users'])[_0x254ad1(0x109)](_0x30ffd1=>{const _0x4f32f7=_0x254ad1;this[_0x4f32f7(0x119)][_0x4f32f7(0xeb)](_0x30ffd1);}),_0x28b951;}[_0x58a68b(0x143)](_0x5b0899){const _0x364744=_0x58a68b;return{'id':_0x5b0899['id'],'threadId':_0x5b0899[_0x364744(0x147)],'ref':_0x5b0899[_0x364744(0xec)]};}};S=Q([b(0x0,_0x31afa8(_0x38d411)),b(0x1,_0x31afa8(_0x1fa2aa)),b(0x2,_0x31afa8(_0x5276ff))],S);var re=Object[_0x58a68b(0x151)],te=(_0x3e44da,_0x92b9a6,_0x2fc22e,_0x245311)=>{for(var _0x1dd1af=_0x245311>0x1?void 0x0:_0x245311?re(_0x92b9a6,_0x2fc22e):_0x92b9a6,_0x2e4f43=_0x3e44da['length']-0x1,_0x5e6338;_0x2e4f43>=0x0;_0x2e4f43--)(_0x5e6338=_0x3e44da[_0x2e4f43])&&(_0x1dd1af=_0x5e6338(_0x1dd1af)||_0x1dd1af);return _0x1dd1af;},M=(_0x20b435,_0xbce566)=>(_0x48a6c0,_0x4f42a5)=>_0xbce566(_0x48a6c0,_0x4f42a5,_0x20b435);let f=class extends _0x1e5fc7{constructor(_0x596516,_0x4ea0a0){const _0x31a8dd=_0x58a68b;super(),this[_0x31a8dd(0x10a)]=_0x596516,this['_threadCommentDataSource']=_0x4ea0a0,this[_0x31a8dd(0x107)]();}['_initDataSource'](){const _0x302966=_0x58a68b;this[_0x302966(0x10a)][_0x302966(0x148)]=this['_threadCommentDataSource'],this[_0x302966(0x10a)][_0x302966(0xff)]=!0x1;}};f=te([M(0x0,_0x2b003d),M(0x1,_0x31afa8(S))],f);var se=Object[_0x58a68b(0x14a)],oe=Object[_0x58a68b(0x151)],ne=(_0x20ebda,_0x408eec,_0x3b280c)=>_0x408eec in _0x20ebda?se(_0x20ebda,_0x408eec,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b280c}):_0x20ebda[_0x408eec]=_0x3b280c,ie=(_0x3ad2bb,_0x3c8f46,_0x3ab232,_0x15b566)=>{const _0x4cddd8=_0x58a68b;for(var _0x208e18=_0x15b566>0x1?void 0x0:_0x15b566?oe(_0x3c8f46,_0x3ab232):_0x3c8f46,_0x56097a=_0x3ad2bb[_0x4cddd8(0xf2)]-0x1,_0x149a3f;_0x56097a>=0x0;_0x56097a--)(_0x149a3f=_0x3ad2bb[_0x56097a])&&(_0x208e18=_0x149a3f(_0x208e18)||_0x208e18);return _0x208e18;},N=(_0x385973,_0x43f4c3)=>(_0x24b45f,_0x363c80)=>_0x43f4c3(_0x24b45f,_0x363c80,_0x385973),$=(_0x559c13,_0x1f8e05,_0x11dc48)=>ne(_0x559c13,typeof _0x1f8e05!=_0x58a68b(0x120)?_0x1f8e05+'':_0x1f8e05,_0x11dc48);let g=class extends _0x5c853b{constructor(_0x3a9859=O,_0x5379bf,_0x3b5b7e){const _0x3705e6=_0x58a68b;super(),this[_0x3705e6(0xf9)]=_0x3a9859,this['_injector']=_0x5379bf,this[_0x3705e6(0x146)]=_0x3b5b7e;const {..._0x4bd947}=_0x5d724b({},O,this[_0x3705e6(0xf9)]);this[_0x3705e6(0x146)][_0x3705e6(0x111)](z,_0x4bd947);}['onStarting'](){[[S],[f],[_]]['forEach'](_0x50fe06=>{const _0x448cd0=_0x26d7;this[_0x448cd0(0x100)][_0x448cd0(0x13e)](_0x50fe06);});}[_0x58a68b(0x12e)](){const _0x389f1c=_0x58a68b;this[_0x389f1c(0x100)][_0x389f1c(0x101)](f),this[_0x389f1c(0x100)][_0x389f1c(0x101)](_);}};$(g,'pluginName',W),$(g,_0x58a68b(0xf4),_0x4977eb['UNIVER_UNKNOWN']),g=ie([_0x2b7f20(_0x5439b7,_0xed0bc7,_0xe241d6),N(0x1,_0x31afa8(_0x2e8e75)),N(0x2,_0x5c4f8c)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x3cd8c3=_0x5246;(function(_0x303c41,_0x5ab185){const _0x3c7fba=_0x5246,_0x4c0178=_0x303c41();while(!![]){try{const _0x53092c=-parseInt(_0x3c7fba(0xec))/0x1*(parseInt(_0x3c7fba(0x128))/0x2)+parseInt(_0x3c7fba(0x113))/0x3+-parseInt(_0x3c7fba(0xfb))/0x4*(-parseInt(_0x3c7fba(0x115))/0x5)+-parseInt(_0x3c7fba(0x10b))/0x6*(-parseInt(_0x3c7fba(0xe3))/0x7)+parseInt(_0x3c7fba(0x102))/0x8+parseInt(_0x3c7fba(0x11c))/0x9*(parseInt(_0x3c7fba(0x13e))/0xa)+-parseInt(_0x3c7fba(0xee))/0xb;if(_0x53092c===_0x5ab185)break;else _0x4c0178['push'](_0x4c0178['shift']());}catch(_0x49af91){_0x4c0178['push'](_0x4c0178['shift']());}}}(_0xd3eb,0x6e342));import{CommentService as _0x12372b,CollaborationSessionService as _0x13af67,UniverCollaborationClientPlugin as _0xebf8a9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x27609b}from'@univerjs-pro/license';import{dayjs as _0x1bdee6,UserManagerService as _0x948e73,Inject as _0x25eae3,Injector as _0x245dbf,Disposable as _0x2250bd,CustomRangeType as _0x438108,UniverInstanceType as _0x3622ec,DependentOn as _0x4a67e7,IConfigService as _0x3d1f60,Plugin as _0x11527a,merge as _0xfb99a3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x167a39}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x25573b,IThreadCommentDataSourceService as _0x2d1481}from'@univerjs/thread-comment';import{bufferTime as _0x5b44d5}from'rxjs';import{HTTPService as _0x290f9b}from'@univerjs/network';const W=_0x3cd8c3(0x11f);var I=(_0x4343d7=>(_0x4343d7[_0x4343d7['OpenOrReOpen']=0x0]=_0x3cd8c3(0x140),_0x4343d7[_0x4343d7['Solved']=0x1]=_0x3cd8c3(0x122),_0x4343d7[_0x4343d7['UNRECOGNIZED']=-0x1]=_0x3cd8c3(0x10c),_0x4343d7))(I||{}),v=(_0x57c5df=>(_0x57c5df[_0x57c5df[_0x3cd8c3(0xe9)]=0x0]=_0x3cd8c3(0xe9),_0x57c5df[_0x57c5df[_0x3cd8c3(0x11a)]=0x1]=_0x3cd8c3(0x11a),_0x57c5df[_0x57c5df['Reply']=0x2]=_0x3cd8c3(0xf6),_0x57c5df[_0x57c5df[_0x3cd8c3(0xf1)]=0x3]=_0x3cd8c3(0xf1),_0x57c5df[_0x57c5df[_0x3cd8c3(0xeb)]=0x4]=_0x3cd8c3(0xeb),_0x57c5df[_0x57c5df['Solve']=0x5]=_0x3cd8c3(0xe6),_0x57c5df[_0x57c5df[_0x3cd8c3(0x10c)]=-0x1]=_0x3cd8c3(0x10c),_0x57c5df))(v||{});const y=_0xbaf0a7=>_0x1bdee6(new Date(+_0xbaf0a7))[_0x3cd8c3(0x144)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3bf735,_0x268c59)=>{const _0x2d1f71=_0x3cd8c3,_0x32c3f0=_0x3bf735['get'](_0x948e73),_0x5207ca=_0x3bf735[_0x2d1f71(0x11d)](_0x290f9b);_0x268c59[_0x2d1f71(0x145)](_0x31cd7b=>{const _0x469caa=_0x2d1f71;_0x32c3f0[_0x469caa(0x126)](_0x31cd7b)&&_0x268c59[_0x469caa(0x134)](_0x31cd7b);}),_0x268c59['size']&&(await _0x5207ca[_0x2d1f71(0x11d)](_0x2d1f71(0x124),{'params':{'userIDs':[..._0x268c59]}}))[_0x2d1f71(0x106)]['users'][_0x2d1f71(0x145)](_0x265ec3=>{const _0x346896=_0x2d1f71;_0x265ec3&&_0x32c3f0[_0x346896(0x137)](_0x265ec3);});};var K=Object[_0x3cd8c3(0x121)],V=(_0x8001a2,_0x42a89b,_0x3525f8,_0x4714e4)=>{const _0x4d6f24=_0x3cd8c3;for(var _0x1620bb=_0x4714e4>0x1?void 0x0:_0x4714e4?K(_0x42a89b,_0x3525f8):_0x42a89b,_0x4ff418=_0x8001a2[_0x4d6f24(0x10a)]-0x1,_0xaff0fb;_0x4ff418>=0x0;_0x4ff418--)(_0xaff0fb=_0x8001a2[_0x4ff418])&&(_0x1620bb=_0xaff0fb(_0x1620bb)||_0x1620bb);return _0x1620bb;},p=(_0x2cf1db,_0x394f2d)=>(_0x1dfb0e,_0xc385c6)=>_0x394f2d(_0x1dfb0e,_0xc385c6,_0x2cf1db);let _=class extends _0x2250bd{constructor(_0x664652,_0x1eba39,_0x364cc6,_0x5a46e6){const _0x3af1b2=_0x3cd8c3;super(),this[_0x3af1b2(0x111)]=_0x664652,this[_0x3af1b2(0xe7)]=_0x1eba39,this[_0x3af1b2(0x112)]=_0x364cc6,this['_injector']=_0x5a46e6,this[_0x3af1b2(0xea)](),this[_0x3af1b2(0x109)]();}[_0x3cd8c3(0x109)](){const _0xf568b1=_0x3cd8c3;this['disposeWithMe'](this[_0xf568b1(0xe7)][_0xf568b1(0x133)][_0xf568b1(0x103)](_0x5b44d5(0x10))[_0xf568b1(0x13d)](_0x1f84c9=>{const _0x1c7740=_0xf568b1,_0x548c18=new Set();_0x1f84c9[_0x1c7740(0x145)](_0xce5b0d=>{const _0x3eb078=_0x1c7740;switch(_0xce5b0d[_0x3eb078(0x138)]){case _0x3eb078(0x132):{const _0x3cbbd5=_0xce5b0d[_0x3eb078(0x116)][_0x3eb078(0x149)];_0x548c18[_0x3eb078(0x132)](_0x3cbbd5);break;}}}),B(this[_0x1c7740(0x139)],_0x548c18);}));}[_0x3cd8c3(0xea)](){const _0x3d9c45=_0x3cd8c3;this[_0x3d9c45(0xfa)](this[_0x3d9c45(0x111)][_0x3d9c45(0x133)][_0x3d9c45(0x13d)](async _0x49c116=>{const _0xd97adc=_0x3d9c45;var _0x1a6c15,_0x19e6f9,_0x7f824c,_0x3301c1;const _0x2889a3=(_0x1a6c15=this[_0xd97adc(0xe7)]['getUnit'](_0x49c116[_0xd97adc(0x117)])['find'](_0x36866c=>_0x36866c['threadId']===_0x49c116[_0xd97adc(0x119)]))==null?void 0x0:_0x1a6c15[_0xd97adc(0xf7)];if(!_0x2889a3)return;const {unitId:_0x870ed,subUnitId:_0x3b12ee}=_0x2889a3;switch(_0x49c116[_0xd97adc(0x10d)]&&this[_0xd97adc(0x112)][_0xd97adc(0x137)](_0x49c116[_0xd97adc(0x10d)]),_0x49c116[_0xd97adc(0x138)]){case v[_0xd97adc(0x11a)]:break;case v[_0xd97adc(0xf6)]:{this['_threadCommentModel'][_0xd97adc(0x10f)](_0x870ed,_0x3b12ee,{'unitId':_0x870ed,'subUnitId':_0x3b12ee,'ref':'','id':_0x49c116[_0xd97adc(0x13f)],'dT':y(+_0x49c116[_0xd97adc(0x13a)]),'threadId':_0x49c116[_0xd97adc(0x119)],'personId':(_0x7f824c=(_0x19e6f9=_0x49c116[_0xd97adc(0x10d)])==null?void 0x0:_0x19e6f9['userID'])!=null?_0x7f824c:_0x49c116['userId'],'text':JSON[_0xd97adc(0x148)](_0x49c116[_0xd97adc(0x125)]),'parentId':_0x2889a3['id']});break;}case v[_0xd97adc(0xeb)]:{const _0x4e455e=this[_0xd97adc(0xe7)][_0xd97adc(0x108)](_0x870ed,_0x3b12ee,_0x49c116[_0xd97adc(0x13f)]);_0x4e455e&&_0x4e455e[_0xd97adc(0x100)]&&this[_0xd97adc(0xe7)][_0xd97adc(0x110)](_0x870ed,_0x3b12ee,_0x49c116[_0xd97adc(0x13f)]);break;}case v[_0xd97adc(0xf1)]:{this[_0xd97adc(0xe7)]['updateComment'](_0x870ed,_0x3b12ee,{'commentId':_0x49c116[_0xd97adc(0x13f)],'text':JSON[_0xd97adc(0x148)](_0x49c116[_0xd97adc(0x125)])});break;}case v[_0xd97adc(0xe6)]:{const _0x20112e=(_0x3301c1=this[_0xd97adc(0xe7)][_0xd97adc(0x129)](_0x49c116['unitId'])['find'](_0x4d40c3=>_0x4d40c3[_0xd97adc(0x119)]===_0x49c116['threadId']))==null?void 0x0:_0x3301c1[_0xd97adc(0xf7)];_0x20112e&&this[_0xd97adc(0xe7)]['resolveComment'](_0x870ed,_0x3b12ee,_0x20112e['id'],_0x49c116[_0xd97adc(0x11b)]===I[_0xd97adc(0x122)]);break;}}}));}};_=V([p(0x0,_0x25eae3(_0x12372b)),p(0x1,_0x25eae3(_0x25573b)),p(0x2,_0x25eae3(_0x948e73)),p(0x3,_0x25eae3(_0x245dbf))],_);function _0x5246(_0x329e47,_0x18a5bb){_0x329e47=_0x329e47-0xe2;const _0xd3eba=_0xd3eb();let _0x52460b=_0xd3eba[_0x329e47];return _0x52460b;}const z=_0x3cd8c3(0x141),O={};var k=Object[_0x3cd8c3(0x121)],Q=(_0x546993,_0x3b008f,_0x5d2cd9,_0x3b0c37)=>{const _0x5edb3f=_0x3cd8c3;for(var _0x79483b=_0x3b0c37>0x1?void 0x0:_0x3b0c37?k(_0x3b008f,_0x5d2cd9):_0x3b008f,_0x58fad3=_0x546993[_0x5edb3f(0x10a)]-0x1,_0x534c47;_0x58fad3>=0x0;_0x58fad3--)(_0x534c47=_0x546993[_0x58fad3])&&(_0x79483b=_0x534c47(_0x79483b)||_0x79483b);return _0x79483b;},b=(_0xa55114,_0x19c916)=>(_0x2bb6d7,_0x4a650d)=>_0x19c916(_0x2bb6d7,_0x4a650d,_0xa55114);function X(_0x1dd8c2,_0x41b9c6){const _0xd7b116=_0x3cd8c3,_0x4d703c=_0x1dd8c2[_0xd7b116(0xfe)][0x0];return{..._0x41b9c6,'id':_0x4d703c[_0xd7b116(0x13f)],'resolved':_0x1dd8c2[_0xd7b116(0x11b)]===0x1,'dT':y(_0x4d703c[_0xd7b116(0x13a)]),'personId':_0x4d703c[_0xd7b116(0xf5)],'threadId':_0x4d703c[_0xd7b116(0x119)]};}function ee(_0x2c613b,_0x46cb6d,_0x3546e4){const _0x4b4906=_0x3cd8c3;var _0x491973,_0x2b84de;if(((_0x2b84de=(_0x491973=_0x2c613b==null?void 0x0:_0x2c613b[_0x4b4906(0xfe)])==null?void 0x0:_0x491973[_0x4b4906(0x10a)])!=null?_0x2b84de:0x0)>0x0){const _0x531dce=(_0x34a178,_0x40ba87)=>({'id':_0x34a178[_0x4b4906(0x13f)],'threadId':_0x34a178[_0x4b4906(0x119)],'dT':y(_0x34a178[_0x4b4906(0x13a)]),'personId':_0x34a178['userId'],'resolved':_0x2c613b[_0x4b4906(0x11b)]===I[_0x4b4906(0x122)],'unitId':_0x46cb6d,'subUnitId':_0x3546e4,'text':JSON[_0x4b4906(0x148)](_0x34a178[_0x4b4906(0x125)]),'parentId':_0x40ba87}),_0x4d8f36=_0x531dce(_0x2c613b[_0x4b4906(0xfe)][0x0]);return{..._0x4d8f36,'children':_0x2c613b['replies'][_0x4b4906(0x142)](0x1)[_0x4b4906(0xff)](_0x5a5063=>_0x531dce(_0x5a5063,_0x4d8f36['id']))};}return null;}let S=class{constructor(_0x435483,_0x551482,_0x45502d){const _0x1ef87e=_0x3cd8c3;this[_0x1ef87e(0xf3)]=_0x435483,this['_userService']=_0x551482,this[_0x1ef87e(0x11e)]=_0x45502d;}async['addComment'](_0x4c6bc6){const _0x405b9c=_0x3cd8c3;var _0x23a6e3,_0xf3bcee;const {parentId:_0x8c6f0b,unitId:_0x254788,text:_0x2e842c,threadId:_0x3981aa}=_0x4c6bc6,_0x838d6=(_0xf3bcee=(_0x23a6e3=_0x2e842c['customRanges'])==null?void 0x0:_0x23a6e3['filter'](_0x59f64b=>_0x59f64b[_0x405b9c(0x118)]===_0x438108[_0x405b9c(0x131)])[_0x405b9c(0xff)](_0x16df6c=>_0x16df6c[_0x405b9c(0xf9)]))!=null?_0xf3bcee:[],_0x4cc774=JSON['stringify'](_0x2e842c),_0xa5c1be=(await this[_0x405b9c(0x11e)][_0x405b9c(0x13b)](_0x254788))[_0x405b9c(0x10e)]();if(_0x8c6f0b){const _0x2cab31={'memberId':_0xa5c1be,'unitId':_0x254788,'content':_0x4cc774,'mention':_0x838d6,'threadId':_0x3981aa},_0xb13c66=(await this[_0x405b9c(0xf3)][_0x405b9c(0xef)](_0x405b9c(0xed)+_0x254788+_0x405b9c(0x130),{'body':_0x2cab31}))[_0x405b9c(0x106)][_0x405b9c(0x12b)];return{..._0x4c6bc6,'id':_0xb13c66['replyId'],'dT':_0x1bdee6(+_0xb13c66[_0x405b9c(0x13a)])[_0x405b9c(0x144)](_0x405b9c(0x146)),'personId':_0xb13c66[_0x405b9c(0xf5)]};}else{const _0x46c38b={'memberId':_0xa5c1be,'unitId':_0x254788,'content':_0x4cc774,'mention':_0x838d6},_0x6f9736=await this[_0x405b9c(0xf3)][_0x405b9c(0xef)](_0x405b9c(0xed)+_0x254788+_0x405b9c(0x114),{'body':_0x46c38b});return X(_0x6f9736['body']['comment'],_0x4c6bc6);}}async[_0x3cd8c3(0xf2)](_0x570f80){const _0x4aac2f=_0x3cd8c3;var _0x3f0bdd,_0x5cb2c7;const {text:_0x188382,unitId:_0x2132d0}=_0x570f80,_0x177849=(_0x5cb2c7=(_0x3f0bdd=_0x188382[_0x4aac2f(0x120)])==null?void 0x0:_0x3f0bdd[_0x4aac2f(0xfd)](_0x51a59d=>_0x51a59d[_0x4aac2f(0x118)]===_0x438108['COMMENT'])[_0x4aac2f(0xff)](_0x599114=>_0x599114['rangeId']))!=null?_0x5cb2c7:[],_0x469ce6=JSON[_0x4aac2f(0x123)](_0x188382),_0x272a73=_0x570f80['threadId'],_0x6b428b=_0x570f80['id'],_0x3a9c89={'memberId':(await this[_0x4aac2f(0x11e)][_0x4aac2f(0x13b)](_0x2132d0))[_0x4aac2f(0x10e)](),'unitId':_0x2132d0,'threadId':_0x272a73,'mention':_0x177849,'content':_0x469ce6,'replyId':_0x6b428b},_0x738c07=await this[_0x4aac2f(0xf3)][_0x4aac2f(0xef)](_0x4aac2f(0xed)+_0x2132d0+'/edit',{'body':_0x3a9c89});return!_0x738c07[_0x4aac2f(0x106)][_0x4aac2f(0x12c)]||_0x738c07[_0x4aac2f(0x106)][_0x4aac2f(0x12c)][_0x4aac2f(0xfc)]===0x1;}async[_0x3cd8c3(0x101)](_0xbc399d){const _0x391083=_0x3cd8c3,{unitId:_0x3a39c8}=_0xbc399d,_0x532295=_0xbc399d['threadId'],_0x222aa5={'memberId':this[_0x391083(0x112)][_0x391083(0x136)]()[_0x391083(0xe8)],'unitId':_0x3a39c8,'threadId':_0x532295,'solved':_0xbc399d['resolved']?I[_0x391083(0x122)]:I['OpenOrReOpen']},_0x262844=await this[_0x391083(0xf3)][_0x391083(0xef)](_0x391083(0xed)+_0x3a39c8+_0x391083(0x12e),{'body':_0x222aa5});return!_0x262844['body'][_0x391083(0x12c)]||_0x262844[_0x391083(0x106)]['error']['code']===0x1;}async[_0x3cd8c3(0x110)](_0x3ded6d,_0x89f6b6,_0x10231c,_0x1f5ee0){const _0x1e3340=_0x3cd8c3,_0x5c2ca8={'memberId':(await this[_0x1e3340(0x11e)]['requireSession'](_0x3ded6d))[_0x1e3340(0x10e)](),'threadId':_0x10231c,'replyId':_0x1f5ee0,'unitId':_0x3ded6d},_0x29f922=await this['_httpService'][_0x1e3340(0xef)]('/universer-api/comment/unit/'+_0x3ded6d+_0x1e3340(0x12f),{'body':_0x5c2ca8});return!_0x29f922['body'][_0x1e3340(0x12c)]||_0x29f922[_0x1e3340(0x106)]['error'][_0x1e3340(0xfc)]===0x1;}async[_0x3cd8c3(0x107)](_0x3f6d3b,_0x586d2c,_0x5de6ca){const _0x2745a4=_0x3cd8c3,_0x318762={'unitId':_0x3f6d3b,'threadId':_0x5de6ca},_0x124747=await this['_httpService'][_0x2745a4(0xef)](_0x2745a4(0xed)+_0x3f6d3b+_0x2745a4(0xf0),{'body':_0x318762}),_0x565892=_0x5de6ca['map'](_0x11d7cd=>ee(_0x124747['body'][_0x2745a4(0x12d)][_0x11d7cd],_0x3f6d3b,_0x586d2c))[_0x2745a4(0xfd)](Boolean);return Object[_0x2745a4(0xe5)](_0x124747[_0x2745a4(0x106)]['users'])[_0x2745a4(0x145)](_0x668c04=>{const _0x123a2f=_0x2745a4;this[_0x123a2f(0x112)][_0x123a2f(0x137)](_0x668c04);}),_0x565892;}[_0x3cd8c3(0x135)](_0x4f1e54){const _0xebaec5=_0x3cd8c3;return{'id':_0x4f1e54['id'],'threadId':_0x4f1e54['threadId'],'ref':_0x4f1e54[_0xebaec5(0x12a)]};}};S=Q([b(0x0,_0x25eae3(_0x290f9b)),b(0x1,_0x25eae3(_0x948e73)),b(0x2,_0x25eae3(_0x13af67))],S);var re=Object[_0x3cd8c3(0x121)],te=(_0x2e49b8,_0x22cc17,_0x21ff40,_0x4e8be2)=>{const _0x469c92=_0x3cd8c3;for(var _0x5b659f=_0x4e8be2>0x1?void 0x0:_0x4e8be2?re(_0x22cc17,_0x21ff40):_0x22cc17,_0x2f87d4=_0x2e49b8[_0x469c92(0x10a)]-0x1,_0x37c24f;_0x2f87d4>=0x0;_0x2f87d4--)(_0x37c24f=_0x2e49b8[_0x2f87d4])&&(_0x5b659f=_0x37c24f(_0x5b659f)||_0x5b659f);return _0x5b659f;},M=(_0x86d5f,_0x4edead)=>(_0x47073b,_0x3bbe96)=>_0x4edead(_0x47073b,_0x3bbe96,_0x86d5f);let f=class extends _0x2250bd{constructor(_0x1c7893,_0x4c7bb5){const _0xd2d9e8=_0x3cd8c3;super(),this[_0xd2d9e8(0xf8)]=_0x1c7893,this[_0xd2d9e8(0x105)]=_0x4c7bb5,this[_0xd2d9e8(0xe4)]();}['_initDataSource'](){const _0xd6b21a=_0x3cd8c3;this[_0xd6b21a(0xf8)]['dataSource']=this[_0xd6b21a(0x105)],this['_threadCommentDataSourceService'][_0xd6b21a(0x127)]=!0x1;}};f=te([M(0x0,_0x2d1481),M(0x1,_0x25eae3(S))],f);function _0xd3eb(){const _0x52cab1=['subscribe','244300ewILnb','replyId','OpenOrReOpen','thread-comment-data-source.config','slice','onReady','format','forEach','YYYY/MM/DD\x20HH:mm','defineProperty','parse','personId','UNIVER_UNKNOWN','_config','onStarting','91SWajyh','_initDataSource','values','Solve','_threadCommentModel','userID','Unknown','_init','Delete','97IDVpED','/universer-api/comment/unit/','16767102EuaCYq','post','/list','Edit','updateComment','_httpService','_configService','userId','Reply','root','_threadCommentDataSourceService','rangeId','disposeWithMe','5532lGRfIj','code','filter','replies','map','parentId','resolveComment','1919384qMOqnD','pipe','pluginName','_threadCommentDataSource','body','listComments','getComment','_initUserSync','length','17670OGMWpP','UNRECOGNIZED','user','getMemberID','addComment','deleteComment','_commentService','_userService','2036673tARMGN','/add','1510UHdoqN','payload','unitId','rangeType','threadId','Add','solved','252eRLTxr','get','_sessionService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','customRanges','getOwnPropertyDescriptor','Solved','stringify','/universer-api/user/list','content','getUser','syncUpdateMutationToColla','1714uNUbsM','getUnit','ref','reply','error','comments','/solved','/delete','/reply','COMMENT','add','commentUpdate$','delete','saveCommentToSnapshot','getCurrentUser','addUser','type','_injector','createTimestamp','requireSession','setConfig'];_0xd3eb=function(){return _0x52cab1;};return _0xd3eb();}var se=Object[_0x3cd8c3(0x147)],oe=Object[_0x3cd8c3(0x121)],ne=(_0x21232c,_0x2eb2ea,_0x3a12ba)=>_0x2eb2ea in _0x21232c?se(_0x21232c,_0x2eb2ea,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3a12ba}):_0x21232c[_0x2eb2ea]=_0x3a12ba,ie=(_0x51797e,_0x2ea2bb,_0x3cd3a0,_0x425d8d)=>{const _0x3b4a94=_0x3cd8c3;for(var _0x5e97b7=_0x425d8d>0x1?void 0x0:_0x425d8d?oe(_0x2ea2bb,_0x3cd3a0):_0x2ea2bb,_0x25ca92=_0x51797e[_0x3b4a94(0x10a)]-0x1,_0x327cb5;_0x25ca92>=0x0;_0x25ca92--)(_0x327cb5=_0x51797e[_0x25ca92])&&(_0x5e97b7=_0x327cb5(_0x5e97b7)||_0x5e97b7);return _0x5e97b7;},N=(_0x1f42f0,_0x22cda6)=>(_0x1d375b,_0x5258d2)=>_0x22cda6(_0x1d375b,_0x5258d2,_0x1f42f0),$=(_0x5567c1,_0x180cf1,_0xd130e9)=>ne(_0x5567c1,typeof _0x180cf1!='symbol'?_0x180cf1+'':_0x180cf1,_0xd130e9);let g=class extends _0x11527a{constructor(_0x1b9e80=O,_0x766dd9,_0x3561c1){const _0x12294b=_0x3cd8c3;super(),this['_config']=_0x1b9e80,this[_0x12294b(0x139)]=_0x766dd9,this[_0x12294b(0xf4)]=_0x3561c1;const {..._0x25b780}=_0xfb99a3({},O,this[_0x12294b(0x14b)]);this[_0x12294b(0xf4)][_0x12294b(0x13c)](z,_0x25b780);}[_0x3cd8c3(0xe2)](){const _0x4e82fe=_0x3cd8c3;[[S],[f],[_]][_0x4e82fe(0x145)](_0x43197d=>{const _0x3ce87a=_0x4e82fe;this[_0x3ce87a(0x139)][_0x3ce87a(0x132)](_0x43197d);});}[_0x3cd8c3(0x143)](){const _0x2cd861=_0x3cd8c3;this['_injector'][_0x2cd861(0x11d)](f),this['_injector']['get'](_);}};$(g,_0x3cd8c3(0x104),W),$(g,_0x3cd8c3(0x138),_0x3622ec[_0x3cd8c3(0x14a)]),g=ie([_0x4a67e7(_0x167a39,_0xebf8a9,_0x27609b),N(0x1,_0x25eae3(_0x245dbf)),N(0x2,_0x3d1f60)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x58a68b=_0x26d7;function _0x2d31(){const _0x1441b6=['YYYY/MM/DD\x20HH:mm','9rJLwcB','/reply','resolveComment','_sessionService','personId','getOwnPropertyDescriptor','2523165UPqAFW','4pyhItl','addUser','ref','rangeType','subscribe','format','_threadCommentModel','OpenOrReOpen','length','values','type','code','/universer-api/user/list','filter','7340712XRboqF','_config','12VQvIui','parentId','listComments','post','Reply','syncUpdateMutationToColla','_injector','get','666919vMqcnm','replyId','/add','Delete','pipe','_initDataSource','1763712yuhxwL','forEach','_threadCommentDataSourceService','Solve','getUnit','/delete','map','_init','/universer-api/comment/unit/','setConfig','40826577MVizQL','/list','getCurrentUser','424eVRNXy','getUser','_commentService','updateComment','_userService','requireSession','/edit','customRanges','getMemberID','disposeWithMe','Edit','symbol','Unknown','content','users','_httpService','unitId','replies','slice','thread-comment-data-source.config','commentUpdate$','userID','stringify','184408pULYsl','COMMENT','onReady','12Mmmdmx','deleteComment','error','body','size','parse','comments','getComment','createTimestamp','UNRECOGNIZED','/solved','_initUserSync','find','user','Solved','add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','4330150umnZfM','rangeId','userId','saveCommentToSnapshot','Add','solved','_configService','threadId','dataSource','root','defineProperty'];_0x2d31=function(){return _0x1441b6;};return _0x2d31();}(function(_0x362551,_0x49e7e7){const _0x2f7fa2=_0x26d7,_0x1fe2fa=_0x362551();while(!![]){try{const _0x441201=-parseInt(_0x2f7fa2(0x102))/0x1*(parseInt(_0x2f7fa2(0xea))/0x2)+parseInt(_0x2f7fa2(0x108))/0x3+-parseInt(_0x2f7fa2(0xfa))/0x4*(parseInt(_0x2f7fa2(0x152))/0x5)+parseInt(_0x2f7fa2(0xf8))/0x6+-parseInt(_0x2f7fa2(0x12c))/0x7*(parseInt(_0x2f7fa2(0x115))/0x8)+parseInt(_0x2f7fa2(0x14c))/0x9*(-parseInt(_0x2f7fa2(0x140))/0xa)+-parseInt(_0x2f7fa2(0x112))/0xb*(-parseInt(_0x2f7fa2(0x12f))/0xc);if(_0x441201===_0x49e7e7)break;else _0x1fe2fa['push'](_0x1fe2fa['shift']());}catch(_0x2d8da3){_0x1fe2fa['push'](_0x1fe2fa['shift']());}}}(_0x2d31,0xce837));import{CommentService as _0xbeb1bb,CollaborationSessionService as _0x5276ff,UniverCollaborationClientPlugin as _0xed0bc7}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xe241d6}from'@univerjs-pro/license';import{dayjs as _0x54f05b,UserManagerService as _0x1fa2aa,Inject as _0x31afa8,Injector as _0x2e8e75,Disposable as _0x1e5fc7,CustomRangeType as _0x6d9c98,UniverInstanceType as _0x4977eb,DependentOn as _0x2b7f20,IConfigService as _0x5c4f8c,Plugin as _0x5c853b,merge as _0x5d724b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5439b7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x43de76,IThreadCommentDataSourceService as _0x2b003d}from'@univerjs/thread-comment';import{bufferTime as _0x1043f3}from'rxjs';import{HTTPService as _0x38d411}from'@univerjs/network';const W=_0x58a68b(0x13f);var I=(_0x27d0f1=>(_0x27d0f1[_0x27d0f1[_0x58a68b(0xf1)]=0x0]=_0x58a68b(0xf1),_0x27d0f1[_0x27d0f1[_0x58a68b(0x13d)]=0x1]=_0x58a68b(0x13d),_0x27d0f1[_0x27d0f1['UNRECOGNIZED']=-0x1]=_0x58a68b(0x138),_0x27d0f1))(I||{}),v=(_0x9e673a=>(_0x9e673a[_0x9e673a[_0x58a68b(0x121)]=0x0]=_0x58a68b(0x121),_0x9e673a[_0x9e673a['Add']=0x1]=_0x58a68b(0x144),_0x9e673a[_0x9e673a[_0x58a68b(0xfe)]=0x2]=_0x58a68b(0xfe),_0x9e673a[_0x9e673a[_0x58a68b(0x11f)]=0x3]=_0x58a68b(0x11f),_0x9e673a[_0x9e673a[_0x58a68b(0x105)]=0x4]=_0x58a68b(0x105),_0x9e673a[_0x9e673a['Solve']=0x5]='Solve',_0x9e673a[_0x9e673a['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x9e673a))(v||{});const y=_0x2a0e79=>_0x54f05b(new Date(+_0x2a0e79))[_0x58a68b(0xef)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x91521f,_0x4cd23c)=>{const _0x62f67e=_0x58a68b,_0xd593ef=_0x91521f[_0x62f67e(0x101)](_0x1fa2aa),_0x2a0839=_0x91521f[_0x62f67e(0x101)](_0x38d411);_0x4cd23c[_0x62f67e(0x109)](_0x1c8691=>{const _0x54b365=_0x62f67e;_0xd593ef[_0x54b365(0x116)](_0x1c8691)&&_0x4cd23c['delete'](_0x1c8691);}),_0x4cd23c[_0x62f67e(0x133)]&&(await _0x2a0839[_0x62f67e(0x101)](_0x62f67e(0xf6),{'params':{'userIDs':[..._0x4cd23c]}}))[_0x62f67e(0x132)][_0x62f67e(0x123)][_0x62f67e(0x109)](_0x25817d=>{_0x25817d&&_0xd593ef['addUser'](_0x25817d);});};var K=Object[_0x58a68b(0x151)],V=(_0xe91c30,_0x131a7f,_0x48f4ac,_0x2151ea)=>{const _0x286b9d=_0x58a68b;for(var _0x39e349=_0x2151ea>0x1?void 0x0:_0x2151ea?K(_0x131a7f,_0x48f4ac):_0x131a7f,_0x8b7a06=_0xe91c30[_0x286b9d(0xf2)]-0x1,_0x116165;_0x8b7a06>=0x0;_0x8b7a06--)(_0x116165=_0xe91c30[_0x8b7a06])&&(_0x39e349=_0x116165(_0x39e349)||_0x39e349);return _0x39e349;},p=(_0x30c89c,_0xd8e8c0)=>(_0x3e0028,_0x1890b4)=>_0xd8e8c0(_0x3e0028,_0x1890b4,_0x30c89c);let _=class extends _0x1e5fc7{constructor(_0x50597e,_0x25c679,_0x3d3c03,_0x3d0cf6){const _0x13a76=_0x58a68b;super(),this[_0x13a76(0x117)]=_0x50597e,this[_0x13a76(0xf0)]=_0x25c679,this[_0x13a76(0x119)]=_0x3d3c03,this[_0x13a76(0x100)]=_0x3d0cf6,this[_0x13a76(0x10f)](),this['_initUserSync']();}[_0x58a68b(0x13a)](){const _0x931c51=_0x58a68b;this[_0x931c51(0x11e)](this[_0x931c51(0xf0)][_0x931c51(0x129)][_0x931c51(0x106)](_0x1043f3(0x10))[_0x931c51(0xee)](_0x5307c0=>{const _0x462b60=_0x931c51,_0x6bf5cb=new Set();_0x5307c0[_0x462b60(0x109)](_0x263a05=>{const _0x1d95c5=_0x462b60;switch(_0x263a05[_0x1d95c5(0xf4)]){case'add':{const _0x1023bc=_0x263a05['payload'][_0x1d95c5(0x150)];_0x6bf5cb[_0x1d95c5(0x13e)](_0x1023bc);break;}}}),B(this[_0x462b60(0x100)],_0x6bf5cb);}));}['_init'](){const _0x48c230=_0x58a68b;this['disposeWithMe'](this['_commentService'][_0x48c230(0x129)][_0x48c230(0xee)](async _0x2e0501=>{const _0x4bec93=_0x48c230;var _0x2d9dd0,_0x1eb95a,_0xcdb3eb,_0x215dfe;const _0x2cc35a=(_0x2d9dd0=this['_threadCommentModel'][_0x4bec93(0x10c)](_0x2e0501[_0x4bec93(0x125)])[_0x4bec93(0x13b)](_0x241e74=>_0x241e74['threadId']===_0x2e0501['threadId']))==null?void 0x0:_0x2d9dd0[_0x4bec93(0x149)];if(!_0x2cc35a)return;const {unitId:_0x4f3178,subUnitId:_0x16dcfc}=_0x2cc35a;switch(_0x2e0501[_0x4bec93(0x13c)]&&this['_userService'][_0x4bec93(0xeb)](_0x2e0501[_0x4bec93(0x13c)]),_0x2e0501['type']){case v[_0x4bec93(0x144)]:break;case v[_0x4bec93(0xfe)]:{this[_0x4bec93(0xf0)]['addComment'](_0x4f3178,_0x16dcfc,{'unitId':_0x4f3178,'subUnitId':_0x16dcfc,'ref':'','id':_0x2e0501[_0x4bec93(0x103)],'dT':y(+_0x2e0501['createTimestamp']),'threadId':_0x2e0501['threadId'],'personId':(_0xcdb3eb=(_0x1eb95a=_0x2e0501['user'])==null?void 0x0:_0x1eb95a[_0x4bec93(0x12a)])!=null?_0xcdb3eb:_0x2e0501[_0x4bec93(0x142)],'text':JSON[_0x4bec93(0x134)](_0x2e0501[_0x4bec93(0x122)]),'parentId':_0x2cc35a['id']});break;}case v[_0x4bec93(0x105)]:{const _0x340683=this['_threadCommentModel'][_0x4bec93(0x136)](_0x4f3178,_0x16dcfc,_0x2e0501[_0x4bec93(0x103)]);_0x340683&&_0x340683[_0x4bec93(0xfb)]&&this[_0x4bec93(0xf0)]['deleteComment'](_0x4f3178,_0x16dcfc,_0x2e0501[_0x4bec93(0x103)]);break;}case v[_0x4bec93(0x11f)]:{this[_0x4bec93(0xf0)][_0x4bec93(0x118)](_0x4f3178,_0x16dcfc,{'commentId':_0x2e0501[_0x4bec93(0x103)],'text':JSON[_0x4bec93(0x134)](_0x2e0501[_0x4bec93(0x122)])});break;}case v[_0x4bec93(0x10b)]:{const _0x51963e=(_0x215dfe=this[_0x4bec93(0xf0)][_0x4bec93(0x10c)](_0x2e0501['unitId'])['find'](_0x7495f3=>_0x7495f3[_0x4bec93(0x147)]===_0x2e0501[_0x4bec93(0x147)]))==null?void 0x0:_0x215dfe[_0x4bec93(0x149)];_0x51963e&&this[_0x4bec93(0xf0)][_0x4bec93(0x14e)](_0x4f3178,_0x16dcfc,_0x51963e['id'],_0x2e0501[_0x4bec93(0x145)]===I[_0x4bec93(0x13d)]);break;}}}));}};function _0x26d7(_0x446de5,_0x5070cc){_0x446de5=_0x446de5-0xea;const _0x2d3140=_0x2d31();let _0x26d731=_0x2d3140[_0x446de5];return _0x26d731;}_=V([p(0x0,_0x31afa8(_0xbeb1bb)),p(0x1,_0x31afa8(_0x43de76)),p(0x2,_0x31afa8(_0x1fa2aa)),p(0x3,_0x31afa8(_0x2e8e75))],_);const z=_0x58a68b(0x128),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1748e6,_0x46fc92,_0x1bf901,_0x4bacd8)=>{const _0x4f624f=_0x58a68b;for(var _0x1d693f=_0x4bacd8>0x1?void 0x0:_0x4bacd8?k(_0x46fc92,_0x1bf901):_0x46fc92,_0x3de32d=_0x1748e6[_0x4f624f(0xf2)]-0x1,_0x68820b;_0x3de32d>=0x0;_0x3de32d--)(_0x68820b=_0x1748e6[_0x3de32d])&&(_0x1d693f=_0x68820b(_0x1d693f)||_0x1d693f);return _0x1d693f;},b=(_0x4c49d6,_0x48f644)=>(_0x32de26,_0x27e4d0)=>_0x48f644(_0x32de26,_0x27e4d0,_0x4c49d6);function X(_0x4ec965,_0x1baf93){const _0x3b6f04=_0x58a68b,_0x34f0fa=_0x4ec965[_0x3b6f04(0x126)][0x0];return{..._0x1baf93,'id':_0x34f0fa[_0x3b6f04(0x103)],'resolved':_0x4ec965[_0x3b6f04(0x145)]===0x1,'dT':y(_0x34f0fa[_0x3b6f04(0x137)]),'personId':_0x34f0fa[_0x3b6f04(0x142)],'threadId':_0x34f0fa[_0x3b6f04(0x147)]};}function ee(_0x52026f,_0x1f563d,_0x1cf0e7){const _0x295a88=_0x58a68b;var _0xca8548,_0xcfb643;if(((_0xcfb643=(_0xca8548=_0x52026f==null?void 0x0:_0x52026f[_0x295a88(0x126)])==null?void 0x0:_0xca8548[_0x295a88(0xf2)])!=null?_0xcfb643:0x0)>0x0){const _0x58d58=(_0x23eb0b,_0x106109)=>({'id':_0x23eb0b['replyId'],'threadId':_0x23eb0b[_0x295a88(0x147)],'dT':y(_0x23eb0b['createTimestamp']),'personId':_0x23eb0b[_0x295a88(0x142)],'resolved':_0x52026f[_0x295a88(0x145)]===I[_0x295a88(0x13d)],'unitId':_0x1f563d,'subUnitId':_0x1cf0e7,'text':JSON[_0x295a88(0x134)](_0x23eb0b[_0x295a88(0x122)]),'parentId':_0x106109}),_0x4d34a8=_0x58d58(_0x52026f[_0x295a88(0x126)][0x0]);return{..._0x4d34a8,'children':_0x52026f[_0x295a88(0x126)][_0x295a88(0x127)](0x1)[_0x295a88(0x10e)](_0x54dbe8=>_0x58d58(_0x54dbe8,_0x4d34a8['id']))};}return null;}let S=class{constructor(_0x4907ce,_0x57e37a,_0x482e31){const _0x3f5431=_0x58a68b;this[_0x3f5431(0x124)]=_0x4907ce,this[_0x3f5431(0x119)]=_0x57e37a,this[_0x3f5431(0x14f)]=_0x482e31;}async['addComment'](_0xb58086){const _0x246e4b=_0x58a68b;var _0x51c686,_0x5b03db;const {parentId:_0x1e43a5,unitId:_0x2478f4,text:_0x3bcff4,threadId:_0x14e78c}=_0xb58086,_0x36803d=(_0x5b03db=(_0x51c686=_0x3bcff4['customRanges'])==null?void 0x0:_0x51c686[_0x246e4b(0xf7)](_0x5d07fe=>_0x5d07fe[_0x246e4b(0xed)]===_0x6d9c98['COMMENT'])[_0x246e4b(0x10e)](_0x9d6501=>_0x9d6501[_0x246e4b(0x141)]))!=null?_0x5b03db:[],_0x356fde=JSON[_0x246e4b(0x12b)](_0x3bcff4),_0x5cf5fd=(await this['_sessionService'][_0x246e4b(0x11a)](_0x2478f4))['getMemberID']();if(_0x1e43a5){const _0x11fff2={'memberId':_0x5cf5fd,'unitId':_0x2478f4,'content':_0x356fde,'mention':_0x36803d,'threadId':_0x14e78c},_0x964969=(await this[_0x246e4b(0x124)][_0x246e4b(0xfd)](_0x246e4b(0x110)+_0x2478f4+_0x246e4b(0x14d),{'body':_0x11fff2}))[_0x246e4b(0x132)]['reply'];return{..._0xb58086,'id':_0x964969['replyId'],'dT':_0x54f05b(+_0x964969[_0x246e4b(0x137)])[_0x246e4b(0xef)](_0x246e4b(0x14b)),'personId':_0x964969[_0x246e4b(0x142)]};}else{const _0x32020c={'memberId':_0x5cf5fd,'unitId':_0x2478f4,'content':_0x356fde,'mention':_0x36803d},_0x27fdea=await this[_0x246e4b(0x124)][_0x246e4b(0xfd)](_0x246e4b(0x110)+_0x2478f4+_0x246e4b(0x104),{'body':_0x32020c});return X(_0x27fdea[_0x246e4b(0x132)]['comment'],_0xb58086);}}async[_0x58a68b(0x118)](_0x44803c){const _0x203913=_0x58a68b;var _0x216b55,_0x441829;const {text:_0x528489,unitId:_0x23689a}=_0x44803c,_0x2ca6f6=(_0x441829=(_0x216b55=_0x528489[_0x203913(0x11c)])==null?void 0x0:_0x216b55[_0x203913(0xf7)](_0x17d955=>_0x17d955['rangeType']===_0x6d9c98[_0x203913(0x12d)])[_0x203913(0x10e)](_0x3f16cb=>_0x3f16cb['rangeId']))!=null?_0x441829:[],_0x25dd1b=JSON[_0x203913(0x12b)](_0x528489),_0x2a65c8=_0x44803c['threadId'],_0x11cacb=_0x44803c['id'],_0x13d144={'memberId':(await this[_0x203913(0x14f)][_0x203913(0x11a)](_0x23689a))['getMemberID'](),'unitId':_0x23689a,'threadId':_0x2a65c8,'mention':_0x2ca6f6,'content':_0x25dd1b,'replyId':_0x11cacb},_0x24d716=await this['_httpService'][_0x203913(0xfd)](_0x203913(0x110)+_0x23689a+_0x203913(0x11b),{'body':_0x13d144});return!_0x24d716[_0x203913(0x132)][_0x203913(0x131)]||_0x24d716[_0x203913(0x132)][_0x203913(0x131)]['code']===0x1;}async['resolveComment'](_0x5083e3){const _0x476103=_0x58a68b,{unitId:_0x2119c6}=_0x5083e3,_0xabddfb=_0x5083e3[_0x476103(0x147)],_0x2fce38={'memberId':this[_0x476103(0x119)][_0x476103(0x114)]()[_0x476103(0x12a)],'unitId':_0x2119c6,'threadId':_0xabddfb,'solved':_0x5083e3['resolved']?I['Solved']:I[_0x476103(0xf1)]},_0x2bb6a9=await this['_httpService'][_0x476103(0xfd)]('/universer-api/comment/unit/'+_0x2119c6+_0x476103(0x139),{'body':_0x2fce38});return!_0x2bb6a9[_0x476103(0x132)][_0x476103(0x131)]||_0x2bb6a9[_0x476103(0x132)][_0x476103(0x131)][_0x476103(0xf5)]===0x1;}async[_0x58a68b(0x130)](_0x2a19fc,_0x280d60,_0x5ce1ca,_0xfc1e8e){const _0x47c9cc=_0x58a68b,_0x30fcb6={'memberId':(await this[_0x47c9cc(0x14f)][_0x47c9cc(0x11a)](_0x2a19fc))[_0x47c9cc(0x11d)](),'threadId':_0x5ce1ca,'replyId':_0xfc1e8e,'unitId':_0x2a19fc},_0x969f6c=await this[_0x47c9cc(0x124)][_0x47c9cc(0xfd)](_0x47c9cc(0x110)+_0x2a19fc+_0x47c9cc(0x10d),{'body':_0x30fcb6});return!_0x969f6c[_0x47c9cc(0x132)]['error']||_0x969f6c[_0x47c9cc(0x132)]['error']['code']===0x1;}async[_0x58a68b(0xfc)](_0x3bcf7f,_0x2b6708,_0x580f25){const _0x254ad1=_0x58a68b,_0x1283bc={'unitId':_0x3bcf7f,'threadId':_0x580f25},_0x233066=await this['_httpService'][_0x254ad1(0xfd)](_0x254ad1(0x110)+_0x3bcf7f+_0x254ad1(0x113),{'body':_0x1283bc}),_0x28b951=_0x580f25[_0x254ad1(0x10e)](_0x304381=>ee(_0x233066[_0x254ad1(0x132)][_0x254ad1(0x135)][_0x304381],_0x3bcf7f,_0x2b6708))[_0x254ad1(0xf7)](Boolean);return Object[_0x254ad1(0xf3)](_0x233066[_0x254ad1(0x132)]['users'])[_0x254ad1(0x109)](_0x30ffd1=>{const _0x4f32f7=_0x254ad1;this[_0x4f32f7(0x119)][_0x4f32f7(0xeb)](_0x30ffd1);}),_0x28b951;}[_0x58a68b(0x143)](_0x5b0899){const _0x364744=_0x58a68b;return{'id':_0x5b0899['id'],'threadId':_0x5b0899[_0x364744(0x147)],'ref':_0x5b0899[_0x364744(0xec)]};}};S=Q([b(0x0,_0x31afa8(_0x38d411)),b(0x1,_0x31afa8(_0x1fa2aa)),b(0x2,_0x31afa8(_0x5276ff))],S);var re=Object[_0x58a68b(0x151)],te=(_0x3e44da,_0x92b9a6,_0x2fc22e,_0x245311)=>{for(var _0x1dd1af=_0x245311>0x1?void 0x0:_0x245311?re(_0x92b9a6,_0x2fc22e):_0x92b9a6,_0x2e4f43=_0x3e44da['length']-0x1,_0x5e6338;_0x2e4f43>=0x0;_0x2e4f43--)(_0x5e6338=_0x3e44da[_0x2e4f43])&&(_0x1dd1af=_0x5e6338(_0x1dd1af)||_0x1dd1af);return _0x1dd1af;},M=(_0x20b435,_0xbce566)=>(_0x48a6c0,_0x4f42a5)=>_0xbce566(_0x48a6c0,_0x4f42a5,_0x20b435);let f=class extends _0x1e5fc7{constructor(_0x596516,_0x4ea0a0){const _0x31a8dd=_0x58a68b;super(),this[_0x31a8dd(0x10a)]=_0x596516,this['_threadCommentDataSource']=_0x4ea0a0,this[_0x31a8dd(0x107)]();}['_initDataSource'](){const _0x302966=_0x58a68b;this[_0x302966(0x10a)][_0x302966(0x148)]=this['_threadCommentDataSource'],this[_0x302966(0x10a)][_0x302966(0xff)]=!0x1;}};f=te([M(0x0,_0x2b003d),M(0x1,_0x31afa8(S))],f);var se=Object[_0x58a68b(0x14a)],oe=Object[_0x58a68b(0x151)],ne=(_0x20ebda,_0x408eec,_0x3b280c)=>_0x408eec in _0x20ebda?se(_0x20ebda,_0x408eec,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b280c}):_0x20ebda[_0x408eec]=_0x3b280c,ie=(_0x3ad2bb,_0x3c8f46,_0x3ab232,_0x15b566)=>{const _0x4cddd8=_0x58a68b;for(var _0x208e18=_0x15b566>0x1?void 0x0:_0x15b566?oe(_0x3c8f46,_0x3ab232):_0x3c8f46,_0x56097a=_0x3ad2bb[_0x4cddd8(0xf2)]-0x1,_0x149a3f;_0x56097a>=0x0;_0x56097a--)(_0x149a3f=_0x3ad2bb[_0x56097a])&&(_0x208e18=_0x149a3f(_0x208e18)||_0x208e18);return _0x208e18;},N=(_0x385973,_0x43f4c3)=>(_0x24b45f,_0x363c80)=>_0x43f4c3(_0x24b45f,_0x363c80,_0x385973),$=(_0x559c13,_0x1f8e05,_0x11dc48)=>ne(_0x559c13,typeof _0x1f8e05!=_0x58a68b(0x120)?_0x1f8e05+'':_0x1f8e05,_0x11dc48);let g=class extends _0x5c853b{constructor(_0x3a9859=O,_0x5379bf,_0x3b5b7e){const _0x3705e6=_0x58a68b;super(),this[_0x3705e6(0xf9)]=_0x3a9859,this['_injector']=_0x5379bf,this[_0x3705e6(0x146)]=_0x3b5b7e;const {..._0x4bd947}=_0x5d724b({},O,this[_0x3705e6(0xf9)]);this[_0x3705e6(0x146)][_0x3705e6(0x111)](z,_0x4bd947);}['onStarting'](){[[S],[f],[_]]['forEach'](_0x50fe06=>{const _0x448cd0=_0x26d7;this[_0x448cd0(0x100)][_0x448cd0(0x13e)](_0x50fe06);});}[_0x58a68b(0x12e)](){const _0x389f1c=_0x58a68b;this[_0x389f1c(0x100)][_0x389f1c(0x101)](f),this[_0x389f1c(0x100)][_0x389f1c(0x101)](_);}};$(g,'pluginName',W),$(g,_0x58a68b(0xf4),_0x4977eb['UNIVER_UNKNOWN']),g=ie([_0x2b7f20(_0x5439b7,_0xed0bc7,_0xe241d6),N(0x1,_0x31afa8(_0x2e8e75)),N(0x2,_0x5c4f8c)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x3cd8c3=_0x5246;(function(_0x303c41,_0x5ab185){const _0x3c7fba=_0x5246,_0x4c0178=_0x303c41();while(!![]){try{const _0x53092c=-parseInt(_0x3c7fba(0xec))/0x1*(parseInt(_0x3c7fba(0x128))/0x2)+parseInt(_0x3c7fba(0x113))/0x3+-parseInt(_0x3c7fba(0xfb))/0x4*(-parseInt(_0x3c7fba(0x115))/0x5)+-parseInt(_0x3c7fba(0x10b))/0x6*(-parseInt(_0x3c7fba(0xe3))/0x7)+parseInt(_0x3c7fba(0x102))/0x8+parseInt(_0x3c7fba(0x11c))/0x9*(parseInt(_0x3c7fba(0x13e))/0xa)+-parseInt(_0x3c7fba(0xee))/0xb;if(_0x53092c===_0x5ab185)break;else _0x4c0178['push'](_0x4c0178['shift']());}catch(_0x49af91){_0x4c0178['push'](_0x4c0178['shift']());}}}(_0xd3eb,0x6e342));import{CommentService as _0x12372b,CollaborationSessionService as _0x13af67,UniverCollaborationClientPlugin as _0xebf8a9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x27609b}from'@univerjs-pro/license';import{dayjs as _0x1bdee6,UserManagerService as _0x948e73,Inject as _0x25eae3,Injector as _0x245dbf,Disposable as _0x2250bd,CustomRangeType as _0x438108,UniverInstanceType as _0x3622ec,DependentOn as _0x4a67e7,IConfigService as _0x3d1f60,Plugin as _0x11527a,merge as _0xfb99a3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x167a39}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x25573b,IThreadCommentDataSourceService as _0x2d1481}from'@univerjs/thread-comment';import{bufferTime as _0x5b44d5}from'rxjs';import{HTTPService as _0x290f9b}from'@univerjs/network';const W=_0x3cd8c3(0x11f);var I=(_0x4343d7=>(_0x4343d7[_0x4343d7['OpenOrReOpen']=0x0]=_0x3cd8c3(0x140),_0x4343d7[_0x4343d7['Solved']=0x1]=_0x3cd8c3(0x122),_0x4343d7[_0x4343d7['UNRECOGNIZED']=-0x1]=_0x3cd8c3(0x10c),_0x4343d7))(I||{}),v=(_0x57c5df=>(_0x57c5df[_0x57c5df[_0x3cd8c3(0xe9)]=0x0]=_0x3cd8c3(0xe9),_0x57c5df[_0x57c5df[_0x3cd8c3(0x11a)]=0x1]=_0x3cd8c3(0x11a),_0x57c5df[_0x57c5df['Reply']=0x2]=_0x3cd8c3(0xf6),_0x57c5df[_0x57c5df[_0x3cd8c3(0xf1)]=0x3]=_0x3cd8c3(0xf1),_0x57c5df[_0x57c5df[_0x3cd8c3(0xeb)]=0x4]=_0x3cd8c3(0xeb),_0x57c5df[_0x57c5df['Solve']=0x5]=_0x3cd8c3(0xe6),_0x57c5df[_0x57c5df[_0x3cd8c3(0x10c)]=-0x1]=_0x3cd8c3(0x10c),_0x57c5df))(v||{});const y=_0xbaf0a7=>_0x1bdee6(new Date(+_0xbaf0a7))[_0x3cd8c3(0x144)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3bf735,_0x268c59)=>{const _0x2d1f71=_0x3cd8c3,_0x32c3f0=_0x3bf735['get'](_0x948e73),_0x5207ca=_0x3bf735[_0x2d1f71(0x11d)](_0x290f9b);_0x268c59[_0x2d1f71(0x145)](_0x31cd7b=>{const _0x469caa=_0x2d1f71;_0x32c3f0[_0x469caa(0x126)](_0x31cd7b)&&_0x268c59[_0x469caa(0x134)](_0x31cd7b);}),_0x268c59['size']&&(await _0x5207ca[_0x2d1f71(0x11d)](_0x2d1f71(0x124),{'params':{'userIDs':[..._0x268c59]}}))[_0x2d1f71(0x106)]['users'][_0x2d1f71(0x145)](_0x265ec3=>{const _0x346896=_0x2d1f71;_0x265ec3&&_0x32c3f0[_0x346896(0x137)](_0x265ec3);});};var K=Object[_0x3cd8c3(0x121)],V=(_0x8001a2,_0x42a89b,_0x3525f8,_0x4714e4)=>{const _0x4d6f24=_0x3cd8c3;for(var _0x1620bb=_0x4714e4>0x1?void 0x0:_0x4714e4?K(_0x42a89b,_0x3525f8):_0x42a89b,_0x4ff418=_0x8001a2[_0x4d6f24(0x10a)]-0x1,_0xaff0fb;_0x4ff418>=0x0;_0x4ff418--)(_0xaff0fb=_0x8001a2[_0x4ff418])&&(_0x1620bb=_0xaff0fb(_0x1620bb)||_0x1620bb);return _0x1620bb;},p=(_0x2cf1db,_0x394f2d)=>(_0x1dfb0e,_0xc385c6)=>_0x394f2d(_0x1dfb0e,_0xc385c6,_0x2cf1db);let _=class extends _0x2250bd{constructor(_0x664652,_0x1eba39,_0x364cc6,_0x5a46e6){const _0x3af1b2=_0x3cd8c3;super(),this[_0x3af1b2(0x111)]=_0x664652,this[_0x3af1b2(0xe7)]=_0x1eba39,this[_0x3af1b2(0x112)]=_0x364cc6,this['_injector']=_0x5a46e6,this[_0x3af1b2(0xea)](),this[_0x3af1b2(0x109)]();}[_0x3cd8c3(0x109)](){const _0xf568b1=_0x3cd8c3;this['disposeWithMe'](this[_0xf568b1(0xe7)][_0xf568b1(0x133)][_0xf568b1(0x103)](_0x5b44d5(0x10))[_0xf568b1(0x13d)](_0x1f84c9=>{const _0x1c7740=_0xf568b1,_0x548c18=new Set();_0x1f84c9[_0x1c7740(0x145)](_0xce5b0d=>{const _0x3eb078=_0x1c7740;switch(_0xce5b0d[_0x3eb078(0x138)]){case _0x3eb078(0x132):{const _0x3cbbd5=_0xce5b0d[_0x3eb078(0x116)][_0x3eb078(0x149)];_0x548c18[_0x3eb078(0x132)](_0x3cbbd5);break;}}}),B(this[_0x1c7740(0x139)],_0x548c18);}));}[_0x3cd8c3(0xea)](){const _0x3d9c45=_0x3cd8c3;this[_0x3d9c45(0xfa)](this[_0x3d9c45(0x111)][_0x3d9c45(0x133)][_0x3d9c45(0x13d)](async _0x49c116=>{const _0xd97adc=_0x3d9c45;var _0x1a6c15,_0x19e6f9,_0x7f824c,_0x3301c1;const _0x2889a3=(_0x1a6c15=this[_0xd97adc(0xe7)]['getUnit'](_0x49c116[_0xd97adc(0x117)])['find'](_0x36866c=>_0x36866c['threadId']===_0x49c116[_0xd97adc(0x119)]))==null?void 0x0:_0x1a6c15[_0xd97adc(0xf7)];if(!_0x2889a3)return;const {unitId:_0x870ed,subUnitId:_0x3b12ee}=_0x2889a3;switch(_0x49c116[_0xd97adc(0x10d)]&&this[_0xd97adc(0x112)][_0xd97adc(0x137)](_0x49c116[_0xd97adc(0x10d)]),_0x49c116[_0xd97adc(0x138)]){case v[_0xd97adc(0x11a)]:break;case v[_0xd97adc(0xf6)]:{this['_threadCommentModel'][_0xd97adc(0x10f)](_0x870ed,_0x3b12ee,{'unitId':_0x870ed,'subUnitId':_0x3b12ee,'ref':'','id':_0x49c116[_0xd97adc(0x13f)],'dT':y(+_0x49c116[_0xd97adc(0x13a)]),'threadId':_0x49c116[_0xd97adc(0x119)],'personId':(_0x7f824c=(_0x19e6f9=_0x49c116[_0xd97adc(0x10d)])==null?void 0x0:_0x19e6f9['userID'])!=null?_0x7f824c:_0x49c116['userId'],'text':JSON[_0xd97adc(0x148)](_0x49c116[_0xd97adc(0x125)]),'parentId':_0x2889a3['id']});break;}case v[_0xd97adc(0xeb)]:{const _0x4e455e=this[_0xd97adc(0xe7)][_0xd97adc(0x108)](_0x870ed,_0x3b12ee,_0x49c116[_0xd97adc(0x13f)]);_0x4e455e&&_0x4e455e[_0xd97adc(0x100)]&&this[_0xd97adc(0xe7)][_0xd97adc(0x110)](_0x870ed,_0x3b12ee,_0x49c116[_0xd97adc(0x13f)]);break;}case v[_0xd97adc(0xf1)]:{this[_0xd97adc(0xe7)]['updateComment'](_0x870ed,_0x3b12ee,{'commentId':_0x49c116[_0xd97adc(0x13f)],'text':JSON[_0xd97adc(0x148)](_0x49c116[_0xd97adc(0x125)])});break;}case v[_0xd97adc(0xe6)]:{const _0x20112e=(_0x3301c1=this[_0xd97adc(0xe7)][_0xd97adc(0x129)](_0x49c116['unitId'])['find'](_0x4d40c3=>_0x4d40c3[_0xd97adc(0x119)]===_0x49c116['threadId']))==null?void 0x0:_0x3301c1[_0xd97adc(0xf7)];_0x20112e&&this[_0xd97adc(0xe7)]['resolveComment'](_0x870ed,_0x3b12ee,_0x20112e['id'],_0x49c116[_0xd97adc(0x11b)]===I[_0xd97adc(0x122)]);break;}}}));}};_=V([p(0x0,_0x25eae3(_0x12372b)),p(0x1,_0x25eae3(_0x25573b)),p(0x2,_0x25eae3(_0x948e73)),p(0x3,_0x25eae3(_0x245dbf))],_);function _0x5246(_0x329e47,_0x18a5bb){_0x329e47=_0x329e47-0xe2;const _0xd3eba=_0xd3eb();let _0x52460b=_0xd3eba[_0x329e47];return _0x52460b;}const z=_0x3cd8c3(0x141),O={};var k=Object[_0x3cd8c3(0x121)],Q=(_0x546993,_0x3b008f,_0x5d2cd9,_0x3b0c37)=>{const _0x5edb3f=_0x3cd8c3;for(var _0x79483b=_0x3b0c37>0x1?void 0x0:_0x3b0c37?k(_0x3b008f,_0x5d2cd9):_0x3b008f,_0x58fad3=_0x546993[_0x5edb3f(0x10a)]-0x1,_0x534c47;_0x58fad3>=0x0;_0x58fad3--)(_0x534c47=_0x546993[_0x58fad3])&&(_0x79483b=_0x534c47(_0x79483b)||_0x79483b);return _0x79483b;},b=(_0xa55114,_0x19c916)=>(_0x2bb6d7,_0x4a650d)=>_0x19c916(_0x2bb6d7,_0x4a650d,_0xa55114);function X(_0x1dd8c2,_0x41b9c6){const _0xd7b116=_0x3cd8c3,_0x4d703c=_0x1dd8c2[_0xd7b116(0xfe)][0x0];return{..._0x41b9c6,'id':_0x4d703c[_0xd7b116(0x13f)],'resolved':_0x1dd8c2[_0xd7b116(0x11b)]===0x1,'dT':y(_0x4d703c[_0xd7b116(0x13a)]),'personId':_0x4d703c[_0xd7b116(0xf5)],'threadId':_0x4d703c[_0xd7b116(0x119)]};}function ee(_0x2c613b,_0x46cb6d,_0x3546e4){const _0x4b4906=_0x3cd8c3;var _0x491973,_0x2b84de;if(((_0x2b84de=(_0x491973=_0x2c613b==null?void 0x0:_0x2c613b[_0x4b4906(0xfe)])==null?void 0x0:_0x491973[_0x4b4906(0x10a)])!=null?_0x2b84de:0x0)>0x0){const _0x531dce=(_0x34a178,_0x40ba87)=>({'id':_0x34a178[_0x4b4906(0x13f)],'threadId':_0x34a178[_0x4b4906(0x119)],'dT':y(_0x34a178[_0x4b4906(0x13a)]),'personId':_0x34a178['userId'],'resolved':_0x2c613b[_0x4b4906(0x11b)]===I[_0x4b4906(0x122)],'unitId':_0x46cb6d,'subUnitId':_0x3546e4,'text':JSON[_0x4b4906(0x148)](_0x34a178[_0x4b4906(0x125)]),'parentId':_0x40ba87}),_0x4d8f36=_0x531dce(_0x2c613b[_0x4b4906(0xfe)][0x0]);return{..._0x4d8f36,'children':_0x2c613b['replies'][_0x4b4906(0x142)](0x1)[_0x4b4906(0xff)](_0x5a5063=>_0x531dce(_0x5a5063,_0x4d8f36['id']))};}return null;}let S=class{constructor(_0x435483,_0x551482,_0x45502d){const _0x1ef87e=_0x3cd8c3;this[_0x1ef87e(0xf3)]=_0x435483,this['_userService']=_0x551482,this[_0x1ef87e(0x11e)]=_0x45502d;}async['addComment'](_0x4c6bc6){const _0x405b9c=_0x3cd8c3;var _0x23a6e3,_0xf3bcee;const {parentId:_0x8c6f0b,unitId:_0x254788,text:_0x2e842c,threadId:_0x3981aa}=_0x4c6bc6,_0x838d6=(_0xf3bcee=(_0x23a6e3=_0x2e842c['customRanges'])==null?void 0x0:_0x23a6e3['filter'](_0x59f64b=>_0x59f64b[_0x405b9c(0x118)]===_0x438108[_0x405b9c(0x131)])[_0x405b9c(0xff)](_0x16df6c=>_0x16df6c[_0x405b9c(0xf9)]))!=null?_0xf3bcee:[],_0x4cc774=JSON['stringify'](_0x2e842c),_0xa5c1be=(await this[_0x405b9c(0x11e)][_0x405b9c(0x13b)](_0x254788))[_0x405b9c(0x10e)]();if(_0x8c6f0b){const _0x2cab31={'memberId':_0xa5c1be,'unitId':_0x254788,'content':_0x4cc774,'mention':_0x838d6,'threadId':_0x3981aa},_0xb13c66=(await this[_0x405b9c(0xf3)][_0x405b9c(0xef)](_0x405b9c(0xed)+_0x254788+_0x405b9c(0x130),{'body':_0x2cab31}))[_0x405b9c(0x106)][_0x405b9c(0x12b)];return{..._0x4c6bc6,'id':_0xb13c66['replyId'],'dT':_0x1bdee6(+_0xb13c66[_0x405b9c(0x13a)])[_0x405b9c(0x144)](_0x405b9c(0x146)),'personId':_0xb13c66[_0x405b9c(0xf5)]};}else{const _0x46c38b={'memberId':_0xa5c1be,'unitId':_0x254788,'content':_0x4cc774,'mention':_0x838d6},_0x6f9736=await this[_0x405b9c(0xf3)][_0x405b9c(0xef)](_0x405b9c(0xed)+_0x254788+_0x405b9c(0x114),{'body':_0x46c38b});return X(_0x6f9736['body']['comment'],_0x4c6bc6);}}async[_0x3cd8c3(0xf2)](_0x570f80){const _0x4aac2f=_0x3cd8c3;var _0x3f0bdd,_0x5cb2c7;const {text:_0x188382,unitId:_0x2132d0}=_0x570f80,_0x177849=(_0x5cb2c7=(_0x3f0bdd=_0x188382[_0x4aac2f(0x120)])==null?void 0x0:_0x3f0bdd[_0x4aac2f(0xfd)](_0x51a59d=>_0x51a59d[_0x4aac2f(0x118)]===_0x438108['COMMENT'])[_0x4aac2f(0xff)](_0x599114=>_0x599114['rangeId']))!=null?_0x5cb2c7:[],_0x469ce6=JSON[_0x4aac2f(0x123)](_0x188382),_0x272a73=_0x570f80['threadId'],_0x6b428b=_0x570f80['id'],_0x3a9c89={'memberId':(await this[_0x4aac2f(0x11e)][_0x4aac2f(0x13b)](_0x2132d0))[_0x4aac2f(0x10e)](),'unitId':_0x2132d0,'threadId':_0x272a73,'mention':_0x177849,'content':_0x469ce6,'replyId':_0x6b428b},_0x738c07=await this[_0x4aac2f(0xf3)][_0x4aac2f(0xef)](_0x4aac2f(0xed)+_0x2132d0+'/edit',{'body':_0x3a9c89});return!_0x738c07[_0x4aac2f(0x106)][_0x4aac2f(0x12c)]||_0x738c07[_0x4aac2f(0x106)][_0x4aac2f(0x12c)][_0x4aac2f(0xfc)]===0x1;}async[_0x3cd8c3(0x101)](_0xbc399d){const _0x391083=_0x3cd8c3,{unitId:_0x3a39c8}=_0xbc399d,_0x532295=_0xbc399d['threadId'],_0x222aa5={'memberId':this[_0x391083(0x112)][_0x391083(0x136)]()[_0x391083(0xe8)],'unitId':_0x3a39c8,'threadId':_0x532295,'solved':_0xbc399d['resolved']?I[_0x391083(0x122)]:I['OpenOrReOpen']},_0x262844=await this[_0x391083(0xf3)][_0x391083(0xef)](_0x391083(0xed)+_0x3a39c8+_0x391083(0x12e),{'body':_0x222aa5});return!_0x262844['body'][_0x391083(0x12c)]||_0x262844[_0x391083(0x106)]['error']['code']===0x1;}async[_0x3cd8c3(0x110)](_0x3ded6d,_0x89f6b6,_0x10231c,_0x1f5ee0){const _0x1e3340=_0x3cd8c3,_0x5c2ca8={'memberId':(await this[_0x1e3340(0x11e)]['requireSession'](_0x3ded6d))[_0x1e3340(0x10e)](),'threadId':_0x10231c,'replyId':_0x1f5ee0,'unitId':_0x3ded6d},_0x29f922=await this['_httpService'][_0x1e3340(0xef)]('/universer-api/comment/unit/'+_0x3ded6d+_0x1e3340(0x12f),{'body':_0x5c2ca8});return!_0x29f922['body'][_0x1e3340(0x12c)]||_0x29f922[_0x1e3340(0x106)]['error'][_0x1e3340(0xfc)]===0x1;}async[_0x3cd8c3(0x107)](_0x3f6d3b,_0x586d2c,_0x5de6ca){const _0x2745a4=_0x3cd8c3,_0x318762={'unitId':_0x3f6d3b,'threadId':_0x5de6ca},_0x124747=await this['_httpService'][_0x2745a4(0xef)](_0x2745a4(0xed)+_0x3f6d3b+_0x2745a4(0xf0),{'body':_0x318762}),_0x565892=_0x5de6ca['map'](_0x11d7cd=>ee(_0x124747['body'][_0x2745a4(0x12d)][_0x11d7cd],_0x3f6d3b,_0x586d2c))[_0x2745a4(0xfd)](Boolean);return Object[_0x2745a4(0xe5)](_0x124747[_0x2745a4(0x106)]['users'])[_0x2745a4(0x145)](_0x668c04=>{const _0x123a2f=_0x2745a4;this[_0x123a2f(0x112)][_0x123a2f(0x137)](_0x668c04);}),_0x565892;}[_0x3cd8c3(0x135)](_0x4f1e54){const _0xebaec5=_0x3cd8c3;return{'id':_0x4f1e54['id'],'threadId':_0x4f1e54['threadId'],'ref':_0x4f1e54[_0xebaec5(0x12a)]};}};S=Q([b(0x0,_0x25eae3(_0x290f9b)),b(0x1,_0x25eae3(_0x948e73)),b(0x2,_0x25eae3(_0x13af67))],S);var re=Object[_0x3cd8c3(0x121)],te=(_0x2e49b8,_0x22cc17,_0x21ff40,_0x4e8be2)=>{const _0x469c92=_0x3cd8c3;for(var _0x5b659f=_0x4e8be2>0x1?void 0x0:_0x4e8be2?re(_0x22cc17,_0x21ff40):_0x22cc17,_0x2f87d4=_0x2e49b8[_0x469c92(0x10a)]-0x1,_0x37c24f;_0x2f87d4>=0x0;_0x2f87d4--)(_0x37c24f=_0x2e49b8[_0x2f87d4])&&(_0x5b659f=_0x37c24f(_0x5b659f)||_0x5b659f);return _0x5b659f;},M=(_0x86d5f,_0x4edead)=>(_0x47073b,_0x3bbe96)=>_0x4edead(_0x47073b,_0x3bbe96,_0x86d5f);let f=class extends _0x2250bd{constructor(_0x1c7893,_0x4c7bb5){const _0xd2d9e8=_0x3cd8c3;super(),this[_0xd2d9e8(0xf8)]=_0x1c7893,this[_0xd2d9e8(0x105)]=_0x4c7bb5,this[_0xd2d9e8(0xe4)]();}['_initDataSource'](){const _0xd6b21a=_0x3cd8c3;this[_0xd6b21a(0xf8)]['dataSource']=this[_0xd6b21a(0x105)],this['_threadCommentDataSourceService'][_0xd6b21a(0x127)]=!0x1;}};f=te([M(0x0,_0x2d1481),M(0x1,_0x25eae3(S))],f);function _0xd3eb(){const _0x52cab1=['subscribe','244300ewILnb','replyId','OpenOrReOpen','thread-comment-data-source.config','slice','onReady','format','forEach','YYYY/MM/DD\x20HH:mm','defineProperty','parse','personId','UNIVER_UNKNOWN','_config','onStarting','91SWajyh','_initDataSource','values','Solve','_threadCommentModel','userID','Unknown','_init','Delete','97IDVpED','/universer-api/comment/unit/','16767102EuaCYq','post','/list','Edit','updateComment','_httpService','_configService','userId','Reply','root','_threadCommentDataSourceService','rangeId','disposeWithMe','5532lGRfIj','code','filter','replies','map','parentId','resolveComment','1919384qMOqnD','pipe','pluginName','_threadCommentDataSource','body','listComments','getComment','_initUserSync','length','17670OGMWpP','UNRECOGNIZED','user','getMemberID','addComment','deleteComment','_commentService','_userService','2036673tARMGN','/add','1510UHdoqN','payload','unitId','rangeType','threadId','Add','solved','252eRLTxr','get','_sessionService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','customRanges','getOwnPropertyDescriptor','Solved','stringify','/universer-api/user/list','content','getUser','syncUpdateMutationToColla','1714uNUbsM','getUnit','ref','reply','error','comments','/solved','/delete','/reply','COMMENT','add','commentUpdate$','delete','saveCommentToSnapshot','getCurrentUser','addUser','type','_injector','createTimestamp','requireSession','setConfig'];_0xd3eb=function(){return _0x52cab1;};return _0xd3eb();}var se=Object[_0x3cd8c3(0x147)],oe=Object[_0x3cd8c3(0x121)],ne=(_0x21232c,_0x2eb2ea,_0x3a12ba)=>_0x2eb2ea in _0x21232c?se(_0x21232c,_0x2eb2ea,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3a12ba}):_0x21232c[_0x2eb2ea]=_0x3a12ba,ie=(_0x51797e,_0x2ea2bb,_0x3cd3a0,_0x425d8d)=>{const _0x3b4a94=_0x3cd8c3;for(var _0x5e97b7=_0x425d8d>0x1?void 0x0:_0x425d8d?oe(_0x2ea2bb,_0x3cd3a0):_0x2ea2bb,_0x25ca92=_0x51797e[_0x3b4a94(0x10a)]-0x1,_0x327cb5;_0x25ca92>=0x0;_0x25ca92--)(_0x327cb5=_0x51797e[_0x25ca92])&&(_0x5e97b7=_0x327cb5(_0x5e97b7)||_0x5e97b7);return _0x5e97b7;},N=(_0x1f42f0,_0x22cda6)=>(_0x1d375b,_0x5258d2)=>_0x22cda6(_0x1d375b,_0x5258d2,_0x1f42f0),$=(_0x5567c1,_0x180cf1,_0xd130e9)=>ne(_0x5567c1,typeof _0x180cf1!='symbol'?_0x180cf1+'':_0x180cf1,_0xd130e9);let g=class extends _0x11527a{constructor(_0x1b9e80=O,_0x766dd9,_0x3561c1){const _0x12294b=_0x3cd8c3;super(),this['_config']=_0x1b9e80,this[_0x12294b(0x139)]=_0x766dd9,this[_0x12294b(0xf4)]=_0x3561c1;const {..._0x25b780}=_0xfb99a3({},O,this[_0x12294b(0x14b)]);this[_0x12294b(0xf4)][_0x12294b(0x13c)](z,_0x25b780);}[_0x3cd8c3(0xe2)](){const _0x4e82fe=_0x3cd8c3;[[S],[f],[_]][_0x4e82fe(0x145)](_0x43197d=>{const _0x3ce87a=_0x4e82fe;this[_0x3ce87a(0x139)][_0x3ce87a(0x132)](_0x43197d);});}[_0x3cd8c3(0x143)](){const _0x2cd861=_0x3cd8c3;this['_injector'][_0x2cd861(0x11d)](f),this['_injector']['get'](_);}};$(g,_0x3cd8c3(0x104),W),$(g,_0x3cd8c3(0x138),_0x3622ec[_0x3cd8c3(0x14a)]),g=ie([_0x4a67e7(_0x167a39,_0xebf8a9,_0x27609b),N(0x1,_0x25eae3(_0x245dbf)),N(0x2,_0x3d1f60)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x425f(_0x143c94,_0x34679b){_0x143c94=_0x143c94-0xa8;const _0x2ff018=_0x2ff0();let _0x425fd6=_0x2ff018[_0x143c94];return _0x425fd6;}(function(_0x4909ec,_0x43e010){const _0x4d9896=_0x425f,_0x4e713f=_0x4909ec();while(!![]){try{const _0x3d49a4=parseInt(_0x4d9896(0x115))/0x1*(parseInt(_0x4d9896(0xed))/0x2)+-parseInt(_0x4d9896(0xe6))/0x3+parseInt(_0x4d9896(0xcf))/0x4+parseInt(_0x4d9896(0x111))/0x5*(parseInt(_0x4d9896(0x10c))/0x6)+parseInt(_0x4d9896(0x11d))/0x7*(parseInt(_0x4d9896(0xb0))/0x8)+parseInt(_0x4d9896(0xf3))/0x9*(-parseInt(_0x4d9896(0xb3))/0xa)+-parseInt(_0x4d9896(0x10a))/0xb*(parseInt(_0x4d9896(0xbd))/0xc);if(_0x3d49a4===_0x43e010)break;else _0x4e713f['push'](_0x4e713f['shift']());}catch(_0x25f694){_0x4e713f['push'](_0x4e713f['shift']());}}}(_0x2ff0,0xba423),function(_0x58dd86,_0x583295){const _0xac90fc=_0x425f;typeof exports==_0xac90fc(0xd3)&&typeof module<'u'?_0x583295(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0xac90fc(0xb2)&&define[_0xac90fc(0xdb)]?define(['exports',_0xac90fc(0xd5),_0xac90fc(0x12a),_0xac90fc(0xcb),'@univerjs/thread-comment-ui',_0xac90fc(0xa9),'rxjs',_0xac90fc(0xca)],_0x583295):(_0x58dd86=typeof globalThis<'u'?globalThis:_0x58dd86||self,_0x583295(_0x58dd86[_0xac90fc(0xc9)]={},_0x58dd86['UniverProCollaborationClient'],_0x58dd86[_0xac90fc(0xab)],_0x58dd86[_0xac90fc(0x10b)],_0x58dd86['UniverThreadCommentUi'],_0x58dd86[_0xac90fc(0xf4)],_0x58dd86[_0xac90fc(0xc3)],_0x58dd86[_0xac90fc(0xd4)]));}(this,function(_0x27d8d1,_0x31a3d9,_0x3c44df,_0x47cd9e,_0x4c82fd,_0x44534f,_0x263ea1,_0x399bbd){'use strict';const _0x4e3fb3=_0x425f;const _0x19e2bb='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x5f1f35=(_0x3760ec=>(_0x3760ec[_0x3760ec[_0x4e3fb3(0x109)]=0x0]=_0x4e3fb3(0x109),_0x3760ec[_0x3760ec[_0x4e3fb3(0x10d)]=0x1]=_0x4e3fb3(0x10d),_0x3760ec[_0x3760ec[_0x4e3fb3(0xd6)]=-0x1]=_0x4e3fb3(0xd6),_0x3760ec))(_0x5f1f35||{}),_0x5472e5=(_0x176c68=>(_0x176c68[_0x176c68[_0x4e3fb3(0xc4)]=0x0]=_0x4e3fb3(0xc4),_0x176c68[_0x176c68['Add']=0x1]=_0x4e3fb3(0x12e),_0x176c68[_0x176c68[_0x4e3fb3(0xc8)]=0x2]=_0x4e3fb3(0xc8),_0x176c68[_0x176c68[_0x4e3fb3(0x107)]=0x3]=_0x4e3fb3(0x107),_0x176c68[_0x176c68[_0x4e3fb3(0x106)]=0x4]='Delete',_0x176c68[_0x176c68[_0x4e3fb3(0x113)]=0x5]='Solve',_0x176c68[_0x176c68[_0x4e3fb3(0xd6)]=-0x1]=_0x4e3fb3(0xd6),_0x176c68))(_0x5472e5||{});const _0x192db0=_0x7e2b09=>_0x47cd9e['dayjs'](new Date(+_0x7e2b09))[_0x4e3fb3(0xac)](_0x4e3fb3(0x129)),_0x588165=async(_0x7c3654,_0x307b5b)=>{const _0x1996a1=_0x4e3fb3,_0x4b7ec7=_0x7c3654[_0x1996a1(0x12d)](_0x47cd9e[_0x1996a1(0xd9)]),_0x46de10=_0x7c3654[_0x1996a1(0x12d)](_0x399bbd[_0x1996a1(0xce)]);_0x307b5b[_0x1996a1(0x108)](_0x5e4de3=>{const _0x254c07=_0x1996a1;_0x4b7ec7[_0x254c07(0xf1)](_0x5e4de3)&&_0x307b5b[_0x254c07(0x10e)](_0x5e4de3);}),_0x307b5b['size']&&(await _0x46de10[_0x1996a1(0x12d)](_0x1996a1(0x105),{'params':{'userIDs':[..._0x307b5b]}}))[_0x1996a1(0x114)]['users'][_0x1996a1(0x108)](_0x385bc2=>{_0x385bc2&&_0x4b7ec7['addUser'](_0x385bc2);});};var _0x2838fa=Object[_0x4e3fb3(0x103)],_0x110754=(_0xfdc2b9,_0xff6371,_0x328ebc,_0x305e38)=>{for(var _0x5ac48f=_0x305e38>0x1?void 0x0:_0x305e38?_0x2838fa(_0xff6371,_0x328ebc):_0xff6371,_0x39c665=_0xfdc2b9['length']-0x1,_0x2f0d4f;_0x39c665>=0x0;_0x39c665--)(_0x2f0d4f=_0xfdc2b9[_0x39c665])&&(_0x5ac48f=_0x2f0d4f(_0x5ac48f)||_0x5ac48f);return _0x5ac48f;},_0x5ebf2c=(_0x5bd804,_0x1bed90)=>(_0x5e2bf1,_0xa0f230)=>_0x1bed90(_0x5e2bf1,_0xa0f230,_0x5bd804);let _0x5dbcc8=class extends _0x47cd9e[_0x4e3fb3(0x117)]{constructor(_0x131956,_0x59215c,_0x58e52d,_0x7e8a7f){const _0x37a704=_0x4e3fb3;super(),this[_0x37a704(0xf7)]=_0x131956,this[_0x37a704(0xaf)]=_0x59215c,this[_0x37a704(0xd0)]=_0x58e52d,this[_0x37a704(0x11f)]=_0x7e8a7f,this[_0x37a704(0xf5)](),this[_0x37a704(0xe5)]();}[_0x4e3fb3(0xe5)](){const _0x458a53=_0x4e3fb3;this[_0x458a53(0xdf)](this['_threadCommentModel'][_0x458a53(0xfc)]['pipe'](_0x263ea1[_0x458a53(0xf8)](0x10))[_0x458a53(0x126)](_0x1b0ea5=>{const _0x319732=_0x458a53,_0x20fb67=new Set();_0x1b0ea5['forEach'](_0x52b9a6=>{const _0x2a493f=_0x425f;switch(_0x52b9a6[_0x2a493f(0xcc)]){case _0x2a493f(0x11e):{const _0x11e3c4=_0x52b9a6[_0x2a493f(0xeb)]['personId'];_0x20fb67[_0x2a493f(0x11e)](_0x11e3c4);break;}}}),_0x588165(this[_0x319732(0x11f)],_0x20fb67);}));}[_0x4e3fb3(0xf5)](){const _0x464834=_0x4e3fb3;this['disposeWithMe'](this['_commentService']['commentUpdate$'][_0x464834(0x126)](async _0x301413=>{const _0xa13fa7=_0x464834;var _0x5466ca,_0x2ee4cb,_0x137c6a,_0x154aa2;const _0x472cbe=(_0x5466ca=this[_0xa13fa7(0xaf)][_0xa13fa7(0xc7)](_0x301413['unitId'])['find'](_0x2230be=>_0x2230be[_0xa13fa7(0xfe)]===_0x301413[_0xa13fa7(0xfe)]))==null?void 0x0:_0x5466ca[_0xa13fa7(0xad)];if(!_0x472cbe)return;const {unitId:_0x7ed7b1,subUnitId:_0x3bfde2}=_0x472cbe;switch(_0x301413[_0xa13fa7(0xdd)]&&this['_userService'][_0xa13fa7(0xc6)](_0x301413[_0xa13fa7(0xdd)]),_0x301413[_0xa13fa7(0xcc)]){case _0x5472e5[_0xa13fa7(0x12e)]:break;case _0x5472e5[_0xa13fa7(0xc8)]:{this[_0xa13fa7(0xaf)]['addComment'](_0x7ed7b1,_0x3bfde2,{'unitId':_0x7ed7b1,'subUnitId':_0x3bfde2,'ref':'','id':_0x301413[_0xa13fa7(0xd7)],'dT':_0x192db0(+_0x301413[_0xa13fa7(0xe7)]),'threadId':_0x301413['threadId'],'personId':(_0x137c6a=(_0x2ee4cb=_0x301413['user'])==null?void 0x0:_0x2ee4cb[_0xa13fa7(0xe0)])!=null?_0x137c6a:_0x301413[_0xa13fa7(0xcd)],'text':JSON['parse'](_0x301413[_0xa13fa7(0x128)]),'parentId':_0x472cbe['id']});break;}case _0x5472e5[_0xa13fa7(0x106)]:{const _0x570fea=this[_0xa13fa7(0xaf)]['getComment'](_0x7ed7b1,_0x3bfde2,_0x301413['replyId']);_0x570fea&&_0x570fea['parentId']&&this['_threadCommentModel'][_0xa13fa7(0xba)](_0x7ed7b1,_0x3bfde2,_0x301413[_0xa13fa7(0xd7)]);break;}case _0x5472e5[_0xa13fa7(0x107)]:{this['_threadCommentModel'][_0xa13fa7(0xb9)](_0x7ed7b1,_0x3bfde2,{'commentId':_0x301413[_0xa13fa7(0xd7)],'text':JSON[_0xa13fa7(0x124)](_0x301413[_0xa13fa7(0x128)])});break;}case _0x5472e5[_0xa13fa7(0x113)]:{const _0x2a8c26=(_0x154aa2=this[_0xa13fa7(0xaf)]['getUnit'](_0x301413[_0xa13fa7(0xc2)])[_0xa13fa7(0x11b)](_0x474369=>_0x474369[_0xa13fa7(0xfe)]===_0x301413[_0xa13fa7(0xfe)]))==null?void 0x0:_0x154aa2[_0xa13fa7(0xad)];_0x2a8c26&&this['_threadCommentModel'][_0xa13fa7(0x119)](_0x7ed7b1,_0x3bfde2,_0x2a8c26['id'],_0x301413['solved']===_0x5f1f35[_0xa13fa7(0x10d)]);break;}}}));}};_0x5dbcc8=_0x110754([_0x5ebf2c(0x0,_0x47cd9e['Inject'](_0x31a3d9[_0x4e3fb3(0xd8)])),_0x5ebf2c(0x1,_0x47cd9e[_0x4e3fb3(0x12f)](_0x44534f[_0x4e3fb3(0x11a)])),_0x5ebf2c(0x2,_0x47cd9e[_0x4e3fb3(0x12f)](_0x47cd9e[_0x4e3fb3(0xd9)])),_0x5ebf2c(0x3,_0x47cd9e[_0x4e3fb3(0x12f)](_0x47cd9e[_0x4e3fb3(0xb5)]))],_0x5dbcc8);const _0x11a51f=_0x4e3fb3(0xf2),_0x14681b={};var _0x14125d=Object[_0x4e3fb3(0x103)],_0x80ae84=(_0x55b7da,_0xa89e57,_0x1ab396,_0x12c346)=>{const _0x587a4b=_0x4e3fb3;for(var _0x3c902a=_0x12c346>0x1?void 0x0:_0x12c346?_0x14125d(_0xa89e57,_0x1ab396):_0xa89e57,_0x476935=_0x55b7da[_0x587a4b(0xd1)]-0x1,_0x54107c;_0x476935>=0x0;_0x476935--)(_0x54107c=_0x55b7da[_0x476935])&&(_0x3c902a=_0x54107c(_0x3c902a)||_0x3c902a);return _0x3c902a;},_0x1b35d4=(_0x4df329,_0x599a98)=>(_0x1f0129,_0x3a9835)=>_0x599a98(_0x1f0129,_0x3a9835,_0x4df329);function _0x32cfc8(_0x4ce2fa,_0x27a83d){const _0x24d8e6=_0x4e3fb3,_0x79008f=_0x4ce2fa['replies'][0x0];return{..._0x27a83d,'id':_0x79008f[_0x24d8e6(0xd7)],'resolved':_0x4ce2fa[_0x24d8e6(0xda)]===0x1,'dT':_0x192db0(_0x79008f[_0x24d8e6(0xe7)]),'personId':_0x79008f[_0x24d8e6(0xcd)],'threadId':_0x79008f['threadId']};}function _0x339409(_0x1087e8,_0x43ed9e,_0xa21e51){const _0x17c26d=_0x4e3fb3;var _0x369bee,_0xfdb21c;if(((_0xfdb21c=(_0x369bee=_0x1087e8==null?void 0x0:_0x1087e8[_0x17c26d(0x102)])==null?void 0x0:_0x369bee[_0x17c26d(0xd1)])!=null?_0xfdb21c:0x0)>0x0){const _0x871d28=(_0xbfe1ff,_0x16a519)=>({'id':_0xbfe1ff['replyId'],'threadId':_0xbfe1ff['threadId'],'dT':_0x192db0(_0xbfe1ff[_0x17c26d(0xe7)]),'personId':_0xbfe1ff['userId'],'resolved':_0x1087e8[_0x17c26d(0xda)]===_0x5f1f35[_0x17c26d(0x10d)],'unitId':_0x43ed9e,'subUnitId':_0xa21e51,'text':JSON['parse'](_0xbfe1ff['content']),'parentId':_0x16a519}),_0x4e5e27=_0x871d28(_0x1087e8[_0x17c26d(0x102)][0x0]);return{..._0x4e5e27,'children':_0x1087e8[_0x17c26d(0x102)][_0x17c26d(0x133)](0x1)[_0x17c26d(0xea)](_0x846b26=>_0x871d28(_0x846b26,_0x4e5e27['id']))};}return null;}let _0x51ecb8=class{constructor(_0x1a3576,_0x18549,_0x495230){const _0x3e08b2=_0x4e3fb3;this[_0x3e08b2(0xb8)]=_0x1a3576,this[_0x3e08b2(0xd0)]=_0x18549,this[_0x3e08b2(0xfb)]=_0x495230;}async[_0x4e3fb3(0xdc)](_0x18b685){const _0x407fc8=_0x4e3fb3;var _0x60d630,_0xb93cb5;const {parentId:_0x542535,unitId:_0x456bf9,text:_0x167ffb,threadId:_0x3a4bf7}=_0x18b685,_0x118419=(_0xb93cb5=(_0x60d630=_0x167ffb[_0x407fc8(0x121)])==null?void 0x0:_0x60d630[_0x407fc8(0xae)](_0x1195b3=>_0x1195b3[_0x407fc8(0xf6)]===_0x47cd9e['CustomRangeType']['COMMENT'])['map'](_0x19d91f=>_0x19d91f['rangeId']))!=null?_0xb93cb5:[],_0xec673f=JSON[_0x407fc8(0x120)](_0x167ffb),_0x52b3eb=(await this[_0x407fc8(0xfb)]['requireSession'](_0x456bf9))[_0x407fc8(0xe9)]();if(_0x542535){const _0x5ebe2f={'memberId':_0x52b3eb,'unitId':_0x456bf9,'content':_0xec673f,'mention':_0x118419,'threadId':_0x3a4bf7},_0x17b9ff=(await this['_httpService']['post'](_0x407fc8(0xbc)+_0x456bf9+_0x407fc8(0xef),{'body':_0x5ebe2f}))[_0x407fc8(0x114)][_0x407fc8(0xb7)];return{..._0x18b685,'id':_0x17b9ff[_0x407fc8(0xd7)],'dT':_0x47cd9e[_0x407fc8(0xa8)](+_0x17b9ff[_0x407fc8(0xe7)])[_0x407fc8(0xac)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x17b9ff[_0x407fc8(0xcd)]};}else{const _0x548ad5={'memberId':_0x52b3eb,'unitId':_0x456bf9,'content':_0xec673f,'mention':_0x118419},_0x4fe6a1=await this[_0x407fc8(0xb8)][_0x407fc8(0xc5)](_0x407fc8(0xbc)+_0x456bf9+'/add',{'body':_0x548ad5});return _0x32cfc8(_0x4fe6a1['body'][_0x407fc8(0xc1)],_0x18b685);}}async[_0x4e3fb3(0xb9)](_0x2f91ee){const _0x8d467a=_0x4e3fb3;var _0x598b6b,_0x181507;const {text:_0x3ae11a,unitId:_0x114ee9}=_0x2f91ee,_0xb78e36=(_0x181507=(_0x598b6b=_0x3ae11a[_0x8d467a(0x121)])==null?void 0x0:_0x598b6b[_0x8d467a(0xae)](_0x553f68=>_0x553f68[_0x8d467a(0xf6)]===_0x47cd9e[_0x8d467a(0xe4)]['COMMENT'])['map'](_0x504b28=>_0x504b28[_0x8d467a(0x100)]))!=null?_0x181507:[],_0x3ca393=JSON[_0x8d467a(0x120)](_0x3ae11a),_0x3825db=_0x2f91ee[_0x8d467a(0xfe)],_0x19f538=_0x2f91ee['id'],_0x186b33={'memberId':(await this[_0x8d467a(0xfb)][_0x8d467a(0xff)](_0x114ee9))[_0x8d467a(0xe9)](),'unitId':_0x114ee9,'threadId':_0x3825db,'mention':_0xb78e36,'content':_0x3ca393,'replyId':_0x19f538},_0x6b03f5=await this[_0x8d467a(0xb8)][_0x8d467a(0xc5)](_0x8d467a(0xbc)+_0x114ee9+_0x8d467a(0xbe),{'body':_0x186b33});return!_0x6b03f5[_0x8d467a(0x114)][_0x8d467a(0x12c)]||_0x6b03f5['body'][_0x8d467a(0x12c)][_0x8d467a(0xb4)]===0x1;}async[_0x4e3fb3(0x119)](_0x2b4ed2){const _0x3d59ba=_0x4e3fb3,{unitId:_0x3eb34b}=_0x2b4ed2,_0x309e0e=_0x2b4ed2[_0x3d59ba(0xfe)],_0x2177c0={'memberId':this['_userService'][_0x3d59ba(0x10f)]()[_0x3d59ba(0xe0)],'unitId':_0x3eb34b,'threadId':_0x309e0e,'solved':_0x2b4ed2[_0x3d59ba(0x12b)]?_0x5f1f35[_0x3d59ba(0x10d)]:_0x5f1f35[_0x3d59ba(0x109)]},_0x2f5a1c=await this[_0x3d59ba(0xb8)]['post'](_0x3d59ba(0xbc)+_0x3eb34b+_0x3d59ba(0x112),{'body':_0x2177c0});return!_0x2f5a1c['body'][_0x3d59ba(0x12c)]||_0x2f5a1c[_0x3d59ba(0x114)][_0x3d59ba(0x12c)][_0x3d59ba(0xb4)]===0x1;}async[_0x4e3fb3(0xba)](_0x3c5d95,_0x1d6bfe,_0xd521b3,_0x3577ae){const _0x26ed58=_0x4e3fb3,_0x25e09b={'memberId':(await this['_sessionService'][_0x26ed58(0xff)](_0x3c5d95))[_0x26ed58(0xe9)](),'threadId':_0xd521b3,'replyId':_0x3577ae,'unitId':_0x3c5d95},_0x43de61=await this[_0x26ed58(0xb8)][_0x26ed58(0xc5)](_0x26ed58(0xbc)+_0x3c5d95+'/delete',{'body':_0x25e09b});return!_0x43de61['body'][_0x26ed58(0x12c)]||_0x43de61[_0x26ed58(0x114)][_0x26ed58(0x12c)][_0x26ed58(0xb4)]===0x1;}async[_0x4e3fb3(0x127)](_0x1f9271,_0x1d0b71,_0x5ecea5){const _0x387582=_0x4e3fb3,_0x1bf95e={'unitId':_0x1f9271,'threadId':_0x5ecea5},_0x4482b4=await this[_0x387582(0xb8)][_0x387582(0xc5)](_0x387582(0xbc)+_0x1f9271+_0x387582(0xe1),{'body':_0x1bf95e}),_0xc369d5=_0x5ecea5[_0x387582(0xea)](_0x1ad42f=>_0x339409(_0x4482b4[_0x387582(0x114)][_0x387582(0xf9)][_0x1ad42f],_0x1f9271,_0x1d0b71))[_0x387582(0xae)](Boolean);return Object[_0x387582(0x116)](_0x4482b4[_0x387582(0x114)][_0x387582(0xf0)])[_0x387582(0x108)](_0x30c265=>{const _0x57de50=_0x387582;this[_0x57de50(0xd0)][_0x57de50(0xc6)](_0x30c265);}),_0xc369d5;}[_0x4e3fb3(0xe3)](_0x228c02){const _0x221a97=_0x4e3fb3;return{'id':_0x228c02['id'],'threadId':_0x228c02[_0x221a97(0xfe)],'ref':_0x228c02[_0x221a97(0x118)]};}};_0x51ecb8=_0x80ae84([_0x1b35d4(0x0,_0x47cd9e[_0x4e3fb3(0x12f)](_0x399bbd[_0x4e3fb3(0xce)])),_0x1b35d4(0x1,_0x47cd9e['Inject'](_0x47cd9e[_0x4e3fb3(0xd9)])),_0x1b35d4(0x2,_0x47cd9e[_0x4e3fb3(0x12f)](_0x31a3d9[_0x4e3fb3(0xbb)]))],_0x51ecb8);var _0x3de3d0=Object['getOwnPropertyDescriptor'],_0x55c015=(_0x5ed6fd,_0xffb3eb,_0x399577,_0x25b62e)=>{const _0x55df23=_0x4e3fb3;for(var _0xffc9b4=_0x25b62e>0x1?void 0x0:_0x25b62e?_0x3de3d0(_0xffb3eb,_0x399577):_0xffb3eb,_0x2ce5db=_0x5ed6fd[_0x55df23(0xd1)]-0x1,_0x10bc7d;_0x2ce5db>=0x0;_0x2ce5db--)(_0x10bc7d=_0x5ed6fd[_0x2ce5db])&&(_0xffc9b4=_0x10bc7d(_0xffc9b4)||_0xffc9b4);return _0xffc9b4;},_0x1ab65f=(_0x3ee0c3,_0x299098)=>(_0x2f019e,_0x373a0a)=>_0x299098(_0x2f019e,_0x373a0a,_0x3ee0c3);let _0x21af2b=class extends _0x47cd9e[_0x4e3fb3(0x117)]{constructor(_0xb07193,_0x352fc5){const _0x2024c1=_0x4e3fb3;super(),this['_threadCommentDataSourceService']=_0xb07193,this[_0x2024c1(0xde)]=_0x352fc5,this['_initDataSource']();}[_0x4e3fb3(0xfa)](){const _0x21028a=_0x4e3fb3;this[_0x21028a(0x101)][_0x21028a(0xbf)]=this[_0x21028a(0xde)],this[_0x21028a(0x101)][_0x21028a(0x11c)]=!0x1;}};_0x21af2b=_0x55c015([_0x1ab65f(0x0,_0x44534f[_0x4e3fb3(0xb1)]),_0x1ab65f(0x1,_0x47cd9e[_0x4e3fb3(0x12f)](_0x51ecb8))],_0x21af2b);var _0x264ca9=Object[_0x4e3fb3(0xfd)],_0x590e90=Object['getOwnPropertyDescriptor'],_0x5d80ed=(_0x5316bc,_0x3db511,_0x41036)=>_0x3db511 in _0x5316bc?_0x264ca9(_0x5316bc,_0x3db511,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x41036}):_0x5316bc[_0x3db511]=_0x41036,_0x128a2a=(_0x52610e,_0x82f22f,_0x31c61f,_0x2dafe3)=>{const _0x4de7c0=_0x4e3fb3;for(var _0x55e612=_0x2dafe3>0x1?void 0x0:_0x2dafe3?_0x590e90(_0x82f22f,_0x31c61f):_0x82f22f,_0x4d9af4=_0x52610e[_0x4de7c0(0xd1)]-0x1,_0x3d1f19;_0x4d9af4>=0x0;_0x4d9af4--)(_0x3d1f19=_0x52610e[_0x4d9af4])&&(_0x55e612=_0x3d1f19(_0x55e612)||_0x55e612);return _0x55e612;},_0x332cbb=(_0x1b5826,_0x583eb2)=>(_0x76e12,_0x33a74e)=>_0x583eb2(_0x76e12,_0x33a74e,_0x1b5826),_0x30784c=(_0x24f619,_0x5f41c1,_0xcf0ab5)=>_0x5d80ed(_0x24f619,typeof _0x5f41c1!=_0x4e3fb3(0x132)?_0x5f41c1+'':_0x5f41c1,_0xcf0ab5);_0x27d8d1[_0x4e3fb3(0xb6)]=class extends _0x47cd9e['Plugin']{constructor(_0x208262=_0x14681b,_0x3f426b,_0x5aa047){const _0x492943=_0x4e3fb3;super(),this[_0x492943(0xee)]=_0x208262,this[_0x492943(0x11f)]=_0x3f426b,this[_0x492943(0x110)]=_0x5aa047;const {..._0x17f9e7}=_0x47cd9e[_0x492943(0x123)]({},_0x14681b,this[_0x492943(0xee)]);this[_0x492943(0x110)][_0x492943(0xec)](_0x11a51f,_0x17f9e7);}[_0x4e3fb3(0xe8)](){const _0x5eeb6a=_0x4e3fb3;[[_0x51ecb8],[_0x21af2b],[_0x5dbcc8]][_0x5eeb6a(0x108)](_0x3f6ff4=>{const _0x161580=_0x5eeb6a;this['_injector'][_0x161580(0x11e)](_0x3f6ff4);});}[_0x4e3fb3(0x122)](){const _0x557fdd=_0x4e3fb3;this[_0x557fdd(0x11f)][_0x557fdd(0x12d)](_0x21af2b),this['_injector'][_0x557fdd(0x12d)](_0x5dbcc8);}},_0x30784c(_0x27d8d1[_0x4e3fb3(0xb6)],'pluginName',_0x19e2bb),_0x30784c(_0x27d8d1[_0x4e3fb3(0xb6)],_0x4e3fb3(0xcc),_0x47cd9e[_0x4e3fb3(0xe2)]['UNIVER_UNKNOWN']),_0x27d8d1[_0x4e3fb3(0xb6)]=_0x128a2a([_0x47cd9e[_0x4e3fb3(0xaa)](_0x4c82fd[_0x4e3fb3(0xc0)],_0x31a3d9[_0x4e3fb3(0x104)],_0x3c44df[_0x4e3fb3(0x130)]),_0x332cbb(0x1,_0x47cd9e[_0x4e3fb3(0x12f)](_0x47cd9e['Injector'])),_0x332cbb(0x2,_0x47cd9e[_0x4e3fb3(0xd2)])],_0x27d8d1[_0x4e3fb3(0xb6)]),Object[_0x4e3fb3(0xfd)](_0x27d8d1,Symbol[_0x4e3fb3(0x131)],{'value':_0x4e3fb3(0x125)});}));function _0x2ff0(){const _0x54ef9a=['createTimestamp','onStarting','getMemberID','map','payload','setConfig','1609602XIGmDI','_config','/reply','users','getUser','thread-comment-data-source.config','423RVFSML','UniverThreadComment','_init','rangeType','_commentService','bufferTime','comments','_initDataSource','_sessionService','commentUpdate$','defineProperty','threadId','requireSession','rangeId','_threadCommentDataSourceService','replies','getOwnPropertyDescriptor','UniverCollaborationClientPlugin','/universer-api/user/list','Delete','Edit','forEach','OpenOrReOpen','580558ztTWto','UniverCore','24DHOziT','Solved','delete','getCurrentUser','_configService','788005rpXYFB','/solved','Solve','body','1nHDqKs','values','Disposable','ref','resolveComment','ThreadCommentModel','find','syncUpdateMutationToColla','5387718DIqIpF','add','_injector','stringify','customRanges','onReady','merge','parse','Module','subscribe','listComments','content','YYYY/MM/DD\x20HH:mm','@univerjs-pro/license','resolved','error','get','Add','Inject','UniverLicensePlugin','toStringTag','symbol','slice','dayjs','@univerjs/thread-comment','DependentOn','UniverProLicense','format','root','filter','_threadCommentModel','8GPgiuc','IThreadCommentDataSourceService','function','294890uSwues','code','Injector','UniverThreadCommentDataSourcePlugin','reply','_httpService','updateComment','deleteComment','CollaborationSessionService','/universer-api/comment/unit/','12zCNMlj','/edit','dataSource','UniverThreadCommentUIPlugin','comment','unitId','rxjs','Unknown','post','addUser','getUnit','Reply','UniverProThreadCommentDatasource','@univerjs/network','@univerjs/core','type','userId','HTTPService','4159144lWIAfn','_userService','length','IConfigService','object','UniverNetwork','@univerjs-pro/collaboration-client','UNRECOGNIZED','replyId','CommentService','UserManagerService','solved','amd','addComment','user','_threadCommentDataSource','disposeWithMe','userID','/list','UniverInstanceType','saveCommentToSnapshot','CustomRangeType','_initUserSync','3128967YTScgS'];_0x2ff0=function(){return _0x54ef9a;};return _0x2ff0();}
1
+ (function(_0x33b233,_0x595fad){const _0x47d44a=_0x3c7e,_0x3eab5d=_0x33b233();while(!![]){try{const _0x47fa08=parseInt(_0x47d44a(0x243))/0x1+-parseInt(_0x47d44a(0x23d))/0x2*(parseInt(_0x47d44a(0x23b))/0x3)+parseInt(_0x47d44a(0x1e3))/0x4+parseInt(_0x47d44a(0x1e1))/0x5*(-parseInt(_0x47d44a(0x1fd))/0x6)+-parseInt(_0x47d44a(0x22d))/0x7+-parseInt(_0x47d44a(0x225))/0x8*(-parseInt(_0x47d44a(0x1eb))/0x9)+-parseInt(_0x47d44a(0x217))/0xa;if(_0x47fa08===_0x595fad)break;else _0x3eab5d['push'](_0x3eab5d['shift']());}catch(_0x13d2fb){_0x3eab5d['push'](_0x3eab5d['shift']());}}}(_0x1668,0x19d57),function(_0x42ed06,_0xf28392){const _0x133241=_0x3c7e;typeof exports==_0x133241(0x209)&&typeof module<'u'?_0xf28392(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x133241(0x1fa)&&define[_0x133241(0x1d0)]?define(['exports',_0x133241(0x1f9),_0x133241(0x20f),_0x133241(0x252),_0x133241(0x242),'@univerjs/thread-comment',_0x133241(0x24a),_0x133241(0x1ee)],_0xf28392):(_0x42ed06=typeof globalThis<'u'?globalThis:_0x42ed06||self,_0xf28392(_0x42ed06['UniverProThreadCommentDatasource']={},_0x42ed06['UniverProCollaborationClient'],_0x42ed06[_0x133241(0x1fc)],_0x42ed06[_0x133241(0x1e7)],_0x42ed06[_0x133241(0x230)],_0x42ed06['UniverThreadComment'],_0x42ed06[_0x133241(0x24a)],_0x42ed06['UniverNetwork']));}(this,function(_0x4a3a80,_0x13648d,_0x4340f9,_0x525483,_0x279728,_0x406360,_0x1c3b9f,_0x2f6d70){'use strict';const _0x56720d=_0x3c7e;const _0x254eb9='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x197c1e=(_0x469a84=>(_0x469a84[_0x469a84[_0x56720d(0x1e4)]=0x0]=_0x56720d(0x1e4),_0x469a84[_0x469a84[_0x56720d(0x1df)]=0x1]='Solved',_0x469a84[_0x469a84[_0x56720d(0x215)]=-0x1]=_0x56720d(0x215),_0x469a84))(_0x197c1e||{}),_0x40483b=(_0x4f3def=>(_0x4f3def[_0x4f3def[_0x56720d(0x1d9)]=0x0]=_0x56720d(0x1d9),_0x4f3def[_0x4f3def[_0x56720d(0x1e2)]=0x1]=_0x56720d(0x1e2),_0x4f3def[_0x4f3def['Reply']=0x2]=_0x56720d(0x233),_0x4f3def[_0x4f3def[_0x56720d(0x234)]=0x3]=_0x56720d(0x234),_0x4f3def[_0x4f3def[_0x56720d(0x229)]=0x4]=_0x56720d(0x229),_0x4f3def[_0x4f3def[_0x56720d(0x1d6)]=0x5]=_0x56720d(0x1d6),_0x4f3def[_0x4f3def[_0x56720d(0x215)]=-0x1]=_0x56720d(0x215),_0x4f3def))(_0x40483b||{});const _0x422562=_0x4d103c=>_0x525483[_0x56720d(0x221)](new Date(+_0x4d103c))[_0x56720d(0x1f8)](_0x56720d(0x211)),_0x1d94d9=async(_0x6458b0,_0x27319d)=>{const _0x1b3fb2=_0x56720d,_0xf9010a=_0x6458b0['get'](_0x525483['UserManagerService']),_0x4691e6=_0x6458b0[_0x1b3fb2(0x1dc)](_0x2f6d70[_0x1b3fb2(0x236)]);_0x27319d[_0x1b3fb2(0x1d1)](_0x19d661=>{const _0x531414=_0x1b3fb2;_0xf9010a[_0x531414(0x22b)](_0x19d661)&&_0x27319d[_0x531414(0x21b)](_0x19d661);}),_0x27319d[_0x1b3fb2(0x1e0)]&&(await _0x4691e6['get'](_0x1b3fb2(0x249),{'params':{'userIDs':[..._0x27319d]}}))['body']['users'][_0x1b3fb2(0x1d1)](_0x55006a=>{const _0xadc46f=_0x1b3fb2;_0x55006a&&_0xf9010a[_0xadc46f(0x21c)](_0x55006a);});};var _0x588554=Object[_0x56720d(0x1f5)],_0x4cd362=(_0x2b4e83,_0x2815c2,_0x17fb1e,_0x40ea6b)=>{for(var _0x24465e=_0x40ea6b>0x1?void 0x0:_0x40ea6b?_0x588554(_0x2815c2,_0x17fb1e):_0x2815c2,_0x2f78d7=_0x2b4e83['length']-0x1,_0x1e2c96;_0x2f78d7>=0x0;_0x2f78d7--)(_0x1e2c96=_0x2b4e83[_0x2f78d7])&&(_0x24465e=_0x1e2c96(_0x24465e)||_0x24465e);return _0x24465e;},_0x482da6=(_0x2347d3,_0x5011dc)=>(_0x18bc3c,_0xa61c3)=>_0x5011dc(_0x18bc3c,_0xa61c3,_0x2347d3);let _0x45e3f1=class extends _0x525483[_0x56720d(0x24f)]{constructor(_0x1611c0,_0x1e2be9,_0x22aa0c,_0x45580c){const _0x2aa815=_0x56720d;super(),this[_0x2aa815(0x1e8)]=_0x1611c0,this[_0x2aa815(0x228)]=_0x1e2be9,this[_0x2aa815(0x1d2)]=_0x22aa0c,this[_0x2aa815(0x205)]=_0x45580c,this[_0x2aa815(0x21f)](),this[_0x2aa815(0x1fe)]();}['_initUserSync'](){const _0x213c4d=_0x56720d;this[_0x213c4d(0x23e)](this[_0x213c4d(0x228)]['commentUpdate$']['pipe'](_0x1c3b9f[_0x213c4d(0x1f7)](0x10))['subscribe'](_0x485a5a=>{const _0x482df1=_0x213c4d,_0x1d0179=new Set();_0x485a5a['forEach'](_0x1bd32c=>{const _0x3b1c10=_0x3c7e;switch(_0x1bd32c[_0x3b1c10(0x21d)]){case _0x3b1c10(0x23c):{const _0x2be03a=_0x1bd32c[_0x3b1c10(0x238)][_0x3b1c10(0x200)];_0x1d0179[_0x3b1c10(0x23c)](_0x2be03a);break;}}}),_0x1d94d9(this[_0x482df1(0x205)],_0x1d0179);}));}[_0x56720d(0x21f)](){const _0x510d15=_0x56720d;this[_0x510d15(0x23e)](this[_0x510d15(0x1e8)]['commentUpdate$'][_0x510d15(0x1f0)](async _0x51fcf9=>{const _0x3b811f=_0x510d15;var _0xdcce89,_0x1b7082,_0x229f22,_0x3aa6d1;const _0x433b82=(_0xdcce89=this[_0x3b811f(0x228)]['getUnit'](_0x51fcf9['unitId'])['find'](_0x57d6a8=>_0x57d6a8[_0x3b811f(0x206)]===_0x51fcf9[_0x3b811f(0x206)]))==null?void 0x0:_0xdcce89['root'];if(!_0x433b82)return;const {unitId:_0x54bebc,subUnitId:_0x18f27b}=_0x433b82;switch(_0x51fcf9['user']&&this['_userService']['addUser'](_0x51fcf9[_0x3b811f(0x1d7)]),_0x51fcf9['type']){case _0x40483b[_0x3b811f(0x1e2)]:break;case _0x40483b[_0x3b811f(0x233)]:{this[_0x3b811f(0x228)][_0x3b811f(0x247)](_0x54bebc,_0x18f27b,{'unitId':_0x54bebc,'subUnitId':_0x18f27b,'ref':'','id':_0x51fcf9[_0x3b811f(0x1e5)],'dT':_0x422562(+_0x51fcf9[_0x3b811f(0x239)]),'threadId':_0x51fcf9[_0x3b811f(0x206)],'personId':(_0x229f22=(_0x1b7082=_0x51fcf9[_0x3b811f(0x1d7)])==null?void 0x0:_0x1b7082[_0x3b811f(0x22c)])!=null?_0x229f22:_0x51fcf9['userId'],'text':JSON[_0x3b811f(0x237)](_0x51fcf9[_0x3b811f(0x251)]),'parentId':_0x433b82['id']});break;}case _0x40483b['Delete']:{const _0x726599=this['_threadCommentModel']['getComment'](_0x54bebc,_0x18f27b,_0x51fcf9[_0x3b811f(0x1e5)]);_0x726599&&_0x726599[_0x3b811f(0x241)]&&this['_threadCommentModel'][_0x3b811f(0x250)](_0x54bebc,_0x18f27b,_0x51fcf9[_0x3b811f(0x1e5)]);break;}case _0x40483b['Edit']:{this[_0x3b811f(0x228)][_0x3b811f(0x1d3)](_0x54bebc,_0x18f27b,{'commentId':_0x51fcf9[_0x3b811f(0x1e5)],'text':JSON[_0x3b811f(0x237)](_0x51fcf9[_0x3b811f(0x251)])});break;}case _0x40483b[_0x3b811f(0x1d6)]:{const _0xfd4cc0=(_0x3aa6d1=this['_threadCommentModel']['getUnit'](_0x51fcf9['unitId'])[_0x3b811f(0x1f1)](_0x481a58=>_0x481a58[_0x3b811f(0x206)]===_0x51fcf9[_0x3b811f(0x206)]))==null?void 0x0:_0x3aa6d1[_0x3b811f(0x1d4)];_0xfd4cc0&&this[_0x3b811f(0x228)]['resolveComment'](_0x54bebc,_0x18f27b,_0xfd4cc0['id'],_0x51fcf9[_0x3b811f(0x203)]===_0x197c1e[_0x3b811f(0x1df)]);break;}}}));}};_0x45e3f1=_0x4cd362([_0x482da6(0x0,_0x525483[_0x56720d(0x1e9)](_0x13648d[_0x56720d(0x1dd)])),_0x482da6(0x1,_0x525483[_0x56720d(0x1e9)](_0x406360[_0x56720d(0x235)])),_0x482da6(0x2,_0x525483[_0x56720d(0x1e9)](_0x525483[_0x56720d(0x22e)])),_0x482da6(0x3,_0x525483[_0x56720d(0x1e9)](_0x525483[_0x56720d(0x218)]))],_0x45e3f1);const _0x3d21c7=_0x56720d(0x1e6),_0x3a391f={};var _0x313121=Object[_0x56720d(0x1f5)],_0x4843bd=(_0x51788b,_0xfdd25c,_0x45a249,_0x222c5a)=>{const _0x31a43f=_0x56720d;for(var _0x3a4eb3=_0x222c5a>0x1?void 0x0:_0x222c5a?_0x313121(_0xfdd25c,_0x45a249):_0xfdd25c,_0x536e2e=_0x51788b[_0x31a43f(0x224)]-0x1,_0x5508de;_0x536e2e>=0x0;_0x536e2e--)(_0x5508de=_0x51788b[_0x536e2e])&&(_0x3a4eb3=_0x5508de(_0x3a4eb3)||_0x3a4eb3);return _0x3a4eb3;},_0x9e8b73=(_0x2c5472,_0x5c7e84)=>(_0x5cf7ef,_0x5e4e4b)=>_0x5c7e84(_0x5cf7ef,_0x5e4e4b,_0x2c5472);function _0x3fcce9(_0x23829c,_0x337b78){const _0x5c69b8=_0x56720d,_0x249598=_0x23829c[_0x5c69b8(0x22f)][0x0];return{..._0x337b78,'id':_0x249598['replyId'],'resolved':_0x23829c[_0x5c69b8(0x203)]===0x1,'dT':_0x422562(_0x249598[_0x5c69b8(0x239)]),'personId':_0x249598[_0x5c69b8(0x207)],'threadId':_0x249598[_0x5c69b8(0x206)]};}function _0x1bc301(_0xd82791,_0x34e3c4,_0xaff656){const _0x2d84c2=_0x56720d;var _0x2e295b,_0x29cd24;if(((_0x29cd24=(_0x2e295b=_0xd82791==null?void 0x0:_0xd82791[_0x2d84c2(0x22f)])==null?void 0x0:_0x2e295b[_0x2d84c2(0x224)])!=null?_0x29cd24:0x0)>0x0){const _0x495c0b=(_0x424264,_0x5e3a8b)=>({'id':_0x424264[_0x2d84c2(0x1e5)],'threadId':_0x424264[_0x2d84c2(0x206)],'dT':_0x422562(_0x424264[_0x2d84c2(0x239)]),'personId':_0x424264[_0x2d84c2(0x207)],'resolved':_0xd82791[_0x2d84c2(0x203)]===_0x197c1e[_0x2d84c2(0x1df)],'unitId':_0x34e3c4,'subUnitId':_0xaff656,'text':JSON[_0x2d84c2(0x237)](_0x424264['content']),'parentId':_0x5e3a8b}),_0x87f0c1=_0x495c0b(_0xd82791['replies'][0x0]);return{..._0x87f0c1,'children':_0xd82791['replies'][_0x2d84c2(0x1ed)](0x1)[_0x2d84c2(0x219)](_0x1eb1d7=>_0x495c0b(_0x1eb1d7,_0x87f0c1['id']))};}return null;}let _0x4b7ec2=class{constructor(_0x55d2c5,_0x4b4022,_0xc7cd55){const _0x1b0f6d=_0x56720d;this[_0x1b0f6d(0x24d)]=_0x55d2c5,this[_0x1b0f6d(0x1d2)]=_0x4b4022,this[_0x1b0f6d(0x1f2)]=_0xc7cd55;}async[_0x56720d(0x247)](_0xe46b6){const _0x3b8478=_0x56720d;var _0xa2ede3,_0x4b9b05;const {parentId:_0x45fada,unitId:_0xecdb20,text:_0x3da925,threadId:_0x37dd08}=_0xe46b6,_0x1e43bb=(_0x4b9b05=(_0xa2ede3=_0x3da925['customRanges'])==null?void 0x0:_0xa2ede3[_0x3b8478(0x212)](_0x5bacb2=>_0x5bacb2['rangeType']===_0x525483['CustomRangeType']['COMMENT'])[_0x3b8478(0x219)](_0x2e291b=>_0x2e291b['rangeId']))!=null?_0x4b9b05:[],_0x49056b=JSON[_0x3b8478(0x21a)](_0x3da925),_0x1b833b=(await this[_0x3b8478(0x1f2)][_0x3b8478(0x231)](_0xecdb20))[_0x3b8478(0x214)]();if(_0x45fada){const _0x36ef92={'memberId':_0x1b833b,'unitId':_0xecdb20,'content':_0x49056b,'mention':_0x1e43bb,'threadId':_0x37dd08},_0x255746=(await this[_0x3b8478(0x24d)][_0x3b8478(0x22a)](_0x3b8478(0x1d8)+_0xecdb20+_0x3b8478(0x1f6),{'body':_0x36ef92}))[_0x3b8478(0x240)]['reply'];return{..._0xe46b6,'id':_0x255746['replyId'],'dT':_0x525483[_0x3b8478(0x221)](+_0x255746[_0x3b8478(0x239)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x255746[_0x3b8478(0x207)]};}else{const _0x10cb84={'memberId':_0x1b833b,'unitId':_0xecdb20,'content':_0x49056b,'mention':_0x1e43bb},_0xe39c60=await this['_httpService'][_0x3b8478(0x22a)]('/universer-api/comment/unit/'+_0xecdb20+'/add',{'body':_0x10cb84});return _0x3fcce9(_0xe39c60[_0x3b8478(0x240)][_0x3b8478(0x21e)],_0xe46b6);}}async['updateComment'](_0x3ae6df){const _0x291882=_0x56720d;var _0x561349,_0x120dd7;const {text:_0x160ca0,unitId:_0x1631ec}=_0x3ae6df,_0x446cc7=(_0x120dd7=(_0x561349=_0x160ca0[_0x291882(0x24e)])==null?void 0x0:_0x561349[_0x291882(0x212)](_0x1f35f3=>_0x1f35f3[_0x291882(0x20b)]===_0x525483[_0x291882(0x210)][_0x291882(0x201)])[_0x291882(0x219)](_0x54d797=>_0x54d797[_0x291882(0x216)]))!=null?_0x120dd7:[],_0x108ebe=JSON[_0x291882(0x21a)](_0x160ca0),_0x301fa8=_0x3ae6df['threadId'],_0x58f747=_0x3ae6df['id'],_0x1c2384={'memberId':(await this['_sessionService'][_0x291882(0x231)](_0x1631ec))['getMemberID'](),'unitId':_0x1631ec,'threadId':_0x301fa8,'mention':_0x446cc7,'content':_0x108ebe,'replyId':_0x58f747},_0x266e4a=await this[_0x291882(0x24d)][_0x291882(0x22a)]('/universer-api/comment/unit/'+_0x1631ec+_0x291882(0x1ef),{'body':_0x1c2384});return!_0x266e4a[_0x291882(0x240)][_0x291882(0x23f)]||_0x266e4a[_0x291882(0x240)][_0x291882(0x23f)][_0x291882(0x222)]===0x1;}async['resolveComment'](_0x3735b3){const _0x35f812=_0x56720d,{unitId:_0x15fbdc}=_0x3735b3,_0x292503=_0x3735b3[_0x35f812(0x206)],_0x1558a5={'memberId':this[_0x35f812(0x1d2)]['getCurrentUser']()[_0x35f812(0x22c)],'unitId':_0x15fbdc,'threadId':_0x292503,'solved':_0x3735b3[_0x35f812(0x1f4)]?_0x197c1e['Solved']:_0x197c1e[_0x35f812(0x1e4)]},_0x5533e2=await this[_0x35f812(0x24d)][_0x35f812(0x22a)]('/universer-api/comment/unit/'+_0x15fbdc+'/solved',{'body':_0x1558a5});return!_0x5533e2[_0x35f812(0x240)][_0x35f812(0x23f)]||_0x5533e2[_0x35f812(0x240)][_0x35f812(0x23f)][_0x35f812(0x222)]===0x1;}async[_0x56720d(0x250)](_0x5cdd16,_0x588338,_0x8b0468,_0x355aa2){const _0x3b57f5=_0x56720d,_0x4609bd={'memberId':(await this[_0x3b57f5(0x1f2)][_0x3b57f5(0x231)](_0x5cdd16))[_0x3b57f5(0x214)](),'threadId':_0x8b0468,'replyId':_0x355aa2,'unitId':_0x5cdd16},_0x540056=await this[_0x3b57f5(0x24d)][_0x3b57f5(0x22a)]('/universer-api/comment/unit/'+_0x5cdd16+_0x3b57f5(0x24c),{'body':_0x4609bd});return!_0x540056[_0x3b57f5(0x240)][_0x3b57f5(0x23f)]||_0x540056[_0x3b57f5(0x240)][_0x3b57f5(0x23f)][_0x3b57f5(0x222)]===0x1;}async[_0x56720d(0x23a)](_0x2ee95a,_0x3f39e7,_0x11d80f){const _0x5b712f=_0x56720d,_0x1d872b={'unitId':_0x2ee95a,'threadId':_0x11d80f},_0x136202=await this[_0x5b712f(0x24d)][_0x5b712f(0x22a)](_0x5b712f(0x1d8)+_0x2ee95a+_0x5b712f(0x226),{'body':_0x1d872b}),_0x241951=_0x11d80f['map'](_0xee2461=>_0x1bc301(_0x136202['body'][_0x5b712f(0x202)][_0xee2461],_0x2ee95a,_0x3f39e7))[_0x5b712f(0x212)](Boolean);return Object[_0x5b712f(0x1fb)](_0x136202[_0x5b712f(0x240)][_0x5b712f(0x20a)])[_0x5b712f(0x1d1)](_0x3c4173=>{const _0x4e09d9=_0x5b712f;this['_userService'][_0x4e09d9(0x21c)](_0x3c4173);}),_0x241951;}['saveCommentToSnapshot'](_0x1a7087){const _0x32538d=_0x56720d;return{'id':_0x1a7087['id'],'threadId':_0x1a7087[_0x32538d(0x206)],'ref':_0x1a7087[_0x32538d(0x20d)]};}};_0x4b7ec2=_0x4843bd([_0x9e8b73(0x0,_0x525483['Inject'](_0x2f6d70[_0x56720d(0x236)])),_0x9e8b73(0x1,_0x525483[_0x56720d(0x1e9)](_0x525483[_0x56720d(0x22e)])),_0x9e8b73(0x2,_0x525483[_0x56720d(0x1e9)](_0x13648d[_0x56720d(0x1f3)]))],_0x4b7ec2);var _0x23cff4=Object[_0x56720d(0x1f5)],_0x3de4e7=(_0x223fbe,_0x2eed46,_0x65505,_0x819511)=>{for(var _0x3b8f8f=_0x819511>0x1?void 0x0:_0x819511?_0x23cff4(_0x2eed46,_0x65505):_0x2eed46,_0x110c5d=_0x223fbe['length']-0x1,_0x55c55b;_0x110c5d>=0x0;_0x110c5d--)(_0x55c55b=_0x223fbe[_0x110c5d])&&(_0x3b8f8f=_0x55c55b(_0x3b8f8f)||_0x3b8f8f);return _0x3b8f8f;},_0xf86572=(_0x50a455,_0x3819ce)=>(_0x32402b,_0x156cf9)=>_0x3819ce(_0x32402b,_0x156cf9,_0x50a455);let _0x15e92f=class extends _0x525483[_0x56720d(0x24f)]{constructor(_0x48c599,_0x4ef969){const _0x99bfd9=_0x56720d;super(),this['_threadCommentDataSourceService']=_0x48c599,this[_0x99bfd9(0x1da)]=_0x4ef969,this[_0x99bfd9(0x220)]();}[_0x56720d(0x220)](){const _0x489895=_0x56720d;this[_0x489895(0x20e)]['dataSource']=this[_0x489895(0x1da)],this[_0x489895(0x20e)][_0x489895(0x204)]=!0x1;}};_0x15e92f=_0x3de4e7([_0xf86572(0x0,_0x406360[_0x56720d(0x208)]),_0xf86572(0x1,_0x525483[_0x56720d(0x1e9)](_0x4b7ec2))],_0x15e92f);var _0x3d2a86=Object[_0x56720d(0x1ff)],_0x1e27fc=Object[_0x56720d(0x1f5)],_0x5bc067=(_0x52c961,_0x49036a,_0x445c36)=>_0x49036a in _0x52c961?_0x3d2a86(_0x52c961,_0x49036a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x445c36}):_0x52c961[_0x49036a]=_0x445c36,_0x11e518=(_0x57dff6,_0x1239a6,_0x16931a,_0xcbef54)=>{const _0x148383=_0x56720d;for(var _0x5ebe72=_0xcbef54>0x1?void 0x0:_0xcbef54?_0x1e27fc(_0x1239a6,_0x16931a):_0x1239a6,_0x502a22=_0x57dff6[_0x148383(0x224)]-0x1,_0xfb6169;_0x502a22>=0x0;_0x502a22--)(_0xfb6169=_0x57dff6[_0x502a22])&&(_0x5ebe72=_0xfb6169(_0x5ebe72)||_0x5ebe72);return _0x5ebe72;},_0x2d76a7=(_0x4db5f4,_0x44713f)=>(_0x135f74,_0x44752f)=>_0x44713f(_0x135f74,_0x44752f,_0x4db5f4),_0x4f3453=(_0x3f4477,_0x2eff1d,_0x3e69aa)=>_0x5bc067(_0x3f4477,typeof _0x2eff1d!=_0x56720d(0x1d5)?_0x2eff1d+'':_0x2eff1d,_0x3e69aa);_0x4a3a80['UniverThreadCommentDataSourcePlugin']=class extends _0x525483[_0x56720d(0x245)]{constructor(_0x1e9495=_0x3a391f,_0x2a2573,_0x3c24ab){const _0x3d067d=_0x56720d;super(),this[_0x3d067d(0x227)]=_0x1e9495,this[_0x3d067d(0x205)]=_0x2a2573,this['_configService']=_0x3c24ab;const {..._0x568af9}=_0x525483[_0x3d067d(0x232)]({},_0x3a391f,this['_config']);this[_0x3d067d(0x248)][_0x3d067d(0x1ea)](_0x3d21c7,_0x568af9);}[_0x56720d(0x1cf)](){const _0x2704aa=_0x56720d;[[_0x4b7ec2],[_0x15e92f],[_0x45e3f1]][_0x2704aa(0x1d1)](_0x15501a=>{const _0xe8a46b=_0x2704aa;this[_0xe8a46b(0x205)]['add'](_0x15501a);});}[_0x56720d(0x1ec)](){const _0x325ce1=_0x56720d;this[_0x325ce1(0x205)]['get'](_0x15e92f),this[_0x325ce1(0x205)]['get'](_0x45e3f1);}},_0x4f3453(_0x4a3a80[_0x56720d(0x1de)],'pluginName',_0x254eb9),_0x4f3453(_0x4a3a80[_0x56720d(0x1de)],_0x56720d(0x21d),_0x525483[_0x56720d(0x223)]['UNIVER_UNKNOWN']),_0x4a3a80[_0x56720d(0x1de)]=_0x11e518([_0x525483[_0x56720d(0x213)](_0x279728[_0x56720d(0x24b)],_0x13648d['UniverCollaborationClientPlugin'],_0x4340f9[_0x56720d(0x246)]),_0x2d76a7(0x1,_0x525483[_0x56720d(0x1e9)](_0x525483[_0x56720d(0x218)])),_0x2d76a7(0x2,_0x525483[_0x56720d(0x20c)])],_0x4a3a80['UniverThreadCommentDataSourcePlugin']),Object[_0x56720d(0x1ff)](_0x4a3a80,Symbol[_0x56720d(0x244)],{'value':_0x56720d(0x1db)});}));function _0x3c7e(_0x126814,_0x4c2150){_0x126814=_0x126814-0x1cf;const _0x16682f=_0x1668();let _0x3c7e6b=_0x16682f[_0x126814];return _0x3c7e6b;}function _0x1668(){const _0x23b250=['add','68078cQgqPU','disposeWithMe','error','body','parentId','@univerjs/thread-comment-ui','135021ZzXVXw','toStringTag','Plugin','UniverLicensePlugin','addComment','_configService','/universer-api/user/list','rxjs','UniverThreadCommentUIPlugin','/delete','_httpService','customRanges','Disposable','deleteComment','content','@univerjs/core','onStarting','amd','forEach','_userService','updateComment','root','symbol','Solve','user','/universer-api/comment/unit/','Unknown','_threadCommentDataSource','Module','get','CommentService','UniverThreadCommentDataSourcePlugin','Solved','size','5yotmLN','Add','353380VlZeqe','OpenOrReOpen','replyId','thread-comment-data-source.config','UniverCore','_commentService','Inject','setConfig','9BHqcFW','onReady','slice','@univerjs/network','/edit','subscribe','find','_sessionService','CollaborationSessionService','resolved','getOwnPropertyDescriptor','/reply','bufferTime','format','@univerjs-pro/collaboration-client','function','values','UniverProLicense','150882gdtVIN','_initUserSync','defineProperty','personId','COMMENT','comments','solved','syncUpdateMutationToColla','_injector','threadId','userId','IThreadCommentDataSourceService','object','users','rangeType','IConfigService','ref','_threadCommentDataSourceService','@univerjs-pro/license','CustomRangeType','YYYY/MM/DD\x20HH:mm','filter','DependentOn','getMemberID','UNRECOGNIZED','rangeId','679630lgBCSF','Injector','map','stringify','delete','addUser','type','comment','_init','_initDataSource','dayjs','code','UniverInstanceType','length','1622384liTaje','/list','_config','_threadCommentModel','Delete','post','getUser','userID','1352400euSnkm','UserManagerService','replies','UniverThreadCommentUi','requireSession','merge','Reply','Edit','ThreadCommentModel','HTTPService','parse','payload','createTimestamp','listComments','3wwWMuX'];_0x1668=function(){return _0x23b250;};return _0x1668();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.13.0-insiders.20251218-2062647",
3
+ "version": "0.13.0-insiders.20251220-0a5ea4d",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.13.0-insiders.20251218-2062647",
49
- "@univerjs-pro/license": "0.13.0-insiders.20251218-2062647",
50
- "@univerjs/core": "0.13.0-insiders.20251218-2062647",
51
- "@univerjs/network": "0.13.0-insiders.20251218-2062647",
48
+ "@univerjs-pro/collaboration-client": "0.13.0-insiders.20251220-0a5ea4d",
49
+ "@univerjs-pro/license": "0.13.0-insiders.20251220-0a5ea4d",
52
50
  "@univerjs/protocol": "0.1.47",
53
- "@univerjs/thread-comment": "0.13.0-insiders.20251218-2062647",
54
- "@univerjs/thread-comment-ui": "0.13.0-insiders.20251218-2062647"
51
+ "@univerjs/thread-comment": "0.13.0-insiders.20251220-0a5ea4d",
52
+ "@univerjs/network": "0.13.0-insiders.20251220-0a5ea4d",
53
+ "@univerjs/thread-comment-ui": "0.13.0-insiders.20251220-0a5ea4d",
54
+ "@univerjs/core": "0.13.0-insiders.20251220-0a5ea4d"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",