@univerjs-pro/thread-comment-datasource 0.6.6 → 0.6.7-nightly.202503261607

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 _0x550f8f=_0x4086;(function(_0x83fabf,_0x45198d){const _0x5206db=_0x4086,_0x382a8d=_0x83fabf();while(!![]){try{const _0x4856af=parseInt(_0x5206db(0x1a5))/0x1+-parseInt(_0x5206db(0x1d7))/0x2+parseInt(_0x5206db(0x1b5))/0x3+parseInt(_0x5206db(0x17b))/0x4*(parseInt(_0x5206db(0x1bf))/0x5)+parseInt(_0x5206db(0x1a6))/0x6*(-parseInt(_0x5206db(0x1e7))/0x7)+parseInt(_0x5206db(0x186))/0x8*(parseInt(_0x5206db(0x17e))/0x9)+parseInt(_0x5206db(0x1d8))/0xa*(-parseInt(_0x5206db(0x184))/0xb);if(_0x4856af===_0x45198d)break;else _0x382a8d['push'](_0x382a8d['shift']());}catch(_0x5f4491){_0x382a8d['push'](_0x382a8d['shift']());}}}(_0x1f31,0xe968b));Object['defineProperty'](exports,Symbol[_0x550f8f(0x1be)],{'value':_0x550f8f(0x1e2)});const b=require(_0x550f8f(0x18b)),T=require(_0x550f8f(0x1b8)),c=require(_0x550f8f(0x180)),j=require('@univerjs/thread-comment-ui'),M=require(_0x550f8f(0x1b9)),w=require(_0x550f8f(0x1c3)),P=require(_0x550f8f(0x187)),U=_0x550f8f(0x1d9);var I=(_0x3710f9=>(_0x3710f9[_0x3710f9[_0x550f8f(0x1d1)]=0x0]=_0x550f8f(0x1d1),_0x3710f9[_0x3710f9['Solved']=0x1]=_0x550f8f(0x1c4),_0x3710f9[_0x3710f9[_0x550f8f(0x19d)]=-0x1]=_0x550f8f(0x19d),_0x3710f9))(I||{}),v=(_0xa2357e=>(_0xa2357e[_0xa2357e[_0x550f8f(0x1da)]=0x0]=_0x550f8f(0x1da),_0xa2357e[_0xa2357e[_0x550f8f(0x172)]=0x1]=_0x550f8f(0x172),_0xa2357e[_0xa2357e[_0x550f8f(0x1b0)]=0x2]=_0x550f8f(0x1b0),_0xa2357e[_0xa2357e[_0x550f8f(0x177)]=0x3]='Edit',_0xa2357e[_0xa2357e[_0x550f8f(0x1b4)]=0x4]=_0x550f8f(0x1b4),_0xa2357e[_0xa2357e[_0x550f8f(0x182)]=0x5]=_0x550f8f(0x182),_0xa2357e[_0xa2357e[_0x550f8f(0x19d)]=-0x1]=_0x550f8f(0x19d),_0xa2357e))(v||{});const f=_0x45a0c2=>c['dayjs'](new Date(+_0x45a0c2))[_0x550f8f(0x18a)](_0x550f8f(0x19c)),R=async(_0x2066f4,_0x38a004)=>{const _0x359c03=_0x550f8f,_0x58dec3=_0x2066f4[_0x359c03(0x1c0)](c[_0x359c03(0x1e8)]),_0x2f48e7=_0x2066f4[_0x359c03(0x1c0)](P[_0x359c03(0x17f)]);_0x38a004['forEach'](_0x1cf0aa=>{const _0xcd32c=_0x359c03;_0x58dec3[_0xcd32c(0x192)](_0x1cf0aa)&&_0x38a004[_0xcd32c(0x1bc)](_0x1cf0aa);}),_0x38a004[_0x359c03(0x1ac)]&&(await _0x2f48e7[_0x359c03(0x1c0)]('/universer-api/user/list',{'params':{'userIDs':[..._0x38a004]}}))[_0x359c03(0x179)][_0x359c03(0x18c)]['forEach'](_0x507c9e=>{_0x507c9e&&_0x58dec3['addUser'](_0x507c9e);});};var $=Object[_0x550f8f(0x18f)],E=(_0xb8d679,_0x5aff1b,_0xa2a953,_0x5162c4)=>{const _0x328258=_0x550f8f;for(var _0x98d2e5=_0x5162c4>0x1?void 0x0:_0x5162c4?$(_0x5aff1b,_0xa2a953):_0x5aff1b,_0x4c68a4=_0xb8d679[_0x328258(0x1cd)]-0x1,_0x11c321;_0x4c68a4>=0x0;_0x4c68a4--)(_0x11c321=_0xb8d679[_0x4c68a4])&&(_0x98d2e5=_0x11c321(_0x98d2e5)||_0x98d2e5);return _0x98d2e5;},S=(_0x365c75,_0x371c0a)=>(_0x21c058,_0x58803e)=>_0x371c0a(_0x21c058,_0x58803e,_0x365c75);let p=class extends c['Disposable']{constructor(_0x45b7ae,_0x54859d,_0x56c330,_0x52afd2){const _0x55af52=_0x550f8f;super(),this['_commentService']=_0x45b7ae,this[_0x55af52(0x1a3)]=_0x54859d,this[_0x55af52(0x173)]=_0x56c330,this['_injector']=_0x52afd2,this[_0x55af52(0x1b2)](),this[_0x55af52(0x1ca)]();}[_0x550f8f(0x1ca)](){const _0x1790a8=_0x550f8f;this['disposeWithMe'](this[_0x1790a8(0x1a3)]['commentUpdate$'][_0x1790a8(0x1b6)](w['bufferTime'](0x10))['subscribe'](_0x377309=>{const _0x26f575=_0x1790a8,_0x2622af=new Set();_0x377309['forEach'](_0x8a75b7=>{const _0x267529=_0x4086;switch(_0x8a75b7[_0x267529(0x1a2)]){case'add':{const _0x5db0aa=_0x8a75b7['payload'][_0x267529(0x1df)];_0x2622af[_0x267529(0x1ae)](_0x5db0aa);break;}}}),R(this[_0x26f575(0x1c5)],_0x2622af);}));}[_0x550f8f(0x1b2)](){const _0x589b1b=_0x550f8f;this[_0x589b1b(0x19b)](this[_0x589b1b(0x19e)]['commentUpdate$']['subscribe'](async _0x39bd26=>{const _0x28365e=_0x589b1b;var _0x540efb,_0x2f9ad1,_0x102ac1,_0x10ae2e;const _0x3d2712=(_0x540efb=this[_0x28365e(0x1a3)]['getUnit'](_0x39bd26['unitId'])[_0x28365e(0x199)](_0x59f988=>_0x59f988['threadId']===_0x39bd26[_0x28365e(0x1d2)]))==null?void 0x0:_0x540efb[_0x28365e(0x198)];if(!_0x3d2712)return;const {unitId:_0x277c8f,subUnitId:_0x3d2c1a}=_0x3d2712;switch(_0x39bd26['user']&&this[_0x28365e(0x173)]['addUser'](_0x39bd26['user']),_0x39bd26[_0x28365e(0x1a2)]){case v[_0x28365e(0x172)]:break;case v[_0x28365e(0x1b0)]:{this[_0x28365e(0x1a3)][_0x28365e(0x176)](_0x277c8f,_0x3d2c1a,{'unitId':_0x277c8f,'subUnitId':_0x3d2c1a,'ref':'','id':_0x39bd26[_0x28365e(0x197)],'dT':f(+_0x39bd26[_0x28365e(0x18d)]),'threadId':_0x39bd26[_0x28365e(0x1d2)],'personId':(_0x102ac1=(_0x2f9ad1=_0x39bd26['user'])==null?void 0x0:_0x2f9ad1['userID'])!=null?_0x102ac1:_0x39bd26[_0x28365e(0x1b1)],'text':JSON[_0x28365e(0x1cc)](_0x39bd26[_0x28365e(0x1ab)]),'parentId':_0x3d2712['id']});break;}case v[_0x28365e(0x1b4)]:{const _0x595f1c=this['_threadCommentModel'][_0x28365e(0x1e1)](_0x277c8f,_0x3d2c1a,_0x39bd26[_0x28365e(0x197)]);_0x595f1c&&_0x595f1c[_0x28365e(0x1cf)]&&this['_threadCommentModel'][_0x28365e(0x189)](_0x277c8f,_0x3d2c1a,_0x39bd26[_0x28365e(0x197)]);break;}case v[_0x28365e(0x177)]:{this[_0x28365e(0x1a3)][_0x28365e(0x1dd)](_0x277c8f,_0x3d2c1a,{'commentId':_0x39bd26[_0x28365e(0x197)],'text':JSON['parse'](_0x39bd26[_0x28365e(0x1ab)])});break;}case v[_0x28365e(0x182)]:{const _0x5f3bef=(_0x10ae2e=this[_0x28365e(0x1a3)]['getUnit'](_0x39bd26[_0x28365e(0x1c1)])[_0x28365e(0x199)](_0x208ad0=>_0x208ad0['threadId']===_0x39bd26[_0x28365e(0x1d2)]))==null?void 0x0:_0x10ae2e[_0x28365e(0x198)];_0x5f3bef&&this[_0x28365e(0x1a3)][_0x28365e(0x17a)](_0x277c8f,_0x3d2c1a,_0x5f3bef['id'],_0x39bd26[_0x28365e(0x1c7)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x550f8f(0x190)](b[_0x550f8f(0x194)])),S(0x1,c[_0x550f8f(0x190)](M[_0x550f8f(0x1e4)])),S(0x2,c[_0x550f8f(0x190)](c[_0x550f8f(0x1e8)])),S(0x3,c[_0x550f8f(0x190)](c[_0x550f8f(0x1ba)]))],p);const q=_0x550f8f(0x196),D={};var A=Object[_0x550f8f(0x18f)],x=(_0x5633b1,_0x4212e2,_0x11b7bb,_0x11ac6c)=>{const _0x1ebdfd=_0x550f8f;for(var _0x2e472e=_0x11ac6c>0x1?void 0x0:_0x11ac6c?A(_0x4212e2,_0x11b7bb):_0x4212e2,_0x37efe9=_0x5633b1[_0x1ebdfd(0x1cd)]-0x1,_0x4540f9;_0x37efe9>=0x0;_0x37efe9--)(_0x4540f9=_0x5633b1[_0x37efe9])&&(_0x2e472e=_0x4540f9(_0x2e472e)||_0x2e472e);return _0x2e472e;},_=(_0x2f2217,_0x241cca)=>(_0x5df383,_0x375ca3)=>_0x241cca(_0x5df383,_0x375ca3,_0x2f2217);function Y(_0x701584,_0x31e529){const _0x5a1b94=_0x550f8f,_0x47007f=_0x701584[_0x5a1b94(0x1bd)][0x0];return{..._0x31e529,'id':_0x47007f['replyId'],'resolved':_0x701584[_0x5a1b94(0x1c7)]===0x1,'dT':f(_0x47007f[_0x5a1b94(0x18d)]),'personId':_0x47007f['userId'],'threadId':_0x47007f[_0x5a1b94(0x1d2)]};}function G(_0x1795f1,_0x1775af,_0x5a7fe7){const _0x3531ce=_0x550f8f;var _0x2ffe06,_0x88146d;if(((_0x88146d=(_0x2ffe06=_0x1795f1==null?void 0x0:_0x1795f1[_0x3531ce(0x1bd)])==null?void 0x0:_0x2ffe06[_0x3531ce(0x1cd)])!=null?_0x88146d:0x0)>0x0){const _0x5641ab=(_0x3af926,_0x46cd29)=>({'id':_0x3af926[_0x3531ce(0x197)],'threadId':_0x3af926['threadId'],'dT':f(_0x3af926['createTimestamp']),'personId':_0x3af926[_0x3531ce(0x1b1)],'resolved':_0x1795f1[_0x3531ce(0x1c7)]===I[_0x3531ce(0x1c4)],'unitId':_0x1775af,'subUnitId':_0x5a7fe7,'text':JSON[_0x3531ce(0x1cc)](_0x3af926[_0x3531ce(0x1ab)]),'parentId':_0x46cd29}),_0x252cb7=_0x5641ab(_0x1795f1['replies'][0x0]);return{..._0x252cb7,'children':_0x1795f1[_0x3531ce(0x1bd)][_0x3531ce(0x181)](0x1)['map'](_0x69a63b=>_0x5641ab(_0x69a63b,_0x252cb7['id']))};}return null;}let g=class{constructor(_0x211761,_0x4f5417,_0x5d469c,_0x3761c8){const _0x5eca9a=_0x550f8f;this[_0x5eca9a(0x1d3)]=_0x211761,this[_0x5eca9a(0x173)]=_0x4f5417,this['_sessionService']=_0x5d469c,this[_0x5eca9a(0x1c5)]=_0x3761c8;}async[_0x550f8f(0x176)](_0x4bf04d){const _0x387939=_0x550f8f;var _0x57767c,_0x53742c;const {parentId:_0x50d325,unitId:_0x51d5ca,text:_0x27e977,threadId:_0x558578}=_0x4bf04d,_0x23746b=(_0x53742c=(_0x57767c=_0x27e977['customRanges'])==null?void 0x0:_0x57767c['filter'](_0x3c55cc=>_0x3c55cc[_0x387939(0x1a0)]===c[_0x387939(0x193)]['COMMENT'])[_0x387939(0x174)](_0xb8b47a=>_0xb8b47a[_0x387939(0x17c)]))!=null?_0x53742c:[],_0x30731b=JSON[_0x387939(0x1c2)](_0x27e977),_0x291b9d=(await this[_0x387939(0x1e3)][_0x387939(0x1ea)](_0x51d5ca))[_0x387939(0x19f)]();if(_0x50d325){const _0xebef81={'memberId':_0x291b9d,'unitId':_0x51d5ca,'content':_0x30731b,'mention':_0x23746b,'threadId':_0x558578},_0x5d32e3=(await this[_0x387939(0x1d3)][_0x387939(0x1e5)](_0x387939(0x1d0)+_0x51d5ca+'/reply',{'body':_0xebef81}))[_0x387939(0x179)]['reply'];return{..._0x4bf04d,'id':_0x5d32e3[_0x387939(0x197)],'dT':c[_0x387939(0x195)](+_0x5d32e3[_0x387939(0x18d)])[_0x387939(0x18a)](_0x387939(0x19c)),'personId':_0x5d32e3['userId']};}else{const _0x2c129e={'memberId':_0x291b9d,'unitId':_0x51d5ca,'content':_0x30731b,'mention':_0x23746b},_0x2967fe=await this[_0x387939(0x1d3)][_0x387939(0x1e5)](_0x387939(0x1d0)+_0x51d5ca+_0x387939(0x1de),{'body':_0x2c129e});return Y(_0x2967fe['body']['comment'],_0x4bf04d);}}async[_0x550f8f(0x1dd)](_0x26f31b){const _0x4396b3=_0x550f8f;var _0x2f34e7,_0x4412d7;const {text:_0x2a00e9,unitId:_0x617843}=_0x26f31b,_0x19b685=(_0x4412d7=(_0x2f34e7=_0x2a00e9[_0x4396b3(0x1d6)])==null?void 0x0:_0x2f34e7[_0x4396b3(0x1bb)](_0x57c057=>_0x57c057[_0x4396b3(0x1a0)]===c[_0x4396b3(0x193)]['COMMENT'])[_0x4396b3(0x174)](_0x5c24b2=>_0x5c24b2[_0x4396b3(0x17c)]))!=null?_0x4412d7:[],_0x1dadf0=JSON[_0x4396b3(0x1c2)](_0x2a00e9),_0x403751=_0x26f31b['threadId'],_0x29d5f2=_0x26f31b['id'],_0x3c0333={'memberId':(await this[_0x4396b3(0x1e3)][_0x4396b3(0x1ea)](_0x617843))[_0x4396b3(0x19f)](),'unitId':_0x617843,'threadId':_0x403751,'mention':_0x19b685,'content':_0x1dadf0,'replyId':_0x29d5f2},_0x2c16c6=await this[_0x4396b3(0x1d3)]['post']('/universer-api/comment/unit/'+_0x617843+_0x4396b3(0x1c6),{'body':_0x3c0333});return!_0x2c16c6[_0x4396b3(0x179)]['error']||_0x2c16c6[_0x4396b3(0x179)][_0x4396b3(0x171)][_0x4396b3(0x1a7)]===0x1;}async[_0x550f8f(0x17a)](_0x5cb97c){const _0x2ac657=_0x550f8f,{unitId:_0xe72d8b}=_0x5cb97c,_0x55971f=_0x5cb97c[_0x2ac657(0x1d2)],_0x495107={'memberId':this[_0x2ac657(0x173)][_0x2ac657(0x1a4)]()[_0x2ac657(0x1a9)],'unitId':_0xe72d8b,'threadId':_0x55971f,'solved':_0x5cb97c['resolved']?I[_0x2ac657(0x1c4)]:I[_0x2ac657(0x1d1)]},_0x2d6ca8=await this[_0x2ac657(0x1d3)][_0x2ac657(0x1e5)]('/universer-api/comment/unit/'+_0xe72d8b+_0x2ac657(0x1a1),{'body':_0x495107});return!_0x2d6ca8[_0x2ac657(0x179)][_0x2ac657(0x171)]||_0x2d6ca8['body'][_0x2ac657(0x171)][_0x2ac657(0x1a7)]===0x1;}async['deleteComment'](_0x4ff6a5,_0x2f602d,_0x2e7bae,_0x1a0e9a){const _0x3490ce=_0x550f8f,_0x4a2f46={'memberId':(await this[_0x3490ce(0x1e3)][_0x3490ce(0x1ea)](_0x4ff6a5))[_0x3490ce(0x19f)](),'threadId':_0x2e7bae,'replyId':_0x1a0e9a,'unitId':_0x4ff6a5},_0x5c4844=await this[_0x3490ce(0x1d3)][_0x3490ce(0x1e5)](_0x3490ce(0x1d0)+_0x4ff6a5+'/delete',{'body':_0x4a2f46});return!_0x5c4844['body']['error']||_0x5c4844[_0x3490ce(0x179)]['error'][_0x3490ce(0x1a7)]===0x1;}async[_0x550f8f(0x1e9)](_0x39995b,_0x530725,_0x2da4e0){const _0x41d8c2=_0x550f8f,_0x11452e={'unitId':_0x39995b,'threadId':_0x2da4e0},_0x2ff36a=await this[_0x41d8c2(0x1d3)]['post'](_0x41d8c2(0x1d0)+_0x39995b+_0x41d8c2(0x175),{'body':_0x11452e}),_0x21e340=_0x2da4e0[_0x41d8c2(0x174)](_0x2b2d68=>G(_0x2ff36a[_0x41d8c2(0x179)][_0x41d8c2(0x185)][_0x2b2d68],_0x39995b,_0x530725))[_0x41d8c2(0x1bb)](Boolean);return Object[_0x41d8c2(0x178)](_0x2ff36a['body'][_0x41d8c2(0x18c)])[_0x41d8c2(0x191)](_0x39626b=>{const _0x314c02=_0x41d8c2;this[_0x314c02(0x173)][_0x314c02(0x1c8)](_0x39626b);}),_0x21e340;}[_0x550f8f(0x1b7)](_0x3b35aa){const _0x24eaec=_0x550f8f;return{'id':_0x3b35aa['id'],'threadId':_0x3b35aa[_0x24eaec(0x1d2)],'ref':_0x3b35aa[_0x24eaec(0x1af)]};}};g=x([_(0x0,c[_0x550f8f(0x190)](P[_0x550f8f(0x17f)])),_(0x1,c['Inject'](c[_0x550f8f(0x1e8)])),_(0x2,c[_0x550f8f(0x190)](b['CollaborationSessionService'])),_(0x3,c[_0x550f8f(0x190)](c[_0x550f8f(0x1ba)]))],g);function _0x1f31(){const _0x5c7989=['thread-comment-data-source.config','replyId','root','find','_threadCommentDataSourceService','disposeWithMe','YYYY/MM/DD\x20HH:mm','UNRECOGNIZED','_commentService','getMemberID','rangeType','/solved','type','_threadCommentModel','getCurrentUser','28543OjJWYh','102iPkFuZ','code','_config','userID','merge','content','size','dataSource','add','ref','Reply','userId','_init','UniverInstanceType','Delete','767388xedQYw','pipe','saveCommentToSnapshot','@univerjs-pro/license','@univerjs/thread-comment','Injector','filter','delete','replies','toStringTag','85DwmFte','get','unitId','stringify','rxjs','Solved','_injector','/edit','solved','addUser','_threadCommentDataSource','_initUserSync','DependentOn','parse','length','IConfigService','parentId','/universer-api/comment/unit/','OpenOrReOpen','threadId','_httpService','syncUpdateMutationToColla','setConfig','customRanges','1422276TADlVP','14470uzchtP','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Unknown','_initDataSource','UNIVER_UNKNOWN','updateComment','/add','personId','Disposable','getComment','Module','_sessionService','ThreadCommentModel','post','onStarting','84973ecCbfX','UserManagerService','listComments','requireSession','IThreadCommentDataSourceService','error','Add','_userService','map','/list','addComment','Edit','values','body','resolveComment','277688UVpbOU','rangeId','UniverThreadCommentUIPlugin','63DOuhRI','HTTPService','@univerjs/core','slice','Solve','pluginName','6006ETlati','comments','1370392rVavZv','@univerjs/network','UniverThreadCommentDataSourcePlugin','deleteComment','format','@univerjs-pro/collaboration-client','users','createTimestamp','Plugin','getOwnPropertyDescriptor','Inject','forEach','getUser','CustomRangeType','CommentService','dayjs'];_0x1f31=function(){return _0x5c7989;};return _0x1f31();}var H=Object[_0x550f8f(0x18f)],J=(_0x372dd8,_0x4dfc45,_0x1e754a,_0x3de2c1)=>{const _0x595a1c=_0x550f8f;for(var _0x189436=_0x3de2c1>0x1?void 0x0:_0x3de2c1?H(_0x4dfc45,_0x1e754a):_0x4dfc45,_0x4906fe=_0x372dd8[_0x595a1c(0x1cd)]-0x1,_0x3aeba2;_0x4906fe>=0x0;_0x4906fe--)(_0x3aeba2=_0x372dd8[_0x4906fe])&&(_0x189436=_0x3aeba2(_0x189436)||_0x189436);return _0x189436;},y=(_0x5b7b46,_0x2a702c)=>(_0x4637ec,_0x2fd4d6)=>_0x2a702c(_0x4637ec,_0x2fd4d6,_0x5b7b46);let C=class extends c[_0x550f8f(0x1e0)]{constructor(_0x58f959,_0x4e153d){const _0x185202=_0x550f8f;super(),this[_0x185202(0x19a)]=_0x58f959,this[_0x185202(0x1c9)]=_0x4e153d,this[_0x185202(0x1db)]();}[_0x550f8f(0x1db)](){const _0x2dc39d=_0x550f8f;this['_threadCommentDataSourceService'][_0x2dc39d(0x1ad)]=this[_0x2dc39d(0x1c9)],this['_threadCommentDataSourceService'][_0x2dc39d(0x1d4)]=!0x1;}};C=J([y(0x0,M[_0x550f8f(0x170)]),y(0x1,c[_0x550f8f(0x190)](g))],C);var F=Object['defineProperty'],L=Object[_0x550f8f(0x18f)],Z=(_0x43b806,_0x418197,_0x30416c)=>_0x418197 in _0x43b806?F(_0x43b806,_0x418197,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x30416c}):_0x43b806[_0x418197]=_0x30416c,W=(_0x551e0c,_0x37661c,_0x37ba72,_0x4c7272)=>{const _0x4b711c=_0x550f8f;for(var _0x523705=_0x4c7272>0x1?void 0x0:_0x4c7272?L(_0x37661c,_0x37ba72):_0x37661c,_0x421a52=_0x551e0c[_0x4b711c(0x1cd)]-0x1,_0x36fe95;_0x421a52>=0x0;_0x421a52--)(_0x36fe95=_0x551e0c[_0x421a52])&&(_0x523705=_0x36fe95(_0x523705)||_0x523705);return _0x523705;},O=(_0x27bd84,_0x58de60)=>(_0x55aa43,_0x53f77d)=>_0x58de60(_0x55aa43,_0x53f77d,_0x27bd84),N=(_0x34f294,_0x2aa696,_0x45652a)=>Z(_0x34f294,typeof _0x2aa696!='symbol'?_0x2aa696+'':_0x2aa696,_0x45652a);function _0x4086(_0x2ee372,_0x2f9e8f){const _0x1f3141=_0x1f31();return _0x4086=function(_0x408628,_0x46a36b){_0x408628=_0x408628-0x170;let _0x48c607=_0x1f3141[_0x408628];return _0x48c607;},_0x4086(_0x2ee372,_0x2f9e8f);}exports[_0x550f8f(0x188)]=class extends c[_0x550f8f(0x18e)]{constructor(_0x3e9d56=D,_0x5f1916,_0x8ed6cd){const _0x2f5ed1=_0x550f8f;super(),this[_0x2f5ed1(0x1a8)]=_0x3e9d56,this[_0x2f5ed1(0x1c5)]=_0x5f1916,this['_configService']=_0x8ed6cd;const {..._0x201338}=c[_0x2f5ed1(0x1aa)]({},D,this[_0x2f5ed1(0x1a8)]);this['_configService'][_0x2f5ed1(0x1d5)](q,_0x201338);}[_0x550f8f(0x1e6)](){const _0x505cdb=_0x550f8f;[[g],[C],[p]][_0x505cdb(0x191)](_0x4713c9=>{const _0x4e548a=_0x505cdb;this['_injector'][_0x4e548a(0x1ae)](_0x4713c9);});}['onReady'](){const _0x497e67=_0x550f8f;this[_0x497e67(0x1c5)][_0x497e67(0x1c0)](C),this[_0x497e67(0x1c5)][_0x497e67(0x1c0)](p);}},N(exports[_0x550f8f(0x188)],_0x550f8f(0x183),U),N(exports[_0x550f8f(0x188)],_0x550f8f(0x1a2),c[_0x550f8f(0x1b3)][_0x550f8f(0x1dc)]),exports[_0x550f8f(0x188)]=W([c[_0x550f8f(0x1cb)](j[_0x550f8f(0x17d)],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c[_0x550f8f(0x190)](c[_0x550f8f(0x1ba)])),O(0x2,c[_0x550f8f(0x1ce)])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0x141534=_0x1ef8;(function(_0x4ef8e3,_0x127c04){const _0x162806=_0x1ef8,_0x562a46=_0x4ef8e3();while(!![]){try{const _0x5cc6af=parseInt(_0x162806(0x128))/0x1+parseInt(_0x162806(0x182))/0x2+-parseInt(_0x162806(0x140))/0x3+parseInt(_0x162806(0x171))/0x4*(-parseInt(_0x162806(0x162))/0x5)+-parseInt(_0x162806(0x161))/0x6+parseInt(_0x162806(0x158))/0x7*(-parseInt(_0x162806(0x133))/0x8)+parseInt(_0x162806(0x16f))/0x9;if(_0x5cc6af===_0x127c04)break;else _0x562a46['push'](_0x562a46['shift']());}catch(_0x3f0b9d){_0x562a46['push'](_0x562a46['shift']());}}}(_0x114d,0x91638));Object['defineProperty'](exports,Symbol[_0x141534(0x176)],{'value':_0x141534(0x15b)});const b=require(_0x141534(0x143)),T=require('@univerjs-pro/license'),c=require(_0x141534(0x16e)),j=require(_0x141534(0x125)),M=require(_0x141534(0x184)),w=require(_0x141534(0x170)),P=require(_0x141534(0x147)),U=_0x141534(0x14d);var I=(_0x1dfd76=>(_0x1dfd76[_0x1dfd76[_0x141534(0x189)]=0x0]=_0x141534(0x189),_0x1dfd76[_0x1dfd76[_0x141534(0x110)]=0x1]='Solved',_0x1dfd76[_0x1dfd76['UNRECOGNIZED']=-0x1]=_0x141534(0x11f),_0x1dfd76))(I||{}),v=(_0x25c0cc=>(_0x25c0cc[_0x25c0cc[_0x141534(0x144)]=0x0]=_0x141534(0x144),_0x25c0cc[_0x25c0cc['Add']=0x1]='Add',_0x25c0cc[_0x25c0cc[_0x141534(0x13d)]=0x2]=_0x141534(0x13d),_0x25c0cc[_0x25c0cc[_0x141534(0x13b)]=0x3]=_0x141534(0x13b),_0x25c0cc[_0x25c0cc[_0x141534(0x15a)]=0x4]=_0x141534(0x15a),_0x25c0cc[_0x25c0cc[_0x141534(0x122)]=0x5]=_0x141534(0x122),_0x25c0cc[_0x25c0cc[_0x141534(0x11f)]=-0x1]='UNRECOGNIZED',_0x25c0cc))(v||{});const f=_0x4e86bf=>c['dayjs'](new Date(+_0x4e86bf))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0xf9505e,_0xfeabda)=>{const _0x158b60=_0x141534,_0x3c16fd=_0xf9505e['get'](c[_0x158b60(0x12e)]),_0x17c7a5=_0xf9505e[_0x158b60(0x175)](P[_0x158b60(0x123)]);_0xfeabda[_0x158b60(0x187)](_0x1f8239=>{const _0x3b6131=_0x158b60;_0x3c16fd['getUser'](_0x1f8239)&&_0xfeabda[_0x3b6131(0x132)](_0x1f8239);}),_0xfeabda['size']&&(await _0x17c7a5[_0x158b60(0x175)](_0x158b60(0x13e),{'params':{'userIDs':[..._0xfeabda]}}))[_0x158b60(0x14c)]['users'][_0x158b60(0x187)](_0x2cf280=>{_0x2cf280&&_0x3c16fd['addUser'](_0x2cf280);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x37aaa1,_0x151b4c,_0x450d85,_0x579f68)=>{const _0x6eae66=_0x141534;for(var _0x1c14cc=_0x579f68>0x1?void 0x0:_0x579f68?$(_0x151b4c,_0x450d85):_0x151b4c,_0x14a3db=_0x37aaa1[_0x6eae66(0x11b)]-0x1,_0x4cc24e;_0x14a3db>=0x0;_0x14a3db--)(_0x4cc24e=_0x37aaa1[_0x14a3db])&&(_0x1c14cc=_0x4cc24e(_0x1c14cc)||_0x1c14cc);return _0x1c14cc;},S=(_0x212ada,_0x382be5)=>(_0xc1898b,_0x6e5737)=>_0x382be5(_0xc1898b,_0x6e5737,_0x212ada);let p=class extends c[_0x141534(0x142)]{constructor(_0x5d42ae,_0x2d2532,_0x1791a3,_0x2be774){const _0x14ccb6=_0x141534;super(),this[_0x14ccb6(0x168)]=_0x5d42ae,this[_0x14ccb6(0x12b)]=_0x2d2532,this[_0x14ccb6(0x16d)]=_0x1791a3,this[_0x14ccb6(0x157)]=_0x2be774,this['_init'](),this['_initUserSync']();}[_0x141534(0x177)](){const _0x5f54d3=_0x141534;this[_0x5f54d3(0x14b)](this[_0x5f54d3(0x12b)]['commentUpdate$']['pipe'](w[_0x5f54d3(0x11e)](0x10))['subscribe'](_0x484192=>{const _0x2c7352=_0x5f54d3,_0x18a82a=new Set();_0x484192[_0x2c7352(0x187)](_0x58d1f1=>{const _0x58d8e1=_0x2c7352;switch(_0x58d1f1['type']){case _0x58d8e1(0x16b):{const _0x149e54=_0x58d1f1[_0x58d8e1(0x186)][_0x58d8e1(0x17a)];_0x18a82a['add'](_0x149e54);break;}}}),R(this['_injector'],_0x18a82a);}));}[_0x141534(0x150)](){const _0x33a070=_0x141534;this[_0x33a070(0x14b)](this[_0x33a070(0x168)][_0x33a070(0x181)][_0x33a070(0x159)](async _0x576403=>{const _0x7e6274=_0x33a070;var _0x350648,_0x4e8d0f,_0x1a2583,_0xb14a96;const _0x1d3a9d=(_0x350648=this[_0x7e6274(0x12b)][_0x7e6274(0x152)](_0x576403[_0x7e6274(0x16c)])[_0x7e6274(0x146)](_0x5ae414=>_0x5ae414['threadId']===_0x576403[_0x7e6274(0x151)]))==null?void 0x0:_0x350648['root'];if(!_0x1d3a9d)return;const {unitId:_0xd8688d,subUnitId:_0x1900a7}=_0x1d3a9d;switch(_0x576403[_0x7e6274(0x113)]&&this[_0x7e6274(0x16d)][_0x7e6274(0x179)](_0x576403[_0x7e6274(0x113)]),_0x576403[_0x7e6274(0x11c)]){case v[_0x7e6274(0x139)]:break;case v[_0x7e6274(0x13d)]:{this['_threadCommentModel'][_0x7e6274(0x17b)](_0xd8688d,_0x1900a7,{'unitId':_0xd8688d,'subUnitId':_0x1900a7,'ref':'','id':_0x576403[_0x7e6274(0x17c)],'dT':f(+_0x576403[_0x7e6274(0x12c)]),'threadId':_0x576403[_0x7e6274(0x151)],'personId':(_0x1a2583=(_0x4e8d0f=_0x576403['user'])==null?void 0x0:_0x4e8d0f['userID'])!=null?_0x1a2583:_0x576403[_0x7e6274(0x174)],'text':JSON['parse'](_0x576403[_0x7e6274(0x112)]),'parentId':_0x1d3a9d['id']});break;}case v[_0x7e6274(0x15a)]:{const _0x501f1c=this[_0x7e6274(0x12b)][_0x7e6274(0x11a)](_0xd8688d,_0x1900a7,_0x576403[_0x7e6274(0x17c)]);_0x501f1c&&_0x501f1c[_0x7e6274(0x149)]&&this[_0x7e6274(0x12b)]['deleteComment'](_0xd8688d,_0x1900a7,_0x576403[_0x7e6274(0x17c)]);break;}case v[_0x7e6274(0x13b)]:{this[_0x7e6274(0x12b)][_0x7e6274(0x18a)](_0xd8688d,_0x1900a7,{'commentId':_0x576403[_0x7e6274(0x17c)],'text':JSON[_0x7e6274(0x10f)](_0x576403[_0x7e6274(0x112)])});break;}case v['Solve']:{const _0xcd5fda=(_0xb14a96=this[_0x7e6274(0x12b)][_0x7e6274(0x152)](_0x576403[_0x7e6274(0x16c)])['find'](_0x564d09=>_0x564d09['threadId']===_0x576403[_0x7e6274(0x151)]))==null?void 0x0:_0xb14a96['root'];_0xcd5fda&&this['_threadCommentModel'][_0x7e6274(0x14f)](_0xd8688d,_0x1900a7,_0xcd5fda['id'],_0x576403[_0x7e6274(0x130)]===I['Solved']);break;}}}));}};p=E([S(0x0,c['Inject'](b['CommentService'])),S(0x1,c[_0x141534(0x13c)](M[_0x141534(0x12a)])),S(0x2,c[_0x141534(0x13c)](c[_0x141534(0x12e)])),S(0x3,c[_0x141534(0x13c)](c[_0x141534(0x116)]))],p);const q=_0x141534(0x124),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x50772b,_0x3c6ae1,_0x5b8732,_0x85ee5)=>{const _0xae15d3=_0x141534;for(var _0x222b2a=_0x85ee5>0x1?void 0x0:_0x85ee5?A(_0x3c6ae1,_0x5b8732):_0x3c6ae1,_0x48fe9d=_0x50772b[_0xae15d3(0x11b)]-0x1,_0x1081d2;_0x48fe9d>=0x0;_0x48fe9d--)(_0x1081d2=_0x50772b[_0x48fe9d])&&(_0x222b2a=_0x1081d2(_0x222b2a)||_0x222b2a);return _0x222b2a;},_=(_0x2980bd,_0x57dc8f)=>(_0x5838fe,_0xd14361)=>_0x57dc8f(_0x5838fe,_0xd14361,_0x2980bd);function Y(_0xaf6cf6,_0x300ce3){const _0x55c159=_0x141534,_0x395b06=_0xaf6cf6[_0x55c159(0x12d)][0x0];return{..._0x300ce3,'id':_0x395b06[_0x55c159(0x17c)],'resolved':_0xaf6cf6['solved']===0x1,'dT':f(_0x395b06[_0x55c159(0x12c)]),'personId':_0x395b06[_0x55c159(0x174)],'threadId':_0x395b06[_0x55c159(0x151)]};}function G(_0x4cfa08,_0x3d095a,_0x4a645c){const _0x18f152=_0x141534;var _0x119012,_0x17900a;if(((_0x17900a=(_0x119012=_0x4cfa08==null?void 0x0:_0x4cfa08[_0x18f152(0x12d)])==null?void 0x0:_0x119012[_0x18f152(0x11b)])!=null?_0x17900a:0x0)>0x0){const _0x28258a=(_0x4d2bd4,_0x1477c7)=>({'id':_0x4d2bd4[_0x18f152(0x17c)],'threadId':_0x4d2bd4[_0x18f152(0x151)],'dT':f(_0x4d2bd4[_0x18f152(0x12c)]),'personId':_0x4d2bd4[_0x18f152(0x174)],'resolved':_0x4cfa08[_0x18f152(0x130)]===I['Solved'],'unitId':_0x3d095a,'subUnitId':_0x4a645c,'text':JSON[_0x18f152(0x10f)](_0x4d2bd4[_0x18f152(0x112)]),'parentId':_0x1477c7}),_0x308f25=_0x28258a(_0x4cfa08[_0x18f152(0x12d)][0x0]);return{..._0x308f25,'children':_0x4cfa08['replies'][_0x18f152(0x178)](0x1)['map'](_0x243779=>_0x28258a(_0x243779,_0x308f25['id']))};}return null;}let g=class{constructor(_0x36cd9d,_0x36322e,_0xf9dc92,_0x36f3e0){const _0xdde955=_0x141534;this[_0xdde955(0x148)]=_0x36cd9d,this[_0xdde955(0x16d)]=_0x36322e,this[_0xdde955(0x17f)]=_0xf9dc92,this[_0xdde955(0x157)]=_0x36f3e0;}async['addComment'](_0x73fe8e){const _0xf9eb7d=_0x141534;var _0x357f18,_0x22c43e;const {parentId:_0x575a42,unitId:_0x3d1b57,text:_0x31c47c,threadId:_0x538b3a}=_0x73fe8e,_0x8675f8=(_0x22c43e=(_0x357f18=_0x31c47c[_0xf9eb7d(0x12f)])==null?void 0x0:_0x357f18[_0xf9eb7d(0x169)](_0x399048=>_0x399048[_0xf9eb7d(0x17d)]===c['CustomRangeType'][_0xf9eb7d(0x173)])[_0xf9eb7d(0x165)](_0x5d6aef=>_0x5d6aef['rangeId']))!=null?_0x22c43e:[],_0x5de7db=JSON['stringify'](_0x31c47c),_0x33a0ef=(await this[_0xf9eb7d(0x17f)][_0xf9eb7d(0x155)](_0x3d1b57))[_0xf9eb7d(0x121)]();if(_0x575a42){const _0x9bc0dc={'memberId':_0x33a0ef,'unitId':_0x3d1b57,'content':_0x5de7db,'mention':_0x8675f8,'threadId':_0x538b3a},_0x128b97=(await this[_0xf9eb7d(0x148)][_0xf9eb7d(0x167)]('/universer-api/comment/unit/'+_0x3d1b57+_0xf9eb7d(0x119),{'body':_0x9bc0dc}))['body']['reply'];return{..._0x73fe8e,'id':_0x128b97[_0xf9eb7d(0x17c)],'dT':c[_0xf9eb7d(0x118)](+_0x128b97[_0xf9eb7d(0x12c)])[_0xf9eb7d(0x14a)](_0xf9eb7d(0x137)),'personId':_0x128b97[_0xf9eb7d(0x174)]};}else{const _0x9a35bc={'memberId':_0x33a0ef,'unitId':_0x3d1b57,'content':_0x5de7db,'mention':_0x8675f8},_0x35886d=await this[_0xf9eb7d(0x148)][_0xf9eb7d(0x167)](_0xf9eb7d(0x18b)+_0x3d1b57+'/add',{'body':_0x9a35bc});return Y(_0x35886d[_0xf9eb7d(0x14c)][_0xf9eb7d(0x131)],_0x73fe8e);}}async[_0x141534(0x18a)](_0x112ecd){const _0x4ff18c=_0x141534;var _0x5eda56,_0x10362e;const {text:_0x244a36,unitId:_0x4f8861}=_0x112ecd,_0x17c907=(_0x10362e=(_0x5eda56=_0x244a36['customRanges'])==null?void 0x0:_0x5eda56['filter'](_0x31503f=>_0x31503f['rangeType']===c['CustomRangeType'][_0x4ff18c(0x173)])[_0x4ff18c(0x165)](_0x26cbf6=>_0x26cbf6[_0x4ff18c(0x15c)]))!=null?_0x10362e:[],_0x1d9859=JSON[_0x4ff18c(0x13a)](_0x244a36),_0x505b90=_0x112ecd[_0x4ff18c(0x151)],_0x39454e=_0x112ecd['id'],_0x11d93d={'memberId':(await this[_0x4ff18c(0x17f)]['requireSession'](_0x4f8861))['getMemberID'](),'unitId':_0x4f8861,'threadId':_0x505b90,'mention':_0x17c907,'content':_0x1d9859,'replyId':_0x39454e},_0x3dbd1b=await this['_httpService'][_0x4ff18c(0x167)](_0x4ff18c(0x18b)+_0x4f8861+_0x4ff18c(0x154),{'body':_0x11d93d});return!_0x3dbd1b[_0x4ff18c(0x14c)][_0x4ff18c(0x13f)]||_0x3dbd1b[_0x4ff18c(0x14c)]['error'][_0x4ff18c(0x16a)]===0x1;}async[_0x141534(0x14f)](_0x4ce74d){const _0x5143da=_0x141534,{unitId:_0x148b42}=_0x4ce74d,_0x2ba6b8=_0x4ce74d[_0x5143da(0x151)],_0x1127f9={'memberId':this[_0x5143da(0x16d)][_0x5143da(0x138)]()['userID'],'unitId':_0x148b42,'threadId':_0x2ba6b8,'solved':_0x4ce74d[_0x5143da(0x136)]?I[_0x5143da(0x110)]:I[_0x5143da(0x189)]},_0x5a665b=await this[_0x5143da(0x148)][_0x5143da(0x167)](_0x5143da(0x18b)+_0x148b42+_0x5143da(0x117),{'body':_0x1127f9});return!_0x5a665b[_0x5143da(0x14c)]['error']||_0x5a665b[_0x5143da(0x14c)][_0x5143da(0x13f)][_0x5143da(0x16a)]===0x1;}async['deleteComment'](_0x29ea65,_0x42066a,_0x37b9b0,_0x41fef9){const _0x951e42=_0x141534,_0x1f93e4={'memberId':(await this['_sessionService'][_0x951e42(0x155)](_0x29ea65))['getMemberID'](),'threadId':_0x37b9b0,'replyId':_0x41fef9,'unitId':_0x29ea65},_0x11fac0=await this[_0x951e42(0x148)][_0x951e42(0x167)](_0x951e42(0x18b)+_0x29ea65+_0x951e42(0x15e),{'body':_0x1f93e4});return!_0x11fac0['body']['error']||_0x11fac0[_0x951e42(0x14c)]['error'][_0x951e42(0x16a)]===0x1;}async[_0x141534(0x172)](_0x2577a8,_0x5dd3bd,_0x2778e3){const _0x5ef272=_0x141534,_0x297186={'unitId':_0x2577a8,'threadId':_0x2778e3},_0x563ad3=await this[_0x5ef272(0x148)][_0x5ef272(0x167)](_0x5ef272(0x18b)+_0x2577a8+_0x5ef272(0x153),{'body':_0x297186}),_0x43680f=_0x2778e3['map'](_0x12284b=>G(_0x563ad3['body']['comments'][_0x12284b],_0x2577a8,_0x5dd3bd))[_0x5ef272(0x169)](Boolean);return Object[_0x5ef272(0x15d)](_0x563ad3[_0x5ef272(0x14c)][_0x5ef272(0x11d)])[_0x5ef272(0x187)](_0x2f5fa7=>{const _0x192719=_0x5ef272;this[_0x192719(0x16d)][_0x192719(0x179)](_0x2f5fa7);}),_0x43680f;}[_0x141534(0x183)](_0x4d4b38){const _0x5eae81=_0x141534;return{'id':_0x4d4b38['id'],'threadId':_0x4d4b38[_0x5eae81(0x151)],'ref':_0x4d4b38[_0x5eae81(0x135)]};}};g=x([_(0x0,c[_0x141534(0x13c)](P[_0x141534(0x123)])),_(0x1,c[_0x141534(0x13c)](c[_0x141534(0x12e)])),_(0x2,c[_0x141534(0x13c)](b[_0x141534(0x185)])),_(0x3,c[_0x141534(0x13c)](c[_0x141534(0x116)]))],g);var H=Object[_0x141534(0x114)],J=(_0x529a33,_0x395c0b,_0x147742,_0x14f5c5)=>{const _0x5b9efc=_0x141534;for(var _0x120398=_0x14f5c5>0x1?void 0x0:_0x14f5c5?H(_0x395c0b,_0x147742):_0x395c0b,_0x9392ac=_0x529a33[_0x5b9efc(0x11b)]-0x1,_0x334a7f;_0x9392ac>=0x0;_0x9392ac--)(_0x334a7f=_0x529a33[_0x9392ac])&&(_0x120398=_0x334a7f(_0x120398)||_0x120398);return _0x120398;},y=(_0x42890f,_0x464066)=>(_0x52ddb1,_0x5bb0f6)=>_0x464066(_0x52ddb1,_0x5bb0f6,_0x42890f);function _0x114d(){const _0x29a8f8=['code','add','unitId','_userService','@univerjs/core','4753044bSwTUH','rxjs','392ruvljV','listComments','COMMENT','userId','get','toStringTag','_initUserSync','slice','addUser','personId','addComment','replyId','rangeType','symbol','_sessionService','UniverThreadCommentUIPlugin','commentUpdate$','1734866hukMhu','saveCommentToSnapshot','@univerjs/thread-comment','CollaborationSessionService','payload','forEach','Plugin','OpenOrReOpen','updateComment','/universer-api/comment/unit/','parse','Solved','_threadCommentDataSourceService','content','user','getOwnPropertyDescriptor','UniverInstanceType','Injector','/solved','dayjs','/reply','getComment','length','type','users','bufferTime','UNRECOGNIZED','_config','getMemberID','Solve','HTTPService','thread-comment-data-source.config','@univerjs/thread-comment-ui','onStarting','UniverThreadCommentDataSourcePlugin','696881TShRkq','pluginName','ThreadCommentModel','_threadCommentModel','createTimestamp','replies','UserManagerService','customRanges','solved','comment','delete','4644144oCuhkF','DependentOn','ref','resolved','YYYY/MM/DD\x20HH:mm','getCurrentUser','Add','stringify','Edit','Inject','Reply','/universer-api/user/list','error','1011876RIXfOp','UniverCollaborationClientPlugin','Disposable','@univerjs-pro/collaboration-client','Unknown','onReady','find','@univerjs/network','_httpService','parentId','format','disposeWithMe','body','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','dataSource','resolveComment','_init','threadId','getUnit','/list','/edit','requireSession','UniverLicensePlugin','_injector','7UUPyUu','subscribe','Delete','Module','rangeId','values','/delete','_configService','setConfig','946836jmjolx','21495HJskbr','merge','_threadCommentDataSource','map','defineProperty','post','_commentService','filter'];_0x114d=function(){return _0x29a8f8;};return _0x114d();}let C=class extends c[_0x141534(0x142)]{constructor(_0x30c185,_0x22c017){const _0x447943=_0x141534;super(),this[_0x447943(0x111)]=_0x30c185,this[_0x447943(0x164)]=_0x22c017,this['_initDataSource']();}['_initDataSource'](){const _0x55a5e9=_0x141534;this[_0x55a5e9(0x111)][_0x55a5e9(0x14e)]=this[_0x55a5e9(0x164)],this[_0x55a5e9(0x111)]['syncUpdateMutationToColla']=!0x1;}};function _0x1ef8(_0x424e7a,_0x48bd89){const _0x114d09=_0x114d();return _0x1ef8=function(_0x1ef834,_0x300360){_0x1ef834=_0x1ef834-0x10f;let _0x529e60=_0x114d09[_0x1ef834];return _0x529e60;},_0x1ef8(_0x424e7a,_0x48bd89);}C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](g))],C);var F=Object[_0x141534(0x166)],L=Object[_0x141534(0x114)],Z=(_0x206466,_0x544264,_0x308984)=>_0x544264 in _0x206466?F(_0x206466,_0x544264,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x308984}):_0x206466[_0x544264]=_0x308984,W=(_0x4f519a,_0x2a6c27,_0x187afb,_0x4830c0)=>{const _0x3c599b=_0x141534;for(var _0x1cbcde=_0x4830c0>0x1?void 0x0:_0x4830c0?L(_0x2a6c27,_0x187afb):_0x2a6c27,_0x2da99f=_0x4f519a[_0x3c599b(0x11b)]-0x1,_0x15f890;_0x2da99f>=0x0;_0x2da99f--)(_0x15f890=_0x4f519a[_0x2da99f])&&(_0x1cbcde=_0x15f890(_0x1cbcde)||_0x1cbcde);return _0x1cbcde;},O=(_0x4919c9,_0x57be79)=>(_0x78238d,_0x371fbb)=>_0x57be79(_0x78238d,_0x371fbb,_0x4919c9),N=(_0x1c0dc6,_0x3c54a7,_0x1a3c7c)=>Z(_0x1c0dc6,typeof _0x3c54a7!=_0x141534(0x17e)?_0x3c54a7+'':_0x3c54a7,_0x1a3c7c);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x141534(0x188)]{constructor(_0x217d99=D,_0x104372,_0x50b662){const _0x3b2c56=_0x141534;super(),this[_0x3b2c56(0x120)]=_0x217d99,this['_injector']=_0x104372,this['_configService']=_0x50b662;const {..._0x54f7d6}=c[_0x3b2c56(0x163)]({},D,this['_config']);this[_0x3b2c56(0x15f)][_0x3b2c56(0x160)](q,_0x54f7d6);}[_0x141534(0x126)](){[[g],[C],[p]]['forEach'](_0x4853e5=>{const _0x5ae28c=_0x1ef8;this[_0x5ae28c(0x157)][_0x5ae28c(0x16b)](_0x4853e5);});}[_0x141534(0x145)](){const _0x130e09=_0x141534;this[_0x130e09(0x157)][_0x130e09(0x175)](C),this[_0x130e09(0x157)]['get'](p);}},N(exports[_0x141534(0x127)],_0x141534(0x129),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x141534(0x11c),c[_0x141534(0x115)]['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x141534(0x134)](j[_0x141534(0x180)],b[_0x141534(0x141)],T[_0x141534(0x156)]),O(0x1,c[_0x141534(0x13c)](c['Injector'])),O(0x2,c['IConfigService'])],exports[_0x141534(0x127)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x452a10=_0x23a3;(function(_0x54c6af,_0x34802e){const _0x1f534f=_0x23a3,_0x46424d=_0x54c6af();while(!![]){try{const _0x1a07d2=-parseInt(_0x1f534f(0x18e))/0x1+parseInt(_0x1f534f(0x18c))/0x2*(parseInt(_0x1f534f(0x1c5))/0x3)+-parseInt(_0x1f534f(0x1d0))/0x4+parseInt(_0x1f534f(0x1a4))/0x5+parseInt(_0x1f534f(0x192))/0x6*(-parseInt(_0x1f534f(0x18d))/0x7)+parseInt(_0x1f534f(0x196))/0x8+parseInt(_0x1f534f(0x18a))/0x9*(parseInt(_0x1f534f(0x1bb))/0xa);if(_0x1a07d2===_0x34802e)break;else _0x46424d['push'](_0x46424d['shift']());}catch(_0x31964f){_0x46424d['push'](_0x46424d['shift']());}}}(_0xd9c3,0xf17a4));import{CommentService as _0x438cd7,CollaborationSessionService as _0xd72ec9,UniverCollaborationClientPlugin as _0xde1e70}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3ee855}from'@univerjs-pro/license';import{dayjs as _0x379e47,UserManagerService as _0x36868b,Inject as _0x4a7f4f,Injector as _0x23ae78,Disposable as _0x5258c6,CustomRangeType as _0x33a00d,UniverInstanceType as _0x69c418,DependentOn as _0x50d19f,IConfigService as _0x4d40ff,Plugin as _0x5405bc,merge as _0x3a041d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x33a339}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3cf6d5,IThreadCommentDataSourceService as _0x5683f2}from'@univerjs/thread-comment';import{bufferTime as _0x3dfe4a}from'rxjs';import{HTTPService as _0x51c5ba}from'@univerjs/network';const W=_0x452a10(0x1d9);function _0xd9c3(){const _0x17d676=['3449776bVFbWc','/list','_commentService','ref','Solved','deleteComment','resolved','payload','/solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_injector','replies','rangeType','users','parse','saveCommentToSnapshot','Solve','userId','map','_threadCommentModel','_configService','/reply','pluginName','Unknown','length','7484571pSMVAC','_threadCommentDataSource','87528rXULTb','8953OlycNd','1223361AUZELr','solved','type','size','1128OEQSXI','subscribe','Delete','Add','8687584DaEyuK','filter','disposeWithMe','get','/universer-api/comment/unit/','addComment','updateComment','getComment','user','root','_sessionService','getUnit','forEach','threadId','2174870uTuRyu','getOwnPropertyDescriptor','add','stringify','_threadCommentDataSourceService','find','addUser','/add','unitId','OpenOrReOpen','replyId','_init','code','post','pipe','body','parentId','UNRECOGNIZED','delete','customRanges','symbol','createTimestamp','_userService','10ltRkDy','_config','error','reply','rangeId','format','_httpService','Reply','YYYY/MM/DD\x20HH:mm','Edit','66GxtFbg','onStarting','_initUserSync','commentUpdate$','userID','getMemberID','_initDataSource','comments','requireSession','content','/delete'];_0xd9c3=function(){return _0x17d676;};return _0xd9c3();}var I=(_0x39ba17=>(_0x39ba17[_0x39ba17[_0x452a10(0x1ad)]=0x0]=_0x452a10(0x1ad),_0x39ba17[_0x39ba17[_0x452a10(0x1d4)]=0x1]=_0x452a10(0x1d4),_0x39ba17[_0x39ba17[_0x452a10(0x1b5)]=-0x1]='UNRECOGNIZED',_0x39ba17))(I||{}),v=(_0x2df18e=>(_0x2df18e[_0x2df18e[_0x452a10(0x188)]=0x0]='Unknown',_0x2df18e[_0x2df18e[_0x452a10(0x195)]=0x1]=_0x452a10(0x195),_0x2df18e[_0x2df18e[_0x452a10(0x1c2)]=0x2]='Reply',_0x2df18e[_0x2df18e['Edit']=0x3]=_0x452a10(0x1c4),_0x2df18e[_0x2df18e[_0x452a10(0x194)]=0x4]=_0x452a10(0x194),_0x2df18e[_0x2df18e['Solve']=0x5]='Solve',_0x2df18e[_0x2df18e[_0x452a10(0x1b5)]=-0x1]=_0x452a10(0x1b5),_0x2df18e))(v||{});const D=_0xef17ca=>_0x379e47(new Date(+_0xef17ca))[_0x452a10(0x1c0)](_0x452a10(0x1c3)),B=async(_0x2c3ccf,_0x49bab7)=>{const _0x540d58=_0x452a10,_0x325d76=_0x2c3ccf[_0x540d58(0x199)](_0x36868b),_0x4b096f=_0x2c3ccf['get'](_0x51c5ba);_0x49bab7[_0x540d58(0x1a2)](_0x145507=>{const _0x371815=_0x540d58;_0x325d76['getUser'](_0x145507)&&_0x49bab7[_0x371815(0x1b6)](_0x145507);}),_0x49bab7[_0x540d58(0x191)]&&(await _0x4b096f[_0x540d58(0x199)]('/universer-api/user/list',{'params':{'userIDs':[..._0x49bab7]}}))[_0x540d58(0x1b3)][_0x540d58(0x1dd)]['forEach'](_0x31373e=>{_0x31373e&&_0x325d76['addUser'](_0x31373e);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x410e06,_0x542e9c,_0x57b4c3,_0x1d92f9)=>{const _0xb5b627=_0x452a10;for(var _0x442e93=_0x1d92f9>0x1?void 0x0:_0x1d92f9?K(_0x542e9c,_0x57b4c3):_0x542e9c,_0x480d92=_0x410e06[_0xb5b627(0x189)]-0x1,_0x42b27e;_0x480d92>=0x0;_0x480d92--)(_0x42b27e=_0x410e06[_0x480d92])&&(_0x442e93=_0x42b27e(_0x442e93)||_0x442e93);return _0x442e93;},p=(_0x546212,_0x1aad00)=>(_0x5876f9,_0x79fbb8)=>_0x1aad00(_0x5876f9,_0x79fbb8,_0x546212);let S=class extends _0x5258c6{constructor(_0x1be225,_0x16e283,_0x21c8a5,_0x49f8b4){const _0x3248bb=_0x452a10;super(),this['_commentService']=_0x1be225,this[_0x3248bb(0x1e3)]=_0x16e283,this[_0x3248bb(0x1ba)]=_0x21c8a5,this['_injector']=_0x49f8b4,this[_0x3248bb(0x1af)](),this['_initUserSync']();}[_0x452a10(0x1c7)](){const _0x4d539a=_0x452a10;this[_0x4d539a(0x198)](this[_0x4d539a(0x1e3)][_0x4d539a(0x1c8)][_0x4d539a(0x1b2)](_0x3dfe4a(0x10))[_0x4d539a(0x193)](_0x1d1652=>{const _0x3d968b=_0x4d539a,_0x1b0e45=new Set();_0x1d1652[_0x3d968b(0x1a2)](_0x4ef1fc=>{const _0x2b6e9d=_0x3d968b;switch(_0x4ef1fc[_0x2b6e9d(0x190)]){case _0x2b6e9d(0x1a6):{const _0x414eb3=_0x4ef1fc[_0x2b6e9d(0x1d7)]['personId'];_0x1b0e45[_0x2b6e9d(0x1a6)](_0x414eb3);break;}}}),B(this[_0x3d968b(0x1da)],_0x1b0e45);}));}['_init'](){const _0x3bf3d7=_0x452a10;this[_0x3bf3d7(0x198)](this[_0x3bf3d7(0x1d2)]['commentUpdate$']['subscribe'](async _0x1d6bb0=>{const _0x1f94e9=_0x3bf3d7;var _0x762191,_0x22d4fe,_0x54dfb6,_0x5479f6;const _0x1b50fa=(_0x762191=this[_0x1f94e9(0x1e3)][_0x1f94e9(0x1a1)](_0x1d6bb0['unitId'])['find'](_0x330e30=>_0x330e30[_0x1f94e9(0x1a3)]===_0x1d6bb0[_0x1f94e9(0x1a3)]))==null?void 0x0:_0x762191[_0x1f94e9(0x19f)];if(!_0x1b50fa)return;const {unitId:_0x1ed351,subUnitId:_0x2c27fa}=_0x1b50fa;switch(_0x1d6bb0[_0x1f94e9(0x19e)]&&this[_0x1f94e9(0x1ba)][_0x1f94e9(0x1aa)](_0x1d6bb0['user']),_0x1d6bb0[_0x1f94e9(0x190)]){case v[_0x1f94e9(0x195)]:break;case v['Reply']:{this[_0x1f94e9(0x1e3)][_0x1f94e9(0x19b)](_0x1ed351,_0x2c27fa,{'unitId':_0x1ed351,'subUnitId':_0x2c27fa,'ref':'','id':_0x1d6bb0[_0x1f94e9(0x1ae)],'dT':D(+_0x1d6bb0['createTimestamp']),'threadId':_0x1d6bb0[_0x1f94e9(0x1a3)],'personId':(_0x54dfb6=(_0x22d4fe=_0x1d6bb0[_0x1f94e9(0x19e)])==null?void 0x0:_0x22d4fe[_0x1f94e9(0x1c9)])!=null?_0x54dfb6:_0x1d6bb0['userId'],'text':JSON['parse'](_0x1d6bb0[_0x1f94e9(0x1ce)]),'parentId':_0x1b50fa['id']});break;}case v[_0x1f94e9(0x194)]:{const _0x5cdc03=this['_threadCommentModel'][_0x1f94e9(0x19d)](_0x1ed351,_0x2c27fa,_0x1d6bb0['replyId']);_0x5cdc03&&_0x5cdc03[_0x1f94e9(0x1b4)]&&this['_threadCommentModel'][_0x1f94e9(0x1d5)](_0x1ed351,_0x2c27fa,_0x1d6bb0[_0x1f94e9(0x1ae)]);break;}case v[_0x1f94e9(0x1c4)]:{this[_0x1f94e9(0x1e3)]['updateComment'](_0x1ed351,_0x2c27fa,{'commentId':_0x1d6bb0[_0x1f94e9(0x1ae)],'text':JSON['parse'](_0x1d6bb0[_0x1f94e9(0x1ce)])});break;}case v[_0x1f94e9(0x1e0)]:{const _0x177b57=(_0x5479f6=this[_0x1f94e9(0x1e3)]['getUnit'](_0x1d6bb0[_0x1f94e9(0x1ac)])[_0x1f94e9(0x1a9)](_0x4d16e6=>_0x4d16e6[_0x1f94e9(0x1a3)]===_0x1d6bb0[_0x1f94e9(0x1a3)]))==null?void 0x0:_0x5479f6[_0x1f94e9(0x19f)];_0x177b57&&this[_0x1f94e9(0x1e3)]['resolveComment'](_0x1ed351,_0x2c27fa,_0x177b57['id'],_0x1d6bb0[_0x1f94e9(0x18f)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x4a7f4f(_0x438cd7)),p(0x1,_0x4a7f4f(_0x3cf6d5)),p(0x2,_0x4a7f4f(_0x36868b)),p(0x3,_0x4a7f4f(_0x23ae78))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x452a10(0x1a5)],Q=(_0x1b4d7f,_0x5db1a5,_0x33fa33,_0x32c211)=>{for(var _0x4c5fbd=_0x32c211>0x1?void 0x0:_0x32c211?k(_0x5db1a5,_0x33fa33):_0x5db1a5,_0x31d16f=_0x1b4d7f['length']-0x1,_0xd2f9ec;_0x31d16f>=0x0;_0x31d16f--)(_0xd2f9ec=_0x1b4d7f[_0x31d16f])&&(_0x4c5fbd=_0xd2f9ec(_0x4c5fbd)||_0x4c5fbd);return _0x4c5fbd;},_=(_0x48186a,_0x376b3d)=>(_0x4be549,_0x1c771d)=>_0x376b3d(_0x4be549,_0x1c771d,_0x48186a);function _0x23a3(_0x18d3e4,_0x219b15){const _0xd9c357=_0xd9c3();return _0x23a3=function(_0x23a36c,_0xbff005){_0x23a36c=_0x23a36c-0x185;let _0x29cf32=_0xd9c357[_0x23a36c];return _0x29cf32;},_0x23a3(_0x18d3e4,_0x219b15);}function X(_0x2bdd58,_0xfd2ad6){const _0x1f69db=_0x452a10,_0x30c2e5=_0x2bdd58[_0x1f69db(0x1db)][0x0];return{..._0xfd2ad6,'id':_0x30c2e5['replyId'],'resolved':_0x2bdd58[_0x1f69db(0x18f)]===0x1,'dT':D(_0x30c2e5[_0x1f69db(0x1b9)]),'personId':_0x30c2e5[_0x1f69db(0x1e1)],'threadId':_0x30c2e5['threadId']};}function ee(_0x358279,_0x48283a,_0x2e01f1){const _0x4df5c9=_0x452a10;var _0x12ee3f,_0x12f1ae;if(((_0x12f1ae=(_0x12ee3f=_0x358279==null?void 0x0:_0x358279[_0x4df5c9(0x1db)])==null?void 0x0:_0x12ee3f[_0x4df5c9(0x189)])!=null?_0x12f1ae:0x0)>0x0){const _0x4a3623=(_0x34f2c2,_0x464aa0)=>({'id':_0x34f2c2['replyId'],'threadId':_0x34f2c2[_0x4df5c9(0x1a3)],'dT':D(_0x34f2c2[_0x4df5c9(0x1b9)]),'personId':_0x34f2c2['userId'],'resolved':_0x358279['solved']===I[_0x4df5c9(0x1d4)],'unitId':_0x48283a,'subUnitId':_0x2e01f1,'text':JSON[_0x4df5c9(0x1de)](_0x34f2c2[_0x4df5c9(0x1ce)]),'parentId':_0x464aa0}),_0x2d1305=_0x4a3623(_0x358279[_0x4df5c9(0x1db)][0x0]);return{..._0x2d1305,'children':_0x358279['replies']['slice'](0x1)[_0x4df5c9(0x1e2)](_0x56267d=>_0x4a3623(_0x56267d,_0x2d1305['id']))};}return null;}let f=class{constructor(_0x142c00,_0x570a33,_0x21bd64,_0x44fe7f){const _0x538440=_0x452a10;this[_0x538440(0x1c1)]=_0x142c00,this[_0x538440(0x1ba)]=_0x570a33,this[_0x538440(0x1a0)]=_0x21bd64,this[_0x538440(0x1da)]=_0x44fe7f;}async[_0x452a10(0x19b)](_0x39229e){const _0x5ec8de=_0x452a10;var _0x58947e,_0x452628;const {parentId:_0xa1d20d,unitId:_0x48c19b,text:_0x4544d0,threadId:_0x2f4076}=_0x39229e,_0x23bcbe=(_0x452628=(_0x58947e=_0x4544d0[_0x5ec8de(0x1b7)])==null?void 0x0:_0x58947e[_0x5ec8de(0x197)](_0x30b829=>_0x30b829['rangeType']===_0x33a00d['COMMENT'])[_0x5ec8de(0x1e2)](_0x36f8f6=>_0x36f8f6[_0x5ec8de(0x1bf)]))!=null?_0x452628:[],_0x30f247=JSON['stringify'](_0x4544d0),_0x20ee8d=(await this['_sessionService']['requireSession'](_0x48c19b))[_0x5ec8de(0x1ca)]();if(_0xa1d20d){const _0x3f0741={'memberId':_0x20ee8d,'unitId':_0x48c19b,'content':_0x30f247,'mention':_0x23bcbe,'threadId':_0x2f4076},_0x2fae6b=(await this[_0x5ec8de(0x1c1)][_0x5ec8de(0x1b1)](_0x5ec8de(0x19a)+_0x48c19b+_0x5ec8de(0x186),{'body':_0x3f0741}))['body'][_0x5ec8de(0x1be)];return{..._0x39229e,'id':_0x2fae6b[_0x5ec8de(0x1ae)],'dT':_0x379e47(+_0x2fae6b[_0x5ec8de(0x1b9)])[_0x5ec8de(0x1c0)](_0x5ec8de(0x1c3)),'personId':_0x2fae6b[_0x5ec8de(0x1e1)]};}else{const _0x276939={'memberId':_0x20ee8d,'unitId':_0x48c19b,'content':_0x30f247,'mention':_0x23bcbe},_0x2bb019=await this[_0x5ec8de(0x1c1)]['post'](_0x5ec8de(0x19a)+_0x48c19b+_0x5ec8de(0x1ab),{'body':_0x276939});return X(_0x2bb019[_0x5ec8de(0x1b3)]['comment'],_0x39229e);}}async[_0x452a10(0x19c)](_0x12997a){const _0x23d545=_0x452a10;var _0x24afe1,_0x576f75;const {text:_0x354852,unitId:_0x35c1d4}=_0x12997a,_0x45a710=(_0x576f75=(_0x24afe1=_0x354852[_0x23d545(0x1b7)])==null?void 0x0:_0x24afe1[_0x23d545(0x197)](_0x51c4c2=>_0x51c4c2[_0x23d545(0x1dc)]===_0x33a00d['COMMENT'])[_0x23d545(0x1e2)](_0x50da2b=>_0x50da2b[_0x23d545(0x1bf)]))!=null?_0x576f75:[],_0x1afe26=JSON[_0x23d545(0x1a7)](_0x354852),_0x3b9ff9=_0x12997a[_0x23d545(0x1a3)],_0x3606d8=_0x12997a['id'],_0xaa494d={'memberId':(await this[_0x23d545(0x1a0)][_0x23d545(0x1cd)](_0x35c1d4))[_0x23d545(0x1ca)](),'unitId':_0x35c1d4,'threadId':_0x3b9ff9,'mention':_0x45a710,'content':_0x1afe26,'replyId':_0x3606d8},_0x4c74ae=await this['_httpService'][_0x23d545(0x1b1)](_0x23d545(0x19a)+_0x35c1d4+'/edit',{'body':_0xaa494d});return!_0x4c74ae[_0x23d545(0x1b3)][_0x23d545(0x1bd)]||_0x4c74ae['body'][_0x23d545(0x1bd)]['code']===0x1;}async['resolveComment'](_0x4bb946){const _0x32ea21=_0x452a10,{unitId:_0x11a1b4}=_0x4bb946,_0x5d4262=_0x4bb946[_0x32ea21(0x1a3)],_0x152d06={'memberId':this[_0x32ea21(0x1ba)]['getCurrentUser']()['userID'],'unitId':_0x11a1b4,'threadId':_0x5d4262,'solved':_0x4bb946[_0x32ea21(0x1d6)]?I[_0x32ea21(0x1d4)]:I[_0x32ea21(0x1ad)]},_0x5814a1=await this['_httpService'][_0x32ea21(0x1b1)](_0x32ea21(0x19a)+_0x11a1b4+_0x32ea21(0x1d8),{'body':_0x152d06});return!_0x5814a1[_0x32ea21(0x1b3)][_0x32ea21(0x1bd)]||_0x5814a1[_0x32ea21(0x1b3)]['error'][_0x32ea21(0x1b0)]===0x1;}async[_0x452a10(0x1d5)](_0x99088d,_0x2614df,_0x4fa98b,_0x3fd877){const _0x53813a=_0x452a10,_0x55957b={'memberId':(await this['_sessionService'][_0x53813a(0x1cd)](_0x99088d))[_0x53813a(0x1ca)](),'threadId':_0x4fa98b,'replyId':_0x3fd877,'unitId':_0x99088d},_0x5dccf0=await this[_0x53813a(0x1c1)]['post'](_0x53813a(0x19a)+_0x99088d+_0x53813a(0x1cf),{'body':_0x55957b});return!_0x5dccf0['body']['error']||_0x5dccf0[_0x53813a(0x1b3)]['error'][_0x53813a(0x1b0)]===0x1;}async['listComments'](_0x24fe12,_0x567744,_0x484c15){const _0x1d325d=_0x452a10,_0x238391={'unitId':_0x24fe12,'threadId':_0x484c15},_0x15a652=await this[_0x1d325d(0x1c1)][_0x1d325d(0x1b1)]('/universer-api/comment/unit/'+_0x24fe12+_0x1d325d(0x1d1),{'body':_0x238391}),_0x1e121a=_0x484c15[_0x1d325d(0x1e2)](_0x269b9a=>ee(_0x15a652[_0x1d325d(0x1b3)][_0x1d325d(0x1cc)][_0x269b9a],_0x24fe12,_0x567744))[_0x1d325d(0x197)](Boolean);return Object['values'](_0x15a652[_0x1d325d(0x1b3)][_0x1d325d(0x1dd)])[_0x1d325d(0x1a2)](_0x4fef89=>{const _0x1c773=_0x1d325d;this[_0x1c773(0x1ba)][_0x1c773(0x1aa)](_0x4fef89);}),_0x1e121a;}[_0x452a10(0x1df)](_0x50c867){const _0x3e3b36=_0x452a10;return{'id':_0x50c867['id'],'threadId':_0x50c867[_0x3e3b36(0x1a3)],'ref':_0x50c867[_0x3e3b36(0x1d3)]};}};f=Q([_(0x0,_0x4a7f4f(_0x51c5ba)),_(0x1,_0x4a7f4f(_0x36868b)),_(0x2,_0x4a7f4f(_0xd72ec9)),_(0x3,_0x4a7f4f(_0x23ae78))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x2c4c2b,_0x2cb65b,_0x1710ff,_0x237684)=>{const _0x3872f7=_0x452a10;for(var _0x3dbe1a=_0x237684>0x1?void 0x0:_0x237684?re(_0x2cb65b,_0x1710ff):_0x2cb65b,_0xf7ac5b=_0x2c4c2b[_0x3872f7(0x189)]-0x1,_0x6d86c2;_0xf7ac5b>=0x0;_0xf7ac5b--)(_0x6d86c2=_0x2c4c2b[_0xf7ac5b])&&(_0x3dbe1a=_0x6d86c2(_0x3dbe1a)||_0x3dbe1a);return _0x3dbe1a;},N=(_0x5abc13,_0x4070f4)=>(_0x5cbd10,_0x491034)=>_0x4070f4(_0x5cbd10,_0x491034,_0x5abc13);let g=class extends _0x5258c6{constructor(_0x343024,_0x4aec1d){const _0x3b85a5=_0x452a10;super(),this[_0x3b85a5(0x1a8)]=_0x343024,this[_0x3b85a5(0x18b)]=_0x4aec1d,this[_0x3b85a5(0x1cb)]();}[_0x452a10(0x1cb)](){const _0xf40890=_0x452a10;this[_0xf40890(0x1a8)]['dataSource']=this[_0xf40890(0x18b)],this[_0xf40890(0x1a8)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x5683f2),N(0x1,_0x4a7f4f(f))],g);var se=Object['defineProperty'],oe=Object[_0x452a10(0x1a5)],ne=(_0x310416,_0x1ceb09,_0x372bfc)=>_0x1ceb09 in _0x310416?se(_0x310416,_0x1ceb09,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x372bfc}):_0x310416[_0x1ceb09]=_0x372bfc,ie=(_0xd29e20,_0x8d355f,_0x52bbdd,_0x2cfb7f)=>{const _0x3ba812=_0x452a10;for(var _0x5692a8=_0x2cfb7f>0x1?void 0x0:_0x2cfb7f?oe(_0x8d355f,_0x52bbdd):_0x8d355f,_0x448f88=_0xd29e20[_0x3ba812(0x189)]-0x1,_0x4b19b2;_0x448f88>=0x0;_0x448f88--)(_0x4b19b2=_0xd29e20[_0x448f88])&&(_0x5692a8=_0x4b19b2(_0x5692a8)||_0x5692a8);return _0x5692a8;},w=(_0x61f1f8,_0x4eb698)=>(_0x2a90a8,_0x110d82)=>_0x4eb698(_0x2a90a8,_0x110d82,_0x61f1f8),$=(_0x53182a,_0x4b2aea,_0x13d5de)=>ne(_0x53182a,typeof _0x4b2aea!=_0x452a10(0x1b8)?_0x4b2aea+'':_0x4b2aea,_0x13d5de);let b=class extends _0x5405bc{constructor(_0x9310f3=M,_0x133426,_0xb5c3ee){const _0x3cc9f3=_0x452a10;super(),this[_0x3cc9f3(0x1bc)]=_0x9310f3,this[_0x3cc9f3(0x1da)]=_0x133426,this[_0x3cc9f3(0x185)]=_0xb5c3ee;const {..._0x1e6aa6}=_0x3a041d({},M,this[_0x3cc9f3(0x1bc)]);this[_0x3cc9f3(0x185)]['setConfig'](z,_0x1e6aa6);}[_0x452a10(0x1c6)](){[[f],[g],[S]]['forEach'](_0x5d9dc8=>{const _0x47e42e=_0x23a3;this['_injector'][_0x47e42e(0x1a6)](_0x5d9dc8);});}['onReady'](){const _0x5d1975=_0x452a10;this[_0x5d1975(0x1da)]['get'](g),this[_0x5d1975(0x1da)]['get'](S);}};$(b,_0x452a10(0x187),W),$(b,'type',_0x69c418['UNIVER_UNKNOWN']),b=ie([_0x50d19f(_0x33a339,_0xde1e70,_0x3ee855),w(0x1,_0x4a7f4f(_0x23ae78)),w(0x2,_0x4d40ff)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x2eefa1=_0x33c5;(function(_0x5bcb11,_0x32984c){const _0xe7c3a0=_0x33c5,_0x36272a=_0x5bcb11();while(!![]){try{const _0xe48c9c=parseInt(_0xe7c3a0(0xe1))/0x1+parseInt(_0xe7c3a0(0x120))/0x2*(parseInt(_0xe7c3a0(0x13e))/0x3)+-parseInt(_0xe7c3a0(0x101))/0x4+parseInt(_0xe7c3a0(0x12c))/0x5*(parseInt(_0xe7c3a0(0x11a))/0x6)+parseInt(_0xe7c3a0(0xf5))/0x7+-parseInt(_0xe7c3a0(0x100))/0x8+-parseInt(_0xe7c3a0(0x10c))/0x9*(parseInt(_0xe7c3a0(0x128))/0xa);if(_0xe48c9c===_0x32984c)break;else _0x36272a['push'](_0x36272a['shift']());}catch(_0x5c6431){_0x36272a['push'](_0x36272a['shift']());}}}(_0x6463,0xe75ea));import{CommentService as _0x335f00,CollaborationSessionService as _0x206ba6,UniverCollaborationClientPlugin as _0x41695a}from'@univerjs-pro/collaboration-client';function _0x6463(){const _0x501d4a=['parse','saveCommentToSnapshot','/reply','_threadCommentDataSourceService','filter','add','thread-comment-data-source.config','160962Ntciot','getCurrentUser','Delete','reply','users','requireSession','86IRWSaW','getUnit','format','threadId','replies','_commentService','userID','addUser','48170SCXBVY','OpenOrReOpen','size','rangeId','235zWDiqO','personId','get','/list','map','length','/universer-api/comment/unit/','/universer-api/user/list','Edit','Unknown','_config','_sessionService','resolved','solved','subscribe','post','ref','commentUpdate$','59643rSkLsn','Add','_threadCommentModel','onStarting','values','updateComment','comment','unitId','_userService','addComment','1596075mnthLc','delete','Reply','user','/edit','payload','_configService','userId','Solve','/solved','COMMENT','customRanges','/add','listComments','UNRECOGNIZED','disposeWithMe','getMemberID','error','deleteComment','content','8837493ayhhPy','root','dataSource','comments','forEach','YYYY/MM/DD\x20HH:mm','_initUserSync','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','createTimestamp','defineProperty','find','6786864ZaCbmx','3136916PUvTDn','getUser','body','pipe','replyId','UNIVER_UNKNOWN','stringify','rangeType','resolveComment','code','onReady','4473DcYvHI','Solved','_injector','_httpService','getOwnPropertyDescriptor','slice','type'];_0x6463=function(){return _0x501d4a;};return _0x6463();}function _0x33c5(_0x1040e9,_0x473ebc){const _0x64638e=_0x6463();return _0x33c5=function(_0x33c5ad,_0x56df46){_0x33c5ad=_0x33c5ad-0xe0;let _0x14a1be=_0x64638e[_0x33c5ad];return _0x14a1be;},_0x33c5(_0x1040e9,_0x473ebc);}import{UniverLicensePlugin as _0x41ec23}from'@univerjs-pro/license';import{dayjs as _0x10d7a4,UserManagerService as _0x6ba509,Inject as _0x5e9f15,Injector as _0x59c395,Disposable as _0x33bb5a,CustomRangeType as _0x3a53b7,UniverInstanceType as _0x3e3413,DependentOn as _0x55a14c,IConfigService as _0x534865,Plugin as _0x112fd8,merge as _0xeb62f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x477d43}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x35875e,IThreadCommentDataSourceService as _0x3dae6d}from'@univerjs/thread-comment';import{bufferTime as _0x5a3e7f}from'rxjs';import{HTTPService as _0x486639}from'@univerjs/network';const W=_0x2eefa1(0xfc);var I=(_0x3d4e0a=>(_0x3d4e0a[_0x3d4e0a['OpenOrReOpen']=0x0]=_0x2eefa1(0x129),_0x3d4e0a[_0x3d4e0a[_0x2eefa1(0x10d)]=0x1]=_0x2eefa1(0x10d),_0x3d4e0a[_0x3d4e0a[_0x2eefa1(0xef)]=-0x1]=_0x2eefa1(0xef),_0x3d4e0a))(I||{}),v=(_0xfd8539=>(_0xfd8539[_0xfd8539['Unknown']=0x0]=_0x2eefa1(0x135),_0xfd8539[_0xfd8539[_0x2eefa1(0x13f)]=0x1]=_0x2eefa1(0x13f),_0xfd8539[_0xfd8539['Reply']=0x2]=_0x2eefa1(0xe3),_0xfd8539[_0xfd8539[_0x2eefa1(0x134)]=0x3]=_0x2eefa1(0x134),_0xfd8539[_0xfd8539[_0x2eefa1(0x11c)]=0x4]=_0x2eefa1(0x11c),_0xfd8539[_0xfd8539[_0x2eefa1(0xe9)]=0x5]=_0x2eefa1(0xe9),_0xfd8539[_0xfd8539[_0x2eefa1(0xef)]=-0x1]='UNRECOGNIZED',_0xfd8539))(v||{});const D=_0x91eabc=>_0x10d7a4(new Date(+_0x91eabc))[_0x2eefa1(0x122)](_0x2eefa1(0xfa)),B=async(_0x40967c,_0x472da3)=>{const _0x42c103=_0x2eefa1,_0xd87a6=_0x40967c[_0x42c103(0x12e)](_0x6ba509),_0x5c5533=_0x40967c['get'](_0x486639);_0x472da3[_0x42c103(0xf9)](_0x3ec9e5=>{const _0x2df3ff=_0x42c103;_0xd87a6[_0x2df3ff(0x102)](_0x3ec9e5)&&_0x472da3[_0x2df3ff(0xe2)](_0x3ec9e5);}),_0x472da3[_0x42c103(0x12a)]&&(await _0x5c5533[_0x42c103(0x12e)](_0x42c103(0x133),{'params':{'userIDs':[..._0x472da3]}}))[_0x42c103(0x103)][_0x42c103(0x11e)]['forEach'](_0x248581=>{const _0x40d10c=_0x42c103;_0x248581&&_0xd87a6[_0x40d10c(0x127)](_0x248581);});};var K=Object[_0x2eefa1(0x110)],V=(_0x4612e7,_0xb7ea9b,_0x42532a,_0x20ce30)=>{const _0x477c81=_0x2eefa1;for(var _0x5b09f2=_0x20ce30>0x1?void 0x0:_0x20ce30?K(_0xb7ea9b,_0x42532a):_0xb7ea9b,_0x5a885e=_0x4612e7[_0x477c81(0x131)]-0x1,_0x25afa2;_0x5a885e>=0x0;_0x5a885e--)(_0x25afa2=_0x4612e7[_0x5a885e])&&(_0x5b09f2=_0x25afa2(_0x5b09f2)||_0x5b09f2);return _0x5b09f2;},p=(_0x4d2b13,_0x496e6f)=>(_0x563699,_0x37a32d)=>_0x496e6f(_0x563699,_0x37a32d,_0x4d2b13);let S=class extends _0x33bb5a{constructor(_0xc09b2c,_0x1ca893,_0x3edd70,_0x19655c){const _0x404c22=_0x2eefa1;super(),this['_commentService']=_0xc09b2c,this[_0x404c22(0x140)]=_0x1ca893,this[_0x404c22(0x146)]=_0x3edd70,this[_0x404c22(0x10e)]=_0x19655c,this['_init'](),this[_0x404c22(0xfb)]();}['_initUserSync'](){const _0x549c05=_0x2eefa1;this[_0x549c05(0xf0)](this['_threadCommentModel'][_0x549c05(0x13d)][_0x549c05(0x104)](_0x5a3e7f(0x10))[_0x549c05(0x13a)](_0x490ceb=>{const _0x32ed23=_0x549c05,_0x14a404=new Set();_0x490ceb[_0x32ed23(0xf9)](_0x28ca24=>{const _0x36b182=_0x32ed23;switch(_0x28ca24[_0x36b182(0x112)]){case _0x36b182(0x118):{const _0x1b82db=_0x28ca24[_0x36b182(0xe6)][_0x36b182(0x12d)];_0x14a404[_0x36b182(0x118)](_0x1b82db);break;}}}),B(this['_injector'],_0x14a404);}));}['_init'](){const _0x5c8a20=_0x2eefa1;this[_0x5c8a20(0xf0)](this[_0x5c8a20(0x125)][_0x5c8a20(0x13d)]['subscribe'](async _0x26118e=>{const _0x52b510=_0x5c8a20;var _0x4d3795,_0x5e9e2c,_0x10a585,_0x1087a2;const _0x46f0bb=(_0x4d3795=this[_0x52b510(0x140)][_0x52b510(0x121)](_0x26118e[_0x52b510(0x145)])[_0x52b510(0xff)](_0x330713=>_0x330713['threadId']===_0x26118e[_0x52b510(0x123)]))==null?void 0x0:_0x4d3795[_0x52b510(0xf6)];if(!_0x46f0bb)return;const {unitId:_0x1d03b1,subUnitId:_0x568895}=_0x46f0bb;switch(_0x26118e[_0x52b510(0xe4)]&&this['_userService'][_0x52b510(0x127)](_0x26118e[_0x52b510(0xe4)]),_0x26118e[_0x52b510(0x112)]){case v['Add']:break;case v[_0x52b510(0xe3)]:{this[_0x52b510(0x140)][_0x52b510(0xe0)](_0x1d03b1,_0x568895,{'unitId':_0x1d03b1,'subUnitId':_0x568895,'ref':'','id':_0x26118e[_0x52b510(0x105)],'dT':D(+_0x26118e['createTimestamp']),'threadId':_0x26118e[_0x52b510(0x123)],'personId':(_0x10a585=(_0x5e9e2c=_0x26118e['user'])==null?void 0x0:_0x5e9e2c[_0x52b510(0x126)])!=null?_0x10a585:_0x26118e[_0x52b510(0xe8)],'text':JSON[_0x52b510(0x113)](_0x26118e[_0x52b510(0xf4)]),'parentId':_0x46f0bb['id']});break;}case v[_0x52b510(0x11c)]:{const _0x154b25=this[_0x52b510(0x140)]['getComment'](_0x1d03b1,_0x568895,_0x26118e['replyId']);_0x154b25&&_0x154b25['parentId']&&this[_0x52b510(0x140)][_0x52b510(0xf3)](_0x1d03b1,_0x568895,_0x26118e[_0x52b510(0x105)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x52b510(0x143)](_0x1d03b1,_0x568895,{'commentId':_0x26118e[_0x52b510(0x105)],'text':JSON[_0x52b510(0x113)](_0x26118e[_0x52b510(0xf4)])});break;}case v[_0x52b510(0xe9)]:{const _0x884436=(_0x1087a2=this['_threadCommentModel'][_0x52b510(0x121)](_0x26118e[_0x52b510(0x145)])['find'](_0x18cf6e=>_0x18cf6e[_0x52b510(0x123)]===_0x26118e[_0x52b510(0x123)]))==null?void 0x0:_0x1087a2['root'];_0x884436&&this[_0x52b510(0x140)][_0x52b510(0x109)](_0x1d03b1,_0x568895,_0x884436['id'],_0x26118e['solved']===I[_0x52b510(0x10d)]);break;}}}));}};S=V([p(0x0,_0x5e9f15(_0x335f00)),p(0x1,_0x5e9f15(_0x35875e)),p(0x2,_0x5e9f15(_0x6ba509)),p(0x3,_0x5e9f15(_0x59c395))],S);const z=_0x2eefa1(0x119),M={};var k=Object[_0x2eefa1(0x110)],Q=(_0x4c084b,_0x4dec96,_0x213ffc,_0xd58ce6)=>{for(var _0x1fe7bf=_0xd58ce6>0x1?void 0x0:_0xd58ce6?k(_0x4dec96,_0x213ffc):_0x4dec96,_0x1251ca=_0x4c084b['length']-0x1,_0x509926;_0x1251ca>=0x0;_0x1251ca--)(_0x509926=_0x4c084b[_0x1251ca])&&(_0x1fe7bf=_0x509926(_0x1fe7bf)||_0x1fe7bf);return _0x1fe7bf;},_=(_0x212538,_0x18e1eb)=>(_0x4119d6,_0x2c137c)=>_0x18e1eb(_0x4119d6,_0x2c137c,_0x212538);function X(_0x2dd0da,_0x3713eb){const _0x237028=_0x2eefa1,_0xbbf00c=_0x2dd0da[_0x237028(0x124)][0x0];return{..._0x3713eb,'id':_0xbbf00c[_0x237028(0x105)],'resolved':_0x2dd0da[_0x237028(0x139)]===0x1,'dT':D(_0xbbf00c[_0x237028(0xfd)]),'personId':_0xbbf00c['userId'],'threadId':_0xbbf00c['threadId']};}function ee(_0x45ac29,_0x45cf8f,_0x899ecc){const _0xc4bd3f=_0x2eefa1;var _0x2f26d3,_0x4a1340;if(((_0x4a1340=(_0x2f26d3=_0x45ac29==null?void 0x0:_0x45ac29[_0xc4bd3f(0x124)])==null?void 0x0:_0x2f26d3[_0xc4bd3f(0x131)])!=null?_0x4a1340:0x0)>0x0){const _0x24b54e=(_0x4190ca,_0x257d38)=>({'id':_0x4190ca[_0xc4bd3f(0x105)],'threadId':_0x4190ca[_0xc4bd3f(0x123)],'dT':D(_0x4190ca[_0xc4bd3f(0xfd)]),'personId':_0x4190ca[_0xc4bd3f(0xe8)],'resolved':_0x45ac29[_0xc4bd3f(0x139)]===I[_0xc4bd3f(0x10d)],'unitId':_0x45cf8f,'subUnitId':_0x899ecc,'text':JSON[_0xc4bd3f(0x113)](_0x4190ca[_0xc4bd3f(0xf4)]),'parentId':_0x257d38}),_0x22eb88=_0x24b54e(_0x45ac29[_0xc4bd3f(0x124)][0x0]);return{..._0x22eb88,'children':_0x45ac29[_0xc4bd3f(0x124)][_0xc4bd3f(0x111)](0x1)['map'](_0x4c3757=>_0x24b54e(_0x4c3757,_0x22eb88['id']))};}return null;}let f=class{constructor(_0x587a33,_0x40e776,_0x4e0970,_0x53c763){const _0x214eb6=_0x2eefa1;this[_0x214eb6(0x10f)]=_0x587a33,this[_0x214eb6(0x146)]=_0x40e776,this[_0x214eb6(0x137)]=_0x4e0970,this['_injector']=_0x53c763;}async[_0x2eefa1(0xe0)](_0x20166e){const _0x17a77e=_0x2eefa1;var _0x306209,_0x5d7ddb;const {parentId:_0x3a691a,unitId:_0x492ab9,text:_0x54ce4d,threadId:_0x249719}=_0x20166e,_0x185f34=(_0x5d7ddb=(_0x306209=_0x54ce4d['customRanges'])==null?void 0x0:_0x306209[_0x17a77e(0x117)](_0x5ea949=>_0x5ea949[_0x17a77e(0x108)]===_0x3a53b7[_0x17a77e(0xeb)])['map'](_0x5b5830=>_0x5b5830[_0x17a77e(0x12b)]))!=null?_0x5d7ddb:[],_0x3302d7=JSON[_0x17a77e(0x107)](_0x54ce4d),_0x4027c8=(await this[_0x17a77e(0x137)][_0x17a77e(0x11f)](_0x492ab9))[_0x17a77e(0xf1)]();if(_0x3a691a){const _0x283ea1={'memberId':_0x4027c8,'unitId':_0x492ab9,'content':_0x3302d7,'mention':_0x185f34,'threadId':_0x249719},_0xd1b33d=(await this[_0x17a77e(0x10f)]['post']('/universer-api/comment/unit/'+_0x492ab9+_0x17a77e(0x115),{'body':_0x283ea1}))['body'][_0x17a77e(0x11d)];return{..._0x20166e,'id':_0xd1b33d[_0x17a77e(0x105)],'dT':_0x10d7a4(+_0xd1b33d[_0x17a77e(0xfd)])[_0x17a77e(0x122)](_0x17a77e(0xfa)),'personId':_0xd1b33d['userId']};}else{const _0x22199f={'memberId':_0x4027c8,'unitId':_0x492ab9,'content':_0x3302d7,'mention':_0x185f34},_0x46cfe8=await this['_httpService'][_0x17a77e(0x13b)]('/universer-api/comment/unit/'+_0x492ab9+_0x17a77e(0xed),{'body':_0x22199f});return X(_0x46cfe8[_0x17a77e(0x103)][_0x17a77e(0x144)],_0x20166e);}}async[_0x2eefa1(0x143)](_0x54f471){const _0x334397=_0x2eefa1;var _0x5200d4,_0x5673f4;const {text:_0x4864ce,unitId:_0xc7abeb}=_0x54f471,_0x16ba7b=(_0x5673f4=(_0x5200d4=_0x4864ce[_0x334397(0xec)])==null?void 0x0:_0x5200d4['filter'](_0x1eb381=>_0x1eb381[_0x334397(0x108)]===_0x3a53b7['COMMENT'])[_0x334397(0x130)](_0x3b5dd9=>_0x3b5dd9['rangeId']))!=null?_0x5673f4:[],_0x537661=JSON['stringify'](_0x4864ce),_0xfd5b9a=_0x54f471[_0x334397(0x123)],_0x29f32c=_0x54f471['id'],_0x3f98ae={'memberId':(await this[_0x334397(0x137)][_0x334397(0x11f)](_0xc7abeb))[_0x334397(0xf1)](),'unitId':_0xc7abeb,'threadId':_0xfd5b9a,'mention':_0x16ba7b,'content':_0x537661,'replyId':_0x29f32c},_0x227a5a=await this[_0x334397(0x10f)][_0x334397(0x13b)](_0x334397(0x132)+_0xc7abeb+_0x334397(0xe5),{'body':_0x3f98ae});return!_0x227a5a[_0x334397(0x103)]['error']||_0x227a5a[_0x334397(0x103)]['error'][_0x334397(0x10a)]===0x1;}async['resolveComment'](_0x133dc9){const _0x2cd324=_0x2eefa1,{unitId:_0x100c53}=_0x133dc9,_0x2f83e0=_0x133dc9['threadId'],_0x52bb2a={'memberId':this[_0x2cd324(0x146)][_0x2cd324(0x11b)]()[_0x2cd324(0x126)],'unitId':_0x100c53,'threadId':_0x2f83e0,'solved':_0x133dc9[_0x2cd324(0x138)]?I[_0x2cd324(0x10d)]:I[_0x2cd324(0x129)]},_0x42ae31=await this[_0x2cd324(0x10f)][_0x2cd324(0x13b)](_0x2cd324(0x132)+_0x100c53+_0x2cd324(0xea),{'body':_0x52bb2a});return!_0x42ae31[_0x2cd324(0x103)]['error']||_0x42ae31['body'][_0x2cd324(0xf2)]['code']===0x1;}async[_0x2eefa1(0xf3)](_0x58b03f,_0x2dc7b6,_0x15b514,_0x39fc01){const _0x5d0000=_0x2eefa1,_0x14884b={'memberId':(await this[_0x5d0000(0x137)]['requireSession'](_0x58b03f))[_0x5d0000(0xf1)](),'threadId':_0x15b514,'replyId':_0x39fc01,'unitId':_0x58b03f},_0x1d5573=await this['_httpService'][_0x5d0000(0x13b)](_0x5d0000(0x132)+_0x58b03f+'/delete',{'body':_0x14884b});return!_0x1d5573['body']['error']||_0x1d5573[_0x5d0000(0x103)]['error'][_0x5d0000(0x10a)]===0x1;}async[_0x2eefa1(0xee)](_0xdd85c2,_0x5a0fb6,_0x54f71b){const _0x4f5a9a=_0x2eefa1,_0x647e16={'unitId':_0xdd85c2,'threadId':_0x54f71b},_0x5461ce=await this['_httpService'][_0x4f5a9a(0x13b)](_0x4f5a9a(0x132)+_0xdd85c2+_0x4f5a9a(0x12f),{'body':_0x647e16}),_0x32063c=_0x54f71b[_0x4f5a9a(0x130)](_0x2383a0=>ee(_0x5461ce[_0x4f5a9a(0x103)][_0x4f5a9a(0xf8)][_0x2383a0],_0xdd85c2,_0x5a0fb6))[_0x4f5a9a(0x117)](Boolean);return Object[_0x4f5a9a(0x142)](_0x5461ce[_0x4f5a9a(0x103)][_0x4f5a9a(0x11e)])[_0x4f5a9a(0xf9)](_0x5c4b33=>{const _0x3288fd=_0x4f5a9a;this[_0x3288fd(0x146)]['addUser'](_0x5c4b33);}),_0x32063c;}[_0x2eefa1(0x114)](_0x3af26d){const _0x2bec03=_0x2eefa1;return{'id':_0x3af26d['id'],'threadId':_0x3af26d[_0x2bec03(0x123)],'ref':_0x3af26d[_0x2bec03(0x13c)]};}};f=Q([_(0x0,_0x5e9f15(_0x486639)),_(0x1,_0x5e9f15(_0x6ba509)),_(0x2,_0x5e9f15(_0x206ba6)),_(0x3,_0x5e9f15(_0x59c395))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x1e7b10,_0x1a357b,_0x125636,_0x1f2e2a)=>{const _0x2766ae=_0x2eefa1;for(var _0x5dda00=_0x1f2e2a>0x1?void 0x0:_0x1f2e2a?re(_0x1a357b,_0x125636):_0x1a357b,_0x26f9d4=_0x1e7b10[_0x2766ae(0x131)]-0x1,_0x792025;_0x26f9d4>=0x0;_0x26f9d4--)(_0x792025=_0x1e7b10[_0x26f9d4])&&(_0x5dda00=_0x792025(_0x5dda00)||_0x5dda00);return _0x5dda00;},N=(_0x1f19ac,_0x37e175)=>(_0x151287,_0x4e5f21)=>_0x37e175(_0x151287,_0x4e5f21,_0x1f19ac);let g=class extends _0x33bb5a{constructor(_0x565ae6,_0x583d59){const _0x3af04e=_0x2eefa1;super(),this[_0x3af04e(0x116)]=_0x565ae6,this['_threadCommentDataSource']=_0x583d59,this['_initDataSource']();}['_initDataSource'](){const _0x36b39e=_0x2eefa1;this[_0x36b39e(0x116)][_0x36b39e(0xf7)]=this['_threadCommentDataSource'],this[_0x36b39e(0x116)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x3dae6d),N(0x1,_0x5e9f15(f))],g);var se=Object[_0x2eefa1(0xfe)],oe=Object[_0x2eefa1(0x110)],ne=(_0x4c7df3,_0x132a8b,_0x4391a0)=>_0x132a8b in _0x4c7df3?se(_0x4c7df3,_0x132a8b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4391a0}):_0x4c7df3[_0x132a8b]=_0x4391a0,ie=(_0x338608,_0x576fab,_0x1ba5ff,_0x20d262)=>{const _0x15ad19=_0x2eefa1;for(var _0x375784=_0x20d262>0x1?void 0x0:_0x20d262?oe(_0x576fab,_0x1ba5ff):_0x576fab,_0x17117e=_0x338608[_0x15ad19(0x131)]-0x1,_0x3fcb61;_0x17117e>=0x0;_0x17117e--)(_0x3fcb61=_0x338608[_0x17117e])&&(_0x375784=_0x3fcb61(_0x375784)||_0x375784);return _0x375784;},w=(_0x59cca3,_0x5ba719)=>(_0x3b45ff,_0x27ccdc)=>_0x5ba719(_0x3b45ff,_0x27ccdc,_0x59cca3),$=(_0x4b366c,_0x30b389,_0x248160)=>ne(_0x4b366c,typeof _0x30b389!='symbol'?_0x30b389+'':_0x30b389,_0x248160);let b=class extends _0x112fd8{constructor(_0x2fb6fa=M,_0x26db35,_0x19a94b){const _0x2c1751=_0x2eefa1;super(),this[_0x2c1751(0x136)]=_0x2fb6fa,this[_0x2c1751(0x10e)]=_0x26db35,this[_0x2c1751(0xe7)]=_0x19a94b;const {..._0x5119eb}=_0xeb62f({},M,this[_0x2c1751(0x136)]);this[_0x2c1751(0xe7)]['setConfig'](z,_0x5119eb);}[_0x2eefa1(0x141)](){const _0x225cf5=_0x2eefa1;[[f],[g],[S]][_0x225cf5(0xf9)](_0x69ca32=>{this['_injector']['add'](_0x69ca32);});}[_0x2eefa1(0x10b)](){const _0xa5c345=_0x2eefa1;this['_injector'][_0xa5c345(0x12e)](g),this['_injector'][_0xa5c345(0x12e)](S);}};$(b,'pluginName',W),$(b,_0x2eefa1(0x112),_0x3e3413[_0x2eefa1(0x106)]),b=ie([_0x55a14c(_0x477d43,_0x41695a,_0x41ec23),w(0x1,_0x5e9f15(_0x59c395)),w(0x2,_0x534865)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js ADDED
@@ -0,0 +1 @@
1
+ const _0x2eefa1=_0x33c5;(function(_0x5bcb11,_0x32984c){const _0xe7c3a0=_0x33c5,_0x36272a=_0x5bcb11();while(!![]){try{const _0xe48c9c=parseInt(_0xe7c3a0(0xe1))/0x1+parseInt(_0xe7c3a0(0x120))/0x2*(parseInt(_0xe7c3a0(0x13e))/0x3)+-parseInt(_0xe7c3a0(0x101))/0x4+parseInt(_0xe7c3a0(0x12c))/0x5*(parseInt(_0xe7c3a0(0x11a))/0x6)+parseInt(_0xe7c3a0(0xf5))/0x7+-parseInt(_0xe7c3a0(0x100))/0x8+-parseInt(_0xe7c3a0(0x10c))/0x9*(parseInt(_0xe7c3a0(0x128))/0xa);if(_0xe48c9c===_0x32984c)break;else _0x36272a['push'](_0x36272a['shift']());}catch(_0x5c6431){_0x36272a['push'](_0x36272a['shift']());}}}(_0x6463,0xe75ea));import{CommentService as _0x335f00,CollaborationSessionService as _0x206ba6,UniverCollaborationClientPlugin as _0x41695a}from'@univerjs-pro/collaboration-client';function _0x6463(){const _0x501d4a=['parse','saveCommentToSnapshot','/reply','_threadCommentDataSourceService','filter','add','thread-comment-data-source.config','160962Ntciot','getCurrentUser','Delete','reply','users','requireSession','86IRWSaW','getUnit','format','threadId','replies','_commentService','userID','addUser','48170SCXBVY','OpenOrReOpen','size','rangeId','235zWDiqO','personId','get','/list','map','length','/universer-api/comment/unit/','/universer-api/user/list','Edit','Unknown','_config','_sessionService','resolved','solved','subscribe','post','ref','commentUpdate$','59643rSkLsn','Add','_threadCommentModel','onStarting','values','updateComment','comment','unitId','_userService','addComment','1596075mnthLc','delete','Reply','user','/edit','payload','_configService','userId','Solve','/solved','COMMENT','customRanges','/add','listComments','UNRECOGNIZED','disposeWithMe','getMemberID','error','deleteComment','content','8837493ayhhPy','root','dataSource','comments','forEach','YYYY/MM/DD\x20HH:mm','_initUserSync','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','createTimestamp','defineProperty','find','6786864ZaCbmx','3136916PUvTDn','getUser','body','pipe','replyId','UNIVER_UNKNOWN','stringify','rangeType','resolveComment','code','onReady','4473DcYvHI','Solved','_injector','_httpService','getOwnPropertyDescriptor','slice','type'];_0x6463=function(){return _0x501d4a;};return _0x6463();}function _0x33c5(_0x1040e9,_0x473ebc){const _0x64638e=_0x6463();return _0x33c5=function(_0x33c5ad,_0x56df46){_0x33c5ad=_0x33c5ad-0xe0;let _0x14a1be=_0x64638e[_0x33c5ad];return _0x14a1be;},_0x33c5(_0x1040e9,_0x473ebc);}import{UniverLicensePlugin as _0x41ec23}from'@univerjs-pro/license';import{dayjs as _0x10d7a4,UserManagerService as _0x6ba509,Inject as _0x5e9f15,Injector as _0x59c395,Disposable as _0x33bb5a,CustomRangeType as _0x3a53b7,UniverInstanceType as _0x3e3413,DependentOn as _0x55a14c,IConfigService as _0x534865,Plugin as _0x112fd8,merge as _0xeb62f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x477d43}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x35875e,IThreadCommentDataSourceService as _0x3dae6d}from'@univerjs/thread-comment';import{bufferTime as _0x5a3e7f}from'rxjs';import{HTTPService as _0x486639}from'@univerjs/network';const W=_0x2eefa1(0xfc);var I=(_0x3d4e0a=>(_0x3d4e0a[_0x3d4e0a['OpenOrReOpen']=0x0]=_0x2eefa1(0x129),_0x3d4e0a[_0x3d4e0a[_0x2eefa1(0x10d)]=0x1]=_0x2eefa1(0x10d),_0x3d4e0a[_0x3d4e0a[_0x2eefa1(0xef)]=-0x1]=_0x2eefa1(0xef),_0x3d4e0a))(I||{}),v=(_0xfd8539=>(_0xfd8539[_0xfd8539['Unknown']=0x0]=_0x2eefa1(0x135),_0xfd8539[_0xfd8539[_0x2eefa1(0x13f)]=0x1]=_0x2eefa1(0x13f),_0xfd8539[_0xfd8539['Reply']=0x2]=_0x2eefa1(0xe3),_0xfd8539[_0xfd8539[_0x2eefa1(0x134)]=0x3]=_0x2eefa1(0x134),_0xfd8539[_0xfd8539[_0x2eefa1(0x11c)]=0x4]=_0x2eefa1(0x11c),_0xfd8539[_0xfd8539[_0x2eefa1(0xe9)]=0x5]=_0x2eefa1(0xe9),_0xfd8539[_0xfd8539[_0x2eefa1(0xef)]=-0x1]='UNRECOGNIZED',_0xfd8539))(v||{});const D=_0x91eabc=>_0x10d7a4(new Date(+_0x91eabc))[_0x2eefa1(0x122)](_0x2eefa1(0xfa)),B=async(_0x40967c,_0x472da3)=>{const _0x42c103=_0x2eefa1,_0xd87a6=_0x40967c[_0x42c103(0x12e)](_0x6ba509),_0x5c5533=_0x40967c['get'](_0x486639);_0x472da3[_0x42c103(0xf9)](_0x3ec9e5=>{const _0x2df3ff=_0x42c103;_0xd87a6[_0x2df3ff(0x102)](_0x3ec9e5)&&_0x472da3[_0x2df3ff(0xe2)](_0x3ec9e5);}),_0x472da3[_0x42c103(0x12a)]&&(await _0x5c5533[_0x42c103(0x12e)](_0x42c103(0x133),{'params':{'userIDs':[..._0x472da3]}}))[_0x42c103(0x103)][_0x42c103(0x11e)]['forEach'](_0x248581=>{const _0x40d10c=_0x42c103;_0x248581&&_0xd87a6[_0x40d10c(0x127)](_0x248581);});};var K=Object[_0x2eefa1(0x110)],V=(_0x4612e7,_0xb7ea9b,_0x42532a,_0x20ce30)=>{const _0x477c81=_0x2eefa1;for(var _0x5b09f2=_0x20ce30>0x1?void 0x0:_0x20ce30?K(_0xb7ea9b,_0x42532a):_0xb7ea9b,_0x5a885e=_0x4612e7[_0x477c81(0x131)]-0x1,_0x25afa2;_0x5a885e>=0x0;_0x5a885e--)(_0x25afa2=_0x4612e7[_0x5a885e])&&(_0x5b09f2=_0x25afa2(_0x5b09f2)||_0x5b09f2);return _0x5b09f2;},p=(_0x4d2b13,_0x496e6f)=>(_0x563699,_0x37a32d)=>_0x496e6f(_0x563699,_0x37a32d,_0x4d2b13);let S=class extends _0x33bb5a{constructor(_0xc09b2c,_0x1ca893,_0x3edd70,_0x19655c){const _0x404c22=_0x2eefa1;super(),this['_commentService']=_0xc09b2c,this[_0x404c22(0x140)]=_0x1ca893,this[_0x404c22(0x146)]=_0x3edd70,this[_0x404c22(0x10e)]=_0x19655c,this['_init'](),this[_0x404c22(0xfb)]();}['_initUserSync'](){const _0x549c05=_0x2eefa1;this[_0x549c05(0xf0)](this['_threadCommentModel'][_0x549c05(0x13d)][_0x549c05(0x104)](_0x5a3e7f(0x10))[_0x549c05(0x13a)](_0x490ceb=>{const _0x32ed23=_0x549c05,_0x14a404=new Set();_0x490ceb[_0x32ed23(0xf9)](_0x28ca24=>{const _0x36b182=_0x32ed23;switch(_0x28ca24[_0x36b182(0x112)]){case _0x36b182(0x118):{const _0x1b82db=_0x28ca24[_0x36b182(0xe6)][_0x36b182(0x12d)];_0x14a404[_0x36b182(0x118)](_0x1b82db);break;}}}),B(this['_injector'],_0x14a404);}));}['_init'](){const _0x5c8a20=_0x2eefa1;this[_0x5c8a20(0xf0)](this[_0x5c8a20(0x125)][_0x5c8a20(0x13d)]['subscribe'](async _0x26118e=>{const _0x52b510=_0x5c8a20;var _0x4d3795,_0x5e9e2c,_0x10a585,_0x1087a2;const _0x46f0bb=(_0x4d3795=this[_0x52b510(0x140)][_0x52b510(0x121)](_0x26118e[_0x52b510(0x145)])[_0x52b510(0xff)](_0x330713=>_0x330713['threadId']===_0x26118e[_0x52b510(0x123)]))==null?void 0x0:_0x4d3795[_0x52b510(0xf6)];if(!_0x46f0bb)return;const {unitId:_0x1d03b1,subUnitId:_0x568895}=_0x46f0bb;switch(_0x26118e[_0x52b510(0xe4)]&&this['_userService'][_0x52b510(0x127)](_0x26118e[_0x52b510(0xe4)]),_0x26118e[_0x52b510(0x112)]){case v['Add']:break;case v[_0x52b510(0xe3)]:{this[_0x52b510(0x140)][_0x52b510(0xe0)](_0x1d03b1,_0x568895,{'unitId':_0x1d03b1,'subUnitId':_0x568895,'ref':'','id':_0x26118e[_0x52b510(0x105)],'dT':D(+_0x26118e['createTimestamp']),'threadId':_0x26118e[_0x52b510(0x123)],'personId':(_0x10a585=(_0x5e9e2c=_0x26118e['user'])==null?void 0x0:_0x5e9e2c[_0x52b510(0x126)])!=null?_0x10a585:_0x26118e[_0x52b510(0xe8)],'text':JSON[_0x52b510(0x113)](_0x26118e[_0x52b510(0xf4)]),'parentId':_0x46f0bb['id']});break;}case v[_0x52b510(0x11c)]:{const _0x154b25=this[_0x52b510(0x140)]['getComment'](_0x1d03b1,_0x568895,_0x26118e['replyId']);_0x154b25&&_0x154b25['parentId']&&this[_0x52b510(0x140)][_0x52b510(0xf3)](_0x1d03b1,_0x568895,_0x26118e[_0x52b510(0x105)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x52b510(0x143)](_0x1d03b1,_0x568895,{'commentId':_0x26118e[_0x52b510(0x105)],'text':JSON[_0x52b510(0x113)](_0x26118e[_0x52b510(0xf4)])});break;}case v[_0x52b510(0xe9)]:{const _0x884436=(_0x1087a2=this['_threadCommentModel'][_0x52b510(0x121)](_0x26118e[_0x52b510(0x145)])['find'](_0x18cf6e=>_0x18cf6e[_0x52b510(0x123)]===_0x26118e[_0x52b510(0x123)]))==null?void 0x0:_0x1087a2['root'];_0x884436&&this[_0x52b510(0x140)][_0x52b510(0x109)](_0x1d03b1,_0x568895,_0x884436['id'],_0x26118e['solved']===I[_0x52b510(0x10d)]);break;}}}));}};S=V([p(0x0,_0x5e9f15(_0x335f00)),p(0x1,_0x5e9f15(_0x35875e)),p(0x2,_0x5e9f15(_0x6ba509)),p(0x3,_0x5e9f15(_0x59c395))],S);const z=_0x2eefa1(0x119),M={};var k=Object[_0x2eefa1(0x110)],Q=(_0x4c084b,_0x4dec96,_0x213ffc,_0xd58ce6)=>{for(var _0x1fe7bf=_0xd58ce6>0x1?void 0x0:_0xd58ce6?k(_0x4dec96,_0x213ffc):_0x4dec96,_0x1251ca=_0x4c084b['length']-0x1,_0x509926;_0x1251ca>=0x0;_0x1251ca--)(_0x509926=_0x4c084b[_0x1251ca])&&(_0x1fe7bf=_0x509926(_0x1fe7bf)||_0x1fe7bf);return _0x1fe7bf;},_=(_0x212538,_0x18e1eb)=>(_0x4119d6,_0x2c137c)=>_0x18e1eb(_0x4119d6,_0x2c137c,_0x212538);function X(_0x2dd0da,_0x3713eb){const _0x237028=_0x2eefa1,_0xbbf00c=_0x2dd0da[_0x237028(0x124)][0x0];return{..._0x3713eb,'id':_0xbbf00c[_0x237028(0x105)],'resolved':_0x2dd0da[_0x237028(0x139)]===0x1,'dT':D(_0xbbf00c[_0x237028(0xfd)]),'personId':_0xbbf00c['userId'],'threadId':_0xbbf00c['threadId']};}function ee(_0x45ac29,_0x45cf8f,_0x899ecc){const _0xc4bd3f=_0x2eefa1;var _0x2f26d3,_0x4a1340;if(((_0x4a1340=(_0x2f26d3=_0x45ac29==null?void 0x0:_0x45ac29[_0xc4bd3f(0x124)])==null?void 0x0:_0x2f26d3[_0xc4bd3f(0x131)])!=null?_0x4a1340:0x0)>0x0){const _0x24b54e=(_0x4190ca,_0x257d38)=>({'id':_0x4190ca[_0xc4bd3f(0x105)],'threadId':_0x4190ca[_0xc4bd3f(0x123)],'dT':D(_0x4190ca[_0xc4bd3f(0xfd)]),'personId':_0x4190ca[_0xc4bd3f(0xe8)],'resolved':_0x45ac29[_0xc4bd3f(0x139)]===I[_0xc4bd3f(0x10d)],'unitId':_0x45cf8f,'subUnitId':_0x899ecc,'text':JSON[_0xc4bd3f(0x113)](_0x4190ca[_0xc4bd3f(0xf4)]),'parentId':_0x257d38}),_0x22eb88=_0x24b54e(_0x45ac29[_0xc4bd3f(0x124)][0x0]);return{..._0x22eb88,'children':_0x45ac29[_0xc4bd3f(0x124)][_0xc4bd3f(0x111)](0x1)['map'](_0x4c3757=>_0x24b54e(_0x4c3757,_0x22eb88['id']))};}return null;}let f=class{constructor(_0x587a33,_0x40e776,_0x4e0970,_0x53c763){const _0x214eb6=_0x2eefa1;this[_0x214eb6(0x10f)]=_0x587a33,this[_0x214eb6(0x146)]=_0x40e776,this[_0x214eb6(0x137)]=_0x4e0970,this['_injector']=_0x53c763;}async[_0x2eefa1(0xe0)](_0x20166e){const _0x17a77e=_0x2eefa1;var _0x306209,_0x5d7ddb;const {parentId:_0x3a691a,unitId:_0x492ab9,text:_0x54ce4d,threadId:_0x249719}=_0x20166e,_0x185f34=(_0x5d7ddb=(_0x306209=_0x54ce4d['customRanges'])==null?void 0x0:_0x306209[_0x17a77e(0x117)](_0x5ea949=>_0x5ea949[_0x17a77e(0x108)]===_0x3a53b7[_0x17a77e(0xeb)])['map'](_0x5b5830=>_0x5b5830[_0x17a77e(0x12b)]))!=null?_0x5d7ddb:[],_0x3302d7=JSON[_0x17a77e(0x107)](_0x54ce4d),_0x4027c8=(await this[_0x17a77e(0x137)][_0x17a77e(0x11f)](_0x492ab9))[_0x17a77e(0xf1)]();if(_0x3a691a){const _0x283ea1={'memberId':_0x4027c8,'unitId':_0x492ab9,'content':_0x3302d7,'mention':_0x185f34,'threadId':_0x249719},_0xd1b33d=(await this[_0x17a77e(0x10f)]['post']('/universer-api/comment/unit/'+_0x492ab9+_0x17a77e(0x115),{'body':_0x283ea1}))['body'][_0x17a77e(0x11d)];return{..._0x20166e,'id':_0xd1b33d[_0x17a77e(0x105)],'dT':_0x10d7a4(+_0xd1b33d[_0x17a77e(0xfd)])[_0x17a77e(0x122)](_0x17a77e(0xfa)),'personId':_0xd1b33d['userId']};}else{const _0x22199f={'memberId':_0x4027c8,'unitId':_0x492ab9,'content':_0x3302d7,'mention':_0x185f34},_0x46cfe8=await this['_httpService'][_0x17a77e(0x13b)]('/universer-api/comment/unit/'+_0x492ab9+_0x17a77e(0xed),{'body':_0x22199f});return X(_0x46cfe8[_0x17a77e(0x103)][_0x17a77e(0x144)],_0x20166e);}}async[_0x2eefa1(0x143)](_0x54f471){const _0x334397=_0x2eefa1;var _0x5200d4,_0x5673f4;const {text:_0x4864ce,unitId:_0xc7abeb}=_0x54f471,_0x16ba7b=(_0x5673f4=(_0x5200d4=_0x4864ce[_0x334397(0xec)])==null?void 0x0:_0x5200d4['filter'](_0x1eb381=>_0x1eb381[_0x334397(0x108)]===_0x3a53b7['COMMENT'])[_0x334397(0x130)](_0x3b5dd9=>_0x3b5dd9['rangeId']))!=null?_0x5673f4:[],_0x537661=JSON['stringify'](_0x4864ce),_0xfd5b9a=_0x54f471[_0x334397(0x123)],_0x29f32c=_0x54f471['id'],_0x3f98ae={'memberId':(await this[_0x334397(0x137)][_0x334397(0x11f)](_0xc7abeb))[_0x334397(0xf1)](),'unitId':_0xc7abeb,'threadId':_0xfd5b9a,'mention':_0x16ba7b,'content':_0x537661,'replyId':_0x29f32c},_0x227a5a=await this[_0x334397(0x10f)][_0x334397(0x13b)](_0x334397(0x132)+_0xc7abeb+_0x334397(0xe5),{'body':_0x3f98ae});return!_0x227a5a[_0x334397(0x103)]['error']||_0x227a5a[_0x334397(0x103)]['error'][_0x334397(0x10a)]===0x1;}async['resolveComment'](_0x133dc9){const _0x2cd324=_0x2eefa1,{unitId:_0x100c53}=_0x133dc9,_0x2f83e0=_0x133dc9['threadId'],_0x52bb2a={'memberId':this[_0x2cd324(0x146)][_0x2cd324(0x11b)]()[_0x2cd324(0x126)],'unitId':_0x100c53,'threadId':_0x2f83e0,'solved':_0x133dc9[_0x2cd324(0x138)]?I[_0x2cd324(0x10d)]:I[_0x2cd324(0x129)]},_0x42ae31=await this[_0x2cd324(0x10f)][_0x2cd324(0x13b)](_0x2cd324(0x132)+_0x100c53+_0x2cd324(0xea),{'body':_0x52bb2a});return!_0x42ae31[_0x2cd324(0x103)]['error']||_0x42ae31['body'][_0x2cd324(0xf2)]['code']===0x1;}async[_0x2eefa1(0xf3)](_0x58b03f,_0x2dc7b6,_0x15b514,_0x39fc01){const _0x5d0000=_0x2eefa1,_0x14884b={'memberId':(await this[_0x5d0000(0x137)]['requireSession'](_0x58b03f))[_0x5d0000(0xf1)](),'threadId':_0x15b514,'replyId':_0x39fc01,'unitId':_0x58b03f},_0x1d5573=await this['_httpService'][_0x5d0000(0x13b)](_0x5d0000(0x132)+_0x58b03f+'/delete',{'body':_0x14884b});return!_0x1d5573['body']['error']||_0x1d5573[_0x5d0000(0x103)]['error'][_0x5d0000(0x10a)]===0x1;}async[_0x2eefa1(0xee)](_0xdd85c2,_0x5a0fb6,_0x54f71b){const _0x4f5a9a=_0x2eefa1,_0x647e16={'unitId':_0xdd85c2,'threadId':_0x54f71b},_0x5461ce=await this['_httpService'][_0x4f5a9a(0x13b)](_0x4f5a9a(0x132)+_0xdd85c2+_0x4f5a9a(0x12f),{'body':_0x647e16}),_0x32063c=_0x54f71b[_0x4f5a9a(0x130)](_0x2383a0=>ee(_0x5461ce[_0x4f5a9a(0x103)][_0x4f5a9a(0xf8)][_0x2383a0],_0xdd85c2,_0x5a0fb6))[_0x4f5a9a(0x117)](Boolean);return Object[_0x4f5a9a(0x142)](_0x5461ce[_0x4f5a9a(0x103)][_0x4f5a9a(0x11e)])[_0x4f5a9a(0xf9)](_0x5c4b33=>{const _0x3288fd=_0x4f5a9a;this[_0x3288fd(0x146)]['addUser'](_0x5c4b33);}),_0x32063c;}[_0x2eefa1(0x114)](_0x3af26d){const _0x2bec03=_0x2eefa1;return{'id':_0x3af26d['id'],'threadId':_0x3af26d[_0x2bec03(0x123)],'ref':_0x3af26d[_0x2bec03(0x13c)]};}};f=Q([_(0x0,_0x5e9f15(_0x486639)),_(0x1,_0x5e9f15(_0x6ba509)),_(0x2,_0x5e9f15(_0x206ba6)),_(0x3,_0x5e9f15(_0x59c395))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x1e7b10,_0x1a357b,_0x125636,_0x1f2e2a)=>{const _0x2766ae=_0x2eefa1;for(var _0x5dda00=_0x1f2e2a>0x1?void 0x0:_0x1f2e2a?re(_0x1a357b,_0x125636):_0x1a357b,_0x26f9d4=_0x1e7b10[_0x2766ae(0x131)]-0x1,_0x792025;_0x26f9d4>=0x0;_0x26f9d4--)(_0x792025=_0x1e7b10[_0x26f9d4])&&(_0x5dda00=_0x792025(_0x5dda00)||_0x5dda00);return _0x5dda00;},N=(_0x1f19ac,_0x37e175)=>(_0x151287,_0x4e5f21)=>_0x37e175(_0x151287,_0x4e5f21,_0x1f19ac);let g=class extends _0x33bb5a{constructor(_0x565ae6,_0x583d59){const _0x3af04e=_0x2eefa1;super(),this[_0x3af04e(0x116)]=_0x565ae6,this['_threadCommentDataSource']=_0x583d59,this['_initDataSource']();}['_initDataSource'](){const _0x36b39e=_0x2eefa1;this[_0x36b39e(0x116)][_0x36b39e(0xf7)]=this['_threadCommentDataSource'],this[_0x36b39e(0x116)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x3dae6d),N(0x1,_0x5e9f15(f))],g);var se=Object[_0x2eefa1(0xfe)],oe=Object[_0x2eefa1(0x110)],ne=(_0x4c7df3,_0x132a8b,_0x4391a0)=>_0x132a8b in _0x4c7df3?se(_0x4c7df3,_0x132a8b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4391a0}):_0x4c7df3[_0x132a8b]=_0x4391a0,ie=(_0x338608,_0x576fab,_0x1ba5ff,_0x20d262)=>{const _0x15ad19=_0x2eefa1;for(var _0x375784=_0x20d262>0x1?void 0x0:_0x20d262?oe(_0x576fab,_0x1ba5ff):_0x576fab,_0x17117e=_0x338608[_0x15ad19(0x131)]-0x1,_0x3fcb61;_0x17117e>=0x0;_0x17117e--)(_0x3fcb61=_0x338608[_0x17117e])&&(_0x375784=_0x3fcb61(_0x375784)||_0x375784);return _0x375784;},w=(_0x59cca3,_0x5ba719)=>(_0x3b45ff,_0x27ccdc)=>_0x5ba719(_0x3b45ff,_0x27ccdc,_0x59cca3),$=(_0x4b366c,_0x30b389,_0x248160)=>ne(_0x4b366c,typeof _0x30b389!='symbol'?_0x30b389+'':_0x30b389,_0x248160);let b=class extends _0x112fd8{constructor(_0x2fb6fa=M,_0x26db35,_0x19a94b){const _0x2c1751=_0x2eefa1;super(),this[_0x2c1751(0x136)]=_0x2fb6fa,this[_0x2c1751(0x10e)]=_0x26db35,this[_0x2c1751(0xe7)]=_0x19a94b;const {..._0x5119eb}=_0xeb62f({},M,this[_0x2c1751(0x136)]);this[_0x2c1751(0xe7)]['setConfig'](z,_0x5119eb);}[_0x2eefa1(0x141)](){const _0x225cf5=_0x2eefa1;[[f],[g],[S]][_0x225cf5(0xf9)](_0x69ca32=>{this['_injector']['add'](_0x69ca32);});}[_0x2eefa1(0x10b)](){const _0xa5c345=_0x2eefa1;this['_injector'][_0xa5c345(0x12e)](g),this['_injector'][_0xa5c345(0x12e)](S);}};$(b,'pluginName',W),$(b,_0x2eefa1(0x112),_0x3e3413[_0x2eefa1(0x106)]),b=ie([_0x55a14c(_0x477d43,_0x41695a,_0x41ec23),w(0x1,_0x5e9f15(_0x59c395)),w(0x2,_0x534865)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0xf624(){const _0x49718c=['parse','_injector','_initUserSync','Unknown','user','stringify','get','UNRECOGNIZED','_initDataSource','onReady','rangeType','Injector','resolved','_init','content','_threadCommentDataSource','toStringTag','delete','_sessionService','saveCommentToSnapshot','code','COMMENT','_threadCommentModel','userID','filter','@univerjs/core','replyId','function','type','@univerjs/thread-comment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Disposable','/solved','requireSession','dataSource','getMemberID','Delete','add','_httpService','bufferTime','693513ZDIoJa','2529ZkXAOM','body','UniverLicensePlugin','_threadCommentDataSourceService','deleteComment','1702580yEUwlT','forEach','5AOuHHF','updateComment','UniverInstanceType','@univerjs-pro/collaboration-client','Module','getComment','UserManagerService','merge','values','createTimestamp','dayjs','UniverNetwork','symbol','_userService','@univerjs/thread-comment-ui','CustomRangeType','HTTPService','threadId','UniverThreadComment','Inject','post','1933870zGARjk','comment','userId','YYYY/MM/DD\x20HH:mm','_config','/add','Add','UniverThreadCommentUIPlugin','customRanges','UNIVER_UNKNOWN','syncUpdateMutationToColla','_commentService','pluginName','67176VwkSzW','error','listComments','getUnit','find','/reply','unitId','disposeWithMe','IThreadCommentDataSourceService','Solved','OpenOrReOpen','reply','map','270766PrIzSl','replies','exports','Solve','/universer-api/comment/unit/','length','UniverThreadCommentDataSourcePlugin','resolveComment','rangeId','IConfigService','onStarting','format','size','getCurrentUser','getOwnPropertyDescriptor','addComment','solved','comments','Reply','setConfig','addUser','Edit','users','Plugin','root','commentUpdate$','thread-comment-data-source.config','@univerjs/network','UniverCore','/list','rxjs','@univerjs-pro/license','pipe','1385508kIcVvj','1965929wUXjEZ','/universer-api/user/list','_configService','object','CommentService','ThreadCommentModel','slice'];_0xf624=function(){return _0x49718c;};return _0xf624();}function _0x14c5(_0x1e7471,_0x19ecf7){const _0xf62439=_0xf624();return _0x14c5=function(_0x14c5cf,_0x312a2b){_0x14c5cf=_0x14c5cf-0x70;let _0x5a969d=_0xf62439[_0x14c5cf];return _0x5a969d;},_0x14c5(_0x1e7471,_0x19ecf7);}(function(_0x2e1f11,_0x585d95){const _0x2eed4b=_0x14c5,_0x1060f2=_0x2e1f11();while(!![]){try{const _0x46ef7c=parseInt(_0x2eed4b(0x95))/0x1+-parseInt(_0x2eed4b(0x7b))/0x2+-parseInt(_0x2eed4b(0xe6))/0x3+-parseInt(_0x2eed4b(0xec))/0x4+-parseInt(_0x2eed4b(0xee))/0x5*(parseInt(_0x2eed4b(0xb6))/0x6)+-parseInt(_0x2eed4b(0xb7))/0x7+parseInt(_0x2eed4b(0x88))/0x8*(parseInt(_0x2eed4b(0xe7))/0x9);if(_0x46ef7c===_0x585d95)break;else _0x1060f2['push'](_0x1060f2['shift']());}catch(_0x3726ea){_0x1060f2['push'](_0x1060f2['shift']());}}}(_0xf624,0x78cd7),function(_0x476e56,_0x4e5e33){const _0x5d7530=_0x14c5;typeof exports==_0x5d7530(0xba)&&typeof module<'u'?_0x4e5e33(exports,require(_0x5d7530(0xf1)),require('@univerjs-pro/license'),require('@univerjs/core'),require(_0x5d7530(0x74)),require(_0x5d7530(0xdb)),require(_0x5d7530(0xb3)),require('@univerjs/network')):typeof define==_0x5d7530(0xd9)&&define['amd']?define([_0x5d7530(0x97),_0x5d7530(0xf1),_0x5d7530(0xb4),_0x5d7530(0xd7),_0x5d7530(0x74),_0x5d7530(0xdb),_0x5d7530(0xb3),_0x5d7530(0xb0)],_0x4e5e33):(_0x476e56=typeof globalThis<'u'?globalThis:_0x476e56||self,_0x4e5e33(_0x476e56['UniverProThreadCommentDatasource']={},_0x476e56['UniverProCollaborationClient'],_0x476e56['UniverProLicense'],_0x476e56[_0x5d7530(0xb1)],_0x476e56['UniverThreadCommentUi'],_0x476e56[_0x5d7530(0x78)],_0x476e56[_0x5d7530(0xb3)],_0x476e56[_0x5d7530(0x71)]));}(this,function(_0x54c007,_0x297fa0,_0x567b1d,_0x4f678e,_0x314b58,_0x19f793,_0x3c2d3e,_0x29239b){'use strict';const _0xecd8a6=_0x14c5;const _0x433969=_0xecd8a6(0xdc);var _0x4404c4=(_0x67435=>(_0x67435[_0x67435[_0xecd8a6(0x92)]=0x0]=_0xecd8a6(0x92),_0x67435[_0x67435[_0xecd8a6(0x91)]=0x1]='Solved',_0x67435[_0x67435[_0xecd8a6(0xc5)]=-0x1]=_0xecd8a6(0xc5),_0x67435))(_0x4404c4||{}),_0x58703b=(_0x5be47f=>(_0x5be47f[_0x5be47f['Unknown']=0x0]=_0xecd8a6(0xc1),_0x5be47f[_0x5be47f[_0xecd8a6(0x81)]=0x1]='Add',_0x5be47f[_0x5be47f[_0xecd8a6(0xa7)]=0x2]=_0xecd8a6(0xa7),_0x5be47f[_0x5be47f['Edit']=0x3]=_0xecd8a6(0xaa),_0x5be47f[_0x5be47f[_0xecd8a6(0xe2)]=0x4]=_0xecd8a6(0xe2),_0x5be47f[_0x5be47f[_0xecd8a6(0x98)]=0x5]=_0xecd8a6(0x98),_0x5be47f[_0x5be47f['UNRECOGNIZED']=-0x1]=_0xecd8a6(0xc5),_0x5be47f))(_0x58703b||{});const _0x31876b=_0x315033=>_0x4f678e['dayjs'](new Date(+_0x315033))[_0xecd8a6(0xa0)](_0xecd8a6(0x7e)),_0x4e7493=async(_0x3ee5be,_0x373062)=>{const _0x19d94b=_0xecd8a6,_0x217e7e=_0x3ee5be[_0x19d94b(0xc4)](_0x4f678e[_0x19d94b(0xf4)]),_0x1516bf=_0x3ee5be['get'](_0x29239b[_0x19d94b(0x76)]);_0x373062[_0x19d94b(0xed)](_0x270fbc=>{const _0x837e94=_0x19d94b;_0x217e7e['getUser'](_0x270fbc)&&_0x373062[_0x837e94(0xcf)](_0x270fbc);}),_0x373062[_0x19d94b(0xa1)]&&(await _0x1516bf[_0x19d94b(0xc4)](_0x19d94b(0xb8),{'params':{'userIDs':[..._0x373062]}}))[_0x19d94b(0xe8)]['users'][_0x19d94b(0xed)](_0x200698=>{const _0x51c981=_0x19d94b;_0x200698&&_0x217e7e[_0x51c981(0xa9)](_0x200698);});};var _0x30313f=Object[_0xecd8a6(0xa3)],_0xbe7ab4=(_0x3b0eed,_0x197405,_0x35e478,_0x3379fe)=>{const _0x56e65e=_0xecd8a6;for(var _0x5da4fa=_0x3379fe>0x1?void 0x0:_0x3379fe?_0x30313f(_0x197405,_0x35e478):_0x197405,_0x2e773c=_0x3b0eed[_0x56e65e(0x9a)]-0x1,_0x29bd72;_0x2e773c>=0x0;_0x2e773c--)(_0x29bd72=_0x3b0eed[_0x2e773c])&&(_0x5da4fa=_0x29bd72(_0x5da4fa)||_0x5da4fa);return _0x5da4fa;},_0x4d4fbd=(_0x5c89c7,_0x182da4)=>(_0x418f4d,_0xe7fe90)=>_0x182da4(_0x418f4d,_0xe7fe90,_0x5c89c7);let _0x2f7fac=class extends _0x4f678e[_0xecd8a6(0xdd)]{constructor(_0x409840,_0xb10dbc,_0x32873d,_0x39f924){const _0x4fbfd5=_0xecd8a6;super(),this[_0x4fbfd5(0x86)]=_0x409840,this[_0x4fbfd5(0xd4)]=_0xb10dbc,this[_0x4fbfd5(0x73)]=_0x32873d,this[_0x4fbfd5(0xbf)]=_0x39f924,this[_0x4fbfd5(0xcb)](),this[_0x4fbfd5(0xc0)]();}[_0xecd8a6(0xc0)](){const _0x3da5f6=_0xecd8a6;this[_0x3da5f6(0x8f)](this[_0x3da5f6(0xd4)][_0x3da5f6(0xae)][_0x3da5f6(0xb5)](_0x3c2d3e[_0x3da5f6(0xe5)](0x10))['subscribe'](_0x437685=>{const _0x2cab87=_0x3da5f6,_0x28db8d=new Set();_0x437685[_0x2cab87(0xed)](_0x4520bf=>{const _0x2b2cbe=_0x2cab87;switch(_0x4520bf[_0x2b2cbe(0xda)]){case _0x2b2cbe(0xe3):{const _0x5b6be7=_0x4520bf['payload']['personId'];_0x28db8d[_0x2b2cbe(0xe3)](_0x5b6be7);break;}}}),_0x4e7493(this[_0x2cab87(0xbf)],_0x28db8d);}));}[_0xecd8a6(0xcb)](){const _0x3adb74=_0xecd8a6;this[_0x3adb74(0x8f)](this['_commentService']['commentUpdate$']['subscribe'](async _0x4c6ba6=>{const _0x4eb332=_0x3adb74;var _0x108aac,_0x4f8ff0,_0x33921d,_0x110e34;const _0x438754=(_0x108aac=this[_0x4eb332(0xd4)][_0x4eb332(0x8b)](_0x4c6ba6[_0x4eb332(0x8e)])[_0x4eb332(0x8c)](_0xa97c90=>_0xa97c90[_0x4eb332(0x77)]===_0x4c6ba6[_0x4eb332(0x77)]))==null?void 0x0:_0x108aac[_0x4eb332(0xad)];if(!_0x438754)return;const {unitId:_0x2a19c7,subUnitId:_0x3739ad}=_0x438754;switch(_0x4c6ba6[_0x4eb332(0xc2)]&&this[_0x4eb332(0x73)][_0x4eb332(0xa9)](_0x4c6ba6[_0x4eb332(0xc2)]),_0x4c6ba6[_0x4eb332(0xda)]){case _0x58703b[_0x4eb332(0x81)]:break;case _0x58703b[_0x4eb332(0xa7)]:{this[_0x4eb332(0xd4)][_0x4eb332(0xa4)](_0x2a19c7,_0x3739ad,{'unitId':_0x2a19c7,'subUnitId':_0x3739ad,'ref':'','id':_0x4c6ba6[_0x4eb332(0xd8)],'dT':_0x31876b(+_0x4c6ba6['createTimestamp']),'threadId':_0x4c6ba6[_0x4eb332(0x77)],'personId':(_0x33921d=(_0x4f8ff0=_0x4c6ba6['user'])==null?void 0x0:_0x4f8ff0[_0x4eb332(0xd5)])!=null?_0x33921d:_0x4c6ba6[_0x4eb332(0x7d)],'text':JSON[_0x4eb332(0xbe)](_0x4c6ba6['content']),'parentId':_0x438754['id']});break;}case _0x58703b[_0x4eb332(0xe2)]:{const _0x2c7210=this[_0x4eb332(0xd4)][_0x4eb332(0xf3)](_0x2a19c7,_0x3739ad,_0x4c6ba6['replyId']);_0x2c7210&&_0x2c7210['parentId']&&this[_0x4eb332(0xd4)]['deleteComment'](_0x2a19c7,_0x3739ad,_0x4c6ba6[_0x4eb332(0xd8)]);break;}case _0x58703b[_0x4eb332(0xaa)]:{this[_0x4eb332(0xd4)][_0x4eb332(0xef)](_0x2a19c7,_0x3739ad,{'commentId':_0x4c6ba6[_0x4eb332(0xd8)],'text':JSON[_0x4eb332(0xbe)](_0x4c6ba6[_0x4eb332(0xcc)])});break;}case _0x58703b[_0x4eb332(0x98)]:{const _0x59b4dd=(_0x110e34=this['_threadCommentModel'][_0x4eb332(0x8b)](_0x4c6ba6[_0x4eb332(0x8e)])[_0x4eb332(0x8c)](_0x1ab50d=>_0x1ab50d[_0x4eb332(0x77)]===_0x4c6ba6[_0x4eb332(0x77)]))==null?void 0x0:_0x110e34['root'];_0x59b4dd&&this[_0x4eb332(0xd4)][_0x4eb332(0x9c)](_0x2a19c7,_0x3739ad,_0x59b4dd['id'],_0x4c6ba6[_0x4eb332(0xa5)]===_0x4404c4[_0x4eb332(0x91)]);break;}}}));}};_0x2f7fac=_0xbe7ab4([_0x4d4fbd(0x0,_0x4f678e[_0xecd8a6(0x79)](_0x297fa0[_0xecd8a6(0xbb)])),_0x4d4fbd(0x1,_0x4f678e[_0xecd8a6(0x79)](_0x19f793[_0xecd8a6(0xbc)])),_0x4d4fbd(0x2,_0x4f678e['Inject'](_0x4f678e[_0xecd8a6(0xf4)])),_0x4d4fbd(0x3,_0x4f678e['Inject'](_0x4f678e[_0xecd8a6(0xc9)]))],_0x2f7fac);const _0x51fd39=_0xecd8a6(0xaf),_0x1771f0={};var _0x5ddfc3=Object[_0xecd8a6(0xa3)],_0x5d6a98=(_0x396bd7,_0x1a82a1,_0x30c2a5,_0x110687)=>{const _0x3e52f9=_0xecd8a6;for(var _0x25a9f7=_0x110687>0x1?void 0x0:_0x110687?_0x5ddfc3(_0x1a82a1,_0x30c2a5):_0x1a82a1,_0xffbbef=_0x396bd7[_0x3e52f9(0x9a)]-0x1,_0x3c8472;_0xffbbef>=0x0;_0xffbbef--)(_0x3c8472=_0x396bd7[_0xffbbef])&&(_0x25a9f7=_0x3c8472(_0x25a9f7)||_0x25a9f7);return _0x25a9f7;},_0x2e891c=(_0x4b55d5,_0x453bc3)=>(_0x48438e,_0x5b1799)=>_0x453bc3(_0x48438e,_0x5b1799,_0x4b55d5);function _0x51f17d(_0xd20b89,_0x1e17a3){const _0x2b0048=_0xecd8a6,_0x49bff5=_0xd20b89[_0x2b0048(0x96)][0x0];return{..._0x1e17a3,'id':_0x49bff5[_0x2b0048(0xd8)],'resolved':_0xd20b89['solved']===0x1,'dT':_0x31876b(_0x49bff5[_0x2b0048(0xf7)]),'personId':_0x49bff5['userId'],'threadId':_0x49bff5[_0x2b0048(0x77)]};}function _0xdd07b1(_0xeba3e5,_0x5ede74,_0x1ec363){const _0x4a62d3=_0xecd8a6;var _0x15af35,_0x194347;if(((_0x194347=(_0x15af35=_0xeba3e5==null?void 0x0:_0xeba3e5[_0x4a62d3(0x96)])==null?void 0x0:_0x15af35[_0x4a62d3(0x9a)])!=null?_0x194347:0x0)>0x0){const _0x4db262=(_0x578ed2,_0x284c76)=>({'id':_0x578ed2[_0x4a62d3(0xd8)],'threadId':_0x578ed2[_0x4a62d3(0x77)],'dT':_0x31876b(_0x578ed2['createTimestamp']),'personId':_0x578ed2[_0x4a62d3(0x7d)],'resolved':_0xeba3e5[_0x4a62d3(0xa5)]===_0x4404c4[_0x4a62d3(0x91)],'unitId':_0x5ede74,'subUnitId':_0x1ec363,'text':JSON[_0x4a62d3(0xbe)](_0x578ed2[_0x4a62d3(0xcc)]),'parentId':_0x284c76}),_0xc1b7df=_0x4db262(_0xeba3e5[_0x4a62d3(0x96)][0x0]);return{..._0xc1b7df,'children':_0xeba3e5[_0x4a62d3(0x96)][_0x4a62d3(0xbd)](0x1)[_0x4a62d3(0x94)](_0x245371=>_0x4db262(_0x245371,_0xc1b7df['id']))};}return null;}let _0x4812c0=class{constructor(_0xdf6632,_0x2e298b,_0x3b1586,_0x32b9da){const _0x52f307=_0xecd8a6;this['_httpService']=_0xdf6632,this['_userService']=_0x2e298b,this[_0x52f307(0xd0)]=_0x3b1586,this[_0x52f307(0xbf)]=_0x32b9da;}async[_0xecd8a6(0xa4)](_0x54d273){const _0x2bd420=_0xecd8a6;var _0x2b59d3,_0x382172;const {parentId:_0x3d0002,unitId:_0xf98ff4,text:_0x220d89,threadId:_0x325971}=_0x54d273,_0xaddef5=(_0x382172=(_0x2b59d3=_0x220d89[_0x2bd420(0x83)])==null?void 0x0:_0x2b59d3[_0x2bd420(0xd6)](_0x37d49b=>_0x37d49b[_0x2bd420(0xc8)]===_0x4f678e[_0x2bd420(0x75)]['COMMENT'])[_0x2bd420(0x94)](_0x56f050=>_0x56f050[_0x2bd420(0x9d)]))!=null?_0x382172:[],_0x44db78=JSON['stringify'](_0x220d89),_0x13b30f=(await this[_0x2bd420(0xd0)][_0x2bd420(0xdf)](_0xf98ff4))[_0x2bd420(0xe1)]();if(_0x3d0002){const _0x18d117={'memberId':_0x13b30f,'unitId':_0xf98ff4,'content':_0x44db78,'mention':_0xaddef5,'threadId':_0x325971},_0x2bcdb2=(await this[_0x2bd420(0xe4)][_0x2bd420(0x7a)](_0x2bd420(0x99)+_0xf98ff4+_0x2bd420(0x8d),{'body':_0x18d117}))['body'][_0x2bd420(0x93)];return{..._0x54d273,'id':_0x2bcdb2[_0x2bd420(0xd8)],'dT':_0x4f678e[_0x2bd420(0x70)](+_0x2bcdb2[_0x2bd420(0xf7)])[_0x2bd420(0xa0)](_0x2bd420(0x7e)),'personId':_0x2bcdb2[_0x2bd420(0x7d)]};}else{const _0x25b8fc={'memberId':_0x13b30f,'unitId':_0xf98ff4,'content':_0x44db78,'mention':_0xaddef5},_0x317bac=await this['_httpService'][_0x2bd420(0x7a)](_0x2bd420(0x99)+_0xf98ff4+_0x2bd420(0x80),{'body':_0x25b8fc});return _0x51f17d(_0x317bac[_0x2bd420(0xe8)][_0x2bd420(0x7c)],_0x54d273);}}async['updateComment'](_0x32f9d4){const _0x2998ac=_0xecd8a6;var _0x18f582,_0x3c0933;const {text:_0x5ecbe9,unitId:_0x4b2f44}=_0x32f9d4,_0x29b7c5=(_0x3c0933=(_0x18f582=_0x5ecbe9[_0x2998ac(0x83)])==null?void 0x0:_0x18f582[_0x2998ac(0xd6)](_0x5b5980=>_0x5b5980[_0x2998ac(0xc8)]===_0x4f678e[_0x2998ac(0x75)][_0x2998ac(0xd3)])[_0x2998ac(0x94)](_0x25b820=>_0x25b820['rangeId']))!=null?_0x3c0933:[],_0x1a80f7=JSON[_0x2998ac(0xc3)](_0x5ecbe9),_0x47ca28=_0x32f9d4[_0x2998ac(0x77)],_0x2d9156=_0x32f9d4['id'],_0xaefec3={'memberId':(await this[_0x2998ac(0xd0)][_0x2998ac(0xdf)](_0x4b2f44))[_0x2998ac(0xe1)](),'unitId':_0x4b2f44,'threadId':_0x47ca28,'mention':_0x29b7c5,'content':_0x1a80f7,'replyId':_0x2d9156},_0x2acadd=await this[_0x2998ac(0xe4)][_0x2998ac(0x7a)](_0x2998ac(0x99)+_0x4b2f44+'/edit',{'body':_0xaefec3});return!_0x2acadd['body'][_0x2998ac(0x89)]||_0x2acadd[_0x2998ac(0xe8)][_0x2998ac(0x89)][_0x2998ac(0xd2)]===0x1;}async[_0xecd8a6(0x9c)](_0x1799be){const _0x8ec90a=_0xecd8a6,{unitId:_0x3c0c17}=_0x1799be,_0x36d459=_0x1799be[_0x8ec90a(0x77)],_0x9f0917={'memberId':this[_0x8ec90a(0x73)][_0x8ec90a(0xa2)]()['userID'],'unitId':_0x3c0c17,'threadId':_0x36d459,'solved':_0x1799be[_0x8ec90a(0xca)]?_0x4404c4[_0x8ec90a(0x91)]:_0x4404c4[_0x8ec90a(0x92)]},_0x10d396=await this['_httpService'][_0x8ec90a(0x7a)](_0x8ec90a(0x99)+_0x3c0c17+_0x8ec90a(0xde),{'body':_0x9f0917});return!_0x10d396['body']['error']||_0x10d396['body'][_0x8ec90a(0x89)][_0x8ec90a(0xd2)]===0x1;}async[_0xecd8a6(0xeb)](_0x5ae819,_0x54e95c,_0x39b07a,_0x2de289){const _0x20bcb9=_0xecd8a6,_0x311646={'memberId':(await this[_0x20bcb9(0xd0)][_0x20bcb9(0xdf)](_0x5ae819))[_0x20bcb9(0xe1)](),'threadId':_0x39b07a,'replyId':_0x2de289,'unitId':_0x5ae819},_0x1d316f=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x5ae819+'/delete',{'body':_0x311646});return!_0x1d316f[_0x20bcb9(0xe8)]['error']||_0x1d316f[_0x20bcb9(0xe8)][_0x20bcb9(0x89)]['code']===0x1;}async[_0xecd8a6(0x8a)](_0x11a303,_0x1a8e5b,_0x1055e4){const _0x5e7590=_0xecd8a6,_0x1d10e7={'unitId':_0x11a303,'threadId':_0x1055e4},_0x3a530b=await this[_0x5e7590(0xe4)][_0x5e7590(0x7a)]('/universer-api/comment/unit/'+_0x11a303+_0x5e7590(0xb2),{'body':_0x1d10e7}),_0x1bc4df=_0x1055e4[_0x5e7590(0x94)](_0x8d8b54=>_0xdd07b1(_0x3a530b[_0x5e7590(0xe8)][_0x5e7590(0xa6)][_0x8d8b54],_0x11a303,_0x1a8e5b))[_0x5e7590(0xd6)](Boolean);return Object[_0x5e7590(0xf6)](_0x3a530b[_0x5e7590(0xe8)][_0x5e7590(0xab)])[_0x5e7590(0xed)](_0x910a79=>{const _0x1a434b=_0x5e7590;this['_userService'][_0x1a434b(0xa9)](_0x910a79);}),_0x1bc4df;}[_0xecd8a6(0xd1)](_0x4a8f9f){const _0x392bdb=_0xecd8a6;return{'id':_0x4a8f9f['id'],'threadId':_0x4a8f9f[_0x392bdb(0x77)],'ref':_0x4a8f9f['ref']};}};_0x4812c0=_0x5d6a98([_0x2e891c(0x0,_0x4f678e[_0xecd8a6(0x79)](_0x29239b[_0xecd8a6(0x76)])),_0x2e891c(0x1,_0x4f678e[_0xecd8a6(0x79)](_0x4f678e[_0xecd8a6(0xf4)])),_0x2e891c(0x2,_0x4f678e[_0xecd8a6(0x79)](_0x297fa0['CollaborationSessionService'])),_0x2e891c(0x3,_0x4f678e['Inject'](_0x4f678e[_0xecd8a6(0xc9)]))],_0x4812c0);var _0x441abc=Object[_0xecd8a6(0xa3)],_0x4a6d61=(_0x28ac50,_0x286e59,_0x137208,_0x414a3b)=>{for(var _0x1ecf72=_0x414a3b>0x1?void 0x0:_0x414a3b?_0x441abc(_0x286e59,_0x137208):_0x286e59,_0x103573=_0x28ac50['length']-0x1,_0x9bd027;_0x103573>=0x0;_0x103573--)(_0x9bd027=_0x28ac50[_0x103573])&&(_0x1ecf72=_0x9bd027(_0x1ecf72)||_0x1ecf72);return _0x1ecf72;},_0x2755fa=(_0x42fa48,_0x13dd3b)=>(_0x2f2703,_0x39dc82)=>_0x13dd3b(_0x2f2703,_0x39dc82,_0x42fa48);let _0x3ff752=class extends _0x4f678e['Disposable']{constructor(_0x265f72,_0x39ec6b){const _0x2d2f57=_0xecd8a6;super(),this[_0x2d2f57(0xea)]=_0x265f72,this[_0x2d2f57(0xcd)]=_0x39ec6b,this[_0x2d2f57(0xc6)]();}[_0xecd8a6(0xc6)](){const _0x3d6f6d=_0xecd8a6;this[_0x3d6f6d(0xea)][_0x3d6f6d(0xe0)]=this[_0x3d6f6d(0xcd)],this[_0x3d6f6d(0xea)][_0x3d6f6d(0x85)]=!0x1;}};_0x3ff752=_0x4a6d61([_0x2755fa(0x0,_0x19f793[_0xecd8a6(0x90)]),_0x2755fa(0x1,_0x4f678e[_0xecd8a6(0x79)](_0x4812c0))],_0x3ff752);var _0x4ff897=Object['defineProperty'],_0x427f4b=Object[_0xecd8a6(0xa3)],_0x27df74=(_0x16936d,_0x2ddd97,_0xf33056)=>_0x2ddd97 in _0x16936d?_0x4ff897(_0x16936d,_0x2ddd97,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf33056}):_0x16936d[_0x2ddd97]=_0xf33056,_0x3de770=(_0x32f6be,_0x365dd8,_0xab4e91,_0x6fffbb)=>{const _0x5c7c64=_0xecd8a6;for(var _0x113f13=_0x6fffbb>0x1?void 0x0:_0x6fffbb?_0x427f4b(_0x365dd8,_0xab4e91):_0x365dd8,_0x416272=_0x32f6be[_0x5c7c64(0x9a)]-0x1,_0x401736;_0x416272>=0x0;_0x416272--)(_0x401736=_0x32f6be[_0x416272])&&(_0x113f13=_0x401736(_0x113f13)||_0x113f13);return _0x113f13;},_0x5d5747=(_0x119052,_0xe19675)=>(_0x2f19ee,_0x2652b0)=>_0xe19675(_0x2f19ee,_0x2652b0,_0x119052),_0x4f6209=(_0x2d65fc,_0x26c4e9,_0x30d1a8)=>_0x27df74(_0x2d65fc,typeof _0x26c4e9!=_0xecd8a6(0x72)?_0x26c4e9+'':_0x26c4e9,_0x30d1a8);_0x54c007[_0xecd8a6(0x9b)]=class extends _0x4f678e[_0xecd8a6(0xac)]{constructor(_0xf59df9=_0x1771f0,_0x41c68d,_0x2eae1f){const _0x120bc0=_0xecd8a6;super(),this[_0x120bc0(0x7f)]=_0xf59df9,this[_0x120bc0(0xbf)]=_0x41c68d,this[_0x120bc0(0xb9)]=_0x2eae1f;const {..._0x2e8fe6}=_0x4f678e[_0x120bc0(0xf5)]({},_0x1771f0,this[_0x120bc0(0x7f)]);this['_configService'][_0x120bc0(0xa8)](_0x51fd39,_0x2e8fe6);}[_0xecd8a6(0x9f)](){const _0x45e78e=_0xecd8a6;[[_0x4812c0],[_0x3ff752],[_0x2f7fac]][_0x45e78e(0xed)](_0x11f72b=>{const _0x580b88=_0x45e78e;this[_0x580b88(0xbf)]['add'](_0x11f72b);});}[_0xecd8a6(0xc7)](){const _0x29d21c=_0xecd8a6;this[_0x29d21c(0xbf)][_0x29d21c(0xc4)](_0x3ff752),this[_0x29d21c(0xbf)][_0x29d21c(0xc4)](_0x2f7fac);}},_0x4f6209(_0x54c007[_0xecd8a6(0x9b)],_0xecd8a6(0x87),_0x433969),_0x4f6209(_0x54c007[_0xecd8a6(0x9b)],_0xecd8a6(0xda),_0x4f678e[_0xecd8a6(0xf0)][_0xecd8a6(0x84)]),_0x54c007[_0xecd8a6(0x9b)]=_0x3de770([_0x4f678e['DependentOn'](_0x314b58[_0xecd8a6(0x82)],_0x297fa0['UniverCollaborationClientPlugin'],_0x567b1d[_0xecd8a6(0xe9)]),_0x5d5747(0x1,_0x4f678e['Inject'](_0x4f678e[_0xecd8a6(0xc9)])),_0x5d5747(0x2,_0x4f678e[_0xecd8a6(0x9e)])],_0x54c007[_0xecd8a6(0x9b)]),Object['defineProperty'](_0x54c007,Symbol[_0xecd8a6(0xce)],{'value':_0xecd8a6(0xf2)});}));
1
+ function _0x4366(){const _0x2c6fc1=['onStarting','39478656uqNKZn','getMemberID','Reply','map','amd','resolveComment','@univerjs-pro/collaboration-client','post','find','content','size','userID','ThreadCommentModel','parse','disposeWithMe','712074AxZJiy','UniverLicensePlugin','pipe','symbol','get','commentUpdate$','code','length','function','getUser','117795tMmjQs','replies','/list','UniverThreadCommentDataSourcePlugin','_sessionService','Add','saveCommentToSnapshot','_initDataSource','Delete','payload','error','reply','/universer-api/comment/unit/','bufferTime','createTimestamp','user','_userService','rxjs','object','merge','_commentService','_threadCommentModel','CollaborationSessionService','getOwnPropertyDescriptor','exports','listComments','resolved','98CKMSkH','554348TkqkLu','UniverProThreadCommentDatasource','body','slice','Disposable','60izjHpr','Edit','forEach','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','root','OpenOrReOpen','dayjs','replyId','HTTPService','IConfigService','/edit','addUser','Solve','Module','_config','UniverThreadCommentUi','userId','Injector','customRanges','updateComment','@univerjs/core','rangeType','57897uKIjAH','IThreadCommentDataSourceService','requireSession','Solved','getUnit','_initUserSync','_configService','UniverCore','deleteComment','threadId','CustomRangeType','Unknown','setConfig','UserManagerService','getCurrentUser','/universer-api/user/list','UniverProLicense','/delete','Inject','defineProperty','1288YOLVeo','UniverThreadCommentUIPlugin','UniverThreadComment','parentId','toStringTag','@univerjs/network','values','YYYY/MM/DD\x20HH:mm','4215684uxdbIa','_init','thread-comment-data-source.config','/reply','_httpService','UNRECOGNIZED','filter','_threadCommentDataSourceService','users','@univerjs/thread-comment-ui','solved','UniverCollaborationClientPlugin','add','@univerjs-pro/license','3ZcUfFc','subscribe','rangeId','30pojaCI','unitId','COMMENT','2613048sIXEXF','CommentService','_threadCommentDataSource','UniverInstanceType','type','ref','stringify','Plugin','onReady','_injector','addComment'];_0x4366=function(){return _0x2c6fc1;};return _0x4366();}function _0x422e(_0x122173,_0x1607eb){const _0x436643=_0x4366();return _0x422e=function(_0x422e0c,_0x39dfcc){_0x422e0c=_0x422e0c-0xc2;let _0xcf5b0=_0x436643[_0x422e0c];return _0xcf5b0;},_0x422e(_0x122173,_0x1607eb);}(function(_0xafd2db,_0x151048){const _0x274aff=_0x422e,_0xe34e50=_0xafd2db();while(!![]){try{const _0x3ecdae=parseInt(_0x274aff(0xc8))/0x1+-parseInt(_0x274aff(0x12f))/0x2*(parseInt(_0x274aff(0x129))/0x3)+parseInt(_0x274aff(0xe4))/0x4*(-parseInt(_0x274aff(0xe9))/0x5)+-parseInt(_0x274aff(0x14a))/0x6*(parseInt(_0x274aff(0xe3))/0x7)+parseInt(_0x274aff(0x113))/0x8*(parseInt(_0x274aff(0xff))/0x9)+parseInt(_0x274aff(0x12c))/0xa*(parseInt(_0x274aff(0x11b))/0xb)+parseInt(_0x274aff(0x13b))/0xc;if(_0x3ecdae===_0x151048)break;else _0xe34e50['push'](_0xe34e50['shift']());}catch(_0x4dd272){_0xe34e50['push'](_0xe34e50['shift']());}}}(_0x4366,0xeae06),function(_0x4c4f9a,_0x30794b){const _0x4493db=_0x422e;typeof exports==_0x4493db(0xda)&&typeof module<'u'?_0x30794b(exports,require(_0x4493db(0x141)),require(_0x4493db(0x128)),require(_0x4493db(0xfd)),require(_0x4493db(0x124)),require('@univerjs/thread-comment'),require(_0x4493db(0xd9)),require(_0x4493db(0x118))):typeof define==_0x4493db(0xc6)&&define[_0x4493db(0x13f)]?define([_0x4493db(0xe0),_0x4493db(0x141),_0x4493db(0x128),_0x4493db(0xfd),_0x4493db(0x124),'@univerjs/thread-comment',_0x4493db(0xd9),'@univerjs/network'],_0x30794b):(_0x4c4f9a=typeof globalThis<'u'?globalThis:_0x4c4f9a||self,_0x30794b(_0x4c4f9a[_0x4493db(0xe5)]={},_0x4c4f9a['UniverProCollaborationClient'],_0x4c4f9a[_0x4493db(0x10f)],_0x4c4f9a[_0x4493db(0x106)],_0x4c4f9a[_0x4493db(0xf8)],_0x4c4f9a[_0x4493db(0x115)],_0x4c4f9a[_0x4493db(0xd9)],_0x4c4f9a['UniverNetwork']));}(this,function(_0xc4d389,_0x236e32,_0x51aa1d,_0x20eae5,_0x389af7,_0x2dc60e,_0x5c56f0,_0x2c1fe8){'use strict';const _0x226e32=_0x422e;const _0x13c256=_0x226e32(0xec);var _0x2f7d7b=(_0x2a88e8=>(_0x2a88e8[_0x2a88e8[_0x226e32(0xee)]=0x0]='OpenOrReOpen',_0x2a88e8[_0x2a88e8[_0x226e32(0x102)]=0x1]=_0x226e32(0x102),_0x2a88e8[_0x2a88e8[_0x226e32(0x120)]=-0x1]=_0x226e32(0x120),_0x2a88e8))(_0x2f7d7b||{}),_0x182614=(_0x46b7f0=>(_0x46b7f0[_0x46b7f0[_0x226e32(0x10a)]=0x0]=_0x226e32(0x10a),_0x46b7f0[_0x46b7f0['Add']=0x1]=_0x226e32(0xcd),_0x46b7f0[_0x46b7f0[_0x226e32(0x13d)]=0x2]='Reply',_0x46b7f0[_0x46b7f0[_0x226e32(0xea)]=0x3]=_0x226e32(0xea),_0x46b7f0[_0x46b7f0[_0x226e32(0xd0)]=0x4]='Delete',_0x46b7f0[_0x46b7f0[_0x226e32(0xf5)]=0x5]='Solve',_0x46b7f0[_0x46b7f0[_0x226e32(0x120)]=-0x1]=_0x226e32(0x120),_0x46b7f0))(_0x182614||{});const _0x2da558=_0x5b0aa4=>_0x20eae5[_0x226e32(0xef)](new Date(+_0x5b0aa4))['format'](_0x226e32(0x11a)),_0xa05063=async(_0x67d38e,_0x35b2e4)=>{const _0x5abd7a=_0x226e32,_0x32cd68=_0x67d38e['get'](_0x20eae5[_0x5abd7a(0x10c)]),_0x3fc726=_0x67d38e['get'](_0x2c1fe8[_0x5abd7a(0xf1)]);_0x35b2e4[_0x5abd7a(0xeb)](_0x38b5e9=>{const _0x4228d3=_0x5abd7a;_0x32cd68[_0x4228d3(0xc7)](_0x38b5e9)&&_0x35b2e4['delete'](_0x38b5e9);}),_0x35b2e4[_0x5abd7a(0x145)]&&(await _0x3fc726[_0x5abd7a(0xc2)](_0x5abd7a(0x10e),{'params':{'userIDs':[..._0x35b2e4]}}))[_0x5abd7a(0xe6)]['users'][_0x5abd7a(0xeb)](_0x198e20=>{const _0x47651d=_0x5abd7a;_0x198e20&&_0x32cd68[_0x47651d(0xf4)](_0x198e20);});};var _0x32d727=Object[_0x226e32(0xdf)],_0x529a84=(_0x3e7564,_0x3da732,_0x2212be,_0x2d09af)=>{const _0x5bd061=_0x226e32;for(var _0xc27d1c=_0x2d09af>0x1?void 0x0:_0x2d09af?_0x32d727(_0x3da732,_0x2212be):_0x3da732,_0x1da862=_0x3e7564[_0x5bd061(0xc5)]-0x1,_0x501c95;_0x1da862>=0x0;_0x1da862--)(_0x501c95=_0x3e7564[_0x1da862])&&(_0xc27d1c=_0x501c95(_0xc27d1c)||_0xc27d1c);return _0xc27d1c;},_0x347e0b=(_0x431c0a,_0x5b9e61)=>(_0x4fab4e,_0x96aa5)=>_0x5b9e61(_0x4fab4e,_0x96aa5,_0x431c0a);let _0x241349=class extends _0x20eae5['Disposable']{constructor(_0x17d42e,_0xae928,_0x4d3eb8,_0x240a09){const _0x92eeb9=_0x226e32;super(),this['_commentService']=_0x17d42e,this[_0x92eeb9(0xdd)]=_0xae928,this['_userService']=_0x4d3eb8,this[_0x92eeb9(0x138)]=_0x240a09,this[_0x92eeb9(0x11c)](),this[_0x92eeb9(0x104)]();}[_0x226e32(0x104)](){const _0x18bbab=_0x226e32;this[_0x18bbab(0x149)](this[_0x18bbab(0xdd)][_0x18bbab(0xc3)][_0x18bbab(0x14c)](_0x5c56f0[_0x18bbab(0xd5)](0x10))[_0x18bbab(0x12a)](_0x329f95=>{const _0x2926a7=new Set();_0x329f95['forEach'](_0x2bb7b2=>{const _0x470f8b=_0x422e;switch(_0x2bb7b2[_0x470f8b(0x133)]){case _0x470f8b(0x127):{const _0x5481b2=_0x2bb7b2[_0x470f8b(0xd1)]['personId'];_0x2926a7[_0x470f8b(0x127)](_0x5481b2);break;}}}),_0xa05063(this['_injector'],_0x2926a7);}));}[_0x226e32(0x11c)](){const _0x417bd8=_0x226e32;this['disposeWithMe'](this[_0x417bd8(0xdc)][_0x417bd8(0xc3)][_0x417bd8(0x12a)](async _0x79885c=>{const _0x2e1e10=_0x417bd8;var _0x4b3a41,_0xde038f,_0x4506d0,_0xc032ae;const _0xc4ac11=(_0x4b3a41=this[_0x2e1e10(0xdd)][_0x2e1e10(0x103)](_0x79885c[_0x2e1e10(0x12d)])[_0x2e1e10(0x143)](_0x756aa6=>_0x756aa6['threadId']===_0x79885c[_0x2e1e10(0x108)]))==null?void 0x0:_0x4b3a41[_0x2e1e10(0xed)];if(!_0xc4ac11)return;const {unitId:_0x275b7d,subUnitId:_0x24aa66}=_0xc4ac11;switch(_0x79885c[_0x2e1e10(0xd7)]&&this[_0x2e1e10(0xd8)][_0x2e1e10(0xf4)](_0x79885c['user']),_0x79885c[_0x2e1e10(0x133)]){case _0x182614['Add']:break;case _0x182614[_0x2e1e10(0x13d)]:{this[_0x2e1e10(0xdd)][_0x2e1e10(0x139)](_0x275b7d,_0x24aa66,{'unitId':_0x275b7d,'subUnitId':_0x24aa66,'ref':'','id':_0x79885c['replyId'],'dT':_0x2da558(+_0x79885c[_0x2e1e10(0xd6)]),'threadId':_0x79885c[_0x2e1e10(0x108)],'personId':(_0x4506d0=(_0xde038f=_0x79885c[_0x2e1e10(0xd7)])==null?void 0x0:_0xde038f[_0x2e1e10(0x146)])!=null?_0x4506d0:_0x79885c['userId'],'text':JSON[_0x2e1e10(0x148)](_0x79885c['content']),'parentId':_0xc4ac11['id']});break;}case _0x182614['Delete']:{const _0x4e0f6e=this[_0x2e1e10(0xdd)]['getComment'](_0x275b7d,_0x24aa66,_0x79885c[_0x2e1e10(0xf0)]);_0x4e0f6e&&_0x4e0f6e[_0x2e1e10(0x116)]&&this['_threadCommentModel']['deleteComment'](_0x275b7d,_0x24aa66,_0x79885c[_0x2e1e10(0xf0)]);break;}case _0x182614[_0x2e1e10(0xea)]:{this[_0x2e1e10(0xdd)][_0x2e1e10(0xfc)](_0x275b7d,_0x24aa66,{'commentId':_0x79885c[_0x2e1e10(0xf0)],'text':JSON[_0x2e1e10(0x148)](_0x79885c['content'])});break;}case _0x182614[_0x2e1e10(0xf5)]:{const _0x53c3a4=(_0xc032ae=this[_0x2e1e10(0xdd)][_0x2e1e10(0x103)](_0x79885c[_0x2e1e10(0x12d)])[_0x2e1e10(0x143)](_0x38f8cc=>_0x38f8cc['threadId']===_0x79885c['threadId']))==null?void 0x0:_0xc032ae[_0x2e1e10(0xed)];_0x53c3a4&&this['_threadCommentModel'][_0x2e1e10(0x140)](_0x275b7d,_0x24aa66,_0x53c3a4['id'],_0x79885c[_0x2e1e10(0x125)]===_0x2f7d7b[_0x2e1e10(0x102)]);break;}}}));}};_0x241349=_0x529a84([_0x347e0b(0x0,_0x20eae5[_0x226e32(0x111)](_0x236e32[_0x226e32(0x130)])),_0x347e0b(0x1,_0x20eae5[_0x226e32(0x111)](_0x2dc60e[_0x226e32(0x147)])),_0x347e0b(0x2,_0x20eae5[_0x226e32(0x111)](_0x20eae5[_0x226e32(0x10c)])),_0x347e0b(0x3,_0x20eae5[_0x226e32(0x111)](_0x20eae5[_0x226e32(0xfa)]))],_0x241349);const _0x2d41f1=_0x226e32(0x11d),_0x2d7106={};var _0x2ca462=Object[_0x226e32(0xdf)],_0x2d7081=(_0x4bb4ae,_0x4f761f,_0x5c6750,_0x336a0a)=>{const _0x3fbcc5=_0x226e32;for(var _0xd4e88=_0x336a0a>0x1?void 0x0:_0x336a0a?_0x2ca462(_0x4f761f,_0x5c6750):_0x4f761f,_0x233863=_0x4bb4ae[_0x3fbcc5(0xc5)]-0x1,_0xb97f93;_0x233863>=0x0;_0x233863--)(_0xb97f93=_0x4bb4ae[_0x233863])&&(_0xd4e88=_0xb97f93(_0xd4e88)||_0xd4e88);return _0xd4e88;},_0x5c54fa=(_0x2db6f7,_0xa7697c)=>(_0x348700,_0x2d699d)=>_0xa7697c(_0x348700,_0x2d699d,_0x2db6f7);function _0x1992e3(_0x3b6ce2,_0x331ab2){const _0x44576d=_0x226e32,_0x72fc21=_0x3b6ce2['replies'][0x0];return{..._0x331ab2,'id':_0x72fc21[_0x44576d(0xf0)],'resolved':_0x3b6ce2['solved']===0x1,'dT':_0x2da558(_0x72fc21[_0x44576d(0xd6)]),'personId':_0x72fc21[_0x44576d(0xf9)],'threadId':_0x72fc21['threadId']};}function _0x1aabf7(_0x1db5e9,_0x12dd59,_0xfa57e4){const _0xe205f6=_0x226e32;var _0x3d7fc4,_0x516738;if(((_0x516738=(_0x3d7fc4=_0x1db5e9==null?void 0x0:_0x1db5e9[_0xe205f6(0xc9)])==null?void 0x0:_0x3d7fc4[_0xe205f6(0xc5)])!=null?_0x516738:0x0)>0x0){const _0x50acc3=(_0x3aeba,_0x8bcabf)=>({'id':_0x3aeba[_0xe205f6(0xf0)],'threadId':_0x3aeba['threadId'],'dT':_0x2da558(_0x3aeba[_0xe205f6(0xd6)]),'personId':_0x3aeba['userId'],'resolved':_0x1db5e9[_0xe205f6(0x125)]===_0x2f7d7b[_0xe205f6(0x102)],'unitId':_0x12dd59,'subUnitId':_0xfa57e4,'text':JSON[_0xe205f6(0x148)](_0x3aeba[_0xe205f6(0x144)]),'parentId':_0x8bcabf}),_0x343391=_0x50acc3(_0x1db5e9[_0xe205f6(0xc9)][0x0]);return{..._0x343391,'children':_0x1db5e9[_0xe205f6(0xc9)][_0xe205f6(0xe7)](0x1)['map'](_0x40e85e=>_0x50acc3(_0x40e85e,_0x343391['id']))};}return null;}let _0x506943=class{constructor(_0x7cfe94,_0x3d7853,_0x4cbca6,_0x32a881){const _0x21d776=_0x226e32;this[_0x21d776(0x11f)]=_0x7cfe94,this[_0x21d776(0xd8)]=_0x3d7853,this['_sessionService']=_0x4cbca6,this[_0x21d776(0x138)]=_0x32a881;}async[_0x226e32(0x139)](_0x1a8d94){const _0x21b582=_0x226e32;var _0x1df8c1,_0x492b54;const {parentId:_0x3314a2,unitId:_0x1d856b,text:_0x6373ec,threadId:_0x32e938}=_0x1a8d94,_0x3afc00=(_0x492b54=(_0x1df8c1=_0x6373ec[_0x21b582(0xfb)])==null?void 0x0:_0x1df8c1[_0x21b582(0x121)](_0x15df89=>_0x15df89[_0x21b582(0xfe)]===_0x20eae5[_0x21b582(0x109)][_0x21b582(0x12e)])[_0x21b582(0x13e)](_0x4bb8eb=>_0x4bb8eb[_0x21b582(0x12b)]))!=null?_0x492b54:[],_0x3ef754=JSON[_0x21b582(0x135)](_0x6373ec),_0x39517c=(await this[_0x21b582(0xcc)][_0x21b582(0x101)](_0x1d856b))['getMemberID']();if(_0x3314a2){const _0x5466d9={'memberId':_0x39517c,'unitId':_0x1d856b,'content':_0x3ef754,'mention':_0x3afc00,'threadId':_0x32e938},_0xe6d578=(await this[_0x21b582(0x11f)][_0x21b582(0x142)](_0x21b582(0xd4)+_0x1d856b+_0x21b582(0x11e),{'body':_0x5466d9}))[_0x21b582(0xe6)][_0x21b582(0xd3)];return{..._0x1a8d94,'id':_0xe6d578['replyId'],'dT':_0x20eae5[_0x21b582(0xef)](+_0xe6d578[_0x21b582(0xd6)])['format'](_0x21b582(0x11a)),'personId':_0xe6d578[_0x21b582(0xf9)]};}else{const _0x2aad6e={'memberId':_0x39517c,'unitId':_0x1d856b,'content':_0x3ef754,'mention':_0x3afc00},_0x17ab50=await this[_0x21b582(0x11f)][_0x21b582(0x142)](_0x21b582(0xd4)+_0x1d856b+'/add',{'body':_0x2aad6e});return _0x1992e3(_0x17ab50[_0x21b582(0xe6)]['comment'],_0x1a8d94);}}async[_0x226e32(0xfc)](_0x3777df){const _0x543bbc=_0x226e32;var _0x38f242,_0x1f5a4b;const {text:_0x362ff6,unitId:_0x5d0f1f}=_0x3777df,_0x5c91b8=(_0x1f5a4b=(_0x38f242=_0x362ff6[_0x543bbc(0xfb)])==null?void 0x0:_0x38f242[_0x543bbc(0x121)](_0x44b893=>_0x44b893[_0x543bbc(0xfe)]===_0x20eae5[_0x543bbc(0x109)]['COMMENT'])['map'](_0x183af5=>_0x183af5[_0x543bbc(0x12b)]))!=null?_0x1f5a4b:[],_0x511bf5=JSON[_0x543bbc(0x135)](_0x362ff6),_0x28212c=_0x3777df[_0x543bbc(0x108)],_0x1adf7b=_0x3777df['id'],_0x149bf3={'memberId':(await this[_0x543bbc(0xcc)][_0x543bbc(0x101)](_0x5d0f1f))['getMemberID'](),'unitId':_0x5d0f1f,'threadId':_0x28212c,'mention':_0x5c91b8,'content':_0x511bf5,'replyId':_0x1adf7b},_0x4b9468=await this[_0x543bbc(0x11f)][_0x543bbc(0x142)]('/universer-api/comment/unit/'+_0x5d0f1f+_0x543bbc(0xf3),{'body':_0x149bf3});return!_0x4b9468[_0x543bbc(0xe6)][_0x543bbc(0xd2)]||_0x4b9468[_0x543bbc(0xe6)][_0x543bbc(0xd2)][_0x543bbc(0xc4)]===0x1;}async[_0x226e32(0x140)](_0x7d4b1){const _0x372c3d=_0x226e32,{unitId:_0x5bb683}=_0x7d4b1,_0x3d05a4=_0x7d4b1[_0x372c3d(0x108)],_0xe4ab08={'memberId':this[_0x372c3d(0xd8)][_0x372c3d(0x10d)]()[_0x372c3d(0x146)],'unitId':_0x5bb683,'threadId':_0x3d05a4,'solved':_0x7d4b1[_0x372c3d(0xe2)]?_0x2f7d7b[_0x372c3d(0x102)]:_0x2f7d7b[_0x372c3d(0xee)]},_0x2ee269=await this[_0x372c3d(0x11f)][_0x372c3d(0x142)]('/universer-api/comment/unit/'+_0x5bb683+'/solved',{'body':_0xe4ab08});return!_0x2ee269[_0x372c3d(0xe6)][_0x372c3d(0xd2)]||_0x2ee269[_0x372c3d(0xe6)][_0x372c3d(0xd2)][_0x372c3d(0xc4)]===0x1;}async[_0x226e32(0x107)](_0x198d35,_0x5e006b,_0x3cf839,_0x54af6b){const _0x3379cc=_0x226e32,_0xb5c288={'memberId':(await this['_sessionService'][_0x3379cc(0x101)](_0x198d35))[_0x3379cc(0x13c)](),'threadId':_0x3cf839,'replyId':_0x54af6b,'unitId':_0x198d35},_0x419120=await this[_0x3379cc(0x11f)][_0x3379cc(0x142)](_0x3379cc(0xd4)+_0x198d35+_0x3379cc(0x110),{'body':_0xb5c288});return!_0x419120[_0x3379cc(0xe6)][_0x3379cc(0xd2)]||_0x419120[_0x3379cc(0xe6)]['error'][_0x3379cc(0xc4)]===0x1;}async[_0x226e32(0xe1)](_0x3b2210,_0x6bcf0a,_0x1f525a){const _0x3be5f0=_0x226e32,_0xb053a6={'unitId':_0x3b2210,'threadId':_0x1f525a},_0x43eebb=await this['_httpService'][_0x3be5f0(0x142)](_0x3be5f0(0xd4)+_0x3b2210+_0x3be5f0(0xca),{'body':_0xb053a6}),_0x27bd2b=_0x1f525a[_0x3be5f0(0x13e)](_0x4245cc=>_0x1aabf7(_0x43eebb['body']['comments'][_0x4245cc],_0x3b2210,_0x6bcf0a))['filter'](Boolean);return Object[_0x3be5f0(0x119)](_0x43eebb['body'][_0x3be5f0(0x123)])[_0x3be5f0(0xeb)](_0x1613d5=>{const _0x5764f2=_0x3be5f0;this[_0x5764f2(0xd8)][_0x5764f2(0xf4)](_0x1613d5);}),_0x27bd2b;}[_0x226e32(0xce)](_0x5cbb68){const _0x4ba0c9=_0x226e32;return{'id':_0x5cbb68['id'],'threadId':_0x5cbb68[_0x4ba0c9(0x108)],'ref':_0x5cbb68[_0x4ba0c9(0x134)]};}};_0x506943=_0x2d7081([_0x5c54fa(0x0,_0x20eae5[_0x226e32(0x111)](_0x2c1fe8['HTTPService'])),_0x5c54fa(0x1,_0x20eae5[_0x226e32(0x111)](_0x20eae5['UserManagerService'])),_0x5c54fa(0x2,_0x20eae5[_0x226e32(0x111)](_0x236e32[_0x226e32(0xde)])),_0x5c54fa(0x3,_0x20eae5['Inject'](_0x20eae5[_0x226e32(0xfa)]))],_0x506943);var _0x26c8ec=Object[_0x226e32(0xdf)],_0x29cb70=(_0x4db3a4,_0x332c1a,_0x338a52,_0x27df4d)=>{const _0x2160d9=_0x226e32;for(var _0x288d15=_0x27df4d>0x1?void 0x0:_0x27df4d?_0x26c8ec(_0x332c1a,_0x338a52):_0x332c1a,_0x212e5c=_0x4db3a4[_0x2160d9(0xc5)]-0x1,_0x41ec89;_0x212e5c>=0x0;_0x212e5c--)(_0x41ec89=_0x4db3a4[_0x212e5c])&&(_0x288d15=_0x41ec89(_0x288d15)||_0x288d15);return _0x288d15;},_0x4c2b3f=(_0xfb7b6e,_0x35fe39)=>(_0x3f29a1,_0x4733d3)=>_0x35fe39(_0x3f29a1,_0x4733d3,_0xfb7b6e);let _0x40db72=class extends _0x20eae5[_0x226e32(0xe8)]{constructor(_0x4d4dc4,_0x52380c){const _0x530bdf=_0x226e32;super(),this[_0x530bdf(0x122)]=_0x4d4dc4,this[_0x530bdf(0x131)]=_0x52380c,this[_0x530bdf(0xcf)]();}[_0x226e32(0xcf)](){const _0x1fde8f=_0x226e32;this[_0x1fde8f(0x122)]['dataSource']=this[_0x1fde8f(0x131)],this[_0x1fde8f(0x122)]['syncUpdateMutationToColla']=!0x1;}};_0x40db72=_0x29cb70([_0x4c2b3f(0x0,_0x2dc60e[_0x226e32(0x100)]),_0x4c2b3f(0x1,_0x20eae5[_0x226e32(0x111)](_0x506943))],_0x40db72);var _0xf3faf6=Object[_0x226e32(0x112)],_0x290e36=Object[_0x226e32(0xdf)],_0x1bf108=(_0xd37e08,_0x174cbf,_0x36d2fe)=>_0x174cbf in _0xd37e08?_0xf3faf6(_0xd37e08,_0x174cbf,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x36d2fe}):_0xd37e08[_0x174cbf]=_0x36d2fe,_0x296b56=(_0x1cb3fc,_0xa0d24f,_0x5988f0,_0x14e0c0)=>{for(var _0x47b959=_0x14e0c0>0x1?void 0x0:_0x14e0c0?_0x290e36(_0xa0d24f,_0x5988f0):_0xa0d24f,_0x2919af=_0x1cb3fc['length']-0x1,_0x55ba06;_0x2919af>=0x0;_0x2919af--)(_0x55ba06=_0x1cb3fc[_0x2919af])&&(_0x47b959=_0x55ba06(_0x47b959)||_0x47b959);return _0x47b959;},_0x4e16c1=(_0x3be1d5,_0x18a7dc)=>(_0x286414,_0x6119bd)=>_0x18a7dc(_0x286414,_0x6119bd,_0x3be1d5),_0x257f33=(_0x2b1c44,_0x7bb160,_0x10c553)=>_0x1bf108(_0x2b1c44,typeof _0x7bb160!=_0x226e32(0x14d)?_0x7bb160+'':_0x7bb160,_0x10c553);_0xc4d389[_0x226e32(0xcb)]=class extends _0x20eae5[_0x226e32(0x136)]{constructor(_0x4623c=_0x2d7106,_0x22af01,_0x4234e2){const _0x47807f=_0x226e32;super(),this[_0x47807f(0xf7)]=_0x4623c,this[_0x47807f(0x138)]=_0x22af01,this[_0x47807f(0x105)]=_0x4234e2;const {..._0x262c10}=_0x20eae5[_0x47807f(0xdb)]({},_0x2d7106,this[_0x47807f(0xf7)]);this[_0x47807f(0x105)][_0x47807f(0x10b)](_0x2d41f1,_0x262c10);}[_0x226e32(0x13a)](){const _0x104ed2=_0x226e32;[[_0x506943],[_0x40db72],[_0x241349]][_0x104ed2(0xeb)](_0xa6e304=>{const _0x5312cf=_0x104ed2;this[_0x5312cf(0x138)][_0x5312cf(0x127)](_0xa6e304);});}[_0x226e32(0x137)](){const _0x3d1072=_0x226e32;this[_0x3d1072(0x138)][_0x3d1072(0xc2)](_0x40db72),this[_0x3d1072(0x138)][_0x3d1072(0xc2)](_0x241349);}},_0x257f33(_0xc4d389[_0x226e32(0xcb)],'pluginName',_0x13c256),_0x257f33(_0xc4d389[_0x226e32(0xcb)],_0x226e32(0x133),_0x20eae5[_0x226e32(0x132)]['UNIVER_UNKNOWN']),_0xc4d389[_0x226e32(0xcb)]=_0x296b56([_0x20eae5['DependentOn'](_0x389af7[_0x226e32(0x114)],_0x236e32[_0x226e32(0x126)],_0x51aa1d[_0x226e32(0x14b)]),_0x4e16c1(0x1,_0x20eae5['Inject'](_0x20eae5[_0x226e32(0xfa)])),_0x4e16c1(0x2,_0x20eae5[_0x226e32(0xf2)])],_0xc4d389[_0x226e32(0xcb)]),Object[_0x226e32(0x112)](_0xc4d389,Symbol[_0x226e32(0x117)],{'value':_0x226e32(0xf6)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.6.6",
3
+ "version": "0.6.7-nightly.202503261607",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.6.6",
49
- "@univerjs-pro/license": "0.6.6",
50
- "@univerjs/protocol": "0.1.44-alpha.3",
51
- "@univerjs/core": "0.6.6",
52
- "@univerjs/thread-comment-ui": "0.6.6",
53
- "@univerjs/network": "0.6.6",
54
- "@univerjs/thread-comment": "0.6.6"
48
+ "@univerjs-pro/collaboration-client": "0.6.7-nightly.202503261607",
49
+ "@univerjs-pro/license": "0.6.7-nightly.202503261607",
50
+ "@univerjs/core": "0.6.7-nightly.202503261607",
51
+ "@univerjs/network": "0.6.7-nightly.202503261607",
52
+ "@univerjs/thread-comment": "0.6.7-nightly.202503261607",
53
+ "@univerjs/protocol": "0.1.45",
54
+ "@univerjs/thread-comment-ui": "0.6.7-nightly.202503261607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",
58
58
  "typescript": "^5.8.2",
59
- "vite": "^6.2.1",
60
- "vitest": "^3.0.8",
61
- "@univerjs-infra/shared": "0.6.6"
59
+ "vite": "^6.2.2",
60
+ "vitest": "^3.0.9",
61
+ "@univerjs-infra/shared": "0.6.7"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",