@univerjs-pro/thread-comment-datasource 0.15.1 → 0.15.2-insiders.20260119-edc718c

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x4f5d82=_0xe2d6;(function(_0xc6f405,_0x2eacc0){const _0x46993d=_0xe2d6,_0x16adde=_0xc6f405();while(!![]){try{const _0x1dbda4=parseInt(_0x46993d(0xa2))/0x1*(parseInt(_0x46993d(0x86))/0x2)+-parseInt(_0x46993d(0xe0))/0x3*(parseInt(_0x46993d(0x6e))/0x4)+-parseInt(_0x46993d(0xa5))/0x5*(parseInt(_0x46993d(0x7d))/0x6)+parseInt(_0x46993d(0xa3))/0x7*(parseInt(_0x46993d(0xcc))/0x8)+parseInt(_0x46993d(0xb1))/0x9+parseInt(_0x46993d(0xde))/0xa*(-parseInt(_0x46993d(0x8d))/0xb)+parseInt(_0x46993d(0xa9))/0xc*(parseInt(_0x46993d(0xd7))/0xd);if(_0x1dbda4===_0x2eacc0)break;else _0x16adde['push'](_0x16adde['shift']());}catch(_0x2f44a8){_0x16adde['push'](_0x16adde['shift']());}}}(_0xf535,0xb42be));Object[_0x4f5d82(0xc2)](exports,Symbol['toStringTag'],{'value':_0x4f5d82(0xc9)});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=_0x4f5d82(0xa4);var I=(_0x46704d=>(_0x46704d[_0x46704d['OpenOrReOpen']=0x0]=_0x4f5d82(0xa6),_0x46704d[_0x46704d[_0x4f5d82(0xbc)]=0x1]='Solved',_0x46704d[_0x46704d[_0x4f5d82(0x8e)]=-0x1]=_0x4f5d82(0x8e),_0x46704d))(I||{}),v=(_0x419383=>(_0x419383[_0x419383[_0x4f5d82(0xab)]=0x0]=_0x4f5d82(0xab),_0x419383[_0x419383[_0x4f5d82(0xbe)]=0x1]=_0x4f5d82(0xbe),_0x419383[_0x419383[_0x4f5d82(0x82)]=0x2]=_0x4f5d82(0x82),_0x419383[_0x419383[_0x4f5d82(0x72)]=0x3]='Edit',_0x419383[_0x419383[_0x4f5d82(0xce)]=0x4]=_0x4f5d82(0xce),_0x419383[_0x419383[_0x4f5d82(0xd6)]=0x5]='Solve',_0x419383[_0x419383[_0x4f5d82(0x8e)]=-0x1]='UNRECOGNIZED',_0x419383))(v||{});const f=_0x5a4df7=>c[_0x4f5d82(0x70)](new Date(+_0x5a4df7))[_0x4f5d82(0xa7)](_0x4f5d82(0xae)),R=async(_0x4257e5,_0x282d28)=>{const _0x5a03e3=_0x4f5d82,_0x12904d=_0x4257e5[_0x5a03e3(0x87)](c[_0x5a03e3(0x74)]),_0x27903a=_0x4257e5[_0x5a03e3(0x87)](P[_0x5a03e3(0xc3)]);_0x282d28[_0x5a03e3(0xe1)](_0x292278=>{const _0x2ae769=_0x5a03e3;_0x12904d['getUser'](_0x292278)&&_0x282d28[_0x2ae769(0xdd)](_0x292278);}),_0x282d28[_0x5a03e3(0x75)]&&(await _0x27903a[_0x5a03e3(0x87)](_0x5a03e3(0x90),{'params':{'userIDs':[..._0x282d28]}}))[_0x5a03e3(0xc8)]['users'][_0x5a03e3(0xe1)](_0x2d5380=>{const _0x55e795=_0x5a03e3;_0x2d5380&&_0x12904d[_0x55e795(0xac)](_0x2d5380);});};var $=Object[_0x4f5d82(0x8b)],E=(_0x30ed37,_0x51c580,_0x2fbeca,_0x578e65)=>{for(var _0x474877=_0x578e65>0x1?void 0x0:_0x578e65?$(_0x51c580,_0x2fbeca):_0x51c580,_0x18906b=_0x30ed37['length']-0x1,_0x2958ba;_0x18906b>=0x0;_0x18906b--)(_0x2958ba=_0x30ed37[_0x18906b])&&(_0x474877=_0x2958ba(_0x474877)||_0x474877);return _0x474877;},S=(_0xadaaa7,_0x537e57)=>(_0x30c35b,_0x30c876)=>_0x537e57(_0x30c35b,_0x30c876,_0xadaaa7);let _=class extends c[_0x4f5d82(0xc7)]{constructor(_0x5c20db,_0x468a13,_0x309b53,_0x55c153){const _0x1ddf9f=_0x4f5d82;super(),this['_commentService']=_0x5c20db,this[_0x1ddf9f(0x94)]=_0x468a13,this[_0x1ddf9f(0x88)]=_0x309b53,this['_injector']=_0x55c153,this[_0x1ddf9f(0xa1)](),this[_0x1ddf9f(0xd5)]();}[_0x4f5d82(0xd5)](){const _0x1e6b9d=_0x4f5d82;this[_0x1e6b9d(0xc5)](this[_0x1e6b9d(0x94)][_0x1e6b9d(0x78)][_0x1e6b9d(0xd2)](j[_0x1e6b9d(0x93)](0x10))['subscribe'](_0x5b0c8b=>{const _0x4c5089=_0x1e6b9d,_0x30672b=new Set();_0x5b0c8b[_0x4c5089(0xe1)](_0x2d0fac=>{const _0x487e14=_0x4c5089;if(_0x2d0fac['type']===_0x487e14(0x79)){const _0x4fec1f=_0x2d0fac['payload'][_0x487e14(0x9e)];_0x30672b['add'](_0x4fec1f);}}),R(this[_0x4c5089(0xdf)],_0x30672b);}));}[_0x4f5d82(0xa1)](){const _0x4cfaab=_0x4f5d82;this['disposeWithMe'](this['_commentService'][_0x4cfaab(0x78)][_0x4cfaab(0x9a)](async _0x1dd632=>{const _0x13d0c5=_0x4cfaab;var _0x4c94d1,_0x25123f,_0x3a5e9a,_0x170465;const _0x364758=(_0x4c94d1=this[_0x13d0c5(0x94)][_0x13d0c5(0xc4)](_0x1dd632[_0x13d0c5(0xcd)])['find'](_0x2dc282=>_0x2dc282[_0x13d0c5(0xbf)]===_0x1dd632['threadId']))==null?void 0x0:_0x4c94d1[_0x13d0c5(0xa0)];if(!_0x364758)return;const {unitId:_0x3995eb,subUnitId:_0x20148d}=_0x364758;switch(_0x1dd632['user']&&this[_0x13d0c5(0x88)][_0x13d0c5(0xac)](_0x1dd632[_0x13d0c5(0xb7)]),_0x1dd632[_0x13d0c5(0x7a)]){case v[_0x13d0c5(0xbe)]:break;case v[_0x13d0c5(0x82)]:{this[_0x13d0c5(0x94)]['addComment'](_0x3995eb,_0x20148d,{'unitId':_0x3995eb,'subUnitId':_0x20148d,'ref':'','id':_0x1dd632['replyId'],'dT':f(+_0x1dd632[_0x13d0c5(0x85)]),'threadId':_0x1dd632[_0x13d0c5(0xbf)],'personId':(_0x3a5e9a=(_0x25123f=_0x1dd632[_0x13d0c5(0xb7)])==null?void 0x0:_0x25123f[_0x13d0c5(0xda)])!=null?_0x3a5e9a:_0x1dd632[_0x13d0c5(0xdc)],'text':JSON[_0x13d0c5(0x6d)](_0x1dd632[_0x13d0c5(0xd9)]),'parentId':_0x364758['id']});break;}case v[_0x13d0c5(0xce)]:{const _0x6a0636=this[_0x13d0c5(0x94)][_0x13d0c5(0xb9)](_0x3995eb,_0x20148d,_0x1dd632[_0x13d0c5(0xbd)]);_0x6a0636&&_0x6a0636[_0x13d0c5(0x71)]&&this[_0x13d0c5(0x94)][_0x13d0c5(0x6b)](_0x3995eb,_0x20148d,_0x1dd632['replyId']);break;}case v[_0x13d0c5(0x72)]:{this[_0x13d0c5(0x94)][_0x13d0c5(0x9f)](_0x3995eb,_0x20148d,{'commentId':_0x1dd632[_0x13d0c5(0xbd)],'text':JSON[_0x13d0c5(0x6d)](_0x1dd632[_0x13d0c5(0xd9)])});break;}case v['Solve']:{const _0x15e160=(_0x170465=this[_0x13d0c5(0x94)][_0x13d0c5(0xc4)](_0x1dd632[_0x13d0c5(0xcd)])['find'](_0x48bfa0=>_0x48bfa0['threadId']===_0x1dd632['threadId']))==null?void 0x0:_0x170465[_0x13d0c5(0xa0)];_0x15e160&&this[_0x13d0c5(0x94)][_0x13d0c5(0xd4)](_0x3995eb,_0x20148d,_0x15e160['id'],_0x1dd632[_0x13d0c5(0x73)]===I[_0x13d0c5(0xbc)]);break;}}}));}};_=E([S(0x0,c[_0x4f5d82(0xd8)](b['CommentService'])),S(0x1,c[_0x4f5d82(0xd8)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0x4f5d82(0x74)])),S(0x3,c[_0x4f5d82(0xd8)](c[_0x4f5d82(0xcb)]))],_);const q='thread-comment-data-source.config',D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x20880d,_0x310abc,_0x55d938,_0x20e15b)=>{const _0x297285=_0x4f5d82;for(var _0x42341a=_0x20e15b>0x1?void 0x0:_0x20e15b?A(_0x310abc,_0x55d938):_0x310abc,_0x4f65a5=_0x20880d[_0x297285(0x77)]-0x1,_0x49943a;_0x4f65a5>=0x0;_0x4f65a5--)(_0x49943a=_0x20880d[_0x4f65a5])&&(_0x42341a=_0x49943a(_0x42341a)||_0x42341a);return _0x42341a;},C=(_0x57d1ef,_0x5884a6)=>(_0x13e13d,_0x4859bb)=>_0x5884a6(_0x13e13d,_0x4859bb,_0x57d1ef);function _0xf535(){const _0x5a6ebe=['bufferTime','_threadCommentModel','rangeType','CustomRangeType','getMemberID','UniverThreadCommentDataSourcePlugin','symbol','subscribe','getCurrentUser','_sessionService','UniverInstanceType','personId','updateComment','root','_init','1076975JgjLJz','357uDZMjK','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','6797685AmUmRg','OpenOrReOpen','format','_config','5352fhaDJO','customRanges','Unknown','addUser','onStarting','YYYY/MM/DD\x20HH:mm','values','map','7997886gtvgFj','_httpService','_threadCommentDataSource','merge','DependentOn','COMMENT','user','onReady','getComment','/universer-api/comment/unit/','code','Solved','replyId','Add','threadId','IThreadCommentDataSourceService','UniverLicensePlugin','defineProperty','HTTPService','getUnit','disposeWithMe','ref','Disposable','body','Module','requireSession','Injector','227208wyzrte','unitId','Delete','pluginName','comments','users','pipe','_threadCommentDataSourceService','resolveComment','_initUserSync','Solve','3809pYAOAO','Inject','content','userID','/edit','userId','delete','423730WcfhDI','_injector','66VODRQT','forEach','_initDataSource','deleteComment','filter','parse','162980lglJGd','stringify','dayjs','parentId','Edit','solved','UserManagerService','size','listComments','length','commentUpdate$','add','type','replies','_configService','6fPILeA','rangeId','error','/delete','CollaborationSessionService','Reply','resolved','slice','createTimestamp','2pojOmY','get','_userService','UniverThreadCommentUIPlugin','dataSource','getOwnPropertyDescriptor','saveCommentToSnapshot','143Xzvcvw','UNRECOGNIZED','UNIVER_UNKNOWN','/universer-api/user/list','post','/list'];_0xf535=function(){return _0x5a6ebe;};return _0xf535();}function _0xe2d6(_0x139a0c,_0x387bd4){_0x139a0c=_0x139a0c-0x6a;const _0xf535a1=_0xf535();let _0xe2d6c5=_0xf535a1[_0x139a0c];return _0xe2d6c5;}function Y(_0x3bac91,_0x2badd0){const _0x559d08=_0x4f5d82,_0x489f95=_0x3bac91[_0x559d08(0x7b)][0x0];return{..._0x2badd0,'id':_0x489f95[_0x559d08(0xbd)],'resolved':_0x3bac91[_0x559d08(0x73)]===0x1,'dT':f(_0x489f95[_0x559d08(0x85)]),'personId':_0x489f95[_0x559d08(0xdc)],'threadId':_0x489f95[_0x559d08(0xbf)]};}function G(_0x14adf5,_0x1b9034,_0x248c66){const _0x52bc6c=_0x4f5d82;var _0x1eeb7d,_0x5584b8;if(((_0x5584b8=(_0x1eeb7d=_0x14adf5==null?void 0x0:_0x14adf5[_0x52bc6c(0x7b)])==null?void 0x0:_0x1eeb7d[_0x52bc6c(0x77)])!=null?_0x5584b8:0x0)>0x0){const _0x29c9ba=(_0x594ebe,_0x1644ce)=>({'id':_0x594ebe[_0x52bc6c(0xbd)],'threadId':_0x594ebe[_0x52bc6c(0xbf)],'dT':f(_0x594ebe[_0x52bc6c(0x85)]),'personId':_0x594ebe[_0x52bc6c(0xdc)],'resolved':_0x14adf5[_0x52bc6c(0x73)]===I[_0x52bc6c(0xbc)],'unitId':_0x1b9034,'subUnitId':_0x248c66,'text':JSON[_0x52bc6c(0x6d)](_0x594ebe[_0x52bc6c(0xd9)]),'parentId':_0x1644ce}),_0x5afacd=_0x29c9ba(_0x14adf5[_0x52bc6c(0x7b)][0x0]);return{..._0x5afacd,'children':_0x14adf5[_0x52bc6c(0x7b)][_0x52bc6c(0x84)](0x1)['map'](_0x213ae9=>_0x29c9ba(_0x213ae9,_0x5afacd['id']))};}return null;}let p=class{constructor(_0x12eed7,_0x160e5d,_0x528b68){const _0x439388=_0x4f5d82;this[_0x439388(0xb2)]=_0x12eed7,this[_0x439388(0x88)]=_0x160e5d,this[_0x439388(0x9c)]=_0x528b68;}async['addComment'](_0x1eebf2){const _0x42f851=_0x4f5d82;var _0x38cce8,_0x377ddc;const {parentId:_0x31a327,unitId:_0x259262,text:_0x34336b,threadId:_0x40e57f}=_0x1eebf2,_0x556538=(_0x377ddc=(_0x38cce8=_0x34336b['customRanges'])==null?void 0x0:_0x38cce8[_0x42f851(0x6c)](_0x6b9fd4=>_0x6b9fd4['rangeType']===c[_0x42f851(0x96)][_0x42f851(0xb6)])[_0x42f851(0xb0)](_0x114b92=>_0x114b92[_0x42f851(0x7e)]))!=null?_0x377ddc:[],_0xf7e789=JSON[_0x42f851(0x6f)](_0x34336b),_0x120d12=(await this['_sessionService'][_0x42f851(0xca)](_0x259262))[_0x42f851(0x97)]();if(_0x31a327){const _0x2b1f09={'memberId':_0x120d12,'unitId':_0x259262,'content':_0xf7e789,'mention':_0x556538,'threadId':_0x40e57f},_0xdaa8d8=(await this[_0x42f851(0xb2)][_0x42f851(0x91)](_0x42f851(0xba)+_0x259262+'/reply',{'body':_0x2b1f09}))[_0x42f851(0xc8)]['reply'];return{..._0x1eebf2,'id':_0xdaa8d8[_0x42f851(0xbd)],'dT':c['dayjs'](+_0xdaa8d8[_0x42f851(0x85)])[_0x42f851(0xa7)](_0x42f851(0xae)),'personId':_0xdaa8d8['userId']};}else{const _0xd406e6={'memberId':_0x120d12,'unitId':_0x259262,'content':_0xf7e789,'mention':_0x556538},_0x4fdfca=await this['_httpService'][_0x42f851(0x91)]('/universer-api/comment/unit/'+_0x259262+'/add',{'body':_0xd406e6});return Y(_0x4fdfca[_0x42f851(0xc8)]['comment'],_0x1eebf2);}}async['updateComment'](_0x366375){const _0x242645=_0x4f5d82;var _0x4d0700,_0x2f9ddf;const {text:_0x18e31f,unitId:_0xed1719}=_0x366375,_0x353b16=(_0x2f9ddf=(_0x4d0700=_0x18e31f[_0x242645(0xaa)])==null?void 0x0:_0x4d0700['filter'](_0x1e3869=>_0x1e3869[_0x242645(0x95)]===c[_0x242645(0x96)]['COMMENT'])[_0x242645(0xb0)](_0x133419=>_0x133419[_0x242645(0x7e)]))!=null?_0x2f9ddf:[],_0x1eaa33=JSON[_0x242645(0x6f)](_0x18e31f),_0x2ccdb8=_0x366375[_0x242645(0xbf)],_0x22a956=_0x366375['id'],_0x71658a={'memberId':(await this[_0x242645(0x9c)][_0x242645(0xca)](_0xed1719))['getMemberID'](),'unitId':_0xed1719,'threadId':_0x2ccdb8,'mention':_0x353b16,'content':_0x1eaa33,'replyId':_0x22a956},_0x42b189=await this[_0x242645(0xb2)][_0x242645(0x91)](_0x242645(0xba)+_0xed1719+_0x242645(0xdb),{'body':_0x71658a});return!_0x42b189[_0x242645(0xc8)]['error']||_0x42b189[_0x242645(0xc8)][_0x242645(0x7f)][_0x242645(0xbb)]===0x1;}async[_0x4f5d82(0xd4)](_0x5f547c){const _0x5a2b89=_0x4f5d82,{unitId:_0x1053ce}=_0x5f547c,_0x26ef72=_0x5f547c[_0x5a2b89(0xbf)],_0x36ae0e={'memberId':this[_0x5a2b89(0x88)][_0x5a2b89(0x9b)]()[_0x5a2b89(0xda)],'unitId':_0x1053ce,'threadId':_0x26ef72,'solved':_0x5f547c[_0x5a2b89(0x83)]?I['Solved']:I[_0x5a2b89(0xa6)]},_0x51417f=await this[_0x5a2b89(0xb2)]['post']('/universer-api/comment/unit/'+_0x1053ce+'/solved',{'body':_0x36ae0e});return!_0x51417f[_0x5a2b89(0xc8)][_0x5a2b89(0x7f)]||_0x51417f[_0x5a2b89(0xc8)][_0x5a2b89(0x7f)][_0x5a2b89(0xbb)]===0x1;}async[_0x4f5d82(0x6b)](_0x464b6b,_0x4094b1,_0x2d560e,_0xf954d2){const _0x995937=_0x4f5d82,_0x5f42c7={'memberId':(await this[_0x995937(0x9c)][_0x995937(0xca)](_0x464b6b))['getMemberID'](),'threadId':_0x2d560e,'replyId':_0xf954d2,'unitId':_0x464b6b},_0x5e2e46=await this[_0x995937(0xb2)]['post'](_0x995937(0xba)+_0x464b6b+_0x995937(0x80),{'body':_0x5f42c7});return!_0x5e2e46[_0x995937(0xc8)]['error']||_0x5e2e46['body'][_0x995937(0x7f)]['code']===0x1;}async[_0x4f5d82(0x76)](_0x1f4017,_0x31ea29,_0x5efbd9){const _0x5795c9=_0x4f5d82,_0x32ed2f={'unitId':_0x1f4017,'threadId':_0x5efbd9},_0x23ecd4=await this[_0x5795c9(0xb2)][_0x5795c9(0x91)](_0x5795c9(0xba)+_0x1f4017+_0x5795c9(0x92),{'body':_0x32ed2f}),_0x2b2763=_0x5efbd9['map'](_0x2b475d=>G(_0x23ecd4[_0x5795c9(0xc8)][_0x5795c9(0xd0)][_0x2b475d],_0x1f4017,_0x31ea29))[_0x5795c9(0x6c)](Boolean);return Object[_0x5795c9(0xaf)](_0x23ecd4[_0x5795c9(0xc8)][_0x5795c9(0xd1)])[_0x5795c9(0xe1)](_0xa87dec=>{const _0x2ce8c8=_0x5795c9;this['_userService'][_0x2ce8c8(0xac)](_0xa87dec);}),_0x2b2763;}[_0x4f5d82(0x8c)](_0x5a57d2){const _0x3c519a=_0x4f5d82;return{'id':_0x5a57d2['id'],'threadId':_0x5a57d2[_0x3c519a(0xbf)],'ref':_0x5a57d2[_0x3c519a(0xc6)]};}};p=x([C(0x0,c['Inject'](P[_0x4f5d82(0xc3)])),C(0x1,c[_0x4f5d82(0xd8)](c[_0x4f5d82(0x74)])),C(0x2,c['Inject'](b[_0x4f5d82(0x81)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x1adfee,_0x4ab667,_0x2e8c43,_0x3bbb9b)=>{const _0x2bbfbd=_0x4f5d82;for(var _0x36a4d0=_0x3bbb9b>0x1?void 0x0:_0x3bbb9b?H(_0x4ab667,_0x2e8c43):_0x4ab667,_0x34b92a=_0x1adfee[_0x2bbfbd(0x77)]-0x1,_0x3e9723;_0x34b92a>=0x0;_0x34b92a--)(_0x3e9723=_0x1adfee[_0x34b92a])&&(_0x36a4d0=_0x3e9723(_0x36a4d0)||_0x36a4d0);return _0x36a4d0;},y=(_0x360761,_0x5728aa)=>(_0x52970b,_0x4df13b)=>_0x5728aa(_0x52970b,_0x4df13b,_0x360761);let g=class extends c[_0x4f5d82(0xc7)]{constructor(_0x9c5950,_0x13f590){const _0x23ff3a=_0x4f5d82;super(),this[_0x23ff3a(0xd3)]=_0x9c5950,this[_0x23ff3a(0xb3)]=_0x13f590,this[_0x23ff3a(0x6a)]();}[_0x4f5d82(0x6a)](){const _0x34010f=_0x4f5d82;this[_0x34010f(0xd3)][_0x34010f(0x8a)]=this[_0x34010f(0xb3)],this[_0x34010f(0xd3)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x4f5d82(0xc0)]),y(0x1,c[_0x4f5d82(0xd8)](p))],g);var F=Object[_0x4f5d82(0xc2)],L=Object[_0x4f5d82(0x8b)],Z=(_0x1f1ef8,_0x490309,_0x388e38)=>_0x490309 in _0x1f1ef8?F(_0x1f1ef8,_0x490309,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x388e38}):_0x1f1ef8[_0x490309]=_0x388e38,W=(_0xcac7fb,_0x56a5dc,_0x411aa5,_0x2e0460)=>{const _0x27bb44=_0x4f5d82;for(var _0x2846ef=_0x2e0460>0x1?void 0x0:_0x2e0460?L(_0x56a5dc,_0x411aa5):_0x56a5dc,_0x142ab7=_0xcac7fb[_0x27bb44(0x77)]-0x1,_0x49d41a;_0x142ab7>=0x0;_0x142ab7--)(_0x49d41a=_0xcac7fb[_0x142ab7])&&(_0x2846ef=_0x49d41a(_0x2846ef)||_0x2846ef);return _0x2846ef;},O=(_0x5a867a,_0x1c0c5b)=>(_0xc8e5f4,_0x3b8719)=>_0x1c0c5b(_0xc8e5f4,_0x3b8719,_0x5a867a),N=(_0x4d06d0,_0x3f074f,_0x13dd63)=>Z(_0x4d06d0,typeof _0x3f074f!=_0x4f5d82(0x99)?_0x3f074f+'':_0x3f074f,_0x13dd63);exports[_0x4f5d82(0x98)]=class extends c['Plugin']{constructor(_0x341d2a=D,_0x45436f,_0x143fb8){const _0x114186=_0x4f5d82;super(),this[_0x114186(0xa8)]=_0x341d2a,this[_0x114186(0xdf)]=_0x45436f,this[_0x114186(0x7c)]=_0x143fb8;const {..._0x3e3563}=c[_0x114186(0xb4)]({},D,this[_0x114186(0xa8)]);this[_0x114186(0x7c)]['setConfig'](q,_0x3e3563);}[_0x4f5d82(0xad)](){const _0x26c372=_0x4f5d82;[[p],[g],[_]][_0x26c372(0xe1)](_0x2b8fe7=>{const _0x1b8393=_0x26c372;this[_0x1b8393(0xdf)][_0x1b8393(0x79)](_0x2b8fe7);});}[_0x4f5d82(0xb8)](){const _0x3825d8=_0x4f5d82;this[_0x3825d8(0xdf)][_0x3825d8(0x87)](g),this[_0x3825d8(0xdf)][_0x3825d8(0x87)](_);}},N(exports[_0x4f5d82(0x98)],_0x4f5d82(0xcf),U),N(exports[_0x4f5d82(0x98)],_0x4f5d82(0x7a),c[_0x4f5d82(0x9d)][_0x4f5d82(0x8f)]),exports[_0x4f5d82(0x98)]=W([c[_0x4f5d82(0xb5)](w[_0x4f5d82(0x89)],b['UniverCollaborationClientPlugin'],T[_0x4f5d82(0xc1)]),O(0x1,c['Inject'](c['Injector'])),O(0x2,c['IConfigService'])],exports[_0x4f5d82(0x98)]);
1
+ 'use strict';const _0x4485d0=_0x4af3;function _0x4af3(_0x2131ce,_0x4077c7){_0x2131ce=_0x2131ce-0x117;const _0x5b48c2=_0x5b48();let _0x4af311=_0x5b48c2[_0x2131ce];return _0x4af311;}(function(_0x496217,_0x5a4f77){const _0x10fcae=_0x4af3,_0x2b210a=_0x496217();while(!![]){try{const _0x2f9152=parseInt(_0x10fcae(0x139))/0x1*(-parseInt(_0x10fcae(0x177))/0x2)+parseInt(_0x10fcae(0x11e))/0x3*(parseInt(_0x10fcae(0x164))/0x4)+-parseInt(_0x10fcae(0x171))/0x5*(parseInt(_0x10fcae(0x135))/0x6)+-parseInt(_0x10fcae(0x189))/0x7+-parseInt(_0x10fcae(0x140))/0x8+parseInt(_0x10fcae(0x187))/0x9*(parseInt(_0x10fcae(0x183))/0xa)+parseInt(_0x10fcae(0x16a))/0xb;if(_0x2f9152===_0x5a4f77)break;else _0x2b210a['push'](_0x2b210a['shift']());}catch(_0x4dd295){_0x2b210a['push'](_0x2b210a['shift']());}}}(_0x5b48,0xacd1f));Object[_0x4485d0(0x11f)](exports,Symbol[_0x4485d0(0x13c)],{'value':_0x4485d0(0x160)});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=_0x4485d0(0x14f);var I=(_0x74d356=>(_0x74d356[_0x74d356['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x74d356[_0x74d356['Solved']=0x1]=_0x4485d0(0x145),_0x74d356[_0x74d356[_0x4485d0(0x120)]=-0x1]=_0x4485d0(0x120),_0x74d356))(I||{}),v=(_0x4bf3e9=>(_0x4bf3e9[_0x4bf3e9[_0x4485d0(0x168)]=0x0]='Unknown',_0x4bf3e9[_0x4bf3e9[_0x4485d0(0x180)]=0x1]=_0x4485d0(0x180),_0x4bf3e9[_0x4bf3e9[_0x4485d0(0x165)]=0x2]='Reply',_0x4bf3e9[_0x4bf3e9[_0x4485d0(0x166)]=0x3]=_0x4485d0(0x166),_0x4bf3e9[_0x4bf3e9[_0x4485d0(0x138)]=0x4]='Delete',_0x4bf3e9[_0x4bf3e9[_0x4485d0(0x127)]=0x5]=_0x4485d0(0x127),_0x4bf3e9[_0x4bf3e9[_0x4485d0(0x120)]=-0x1]=_0x4485d0(0x120),_0x4bf3e9))(v||{});function _0x5b48(){const _0xe90e07=['UniverThreadCommentUIPlugin','commentUpdate$','onReady','Add','onStarting','addComment','344210ukPQRk','getUnit','_threadCommentModel','_configService','81dCbCiz','post','345450sNtNeW','UserManagerService','UniverThreadCommentDataSourcePlugin','resolved','find','requireSession','IConfigService','stringify','_commentService','/universer-api/comment/unit/','userId','CustomRangeType','UniverInstanceType','1362162YoMzth','defineProperty','UNRECOGNIZED','pluginName','users','Inject','pipe','/universer-api/user/list','UniverCollaborationClientPlugin','Solve','COMMENT','ThreadCommentModel','symbol','body','solved','deleteComment','format','map','addUser','/edit','/solved','resolveComment','_threadCommentDataSourceService','66aINZdD','replies','saveCommentToSnapshot','Delete','1YsLOFV','payload','listComments','toStringTag','CollaborationSessionService','root','_config','5458744hkECLn','user','comment','_injector','comments','Solved','createTimestamp','length','replyId','/add','UniverLicensePlugin','/reply','slice','HTTPService','add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_userService','CommentService','customRanges','_initDataSource','threadId','IThreadCommentDataSourceService','getMemberID','rangeId','_threadCommentDataSource','Plugin','forEach','Injector','getOwnPropertyDescriptor','type','get','subscribe','Module','reply','error','rangeType','4FdJHjS','Reply','Edit','dayjs','Unknown','content','12047772owvyfQ','personId','userID','_initUserSync','values','filter','disposeWithMe','127795Rqufpj','bufferTime','_init','_sessionService','parse','getComment','276764PePFWi','YYYY/MM/DD\x20HH:mm','code','_httpService','getCurrentUser','parentId'];_0x5b48=function(){return _0xe90e07;};return _0x5b48();}const f=_0x285897=>c[_0x4485d0(0x167)](new Date(+_0x285897))[_0x4485d0(0x12e)](_0x4485d0(0x178)),R=async(_0x455202,_0xc32e69)=>{const _0x26fb46=_0x4485d0,_0xb8a3e1=_0x455202[_0x26fb46(0x15e)](c[_0x26fb46(0x18a)]),_0x25fbd1=_0x455202[_0x26fb46(0x15e)](P['HTTPService']);_0xc32e69[_0x26fb46(0x15a)](_0x1362d8=>{_0xb8a3e1['getUser'](_0x1362d8)&&_0xc32e69['delete'](_0x1362d8);}),_0xc32e69['size']&&(await _0x25fbd1[_0x26fb46(0x15e)](_0x26fb46(0x125),{'params':{'userIDs':[..._0xc32e69]}}))['body'][_0x26fb46(0x122)][_0x26fb46(0x15a)](_0x1ad742=>{_0x1ad742&&_0xb8a3e1['addUser'](_0x1ad742);});};var $=Object[_0x4485d0(0x15c)],E=(_0x56bd90,_0x1aec70,_0x48937c,_0x1d63b2)=>{const _0x22d3ee=_0x4485d0;for(var _0x4f4243=_0x1d63b2>0x1?void 0x0:_0x1d63b2?$(_0x1aec70,_0x48937c):_0x1aec70,_0x580166=_0x56bd90[_0x22d3ee(0x147)]-0x1,_0x41bcc5;_0x580166>=0x0;_0x580166--)(_0x41bcc5=_0x56bd90[_0x580166])&&(_0x4f4243=_0x41bcc5(_0x4f4243)||_0x4f4243);return _0x4f4243;},S=(_0x1f1d55,_0x47715b)=>(_0x1a9e7a,_0x4531bf)=>_0x47715b(_0x1a9e7a,_0x4531bf,_0x1f1d55);let _=class extends c['Disposable']{constructor(_0x253a8e,_0x5f83ae,_0x4813ac,_0x263eef){const _0x4060a4=_0x4485d0;super(),this[_0x4060a4(0x119)]=_0x253a8e,this[_0x4060a4(0x185)]=_0x5f83ae,this[_0x4060a4(0x150)]=_0x4813ac,this[_0x4060a4(0x143)]=_0x263eef,this['_init'](),this[_0x4060a4(0x16d)]();}['_initUserSync'](){const _0x390a22=_0x4485d0;this[_0x390a22(0x170)](this[_0x390a22(0x185)][_0x390a22(0x17e)][_0x390a22(0x124)](j[_0x390a22(0x172)](0x10))[_0x390a22(0x15f)](_0x684686=>{const _0x5eed94=_0x390a22,_0x5c1464=new Set();_0x684686[_0x5eed94(0x15a)](_0x80e962=>{const _0x95113a=_0x5eed94;if(_0x80e962[_0x95113a(0x15d)]===_0x95113a(0x14e)){const _0x3fa10f=_0x80e962[_0x95113a(0x13a)][_0x95113a(0x16b)];_0x5c1464[_0x95113a(0x14e)](_0x3fa10f);}}),R(this[_0x5eed94(0x143)],_0x5c1464);}));}[_0x4485d0(0x173)](){const _0x32f2b7=_0x4485d0;this[_0x32f2b7(0x170)](this['_commentService'][_0x32f2b7(0x17e)]['subscribe'](async _0x3b5bb2=>{const _0x450d6b=_0x32f2b7;var _0x2a27d0,_0x4a7102,_0x4e09d5,_0xebbe91;const _0x403e16=(_0x2a27d0=this[_0x450d6b(0x185)][_0x450d6b(0x184)](_0x3b5bb2['unitId'])[_0x450d6b(0x18d)](_0x42ae57=>_0x42ae57['threadId']===_0x3b5bb2[_0x450d6b(0x154)]))==null?void 0x0:_0x2a27d0[_0x450d6b(0x13e)];if(!_0x403e16)return;const {unitId:_0x24959e,subUnitId:_0x32cc45}=_0x403e16;switch(_0x3b5bb2[_0x450d6b(0x141)]&&this['_userService'][_0x450d6b(0x130)](_0x3b5bb2[_0x450d6b(0x141)]),_0x3b5bb2[_0x450d6b(0x15d)]){case v[_0x450d6b(0x180)]:break;case v['Reply']:{this[_0x450d6b(0x185)][_0x450d6b(0x182)](_0x24959e,_0x32cc45,{'unitId':_0x24959e,'subUnitId':_0x32cc45,'ref':'','id':_0x3b5bb2[_0x450d6b(0x148)],'dT':f(+_0x3b5bb2[_0x450d6b(0x146)]),'threadId':_0x3b5bb2[_0x450d6b(0x154)],'personId':(_0x4e09d5=(_0x4a7102=_0x3b5bb2[_0x450d6b(0x141)])==null?void 0x0:_0x4a7102['userID'])!=null?_0x4e09d5:_0x3b5bb2[_0x450d6b(0x11b)],'text':JSON[_0x450d6b(0x175)](_0x3b5bb2[_0x450d6b(0x169)]),'parentId':_0x403e16['id']});break;}case v[_0x450d6b(0x138)]:{const _0x7a2373=this[_0x450d6b(0x185)][_0x450d6b(0x176)](_0x24959e,_0x32cc45,_0x3b5bb2['replyId']);_0x7a2373&&_0x7a2373[_0x450d6b(0x17c)]&&this[_0x450d6b(0x185)][_0x450d6b(0x12d)](_0x24959e,_0x32cc45,_0x3b5bb2[_0x450d6b(0x148)]);break;}case v[_0x450d6b(0x166)]:{this[_0x450d6b(0x185)]['updateComment'](_0x24959e,_0x32cc45,{'commentId':_0x3b5bb2[_0x450d6b(0x148)],'text':JSON[_0x450d6b(0x175)](_0x3b5bb2[_0x450d6b(0x169)])});break;}case v['Solve']:{const _0x241a2b=(_0xebbe91=this[_0x450d6b(0x185)][_0x450d6b(0x184)](_0x3b5bb2['unitId'])[_0x450d6b(0x18d)](_0x1f5eb2=>_0x1f5eb2['threadId']===_0x3b5bb2[_0x450d6b(0x154)]))==null?void 0x0:_0xebbe91[_0x450d6b(0x13e)];_0x241a2b&&this['_threadCommentModel'][_0x450d6b(0x133)](_0x24959e,_0x32cc45,_0x241a2b['id'],_0x3b5bb2['solved']===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x4485d0(0x123)](b[_0x4485d0(0x151)])),S(0x1,c[_0x4485d0(0x123)](M[_0x4485d0(0x129)])),S(0x2,c[_0x4485d0(0x123)](c[_0x4485d0(0x18a)])),S(0x3,c[_0x4485d0(0x123)](c[_0x4485d0(0x15b)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x4485d0(0x15c)],x=(_0x3f83ed,_0x89d256,_0x2c7370,_0x96cfed)=>{const _0x5e2b09=_0x4485d0;for(var _0x5eb9eb=_0x96cfed>0x1?void 0x0:_0x96cfed?A(_0x89d256,_0x2c7370):_0x89d256,_0x5ef3cc=_0x3f83ed[_0x5e2b09(0x147)]-0x1,_0x370b60;_0x5ef3cc>=0x0;_0x5ef3cc--)(_0x370b60=_0x3f83ed[_0x5ef3cc])&&(_0x5eb9eb=_0x370b60(_0x5eb9eb)||_0x5eb9eb);return _0x5eb9eb;},C=(_0x103dd1,_0x10df01)=>(_0x227640,_0x186514)=>_0x10df01(_0x227640,_0x186514,_0x103dd1);function Y(_0x3bf569,_0xc28e10){const _0x20db1a=_0x4485d0,_0x25a38f=_0x3bf569[_0x20db1a(0x136)][0x0];return{..._0xc28e10,'id':_0x25a38f[_0x20db1a(0x148)],'resolved':_0x3bf569[_0x20db1a(0x12c)]===0x1,'dT':f(_0x25a38f[_0x20db1a(0x146)]),'personId':_0x25a38f[_0x20db1a(0x11b)],'threadId':_0x25a38f[_0x20db1a(0x154)]};}function G(_0x405378,_0x3dc330,_0x1ac440){const _0x31163a=_0x4485d0;var _0xa066e7,_0x46d2e5;if(((_0x46d2e5=(_0xa066e7=_0x405378==null?void 0x0:_0x405378['replies'])==null?void 0x0:_0xa066e7[_0x31163a(0x147)])!=null?_0x46d2e5:0x0)>0x0){const _0x356c56=(_0x1e49f0,_0x20d8d1)=>({'id':_0x1e49f0[_0x31163a(0x148)],'threadId':_0x1e49f0[_0x31163a(0x154)],'dT':f(_0x1e49f0[_0x31163a(0x146)]),'personId':_0x1e49f0['userId'],'resolved':_0x405378[_0x31163a(0x12c)]===I[_0x31163a(0x145)],'unitId':_0x3dc330,'subUnitId':_0x1ac440,'text':JSON[_0x31163a(0x175)](_0x1e49f0[_0x31163a(0x169)]),'parentId':_0x20d8d1}),_0x32b92d=_0x356c56(_0x405378['replies'][0x0]);return{..._0x32b92d,'children':_0x405378[_0x31163a(0x136)][_0x31163a(0x14c)](0x1)[_0x31163a(0x12f)](_0x470e50=>_0x356c56(_0x470e50,_0x32b92d['id']))};}return null;}let p=class{constructor(_0x3119c7,_0x2f3c74,_0x2d7c36){const _0x3a40b6=_0x4485d0;this[_0x3a40b6(0x17a)]=_0x3119c7,this['_userService']=_0x2f3c74,this[_0x3a40b6(0x174)]=_0x2d7c36;}async['addComment'](_0x19030c){const _0x2e074c=_0x4485d0;var _0x3dd260,_0x157e14;const {parentId:_0x42c4c5,unitId:_0x417165,text:_0x330a9b,threadId:_0x9306a7}=_0x19030c,_0x462c83=(_0x157e14=(_0x3dd260=_0x330a9b['customRanges'])==null?void 0x0:_0x3dd260['filter'](_0x332c39=>_0x332c39['rangeType']===c[_0x2e074c(0x11c)][_0x2e074c(0x128)])[_0x2e074c(0x12f)](_0x113a8d=>_0x113a8d[_0x2e074c(0x157)]))!=null?_0x157e14:[],_0xeac8b5=JSON[_0x2e074c(0x118)](_0x330a9b),_0x99bcbe=(await this[_0x2e074c(0x174)]['requireSession'](_0x417165))['getMemberID']();if(_0x42c4c5){const _0x280276={'memberId':_0x99bcbe,'unitId':_0x417165,'content':_0xeac8b5,'mention':_0x462c83,'threadId':_0x9306a7},_0x7ff0ef=(await this[_0x2e074c(0x17a)][_0x2e074c(0x188)](_0x2e074c(0x11a)+_0x417165+_0x2e074c(0x14b),{'body':_0x280276}))[_0x2e074c(0x12b)][_0x2e074c(0x161)];return{..._0x19030c,'id':_0x7ff0ef[_0x2e074c(0x148)],'dT':c['dayjs'](+_0x7ff0ef[_0x2e074c(0x146)])[_0x2e074c(0x12e)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x7ff0ef[_0x2e074c(0x11b)]};}else{const _0xe0ab31={'memberId':_0x99bcbe,'unitId':_0x417165,'content':_0xeac8b5,'mention':_0x462c83},_0x34e720=await this[_0x2e074c(0x17a)][_0x2e074c(0x188)]('/universer-api/comment/unit/'+_0x417165+_0x2e074c(0x149),{'body':_0xe0ab31});return Y(_0x34e720[_0x2e074c(0x12b)][_0x2e074c(0x142)],_0x19030c);}}async['updateComment'](_0x58d7d5){const _0x52c1a7=_0x4485d0;var _0x258127,_0x1dcecf;const {text:_0x4d198d,unitId:_0x1847ed}=_0x58d7d5,_0x579b6c=(_0x1dcecf=(_0x258127=_0x4d198d[_0x52c1a7(0x152)])==null?void 0x0:_0x258127[_0x52c1a7(0x16f)](_0x4f7132=>_0x4f7132[_0x52c1a7(0x163)]===c[_0x52c1a7(0x11c)][_0x52c1a7(0x128)])[_0x52c1a7(0x12f)](_0x974ce0=>_0x974ce0[_0x52c1a7(0x157)]))!=null?_0x1dcecf:[],_0x342f64=JSON[_0x52c1a7(0x118)](_0x4d198d),_0x1a472e=_0x58d7d5[_0x52c1a7(0x154)],_0x4f2624=_0x58d7d5['id'],_0x4cdfba={'memberId':(await this[_0x52c1a7(0x174)][_0x52c1a7(0x18e)](_0x1847ed))[_0x52c1a7(0x156)](),'unitId':_0x1847ed,'threadId':_0x1a472e,'mention':_0x579b6c,'content':_0x342f64,'replyId':_0x4f2624},_0x3197cd=await this[_0x52c1a7(0x17a)]['post'](_0x52c1a7(0x11a)+_0x1847ed+_0x52c1a7(0x131),{'body':_0x4cdfba});return!_0x3197cd[_0x52c1a7(0x12b)][_0x52c1a7(0x162)]||_0x3197cd[_0x52c1a7(0x12b)][_0x52c1a7(0x162)][_0x52c1a7(0x179)]===0x1;}async['resolveComment'](_0x5eb72f){const _0x5a0562=_0x4485d0,{unitId:_0x4288e9}=_0x5eb72f,_0x11c57f=_0x5eb72f[_0x5a0562(0x154)],_0x4af4e4={'memberId':this[_0x5a0562(0x150)][_0x5a0562(0x17b)]()[_0x5a0562(0x16c)],'unitId':_0x4288e9,'threadId':_0x11c57f,'solved':_0x5eb72f[_0x5a0562(0x18c)]?I[_0x5a0562(0x145)]:I['OpenOrReOpen']},_0x48b55e=await this[_0x5a0562(0x17a)][_0x5a0562(0x188)](_0x5a0562(0x11a)+_0x4288e9+_0x5a0562(0x132),{'body':_0x4af4e4});return!_0x48b55e[_0x5a0562(0x12b)][_0x5a0562(0x162)]||_0x48b55e[_0x5a0562(0x12b)][_0x5a0562(0x162)][_0x5a0562(0x179)]===0x1;}async[_0x4485d0(0x12d)](_0x608403,_0x7bc88c,_0x3f5ea1,_0x540086){const _0x5f581d=_0x4485d0,_0x3a8583={'memberId':(await this[_0x5f581d(0x174)][_0x5f581d(0x18e)](_0x608403))[_0x5f581d(0x156)](),'threadId':_0x3f5ea1,'replyId':_0x540086,'unitId':_0x608403},_0x511e5f=await this[_0x5f581d(0x17a)][_0x5f581d(0x188)]('/universer-api/comment/unit/'+_0x608403+'/delete',{'body':_0x3a8583});return!_0x511e5f['body'][_0x5f581d(0x162)]||_0x511e5f[_0x5f581d(0x12b)][_0x5f581d(0x162)][_0x5f581d(0x179)]===0x1;}async[_0x4485d0(0x13b)](_0x28fb89,_0x52aca7,_0x356263){const _0x19a231=_0x4485d0,_0x7f055c={'unitId':_0x28fb89,'threadId':_0x356263},_0x2fca40=await this[_0x19a231(0x17a)][_0x19a231(0x188)]('/universer-api/comment/unit/'+_0x28fb89+'/list',{'body':_0x7f055c}),_0x5c942b=_0x356263['map'](_0x1e0c4d=>G(_0x2fca40[_0x19a231(0x12b)][_0x19a231(0x144)][_0x1e0c4d],_0x28fb89,_0x52aca7))[_0x19a231(0x16f)](Boolean);return Object[_0x19a231(0x16e)](_0x2fca40[_0x19a231(0x12b)][_0x19a231(0x122)])[_0x19a231(0x15a)](_0x542868=>{const _0x45b658=_0x19a231;this['_userService'][_0x45b658(0x130)](_0x542868);}),_0x5c942b;}[_0x4485d0(0x137)](_0x1b7fc3){return{'id':_0x1b7fc3['id'],'threadId':_0x1b7fc3['threadId'],'ref':_0x1b7fc3['ref']};}};p=x([C(0x0,c['Inject'](P[_0x4485d0(0x14d)])),C(0x1,c['Inject'](c[_0x4485d0(0x18a)])),C(0x2,c[_0x4485d0(0x123)](b[_0x4485d0(0x13d)]))],p);var H=Object[_0x4485d0(0x15c)],J=(_0x21ffda,_0x3e7c90,_0x3b99ad,_0xcded46)=>{for(var _0x5de86d=_0xcded46>0x1?void 0x0:_0xcded46?H(_0x3e7c90,_0x3b99ad):_0x3e7c90,_0x571e3f=_0x21ffda['length']-0x1,_0x2eba8a;_0x571e3f>=0x0;_0x571e3f--)(_0x2eba8a=_0x21ffda[_0x571e3f])&&(_0x5de86d=_0x2eba8a(_0x5de86d)||_0x5de86d);return _0x5de86d;},y=(_0x3aaab7,_0x2fdb74)=>(_0x129747,_0x789f8d)=>_0x2fdb74(_0x129747,_0x789f8d,_0x3aaab7);let g=class extends c['Disposable']{constructor(_0x25c56b,_0x2fbc4d){const _0x224ed8=_0x4485d0;super(),this['_threadCommentDataSourceService']=_0x25c56b,this['_threadCommentDataSource']=_0x2fbc4d,this[_0x224ed8(0x153)]();}['_initDataSource'](){const _0xed1f4c=_0x4485d0;this[_0xed1f4c(0x134)]['dataSource']=this[_0xed1f4c(0x158)],this[_0xed1f4c(0x134)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x4485d0(0x155)]),y(0x1,c['Inject'](p))],g);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x2ea3cc,_0x5ef46d,_0x2b169c)=>_0x5ef46d in _0x2ea3cc?F(_0x2ea3cc,_0x5ef46d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2b169c}):_0x2ea3cc[_0x5ef46d]=_0x2b169c,W=(_0x5854c2,_0x1392be,_0x1b9687,_0x1ddbfc)=>{for(var _0x5133af=_0x1ddbfc>0x1?void 0x0:_0x1ddbfc?L(_0x1392be,_0x1b9687):_0x1392be,_0x1e77ba=_0x5854c2['length']-0x1,_0x32f5e5;_0x1e77ba>=0x0;_0x1e77ba--)(_0x32f5e5=_0x5854c2[_0x1e77ba])&&(_0x5133af=_0x32f5e5(_0x5133af)||_0x5133af);return _0x5133af;},O=(_0x4587ec,_0x4b6fbe)=>(_0x514f5a,_0x463206)=>_0x4b6fbe(_0x514f5a,_0x463206,_0x4587ec),N=(_0x5e7846,_0x465ab6,_0xf299ba)=>Z(_0x5e7846,typeof _0x465ab6!=_0x4485d0(0x12a)?_0x465ab6+'':_0x465ab6,_0xf299ba);exports[_0x4485d0(0x18b)]=class extends c[_0x4485d0(0x159)]{constructor(_0x18b9e3=D,_0x3934f7,_0xc2f1a6){const _0xb270cb=_0x4485d0;super(),this[_0xb270cb(0x13f)]=_0x18b9e3,this[_0xb270cb(0x143)]=_0x3934f7,this['_configService']=_0xc2f1a6;const {..._0x4d1d56}=c['merge']({},D,this['_config']);this[_0xb270cb(0x186)]['setConfig'](q,_0x4d1d56);}[_0x4485d0(0x181)](){const _0x39c08b=_0x4485d0;[[p],[g],[_]][_0x39c08b(0x15a)](_0x1a4202=>{const _0x45c622=_0x39c08b;this['_injector'][_0x45c622(0x14e)](_0x1a4202);});}[_0x4485d0(0x17f)](){const _0x48d98e=_0x4485d0;this['_injector']['get'](g),this[_0x48d98e(0x143)]['get'](_);}},N(exports[_0x4485d0(0x18b)],_0x4485d0(0x121),U),N(exports[_0x4485d0(0x18b)],_0x4485d0(0x15d),c[_0x4485d0(0x11d)]['UNIVER_UNKNOWN']),exports[_0x4485d0(0x18b)]=W([c['DependentOn'](w[_0x4485d0(0x17d)],b[_0x4485d0(0x126)],T[_0x4485d0(0x14a)]),O(0x1,c[_0x4485d0(0x123)](c[_0x4485d0(0x15b)])),O(0x2,c[_0x4485d0(0x117)])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x4180b1=_0x1b28;(function(_0x45c067,_0x51230a){const _0x42e990=_0x1b28,_0x246baa=_0x45c067();while(!![]){try{const _0x375104=-parseInt(_0x42e990(0x1c3))/0x1+parseInt(_0x42e990(0x1c2))/0x2+parseInt(_0x42e990(0x191))/0x3+parseInt(_0x42e990(0x1cb))/0x4+-parseInt(_0x42e990(0x1f6))/0x5*(-parseInt(_0x42e990(0x1d1))/0x6)+parseInt(_0x42e990(0x1a4))/0x7*(-parseInt(_0x42e990(0x19c))/0x8)+-parseInt(_0x42e990(0x1eb))/0x9;if(_0x375104===_0x51230a)break;else _0x246baa['push'](_0x246baa['shift']());}catch(_0x3f3f14){_0x246baa['push'](_0x246baa['shift']());}}}(_0x1166,0xa6f05));import{CommentService as _0x1bb26a,CollaborationSessionService as _0x4700fa,UniverCollaborationClientPlugin as _0x2add79}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3a6dc9}from'@univerjs-pro/license';import{dayjs as _0x30e5fe,UserManagerService as _0x51e746,Inject as _0x54c27f,Injector as _0x1bb80b,Disposable as _0x287a8e,CustomRangeType as _0x2aa294,UniverInstanceType as _0x140979,DependentOn as _0x5d589e,IConfigService as _0x4d8774,Plugin as _0x558095,merge as _0x599c45}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x31f759}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5bccec,IThreadCommentDataSourceService as _0x241c92}from'@univerjs/thread-comment';function _0x1b28(_0x586063,_0x361029){_0x586063=_0x586063-0x18e;const _0x11660c=_0x1166();let _0x1b28d9=_0x11660c[_0x586063];return _0x1b28d9;}function _0x1166(){const _0x18a0fa=['_httpService','Reply','find','threadId','commentUpdate$','syncUpdateMutationToColla','disposeWithMe','_init','getMemberID','OpenOrReOpen','8FmOohS','values','UNIVER_UNKNOWN','Solve','solved','content','replies','slice','4365298JBqJVa','dataSource','error','ref','_userService','requireSession','post','customRanges','comments','Delete','getCurrentUser','length','_injector','stringify','code','updateComment','symbol','_config','deleteComment','pipe','rangeType','/universer-api/user/list','listComments','thread-comment-data-source.config','payload','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','add','YYYY/MM/DD\x20HH:mm','userId','_threadCommentDataSourceService','605010drKAoN','239647NxdiYz','/list','_initDataSource','root','format','subscribe','/edit','personId','2724836LsGDtp','resolved','addComment','getUnit','map','_sessionService','7818AfBCEz','_commentService','Solved','_threadCommentModel','get','saveCommentToSnapshot','type','defineProperty','setConfig','getUser','unitId','COMMENT','Edit','onStarting','replyId','resolveComment','forEach','size','rangeId','/universer-api/comment/unit/','addUser','_threadCommentDataSource','/add','parentId','_initUserSync','getOwnPropertyDescriptor','6674544Ladixe','body','users','Unknown','pluginName','createTimestamp','_configService','parse','userID','UNRECOGNIZED','Add','3145LAjTUw','/solved','user','delete','filter','getComment','1456071pFSVhQ'];_0x1166=function(){return _0x18a0fa;};return _0x1166();}import{bufferTime as _0x545da4}from'rxjs';import{HTTPService as _0x163b66}from'@univerjs/network';const W=_0x4180b1(0x1bd);var I=(_0x2b5efb=>(_0x2b5efb[_0x2b5efb[_0x4180b1(0x19b)]=0x0]=_0x4180b1(0x19b),_0x2b5efb[_0x2b5efb[_0x4180b1(0x1d3)]=0x1]=_0x4180b1(0x1d3),_0x2b5efb[_0x2b5efb['UNRECOGNIZED']=-0x1]=_0x4180b1(0x1f4),_0x2b5efb))(I||{}),v=(_0x382e20=>(_0x382e20[_0x382e20[_0x4180b1(0x1ee)]=0x0]=_0x4180b1(0x1ee),_0x382e20[_0x382e20[_0x4180b1(0x1f5)]=0x1]=_0x4180b1(0x1f5),_0x382e20[_0x382e20[_0x4180b1(0x193)]=0x2]='Reply',_0x382e20[_0x382e20['Edit']=0x3]=_0x4180b1(0x1dd),_0x382e20[_0x382e20['Delete']=0x4]=_0x4180b1(0x1ad),_0x382e20[_0x382e20['Solve']=0x5]=_0x4180b1(0x19f),_0x382e20[_0x382e20[_0x4180b1(0x1f4)]=-0x1]=_0x4180b1(0x1f4),_0x382e20))(v||{});const y=_0x22a6f2=>_0x30e5fe(new Date(+_0x22a6f2))[_0x4180b1(0x1c7)](_0x4180b1(0x1bf)),B=async(_0x400022,_0x1d45c1)=>{const _0x1fbe53=_0x4180b1,_0x65dc99=_0x400022[_0x1fbe53(0x1d5)](_0x51e746),_0x28e80f=_0x400022[_0x1fbe53(0x1d5)](_0x163b66);_0x1d45c1[_0x1fbe53(0x1e1)](_0x419660=>{const _0xe41fd7=_0x1fbe53;_0x65dc99[_0xe41fd7(0x1da)](_0x419660)&&_0x1d45c1[_0xe41fd7(0x18e)](_0x419660);}),_0x1d45c1[_0x1fbe53(0x1e2)]&&(await _0x28e80f[_0x1fbe53(0x1d5)](_0x1fbe53(0x1b9),{'params':{'userIDs':[..._0x1d45c1]}}))[_0x1fbe53(0x1ec)][_0x1fbe53(0x1ed)]['forEach'](_0x10324e=>{_0x10324e&&_0x65dc99['addUser'](_0x10324e);});};var K=Object[_0x4180b1(0x1ea)],V=(_0x1ae3bc,_0x42c782,_0x21411a,_0x4ddfc5)=>{for(var _0x541b68=_0x4ddfc5>0x1?void 0x0:_0x4ddfc5?K(_0x42c782,_0x21411a):_0x42c782,_0x2f367e=_0x1ae3bc['length']-0x1,_0x3eb078;_0x2f367e>=0x0;_0x2f367e--)(_0x3eb078=_0x1ae3bc[_0x2f367e])&&(_0x541b68=_0x3eb078(_0x541b68)||_0x541b68);return _0x541b68;},p=(_0x1abbf9,_0xdb968d)=>(_0x1021e2,_0x840ee9)=>_0xdb968d(_0x1021e2,_0x840ee9,_0x1abbf9);let _=class extends _0x287a8e{constructor(_0x344e1b,_0x324a00,_0x2b4e2a,_0x1200e6){const _0x1eb32f=_0x4180b1;super(),this['_commentService']=_0x344e1b,this['_threadCommentModel']=_0x324a00,this[_0x1eb32f(0x1a8)]=_0x2b4e2a,this[_0x1eb32f(0x1b0)]=_0x1200e6,this[_0x1eb32f(0x199)](),this[_0x1eb32f(0x1e9)]();}[_0x4180b1(0x1e9)](){const _0x7d27d8=_0x4180b1;this['disposeWithMe'](this[_0x7d27d8(0x1d4)][_0x7d27d8(0x196)][_0x7d27d8(0x1b7)](_0x545da4(0x10))[_0x7d27d8(0x1c8)](_0x27832f=>{const _0xf5d0ab=_0x7d27d8,_0x5127f3=new Set();_0x27832f[_0xf5d0ab(0x1e1)](_0xfe75a2=>{const _0x346f30=_0xf5d0ab;if(_0xfe75a2['type']===_0x346f30(0x1be)){const _0x4b2e81=_0xfe75a2[_0x346f30(0x1bc)][_0x346f30(0x1ca)];_0x5127f3['add'](_0x4b2e81);}}),B(this[_0xf5d0ab(0x1b0)],_0x5127f3);}));}[_0x4180b1(0x199)](){const _0x2eecb9=_0x4180b1;this[_0x2eecb9(0x198)](this[_0x2eecb9(0x1d2)]['commentUpdate$'][_0x2eecb9(0x1c8)](async _0x3973d9=>{const _0x2f9ade=_0x2eecb9;var _0x30c52e,_0x47bfd2,_0x59621a,_0x2c5c24;const _0x2cf086=(_0x30c52e=this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1ce)](_0x3973d9[_0x2f9ade(0x1db)])[_0x2f9ade(0x194)](_0x14fd6c=>_0x14fd6c[_0x2f9ade(0x195)]===_0x3973d9[_0x2f9ade(0x195)]))==null?void 0x0:_0x30c52e[_0x2f9ade(0x1c6)];if(!_0x2cf086)return;const {unitId:_0x1399a6,subUnitId:_0x26c242}=_0x2cf086;switch(_0x3973d9[_0x2f9ade(0x1f8)]&&this[_0x2f9ade(0x1a8)][_0x2f9ade(0x1e5)](_0x3973d9[_0x2f9ade(0x1f8)]),_0x3973d9[_0x2f9ade(0x1d7)]){case v[_0x2f9ade(0x1f5)]:break;case v[_0x2f9ade(0x193)]:{this[_0x2f9ade(0x1d4)]['addComment'](_0x1399a6,_0x26c242,{'unitId':_0x1399a6,'subUnitId':_0x26c242,'ref':'','id':_0x3973d9[_0x2f9ade(0x1df)],'dT':y(+_0x3973d9[_0x2f9ade(0x1f0)]),'threadId':_0x3973d9[_0x2f9ade(0x195)],'personId':(_0x59621a=(_0x47bfd2=_0x3973d9['user'])==null?void 0x0:_0x47bfd2['userID'])!=null?_0x59621a:_0x3973d9['userId'],'text':JSON[_0x2f9ade(0x1f2)](_0x3973d9['content']),'parentId':_0x2cf086['id']});break;}case v['Delete']:{const _0x1888c4=this[_0x2f9ade(0x1d4)][_0x2f9ade(0x190)](_0x1399a6,_0x26c242,_0x3973d9[_0x2f9ade(0x1df)]);_0x1888c4&&_0x1888c4[_0x2f9ade(0x1e8)]&&this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1b6)](_0x1399a6,_0x26c242,_0x3973d9[_0x2f9ade(0x1df)]);break;}case v[_0x2f9ade(0x1dd)]:{this['_threadCommentModel'][_0x2f9ade(0x1b3)](_0x1399a6,_0x26c242,{'commentId':_0x3973d9[_0x2f9ade(0x1df)],'text':JSON[_0x2f9ade(0x1f2)](_0x3973d9['content'])});break;}case v[_0x2f9ade(0x19f)]:{const _0x566ab5=(_0x2c5c24=this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1ce)](_0x3973d9[_0x2f9ade(0x1db)])[_0x2f9ade(0x194)](_0x1adc4f=>_0x1adc4f[_0x2f9ade(0x195)]===_0x3973d9['threadId']))==null?void 0x0:_0x2c5c24[_0x2f9ade(0x1c6)];_0x566ab5&&this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1e0)](_0x1399a6,_0x26c242,_0x566ab5['id'],_0x3973d9['solved']===I['Solved']);break;}}}));}};_=V([p(0x0,_0x54c27f(_0x1bb26a)),p(0x1,_0x54c27f(_0x5bccec)),p(0x2,_0x54c27f(_0x51e746)),p(0x3,_0x54c27f(_0x1bb80b))],_);const z=_0x4180b1(0x1bb),O={};var k=Object[_0x4180b1(0x1ea)],Q=(_0x401308,_0x2d430f,_0x548ef8,_0x48ae08)=>{const _0x51f55b=_0x4180b1;for(var _0x31d046=_0x48ae08>0x1?void 0x0:_0x48ae08?k(_0x2d430f,_0x548ef8):_0x2d430f,_0x521725=_0x401308[_0x51f55b(0x1af)]-0x1,_0x31273f;_0x521725>=0x0;_0x521725--)(_0x31273f=_0x401308[_0x521725])&&(_0x31d046=_0x31273f(_0x31d046)||_0x31d046);return _0x31d046;},b=(_0x2cbfd9,_0x440532)=>(_0x520e32,_0x259c16)=>_0x440532(_0x520e32,_0x259c16,_0x2cbfd9);function X(_0x4ff5ea,_0x4298c4){const _0x5abf8f=_0x4180b1,_0x564bcb=_0x4ff5ea[_0x5abf8f(0x1a2)][0x0];return{..._0x4298c4,'id':_0x564bcb[_0x5abf8f(0x1df)],'resolved':_0x4ff5ea[_0x5abf8f(0x1a0)]===0x1,'dT':y(_0x564bcb[_0x5abf8f(0x1f0)]),'personId':_0x564bcb[_0x5abf8f(0x1c0)],'threadId':_0x564bcb[_0x5abf8f(0x195)]};}function ee(_0x54080d,_0x4584f6,_0x13340a){const _0x4bf80d=_0x4180b1;var _0x445c99,_0x5c21d4;if(((_0x5c21d4=(_0x445c99=_0x54080d==null?void 0x0:_0x54080d[_0x4bf80d(0x1a2)])==null?void 0x0:_0x445c99[_0x4bf80d(0x1af)])!=null?_0x5c21d4:0x0)>0x0){const _0x4dc295=(_0xd8eeb5,_0x16f077)=>({'id':_0xd8eeb5['replyId'],'threadId':_0xd8eeb5[_0x4bf80d(0x195)],'dT':y(_0xd8eeb5[_0x4bf80d(0x1f0)]),'personId':_0xd8eeb5['userId'],'resolved':_0x54080d[_0x4bf80d(0x1a0)]===I[_0x4bf80d(0x1d3)],'unitId':_0x4584f6,'subUnitId':_0x13340a,'text':JSON[_0x4bf80d(0x1f2)](_0xd8eeb5[_0x4bf80d(0x1a1)]),'parentId':_0x16f077}),_0x3c9a6f=_0x4dc295(_0x54080d[_0x4bf80d(0x1a2)][0x0]);return{..._0x3c9a6f,'children':_0x54080d[_0x4bf80d(0x1a2)][_0x4bf80d(0x1a3)](0x1)[_0x4bf80d(0x1cf)](_0x4c18e7=>_0x4dc295(_0x4c18e7,_0x3c9a6f['id']))};}return null;}let S=class{constructor(_0x24b567,_0x2c79c5,_0x5bb221){const _0x3c1c12=_0x4180b1;this['_httpService']=_0x24b567,this[_0x3c1c12(0x1a8)]=_0x2c79c5,this[_0x3c1c12(0x1d0)]=_0x5bb221;}async[_0x4180b1(0x1cd)](_0x7a351f){const _0x42097a=_0x4180b1;var _0x14f825,_0x59c911;const {parentId:_0x2de79b,unitId:_0x551632,text:_0x4aba44,threadId:_0x51dbfb}=_0x7a351f,_0x431461=(_0x59c911=(_0x14f825=_0x4aba44[_0x42097a(0x1ab)])==null?void 0x0:_0x14f825[_0x42097a(0x18f)](_0x1596a5=>_0x1596a5[_0x42097a(0x1b8)]===_0x2aa294[_0x42097a(0x1dc)])[_0x42097a(0x1cf)](_0x5765e4=>_0x5765e4['rangeId']))!=null?_0x59c911:[],_0x123ef9=JSON[_0x42097a(0x1b1)](_0x4aba44),_0x2af36d=(await this[_0x42097a(0x1d0)][_0x42097a(0x1a9)](_0x551632))['getMemberID']();if(_0x2de79b){const _0x566cac={'memberId':_0x2af36d,'unitId':_0x551632,'content':_0x123ef9,'mention':_0x431461,'threadId':_0x51dbfb},_0x4710cf=(await this['_httpService'][_0x42097a(0x1aa)]('/universer-api/comment/unit/'+_0x551632+'/reply',{'body':_0x566cac}))[_0x42097a(0x1ec)]['reply'];return{..._0x7a351f,'id':_0x4710cf[_0x42097a(0x1df)],'dT':_0x30e5fe(+_0x4710cf['createTimestamp'])['format'](_0x42097a(0x1bf)),'personId':_0x4710cf[_0x42097a(0x1c0)]};}else{const _0x128dd9={'memberId':_0x2af36d,'unitId':_0x551632,'content':_0x123ef9,'mention':_0x431461},_0x55b263=await this[_0x42097a(0x192)]['post'](_0x42097a(0x1e4)+_0x551632+_0x42097a(0x1e7),{'body':_0x128dd9});return X(_0x55b263['body']['comment'],_0x7a351f);}}async[_0x4180b1(0x1b3)](_0x51b87d){const _0x189af2=_0x4180b1;var _0x20e6de,_0x226c8c;const {text:_0x3eac6b,unitId:_0x4ae742}=_0x51b87d,_0x5a7919=(_0x226c8c=(_0x20e6de=_0x3eac6b[_0x189af2(0x1ab)])==null?void 0x0:_0x20e6de[_0x189af2(0x18f)](_0x47f52d=>_0x47f52d['rangeType']===_0x2aa294[_0x189af2(0x1dc)])[_0x189af2(0x1cf)](_0x4a2ae5=>_0x4a2ae5[_0x189af2(0x1e3)]))!=null?_0x226c8c:[],_0xc200c6=JSON[_0x189af2(0x1b1)](_0x3eac6b),_0x2cfed9=_0x51b87d['threadId'],_0x4e46d6=_0x51b87d['id'],_0x65513a={'memberId':(await this[_0x189af2(0x1d0)][_0x189af2(0x1a9)](_0x4ae742))[_0x189af2(0x19a)](),'unitId':_0x4ae742,'threadId':_0x2cfed9,'mention':_0x5a7919,'content':_0xc200c6,'replyId':_0x4e46d6},_0x51d894=await this[_0x189af2(0x192)][_0x189af2(0x1aa)](_0x189af2(0x1e4)+_0x4ae742+_0x189af2(0x1c9),{'body':_0x65513a});return!_0x51d894[_0x189af2(0x1ec)]['error']||_0x51d894['body'][_0x189af2(0x1a6)][_0x189af2(0x1b2)]===0x1;}async[_0x4180b1(0x1e0)](_0x16d46d){const _0x5e02dd=_0x4180b1,{unitId:_0x3a8616}=_0x16d46d,_0x5be6dc=_0x16d46d[_0x5e02dd(0x195)],_0x5c6cad={'memberId':this['_userService'][_0x5e02dd(0x1ae)]()[_0x5e02dd(0x1f3)],'unitId':_0x3a8616,'threadId':_0x5be6dc,'solved':_0x16d46d[_0x5e02dd(0x1cc)]?I[_0x5e02dd(0x1d3)]:I[_0x5e02dd(0x19b)]},_0x35efe3=await this[_0x5e02dd(0x192)][_0x5e02dd(0x1aa)](_0x5e02dd(0x1e4)+_0x3a8616+_0x5e02dd(0x1f7),{'body':_0x5c6cad});return!_0x35efe3[_0x5e02dd(0x1ec)][_0x5e02dd(0x1a6)]||_0x35efe3[_0x5e02dd(0x1ec)][_0x5e02dd(0x1a6)][_0x5e02dd(0x1b2)]===0x1;}async[_0x4180b1(0x1b6)](_0x292e3b,_0x4fb793,_0x6fbc1,_0x121f2f){const _0x275376=_0x4180b1,_0x38970c={'memberId':(await this[_0x275376(0x1d0)]['requireSession'](_0x292e3b))[_0x275376(0x19a)](),'threadId':_0x6fbc1,'replyId':_0x121f2f,'unitId':_0x292e3b},_0x1de803=await this[_0x275376(0x192)][_0x275376(0x1aa)]('/universer-api/comment/unit/'+_0x292e3b+'/delete',{'body':_0x38970c});return!_0x1de803['body'][_0x275376(0x1a6)]||_0x1de803[_0x275376(0x1ec)][_0x275376(0x1a6)][_0x275376(0x1b2)]===0x1;}async[_0x4180b1(0x1ba)](_0x55381e,_0x1e90ed,_0xa7511){const _0x5d3fe3=_0x4180b1,_0x4cfdaa={'unitId':_0x55381e,'threadId':_0xa7511},_0x464474=await this[_0x5d3fe3(0x192)]['post']('/universer-api/comment/unit/'+_0x55381e+_0x5d3fe3(0x1c4),{'body':_0x4cfdaa}),_0x3d4464=_0xa7511[_0x5d3fe3(0x1cf)](_0x432373=>ee(_0x464474[_0x5d3fe3(0x1ec)][_0x5d3fe3(0x1ac)][_0x432373],_0x55381e,_0x1e90ed))['filter'](Boolean);return Object[_0x5d3fe3(0x19d)](_0x464474[_0x5d3fe3(0x1ec)][_0x5d3fe3(0x1ed)])[_0x5d3fe3(0x1e1)](_0xed875e=>{const _0xd9a734=_0x5d3fe3;this[_0xd9a734(0x1a8)][_0xd9a734(0x1e5)](_0xed875e);}),_0x3d4464;}[_0x4180b1(0x1d6)](_0xdc9b74){const _0x35ae6d=_0x4180b1;return{'id':_0xdc9b74['id'],'threadId':_0xdc9b74[_0x35ae6d(0x195)],'ref':_0xdc9b74[_0x35ae6d(0x1a7)]};}};S=Q([b(0x0,_0x54c27f(_0x163b66)),b(0x1,_0x54c27f(_0x51e746)),b(0x2,_0x54c27f(_0x4700fa))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x54ae4e,_0x34324a,_0x1bbce1,_0x2a5703)=>{for(var _0x2091cd=_0x2a5703>0x1?void 0x0:_0x2a5703?re(_0x34324a,_0x1bbce1):_0x34324a,_0x3ecbf2=_0x54ae4e['length']-0x1,_0x41d4e4;_0x3ecbf2>=0x0;_0x3ecbf2--)(_0x41d4e4=_0x54ae4e[_0x3ecbf2])&&(_0x2091cd=_0x41d4e4(_0x2091cd)||_0x2091cd);return _0x2091cd;},M=(_0x39762c,_0x3e5f19)=>(_0x335f35,_0x463934)=>_0x3e5f19(_0x335f35,_0x463934,_0x39762c);let f=class extends _0x287a8e{constructor(_0x59778c,_0xf8c71a){const _0x5e9f60=_0x4180b1;super(),this['_threadCommentDataSourceService']=_0x59778c,this['_threadCommentDataSource']=_0xf8c71a,this[_0x5e9f60(0x1c5)]();}[_0x4180b1(0x1c5)](){const _0x195265=_0x4180b1;this[_0x195265(0x1c1)][_0x195265(0x1a5)]=this[_0x195265(0x1e6)],this[_0x195265(0x1c1)][_0x195265(0x197)]=!0x1;}};f=te([M(0x0,_0x241c92),M(0x1,_0x54c27f(S))],f);var se=Object[_0x4180b1(0x1d8)],oe=Object[_0x4180b1(0x1ea)],ne=(_0x571635,_0x1c79d1,_0x3b87f3)=>_0x1c79d1 in _0x571635?se(_0x571635,_0x1c79d1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b87f3}):_0x571635[_0x1c79d1]=_0x3b87f3,ie=(_0xac8d0f,_0x20edc6,_0x2850e2,_0x5efb4e)=>{const _0x52f1fe=_0x4180b1;for(var _0x1f6064=_0x5efb4e>0x1?void 0x0:_0x5efb4e?oe(_0x20edc6,_0x2850e2):_0x20edc6,_0x2ae1f4=_0xac8d0f[_0x52f1fe(0x1af)]-0x1,_0x4597e2;_0x2ae1f4>=0x0;_0x2ae1f4--)(_0x4597e2=_0xac8d0f[_0x2ae1f4])&&(_0x1f6064=_0x4597e2(_0x1f6064)||_0x1f6064);return _0x1f6064;},N=(_0x53f721,_0x492d4e)=>(_0x3bb541,_0x4de18c)=>_0x492d4e(_0x3bb541,_0x4de18c,_0x53f721),$=(_0x1553f1,_0x5dafc0,_0x3f2344)=>ne(_0x1553f1,typeof _0x5dafc0!=_0x4180b1(0x1b4)?_0x5dafc0+'':_0x5dafc0,_0x3f2344);let g=class extends _0x558095{constructor(_0x4a397c=O,_0x3eae51,_0x15ae92){const _0x320c52=_0x4180b1;super(),this[_0x320c52(0x1b5)]=_0x4a397c,this['_injector']=_0x3eae51,this[_0x320c52(0x1f1)]=_0x15ae92;const {..._0x3b9956}=_0x599c45({},O,this[_0x320c52(0x1b5)]);this[_0x320c52(0x1f1)][_0x320c52(0x1d9)](z,_0x3b9956);}[_0x4180b1(0x1de)](){[[S],[f],[_]]['forEach'](_0x10f72e=>{const _0x666667=_0x1b28;this[_0x666667(0x1b0)][_0x666667(0x1be)](_0x10f72e);});}['onReady'](){const _0x4996bd=_0x4180b1;this['_injector'][_0x4996bd(0x1d5)](f),this[_0x4996bd(0x1b0)]['get'](_);}};$(g,_0x4180b1(0x1ef),W),$(g,_0x4180b1(0x1d7),_0x140979[_0x4180b1(0x19e)]),g=ie([_0x5d589e(_0x31f759,_0x2add79,_0x3a6dc9),N(0x1,_0x54c27f(_0x1bb80b)),N(0x2,_0x4d8774)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0xe6a052=_0x4fcb;(function(_0x24bf2d,_0x4f925b){const _0x7e76f8=_0x4fcb,_0x347f4d=_0x24bf2d();while(!![]){try{const _0x5d0bd8=parseInt(_0x7e76f8(0x1a2))/0x1+parseInt(_0x7e76f8(0x1a1))/0x2*(-parseInt(_0x7e76f8(0x17f))/0x3)+parseInt(_0x7e76f8(0x19d))/0x4+parseInt(_0x7e76f8(0x166))/0x5+parseInt(_0x7e76f8(0x160))/0x6+parseInt(_0x7e76f8(0x13f))/0x7*(parseInt(_0x7e76f8(0x15a))/0x8)+-parseInt(_0x7e76f8(0x164))/0x9;if(_0x5d0bd8===_0x4f925b)break;else _0x347f4d['push'](_0x347f4d['shift']());}catch(_0x38de5c){_0x347f4d['push'](_0x347f4d['shift']());}}}(_0x4b0e,0xef927));import{CommentService as _0xb08f,CollaborationSessionService as _0x567848,UniverCollaborationClientPlugin as _0x5ad52c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2fbf2b}from'@univerjs-pro/license';import{dayjs as _0x13a1d2,UserManagerService as _0x38029a,Inject as _0x12192d,Injector as _0xf533d4,Disposable as _0x2c54e0,CustomRangeType as _0x109d28,UniverInstanceType as _0x3870f6,DependentOn as _0x3bfe6e,IConfigService as _0x2536f6,Plugin as _0x348a81,merge as _0x20dbf3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4c1e57}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x38ef02,IThreadCommentDataSourceService as _0x292b6b}from'@univerjs/thread-comment';function _0x4b0e(){const _0x148abd=['259862nRqodf','map','updateComment','rangeId','Edit','112GBCSbs','find','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','payload','addUser','size','solved','createTimestamp','format','_commentService','unitId','UNRECOGNIZED','symbol','/universer-api/user/list','_init','content','personId','filter','length','onStarting','stringify','rangeType','/list','pipe','_threadCommentDataSource','users','_initDataSource','250784IPgRwp','user','_threadCommentModel','get','post','/solved','1787670PPPbVs','body','replyId','slice','9090018NCQebj','parentId','8100085tYIXBn','pluginName','Add','customRanges','resolved','YYYY/MM/DD\x20HH:mm','Reply','_injector','delete','userID','forEach','_configService','Solve','OpenOrReOpen','userId','_httpService','_sessionService','onReady','commentUpdate$','comments','listComments','root','COMMENT','add','disposeWithMe','30RSChrF','deleteComment','reply','getMemberID','subscribe','requireSession','_threadCommentDataSourceService','code','Delete','getUnit','/add','_config','threadId','Solved','/universer-api/comment/unit/','Unknown','resolveComment','getCurrentUser','error','dataSource','getOwnPropertyDescriptor','_userService','replies','type','getComment','saveCommentToSnapshot','_initUserSync','values','thread-comment-data-source.config','defineProperty','4762428XHmqFc','parse','addComment','/edit','375742UBBABf'];_0x4b0e=function(){return _0x148abd;};return _0x4b0e();}import{bufferTime as _0x26be54}from'rxjs';import{HTTPService as _0x486692}from'@univerjs/network';const W=_0xe6a052(0x141);var I=(_0x12fb0b=>(_0x12fb0b[_0x12fb0b[_0xe6a052(0x173)]=0x0]=_0xe6a052(0x173),_0x12fb0b[_0x12fb0b['Solved']=0x1]=_0xe6a052(0x18c),_0x12fb0b[_0x12fb0b['UNRECOGNIZED']=-0x1]=_0xe6a052(0x14a),_0x12fb0b))(I||{}),v=(_0x475ce0=>(_0x475ce0[_0x475ce0[_0xe6a052(0x18e)]=0x0]='Unknown',_0x475ce0[_0x475ce0[_0xe6a052(0x168)]=0x1]=_0xe6a052(0x168),_0x475ce0[_0x475ce0[_0xe6a052(0x16c)]=0x2]=_0xe6a052(0x16c),_0x475ce0[_0x475ce0[_0xe6a052(0x13e)]=0x3]='Edit',_0x475ce0[_0x475ce0[_0xe6a052(0x187)]=0x4]=_0xe6a052(0x187),_0x475ce0[_0x475ce0[_0xe6a052(0x172)]=0x5]=_0xe6a052(0x172),_0x475ce0[_0x475ce0[_0xe6a052(0x14a)]=-0x1]=_0xe6a052(0x14a),_0x475ce0))(v||{});const y=_0x21d1d8=>_0x13a1d2(new Date(+_0x21d1d8))[_0xe6a052(0x147)](_0xe6a052(0x16b)),B=async(_0x3d10f5,_0x37c479)=>{const _0x1ff679=_0xe6a052,_0x56d22c=_0x3d10f5[_0x1ff679(0x15d)](_0x38029a),_0x2e17f9=_0x3d10f5[_0x1ff679(0x15d)](_0x486692);_0x37c479[_0x1ff679(0x170)](_0x72a39a=>{const _0x5ab5eb=_0x1ff679;_0x56d22c['getUser'](_0x72a39a)&&_0x37c479[_0x5ab5eb(0x16e)](_0x72a39a);}),_0x37c479[_0x1ff679(0x144)]&&(await _0x2e17f9[_0x1ff679(0x15d)](_0x1ff679(0x14c),{'params':{'userIDs':[..._0x37c479]}}))[_0x1ff679(0x161)][_0x1ff679(0x158)]['forEach'](_0xb175b8=>{const _0x317093=_0x1ff679;_0xb175b8&&_0x56d22c[_0x317093(0x143)](_0xb175b8);});};function _0x4fcb(_0x405347,_0x34f04e){_0x405347=_0x405347-0x13d;const _0x4b0e98=_0x4b0e();let _0x4fcb05=_0x4b0e98[_0x405347];return _0x4fcb05;}var K=Object['getOwnPropertyDescriptor'],V=(_0x5b1ef9,_0xdf9bbd,_0x17667b,_0x39b8a0)=>{for(var _0x3dc491=_0x39b8a0>0x1?void 0x0:_0x39b8a0?K(_0xdf9bbd,_0x17667b):_0xdf9bbd,_0x52b412=_0x5b1ef9['length']-0x1,_0x27386e;_0x52b412>=0x0;_0x52b412--)(_0x27386e=_0x5b1ef9[_0x52b412])&&(_0x3dc491=_0x27386e(_0x3dc491)||_0x3dc491);return _0x3dc491;},p=(_0x36b307,_0x42fa51)=>(_0x4feef0,_0x44690c)=>_0x42fa51(_0x4feef0,_0x44690c,_0x36b307);let _=class extends _0x2c54e0{constructor(_0x1d15a4,_0x181d93,_0x18b03b,_0x52786a){const _0x71fad4=_0xe6a052;super(),this['_commentService']=_0x1d15a4,this[_0x71fad4(0x15c)]=_0x181d93,this[_0x71fad4(0x194)]=_0x18b03b,this[_0x71fad4(0x16d)]=_0x52786a,this[_0x71fad4(0x14d)](),this[_0x71fad4(0x199)]();}['_initUserSync'](){const _0x2eb814=_0xe6a052;this[_0x2eb814(0x17e)](this[_0x2eb814(0x15c)][_0x2eb814(0x178)][_0x2eb814(0x156)](_0x26be54(0x10))['subscribe'](_0x3a642a=>{const _0x2ca5a0=_0x2eb814,_0x51c038=new Set();_0x3a642a['forEach'](_0x59daf8=>{const _0x3f0685=_0x4fcb;if(_0x59daf8[_0x3f0685(0x196)]===_0x3f0685(0x17d)){const _0x543e2e=_0x59daf8[_0x3f0685(0x142)][_0x3f0685(0x14f)];_0x51c038[_0x3f0685(0x17d)](_0x543e2e);}}),B(this[_0x2ca5a0(0x16d)],_0x51c038);}));}['_init'](){const _0x1da173=_0xe6a052;this[_0x1da173(0x17e)](this[_0x1da173(0x148)][_0x1da173(0x178)][_0x1da173(0x183)](async _0x440938=>{const _0x2f9c48=_0x1da173;var _0xcf35fd,_0x198d5e,_0x270bd2,_0x201a10;const _0x2b1dd3=(_0xcf35fd=this['_threadCommentModel'][_0x2f9c48(0x188)](_0x440938[_0x2f9c48(0x149)])['find'](_0xb5e806=>_0xb5e806[_0x2f9c48(0x18b)]===_0x440938[_0x2f9c48(0x18b)]))==null?void 0x0:_0xcf35fd['root'];if(!_0x2b1dd3)return;const {unitId:_0x193aee,subUnitId:_0xf933cd}=_0x2b1dd3;switch(_0x440938[_0x2f9c48(0x15b)]&&this[_0x2f9c48(0x194)]['addUser'](_0x440938[_0x2f9c48(0x15b)]),_0x440938[_0x2f9c48(0x196)]){case v['Add']:break;case v[_0x2f9c48(0x16c)]:{this[_0x2f9c48(0x15c)]['addComment'](_0x193aee,_0xf933cd,{'unitId':_0x193aee,'subUnitId':_0xf933cd,'ref':'','id':_0x440938[_0x2f9c48(0x162)],'dT':y(+_0x440938[_0x2f9c48(0x146)]),'threadId':_0x440938['threadId'],'personId':(_0x270bd2=(_0x198d5e=_0x440938[_0x2f9c48(0x15b)])==null?void 0x0:_0x198d5e[_0x2f9c48(0x16f)])!=null?_0x270bd2:_0x440938[_0x2f9c48(0x174)],'text':JSON['parse'](_0x440938['content']),'parentId':_0x2b1dd3['id']});break;}case v['Delete']:{const _0x50226b=this[_0x2f9c48(0x15c)][_0x2f9c48(0x197)](_0x193aee,_0xf933cd,_0x440938[_0x2f9c48(0x162)]);_0x50226b&&_0x50226b[_0x2f9c48(0x165)]&&this[_0x2f9c48(0x15c)]['deleteComment'](_0x193aee,_0xf933cd,_0x440938['replyId']);break;}case v['Edit']:{this[_0x2f9c48(0x15c)][_0x2f9c48(0x1a4)](_0x193aee,_0xf933cd,{'commentId':_0x440938[_0x2f9c48(0x162)],'text':JSON[_0x2f9c48(0x19e)](_0x440938[_0x2f9c48(0x14e)])});break;}case v[_0x2f9c48(0x172)]:{const _0x2b69e0=(_0x201a10=this[_0x2f9c48(0x15c)][_0x2f9c48(0x188)](_0x440938[_0x2f9c48(0x149)])[_0x2f9c48(0x140)](_0x2289b8=>_0x2289b8['threadId']===_0x440938['threadId']))==null?void 0x0:_0x201a10[_0x2f9c48(0x17b)];_0x2b69e0&&this[_0x2f9c48(0x15c)]['resolveComment'](_0x193aee,_0xf933cd,_0x2b69e0['id'],_0x440938[_0x2f9c48(0x145)]===I[_0x2f9c48(0x18c)]);break;}}}));}};_=V([p(0x0,_0x12192d(_0xb08f)),p(0x1,_0x12192d(_0x38ef02)),p(0x2,_0x12192d(_0x38029a)),p(0x3,_0x12192d(_0xf533d4))],_);const z=_0xe6a052(0x19b),O={};var k=Object[_0xe6a052(0x193)],Q=(_0x3e436f,_0x342a09,_0x235486,_0x395e32)=>{const _0x17517e=_0xe6a052;for(var _0xe70f30=_0x395e32>0x1?void 0x0:_0x395e32?k(_0x342a09,_0x235486):_0x342a09,_0x9acd04=_0x3e436f[_0x17517e(0x151)]-0x1,_0x2a9430;_0x9acd04>=0x0;_0x9acd04--)(_0x2a9430=_0x3e436f[_0x9acd04])&&(_0xe70f30=_0x2a9430(_0xe70f30)||_0xe70f30);return _0xe70f30;},b=(_0x5e3d88,_0x17fb4b)=>(_0x916747,_0x34bfe0)=>_0x17fb4b(_0x916747,_0x34bfe0,_0x5e3d88);function X(_0x225c7d,_0x121dbb){const _0x5d6d65=_0xe6a052,_0x4223e6=_0x225c7d[_0x5d6d65(0x195)][0x0];return{..._0x121dbb,'id':_0x4223e6[_0x5d6d65(0x162)],'resolved':_0x225c7d[_0x5d6d65(0x145)]===0x1,'dT':y(_0x4223e6[_0x5d6d65(0x146)]),'personId':_0x4223e6['userId'],'threadId':_0x4223e6[_0x5d6d65(0x18b)]};}function ee(_0x51a597,_0x48ca9c,_0x15ba24){const _0x5be51a=_0xe6a052;var _0x399abb,_0x269511;if(((_0x269511=(_0x399abb=_0x51a597==null?void 0x0:_0x51a597[_0x5be51a(0x195)])==null?void 0x0:_0x399abb[_0x5be51a(0x151)])!=null?_0x269511:0x0)>0x0){const _0x299127=(_0x5b580a,_0x36315a)=>({'id':_0x5b580a[_0x5be51a(0x162)],'threadId':_0x5b580a[_0x5be51a(0x18b)],'dT':y(_0x5b580a[_0x5be51a(0x146)]),'personId':_0x5b580a[_0x5be51a(0x174)],'resolved':_0x51a597[_0x5be51a(0x145)]===I[_0x5be51a(0x18c)],'unitId':_0x48ca9c,'subUnitId':_0x15ba24,'text':JSON[_0x5be51a(0x19e)](_0x5b580a[_0x5be51a(0x14e)]),'parentId':_0x36315a}),_0x57e257=_0x299127(_0x51a597['replies'][0x0]);return{..._0x57e257,'children':_0x51a597[_0x5be51a(0x195)][_0x5be51a(0x163)](0x1)[_0x5be51a(0x1a3)](_0x4e1e55=>_0x299127(_0x4e1e55,_0x57e257['id']))};}return null;}let S=class{constructor(_0x2fb2af,_0x331a75,_0x201029){const _0x31526c=_0xe6a052;this['_httpService']=_0x2fb2af,this[_0x31526c(0x194)]=_0x331a75,this[_0x31526c(0x176)]=_0x201029;}async[_0xe6a052(0x19f)](_0x4f4d22){const _0x941846=_0xe6a052;var _0x4a4924,_0x2a81ca;const {parentId:_0x40f5eb,unitId:_0x35db58,text:_0x4b9e4a,threadId:_0x226d71}=_0x4f4d22,_0x3bfcfa=(_0x2a81ca=(_0x4a4924=_0x4b9e4a[_0x941846(0x169)])==null?void 0x0:_0x4a4924[_0x941846(0x150)](_0x119034=>_0x119034['rangeType']===_0x109d28['COMMENT'])['map'](_0x2d7baf=>_0x2d7baf[_0x941846(0x13d)]))!=null?_0x2a81ca:[],_0xccb6a7=JSON[_0x941846(0x153)](_0x4b9e4a),_0x3559d5=(await this[_0x941846(0x176)][_0x941846(0x184)](_0x35db58))[_0x941846(0x182)]();if(_0x40f5eb){const _0x4b0454={'memberId':_0x3559d5,'unitId':_0x35db58,'content':_0xccb6a7,'mention':_0x3bfcfa,'threadId':_0x226d71},_0x2551c6=(await this[_0x941846(0x175)][_0x941846(0x15e)](_0x941846(0x18d)+_0x35db58+'/reply',{'body':_0x4b0454}))['body'][_0x941846(0x181)];return{..._0x4f4d22,'id':_0x2551c6[_0x941846(0x162)],'dT':_0x13a1d2(+_0x2551c6[_0x941846(0x146)])[_0x941846(0x147)](_0x941846(0x16b)),'personId':_0x2551c6[_0x941846(0x174)]};}else{const _0x2fe52f={'memberId':_0x3559d5,'unitId':_0x35db58,'content':_0xccb6a7,'mention':_0x3bfcfa},_0x57f240=await this[_0x941846(0x175)][_0x941846(0x15e)]('/universer-api/comment/unit/'+_0x35db58+_0x941846(0x189),{'body':_0x2fe52f});return X(_0x57f240['body']['comment'],_0x4f4d22);}}async[_0xe6a052(0x1a4)](_0x204d2c){const _0x4af545=_0xe6a052;var _0x50c019,_0x5b41f5;const {text:_0x174606,unitId:_0x590a43}=_0x204d2c,_0x2f3573=(_0x5b41f5=(_0x50c019=_0x174606[_0x4af545(0x169)])==null?void 0x0:_0x50c019[_0x4af545(0x150)](_0x3e709c=>_0x3e709c[_0x4af545(0x154)]===_0x109d28[_0x4af545(0x17c)])[_0x4af545(0x1a3)](_0x2f5c51=>_0x2f5c51[_0x4af545(0x13d)]))!=null?_0x5b41f5:[],_0x3b2046=JSON[_0x4af545(0x153)](_0x174606),_0x1ab213=_0x204d2c[_0x4af545(0x18b)],_0x2251fa=_0x204d2c['id'],_0x458644={'memberId':(await this[_0x4af545(0x176)][_0x4af545(0x184)](_0x590a43))[_0x4af545(0x182)](),'unitId':_0x590a43,'threadId':_0x1ab213,'mention':_0x2f3573,'content':_0x3b2046,'replyId':_0x2251fa},_0x34cc7f=await this[_0x4af545(0x175)][_0x4af545(0x15e)](_0x4af545(0x18d)+_0x590a43+_0x4af545(0x1a0),{'body':_0x458644});return!_0x34cc7f[_0x4af545(0x161)][_0x4af545(0x191)]||_0x34cc7f[_0x4af545(0x161)][_0x4af545(0x191)][_0x4af545(0x186)]===0x1;}async[_0xe6a052(0x18f)](_0x5f43cf){const _0x2aba21=_0xe6a052,{unitId:_0xdf3484}=_0x5f43cf,_0x55e94e=_0x5f43cf[_0x2aba21(0x18b)],_0x50c4ed={'memberId':this['_userService'][_0x2aba21(0x190)]()[_0x2aba21(0x16f)],'unitId':_0xdf3484,'threadId':_0x55e94e,'solved':_0x5f43cf[_0x2aba21(0x16a)]?I[_0x2aba21(0x18c)]:I[_0x2aba21(0x173)]},_0x16a97e=await this['_httpService'][_0x2aba21(0x15e)](_0x2aba21(0x18d)+_0xdf3484+_0x2aba21(0x15f),{'body':_0x50c4ed});return!_0x16a97e[_0x2aba21(0x161)][_0x2aba21(0x191)]||_0x16a97e['body']['error'][_0x2aba21(0x186)]===0x1;}async[_0xe6a052(0x180)](_0x271530,_0xf50eb9,_0x28df2e,_0x248c8c){const _0x3836f7=_0xe6a052,_0xd3644f={'memberId':(await this[_0x3836f7(0x176)]['requireSession'](_0x271530))[_0x3836f7(0x182)](),'threadId':_0x28df2e,'replyId':_0x248c8c,'unitId':_0x271530},_0x275028=await this[_0x3836f7(0x175)][_0x3836f7(0x15e)](_0x3836f7(0x18d)+_0x271530+'/delete',{'body':_0xd3644f});return!_0x275028[_0x3836f7(0x161)][_0x3836f7(0x191)]||_0x275028[_0x3836f7(0x161)][_0x3836f7(0x191)]['code']===0x1;}async[_0xe6a052(0x17a)](_0x4453c1,_0x6434b7,_0x1ee2a3){const _0x25e3f4=_0xe6a052,_0x2d3f00={'unitId':_0x4453c1,'threadId':_0x1ee2a3},_0x2be0c7=await this[_0x25e3f4(0x175)]['post'](_0x25e3f4(0x18d)+_0x4453c1+_0x25e3f4(0x155),{'body':_0x2d3f00}),_0xe05332=_0x1ee2a3[_0x25e3f4(0x1a3)](_0xedfe4e=>ee(_0x2be0c7[_0x25e3f4(0x161)][_0x25e3f4(0x179)][_0xedfe4e],_0x4453c1,_0x6434b7))[_0x25e3f4(0x150)](Boolean);return Object[_0x25e3f4(0x19a)](_0x2be0c7[_0x25e3f4(0x161)][_0x25e3f4(0x158)])[_0x25e3f4(0x170)](_0x5b1dbd=>{const _0x21e398=_0x25e3f4;this['_userService'][_0x21e398(0x143)](_0x5b1dbd);}),_0xe05332;}[_0xe6a052(0x198)](_0x2f98b8){const _0x509092=_0xe6a052;return{'id':_0x2f98b8['id'],'threadId':_0x2f98b8[_0x509092(0x18b)],'ref':_0x2f98b8['ref']};}};S=Q([b(0x0,_0x12192d(_0x486692)),b(0x1,_0x12192d(_0x38029a)),b(0x2,_0x12192d(_0x567848))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x2dda0e,_0x200e47,_0x463783,_0x11be95)=>{const _0x2c1743=_0xe6a052;for(var _0x3c821d=_0x11be95>0x1?void 0x0:_0x11be95?re(_0x200e47,_0x463783):_0x200e47,_0x3c887b=_0x2dda0e[_0x2c1743(0x151)]-0x1,_0x5c5162;_0x3c887b>=0x0;_0x3c887b--)(_0x5c5162=_0x2dda0e[_0x3c887b])&&(_0x3c821d=_0x5c5162(_0x3c821d)||_0x3c821d);return _0x3c821d;},M=(_0x251002,_0x4e911e)=>(_0x315f61,_0x22d594)=>_0x4e911e(_0x315f61,_0x22d594,_0x251002);let f=class extends _0x2c54e0{constructor(_0x214b15,_0x899d0e){const _0x268dc6=_0xe6a052;super(),this['_threadCommentDataSourceService']=_0x214b15,this[_0x268dc6(0x157)]=_0x899d0e,this['_initDataSource']();}[_0xe6a052(0x159)](){const _0x1d1a56=_0xe6a052;this[_0x1d1a56(0x185)][_0x1d1a56(0x192)]=this[_0x1d1a56(0x157)],this[_0x1d1a56(0x185)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x292b6b),M(0x1,_0x12192d(S))],f);var se=Object[_0xe6a052(0x19c)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1f4026,_0x2caddf,_0x3d9fa6)=>_0x2caddf in _0x1f4026?se(_0x1f4026,_0x2caddf,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3d9fa6}):_0x1f4026[_0x2caddf]=_0x3d9fa6,ie=(_0x1e6e22,_0x374349,_0x45c5d2,_0x56e1a3)=>{const _0x27a7dd=_0xe6a052;for(var _0x4577e5=_0x56e1a3>0x1?void 0x0:_0x56e1a3?oe(_0x374349,_0x45c5d2):_0x374349,_0x4bae33=_0x1e6e22[_0x27a7dd(0x151)]-0x1,_0x55e71f;_0x4bae33>=0x0;_0x4bae33--)(_0x55e71f=_0x1e6e22[_0x4bae33])&&(_0x4577e5=_0x55e71f(_0x4577e5)||_0x4577e5);return _0x4577e5;},N=(_0x5952e0,_0x2439fe)=>(_0x44757f,_0x1fe3a5)=>_0x2439fe(_0x44757f,_0x1fe3a5,_0x5952e0),$=(_0x43f1a5,_0x37509a,_0x5aed8c)=>ne(_0x43f1a5,typeof _0x37509a!=_0xe6a052(0x14b)?_0x37509a+'':_0x37509a,_0x5aed8c);let g=class extends _0x348a81{constructor(_0x43b060=O,_0x56fb0b,_0xdb6bf4){const _0x3b877e=_0xe6a052;super(),this[_0x3b877e(0x18a)]=_0x43b060,this[_0x3b877e(0x16d)]=_0x56fb0b,this['_configService']=_0xdb6bf4;const {..._0x592d69}=_0x20dbf3({},O,this[_0x3b877e(0x18a)]);this[_0x3b877e(0x171)]['setConfig'](z,_0x592d69);}[_0xe6a052(0x152)](){const _0x45b801=_0xe6a052;[[S],[f],[_]][_0x45b801(0x170)](_0x5c8711=>{const _0x3fa95d=_0x45b801;this[_0x3fa95d(0x16d)]['add'](_0x5c8711);});}[_0xe6a052(0x177)](){const _0x11b704=_0xe6a052;this[_0x11b704(0x16d)]['get'](f),this[_0x11b704(0x16d)][_0x11b704(0x15d)](_);}};$(g,_0xe6a052(0x167),W),$(g,'type',_0x3870f6['UNIVER_UNKNOWN']),g=ie([_0x3bfe6e(_0x4c1e57,_0x5ad52c,_0x2fbf2b),N(0x1,_0x12192d(_0xf533d4)),N(0x2,_0x2536f6)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x4180b1=_0x1b28;(function(_0x45c067,_0x51230a){const _0x42e990=_0x1b28,_0x246baa=_0x45c067();while(!![]){try{const _0x375104=-parseInt(_0x42e990(0x1c3))/0x1+parseInt(_0x42e990(0x1c2))/0x2+parseInt(_0x42e990(0x191))/0x3+parseInt(_0x42e990(0x1cb))/0x4+-parseInt(_0x42e990(0x1f6))/0x5*(-parseInt(_0x42e990(0x1d1))/0x6)+parseInt(_0x42e990(0x1a4))/0x7*(-parseInt(_0x42e990(0x19c))/0x8)+-parseInt(_0x42e990(0x1eb))/0x9;if(_0x375104===_0x51230a)break;else _0x246baa['push'](_0x246baa['shift']());}catch(_0x3f3f14){_0x246baa['push'](_0x246baa['shift']());}}}(_0x1166,0xa6f05));import{CommentService as _0x1bb26a,CollaborationSessionService as _0x4700fa,UniverCollaborationClientPlugin as _0x2add79}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3a6dc9}from'@univerjs-pro/license';import{dayjs as _0x30e5fe,UserManagerService as _0x51e746,Inject as _0x54c27f,Injector as _0x1bb80b,Disposable as _0x287a8e,CustomRangeType as _0x2aa294,UniverInstanceType as _0x140979,DependentOn as _0x5d589e,IConfigService as _0x4d8774,Plugin as _0x558095,merge as _0x599c45}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x31f759}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5bccec,IThreadCommentDataSourceService as _0x241c92}from'@univerjs/thread-comment';function _0x1b28(_0x586063,_0x361029){_0x586063=_0x586063-0x18e;const _0x11660c=_0x1166();let _0x1b28d9=_0x11660c[_0x586063];return _0x1b28d9;}function _0x1166(){const _0x18a0fa=['_httpService','Reply','find','threadId','commentUpdate$','syncUpdateMutationToColla','disposeWithMe','_init','getMemberID','OpenOrReOpen','8FmOohS','values','UNIVER_UNKNOWN','Solve','solved','content','replies','slice','4365298JBqJVa','dataSource','error','ref','_userService','requireSession','post','customRanges','comments','Delete','getCurrentUser','length','_injector','stringify','code','updateComment','symbol','_config','deleteComment','pipe','rangeType','/universer-api/user/list','listComments','thread-comment-data-source.config','payload','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','add','YYYY/MM/DD\x20HH:mm','userId','_threadCommentDataSourceService','605010drKAoN','239647NxdiYz','/list','_initDataSource','root','format','subscribe','/edit','personId','2724836LsGDtp','resolved','addComment','getUnit','map','_sessionService','7818AfBCEz','_commentService','Solved','_threadCommentModel','get','saveCommentToSnapshot','type','defineProperty','setConfig','getUser','unitId','COMMENT','Edit','onStarting','replyId','resolveComment','forEach','size','rangeId','/universer-api/comment/unit/','addUser','_threadCommentDataSource','/add','parentId','_initUserSync','getOwnPropertyDescriptor','6674544Ladixe','body','users','Unknown','pluginName','createTimestamp','_configService','parse','userID','UNRECOGNIZED','Add','3145LAjTUw','/solved','user','delete','filter','getComment','1456071pFSVhQ'];_0x1166=function(){return _0x18a0fa;};return _0x1166();}import{bufferTime as _0x545da4}from'rxjs';import{HTTPService as _0x163b66}from'@univerjs/network';const W=_0x4180b1(0x1bd);var I=(_0x2b5efb=>(_0x2b5efb[_0x2b5efb[_0x4180b1(0x19b)]=0x0]=_0x4180b1(0x19b),_0x2b5efb[_0x2b5efb[_0x4180b1(0x1d3)]=0x1]=_0x4180b1(0x1d3),_0x2b5efb[_0x2b5efb['UNRECOGNIZED']=-0x1]=_0x4180b1(0x1f4),_0x2b5efb))(I||{}),v=(_0x382e20=>(_0x382e20[_0x382e20[_0x4180b1(0x1ee)]=0x0]=_0x4180b1(0x1ee),_0x382e20[_0x382e20[_0x4180b1(0x1f5)]=0x1]=_0x4180b1(0x1f5),_0x382e20[_0x382e20[_0x4180b1(0x193)]=0x2]='Reply',_0x382e20[_0x382e20['Edit']=0x3]=_0x4180b1(0x1dd),_0x382e20[_0x382e20['Delete']=0x4]=_0x4180b1(0x1ad),_0x382e20[_0x382e20['Solve']=0x5]=_0x4180b1(0x19f),_0x382e20[_0x382e20[_0x4180b1(0x1f4)]=-0x1]=_0x4180b1(0x1f4),_0x382e20))(v||{});const y=_0x22a6f2=>_0x30e5fe(new Date(+_0x22a6f2))[_0x4180b1(0x1c7)](_0x4180b1(0x1bf)),B=async(_0x400022,_0x1d45c1)=>{const _0x1fbe53=_0x4180b1,_0x65dc99=_0x400022[_0x1fbe53(0x1d5)](_0x51e746),_0x28e80f=_0x400022[_0x1fbe53(0x1d5)](_0x163b66);_0x1d45c1[_0x1fbe53(0x1e1)](_0x419660=>{const _0xe41fd7=_0x1fbe53;_0x65dc99[_0xe41fd7(0x1da)](_0x419660)&&_0x1d45c1[_0xe41fd7(0x18e)](_0x419660);}),_0x1d45c1[_0x1fbe53(0x1e2)]&&(await _0x28e80f[_0x1fbe53(0x1d5)](_0x1fbe53(0x1b9),{'params':{'userIDs':[..._0x1d45c1]}}))[_0x1fbe53(0x1ec)][_0x1fbe53(0x1ed)]['forEach'](_0x10324e=>{_0x10324e&&_0x65dc99['addUser'](_0x10324e);});};var K=Object[_0x4180b1(0x1ea)],V=(_0x1ae3bc,_0x42c782,_0x21411a,_0x4ddfc5)=>{for(var _0x541b68=_0x4ddfc5>0x1?void 0x0:_0x4ddfc5?K(_0x42c782,_0x21411a):_0x42c782,_0x2f367e=_0x1ae3bc['length']-0x1,_0x3eb078;_0x2f367e>=0x0;_0x2f367e--)(_0x3eb078=_0x1ae3bc[_0x2f367e])&&(_0x541b68=_0x3eb078(_0x541b68)||_0x541b68);return _0x541b68;},p=(_0x1abbf9,_0xdb968d)=>(_0x1021e2,_0x840ee9)=>_0xdb968d(_0x1021e2,_0x840ee9,_0x1abbf9);let _=class extends _0x287a8e{constructor(_0x344e1b,_0x324a00,_0x2b4e2a,_0x1200e6){const _0x1eb32f=_0x4180b1;super(),this['_commentService']=_0x344e1b,this['_threadCommentModel']=_0x324a00,this[_0x1eb32f(0x1a8)]=_0x2b4e2a,this[_0x1eb32f(0x1b0)]=_0x1200e6,this[_0x1eb32f(0x199)](),this[_0x1eb32f(0x1e9)]();}[_0x4180b1(0x1e9)](){const _0x7d27d8=_0x4180b1;this['disposeWithMe'](this[_0x7d27d8(0x1d4)][_0x7d27d8(0x196)][_0x7d27d8(0x1b7)](_0x545da4(0x10))[_0x7d27d8(0x1c8)](_0x27832f=>{const _0xf5d0ab=_0x7d27d8,_0x5127f3=new Set();_0x27832f[_0xf5d0ab(0x1e1)](_0xfe75a2=>{const _0x346f30=_0xf5d0ab;if(_0xfe75a2['type']===_0x346f30(0x1be)){const _0x4b2e81=_0xfe75a2[_0x346f30(0x1bc)][_0x346f30(0x1ca)];_0x5127f3['add'](_0x4b2e81);}}),B(this[_0xf5d0ab(0x1b0)],_0x5127f3);}));}[_0x4180b1(0x199)](){const _0x2eecb9=_0x4180b1;this[_0x2eecb9(0x198)](this[_0x2eecb9(0x1d2)]['commentUpdate$'][_0x2eecb9(0x1c8)](async _0x3973d9=>{const _0x2f9ade=_0x2eecb9;var _0x30c52e,_0x47bfd2,_0x59621a,_0x2c5c24;const _0x2cf086=(_0x30c52e=this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1ce)](_0x3973d9[_0x2f9ade(0x1db)])[_0x2f9ade(0x194)](_0x14fd6c=>_0x14fd6c[_0x2f9ade(0x195)]===_0x3973d9[_0x2f9ade(0x195)]))==null?void 0x0:_0x30c52e[_0x2f9ade(0x1c6)];if(!_0x2cf086)return;const {unitId:_0x1399a6,subUnitId:_0x26c242}=_0x2cf086;switch(_0x3973d9[_0x2f9ade(0x1f8)]&&this[_0x2f9ade(0x1a8)][_0x2f9ade(0x1e5)](_0x3973d9[_0x2f9ade(0x1f8)]),_0x3973d9[_0x2f9ade(0x1d7)]){case v[_0x2f9ade(0x1f5)]:break;case v[_0x2f9ade(0x193)]:{this[_0x2f9ade(0x1d4)]['addComment'](_0x1399a6,_0x26c242,{'unitId':_0x1399a6,'subUnitId':_0x26c242,'ref':'','id':_0x3973d9[_0x2f9ade(0x1df)],'dT':y(+_0x3973d9[_0x2f9ade(0x1f0)]),'threadId':_0x3973d9[_0x2f9ade(0x195)],'personId':(_0x59621a=(_0x47bfd2=_0x3973d9['user'])==null?void 0x0:_0x47bfd2['userID'])!=null?_0x59621a:_0x3973d9['userId'],'text':JSON[_0x2f9ade(0x1f2)](_0x3973d9['content']),'parentId':_0x2cf086['id']});break;}case v['Delete']:{const _0x1888c4=this[_0x2f9ade(0x1d4)][_0x2f9ade(0x190)](_0x1399a6,_0x26c242,_0x3973d9[_0x2f9ade(0x1df)]);_0x1888c4&&_0x1888c4[_0x2f9ade(0x1e8)]&&this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1b6)](_0x1399a6,_0x26c242,_0x3973d9[_0x2f9ade(0x1df)]);break;}case v[_0x2f9ade(0x1dd)]:{this['_threadCommentModel'][_0x2f9ade(0x1b3)](_0x1399a6,_0x26c242,{'commentId':_0x3973d9[_0x2f9ade(0x1df)],'text':JSON[_0x2f9ade(0x1f2)](_0x3973d9['content'])});break;}case v[_0x2f9ade(0x19f)]:{const _0x566ab5=(_0x2c5c24=this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1ce)](_0x3973d9[_0x2f9ade(0x1db)])[_0x2f9ade(0x194)](_0x1adc4f=>_0x1adc4f[_0x2f9ade(0x195)]===_0x3973d9['threadId']))==null?void 0x0:_0x2c5c24[_0x2f9ade(0x1c6)];_0x566ab5&&this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1e0)](_0x1399a6,_0x26c242,_0x566ab5['id'],_0x3973d9['solved']===I['Solved']);break;}}}));}};_=V([p(0x0,_0x54c27f(_0x1bb26a)),p(0x1,_0x54c27f(_0x5bccec)),p(0x2,_0x54c27f(_0x51e746)),p(0x3,_0x54c27f(_0x1bb80b))],_);const z=_0x4180b1(0x1bb),O={};var k=Object[_0x4180b1(0x1ea)],Q=(_0x401308,_0x2d430f,_0x548ef8,_0x48ae08)=>{const _0x51f55b=_0x4180b1;for(var _0x31d046=_0x48ae08>0x1?void 0x0:_0x48ae08?k(_0x2d430f,_0x548ef8):_0x2d430f,_0x521725=_0x401308[_0x51f55b(0x1af)]-0x1,_0x31273f;_0x521725>=0x0;_0x521725--)(_0x31273f=_0x401308[_0x521725])&&(_0x31d046=_0x31273f(_0x31d046)||_0x31d046);return _0x31d046;},b=(_0x2cbfd9,_0x440532)=>(_0x520e32,_0x259c16)=>_0x440532(_0x520e32,_0x259c16,_0x2cbfd9);function X(_0x4ff5ea,_0x4298c4){const _0x5abf8f=_0x4180b1,_0x564bcb=_0x4ff5ea[_0x5abf8f(0x1a2)][0x0];return{..._0x4298c4,'id':_0x564bcb[_0x5abf8f(0x1df)],'resolved':_0x4ff5ea[_0x5abf8f(0x1a0)]===0x1,'dT':y(_0x564bcb[_0x5abf8f(0x1f0)]),'personId':_0x564bcb[_0x5abf8f(0x1c0)],'threadId':_0x564bcb[_0x5abf8f(0x195)]};}function ee(_0x54080d,_0x4584f6,_0x13340a){const _0x4bf80d=_0x4180b1;var _0x445c99,_0x5c21d4;if(((_0x5c21d4=(_0x445c99=_0x54080d==null?void 0x0:_0x54080d[_0x4bf80d(0x1a2)])==null?void 0x0:_0x445c99[_0x4bf80d(0x1af)])!=null?_0x5c21d4:0x0)>0x0){const _0x4dc295=(_0xd8eeb5,_0x16f077)=>({'id':_0xd8eeb5['replyId'],'threadId':_0xd8eeb5[_0x4bf80d(0x195)],'dT':y(_0xd8eeb5[_0x4bf80d(0x1f0)]),'personId':_0xd8eeb5['userId'],'resolved':_0x54080d[_0x4bf80d(0x1a0)]===I[_0x4bf80d(0x1d3)],'unitId':_0x4584f6,'subUnitId':_0x13340a,'text':JSON[_0x4bf80d(0x1f2)](_0xd8eeb5[_0x4bf80d(0x1a1)]),'parentId':_0x16f077}),_0x3c9a6f=_0x4dc295(_0x54080d[_0x4bf80d(0x1a2)][0x0]);return{..._0x3c9a6f,'children':_0x54080d[_0x4bf80d(0x1a2)][_0x4bf80d(0x1a3)](0x1)[_0x4bf80d(0x1cf)](_0x4c18e7=>_0x4dc295(_0x4c18e7,_0x3c9a6f['id']))};}return null;}let S=class{constructor(_0x24b567,_0x2c79c5,_0x5bb221){const _0x3c1c12=_0x4180b1;this['_httpService']=_0x24b567,this[_0x3c1c12(0x1a8)]=_0x2c79c5,this[_0x3c1c12(0x1d0)]=_0x5bb221;}async[_0x4180b1(0x1cd)](_0x7a351f){const _0x42097a=_0x4180b1;var _0x14f825,_0x59c911;const {parentId:_0x2de79b,unitId:_0x551632,text:_0x4aba44,threadId:_0x51dbfb}=_0x7a351f,_0x431461=(_0x59c911=(_0x14f825=_0x4aba44[_0x42097a(0x1ab)])==null?void 0x0:_0x14f825[_0x42097a(0x18f)](_0x1596a5=>_0x1596a5[_0x42097a(0x1b8)]===_0x2aa294[_0x42097a(0x1dc)])[_0x42097a(0x1cf)](_0x5765e4=>_0x5765e4['rangeId']))!=null?_0x59c911:[],_0x123ef9=JSON[_0x42097a(0x1b1)](_0x4aba44),_0x2af36d=(await this[_0x42097a(0x1d0)][_0x42097a(0x1a9)](_0x551632))['getMemberID']();if(_0x2de79b){const _0x566cac={'memberId':_0x2af36d,'unitId':_0x551632,'content':_0x123ef9,'mention':_0x431461,'threadId':_0x51dbfb},_0x4710cf=(await this['_httpService'][_0x42097a(0x1aa)]('/universer-api/comment/unit/'+_0x551632+'/reply',{'body':_0x566cac}))[_0x42097a(0x1ec)]['reply'];return{..._0x7a351f,'id':_0x4710cf[_0x42097a(0x1df)],'dT':_0x30e5fe(+_0x4710cf['createTimestamp'])['format'](_0x42097a(0x1bf)),'personId':_0x4710cf[_0x42097a(0x1c0)]};}else{const _0x128dd9={'memberId':_0x2af36d,'unitId':_0x551632,'content':_0x123ef9,'mention':_0x431461},_0x55b263=await this[_0x42097a(0x192)]['post'](_0x42097a(0x1e4)+_0x551632+_0x42097a(0x1e7),{'body':_0x128dd9});return X(_0x55b263['body']['comment'],_0x7a351f);}}async[_0x4180b1(0x1b3)](_0x51b87d){const _0x189af2=_0x4180b1;var _0x20e6de,_0x226c8c;const {text:_0x3eac6b,unitId:_0x4ae742}=_0x51b87d,_0x5a7919=(_0x226c8c=(_0x20e6de=_0x3eac6b[_0x189af2(0x1ab)])==null?void 0x0:_0x20e6de[_0x189af2(0x18f)](_0x47f52d=>_0x47f52d['rangeType']===_0x2aa294[_0x189af2(0x1dc)])[_0x189af2(0x1cf)](_0x4a2ae5=>_0x4a2ae5[_0x189af2(0x1e3)]))!=null?_0x226c8c:[],_0xc200c6=JSON[_0x189af2(0x1b1)](_0x3eac6b),_0x2cfed9=_0x51b87d['threadId'],_0x4e46d6=_0x51b87d['id'],_0x65513a={'memberId':(await this[_0x189af2(0x1d0)][_0x189af2(0x1a9)](_0x4ae742))[_0x189af2(0x19a)](),'unitId':_0x4ae742,'threadId':_0x2cfed9,'mention':_0x5a7919,'content':_0xc200c6,'replyId':_0x4e46d6},_0x51d894=await this[_0x189af2(0x192)][_0x189af2(0x1aa)](_0x189af2(0x1e4)+_0x4ae742+_0x189af2(0x1c9),{'body':_0x65513a});return!_0x51d894[_0x189af2(0x1ec)]['error']||_0x51d894['body'][_0x189af2(0x1a6)][_0x189af2(0x1b2)]===0x1;}async[_0x4180b1(0x1e0)](_0x16d46d){const _0x5e02dd=_0x4180b1,{unitId:_0x3a8616}=_0x16d46d,_0x5be6dc=_0x16d46d[_0x5e02dd(0x195)],_0x5c6cad={'memberId':this['_userService'][_0x5e02dd(0x1ae)]()[_0x5e02dd(0x1f3)],'unitId':_0x3a8616,'threadId':_0x5be6dc,'solved':_0x16d46d[_0x5e02dd(0x1cc)]?I[_0x5e02dd(0x1d3)]:I[_0x5e02dd(0x19b)]},_0x35efe3=await this[_0x5e02dd(0x192)][_0x5e02dd(0x1aa)](_0x5e02dd(0x1e4)+_0x3a8616+_0x5e02dd(0x1f7),{'body':_0x5c6cad});return!_0x35efe3[_0x5e02dd(0x1ec)][_0x5e02dd(0x1a6)]||_0x35efe3[_0x5e02dd(0x1ec)][_0x5e02dd(0x1a6)][_0x5e02dd(0x1b2)]===0x1;}async[_0x4180b1(0x1b6)](_0x292e3b,_0x4fb793,_0x6fbc1,_0x121f2f){const _0x275376=_0x4180b1,_0x38970c={'memberId':(await this[_0x275376(0x1d0)]['requireSession'](_0x292e3b))[_0x275376(0x19a)](),'threadId':_0x6fbc1,'replyId':_0x121f2f,'unitId':_0x292e3b},_0x1de803=await this[_0x275376(0x192)][_0x275376(0x1aa)]('/universer-api/comment/unit/'+_0x292e3b+'/delete',{'body':_0x38970c});return!_0x1de803['body'][_0x275376(0x1a6)]||_0x1de803[_0x275376(0x1ec)][_0x275376(0x1a6)][_0x275376(0x1b2)]===0x1;}async[_0x4180b1(0x1ba)](_0x55381e,_0x1e90ed,_0xa7511){const _0x5d3fe3=_0x4180b1,_0x4cfdaa={'unitId':_0x55381e,'threadId':_0xa7511},_0x464474=await this[_0x5d3fe3(0x192)]['post']('/universer-api/comment/unit/'+_0x55381e+_0x5d3fe3(0x1c4),{'body':_0x4cfdaa}),_0x3d4464=_0xa7511[_0x5d3fe3(0x1cf)](_0x432373=>ee(_0x464474[_0x5d3fe3(0x1ec)][_0x5d3fe3(0x1ac)][_0x432373],_0x55381e,_0x1e90ed))['filter'](Boolean);return Object[_0x5d3fe3(0x19d)](_0x464474[_0x5d3fe3(0x1ec)][_0x5d3fe3(0x1ed)])[_0x5d3fe3(0x1e1)](_0xed875e=>{const _0xd9a734=_0x5d3fe3;this[_0xd9a734(0x1a8)][_0xd9a734(0x1e5)](_0xed875e);}),_0x3d4464;}[_0x4180b1(0x1d6)](_0xdc9b74){const _0x35ae6d=_0x4180b1;return{'id':_0xdc9b74['id'],'threadId':_0xdc9b74[_0x35ae6d(0x195)],'ref':_0xdc9b74[_0x35ae6d(0x1a7)]};}};S=Q([b(0x0,_0x54c27f(_0x163b66)),b(0x1,_0x54c27f(_0x51e746)),b(0x2,_0x54c27f(_0x4700fa))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x54ae4e,_0x34324a,_0x1bbce1,_0x2a5703)=>{for(var _0x2091cd=_0x2a5703>0x1?void 0x0:_0x2a5703?re(_0x34324a,_0x1bbce1):_0x34324a,_0x3ecbf2=_0x54ae4e['length']-0x1,_0x41d4e4;_0x3ecbf2>=0x0;_0x3ecbf2--)(_0x41d4e4=_0x54ae4e[_0x3ecbf2])&&(_0x2091cd=_0x41d4e4(_0x2091cd)||_0x2091cd);return _0x2091cd;},M=(_0x39762c,_0x3e5f19)=>(_0x335f35,_0x463934)=>_0x3e5f19(_0x335f35,_0x463934,_0x39762c);let f=class extends _0x287a8e{constructor(_0x59778c,_0xf8c71a){const _0x5e9f60=_0x4180b1;super(),this['_threadCommentDataSourceService']=_0x59778c,this['_threadCommentDataSource']=_0xf8c71a,this[_0x5e9f60(0x1c5)]();}[_0x4180b1(0x1c5)](){const _0x195265=_0x4180b1;this[_0x195265(0x1c1)][_0x195265(0x1a5)]=this[_0x195265(0x1e6)],this[_0x195265(0x1c1)][_0x195265(0x197)]=!0x1;}};f=te([M(0x0,_0x241c92),M(0x1,_0x54c27f(S))],f);var se=Object[_0x4180b1(0x1d8)],oe=Object[_0x4180b1(0x1ea)],ne=(_0x571635,_0x1c79d1,_0x3b87f3)=>_0x1c79d1 in _0x571635?se(_0x571635,_0x1c79d1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b87f3}):_0x571635[_0x1c79d1]=_0x3b87f3,ie=(_0xac8d0f,_0x20edc6,_0x2850e2,_0x5efb4e)=>{const _0x52f1fe=_0x4180b1;for(var _0x1f6064=_0x5efb4e>0x1?void 0x0:_0x5efb4e?oe(_0x20edc6,_0x2850e2):_0x20edc6,_0x2ae1f4=_0xac8d0f[_0x52f1fe(0x1af)]-0x1,_0x4597e2;_0x2ae1f4>=0x0;_0x2ae1f4--)(_0x4597e2=_0xac8d0f[_0x2ae1f4])&&(_0x1f6064=_0x4597e2(_0x1f6064)||_0x1f6064);return _0x1f6064;},N=(_0x53f721,_0x492d4e)=>(_0x3bb541,_0x4de18c)=>_0x492d4e(_0x3bb541,_0x4de18c,_0x53f721),$=(_0x1553f1,_0x5dafc0,_0x3f2344)=>ne(_0x1553f1,typeof _0x5dafc0!=_0x4180b1(0x1b4)?_0x5dafc0+'':_0x5dafc0,_0x3f2344);let g=class extends _0x558095{constructor(_0x4a397c=O,_0x3eae51,_0x15ae92){const _0x320c52=_0x4180b1;super(),this[_0x320c52(0x1b5)]=_0x4a397c,this['_injector']=_0x3eae51,this[_0x320c52(0x1f1)]=_0x15ae92;const {..._0x3b9956}=_0x599c45({},O,this[_0x320c52(0x1b5)]);this[_0x320c52(0x1f1)][_0x320c52(0x1d9)](z,_0x3b9956);}[_0x4180b1(0x1de)](){[[S],[f],[_]]['forEach'](_0x10f72e=>{const _0x666667=_0x1b28;this[_0x666667(0x1b0)][_0x666667(0x1be)](_0x10f72e);});}['onReady'](){const _0x4996bd=_0x4180b1;this['_injector'][_0x4996bd(0x1d5)](f),this[_0x4996bd(0x1b0)]['get'](_);}};$(g,_0x4180b1(0x1ef),W),$(g,_0x4180b1(0x1d7),_0x140979[_0x4180b1(0x19e)]),g=ie([_0x5d589e(_0x31f759,_0x2add79,_0x3a6dc9),N(0x1,_0x54c27f(_0x1bb80b)),N(0x2,_0x4d8774)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0xe6a052=_0x4fcb;(function(_0x24bf2d,_0x4f925b){const _0x7e76f8=_0x4fcb,_0x347f4d=_0x24bf2d();while(!![]){try{const _0x5d0bd8=parseInt(_0x7e76f8(0x1a2))/0x1+parseInt(_0x7e76f8(0x1a1))/0x2*(-parseInt(_0x7e76f8(0x17f))/0x3)+parseInt(_0x7e76f8(0x19d))/0x4+parseInt(_0x7e76f8(0x166))/0x5+parseInt(_0x7e76f8(0x160))/0x6+parseInt(_0x7e76f8(0x13f))/0x7*(parseInt(_0x7e76f8(0x15a))/0x8)+-parseInt(_0x7e76f8(0x164))/0x9;if(_0x5d0bd8===_0x4f925b)break;else _0x347f4d['push'](_0x347f4d['shift']());}catch(_0x38de5c){_0x347f4d['push'](_0x347f4d['shift']());}}}(_0x4b0e,0xef927));import{CommentService as _0xb08f,CollaborationSessionService as _0x567848,UniverCollaborationClientPlugin as _0x5ad52c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2fbf2b}from'@univerjs-pro/license';import{dayjs as _0x13a1d2,UserManagerService as _0x38029a,Inject as _0x12192d,Injector as _0xf533d4,Disposable as _0x2c54e0,CustomRangeType as _0x109d28,UniverInstanceType as _0x3870f6,DependentOn as _0x3bfe6e,IConfigService as _0x2536f6,Plugin as _0x348a81,merge as _0x20dbf3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4c1e57}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x38ef02,IThreadCommentDataSourceService as _0x292b6b}from'@univerjs/thread-comment';function _0x4b0e(){const _0x148abd=['259862nRqodf','map','updateComment','rangeId','Edit','112GBCSbs','find','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','payload','addUser','size','solved','createTimestamp','format','_commentService','unitId','UNRECOGNIZED','symbol','/universer-api/user/list','_init','content','personId','filter','length','onStarting','stringify','rangeType','/list','pipe','_threadCommentDataSource','users','_initDataSource','250784IPgRwp','user','_threadCommentModel','get','post','/solved','1787670PPPbVs','body','replyId','slice','9090018NCQebj','parentId','8100085tYIXBn','pluginName','Add','customRanges','resolved','YYYY/MM/DD\x20HH:mm','Reply','_injector','delete','userID','forEach','_configService','Solve','OpenOrReOpen','userId','_httpService','_sessionService','onReady','commentUpdate$','comments','listComments','root','COMMENT','add','disposeWithMe','30RSChrF','deleteComment','reply','getMemberID','subscribe','requireSession','_threadCommentDataSourceService','code','Delete','getUnit','/add','_config','threadId','Solved','/universer-api/comment/unit/','Unknown','resolveComment','getCurrentUser','error','dataSource','getOwnPropertyDescriptor','_userService','replies','type','getComment','saveCommentToSnapshot','_initUserSync','values','thread-comment-data-source.config','defineProperty','4762428XHmqFc','parse','addComment','/edit','375742UBBABf'];_0x4b0e=function(){return _0x148abd;};return _0x4b0e();}import{bufferTime as _0x26be54}from'rxjs';import{HTTPService as _0x486692}from'@univerjs/network';const W=_0xe6a052(0x141);var I=(_0x12fb0b=>(_0x12fb0b[_0x12fb0b[_0xe6a052(0x173)]=0x0]=_0xe6a052(0x173),_0x12fb0b[_0x12fb0b['Solved']=0x1]=_0xe6a052(0x18c),_0x12fb0b[_0x12fb0b['UNRECOGNIZED']=-0x1]=_0xe6a052(0x14a),_0x12fb0b))(I||{}),v=(_0x475ce0=>(_0x475ce0[_0x475ce0[_0xe6a052(0x18e)]=0x0]='Unknown',_0x475ce0[_0x475ce0[_0xe6a052(0x168)]=0x1]=_0xe6a052(0x168),_0x475ce0[_0x475ce0[_0xe6a052(0x16c)]=0x2]=_0xe6a052(0x16c),_0x475ce0[_0x475ce0[_0xe6a052(0x13e)]=0x3]='Edit',_0x475ce0[_0x475ce0[_0xe6a052(0x187)]=0x4]=_0xe6a052(0x187),_0x475ce0[_0x475ce0[_0xe6a052(0x172)]=0x5]=_0xe6a052(0x172),_0x475ce0[_0x475ce0[_0xe6a052(0x14a)]=-0x1]=_0xe6a052(0x14a),_0x475ce0))(v||{});const y=_0x21d1d8=>_0x13a1d2(new Date(+_0x21d1d8))[_0xe6a052(0x147)](_0xe6a052(0x16b)),B=async(_0x3d10f5,_0x37c479)=>{const _0x1ff679=_0xe6a052,_0x56d22c=_0x3d10f5[_0x1ff679(0x15d)](_0x38029a),_0x2e17f9=_0x3d10f5[_0x1ff679(0x15d)](_0x486692);_0x37c479[_0x1ff679(0x170)](_0x72a39a=>{const _0x5ab5eb=_0x1ff679;_0x56d22c['getUser'](_0x72a39a)&&_0x37c479[_0x5ab5eb(0x16e)](_0x72a39a);}),_0x37c479[_0x1ff679(0x144)]&&(await _0x2e17f9[_0x1ff679(0x15d)](_0x1ff679(0x14c),{'params':{'userIDs':[..._0x37c479]}}))[_0x1ff679(0x161)][_0x1ff679(0x158)]['forEach'](_0xb175b8=>{const _0x317093=_0x1ff679;_0xb175b8&&_0x56d22c[_0x317093(0x143)](_0xb175b8);});};function _0x4fcb(_0x405347,_0x34f04e){_0x405347=_0x405347-0x13d;const _0x4b0e98=_0x4b0e();let _0x4fcb05=_0x4b0e98[_0x405347];return _0x4fcb05;}var K=Object['getOwnPropertyDescriptor'],V=(_0x5b1ef9,_0xdf9bbd,_0x17667b,_0x39b8a0)=>{for(var _0x3dc491=_0x39b8a0>0x1?void 0x0:_0x39b8a0?K(_0xdf9bbd,_0x17667b):_0xdf9bbd,_0x52b412=_0x5b1ef9['length']-0x1,_0x27386e;_0x52b412>=0x0;_0x52b412--)(_0x27386e=_0x5b1ef9[_0x52b412])&&(_0x3dc491=_0x27386e(_0x3dc491)||_0x3dc491);return _0x3dc491;},p=(_0x36b307,_0x42fa51)=>(_0x4feef0,_0x44690c)=>_0x42fa51(_0x4feef0,_0x44690c,_0x36b307);let _=class extends _0x2c54e0{constructor(_0x1d15a4,_0x181d93,_0x18b03b,_0x52786a){const _0x71fad4=_0xe6a052;super(),this['_commentService']=_0x1d15a4,this[_0x71fad4(0x15c)]=_0x181d93,this[_0x71fad4(0x194)]=_0x18b03b,this[_0x71fad4(0x16d)]=_0x52786a,this[_0x71fad4(0x14d)](),this[_0x71fad4(0x199)]();}['_initUserSync'](){const _0x2eb814=_0xe6a052;this[_0x2eb814(0x17e)](this[_0x2eb814(0x15c)][_0x2eb814(0x178)][_0x2eb814(0x156)](_0x26be54(0x10))['subscribe'](_0x3a642a=>{const _0x2ca5a0=_0x2eb814,_0x51c038=new Set();_0x3a642a['forEach'](_0x59daf8=>{const _0x3f0685=_0x4fcb;if(_0x59daf8[_0x3f0685(0x196)]===_0x3f0685(0x17d)){const _0x543e2e=_0x59daf8[_0x3f0685(0x142)][_0x3f0685(0x14f)];_0x51c038[_0x3f0685(0x17d)](_0x543e2e);}}),B(this[_0x2ca5a0(0x16d)],_0x51c038);}));}['_init'](){const _0x1da173=_0xe6a052;this[_0x1da173(0x17e)](this[_0x1da173(0x148)][_0x1da173(0x178)][_0x1da173(0x183)](async _0x440938=>{const _0x2f9c48=_0x1da173;var _0xcf35fd,_0x198d5e,_0x270bd2,_0x201a10;const _0x2b1dd3=(_0xcf35fd=this['_threadCommentModel'][_0x2f9c48(0x188)](_0x440938[_0x2f9c48(0x149)])['find'](_0xb5e806=>_0xb5e806[_0x2f9c48(0x18b)]===_0x440938[_0x2f9c48(0x18b)]))==null?void 0x0:_0xcf35fd['root'];if(!_0x2b1dd3)return;const {unitId:_0x193aee,subUnitId:_0xf933cd}=_0x2b1dd3;switch(_0x440938[_0x2f9c48(0x15b)]&&this[_0x2f9c48(0x194)]['addUser'](_0x440938[_0x2f9c48(0x15b)]),_0x440938[_0x2f9c48(0x196)]){case v['Add']:break;case v[_0x2f9c48(0x16c)]:{this[_0x2f9c48(0x15c)]['addComment'](_0x193aee,_0xf933cd,{'unitId':_0x193aee,'subUnitId':_0xf933cd,'ref':'','id':_0x440938[_0x2f9c48(0x162)],'dT':y(+_0x440938[_0x2f9c48(0x146)]),'threadId':_0x440938['threadId'],'personId':(_0x270bd2=(_0x198d5e=_0x440938[_0x2f9c48(0x15b)])==null?void 0x0:_0x198d5e[_0x2f9c48(0x16f)])!=null?_0x270bd2:_0x440938[_0x2f9c48(0x174)],'text':JSON['parse'](_0x440938['content']),'parentId':_0x2b1dd3['id']});break;}case v['Delete']:{const _0x50226b=this[_0x2f9c48(0x15c)][_0x2f9c48(0x197)](_0x193aee,_0xf933cd,_0x440938[_0x2f9c48(0x162)]);_0x50226b&&_0x50226b[_0x2f9c48(0x165)]&&this[_0x2f9c48(0x15c)]['deleteComment'](_0x193aee,_0xf933cd,_0x440938['replyId']);break;}case v['Edit']:{this[_0x2f9c48(0x15c)][_0x2f9c48(0x1a4)](_0x193aee,_0xf933cd,{'commentId':_0x440938[_0x2f9c48(0x162)],'text':JSON[_0x2f9c48(0x19e)](_0x440938[_0x2f9c48(0x14e)])});break;}case v[_0x2f9c48(0x172)]:{const _0x2b69e0=(_0x201a10=this[_0x2f9c48(0x15c)][_0x2f9c48(0x188)](_0x440938[_0x2f9c48(0x149)])[_0x2f9c48(0x140)](_0x2289b8=>_0x2289b8['threadId']===_0x440938['threadId']))==null?void 0x0:_0x201a10[_0x2f9c48(0x17b)];_0x2b69e0&&this[_0x2f9c48(0x15c)]['resolveComment'](_0x193aee,_0xf933cd,_0x2b69e0['id'],_0x440938[_0x2f9c48(0x145)]===I[_0x2f9c48(0x18c)]);break;}}}));}};_=V([p(0x0,_0x12192d(_0xb08f)),p(0x1,_0x12192d(_0x38ef02)),p(0x2,_0x12192d(_0x38029a)),p(0x3,_0x12192d(_0xf533d4))],_);const z=_0xe6a052(0x19b),O={};var k=Object[_0xe6a052(0x193)],Q=(_0x3e436f,_0x342a09,_0x235486,_0x395e32)=>{const _0x17517e=_0xe6a052;for(var _0xe70f30=_0x395e32>0x1?void 0x0:_0x395e32?k(_0x342a09,_0x235486):_0x342a09,_0x9acd04=_0x3e436f[_0x17517e(0x151)]-0x1,_0x2a9430;_0x9acd04>=0x0;_0x9acd04--)(_0x2a9430=_0x3e436f[_0x9acd04])&&(_0xe70f30=_0x2a9430(_0xe70f30)||_0xe70f30);return _0xe70f30;},b=(_0x5e3d88,_0x17fb4b)=>(_0x916747,_0x34bfe0)=>_0x17fb4b(_0x916747,_0x34bfe0,_0x5e3d88);function X(_0x225c7d,_0x121dbb){const _0x5d6d65=_0xe6a052,_0x4223e6=_0x225c7d[_0x5d6d65(0x195)][0x0];return{..._0x121dbb,'id':_0x4223e6[_0x5d6d65(0x162)],'resolved':_0x225c7d[_0x5d6d65(0x145)]===0x1,'dT':y(_0x4223e6[_0x5d6d65(0x146)]),'personId':_0x4223e6['userId'],'threadId':_0x4223e6[_0x5d6d65(0x18b)]};}function ee(_0x51a597,_0x48ca9c,_0x15ba24){const _0x5be51a=_0xe6a052;var _0x399abb,_0x269511;if(((_0x269511=(_0x399abb=_0x51a597==null?void 0x0:_0x51a597[_0x5be51a(0x195)])==null?void 0x0:_0x399abb[_0x5be51a(0x151)])!=null?_0x269511:0x0)>0x0){const _0x299127=(_0x5b580a,_0x36315a)=>({'id':_0x5b580a[_0x5be51a(0x162)],'threadId':_0x5b580a[_0x5be51a(0x18b)],'dT':y(_0x5b580a[_0x5be51a(0x146)]),'personId':_0x5b580a[_0x5be51a(0x174)],'resolved':_0x51a597[_0x5be51a(0x145)]===I[_0x5be51a(0x18c)],'unitId':_0x48ca9c,'subUnitId':_0x15ba24,'text':JSON[_0x5be51a(0x19e)](_0x5b580a[_0x5be51a(0x14e)]),'parentId':_0x36315a}),_0x57e257=_0x299127(_0x51a597['replies'][0x0]);return{..._0x57e257,'children':_0x51a597[_0x5be51a(0x195)][_0x5be51a(0x163)](0x1)[_0x5be51a(0x1a3)](_0x4e1e55=>_0x299127(_0x4e1e55,_0x57e257['id']))};}return null;}let S=class{constructor(_0x2fb2af,_0x331a75,_0x201029){const _0x31526c=_0xe6a052;this['_httpService']=_0x2fb2af,this[_0x31526c(0x194)]=_0x331a75,this[_0x31526c(0x176)]=_0x201029;}async[_0xe6a052(0x19f)](_0x4f4d22){const _0x941846=_0xe6a052;var _0x4a4924,_0x2a81ca;const {parentId:_0x40f5eb,unitId:_0x35db58,text:_0x4b9e4a,threadId:_0x226d71}=_0x4f4d22,_0x3bfcfa=(_0x2a81ca=(_0x4a4924=_0x4b9e4a[_0x941846(0x169)])==null?void 0x0:_0x4a4924[_0x941846(0x150)](_0x119034=>_0x119034['rangeType']===_0x109d28['COMMENT'])['map'](_0x2d7baf=>_0x2d7baf[_0x941846(0x13d)]))!=null?_0x2a81ca:[],_0xccb6a7=JSON[_0x941846(0x153)](_0x4b9e4a),_0x3559d5=(await this[_0x941846(0x176)][_0x941846(0x184)](_0x35db58))[_0x941846(0x182)]();if(_0x40f5eb){const _0x4b0454={'memberId':_0x3559d5,'unitId':_0x35db58,'content':_0xccb6a7,'mention':_0x3bfcfa,'threadId':_0x226d71},_0x2551c6=(await this[_0x941846(0x175)][_0x941846(0x15e)](_0x941846(0x18d)+_0x35db58+'/reply',{'body':_0x4b0454}))['body'][_0x941846(0x181)];return{..._0x4f4d22,'id':_0x2551c6[_0x941846(0x162)],'dT':_0x13a1d2(+_0x2551c6[_0x941846(0x146)])[_0x941846(0x147)](_0x941846(0x16b)),'personId':_0x2551c6[_0x941846(0x174)]};}else{const _0x2fe52f={'memberId':_0x3559d5,'unitId':_0x35db58,'content':_0xccb6a7,'mention':_0x3bfcfa},_0x57f240=await this[_0x941846(0x175)][_0x941846(0x15e)]('/universer-api/comment/unit/'+_0x35db58+_0x941846(0x189),{'body':_0x2fe52f});return X(_0x57f240['body']['comment'],_0x4f4d22);}}async[_0xe6a052(0x1a4)](_0x204d2c){const _0x4af545=_0xe6a052;var _0x50c019,_0x5b41f5;const {text:_0x174606,unitId:_0x590a43}=_0x204d2c,_0x2f3573=(_0x5b41f5=(_0x50c019=_0x174606[_0x4af545(0x169)])==null?void 0x0:_0x50c019[_0x4af545(0x150)](_0x3e709c=>_0x3e709c[_0x4af545(0x154)]===_0x109d28[_0x4af545(0x17c)])[_0x4af545(0x1a3)](_0x2f5c51=>_0x2f5c51[_0x4af545(0x13d)]))!=null?_0x5b41f5:[],_0x3b2046=JSON[_0x4af545(0x153)](_0x174606),_0x1ab213=_0x204d2c[_0x4af545(0x18b)],_0x2251fa=_0x204d2c['id'],_0x458644={'memberId':(await this[_0x4af545(0x176)][_0x4af545(0x184)](_0x590a43))[_0x4af545(0x182)](),'unitId':_0x590a43,'threadId':_0x1ab213,'mention':_0x2f3573,'content':_0x3b2046,'replyId':_0x2251fa},_0x34cc7f=await this[_0x4af545(0x175)][_0x4af545(0x15e)](_0x4af545(0x18d)+_0x590a43+_0x4af545(0x1a0),{'body':_0x458644});return!_0x34cc7f[_0x4af545(0x161)][_0x4af545(0x191)]||_0x34cc7f[_0x4af545(0x161)][_0x4af545(0x191)][_0x4af545(0x186)]===0x1;}async[_0xe6a052(0x18f)](_0x5f43cf){const _0x2aba21=_0xe6a052,{unitId:_0xdf3484}=_0x5f43cf,_0x55e94e=_0x5f43cf[_0x2aba21(0x18b)],_0x50c4ed={'memberId':this['_userService'][_0x2aba21(0x190)]()[_0x2aba21(0x16f)],'unitId':_0xdf3484,'threadId':_0x55e94e,'solved':_0x5f43cf[_0x2aba21(0x16a)]?I[_0x2aba21(0x18c)]:I[_0x2aba21(0x173)]},_0x16a97e=await this['_httpService'][_0x2aba21(0x15e)](_0x2aba21(0x18d)+_0xdf3484+_0x2aba21(0x15f),{'body':_0x50c4ed});return!_0x16a97e[_0x2aba21(0x161)][_0x2aba21(0x191)]||_0x16a97e['body']['error'][_0x2aba21(0x186)]===0x1;}async[_0xe6a052(0x180)](_0x271530,_0xf50eb9,_0x28df2e,_0x248c8c){const _0x3836f7=_0xe6a052,_0xd3644f={'memberId':(await this[_0x3836f7(0x176)]['requireSession'](_0x271530))[_0x3836f7(0x182)](),'threadId':_0x28df2e,'replyId':_0x248c8c,'unitId':_0x271530},_0x275028=await this[_0x3836f7(0x175)][_0x3836f7(0x15e)](_0x3836f7(0x18d)+_0x271530+'/delete',{'body':_0xd3644f});return!_0x275028[_0x3836f7(0x161)][_0x3836f7(0x191)]||_0x275028[_0x3836f7(0x161)][_0x3836f7(0x191)]['code']===0x1;}async[_0xe6a052(0x17a)](_0x4453c1,_0x6434b7,_0x1ee2a3){const _0x25e3f4=_0xe6a052,_0x2d3f00={'unitId':_0x4453c1,'threadId':_0x1ee2a3},_0x2be0c7=await this[_0x25e3f4(0x175)]['post'](_0x25e3f4(0x18d)+_0x4453c1+_0x25e3f4(0x155),{'body':_0x2d3f00}),_0xe05332=_0x1ee2a3[_0x25e3f4(0x1a3)](_0xedfe4e=>ee(_0x2be0c7[_0x25e3f4(0x161)][_0x25e3f4(0x179)][_0xedfe4e],_0x4453c1,_0x6434b7))[_0x25e3f4(0x150)](Boolean);return Object[_0x25e3f4(0x19a)](_0x2be0c7[_0x25e3f4(0x161)][_0x25e3f4(0x158)])[_0x25e3f4(0x170)](_0x5b1dbd=>{const _0x21e398=_0x25e3f4;this['_userService'][_0x21e398(0x143)](_0x5b1dbd);}),_0xe05332;}[_0xe6a052(0x198)](_0x2f98b8){const _0x509092=_0xe6a052;return{'id':_0x2f98b8['id'],'threadId':_0x2f98b8[_0x509092(0x18b)],'ref':_0x2f98b8['ref']};}};S=Q([b(0x0,_0x12192d(_0x486692)),b(0x1,_0x12192d(_0x38029a)),b(0x2,_0x12192d(_0x567848))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x2dda0e,_0x200e47,_0x463783,_0x11be95)=>{const _0x2c1743=_0xe6a052;for(var _0x3c821d=_0x11be95>0x1?void 0x0:_0x11be95?re(_0x200e47,_0x463783):_0x200e47,_0x3c887b=_0x2dda0e[_0x2c1743(0x151)]-0x1,_0x5c5162;_0x3c887b>=0x0;_0x3c887b--)(_0x5c5162=_0x2dda0e[_0x3c887b])&&(_0x3c821d=_0x5c5162(_0x3c821d)||_0x3c821d);return _0x3c821d;},M=(_0x251002,_0x4e911e)=>(_0x315f61,_0x22d594)=>_0x4e911e(_0x315f61,_0x22d594,_0x251002);let f=class extends _0x2c54e0{constructor(_0x214b15,_0x899d0e){const _0x268dc6=_0xe6a052;super(),this['_threadCommentDataSourceService']=_0x214b15,this[_0x268dc6(0x157)]=_0x899d0e,this['_initDataSource']();}[_0xe6a052(0x159)](){const _0x1d1a56=_0xe6a052;this[_0x1d1a56(0x185)][_0x1d1a56(0x192)]=this[_0x1d1a56(0x157)],this[_0x1d1a56(0x185)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x292b6b),M(0x1,_0x12192d(S))],f);var se=Object[_0xe6a052(0x19c)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1f4026,_0x2caddf,_0x3d9fa6)=>_0x2caddf in _0x1f4026?se(_0x1f4026,_0x2caddf,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3d9fa6}):_0x1f4026[_0x2caddf]=_0x3d9fa6,ie=(_0x1e6e22,_0x374349,_0x45c5d2,_0x56e1a3)=>{const _0x27a7dd=_0xe6a052;for(var _0x4577e5=_0x56e1a3>0x1?void 0x0:_0x56e1a3?oe(_0x374349,_0x45c5d2):_0x374349,_0x4bae33=_0x1e6e22[_0x27a7dd(0x151)]-0x1,_0x55e71f;_0x4bae33>=0x0;_0x4bae33--)(_0x55e71f=_0x1e6e22[_0x4bae33])&&(_0x4577e5=_0x55e71f(_0x4577e5)||_0x4577e5);return _0x4577e5;},N=(_0x5952e0,_0x2439fe)=>(_0x44757f,_0x1fe3a5)=>_0x2439fe(_0x44757f,_0x1fe3a5,_0x5952e0),$=(_0x43f1a5,_0x37509a,_0x5aed8c)=>ne(_0x43f1a5,typeof _0x37509a!=_0xe6a052(0x14b)?_0x37509a+'':_0x37509a,_0x5aed8c);let g=class extends _0x348a81{constructor(_0x43b060=O,_0x56fb0b,_0xdb6bf4){const _0x3b877e=_0xe6a052;super(),this[_0x3b877e(0x18a)]=_0x43b060,this[_0x3b877e(0x16d)]=_0x56fb0b,this['_configService']=_0xdb6bf4;const {..._0x592d69}=_0x20dbf3({},O,this[_0x3b877e(0x18a)]);this[_0x3b877e(0x171)]['setConfig'](z,_0x592d69);}[_0xe6a052(0x152)](){const _0x45b801=_0xe6a052;[[S],[f],[_]][_0x45b801(0x170)](_0x5c8711=>{const _0x3fa95d=_0x45b801;this[_0x3fa95d(0x16d)]['add'](_0x5c8711);});}[_0xe6a052(0x177)](){const _0x11b704=_0xe6a052;this[_0x11b704(0x16d)]['get'](f),this[_0x11b704(0x16d)][_0x11b704(0x15d)](_);}};$(g,_0xe6a052(0x167),W),$(g,'type',_0x3870f6['UNIVER_UNKNOWN']),g=ie([_0x3bfe6e(_0x4c1e57,_0x5ad52c,_0x2fbf2b),N(0x1,_0x12192d(_0xf533d4)),N(0x2,_0x2536f6)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x45d5(_0x3630a8,_0x2d7338){_0x3630a8=_0x3630a8-0x1c2;const _0x5ce55d=_0x5ce5();let _0x45d544=_0x5ce55d[_0x3630a8];return _0x45d544;}(function(_0x14ec76,_0x5922ec){const _0x412d04=_0x45d5,_0x39b1c6=_0x14ec76();while(!![]){try{const _0x18ccbe=-parseInt(_0x412d04(0x1c8))/0x1+parseInt(_0x412d04(0x1d7))/0x2+-parseInt(_0x412d04(0x1e5))/0x3*(parseInt(_0x412d04(0x23d))/0x4)+-parseInt(_0x412d04(0x1ef))/0x5*(-parseInt(_0x412d04(0x1e7))/0x6)+parseInt(_0x412d04(0x22c))/0x7+parseInt(_0x412d04(0x24a))/0x8*(parseInt(_0x412d04(0x1dd))/0x9)+-parseInt(_0x412d04(0x22b))/0xa*(parseInt(_0x412d04(0x235))/0xb);if(_0x18ccbe===_0x5922ec)break;else _0x39b1c6['push'](_0x39b1c6['shift']());}catch(_0x4bb29c){_0x39b1c6['push'](_0x39b1c6['shift']());}}}(_0x5ce5,0x87a8f),function(_0x37caab,_0x99bb35){const _0x240389=_0x45d5;typeof exports==_0x240389(0x1e9)&&typeof module<'u'?_0x99bb35(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=='function'&&define['amd']?define([_0x240389(0x21d),_0x240389(0x209),_0x240389(0x1f7),_0x240389(0x202),_0x240389(0x1c6),_0x240389(0x210),'rxjs','@univerjs/network'],_0x99bb35):(_0x37caab=typeof globalThis<'u'?globalThis:_0x37caab||self,_0x99bb35(_0x37caab[_0x240389(0x1d2)]={},_0x37caab[_0x240389(0x1ec)],_0x37caab['UniverProLicense'],_0x37caab[_0x240389(0x243)],_0x37caab[_0x240389(0x228)],_0x37caab[_0x240389(0x203)],_0x37caab[_0x240389(0x1df)],_0x37caab['UniverNetwork']));}(this,function(_0x347b73,_0x4ebd7c,_0x240775,_0x3e06ff,_0x2663f5,_0x33dd0d,_0x1813bc,_0x1af0b5){'use strict';const _0x4a5f86=_0x45d5;const _0x36598d=_0x4a5f86(0x247);var _0x137c8d=(_0x23488f=>(_0x23488f[_0x23488f['OpenOrReOpen']=0x0]=_0x4a5f86(0x1d9),_0x23488f[_0x23488f[_0x4a5f86(0x1d8)]=0x1]=_0x4a5f86(0x1d8),_0x23488f[_0x23488f[_0x4a5f86(0x1d6)]=-0x1]=_0x4a5f86(0x1d6),_0x23488f))(_0x137c8d||{}),_0x3b65af=(_0x21e30c=>(_0x21e30c[_0x21e30c[_0x4a5f86(0x214)]=0x0]='Unknown',_0x21e30c[_0x21e30c['Add']=0x1]=_0x4a5f86(0x21e),_0x21e30c[_0x21e30c[_0x4a5f86(0x1f8)]=0x2]=_0x4a5f86(0x1f8),_0x21e30c[_0x21e30c['Edit']=0x3]='Edit',_0x21e30c[_0x21e30c['Delete']=0x4]='Delete',_0x21e30c[_0x21e30c[_0x4a5f86(0x220)]=0x5]='Solve',_0x21e30c[_0x21e30c['UNRECOGNIZED']=-0x1]=_0x4a5f86(0x1d6),_0x21e30c))(_0x3b65af||{});const _0x28e987=_0x2034d3=>_0x3e06ff[_0x4a5f86(0x1fd)](new Date(+_0x2034d3))[_0x4a5f86(0x244)](_0x4a5f86(0x227)),_0xdf3fa5=async(_0x119280,_0x584eb6)=>{const _0x394dc7=_0x4a5f86,_0x1a1b1d=_0x119280['get'](_0x3e06ff[_0x394dc7(0x23b)]),_0x188394=_0x119280['get'](_0x1af0b5['HTTPService']);_0x584eb6[_0x394dc7(0x23c)](_0x3b9dd6=>{const _0x273f20=_0x394dc7;_0x1a1b1d[_0x273f20(0x1c4)](_0x3b9dd6)&&_0x584eb6[_0x273f20(0x1c2)](_0x3b9dd6);}),_0x584eb6['size']&&(await _0x188394[_0x394dc7(0x1e2)](_0x394dc7(0x1cd),{'params':{'userIDs':[..._0x584eb6]}}))[_0x394dc7(0x200)][_0x394dc7(0x1e6)][_0x394dc7(0x23c)](_0x3b2a15=>{const _0x5f061c=_0x394dc7;_0x3b2a15&&_0x1a1b1d[_0x5f061c(0x233)](_0x3b2a15);});};var _0x2e2a50=Object['getOwnPropertyDescriptor'],_0x21ed80=(_0x2cfe27,_0x29a8d3,_0x1850f3,_0x21145a)=>{for(var _0x14baaa=_0x21145a>0x1?void 0x0:_0x21145a?_0x2e2a50(_0x29a8d3,_0x1850f3):_0x29a8d3,_0x50750c=_0x2cfe27['length']-0x1,_0x1c54d0;_0x50750c>=0x0;_0x50750c--)(_0x1c54d0=_0x2cfe27[_0x50750c])&&(_0x14baaa=_0x1c54d0(_0x14baaa)||_0x14baaa);return _0x14baaa;},_0x5b0d5f=(_0x32ca39,_0x2b8071)=>(_0x32c551,_0x3cbfc3)=>_0x2b8071(_0x32c551,_0x3cbfc3,_0x32ca39);let _0x5d5359=class extends _0x3e06ff['Disposable']{constructor(_0x321524,_0x53719b,_0x136be0,_0x2031b0){const _0x100ae5=_0x4a5f86;super(),this['_commentService']=_0x321524,this[_0x100ae5(0x1ca)]=_0x53719b,this[_0x100ae5(0x1f5)]=_0x136be0,this['_injector']=_0x2031b0,this['_init'](),this[_0x100ae5(0x229)]();}['_initUserSync'](){const _0x44a4a6=_0x4a5f86;this[_0x44a4a6(0x241)](this[_0x44a4a6(0x1ca)][_0x44a4a6(0x245)]['pipe'](_0x1813bc[_0x44a4a6(0x1de)](0x10))[_0x44a4a6(0x236)](_0x45c9d3=>{const _0x38ab73=_0x44a4a6,_0x34146b=new Set();_0x45c9d3['forEach'](_0xd935b7=>{const _0x3cbd3f=_0x45d5;if(_0xd935b7['type']==='add'){const _0x1db274=_0xd935b7['payload'][_0x3cbd3f(0x21a)];_0x34146b['add'](_0x1db274);}}),_0xdf3fa5(this[_0x38ab73(0x21c)],_0x34146b);}));}[_0x4a5f86(0x1c3)](){const _0x5e7c08=_0x4a5f86;this[_0x5e7c08(0x241)](this['_commentService']['commentUpdate$'][_0x5e7c08(0x236)](async _0x5ea791=>{const _0x504006=_0x5e7c08;var _0x6f6c5e,_0x2f0d80,_0x442cdc,_0x5037ab;const _0x37e1f6=(_0x6f6c5e=this[_0x504006(0x1ca)][_0x504006(0x1ea)](_0x5ea791['unitId'])[_0x504006(0x206)](_0x5e74dc=>_0x5e74dc[_0x504006(0x23e)]===_0x5ea791[_0x504006(0x23e)]))==null?void 0x0:_0x6f6c5e[_0x504006(0x1fe)];if(!_0x37e1f6)return;const {unitId:_0x5670c8,subUnitId:_0x4a78f9}=_0x37e1f6;switch(_0x5ea791['user']&&this['_userService'][_0x504006(0x233)](_0x5ea791['user']),_0x5ea791['type']){case _0x3b65af[_0x504006(0x21e)]:break;case _0x3b65af[_0x504006(0x1f8)]:{this[_0x504006(0x1ca)][_0x504006(0x24b)](_0x5670c8,_0x4a78f9,{'unitId':_0x5670c8,'subUnitId':_0x4a78f9,'ref':'','id':_0x5ea791['replyId'],'dT':_0x28e987(+_0x5ea791[_0x504006(0x1ff)]),'threadId':_0x5ea791['threadId'],'personId':(_0x442cdc=(_0x2f0d80=_0x5ea791[_0x504006(0x22a)])==null?void 0x0:_0x2f0d80['userID'])!=null?_0x442cdc:_0x5ea791['userId'],'text':JSON['parse'](_0x5ea791[_0x504006(0x216)]),'parentId':_0x37e1f6['id']});break;}case _0x3b65af[_0x504006(0x1f0)]:{const _0xf4c518=this['_threadCommentModel'][_0x504006(0x208)](_0x5670c8,_0x4a78f9,_0x5ea791[_0x504006(0x21f)]);_0xf4c518&&_0xf4c518[_0x504006(0x1db)]&&this['_threadCommentModel'][_0x504006(0x222)](_0x5670c8,_0x4a78f9,_0x5ea791[_0x504006(0x21f)]);break;}case _0x3b65af[_0x504006(0x1d4)]:{this[_0x504006(0x1ca)][_0x504006(0x223)](_0x5670c8,_0x4a78f9,{'commentId':_0x5ea791[_0x504006(0x21f)],'text':JSON[_0x504006(0x20f)](_0x5ea791['content'])});break;}case _0x3b65af[_0x504006(0x220)]:{const _0x50d3ae=(_0x5037ab=this['_threadCommentModel']['getUnit'](_0x5ea791['unitId'])[_0x504006(0x206)](_0x4adc1d=>_0x4adc1d['threadId']===_0x5ea791[_0x504006(0x23e)]))==null?void 0x0:_0x5037ab[_0x504006(0x1fe)];_0x50d3ae&&this[_0x504006(0x1ca)][_0x504006(0x1fb)](_0x5670c8,_0x4a78f9,_0x50d3ae['id'],_0x5ea791[_0x504006(0x23f)]===_0x137c8d[_0x504006(0x1d8)]);break;}}}));}};_0x5d5359=_0x21ed80([_0x5b0d5f(0x0,_0x3e06ff['Inject'](_0x4ebd7c[_0x4a5f86(0x1ce)])),_0x5b0d5f(0x1,_0x3e06ff[_0x4a5f86(0x234)](_0x33dd0d[_0x4a5f86(0x237)])),_0x5b0d5f(0x2,_0x3e06ff[_0x4a5f86(0x234)](_0x3e06ff[_0x4a5f86(0x23b)])),_0x5b0d5f(0x3,_0x3e06ff[_0x4a5f86(0x234)](_0x3e06ff[_0x4a5f86(0x207)]))],_0x5d5359);const _0x3b08bc=_0x4a5f86(0x1cb),_0x2833f6={};var _0x5535cd=Object['getOwnPropertyDescriptor'],_0x3bc456=(_0x386f89,_0x3704c2,_0x9f4572,_0x347c7f)=>{for(var _0x145ad8=_0x347c7f>0x1?void 0x0:_0x347c7f?_0x5535cd(_0x3704c2,_0x9f4572):_0x3704c2,_0x1713e9=_0x386f89['length']-0x1,_0x144881;_0x1713e9>=0x0;_0x1713e9--)(_0x144881=_0x386f89[_0x1713e9])&&(_0x145ad8=_0x144881(_0x145ad8)||_0x145ad8);return _0x145ad8;},_0x39995f=(_0x2cf4e5,_0x54847e)=>(_0x452b5f,_0x23464e)=>_0x54847e(_0x452b5f,_0x23464e,_0x2cf4e5);function _0x491fe1(_0x3adb6e,_0x487ec8){const _0x2d7e6c=_0x4a5f86,_0x3d4618=_0x3adb6e[_0x2d7e6c(0x249)][0x0];return{..._0x487ec8,'id':_0x3d4618['replyId'],'resolved':_0x3adb6e[_0x2d7e6c(0x23f)]===0x1,'dT':_0x28e987(_0x3d4618[_0x2d7e6c(0x1ff)]),'personId':_0x3d4618[_0x2d7e6c(0x1d5)],'threadId':_0x3d4618['threadId']};}function _0x1453e8(_0x39100f,_0x115db7,_0x370dd0){const _0x4c854f=_0x4a5f86;var _0x14679c,_0x9da0c5;if(((_0x9da0c5=(_0x14679c=_0x39100f==null?void 0x0:_0x39100f['replies'])==null?void 0x0:_0x14679c[_0x4c854f(0x1ee)])!=null?_0x9da0c5:0x0)>0x0){const _0x2d7006=(_0x4d85f8,_0x2fd07d)=>({'id':_0x4d85f8['replyId'],'threadId':_0x4d85f8[_0x4c854f(0x23e)],'dT':_0x28e987(_0x4d85f8['createTimestamp']),'personId':_0x4d85f8[_0x4c854f(0x1d5)],'resolved':_0x39100f[_0x4c854f(0x23f)]===_0x137c8d['Solved'],'unitId':_0x115db7,'subUnitId':_0x370dd0,'text':JSON[_0x4c854f(0x20f)](_0x4d85f8[_0x4c854f(0x216)]),'parentId':_0x2fd07d}),_0x487d6a=_0x2d7006(_0x39100f[_0x4c854f(0x249)][0x0]);return{..._0x487d6a,'children':_0x39100f[_0x4c854f(0x249)][_0x4c854f(0x231)](0x1)['map'](_0x4961b2=>_0x2d7006(_0x4961b2,_0x487d6a['id']))};}return null;}let _0x1f4fd0=class{constructor(_0x4a72e4,_0x38cbed,_0x32520e){const _0x476394=_0x4a5f86;this[_0x476394(0x1c5)]=_0x4a72e4,this[_0x476394(0x1f5)]=_0x38cbed,this[_0x476394(0x230)]=_0x32520e;}async[_0x4a5f86(0x24b)](_0x5a0c6a){const _0x4e0529=_0x4a5f86;var _0x511ce3,_0x5cfd87;const {parentId:_0x6364bd,unitId:_0x43319c,text:_0xcc0cd4,threadId:_0x1764f9}=_0x5a0c6a,_0x39cb58=(_0x5cfd87=(_0x511ce3=_0xcc0cd4[_0x4e0529(0x1ed)])==null?void 0x0:_0x511ce3[_0x4e0529(0x1d1)](_0x1c54a7=>_0x1c54a7[_0x4e0529(0x1d0)]===_0x3e06ff[_0x4e0529(0x1f3)][_0x4e0529(0x23a)])[_0x4e0529(0x215)](_0x435299=>_0x435299[_0x4e0529(0x20e)]))!=null?_0x5cfd87:[],_0xa00eb8=JSON[_0x4e0529(0x1f1)](_0xcc0cd4),_0x232f21=(await this[_0x4e0529(0x230)][_0x4e0529(0x1eb)](_0x43319c))[_0x4e0529(0x22f)]();if(_0x6364bd){const _0x44a4a4={'memberId':_0x232f21,'unitId':_0x43319c,'content':_0xa00eb8,'mention':_0x39cb58,'threadId':_0x1764f9},_0x507f29=(await this[_0x4e0529(0x1c5)][_0x4e0529(0x1c7)](_0x4e0529(0x1cc)+_0x43319c+_0x4e0529(0x1e0),{'body':_0x44a4a4}))[_0x4e0529(0x200)][_0x4e0529(0x1d3)];return{..._0x5a0c6a,'id':_0x507f29['replyId'],'dT':_0x3e06ff[_0x4e0529(0x1fd)](+_0x507f29[_0x4e0529(0x1ff)])[_0x4e0529(0x244)](_0x4e0529(0x227)),'personId':_0x507f29[_0x4e0529(0x1d5)]};}else{const _0x5ad1df={'memberId':_0x232f21,'unitId':_0x43319c,'content':_0xa00eb8,'mention':_0x39cb58},_0x3238d8=await this[_0x4e0529(0x1c5)]['post'](_0x4e0529(0x1cc)+_0x43319c+_0x4e0529(0x22d),{'body':_0x5ad1df});return _0x491fe1(_0x3238d8['body'][_0x4e0529(0x1da)],_0x5a0c6a);}}async[_0x4a5f86(0x223)](_0x2f44de){const _0x62a97c=_0x4a5f86;var _0x42c715,_0xa675e6;const {text:_0x5b96e4,unitId:_0x5ec067}=_0x2f44de,_0x5b2085=(_0xa675e6=(_0x42c715=_0x5b96e4['customRanges'])==null?void 0x0:_0x42c715[_0x62a97c(0x1d1)](_0x199fb5=>_0x199fb5['rangeType']===_0x3e06ff[_0x62a97c(0x1f3)][_0x62a97c(0x23a)])[_0x62a97c(0x215)](_0x522ffd=>_0x522ffd['rangeId']))!=null?_0xa675e6:[],_0x1aa76c=JSON[_0x62a97c(0x1f1)](_0x5b96e4),_0x1ea54e=_0x2f44de['threadId'],_0x13ce46=_0x2f44de['id'],_0xc67b3a={'memberId':(await this[_0x62a97c(0x230)][_0x62a97c(0x1eb)](_0x5ec067))[_0x62a97c(0x22f)](),'unitId':_0x5ec067,'threadId':_0x1ea54e,'mention':_0x5b2085,'content':_0x1aa76c,'replyId':_0x13ce46},_0x2e54f4=await this[_0x62a97c(0x1c5)]['post']('/universer-api/comment/unit/'+_0x5ec067+_0x62a97c(0x1e3),{'body':_0xc67b3a});return!_0x2e54f4[_0x62a97c(0x200)]['error']||_0x2e54f4['body'][_0x62a97c(0x1fc)][_0x62a97c(0x21b)]===0x1;}async[_0x4a5f86(0x1fb)](_0x3d21ca){const _0x557dad=_0x4a5f86,{unitId:_0x4e4d8c}=_0x3d21ca,_0x56efe9=_0x3d21ca[_0x557dad(0x23e)],_0xbaceb0={'memberId':this[_0x557dad(0x1f5)][_0x557dad(0x232)]()[_0x557dad(0x1f6)],'unitId':_0x4e4d8c,'threadId':_0x56efe9,'solved':_0x3d21ca[_0x557dad(0x1dc)]?_0x137c8d[_0x557dad(0x1d8)]:_0x137c8d['OpenOrReOpen']},_0x8679=await this['_httpService'][_0x557dad(0x1c7)](_0x557dad(0x1cc)+_0x4e4d8c+_0x557dad(0x1e1),{'body':_0xbaceb0});return!_0x8679[_0x557dad(0x200)][_0x557dad(0x1fc)]||_0x8679[_0x557dad(0x200)][_0x557dad(0x1fc)][_0x557dad(0x21b)]===0x1;}async[_0x4a5f86(0x222)](_0xe374d9,_0x32ada2,_0x4d56e9,_0x4cfccc){const _0xb98d56=_0x4a5f86,_0xeb324a={'memberId':(await this[_0xb98d56(0x230)]['requireSession'](_0xe374d9))['getMemberID'](),'threadId':_0x4d56e9,'replyId':_0x4cfccc,'unitId':_0xe374d9},_0x34cbe9=await this[_0xb98d56(0x1c5)][_0xb98d56(0x1c7)](_0xb98d56(0x1cc)+_0xe374d9+'/delete',{'body':_0xeb324a});return!_0x34cbe9['body']['error']||_0x34cbe9[_0xb98d56(0x200)][_0xb98d56(0x1fc)]['code']===0x1;}async[_0x4a5f86(0x226)](_0x2630cc,_0x476e15,_0x561546){const _0x36b49e=_0x4a5f86,_0x5137da={'unitId':_0x2630cc,'threadId':_0x561546},_0x2dfa12=await this[_0x36b49e(0x1c5)][_0x36b49e(0x1c7)]('/universer-api/comment/unit/'+_0x2630cc+_0x36b49e(0x211),{'body':_0x5137da}),_0x2e16f5=_0x561546[_0x36b49e(0x215)](_0x5e954c=>_0x1453e8(_0x2dfa12[_0x36b49e(0x200)][_0x36b49e(0x1fa)][_0x5e954c],_0x2630cc,_0x476e15))[_0x36b49e(0x1d1)](Boolean);return Object['values'](_0x2dfa12['body']['users'])['forEach'](_0x556976=>{const _0x61f727=_0x36b49e;this[_0x61f727(0x1f5)][_0x61f727(0x233)](_0x556976);}),_0x2e16f5;}[_0x4a5f86(0x1e8)](_0x103d13){const _0x48b8f4=_0x4a5f86;return{'id':_0x103d13['id'],'threadId':_0x103d13[_0x48b8f4(0x23e)],'ref':_0x103d13[_0x48b8f4(0x205)]};}};_0x1f4fd0=_0x3bc456([_0x39995f(0x0,_0x3e06ff[_0x4a5f86(0x234)](_0x1af0b5[_0x4a5f86(0x22e)])),_0x39995f(0x1,_0x3e06ff[_0x4a5f86(0x234)](_0x3e06ff[_0x4a5f86(0x23b)])),_0x39995f(0x2,_0x3e06ff['Inject'](_0x4ebd7c[_0x4a5f86(0x212)]))],_0x1f4fd0);var _0xbe8f6a=Object[_0x4a5f86(0x219)],_0x47fb0d=(_0x503f06,_0x433883,_0x1f461b,_0x2134c6)=>{const _0x41b0c6=_0x4a5f86;for(var _0x253a7f=_0x2134c6>0x1?void 0x0:_0x2134c6?_0xbe8f6a(_0x433883,_0x1f461b):_0x433883,_0x4be89c=_0x503f06[_0x41b0c6(0x1ee)]-0x1,_0x5cc202;_0x4be89c>=0x0;_0x4be89c--)(_0x5cc202=_0x503f06[_0x4be89c])&&(_0x253a7f=_0x5cc202(_0x253a7f)||_0x253a7f);return _0x253a7f;},_0x17dccf=(_0x427610,_0x48251c)=>(_0x2697bd,_0x29619d)=>_0x48251c(_0x2697bd,_0x29619d,_0x427610);let _0x15f3b5=class extends _0x3e06ff[_0x4a5f86(0x20d)]{constructor(_0x18b085,_0x124d80){const _0x55edde=_0x4a5f86;super(),this[_0x55edde(0x218)]=_0x18b085,this[_0x55edde(0x240)]=_0x124d80,this[_0x55edde(0x221)]();}[_0x4a5f86(0x221)](){const _0x57632e=_0x4a5f86;this[_0x57632e(0x218)][_0x57632e(0x217)]=this[_0x57632e(0x240)],this[_0x57632e(0x218)][_0x57632e(0x1f9)]=!0x1;}};_0x15f3b5=_0x47fb0d([_0x17dccf(0x0,_0x33dd0d['IThreadCommentDataSourceService']),_0x17dccf(0x1,_0x3e06ff['Inject'](_0x1f4fd0))],_0x15f3b5);var _0xbe078d=Object[_0x4a5f86(0x242)],_0x551b2d=Object['getOwnPropertyDescriptor'],_0x208660=(_0x222905,_0x20f503,_0x40ff55)=>_0x20f503 in _0x222905?_0xbe078d(_0x222905,_0x20f503,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x40ff55}):_0x222905[_0x20f503]=_0x40ff55,_0x523ee5=(_0x51444d,_0x3df040,_0x4a7c20,_0x3b6212)=>{const _0x40805c=_0x4a5f86;for(var _0x388a5d=_0x3b6212>0x1?void 0x0:_0x3b6212?_0x551b2d(_0x3df040,_0x4a7c20):_0x3df040,_0x87a1ef=_0x51444d[_0x40805c(0x1ee)]-0x1,_0x282b63;_0x87a1ef>=0x0;_0x87a1ef--)(_0x282b63=_0x51444d[_0x87a1ef])&&(_0x388a5d=_0x282b63(_0x388a5d)||_0x388a5d);return _0x388a5d;},_0x35fc04=(_0x5bab6a,_0x1c0590)=>(_0x57ed95,_0x104d7b)=>_0x1c0590(_0x57ed95,_0x104d7b,_0x5bab6a),_0x4a2b1a=(_0x5e6134,_0x4426af,_0x4a29e0)=>_0x208660(_0x5e6134,typeof _0x4426af!=_0x4a5f86(0x239)?_0x4426af+'':_0x4426af,_0x4a29e0);_0x347b73[_0x4a5f86(0x225)]=class extends _0x3e06ff[_0x4a5f86(0x20b)]{constructor(_0x8c6c71=_0x2833f6,_0x2a11e6,_0x18fa5f){const _0x29e345=_0x4a5f86;super(),this[_0x29e345(0x1cf)]=_0x8c6c71,this[_0x29e345(0x21c)]=_0x2a11e6,this[_0x29e345(0x201)]=_0x18fa5f;const {..._0x4ec4ba}=_0x3e06ff[_0x29e345(0x238)]({},_0x2833f6,this[_0x29e345(0x1cf)]);this['_configService'][_0x29e345(0x20a)](_0x3b08bc,_0x4ec4ba);}['onStarting'](){const _0xc452ad=_0x4a5f86;[[_0x1f4fd0],[_0x15f3b5],[_0x5d5359]][_0xc452ad(0x23c)](_0x341205=>{const _0x5c69eb=_0xc452ad;this[_0x5c69eb(0x21c)][_0x5c69eb(0x1c9)](_0x341205);});}['onReady'](){const _0x229cfc=_0x4a5f86;this[_0x229cfc(0x21c)][_0x229cfc(0x1e2)](_0x15f3b5),this[_0x229cfc(0x21c)][_0x229cfc(0x1e2)](_0x5d5359);}},_0x4a2b1a(_0x347b73[_0x4a5f86(0x225)],_0x4a5f86(0x1f2),_0x36598d),_0x4a2b1a(_0x347b73[_0x4a5f86(0x225)],_0x4a5f86(0x20c),_0x3e06ff[_0x4a5f86(0x248)][_0x4a5f86(0x1f4)]),_0x347b73[_0x4a5f86(0x225)]=_0x523ee5([_0x3e06ff[_0x4a5f86(0x224)](_0x2663f5['UniverThreadCommentUIPlugin'],_0x4ebd7c['UniverCollaborationClientPlugin'],_0x240775[_0x4a5f86(0x204)]),_0x35fc04(0x1,_0x3e06ff['Inject'](_0x3e06ff[_0x4a5f86(0x207)])),_0x35fc04(0x2,_0x3e06ff[_0x4a5f86(0x213)])],_0x347b73[_0x4a5f86(0x225)]),Object[_0x4a5f86(0x242)](_0x347b73,Symbol[_0x4a5f86(0x246)],{'value':_0x4a5f86(0x1e4)});}));function _0x5ce5(){const _0x1f6733=['subscribe','ThreadCommentModel','merge','symbol','COMMENT','UserManagerService','forEach','3112gDADfb','threadId','solved','_threadCommentDataSource','disposeWithMe','defineProperty','UniverCore','format','commentUpdate$','toStringTag','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverInstanceType','replies','121512kJOafl','addComment','delete','_init','getUser','_httpService','@univerjs/thread-comment-ui','post','526050VjgGsV','add','_threadCommentModel','thread-comment-data-source.config','/universer-api/comment/unit/','/universer-api/user/list','CommentService','_config','rangeType','filter','UniverProThreadCommentDatasource','reply','Edit','userId','UNRECOGNIZED','963400RDVEDs','Solved','OpenOrReOpen','comment','parentId','resolved','153cmAsNs','bufferTime','rxjs','/reply','/solved','get','/edit','Module','222rxCXPr','users','6JlqmAk','saveCommentToSnapshot','object','getUnit','requireSession','UniverProCollaborationClient','customRanges','length','1408580xmhyuh','Delete','stringify','pluginName','CustomRangeType','UNIVER_UNKNOWN','_userService','userID','@univerjs-pro/license','Reply','syncUpdateMutationToColla','comments','resolveComment','error','dayjs','root','createTimestamp','body','_configService','@univerjs/core','UniverThreadComment','UniverLicensePlugin','ref','find','Injector','getComment','@univerjs-pro/collaboration-client','setConfig','Plugin','type','Disposable','rangeId','parse','@univerjs/thread-comment','/list','CollaborationSessionService','IConfigService','Unknown','map','content','dataSource','_threadCommentDataSourceService','getOwnPropertyDescriptor','personId','code','_injector','exports','Add','replyId','Solve','_initDataSource','deleteComment','updateComment','DependentOn','UniverThreadCommentDataSourcePlugin','listComments','YYYY/MM/DD\x20HH:mm','UniverThreadCommentUi','_initUserSync','user','90pFSppk','5622428iZyKNu','/add','HTTPService','getMemberID','_sessionService','slice','getCurrentUser','addUser','Inject','837892RGWzDU'];_0x5ce5=function(){return _0x1f6733;};return _0x5ce5();}
1
+ function _0x429c(_0x514cc1,_0x15e815){_0x514cc1=_0x514cc1-0xe3;const _0x57f2ee=_0x57f2();let _0x429ce1=_0x57f2ee[_0x514cc1];return _0x429ce1;}(function(_0x197a96,_0x2a0c0a){const _0x3f671a=_0x429c,_0x6bcca1=_0x197a96();while(!![]){try{const _0xbf5d27=-parseInt(_0x3f671a(0x119))/0x1*(parseInt(_0x3f671a(0xf3))/0x2)+-parseInt(_0x3f671a(0xfc))/0x3*(parseInt(_0x3f671a(0x13f))/0x4)+-parseInt(_0x3f671a(0xe9))/0x5*(-parseInt(_0x3f671a(0x122))/0x6)+parseInt(_0x3f671a(0x158))/0x7+parseInt(_0x3f671a(0x14f))/0x8*(-parseInt(_0x3f671a(0x107))/0x9)+-parseInt(_0x3f671a(0x124))/0xa+-parseInt(_0x3f671a(0x15b))/0xb*(-parseInt(_0x3f671a(0x137))/0xc);if(_0xbf5d27===_0x2a0c0a)break;else _0x6bcca1['push'](_0x6bcca1['shift']());}catch(_0x2e5293){_0x6bcca1['push'](_0x6bcca1['shift']());}}}(_0x57f2,0x770db),function(_0x2bf953,_0x1c05ec){const _0x2d42aa=_0x429c;typeof exports=='object'&&typeof module<'u'?_0x1c05ec(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==_0x2d42aa(0x101)&&define[_0x2d42aa(0x152)]?define([_0x2d42aa(0x10e),_0x2d42aa(0x132),_0x2d42aa(0x14e),_0x2d42aa(0x12e),_0x2d42aa(0x125),_0x2d42aa(0xf5),_0x2d42aa(0xf0),_0x2d42aa(0x104)],_0x1c05ec):(_0x2bf953=typeof globalThis<'u'?globalThis:_0x2bf953||self,_0x1c05ec(_0x2bf953['UniverProThreadCommentDatasource']={},_0x2bf953[_0x2d42aa(0x140)],_0x2bf953[_0x2d42aa(0x13a)],_0x2bf953['UniverCore'],_0x2bf953['UniverThreadCommentUi'],_0x2bf953[_0x2d42aa(0x10b)],_0x2bf953[_0x2d42aa(0xf0)],_0x2bf953[_0x2d42aa(0xed)]));}(this,function(_0x2e86e2,_0x101de3,_0x572db9,_0x5edd3f,_0x525bd8,_0x5b30bc,_0x498f71,_0x431989){'use strict';const _0x263c48=_0x429c;const _0x907ed='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x3342ea=(_0x189a1e=>(_0x189a1e[_0x189a1e[_0x263c48(0x14d)]=0x0]='OpenOrReOpen',_0x189a1e[_0x189a1e[_0x263c48(0x142)]=0x1]=_0x263c48(0x142),_0x189a1e[_0x189a1e[_0x263c48(0x143)]=-0x1]=_0x263c48(0x143),_0x189a1e))(_0x3342ea||{}),_0x4e3d4b=(_0x29383a=>(_0x29383a[_0x29383a[_0x263c48(0x155)]=0x0]='Unknown',_0x29383a[_0x29383a['Add']=0x1]=_0x263c48(0x109),_0x29383a[_0x29383a['Reply']=0x2]=_0x263c48(0x165),_0x29383a[_0x29383a[_0x263c48(0x10a)]=0x3]=_0x263c48(0x10a),_0x29383a[_0x29383a[_0x263c48(0x11a)]=0x4]=_0x263c48(0x11a),_0x29383a[_0x29383a['Solve']=0x5]='Solve',_0x29383a[_0x29383a[_0x263c48(0x143)]=-0x1]=_0x263c48(0x143),_0x29383a))(_0x4e3d4b||{});const _0x10e43f=_0x31d7cb=>_0x5edd3f[_0x263c48(0x13e)](new Date(+_0x31d7cb))[_0x263c48(0xe6)](_0x263c48(0x134)),_0x23ebbc=async(_0x3a3613,_0x36592e)=>{const _0x510563=_0x263c48,_0x17466b=_0x3a3613[_0x510563(0x11b)](_0x5edd3f['UserManagerService']),_0x1324f6=_0x3a3613[_0x510563(0x11b)](_0x431989[_0x510563(0xef)]);_0x36592e[_0x510563(0xfa)](_0x10f3c6=>{const _0x51408f=_0x510563;_0x17466b[_0x51408f(0x161)](_0x10f3c6)&&_0x36592e['delete'](_0x10f3c6);}),_0x36592e['size']&&(await _0x1324f6[_0x510563(0x11b)](_0x510563(0x13c),{'params':{'userIDs':[..._0x36592e]}}))[_0x510563(0x10d)]['users'][_0x510563(0xfa)](_0x5130e3=>{_0x5130e3&&_0x17466b['addUser'](_0x5130e3);});};var _0x2c570c=Object[_0x263c48(0x157)],_0x46261c=(_0x59377d,_0x50994b,_0x3a49,_0x5ec3c2)=>{for(var _0x30b3da=_0x5ec3c2>0x1?void 0x0:_0x5ec3c2?_0x2c570c(_0x50994b,_0x3a49):_0x50994b,_0x3ba2c4=_0x59377d['length']-0x1,_0x53c46e;_0x3ba2c4>=0x0;_0x3ba2c4--)(_0x53c46e=_0x59377d[_0x3ba2c4])&&(_0x30b3da=_0x53c46e(_0x30b3da)||_0x30b3da);return _0x30b3da;},_0x4fbd81=(_0x5206a2,_0x589d41)=>(_0x588db2,_0x4160cf)=>_0x589d41(_0x588db2,_0x4160cf,_0x5206a2);let _0x6779bf=class extends _0x5edd3f[_0x263c48(0x156)]{constructor(_0x2677ba,_0xcea4d6,_0x4c2744,_0x3dd4c5){const _0x50994d=_0x263c48;super(),this[_0x50994d(0xf9)]=_0x2677ba,this[_0x50994d(0xfe)]=_0xcea4d6,this[_0x50994d(0x118)]=_0x4c2744,this[_0x50994d(0x133)]=_0x3dd4c5,this[_0x50994d(0x129)](),this[_0x50994d(0x117)]();}[_0x263c48(0x117)](){const _0x4d1550=_0x263c48;this[_0x4d1550(0x113)](this['_threadCommentModel'][_0x4d1550(0xf2)][_0x4d1550(0x120)](_0x498f71[_0x4d1550(0x100)](0x10))[_0x4d1550(0xe3)](_0x4435b5=>{const _0x3240f9=_0x4d1550,_0x962c49=new Set();_0x4435b5[_0x3240f9(0xfa)](_0x45e45d=>{const _0x502c22=_0x3240f9;if(_0x45e45d[_0x502c22(0xf4)]===_0x502c22(0x154)){const _0x3f30ba=_0x45e45d[_0x502c22(0x146)][_0x502c22(0xf1)];_0x962c49[_0x502c22(0x154)](_0x3f30ba);}}),_0x23ebbc(this['_injector'],_0x962c49);}));}['_init'](){const _0x4f4c00=_0x263c48;this[_0x4f4c00(0x113)](this[_0x4f4c00(0xf9)][_0x4f4c00(0xf2)][_0x4f4c00(0xe3)](async _0x5e5861=>{const _0x53eff6=_0x4f4c00;var _0x21e5b3,_0x111f94,_0x2a4076,_0x12d42c;const _0x372544=(_0x21e5b3=this[_0x53eff6(0xfe)]['getUnit'](_0x5e5861['unitId'])[_0x53eff6(0x111)](_0x4bdc1b=>_0x4bdc1b[_0x53eff6(0x15a)]===_0x5e5861['threadId']))==null?void 0x0:_0x21e5b3[_0x53eff6(0x141)];if(!_0x372544)return;const {unitId:_0x24f2ef,subUnitId:_0xf99ec7}=_0x372544;switch(_0x5e5861[_0x53eff6(0xfd)]&&this[_0x53eff6(0x118)][_0x53eff6(0x138)](_0x5e5861['user']),_0x5e5861[_0x53eff6(0xf4)]){case _0x4e3d4b['Add']:break;case _0x4e3d4b['Reply']:{this[_0x53eff6(0xfe)][_0x53eff6(0x108)](_0x24f2ef,_0xf99ec7,{'unitId':_0x24f2ef,'subUnitId':_0xf99ec7,'ref':'','id':_0x5e5861[_0x53eff6(0x149)],'dT':_0x10e43f(+_0x5e5861[_0x53eff6(0xe7)]),'threadId':_0x5e5861['threadId'],'personId':(_0x2a4076=(_0x111f94=_0x5e5861['user'])==null?void 0x0:_0x111f94['userID'])!=null?_0x2a4076:_0x5e5861['userId'],'text':JSON['parse'](_0x5e5861['content']),'parentId':_0x372544['id']});break;}case _0x4e3d4b[_0x53eff6(0x11a)]:{const _0x27b98b=this[_0x53eff6(0xfe)][_0x53eff6(0x115)](_0x24f2ef,_0xf99ec7,_0x5e5861[_0x53eff6(0x149)]);_0x27b98b&&_0x27b98b[_0x53eff6(0x151)]&&this[_0x53eff6(0xfe)]['deleteComment'](_0x24f2ef,_0xf99ec7,_0x5e5861[_0x53eff6(0x149)]);break;}case _0x4e3d4b[_0x53eff6(0x10a)]:{this[_0x53eff6(0xfe)]['updateComment'](_0x24f2ef,_0xf99ec7,{'commentId':_0x5e5861[_0x53eff6(0x149)],'text':JSON[_0x53eff6(0x121)](_0x5e5861[_0x53eff6(0x130)])});break;}case _0x4e3d4b[_0x53eff6(0x14a)]:{const _0x1a0549=(_0x12d42c=this[_0x53eff6(0xfe)][_0x53eff6(0x12b)](_0x5e5861[_0x53eff6(0x123)])['find'](_0x1fb3a6=>_0x1fb3a6[_0x53eff6(0x15a)]===_0x5e5861['threadId']))==null?void 0x0:_0x12d42c[_0x53eff6(0x141)];_0x1a0549&&this['_threadCommentModel'][_0x53eff6(0x13b)](_0x24f2ef,_0xf99ec7,_0x1a0549['id'],_0x5e5861['solved']===_0x3342ea[_0x53eff6(0x142)]);break;}}}));}};_0x6779bf=_0x46261c([_0x4fbd81(0x0,_0x5edd3f[_0x263c48(0x105)](_0x101de3['CommentService'])),_0x4fbd81(0x1,_0x5edd3f[_0x263c48(0x105)](_0x5b30bc[_0x263c48(0xf7)])),_0x4fbd81(0x2,_0x5edd3f[_0x263c48(0x105)](_0x5edd3f[_0x263c48(0xe4)])),_0x4fbd81(0x3,_0x5edd3f[_0x263c48(0x105)](_0x5edd3f['Injector']))],_0x6779bf);const _0x12ca71=_0x263c48(0x15e),_0x1c0e90={};var _0x1944b1=Object[_0x263c48(0x157)],_0x5ac215=(_0x1e6b68,_0x2354e7,_0x1902bd,_0xa61d8d)=>{for(var _0x5824a1=_0xa61d8d>0x1?void 0x0:_0xa61d8d?_0x1944b1(_0x2354e7,_0x1902bd):_0x2354e7,_0x58eea1=_0x1e6b68['length']-0x1,_0x2725c9;_0x58eea1>=0x0;_0x58eea1--)(_0x2725c9=_0x1e6b68[_0x58eea1])&&(_0x5824a1=_0x2725c9(_0x5824a1)||_0x5824a1);return _0x5824a1;},_0x34f093=(_0x1f2d59,_0x1932a3)=>(_0x31e27a,_0x39f6bc)=>_0x1932a3(_0x31e27a,_0x39f6bc,_0x1f2d59);function _0x1609c2(_0x306cb3,_0x29d0ef){const _0xe5944=_0x263c48,_0x27d389=_0x306cb3['replies'][0x0];return{..._0x29d0ef,'id':_0x27d389[_0xe5944(0x149)],'resolved':_0x306cb3['solved']===0x1,'dT':_0x10e43f(_0x27d389[_0xe5944(0xe7)]),'personId':_0x27d389[_0xe5944(0x131)],'threadId':_0x27d389[_0xe5944(0x15a)]};}function _0x34bcd1(_0x3747dd,_0x3c5601,_0x46a0ea){const _0x160d94=_0x263c48;var _0x50b01c,_0x56c518;if(((_0x56c518=(_0x50b01c=_0x3747dd==null?void 0x0:_0x3747dd[_0x160d94(0x163)])==null?void 0x0:_0x50b01c[_0x160d94(0x136)])!=null?_0x56c518:0x0)>0x0){const _0x6cd6ee=(_0x1c1d06,_0x37490a)=>({'id':_0x1c1d06[_0x160d94(0x149)],'threadId':_0x1c1d06[_0x160d94(0x15a)],'dT':_0x10e43f(_0x1c1d06[_0x160d94(0xe7)]),'personId':_0x1c1d06[_0x160d94(0x131)],'resolved':_0x3747dd['solved']===_0x3342ea[_0x160d94(0x142)],'unitId':_0x3c5601,'subUnitId':_0x46a0ea,'text':JSON[_0x160d94(0x121)](_0x1c1d06[_0x160d94(0x130)]),'parentId':_0x37490a}),_0x567fa1=_0x6cd6ee(_0x3747dd[_0x160d94(0x163)][0x0]);return{..._0x567fa1,'children':_0x3747dd['replies'][_0x160d94(0x15f)](0x1)['map'](_0x558c53=>_0x6cd6ee(_0x558c53,_0x567fa1['id']))};}return null;}let _0x19c89e=class{constructor(_0x257441,_0x100dac,_0xea8ec1){const _0x58a913=_0x263c48;this[_0x58a913(0x14c)]=_0x257441,this[_0x58a913(0x118)]=_0x100dac,this[_0x58a913(0xee)]=_0xea8ec1;}async['addComment'](_0x1d36e2){const _0x41d359=_0x263c48;var _0x474b99,_0x3a7801;const {parentId:_0x5a081d,unitId:_0x396374,text:_0x39c947,threadId:_0x347963}=_0x1d36e2,_0x4fec81=(_0x3a7801=(_0x474b99=_0x39c947[_0x41d359(0x112)])==null?void 0x0:_0x474b99['filter'](_0x54ab58=>_0x54ab58['rangeType']===_0x5edd3f[_0x41d359(0x150)][_0x41d359(0xea)])[_0x41d359(0x147)](_0x5c5c4f=>_0x5c5c4f['rangeId']))!=null?_0x3a7801:[],_0xf759ed=JSON[_0x41d359(0x144)](_0x39c947),_0x5a5ac7=(await this[_0x41d359(0xee)][_0x41d359(0x11f)](_0x396374))['getMemberID']();if(_0x5a081d){const _0x35700e={'memberId':_0x5a5ac7,'unitId':_0x396374,'content':_0xf759ed,'mention':_0x4fec81,'threadId':_0x347963},_0x4d5dbe=(await this['_httpService'][_0x41d359(0x135)]('/universer-api/comment/unit/'+_0x396374+_0x41d359(0x12f),{'body':_0x35700e}))[_0x41d359(0x10d)][_0x41d359(0x116)];return{..._0x1d36e2,'id':_0x4d5dbe[_0x41d359(0x149)],'dT':_0x5edd3f[_0x41d359(0x13e)](+_0x4d5dbe[_0x41d359(0xe7)])[_0x41d359(0xe6)](_0x41d359(0x134)),'personId':_0x4d5dbe[_0x41d359(0x131)]};}else{const _0x1a74f1={'memberId':_0x5a5ac7,'unitId':_0x396374,'content':_0xf759ed,'mention':_0x4fec81},_0x4066c2=await this[_0x41d359(0x14c)][_0x41d359(0x135)](_0x41d359(0xeb)+_0x396374+_0x41d359(0xe5),{'body':_0x1a74f1});return _0x1609c2(_0x4066c2[_0x41d359(0x10d)]['comment'],_0x1d36e2);}}async[_0x263c48(0x159)](_0x3ccf29){const _0x17a38e=_0x263c48;var _0x5e0cf4,_0x14eea9;const {text:_0x3eed50,unitId:_0x506b96}=_0x3ccf29,_0x20980e=(_0x14eea9=(_0x5e0cf4=_0x3eed50['customRanges'])==null?void 0x0:_0x5e0cf4['filter'](_0x226f4b=>_0x226f4b[_0x17a38e(0xe8)]===_0x5edd3f[_0x17a38e(0x150)][_0x17a38e(0xea)])[_0x17a38e(0x147)](_0x5b5b3a=>_0x5b5b3a[_0x17a38e(0x139)]))!=null?_0x14eea9:[],_0x56e599=JSON[_0x17a38e(0x144)](_0x3eed50),_0x6fc3ed=_0x3ccf29[_0x17a38e(0x15a)],_0x5e9b73=_0x3ccf29['id'],_0x48f79c={'memberId':(await this['_sessionService']['requireSession'](_0x506b96))['getMemberID'](),'unitId':_0x506b96,'threadId':_0x6fc3ed,'mention':_0x20980e,'content':_0x56e599,'replyId':_0x5e9b73},_0x1315bb=await this['_httpService'][_0x17a38e(0x135)]('/universer-api/comment/unit/'+_0x506b96+_0x17a38e(0x164),{'body':_0x48f79c});return!_0x1315bb[_0x17a38e(0x10d)][_0x17a38e(0x114)]||_0x1315bb[_0x17a38e(0x10d)][_0x17a38e(0x114)][_0x17a38e(0x12d)]===0x1;}async['resolveComment'](_0x1e897b){const _0x141703=_0x263c48,{unitId:_0x276d22}=_0x1e897b,_0x177686=_0x1e897b[_0x141703(0x15a)],_0x5f1f60={'memberId':this[_0x141703(0x118)]['getCurrentUser']()['userID'],'unitId':_0x276d22,'threadId':_0x177686,'solved':_0x1e897b['resolved']?_0x3342ea[_0x141703(0x142)]:_0x3342ea[_0x141703(0x14d)]},_0x1133d6=await this[_0x141703(0x14c)]['post'](_0x141703(0xeb)+_0x276d22+_0x141703(0x127),{'body':_0x5f1f60});return!_0x1133d6['body'][_0x141703(0x114)]||_0x1133d6[_0x141703(0x10d)][_0x141703(0x114)][_0x141703(0x12d)]===0x1;}async['deleteComment'](_0x391c99,_0xd17749,_0x81214,_0x4641d4){const _0x1f7102=_0x263c48,_0x27c233={'memberId':(await this[_0x1f7102(0xee)][_0x1f7102(0x11f)](_0x391c99))[_0x1f7102(0x10c)](),'threadId':_0x81214,'replyId':_0x4641d4,'unitId':_0x391c99},_0x2ff54e=await this['_httpService'][_0x1f7102(0x135)](_0x1f7102(0xeb)+_0x391c99+'/delete',{'body':_0x27c233});return!_0x2ff54e[_0x1f7102(0x10d)][_0x1f7102(0x114)]||_0x2ff54e[_0x1f7102(0x10d)][_0x1f7102(0x114)][_0x1f7102(0x12d)]===0x1;}async[_0x263c48(0xec)](_0x9b4fd8,_0x5a07ce,_0xcb10fc){const _0xb7121a=_0x263c48,_0x414c68={'unitId':_0x9b4fd8,'threadId':_0xcb10fc},_0x3e24d5=await this[_0xb7121a(0x14c)][_0xb7121a(0x135)]('/universer-api/comment/unit/'+_0x9b4fd8+'/list',{'body':_0x414c68}),_0x200b6c=_0xcb10fc[_0xb7121a(0x147)](_0x118d42=>_0x34bcd1(_0x3e24d5['body']['comments'][_0x118d42],_0x9b4fd8,_0x5a07ce))[_0xb7121a(0x167)](Boolean);return Object[_0xb7121a(0xf6)](_0x3e24d5[_0xb7121a(0x10d)]['users'])[_0xb7121a(0xfa)](_0x12205d=>{const _0x1f20eb=_0xb7121a;this['_userService'][_0x1f20eb(0x138)](_0x12205d);}),_0x200b6c;}[_0x263c48(0x153)](_0x5c1cbb){const _0xca3fce=_0x263c48;return{'id':_0x5c1cbb['id'],'threadId':_0x5c1cbb['threadId'],'ref':_0x5c1cbb[_0xca3fce(0x11e)]};}};_0x19c89e=_0x5ac215([_0x34f093(0x0,_0x5edd3f[_0x263c48(0x105)](_0x431989[_0x263c48(0xef)])),_0x34f093(0x1,_0x5edd3f[_0x263c48(0x105)](_0x5edd3f[_0x263c48(0xe4)])),_0x34f093(0x2,_0x5edd3f[_0x263c48(0x105)](_0x101de3[_0x263c48(0x110)]))],_0x19c89e);var _0x3af1fe=Object[_0x263c48(0x157)],_0x509cdb=(_0x1ffe20,_0x1e99ff,_0x30bcc0,_0x3bde0b)=>{const _0x586528=_0x263c48;for(var _0x102958=_0x3bde0b>0x1?void 0x0:_0x3bde0b?_0x3af1fe(_0x1e99ff,_0x30bcc0):_0x1e99ff,_0x4450aa=_0x1ffe20[_0x586528(0x136)]-0x1,_0x4fe9b8;_0x4450aa>=0x0;_0x4450aa--)(_0x4fe9b8=_0x1ffe20[_0x4450aa])&&(_0x102958=_0x4fe9b8(_0x102958)||_0x102958);return _0x102958;},_0x305309=(_0x47c6aa,_0x340e33)=>(_0x29236d,_0x2b420f)=>_0x340e33(_0x29236d,_0x2b420f,_0x47c6aa);let _0x4dd3c9=class extends _0x5edd3f[_0x263c48(0x156)]{constructor(_0x3b4b00,_0x32e66d){const _0x29d10d=_0x263c48;super(),this[_0x29d10d(0x148)]=_0x3b4b00,this['_threadCommentDataSource']=_0x32e66d,this[_0x29d10d(0x102)]();}[_0x263c48(0x102)](){const _0x1ceb63=_0x263c48;this[_0x1ceb63(0x148)]['dataSource']=this[_0x1ceb63(0x15d)],this[_0x1ceb63(0x148)][_0x1ceb63(0x12a)]=!0x1;}};_0x4dd3c9=_0x509cdb([_0x305309(0x0,_0x5b30bc['IThreadCommentDataSourceService']),_0x305309(0x1,_0x5edd3f['Inject'](_0x19c89e))],_0x4dd3c9);var _0x54904a=Object[_0x263c48(0x162)],_0x21b3b5=Object[_0x263c48(0x157)],_0x4e2eb3=(_0x36ecf8,_0x4966b0,_0x401b83)=>_0x4966b0 in _0x36ecf8?_0x54904a(_0x36ecf8,_0x4966b0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x401b83}):_0x36ecf8[_0x4966b0]=_0x401b83,_0xf6cd56=(_0x3615a2,_0x595323,_0x350e3e,_0x404de0)=>{const _0x363896=_0x263c48;for(var _0x3dd8a8=_0x404de0>0x1?void 0x0:_0x404de0?_0x21b3b5(_0x595323,_0x350e3e):_0x595323,_0xb42d7=_0x3615a2[_0x363896(0x136)]-0x1,_0x1ae9fa;_0xb42d7>=0x0;_0xb42d7--)(_0x1ae9fa=_0x3615a2[_0xb42d7])&&(_0x3dd8a8=_0x1ae9fa(_0x3dd8a8)||_0x3dd8a8);return _0x3dd8a8;},_0x58fd34=(_0x2e9c8b,_0xc4aec2)=>(_0x4d8a2b,_0xfd1169)=>_0xc4aec2(_0x4d8a2b,_0xfd1169,_0x2e9c8b),_0x1790c1=(_0x4362c8,_0x47d277,_0x2003af)=>_0x4e2eb3(_0x4362c8,typeof _0x47d277!=_0x263c48(0x126)?_0x47d277+'':_0x47d277,_0x2003af);_0x2e86e2[_0x263c48(0x15c)]=class extends _0x5edd3f[_0x263c48(0xf8)]{constructor(_0x1c3de2=_0x1c0e90,_0x4fb401,_0x426b56){const _0x5a9832=_0x263c48;super(),this['_config']=_0x1c3de2,this['_injector']=_0x4fb401,this[_0x5a9832(0x14b)]=_0x426b56;const {..._0x25dc97}=_0x5edd3f[_0x5a9832(0x106)]({},_0x1c0e90,this[_0x5a9832(0x10f)]);this['_configService'][_0x5a9832(0xfb)](_0x12ca71,_0x25dc97);}[_0x263c48(0x11d)](){const _0x5ebc1e=_0x263c48;[[_0x19c89e],[_0x4dd3c9],[_0x6779bf]][_0x5ebc1e(0xfa)](_0x727300=>{const _0x179447=_0x5ebc1e;this[_0x179447(0x133)][_0x179447(0x154)](_0x727300);});}[_0x263c48(0xff)](){const _0xdc3671=_0x263c48;this['_injector'][_0xdc3671(0x11b)](_0x4dd3c9),this[_0xdc3671(0x133)]['get'](_0x6779bf);}},_0x1790c1(_0x2e86e2[_0x263c48(0x15c)],_0x263c48(0x11c),_0x907ed),_0x1790c1(_0x2e86e2[_0x263c48(0x15c)],'type',_0x5edd3f[_0x263c48(0x128)][_0x263c48(0x13d)]),_0x2e86e2[_0x263c48(0x15c)]=_0xf6cd56([_0x5edd3f['DependentOn'](_0x525bd8['UniverThreadCommentUIPlugin'],_0x101de3['UniverCollaborationClientPlugin'],_0x572db9[_0x263c48(0x145)]),_0x58fd34(0x1,_0x5edd3f[_0x263c48(0x105)](_0x5edd3f[_0x263c48(0x166)])),_0x58fd34(0x2,_0x5edd3f[_0x263c48(0x12c)])],_0x2e86e2[_0x263c48(0x15c)]),Object[_0x263c48(0x162)](_0x2e86e2,Symbol[_0x263c48(0x103)],{'value':_0x263c48(0x160)});}));function _0x57f2(){const _0x5ca6f4=['syncUpdateMutationToColla','getUnit','IConfigService','code','@univerjs/core','/reply','content','userId','@univerjs-pro/collaboration-client','_injector','YYYY/MM/DD\x20HH:mm','post','length','372ErBjfr','addUser','rangeId','UniverProLicense','resolveComment','/universer-api/user/list','UNIVER_UNKNOWN','dayjs','4CBYCZs','UniverProCollaborationClient','root','Solved','UNRECOGNIZED','stringify','UniverLicensePlugin','payload','map','_threadCommentDataSourceService','replyId','Solve','_configService','_httpService','OpenOrReOpen','@univerjs-pro/license','7348976aBZEMH','CustomRangeType','parentId','amd','saveCommentToSnapshot','add','Unknown','Disposable','getOwnPropertyDescriptor','2524732cUOREB','updateComment','threadId','406274eeKnyA','UniverThreadCommentDataSourcePlugin','_threadCommentDataSource','thread-comment-data-source.config','slice','Module','getUser','defineProperty','replies','/edit','Reply','Injector','filter','subscribe','UserManagerService','/add','format','createTimestamp','rangeType','20ZiTLvq','COMMENT','/universer-api/comment/unit/','listComments','UniverNetwork','_sessionService','HTTPService','rxjs','personId','commentUpdate$','30ZjVZBU','type','@univerjs/thread-comment','values','ThreadCommentModel','Plugin','_commentService','forEach','setConfig','70302RoBKsK','user','_threadCommentModel','onReady','bufferTime','function','_initDataSource','toStringTag','@univerjs/network','Inject','merge','9gSwjAQ','addComment','Add','Edit','UniverThreadComment','getMemberID','body','exports','_config','CollaborationSessionService','find','customRanges','disposeWithMe','error','getComment','reply','_initUserSync','_userService','2130TGqpCY','Delete','get','pluginName','onStarting','ref','requireSession','pipe','parse','819216RZdQLJ','unitId','5901250RsYYTZ','@univerjs/thread-comment-ui','symbol','/solved','UniverInstanceType','_init'];_0x57f2=function(){return _0x5ca6f4;};return _0x57f2();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.15.1",
3
+ "version": "0.15.2-insiders.20260119-edc718c",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.15.1",
49
- "@univerjs-pro/license": "0.15.1",
50
- "@univerjs/core": "0.15.1",
48
+ "@univerjs-pro/collaboration-client": "0.15.2-insiders.20260119-edc718c",
49
+ "@univerjs-pro/license": "0.15.2-insiders.20260119-edc718c",
50
+ "@univerjs/network": "0.15.2-insiders.20260119-edc718c",
51
+ "@univerjs/core": "0.15.2-insiders.20260119-edc718c",
51
52
  "@univerjs/protocol": "0.1.48",
52
- "@univerjs/network": "0.15.1",
53
- "@univerjs/thread-comment": "0.15.1",
54
- "@univerjs/thread-comment-ui": "0.15.1"
53
+ "@univerjs/thread-comment-ui": "0.15.2-insiders.20260119-edc718c",
54
+ "@univerjs/thread-comment": "0.15.2-insiders.20260119-edc718c"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.9.3",
59
59
  "vite": "^7.3.1",
60
60
  "vitest": "^4.0.16",
61
- "@univerjs-infra/shared": "0.15.1"
61
+ "@univerjs-infra/shared": "0.15.2"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",