@univerjs-pro/thread-comment-datasource 0.10.7-nightly.202509130618 → 0.10.7-nightly.202509130640

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 _0x22b0fc=_0x2e9b;(function(_0x1bfecf,_0x1f000c){const _0x5e8af1=_0x2e9b,_0x444723=_0x1bfecf();while(!![]){try{const _0x115f45=parseInt(_0x5e8af1(0x9d))/0x1*(-parseInt(_0x5e8af1(0x71))/0x2)+parseInt(_0x5e8af1(0xab))/0x3+-parseInt(_0x5e8af1(0x76))/0x4*(-parseInt(_0x5e8af1(0x8b))/0x5)+parseInt(_0x5e8af1(0xa1))/0x6*(parseInt(_0x5e8af1(0xe2))/0x7)+-parseInt(_0x5e8af1(0xe1))/0x8+parseInt(_0x5e8af1(0x89))/0x9*(-parseInt(_0x5e8af1(0xb1))/0xa)+parseInt(_0x5e8af1(0xda))/0xb;if(_0x115f45===_0x1f000c)break;else _0x444723['push'](_0x444723['shift']());}catch(_0x187edc){_0x444723['push'](_0x444723['shift']());}}}(_0x21d3,0xac78e));Object[_0x22b0fc(0x6f)](exports,Symbol['toStringTag'],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x13566e=>(_0x13566e[_0x13566e[_0x22b0fc(0x8e)]=0x0]=_0x22b0fc(0x8e),_0x13566e[_0x13566e['Solved']=0x1]=_0x22b0fc(0x7a),_0x13566e[_0x13566e[_0x22b0fc(0xdb)]=-0x1]='UNRECOGNIZED',_0x13566e))(I||{}),v=(_0x41c27d=>(_0x41c27d[_0x41c27d['Unknown']=0x0]=_0x22b0fc(0x7c),_0x41c27d[_0x41c27d[_0x22b0fc(0x78)]=0x1]=_0x22b0fc(0x78),_0x41c27d[_0x41c27d[_0x22b0fc(0xb6)]=0x2]='Reply',_0x41c27d[_0x41c27d[_0x22b0fc(0xa2)]=0x3]=_0x22b0fc(0xa2),_0x41c27d[_0x41c27d[_0x22b0fc(0x70)]=0x4]=_0x22b0fc(0x70),_0x41c27d[_0x41c27d[_0x22b0fc(0x91)]=0x5]=_0x22b0fc(0x91),_0x41c27d[_0x41c27d[_0x22b0fc(0xdb)]=-0x1]=_0x22b0fc(0xdb),_0x41c27d))(v||{});const f=_0x1662c4=>c[_0x22b0fc(0x9b)](new Date(+_0x1662c4))[_0x22b0fc(0xa5)](_0x22b0fc(0xc9)),R=async(_0xf1341d,_0x3abd40)=>{const _0x22536a=_0x22b0fc,_0x53b1b6=_0xf1341d[_0x22536a(0xc3)](c[_0x22536a(0x9f)]),_0x191aeb=_0xf1341d[_0x22536a(0xc3)](P[_0x22536a(0x73)]);_0x3abd40[_0x22536a(0xdd)](_0x495087=>{const _0x13da5c=_0x22536a;_0x53b1b6[_0x13da5c(0xd9)](_0x495087)&&_0x3abd40[_0x13da5c(0x7f)](_0x495087);}),_0x3abd40[_0x22536a(0x8a)]&&(await _0x191aeb['get'](_0x22536a(0x7e),{'params':{'userIDs':[..._0x3abd40]}}))['body'][_0x22536a(0xb8)][_0x22536a(0xdd)](_0x2573c1=>{_0x2573c1&&_0x53b1b6['addUser'](_0x2573c1);});};function _0x2e9b(_0x2ecc66,_0x53c78d){const _0x21d3f7=_0x21d3();return _0x2e9b=function(_0x2e9bc1,_0x14f065){_0x2e9bc1=_0x2e9bc1-0x6a;let _0x4e0a89=_0x21d3f7[_0x2e9bc1];return _0x4e0a89;},_0x2e9b(_0x2ecc66,_0x53c78d);}var $=Object[_0x22b0fc(0x94)],E=(_0x28efad,_0x57d508,_0x5a28e0,_0x49d627)=>{const _0x3ee7dd=_0x22b0fc;for(var _0x57f96f=_0x49d627>0x1?void 0x0:_0x49d627?$(_0x57d508,_0x5a28e0):_0x57d508,_0x11ec4f=_0x28efad[_0x3ee7dd(0xa0)]-0x1,_0x466e89;_0x11ec4f>=0x0;_0x11ec4f--)(_0x466e89=_0x28efad[_0x11ec4f])&&(_0x57f96f=_0x466e89(_0x57f96f)||_0x57f96f);return _0x57f96f;},S=(_0x4e463b,_0x3deff3)=>(_0x3c9bc8,_0x1f3ffa)=>_0x3deff3(_0x3c9bc8,_0x1f3ffa,_0x4e463b);let _=class extends c['Disposable']{constructor(_0x676dd5,_0x44718c,_0x44c84b,_0x4aad3b){const _0x26bd3b=_0x22b0fc;super(),this[_0x26bd3b(0x6b)]=_0x676dd5,this[_0x26bd3b(0xca)]=_0x44718c,this[_0x26bd3b(0xa6)]=_0x44c84b,this[_0x26bd3b(0xa9)]=_0x4aad3b,this[_0x26bd3b(0xba)](),this[_0x26bd3b(0xaa)]();}['_initUserSync'](){const _0x4dd5ae=_0x22b0fc;this['disposeWithMe'](this['_threadCommentModel'][_0x4dd5ae(0xd6)][_0x4dd5ae(0xdc)](j[_0x4dd5ae(0xc0)](0x10))[_0x4dd5ae(0xd7)](_0x1b7526=>{const _0x4ea2a2=_0x4dd5ae,_0x3b152d=new Set();_0x1b7526[_0x4ea2a2(0xdd)](_0x1dd5e1=>{const _0x4ffb5d=_0x4ea2a2;switch(_0x1dd5e1[_0x4ffb5d(0x81)]){case _0x4ffb5d(0xb7):{const _0xe8703b=_0x1dd5e1[_0x4ffb5d(0x99)]['personId'];_0x3b152d[_0x4ffb5d(0xb7)](_0xe8703b);break;}}}),R(this[_0x4ea2a2(0xa9)],_0x3b152d);}));}[_0x22b0fc(0xba)](){const _0x4d8492=_0x22b0fc;this['disposeWithMe'](this[_0x4d8492(0x6b)][_0x4d8492(0xd6)][_0x4d8492(0xd7)](async _0x351f51=>{const _0x4dee7c=_0x4d8492;var _0x20dbe7,_0x15b0f3,_0x16ceb6,_0x159a6c;const _0x32a2f3=(_0x20dbe7=this[_0x4dee7c(0xca)][_0x4dee7c(0x92)](_0x351f51[_0x4dee7c(0xd1)])[_0x4dee7c(0xe0)](_0x4daa34=>_0x4daa34[_0x4dee7c(0xac)]===_0x351f51[_0x4dee7c(0xac)]))==null?void 0x0:_0x20dbe7[_0x4dee7c(0xc5)];if(!_0x32a2f3)return;const {unitId:_0x4f6a98,subUnitId:_0x58b07c}=_0x32a2f3;switch(_0x351f51[_0x4dee7c(0xde)]&&this['_userService'][_0x4dee7c(0xd0)](_0x351f51['user']),_0x351f51[_0x4dee7c(0x81)]){case v['Add']:break;case v[_0x4dee7c(0xb6)]:{this['_threadCommentModel'][_0x4dee7c(0x85)](_0x4f6a98,_0x58b07c,{'unitId':_0x4f6a98,'subUnitId':_0x58b07c,'ref':'','id':_0x351f51[_0x4dee7c(0x82)],'dT':f(+_0x351f51[_0x4dee7c(0xaf)]),'threadId':_0x351f51['threadId'],'personId':(_0x16ceb6=(_0x15b0f3=_0x351f51[_0x4dee7c(0xde)])==null?void 0x0:_0x15b0f3[_0x4dee7c(0xb2)])!=null?_0x16ceb6:_0x351f51['userId'],'text':JSON[_0x4dee7c(0xa7)](_0x351f51[_0x4dee7c(0x6d)]),'parentId':_0x32a2f3['id']});break;}case v[_0x4dee7c(0x70)]:{const _0x23384c=this['_threadCommentModel'][_0x4dee7c(0xd3)](_0x4f6a98,_0x58b07c,_0x351f51[_0x4dee7c(0x82)]);_0x23384c&&_0x23384c[_0x4dee7c(0xae)]&&this[_0x4dee7c(0xca)]['deleteComment'](_0x4f6a98,_0x58b07c,_0x351f51['replyId']);break;}case v[_0x4dee7c(0xa2)]:{this[_0x4dee7c(0xca)][_0x4dee7c(0x90)](_0x4f6a98,_0x58b07c,{'commentId':_0x351f51['replyId'],'text':JSON[_0x4dee7c(0xa7)](_0x351f51[_0x4dee7c(0x6d)])});break;}case v[_0x4dee7c(0x91)]:{const _0xa3fb9a=(_0x159a6c=this[_0x4dee7c(0xca)]['getUnit'](_0x351f51[_0x4dee7c(0xd1)])[_0x4dee7c(0xe0)](_0x14839e=>_0x14839e[_0x4dee7c(0xac)]===_0x351f51['threadId']))==null?void 0x0:_0x159a6c['root'];_0xa3fb9a&&this[_0x4dee7c(0xca)]['resolveComment'](_0x4f6a98,_0x58b07c,_0xa3fb9a['id'],_0x351f51[_0x4dee7c(0x7b)]===I[_0x4dee7c(0x7a)]);break;}}}));}};_=E([S(0x0,c[_0x22b0fc(0xd2)](b[_0x22b0fc(0x72)])),S(0x1,c[_0x22b0fc(0xd2)](M[_0x22b0fc(0x98)])),S(0x2,c['Inject'](c[_0x22b0fc(0x9f)])),S(0x3,c['Inject'](c[_0x22b0fc(0x7d)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x22b0fc(0x94)],x=(_0x2eb70e,_0x12b6ce,_0x534eeb,_0x671dc0)=>{for(var _0x509b4a=_0x671dc0>0x1?void 0x0:_0x671dc0?A(_0x12b6ce,_0x534eeb):_0x12b6ce,_0x1bbb0d=_0x2eb70e['length']-0x1,_0x367757;_0x1bbb0d>=0x0;_0x1bbb0d--)(_0x367757=_0x2eb70e[_0x1bbb0d])&&(_0x509b4a=_0x367757(_0x509b4a)||_0x509b4a);return _0x509b4a;},C=(_0x2cd3d3,_0xeb3e20)=>(_0x26e704,_0x3f4787)=>_0xeb3e20(_0x26e704,_0x3f4787,_0x2cd3d3);function Y(_0x445138,_0x504f4b){const _0x5b60c8=_0x22b0fc,_0x5a547e=_0x445138[_0x5b60c8(0x87)][0x0];return{..._0x504f4b,'id':_0x5a547e['replyId'],'resolved':_0x445138[_0x5b60c8(0x7b)]===0x1,'dT':f(_0x5a547e[_0x5b60c8(0xaf)]),'personId':_0x5a547e[_0x5b60c8(0xbe)],'threadId':_0x5a547e[_0x5b60c8(0xac)]};}function _0x21d3(){const _0x2e58d7=['users','saveCommentToSnapshot','_init','COMMENT','code','deleteComment','userId','/reply','bufferTime','comments','filter','get','stringify','root','UniverThreadCommentDataSourcePlugin','customRanges','syncUpdateMutationToColla','YYYY/MM/DD\x20HH:mm','_threadCommentModel','onReady','error','reply','_sessionService','rangeId','addUser','unitId','Inject','getComment','Plugin','/list','commentUpdate$','subscribe','UniverLicensePlugin','getUser','3767786FmFmtf','UNRECOGNIZED','pipe','forEach','user','/delete','find','4466976ogxkbu','486829JddnUg','getMemberID','requireSession','_commentService','_initDataSource','content','symbol','defineProperty','Delete','3238syNWwN','CommentService','HTTPService','_httpService','IThreadCommentDataSourceService','668uiEmmR','/universer-api/comment/unit/','Add','_threadCommentDataSource','Solved','solved','Unknown','Injector','/universer-api/user/list','delete','values','type','replyId','/add','ref','addComment','pluginName','replies','_threadCommentDataSourceService','56529lHPpFy','size','13045kgUrNd','/edit','map','OpenOrReOpen','CustomRangeType','updateComment','Solve','getUnit','_configService','getOwnPropertyDescriptor','UNIVER_UNKNOWN','rangeType','listComments','ThreadCommentModel','payload','body','dayjs','onStarting','245citjGS','resolveComment','UserManagerService','length','6PDcpoN','Edit','merge','UniverInstanceType','format','_userService','parse','Disposable','_injector','_initUserSync','4005060YgKKKE','threadId','post','parentId','createTimestamp','IConfigService','830HCJnFI','userID','setConfig','_config','DependentOn','Reply','add'];_0x21d3=function(){return _0x2e58d7;};return _0x21d3();}function G(_0x213e12,_0x2f33e2,_0x2b48b4){const _0x211bf2=_0x22b0fc;var _0x30cfe8,_0x18acee;if(((_0x18acee=(_0x30cfe8=_0x213e12==null?void 0x0:_0x213e12[_0x211bf2(0x87)])==null?void 0x0:_0x30cfe8['length'])!=null?_0x18acee:0x0)>0x0){const _0x439be5=(_0x44e1c8,_0x2e0d72)=>({'id':_0x44e1c8[_0x211bf2(0x82)],'threadId':_0x44e1c8[_0x211bf2(0xac)],'dT':f(_0x44e1c8[_0x211bf2(0xaf)]),'personId':_0x44e1c8[_0x211bf2(0xbe)],'resolved':_0x213e12[_0x211bf2(0x7b)]===I[_0x211bf2(0x7a)],'unitId':_0x2f33e2,'subUnitId':_0x2b48b4,'text':JSON[_0x211bf2(0xa7)](_0x44e1c8[_0x211bf2(0x6d)]),'parentId':_0x2e0d72}),_0x857a73=_0x439be5(_0x213e12[_0x211bf2(0x87)][0x0]);return{..._0x857a73,'children':_0x213e12[_0x211bf2(0x87)]['slice'](0x1)['map'](_0x149ff9=>_0x439be5(_0x149ff9,_0x857a73['id']))};}return null;}let p=class{constructor(_0x173f9b,_0x10773b,_0x5288ea){const _0x1e3ad3=_0x22b0fc;this[_0x1e3ad3(0x74)]=_0x173f9b,this['_userService']=_0x10773b,this[_0x1e3ad3(0xce)]=_0x5288ea;}async[_0x22b0fc(0x85)](_0x204b40){const _0xe8a276=_0x22b0fc;var _0x545ba6,_0x20b72a;const {parentId:_0x55330b,unitId:_0xddb54f,text:_0x53e1f0,threadId:_0x26a76e}=_0x204b40,_0x1f14fe=(_0x20b72a=(_0x545ba6=_0x53e1f0[_0xe8a276(0xc7)])==null?void 0x0:_0x545ba6[_0xe8a276(0xc2)](_0x399ebd=>_0x399ebd[_0xe8a276(0x96)]===c[_0xe8a276(0x8f)]['COMMENT'])[_0xe8a276(0x8d)](_0x16ef26=>_0x16ef26[_0xe8a276(0xcf)]))!=null?_0x20b72a:[],_0x4de280=JSON[_0xe8a276(0xc4)](_0x53e1f0),_0x36141f=(await this['_sessionService'][_0xe8a276(0x6a)](_0xddb54f))[_0xe8a276(0xe3)]();if(_0x55330b){const _0x1385c7={'memberId':_0x36141f,'unitId':_0xddb54f,'content':_0x4de280,'mention':_0x1f14fe,'threadId':_0x26a76e},_0x3a8ce1=(await this[_0xe8a276(0x74)][_0xe8a276(0xad)]('/universer-api/comment/unit/'+_0xddb54f+_0xe8a276(0xbf),{'body':_0x1385c7}))[_0xe8a276(0x9a)][_0xe8a276(0xcd)];return{..._0x204b40,'id':_0x3a8ce1[_0xe8a276(0x82)],'dT':c['dayjs'](+_0x3a8ce1[_0xe8a276(0xaf)])[_0xe8a276(0xa5)](_0xe8a276(0xc9)),'personId':_0x3a8ce1[_0xe8a276(0xbe)]};}else{const _0xae6467={'memberId':_0x36141f,'unitId':_0xddb54f,'content':_0x4de280,'mention':_0x1f14fe},_0x295ca2=await this[_0xe8a276(0x74)][_0xe8a276(0xad)](_0xe8a276(0x77)+_0xddb54f+_0xe8a276(0x83),{'body':_0xae6467});return Y(_0x295ca2[_0xe8a276(0x9a)]['comment'],_0x204b40);}}async[_0x22b0fc(0x90)](_0x1310b3){const _0x375aa5=_0x22b0fc;var _0x276180,_0x20c638;const {text:_0x5e8e8d,unitId:_0x17d11f}=_0x1310b3,_0x32b86a=(_0x20c638=(_0x276180=_0x5e8e8d[_0x375aa5(0xc7)])==null?void 0x0:_0x276180[_0x375aa5(0xc2)](_0x1d01bc=>_0x1d01bc[_0x375aa5(0x96)]===c['CustomRangeType'][_0x375aa5(0xbb)])[_0x375aa5(0x8d)](_0xfdd556=>_0xfdd556[_0x375aa5(0xcf)]))!=null?_0x20c638:[],_0x2442b0=JSON[_0x375aa5(0xc4)](_0x5e8e8d),_0x13b700=_0x1310b3[_0x375aa5(0xac)],_0xca9d08=_0x1310b3['id'],_0x43ddc5={'memberId':(await this[_0x375aa5(0xce)][_0x375aa5(0x6a)](_0x17d11f))[_0x375aa5(0xe3)](),'unitId':_0x17d11f,'threadId':_0x13b700,'mention':_0x32b86a,'content':_0x2442b0,'replyId':_0xca9d08},_0x4f88d4=await this['_httpService'][_0x375aa5(0xad)](_0x375aa5(0x77)+_0x17d11f+_0x375aa5(0x8c),{'body':_0x43ddc5});return!_0x4f88d4[_0x375aa5(0x9a)][_0x375aa5(0xcc)]||_0x4f88d4['body']['error'][_0x375aa5(0xbc)]===0x1;}async[_0x22b0fc(0x9e)](_0x53193f){const _0xfd830b=_0x22b0fc,{unitId:_0x5bc07e}=_0x53193f,_0x42e7a3=_0x53193f[_0xfd830b(0xac)],_0x2123df={'memberId':this[_0xfd830b(0xa6)]['getCurrentUser']()[_0xfd830b(0xb2)],'unitId':_0x5bc07e,'threadId':_0x42e7a3,'solved':_0x53193f['resolved']?I[_0xfd830b(0x7a)]:I[_0xfd830b(0x8e)]},_0x178b47=await this[_0xfd830b(0x74)][_0xfd830b(0xad)]('/universer-api/comment/unit/'+_0x5bc07e+'/solved',{'body':_0x2123df});return!_0x178b47['body']['error']||_0x178b47[_0xfd830b(0x9a)][_0xfd830b(0xcc)][_0xfd830b(0xbc)]===0x1;}async[_0x22b0fc(0xbd)](_0x49eae1,_0xd2950c,_0x3bd6bb,_0x3a7cd1){const _0x336a44=_0x22b0fc,_0x27a6bc={'memberId':(await this[_0x336a44(0xce)][_0x336a44(0x6a)](_0x49eae1))['getMemberID'](),'threadId':_0x3bd6bb,'replyId':_0x3a7cd1,'unitId':_0x49eae1},_0x45a4be=await this[_0x336a44(0x74)]['post'](_0x336a44(0x77)+_0x49eae1+_0x336a44(0xdf),{'body':_0x27a6bc});return!_0x45a4be[_0x336a44(0x9a)]['error']||_0x45a4be[_0x336a44(0x9a)][_0x336a44(0xcc)]['code']===0x1;}async[_0x22b0fc(0x97)](_0x258cb9,_0x4dc32a,_0x465a04){const _0x496cb4=_0x22b0fc,_0x39a3a2={'unitId':_0x258cb9,'threadId':_0x465a04},_0x527010=await this[_0x496cb4(0x74)][_0x496cb4(0xad)](_0x496cb4(0x77)+_0x258cb9+_0x496cb4(0xd5),{'body':_0x39a3a2}),_0x213c3d=_0x465a04[_0x496cb4(0x8d)](_0x268422=>G(_0x527010[_0x496cb4(0x9a)][_0x496cb4(0xc1)][_0x268422],_0x258cb9,_0x4dc32a))[_0x496cb4(0xc2)](Boolean);return Object[_0x496cb4(0x80)](_0x527010['body'][_0x496cb4(0xb8)])[_0x496cb4(0xdd)](_0x5e0b50=>{this['_userService']['addUser'](_0x5e0b50);}),_0x213c3d;}[_0x22b0fc(0xb9)](_0x463578){const _0x3f5eee=_0x22b0fc;return{'id':_0x463578['id'],'threadId':_0x463578[_0x3f5eee(0xac)],'ref':_0x463578[_0x3f5eee(0x84)]};}};p=x([C(0x0,c['Inject'](P['HTTPService'])),C(0x1,c[_0x22b0fc(0xd2)](c[_0x22b0fc(0x9f)])),C(0x2,c[_0x22b0fc(0xd2)](b['CollaborationSessionService']))],p);var H=Object[_0x22b0fc(0x94)],J=(_0x3cb001,_0x5e3420,_0x1bbf30,_0x1e3c0b)=>{for(var _0x126550=_0x1e3c0b>0x1?void 0x0:_0x1e3c0b?H(_0x5e3420,_0x1bbf30):_0x5e3420,_0x37f2d4=_0x3cb001['length']-0x1,_0x9bee4a;_0x37f2d4>=0x0;_0x37f2d4--)(_0x9bee4a=_0x3cb001[_0x37f2d4])&&(_0x126550=_0x9bee4a(_0x126550)||_0x126550);return _0x126550;},y=(_0x5c2892,_0x1d9976)=>(_0x1dd07c,_0x56fe89)=>_0x1d9976(_0x1dd07c,_0x56fe89,_0x5c2892);let g=class extends c[_0x22b0fc(0xa8)]{constructor(_0x1951ad,_0x45256c){const _0x44a84c=_0x22b0fc;super(),this[_0x44a84c(0x88)]=_0x1951ad,this[_0x44a84c(0x79)]=_0x45256c,this[_0x44a84c(0x6c)]();}[_0x22b0fc(0x6c)](){const _0x49715d=_0x22b0fc;this[_0x49715d(0x88)]['dataSource']=this['_threadCommentDataSource'],this[_0x49715d(0x88)][_0x49715d(0xc8)]=!0x1;}};g=J([y(0x0,M[_0x22b0fc(0x75)]),y(0x1,c[_0x22b0fc(0xd2)](p))],g);var F=Object[_0x22b0fc(0x6f)],L=Object[_0x22b0fc(0x94)],Z=(_0x28b540,_0x6d818a,_0x5f3256)=>_0x6d818a in _0x28b540?F(_0x28b540,_0x6d818a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5f3256}):_0x28b540[_0x6d818a]=_0x5f3256,W=(_0x12f8f4,_0x2daa4f,_0x2ee54e,_0x202a07)=>{const _0x1becb9=_0x22b0fc;for(var _0x2c2626=_0x202a07>0x1?void 0x0:_0x202a07?L(_0x2daa4f,_0x2ee54e):_0x2daa4f,_0x43ee2a=_0x12f8f4[_0x1becb9(0xa0)]-0x1,_0x383167;_0x43ee2a>=0x0;_0x43ee2a--)(_0x383167=_0x12f8f4[_0x43ee2a])&&(_0x2c2626=_0x383167(_0x2c2626)||_0x2c2626);return _0x2c2626;},O=(_0x40b431,_0x1dcaeb)=>(_0x434a8e,_0x4d9101)=>_0x1dcaeb(_0x434a8e,_0x4d9101,_0x40b431),N=(_0x57ca8b,_0x392674,_0x29e06c)=>Z(_0x57ca8b,typeof _0x392674!=_0x22b0fc(0x6e)?_0x392674+'':_0x392674,_0x29e06c);exports[_0x22b0fc(0xc6)]=class extends c[_0x22b0fc(0xd4)]{constructor(_0x2db676=D,_0x125fb4,_0x495fd3){const _0x5160ea=_0x22b0fc;super(),this[_0x5160ea(0xb4)]=_0x2db676,this[_0x5160ea(0xa9)]=_0x125fb4,this[_0x5160ea(0x93)]=_0x495fd3;const {..._0xd0b2a7}=c[_0x5160ea(0xa3)]({},D,this['_config']);this['_configService'][_0x5160ea(0xb3)](q,_0xd0b2a7);}[_0x22b0fc(0x9c)](){const _0x71e3bc=_0x22b0fc;[[p],[g],[_]][_0x71e3bc(0xdd)](_0x36ea8=>{const _0x124393=_0x71e3bc;this[_0x124393(0xa9)][_0x124393(0xb7)](_0x36ea8);});}[_0x22b0fc(0xcb)](){const _0x274e1f=_0x22b0fc;this[_0x274e1f(0xa9)]['get'](g),this[_0x274e1f(0xa9)][_0x274e1f(0xc3)](_);}},N(exports[_0x22b0fc(0xc6)],_0x22b0fc(0x86),U),N(exports[_0x22b0fc(0xc6)],'type',c[_0x22b0fc(0xa4)][_0x22b0fc(0x95)]),exports[_0x22b0fc(0xc6)]=W([c[_0x22b0fc(0xb5)](w['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T[_0x22b0fc(0xd8)]),O(0x1,c[_0x22b0fc(0xd2)](c['Injector'])),O(0x2,c[_0x22b0fc(0xb0)])],exports[_0x22b0fc(0xc6)]);
1
+ 'use strict';const _0x49849a=_0x1b25;(function(_0x17097c,_0x5949ad){const _0x234dd9=_0x1b25,_0x524c25=_0x17097c();while(!![]){try{const _0x5e18a2=parseInt(_0x234dd9(0xf2))/0x1*(parseInt(_0x234dd9(0xd0))/0x2)+-parseInt(_0x234dd9(0xc5))/0x3*(parseInt(_0x234dd9(0xc4))/0x4)+-parseInt(_0x234dd9(0xdb))/0x5+-parseInt(_0x234dd9(0xfc))/0x6*(-parseInt(_0x234dd9(0xce))/0x7)+-parseInt(_0x234dd9(0xde))/0x8*(-parseInt(_0x234dd9(0xc7))/0x9)+-parseInt(_0x234dd9(0xd4))/0xa*(-parseInt(_0x234dd9(0xf0))/0xb)+parseInt(_0x234dd9(0xc2))/0xc;if(_0x5e18a2===_0x5949ad)break;else _0x524c25['push'](_0x524c25['shift']());}catch(_0x327095){_0x524c25['push'](_0x524c25['shift']());}}}(_0x1839,0x9fdd4));Object[_0x49849a(0xbb)](exports,Symbol[_0x49849a(0xb7)],{'value':_0x49849a(0x10c)});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=_0x49849a(0xa5);var I=(_0x312a05=>(_0x312a05[_0x312a05[_0x49849a(0xfa)]=0x0]=_0x49849a(0xfa),_0x312a05[_0x312a05[_0x49849a(0x101)]=0x1]=_0x49849a(0x101),_0x312a05[_0x312a05['UNRECOGNIZED']=-0x1]=_0x49849a(0xcb),_0x312a05))(I||{}),v=(_0x1ae531=>(_0x1ae531[_0x1ae531[_0x49849a(0xed)]=0x0]=_0x49849a(0xed),_0x1ae531[_0x1ae531[_0x49849a(0xff)]=0x1]=_0x49849a(0xff),_0x1ae531[_0x1ae531['Reply']=0x2]=_0x49849a(0xe7),_0x1ae531[_0x1ae531[_0x49849a(0x9d)]=0x3]=_0x49849a(0x9d),_0x1ae531[_0x1ae531[_0x49849a(0xa6)]=0x4]=_0x49849a(0xa6),_0x1ae531[_0x1ae531[_0x49849a(0xe8)]=0x5]=_0x49849a(0xe8),_0x1ae531[_0x1ae531['UNRECOGNIZED']=-0x1]=_0x49849a(0xcb),_0x1ae531))(v||{});const f=_0xaffd06=>c['dayjs'](new Date(+_0xaffd06))[_0x49849a(0xaa)]('YYYY/MM/DD\x20HH:mm'),R=async(_0xd4fa1e,_0x57b9e7)=>{const _0x1c1de2=_0x49849a,_0x1daa1a=_0xd4fa1e[_0x1c1de2(0xd8)](c[_0x1c1de2(0x10d)]),_0xa0d3ca=_0xd4fa1e[_0x1c1de2(0xd8)](P[_0x1c1de2(0x10a)]);_0x57b9e7[_0x1c1de2(0xe2)](_0x5e54c4=>{const _0x33a6cf=_0x1c1de2;_0x1daa1a['getUser'](_0x5e54c4)&&_0x57b9e7[_0x33a6cf(0xad)](_0x5e54c4);}),_0x57b9e7[_0x1c1de2(0x9e)]&&(await _0xa0d3ca['get'](_0x1c1de2(0xf4),{'params':{'userIDs':[..._0x57b9e7]}}))[_0x1c1de2(0xb8)][_0x1c1de2(0xfe)]['forEach'](_0x889a6d=>{const _0x41ea46=_0x1c1de2;_0x889a6d&&_0x1daa1a[_0x41ea46(0xc0)](_0x889a6d);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x46cf74,_0x4d573c,_0x1be50f,_0x2cbe3e)=>{const _0x38fd78=_0x49849a;for(var _0x4ce09e=_0x2cbe3e>0x1?void 0x0:_0x2cbe3e?$(_0x4d573c,_0x1be50f):_0x4d573c,_0x40b36b=_0x46cf74[_0x38fd78(0xf1)]-0x1,_0x2e1cea;_0x40b36b>=0x0;_0x40b36b--)(_0x2e1cea=_0x46cf74[_0x40b36b])&&(_0x4ce09e=_0x2e1cea(_0x4ce09e)||_0x4ce09e);return _0x4ce09e;},S=(_0x364aa3,_0x39835f)=>(_0x1e4f48,_0x1a7725)=>_0x39835f(_0x1e4f48,_0x1a7725,_0x364aa3);let _=class extends c[_0x49849a(0xe6)]{constructor(_0x134a4e,_0xd58ec8,_0x58705b,_0x38d45b){const _0xbbdb00=_0x49849a;super(),this['_commentService']=_0x134a4e,this[_0xbbdb00(0xa2)]=_0xd58ec8,this[_0xbbdb00(0x109)]=_0x58705b,this[_0xbbdb00(0xdf)]=_0x38d45b,this[_0xbbdb00(0xa9)](),this[_0xbbdb00(0x104)]();}['_initUserSync'](){const _0x3c0e24=_0x49849a;this['disposeWithMe'](this['_threadCommentModel'][_0x3c0e24(0xb2)]['pipe'](j[_0x3c0e24(0x102)](0x10))['subscribe'](_0x432b7d=>{const _0x19e386=new Set();_0x432b7d['forEach'](_0x245074=>{const _0x1f5bd5=_0x1b25;switch(_0x245074[_0x1f5bd5(0x100)]){case _0x1f5bd5(0x108):{const _0x5d6bac=_0x245074[_0x1f5bd5(0xe1)][_0x1f5bd5(0xcd)];_0x19e386[_0x1f5bd5(0x108)](_0x5d6bac);break;}}}),R(this['_injector'],_0x19e386);}));}[_0x49849a(0xa9)](){const _0x10926c=_0x49849a;this['disposeWithMe'](this['_commentService'][_0x10926c(0xb2)][_0x10926c(0xee)](async _0x3ee7f1=>{const _0x525cc=_0x10926c;var _0x247e3b,_0x3e5776,_0x39b69a,_0x481261;const _0xf6ddea=(_0x247e3b=this[_0x525cc(0xa2)][_0x525cc(0xae)](_0x3ee7f1[_0x525cc(0xb3)])[_0x525cc(0xf3)](_0x3e7110=>_0x3e7110[_0x525cc(0x98)]===_0x3ee7f1['threadId']))==null?void 0x0:_0x247e3b[_0x525cc(0xe9)];if(!_0xf6ddea)return;const {unitId:_0x1f708f,subUnitId:_0x941e44}=_0xf6ddea;switch(_0x3ee7f1[_0x525cc(0xdd)]&&this[_0x525cc(0x109)][_0x525cc(0xc0)](_0x3ee7f1['user']),_0x3ee7f1[_0x525cc(0x100)]){case v['Add']:break;case v[_0x525cc(0xe7)]:{this[_0x525cc(0xa2)][_0x525cc(0xc6)](_0x1f708f,_0x941e44,{'unitId':_0x1f708f,'subUnitId':_0x941e44,'ref':'','id':_0x3ee7f1['replyId'],'dT':f(+_0x3ee7f1[_0x525cc(0xa0)]),'threadId':_0x3ee7f1['threadId'],'personId':(_0x39b69a=(_0x3e5776=_0x3ee7f1[_0x525cc(0xdd)])==null?void 0x0:_0x3e5776[_0x525cc(0x105)])!=null?_0x39b69a:_0x3ee7f1[_0x525cc(0x10b)],'text':JSON[_0x525cc(0xca)](_0x3ee7f1['content']),'parentId':_0xf6ddea['id']});break;}case v[_0x525cc(0xa6)]:{const _0x3da445=this[_0x525cc(0xa2)][_0x525cc(0xec)](_0x1f708f,_0x941e44,_0x3ee7f1[_0x525cc(0x97)]);_0x3da445&&_0x3da445[_0x525cc(0xfd)]&&this[_0x525cc(0xa2)][_0x525cc(0xc8)](_0x1f708f,_0x941e44,_0x3ee7f1[_0x525cc(0x97)]);break;}case v[_0x525cc(0x9d)]:{this[_0x525cc(0xa2)][_0x525cc(0xcf)](_0x1f708f,_0x941e44,{'commentId':_0x3ee7f1[_0x525cc(0x97)],'text':JSON['parse'](_0x3ee7f1[_0x525cc(0x107)])});break;}case v[_0x525cc(0xe8)]:{const _0x4946bf=(_0x481261=this[_0x525cc(0xa2)][_0x525cc(0xae)](_0x3ee7f1[_0x525cc(0xb3)])[_0x525cc(0xf3)](_0x1b6483=>_0x1b6483[_0x525cc(0x98)]===_0x3ee7f1[_0x525cc(0x98)]))==null?void 0x0:_0x481261[_0x525cc(0xe9)];_0x4946bf&&this[_0x525cc(0xa2)][_0x525cc(0xd7)](_0x1f708f,_0x941e44,_0x4946bf['id'],_0x3ee7f1[_0x525cc(0x9b)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x49849a(0x9a)](b[_0x49849a(0xc3)])),S(0x1,c[_0x49849a(0x9a)](M[_0x49849a(0xda)])),S(0x2,c[_0x49849a(0x9a)](c[_0x49849a(0x10d)])),S(0x3,c['Inject'](c[_0x49849a(0x106)]))],_);const q=_0x49849a(0xaf),D={};var A=Object[_0x49849a(0xe4)],x=(_0x28acd5,_0x3c3297,_0x1237d6,_0xcb3979)=>{const _0x35ab1a=_0x49849a;for(var _0x221137=_0xcb3979>0x1?void 0x0:_0xcb3979?A(_0x3c3297,_0x1237d6):_0x3c3297,_0xf17d99=_0x28acd5[_0x35ab1a(0xf1)]-0x1,_0x1b3a6a;_0xf17d99>=0x0;_0xf17d99--)(_0x1b3a6a=_0x28acd5[_0xf17d99])&&(_0x221137=_0x1b3a6a(_0x221137)||_0x221137);return _0x221137;},C=(_0x47ae62,_0x3085cc)=>(_0x1c5de8,_0x4cb897)=>_0x3085cc(_0x1c5de8,_0x4cb897,_0x47ae62);function _0x1839(){const _0x47b387=['getMemberID','OpenOrReOpen','UniverLicensePlugin','6vQLOUx','parentId','users','Add','type','Solved','bufferTime','_configService','_initUserSync','userID','Injector','content','add','_userService','HTTPService','userId','Module','UserManagerService','replyId','threadId','DependentOn','Inject','solved','comments','Edit','size','slice','createTimestamp','onReady','_threadCommentModel','CustomRangeType','getCurrentUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Delete','reply','rangeId','_init','format','comment','UniverThreadCommentDataSourcePlugin','delete','getUnit','thread-comment-data-source.config','replies','customRanges','commentUpdate$','unitId','post','_threadCommentDataSourceService','syncUpdateMutationToColla','toStringTag','body','COMMENT','_initDataSource','defineProperty','onStarting','_config','/delete','dayjs','addUser','UniverThreadCommentUIPlugin','7660956AENmyF','CommentService','97876VTuntm','57NkvNlX','addComment','8712iAoBUN','deleteComment','requireSession','parse','UNRECOGNIZED','merge','personId','139573HKcXXc','updateComment','282FfZuQl','_threadCommentDataSource','map','listComments','30maknyU','/universer-api/comment/unit/','filter','resolveComment','get','setConfig','ThreadCommentModel','4462755CiQrsY','_httpService','user','680tpPxdc','_injector','dataSource','payload','forEach','ref','getOwnPropertyDescriptor','IThreadCommentDataSourceService','Disposable','Reply','Solve','root','code','error','getComment','Unknown','subscribe','UniverCollaborationClientPlugin','3329832TWHdsb','length','2578jaTHMa','find','/universer-api/user/list','rangeType','stringify','IConfigService','YYYY/MM/DD\x20HH:mm'];_0x1839=function(){return _0x47b387;};return _0x1839();}function Y(_0x4a8510,_0x5bed3b){const _0x2916a1=_0x49849a,_0x1ade84=_0x4a8510['replies'][0x0];return{..._0x5bed3b,'id':_0x1ade84['replyId'],'resolved':_0x4a8510[_0x2916a1(0x9b)]===0x1,'dT':f(_0x1ade84[_0x2916a1(0xa0)]),'personId':_0x1ade84[_0x2916a1(0x10b)],'threadId':_0x1ade84[_0x2916a1(0x98)]};}function G(_0x2d649c,_0xcbf474,_0x233a8c){const _0x2596de=_0x49849a;var _0x1688a2,_0x126139;if(((_0x126139=(_0x1688a2=_0x2d649c==null?void 0x0:_0x2d649c[_0x2596de(0xb0)])==null?void 0x0:_0x1688a2[_0x2596de(0xf1)])!=null?_0x126139:0x0)>0x0){const _0x29e902=(_0xda353d,_0x369e68)=>({'id':_0xda353d[_0x2596de(0x97)],'threadId':_0xda353d[_0x2596de(0x98)],'dT':f(_0xda353d['createTimestamp']),'personId':_0xda353d[_0x2596de(0x10b)],'resolved':_0x2d649c[_0x2596de(0x9b)]===I[_0x2596de(0x101)],'unitId':_0xcbf474,'subUnitId':_0x233a8c,'text':JSON['parse'](_0xda353d[_0x2596de(0x107)]),'parentId':_0x369e68}),_0x1da4cd=_0x29e902(_0x2d649c[_0x2596de(0xb0)][0x0]);return{..._0x1da4cd,'children':_0x2d649c[_0x2596de(0xb0)][_0x2596de(0x9f)](0x1)['map'](_0x24207b=>_0x29e902(_0x24207b,_0x1da4cd['id']))};}return null;}function _0x1b25(_0x5eec79,_0x58c0a9){const _0x1839ec=_0x1839();return _0x1b25=function(_0x1b2596,_0x3f07b3){_0x1b2596=_0x1b2596-0x97;let _0x55b4a6=_0x1839ec[_0x1b2596];return _0x55b4a6;},_0x1b25(_0x5eec79,_0x58c0a9);}let p=class{constructor(_0x48e75f,_0x2dfbf4,_0xac536b){const _0x41e2bb=_0x49849a;this['_httpService']=_0x48e75f,this[_0x41e2bb(0x109)]=_0x2dfbf4,this['_sessionService']=_0xac536b;}async[_0x49849a(0xc6)](_0x1ee7a7){const _0xa8cc94=_0x49849a;var _0x4d389a,_0x1a9b2a;const {parentId:_0xaa053a,unitId:_0x39bf24,text:_0x5a0221,threadId:_0x57ae52}=_0x1ee7a7,_0xae0c70=(_0x1a9b2a=(_0x4d389a=_0x5a0221[_0xa8cc94(0xb1)])==null?void 0x0:_0x4d389a['filter'](_0x4b1fa4=>_0x4b1fa4[_0xa8cc94(0xf5)]===c[_0xa8cc94(0xa3)]['COMMENT'])[_0xa8cc94(0xd2)](_0x384124=>_0x384124[_0xa8cc94(0xa8)]))!=null?_0x1a9b2a:[],_0x294ff5=JSON[_0xa8cc94(0xf6)](_0x5a0221),_0xd0a4b=(await this['_sessionService'][_0xa8cc94(0xc9)](_0x39bf24))['getMemberID']();if(_0xaa053a){const _0x186ba8={'memberId':_0xd0a4b,'unitId':_0x39bf24,'content':_0x294ff5,'mention':_0xae0c70,'threadId':_0x57ae52},_0x35d198=(await this[_0xa8cc94(0xdc)][_0xa8cc94(0xb4)](_0xa8cc94(0xd5)+_0x39bf24+'/reply',{'body':_0x186ba8}))[_0xa8cc94(0xb8)][_0xa8cc94(0xa7)];return{..._0x1ee7a7,'id':_0x35d198[_0xa8cc94(0x97)],'dT':c[_0xa8cc94(0xbf)](+_0x35d198[_0xa8cc94(0xa0)])[_0xa8cc94(0xaa)](_0xa8cc94(0xf8)),'personId':_0x35d198[_0xa8cc94(0x10b)]};}else{const _0x57020a={'memberId':_0xd0a4b,'unitId':_0x39bf24,'content':_0x294ff5,'mention':_0xae0c70},_0x47ae2e=await this['_httpService'][_0xa8cc94(0xb4)](_0xa8cc94(0xd5)+_0x39bf24+'/add',{'body':_0x57020a});return Y(_0x47ae2e[_0xa8cc94(0xb8)][_0xa8cc94(0xab)],_0x1ee7a7);}}async['updateComment'](_0x1a8086){const _0x92aecd=_0x49849a;var _0x57dc0a,_0x25ee45;const {text:_0x233f98,unitId:_0x2e49c7}=_0x1a8086,_0x1ffec2=(_0x25ee45=(_0x57dc0a=_0x233f98[_0x92aecd(0xb1)])==null?void 0x0:_0x57dc0a[_0x92aecd(0xd6)](_0x6e2f40=>_0x6e2f40[_0x92aecd(0xf5)]===c[_0x92aecd(0xa3)][_0x92aecd(0xb9)])[_0x92aecd(0xd2)](_0x49d312=>_0x49d312[_0x92aecd(0xa8)]))!=null?_0x25ee45:[],_0x80d7b0=JSON[_0x92aecd(0xf6)](_0x233f98),_0x40d9bd=_0x1a8086['threadId'],_0x340ba6=_0x1a8086['id'],_0x25896f={'memberId':(await this['_sessionService'][_0x92aecd(0xc9)](_0x2e49c7))['getMemberID'](),'unitId':_0x2e49c7,'threadId':_0x40d9bd,'mention':_0x1ffec2,'content':_0x80d7b0,'replyId':_0x340ba6},_0x164cce=await this[_0x92aecd(0xdc)]['post'](_0x92aecd(0xd5)+_0x2e49c7+'/edit',{'body':_0x25896f});return!_0x164cce[_0x92aecd(0xb8)]['error']||_0x164cce['body']['error'][_0x92aecd(0xea)]===0x1;}async['resolveComment'](_0x398697){const _0x47e287=_0x49849a,{unitId:_0x360442}=_0x398697,_0x47f84d=_0x398697[_0x47e287(0x98)],_0x368f62={'memberId':this['_userService'][_0x47e287(0xa4)]()['userID'],'unitId':_0x360442,'threadId':_0x47f84d,'solved':_0x398697['resolved']?I[_0x47e287(0x101)]:I[_0x47e287(0xfa)]},_0x3ec6c6=await this[_0x47e287(0xdc)]['post'](_0x47e287(0xd5)+_0x360442+'/solved',{'body':_0x368f62});return!_0x3ec6c6[_0x47e287(0xb8)][_0x47e287(0xeb)]||_0x3ec6c6[_0x47e287(0xb8)][_0x47e287(0xeb)][_0x47e287(0xea)]===0x1;}async[_0x49849a(0xc8)](_0x222255,_0x398185,_0x33aaa1,_0x48da19){const _0x5ec98a=_0x49849a,_0x317c17={'memberId':(await this['_sessionService'][_0x5ec98a(0xc9)](_0x222255))[_0x5ec98a(0xf9)](),'threadId':_0x33aaa1,'replyId':_0x48da19,'unitId':_0x222255},_0xdfc739=await this[_0x5ec98a(0xdc)][_0x5ec98a(0xb4)](_0x5ec98a(0xd5)+_0x222255+_0x5ec98a(0xbe),{'body':_0x317c17});return!_0xdfc739[_0x5ec98a(0xb8)][_0x5ec98a(0xeb)]||_0xdfc739[_0x5ec98a(0xb8)][_0x5ec98a(0xeb)][_0x5ec98a(0xea)]===0x1;}async[_0x49849a(0xd3)](_0x1a5f90,_0x4b3361,_0x25af2e){const _0x5d9143=_0x49849a,_0x39aa6={'unitId':_0x1a5f90,'threadId':_0x25af2e},_0x43c4b1=await this[_0x5d9143(0xdc)][_0x5d9143(0xb4)](_0x5d9143(0xd5)+_0x1a5f90+'/list',{'body':_0x39aa6}),_0x2d62d8=_0x25af2e[_0x5d9143(0xd2)](_0x1691d3=>G(_0x43c4b1[_0x5d9143(0xb8)][_0x5d9143(0x9c)][_0x1691d3],_0x1a5f90,_0x4b3361))[_0x5d9143(0xd6)](Boolean);return Object['values'](_0x43c4b1[_0x5d9143(0xb8)][_0x5d9143(0xfe)])[_0x5d9143(0xe2)](_0x596c59=>{const _0x2005f6=_0x5d9143;this[_0x2005f6(0x109)][_0x2005f6(0xc0)](_0x596c59);}),_0x2d62d8;}['saveCommentToSnapshot'](_0xa23ad3){const _0x3b3339=_0x49849a;return{'id':_0xa23ad3['id'],'threadId':_0xa23ad3['threadId'],'ref':_0xa23ad3[_0x3b3339(0xe3)]};}};p=x([C(0x0,c[_0x49849a(0x9a)](P[_0x49849a(0x10a)])),C(0x1,c['Inject'](c[_0x49849a(0x10d)])),C(0x2,c[_0x49849a(0x9a)](b['CollaborationSessionService']))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x304088,_0x1e80e5,_0x2293ac,_0x25119f)=>{const _0x53ebfa=_0x49849a;for(var _0x165bef=_0x25119f>0x1?void 0x0:_0x25119f?H(_0x1e80e5,_0x2293ac):_0x1e80e5,_0x57d192=_0x304088[_0x53ebfa(0xf1)]-0x1,_0x56f873;_0x57d192>=0x0;_0x57d192--)(_0x56f873=_0x304088[_0x57d192])&&(_0x165bef=_0x56f873(_0x165bef)||_0x165bef);return _0x165bef;},y=(_0x389415,_0x31b75a)=>(_0x42f9b1,_0x143d6a)=>_0x31b75a(_0x42f9b1,_0x143d6a,_0x389415);let g=class extends c[_0x49849a(0xe6)]{constructor(_0x230bb8,_0x2907dd){const _0x1ae40a=_0x49849a;super(),this['_threadCommentDataSourceService']=_0x230bb8,this[_0x1ae40a(0xd1)]=_0x2907dd,this[_0x1ae40a(0xba)]();}[_0x49849a(0xba)](){const _0x2f583c=_0x49849a;this['_threadCommentDataSourceService'][_0x2f583c(0xe0)]=this[_0x2f583c(0xd1)],this[_0x2f583c(0xb5)][_0x2f583c(0xb6)]=!0x1;}};g=J([y(0x0,M[_0x49849a(0xe5)]),y(0x1,c[_0x49849a(0x9a)](p))],g);var F=Object[_0x49849a(0xbb)],L=Object[_0x49849a(0xe4)],Z=(_0x1a1974,_0x1a44d7,_0x3b4e52)=>_0x1a44d7 in _0x1a1974?F(_0x1a1974,_0x1a44d7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b4e52}):_0x1a1974[_0x1a44d7]=_0x3b4e52,W=(_0x5db762,_0x44506d,_0x4b2ba5,_0x5bed5)=>{const _0x51f9a1=_0x49849a;for(var _0x39f63a=_0x5bed5>0x1?void 0x0:_0x5bed5?L(_0x44506d,_0x4b2ba5):_0x44506d,_0x590ebe=_0x5db762[_0x51f9a1(0xf1)]-0x1,_0x30796f;_0x590ebe>=0x0;_0x590ebe--)(_0x30796f=_0x5db762[_0x590ebe])&&(_0x39f63a=_0x30796f(_0x39f63a)||_0x39f63a);return _0x39f63a;},O=(_0x363b7d,_0x50b8ab)=>(_0x543329,_0x27ccb0)=>_0x50b8ab(_0x543329,_0x27ccb0,_0x363b7d),N=(_0x14db5a,_0x2bfcfe,_0x3098f8)=>Z(_0x14db5a,typeof _0x2bfcfe!='symbol'?_0x2bfcfe+'':_0x2bfcfe,_0x3098f8);exports[_0x49849a(0xac)]=class extends c['Plugin']{constructor(_0x463f92=D,_0xbca383,_0x4d1096){const _0x274119=_0x49849a;super(),this[_0x274119(0xbd)]=_0x463f92,this['_injector']=_0xbca383,this[_0x274119(0x103)]=_0x4d1096;const {..._0x4ca1c9}=c[_0x274119(0xcc)]({},D,this[_0x274119(0xbd)]);this[_0x274119(0x103)][_0x274119(0xd9)](q,_0x4ca1c9);}[_0x49849a(0xbc)](){[[p],[g],[_]]['forEach'](_0x55168d=>{const _0x18940d=_0x1b25;this[_0x18940d(0xdf)][_0x18940d(0x108)](_0x55168d);});}[_0x49849a(0xa1)](){const _0x437a69=_0x49849a;this['_injector'][_0x437a69(0xd8)](g),this[_0x437a69(0xdf)][_0x437a69(0xd8)](_);}},N(exports[_0x49849a(0xac)],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x49849a(0x100),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x49849a(0x99)](w[_0x49849a(0xc1)],b[_0x49849a(0xef)],T[_0x49849a(0xfb)]),O(0x1,c['Inject'](c['Injector'])),O(0x2,c[_0x49849a(0xf7)])],exports[_0x49849a(0xac)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x1d05bf=_0x1614;(function(_0x468413,_0x3d6942){const _0x4e9982=_0x1614,_0xb5c747=_0x468413();while(!![]){try{const _0x50621b=parseInt(_0x4e9982(0xb3))/0x1+parseInt(_0x4e9982(0x93))/0x2+parseInt(_0x4e9982(0xea))/0x3+parseInt(_0x4e9982(0xee))/0x4*(parseInt(_0x4e9982(0xd6))/0x5)+-parseInt(_0x4e9982(0xa6))/0x6*(parseInt(_0x4e9982(0xbe))/0x7)+-parseInt(_0x4e9982(0x9d))/0x8*(-parseInt(_0x4e9982(0xd2))/0x9)+-parseInt(_0x4e9982(0x91))/0xa*(parseInt(_0x4e9982(0xae))/0xb);if(_0x50621b===_0x3d6942)break;else _0xb5c747['push'](_0xb5c747['shift']());}catch(_0x453d69){_0xb5c747['push'](_0xb5c747['shift']());}}}(_0x3060,0x2b2f9));import{CommentService as _0xc41ade,CollaborationSessionService as _0x5c2147,UniverCollaborationClientPlugin as _0x2f4ea6}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5d88f5}from'@univerjs-pro/license';import{dayjs as _0x4cfb05,UserManagerService as _0xb203b6,Inject as _0x3b9053,Injector as _0x4549a3,Disposable as _0x32b8e3,CustomRangeType as _0x1261ad,UniverInstanceType as _0x7f2fa9,DependentOn as _0x339bdc,IConfigService as _0x50a798,Plugin as _0x761510,merge as _0x543ebe}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x272b59}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1d8efc,IThreadCommentDataSourceService as _0x475030}from'@univerjs/thread-comment';import{bufferTime as _0x5d647c}from'rxjs';function _0x3060(){const _0x3e01f8=['comments','replyId','parentId','6jskLda','replies','format','subscribe','/add','deleteComment','_threadCommentDataSource','updateComment','4051993vRwCdP','syncUpdateMutationToColla','_httpService','Edit','Solve','222690GyNWrq','userID','slice','_configService','resolveComment','map','body','requireSession','_initUserSync','/universer-api/comment/unit/','Unknown','2278073ThaHyO','onStarting','getUser','rangeType','thread-comment-data-source.config','rangeId','user','_injector','getCurrentUser','content','UNRECOGNIZED','addComment','getComment','customRanges','OpenOrReOpen','code','size','COMMENT','pipe','_config','18wmfYTi','Solved','users','onReady','955ZEOBRj','find','userId','getOwnPropertyDescriptor','disposeWithMe','dataSource','commentUpdate$','symbol','reply','comment','/reply','_commentService','stringify','_sessionService','ref','filter','YYYY/MM/DD\x20HH:mm','_init','add','listComments','425169cewfbg','_userService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolved','6672GHnHcr','post','error','personId','solved','Reply','get','payload','type','delete','Delete','_threadCommentModel','/edit','length','/solved','20wIAcdZ','createTimestamp','437214QTAmXA','_threadCommentDataSourceService','_initDataSource','setConfig','getMemberID','addUser','UNIVER_UNKNOWN','unitId','Add','root','1349784WoytNb','getUnit','forEach','parse','saveCommentToSnapshot','threadId'];_0x3060=function(){return _0x3e01f8;};return _0x3060();}import{HTTPService as _0x5340ca}from'@univerjs/network';const W=_0x1d05bf(0xec);var I=(_0x47c7b3=>(_0x47c7b3[_0x47c7b3[_0x1d05bf(0xcc)]=0x0]='OpenOrReOpen',_0x47c7b3[_0x47c7b3[_0x1d05bf(0xd3)]=0x1]=_0x1d05bf(0xd3),_0x47c7b3[_0x47c7b3['UNRECOGNIZED']=-0x1]=_0x1d05bf(0xc8),_0x47c7b3))(I||{}),v=(_0x1de5ba=>(_0x1de5ba[_0x1de5ba[_0x1d05bf(0xbd)]=0x0]=_0x1d05bf(0xbd),_0x1de5ba[_0x1de5ba['Add']=0x1]=_0x1d05bf(0x9b),_0x1de5ba[_0x1de5ba[_0x1d05bf(0x87)]=0x2]=_0x1d05bf(0x87),_0x1de5ba[_0x1de5ba[_0x1d05bf(0xb1)]=0x3]=_0x1d05bf(0xb1),_0x1de5ba[_0x1de5ba[_0x1d05bf(0x8c)]=0x4]='Delete',_0x1de5ba[_0x1de5ba[_0x1d05bf(0xb2)]=0x5]=_0x1d05bf(0xb2),_0x1de5ba[_0x1de5ba[_0x1d05bf(0xc8)]=-0x1]=_0x1d05bf(0xc8),_0x1de5ba))(v||{});const y=_0x2925b2=>_0x4cfb05(new Date(+_0x2925b2))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x43d4ee,_0x47fb2a)=>{const _0x13b4b0=_0x1d05bf,_0x145c7f=_0x43d4ee[_0x13b4b0(0x88)](_0xb203b6),_0x146d31=_0x43d4ee[_0x13b4b0(0x88)](_0x5340ca);_0x47fb2a[_0x13b4b0(0x9f)](_0x51042a=>{const _0x2aac36=_0x13b4b0;_0x145c7f[_0x2aac36(0xc0)](_0x51042a)&&_0x47fb2a[_0x2aac36(0x8b)](_0x51042a);}),_0x47fb2a[_0x13b4b0(0xce)]&&(await _0x146d31[_0x13b4b0(0x88)]('/universer-api/user/list',{'params':{'userIDs':[..._0x47fb2a]}}))[_0x13b4b0(0xb9)]['users'][_0x13b4b0(0x9f)](_0x1681cf=>{const _0x47352c=_0x13b4b0;_0x1681cf&&_0x145c7f[_0x47352c(0x98)](_0x1681cf);});};var K=Object[_0x1d05bf(0xd9)],V=(_0x4ffec8,_0x2afed1,_0xb8b63a,_0x2d28ee)=>{const _0x36c5c1=_0x1d05bf;for(var _0x531233=_0x2d28ee>0x1?void 0x0:_0x2d28ee?K(_0x2afed1,_0xb8b63a):_0x2afed1,_0x8142fd=_0x4ffec8[_0x36c5c1(0x8f)]-0x1,_0x4a42f4;_0x8142fd>=0x0;_0x8142fd--)(_0x4a42f4=_0x4ffec8[_0x8142fd])&&(_0x531233=_0x4a42f4(_0x531233)||_0x531233);return _0x531233;},p=(_0x706be9,_0x3c18e5)=>(_0x500355,_0x590d3f)=>_0x3c18e5(_0x500355,_0x590d3f,_0x706be9);let _=class extends _0x32b8e3{constructor(_0x4df39a,_0x56c8b8,_0x5d1126,_0x39f5cb){const _0x49e8c2=_0x1d05bf;super(),this[_0x49e8c2(0xe1)]=_0x4df39a,this[_0x49e8c2(0x8d)]=_0x56c8b8,this['_userService']=_0x5d1126,this[_0x49e8c2(0xc5)]=_0x39f5cb,this[_0x49e8c2(0xe7)](),this['_initUserSync']();}[_0x1d05bf(0xbb)](){const _0x479467=_0x1d05bf;this[_0x479467(0xda)](this[_0x479467(0x8d)][_0x479467(0xdc)][_0x479467(0xd0)](_0x5d647c(0x10))[_0x479467(0xa9)](_0x2ef42a=>{const _0x36113d=_0x479467,_0x3ba742=new Set();_0x2ef42a[_0x36113d(0x9f)](_0x27c8da=>{const _0x20f412=_0x36113d;switch(_0x27c8da['type']){case _0x20f412(0xe8):{const _0x28cd09=_0x27c8da[_0x20f412(0x89)][_0x20f412(0x85)];_0x3ba742[_0x20f412(0xe8)](_0x28cd09);break;}}}),B(this['_injector'],_0x3ba742);}));}[_0x1d05bf(0xe7)](){const _0x36e8a6=_0x1d05bf;this['disposeWithMe'](this[_0x36e8a6(0xe1)][_0x36e8a6(0xdc)][_0x36e8a6(0xa9)](async _0x13612f=>{const _0x463596=_0x36e8a6;var _0x4e005d,_0x5a4114,_0x5bd525,_0x2f784b;const _0x20a774=(_0x4e005d=this[_0x463596(0x8d)][_0x463596(0x9e)](_0x13612f['unitId'])[_0x463596(0xd7)](_0x41cbbb=>_0x41cbbb['threadId']===_0x13612f[_0x463596(0xa2)]))==null?void 0x0:_0x4e005d['root'];if(!_0x20a774)return;const {unitId:_0x2e532b,subUnitId:_0x430e89}=_0x20a774;switch(_0x13612f[_0x463596(0xc4)]&&this[_0x463596(0xeb)][_0x463596(0x98)](_0x13612f[_0x463596(0xc4)]),_0x13612f[_0x463596(0x8a)]){case v['Add']:break;case v[_0x463596(0x87)]:{this[_0x463596(0x8d)][_0x463596(0xc9)](_0x2e532b,_0x430e89,{'unitId':_0x2e532b,'subUnitId':_0x430e89,'ref':'','id':_0x13612f['replyId'],'dT':y(+_0x13612f[_0x463596(0x92)]),'threadId':_0x13612f['threadId'],'personId':(_0x5bd525=(_0x5a4114=_0x13612f[_0x463596(0xc4)])==null?void 0x0:_0x5a4114[_0x463596(0xb4)])!=null?_0x5bd525:_0x13612f['userId'],'text':JSON[_0x463596(0xa0)](_0x13612f['content']),'parentId':_0x20a774['id']});break;}case v[_0x463596(0x8c)]:{const _0x14c9cb=this[_0x463596(0x8d)][_0x463596(0xca)](_0x2e532b,_0x430e89,_0x13612f['replyId']);_0x14c9cb&&_0x14c9cb[_0x463596(0xa5)]&&this[_0x463596(0x8d)][_0x463596(0xab)](_0x2e532b,_0x430e89,_0x13612f['replyId']);break;}case v[_0x463596(0xb1)]:{this[_0x463596(0x8d)][_0x463596(0xad)](_0x2e532b,_0x430e89,{'commentId':_0x13612f[_0x463596(0xa4)],'text':JSON[_0x463596(0xa0)](_0x13612f['content'])});break;}case v[_0x463596(0xb2)]:{const _0x25f141=(_0x2f784b=this[_0x463596(0x8d)][_0x463596(0x9e)](_0x13612f[_0x463596(0x9a)])[_0x463596(0xd7)](_0x58ff72=>_0x58ff72[_0x463596(0xa2)]===_0x13612f[_0x463596(0xa2)]))==null?void 0x0:_0x2f784b[_0x463596(0x9c)];_0x25f141&&this['_threadCommentModel'][_0x463596(0xb7)](_0x2e532b,_0x430e89,_0x25f141['id'],_0x13612f['solved']===I[_0x463596(0xd3)]);break;}}}));}};_=V([p(0x0,_0x3b9053(_0xc41ade)),p(0x1,_0x3b9053(_0x1d8efc)),p(0x2,_0x3b9053(_0xb203b6)),p(0x3,_0x3b9053(_0x4549a3))],_);const z=_0x1d05bf(0xc2),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1b2c33,_0x291cef,_0x31cb1b,_0x1d4640)=>{const _0x36bb4b=_0x1d05bf;for(var _0x2121ce=_0x1d4640>0x1?void 0x0:_0x1d4640?k(_0x291cef,_0x31cb1b):_0x291cef,_0x28d029=_0x1b2c33[_0x36bb4b(0x8f)]-0x1,_0x24eeaf;_0x28d029>=0x0;_0x28d029--)(_0x24eeaf=_0x1b2c33[_0x28d029])&&(_0x2121ce=_0x24eeaf(_0x2121ce)||_0x2121ce);return _0x2121ce;},b=(_0x337f7b,_0x2e5471)=>(_0x1729cf,_0x581d0a)=>_0x2e5471(_0x1729cf,_0x581d0a,_0x337f7b);function X(_0x158da1,_0x171913){const _0x36b8bf=_0x1d05bf,_0x3ad962=_0x158da1[_0x36b8bf(0xa7)][0x0];return{..._0x171913,'id':_0x3ad962[_0x36b8bf(0xa4)],'resolved':_0x158da1[_0x36b8bf(0x86)]===0x1,'dT':y(_0x3ad962[_0x36b8bf(0x92)]),'personId':_0x3ad962[_0x36b8bf(0xd8)],'threadId':_0x3ad962[_0x36b8bf(0xa2)]};}function ee(_0x3f4517,_0x12368f,_0x11aae5){const _0xea2705=_0x1d05bf;var _0x3d11ed,_0xc7c0be;if(((_0xc7c0be=(_0x3d11ed=_0x3f4517==null?void 0x0:_0x3f4517['replies'])==null?void 0x0:_0x3d11ed[_0xea2705(0x8f)])!=null?_0xc7c0be:0x0)>0x0){const _0x3ca1af=(_0x419f24,_0x39e44d)=>({'id':_0x419f24[_0xea2705(0xa4)],'threadId':_0x419f24['threadId'],'dT':y(_0x419f24[_0xea2705(0x92)]),'personId':_0x419f24[_0xea2705(0xd8)],'resolved':_0x3f4517['solved']===I[_0xea2705(0xd3)],'unitId':_0x12368f,'subUnitId':_0x11aae5,'text':JSON[_0xea2705(0xa0)](_0x419f24[_0xea2705(0xc7)]),'parentId':_0x39e44d}),_0x2c2e01=_0x3ca1af(_0x3f4517[_0xea2705(0xa7)][0x0]);return{..._0x2c2e01,'children':_0x3f4517[_0xea2705(0xa7)][_0xea2705(0xb5)](0x1)[_0xea2705(0xb8)](_0x31892a=>_0x3ca1af(_0x31892a,_0x2c2e01['id']))};}return null;}let S=class{constructor(_0x3e765b,_0x8ccd56,_0x4b77ad){const _0xdf602e=_0x1d05bf;this['_httpService']=_0x3e765b,this[_0xdf602e(0xeb)]=_0x8ccd56,this['_sessionService']=_0x4b77ad;}async['addComment'](_0x3bee76){const _0x1be0ae=_0x1d05bf;var _0x11747e,_0x3dce07;const {parentId:_0x3e833a,unitId:_0x53d1a2,text:_0xf64010,threadId:_0x23862b}=_0x3bee76,_0x1ea204=(_0x3dce07=(_0x11747e=_0xf64010[_0x1be0ae(0xcb)])==null?void 0x0:_0x11747e[_0x1be0ae(0xe5)](_0x2a9eb4=>_0x2a9eb4[_0x1be0ae(0xc1)]===_0x1261ad[_0x1be0ae(0xcf)])[_0x1be0ae(0xb8)](_0x255f2f=>_0x255f2f[_0x1be0ae(0xc3)]))!=null?_0x3dce07:[],_0x1d777b=JSON[_0x1be0ae(0xe2)](_0xf64010),_0x28265c=(await this[_0x1be0ae(0xe3)][_0x1be0ae(0xba)](_0x53d1a2))['getMemberID']();if(_0x3e833a){const _0x1ee11a={'memberId':_0x28265c,'unitId':_0x53d1a2,'content':_0x1d777b,'mention':_0x1ea204,'threadId':_0x23862b},_0x84b2a9=(await this['_httpService'][_0x1be0ae(0xef)](_0x1be0ae(0xbc)+_0x53d1a2+_0x1be0ae(0xe0),{'body':_0x1ee11a}))[_0x1be0ae(0xb9)][_0x1be0ae(0xde)];return{..._0x3bee76,'id':_0x84b2a9[_0x1be0ae(0xa4)],'dT':_0x4cfb05(+_0x84b2a9[_0x1be0ae(0x92)])[_0x1be0ae(0xa8)](_0x1be0ae(0xe6)),'personId':_0x84b2a9[_0x1be0ae(0xd8)]};}else{const _0x51088d={'memberId':_0x28265c,'unitId':_0x53d1a2,'content':_0x1d777b,'mention':_0x1ea204},_0x4cedb0=await this[_0x1be0ae(0xb0)][_0x1be0ae(0xef)]('/universer-api/comment/unit/'+_0x53d1a2+_0x1be0ae(0xaa),{'body':_0x51088d});return X(_0x4cedb0[_0x1be0ae(0xb9)][_0x1be0ae(0xdf)],_0x3bee76);}}async['updateComment'](_0x1e586c){const _0x41853e=_0x1d05bf;var _0x14bb53,_0x78657f;const {text:_0x1bb852,unitId:_0x35928a}=_0x1e586c,_0x497da7=(_0x78657f=(_0x14bb53=_0x1bb852[_0x41853e(0xcb)])==null?void 0x0:_0x14bb53['filter'](_0x3b10b0=>_0x3b10b0['rangeType']===_0x1261ad['COMMENT'])[_0x41853e(0xb8)](_0x1cd22b=>_0x1cd22b[_0x41853e(0xc3)]))!=null?_0x78657f:[],_0x4a1d15=JSON['stringify'](_0x1bb852),_0x4d1d04=_0x1e586c[_0x41853e(0xa2)],_0x58dd89=_0x1e586c['id'],_0x1eb283={'memberId':(await this['_sessionService']['requireSession'](_0x35928a))['getMemberID'](),'unitId':_0x35928a,'threadId':_0x4d1d04,'mention':_0x497da7,'content':_0x4a1d15,'replyId':_0x58dd89},_0x36fc1f=await this['_httpService'][_0x41853e(0xef)](_0x41853e(0xbc)+_0x35928a+_0x41853e(0x8e),{'body':_0x1eb283});return!_0x36fc1f[_0x41853e(0xb9)][_0x41853e(0xf0)]||_0x36fc1f[_0x41853e(0xb9)][_0x41853e(0xf0)][_0x41853e(0xcd)]===0x1;}async[_0x1d05bf(0xb7)](_0x5c7e00){const _0x520e6e=_0x1d05bf,{unitId:_0x557e5d}=_0x5c7e00,_0x5bd458=_0x5c7e00['threadId'],_0x25bd74={'memberId':this[_0x520e6e(0xeb)][_0x520e6e(0xc6)]()[_0x520e6e(0xb4)],'unitId':_0x557e5d,'threadId':_0x5bd458,'solved':_0x5c7e00[_0x520e6e(0xed)]?I[_0x520e6e(0xd3)]:I[_0x520e6e(0xcc)]},_0x4dc98f=await this[_0x520e6e(0xb0)][_0x520e6e(0xef)](_0x520e6e(0xbc)+_0x557e5d+_0x520e6e(0x90),{'body':_0x25bd74});return!_0x4dc98f[_0x520e6e(0xb9)][_0x520e6e(0xf0)]||_0x4dc98f['body']['error'][_0x520e6e(0xcd)]===0x1;}async[_0x1d05bf(0xab)](_0x46df38,_0x4d353c,_0x484bda,_0x54a0a7){const _0x3bb1ba=_0x1d05bf,_0x213741={'memberId':(await this[_0x3bb1ba(0xe3)][_0x3bb1ba(0xba)](_0x46df38))[_0x3bb1ba(0x97)](),'threadId':_0x484bda,'replyId':_0x54a0a7,'unitId':_0x46df38},_0x1f9673=await this[_0x3bb1ba(0xb0)][_0x3bb1ba(0xef)](_0x3bb1ba(0xbc)+_0x46df38+'/delete',{'body':_0x213741});return!_0x1f9673['body']['error']||_0x1f9673[_0x3bb1ba(0xb9)]['error'][_0x3bb1ba(0xcd)]===0x1;}async[_0x1d05bf(0xe9)](_0x3ff60a,_0x4650fe,_0x1f84df){const _0x463748=_0x1d05bf,_0x41b776={'unitId':_0x3ff60a,'threadId':_0x1f84df},_0x3eee08=await this['_httpService'][_0x463748(0xef)](_0x463748(0xbc)+_0x3ff60a+'/list',{'body':_0x41b776}),_0x23cddc=_0x1f84df[_0x463748(0xb8)](_0xdfc450=>ee(_0x3eee08[_0x463748(0xb9)][_0x463748(0xa3)][_0xdfc450],_0x3ff60a,_0x4650fe))[_0x463748(0xe5)](Boolean);return Object['values'](_0x3eee08[_0x463748(0xb9)][_0x463748(0xd4)])['forEach'](_0x30e281=>{const _0x4128d5=_0x463748;this[_0x4128d5(0xeb)][_0x4128d5(0x98)](_0x30e281);}),_0x23cddc;}[_0x1d05bf(0xa1)](_0x2d238f){const _0x545ded=_0x1d05bf;return{'id':_0x2d238f['id'],'threadId':_0x2d238f['threadId'],'ref':_0x2d238f[_0x545ded(0xe4)]};}};S=Q([b(0x0,_0x3b9053(_0x5340ca)),b(0x1,_0x3b9053(_0xb203b6)),b(0x2,_0x3b9053(_0x5c2147))],S);var re=Object[_0x1d05bf(0xd9)],te=(_0x19ae1f,_0x54ecdb,_0x418547,_0x1af9d3)=>{const _0x58e1ae=_0x1d05bf;for(var _0x49187f=_0x1af9d3>0x1?void 0x0:_0x1af9d3?re(_0x54ecdb,_0x418547):_0x54ecdb,_0x23662e=_0x19ae1f[_0x58e1ae(0x8f)]-0x1,_0x2d8c94;_0x23662e>=0x0;_0x23662e--)(_0x2d8c94=_0x19ae1f[_0x23662e])&&(_0x49187f=_0x2d8c94(_0x49187f)||_0x49187f);return _0x49187f;},M=(_0x20867b,_0x453886)=>(_0x13aeff,_0xaedf7c)=>_0x453886(_0x13aeff,_0xaedf7c,_0x20867b);let f=class extends _0x32b8e3{constructor(_0x467a1c,_0x4f55b3){const _0x294d00=_0x1d05bf;super(),this[_0x294d00(0x94)]=_0x467a1c,this[_0x294d00(0xac)]=_0x4f55b3,this['_initDataSource']();}[_0x1d05bf(0x95)](){const _0x258a41=_0x1d05bf;this[_0x258a41(0x94)][_0x258a41(0xdb)]=this[_0x258a41(0xac)],this[_0x258a41(0x94)][_0x258a41(0xaf)]=!0x1;}};function _0x1614(_0x560cc3,_0x36bcbe){const _0x306061=_0x3060();return _0x1614=function(_0x1614e5,_0x213d5c){_0x1614e5=_0x1614e5-0x85;let _0x3a4b59=_0x306061[_0x1614e5];return _0x3a4b59;},_0x1614(_0x560cc3,_0x36bcbe);}f=te([M(0x0,_0x475030),M(0x1,_0x3b9053(S))],f);var se=Object['defineProperty'],oe=Object[_0x1d05bf(0xd9)],ne=(_0x53ed3f,_0x26f62b,_0x37cbce)=>_0x26f62b in _0x53ed3f?se(_0x53ed3f,_0x26f62b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x37cbce}):_0x53ed3f[_0x26f62b]=_0x37cbce,ie=(_0x4e74a3,_0xcc66af,_0x4497fb,_0x2457b0)=>{const _0x3bb833=_0x1d05bf;for(var _0x5eb94e=_0x2457b0>0x1?void 0x0:_0x2457b0?oe(_0xcc66af,_0x4497fb):_0xcc66af,_0x6c53c=_0x4e74a3[_0x3bb833(0x8f)]-0x1,_0x57ad1b;_0x6c53c>=0x0;_0x6c53c--)(_0x57ad1b=_0x4e74a3[_0x6c53c])&&(_0x5eb94e=_0x57ad1b(_0x5eb94e)||_0x5eb94e);return _0x5eb94e;},N=(_0x274db6,_0xe865a)=>(_0x3c7f22,_0x2162d7)=>_0xe865a(_0x3c7f22,_0x2162d7,_0x274db6),$=(_0x5dfb6a,_0x5357ae,_0xda1b01)=>ne(_0x5dfb6a,typeof _0x5357ae!=_0x1d05bf(0xdd)?_0x5357ae+'':_0x5357ae,_0xda1b01);let g=class extends _0x761510{constructor(_0x4cbcbc=O,_0x258eb8,_0x30a2ba){const _0x1eb225=_0x1d05bf;super(),this[_0x1eb225(0xd1)]=_0x4cbcbc,this[_0x1eb225(0xc5)]=_0x258eb8,this[_0x1eb225(0xb6)]=_0x30a2ba;const {..._0x63e336}=_0x543ebe({},O,this[_0x1eb225(0xd1)]);this[_0x1eb225(0xb6)][_0x1eb225(0x96)](z,_0x63e336);}[_0x1d05bf(0xbf)](){const _0x506780=_0x1d05bf;[[S],[f],[_]][_0x506780(0x9f)](_0x5f452e=>{const _0x1efee8=_0x506780;this[_0x1efee8(0xc5)][_0x1efee8(0xe8)](_0x5f452e);});}[_0x1d05bf(0xd5)](){const _0x419e4f=_0x1d05bf;this[_0x419e4f(0xc5)][_0x419e4f(0x88)](f),this[_0x419e4f(0xc5)]['get'](_);}};$(g,'pluginName',W),$(g,_0x1d05bf(0x8a),_0x7f2fa9[_0x1d05bf(0x99)]),g=ie([_0x339bdc(_0x272b59,_0x2f4ea6,_0x5d88f5),N(0x1,_0x3b9053(_0x4549a3)),N(0x2,_0x50a798)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x5bf11d=_0x5c98;(function(_0x2e1a9f,_0x30be59){const _0x36f4ce=_0x5c98,_0x340a84=_0x2e1a9f();while(!![]){try{const _0x4b898f=parseInt(_0x36f4ce(0xdd))/0x1+-parseInt(_0x36f4ce(0xf1))/0x2*(-parseInt(_0x36f4ce(0xd6))/0x3)+parseInt(_0x36f4ce(0xe3))/0x4+-parseInt(_0x36f4ce(0xdb))/0x5*(-parseInt(_0x36f4ce(0xd0))/0x6)+-parseInt(_0x36f4ce(0xc9))/0x7*(parseInt(_0x36f4ce(0xf6))/0x8)+parseInt(_0x36f4ce(0xaf))/0x9*(-parseInt(_0x36f4ce(0xa7))/0xa)+parseInt(_0x36f4ce(0xe1))/0xb;if(_0x4b898f===_0x30be59)break;else _0x340a84['push'](_0x340a84['shift']());}catch(_0x326e6d){_0x340a84['push'](_0x340a84['shift']());}}}(_0x13a5,0x32c10));import{CommentService as _0x3e033d,CollaborationSessionService as _0x55d10c,UniverCollaborationClientPlugin as _0x42a23e}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2436a8}from'@univerjs-pro/license';import{dayjs as _0x406095,UserManagerService as _0x370dc1,Inject as _0x139489,Injector as _0x353baa,Disposable as _0x3ad743,CustomRangeType as _0x2abdd2,UniverInstanceType as _0xae0343,DependentOn as _0x13c419,IConfigService as _0x33ac58,Plugin as _0x57b30b,merge as _0x1ae59a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x134544}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xfaeaef,IThreadCommentDataSourceService as _0x31dc00}from'@univerjs/thread-comment';import{bufferTime as _0x1b3cbd}from'rxjs';import{HTTPService as _0x4acda9}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xa5a42e=>(_0xa5a42e[_0xa5a42e[_0x5bf11d(0xda)]=0x0]='OpenOrReOpen',_0xa5a42e[_0xa5a42e[_0x5bf11d(0xa9)]=0x1]=_0x5bf11d(0xa9),_0xa5a42e[_0xa5a42e[_0x5bf11d(0xc6)]=-0x1]=_0x5bf11d(0xc6),_0xa5a42e))(I||{}),v=(_0x465061=>(_0x465061[_0x465061[_0x5bf11d(0xd1)]=0x0]=_0x5bf11d(0xd1),_0x465061[_0x465061['Add']=0x1]=_0x5bf11d(0xb0),_0x465061[_0x465061[_0x5bf11d(0xe0)]=0x2]=_0x5bf11d(0xe0),_0x465061[_0x465061[_0x5bf11d(0xae)]=0x3]='Edit',_0x465061[_0x465061[_0x5bf11d(0xbe)]=0x4]='Delete',_0x465061[_0x465061[_0x5bf11d(0xac)]=0x5]='Solve',_0x465061[_0x465061[_0x5bf11d(0xc6)]=-0x1]=_0x5bf11d(0xc6),_0x465061))(v||{});const y=_0x354b69=>_0x406095(new Date(+_0x354b69))[_0x5bf11d(0xe4)](_0x5bf11d(0xf3)),B=async(_0x59c066,_0x265859)=>{const _0x23d640=_0x5bf11d,_0x7cf6a3=_0x59c066[_0x23d640(0xc0)](_0x370dc1),_0xe02f44=_0x59c066[_0x23d640(0xc0)](_0x4acda9);_0x265859[_0x23d640(0xe5)](_0x45aff2=>{const _0x4ffe44=_0x23d640;_0x7cf6a3[_0x4ffe44(0xf7)](_0x45aff2)&&_0x265859[_0x4ffe44(0xdc)](_0x45aff2);}),_0x265859[_0x23d640(0xb6)]&&(await _0xe02f44['get'](_0x23d640(0xb5),{'params':{'userIDs':[..._0x265859]}}))['body'][_0x23d640(0xde)][_0x23d640(0xe5)](_0x3653d2=>{const _0x518695=_0x23d640;_0x3653d2&&_0x7cf6a3[_0x518695(0xc1)](_0x3653d2);});};var K=Object[_0x5bf11d(0xe6)],V=(_0x3bfb34,_0x36803c,_0x2f7419,_0x352174)=>{const _0x28378b=_0x5bf11d;for(var _0x291a75=_0x352174>0x1?void 0x0:_0x352174?K(_0x36803c,_0x2f7419):_0x36803c,_0x23c6c2=_0x3bfb34[_0x28378b(0xc8)]-0x1,_0x3de3bf;_0x23c6c2>=0x0;_0x23c6c2--)(_0x3de3bf=_0x3bfb34[_0x23c6c2])&&(_0x291a75=_0x3de3bf(_0x291a75)||_0x291a75);return _0x291a75;},p=(_0xdb68c,_0x55b200)=>(_0x16f280,_0x1a89d0)=>_0x55b200(_0x16f280,_0x1a89d0,_0xdb68c);let _=class extends _0x3ad743{constructor(_0x4567e3,_0x1cb9ac,_0xc9fcd0,_0x58aecc){const _0x1c15ef=_0x5bf11d;super(),this['_commentService']=_0x4567e3,this[_0x1c15ef(0xba)]=_0x1cb9ac,this['_userService']=_0xc9fcd0,this[_0x1c15ef(0xb7)]=_0x58aecc,this[_0x1c15ef(0xfb)](),this[_0x1c15ef(0xa8)]();}[_0x5bf11d(0xa8)](){const _0x234f5a=_0x5bf11d;this[_0x234f5a(0xe8)](this[_0x234f5a(0xba)][_0x234f5a(0xc3)][_0x234f5a(0x102)](_0x1b3cbd(0x10))[_0x234f5a(0xd7)](_0x4923b1=>{const _0x2026f8=_0x234f5a,_0xf55b68=new Set();_0x4923b1[_0x2026f8(0xe5)](_0x319820=>{const _0x1055b7=_0x2026f8;switch(_0x319820[_0x1055b7(0xcd)]){case _0x1055b7(0xce):{const _0x1e1ce4=_0x319820[_0x1055b7(0xdf)][_0x1055b7(0xef)];_0xf55b68[_0x1055b7(0xce)](_0x1e1ce4);break;}}}),B(this[_0x2026f8(0xb7)],_0xf55b68);}));}[_0x5bf11d(0xfb)](){const _0x3c0edb=_0x5bf11d;this['disposeWithMe'](this[_0x3c0edb(0xfe)][_0x3c0edb(0xc3)][_0x3c0edb(0xd7)](async _0x4027c4=>{const _0x2beaf9=_0x3c0edb;var _0x38148c,_0x5e62cb,_0x2e3854,_0x45f066;const _0x346856=(_0x38148c=this[_0x2beaf9(0xba)][_0x2beaf9(0xb4)](_0x4027c4[_0x2beaf9(0xc4)])[_0x2beaf9(0x101)](_0x22cdba=>_0x22cdba['threadId']===_0x4027c4['threadId']))==null?void 0x0:_0x38148c[_0x2beaf9(0xcf)];if(!_0x346856)return;const {unitId:_0x37c898,subUnitId:_0x2f743d}=_0x346856;switch(_0x4027c4[_0x2beaf9(0xea)]&&this[_0x2beaf9(0xf4)][_0x2beaf9(0xc1)](_0x4027c4[_0x2beaf9(0xea)]),_0x4027c4[_0x2beaf9(0xcd)]){case v[_0x2beaf9(0xb0)]:break;case v['Reply']:{this[_0x2beaf9(0xba)][_0x2beaf9(0xf9)](_0x37c898,_0x2f743d,{'unitId':_0x37c898,'subUnitId':_0x2f743d,'ref':'','id':_0x4027c4[_0x2beaf9(0x108)],'dT':y(+_0x4027c4[_0x2beaf9(0xf2)]),'threadId':_0x4027c4[_0x2beaf9(0x10b)],'personId':(_0x2e3854=(_0x5e62cb=_0x4027c4['user'])==null?void 0x0:_0x5e62cb[_0x2beaf9(0xbb)])!=null?_0x2e3854:_0x4027c4[_0x2beaf9(0xeb)],'text':JSON[_0x2beaf9(0x103)](_0x4027c4['content']),'parentId':_0x346856['id']});break;}case v[_0x2beaf9(0xbe)]:{const _0x38620f=this['_threadCommentModel']['getComment'](_0x37c898,_0x2f743d,_0x4027c4[_0x2beaf9(0x108)]);_0x38620f&&_0x38620f['parentId']&&this[_0x2beaf9(0xba)][_0x2beaf9(0xa5)](_0x37c898,_0x2f743d,_0x4027c4[_0x2beaf9(0x108)]);break;}case v[_0x2beaf9(0xae)]:{this[_0x2beaf9(0xba)][_0x2beaf9(0x109)](_0x37c898,_0x2f743d,{'commentId':_0x4027c4[_0x2beaf9(0x108)],'text':JSON[_0x2beaf9(0x103)](_0x4027c4[_0x2beaf9(0x100)])});break;}case v[_0x2beaf9(0xac)]:{const _0x1317ca=(_0x45f066=this[_0x2beaf9(0xba)][_0x2beaf9(0xb4)](_0x4027c4[_0x2beaf9(0xc4)])[_0x2beaf9(0x101)](_0x5732d5=>_0x5732d5[_0x2beaf9(0x10b)]===_0x4027c4[_0x2beaf9(0x10b)]))==null?void 0x0:_0x45f066[_0x2beaf9(0xcf)];_0x1317ca&&this[_0x2beaf9(0xba)][_0x2beaf9(0xca)](_0x37c898,_0x2f743d,_0x1317ca['id'],_0x4027c4[_0x2beaf9(0xe7)]===I[_0x2beaf9(0xa9)]);break;}}}));}};_=V([p(0x0,_0x139489(_0x3e033d)),p(0x1,_0x139489(_0xfaeaef)),p(0x2,_0x139489(_0x370dc1)),p(0x3,_0x139489(_0x353baa))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x5bf11d(0xe6)],Q=(_0x24661e,_0x4297bf,_0x3af404,_0x1dbed9)=>{const _0x176d9b=_0x5bf11d;for(var _0x128f88=_0x1dbed9>0x1?void 0x0:_0x1dbed9?k(_0x4297bf,_0x3af404):_0x4297bf,_0x585f99=_0x24661e[_0x176d9b(0xc8)]-0x1,_0x3ab8c4;_0x585f99>=0x0;_0x585f99--)(_0x3ab8c4=_0x24661e[_0x585f99])&&(_0x128f88=_0x3ab8c4(_0x128f88)||_0x128f88);return _0x128f88;},b=(_0x1428f6,_0x598794)=>(_0x5b2621,_0x55982e)=>_0x598794(_0x5b2621,_0x55982e,_0x1428f6);function X(_0x73df2,_0x1e4ea3){const _0xb53790=_0x5bf11d,_0x28a9e0=_0x73df2[_0xb53790(0xcb)][0x0];return{..._0x1e4ea3,'id':_0x28a9e0[_0xb53790(0x108)],'resolved':_0x73df2[_0xb53790(0xe7)]===0x1,'dT':y(_0x28a9e0[_0xb53790(0xf2)]),'personId':_0x28a9e0[_0xb53790(0xeb)],'threadId':_0x28a9e0['threadId']};}function ee(_0x105610,_0x5e8c31,_0x141a18){const _0x56050c=_0x5bf11d;var _0x50f0ef,_0xdcf5d9;if(((_0xdcf5d9=(_0x50f0ef=_0x105610==null?void 0x0:_0x105610[_0x56050c(0xcb)])==null?void 0x0:_0x50f0ef[_0x56050c(0xc8)])!=null?_0xdcf5d9:0x0)>0x0){const _0x10d295=(_0xc7e1b7,_0x26cf67)=>({'id':_0xc7e1b7[_0x56050c(0x108)],'threadId':_0xc7e1b7['threadId'],'dT':y(_0xc7e1b7[_0x56050c(0xf2)]),'personId':_0xc7e1b7[_0x56050c(0xeb)],'resolved':_0x105610[_0x56050c(0xe7)]===I[_0x56050c(0xa9)],'unitId':_0x5e8c31,'subUnitId':_0x141a18,'text':JSON[_0x56050c(0x103)](_0xc7e1b7[_0x56050c(0x100)]),'parentId':_0x26cf67}),_0x3da65e=_0x10d295(_0x105610['replies'][0x0]);return{..._0x3da65e,'children':_0x105610[_0x56050c(0xcb)][_0x56050c(0xad)](0x1)[_0x56050c(0x106)](_0x5ec665=>_0x10d295(_0x5ec665,_0x3da65e['id']))};}return null;}let S=class{constructor(_0x1839ec,_0x13413f,_0x338f6b){const _0x53ee56=_0x5bf11d;this[_0x53ee56(0xd5)]=_0x1839ec,this[_0x53ee56(0xf4)]=_0x13413f,this[_0x53ee56(0xfd)]=_0x338f6b;}async[_0x5bf11d(0xf9)](_0x45270a){const _0x3f0d07=_0x5bf11d;var _0x2e3882,_0xbf5c4a;const {parentId:_0x2be2b5,unitId:_0x146327,text:_0x49f1df,threadId:_0x11d063}=_0x45270a,_0x444d32=(_0xbf5c4a=(_0x2e3882=_0x49f1df[_0x3f0d07(0xec)])==null?void 0x0:_0x2e3882['filter'](_0x52638a=>_0x52638a[_0x3f0d07(0xb3)]===_0x2abdd2[_0x3f0d07(0xfa)])[_0x3f0d07(0x106)](_0x576472=>_0x576472[_0x3f0d07(0xc2)]))!=null?_0xbf5c4a:[],_0x4fa583=JSON[_0x3f0d07(0xbf)](_0x49f1df),_0xefe1cf=(await this[_0x3f0d07(0xfd)]['requireSession'](_0x146327))['getMemberID']();if(_0x2be2b5){const _0x5b81d6={'memberId':_0xefe1cf,'unitId':_0x146327,'content':_0x4fa583,'mention':_0x444d32,'threadId':_0x11d063},_0x35f7b8=(await this['_httpService']['post'](_0x3f0d07(0xb2)+_0x146327+_0x3f0d07(0xe9),{'body':_0x5b81d6}))[_0x3f0d07(0x104)][_0x3f0d07(0xee)];return{..._0x45270a,'id':_0x35f7b8[_0x3f0d07(0x108)],'dT':_0x406095(+_0x35f7b8[_0x3f0d07(0xf2)])[_0x3f0d07(0xe4)](_0x3f0d07(0xf3)),'personId':_0x35f7b8[_0x3f0d07(0xeb)]};}else{const _0x3a702d={'memberId':_0xefe1cf,'unitId':_0x146327,'content':_0x4fa583,'mention':_0x444d32},_0x5ccff7=await this[_0x3f0d07(0xd5)]['post']('/universer-api/comment/unit/'+_0x146327+_0x3f0d07(0xc5),{'body':_0x3a702d});return X(_0x5ccff7[_0x3f0d07(0x104)][_0x3f0d07(0xfc)],_0x45270a);}}async[_0x5bf11d(0x109)](_0x1ad167){const _0x442f2f=_0x5bf11d;var _0x5ab67b,_0x11ed83;const {text:_0x51b466,unitId:_0x5ec047}=_0x1ad167,_0x575b41=(_0x11ed83=(_0x5ab67b=_0x51b466['customRanges'])==null?void 0x0:_0x5ab67b['filter'](_0x56a241=>_0x56a241['rangeType']===_0x2abdd2[_0x442f2f(0xfa)])[_0x442f2f(0x106)](_0x506958=>_0x506958['rangeId']))!=null?_0x11ed83:[],_0x320c1c=JSON[_0x442f2f(0xbf)](_0x51b466),_0x4c66e7=_0x1ad167[_0x442f2f(0x10b)],_0x19170e=_0x1ad167['id'],_0xa7bd21={'memberId':(await this[_0x442f2f(0xfd)][_0x442f2f(0xa6)](_0x5ec047))['getMemberID'](),'unitId':_0x5ec047,'threadId':_0x4c66e7,'mention':_0x575b41,'content':_0x320c1c,'replyId':_0x19170e},_0x40277b=await this[_0x442f2f(0xd5)][_0x442f2f(0xd3)](_0x442f2f(0xb2)+_0x5ec047+_0x442f2f(0xe2),{'body':_0xa7bd21});return!_0x40277b[_0x442f2f(0x104)]['error']||_0x40277b[_0x442f2f(0x104)][_0x442f2f(0x107)]['code']===0x1;}async[_0x5bf11d(0xca)](_0x4a2da7){const _0x317f0c=_0x5bf11d,{unitId:_0x316b80}=_0x4a2da7,_0xcff4a8=_0x4a2da7['threadId'],_0x41c37d={'memberId':this['_userService']['getCurrentUser']()[_0x317f0c(0xbb)],'unitId':_0x316b80,'threadId':_0xcff4a8,'solved':_0x4a2da7[_0x317f0c(0xd2)]?I['Solved']:I['OpenOrReOpen']},_0x17dcc6=await this[_0x317f0c(0xd5)][_0x317f0c(0xd3)]('/universer-api/comment/unit/'+_0x316b80+'/solved',{'body':_0x41c37d});return!_0x17dcc6['body'][_0x317f0c(0x107)]||_0x17dcc6[_0x317f0c(0x104)]['error']['code']===0x1;}async[_0x5bf11d(0xa5)](_0x1669fd,_0xdf954d,_0x21fcd4,_0x40cc3e){const _0x2d7b44=_0x5bf11d,_0x145fcb={'memberId':(await this['_sessionService'][_0x2d7b44(0xa6)](_0x1669fd))[_0x2d7b44(0xd4)](),'threadId':_0x21fcd4,'replyId':_0x40cc3e,'unitId':_0x1669fd},_0x2c31f8=await this[_0x2d7b44(0xd5)][_0x2d7b44(0xd3)](_0x2d7b44(0xb2)+_0x1669fd+'/delete',{'body':_0x145fcb});return!_0x2c31f8['body'][_0x2d7b44(0x107)]||_0x2c31f8[_0x2d7b44(0x104)][_0x2d7b44(0x107)]['code']===0x1;}async[_0x5bf11d(0xb1)](_0x4086fa,_0x236b49,_0x56d668){const _0x443b4b=_0x5bf11d,_0x216b2a={'unitId':_0x4086fa,'threadId':_0x56d668},_0x25a709=await this[_0x443b4b(0xd5)][_0x443b4b(0xd3)](_0x443b4b(0xb2)+_0x4086fa+'/list',{'body':_0x216b2a}),_0x8721ad=_0x56d668[_0x443b4b(0x106)](_0x371ab5=>ee(_0x25a709['body'][_0x443b4b(0x105)][_0x371ab5],_0x4086fa,_0x236b49))[_0x443b4b(0xf5)](Boolean);return Object[_0x443b4b(0xbc)](_0x25a709['body'][_0x443b4b(0xde)])[_0x443b4b(0xe5)](_0x287315=>{const _0x4e7811=_0x443b4b;this[_0x4e7811(0xf4)]['addUser'](_0x287315);}),_0x8721ad;}[_0x5bf11d(0xd9)](_0x38d009){const _0x17c816=_0x5bf11d;return{'id':_0x38d009['id'],'threadId':_0x38d009[_0x17c816(0x10b)],'ref':_0x38d009[_0x17c816(0xbd)]};}};S=Q([b(0x0,_0x139489(_0x4acda9)),b(0x1,_0x139489(_0x370dc1)),b(0x2,_0x139489(_0x55d10c))],S);var re=Object[_0x5bf11d(0xe6)],te=(_0x281ea2,_0x17e6ed,_0x2f813a,_0xcdad0e)=>{const _0x22c2a4=_0x5bf11d;for(var _0x3a9061=_0xcdad0e>0x1?void 0x0:_0xcdad0e?re(_0x17e6ed,_0x2f813a):_0x17e6ed,_0x4ee619=_0x281ea2[_0x22c2a4(0xc8)]-0x1,_0x38f483;_0x4ee619>=0x0;_0x4ee619--)(_0x38f483=_0x281ea2[_0x4ee619])&&(_0x3a9061=_0x38f483(_0x3a9061)||_0x3a9061);return _0x3a9061;},M=(_0x58a15e,_0x5dfceb)=>(_0x48230e,_0x221d62)=>_0x5dfceb(_0x48230e,_0x221d62,_0x58a15e);let f=class extends _0x3ad743{constructor(_0x1e1287,_0x333ecf){const _0x5a4e20=_0x5bf11d;super(),this[_0x5a4e20(0x10a)]=_0x1e1287,this['_threadCommentDataSource']=_0x333ecf,this[_0x5a4e20(0xcc)]();}[_0x5bf11d(0xcc)](){const _0xbbc3e4=_0x5bf11d;this[_0xbbc3e4(0x10a)][_0xbbc3e4(0xc7)]=this[_0xbbc3e4(0xa4)],this[_0xbbc3e4(0x10a)][_0xbbc3e4(0xed)]=!0x1;}};f=te([M(0x0,_0x31dc00),M(0x1,_0x139489(S))],f);var se=Object[_0x5bf11d(0xb9)],oe=Object[_0x5bf11d(0xe6)],ne=(_0x3b2842,_0x47248f,_0x1fbeae)=>_0x47248f in _0x3b2842?se(_0x3b2842,_0x47248f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1fbeae}):_0x3b2842[_0x47248f]=_0x1fbeae,ie=(_0x3f7c99,_0x18db66,_0x3834f1,_0x49e30c)=>{const _0x416ee1=_0x5bf11d;for(var _0x2b7297=_0x49e30c>0x1?void 0x0:_0x49e30c?oe(_0x18db66,_0x3834f1):_0x18db66,_0x1b7f42=_0x3f7c99[_0x416ee1(0xc8)]-0x1,_0x44c4fc;_0x1b7f42>=0x0;_0x1b7f42--)(_0x44c4fc=_0x3f7c99[_0x1b7f42])&&(_0x2b7297=_0x44c4fc(_0x2b7297)||_0x2b7297);return _0x2b7297;},N=(_0x22ed37,_0x390191)=>(_0x505d01,_0x4a07e5)=>_0x390191(_0x505d01,_0x4a07e5,_0x22ed37),$=(_0x190ed5,_0x4585cc,_0x6972f6)=>ne(_0x190ed5,typeof _0x4585cc!='symbol'?_0x4585cc+'':_0x4585cc,_0x6972f6);let g=class extends _0x57b30b{constructor(_0x3f4ee8=O,_0xc21555,_0x2f17ad){const _0xf7f1b4=_0x5bf11d;super(),this[_0xf7f1b4(0xd8)]=_0x3f4ee8,this[_0xf7f1b4(0xb7)]=_0xc21555,this[_0xf7f1b4(0xab)]=_0x2f17ad;const {..._0x5aa886}=_0x1ae59a({},O,this[_0xf7f1b4(0xd8)]);this[_0xf7f1b4(0xab)][_0xf7f1b4(0xaa)](z,_0x5aa886);}[_0x5bf11d(0xb8)](){[[S],[f],[_]]['forEach'](_0x152f8a=>{this['_injector']['add'](_0x152f8a);});}[_0x5bf11d(0xff)](){const _0x11a33f=_0x5bf11d;this[_0x11a33f(0xb7)][_0x11a33f(0xc0)](f),this[_0x11a33f(0xb7)][_0x11a33f(0xc0)](_);}};$(g,_0x5bf11d(0xf0),W),$(g,_0x5bf11d(0xcd),_0xae0343[_0x5bf11d(0xf8)]),g=ie([_0x13c419(_0x134544,_0x42a23e,_0x2436a8),N(0x1,_0x139489(_0x353baa)),N(0x2,_0x33ac58)],g);export{g as UniverThreadCommentDataSourcePlugin};function _0x5c98(_0x37660f,_0x46c7d4){const _0x13a5fa=_0x13a5();return _0x5c98=function(_0x5c9884,_0x508eff){_0x5c9884=_0x5c9884-0xa4;let _0x14dfa3=_0x13a5fa[_0x5c9884];return _0x14dfa3;},_0x5c98(_0x37660f,_0x46c7d4);}function _0x13a5(){const _0x4599c3=['_configService','Solve','slice','Edit','1722834Aelhmc','Add','listComments','/universer-api/comment/unit/','rangeType','getUnit','/universer-api/user/list','size','_injector','onStarting','defineProperty','_threadCommentModel','userID','values','ref','Delete','stringify','get','addUser','rangeId','commentUpdate$','unitId','/add','UNRECOGNIZED','dataSource','length','1081276IdqyQq','resolveComment','replies','_initDataSource','type','add','root','6Unnzsy','Unknown','resolved','post','getMemberID','_httpService','3uAqxVm','subscribe','_config','saveCommentToSnapshot','OpenOrReOpen','671095ProWqz','delete','83216OEcflq','users','payload','Reply','1039830BowSAD','/edit','728104pWlPOg','format','forEach','getOwnPropertyDescriptor','solved','disposeWithMe','/reply','user','userId','customRanges','syncUpdateMutationToColla','reply','personId','pluginName','428518XmUQtY','createTimestamp','YYYY/MM/DD\x20HH:mm','_userService','filter','16IYopTa','getUser','UNIVER_UNKNOWN','addComment','COMMENT','_init','comment','_sessionService','_commentService','onReady','content','find','pipe','parse','body','comments','map','error','replyId','updateComment','_threadCommentDataSourceService','threadId','_threadCommentDataSource','deleteComment','requireSession','10KkPTVV','_initUserSync','Solved','setConfig'];_0x13a5=function(){return _0x4599c3;};return _0x13a5();}
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x1d05bf=_0x1614;(function(_0x468413,_0x3d6942){const _0x4e9982=_0x1614,_0xb5c747=_0x468413();while(!![]){try{const _0x50621b=parseInt(_0x4e9982(0xb3))/0x1+parseInt(_0x4e9982(0x93))/0x2+parseInt(_0x4e9982(0xea))/0x3+parseInt(_0x4e9982(0xee))/0x4*(parseInt(_0x4e9982(0xd6))/0x5)+-parseInt(_0x4e9982(0xa6))/0x6*(parseInt(_0x4e9982(0xbe))/0x7)+-parseInt(_0x4e9982(0x9d))/0x8*(-parseInt(_0x4e9982(0xd2))/0x9)+-parseInt(_0x4e9982(0x91))/0xa*(parseInt(_0x4e9982(0xae))/0xb);if(_0x50621b===_0x3d6942)break;else _0xb5c747['push'](_0xb5c747['shift']());}catch(_0x453d69){_0xb5c747['push'](_0xb5c747['shift']());}}}(_0x3060,0x2b2f9));import{CommentService as _0xc41ade,CollaborationSessionService as _0x5c2147,UniverCollaborationClientPlugin as _0x2f4ea6}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5d88f5}from'@univerjs-pro/license';import{dayjs as _0x4cfb05,UserManagerService as _0xb203b6,Inject as _0x3b9053,Injector as _0x4549a3,Disposable as _0x32b8e3,CustomRangeType as _0x1261ad,UniverInstanceType as _0x7f2fa9,DependentOn as _0x339bdc,IConfigService as _0x50a798,Plugin as _0x761510,merge as _0x543ebe}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x272b59}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1d8efc,IThreadCommentDataSourceService as _0x475030}from'@univerjs/thread-comment';import{bufferTime as _0x5d647c}from'rxjs';function _0x3060(){const _0x3e01f8=['comments','replyId','parentId','6jskLda','replies','format','subscribe','/add','deleteComment','_threadCommentDataSource','updateComment','4051993vRwCdP','syncUpdateMutationToColla','_httpService','Edit','Solve','222690GyNWrq','userID','slice','_configService','resolveComment','map','body','requireSession','_initUserSync','/universer-api/comment/unit/','Unknown','2278073ThaHyO','onStarting','getUser','rangeType','thread-comment-data-source.config','rangeId','user','_injector','getCurrentUser','content','UNRECOGNIZED','addComment','getComment','customRanges','OpenOrReOpen','code','size','COMMENT','pipe','_config','18wmfYTi','Solved','users','onReady','955ZEOBRj','find','userId','getOwnPropertyDescriptor','disposeWithMe','dataSource','commentUpdate$','symbol','reply','comment','/reply','_commentService','stringify','_sessionService','ref','filter','YYYY/MM/DD\x20HH:mm','_init','add','listComments','425169cewfbg','_userService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolved','6672GHnHcr','post','error','personId','solved','Reply','get','payload','type','delete','Delete','_threadCommentModel','/edit','length','/solved','20wIAcdZ','createTimestamp','437214QTAmXA','_threadCommentDataSourceService','_initDataSource','setConfig','getMemberID','addUser','UNIVER_UNKNOWN','unitId','Add','root','1349784WoytNb','getUnit','forEach','parse','saveCommentToSnapshot','threadId'];_0x3060=function(){return _0x3e01f8;};return _0x3060();}import{HTTPService as _0x5340ca}from'@univerjs/network';const W=_0x1d05bf(0xec);var I=(_0x47c7b3=>(_0x47c7b3[_0x47c7b3[_0x1d05bf(0xcc)]=0x0]='OpenOrReOpen',_0x47c7b3[_0x47c7b3[_0x1d05bf(0xd3)]=0x1]=_0x1d05bf(0xd3),_0x47c7b3[_0x47c7b3['UNRECOGNIZED']=-0x1]=_0x1d05bf(0xc8),_0x47c7b3))(I||{}),v=(_0x1de5ba=>(_0x1de5ba[_0x1de5ba[_0x1d05bf(0xbd)]=0x0]=_0x1d05bf(0xbd),_0x1de5ba[_0x1de5ba['Add']=0x1]=_0x1d05bf(0x9b),_0x1de5ba[_0x1de5ba[_0x1d05bf(0x87)]=0x2]=_0x1d05bf(0x87),_0x1de5ba[_0x1de5ba[_0x1d05bf(0xb1)]=0x3]=_0x1d05bf(0xb1),_0x1de5ba[_0x1de5ba[_0x1d05bf(0x8c)]=0x4]='Delete',_0x1de5ba[_0x1de5ba[_0x1d05bf(0xb2)]=0x5]=_0x1d05bf(0xb2),_0x1de5ba[_0x1de5ba[_0x1d05bf(0xc8)]=-0x1]=_0x1d05bf(0xc8),_0x1de5ba))(v||{});const y=_0x2925b2=>_0x4cfb05(new Date(+_0x2925b2))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x43d4ee,_0x47fb2a)=>{const _0x13b4b0=_0x1d05bf,_0x145c7f=_0x43d4ee[_0x13b4b0(0x88)](_0xb203b6),_0x146d31=_0x43d4ee[_0x13b4b0(0x88)](_0x5340ca);_0x47fb2a[_0x13b4b0(0x9f)](_0x51042a=>{const _0x2aac36=_0x13b4b0;_0x145c7f[_0x2aac36(0xc0)](_0x51042a)&&_0x47fb2a[_0x2aac36(0x8b)](_0x51042a);}),_0x47fb2a[_0x13b4b0(0xce)]&&(await _0x146d31[_0x13b4b0(0x88)]('/universer-api/user/list',{'params':{'userIDs':[..._0x47fb2a]}}))[_0x13b4b0(0xb9)]['users'][_0x13b4b0(0x9f)](_0x1681cf=>{const _0x47352c=_0x13b4b0;_0x1681cf&&_0x145c7f[_0x47352c(0x98)](_0x1681cf);});};var K=Object[_0x1d05bf(0xd9)],V=(_0x4ffec8,_0x2afed1,_0xb8b63a,_0x2d28ee)=>{const _0x36c5c1=_0x1d05bf;for(var _0x531233=_0x2d28ee>0x1?void 0x0:_0x2d28ee?K(_0x2afed1,_0xb8b63a):_0x2afed1,_0x8142fd=_0x4ffec8[_0x36c5c1(0x8f)]-0x1,_0x4a42f4;_0x8142fd>=0x0;_0x8142fd--)(_0x4a42f4=_0x4ffec8[_0x8142fd])&&(_0x531233=_0x4a42f4(_0x531233)||_0x531233);return _0x531233;},p=(_0x706be9,_0x3c18e5)=>(_0x500355,_0x590d3f)=>_0x3c18e5(_0x500355,_0x590d3f,_0x706be9);let _=class extends _0x32b8e3{constructor(_0x4df39a,_0x56c8b8,_0x5d1126,_0x39f5cb){const _0x49e8c2=_0x1d05bf;super(),this[_0x49e8c2(0xe1)]=_0x4df39a,this[_0x49e8c2(0x8d)]=_0x56c8b8,this['_userService']=_0x5d1126,this[_0x49e8c2(0xc5)]=_0x39f5cb,this[_0x49e8c2(0xe7)](),this['_initUserSync']();}[_0x1d05bf(0xbb)](){const _0x479467=_0x1d05bf;this[_0x479467(0xda)](this[_0x479467(0x8d)][_0x479467(0xdc)][_0x479467(0xd0)](_0x5d647c(0x10))[_0x479467(0xa9)](_0x2ef42a=>{const _0x36113d=_0x479467,_0x3ba742=new Set();_0x2ef42a[_0x36113d(0x9f)](_0x27c8da=>{const _0x20f412=_0x36113d;switch(_0x27c8da['type']){case _0x20f412(0xe8):{const _0x28cd09=_0x27c8da[_0x20f412(0x89)][_0x20f412(0x85)];_0x3ba742[_0x20f412(0xe8)](_0x28cd09);break;}}}),B(this['_injector'],_0x3ba742);}));}[_0x1d05bf(0xe7)](){const _0x36e8a6=_0x1d05bf;this['disposeWithMe'](this[_0x36e8a6(0xe1)][_0x36e8a6(0xdc)][_0x36e8a6(0xa9)](async _0x13612f=>{const _0x463596=_0x36e8a6;var _0x4e005d,_0x5a4114,_0x5bd525,_0x2f784b;const _0x20a774=(_0x4e005d=this[_0x463596(0x8d)][_0x463596(0x9e)](_0x13612f['unitId'])[_0x463596(0xd7)](_0x41cbbb=>_0x41cbbb['threadId']===_0x13612f[_0x463596(0xa2)]))==null?void 0x0:_0x4e005d['root'];if(!_0x20a774)return;const {unitId:_0x2e532b,subUnitId:_0x430e89}=_0x20a774;switch(_0x13612f[_0x463596(0xc4)]&&this[_0x463596(0xeb)][_0x463596(0x98)](_0x13612f[_0x463596(0xc4)]),_0x13612f[_0x463596(0x8a)]){case v['Add']:break;case v[_0x463596(0x87)]:{this[_0x463596(0x8d)][_0x463596(0xc9)](_0x2e532b,_0x430e89,{'unitId':_0x2e532b,'subUnitId':_0x430e89,'ref':'','id':_0x13612f['replyId'],'dT':y(+_0x13612f[_0x463596(0x92)]),'threadId':_0x13612f['threadId'],'personId':(_0x5bd525=(_0x5a4114=_0x13612f[_0x463596(0xc4)])==null?void 0x0:_0x5a4114[_0x463596(0xb4)])!=null?_0x5bd525:_0x13612f['userId'],'text':JSON[_0x463596(0xa0)](_0x13612f['content']),'parentId':_0x20a774['id']});break;}case v[_0x463596(0x8c)]:{const _0x14c9cb=this[_0x463596(0x8d)][_0x463596(0xca)](_0x2e532b,_0x430e89,_0x13612f['replyId']);_0x14c9cb&&_0x14c9cb[_0x463596(0xa5)]&&this[_0x463596(0x8d)][_0x463596(0xab)](_0x2e532b,_0x430e89,_0x13612f['replyId']);break;}case v[_0x463596(0xb1)]:{this[_0x463596(0x8d)][_0x463596(0xad)](_0x2e532b,_0x430e89,{'commentId':_0x13612f[_0x463596(0xa4)],'text':JSON[_0x463596(0xa0)](_0x13612f['content'])});break;}case v[_0x463596(0xb2)]:{const _0x25f141=(_0x2f784b=this[_0x463596(0x8d)][_0x463596(0x9e)](_0x13612f[_0x463596(0x9a)])[_0x463596(0xd7)](_0x58ff72=>_0x58ff72[_0x463596(0xa2)]===_0x13612f[_0x463596(0xa2)]))==null?void 0x0:_0x2f784b[_0x463596(0x9c)];_0x25f141&&this['_threadCommentModel'][_0x463596(0xb7)](_0x2e532b,_0x430e89,_0x25f141['id'],_0x13612f['solved']===I[_0x463596(0xd3)]);break;}}}));}};_=V([p(0x0,_0x3b9053(_0xc41ade)),p(0x1,_0x3b9053(_0x1d8efc)),p(0x2,_0x3b9053(_0xb203b6)),p(0x3,_0x3b9053(_0x4549a3))],_);const z=_0x1d05bf(0xc2),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1b2c33,_0x291cef,_0x31cb1b,_0x1d4640)=>{const _0x36bb4b=_0x1d05bf;for(var _0x2121ce=_0x1d4640>0x1?void 0x0:_0x1d4640?k(_0x291cef,_0x31cb1b):_0x291cef,_0x28d029=_0x1b2c33[_0x36bb4b(0x8f)]-0x1,_0x24eeaf;_0x28d029>=0x0;_0x28d029--)(_0x24eeaf=_0x1b2c33[_0x28d029])&&(_0x2121ce=_0x24eeaf(_0x2121ce)||_0x2121ce);return _0x2121ce;},b=(_0x337f7b,_0x2e5471)=>(_0x1729cf,_0x581d0a)=>_0x2e5471(_0x1729cf,_0x581d0a,_0x337f7b);function X(_0x158da1,_0x171913){const _0x36b8bf=_0x1d05bf,_0x3ad962=_0x158da1[_0x36b8bf(0xa7)][0x0];return{..._0x171913,'id':_0x3ad962[_0x36b8bf(0xa4)],'resolved':_0x158da1[_0x36b8bf(0x86)]===0x1,'dT':y(_0x3ad962[_0x36b8bf(0x92)]),'personId':_0x3ad962[_0x36b8bf(0xd8)],'threadId':_0x3ad962[_0x36b8bf(0xa2)]};}function ee(_0x3f4517,_0x12368f,_0x11aae5){const _0xea2705=_0x1d05bf;var _0x3d11ed,_0xc7c0be;if(((_0xc7c0be=(_0x3d11ed=_0x3f4517==null?void 0x0:_0x3f4517['replies'])==null?void 0x0:_0x3d11ed[_0xea2705(0x8f)])!=null?_0xc7c0be:0x0)>0x0){const _0x3ca1af=(_0x419f24,_0x39e44d)=>({'id':_0x419f24[_0xea2705(0xa4)],'threadId':_0x419f24['threadId'],'dT':y(_0x419f24[_0xea2705(0x92)]),'personId':_0x419f24[_0xea2705(0xd8)],'resolved':_0x3f4517['solved']===I[_0xea2705(0xd3)],'unitId':_0x12368f,'subUnitId':_0x11aae5,'text':JSON[_0xea2705(0xa0)](_0x419f24[_0xea2705(0xc7)]),'parentId':_0x39e44d}),_0x2c2e01=_0x3ca1af(_0x3f4517[_0xea2705(0xa7)][0x0]);return{..._0x2c2e01,'children':_0x3f4517[_0xea2705(0xa7)][_0xea2705(0xb5)](0x1)[_0xea2705(0xb8)](_0x31892a=>_0x3ca1af(_0x31892a,_0x2c2e01['id']))};}return null;}let S=class{constructor(_0x3e765b,_0x8ccd56,_0x4b77ad){const _0xdf602e=_0x1d05bf;this['_httpService']=_0x3e765b,this[_0xdf602e(0xeb)]=_0x8ccd56,this['_sessionService']=_0x4b77ad;}async['addComment'](_0x3bee76){const _0x1be0ae=_0x1d05bf;var _0x11747e,_0x3dce07;const {parentId:_0x3e833a,unitId:_0x53d1a2,text:_0xf64010,threadId:_0x23862b}=_0x3bee76,_0x1ea204=(_0x3dce07=(_0x11747e=_0xf64010[_0x1be0ae(0xcb)])==null?void 0x0:_0x11747e[_0x1be0ae(0xe5)](_0x2a9eb4=>_0x2a9eb4[_0x1be0ae(0xc1)]===_0x1261ad[_0x1be0ae(0xcf)])[_0x1be0ae(0xb8)](_0x255f2f=>_0x255f2f[_0x1be0ae(0xc3)]))!=null?_0x3dce07:[],_0x1d777b=JSON[_0x1be0ae(0xe2)](_0xf64010),_0x28265c=(await this[_0x1be0ae(0xe3)][_0x1be0ae(0xba)](_0x53d1a2))['getMemberID']();if(_0x3e833a){const _0x1ee11a={'memberId':_0x28265c,'unitId':_0x53d1a2,'content':_0x1d777b,'mention':_0x1ea204,'threadId':_0x23862b},_0x84b2a9=(await this['_httpService'][_0x1be0ae(0xef)](_0x1be0ae(0xbc)+_0x53d1a2+_0x1be0ae(0xe0),{'body':_0x1ee11a}))[_0x1be0ae(0xb9)][_0x1be0ae(0xde)];return{..._0x3bee76,'id':_0x84b2a9[_0x1be0ae(0xa4)],'dT':_0x4cfb05(+_0x84b2a9[_0x1be0ae(0x92)])[_0x1be0ae(0xa8)](_0x1be0ae(0xe6)),'personId':_0x84b2a9[_0x1be0ae(0xd8)]};}else{const _0x51088d={'memberId':_0x28265c,'unitId':_0x53d1a2,'content':_0x1d777b,'mention':_0x1ea204},_0x4cedb0=await this[_0x1be0ae(0xb0)][_0x1be0ae(0xef)]('/universer-api/comment/unit/'+_0x53d1a2+_0x1be0ae(0xaa),{'body':_0x51088d});return X(_0x4cedb0[_0x1be0ae(0xb9)][_0x1be0ae(0xdf)],_0x3bee76);}}async['updateComment'](_0x1e586c){const _0x41853e=_0x1d05bf;var _0x14bb53,_0x78657f;const {text:_0x1bb852,unitId:_0x35928a}=_0x1e586c,_0x497da7=(_0x78657f=(_0x14bb53=_0x1bb852[_0x41853e(0xcb)])==null?void 0x0:_0x14bb53['filter'](_0x3b10b0=>_0x3b10b0['rangeType']===_0x1261ad['COMMENT'])[_0x41853e(0xb8)](_0x1cd22b=>_0x1cd22b[_0x41853e(0xc3)]))!=null?_0x78657f:[],_0x4a1d15=JSON['stringify'](_0x1bb852),_0x4d1d04=_0x1e586c[_0x41853e(0xa2)],_0x58dd89=_0x1e586c['id'],_0x1eb283={'memberId':(await this['_sessionService']['requireSession'](_0x35928a))['getMemberID'](),'unitId':_0x35928a,'threadId':_0x4d1d04,'mention':_0x497da7,'content':_0x4a1d15,'replyId':_0x58dd89},_0x36fc1f=await this['_httpService'][_0x41853e(0xef)](_0x41853e(0xbc)+_0x35928a+_0x41853e(0x8e),{'body':_0x1eb283});return!_0x36fc1f[_0x41853e(0xb9)][_0x41853e(0xf0)]||_0x36fc1f[_0x41853e(0xb9)][_0x41853e(0xf0)][_0x41853e(0xcd)]===0x1;}async[_0x1d05bf(0xb7)](_0x5c7e00){const _0x520e6e=_0x1d05bf,{unitId:_0x557e5d}=_0x5c7e00,_0x5bd458=_0x5c7e00['threadId'],_0x25bd74={'memberId':this[_0x520e6e(0xeb)][_0x520e6e(0xc6)]()[_0x520e6e(0xb4)],'unitId':_0x557e5d,'threadId':_0x5bd458,'solved':_0x5c7e00[_0x520e6e(0xed)]?I[_0x520e6e(0xd3)]:I[_0x520e6e(0xcc)]},_0x4dc98f=await this[_0x520e6e(0xb0)][_0x520e6e(0xef)](_0x520e6e(0xbc)+_0x557e5d+_0x520e6e(0x90),{'body':_0x25bd74});return!_0x4dc98f[_0x520e6e(0xb9)][_0x520e6e(0xf0)]||_0x4dc98f['body']['error'][_0x520e6e(0xcd)]===0x1;}async[_0x1d05bf(0xab)](_0x46df38,_0x4d353c,_0x484bda,_0x54a0a7){const _0x3bb1ba=_0x1d05bf,_0x213741={'memberId':(await this[_0x3bb1ba(0xe3)][_0x3bb1ba(0xba)](_0x46df38))[_0x3bb1ba(0x97)](),'threadId':_0x484bda,'replyId':_0x54a0a7,'unitId':_0x46df38},_0x1f9673=await this[_0x3bb1ba(0xb0)][_0x3bb1ba(0xef)](_0x3bb1ba(0xbc)+_0x46df38+'/delete',{'body':_0x213741});return!_0x1f9673['body']['error']||_0x1f9673[_0x3bb1ba(0xb9)]['error'][_0x3bb1ba(0xcd)]===0x1;}async[_0x1d05bf(0xe9)](_0x3ff60a,_0x4650fe,_0x1f84df){const _0x463748=_0x1d05bf,_0x41b776={'unitId':_0x3ff60a,'threadId':_0x1f84df},_0x3eee08=await this['_httpService'][_0x463748(0xef)](_0x463748(0xbc)+_0x3ff60a+'/list',{'body':_0x41b776}),_0x23cddc=_0x1f84df[_0x463748(0xb8)](_0xdfc450=>ee(_0x3eee08[_0x463748(0xb9)][_0x463748(0xa3)][_0xdfc450],_0x3ff60a,_0x4650fe))[_0x463748(0xe5)](Boolean);return Object['values'](_0x3eee08[_0x463748(0xb9)][_0x463748(0xd4)])['forEach'](_0x30e281=>{const _0x4128d5=_0x463748;this[_0x4128d5(0xeb)][_0x4128d5(0x98)](_0x30e281);}),_0x23cddc;}[_0x1d05bf(0xa1)](_0x2d238f){const _0x545ded=_0x1d05bf;return{'id':_0x2d238f['id'],'threadId':_0x2d238f['threadId'],'ref':_0x2d238f[_0x545ded(0xe4)]};}};S=Q([b(0x0,_0x3b9053(_0x5340ca)),b(0x1,_0x3b9053(_0xb203b6)),b(0x2,_0x3b9053(_0x5c2147))],S);var re=Object[_0x1d05bf(0xd9)],te=(_0x19ae1f,_0x54ecdb,_0x418547,_0x1af9d3)=>{const _0x58e1ae=_0x1d05bf;for(var _0x49187f=_0x1af9d3>0x1?void 0x0:_0x1af9d3?re(_0x54ecdb,_0x418547):_0x54ecdb,_0x23662e=_0x19ae1f[_0x58e1ae(0x8f)]-0x1,_0x2d8c94;_0x23662e>=0x0;_0x23662e--)(_0x2d8c94=_0x19ae1f[_0x23662e])&&(_0x49187f=_0x2d8c94(_0x49187f)||_0x49187f);return _0x49187f;},M=(_0x20867b,_0x453886)=>(_0x13aeff,_0xaedf7c)=>_0x453886(_0x13aeff,_0xaedf7c,_0x20867b);let f=class extends _0x32b8e3{constructor(_0x467a1c,_0x4f55b3){const _0x294d00=_0x1d05bf;super(),this[_0x294d00(0x94)]=_0x467a1c,this[_0x294d00(0xac)]=_0x4f55b3,this['_initDataSource']();}[_0x1d05bf(0x95)](){const _0x258a41=_0x1d05bf;this[_0x258a41(0x94)][_0x258a41(0xdb)]=this[_0x258a41(0xac)],this[_0x258a41(0x94)][_0x258a41(0xaf)]=!0x1;}};function _0x1614(_0x560cc3,_0x36bcbe){const _0x306061=_0x3060();return _0x1614=function(_0x1614e5,_0x213d5c){_0x1614e5=_0x1614e5-0x85;let _0x3a4b59=_0x306061[_0x1614e5];return _0x3a4b59;},_0x1614(_0x560cc3,_0x36bcbe);}f=te([M(0x0,_0x475030),M(0x1,_0x3b9053(S))],f);var se=Object['defineProperty'],oe=Object[_0x1d05bf(0xd9)],ne=(_0x53ed3f,_0x26f62b,_0x37cbce)=>_0x26f62b in _0x53ed3f?se(_0x53ed3f,_0x26f62b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x37cbce}):_0x53ed3f[_0x26f62b]=_0x37cbce,ie=(_0x4e74a3,_0xcc66af,_0x4497fb,_0x2457b0)=>{const _0x3bb833=_0x1d05bf;for(var _0x5eb94e=_0x2457b0>0x1?void 0x0:_0x2457b0?oe(_0xcc66af,_0x4497fb):_0xcc66af,_0x6c53c=_0x4e74a3[_0x3bb833(0x8f)]-0x1,_0x57ad1b;_0x6c53c>=0x0;_0x6c53c--)(_0x57ad1b=_0x4e74a3[_0x6c53c])&&(_0x5eb94e=_0x57ad1b(_0x5eb94e)||_0x5eb94e);return _0x5eb94e;},N=(_0x274db6,_0xe865a)=>(_0x3c7f22,_0x2162d7)=>_0xe865a(_0x3c7f22,_0x2162d7,_0x274db6),$=(_0x5dfb6a,_0x5357ae,_0xda1b01)=>ne(_0x5dfb6a,typeof _0x5357ae!=_0x1d05bf(0xdd)?_0x5357ae+'':_0x5357ae,_0xda1b01);let g=class extends _0x761510{constructor(_0x4cbcbc=O,_0x258eb8,_0x30a2ba){const _0x1eb225=_0x1d05bf;super(),this[_0x1eb225(0xd1)]=_0x4cbcbc,this[_0x1eb225(0xc5)]=_0x258eb8,this[_0x1eb225(0xb6)]=_0x30a2ba;const {..._0x63e336}=_0x543ebe({},O,this[_0x1eb225(0xd1)]);this[_0x1eb225(0xb6)][_0x1eb225(0x96)](z,_0x63e336);}[_0x1d05bf(0xbf)](){const _0x506780=_0x1d05bf;[[S],[f],[_]][_0x506780(0x9f)](_0x5f452e=>{const _0x1efee8=_0x506780;this[_0x1efee8(0xc5)][_0x1efee8(0xe8)](_0x5f452e);});}[_0x1d05bf(0xd5)](){const _0x419e4f=_0x1d05bf;this[_0x419e4f(0xc5)][_0x419e4f(0x88)](f),this[_0x419e4f(0xc5)]['get'](_);}};$(g,'pluginName',W),$(g,_0x1d05bf(0x8a),_0x7f2fa9[_0x1d05bf(0x99)]),g=ie([_0x339bdc(_0x272b59,_0x2f4ea6,_0x5d88f5),N(0x1,_0x3b9053(_0x4549a3)),N(0x2,_0x50a798)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x5bf11d=_0x5c98;(function(_0x2e1a9f,_0x30be59){const _0x36f4ce=_0x5c98,_0x340a84=_0x2e1a9f();while(!![]){try{const _0x4b898f=parseInt(_0x36f4ce(0xdd))/0x1+-parseInt(_0x36f4ce(0xf1))/0x2*(-parseInt(_0x36f4ce(0xd6))/0x3)+parseInt(_0x36f4ce(0xe3))/0x4+-parseInt(_0x36f4ce(0xdb))/0x5*(-parseInt(_0x36f4ce(0xd0))/0x6)+-parseInt(_0x36f4ce(0xc9))/0x7*(parseInt(_0x36f4ce(0xf6))/0x8)+parseInt(_0x36f4ce(0xaf))/0x9*(-parseInt(_0x36f4ce(0xa7))/0xa)+parseInt(_0x36f4ce(0xe1))/0xb;if(_0x4b898f===_0x30be59)break;else _0x340a84['push'](_0x340a84['shift']());}catch(_0x326e6d){_0x340a84['push'](_0x340a84['shift']());}}}(_0x13a5,0x32c10));import{CommentService as _0x3e033d,CollaborationSessionService as _0x55d10c,UniverCollaborationClientPlugin as _0x42a23e}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2436a8}from'@univerjs-pro/license';import{dayjs as _0x406095,UserManagerService as _0x370dc1,Inject as _0x139489,Injector as _0x353baa,Disposable as _0x3ad743,CustomRangeType as _0x2abdd2,UniverInstanceType as _0xae0343,DependentOn as _0x13c419,IConfigService as _0x33ac58,Plugin as _0x57b30b,merge as _0x1ae59a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x134544}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xfaeaef,IThreadCommentDataSourceService as _0x31dc00}from'@univerjs/thread-comment';import{bufferTime as _0x1b3cbd}from'rxjs';import{HTTPService as _0x4acda9}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xa5a42e=>(_0xa5a42e[_0xa5a42e[_0x5bf11d(0xda)]=0x0]='OpenOrReOpen',_0xa5a42e[_0xa5a42e[_0x5bf11d(0xa9)]=0x1]=_0x5bf11d(0xa9),_0xa5a42e[_0xa5a42e[_0x5bf11d(0xc6)]=-0x1]=_0x5bf11d(0xc6),_0xa5a42e))(I||{}),v=(_0x465061=>(_0x465061[_0x465061[_0x5bf11d(0xd1)]=0x0]=_0x5bf11d(0xd1),_0x465061[_0x465061['Add']=0x1]=_0x5bf11d(0xb0),_0x465061[_0x465061[_0x5bf11d(0xe0)]=0x2]=_0x5bf11d(0xe0),_0x465061[_0x465061[_0x5bf11d(0xae)]=0x3]='Edit',_0x465061[_0x465061[_0x5bf11d(0xbe)]=0x4]='Delete',_0x465061[_0x465061[_0x5bf11d(0xac)]=0x5]='Solve',_0x465061[_0x465061[_0x5bf11d(0xc6)]=-0x1]=_0x5bf11d(0xc6),_0x465061))(v||{});const y=_0x354b69=>_0x406095(new Date(+_0x354b69))[_0x5bf11d(0xe4)](_0x5bf11d(0xf3)),B=async(_0x59c066,_0x265859)=>{const _0x23d640=_0x5bf11d,_0x7cf6a3=_0x59c066[_0x23d640(0xc0)](_0x370dc1),_0xe02f44=_0x59c066[_0x23d640(0xc0)](_0x4acda9);_0x265859[_0x23d640(0xe5)](_0x45aff2=>{const _0x4ffe44=_0x23d640;_0x7cf6a3[_0x4ffe44(0xf7)](_0x45aff2)&&_0x265859[_0x4ffe44(0xdc)](_0x45aff2);}),_0x265859[_0x23d640(0xb6)]&&(await _0xe02f44['get'](_0x23d640(0xb5),{'params':{'userIDs':[..._0x265859]}}))['body'][_0x23d640(0xde)][_0x23d640(0xe5)](_0x3653d2=>{const _0x518695=_0x23d640;_0x3653d2&&_0x7cf6a3[_0x518695(0xc1)](_0x3653d2);});};var K=Object[_0x5bf11d(0xe6)],V=(_0x3bfb34,_0x36803c,_0x2f7419,_0x352174)=>{const _0x28378b=_0x5bf11d;for(var _0x291a75=_0x352174>0x1?void 0x0:_0x352174?K(_0x36803c,_0x2f7419):_0x36803c,_0x23c6c2=_0x3bfb34[_0x28378b(0xc8)]-0x1,_0x3de3bf;_0x23c6c2>=0x0;_0x23c6c2--)(_0x3de3bf=_0x3bfb34[_0x23c6c2])&&(_0x291a75=_0x3de3bf(_0x291a75)||_0x291a75);return _0x291a75;},p=(_0xdb68c,_0x55b200)=>(_0x16f280,_0x1a89d0)=>_0x55b200(_0x16f280,_0x1a89d0,_0xdb68c);let _=class extends _0x3ad743{constructor(_0x4567e3,_0x1cb9ac,_0xc9fcd0,_0x58aecc){const _0x1c15ef=_0x5bf11d;super(),this['_commentService']=_0x4567e3,this[_0x1c15ef(0xba)]=_0x1cb9ac,this['_userService']=_0xc9fcd0,this[_0x1c15ef(0xb7)]=_0x58aecc,this[_0x1c15ef(0xfb)](),this[_0x1c15ef(0xa8)]();}[_0x5bf11d(0xa8)](){const _0x234f5a=_0x5bf11d;this[_0x234f5a(0xe8)](this[_0x234f5a(0xba)][_0x234f5a(0xc3)][_0x234f5a(0x102)](_0x1b3cbd(0x10))[_0x234f5a(0xd7)](_0x4923b1=>{const _0x2026f8=_0x234f5a,_0xf55b68=new Set();_0x4923b1[_0x2026f8(0xe5)](_0x319820=>{const _0x1055b7=_0x2026f8;switch(_0x319820[_0x1055b7(0xcd)]){case _0x1055b7(0xce):{const _0x1e1ce4=_0x319820[_0x1055b7(0xdf)][_0x1055b7(0xef)];_0xf55b68[_0x1055b7(0xce)](_0x1e1ce4);break;}}}),B(this[_0x2026f8(0xb7)],_0xf55b68);}));}[_0x5bf11d(0xfb)](){const _0x3c0edb=_0x5bf11d;this['disposeWithMe'](this[_0x3c0edb(0xfe)][_0x3c0edb(0xc3)][_0x3c0edb(0xd7)](async _0x4027c4=>{const _0x2beaf9=_0x3c0edb;var _0x38148c,_0x5e62cb,_0x2e3854,_0x45f066;const _0x346856=(_0x38148c=this[_0x2beaf9(0xba)][_0x2beaf9(0xb4)](_0x4027c4[_0x2beaf9(0xc4)])[_0x2beaf9(0x101)](_0x22cdba=>_0x22cdba['threadId']===_0x4027c4['threadId']))==null?void 0x0:_0x38148c[_0x2beaf9(0xcf)];if(!_0x346856)return;const {unitId:_0x37c898,subUnitId:_0x2f743d}=_0x346856;switch(_0x4027c4[_0x2beaf9(0xea)]&&this[_0x2beaf9(0xf4)][_0x2beaf9(0xc1)](_0x4027c4[_0x2beaf9(0xea)]),_0x4027c4[_0x2beaf9(0xcd)]){case v[_0x2beaf9(0xb0)]:break;case v['Reply']:{this[_0x2beaf9(0xba)][_0x2beaf9(0xf9)](_0x37c898,_0x2f743d,{'unitId':_0x37c898,'subUnitId':_0x2f743d,'ref':'','id':_0x4027c4[_0x2beaf9(0x108)],'dT':y(+_0x4027c4[_0x2beaf9(0xf2)]),'threadId':_0x4027c4[_0x2beaf9(0x10b)],'personId':(_0x2e3854=(_0x5e62cb=_0x4027c4['user'])==null?void 0x0:_0x5e62cb[_0x2beaf9(0xbb)])!=null?_0x2e3854:_0x4027c4[_0x2beaf9(0xeb)],'text':JSON[_0x2beaf9(0x103)](_0x4027c4['content']),'parentId':_0x346856['id']});break;}case v[_0x2beaf9(0xbe)]:{const _0x38620f=this['_threadCommentModel']['getComment'](_0x37c898,_0x2f743d,_0x4027c4[_0x2beaf9(0x108)]);_0x38620f&&_0x38620f['parentId']&&this[_0x2beaf9(0xba)][_0x2beaf9(0xa5)](_0x37c898,_0x2f743d,_0x4027c4[_0x2beaf9(0x108)]);break;}case v[_0x2beaf9(0xae)]:{this[_0x2beaf9(0xba)][_0x2beaf9(0x109)](_0x37c898,_0x2f743d,{'commentId':_0x4027c4[_0x2beaf9(0x108)],'text':JSON[_0x2beaf9(0x103)](_0x4027c4[_0x2beaf9(0x100)])});break;}case v[_0x2beaf9(0xac)]:{const _0x1317ca=(_0x45f066=this[_0x2beaf9(0xba)][_0x2beaf9(0xb4)](_0x4027c4[_0x2beaf9(0xc4)])[_0x2beaf9(0x101)](_0x5732d5=>_0x5732d5[_0x2beaf9(0x10b)]===_0x4027c4[_0x2beaf9(0x10b)]))==null?void 0x0:_0x45f066[_0x2beaf9(0xcf)];_0x1317ca&&this[_0x2beaf9(0xba)][_0x2beaf9(0xca)](_0x37c898,_0x2f743d,_0x1317ca['id'],_0x4027c4[_0x2beaf9(0xe7)]===I[_0x2beaf9(0xa9)]);break;}}}));}};_=V([p(0x0,_0x139489(_0x3e033d)),p(0x1,_0x139489(_0xfaeaef)),p(0x2,_0x139489(_0x370dc1)),p(0x3,_0x139489(_0x353baa))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x5bf11d(0xe6)],Q=(_0x24661e,_0x4297bf,_0x3af404,_0x1dbed9)=>{const _0x176d9b=_0x5bf11d;for(var _0x128f88=_0x1dbed9>0x1?void 0x0:_0x1dbed9?k(_0x4297bf,_0x3af404):_0x4297bf,_0x585f99=_0x24661e[_0x176d9b(0xc8)]-0x1,_0x3ab8c4;_0x585f99>=0x0;_0x585f99--)(_0x3ab8c4=_0x24661e[_0x585f99])&&(_0x128f88=_0x3ab8c4(_0x128f88)||_0x128f88);return _0x128f88;},b=(_0x1428f6,_0x598794)=>(_0x5b2621,_0x55982e)=>_0x598794(_0x5b2621,_0x55982e,_0x1428f6);function X(_0x73df2,_0x1e4ea3){const _0xb53790=_0x5bf11d,_0x28a9e0=_0x73df2[_0xb53790(0xcb)][0x0];return{..._0x1e4ea3,'id':_0x28a9e0[_0xb53790(0x108)],'resolved':_0x73df2[_0xb53790(0xe7)]===0x1,'dT':y(_0x28a9e0[_0xb53790(0xf2)]),'personId':_0x28a9e0[_0xb53790(0xeb)],'threadId':_0x28a9e0['threadId']};}function ee(_0x105610,_0x5e8c31,_0x141a18){const _0x56050c=_0x5bf11d;var _0x50f0ef,_0xdcf5d9;if(((_0xdcf5d9=(_0x50f0ef=_0x105610==null?void 0x0:_0x105610[_0x56050c(0xcb)])==null?void 0x0:_0x50f0ef[_0x56050c(0xc8)])!=null?_0xdcf5d9:0x0)>0x0){const _0x10d295=(_0xc7e1b7,_0x26cf67)=>({'id':_0xc7e1b7[_0x56050c(0x108)],'threadId':_0xc7e1b7['threadId'],'dT':y(_0xc7e1b7[_0x56050c(0xf2)]),'personId':_0xc7e1b7[_0x56050c(0xeb)],'resolved':_0x105610[_0x56050c(0xe7)]===I[_0x56050c(0xa9)],'unitId':_0x5e8c31,'subUnitId':_0x141a18,'text':JSON[_0x56050c(0x103)](_0xc7e1b7[_0x56050c(0x100)]),'parentId':_0x26cf67}),_0x3da65e=_0x10d295(_0x105610['replies'][0x0]);return{..._0x3da65e,'children':_0x105610[_0x56050c(0xcb)][_0x56050c(0xad)](0x1)[_0x56050c(0x106)](_0x5ec665=>_0x10d295(_0x5ec665,_0x3da65e['id']))};}return null;}let S=class{constructor(_0x1839ec,_0x13413f,_0x338f6b){const _0x53ee56=_0x5bf11d;this[_0x53ee56(0xd5)]=_0x1839ec,this[_0x53ee56(0xf4)]=_0x13413f,this[_0x53ee56(0xfd)]=_0x338f6b;}async[_0x5bf11d(0xf9)](_0x45270a){const _0x3f0d07=_0x5bf11d;var _0x2e3882,_0xbf5c4a;const {parentId:_0x2be2b5,unitId:_0x146327,text:_0x49f1df,threadId:_0x11d063}=_0x45270a,_0x444d32=(_0xbf5c4a=(_0x2e3882=_0x49f1df[_0x3f0d07(0xec)])==null?void 0x0:_0x2e3882['filter'](_0x52638a=>_0x52638a[_0x3f0d07(0xb3)]===_0x2abdd2[_0x3f0d07(0xfa)])[_0x3f0d07(0x106)](_0x576472=>_0x576472[_0x3f0d07(0xc2)]))!=null?_0xbf5c4a:[],_0x4fa583=JSON[_0x3f0d07(0xbf)](_0x49f1df),_0xefe1cf=(await this[_0x3f0d07(0xfd)]['requireSession'](_0x146327))['getMemberID']();if(_0x2be2b5){const _0x5b81d6={'memberId':_0xefe1cf,'unitId':_0x146327,'content':_0x4fa583,'mention':_0x444d32,'threadId':_0x11d063},_0x35f7b8=(await this['_httpService']['post'](_0x3f0d07(0xb2)+_0x146327+_0x3f0d07(0xe9),{'body':_0x5b81d6}))[_0x3f0d07(0x104)][_0x3f0d07(0xee)];return{..._0x45270a,'id':_0x35f7b8[_0x3f0d07(0x108)],'dT':_0x406095(+_0x35f7b8[_0x3f0d07(0xf2)])[_0x3f0d07(0xe4)](_0x3f0d07(0xf3)),'personId':_0x35f7b8[_0x3f0d07(0xeb)]};}else{const _0x3a702d={'memberId':_0xefe1cf,'unitId':_0x146327,'content':_0x4fa583,'mention':_0x444d32},_0x5ccff7=await this[_0x3f0d07(0xd5)]['post']('/universer-api/comment/unit/'+_0x146327+_0x3f0d07(0xc5),{'body':_0x3a702d});return X(_0x5ccff7[_0x3f0d07(0x104)][_0x3f0d07(0xfc)],_0x45270a);}}async[_0x5bf11d(0x109)](_0x1ad167){const _0x442f2f=_0x5bf11d;var _0x5ab67b,_0x11ed83;const {text:_0x51b466,unitId:_0x5ec047}=_0x1ad167,_0x575b41=(_0x11ed83=(_0x5ab67b=_0x51b466['customRanges'])==null?void 0x0:_0x5ab67b['filter'](_0x56a241=>_0x56a241['rangeType']===_0x2abdd2[_0x442f2f(0xfa)])[_0x442f2f(0x106)](_0x506958=>_0x506958['rangeId']))!=null?_0x11ed83:[],_0x320c1c=JSON[_0x442f2f(0xbf)](_0x51b466),_0x4c66e7=_0x1ad167[_0x442f2f(0x10b)],_0x19170e=_0x1ad167['id'],_0xa7bd21={'memberId':(await this[_0x442f2f(0xfd)][_0x442f2f(0xa6)](_0x5ec047))['getMemberID'](),'unitId':_0x5ec047,'threadId':_0x4c66e7,'mention':_0x575b41,'content':_0x320c1c,'replyId':_0x19170e},_0x40277b=await this[_0x442f2f(0xd5)][_0x442f2f(0xd3)](_0x442f2f(0xb2)+_0x5ec047+_0x442f2f(0xe2),{'body':_0xa7bd21});return!_0x40277b[_0x442f2f(0x104)]['error']||_0x40277b[_0x442f2f(0x104)][_0x442f2f(0x107)]['code']===0x1;}async[_0x5bf11d(0xca)](_0x4a2da7){const _0x317f0c=_0x5bf11d,{unitId:_0x316b80}=_0x4a2da7,_0xcff4a8=_0x4a2da7['threadId'],_0x41c37d={'memberId':this['_userService']['getCurrentUser']()[_0x317f0c(0xbb)],'unitId':_0x316b80,'threadId':_0xcff4a8,'solved':_0x4a2da7[_0x317f0c(0xd2)]?I['Solved']:I['OpenOrReOpen']},_0x17dcc6=await this[_0x317f0c(0xd5)][_0x317f0c(0xd3)]('/universer-api/comment/unit/'+_0x316b80+'/solved',{'body':_0x41c37d});return!_0x17dcc6['body'][_0x317f0c(0x107)]||_0x17dcc6[_0x317f0c(0x104)]['error']['code']===0x1;}async[_0x5bf11d(0xa5)](_0x1669fd,_0xdf954d,_0x21fcd4,_0x40cc3e){const _0x2d7b44=_0x5bf11d,_0x145fcb={'memberId':(await this['_sessionService'][_0x2d7b44(0xa6)](_0x1669fd))[_0x2d7b44(0xd4)](),'threadId':_0x21fcd4,'replyId':_0x40cc3e,'unitId':_0x1669fd},_0x2c31f8=await this[_0x2d7b44(0xd5)][_0x2d7b44(0xd3)](_0x2d7b44(0xb2)+_0x1669fd+'/delete',{'body':_0x145fcb});return!_0x2c31f8['body'][_0x2d7b44(0x107)]||_0x2c31f8[_0x2d7b44(0x104)][_0x2d7b44(0x107)]['code']===0x1;}async[_0x5bf11d(0xb1)](_0x4086fa,_0x236b49,_0x56d668){const _0x443b4b=_0x5bf11d,_0x216b2a={'unitId':_0x4086fa,'threadId':_0x56d668},_0x25a709=await this[_0x443b4b(0xd5)][_0x443b4b(0xd3)](_0x443b4b(0xb2)+_0x4086fa+'/list',{'body':_0x216b2a}),_0x8721ad=_0x56d668[_0x443b4b(0x106)](_0x371ab5=>ee(_0x25a709['body'][_0x443b4b(0x105)][_0x371ab5],_0x4086fa,_0x236b49))[_0x443b4b(0xf5)](Boolean);return Object[_0x443b4b(0xbc)](_0x25a709['body'][_0x443b4b(0xde)])[_0x443b4b(0xe5)](_0x287315=>{const _0x4e7811=_0x443b4b;this[_0x4e7811(0xf4)]['addUser'](_0x287315);}),_0x8721ad;}[_0x5bf11d(0xd9)](_0x38d009){const _0x17c816=_0x5bf11d;return{'id':_0x38d009['id'],'threadId':_0x38d009[_0x17c816(0x10b)],'ref':_0x38d009[_0x17c816(0xbd)]};}};S=Q([b(0x0,_0x139489(_0x4acda9)),b(0x1,_0x139489(_0x370dc1)),b(0x2,_0x139489(_0x55d10c))],S);var re=Object[_0x5bf11d(0xe6)],te=(_0x281ea2,_0x17e6ed,_0x2f813a,_0xcdad0e)=>{const _0x22c2a4=_0x5bf11d;for(var _0x3a9061=_0xcdad0e>0x1?void 0x0:_0xcdad0e?re(_0x17e6ed,_0x2f813a):_0x17e6ed,_0x4ee619=_0x281ea2[_0x22c2a4(0xc8)]-0x1,_0x38f483;_0x4ee619>=0x0;_0x4ee619--)(_0x38f483=_0x281ea2[_0x4ee619])&&(_0x3a9061=_0x38f483(_0x3a9061)||_0x3a9061);return _0x3a9061;},M=(_0x58a15e,_0x5dfceb)=>(_0x48230e,_0x221d62)=>_0x5dfceb(_0x48230e,_0x221d62,_0x58a15e);let f=class extends _0x3ad743{constructor(_0x1e1287,_0x333ecf){const _0x5a4e20=_0x5bf11d;super(),this[_0x5a4e20(0x10a)]=_0x1e1287,this['_threadCommentDataSource']=_0x333ecf,this[_0x5a4e20(0xcc)]();}[_0x5bf11d(0xcc)](){const _0xbbc3e4=_0x5bf11d;this[_0xbbc3e4(0x10a)][_0xbbc3e4(0xc7)]=this[_0xbbc3e4(0xa4)],this[_0xbbc3e4(0x10a)][_0xbbc3e4(0xed)]=!0x1;}};f=te([M(0x0,_0x31dc00),M(0x1,_0x139489(S))],f);var se=Object[_0x5bf11d(0xb9)],oe=Object[_0x5bf11d(0xe6)],ne=(_0x3b2842,_0x47248f,_0x1fbeae)=>_0x47248f in _0x3b2842?se(_0x3b2842,_0x47248f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1fbeae}):_0x3b2842[_0x47248f]=_0x1fbeae,ie=(_0x3f7c99,_0x18db66,_0x3834f1,_0x49e30c)=>{const _0x416ee1=_0x5bf11d;for(var _0x2b7297=_0x49e30c>0x1?void 0x0:_0x49e30c?oe(_0x18db66,_0x3834f1):_0x18db66,_0x1b7f42=_0x3f7c99[_0x416ee1(0xc8)]-0x1,_0x44c4fc;_0x1b7f42>=0x0;_0x1b7f42--)(_0x44c4fc=_0x3f7c99[_0x1b7f42])&&(_0x2b7297=_0x44c4fc(_0x2b7297)||_0x2b7297);return _0x2b7297;},N=(_0x22ed37,_0x390191)=>(_0x505d01,_0x4a07e5)=>_0x390191(_0x505d01,_0x4a07e5,_0x22ed37),$=(_0x190ed5,_0x4585cc,_0x6972f6)=>ne(_0x190ed5,typeof _0x4585cc!='symbol'?_0x4585cc+'':_0x4585cc,_0x6972f6);let g=class extends _0x57b30b{constructor(_0x3f4ee8=O,_0xc21555,_0x2f17ad){const _0xf7f1b4=_0x5bf11d;super(),this[_0xf7f1b4(0xd8)]=_0x3f4ee8,this[_0xf7f1b4(0xb7)]=_0xc21555,this[_0xf7f1b4(0xab)]=_0x2f17ad;const {..._0x5aa886}=_0x1ae59a({},O,this[_0xf7f1b4(0xd8)]);this[_0xf7f1b4(0xab)][_0xf7f1b4(0xaa)](z,_0x5aa886);}[_0x5bf11d(0xb8)](){[[S],[f],[_]]['forEach'](_0x152f8a=>{this['_injector']['add'](_0x152f8a);});}[_0x5bf11d(0xff)](){const _0x11a33f=_0x5bf11d;this[_0x11a33f(0xb7)][_0x11a33f(0xc0)](f),this[_0x11a33f(0xb7)][_0x11a33f(0xc0)](_);}};$(g,_0x5bf11d(0xf0),W),$(g,_0x5bf11d(0xcd),_0xae0343[_0x5bf11d(0xf8)]),g=ie([_0x13c419(_0x134544,_0x42a23e,_0x2436a8),N(0x1,_0x139489(_0x353baa)),N(0x2,_0x33ac58)],g);export{g as UniverThreadCommentDataSourcePlugin};function _0x5c98(_0x37660f,_0x46c7d4){const _0x13a5fa=_0x13a5();return _0x5c98=function(_0x5c9884,_0x508eff){_0x5c9884=_0x5c9884-0xa4;let _0x14dfa3=_0x13a5fa[_0x5c9884];return _0x14dfa3;},_0x5c98(_0x37660f,_0x46c7d4);}function _0x13a5(){const _0x4599c3=['_configService','Solve','slice','Edit','1722834Aelhmc','Add','listComments','/universer-api/comment/unit/','rangeType','getUnit','/universer-api/user/list','size','_injector','onStarting','defineProperty','_threadCommentModel','userID','values','ref','Delete','stringify','get','addUser','rangeId','commentUpdate$','unitId','/add','UNRECOGNIZED','dataSource','length','1081276IdqyQq','resolveComment','replies','_initDataSource','type','add','root','6Unnzsy','Unknown','resolved','post','getMemberID','_httpService','3uAqxVm','subscribe','_config','saveCommentToSnapshot','OpenOrReOpen','671095ProWqz','delete','83216OEcflq','users','payload','Reply','1039830BowSAD','/edit','728104pWlPOg','format','forEach','getOwnPropertyDescriptor','solved','disposeWithMe','/reply','user','userId','customRanges','syncUpdateMutationToColla','reply','personId','pluginName','428518XmUQtY','createTimestamp','YYYY/MM/DD\x20HH:mm','_userService','filter','16IYopTa','getUser','UNIVER_UNKNOWN','addComment','COMMENT','_init','comment','_sessionService','_commentService','onReady','content','find','pipe','parse','body','comments','map','error','replyId','updateComment','_threadCommentDataSourceService','threadId','_threadCommentDataSource','deleteComment','requireSession','10KkPTVV','_initUserSync','Solved','setConfig'];_0x13a5=function(){return _0x4599c3;};return _0x13a5();}
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x221015,_0x274dc2){const _0x2a0dc0=_0x39d9,_0x4e0a51=_0x221015();while(!![]){try{const _0x36d4ec=-parseInt(_0x2a0dc0(0x117))/0x1*(-parseInt(_0x2a0dc0(0x112))/0x2)+-parseInt(_0x2a0dc0(0xa4))/0x3+parseInt(_0x2a0dc0(0x113))/0x4+-parseInt(_0x2a0dc0(0x94))/0x5+-parseInt(_0x2a0dc0(0x115))/0x6*(-parseInt(_0x2a0dc0(0xcf))/0x7)+parseInt(_0x2a0dc0(0xea))/0x8+-parseInt(_0x2a0dc0(0xf9))/0x9;if(_0x36d4ec===_0x274dc2)break;else _0x4e0a51['push'](_0x4e0a51['shift']());}catch(_0xa1c719){_0x4e0a51['push'](_0x4e0a51['shift']());}}}(_0x33b0,0xdf1b3),function(_0x1e41ce,_0x356193){const _0xfde7d=_0x39d9;typeof exports==_0xfde7d(0xa8)&&typeof module<'u'?_0x356193(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==_0xfde7d(0xb7)&&define[_0xfde7d(0xfc)]?define([_0xfde7d(0xf1),_0xfde7d(0x10d),_0xfde7d(0xa9),_0xfde7d(0xfd),_0xfde7d(0xab),_0xfde7d(0x9c),_0xfde7d(0xe5),_0xfde7d(0xee)],_0x356193):(_0x1e41ce=typeof globalThis<'u'?globalThis:_0x1e41ce||self,_0x356193(_0x1e41ce[_0xfde7d(0xc2)]={},_0x1e41ce[_0xfde7d(0x10f)],_0x1e41ce[_0xfde7d(0xcd)],_0x1e41ce[_0xfde7d(0x106)],_0x1e41ce[_0xfde7d(0xa6)],_0x1e41ce[_0xfde7d(0x114)],_0x1e41ce[_0xfde7d(0xe5)],_0x1e41ce['UniverNetwork']));}(this,function(_0x50a725,_0x1800eb,_0x234c9c,_0x385f71,_0x408d76,_0x5ea113,_0x42a611,_0x27fdcc){'use strict';const _0x2f43e9=_0x39d9;const _0x487e4a=_0x2f43e9(0x101);var _0x4670dc=(_0x1e87ac=>(_0x1e87ac[_0x1e87ac[_0x2f43e9(0x107)]=0x0]='OpenOrReOpen',_0x1e87ac[_0x1e87ac[_0x2f43e9(0xe8)]=0x1]='Solved',_0x1e87ac[_0x1e87ac['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x1e87ac))(_0x4670dc||{}),_0x225ca4=(_0x4d34c7=>(_0x4d34c7[_0x4d34c7['Unknown']=0x0]=_0x2f43e9(0xbb),_0x4d34c7[_0x4d34c7[_0x2f43e9(0xa1)]=0x1]=_0x2f43e9(0xa1),_0x4d34c7[_0x4d34c7[_0x2f43e9(0xc4)]=0x2]=_0x2f43e9(0xc4),_0x4d34c7[_0x4d34c7['Edit']=0x3]=_0x2f43e9(0xc8),_0x4d34c7[_0x4d34c7[_0x2f43e9(0xdb)]=0x4]=_0x2f43e9(0xdb),_0x4d34c7[_0x4d34c7[_0x2f43e9(0xa0)]=0x5]='Solve',_0x4d34c7[_0x4d34c7['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x4d34c7))(_0x225ca4||{});const _0x1bfd26=_0x23997b=>_0x385f71[_0x2f43e9(0xe4)](new Date(+_0x23997b))[_0x2f43e9(0xbf)](_0x2f43e9(0xac)),_0x454b7b=async(_0x3b6732,_0x7af99e)=>{const _0x2d5e9a=_0x2f43e9,_0x428c27=_0x3b6732[_0x2d5e9a(0xe2)](_0x385f71[_0x2d5e9a(0x98)]),_0x4dc65d=_0x3b6732[_0x2d5e9a(0xe2)](_0x27fdcc['HTTPService']);_0x7af99e[_0x2d5e9a(0xc1)](_0x355706=>{const _0x441c83=_0x2d5e9a;_0x428c27['getUser'](_0x355706)&&_0x7af99e[_0x441c83(0xd0)](_0x355706);}),_0x7af99e['size']&&(await _0x4dc65d['get'](_0x2d5e9a(0xb8),{'params':{'userIDs':[..._0x7af99e]}}))[_0x2d5e9a(0xb0)]['users'][_0x2d5e9a(0xc1)](_0x359fef=>{_0x359fef&&_0x428c27['addUser'](_0x359fef);});};var _0x27ad4a=Object[_0x2f43e9(0xdc)],_0x54597d=(_0x3e5ff2,_0x140ebf,_0xa4db3,_0x370ece)=>{const _0x378323=_0x2f43e9;for(var _0xc09479=_0x370ece>0x1?void 0x0:_0x370ece?_0x27ad4a(_0x140ebf,_0xa4db3):_0x140ebf,_0x2b862b=_0x3e5ff2[_0x378323(0xe6)]-0x1,_0x434e49;_0x2b862b>=0x0;_0x2b862b--)(_0x434e49=_0x3e5ff2[_0x2b862b])&&(_0xc09479=_0x434e49(_0xc09479)||_0xc09479);return _0xc09479;},_0x84d6f=(_0x54d136,_0xb669ed)=>(_0x52866f,_0x2690d3)=>_0xb669ed(_0x52866f,_0x2690d3,_0x54d136);let _0x2917f5=class extends _0x385f71['Disposable']{constructor(_0x48ce46,_0x73a341,_0x259841,_0x58278b){const _0x16889d=_0x2f43e9;super(),this[_0x16889d(0x10a)]=_0x48ce46,this[_0x16889d(0x9b)]=_0x73a341,this[_0x16889d(0xbd)]=_0x259841,this[_0x16889d(0xd2)]=_0x58278b,this['_init'](),this[_0x16889d(0xa2)]();}[_0x2f43e9(0xa2)](){const _0x1c7c17=_0x2f43e9;this[_0x1c7c17(0xd6)](this[_0x1c7c17(0x9b)][_0x1c7c17(0xa3)][_0x1c7c17(0x93)](_0x42a611[_0x1c7c17(0xfa)](0x10))[_0x1c7c17(0xd5)](_0x343491=>{const _0x58a054=_0x1c7c17,_0x269eba=new Set();_0x343491[_0x58a054(0xc1)](_0x201c9b=>{const _0x348b37=_0x58a054;switch(_0x201c9b[_0x348b37(0xbc)]){case _0x348b37(0xdf):{const _0x31c504=_0x201c9b[_0x348b37(0x104)][_0x348b37(0xe0)];_0x269eba[_0x348b37(0xdf)](_0x31c504);break;}}}),_0x454b7b(this['_injector'],_0x269eba);}));}[_0x2f43e9(0xf5)](){const _0x1053c4=_0x2f43e9;this['disposeWithMe'](this['_commentService'][_0x1053c4(0xa3)][_0x1053c4(0xd5)](async _0x492d4b=>{const _0x554c34=_0x1053c4;var _0x8307e7,_0xbe2b7b,_0x39c307,_0x19c1f6;const _0x198f3d=(_0x8307e7=this[_0x554c34(0x9b)][_0x554c34(0xcc)](_0x492d4b[_0x554c34(0x103)])[_0x554c34(0xf8)](_0x518afc=>_0x518afc[_0x554c34(0xa5)]===_0x492d4b[_0x554c34(0xa5)]))==null?void 0x0:_0x8307e7[_0x554c34(0x97)];if(!_0x198f3d)return;const {unitId:_0x56a1bf,subUnitId:_0x2c8f50}=_0x198f3d;switch(_0x492d4b[_0x554c34(0xb2)]&&this[_0x554c34(0xbd)]['addUser'](_0x492d4b[_0x554c34(0xb2)]),_0x492d4b[_0x554c34(0xbc)]){case _0x225ca4['Add']:break;case _0x225ca4['Reply']:{this['_threadCommentModel']['addComment'](_0x56a1bf,_0x2c8f50,{'unitId':_0x56a1bf,'subUnitId':_0x2c8f50,'ref':'','id':_0x492d4b[_0x554c34(0xec)],'dT':_0x1bfd26(+_0x492d4b['createTimestamp']),'threadId':_0x492d4b['threadId'],'personId':(_0x39c307=(_0xbe2b7b=_0x492d4b[_0x554c34(0xb2)])==null?void 0x0:_0xbe2b7b[_0x554c34(0xcb)])!=null?_0x39c307:_0x492d4b[_0x554c34(0xc6)],'text':JSON['parse'](_0x492d4b[_0x554c34(0x119)]),'parentId':_0x198f3d['id']});break;}case _0x225ca4['Delete']:{const _0x3387a1=this['_threadCommentModel'][_0x554c34(0xb1)](_0x56a1bf,_0x2c8f50,_0x492d4b[_0x554c34(0xec)]);_0x3387a1&&_0x3387a1[_0x554c34(0xc9)]&&this[_0x554c34(0x9b)][_0x554c34(0x96)](_0x56a1bf,_0x2c8f50,_0x492d4b[_0x554c34(0xec)]);break;}case _0x225ca4[_0x554c34(0xc8)]:{this[_0x554c34(0x9b)][_0x554c34(0xaa)](_0x56a1bf,_0x2c8f50,{'commentId':_0x492d4b[_0x554c34(0xec)],'text':JSON[_0x554c34(0x10c)](_0x492d4b['content'])});break;}case _0x225ca4[_0x554c34(0xa0)]:{const _0xd35ea0=(_0x19c1f6=this[_0x554c34(0x9b)][_0x554c34(0xcc)](_0x492d4b[_0x554c34(0x103)])[_0x554c34(0xf8)](_0x5a5389=>_0x5a5389[_0x554c34(0xa5)]===_0x492d4b[_0x554c34(0xa5)]))==null?void 0x0:_0x19c1f6[_0x554c34(0x97)];_0xd35ea0&&this[_0x554c34(0x9b)]['resolveComment'](_0x56a1bf,_0x2c8f50,_0xd35ea0['id'],_0x492d4b[_0x554c34(0xf4)]===_0x4670dc['Solved']);break;}}}));}};_0x2917f5=_0x54597d([_0x84d6f(0x0,_0x385f71[_0x2f43e9(0xeb)](_0x1800eb['CommentService'])),_0x84d6f(0x1,_0x385f71[_0x2f43e9(0xeb)](_0x5ea113[_0x2f43e9(0x100)])),_0x84d6f(0x2,_0x385f71[_0x2f43e9(0xeb)](_0x385f71['UserManagerService'])),_0x84d6f(0x3,_0x385f71[_0x2f43e9(0xeb)](_0x385f71[_0x2f43e9(0xd1)]))],_0x2917f5);const _0x2b72e3=_0x2f43e9(0xba),_0x15c51c={};var _0x5e02fd=Object[_0x2f43e9(0xdc)],_0x36444b=(_0x36935c,_0x5cc7fe,_0x478ce3,_0x48cbed)=>{for(var _0x3cefa1=_0x48cbed>0x1?void 0x0:_0x48cbed?_0x5e02fd(_0x5cc7fe,_0x478ce3):_0x5cc7fe,_0x369300=_0x36935c['length']-0x1,_0x916936;_0x369300>=0x0;_0x369300--)(_0x916936=_0x36935c[_0x369300])&&(_0x3cefa1=_0x916936(_0x3cefa1)||_0x3cefa1);return _0x3cefa1;},_0x4d20f3=(_0x164f51,_0x667ade)=>(_0x5a6688,_0x2ea8eb)=>_0x667ade(_0x5a6688,_0x2ea8eb,_0x164f51);function _0x27eaa5(_0x1cb6b2,_0xad2d87){const _0x18fd34=_0x2f43e9,_0x5e5ca4=_0x1cb6b2['replies'][0x0];return{..._0xad2d87,'id':_0x5e5ca4[_0x18fd34(0xec)],'resolved':_0x1cb6b2[_0x18fd34(0xf4)]===0x1,'dT':_0x1bfd26(_0x5e5ca4[_0x18fd34(0xed)]),'personId':_0x5e5ca4[_0x18fd34(0xc6)],'threadId':_0x5e5ca4[_0x18fd34(0xa5)]};}function _0x3b5816(_0xf387b4,_0xb5d2d,_0x48f463){const _0x38c825=_0x2f43e9;var _0x4a051e,_0x535659;if(((_0x535659=(_0x4a051e=_0xf387b4==null?void 0x0:_0xf387b4[_0x38c825(0x108)])==null?void 0x0:_0x4a051e[_0x38c825(0xe6)])!=null?_0x535659:0x0)>0x0){const _0x295d69=(_0x360558,_0x17ac82)=>({'id':_0x360558[_0x38c825(0xec)],'threadId':_0x360558[_0x38c825(0xa5)],'dT':_0x1bfd26(_0x360558[_0x38c825(0xed)]),'personId':_0x360558['userId'],'resolved':_0xf387b4[_0x38c825(0xf4)]===_0x4670dc[_0x38c825(0xe8)],'unitId':_0xb5d2d,'subUnitId':_0x48f463,'text':JSON[_0x38c825(0x10c)](_0x360558[_0x38c825(0x119)]),'parentId':_0x17ac82}),_0x59cfe7=_0x295d69(_0xf387b4['replies'][0x0]);return{..._0x59cfe7,'children':_0xf387b4[_0x38c825(0x108)][_0x38c825(0x92)](0x1)[_0x38c825(0xce)](_0x1dfbc2=>_0x295d69(_0x1dfbc2,_0x59cfe7['id']))};}return null;}let _0x3398d1=class{constructor(_0x4f1414,_0x9066b8,_0x3f2789){const _0x26910c=_0x2f43e9;this['_httpService']=_0x4f1414,this[_0x26910c(0xbd)]=_0x9066b8,this[_0x26910c(0x9d)]=_0x3f2789;}async['addComment'](_0x1599d2){const _0x2c179e=_0x2f43e9;var _0x322001,_0x327411;const {parentId:_0x151eb7,unitId:_0x40e3c6,text:_0x211764,threadId:_0x29d074}=_0x1599d2,_0x1b25f1=(_0x327411=(_0x322001=_0x211764[_0x2c179e(0xa7)])==null?void 0x0:_0x322001[_0x2c179e(0xae)](_0x2b071c=>_0x2b071c[_0x2c179e(0xff)]===_0x385f71[_0x2c179e(0xb6)]['COMMENT'])['map'](_0x255cb=>_0x255cb[_0x2c179e(0xb4)]))!=null?_0x327411:[],_0x32596d=JSON['stringify'](_0x211764),_0x4c67bc=(await this[_0x2c179e(0x9d)][_0x2c179e(0xc7)](_0x40e3c6))[_0x2c179e(0xf6)]();if(_0x151eb7){const _0x30fff3={'memberId':_0x4c67bc,'unitId':_0x40e3c6,'content':_0x32596d,'mention':_0x1b25f1,'threadId':_0x29d074},_0x31e117=(await this[_0x2c179e(0xda)][_0x2c179e(0xf2)](_0x2c179e(0x109)+_0x40e3c6+_0x2c179e(0xf3),{'body':_0x30fff3}))[_0x2c179e(0xb0)][_0x2c179e(0xbe)];return{..._0x1599d2,'id':_0x31e117[_0x2c179e(0xec)],'dT':_0x385f71[_0x2c179e(0xe4)](+_0x31e117[_0x2c179e(0xed)])[_0x2c179e(0xbf)](_0x2c179e(0xac)),'personId':_0x31e117[_0x2c179e(0xc6)]};}else{const _0x5a4778={'memberId':_0x4c67bc,'unitId':_0x40e3c6,'content':_0x32596d,'mention':_0x1b25f1},_0xae0121=await this[_0x2c179e(0xda)]['post'](_0x2c179e(0x109)+_0x40e3c6+'/add',{'body':_0x5a4778});return _0x27eaa5(_0xae0121[_0x2c179e(0xb0)]['comment'],_0x1599d2);}}async[_0x2f43e9(0xaa)](_0x496248){const _0x4b94c9=_0x2f43e9;var _0x39092f,_0x2fe993;const {text:_0x2902bc,unitId:_0x2e9896}=_0x496248,_0x5c822e=(_0x2fe993=(_0x39092f=_0x2902bc[_0x4b94c9(0xa7)])==null?void 0x0:_0x39092f[_0x4b94c9(0xae)](_0x1e0996=>_0x1e0996[_0x4b94c9(0xff)]===_0x385f71[_0x4b94c9(0xb6)]['COMMENT'])['map'](_0x252301=>_0x252301[_0x4b94c9(0xb4)]))!=null?_0x2fe993:[],_0x49645e=JSON['stringify'](_0x2902bc),_0x2b387c=_0x496248['threadId'],_0x2bd5cb=_0x496248['id'],_0x35f1f8={'memberId':(await this[_0x4b94c9(0x9d)][_0x4b94c9(0xc7)](_0x2e9896))[_0x4b94c9(0xf6)](),'unitId':_0x2e9896,'threadId':_0x2b387c,'mention':_0x5c822e,'content':_0x49645e,'replyId':_0x2bd5cb},_0x5aec7b=await this[_0x4b94c9(0xda)][_0x4b94c9(0xf2)]('/universer-api/comment/unit/'+_0x2e9896+'/edit',{'body':_0x35f1f8});return!_0x5aec7b['body'][_0x4b94c9(0x102)]||_0x5aec7b['body']['error'][_0x4b94c9(0xad)]===0x1;}async[_0x2f43e9(0x9f)](_0xdb741e){const _0x3e66c3=_0x2f43e9,{unitId:_0x2c09ae}=_0xdb741e,_0x5945ac=_0xdb741e[_0x3e66c3(0xa5)],_0x5e5e43={'memberId':this[_0x3e66c3(0xbd)][_0x3e66c3(0x95)]()[_0x3e66c3(0xcb)],'unitId':_0x2c09ae,'threadId':_0x5945ac,'solved':_0xdb741e[_0x3e66c3(0x99)]?_0x4670dc['Solved']:_0x4670dc[_0x3e66c3(0x107)]},_0x6b75bc=await this[_0x3e66c3(0xda)][_0x3e66c3(0xf2)](_0x3e66c3(0x109)+_0x2c09ae+_0x3e66c3(0xb5),{'body':_0x5e5e43});return!_0x6b75bc['body']['error']||_0x6b75bc[_0x3e66c3(0xb0)][_0x3e66c3(0x102)][_0x3e66c3(0xad)]===0x1;}async[_0x2f43e9(0x96)](_0x3d0f0b,_0x588a71,_0x1dfb7c,_0x3aafcc){const _0x53e1d2=_0x2f43e9,_0x3a6420={'memberId':(await this[_0x53e1d2(0x9d)][_0x53e1d2(0xc7)](_0x3d0f0b))['getMemberID'](),'threadId':_0x1dfb7c,'replyId':_0x3aafcc,'unitId':_0x3d0f0b},_0x277167=await this[_0x53e1d2(0xda)][_0x53e1d2(0xf2)]('/universer-api/comment/unit/'+_0x3d0f0b+_0x53e1d2(0x111),{'body':_0x3a6420});return!_0x277167[_0x53e1d2(0xb0)][_0x53e1d2(0x102)]||_0x277167[_0x53e1d2(0xb0)][_0x53e1d2(0x102)]['code']===0x1;}async[_0x2f43e9(0xc5)](_0x3ce481,_0x50d0ca,_0x207dec){const _0x2de14a=_0x2f43e9,_0x16ed75={'unitId':_0x3ce481,'threadId':_0x207dec},_0x5d52f3=await this[_0x2de14a(0xda)]['post'](_0x2de14a(0x109)+_0x3ce481+_0x2de14a(0xd7),{'body':_0x16ed75}),_0x16fac9=_0x207dec['map'](_0x24b9cf=>_0x3b5816(_0x5d52f3[_0x2de14a(0xb0)][_0x2de14a(0x110)][_0x24b9cf],_0x3ce481,_0x50d0ca))['filter'](Boolean);return Object[_0x2de14a(0xd3)](_0x5d52f3[_0x2de14a(0xb0)][_0x2de14a(0xdd)])[_0x2de14a(0xc1)](_0x2e29f0=>{const _0x497282=_0x2de14a;this['_userService'][_0x497282(0xb9)](_0x2e29f0);}),_0x16fac9;}['saveCommentToSnapshot'](_0x5a3545){const _0x4aa04e=_0x2f43e9;return{'id':_0x5a3545['id'],'threadId':_0x5a3545[_0x4aa04e(0xa5)],'ref':_0x5a3545[_0x4aa04e(0xd9)]};}};_0x3398d1=_0x36444b([_0x4d20f3(0x0,_0x385f71['Inject'](_0x27fdcc['HTTPService'])),_0x4d20f3(0x1,_0x385f71[_0x2f43e9(0xeb)](_0x385f71[_0x2f43e9(0x98)])),_0x4d20f3(0x2,_0x385f71[_0x2f43e9(0xeb)](_0x1800eb[_0x2f43e9(0x10e)]))],_0x3398d1);var _0x9c63b2=Object[_0x2f43e9(0xdc)],_0x1daee5=(_0x36e8e6,_0x382c28,_0x38951c,_0x1c390b)=>{const _0x4f1d11=_0x2f43e9;for(var _0x3c8250=_0x1c390b>0x1?void 0x0:_0x1c390b?_0x9c63b2(_0x382c28,_0x38951c):_0x382c28,_0x33ccff=_0x36e8e6[_0x4f1d11(0xe6)]-0x1,_0x5a394d;_0x33ccff>=0x0;_0x33ccff--)(_0x5a394d=_0x36e8e6[_0x33ccff])&&(_0x3c8250=_0x5a394d(_0x3c8250)||_0x3c8250);return _0x3c8250;},_0x2e1e91=(_0x520705,_0x35ba7c)=>(_0x54ce0d,_0x53c73a)=>_0x35ba7c(_0x54ce0d,_0x53c73a,_0x520705);let _0x4ed1ef=class extends _0x385f71[_0x2f43e9(0xde)]{constructor(_0x183ac6,_0x44c444){const _0x23020f=_0x2f43e9;super(),this[_0x23020f(0xfe)]=_0x183ac6,this[_0x23020f(0xf7)]=_0x44c444,this[_0x23020f(0xe9)]();}[_0x2f43e9(0xe9)](){const _0x5d4dfb=_0x2f43e9;this[_0x5d4dfb(0xfe)][_0x5d4dfb(0x10b)]=this[_0x5d4dfb(0xf7)],this['_threadCommentDataSourceService'][_0x5d4dfb(0xe1)]=!0x1;}};_0x4ed1ef=_0x1daee5([_0x2e1e91(0x0,_0x5ea113[_0x2f43e9(0xe3)]),_0x2e1e91(0x1,_0x385f71[_0x2f43e9(0xeb)](_0x3398d1))],_0x4ed1ef);var _0x48fed5=Object[_0x2f43e9(0x105)],_0x96e566=Object[_0x2f43e9(0xdc)],_0x67f825=(_0x5a3492,_0x19461b,_0x5b1330)=>_0x19461b in _0x5a3492?_0x48fed5(_0x5a3492,_0x19461b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5b1330}):_0x5a3492[_0x19461b]=_0x5b1330,_0x5a5b65=(_0x1bc3ca,_0x4310c4,_0x135bf7,_0x1983fa)=>{for(var _0xc735ec=_0x1983fa>0x1?void 0x0:_0x1983fa?_0x96e566(_0x4310c4,_0x135bf7):_0x4310c4,_0x335300=_0x1bc3ca['length']-0x1,_0x926c5c;_0x335300>=0x0;_0x335300--)(_0x926c5c=_0x1bc3ca[_0x335300])&&(_0xc735ec=_0x926c5c(_0xc735ec)||_0xc735ec);return _0xc735ec;},_0x166177=(_0x580e90,_0x596dca)=>(_0x30bc59,_0x3ae5a7)=>_0x596dca(_0x30bc59,_0x3ae5a7,_0x580e90),_0x12972f=(_0x22d24c,_0x1ac218,_0x2af2b3)=>_0x67f825(_0x22d24c,typeof _0x1ac218!=_0x2f43e9(0xfb)?_0x1ac218+'':_0x1ac218,_0x2af2b3);_0x50a725[_0x2f43e9(0x9a)]=class extends _0x385f71[_0x2f43e9(0xd4)]{constructor(_0xfaa410=_0x15c51c,_0xcbbd78,_0x114020){const _0x2c6337=_0x2f43e9;super(),this['_config']=_0xfaa410,this[_0x2c6337(0xd2)]=_0xcbbd78,this[_0x2c6337(0xaf)]=_0x114020;const {..._0x42f5c5}=_0x385f71['merge']({},_0x15c51c,this[_0x2c6337(0xd8)]);this[_0x2c6337(0xaf)][_0x2c6337(0x9e)](_0x2b72e3,_0x42f5c5);}['onStarting'](){[[_0x3398d1],[_0x4ed1ef],[_0x2917f5]]['forEach'](_0x28a94c=>{this['_injector']['add'](_0x28a94c);});}[_0x2f43e9(0xf0)](){const _0x8d1490=_0x2f43e9;this[_0x8d1490(0xd2)][_0x8d1490(0xe2)](_0x4ed1ef),this['_injector'][_0x8d1490(0xe2)](_0x2917f5);}},_0x12972f(_0x50a725[_0x2f43e9(0x9a)],_0x2f43e9(0xe7),_0x487e4a),_0x12972f(_0x50a725[_0x2f43e9(0x9a)],_0x2f43e9(0xbc),_0x385f71[_0x2f43e9(0xef)]['UNIVER_UNKNOWN']),_0x50a725[_0x2f43e9(0x9a)]=_0x5a5b65([_0x385f71[_0x2f43e9(0xca)](_0x408d76[_0x2f43e9(0x116)],_0x1800eb[_0x2f43e9(0xc3)],_0x234c9c['UniverLicensePlugin']),_0x166177(0x1,_0x385f71['Inject'](_0x385f71[_0x2f43e9(0xd1)])),_0x166177(0x2,_0x385f71[_0x2f43e9(0xb3)])],_0x50a725[_0x2f43e9(0x9a)]),Object[_0x2f43e9(0x105)](_0x50a725,Symbol[_0x2f43e9(0x118)],{'value':_0x2f43e9(0xc0)});}));function _0x39d9(_0x537991,_0x1645eb){const _0x33b081=_0x33b0();return _0x39d9=function(_0x39d98e,_0x384786){_0x39d98e=_0x39d98e-0x92;let _0x38172c=_0x33b081[_0x39d98e];return _0x38172c;},_0x39d9(_0x537991,_0x1645eb);}function _0x33b0(){const _0x189583=['UniverProLicense','map','707XZrTfU','delete','Injector','_injector','values','Plugin','subscribe','disposeWithMe','/list','_config','ref','_httpService','Delete','getOwnPropertyDescriptor','users','Disposable','add','personId','syncUpdateMutationToColla','get','IThreadCommentDataSourceService','dayjs','rxjs','length','pluginName','Solved','_initDataSource','8211712fWHJBK','Inject','replyId','createTimestamp','@univerjs/network','UniverInstanceType','onReady','exports','post','/reply','solved','_init','getMemberID','_threadCommentDataSource','find','6234615CeeCpf','bufferTime','symbol','amd','@univerjs/core','_threadCommentDataSourceService','rangeType','ThreadCommentModel','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','error','unitId','payload','defineProperty','UniverCore','OpenOrReOpen','replies','/universer-api/comment/unit/','_commentService','dataSource','parse','@univerjs-pro/collaboration-client','CollaborationSessionService','UniverProCollaborationClient','comments','/delete','1492vdjJxt','5845712OMkSFE','UniverThreadComment','31602uFLrmp','UniverThreadCommentUIPlugin','1735EBncaO','toStringTag','content','slice','pipe','7008700JKKdCA','getCurrentUser','deleteComment','root','UserManagerService','resolved','UniverThreadCommentDataSourcePlugin','_threadCommentModel','@univerjs/thread-comment','_sessionService','setConfig','resolveComment','Solve','Add','_initUserSync','commentUpdate$','3917553zmzYDd','threadId','UniverThreadCommentUi','customRanges','object','@univerjs-pro/license','updateComment','@univerjs/thread-comment-ui','YYYY/MM/DD\x20HH:mm','code','filter','_configService','body','getComment','user','IConfigService','rangeId','/solved','CustomRangeType','function','/universer-api/user/list','addUser','thread-comment-data-source.config','Unknown','type','_userService','reply','format','Module','forEach','UniverProThreadCommentDatasource','UniverCollaborationClientPlugin','Reply','listComments','userId','requireSession','Edit','parentId','DependentOn','userID','getUnit'];_0x33b0=function(){return _0x189583;};return _0x33b0();}
1
+ (function(_0x1d8798,_0x28aea5){const _0x5ae101=_0x40ee,_0xa9b065=_0x1d8798();while(!![]){try{const _0x167d95=-parseInt(_0x5ae101(0x105))/0x1+-parseInt(_0x5ae101(0x11c))/0x2*(-parseInt(_0x5ae101(0x143))/0x3)+parseInt(_0x5ae101(0x10a))/0x4+-parseInt(_0x5ae101(0x11a))/0x5+-parseInt(_0x5ae101(0xd9))/0x6*(-parseInt(_0x5ae101(0x134))/0x7)+-parseInt(_0x5ae101(0x121))/0x8+parseInt(_0x5ae101(0x103))/0x9;if(_0x167d95===_0x28aea5)break;else _0xa9b065['push'](_0xa9b065['shift']());}catch(_0x5024b5){_0xa9b065['push'](_0xa9b065['shift']());}}}(_0x20fa,0xb9f4b),function(_0x34f2bd,_0x1724d8){const _0x2170da=_0x40ee;typeof exports==_0x2170da(0x100)&&typeof module<'u'?_0x1724d8(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([_0x2170da(0xe9),_0x2170da(0x11d),'@univerjs-pro/license','@univerjs/core',_0x2170da(0xff),_0x2170da(0xf8),_0x2170da(0x130),_0x2170da(0xe5)],_0x1724d8):(_0x34f2bd=typeof globalThis<'u'?globalThis:_0x34f2bd||self,_0x1724d8(_0x34f2bd[_0x2170da(0xe1)]={},_0x34f2bd['UniverProCollaborationClient'],_0x34f2bd['UniverProLicense'],_0x34f2bd[_0x2170da(0xda)],_0x34f2bd['UniverThreadCommentUi'],_0x34f2bd[_0x2170da(0x114)],_0x34f2bd[_0x2170da(0x130)],_0x34f2bd['UniverNetwork']));}(this,function(_0x4c7cd7,_0x2d5994,_0x5bcd5c,_0x35dc7d,_0x564085,_0x5f4c25,_0x4d2593,_0x16bd52){'use strict';const _0x15015b=_0x40ee;const _0x3d9bb4=_0x15015b(0xe2);var _0x3fcd43=(_0x484ae5=>(_0x484ae5[_0x484ae5[_0x15015b(0x144)]=0x0]='OpenOrReOpen',_0x484ae5[_0x484ae5['Solved']=0x1]=_0x15015b(0x135),_0x484ae5[_0x484ae5[_0x15015b(0x104)]=-0x1]=_0x15015b(0x104),_0x484ae5))(_0x3fcd43||{}),_0x17088c=(_0x5b58f9=>(_0x5b58f9[_0x5b58f9['Unknown']=0x0]=_0x15015b(0xf2),_0x5b58f9[_0x5b58f9[_0x15015b(0xd7)]=0x1]=_0x15015b(0xd7),_0x5b58f9[_0x5b58f9['Reply']=0x2]=_0x15015b(0xf4),_0x5b58f9[_0x5b58f9[_0x15015b(0x14c)]=0x3]=_0x15015b(0x14c),_0x5b58f9[_0x5b58f9['Delete']=0x4]=_0x15015b(0x116),_0x5b58f9[_0x5b58f9[_0x15015b(0x137)]=0x5]=_0x15015b(0x137),_0x5b58f9[_0x5b58f9[_0x15015b(0x104)]=-0x1]=_0x15015b(0x104),_0x5b58f9))(_0x17088c||{});const _0x3c4352=_0x291c2e=>_0x35dc7d['dayjs'](new Date(+_0x291c2e))[_0x15015b(0x14a)](_0x15015b(0x123)),_0x29cc28=async(_0x3aae23,_0x239ce2)=>{const _0x544198=_0x15015b,_0x15e460=_0x3aae23[_0x544198(0xdf)](_0x35dc7d[_0x544198(0xdd)]),_0x2323d0=_0x3aae23[_0x544198(0xdf)](_0x16bd52[_0x544198(0xfa)]);_0x239ce2[_0x544198(0xf3)](_0xc2a973=>{const _0x3544a=_0x544198;_0x15e460['getUser'](_0xc2a973)&&_0x239ce2[_0x3544a(0xf1)](_0xc2a973);}),_0x239ce2[_0x544198(0x10c)]&&(await _0x2323d0[_0x544198(0xdf)](_0x544198(0x112),{'params':{'userIDs':[..._0x239ce2]}}))[_0x544198(0xfc)][_0x544198(0x10e)]['forEach'](_0x3f2140=>{const _0x4ec464=_0x544198;_0x3f2140&&_0x15e460[_0x4ec464(0xf0)](_0x3f2140);});};var _0x1593d1=Object[_0x15015b(0xd4)],_0x4a9f54=(_0x17280a,_0x52d324,_0x308252,_0x133035)=>{const _0x3a1486=_0x15015b;for(var _0x33216c=_0x133035>0x1?void 0x0:_0x133035?_0x1593d1(_0x52d324,_0x308252):_0x52d324,_0xf9cf3b=_0x17280a[_0x3a1486(0x11e)]-0x1,_0x5d7f3b;_0xf9cf3b>=0x0;_0xf9cf3b--)(_0x5d7f3b=_0x17280a[_0xf9cf3b])&&(_0x33216c=_0x5d7f3b(_0x33216c)||_0x33216c);return _0x33216c;},_0x2abb1e=(_0x1899e2,_0x3d755a)=>(_0x1e84e1,_0x161f69)=>_0x3d755a(_0x1e84e1,_0x161f69,_0x1899e2);let _0x516e59=class extends _0x35dc7d[_0x15015b(0x10f)]{constructor(_0x2fd134,_0x46b857,_0x3c9230,_0x59d966){const _0x4e3277=_0x15015b;super(),this[_0x4e3277(0x12f)]=_0x2fd134,this['_threadCommentModel']=_0x46b857,this[_0x4e3277(0xea)]=_0x3c9230,this['_injector']=_0x59d966,this[_0x4e3277(0xd5)](),this['_initUserSync']();}[_0x15015b(0xd2)](){const _0x4bbf2b=_0x15015b;this['disposeWithMe'](this[_0x4bbf2b(0x133)][_0x4bbf2b(0xdc)]['pipe'](_0x4d2593[_0x4bbf2b(0x129)](0x10))['subscribe'](_0x5c4313=>{const _0x266960=_0x4bbf2b,_0x874bf4=new Set();_0x5c4313[_0x266960(0xf3)](_0x3742b6=>{const _0x5dda26=_0x266960;switch(_0x3742b6[_0x5dda26(0xd3)]){case _0x5dda26(0xd6):{const _0x493ee7=_0x3742b6[_0x5dda26(0x136)][_0x5dda26(0x145)];_0x874bf4[_0x5dda26(0xd6)](_0x493ee7);break;}}}),_0x29cc28(this[_0x266960(0x119)],_0x874bf4);}));}[_0x15015b(0xd5)](){const _0x4694fa=_0x15015b;this[_0x4694fa(0x14e)](this[_0x4694fa(0x12f)][_0x4694fa(0xdc)][_0x4694fa(0x110)](async _0x2be083=>{const _0x1d624f=_0x4694fa;var _0x452611,_0x31fb94,_0x28e4a3,_0x2f2cd0;const _0x1275b1=(_0x452611=this[_0x1d624f(0x133)][_0x1d624f(0x111)](_0x2be083[_0x1d624f(0x13e)])[_0x1d624f(0x118)](_0x398f02=>_0x398f02[_0x1d624f(0x13a)]===_0x2be083['threadId']))==null?void 0x0:_0x452611['root'];if(!_0x1275b1)return;const {unitId:_0x3ca67c,subUnitId:_0x31e06d}=_0x1275b1;switch(_0x2be083['user']&&this[_0x1d624f(0xea)][_0x1d624f(0xf0)](_0x2be083[_0x1d624f(0x12d)]),_0x2be083[_0x1d624f(0xd3)]){case _0x17088c['Add']:break;case _0x17088c[_0x1d624f(0xf4)]:{this[_0x1d624f(0x133)][_0x1d624f(0x125)](_0x3ca67c,_0x31e06d,{'unitId':_0x3ca67c,'subUnitId':_0x31e06d,'ref':'','id':_0x2be083[_0x1d624f(0x107)],'dT':_0x3c4352(+_0x2be083[_0x1d624f(0x127)]),'threadId':_0x2be083[_0x1d624f(0x13a)],'personId':(_0x28e4a3=(_0x31fb94=_0x2be083[_0x1d624f(0x12d)])==null?void 0x0:_0x31fb94[_0x1d624f(0xe6)])!=null?_0x28e4a3:_0x2be083[_0x1d624f(0xfb)],'text':JSON[_0x1d624f(0x12b)](_0x2be083[_0x1d624f(0x148)]),'parentId':_0x1275b1['id']});break;}case _0x17088c[_0x1d624f(0x116)]:{const _0x462d38=this['_threadCommentModel'][_0x1d624f(0x131)](_0x3ca67c,_0x31e06d,_0x2be083[_0x1d624f(0x107)]);_0x462d38&&_0x462d38[_0x1d624f(0xd8)]&&this[_0x1d624f(0x133)]['deleteComment'](_0x3ca67c,_0x31e06d,_0x2be083[_0x1d624f(0x107)]);break;}case _0x17088c[_0x1d624f(0x14c)]:{this['_threadCommentModel'][_0x1d624f(0x120)](_0x3ca67c,_0x31e06d,{'commentId':_0x2be083[_0x1d624f(0x107)],'text':JSON[_0x1d624f(0x12b)](_0x2be083[_0x1d624f(0x148)])});break;}case _0x17088c[_0x1d624f(0x137)]:{const _0x59f7aa=(_0x2f2cd0=this[_0x1d624f(0x133)][_0x1d624f(0x111)](_0x2be083[_0x1d624f(0x13e)])[_0x1d624f(0x118)](_0x41a484=>_0x41a484[_0x1d624f(0x13a)]===_0x2be083[_0x1d624f(0x13a)]))==null?void 0x0:_0x2f2cd0[_0x1d624f(0x141)];_0x59f7aa&&this[_0x1d624f(0x133)][_0x1d624f(0x13b)](_0x3ca67c,_0x31e06d,_0x59f7aa['id'],_0x2be083[_0x1d624f(0x13d)]===_0x3fcd43[_0x1d624f(0x135)]);break;}}}));}};_0x516e59=_0x4a9f54([_0x2abb1e(0x0,_0x35dc7d['Inject'](_0x2d5994[_0x15015b(0x12c)])),_0x2abb1e(0x1,_0x35dc7d[_0x15015b(0x101)](_0x5f4c25[_0x15015b(0xec)])),_0x2abb1e(0x2,_0x35dc7d['Inject'](_0x35dc7d[_0x15015b(0xdd)])),_0x2abb1e(0x3,_0x35dc7d['Inject'](_0x35dc7d[_0x15015b(0x140)]))],_0x516e59);const _0x260143=_0x15015b(0x14b),_0xa24d8={};var _0x1b3816=Object['getOwnPropertyDescriptor'],_0x240f12=(_0x3c8a91,_0x50ceb3,_0x175f6a,_0x45495d)=>{const _0x1c282d=_0x15015b;for(var _0x89cddf=_0x45495d>0x1?void 0x0:_0x45495d?_0x1b3816(_0x50ceb3,_0x175f6a):_0x50ceb3,_0x18b19d=_0x3c8a91[_0x1c282d(0x11e)]-0x1,_0x5bf163;_0x18b19d>=0x0;_0x18b19d--)(_0x5bf163=_0x3c8a91[_0x18b19d])&&(_0x89cddf=_0x5bf163(_0x89cddf)||_0x89cddf);return _0x89cddf;},_0x51564c=(_0x5e969d,_0x5a9755)=>(_0x1aee62,_0x2bc3f4)=>_0x5a9755(_0x1aee62,_0x2bc3f4,_0x5e969d);function _0x3232be(_0x241ad2,_0x3db7e2){const _0x3ead38=_0x15015b,_0x397b47=_0x241ad2[_0x3ead38(0x142)][0x0];return{..._0x3db7e2,'id':_0x397b47[_0x3ead38(0x107)],'resolved':_0x241ad2[_0x3ead38(0x13d)]===0x1,'dT':_0x3c4352(_0x397b47[_0x3ead38(0x127)]),'personId':_0x397b47['userId'],'threadId':_0x397b47[_0x3ead38(0x13a)]};}function _0x265f9f(_0xc6bfb2,_0xbc977f,_0x4892f1){const _0x14908b=_0x15015b;var _0x30223b,_0x2527ce;if(((_0x2527ce=(_0x30223b=_0xc6bfb2==null?void 0x0:_0xc6bfb2[_0x14908b(0x142)])==null?void 0x0:_0x30223b[_0x14908b(0x11e)])!=null?_0x2527ce:0x0)>0x0){const _0x3887ef=(_0x495355,_0x4af366)=>({'id':_0x495355[_0x14908b(0x107)],'threadId':_0x495355[_0x14908b(0x13a)],'dT':_0x3c4352(_0x495355['createTimestamp']),'personId':_0x495355[_0x14908b(0xfb)],'resolved':_0xc6bfb2['solved']===_0x3fcd43[_0x14908b(0x135)],'unitId':_0xbc977f,'subUnitId':_0x4892f1,'text':JSON[_0x14908b(0x12b)](_0x495355[_0x14908b(0x148)]),'parentId':_0x4af366}),_0x3a8309=_0x3887ef(_0xc6bfb2[_0x14908b(0x142)][0x0]);return{..._0x3a8309,'children':_0xc6bfb2[_0x14908b(0x142)]['slice'](0x1)[_0x14908b(0xef)](_0x5c062d=>_0x3887ef(_0x5c062d,_0x3a8309['id']))};}return null;}let _0x36f2f2=class{constructor(_0x5da468,_0x1745d7,_0x1615b8){const _0x4b4726=_0x15015b;this['_httpService']=_0x5da468,this[_0x4b4726(0xea)]=_0x1745d7,this[_0x4b4726(0xfd)]=_0x1615b8;}async[_0x15015b(0x125)](_0x49b8fd){const _0xcf72b9=_0x15015b;var _0x4284e2,_0x5d148f;const {parentId:_0x3e6a9e,unitId:_0x2970f3,text:_0x3628df,threadId:_0x414fdc}=_0x49b8fd,_0x1a9153=(_0x5d148f=(_0x4284e2=_0x3628df['customRanges'])==null?void 0x0:_0x4284e2[_0xcf72b9(0xee)](_0x2a0c5c=>_0x2a0c5c[_0xcf72b9(0x122)]===_0x35dc7d[_0xcf72b9(0x124)]['COMMENT'])['map'](_0x50d4d8=>_0x50d4d8[_0xcf72b9(0xd1)]))!=null?_0x5d148f:[],_0x4fb88a=JSON[_0xcf72b9(0x13c)](_0x3628df),_0x168990=(await this['_sessionService'][_0xcf72b9(0x12e)](_0x2970f3))[_0xcf72b9(0x11f)]();if(_0x3e6a9e){const _0xd228ef={'memberId':_0x168990,'unitId':_0x2970f3,'content':_0x4fb88a,'mention':_0x1a9153,'threadId':_0x414fdc},_0x2181ec=(await this[_0xcf72b9(0xde)][_0xcf72b9(0xeb)]('/universer-api/comment/unit/'+_0x2970f3+_0xcf72b9(0xe8),{'body':_0xd228ef}))[_0xcf72b9(0xfc)]['reply'];return{..._0x49b8fd,'id':_0x2181ec[_0xcf72b9(0x107)],'dT':_0x35dc7d[_0xcf72b9(0x10b)](+_0x2181ec[_0xcf72b9(0x127)])[_0xcf72b9(0x14a)](_0xcf72b9(0x123)),'personId':_0x2181ec[_0xcf72b9(0xfb)]};}else{const _0x3dd9ee={'memberId':_0x168990,'unitId':_0x2970f3,'content':_0x4fb88a,'mention':_0x1a9153},_0x4dcb9d=await this['_httpService'][_0xcf72b9(0xeb)](_0xcf72b9(0x13f)+_0x2970f3+_0xcf72b9(0x128),{'body':_0x3dd9ee});return _0x3232be(_0x4dcb9d['body'][_0xcf72b9(0x139)],_0x49b8fd);}}async[_0x15015b(0x120)](_0x4d5a87){const _0x1d339d=_0x15015b;var _0x2ab6b4,_0x27bdbd;const {text:_0x1c8f10,unitId:_0x47a094}=_0x4d5a87,_0x5689b4=(_0x27bdbd=(_0x2ab6b4=_0x1c8f10['customRanges'])==null?void 0x0:_0x2ab6b4[_0x1d339d(0xee)](_0xf67312=>_0xf67312[_0x1d339d(0x122)]===_0x35dc7d[_0x1d339d(0x124)][_0x1d339d(0xf7)])[_0x1d339d(0xef)](_0x15cd69=>_0x15cd69[_0x1d339d(0xd1)]))!=null?_0x27bdbd:[],_0x25af08=JSON[_0x1d339d(0x13c)](_0x1c8f10),_0x371cda=_0x4d5a87[_0x1d339d(0x13a)],_0x522bea=_0x4d5a87['id'],_0x3456db={'memberId':(await this[_0x1d339d(0xfd)][_0x1d339d(0x12e)](_0x47a094))[_0x1d339d(0x11f)](),'unitId':_0x47a094,'threadId':_0x371cda,'mention':_0x5689b4,'content':_0x25af08,'replyId':_0x522bea},_0x125769=await this[_0x1d339d(0xde)][_0x1d339d(0xeb)]('/universer-api/comment/unit/'+_0x47a094+_0x1d339d(0x12a),{'body':_0x3456db});return!_0x125769['body'][_0x1d339d(0x106)]||_0x125769[_0x1d339d(0xfc)]['error'][_0x1d339d(0xed)]===0x1;}async[_0x15015b(0x13b)](_0x1a173b){const _0x6e6663=_0x15015b,{unitId:_0x5d1f13}=_0x1a173b,_0x21733f=_0x1a173b[_0x6e6663(0x13a)],_0xaab5ca={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x5d1f13,'threadId':_0x21733f,'solved':_0x1a173b['resolved']?_0x3fcd43[_0x6e6663(0x135)]:_0x3fcd43[_0x6e6663(0x144)]},_0x397ce4=await this[_0x6e6663(0xde)][_0x6e6663(0xeb)](_0x6e6663(0x13f)+_0x5d1f13+_0x6e6663(0xe3),{'body':_0xaab5ca});return!_0x397ce4[_0x6e6663(0xfc)][_0x6e6663(0x106)]||_0x397ce4[_0x6e6663(0xfc)][_0x6e6663(0x106)][_0x6e6663(0xed)]===0x1;}async[_0x15015b(0x147)](_0x5d1a6d,_0x55c6c4,_0x44471b,_0x205517){const _0x4e40e9=_0x15015b,_0xf73b64={'memberId':(await this[_0x4e40e9(0xfd)]['requireSession'](_0x5d1a6d))[_0x4e40e9(0x11f)](),'threadId':_0x44471b,'replyId':_0x205517,'unitId':_0x5d1a6d},_0xcc5e79=await this[_0x4e40e9(0xde)][_0x4e40e9(0xeb)](_0x4e40e9(0x13f)+_0x5d1a6d+_0x4e40e9(0xdb),{'body':_0xf73b64});return!_0xcc5e79['body'][_0x4e40e9(0x106)]||_0xcc5e79[_0x4e40e9(0xfc)][_0x4e40e9(0x106)][_0x4e40e9(0xed)]===0x1;}async['listComments'](_0x50d5bb,_0x33c7b2,_0x12e6af){const _0xe9ce3f=_0x15015b,_0x190ea7={'unitId':_0x50d5bb,'threadId':_0x12e6af},_0x3fc1be=await this['_httpService'][_0xe9ce3f(0xeb)](_0xe9ce3f(0x13f)+_0x50d5bb+'/list',{'body':_0x190ea7}),_0x251b65=_0x12e6af[_0xe9ce3f(0xef)](_0x59b9ec=>_0x265f9f(_0x3fc1be[_0xe9ce3f(0xfc)][_0xe9ce3f(0x146)][_0x59b9ec],_0x50d5bb,_0x33c7b2))[_0xe9ce3f(0xee)](Boolean);return Object[_0xe9ce3f(0x14d)](_0x3fc1be[_0xe9ce3f(0xfc)][_0xe9ce3f(0x10e)])[_0xe9ce3f(0xf3)](_0x3ee570=>{const _0x2ebb25=_0xe9ce3f;this[_0x2ebb25(0xea)][_0x2ebb25(0xf0)](_0x3ee570);}),_0x251b65;}[_0x15015b(0x102)](_0x140654){const _0x1f4375=_0x15015b;return{'id':_0x140654['id'],'threadId':_0x140654[_0x1f4375(0x13a)],'ref':_0x140654['ref']};}};_0x36f2f2=_0x240f12([_0x51564c(0x0,_0x35dc7d[_0x15015b(0x101)](_0x16bd52[_0x15015b(0xfa)])),_0x51564c(0x1,_0x35dc7d['Inject'](_0x35dc7d[_0x15015b(0xdd)])),_0x51564c(0x2,_0x35dc7d[_0x15015b(0x101)](_0x2d5994['CollaborationSessionService']))],_0x36f2f2);var _0x4224f1=Object[_0x15015b(0xd4)],_0x558249=(_0x3c2f4b,_0x286f7b,_0x54c5b3,_0x4de0e7)=>{const _0x38f2a3=_0x15015b;for(var _0x34c497=_0x4de0e7>0x1?void 0x0:_0x4de0e7?_0x4224f1(_0x286f7b,_0x54c5b3):_0x286f7b,_0x174e7b=_0x3c2f4b[_0x38f2a3(0x11e)]-0x1,_0x15ee0f;_0x174e7b>=0x0;_0x174e7b--)(_0x15ee0f=_0x3c2f4b[_0x174e7b])&&(_0x34c497=_0x15ee0f(_0x34c497)||_0x34c497);return _0x34c497;},_0x4dc30b=(_0x18817b,_0x418121)=>(_0x31731a,_0x366727)=>_0x418121(_0x31731a,_0x366727,_0x18817b);let _0x49d7cd=class extends _0x35dc7d[_0x15015b(0x10f)]{constructor(_0x83f409,_0x50ec50){const _0x8029c7=_0x15015b;super(),this[_0x8029c7(0x109)]=_0x83f409,this[_0x8029c7(0x149)]=_0x50ec50,this[_0x8029c7(0x11b)]();}[_0x15015b(0x11b)](){const _0x465f3e=_0x15015b;this[_0x465f3e(0x109)]['dataSource']=this[_0x465f3e(0x149)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x49d7cd=_0x558249([_0x4dc30b(0x0,_0x5f4c25['IThreadCommentDataSourceService']),_0x4dc30b(0x1,_0x35dc7d['Inject'](_0x36f2f2))],_0x49d7cd);var _0x4cf2c1=Object['defineProperty'],_0x24f466=Object[_0x15015b(0xd4)],_0x3300b2=(_0x3bce12,_0x5edaa1,_0x92b56f)=>_0x5edaa1 in _0x3bce12?_0x4cf2c1(_0x3bce12,_0x5edaa1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x92b56f}):_0x3bce12[_0x5edaa1]=_0x92b56f,_0x54f16f=(_0x1ff9f0,_0x4b09b4,_0x18604d,_0x1fbfa8)=>{const _0x479930=_0x15015b;for(var _0x50a84c=_0x1fbfa8>0x1?void 0x0:_0x1fbfa8?_0x24f466(_0x4b09b4,_0x18604d):_0x4b09b4,_0x1cd747=_0x1ff9f0[_0x479930(0x11e)]-0x1,_0x3f22cf;_0x1cd747>=0x0;_0x1cd747--)(_0x3f22cf=_0x1ff9f0[_0x1cd747])&&(_0x50a84c=_0x3f22cf(_0x50a84c)||_0x50a84c);return _0x50a84c;},_0x30b072=(_0x3e795c,_0x2d3670)=>(_0x5ecf0b,_0x5c9dc4)=>_0x2d3670(_0x5ecf0b,_0x5c9dc4,_0x3e795c),_0x4f482f=(_0x4c069e,_0x47ef09,_0x54ba97)=>_0x3300b2(_0x4c069e,typeof _0x47ef09!=_0x15015b(0x138)?_0x47ef09+'':_0x47ef09,_0x54ba97);_0x4c7cd7[_0x15015b(0xe0)]=class extends _0x35dc7d[_0x15015b(0xf6)]{constructor(_0x499924=_0xa24d8,_0x294384,_0x29e110){const _0x3deb1=_0x15015b;super(),this[_0x3deb1(0xf9)]=_0x499924,this['_injector']=_0x294384,this[_0x3deb1(0x113)]=_0x29e110;const {..._0x292125}=_0x35dc7d['merge']({},_0xa24d8,this[_0x3deb1(0xf9)]);this['_configService'][_0x3deb1(0x115)](_0x260143,_0x292125);}[_0x15015b(0x10d)](){const _0x18bf93=_0x15015b;[[_0x36f2f2],[_0x49d7cd],[_0x516e59]][_0x18bf93(0xf3)](_0x3c35ed=>{const _0x25896e=_0x18bf93;this[_0x25896e(0x119)]['add'](_0x3c35ed);});}['onReady'](){const _0x5c3919=_0x15015b;this['_injector']['get'](_0x49d7cd),this[_0x5c3919(0x119)]['get'](_0x516e59);}},_0x4f482f(_0x4c7cd7[_0x15015b(0xe0)],'pluginName',_0x3d9bb4),_0x4f482f(_0x4c7cd7[_0x15015b(0xe0)],_0x15015b(0xd3),_0x35dc7d['UniverInstanceType'][_0x15015b(0x117)]),_0x4c7cd7[_0x15015b(0xe0)]=_0x54f16f([_0x35dc7d[_0x15015b(0xe4)](_0x564085[_0x15015b(0x132)],_0x2d5994['UniverCollaborationClientPlugin'],_0x5bcd5c[_0x15015b(0x126)]),_0x30b072(0x1,_0x35dc7d['Inject'](_0x35dc7d[_0x15015b(0x140)])),_0x30b072(0x2,_0x35dc7d[_0x15015b(0x108)])],_0x4c7cd7[_0x15015b(0xe0)]),Object[_0x15015b(0xe7)](_0x4c7cd7,Symbol[_0x15015b(0xf5)],{'value':_0x15015b(0xfe)});}));function _0x40ee(_0x22a5ee,_0x499ca3){const _0x20fa16=_0x20fa();return _0x40ee=function(_0x40eeb1,_0x2b44fc){_0x40eeb1=_0x40eeb1-0xd1;let _0x680306=_0x20fa16[_0x40eeb1];return _0x680306;},_0x40ee(_0x22a5ee,_0x499ca3);}function _0x20fa(){const _0x444878=['COMMENT','@univerjs/thread-comment','_config','HTTPService','userId','body','_sessionService','Module','@univerjs/thread-comment-ui','object','Inject','saveCommentToSnapshot','2117628GpJLji','UNRECOGNIZED','533564NNnqkw','error','replyId','IConfigService','_threadCommentDataSourceService','3136324LYRpSa','dayjs','size','onStarting','users','Disposable','subscribe','getUnit','/universer-api/user/list','_configService','UniverThreadComment','setConfig','Delete','UNIVER_UNKNOWN','find','_injector','1962940WlkeqY','_initDataSource','1220wkqlvw','@univerjs-pro/collaboration-client','length','getMemberID','updateComment','8884208ESbWYi','rangeType','YYYY/MM/DD\x20HH:mm','CustomRangeType','addComment','UniverLicensePlugin','createTimestamp','/add','bufferTime','/edit','parse','CommentService','user','requireSession','_commentService','rxjs','getComment','UniverThreadCommentUIPlugin','_threadCommentModel','7VlZRvd','Solved','payload','Solve','symbol','comment','threadId','resolveComment','stringify','solved','unitId','/universer-api/comment/unit/','Injector','root','replies','4509xBQtsX','OpenOrReOpen','personId','comments','deleteComment','content','_threadCommentDataSource','format','thread-comment-data-source.config','Edit','values','disposeWithMe','rangeId','_initUserSync','type','getOwnPropertyDescriptor','_init','add','Add','parentId','5172900mktqnj','UniverCore','/delete','commentUpdate$','UserManagerService','_httpService','get','UniverThreadCommentDataSourcePlugin','UniverProThreadCommentDatasource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/solved','DependentOn','@univerjs/network','userID','defineProperty','/reply','exports','_userService','post','ThreadCommentModel','code','filter','map','addUser','delete','Unknown','forEach','Reply','toStringTag','Plugin'];_0x20fa=function(){return _0x444878;};return _0x20fa();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.10.7-nightly.202509130618",
3
+ "version": "0.10.7-nightly.202509130640",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.10.7-nightly.202509130618",
49
- "@univerjs-pro/license": "0.10.7-nightly.202509130618",
50
- "@univerjs/network": "0.10.7-nightly.202509130618",
51
- "@univerjs/core": "0.10.7-nightly.202509130618",
48
+ "@univerjs-pro/collaboration-client": "0.10.7-nightly.202509130640",
49
+ "@univerjs-pro/license": "0.10.7-nightly.202509130640",
50
+ "@univerjs/core": "0.10.7-nightly.202509130640",
52
51
  "@univerjs/protocol": "0.1.47-alpha.0",
53
- "@univerjs/thread-comment": "0.10.7-nightly.202509130618",
54
- "@univerjs/thread-comment-ui": "0.10.7-nightly.202509130618"
52
+ "@univerjs/network": "0.10.7-nightly.202509130640",
53
+ "@univerjs/thread-comment-ui": "0.10.7-nightly.202509130640",
54
+ "@univerjs/thread-comment": "0.10.7-nightly.202509130640"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",