@univerjs-pro/thread-comment-datasource 0.15.0 → 0.15.1-insiders.20260117-8ce4a01

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 _0x52a573=_0x5428;(function(_0x25a06b,_0x13d33f){const _0x41bad5=_0x5428,_0x2386f2=_0x25a06b();while(!![]){try{const _0x3973fb=-parseInt(_0x41bad5(0x1fe))/0x1+parseInt(_0x41bad5(0x208))/0x2+-parseInt(_0x41bad5(0x1f9))/0x3*(parseInt(_0x41bad5(0x1eb))/0x4)+parseInt(_0x41bad5(0x201))/0x5+parseInt(_0x41bad5(0x23f))/0x6+-parseInt(_0x41bad5(0x1fb))/0x7+-parseInt(_0x41bad5(0x1e8))/0x8;if(_0x3973fb===_0x13d33f)break;else _0x2386f2['push'](_0x2386f2['shift']());}catch(_0x17e512){_0x2386f2['push'](_0x2386f2['shift']());}}}(_0x5888,0x46940));function _0x5428(_0x37e14b,_0x337c81){_0x37e14b=_0x37e14b-0x1cc;const _0x588886=_0x5888();let _0x5428f1=_0x588886[_0x37e14b];return _0x5428f1;}Object[_0x52a573(0x205)](exports,Symbol['toStringTag'],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x52a573(0x225);var I=(_0x2cf7e1=>(_0x2cf7e1[_0x2cf7e1[_0x52a573(0x23e)]=0x0]=_0x52a573(0x23e),_0x2cf7e1[_0x2cf7e1[_0x52a573(0x1f8)]=0x1]=_0x52a573(0x1f8),_0x2cf7e1[_0x2cf7e1[_0x52a573(0x1e2)]=-0x1]='UNRECOGNIZED',_0x2cf7e1))(I||{}),v=(_0x79f5b6=>(_0x79f5b6[_0x79f5b6[_0x52a573(0x207)]=0x0]=_0x52a573(0x207),_0x79f5b6[_0x79f5b6[_0x52a573(0x1f4)]=0x1]='Add',_0x79f5b6[_0x79f5b6[_0x52a573(0x22d)]=0x2]=_0x52a573(0x22d),_0x79f5b6[_0x79f5b6[_0x52a573(0x211)]=0x3]='Edit',_0x79f5b6[_0x79f5b6['Delete']=0x4]='Delete',_0x79f5b6[_0x79f5b6[_0x52a573(0x1e9)]=0x5]=_0x52a573(0x1e9),_0x79f5b6[_0x79f5b6['UNRECOGNIZED']=-0x1]=_0x52a573(0x1e2),_0x79f5b6))(v||{});const f=_0x1198c2=>c[_0x52a573(0x20f)](new Date(+_0x1198c2))[_0x52a573(0x233)](_0x52a573(0x21d)),R=async(_0x51ad37,_0xf15889)=>{const _0x58788f=_0x52a573,_0x5a6b59=_0x51ad37[_0x58788f(0x1d7)](c['UserManagerService']),_0x234ed4=_0x51ad37['get'](P['HTTPService']);_0xf15889['forEach'](_0x506aeb=>{const _0xa4918e=_0x58788f;_0x5a6b59[_0xa4918e(0x1f3)](_0x506aeb)&&_0xf15889[_0xa4918e(0x1d3)](_0x506aeb);}),_0xf15889[_0x58788f(0x222)]&&(await _0x234ed4[_0x58788f(0x1d7)](_0x58788f(0x204),{'params':{'userIDs':[..._0xf15889]}}))[_0x58788f(0x232)][_0x58788f(0x206)][_0x58788f(0x1e5)](_0xf9ca=>{const _0x446a12=_0x58788f;_0xf9ca&&_0x5a6b59[_0x446a12(0x23c)](_0xf9ca);});};var $=Object[_0x52a573(0x21f)],E=(_0x5bf21f,_0x30803b,_0x46fa19,_0x3d3738)=>{const _0x5bdcff=_0x52a573;for(var _0x16a938=_0x3d3738>0x1?void 0x0:_0x3d3738?$(_0x30803b,_0x46fa19):_0x30803b,_0x722050=_0x5bf21f[_0x5bdcff(0x1e3)]-0x1,_0x353a3b;_0x722050>=0x0;_0x722050--)(_0x353a3b=_0x5bf21f[_0x722050])&&(_0x16a938=_0x353a3b(_0x16a938)||_0x16a938);return _0x16a938;},S=(_0x3356fd,_0x2d6c00)=>(_0x25a008,_0x134064)=>_0x2d6c00(_0x25a008,_0x134064,_0x3356fd);let _=class extends c[_0x52a573(0x23b)]{constructor(_0x981e09,_0x221f99,_0x4dc5de,_0x49b8ce){const _0x13045d=_0x52a573;super(),this[_0x13045d(0x1d6)]=_0x981e09,this['_threadCommentModel']=_0x221f99,this['_userService']=_0x4dc5de,this[_0x13045d(0x1cd)]=_0x49b8ce,this[_0x13045d(0x1e0)](),this[_0x13045d(0x1db)]();}[_0x52a573(0x1db)](){const _0x33283b=_0x52a573;this[_0x33283b(0x1d2)](this['_threadCommentModel'][_0x33283b(0x228)]['pipe'](j['bufferTime'](0x10))['subscribe'](_0x820741=>{const _0x437f32=_0x33283b,_0x4d9e04=new Set();_0x820741[_0x437f32(0x1e5)](_0x306e57=>{const _0x34daea=_0x437f32;if(_0x306e57[_0x34daea(0x20e)]===_0x34daea(0x236)){const _0x2486e9=_0x306e57['payload'][_0x34daea(0x1d9)];_0x4d9e04['add'](_0x2486e9);}}),R(this[_0x437f32(0x1cd)],_0x4d9e04);}));}['_init'](){const _0x4347c1=_0x52a573;this[_0x4347c1(0x1d2)](this[_0x4347c1(0x1d6)][_0x4347c1(0x228)][_0x4347c1(0x223)](async _0x32556b=>{const _0x44cb02=_0x4347c1;var _0x1fcf69,_0x5c3ab2,_0x111334,_0x4ec98c;const _0x138744=(_0x1fcf69=this[_0x44cb02(0x220)]['getUnit'](_0x32556b['unitId'])[_0x44cb02(0x1fa)](_0x324120=>_0x324120[_0x44cb02(0x1ee)]===_0x32556b[_0x44cb02(0x1ee)]))==null?void 0x0:_0x1fcf69[_0x44cb02(0x1ec)];if(!_0x138744)return;const {unitId:_0x1b831e,subUnitId:_0x3f0e17}=_0x138744;switch(_0x32556b[_0x44cb02(0x1ea)]&&this[_0x44cb02(0x1fc)][_0x44cb02(0x23c)](_0x32556b[_0x44cb02(0x1ea)]),_0x32556b['type']){case v[_0x44cb02(0x1f4)]:break;case v[_0x44cb02(0x22d)]:{this[_0x44cb02(0x220)][_0x44cb02(0x23a)](_0x1b831e,_0x3f0e17,{'unitId':_0x1b831e,'subUnitId':_0x3f0e17,'ref':'','id':_0x32556b[_0x44cb02(0x202)],'dT':f(+_0x32556b[_0x44cb02(0x1e1)]),'threadId':_0x32556b[_0x44cb02(0x1ee)],'personId':(_0x111334=(_0x5c3ab2=_0x32556b[_0x44cb02(0x1ea)])==null?void 0x0:_0x5c3ab2[_0x44cb02(0x210)])!=null?_0x111334:_0x32556b['userId'],'text':JSON['parse'](_0x32556b['content']),'parentId':_0x138744['id']});break;}case v[_0x44cb02(0x1e6)]:{const _0x3ba2f3=this[_0x44cb02(0x220)][_0x44cb02(0x218)](_0x1b831e,_0x3f0e17,_0x32556b[_0x44cb02(0x202)]);_0x3ba2f3&&_0x3ba2f3['parentId']&&this[_0x44cb02(0x220)]['deleteComment'](_0x1b831e,_0x3f0e17,_0x32556b[_0x44cb02(0x202)]);break;}case v['Edit']:{this[_0x44cb02(0x220)]['updateComment'](_0x1b831e,_0x3f0e17,{'commentId':_0x32556b[_0x44cb02(0x202)],'text':JSON[_0x44cb02(0x235)](_0x32556b['content'])});break;}case v[_0x44cb02(0x1e9)]:{const _0x45243c=(_0x4ec98c=this['_threadCommentModel'][_0x44cb02(0x1d8)](_0x32556b[_0x44cb02(0x229)])[_0x44cb02(0x1fa)](_0x1ccc9a=>_0x1ccc9a[_0x44cb02(0x1ee)]===_0x32556b['threadId']))==null?void 0x0:_0x4ec98c[_0x44cb02(0x1ec)];_0x45243c&&this[_0x44cb02(0x220)][_0x44cb02(0x1f6)](_0x1b831e,_0x3f0e17,_0x45243c['id'],_0x32556b[_0x44cb02(0x230)]===I[_0x44cb02(0x1f8)]);break;}}}));}};_=E([S(0x0,c[_0x52a573(0x1d1)](b[_0x52a573(0x1e4)])),S(0x1,c[_0x52a573(0x1d1)](M[_0x52a573(0x238)])),S(0x2,c[_0x52a573(0x1d1)](c[_0x52a573(0x1f2)])),S(0x3,c[_0x52a573(0x1d1)](c[_0x52a573(0x1de)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x52a573(0x21f)],x=(_0x42ad20,_0x56f843,_0x4d43b2,_0x43fc74)=>{const _0x46d6cb=_0x52a573;for(var _0x47d702=_0x43fc74>0x1?void 0x0:_0x43fc74?A(_0x56f843,_0x4d43b2):_0x56f843,_0x23ce9f=_0x42ad20[_0x46d6cb(0x1e3)]-0x1,_0x23a1ac;_0x23ce9f>=0x0;_0x23ce9f--)(_0x23a1ac=_0x42ad20[_0x23ce9f])&&(_0x47d702=_0x23a1ac(_0x47d702)||_0x47d702);return _0x47d702;},C=(_0x31c4e6,_0xf0b25e)=>(_0x22b64d,_0x3130ce)=>_0xf0b25e(_0x22b64d,_0x3130ce,_0x31c4e6);function Y(_0x2bcb0a,_0x1623e0){const _0x722a3d=_0x52a573,_0x5ea73a=_0x2bcb0a['replies'][0x0];return{..._0x1623e0,'id':_0x5ea73a[_0x722a3d(0x202)],'resolved':_0x2bcb0a[_0x722a3d(0x230)]===0x1,'dT':f(_0x5ea73a[_0x722a3d(0x1e1)]),'personId':_0x5ea73a['userId'],'threadId':_0x5ea73a[_0x722a3d(0x1ee)]};}function G(_0x34cb52,_0x44b60c,_0x230551){const _0x47b125=_0x52a573;var _0x13e58,_0x4100ac;if(((_0x4100ac=(_0x13e58=_0x34cb52==null?void 0x0:_0x34cb52[_0x47b125(0x22f)])==null?void 0x0:_0x13e58[_0x47b125(0x1e3)])!=null?_0x4100ac:0x0)>0x0){const _0x524228=(_0x2406e8,_0x1ab767)=>({'id':_0x2406e8[_0x47b125(0x202)],'threadId':_0x2406e8['threadId'],'dT':f(_0x2406e8[_0x47b125(0x1e1)]),'personId':_0x2406e8['userId'],'resolved':_0x34cb52[_0x47b125(0x230)]===I[_0x47b125(0x1f8)],'unitId':_0x44b60c,'subUnitId':_0x230551,'text':JSON[_0x47b125(0x235)](_0x2406e8[_0x47b125(0x1dc)]),'parentId':_0x1ab767}),_0x2d72cd=_0x524228(_0x34cb52[_0x47b125(0x22f)][0x0]);return{..._0x2d72cd,'children':_0x34cb52[_0x47b125(0x22f)][_0x47b125(0x22b)](0x1)[_0x47b125(0x227)](_0x440461=>_0x524228(_0x440461,_0x2d72cd['id']))};}return null;}function _0x5888(){const _0x127bed=['_threadCommentModel','saveCommentToSnapshot','size','subscribe','code','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','merge','map','commentUpdate$','unitId','_configService','slice','dataSource','Reply','_threadCommentDataSourceService','replies','solved','getCurrentUser','body','format','comments','parse','add','/list','ThreadCommentModel','UniverInstanceType','addComment','Disposable','addUser','HTTPService','OpenOrReOpen','705078giEuRB','rangeId','_injector','/universer-api/comment/unit/','UniverThreadCommentDataSourcePlugin','rangeType','Inject','disposeWithMe','delete','Plugin','_httpService','_commentService','get','getUnit','personId','post','_initUserSync','content','COMMENT','Injector','updateComment','_init','createTimestamp','UNRECOGNIZED','length','CommentService','forEach','Delete','values','610824xUZmsn','Solve','user','12ImFSbS','root','stringify','threadId','requireSession','CustomRangeType','ref','UserManagerService','getUser','Add','getMemberID','resolveComment','/reply','Solved','4395tebknm','find','2517417iVVhBM','_userService','/edit','98672PspuAq','customRanges','_config','2580605iHoYca','replyId','UniverCollaborationClientPlugin','/universer-api/user/list','defineProperty','users','Unknown','389010qVYESq','setConfig','_sessionService','comment','UniverLicensePlugin','_initDataSource','type','dayjs','userID','Edit','reply','error','filter','syncUpdateMutationToColla','resolved','listComments','getComment','UNIVER_UNKNOWN','DependentOn','onReady','/delete','YYYY/MM/DD\x20HH:mm','symbol','getOwnPropertyDescriptor'];_0x5888=function(){return _0x127bed;};return _0x5888();}let p=class{constructor(_0x26136d,_0x438b76,_0x582a3b){const _0x101747=_0x52a573;this[_0x101747(0x1d5)]=_0x26136d,this[_0x101747(0x1fc)]=_0x438b76,this[_0x101747(0x20a)]=_0x582a3b;}async['addComment'](_0x105cf1){const _0x472bc6=_0x52a573;var _0x2e4846,_0xb11f14;const {parentId:_0x23aaed,unitId:_0x3d2494,text:_0x594aeb,threadId:_0x17d0c7}=_0x105cf1,_0xa886a6=(_0xb11f14=(_0x2e4846=_0x594aeb['customRanges'])==null?void 0x0:_0x2e4846[_0x472bc6(0x214)](_0x2d67b0=>_0x2d67b0[_0x472bc6(0x1d0)]===c[_0x472bc6(0x1f0)][_0x472bc6(0x1dd)])[_0x472bc6(0x227)](_0x428501=>_0x428501[_0x472bc6(0x1cc)]))!=null?_0xb11f14:[],_0x1bbf4d=JSON['stringify'](_0x594aeb),_0x460384=(await this[_0x472bc6(0x20a)][_0x472bc6(0x1ef)](_0x3d2494))['getMemberID']();if(_0x23aaed){const _0x11587f={'memberId':_0x460384,'unitId':_0x3d2494,'content':_0x1bbf4d,'mention':_0xa886a6,'threadId':_0x17d0c7},_0x2f2a35=(await this['_httpService']['post'](_0x472bc6(0x1ce)+_0x3d2494+_0x472bc6(0x1f7),{'body':_0x11587f}))[_0x472bc6(0x232)][_0x472bc6(0x212)];return{..._0x105cf1,'id':_0x2f2a35[_0x472bc6(0x202)],'dT':c['dayjs'](+_0x2f2a35[_0x472bc6(0x1e1)])['format'](_0x472bc6(0x21d)),'personId':_0x2f2a35['userId']};}else{const _0x3947e7={'memberId':_0x460384,'unitId':_0x3d2494,'content':_0x1bbf4d,'mention':_0xa886a6},_0x486fd6=await this['_httpService']['post'](_0x472bc6(0x1ce)+_0x3d2494+'/add',{'body':_0x3947e7});return Y(_0x486fd6[_0x472bc6(0x232)][_0x472bc6(0x20b)],_0x105cf1);}}async[_0x52a573(0x1df)](_0x30d069){const _0x186477=_0x52a573;var _0x3562dd,_0x4029da;const {text:_0x3d3c1e,unitId:_0x2f9937}=_0x30d069,_0x348035=(_0x4029da=(_0x3562dd=_0x3d3c1e[_0x186477(0x1ff)])==null?void 0x0:_0x3562dd[_0x186477(0x214)](_0x3f34ba=>_0x3f34ba[_0x186477(0x1d0)]===c[_0x186477(0x1f0)][_0x186477(0x1dd)])['map'](_0x56e793=>_0x56e793[_0x186477(0x1cc)]))!=null?_0x4029da:[],_0x4736b2=JSON[_0x186477(0x1ed)](_0x3d3c1e),_0x2d0d28=_0x30d069[_0x186477(0x1ee)],_0xf64ed=_0x30d069['id'],_0xb6e203={'memberId':(await this['_sessionService'][_0x186477(0x1ef)](_0x2f9937))[_0x186477(0x1f5)](),'unitId':_0x2f9937,'threadId':_0x2d0d28,'mention':_0x348035,'content':_0x4736b2,'replyId':_0xf64ed},_0x4d767b=await this[_0x186477(0x1d5)][_0x186477(0x1da)]('/universer-api/comment/unit/'+_0x2f9937+_0x186477(0x1fd),{'body':_0xb6e203});return!_0x4d767b['body']['error']||_0x4d767b[_0x186477(0x232)][_0x186477(0x213)]['code']===0x1;}async[_0x52a573(0x1f6)](_0x41a580){const _0x51dd9c=_0x52a573,{unitId:_0x4d3f7f}=_0x41a580,_0x53acc2=_0x41a580['threadId'],_0x31bbfc={'memberId':this[_0x51dd9c(0x1fc)][_0x51dd9c(0x231)]()[_0x51dd9c(0x210)],'unitId':_0x4d3f7f,'threadId':_0x53acc2,'solved':_0x41a580[_0x51dd9c(0x216)]?I[_0x51dd9c(0x1f8)]:I['OpenOrReOpen']},_0x55edcc=await this[_0x51dd9c(0x1d5)][_0x51dd9c(0x1da)](_0x51dd9c(0x1ce)+_0x4d3f7f+'/solved',{'body':_0x31bbfc});return!_0x55edcc[_0x51dd9c(0x232)][_0x51dd9c(0x213)]||_0x55edcc['body'][_0x51dd9c(0x213)][_0x51dd9c(0x224)]===0x1;}async['deleteComment'](_0x51e6b5,_0x1443db,_0x436f5b,_0x4a8a9f){const _0x3c7521=_0x52a573,_0x511647={'memberId':(await this[_0x3c7521(0x20a)][_0x3c7521(0x1ef)](_0x51e6b5))['getMemberID'](),'threadId':_0x436f5b,'replyId':_0x4a8a9f,'unitId':_0x51e6b5},_0x475002=await this[_0x3c7521(0x1d5)][_0x3c7521(0x1da)](_0x3c7521(0x1ce)+_0x51e6b5+_0x3c7521(0x21c),{'body':_0x511647});return!_0x475002[_0x3c7521(0x232)][_0x3c7521(0x213)]||_0x475002[_0x3c7521(0x232)][_0x3c7521(0x213)][_0x3c7521(0x224)]===0x1;}async[_0x52a573(0x217)](_0x5bb6e7,_0x16c25c,_0x3ca593){const _0x2af8bf=_0x52a573,_0x3b3610={'unitId':_0x5bb6e7,'threadId':_0x3ca593},_0x51610c=await this[_0x2af8bf(0x1d5)][_0x2af8bf(0x1da)](_0x2af8bf(0x1ce)+_0x5bb6e7+_0x2af8bf(0x237),{'body':_0x3b3610}),_0x19ac79=_0x3ca593['map'](_0x2744af=>G(_0x51610c[_0x2af8bf(0x232)][_0x2af8bf(0x234)][_0x2744af],_0x5bb6e7,_0x16c25c))[_0x2af8bf(0x214)](Boolean);return Object[_0x2af8bf(0x1e7)](_0x51610c[_0x2af8bf(0x232)]['users'])[_0x2af8bf(0x1e5)](_0x18f533=>{const _0x5ea897=_0x2af8bf;this[_0x5ea897(0x1fc)][_0x5ea897(0x23c)](_0x18f533);}),_0x19ac79;}[_0x52a573(0x221)](_0x1491af){const _0x44578c=_0x52a573;return{'id':_0x1491af['id'],'threadId':_0x1491af['threadId'],'ref':_0x1491af[_0x44578c(0x1f1)]};}};p=x([C(0x0,c['Inject'](P[_0x52a573(0x23d)])),C(0x1,c[_0x52a573(0x1d1)](c[_0x52a573(0x1f2)])),C(0x2,c[_0x52a573(0x1d1)](b['CollaborationSessionService']))],p);var H=Object[_0x52a573(0x21f)],J=(_0x323704,_0x1cb5c0,_0x39308b,_0x4f0c81)=>{for(var _0x4af674=_0x4f0c81>0x1?void 0x0:_0x4f0c81?H(_0x1cb5c0,_0x39308b):_0x1cb5c0,_0x5edf44=_0x323704['length']-0x1,_0x4521ed;_0x5edf44>=0x0;_0x5edf44--)(_0x4521ed=_0x323704[_0x5edf44])&&(_0x4af674=_0x4521ed(_0x4af674)||_0x4af674);return _0x4af674;},y=(_0x58271a,_0x54c69d)=>(_0x26a1ce,_0x4c996d)=>_0x54c69d(_0x26a1ce,_0x4c996d,_0x58271a);let g=class extends c[_0x52a573(0x23b)]{constructor(_0x346dce,_0x4639b6){const _0x6d0ce1=_0x52a573;super(),this[_0x6d0ce1(0x22e)]=_0x346dce,this['_threadCommentDataSource']=_0x4639b6,this['_initDataSource']();}[_0x52a573(0x20d)](){const _0x264420=_0x52a573;this[_0x264420(0x22e)][_0x264420(0x22c)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x264420(0x215)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x52a573(0x1d1)](p))],g);var F=Object[_0x52a573(0x205)],L=Object[_0x52a573(0x21f)],Z=(_0x42d6b0,_0x286072,_0x4afd03)=>_0x286072 in _0x42d6b0?F(_0x42d6b0,_0x286072,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4afd03}):_0x42d6b0[_0x286072]=_0x4afd03,W=(_0x39fa73,_0x25f1b7,_0x1b3539,_0x963310)=>{const _0xda9d37=_0x52a573;for(var _0x217003=_0x963310>0x1?void 0x0:_0x963310?L(_0x25f1b7,_0x1b3539):_0x25f1b7,_0x2659bb=_0x39fa73[_0xda9d37(0x1e3)]-0x1,_0x1c8b92;_0x2659bb>=0x0;_0x2659bb--)(_0x1c8b92=_0x39fa73[_0x2659bb])&&(_0x217003=_0x1c8b92(_0x217003)||_0x217003);return _0x217003;},O=(_0x1c150a,_0x4b1ab3)=>(_0x149359,_0x15fcd5)=>_0x4b1ab3(_0x149359,_0x15fcd5,_0x1c150a),N=(_0x555bfd,_0x3a581c,_0x370540)=>Z(_0x555bfd,typeof _0x3a581c!=_0x52a573(0x21e)?_0x3a581c+'':_0x3a581c,_0x370540);exports[_0x52a573(0x1cf)]=class extends c[_0x52a573(0x1d4)]{constructor(_0x1369a7=D,_0x3c19dd,_0xa14201){const _0x1d493c=_0x52a573;super(),this[_0x1d493c(0x200)]=_0x1369a7,this[_0x1d493c(0x1cd)]=_0x3c19dd,this[_0x1d493c(0x22a)]=_0xa14201;const {..._0x1b53e1}=c[_0x1d493c(0x226)]({},D,this['_config']);this['_configService'][_0x1d493c(0x209)](q,_0x1b53e1);}['onStarting'](){const _0x2479a0=_0x52a573;[[p],[g],[_]][_0x2479a0(0x1e5)](_0x33fabb=>{const _0x4b67e2=_0x2479a0;this[_0x4b67e2(0x1cd)][_0x4b67e2(0x236)](_0x33fabb);});}[_0x52a573(0x21b)](){const _0x138fbb=_0x52a573;this[_0x138fbb(0x1cd)][_0x138fbb(0x1d7)](g),this[_0x138fbb(0x1cd)]['get'](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports[_0x52a573(0x1cf)],_0x52a573(0x20e),c[_0x52a573(0x239)][_0x52a573(0x219)]),exports[_0x52a573(0x1cf)]=W([c[_0x52a573(0x21a)](w['UniverThreadCommentUIPlugin'],b[_0x52a573(0x203)],T[_0x52a573(0x20c)]),O(0x1,c[_0x52a573(0x1d1)](c[_0x52a573(0x1de)])),O(0x2,c['IConfigService'])],exports[_0x52a573(0x1cf)]);
1
+ 'use strict';const _0x274287=_0xd467;(function(_0x4002f6,_0x4a6d70){const _0x1e4d8c=_0xd467,_0x29babe=_0x4002f6();while(!![]){try{const _0x6bc365=parseInt(_0x1e4d8c(0x194))/0x1*(parseInt(_0x1e4d8c(0x15c))/0x2)+parseInt(_0x1e4d8c(0x18e))/0x3*(parseInt(_0x1e4d8c(0x16f))/0x4)+-parseInt(_0x1e4d8c(0x12a))/0x5+-parseInt(_0x1e4d8c(0x182))/0x6*(parseInt(_0x1e4d8c(0x16a))/0x7)+parseInt(_0x1e4d8c(0x140))/0x8*(-parseInt(_0x1e4d8c(0x12c))/0x9)+-parseInt(_0x1e4d8c(0x185))/0xa*(parseInt(_0x1e4d8c(0x13e))/0xb)+-parseInt(_0x1e4d8c(0x13f))/0xc*(-parseInt(_0x1e4d8c(0x167))/0xd);if(_0x6bc365===_0x4a6d70)break;else _0x29babe['push'](_0x29babe['shift']());}catch(_0x5d9031){_0x29babe['push'](_0x29babe['shift']());}}}(_0xeaee,0xe3cf2));Object['defineProperty'](exports,Symbol[_0x274287(0x177)],{'value':_0x274287(0x145)});function _0xeaee(){const _0x3b4666=['_threadCommentDataSource','setConfig','9CdRXXQ','Add','Reply','customRanges','thread-comment-data-source.config','users','855719bfuuOh','getOwnPropertyDescriptor','UNIVER_UNKNOWN','Delete','threadId','resolved','/add','_initDataSource','onStarting','ref','format','HTTPService','userID','solved','_init','body','/universer-api/comment/unit/','OpenOrReOpen','/solved','7187640DZcYzB','_configService','2223zUcyRH','unitId','addUser','CollaborationSessionService','stringify','size','CommentService','_injector','_initUserSync','commentUpdate$','Injector','userId','Solved','reply','IThreadCommentDataSourceService','user','_threadCommentModel','rangeId','352nLQLfL','619428qKZbQn','15304QQlPeB','_commentService','add','getCurrentUser','getUnit','Module','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/list','error','deleteComment','parentId','code','rangeType','delete','getMemberID','length','symbol','dayjs','onReady','payload','_userService','Solve','createTimestamp','get','comment','personId','/delete','filter','2NCZDOo','dataSource','updateComment','find','_threadCommentDataSourceService','comments','pluginName','type','saveCommentToSnapshot','Unknown','parse','767URQKwP','replies','_sessionService','4984mbrWTE','UniverThreadCommentUIPlugin','ThreadCommentModel','addComment','UniverThreadCommentDataSourcePlugin','287916XJsARb','COMMENT','post','map','listComments','Disposable','Inject','/universer-api/user/list','toStringTag','resolveComment','Edit','root','content','_httpService','forEach','requireSession','slice','replyId','UNRECOGNIZED','7212tCYjao','_config','UniverInstanceType','130690CWJnHG','subscribe','UserManagerService','bufferTime','CustomRangeType','pipe','YYYY/MM/DD\x20HH:mm'];_0xeaee=function(){return _0x3b4666;};return _0xeaee();}const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x274287(0x146);var I=(_0x4c52b9=>(_0x4c52b9[_0x4c52b9[_0x274287(0x128)]=0x0]=_0x274287(0x128),_0x4c52b9[_0x4c52b9[_0x274287(0x138)]=0x1]=_0x274287(0x138),_0x4c52b9[_0x4c52b9[_0x274287(0x181)]=-0x1]=_0x274287(0x181),_0x4c52b9))(I||{}),v=(_0x21c2b4=>(_0x21c2b4[_0x21c2b4['Unknown']=0x0]=_0x274287(0x165),_0x21c2b4[_0x21c2b4[_0x274287(0x18f)]=0x1]=_0x274287(0x18f),_0x21c2b4[_0x21c2b4[_0x274287(0x190)]=0x2]='Reply',_0x21c2b4[_0x21c2b4[_0x274287(0x179)]=0x3]=_0x274287(0x179),_0x21c2b4[_0x21c2b4['Delete']=0x4]=_0x274287(0x197),_0x21c2b4[_0x21c2b4[_0x274287(0x155)]=0x5]=_0x274287(0x155),_0x21c2b4[_0x21c2b4['UNRECOGNIZED']=-0x1]=_0x274287(0x181),_0x21c2b4))(v||{});const f=_0x49db39=>c[_0x274287(0x151)](new Date(+_0x49db39))[_0x274287(0x19e)](_0x274287(0x18b)),R=async(_0x33b4ae,_0x519509)=>{const _0x4a0e14=_0x274287,_0x55ab80=_0x33b4ae[_0x4a0e14(0x157)](c[_0x4a0e14(0x187)]),_0x451392=_0x33b4ae['get'](P[_0x4a0e14(0x19f)]);_0x519509[_0x4a0e14(0x17d)](_0x38bba2=>{const _0x3282d8=_0x4a0e14;_0x55ab80['getUser'](_0x38bba2)&&_0x519509[_0x3282d8(0x14d)](_0x38bba2);}),_0x519509[_0x4a0e14(0x131)]&&(await _0x451392[_0x4a0e14(0x157)](_0x4a0e14(0x176),{'params':{'userIDs':[..._0x519509]}}))['body'][_0x4a0e14(0x193)][_0x4a0e14(0x17d)](_0x213276=>{const _0x4d0313=_0x4a0e14;_0x213276&&_0x55ab80[_0x4d0313(0x12e)](_0x213276);});};var $=Object[_0x274287(0x195)],E=(_0x33ff00,_0x58f79a,_0x4db735,_0x559478)=>{const _0x5a9e4c=_0x274287;for(var _0xc0e826=_0x559478>0x1?void 0x0:_0x559478?$(_0x58f79a,_0x4db735):_0x58f79a,_0xdbbfdc=_0x33ff00[_0x5a9e4c(0x14f)]-0x1,_0x9687c;_0xdbbfdc>=0x0;_0xdbbfdc--)(_0x9687c=_0x33ff00[_0xdbbfdc])&&(_0xc0e826=_0x9687c(_0xc0e826)||_0xc0e826);return _0xc0e826;},S=(_0x5ceafe,_0x2a39f2)=>(_0x5816e3,_0x1dd216)=>_0x2a39f2(_0x5816e3,_0x1dd216,_0x5ceafe);let _=class extends c[_0x274287(0x174)]{constructor(_0x3e9b14,_0xb64bc6,_0x561d9a,_0x34b0e6){const _0x37a070=_0x274287;super(),this[_0x37a070(0x141)]=_0x3e9b14,this[_0x37a070(0x13c)]=_0xb64bc6,this[_0x37a070(0x154)]=_0x561d9a,this['_injector']=_0x34b0e6,this[_0x37a070(0x1a2)](),this[_0x37a070(0x134)]();}[_0x274287(0x134)](){const _0x16d4dc=_0x274287;this['disposeWithMe'](this[_0x16d4dc(0x13c)][_0x16d4dc(0x135)][_0x16d4dc(0x18a)](j[_0x16d4dc(0x188)](0x10))[_0x16d4dc(0x186)](_0x2dbeaa=>{const _0x25087f=_0x16d4dc,_0x46a134=new Set();_0x2dbeaa[_0x25087f(0x17d)](_0x67c227=>{const _0x47a33d=_0x25087f;if(_0x67c227[_0x47a33d(0x163)]===_0x47a33d(0x142)){const _0x1a07cb=_0x67c227[_0x47a33d(0x153)][_0x47a33d(0x159)];_0x46a134[_0x47a33d(0x142)](_0x1a07cb);}}),R(this[_0x25087f(0x133)],_0x46a134);}));}[_0x274287(0x1a2)](){const _0x1c0ded=_0x274287;this['disposeWithMe'](this[_0x1c0ded(0x141)]['commentUpdate$'][_0x1c0ded(0x186)](async _0x1e9d6a=>{const _0x17ecc7=_0x1c0ded;var _0x1990fe,_0x43e560,_0x5d152b,_0x43396a;const _0x19938d=(_0x1990fe=this[_0x17ecc7(0x13c)][_0x17ecc7(0x144)](_0x1e9d6a['unitId'])[_0x17ecc7(0x15f)](_0x1f10f1=>_0x1f10f1[_0x17ecc7(0x198)]===_0x1e9d6a[_0x17ecc7(0x198)]))==null?void 0x0:_0x1990fe[_0x17ecc7(0x17a)];if(!_0x19938d)return;const {unitId:_0x21dc0b,subUnitId:_0x4bd178}=_0x19938d;switch(_0x1e9d6a[_0x17ecc7(0x13b)]&&this[_0x17ecc7(0x154)][_0x17ecc7(0x12e)](_0x1e9d6a[_0x17ecc7(0x13b)]),_0x1e9d6a[_0x17ecc7(0x163)]){case v[_0x17ecc7(0x18f)]:break;case v['Reply']:{this[_0x17ecc7(0x13c)][_0x17ecc7(0x16d)](_0x21dc0b,_0x4bd178,{'unitId':_0x21dc0b,'subUnitId':_0x4bd178,'ref':'','id':_0x1e9d6a[_0x17ecc7(0x180)],'dT':f(+_0x1e9d6a['createTimestamp']),'threadId':_0x1e9d6a[_0x17ecc7(0x198)],'personId':(_0x5d152b=(_0x43e560=_0x1e9d6a[_0x17ecc7(0x13b)])==null?void 0x0:_0x43e560['userID'])!=null?_0x5d152b:_0x1e9d6a[_0x17ecc7(0x137)],'text':JSON[_0x17ecc7(0x166)](_0x1e9d6a[_0x17ecc7(0x17b)]),'parentId':_0x19938d['id']});break;}case v[_0x17ecc7(0x197)]:{const _0x43f760=this['_threadCommentModel']['getComment'](_0x21dc0b,_0x4bd178,_0x1e9d6a[_0x17ecc7(0x180)]);_0x43f760&&_0x43f760[_0x17ecc7(0x14a)]&&this['_threadCommentModel']['deleteComment'](_0x21dc0b,_0x4bd178,_0x1e9d6a[_0x17ecc7(0x180)]);break;}case v[_0x17ecc7(0x179)]:{this['_threadCommentModel'][_0x17ecc7(0x15e)](_0x21dc0b,_0x4bd178,{'commentId':_0x1e9d6a[_0x17ecc7(0x180)],'text':JSON[_0x17ecc7(0x166)](_0x1e9d6a['content'])});break;}case v['Solve']:{const _0x10e09f=(_0x43396a=this[_0x17ecc7(0x13c)][_0x17ecc7(0x144)](_0x1e9d6a[_0x17ecc7(0x12d)])['find'](_0x58d382=>_0x58d382[_0x17ecc7(0x198)]===_0x1e9d6a[_0x17ecc7(0x198)]))==null?void 0x0:_0x43396a[_0x17ecc7(0x17a)];_0x10e09f&&this[_0x17ecc7(0x13c)][_0x17ecc7(0x178)](_0x21dc0b,_0x4bd178,_0x10e09f['id'],_0x1e9d6a['solved']===I[_0x17ecc7(0x138)]);break;}}}));}};_=E([S(0x0,c[_0x274287(0x175)](b[_0x274287(0x132)])),S(0x1,c['Inject'](M[_0x274287(0x16c)])),S(0x2,c[_0x274287(0x175)](c[_0x274287(0x187)])),S(0x3,c['Inject'](c[_0x274287(0x136)]))],_);function _0xd467(_0x497f97,_0x8cfd32){_0x497f97=_0x497f97-0x128;const _0xeaeec1=_0xeaee();let _0xd46745=_0xeaeec1[_0x497f97];return _0xd46745;}const q=_0x274287(0x192),D={};var A=Object[_0x274287(0x195)],x=(_0x583926,_0x355bbe,_0x225e65,_0x1bcc45)=>{for(var _0x409e71=_0x1bcc45>0x1?void 0x0:_0x1bcc45?A(_0x355bbe,_0x225e65):_0x355bbe,_0x42a918=_0x583926['length']-0x1,_0x5463d8;_0x42a918>=0x0;_0x42a918--)(_0x5463d8=_0x583926[_0x42a918])&&(_0x409e71=_0x5463d8(_0x409e71)||_0x409e71);return _0x409e71;},C=(_0x26b331,_0xa550b0)=>(_0x492bdc,_0x9c84f1)=>_0xa550b0(_0x492bdc,_0x9c84f1,_0x26b331);function Y(_0x37e4eb,_0x38428c){const _0x305449=_0x274287,_0x3386cb=_0x37e4eb[_0x305449(0x168)][0x0];return{..._0x38428c,'id':_0x3386cb['replyId'],'resolved':_0x37e4eb[_0x305449(0x1a1)]===0x1,'dT':f(_0x3386cb[_0x305449(0x156)]),'personId':_0x3386cb['userId'],'threadId':_0x3386cb[_0x305449(0x198)]};}function G(_0x4e35e7,_0x29a2ce,_0x22231f){const _0x210aeb=_0x274287;var _0xe4d461,_0x340bb1;if(((_0x340bb1=(_0xe4d461=_0x4e35e7==null?void 0x0:_0x4e35e7['replies'])==null?void 0x0:_0xe4d461['length'])!=null?_0x340bb1:0x0)>0x0){const _0x265183=(_0x5f2c57,_0x12b822)=>({'id':_0x5f2c57[_0x210aeb(0x180)],'threadId':_0x5f2c57[_0x210aeb(0x198)],'dT':f(_0x5f2c57[_0x210aeb(0x156)]),'personId':_0x5f2c57[_0x210aeb(0x137)],'resolved':_0x4e35e7[_0x210aeb(0x1a1)]===I[_0x210aeb(0x138)],'unitId':_0x29a2ce,'subUnitId':_0x22231f,'text':JSON[_0x210aeb(0x166)](_0x5f2c57[_0x210aeb(0x17b)]),'parentId':_0x12b822}),_0x546dd7=_0x265183(_0x4e35e7[_0x210aeb(0x168)][0x0]);return{..._0x546dd7,'children':_0x4e35e7['replies'][_0x210aeb(0x17f)](0x1)[_0x210aeb(0x172)](_0x31fef6=>_0x265183(_0x31fef6,_0x546dd7['id']))};}return null;}let p=class{constructor(_0xf45fc2,_0x178035,_0x48b0cb){const _0x4cb3bb=_0x274287;this[_0x4cb3bb(0x17c)]=_0xf45fc2,this[_0x4cb3bb(0x154)]=_0x178035,this[_0x4cb3bb(0x169)]=_0x48b0cb;}async[_0x274287(0x16d)](_0x469aec){const _0x288db8=_0x274287;var _0x20328d,_0x2b5797;const {parentId:_0x51c329,unitId:_0x57404c,text:_0x47567c,threadId:_0x5d908a}=_0x469aec,_0xd68525=(_0x2b5797=(_0x20328d=_0x47567c['customRanges'])==null?void 0x0:_0x20328d[_0x288db8(0x15b)](_0x425f0e=>_0x425f0e[_0x288db8(0x14c)]===c[_0x288db8(0x189)][_0x288db8(0x170)])[_0x288db8(0x172)](_0x251b36=>_0x251b36[_0x288db8(0x13d)]))!=null?_0x2b5797:[],_0x23cc10=JSON[_0x288db8(0x130)](_0x47567c),_0x5eb28f=(await this[_0x288db8(0x169)][_0x288db8(0x17e)](_0x57404c))['getMemberID']();if(_0x51c329){const _0x53be89={'memberId':_0x5eb28f,'unitId':_0x57404c,'content':_0x23cc10,'mention':_0xd68525,'threadId':_0x5d908a},_0x43df04=(await this[_0x288db8(0x17c)]['post'](_0x288db8(0x1a4)+_0x57404c+'/reply',{'body':_0x53be89}))[_0x288db8(0x1a3)][_0x288db8(0x139)];return{..._0x469aec,'id':_0x43df04[_0x288db8(0x180)],'dT':c['dayjs'](+_0x43df04[_0x288db8(0x156)])[_0x288db8(0x19e)](_0x288db8(0x18b)),'personId':_0x43df04[_0x288db8(0x137)]};}else{const _0x289c41={'memberId':_0x5eb28f,'unitId':_0x57404c,'content':_0x23cc10,'mention':_0xd68525},_0x65654a=await this[_0x288db8(0x17c)][_0x288db8(0x171)](_0x288db8(0x1a4)+_0x57404c+_0x288db8(0x19a),{'body':_0x289c41});return Y(_0x65654a[_0x288db8(0x1a3)][_0x288db8(0x158)],_0x469aec);}}async[_0x274287(0x15e)](_0x5ba16b){const _0x33a455=_0x274287;var _0x3c8f54,_0x4dae9f;const {text:_0x1357b1,unitId:_0xfc1a94}=_0x5ba16b,_0x11fc97=(_0x4dae9f=(_0x3c8f54=_0x1357b1[_0x33a455(0x191)])==null?void 0x0:_0x3c8f54[_0x33a455(0x15b)](_0x548a90=>_0x548a90['rangeType']===c['CustomRangeType']['COMMENT'])['map'](_0x177cc1=>_0x177cc1['rangeId']))!=null?_0x4dae9f:[],_0x35c6f0=JSON[_0x33a455(0x130)](_0x1357b1),_0x20bef0=_0x5ba16b[_0x33a455(0x198)],_0x153195=_0x5ba16b['id'],_0x404ece={'memberId':(await this[_0x33a455(0x169)]['requireSession'](_0xfc1a94))[_0x33a455(0x14e)](),'unitId':_0xfc1a94,'threadId':_0x20bef0,'mention':_0x11fc97,'content':_0x35c6f0,'replyId':_0x153195},_0x5bd04c=await this[_0x33a455(0x17c)][_0x33a455(0x171)](_0x33a455(0x1a4)+_0xfc1a94+'/edit',{'body':_0x404ece});return!_0x5bd04c['body'][_0x33a455(0x148)]||_0x5bd04c[_0x33a455(0x1a3)]['error'][_0x33a455(0x14b)]===0x1;}async[_0x274287(0x178)](_0x5b53bd){const _0xf3613b=_0x274287,{unitId:_0x4c6001}=_0x5b53bd,_0x234050=_0x5b53bd['threadId'],_0x11e199={'memberId':this[_0xf3613b(0x154)][_0xf3613b(0x143)]()[_0xf3613b(0x1a0)],'unitId':_0x4c6001,'threadId':_0x234050,'solved':_0x5b53bd[_0xf3613b(0x199)]?I[_0xf3613b(0x138)]:I[_0xf3613b(0x128)]},_0x3a3019=await this['_httpService'][_0xf3613b(0x171)](_0xf3613b(0x1a4)+_0x4c6001+_0xf3613b(0x129),{'body':_0x11e199});return!_0x3a3019[_0xf3613b(0x1a3)][_0xf3613b(0x148)]||_0x3a3019['body']['error']['code']===0x1;}async[_0x274287(0x149)](_0x3190de,_0x927faa,_0xc0a39,_0x9b2e8f){const _0x3d4839=_0x274287,_0x5b238e={'memberId':(await this[_0x3d4839(0x169)][_0x3d4839(0x17e)](_0x3190de))[_0x3d4839(0x14e)](),'threadId':_0xc0a39,'replyId':_0x9b2e8f,'unitId':_0x3190de},_0x2b701a=await this[_0x3d4839(0x17c)]['post'](_0x3d4839(0x1a4)+_0x3190de+_0x3d4839(0x15a),{'body':_0x5b238e});return!_0x2b701a[_0x3d4839(0x1a3)][_0x3d4839(0x148)]||_0x2b701a['body'][_0x3d4839(0x148)][_0x3d4839(0x14b)]===0x1;}async[_0x274287(0x173)](_0x781257,_0x14e0c0,_0x9cc629){const _0x101c7c=_0x274287,_0x284dde={'unitId':_0x781257,'threadId':_0x9cc629},_0x5f4d25=await this[_0x101c7c(0x17c)]['post'](_0x101c7c(0x1a4)+_0x781257+_0x101c7c(0x147),{'body':_0x284dde}),_0x30f29f=_0x9cc629[_0x101c7c(0x172)](_0x5dd780=>G(_0x5f4d25[_0x101c7c(0x1a3)][_0x101c7c(0x161)][_0x5dd780],_0x781257,_0x14e0c0))[_0x101c7c(0x15b)](Boolean);return Object['values'](_0x5f4d25[_0x101c7c(0x1a3)]['users'])[_0x101c7c(0x17d)](_0x392b0c=>{const _0x53e0e2=_0x101c7c;this[_0x53e0e2(0x154)]['addUser'](_0x392b0c);}),_0x30f29f;}[_0x274287(0x164)](_0x24a4b5){const _0x2184b1=_0x274287;return{'id':_0x24a4b5['id'],'threadId':_0x24a4b5['threadId'],'ref':_0x24a4b5[_0x2184b1(0x19d)]};}};p=x([C(0x0,c[_0x274287(0x175)](P[_0x274287(0x19f)])),C(0x1,c[_0x274287(0x175)](c[_0x274287(0x187)])),C(0x2,c['Inject'](b[_0x274287(0x12f)]))],p);var H=Object[_0x274287(0x195)],J=(_0x3bf1f9,_0x53e17a,_0xddce64,_0x106a6f)=>{const _0x45ee46=_0x274287;for(var _0x5c9b1e=_0x106a6f>0x1?void 0x0:_0x106a6f?H(_0x53e17a,_0xddce64):_0x53e17a,_0xda565e=_0x3bf1f9[_0x45ee46(0x14f)]-0x1,_0x153435;_0xda565e>=0x0;_0xda565e--)(_0x153435=_0x3bf1f9[_0xda565e])&&(_0x5c9b1e=_0x153435(_0x5c9b1e)||_0x5c9b1e);return _0x5c9b1e;},y=(_0x5b6aa1,_0x5b55a8)=>(_0x17111b,_0x25e7e9)=>_0x5b55a8(_0x17111b,_0x25e7e9,_0x5b6aa1);let g=class extends c[_0x274287(0x174)]{constructor(_0x421e5b,_0xba85e6){const _0x54fb31=_0x274287;super(),this['_threadCommentDataSourceService']=_0x421e5b,this[_0x54fb31(0x18c)]=_0xba85e6,this[_0x54fb31(0x19b)]();}[_0x274287(0x19b)](){const _0x38532b=_0x274287;this[_0x38532b(0x160)][_0x38532b(0x15d)]=this[_0x38532b(0x18c)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x274287(0x13a)]),y(0x1,c[_0x274287(0x175)](p))],g);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x70eeaa,_0x25f254,_0x5b1e4c)=>_0x25f254 in _0x70eeaa?F(_0x70eeaa,_0x25f254,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5b1e4c}):_0x70eeaa[_0x25f254]=_0x5b1e4c,W=(_0x195843,_0x1bf81c,_0x999d0,_0x1aee17)=>{for(var _0x4f9a01=_0x1aee17>0x1?void 0x0:_0x1aee17?L(_0x1bf81c,_0x999d0):_0x1bf81c,_0x4e5610=_0x195843['length']-0x1,_0x35dc7a;_0x4e5610>=0x0;_0x4e5610--)(_0x35dc7a=_0x195843[_0x4e5610])&&(_0x4f9a01=_0x35dc7a(_0x4f9a01)||_0x4f9a01);return _0x4f9a01;},O=(_0x27567c,_0x659204)=>(_0x2fcdeb,_0xd654d)=>_0x659204(_0x2fcdeb,_0xd654d,_0x27567c),N=(_0x1223bc,_0x158418,_0x32e59a)=>Z(_0x1223bc,typeof _0x158418!=_0x274287(0x150)?_0x158418+'':_0x158418,_0x32e59a);exports['UniverThreadCommentDataSourcePlugin']=class extends c['Plugin']{constructor(_0x11f4b9=D,_0x5e4fee,_0x10309c){const _0x41ce0f=_0x274287;super(),this[_0x41ce0f(0x183)]=_0x11f4b9,this[_0x41ce0f(0x133)]=_0x5e4fee,this[_0x41ce0f(0x12b)]=_0x10309c;const {..._0x90902c}=c['merge']({},D,this[_0x41ce0f(0x183)]);this[_0x41ce0f(0x12b)][_0x41ce0f(0x18d)](q,_0x90902c);}[_0x274287(0x19c)](){const _0x6042d5=_0x274287;[[p],[g],[_]][_0x6042d5(0x17d)](_0x52d06d=>{const _0x349f39=_0x6042d5;this[_0x349f39(0x133)][_0x349f39(0x142)](_0x52d06d);});}[_0x274287(0x152)](){const _0x5869cd=_0x274287;this['_injector'][_0x5869cd(0x157)](g),this[_0x5869cd(0x133)]['get'](_);}},N(exports[_0x274287(0x16e)],_0x274287(0x162),U),N(exports[_0x274287(0x16e)],'type',c[_0x274287(0x184)][_0x274287(0x196)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](w[_0x274287(0x16b)],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c[_0x274287(0x175)](c[_0x274287(0x136)])),O(0x2,c['IConfigService'])],exports[_0x274287(0x16e)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x4218c7=_0x716a;function _0x143e(){const _0x2e092c=['/reply','resolved','requireSession','UNIVER_UNKNOWN','Add','UNRECOGNIZED','getOwnPropertyDescriptor','stringify','length','YYYY/MM/DD\x20HH:mm','format','comment','getUnit','/universer-api/comment/unit/','reply','resolveComment','saveCommentToSnapshot','customRanges','643811mmZbrK','size','type','_injector','getMemberID','addComment','Reply','map','Edit','find','body','dataSource','user','_init','threadId','COMMENT','862816yktXXt','userID','_userService','subscribe','listComments','get','481182oAhgvD','_initDataSource','178518mcZgEn','_httpService','552290xJhAoJ','commentUpdate$','values','userId','addUser','109122pfBiZs','_configService','OpenOrReOpen','/solved','_threadCommentDataSourceService','onReady','deleteComment','replyId','unitId','_sessionService','createTimestamp','_threadCommentModel','pluginName','_config','_initUserSync','onStarting','/add','symbol','Solve','parentId','forEach','delete','getUser','_commentService','parse','filter','root','rangeType','ref','updateComment','solved','pipe','users','post','replies','Unknown','personId','defineProperty','error','Solved','_threadCommentDataSource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getCurrentUser','code','44072ZpYhXo','12ASDTuc','syncUpdateMutationToColla','Delete','setConfig','rangeId'];_0x143e=function(){return _0x2e092c;};return _0x143e();}(function(_0x66fd32,_0x1c308a){const _0x2f80e8=_0x716a,_0x51c83c=_0x66fd32();while(!![]){try{const _0x1fd395=-parseInt(_0x2f80e8(0x21e))/0x1+parseInt(_0x2f80e8(0x217))/0x2+parseInt(_0x2f80e8(0x1e8))/0x3*(-parseInt(_0x2f80e8(0x1e7))/0x4)+parseInt(_0x2f80e8(0x219))/0x5+parseInt(_0x2f80e8(0x215))/0x6+parseInt(_0x2f80e8(0x1ff))/0x7+-parseInt(_0x2f80e8(0x20f))/0x8;if(_0x1fd395===_0x1c308a)break;else _0x51c83c['push'](_0x51c83c['shift']());}catch(_0x50f761){_0x51c83c['push'](_0x51c83c['shift']());}}}(_0x143e,0x1b0f9));import{CommentService as _0x15df87,CollaborationSessionService as _0x47b523,UniverCollaborationClientPlugin as _0x492122}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x9bd0ef}from'@univerjs-pro/license';import{dayjs as _0x873951,UserManagerService as _0x1ef31c,Inject as _0x3f2e70,Injector as _0x26149e,Disposable as _0x831525,CustomRangeType as _0x4d44c4,UniverInstanceType as _0x1cc92f,DependentOn as _0x32111c,IConfigService as _0x2de010,Plugin as _0x43e48f,merge as _0x3055a3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4584a9}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x33be90,IThreadCommentDataSourceService as _0x9cd755}from'@univerjs/thread-comment';import{bufferTime as _0x35848d}from'rxjs';function _0x716a(_0x1918d6,_0x1dd277){_0x1918d6=_0x1918d6-0x1d1;const _0x143e50=_0x143e();let _0x716ac9=_0x143e50[_0x1918d6];return _0x716ac9;}import{HTTPService as _0x38f331}from'@univerjs/network';const W=_0x4218c7(0x1e4);var I=(_0x5f0869=>(_0x5f0869[_0x5f0869[_0x4218c7(0x220)]=0x0]='OpenOrReOpen',_0x5f0869[_0x5f0869[_0x4218c7(0x1e2)]=0x1]=_0x4218c7(0x1e2),_0x5f0869[_0x5f0869[_0x4218c7(0x1f2)]=-0x1]=_0x4218c7(0x1f2),_0x5f0869))(I||{}),v=(_0x5b6c01=>(_0x5b6c01[_0x5b6c01[_0x4218c7(0x1de)]=0x0]=_0x4218c7(0x1de),_0x5b6c01[_0x5b6c01['Add']=0x1]=_0x4218c7(0x1f1),_0x5b6c01[_0x5b6c01[_0x4218c7(0x205)]=0x2]=_0x4218c7(0x205),_0x5b6c01[_0x5b6c01[_0x4218c7(0x207)]=0x3]=_0x4218c7(0x207),_0x5b6c01[_0x5b6c01[_0x4218c7(0x1ea)]=0x4]=_0x4218c7(0x1ea),_0x5b6c01[_0x5b6c01[_0x4218c7(0x230)]=0x5]=_0x4218c7(0x230),_0x5b6c01[_0x5b6c01[_0x4218c7(0x1f2)]=-0x1]=_0x4218c7(0x1f2),_0x5b6c01))(v||{});const y=_0x12abc3=>_0x873951(new Date(+_0x12abc3))[_0x4218c7(0x1f7)](_0x4218c7(0x1f6)),B=async(_0x2b74c7,_0x3164b4)=>{const _0x1def27=_0x4218c7,_0x307b96=_0x2b74c7['get'](_0x1ef31c),_0x150b11=_0x2b74c7[_0x1def27(0x214)](_0x38f331);_0x3164b4[_0x1def27(0x232)](_0xa3ee4c=>{const _0x56dd61=_0x1def27;_0x307b96[_0x56dd61(0x1d1)](_0xa3ee4c)&&_0x3164b4[_0x56dd61(0x233)](_0xa3ee4c);}),_0x3164b4[_0x1def27(0x200)]&&(await _0x150b11['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x3164b4]}}))[_0x1def27(0x209)][_0x1def27(0x1db)][_0x1def27(0x232)](_0x48990f=>{const _0x13a684=_0x1def27;_0x48990f&&_0x307b96[_0x13a684(0x21d)](_0x48990f);});};var K=Object[_0x4218c7(0x1f3)],V=(_0x192bc9,_0x14979c,_0x8a3eed,_0x4c9f6d)=>{const _0x4cb551=_0x4218c7;for(var _0x2fd330=_0x4c9f6d>0x1?void 0x0:_0x4c9f6d?K(_0x14979c,_0x8a3eed):_0x14979c,_0x1e4725=_0x192bc9[_0x4cb551(0x1f5)]-0x1,_0x4056e3;_0x1e4725>=0x0;_0x1e4725--)(_0x4056e3=_0x192bc9[_0x1e4725])&&(_0x2fd330=_0x4056e3(_0x2fd330)||_0x2fd330);return _0x2fd330;},p=(_0x4597ee,_0x44c187)=>(_0x9b5e9d,_0x3be1f9)=>_0x44c187(_0x9b5e9d,_0x3be1f9,_0x4597ee);let _=class extends _0x831525{constructor(_0x4d2114,_0x5adc6f,_0x2e04ff,_0xd5b455){const _0x3bfe2e=_0x4218c7;super(),this[_0x3bfe2e(0x1d2)]=_0x4d2114,this[_0x3bfe2e(0x229)]=_0x5adc6f,this[_0x3bfe2e(0x211)]=_0x2e04ff,this[_0x3bfe2e(0x202)]=_0xd5b455,this[_0x3bfe2e(0x20c)](),this['_initUserSync']();}[_0x4218c7(0x22c)](){const _0x63f98e=_0x4218c7;this['disposeWithMe'](this[_0x63f98e(0x229)][_0x63f98e(0x21a)][_0x63f98e(0x1da)](_0x35848d(0x10))[_0x63f98e(0x212)](_0x2d06d6=>{const _0x271841=_0x63f98e,_0x55e8db=new Set();_0x2d06d6[_0x271841(0x232)](_0x50c8c8=>{const _0x547847=_0x271841;if(_0x50c8c8[_0x547847(0x201)]==='add'){const _0x2207cf=_0x50c8c8['payload'][_0x547847(0x1df)];_0x55e8db['add'](_0x2207cf);}}),B(this[_0x271841(0x202)],_0x55e8db);}));}[_0x4218c7(0x20c)](){const _0x402355=_0x4218c7;this['disposeWithMe'](this[_0x402355(0x1d2)][_0x402355(0x21a)][_0x402355(0x212)](async _0x49fc4b=>{const _0xbc69eb=_0x402355;var _0x5c527e,_0x3640e3,_0x148af9,_0x5ae678;const _0x55e995=(_0x5c527e=this['_threadCommentModel']['getUnit'](_0x49fc4b['unitId'])[_0xbc69eb(0x208)](_0x4ce32b=>_0x4ce32b['threadId']===_0x49fc4b['threadId']))==null?void 0x0:_0x5c527e[_0xbc69eb(0x1d5)];if(!_0x55e995)return;const {unitId:_0x1d6eb1,subUnitId:_0x2870d9}=_0x55e995;switch(_0x49fc4b[_0xbc69eb(0x20b)]&&this[_0xbc69eb(0x211)][_0xbc69eb(0x21d)](_0x49fc4b['user']),_0x49fc4b[_0xbc69eb(0x201)]){case v['Add']:break;case v['Reply']:{this[_0xbc69eb(0x229)]['addComment'](_0x1d6eb1,_0x2870d9,{'unitId':_0x1d6eb1,'subUnitId':_0x2870d9,'ref':'','id':_0x49fc4b['replyId'],'dT':y(+_0x49fc4b[_0xbc69eb(0x228)]),'threadId':_0x49fc4b[_0xbc69eb(0x20d)],'personId':(_0x148af9=(_0x3640e3=_0x49fc4b[_0xbc69eb(0x20b)])==null?void 0x0:_0x3640e3['userID'])!=null?_0x148af9:_0x49fc4b['userId'],'text':JSON[_0xbc69eb(0x1d3)](_0x49fc4b['content']),'parentId':_0x55e995['id']});break;}case v['Delete']:{const _0x19f684=this[_0xbc69eb(0x229)]['getComment'](_0x1d6eb1,_0x2870d9,_0x49fc4b[_0xbc69eb(0x225)]);_0x19f684&&_0x19f684[_0xbc69eb(0x231)]&&this[_0xbc69eb(0x229)][_0xbc69eb(0x224)](_0x1d6eb1,_0x2870d9,_0x49fc4b['replyId']);break;}case v[_0xbc69eb(0x207)]:{this[_0xbc69eb(0x229)][_0xbc69eb(0x1d8)](_0x1d6eb1,_0x2870d9,{'commentId':_0x49fc4b[_0xbc69eb(0x225)],'text':JSON[_0xbc69eb(0x1d3)](_0x49fc4b['content'])});break;}case v[_0xbc69eb(0x230)]:{const _0x582a11=(_0x5ae678=this[_0xbc69eb(0x229)][_0xbc69eb(0x1f9)](_0x49fc4b[_0xbc69eb(0x226)])[_0xbc69eb(0x208)](_0x1fda1b=>_0x1fda1b[_0xbc69eb(0x20d)]===_0x49fc4b[_0xbc69eb(0x20d)]))==null?void 0x0:_0x5ae678[_0xbc69eb(0x1d5)];_0x582a11&&this['_threadCommentModel'][_0xbc69eb(0x1fc)](_0x1d6eb1,_0x2870d9,_0x582a11['id'],_0x49fc4b[_0xbc69eb(0x1d9)]===I[_0xbc69eb(0x1e2)]);break;}}}));}};_=V([p(0x0,_0x3f2e70(_0x15df87)),p(0x1,_0x3f2e70(_0x33be90)),p(0x2,_0x3f2e70(_0x1ef31c)),p(0x3,_0x3f2e70(_0x26149e))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x4218c7(0x1f3)],Q=(_0x47c557,_0x4a5960,_0x272313,_0x38d71b)=>{const _0x387679=_0x4218c7;for(var _0x344a28=_0x38d71b>0x1?void 0x0:_0x38d71b?k(_0x4a5960,_0x272313):_0x4a5960,_0x1f097c=_0x47c557[_0x387679(0x1f5)]-0x1,_0x11d3d6;_0x1f097c>=0x0;_0x1f097c--)(_0x11d3d6=_0x47c557[_0x1f097c])&&(_0x344a28=_0x11d3d6(_0x344a28)||_0x344a28);return _0x344a28;},b=(_0x32110c,_0x2b85ab)=>(_0x445ff2,_0x463e57)=>_0x2b85ab(_0x445ff2,_0x463e57,_0x32110c);function X(_0x5a3f30,_0x4d1f24){const _0x1c31cc=_0x4218c7,_0x2a29a4=_0x5a3f30['replies'][0x0];return{..._0x4d1f24,'id':_0x2a29a4[_0x1c31cc(0x225)],'resolved':_0x5a3f30[_0x1c31cc(0x1d9)]===0x1,'dT':y(_0x2a29a4[_0x1c31cc(0x228)]),'personId':_0x2a29a4[_0x1c31cc(0x21c)],'threadId':_0x2a29a4[_0x1c31cc(0x20d)]};}function ee(_0x1db4e4,_0x41190d,_0x219977){const _0x2de16c=_0x4218c7;var _0x5e2f2e,_0x5e7143;if(((_0x5e7143=(_0x5e2f2e=_0x1db4e4==null?void 0x0:_0x1db4e4[_0x2de16c(0x1dd)])==null?void 0x0:_0x5e2f2e[_0x2de16c(0x1f5)])!=null?_0x5e7143:0x0)>0x0){const _0x48039b=(_0x466d0a,_0x4a2e6e)=>({'id':_0x466d0a[_0x2de16c(0x225)],'threadId':_0x466d0a[_0x2de16c(0x20d)],'dT':y(_0x466d0a[_0x2de16c(0x228)]),'personId':_0x466d0a['userId'],'resolved':_0x1db4e4['solved']===I[_0x2de16c(0x1e2)],'unitId':_0x41190d,'subUnitId':_0x219977,'text':JSON['parse'](_0x466d0a['content']),'parentId':_0x4a2e6e}),_0x3855ce=_0x48039b(_0x1db4e4[_0x2de16c(0x1dd)][0x0]);return{..._0x3855ce,'children':_0x1db4e4[_0x2de16c(0x1dd)]['slice'](0x1)[_0x2de16c(0x206)](_0x38b556=>_0x48039b(_0x38b556,_0x3855ce['id']))};}return null;}let S=class{constructor(_0x4b4a53,_0xaebdbe,_0x24c1e3){const _0x1de901=_0x4218c7;this[_0x1de901(0x218)]=_0x4b4a53,this['_userService']=_0xaebdbe,this[_0x1de901(0x227)]=_0x24c1e3;}async[_0x4218c7(0x204)](_0x29b766){const _0xed19f2=_0x4218c7;var _0x15d3be,_0x84ce7f;const {parentId:_0x462490,unitId:_0x40babf,text:_0x9e69b0,threadId:_0x161dd0}=_0x29b766,_0x425094=(_0x84ce7f=(_0x15d3be=_0x9e69b0[_0xed19f2(0x1fe)])==null?void 0x0:_0x15d3be[_0xed19f2(0x1d4)](_0x420c4a=>_0x420c4a[_0xed19f2(0x1d6)]===_0x4d44c4[_0xed19f2(0x20e)])['map'](_0x4b1ce8=>_0x4b1ce8[_0xed19f2(0x1ec)]))!=null?_0x84ce7f:[],_0x4a4311=JSON['stringify'](_0x9e69b0),_0x2eb547=(await this[_0xed19f2(0x227)][_0xed19f2(0x1ef)](_0x40babf))[_0xed19f2(0x203)]();if(_0x462490){const _0x2bf9c3={'memberId':_0x2eb547,'unitId':_0x40babf,'content':_0x4a4311,'mention':_0x425094,'threadId':_0x161dd0},_0x283ef8=(await this[_0xed19f2(0x218)][_0xed19f2(0x1dc)](_0xed19f2(0x1fa)+_0x40babf+_0xed19f2(0x1ed),{'body':_0x2bf9c3}))[_0xed19f2(0x209)][_0xed19f2(0x1fb)];return{..._0x29b766,'id':_0x283ef8[_0xed19f2(0x225)],'dT':_0x873951(+_0x283ef8[_0xed19f2(0x228)])[_0xed19f2(0x1f7)](_0xed19f2(0x1f6)),'personId':_0x283ef8['userId']};}else{const _0x285d39={'memberId':_0x2eb547,'unitId':_0x40babf,'content':_0x4a4311,'mention':_0x425094},_0x40a9bc=await this[_0xed19f2(0x218)][_0xed19f2(0x1dc)]('/universer-api/comment/unit/'+_0x40babf+_0xed19f2(0x22e),{'body':_0x285d39});return X(_0x40a9bc[_0xed19f2(0x209)][_0xed19f2(0x1f8)],_0x29b766);}}async[_0x4218c7(0x1d8)](_0x356749){const _0x344c6e=_0x4218c7;var _0x43d996,_0x5b5391;const {text:_0x4a272f,unitId:_0x49b06f}=_0x356749,_0x4ee270=(_0x5b5391=(_0x43d996=_0x4a272f[_0x344c6e(0x1fe)])==null?void 0x0:_0x43d996[_0x344c6e(0x1d4)](_0x2bd491=>_0x2bd491[_0x344c6e(0x1d6)]===_0x4d44c4[_0x344c6e(0x20e)])[_0x344c6e(0x206)](_0x2200a5=>_0x2200a5['rangeId']))!=null?_0x5b5391:[],_0xd9c0d5=JSON[_0x344c6e(0x1f4)](_0x4a272f),_0x5d35fe=_0x356749[_0x344c6e(0x20d)],_0x15eebc=_0x356749['id'],_0x427bcb={'memberId':(await this['_sessionService'][_0x344c6e(0x1ef)](_0x49b06f))[_0x344c6e(0x203)](),'unitId':_0x49b06f,'threadId':_0x5d35fe,'mention':_0x4ee270,'content':_0xd9c0d5,'replyId':_0x15eebc},_0x4ea436=await this[_0x344c6e(0x218)][_0x344c6e(0x1dc)](_0x344c6e(0x1fa)+_0x49b06f+'/edit',{'body':_0x427bcb});return!_0x4ea436[_0x344c6e(0x209)][_0x344c6e(0x1e1)]||_0x4ea436[_0x344c6e(0x209)]['error'][_0x344c6e(0x1e6)]===0x1;}async[_0x4218c7(0x1fc)](_0x2d1519){const _0x544348=_0x4218c7,{unitId:_0x436281}=_0x2d1519,_0x36578b=_0x2d1519[_0x544348(0x20d)],_0x2e6d6a={'memberId':this['_userService'][_0x544348(0x1e5)]()[_0x544348(0x210)],'unitId':_0x436281,'threadId':_0x36578b,'solved':_0x2d1519[_0x544348(0x1ee)]?I[_0x544348(0x1e2)]:I['OpenOrReOpen']},_0x3d891c=await this[_0x544348(0x218)][_0x544348(0x1dc)]('/universer-api/comment/unit/'+_0x436281+_0x544348(0x221),{'body':_0x2e6d6a});return!_0x3d891c[_0x544348(0x209)][_0x544348(0x1e1)]||_0x3d891c[_0x544348(0x209)]['error']['code']===0x1;}async[_0x4218c7(0x224)](_0x31e4b3,_0x244e01,_0x6de72c,_0x1d24c9){const _0x578b0e=_0x4218c7,_0x4efc2d={'memberId':(await this[_0x578b0e(0x227)][_0x578b0e(0x1ef)](_0x31e4b3))[_0x578b0e(0x203)](),'threadId':_0x6de72c,'replyId':_0x1d24c9,'unitId':_0x31e4b3},_0x11972f=await this['_httpService'][_0x578b0e(0x1dc)](_0x578b0e(0x1fa)+_0x31e4b3+'/delete',{'body':_0x4efc2d});return!_0x11972f[_0x578b0e(0x209)][_0x578b0e(0x1e1)]||_0x11972f[_0x578b0e(0x209)]['error'][_0x578b0e(0x1e6)]===0x1;}async[_0x4218c7(0x213)](_0x31eca4,_0xbdcd3c,_0x15cd62){const _0x20e85a=_0x4218c7,_0x6b7dd5={'unitId':_0x31eca4,'threadId':_0x15cd62},_0x26ef53=await this[_0x20e85a(0x218)]['post'](_0x20e85a(0x1fa)+_0x31eca4+'/list',{'body':_0x6b7dd5}),_0x3883fd=_0x15cd62[_0x20e85a(0x206)](_0x17bf57=>ee(_0x26ef53[_0x20e85a(0x209)]['comments'][_0x17bf57],_0x31eca4,_0xbdcd3c))[_0x20e85a(0x1d4)](Boolean);return Object[_0x20e85a(0x21b)](_0x26ef53[_0x20e85a(0x209)]['users'])['forEach'](_0x5637d3=>{const _0x2453c2=_0x20e85a;this['_userService'][_0x2453c2(0x21d)](_0x5637d3);}),_0x3883fd;}[_0x4218c7(0x1fd)](_0x4bc85b){const _0xe5ebcc=_0x4218c7;return{'id':_0x4bc85b['id'],'threadId':_0x4bc85b[_0xe5ebcc(0x20d)],'ref':_0x4bc85b[_0xe5ebcc(0x1d7)]};}};S=Q([b(0x0,_0x3f2e70(_0x38f331)),b(0x1,_0x3f2e70(_0x1ef31c)),b(0x2,_0x3f2e70(_0x47b523))],S);var re=Object[_0x4218c7(0x1f3)],te=(_0x2191d6,_0x54b964,_0x2bee57,_0x1c7e50)=>{const _0x45493f=_0x4218c7;for(var _0x31cda9=_0x1c7e50>0x1?void 0x0:_0x1c7e50?re(_0x54b964,_0x2bee57):_0x54b964,_0x31ea22=_0x2191d6[_0x45493f(0x1f5)]-0x1,_0x6bd8bc;_0x31ea22>=0x0;_0x31ea22--)(_0x6bd8bc=_0x2191d6[_0x31ea22])&&(_0x31cda9=_0x6bd8bc(_0x31cda9)||_0x31cda9);return _0x31cda9;},M=(_0x58486d,_0x489cd5)=>(_0x4fe9ae,_0x3c2fff)=>_0x489cd5(_0x4fe9ae,_0x3c2fff,_0x58486d);let f=class extends _0x831525{constructor(_0x1d8806,_0x530842){const _0x9b7969=_0x4218c7;super(),this[_0x9b7969(0x222)]=_0x1d8806,this[_0x9b7969(0x1e3)]=_0x530842,this[_0x9b7969(0x216)]();}[_0x4218c7(0x216)](){const _0x49babb=_0x4218c7;this['_threadCommentDataSourceService'][_0x49babb(0x20a)]=this[_0x49babb(0x1e3)],this[_0x49babb(0x222)][_0x49babb(0x1e9)]=!0x1;}};f=te([M(0x0,_0x9cd755),M(0x1,_0x3f2e70(S))],f);var se=Object[_0x4218c7(0x1e0)],oe=Object[_0x4218c7(0x1f3)],ne=(_0x3528a2,_0x15f62a,_0x28831d)=>_0x15f62a in _0x3528a2?se(_0x3528a2,_0x15f62a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x28831d}):_0x3528a2[_0x15f62a]=_0x28831d,ie=(_0x27405c,_0x2bb3c3,_0x46eea7,_0x498627)=>{const _0x55ecbf=_0x4218c7;for(var _0x424e4c=_0x498627>0x1?void 0x0:_0x498627?oe(_0x2bb3c3,_0x46eea7):_0x2bb3c3,_0x398c8e=_0x27405c[_0x55ecbf(0x1f5)]-0x1,_0x23e5f9;_0x398c8e>=0x0;_0x398c8e--)(_0x23e5f9=_0x27405c[_0x398c8e])&&(_0x424e4c=_0x23e5f9(_0x424e4c)||_0x424e4c);return _0x424e4c;},N=(_0x4e9266,_0x3764c6)=>(_0x4e40d0,_0x308b03)=>_0x3764c6(_0x4e40d0,_0x308b03,_0x4e9266),$=(_0x347b71,_0x59bf4f,_0x316586)=>ne(_0x347b71,typeof _0x59bf4f!=_0x4218c7(0x22f)?_0x59bf4f+'':_0x59bf4f,_0x316586);let g=class extends _0x43e48f{constructor(_0x3f0e86=O,_0x2e6298,_0x140c8c){const _0xb2eb85=_0x4218c7;super(),this[_0xb2eb85(0x22b)]=_0x3f0e86,this[_0xb2eb85(0x202)]=_0x2e6298,this[_0xb2eb85(0x21f)]=_0x140c8c;const {..._0x343f8f}=_0x3055a3({},O,this[_0xb2eb85(0x22b)]);this[_0xb2eb85(0x21f)][_0xb2eb85(0x1eb)](z,_0x343f8f);}[_0x4218c7(0x22d)](){const _0x334ea9=_0x4218c7;[[S],[f],[_]][_0x334ea9(0x232)](_0x33bb13=>{const _0x282e1b=_0x334ea9;this[_0x282e1b(0x202)]['add'](_0x33bb13);});}[_0x4218c7(0x223)](){const _0x1118ff=_0x4218c7;this['_injector'][_0x1118ff(0x214)](f),this[_0x1118ff(0x202)][_0x1118ff(0x214)](_);}};$(g,_0x4218c7(0x22a),W),$(g,_0x4218c7(0x201),_0x1cc92f[_0x4218c7(0x1f0)]),g=ie([_0x32111c(_0x4584a9,_0x492122,_0x9bd0ef),N(0x1,_0x3f2e70(_0x26149e)),N(0x2,_0x2de010)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0xa7205c=_0x46db;(function(_0x54d2e5,_0x4bfef5){const _0x21a789=_0x46db,_0x525a98=_0x54d2e5();while(!![]){try{const _0x3f2e73=-parseInt(_0x21a789(0x101))/0x1*(-parseInt(_0x21a789(0x142))/0x2)+parseInt(_0x21a789(0x144))/0x3+-parseInt(_0x21a789(0x10f))/0x4*(parseInt(_0x21a789(0x114))/0x5)+-parseInt(_0x21a789(0x139))/0x6*(parseInt(_0x21a789(0x109))/0x7)+-parseInt(_0x21a789(0xe7))/0x8*(-parseInt(_0x21a789(0x103))/0x9)+-parseInt(_0x21a789(0x14b))/0xa+-parseInt(_0x21a789(0xfb))/0xb*(-parseInt(_0x21a789(0x128))/0xc);if(_0x3f2e73===_0x4bfef5)break;else _0x525a98['push'](_0x525a98['shift']());}catch(_0x5d551e){_0x525a98['push'](_0x525a98['shift']());}}}(_0x41e7,0xaafa2));function _0x41e7(){const _0x43693c=['resolveComment','2246944bgWBir','rangeType','Solved','getOwnPropertyDescriptor','_injector','saveCommentToSnapshot','154404cJPkHj','OpenOrReOpen','subscribe','Delete','type','65nwuQSa','/delete','/universer-api/user/list','addComment','forEach','_sessionService','size','replyId','disposeWithMe','content','UNIVER_UNKNOWN','reply','code','/universer-api/comment/unit/','body','syncUpdateMutationToColla','createTimestamp','_threadCommentModel','userID','ref','11484828KMeGZi','getCurrentUser','comment','resolved','solved','/solved','Edit','post','COMMENT','map','find','/reply','getUser','parse','_configService','format','_threadCommentDataSource','24hGciXf','Solve','add','Unknown','stringify','onStarting','rangeId','replies','_init','6NxlRZA','dataSource','2157216dTtKTS','users','root','personId','YYYY/MM/DD\x20HH:mm','UNRECOGNIZED','filter','9477760ousEXe','customRanges','_initDataSource','updateComment','438928XTZpcj','_httpService','_userService','Add','unitId','length','getMemberID','_threadCommentDataSourceService','get','listComments','threadId','pluginName','getUnit','values','Reply','requireSession','getComment','_initUserSync','_commentService','slice','22YabrTj','user','userId','parentId','defineProperty','error','29137cNygfj','/list','117bAxHOw','pipe','deleteComment','addUser','payload'];_0x41e7=function(){return _0x43693c;};return _0x41e7();}import{CommentService as _0x15e370,CollaborationSessionService as _0x3318dd,UniverCollaborationClientPlugin as _0x2c98f7}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x52f3b9}from'@univerjs-pro/license';import{dayjs as _0x4da51b,UserManagerService as _0x18abd9,Inject as _0x28a1f8,Injector as _0x54d40d,Disposable as _0x356b4e,CustomRangeType as _0x5db075,UniverInstanceType as _0x1945c7,DependentOn as _0x20ab80,IConfigService as _0x476b8d,Plugin as _0x88c673,merge as _0x403e38}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x798c6}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2f4ecd,IThreadCommentDataSourceService as _0x450486}from'@univerjs/thread-comment';import{bufferTime as _0x19a41c}from'rxjs';import{HTTPService as _0x25424b}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x1ca600=>(_0x1ca600[_0x1ca600['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x1ca600[_0x1ca600['Solved']=0x1]=_0xa7205c(0x10b),_0x1ca600[_0x1ca600[_0xa7205c(0x149)]=-0x1]=_0xa7205c(0x149),_0x1ca600))(I||{}),v=(_0x154422=>(_0x154422[_0x154422[_0xa7205c(0x13c)]=0x0]=_0xa7205c(0x13c),_0x154422[_0x154422[_0xa7205c(0xea)]=0x1]=_0xa7205c(0xea),_0x154422[_0x154422[_0xa7205c(0xf5)]=0x2]=_0xa7205c(0xf5),_0x154422[_0x154422[_0xa7205c(0x12e)]=0x3]=_0xa7205c(0x12e),_0x154422[_0x154422[_0xa7205c(0x112)]=0x4]=_0xa7205c(0x112),_0x154422[_0x154422[_0xa7205c(0x13a)]=0x5]='Solve',_0x154422[_0x154422[_0xa7205c(0x149)]=-0x1]=_0xa7205c(0x149),_0x154422))(v||{});const y=_0x3c251d=>_0x4da51b(new Date(+_0x3c251d))[_0xa7205c(0x137)](_0xa7205c(0x148)),B=async(_0x57d345,_0x16b1bb)=>{const _0x3c0404=_0xa7205c,_0x16d0d0=_0x57d345[_0x3c0404(0xef)](_0x18abd9),_0xe60297=_0x57d345[_0x3c0404(0xef)](_0x25424b);_0x16b1bb['forEach'](_0x264763=>{const _0x5945dc=_0x3c0404;_0x16d0d0[_0x5945dc(0x134)](_0x264763)&&_0x16b1bb['delete'](_0x264763);}),_0x16b1bb[_0x3c0404(0x11a)]&&(await _0xe60297[_0x3c0404(0xef)](_0x3c0404(0x116),{'params':{'userIDs':[..._0x16b1bb]}}))[_0x3c0404(0x122)]['users']['forEach'](_0x532d39=>{const _0x2c9b97=_0x3c0404;_0x532d39&&_0x16d0d0[_0x2c9b97(0x106)](_0x532d39);});};var K=Object[_0xa7205c(0x10c)],V=(_0x269718,_0x389a47,_0x27c4ca,_0x18011d)=>{const _0x2fb400=_0xa7205c;for(var _0x1a9484=_0x18011d>0x1?void 0x0:_0x18011d?K(_0x389a47,_0x27c4ca):_0x389a47,_0x518bc1=_0x269718[_0x2fb400(0xec)]-0x1,_0x20df37;_0x518bc1>=0x0;_0x518bc1--)(_0x20df37=_0x269718[_0x518bc1])&&(_0x1a9484=_0x20df37(_0x1a9484)||_0x1a9484);return _0x1a9484;},p=(_0x1854b0,_0x2ebcff)=>(_0x435eef,_0x373a06)=>_0x2ebcff(_0x435eef,_0x373a06,_0x1854b0);let _=class extends _0x356b4e{constructor(_0xad650c,_0x4327eb,_0x4b9f95,_0x5a3d1f){const _0xc992eb=_0xa7205c;super(),this[_0xc992eb(0xf9)]=_0xad650c,this[_0xc992eb(0x125)]=_0x4327eb,this['_userService']=_0x4b9f95,this[_0xc992eb(0x10d)]=_0x5a3d1f,this[_0xc992eb(0x141)](),this[_0xc992eb(0xf8)]();}[_0xa7205c(0xf8)](){const _0x584d40=_0xa7205c;this[_0x584d40(0x11c)](this[_0x584d40(0x125)]['commentUpdate$'][_0x584d40(0x104)](_0x19a41c(0x10))[_0x584d40(0x111)](_0x282326=>{const _0x761c5f=_0x584d40,_0x52c0b3=new Set();_0x282326[_0x761c5f(0x118)](_0xaa989f=>{const _0xf617c4=_0x761c5f;if(_0xaa989f[_0xf617c4(0x113)]===_0xf617c4(0x13b)){const _0x3b9b0e=_0xaa989f[_0xf617c4(0x107)][_0xf617c4(0x147)];_0x52c0b3[_0xf617c4(0x13b)](_0x3b9b0e);}}),B(this[_0x761c5f(0x10d)],_0x52c0b3);}));}[_0xa7205c(0x141)](){const _0x1ed4fd=_0xa7205c;this[_0x1ed4fd(0x11c)](this[_0x1ed4fd(0xf9)]['commentUpdate$'][_0x1ed4fd(0x111)](async _0x181340=>{const _0xc13be1=_0x1ed4fd;var _0x449eca,_0x1df1df,_0x478c1e,_0x560d03;const _0x400dea=(_0x449eca=this[_0xc13be1(0x125)][_0xc13be1(0xf3)](_0x181340[_0xc13be1(0xeb)])[_0xc13be1(0x132)](_0x1ce48=>_0x1ce48[_0xc13be1(0xf1)]===_0x181340[_0xc13be1(0xf1)]))==null?void 0x0:_0x449eca[_0xc13be1(0x146)];if(!_0x400dea)return;const {unitId:_0x310b82,subUnitId:_0x272fbd}=_0x400dea;switch(_0x181340['user']&&this[_0xc13be1(0xe9)][_0xc13be1(0x106)](_0x181340[_0xc13be1(0xfc)]),_0x181340[_0xc13be1(0x113)]){case v[_0xc13be1(0xea)]:break;case v[_0xc13be1(0xf5)]:{this[_0xc13be1(0x125)][_0xc13be1(0x117)](_0x310b82,_0x272fbd,{'unitId':_0x310b82,'subUnitId':_0x272fbd,'ref':'','id':_0x181340[_0xc13be1(0x11b)],'dT':y(+_0x181340['createTimestamp']),'threadId':_0x181340[_0xc13be1(0xf1)],'personId':(_0x478c1e=(_0x1df1df=_0x181340[_0xc13be1(0xfc)])==null?void 0x0:_0x1df1df[_0xc13be1(0x126)])!=null?_0x478c1e:_0x181340[_0xc13be1(0xfd)],'text':JSON[_0xc13be1(0x135)](_0x181340[_0xc13be1(0x11d)]),'parentId':_0x400dea['id']});break;}case v[_0xc13be1(0x112)]:{const _0x4e5aca=this[_0xc13be1(0x125)][_0xc13be1(0xf7)](_0x310b82,_0x272fbd,_0x181340[_0xc13be1(0x11b)]);_0x4e5aca&&_0x4e5aca[_0xc13be1(0xfe)]&&this[_0xc13be1(0x125)][_0xc13be1(0x105)](_0x310b82,_0x272fbd,_0x181340[_0xc13be1(0x11b)]);break;}case v[_0xc13be1(0x12e)]:{this[_0xc13be1(0x125)][_0xc13be1(0xe6)](_0x310b82,_0x272fbd,{'commentId':_0x181340[_0xc13be1(0x11b)],'text':JSON[_0xc13be1(0x135)](_0x181340[_0xc13be1(0x11d)])});break;}case v['Solve']:{const _0x3da7b6=(_0x560d03=this[_0xc13be1(0x125)][_0xc13be1(0xf3)](_0x181340[_0xc13be1(0xeb)])[_0xc13be1(0x132)](_0x424f00=>_0x424f00[_0xc13be1(0xf1)]===_0x181340[_0xc13be1(0xf1)]))==null?void 0x0:_0x560d03[_0xc13be1(0x146)];_0x3da7b6&&this[_0xc13be1(0x125)][_0xc13be1(0x108)](_0x310b82,_0x272fbd,_0x3da7b6['id'],_0x181340[_0xc13be1(0x12c)]===I[_0xc13be1(0x10b)]);break;}}}));}};_=V([p(0x0,_0x28a1f8(_0x15e370)),p(0x1,_0x28a1f8(_0x2f4ecd)),p(0x2,_0x28a1f8(_0x18abd9)),p(0x3,_0x28a1f8(_0x54d40d))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0xa7205c(0x10c)],Q=(_0x161695,_0x575575,_0x143ddf,_0x47172c)=>{const _0x39bac8=_0xa7205c;for(var _0x52dfd9=_0x47172c>0x1?void 0x0:_0x47172c?k(_0x575575,_0x143ddf):_0x575575,_0x3fef4a=_0x161695[_0x39bac8(0xec)]-0x1,_0x195f0d;_0x3fef4a>=0x0;_0x3fef4a--)(_0x195f0d=_0x161695[_0x3fef4a])&&(_0x52dfd9=_0x195f0d(_0x52dfd9)||_0x52dfd9);return _0x52dfd9;},b=(_0x71ed32,_0x44ec58)=>(_0x1ce371,_0x5ab356)=>_0x44ec58(_0x1ce371,_0x5ab356,_0x71ed32);function X(_0x332df4,_0x34216b){const _0x540151=_0xa7205c,_0x414cc7=_0x332df4[_0x540151(0x140)][0x0];return{..._0x34216b,'id':_0x414cc7[_0x540151(0x11b)],'resolved':_0x332df4[_0x540151(0x12c)]===0x1,'dT':y(_0x414cc7['createTimestamp']),'personId':_0x414cc7[_0x540151(0xfd)],'threadId':_0x414cc7[_0x540151(0xf1)]};}function ee(_0xa2d2c,_0x1806a9,_0x4b037){const _0x43fe8c=_0xa7205c;var _0x263503,_0x12748d;if(((_0x12748d=(_0x263503=_0xa2d2c==null?void 0x0:_0xa2d2c['replies'])==null?void 0x0:_0x263503[_0x43fe8c(0xec)])!=null?_0x12748d:0x0)>0x0){const _0x2a3e6d=(_0x59d83e,_0x27b302)=>({'id':_0x59d83e[_0x43fe8c(0x11b)],'threadId':_0x59d83e[_0x43fe8c(0xf1)],'dT':y(_0x59d83e[_0x43fe8c(0x124)]),'personId':_0x59d83e[_0x43fe8c(0xfd)],'resolved':_0xa2d2c[_0x43fe8c(0x12c)]===I[_0x43fe8c(0x10b)],'unitId':_0x1806a9,'subUnitId':_0x4b037,'text':JSON[_0x43fe8c(0x135)](_0x59d83e[_0x43fe8c(0x11d)]),'parentId':_0x27b302}),_0x52f67a=_0x2a3e6d(_0xa2d2c['replies'][0x0]);return{..._0x52f67a,'children':_0xa2d2c[_0x43fe8c(0x140)][_0x43fe8c(0xfa)](0x1)['map'](_0x4f4c0c=>_0x2a3e6d(_0x4f4c0c,_0x52f67a['id']))};}return null;}let S=class{constructor(_0x4387f3,_0x2f38c2,_0x5b4617){const _0x1b6ef5=_0xa7205c;this[_0x1b6ef5(0xe8)]=_0x4387f3,this[_0x1b6ef5(0xe9)]=_0x2f38c2,this[_0x1b6ef5(0x119)]=_0x5b4617;}async[_0xa7205c(0x117)](_0x6256c5){const _0x59ef37=_0xa7205c;var _0x38a59a,_0x2397b2;const {parentId:_0x30f50c,unitId:_0x2ad071,text:_0x3e1fd1,threadId:_0x39f2a5}=_0x6256c5,_0x348c74=(_0x2397b2=(_0x38a59a=_0x3e1fd1[_0x59ef37(0x14c)])==null?void 0x0:_0x38a59a['filter'](_0x2de910=>_0x2de910['rangeType']===_0x5db075[_0x59ef37(0x130)])['map'](_0x4460c6=>_0x4460c6[_0x59ef37(0x13f)]))!=null?_0x2397b2:[],_0x29224a=JSON[_0x59ef37(0x13d)](_0x3e1fd1),_0x2cf497=(await this[_0x59ef37(0x119)]['requireSession'](_0x2ad071))['getMemberID']();if(_0x30f50c){const _0x1e73e5={'memberId':_0x2cf497,'unitId':_0x2ad071,'content':_0x29224a,'mention':_0x348c74,'threadId':_0x39f2a5},_0xa9c426=(await this[_0x59ef37(0xe8)][_0x59ef37(0x12f)](_0x59ef37(0x121)+_0x2ad071+_0x59ef37(0x133),{'body':_0x1e73e5}))[_0x59ef37(0x122)][_0x59ef37(0x11f)];return{..._0x6256c5,'id':_0xa9c426['replyId'],'dT':_0x4da51b(+_0xa9c426[_0x59ef37(0x124)])[_0x59ef37(0x137)](_0x59ef37(0x148)),'personId':_0xa9c426['userId']};}else{const _0x1abd44={'memberId':_0x2cf497,'unitId':_0x2ad071,'content':_0x29224a,'mention':_0x348c74},_0x325d5a=await this[_0x59ef37(0xe8)][_0x59ef37(0x12f)]('/universer-api/comment/unit/'+_0x2ad071+'/add',{'body':_0x1abd44});return X(_0x325d5a[_0x59ef37(0x122)][_0x59ef37(0x12a)],_0x6256c5);}}async[_0xa7205c(0xe6)](_0x5d8413){const _0x3aa1c1=_0xa7205c;var _0x534e59,_0x180c52;const {text:_0x2de538,unitId:_0x52fb6a}=_0x5d8413,_0x3ef212=(_0x180c52=(_0x534e59=_0x2de538[_0x3aa1c1(0x14c)])==null?void 0x0:_0x534e59[_0x3aa1c1(0x14a)](_0x4abf8c=>_0x4abf8c[_0x3aa1c1(0x10a)]===_0x5db075[_0x3aa1c1(0x130)])[_0x3aa1c1(0x131)](_0x2eb69b=>_0x2eb69b[_0x3aa1c1(0x13f)]))!=null?_0x180c52:[],_0x3d4ca1=JSON[_0x3aa1c1(0x13d)](_0x2de538),_0x5df793=_0x5d8413[_0x3aa1c1(0xf1)],_0x12794f=_0x5d8413['id'],_0x3cf19e={'memberId':(await this['_sessionService'][_0x3aa1c1(0xf6)](_0x52fb6a))[_0x3aa1c1(0xed)](),'unitId':_0x52fb6a,'threadId':_0x5df793,'mention':_0x3ef212,'content':_0x3d4ca1,'replyId':_0x12794f},_0x22bdd7=await this['_httpService'][_0x3aa1c1(0x12f)]('/universer-api/comment/unit/'+_0x52fb6a+'/edit',{'body':_0x3cf19e});return!_0x22bdd7[_0x3aa1c1(0x122)][_0x3aa1c1(0x100)]||_0x22bdd7[_0x3aa1c1(0x122)][_0x3aa1c1(0x100)][_0x3aa1c1(0x120)]===0x1;}async[_0xa7205c(0x108)](_0xb09c76){const _0x12dfb0=_0xa7205c,{unitId:_0x460328}=_0xb09c76,_0x14e324=_0xb09c76[_0x12dfb0(0xf1)],_0x50c6c1={'memberId':this[_0x12dfb0(0xe9)][_0x12dfb0(0x129)]()[_0x12dfb0(0x126)],'unitId':_0x460328,'threadId':_0x14e324,'solved':_0xb09c76[_0x12dfb0(0x12b)]?I[_0x12dfb0(0x10b)]:I[_0x12dfb0(0x110)]},_0xa12614=await this[_0x12dfb0(0xe8)][_0x12dfb0(0x12f)](_0x12dfb0(0x121)+_0x460328+_0x12dfb0(0x12d),{'body':_0x50c6c1});return!_0xa12614[_0x12dfb0(0x122)]['error']||_0xa12614['body']['error'][_0x12dfb0(0x120)]===0x1;}async[_0xa7205c(0x105)](_0x28ddbd,_0x8fcfbe,_0x237c42,_0x2fb808){const _0xd06161=_0xa7205c,_0x5bed67={'memberId':(await this[_0xd06161(0x119)][_0xd06161(0xf6)](_0x28ddbd))[_0xd06161(0xed)](),'threadId':_0x237c42,'replyId':_0x2fb808,'unitId':_0x28ddbd},_0x40d8c5=await this[_0xd06161(0xe8)]['post'](_0xd06161(0x121)+_0x28ddbd+_0xd06161(0x115),{'body':_0x5bed67});return!_0x40d8c5[_0xd06161(0x122)][_0xd06161(0x100)]||_0x40d8c5['body']['error'][_0xd06161(0x120)]===0x1;}async[_0xa7205c(0xf0)](_0x55f1da,_0xa1539b,_0x2b42e4){const _0x149183=_0xa7205c,_0x14bc2b={'unitId':_0x55f1da,'threadId':_0x2b42e4},_0x2f5512=await this[_0x149183(0xe8)][_0x149183(0x12f)]('/universer-api/comment/unit/'+_0x55f1da+_0x149183(0x102),{'body':_0x14bc2b}),_0x373da4=_0x2b42e4[_0x149183(0x131)](_0x1d9a89=>ee(_0x2f5512[_0x149183(0x122)]['comments'][_0x1d9a89],_0x55f1da,_0xa1539b))['filter'](Boolean);return Object[_0x149183(0xf4)](_0x2f5512[_0x149183(0x122)][_0x149183(0x145)])[_0x149183(0x118)](_0x19c02a=>{const _0x355c65=_0x149183;this[_0x355c65(0xe9)][_0x355c65(0x106)](_0x19c02a);}),_0x373da4;}[_0xa7205c(0x10e)](_0x5c971b){const _0x1d58cf=_0xa7205c;return{'id':_0x5c971b['id'],'threadId':_0x5c971b[_0x1d58cf(0xf1)],'ref':_0x5c971b[_0x1d58cf(0x127)]};}};function _0x46db(_0x42809c,_0x44816e){_0x42809c=_0x42809c-0xe6;const _0x41e77d=_0x41e7();let _0x46db0a=_0x41e77d[_0x42809c];return _0x46db0a;}S=Q([b(0x0,_0x28a1f8(_0x25424b)),b(0x1,_0x28a1f8(_0x18abd9)),b(0x2,_0x28a1f8(_0x3318dd))],S);var re=Object[_0xa7205c(0x10c)],te=(_0x4b8a50,_0x5d2732,_0x5866ce,_0x2c164d)=>{const _0x5af5ed=_0xa7205c;for(var _0xc213b0=_0x2c164d>0x1?void 0x0:_0x2c164d?re(_0x5d2732,_0x5866ce):_0x5d2732,_0x2ee5b6=_0x4b8a50[_0x5af5ed(0xec)]-0x1,_0x48cd51;_0x2ee5b6>=0x0;_0x2ee5b6--)(_0x48cd51=_0x4b8a50[_0x2ee5b6])&&(_0xc213b0=_0x48cd51(_0xc213b0)||_0xc213b0);return _0xc213b0;},M=(_0x36fd81,_0x391074)=>(_0x295041,_0x3cf1b4)=>_0x391074(_0x295041,_0x3cf1b4,_0x36fd81);let f=class extends _0x356b4e{constructor(_0x28cbc5,_0x4d0518){const _0xa3ea57=_0xa7205c;super(),this[_0xa3ea57(0xee)]=_0x28cbc5,this[_0xa3ea57(0x138)]=_0x4d0518,this[_0xa3ea57(0x14d)]();}[_0xa7205c(0x14d)](){const _0x42859e=_0xa7205c;this['_threadCommentDataSourceService'][_0x42859e(0x143)]=this[_0x42859e(0x138)],this[_0x42859e(0xee)][_0x42859e(0x123)]=!0x1;}};f=te([M(0x0,_0x450486),M(0x1,_0x28a1f8(S))],f);var se=Object[_0xa7205c(0xff)],oe=Object[_0xa7205c(0x10c)],ne=(_0x2a8a3a,_0x48dd36,_0x1155f3)=>_0x48dd36 in _0x2a8a3a?se(_0x2a8a3a,_0x48dd36,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1155f3}):_0x2a8a3a[_0x48dd36]=_0x1155f3,ie=(_0x1876c3,_0x42b808,_0x38a856,_0x522b64)=>{for(var _0x551bde=_0x522b64>0x1?void 0x0:_0x522b64?oe(_0x42b808,_0x38a856):_0x42b808,_0x33c62f=_0x1876c3['length']-0x1,_0x1a898e;_0x33c62f>=0x0;_0x33c62f--)(_0x1a898e=_0x1876c3[_0x33c62f])&&(_0x551bde=_0x1a898e(_0x551bde)||_0x551bde);return _0x551bde;},N=(_0x3c5eb5,_0x293b8d)=>(_0x5a9e42,_0x402533)=>_0x293b8d(_0x5a9e42,_0x402533,_0x3c5eb5),$=(_0x421339,_0x26cb25,_0x179e6d)=>ne(_0x421339,typeof _0x26cb25!='symbol'?_0x26cb25+'':_0x26cb25,_0x179e6d);let g=class extends _0x88c673{constructor(_0x556791=O,_0x50e64a,_0x48aad2){const _0x559c89=_0xa7205c;super(),this['_config']=_0x556791,this[_0x559c89(0x10d)]=_0x50e64a,this[_0x559c89(0x136)]=_0x48aad2;const {..._0x2cecea}=_0x403e38({},O,this['_config']);this['_configService']['setConfig'](z,_0x2cecea);}[_0xa7205c(0x13e)](){const _0x556fb1=_0xa7205c;[[S],[f],[_]][_0x556fb1(0x118)](_0x34bdd9=>{this['_injector']['add'](_0x34bdd9);});}['onReady'](){const _0x28f55f=_0xa7205c;this[_0x28f55f(0x10d)][_0x28f55f(0xef)](f),this[_0x28f55f(0x10d)][_0x28f55f(0xef)](_);}};$(g,_0xa7205c(0xf2),W),$(g,'type',_0x1945c7[_0xa7205c(0x11e)]),g=ie([_0x20ab80(_0x798c6,_0x2c98f7,_0x52f3b9),N(0x1,_0x28a1f8(_0x54d40d)),N(0x2,_0x476b8d)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x4218c7=_0x716a;function _0x143e(){const _0x2e092c=['/reply','resolved','requireSession','UNIVER_UNKNOWN','Add','UNRECOGNIZED','getOwnPropertyDescriptor','stringify','length','YYYY/MM/DD\x20HH:mm','format','comment','getUnit','/universer-api/comment/unit/','reply','resolveComment','saveCommentToSnapshot','customRanges','643811mmZbrK','size','type','_injector','getMemberID','addComment','Reply','map','Edit','find','body','dataSource','user','_init','threadId','COMMENT','862816yktXXt','userID','_userService','subscribe','listComments','get','481182oAhgvD','_initDataSource','178518mcZgEn','_httpService','552290xJhAoJ','commentUpdate$','values','userId','addUser','109122pfBiZs','_configService','OpenOrReOpen','/solved','_threadCommentDataSourceService','onReady','deleteComment','replyId','unitId','_sessionService','createTimestamp','_threadCommentModel','pluginName','_config','_initUserSync','onStarting','/add','symbol','Solve','parentId','forEach','delete','getUser','_commentService','parse','filter','root','rangeType','ref','updateComment','solved','pipe','users','post','replies','Unknown','personId','defineProperty','error','Solved','_threadCommentDataSource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getCurrentUser','code','44072ZpYhXo','12ASDTuc','syncUpdateMutationToColla','Delete','setConfig','rangeId'];_0x143e=function(){return _0x2e092c;};return _0x143e();}(function(_0x66fd32,_0x1c308a){const _0x2f80e8=_0x716a,_0x51c83c=_0x66fd32();while(!![]){try{const _0x1fd395=-parseInt(_0x2f80e8(0x21e))/0x1+parseInt(_0x2f80e8(0x217))/0x2+parseInt(_0x2f80e8(0x1e8))/0x3*(-parseInt(_0x2f80e8(0x1e7))/0x4)+parseInt(_0x2f80e8(0x219))/0x5+parseInt(_0x2f80e8(0x215))/0x6+parseInt(_0x2f80e8(0x1ff))/0x7+-parseInt(_0x2f80e8(0x20f))/0x8;if(_0x1fd395===_0x1c308a)break;else _0x51c83c['push'](_0x51c83c['shift']());}catch(_0x50f761){_0x51c83c['push'](_0x51c83c['shift']());}}}(_0x143e,0x1b0f9));import{CommentService as _0x15df87,CollaborationSessionService as _0x47b523,UniverCollaborationClientPlugin as _0x492122}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x9bd0ef}from'@univerjs-pro/license';import{dayjs as _0x873951,UserManagerService as _0x1ef31c,Inject as _0x3f2e70,Injector as _0x26149e,Disposable as _0x831525,CustomRangeType as _0x4d44c4,UniverInstanceType as _0x1cc92f,DependentOn as _0x32111c,IConfigService as _0x2de010,Plugin as _0x43e48f,merge as _0x3055a3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4584a9}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x33be90,IThreadCommentDataSourceService as _0x9cd755}from'@univerjs/thread-comment';import{bufferTime as _0x35848d}from'rxjs';function _0x716a(_0x1918d6,_0x1dd277){_0x1918d6=_0x1918d6-0x1d1;const _0x143e50=_0x143e();let _0x716ac9=_0x143e50[_0x1918d6];return _0x716ac9;}import{HTTPService as _0x38f331}from'@univerjs/network';const W=_0x4218c7(0x1e4);var I=(_0x5f0869=>(_0x5f0869[_0x5f0869[_0x4218c7(0x220)]=0x0]='OpenOrReOpen',_0x5f0869[_0x5f0869[_0x4218c7(0x1e2)]=0x1]=_0x4218c7(0x1e2),_0x5f0869[_0x5f0869[_0x4218c7(0x1f2)]=-0x1]=_0x4218c7(0x1f2),_0x5f0869))(I||{}),v=(_0x5b6c01=>(_0x5b6c01[_0x5b6c01[_0x4218c7(0x1de)]=0x0]=_0x4218c7(0x1de),_0x5b6c01[_0x5b6c01['Add']=0x1]=_0x4218c7(0x1f1),_0x5b6c01[_0x5b6c01[_0x4218c7(0x205)]=0x2]=_0x4218c7(0x205),_0x5b6c01[_0x5b6c01[_0x4218c7(0x207)]=0x3]=_0x4218c7(0x207),_0x5b6c01[_0x5b6c01[_0x4218c7(0x1ea)]=0x4]=_0x4218c7(0x1ea),_0x5b6c01[_0x5b6c01[_0x4218c7(0x230)]=0x5]=_0x4218c7(0x230),_0x5b6c01[_0x5b6c01[_0x4218c7(0x1f2)]=-0x1]=_0x4218c7(0x1f2),_0x5b6c01))(v||{});const y=_0x12abc3=>_0x873951(new Date(+_0x12abc3))[_0x4218c7(0x1f7)](_0x4218c7(0x1f6)),B=async(_0x2b74c7,_0x3164b4)=>{const _0x1def27=_0x4218c7,_0x307b96=_0x2b74c7['get'](_0x1ef31c),_0x150b11=_0x2b74c7[_0x1def27(0x214)](_0x38f331);_0x3164b4[_0x1def27(0x232)](_0xa3ee4c=>{const _0x56dd61=_0x1def27;_0x307b96[_0x56dd61(0x1d1)](_0xa3ee4c)&&_0x3164b4[_0x56dd61(0x233)](_0xa3ee4c);}),_0x3164b4[_0x1def27(0x200)]&&(await _0x150b11['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x3164b4]}}))[_0x1def27(0x209)][_0x1def27(0x1db)][_0x1def27(0x232)](_0x48990f=>{const _0x13a684=_0x1def27;_0x48990f&&_0x307b96[_0x13a684(0x21d)](_0x48990f);});};var K=Object[_0x4218c7(0x1f3)],V=(_0x192bc9,_0x14979c,_0x8a3eed,_0x4c9f6d)=>{const _0x4cb551=_0x4218c7;for(var _0x2fd330=_0x4c9f6d>0x1?void 0x0:_0x4c9f6d?K(_0x14979c,_0x8a3eed):_0x14979c,_0x1e4725=_0x192bc9[_0x4cb551(0x1f5)]-0x1,_0x4056e3;_0x1e4725>=0x0;_0x1e4725--)(_0x4056e3=_0x192bc9[_0x1e4725])&&(_0x2fd330=_0x4056e3(_0x2fd330)||_0x2fd330);return _0x2fd330;},p=(_0x4597ee,_0x44c187)=>(_0x9b5e9d,_0x3be1f9)=>_0x44c187(_0x9b5e9d,_0x3be1f9,_0x4597ee);let _=class extends _0x831525{constructor(_0x4d2114,_0x5adc6f,_0x2e04ff,_0xd5b455){const _0x3bfe2e=_0x4218c7;super(),this[_0x3bfe2e(0x1d2)]=_0x4d2114,this[_0x3bfe2e(0x229)]=_0x5adc6f,this[_0x3bfe2e(0x211)]=_0x2e04ff,this[_0x3bfe2e(0x202)]=_0xd5b455,this[_0x3bfe2e(0x20c)](),this['_initUserSync']();}[_0x4218c7(0x22c)](){const _0x63f98e=_0x4218c7;this['disposeWithMe'](this[_0x63f98e(0x229)][_0x63f98e(0x21a)][_0x63f98e(0x1da)](_0x35848d(0x10))[_0x63f98e(0x212)](_0x2d06d6=>{const _0x271841=_0x63f98e,_0x55e8db=new Set();_0x2d06d6[_0x271841(0x232)](_0x50c8c8=>{const _0x547847=_0x271841;if(_0x50c8c8[_0x547847(0x201)]==='add'){const _0x2207cf=_0x50c8c8['payload'][_0x547847(0x1df)];_0x55e8db['add'](_0x2207cf);}}),B(this[_0x271841(0x202)],_0x55e8db);}));}[_0x4218c7(0x20c)](){const _0x402355=_0x4218c7;this['disposeWithMe'](this[_0x402355(0x1d2)][_0x402355(0x21a)][_0x402355(0x212)](async _0x49fc4b=>{const _0xbc69eb=_0x402355;var _0x5c527e,_0x3640e3,_0x148af9,_0x5ae678;const _0x55e995=(_0x5c527e=this['_threadCommentModel']['getUnit'](_0x49fc4b['unitId'])[_0xbc69eb(0x208)](_0x4ce32b=>_0x4ce32b['threadId']===_0x49fc4b['threadId']))==null?void 0x0:_0x5c527e[_0xbc69eb(0x1d5)];if(!_0x55e995)return;const {unitId:_0x1d6eb1,subUnitId:_0x2870d9}=_0x55e995;switch(_0x49fc4b[_0xbc69eb(0x20b)]&&this[_0xbc69eb(0x211)][_0xbc69eb(0x21d)](_0x49fc4b['user']),_0x49fc4b[_0xbc69eb(0x201)]){case v['Add']:break;case v['Reply']:{this[_0xbc69eb(0x229)]['addComment'](_0x1d6eb1,_0x2870d9,{'unitId':_0x1d6eb1,'subUnitId':_0x2870d9,'ref':'','id':_0x49fc4b['replyId'],'dT':y(+_0x49fc4b[_0xbc69eb(0x228)]),'threadId':_0x49fc4b[_0xbc69eb(0x20d)],'personId':(_0x148af9=(_0x3640e3=_0x49fc4b[_0xbc69eb(0x20b)])==null?void 0x0:_0x3640e3['userID'])!=null?_0x148af9:_0x49fc4b['userId'],'text':JSON[_0xbc69eb(0x1d3)](_0x49fc4b['content']),'parentId':_0x55e995['id']});break;}case v['Delete']:{const _0x19f684=this[_0xbc69eb(0x229)]['getComment'](_0x1d6eb1,_0x2870d9,_0x49fc4b[_0xbc69eb(0x225)]);_0x19f684&&_0x19f684[_0xbc69eb(0x231)]&&this[_0xbc69eb(0x229)][_0xbc69eb(0x224)](_0x1d6eb1,_0x2870d9,_0x49fc4b['replyId']);break;}case v[_0xbc69eb(0x207)]:{this[_0xbc69eb(0x229)][_0xbc69eb(0x1d8)](_0x1d6eb1,_0x2870d9,{'commentId':_0x49fc4b[_0xbc69eb(0x225)],'text':JSON[_0xbc69eb(0x1d3)](_0x49fc4b['content'])});break;}case v[_0xbc69eb(0x230)]:{const _0x582a11=(_0x5ae678=this[_0xbc69eb(0x229)][_0xbc69eb(0x1f9)](_0x49fc4b[_0xbc69eb(0x226)])[_0xbc69eb(0x208)](_0x1fda1b=>_0x1fda1b[_0xbc69eb(0x20d)]===_0x49fc4b[_0xbc69eb(0x20d)]))==null?void 0x0:_0x5ae678[_0xbc69eb(0x1d5)];_0x582a11&&this['_threadCommentModel'][_0xbc69eb(0x1fc)](_0x1d6eb1,_0x2870d9,_0x582a11['id'],_0x49fc4b[_0xbc69eb(0x1d9)]===I[_0xbc69eb(0x1e2)]);break;}}}));}};_=V([p(0x0,_0x3f2e70(_0x15df87)),p(0x1,_0x3f2e70(_0x33be90)),p(0x2,_0x3f2e70(_0x1ef31c)),p(0x3,_0x3f2e70(_0x26149e))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x4218c7(0x1f3)],Q=(_0x47c557,_0x4a5960,_0x272313,_0x38d71b)=>{const _0x387679=_0x4218c7;for(var _0x344a28=_0x38d71b>0x1?void 0x0:_0x38d71b?k(_0x4a5960,_0x272313):_0x4a5960,_0x1f097c=_0x47c557[_0x387679(0x1f5)]-0x1,_0x11d3d6;_0x1f097c>=0x0;_0x1f097c--)(_0x11d3d6=_0x47c557[_0x1f097c])&&(_0x344a28=_0x11d3d6(_0x344a28)||_0x344a28);return _0x344a28;},b=(_0x32110c,_0x2b85ab)=>(_0x445ff2,_0x463e57)=>_0x2b85ab(_0x445ff2,_0x463e57,_0x32110c);function X(_0x5a3f30,_0x4d1f24){const _0x1c31cc=_0x4218c7,_0x2a29a4=_0x5a3f30['replies'][0x0];return{..._0x4d1f24,'id':_0x2a29a4[_0x1c31cc(0x225)],'resolved':_0x5a3f30[_0x1c31cc(0x1d9)]===0x1,'dT':y(_0x2a29a4[_0x1c31cc(0x228)]),'personId':_0x2a29a4[_0x1c31cc(0x21c)],'threadId':_0x2a29a4[_0x1c31cc(0x20d)]};}function ee(_0x1db4e4,_0x41190d,_0x219977){const _0x2de16c=_0x4218c7;var _0x5e2f2e,_0x5e7143;if(((_0x5e7143=(_0x5e2f2e=_0x1db4e4==null?void 0x0:_0x1db4e4[_0x2de16c(0x1dd)])==null?void 0x0:_0x5e2f2e[_0x2de16c(0x1f5)])!=null?_0x5e7143:0x0)>0x0){const _0x48039b=(_0x466d0a,_0x4a2e6e)=>({'id':_0x466d0a[_0x2de16c(0x225)],'threadId':_0x466d0a[_0x2de16c(0x20d)],'dT':y(_0x466d0a[_0x2de16c(0x228)]),'personId':_0x466d0a['userId'],'resolved':_0x1db4e4['solved']===I[_0x2de16c(0x1e2)],'unitId':_0x41190d,'subUnitId':_0x219977,'text':JSON['parse'](_0x466d0a['content']),'parentId':_0x4a2e6e}),_0x3855ce=_0x48039b(_0x1db4e4[_0x2de16c(0x1dd)][0x0]);return{..._0x3855ce,'children':_0x1db4e4[_0x2de16c(0x1dd)]['slice'](0x1)[_0x2de16c(0x206)](_0x38b556=>_0x48039b(_0x38b556,_0x3855ce['id']))};}return null;}let S=class{constructor(_0x4b4a53,_0xaebdbe,_0x24c1e3){const _0x1de901=_0x4218c7;this[_0x1de901(0x218)]=_0x4b4a53,this['_userService']=_0xaebdbe,this[_0x1de901(0x227)]=_0x24c1e3;}async[_0x4218c7(0x204)](_0x29b766){const _0xed19f2=_0x4218c7;var _0x15d3be,_0x84ce7f;const {parentId:_0x462490,unitId:_0x40babf,text:_0x9e69b0,threadId:_0x161dd0}=_0x29b766,_0x425094=(_0x84ce7f=(_0x15d3be=_0x9e69b0[_0xed19f2(0x1fe)])==null?void 0x0:_0x15d3be[_0xed19f2(0x1d4)](_0x420c4a=>_0x420c4a[_0xed19f2(0x1d6)]===_0x4d44c4[_0xed19f2(0x20e)])['map'](_0x4b1ce8=>_0x4b1ce8[_0xed19f2(0x1ec)]))!=null?_0x84ce7f:[],_0x4a4311=JSON['stringify'](_0x9e69b0),_0x2eb547=(await this[_0xed19f2(0x227)][_0xed19f2(0x1ef)](_0x40babf))[_0xed19f2(0x203)]();if(_0x462490){const _0x2bf9c3={'memberId':_0x2eb547,'unitId':_0x40babf,'content':_0x4a4311,'mention':_0x425094,'threadId':_0x161dd0},_0x283ef8=(await this[_0xed19f2(0x218)][_0xed19f2(0x1dc)](_0xed19f2(0x1fa)+_0x40babf+_0xed19f2(0x1ed),{'body':_0x2bf9c3}))[_0xed19f2(0x209)][_0xed19f2(0x1fb)];return{..._0x29b766,'id':_0x283ef8[_0xed19f2(0x225)],'dT':_0x873951(+_0x283ef8[_0xed19f2(0x228)])[_0xed19f2(0x1f7)](_0xed19f2(0x1f6)),'personId':_0x283ef8['userId']};}else{const _0x285d39={'memberId':_0x2eb547,'unitId':_0x40babf,'content':_0x4a4311,'mention':_0x425094},_0x40a9bc=await this[_0xed19f2(0x218)][_0xed19f2(0x1dc)]('/universer-api/comment/unit/'+_0x40babf+_0xed19f2(0x22e),{'body':_0x285d39});return X(_0x40a9bc[_0xed19f2(0x209)][_0xed19f2(0x1f8)],_0x29b766);}}async[_0x4218c7(0x1d8)](_0x356749){const _0x344c6e=_0x4218c7;var _0x43d996,_0x5b5391;const {text:_0x4a272f,unitId:_0x49b06f}=_0x356749,_0x4ee270=(_0x5b5391=(_0x43d996=_0x4a272f[_0x344c6e(0x1fe)])==null?void 0x0:_0x43d996[_0x344c6e(0x1d4)](_0x2bd491=>_0x2bd491[_0x344c6e(0x1d6)]===_0x4d44c4[_0x344c6e(0x20e)])[_0x344c6e(0x206)](_0x2200a5=>_0x2200a5['rangeId']))!=null?_0x5b5391:[],_0xd9c0d5=JSON[_0x344c6e(0x1f4)](_0x4a272f),_0x5d35fe=_0x356749[_0x344c6e(0x20d)],_0x15eebc=_0x356749['id'],_0x427bcb={'memberId':(await this['_sessionService'][_0x344c6e(0x1ef)](_0x49b06f))[_0x344c6e(0x203)](),'unitId':_0x49b06f,'threadId':_0x5d35fe,'mention':_0x4ee270,'content':_0xd9c0d5,'replyId':_0x15eebc},_0x4ea436=await this[_0x344c6e(0x218)][_0x344c6e(0x1dc)](_0x344c6e(0x1fa)+_0x49b06f+'/edit',{'body':_0x427bcb});return!_0x4ea436[_0x344c6e(0x209)][_0x344c6e(0x1e1)]||_0x4ea436[_0x344c6e(0x209)]['error'][_0x344c6e(0x1e6)]===0x1;}async[_0x4218c7(0x1fc)](_0x2d1519){const _0x544348=_0x4218c7,{unitId:_0x436281}=_0x2d1519,_0x36578b=_0x2d1519[_0x544348(0x20d)],_0x2e6d6a={'memberId':this['_userService'][_0x544348(0x1e5)]()[_0x544348(0x210)],'unitId':_0x436281,'threadId':_0x36578b,'solved':_0x2d1519[_0x544348(0x1ee)]?I[_0x544348(0x1e2)]:I['OpenOrReOpen']},_0x3d891c=await this[_0x544348(0x218)][_0x544348(0x1dc)]('/universer-api/comment/unit/'+_0x436281+_0x544348(0x221),{'body':_0x2e6d6a});return!_0x3d891c[_0x544348(0x209)][_0x544348(0x1e1)]||_0x3d891c[_0x544348(0x209)]['error']['code']===0x1;}async[_0x4218c7(0x224)](_0x31e4b3,_0x244e01,_0x6de72c,_0x1d24c9){const _0x578b0e=_0x4218c7,_0x4efc2d={'memberId':(await this[_0x578b0e(0x227)][_0x578b0e(0x1ef)](_0x31e4b3))[_0x578b0e(0x203)](),'threadId':_0x6de72c,'replyId':_0x1d24c9,'unitId':_0x31e4b3},_0x11972f=await this['_httpService'][_0x578b0e(0x1dc)](_0x578b0e(0x1fa)+_0x31e4b3+'/delete',{'body':_0x4efc2d});return!_0x11972f[_0x578b0e(0x209)][_0x578b0e(0x1e1)]||_0x11972f[_0x578b0e(0x209)]['error'][_0x578b0e(0x1e6)]===0x1;}async[_0x4218c7(0x213)](_0x31eca4,_0xbdcd3c,_0x15cd62){const _0x20e85a=_0x4218c7,_0x6b7dd5={'unitId':_0x31eca4,'threadId':_0x15cd62},_0x26ef53=await this[_0x20e85a(0x218)]['post'](_0x20e85a(0x1fa)+_0x31eca4+'/list',{'body':_0x6b7dd5}),_0x3883fd=_0x15cd62[_0x20e85a(0x206)](_0x17bf57=>ee(_0x26ef53[_0x20e85a(0x209)]['comments'][_0x17bf57],_0x31eca4,_0xbdcd3c))[_0x20e85a(0x1d4)](Boolean);return Object[_0x20e85a(0x21b)](_0x26ef53[_0x20e85a(0x209)]['users'])['forEach'](_0x5637d3=>{const _0x2453c2=_0x20e85a;this['_userService'][_0x2453c2(0x21d)](_0x5637d3);}),_0x3883fd;}[_0x4218c7(0x1fd)](_0x4bc85b){const _0xe5ebcc=_0x4218c7;return{'id':_0x4bc85b['id'],'threadId':_0x4bc85b[_0xe5ebcc(0x20d)],'ref':_0x4bc85b[_0xe5ebcc(0x1d7)]};}};S=Q([b(0x0,_0x3f2e70(_0x38f331)),b(0x1,_0x3f2e70(_0x1ef31c)),b(0x2,_0x3f2e70(_0x47b523))],S);var re=Object[_0x4218c7(0x1f3)],te=(_0x2191d6,_0x54b964,_0x2bee57,_0x1c7e50)=>{const _0x45493f=_0x4218c7;for(var _0x31cda9=_0x1c7e50>0x1?void 0x0:_0x1c7e50?re(_0x54b964,_0x2bee57):_0x54b964,_0x31ea22=_0x2191d6[_0x45493f(0x1f5)]-0x1,_0x6bd8bc;_0x31ea22>=0x0;_0x31ea22--)(_0x6bd8bc=_0x2191d6[_0x31ea22])&&(_0x31cda9=_0x6bd8bc(_0x31cda9)||_0x31cda9);return _0x31cda9;},M=(_0x58486d,_0x489cd5)=>(_0x4fe9ae,_0x3c2fff)=>_0x489cd5(_0x4fe9ae,_0x3c2fff,_0x58486d);let f=class extends _0x831525{constructor(_0x1d8806,_0x530842){const _0x9b7969=_0x4218c7;super(),this[_0x9b7969(0x222)]=_0x1d8806,this[_0x9b7969(0x1e3)]=_0x530842,this[_0x9b7969(0x216)]();}[_0x4218c7(0x216)](){const _0x49babb=_0x4218c7;this['_threadCommentDataSourceService'][_0x49babb(0x20a)]=this[_0x49babb(0x1e3)],this[_0x49babb(0x222)][_0x49babb(0x1e9)]=!0x1;}};f=te([M(0x0,_0x9cd755),M(0x1,_0x3f2e70(S))],f);var se=Object[_0x4218c7(0x1e0)],oe=Object[_0x4218c7(0x1f3)],ne=(_0x3528a2,_0x15f62a,_0x28831d)=>_0x15f62a in _0x3528a2?se(_0x3528a2,_0x15f62a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x28831d}):_0x3528a2[_0x15f62a]=_0x28831d,ie=(_0x27405c,_0x2bb3c3,_0x46eea7,_0x498627)=>{const _0x55ecbf=_0x4218c7;for(var _0x424e4c=_0x498627>0x1?void 0x0:_0x498627?oe(_0x2bb3c3,_0x46eea7):_0x2bb3c3,_0x398c8e=_0x27405c[_0x55ecbf(0x1f5)]-0x1,_0x23e5f9;_0x398c8e>=0x0;_0x398c8e--)(_0x23e5f9=_0x27405c[_0x398c8e])&&(_0x424e4c=_0x23e5f9(_0x424e4c)||_0x424e4c);return _0x424e4c;},N=(_0x4e9266,_0x3764c6)=>(_0x4e40d0,_0x308b03)=>_0x3764c6(_0x4e40d0,_0x308b03,_0x4e9266),$=(_0x347b71,_0x59bf4f,_0x316586)=>ne(_0x347b71,typeof _0x59bf4f!=_0x4218c7(0x22f)?_0x59bf4f+'':_0x59bf4f,_0x316586);let g=class extends _0x43e48f{constructor(_0x3f0e86=O,_0x2e6298,_0x140c8c){const _0xb2eb85=_0x4218c7;super(),this[_0xb2eb85(0x22b)]=_0x3f0e86,this[_0xb2eb85(0x202)]=_0x2e6298,this[_0xb2eb85(0x21f)]=_0x140c8c;const {..._0x343f8f}=_0x3055a3({},O,this[_0xb2eb85(0x22b)]);this[_0xb2eb85(0x21f)][_0xb2eb85(0x1eb)](z,_0x343f8f);}[_0x4218c7(0x22d)](){const _0x334ea9=_0x4218c7;[[S],[f],[_]][_0x334ea9(0x232)](_0x33bb13=>{const _0x282e1b=_0x334ea9;this[_0x282e1b(0x202)]['add'](_0x33bb13);});}[_0x4218c7(0x223)](){const _0x1118ff=_0x4218c7;this['_injector'][_0x1118ff(0x214)](f),this[_0x1118ff(0x202)][_0x1118ff(0x214)](_);}};$(g,_0x4218c7(0x22a),W),$(g,_0x4218c7(0x201),_0x1cc92f[_0x4218c7(0x1f0)]),g=ie([_0x32111c(_0x4584a9,_0x492122,_0x9bd0ef),N(0x1,_0x3f2e70(_0x26149e)),N(0x2,_0x2de010)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0xa7205c=_0x46db;(function(_0x54d2e5,_0x4bfef5){const _0x21a789=_0x46db,_0x525a98=_0x54d2e5();while(!![]){try{const _0x3f2e73=-parseInt(_0x21a789(0x101))/0x1*(-parseInt(_0x21a789(0x142))/0x2)+parseInt(_0x21a789(0x144))/0x3+-parseInt(_0x21a789(0x10f))/0x4*(parseInt(_0x21a789(0x114))/0x5)+-parseInt(_0x21a789(0x139))/0x6*(parseInt(_0x21a789(0x109))/0x7)+-parseInt(_0x21a789(0xe7))/0x8*(-parseInt(_0x21a789(0x103))/0x9)+-parseInt(_0x21a789(0x14b))/0xa+-parseInt(_0x21a789(0xfb))/0xb*(-parseInt(_0x21a789(0x128))/0xc);if(_0x3f2e73===_0x4bfef5)break;else _0x525a98['push'](_0x525a98['shift']());}catch(_0x5d551e){_0x525a98['push'](_0x525a98['shift']());}}}(_0x41e7,0xaafa2));function _0x41e7(){const _0x43693c=['resolveComment','2246944bgWBir','rangeType','Solved','getOwnPropertyDescriptor','_injector','saveCommentToSnapshot','154404cJPkHj','OpenOrReOpen','subscribe','Delete','type','65nwuQSa','/delete','/universer-api/user/list','addComment','forEach','_sessionService','size','replyId','disposeWithMe','content','UNIVER_UNKNOWN','reply','code','/universer-api/comment/unit/','body','syncUpdateMutationToColla','createTimestamp','_threadCommentModel','userID','ref','11484828KMeGZi','getCurrentUser','comment','resolved','solved','/solved','Edit','post','COMMENT','map','find','/reply','getUser','parse','_configService','format','_threadCommentDataSource','24hGciXf','Solve','add','Unknown','stringify','onStarting','rangeId','replies','_init','6NxlRZA','dataSource','2157216dTtKTS','users','root','personId','YYYY/MM/DD\x20HH:mm','UNRECOGNIZED','filter','9477760ousEXe','customRanges','_initDataSource','updateComment','438928XTZpcj','_httpService','_userService','Add','unitId','length','getMemberID','_threadCommentDataSourceService','get','listComments','threadId','pluginName','getUnit','values','Reply','requireSession','getComment','_initUserSync','_commentService','slice','22YabrTj','user','userId','parentId','defineProperty','error','29137cNygfj','/list','117bAxHOw','pipe','deleteComment','addUser','payload'];_0x41e7=function(){return _0x43693c;};return _0x41e7();}import{CommentService as _0x15e370,CollaborationSessionService as _0x3318dd,UniverCollaborationClientPlugin as _0x2c98f7}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x52f3b9}from'@univerjs-pro/license';import{dayjs as _0x4da51b,UserManagerService as _0x18abd9,Inject as _0x28a1f8,Injector as _0x54d40d,Disposable as _0x356b4e,CustomRangeType as _0x5db075,UniverInstanceType as _0x1945c7,DependentOn as _0x20ab80,IConfigService as _0x476b8d,Plugin as _0x88c673,merge as _0x403e38}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x798c6}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2f4ecd,IThreadCommentDataSourceService as _0x450486}from'@univerjs/thread-comment';import{bufferTime as _0x19a41c}from'rxjs';import{HTTPService as _0x25424b}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x1ca600=>(_0x1ca600[_0x1ca600['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x1ca600[_0x1ca600['Solved']=0x1]=_0xa7205c(0x10b),_0x1ca600[_0x1ca600[_0xa7205c(0x149)]=-0x1]=_0xa7205c(0x149),_0x1ca600))(I||{}),v=(_0x154422=>(_0x154422[_0x154422[_0xa7205c(0x13c)]=0x0]=_0xa7205c(0x13c),_0x154422[_0x154422[_0xa7205c(0xea)]=0x1]=_0xa7205c(0xea),_0x154422[_0x154422[_0xa7205c(0xf5)]=0x2]=_0xa7205c(0xf5),_0x154422[_0x154422[_0xa7205c(0x12e)]=0x3]=_0xa7205c(0x12e),_0x154422[_0x154422[_0xa7205c(0x112)]=0x4]=_0xa7205c(0x112),_0x154422[_0x154422[_0xa7205c(0x13a)]=0x5]='Solve',_0x154422[_0x154422[_0xa7205c(0x149)]=-0x1]=_0xa7205c(0x149),_0x154422))(v||{});const y=_0x3c251d=>_0x4da51b(new Date(+_0x3c251d))[_0xa7205c(0x137)](_0xa7205c(0x148)),B=async(_0x57d345,_0x16b1bb)=>{const _0x3c0404=_0xa7205c,_0x16d0d0=_0x57d345[_0x3c0404(0xef)](_0x18abd9),_0xe60297=_0x57d345[_0x3c0404(0xef)](_0x25424b);_0x16b1bb['forEach'](_0x264763=>{const _0x5945dc=_0x3c0404;_0x16d0d0[_0x5945dc(0x134)](_0x264763)&&_0x16b1bb['delete'](_0x264763);}),_0x16b1bb[_0x3c0404(0x11a)]&&(await _0xe60297[_0x3c0404(0xef)](_0x3c0404(0x116),{'params':{'userIDs':[..._0x16b1bb]}}))[_0x3c0404(0x122)]['users']['forEach'](_0x532d39=>{const _0x2c9b97=_0x3c0404;_0x532d39&&_0x16d0d0[_0x2c9b97(0x106)](_0x532d39);});};var K=Object[_0xa7205c(0x10c)],V=(_0x269718,_0x389a47,_0x27c4ca,_0x18011d)=>{const _0x2fb400=_0xa7205c;for(var _0x1a9484=_0x18011d>0x1?void 0x0:_0x18011d?K(_0x389a47,_0x27c4ca):_0x389a47,_0x518bc1=_0x269718[_0x2fb400(0xec)]-0x1,_0x20df37;_0x518bc1>=0x0;_0x518bc1--)(_0x20df37=_0x269718[_0x518bc1])&&(_0x1a9484=_0x20df37(_0x1a9484)||_0x1a9484);return _0x1a9484;},p=(_0x1854b0,_0x2ebcff)=>(_0x435eef,_0x373a06)=>_0x2ebcff(_0x435eef,_0x373a06,_0x1854b0);let _=class extends _0x356b4e{constructor(_0xad650c,_0x4327eb,_0x4b9f95,_0x5a3d1f){const _0xc992eb=_0xa7205c;super(),this[_0xc992eb(0xf9)]=_0xad650c,this[_0xc992eb(0x125)]=_0x4327eb,this['_userService']=_0x4b9f95,this[_0xc992eb(0x10d)]=_0x5a3d1f,this[_0xc992eb(0x141)](),this[_0xc992eb(0xf8)]();}[_0xa7205c(0xf8)](){const _0x584d40=_0xa7205c;this[_0x584d40(0x11c)](this[_0x584d40(0x125)]['commentUpdate$'][_0x584d40(0x104)](_0x19a41c(0x10))[_0x584d40(0x111)](_0x282326=>{const _0x761c5f=_0x584d40,_0x52c0b3=new Set();_0x282326[_0x761c5f(0x118)](_0xaa989f=>{const _0xf617c4=_0x761c5f;if(_0xaa989f[_0xf617c4(0x113)]===_0xf617c4(0x13b)){const _0x3b9b0e=_0xaa989f[_0xf617c4(0x107)][_0xf617c4(0x147)];_0x52c0b3[_0xf617c4(0x13b)](_0x3b9b0e);}}),B(this[_0x761c5f(0x10d)],_0x52c0b3);}));}[_0xa7205c(0x141)](){const _0x1ed4fd=_0xa7205c;this[_0x1ed4fd(0x11c)](this[_0x1ed4fd(0xf9)]['commentUpdate$'][_0x1ed4fd(0x111)](async _0x181340=>{const _0xc13be1=_0x1ed4fd;var _0x449eca,_0x1df1df,_0x478c1e,_0x560d03;const _0x400dea=(_0x449eca=this[_0xc13be1(0x125)][_0xc13be1(0xf3)](_0x181340[_0xc13be1(0xeb)])[_0xc13be1(0x132)](_0x1ce48=>_0x1ce48[_0xc13be1(0xf1)]===_0x181340[_0xc13be1(0xf1)]))==null?void 0x0:_0x449eca[_0xc13be1(0x146)];if(!_0x400dea)return;const {unitId:_0x310b82,subUnitId:_0x272fbd}=_0x400dea;switch(_0x181340['user']&&this[_0xc13be1(0xe9)][_0xc13be1(0x106)](_0x181340[_0xc13be1(0xfc)]),_0x181340[_0xc13be1(0x113)]){case v[_0xc13be1(0xea)]:break;case v[_0xc13be1(0xf5)]:{this[_0xc13be1(0x125)][_0xc13be1(0x117)](_0x310b82,_0x272fbd,{'unitId':_0x310b82,'subUnitId':_0x272fbd,'ref':'','id':_0x181340[_0xc13be1(0x11b)],'dT':y(+_0x181340['createTimestamp']),'threadId':_0x181340[_0xc13be1(0xf1)],'personId':(_0x478c1e=(_0x1df1df=_0x181340[_0xc13be1(0xfc)])==null?void 0x0:_0x1df1df[_0xc13be1(0x126)])!=null?_0x478c1e:_0x181340[_0xc13be1(0xfd)],'text':JSON[_0xc13be1(0x135)](_0x181340[_0xc13be1(0x11d)]),'parentId':_0x400dea['id']});break;}case v[_0xc13be1(0x112)]:{const _0x4e5aca=this[_0xc13be1(0x125)][_0xc13be1(0xf7)](_0x310b82,_0x272fbd,_0x181340[_0xc13be1(0x11b)]);_0x4e5aca&&_0x4e5aca[_0xc13be1(0xfe)]&&this[_0xc13be1(0x125)][_0xc13be1(0x105)](_0x310b82,_0x272fbd,_0x181340[_0xc13be1(0x11b)]);break;}case v[_0xc13be1(0x12e)]:{this[_0xc13be1(0x125)][_0xc13be1(0xe6)](_0x310b82,_0x272fbd,{'commentId':_0x181340[_0xc13be1(0x11b)],'text':JSON[_0xc13be1(0x135)](_0x181340[_0xc13be1(0x11d)])});break;}case v['Solve']:{const _0x3da7b6=(_0x560d03=this[_0xc13be1(0x125)][_0xc13be1(0xf3)](_0x181340[_0xc13be1(0xeb)])[_0xc13be1(0x132)](_0x424f00=>_0x424f00[_0xc13be1(0xf1)]===_0x181340[_0xc13be1(0xf1)]))==null?void 0x0:_0x560d03[_0xc13be1(0x146)];_0x3da7b6&&this[_0xc13be1(0x125)][_0xc13be1(0x108)](_0x310b82,_0x272fbd,_0x3da7b6['id'],_0x181340[_0xc13be1(0x12c)]===I[_0xc13be1(0x10b)]);break;}}}));}};_=V([p(0x0,_0x28a1f8(_0x15e370)),p(0x1,_0x28a1f8(_0x2f4ecd)),p(0x2,_0x28a1f8(_0x18abd9)),p(0x3,_0x28a1f8(_0x54d40d))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0xa7205c(0x10c)],Q=(_0x161695,_0x575575,_0x143ddf,_0x47172c)=>{const _0x39bac8=_0xa7205c;for(var _0x52dfd9=_0x47172c>0x1?void 0x0:_0x47172c?k(_0x575575,_0x143ddf):_0x575575,_0x3fef4a=_0x161695[_0x39bac8(0xec)]-0x1,_0x195f0d;_0x3fef4a>=0x0;_0x3fef4a--)(_0x195f0d=_0x161695[_0x3fef4a])&&(_0x52dfd9=_0x195f0d(_0x52dfd9)||_0x52dfd9);return _0x52dfd9;},b=(_0x71ed32,_0x44ec58)=>(_0x1ce371,_0x5ab356)=>_0x44ec58(_0x1ce371,_0x5ab356,_0x71ed32);function X(_0x332df4,_0x34216b){const _0x540151=_0xa7205c,_0x414cc7=_0x332df4[_0x540151(0x140)][0x0];return{..._0x34216b,'id':_0x414cc7[_0x540151(0x11b)],'resolved':_0x332df4[_0x540151(0x12c)]===0x1,'dT':y(_0x414cc7['createTimestamp']),'personId':_0x414cc7[_0x540151(0xfd)],'threadId':_0x414cc7[_0x540151(0xf1)]};}function ee(_0xa2d2c,_0x1806a9,_0x4b037){const _0x43fe8c=_0xa7205c;var _0x263503,_0x12748d;if(((_0x12748d=(_0x263503=_0xa2d2c==null?void 0x0:_0xa2d2c['replies'])==null?void 0x0:_0x263503[_0x43fe8c(0xec)])!=null?_0x12748d:0x0)>0x0){const _0x2a3e6d=(_0x59d83e,_0x27b302)=>({'id':_0x59d83e[_0x43fe8c(0x11b)],'threadId':_0x59d83e[_0x43fe8c(0xf1)],'dT':y(_0x59d83e[_0x43fe8c(0x124)]),'personId':_0x59d83e[_0x43fe8c(0xfd)],'resolved':_0xa2d2c[_0x43fe8c(0x12c)]===I[_0x43fe8c(0x10b)],'unitId':_0x1806a9,'subUnitId':_0x4b037,'text':JSON[_0x43fe8c(0x135)](_0x59d83e[_0x43fe8c(0x11d)]),'parentId':_0x27b302}),_0x52f67a=_0x2a3e6d(_0xa2d2c['replies'][0x0]);return{..._0x52f67a,'children':_0xa2d2c[_0x43fe8c(0x140)][_0x43fe8c(0xfa)](0x1)['map'](_0x4f4c0c=>_0x2a3e6d(_0x4f4c0c,_0x52f67a['id']))};}return null;}let S=class{constructor(_0x4387f3,_0x2f38c2,_0x5b4617){const _0x1b6ef5=_0xa7205c;this[_0x1b6ef5(0xe8)]=_0x4387f3,this[_0x1b6ef5(0xe9)]=_0x2f38c2,this[_0x1b6ef5(0x119)]=_0x5b4617;}async[_0xa7205c(0x117)](_0x6256c5){const _0x59ef37=_0xa7205c;var _0x38a59a,_0x2397b2;const {parentId:_0x30f50c,unitId:_0x2ad071,text:_0x3e1fd1,threadId:_0x39f2a5}=_0x6256c5,_0x348c74=(_0x2397b2=(_0x38a59a=_0x3e1fd1[_0x59ef37(0x14c)])==null?void 0x0:_0x38a59a['filter'](_0x2de910=>_0x2de910['rangeType']===_0x5db075[_0x59ef37(0x130)])['map'](_0x4460c6=>_0x4460c6[_0x59ef37(0x13f)]))!=null?_0x2397b2:[],_0x29224a=JSON[_0x59ef37(0x13d)](_0x3e1fd1),_0x2cf497=(await this[_0x59ef37(0x119)]['requireSession'](_0x2ad071))['getMemberID']();if(_0x30f50c){const _0x1e73e5={'memberId':_0x2cf497,'unitId':_0x2ad071,'content':_0x29224a,'mention':_0x348c74,'threadId':_0x39f2a5},_0xa9c426=(await this[_0x59ef37(0xe8)][_0x59ef37(0x12f)](_0x59ef37(0x121)+_0x2ad071+_0x59ef37(0x133),{'body':_0x1e73e5}))[_0x59ef37(0x122)][_0x59ef37(0x11f)];return{..._0x6256c5,'id':_0xa9c426['replyId'],'dT':_0x4da51b(+_0xa9c426[_0x59ef37(0x124)])[_0x59ef37(0x137)](_0x59ef37(0x148)),'personId':_0xa9c426['userId']};}else{const _0x1abd44={'memberId':_0x2cf497,'unitId':_0x2ad071,'content':_0x29224a,'mention':_0x348c74},_0x325d5a=await this[_0x59ef37(0xe8)][_0x59ef37(0x12f)]('/universer-api/comment/unit/'+_0x2ad071+'/add',{'body':_0x1abd44});return X(_0x325d5a[_0x59ef37(0x122)][_0x59ef37(0x12a)],_0x6256c5);}}async[_0xa7205c(0xe6)](_0x5d8413){const _0x3aa1c1=_0xa7205c;var _0x534e59,_0x180c52;const {text:_0x2de538,unitId:_0x52fb6a}=_0x5d8413,_0x3ef212=(_0x180c52=(_0x534e59=_0x2de538[_0x3aa1c1(0x14c)])==null?void 0x0:_0x534e59[_0x3aa1c1(0x14a)](_0x4abf8c=>_0x4abf8c[_0x3aa1c1(0x10a)]===_0x5db075[_0x3aa1c1(0x130)])[_0x3aa1c1(0x131)](_0x2eb69b=>_0x2eb69b[_0x3aa1c1(0x13f)]))!=null?_0x180c52:[],_0x3d4ca1=JSON[_0x3aa1c1(0x13d)](_0x2de538),_0x5df793=_0x5d8413[_0x3aa1c1(0xf1)],_0x12794f=_0x5d8413['id'],_0x3cf19e={'memberId':(await this['_sessionService'][_0x3aa1c1(0xf6)](_0x52fb6a))[_0x3aa1c1(0xed)](),'unitId':_0x52fb6a,'threadId':_0x5df793,'mention':_0x3ef212,'content':_0x3d4ca1,'replyId':_0x12794f},_0x22bdd7=await this['_httpService'][_0x3aa1c1(0x12f)]('/universer-api/comment/unit/'+_0x52fb6a+'/edit',{'body':_0x3cf19e});return!_0x22bdd7[_0x3aa1c1(0x122)][_0x3aa1c1(0x100)]||_0x22bdd7[_0x3aa1c1(0x122)][_0x3aa1c1(0x100)][_0x3aa1c1(0x120)]===0x1;}async[_0xa7205c(0x108)](_0xb09c76){const _0x12dfb0=_0xa7205c,{unitId:_0x460328}=_0xb09c76,_0x14e324=_0xb09c76[_0x12dfb0(0xf1)],_0x50c6c1={'memberId':this[_0x12dfb0(0xe9)][_0x12dfb0(0x129)]()[_0x12dfb0(0x126)],'unitId':_0x460328,'threadId':_0x14e324,'solved':_0xb09c76[_0x12dfb0(0x12b)]?I[_0x12dfb0(0x10b)]:I[_0x12dfb0(0x110)]},_0xa12614=await this[_0x12dfb0(0xe8)][_0x12dfb0(0x12f)](_0x12dfb0(0x121)+_0x460328+_0x12dfb0(0x12d),{'body':_0x50c6c1});return!_0xa12614[_0x12dfb0(0x122)]['error']||_0xa12614['body']['error'][_0x12dfb0(0x120)]===0x1;}async[_0xa7205c(0x105)](_0x28ddbd,_0x8fcfbe,_0x237c42,_0x2fb808){const _0xd06161=_0xa7205c,_0x5bed67={'memberId':(await this[_0xd06161(0x119)][_0xd06161(0xf6)](_0x28ddbd))[_0xd06161(0xed)](),'threadId':_0x237c42,'replyId':_0x2fb808,'unitId':_0x28ddbd},_0x40d8c5=await this[_0xd06161(0xe8)]['post'](_0xd06161(0x121)+_0x28ddbd+_0xd06161(0x115),{'body':_0x5bed67});return!_0x40d8c5[_0xd06161(0x122)][_0xd06161(0x100)]||_0x40d8c5['body']['error'][_0xd06161(0x120)]===0x1;}async[_0xa7205c(0xf0)](_0x55f1da,_0xa1539b,_0x2b42e4){const _0x149183=_0xa7205c,_0x14bc2b={'unitId':_0x55f1da,'threadId':_0x2b42e4},_0x2f5512=await this[_0x149183(0xe8)][_0x149183(0x12f)]('/universer-api/comment/unit/'+_0x55f1da+_0x149183(0x102),{'body':_0x14bc2b}),_0x373da4=_0x2b42e4[_0x149183(0x131)](_0x1d9a89=>ee(_0x2f5512[_0x149183(0x122)]['comments'][_0x1d9a89],_0x55f1da,_0xa1539b))['filter'](Boolean);return Object[_0x149183(0xf4)](_0x2f5512[_0x149183(0x122)][_0x149183(0x145)])[_0x149183(0x118)](_0x19c02a=>{const _0x355c65=_0x149183;this[_0x355c65(0xe9)][_0x355c65(0x106)](_0x19c02a);}),_0x373da4;}[_0xa7205c(0x10e)](_0x5c971b){const _0x1d58cf=_0xa7205c;return{'id':_0x5c971b['id'],'threadId':_0x5c971b[_0x1d58cf(0xf1)],'ref':_0x5c971b[_0x1d58cf(0x127)]};}};function _0x46db(_0x42809c,_0x44816e){_0x42809c=_0x42809c-0xe6;const _0x41e77d=_0x41e7();let _0x46db0a=_0x41e77d[_0x42809c];return _0x46db0a;}S=Q([b(0x0,_0x28a1f8(_0x25424b)),b(0x1,_0x28a1f8(_0x18abd9)),b(0x2,_0x28a1f8(_0x3318dd))],S);var re=Object[_0xa7205c(0x10c)],te=(_0x4b8a50,_0x5d2732,_0x5866ce,_0x2c164d)=>{const _0x5af5ed=_0xa7205c;for(var _0xc213b0=_0x2c164d>0x1?void 0x0:_0x2c164d?re(_0x5d2732,_0x5866ce):_0x5d2732,_0x2ee5b6=_0x4b8a50[_0x5af5ed(0xec)]-0x1,_0x48cd51;_0x2ee5b6>=0x0;_0x2ee5b6--)(_0x48cd51=_0x4b8a50[_0x2ee5b6])&&(_0xc213b0=_0x48cd51(_0xc213b0)||_0xc213b0);return _0xc213b0;},M=(_0x36fd81,_0x391074)=>(_0x295041,_0x3cf1b4)=>_0x391074(_0x295041,_0x3cf1b4,_0x36fd81);let f=class extends _0x356b4e{constructor(_0x28cbc5,_0x4d0518){const _0xa3ea57=_0xa7205c;super(),this[_0xa3ea57(0xee)]=_0x28cbc5,this[_0xa3ea57(0x138)]=_0x4d0518,this[_0xa3ea57(0x14d)]();}[_0xa7205c(0x14d)](){const _0x42859e=_0xa7205c;this['_threadCommentDataSourceService'][_0x42859e(0x143)]=this[_0x42859e(0x138)],this[_0x42859e(0xee)][_0x42859e(0x123)]=!0x1;}};f=te([M(0x0,_0x450486),M(0x1,_0x28a1f8(S))],f);var se=Object[_0xa7205c(0xff)],oe=Object[_0xa7205c(0x10c)],ne=(_0x2a8a3a,_0x48dd36,_0x1155f3)=>_0x48dd36 in _0x2a8a3a?se(_0x2a8a3a,_0x48dd36,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1155f3}):_0x2a8a3a[_0x48dd36]=_0x1155f3,ie=(_0x1876c3,_0x42b808,_0x38a856,_0x522b64)=>{for(var _0x551bde=_0x522b64>0x1?void 0x0:_0x522b64?oe(_0x42b808,_0x38a856):_0x42b808,_0x33c62f=_0x1876c3['length']-0x1,_0x1a898e;_0x33c62f>=0x0;_0x33c62f--)(_0x1a898e=_0x1876c3[_0x33c62f])&&(_0x551bde=_0x1a898e(_0x551bde)||_0x551bde);return _0x551bde;},N=(_0x3c5eb5,_0x293b8d)=>(_0x5a9e42,_0x402533)=>_0x293b8d(_0x5a9e42,_0x402533,_0x3c5eb5),$=(_0x421339,_0x26cb25,_0x179e6d)=>ne(_0x421339,typeof _0x26cb25!='symbol'?_0x26cb25+'':_0x26cb25,_0x179e6d);let g=class extends _0x88c673{constructor(_0x556791=O,_0x50e64a,_0x48aad2){const _0x559c89=_0xa7205c;super(),this['_config']=_0x556791,this[_0x559c89(0x10d)]=_0x50e64a,this[_0x559c89(0x136)]=_0x48aad2;const {..._0x2cecea}=_0x403e38({},O,this['_config']);this['_configService']['setConfig'](z,_0x2cecea);}[_0xa7205c(0x13e)](){const _0x556fb1=_0xa7205c;[[S],[f],[_]][_0x556fb1(0x118)](_0x34bdd9=>{this['_injector']['add'](_0x34bdd9);});}['onReady'](){const _0x28f55f=_0xa7205c;this[_0x28f55f(0x10d)][_0x28f55f(0xef)](f),this[_0x28f55f(0x10d)][_0x28f55f(0xef)](_);}};$(g,_0xa7205c(0xf2),W),$(g,'type',_0x1945c7[_0xa7205c(0x11e)]),g=ie([_0x20ab80(_0x798c6,_0x2c98f7,_0x52f3b9),N(0x1,_0x28a1f8(_0x54d40d)),N(0x2,_0x476b8d)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x4b2ae6,_0xdd97ce){const _0x43fd06=_0x2056,_0x377582=_0x4b2ae6();while(!![]){try{const _0x90c2ff=-parseInt(_0x43fd06(0x25a))/0x1+-parseInt(_0x43fd06(0x1f6))/0x2*(-parseInt(_0x43fd06(0x1de))/0x3)+-parseInt(_0x43fd06(0x1e4))/0x4*(parseInt(_0x43fd06(0x258))/0x5)+parseInt(_0x43fd06(0x21f))/0x6+-parseInt(_0x43fd06(0x202))/0x7*(-parseInt(_0x43fd06(0x1ef))/0x8)+-parseInt(_0x43fd06(0x246))/0x9+parseInt(_0x43fd06(0x24f))/0xa;if(_0x90c2ff===_0xdd97ce)break;else _0x377582['push'](_0x377582['shift']());}catch(_0x5f50cf){_0x377582['push'](_0x377582['shift']());}}}(_0x5a93,0xdee89),function(_0x191a33,_0x569835){const _0x43f65b=_0x2056;typeof exports==_0x43f65b(0x20b)&&typeof module<'u'?_0x569835(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x43f65b(0x1df)&&define[_0x43f65b(0x1f9)]?define([_0x43f65b(0x228),_0x43f65b(0x1e0),'@univerjs-pro/license',_0x43f65b(0x217),_0x43f65b(0x20e),_0x43f65b(0x1dd),_0x43f65b(0x24c),_0x43f65b(0x255)],_0x569835):(_0x191a33=typeof globalThis<'u'?globalThis:_0x191a33||self,_0x569835(_0x191a33[_0x43f65b(0x216)]={},_0x191a33[_0x43f65b(0x203)],_0x191a33['UniverProLicense'],_0x191a33[_0x43f65b(0x242)],_0x191a33['UniverThreadCommentUi'],_0x191a33['UniverThreadComment'],_0x191a33[_0x43f65b(0x24c)],_0x191a33[_0x43f65b(0x1e3)]));}(this,function(_0x4fcfbd,_0x48730e,_0x10a353,_0x51f1ce,_0x39556f,_0x3116cc,_0x3a72c3,_0x1d31a5){'use strict';const _0x1a2c97=_0x2056;const _0x23c63d='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x13f869=(_0x37b28f=>(_0x37b28f[_0x37b28f[_0x1a2c97(0x1fe)]=0x0]='OpenOrReOpen',_0x37b28f[_0x37b28f[_0x1a2c97(0x245)]=0x1]=_0x1a2c97(0x245),_0x37b28f[_0x37b28f[_0x1a2c97(0x222)]=-0x1]=_0x1a2c97(0x222),_0x37b28f))(_0x13f869||{}),_0x443956=(_0x5a991d=>(_0x5a991d[_0x5a991d[_0x1a2c97(0x23b)]=0x0]=_0x1a2c97(0x23b),_0x5a991d[_0x5a991d[_0x1a2c97(0x1ff)]=0x1]=_0x1a2c97(0x1ff),_0x5a991d[_0x5a991d[_0x1a2c97(0x1e8)]=0x2]='Reply',_0x5a991d[_0x5a991d['Edit']=0x3]=_0x1a2c97(0x1f7),_0x5a991d[_0x5a991d['Delete']=0x4]=_0x1a2c97(0x23d),_0x5a991d[_0x5a991d['Solve']=0x5]='Solve',_0x5a991d[_0x5a991d['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x5a991d))(_0x443956||{});const _0x13c44b=_0x249005=>_0x51f1ce[_0x1a2c97(0x206)](new Date(+_0x249005))[_0x1a2c97(0x200)](_0x1a2c97(0x24d)),_0xa96a43=async(_0x49818f,_0x3e6a39)=>{const _0x6b62fb=_0x1a2c97,_0x3fdeb0=_0x49818f['get'](_0x51f1ce['UserManagerService']),_0x1f8db2=_0x49818f[_0x6b62fb(0x1f1)](_0x1d31a5['HTTPService']);_0x3e6a39[_0x6b62fb(0x1f2)](_0x23c4b9=>{const _0x43c18f=_0x6b62fb;_0x3fdeb0[_0x43c18f(0x263)](_0x23c4b9)&&_0x3e6a39[_0x43c18f(0x20d)](_0x23c4b9);}),_0x3e6a39[_0x6b62fb(0x225)]&&(await _0x1f8db2[_0x6b62fb(0x1f1)](_0x6b62fb(0x22c),{'params':{'userIDs':[..._0x3e6a39]}}))[_0x6b62fb(0x23a)][_0x6b62fb(0x241)][_0x6b62fb(0x1f2)](_0x9f08ff=>{const _0x301f8b=_0x6b62fb;_0x9f08ff&&_0x3fdeb0[_0x301f8b(0x235)](_0x9f08ff);});};var _0x158a71=Object[_0x1a2c97(0x226)],_0x4769a7=(_0x23ca5b,_0xb12b02,_0x4bc54f,_0x48156f)=>{for(var _0x39c1ea=_0x48156f>0x1?void 0x0:_0x48156f?_0x158a71(_0xb12b02,_0x4bc54f):_0xb12b02,_0x42e934=_0x23ca5b['length']-0x1,_0x404263;_0x42e934>=0x0;_0x42e934--)(_0x404263=_0x23ca5b[_0x42e934])&&(_0x39c1ea=_0x404263(_0x39c1ea)||_0x39c1ea);return _0x39c1ea;},_0x55f2a7=(_0x1419c9,_0x4a7923)=>(_0x4915cc,_0x62efbe)=>_0x4a7923(_0x4915cc,_0x62efbe,_0x1419c9);let _0x2288d2=class extends _0x51f1ce[_0x1a2c97(0x243)]{constructor(_0xfe694d,_0x1e89f8,_0x3e1199,_0x54ca24){const _0x1439ed=_0x1a2c97;super(),this['_commentService']=_0xfe694d,this['_threadCommentModel']=_0x1e89f8,this[_0x1439ed(0x261)]=_0x3e1199,this[_0x1439ed(0x1ec)]=_0x54ca24,this[_0x1439ed(0x209)](),this[_0x1439ed(0x215)]();}[_0x1a2c97(0x215)](){const _0x5cdbb3=_0x1a2c97;this['disposeWithMe'](this[_0x5cdbb3(0x221)][_0x5cdbb3(0x23c)][_0x5cdbb3(0x204)](_0x3a72c3['bufferTime'](0x10))[_0x5cdbb3(0x22a)](_0x20e5dd=>{const _0x4601a3=_0x5cdbb3,_0x3cd452=new Set();_0x20e5dd[_0x4601a3(0x1f2)](_0x1e3846=>{const _0x328778=_0x4601a3;if(_0x1e3846[_0x328778(0x240)]===_0x328778(0x239)){const _0x595f8b=_0x1e3846['payload'][_0x328778(0x1fd)];_0x3cd452[_0x328778(0x239)](_0x595f8b);}}),_0xa96a43(this[_0x4601a3(0x1ec)],_0x3cd452);}));}[_0x1a2c97(0x209)](){const _0x549c0b=_0x1a2c97;this[_0x549c0b(0x20f)](this[_0x549c0b(0x252)][_0x549c0b(0x23c)]['subscribe'](async _0x3ae143=>{const _0x35d58b=_0x549c0b;var _0x4009a9,_0x5b9e35,_0x202787,_0x402341;const _0x5c37da=(_0x4009a9=this['_threadCommentModel'][_0x35d58b(0x1fb)](_0x3ae143[_0x35d58b(0x23e)])[_0x35d58b(0x21a)](_0x384678=>_0x384678[_0x35d58b(0x1e5)]===_0x3ae143[_0x35d58b(0x1e5)]))==null?void 0x0:_0x4009a9[_0x35d58b(0x24e)];if(!_0x5c37da)return;const {unitId:_0x9777d0,subUnitId:_0x162641}=_0x5c37da;switch(_0x3ae143[_0x35d58b(0x22d)]&&this[_0x35d58b(0x261)]['addUser'](_0x3ae143[_0x35d58b(0x22d)]),_0x3ae143[_0x35d58b(0x240)]){case _0x443956[_0x35d58b(0x1ff)]:break;case _0x443956[_0x35d58b(0x1e8)]:{this[_0x35d58b(0x221)][_0x35d58b(0x247)](_0x9777d0,_0x162641,{'unitId':_0x9777d0,'subUnitId':_0x162641,'ref':'','id':_0x3ae143['replyId'],'dT':_0x13c44b(+_0x3ae143[_0x35d58b(0x211)]),'threadId':_0x3ae143[_0x35d58b(0x1e5)],'personId':(_0x202787=(_0x5b9e35=_0x3ae143[_0x35d58b(0x22d)])==null?void 0x0:_0x5b9e35[_0x35d58b(0x248)])!=null?_0x202787:_0x3ae143[_0x35d58b(0x234)],'text':JSON['parse'](_0x3ae143['content']),'parentId':_0x5c37da['id']});break;}case _0x443956['Delete']:{const _0x127344=this[_0x35d58b(0x221)][_0x35d58b(0x236)](_0x9777d0,_0x162641,_0x3ae143[_0x35d58b(0x249)]);_0x127344&&_0x127344[_0x35d58b(0x257)]&&this[_0x35d58b(0x221)]['deleteComment'](_0x9777d0,_0x162641,_0x3ae143[_0x35d58b(0x249)]);break;}case _0x443956[_0x35d58b(0x1f7)]:{this[_0x35d58b(0x221)][_0x35d58b(0x254)](_0x9777d0,_0x162641,{'commentId':_0x3ae143[_0x35d58b(0x249)],'text':JSON[_0x35d58b(0x1f8)](_0x3ae143[_0x35d58b(0x1fc)])});break;}case _0x443956[_0x35d58b(0x259)]:{const _0xb9a688=(_0x402341=this[_0x35d58b(0x221)][_0x35d58b(0x1fb)](_0x3ae143[_0x35d58b(0x23e)])[_0x35d58b(0x21a)](_0x339989=>_0x339989[_0x35d58b(0x1e5)]===_0x3ae143[_0x35d58b(0x1e5)]))==null?void 0x0:_0x402341[_0x35d58b(0x24e)];_0xb9a688&&this['_threadCommentModel'][_0x35d58b(0x218)](_0x9777d0,_0x162641,_0xb9a688['id'],_0x3ae143[_0x35d58b(0x1f3)]===_0x13f869[_0x35d58b(0x245)]);break;}}}));}};_0x2288d2=_0x4769a7([_0x55f2a7(0x0,_0x51f1ce[_0x1a2c97(0x24b)](_0x48730e[_0x1a2c97(0x21c)])),_0x55f2a7(0x1,_0x51f1ce[_0x1a2c97(0x24b)](_0x3116cc[_0x1a2c97(0x231)])),_0x55f2a7(0x2,_0x51f1ce[_0x1a2c97(0x24b)](_0x51f1ce[_0x1a2c97(0x238)])),_0x55f2a7(0x3,_0x51f1ce[_0x1a2c97(0x24b)](_0x51f1ce[_0x1a2c97(0x205)]))],_0x2288d2);const _0x1b11ea=_0x1a2c97(0x20a),_0x17d85b={};var _0x3f2b2e=Object[_0x1a2c97(0x226)],_0x3b5b49=(_0x5c01d2,_0x51cd31,_0x477161,_0x4525ec)=>{for(var _0x431eae=_0x4525ec>0x1?void 0x0:_0x4525ec?_0x3f2b2e(_0x51cd31,_0x477161):_0x51cd31,_0x3ec7c5=_0x5c01d2['length']-0x1,_0x37f91b;_0x3ec7c5>=0x0;_0x3ec7c5--)(_0x37f91b=_0x5c01d2[_0x3ec7c5])&&(_0x431eae=_0x37f91b(_0x431eae)||_0x431eae);return _0x431eae;},_0x3ee83a=(_0x45bc21,_0x5e5d50)=>(_0x2f6303,_0x344025)=>_0x5e5d50(_0x2f6303,_0x344025,_0x45bc21);function _0x13a7e1(_0x2b089f,_0x100003){const _0x372554=_0x1a2c97,_0x19682b=_0x2b089f['replies'][0x0];return{..._0x100003,'id':_0x19682b[_0x372554(0x249)],'resolved':_0x2b089f['solved']===0x1,'dT':_0x13c44b(_0x19682b[_0x372554(0x211)]),'personId':_0x19682b['userId'],'threadId':_0x19682b['threadId']};}function _0x30f5e3(_0x3ec4ec,_0x4d2775,_0x53e33b){const _0x22d8e0=_0x1a2c97;var _0xb7cc72,_0x45b8ee;if(((_0x45b8ee=(_0xb7cc72=_0x3ec4ec==null?void 0x0:_0x3ec4ec[_0x22d8e0(0x1dc)])==null?void 0x0:_0xb7cc72[_0x22d8e0(0x1eb)])!=null?_0x45b8ee:0x0)>0x0){const _0x3e03c6=(_0x626dcd,_0x5f4749)=>({'id':_0x626dcd[_0x22d8e0(0x249)],'threadId':_0x626dcd['threadId'],'dT':_0x13c44b(_0x626dcd['createTimestamp']),'personId':_0x626dcd[_0x22d8e0(0x234)],'resolved':_0x3ec4ec[_0x22d8e0(0x1f3)]===_0x13f869['Solved'],'unitId':_0x4d2775,'subUnitId':_0x53e33b,'text':JSON['parse'](_0x626dcd[_0x22d8e0(0x1fc)]),'parentId':_0x5f4749}),_0xf39ba9=_0x3e03c6(_0x3ec4ec[_0x22d8e0(0x1dc)][0x0]);return{..._0xf39ba9,'children':_0x3ec4ec[_0x22d8e0(0x1dc)]['slice'](0x1)[_0x22d8e0(0x201)](_0x446fce=>_0x3e03c6(_0x446fce,_0xf39ba9['id']))};}return null;}let _0x1926c=class{constructor(_0x2b868d,_0x1f5994,_0x14c208){const _0x28bba1=_0x1a2c97;this[_0x28bba1(0x230)]=_0x2b868d,this[_0x28bba1(0x261)]=_0x1f5994,this[_0x28bba1(0x1e9)]=_0x14c208;}async[_0x1a2c97(0x247)](_0x4c2c67){const _0x2961c8=_0x1a2c97;var _0x11fb08,_0x308efc;const {parentId:_0x56e590,unitId:_0x29cc89,text:_0x193c83,threadId:_0x104575}=_0x4c2c67,_0x468b30=(_0x308efc=(_0x11fb08=_0x193c83['customRanges'])==null?void 0x0:_0x11fb08[_0x2961c8(0x253)](_0x37ae8e=>_0x37ae8e[_0x2961c8(0x214)]===_0x51f1ce[_0x2961c8(0x219)][_0x2961c8(0x1ea)])['map'](_0x56149f=>_0x56149f[_0x2961c8(0x207)]))!=null?_0x308efc:[],_0x2990fc=JSON[_0x2961c8(0x220)](_0x193c83),_0x5db062=(await this[_0x2961c8(0x1e9)][_0x2961c8(0x25b)](_0x29cc89))[_0x2961c8(0x1f0)]();if(_0x56e590){const _0x2abe2e={'memberId':_0x5db062,'unitId':_0x29cc89,'content':_0x2990fc,'mention':_0x468b30,'threadId':_0x104575},_0x46185c=(await this[_0x2961c8(0x230)][_0x2961c8(0x1e1)](_0x2961c8(0x251)+_0x29cc89+'/reply',{'body':_0x2abe2e}))[_0x2961c8(0x23a)][_0x2961c8(0x208)];return{..._0x4c2c67,'id':_0x46185c[_0x2961c8(0x249)],'dT':_0x51f1ce[_0x2961c8(0x206)](+_0x46185c[_0x2961c8(0x211)])[_0x2961c8(0x200)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x46185c[_0x2961c8(0x234)]};}else{const _0x40440a={'memberId':_0x5db062,'unitId':_0x29cc89,'content':_0x2990fc,'mention':_0x468b30},_0x6c384a=await this[_0x2961c8(0x230)][_0x2961c8(0x1e1)]('/universer-api/comment/unit/'+_0x29cc89+_0x2961c8(0x250),{'body':_0x40440a});return _0x13a7e1(_0x6c384a[_0x2961c8(0x23a)][_0x2961c8(0x1e7)],_0x4c2c67);}}async['updateComment'](_0x579cc7){const _0x317ba0=_0x1a2c97;var _0x838240,_0x51e1ab;const {text:_0x36e6a2,unitId:_0x2f9c34}=_0x579cc7,_0x57e97a=(_0x51e1ab=(_0x838240=_0x36e6a2['customRanges'])==null?void 0x0:_0x838240[_0x317ba0(0x253)](_0x69ffa3=>_0x69ffa3[_0x317ba0(0x214)]===_0x51f1ce[_0x317ba0(0x219)][_0x317ba0(0x1ea)])[_0x317ba0(0x201)](_0x36fe79=>_0x36fe79['rangeId']))!=null?_0x51e1ab:[],_0x56bfe0=JSON[_0x317ba0(0x220)](_0x36e6a2),_0x3191a2=_0x579cc7['threadId'],_0x1025be=_0x579cc7['id'],_0x16996d={'memberId':(await this[_0x317ba0(0x1e9)][_0x317ba0(0x25b)](_0x2f9c34))[_0x317ba0(0x1f0)](),'unitId':_0x2f9c34,'threadId':_0x3191a2,'mention':_0x57e97a,'content':_0x56bfe0,'replyId':_0x1025be},_0x4b6aa5=await this[_0x317ba0(0x230)][_0x317ba0(0x1e1)](_0x317ba0(0x251)+_0x2f9c34+'/edit',{'body':_0x16996d});return!_0x4b6aa5[_0x317ba0(0x23a)][_0x317ba0(0x22e)]||_0x4b6aa5[_0x317ba0(0x23a)][_0x317ba0(0x22e)][_0x317ba0(0x25d)]===0x1;}async[_0x1a2c97(0x218)](_0x23fad0){const _0x246358=_0x1a2c97,{unitId:_0x5a2a25}=_0x23fad0,_0x527c49=_0x23fad0[_0x246358(0x1e5)],_0x11c201={'memberId':this[_0x246358(0x261)][_0x246358(0x1fa)]()[_0x246358(0x248)],'unitId':_0x5a2a25,'threadId':_0x527c49,'solved':_0x23fad0[_0x246358(0x244)]?_0x13f869[_0x246358(0x245)]:_0x13f869['OpenOrReOpen']},_0x728b6d=await this[_0x246358(0x230)][_0x246358(0x1e1)](_0x246358(0x251)+_0x5a2a25+_0x246358(0x23f),{'body':_0x11c201});return!_0x728b6d[_0x246358(0x23a)][_0x246358(0x22e)]||_0x728b6d[_0x246358(0x23a)][_0x246358(0x22e)][_0x246358(0x25d)]===0x1;}async['deleteComment'](_0x2193e1,_0x82303a,_0x12a3f4,_0x570ae4){const _0x36ac16=_0x1a2c97,_0x36f1d9={'memberId':(await this[_0x36ac16(0x1e9)]['requireSession'](_0x2193e1))['getMemberID'](),'threadId':_0x12a3f4,'replyId':_0x570ae4,'unitId':_0x2193e1},_0x917da8=await this[_0x36ac16(0x230)][_0x36ac16(0x1e1)](_0x36ac16(0x251)+_0x2193e1+_0x36ac16(0x25c),{'body':_0x36f1d9});return!_0x917da8['body']['error']||_0x917da8[_0x36ac16(0x23a)]['error'][_0x36ac16(0x25d)]===0x1;}async[_0x1a2c97(0x1e2)](_0x139ac5,_0x31255e,_0x423c2e){const _0x3211a0=_0x1a2c97,_0x2cebc1={'unitId':_0x139ac5,'threadId':_0x423c2e},_0x36059f=await this['_httpService'][_0x3211a0(0x1e1)](_0x3211a0(0x251)+_0x139ac5+_0x3211a0(0x20c),{'body':_0x2cebc1}),_0x39d4e7=_0x423c2e[_0x3211a0(0x201)](_0x2dfa3e=>_0x30f5e3(_0x36059f[_0x3211a0(0x23a)]['comments'][_0x2dfa3e],_0x139ac5,_0x31255e))['filter'](Boolean);return Object[_0x3211a0(0x224)](_0x36059f[_0x3211a0(0x23a)][_0x3211a0(0x241)])[_0x3211a0(0x1f2)](_0x4d4fe0=>{this['_userService']['addUser'](_0x4d4fe0);}),_0x39d4e7;}[_0x1a2c97(0x212)](_0x210f96){const _0x477a3d=_0x1a2c97;return{'id':_0x210f96['id'],'threadId':_0x210f96[_0x477a3d(0x1e5)],'ref':_0x210f96[_0x477a3d(0x260)]};}};_0x1926c=_0x3b5b49([_0x3ee83a(0x0,_0x51f1ce[_0x1a2c97(0x24b)](_0x1d31a5['HTTPService'])),_0x3ee83a(0x1,_0x51f1ce[_0x1a2c97(0x24b)](_0x51f1ce[_0x1a2c97(0x238)])),_0x3ee83a(0x2,_0x51f1ce[_0x1a2c97(0x24b)](_0x48730e[_0x1a2c97(0x21e)]))],_0x1926c);var _0x3ce6d5=Object[_0x1a2c97(0x226)],_0x12f4fe=(_0x12b346,_0xcd7d65,_0x5e65d4,_0x167f8c)=>{const _0x4acf42=_0x1a2c97;for(var _0x3dac18=_0x167f8c>0x1?void 0x0:_0x167f8c?_0x3ce6d5(_0xcd7d65,_0x5e65d4):_0xcd7d65,_0x9d3732=_0x12b346[_0x4acf42(0x1eb)]-0x1,_0x4b138a;_0x9d3732>=0x0;_0x9d3732--)(_0x4b138a=_0x12b346[_0x9d3732])&&(_0x3dac18=_0x4b138a(_0x3dac18)||_0x3dac18);return _0x3dac18;},_0x5dabd6=(_0x1d05cd,_0xbea482)=>(_0x10cae9,_0x48c9d0)=>_0xbea482(_0x10cae9,_0x48c9d0,_0x1d05cd);let _0x356c68=class extends _0x51f1ce['Disposable']{constructor(_0x1ae278,_0x418ab2){const _0x462bc9=_0x1a2c97;super(),this[_0x462bc9(0x237)]=_0x1ae278,this[_0x462bc9(0x22f)]=_0x418ab2,this[_0x462bc9(0x1f5)]();}[_0x1a2c97(0x1f5)](){const _0x364006=_0x1a2c97;this[_0x364006(0x237)][_0x364006(0x21d)]=this[_0x364006(0x22f)],this[_0x364006(0x237)][_0x364006(0x25e)]=!0x1;}};_0x356c68=_0x12f4fe([_0x5dabd6(0x0,_0x3116cc[_0x1a2c97(0x22b)]),_0x5dabd6(0x1,_0x51f1ce['Inject'](_0x1926c))],_0x356c68);var _0x195e25=Object[_0x1a2c97(0x1e6)],_0x1abf75=Object['getOwnPropertyDescriptor'],_0x4af672=(_0x1674c1,_0x9ca87a,_0x35f8f5)=>_0x9ca87a in _0x1674c1?_0x195e25(_0x1674c1,_0x9ca87a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x35f8f5}):_0x1674c1[_0x9ca87a]=_0x35f8f5,_0x393f43=(_0x2f4a92,_0x51cd25,_0x46a989,_0x38091c)=>{const _0x1e22e7=_0x1a2c97;for(var _0x532d57=_0x38091c>0x1?void 0x0:_0x38091c?_0x1abf75(_0x51cd25,_0x46a989):_0x51cd25,_0x5af336=_0x2f4a92[_0x1e22e7(0x1eb)]-0x1,_0x4e6ca9;_0x5af336>=0x0;_0x5af336--)(_0x4e6ca9=_0x2f4a92[_0x5af336])&&(_0x532d57=_0x4e6ca9(_0x532d57)||_0x532d57);return _0x532d57;},_0x4705d0=(_0x4de153,_0x37fc4f)=>(_0x5cc98b,_0x4e83d7)=>_0x37fc4f(_0x5cc98b,_0x4e83d7,_0x4de153),_0x41b3b2=(_0x8a94e2,_0x4ba0b8,_0xc17b0c)=>_0x4af672(_0x8a94e2,typeof _0x4ba0b8!=_0x1a2c97(0x1ed)?_0x4ba0b8+'':_0x4ba0b8,_0xc17b0c);_0x4fcfbd[_0x1a2c97(0x229)]=class extends _0x51f1ce[_0x1a2c97(0x227)]{constructor(_0x27bec4=_0x17d85b,_0x525f32,_0x1f9038){const _0xd74acd=_0x1a2c97;super(),this[_0xd74acd(0x210)]=_0x27bec4,this[_0xd74acd(0x1ec)]=_0x525f32,this[_0xd74acd(0x232)]=_0x1f9038;const {..._0x29d66a}=_0x51f1ce[_0xd74acd(0x213)]({},_0x17d85b,this[_0xd74acd(0x210)]);this[_0xd74acd(0x232)]['setConfig'](_0x1b11ea,_0x29d66a);}[_0x1a2c97(0x233)](){const _0x550641=_0x1a2c97;[[_0x1926c],[_0x356c68],[_0x2288d2]][_0x550641(0x1f2)](_0x2441ae=>{const _0x476e8e=_0x550641;this[_0x476e8e(0x1ec)][_0x476e8e(0x239)](_0x2441ae);});}['onReady'](){const _0x27adba=_0x1a2c97;this['_injector'][_0x27adba(0x1f1)](_0x356c68),this[_0x27adba(0x1ec)][_0x27adba(0x1f1)](_0x2288d2);}},_0x41b3b2(_0x4fcfbd['UniverThreadCommentDataSourcePlugin'],_0x1a2c97(0x24a),_0x23c63d),_0x41b3b2(_0x4fcfbd[_0x1a2c97(0x229)],'type',_0x51f1ce['UniverInstanceType'][_0x1a2c97(0x223)]),_0x4fcfbd['UniverThreadCommentDataSourcePlugin']=_0x393f43([_0x51f1ce[_0x1a2c97(0x1ee)](_0x39556f[_0x1a2c97(0x21b)],_0x48730e[_0x1a2c97(0x256)],_0x10a353['UniverLicensePlugin']),_0x4705d0(0x1,_0x51f1ce[_0x1a2c97(0x24b)](_0x51f1ce[_0x1a2c97(0x205)])),_0x4705d0(0x2,_0x51f1ce[_0x1a2c97(0x262)])],_0x4fcfbd[_0x1a2c97(0x229)]),Object[_0x1a2c97(0x1e6)](_0x4fcfbd,Symbol[_0x1a2c97(0x25f)],{'value':_0x1a2c97(0x1f4)});}));function _0x2056(_0x50def5,_0x2cb167){_0x50def5=_0x50def5-0x1dc;const _0x5a9383=_0x5a93();let _0x20566a=_0x5a9383[_0x50def5];return _0x20566a;}function _0x5a93(){const _0x482587=['getMemberID','get','forEach','solved','Module','_initDataSource','888078CEikrH','Edit','parse','amd','getCurrentUser','getUnit','content','personId','OpenOrReOpen','Add','format','map','14riVSlJ','UniverProCollaborationClient','pipe','Injector','dayjs','rangeId','reply','_init','thread-comment-data-source.config','object','/list','delete','@univerjs/thread-comment-ui','disposeWithMe','_config','createTimestamp','saveCommentToSnapshot','merge','rangeType','_initUserSync','UniverProThreadCommentDatasource','@univerjs/core','resolveComment','CustomRangeType','find','UniverThreadCommentUIPlugin','CommentService','dataSource','CollaborationSessionService','5102628OGhSUk','stringify','_threadCommentModel','UNRECOGNIZED','UNIVER_UNKNOWN','values','size','getOwnPropertyDescriptor','Plugin','exports','UniverThreadCommentDataSourcePlugin','subscribe','IThreadCommentDataSourceService','/universer-api/user/list','user','error','_threadCommentDataSource','_httpService','ThreadCommentModel','_configService','onStarting','userId','addUser','getComment','_threadCommentDataSourceService','UserManagerService','add','body','Unknown','commentUpdate$','Delete','unitId','/solved','type','users','UniverCore','Disposable','resolved','Solved','7021242BUjXrC','addComment','userID','replyId','pluginName','Inject','rxjs','YYYY/MM/DD\x20HH:mm','root','2108220HQXZhu','/add','/universer-api/comment/unit/','_commentService','filter','updateComment','@univerjs/network','UniverCollaborationClientPlugin','parentId','105035FyfRSI','Solve','1459976cGfnKk','requireSession','/delete','code','syncUpdateMutationToColla','toStringTag','ref','_userService','IConfigService','getUser','replies','@univerjs/thread-comment','9ADkClC','function','@univerjs-pro/collaboration-client','post','listComments','UniverNetwork','16flYhee','threadId','defineProperty','comment','Reply','_sessionService','COMMENT','length','_injector','symbol','DependentOn','3375192MpjEat'];_0x5a93=function(){return _0x482587;};return _0x5a93();}
1
+ (function(_0x31fa3c,_0x387e4d){const _0x3d6ccf=_0x7bf0,_0x356f01=_0x31fa3c();while(!![]){try{const _0x58498e=-parseInt(_0x3d6ccf(0x12e))/0x1+-parseInt(_0x3d6ccf(0x119))/0x2*(-parseInt(_0x3d6ccf(0xe9))/0x3)+parseInt(_0x3d6ccf(0xe8))/0x4*(parseInt(_0x3d6ccf(0x146))/0x5)+parseInt(_0x3d6ccf(0x11a))/0x6+-parseInt(_0x3d6ccf(0xf6))/0x7+-parseInt(_0x3d6ccf(0xca))/0x8+-parseInt(_0x3d6ccf(0xdb))/0x9*(-parseInt(_0x3d6ccf(0x120))/0xa);if(_0x58498e===_0x387e4d)break;else _0x356f01['push'](_0x356f01['shift']());}catch(_0x1fb6f0){_0x356f01['push'](_0x356f01['shift']());}}}(_0x1e71,0x18d15),function(_0x68ed5e,_0x531fd0){const _0x440882=_0x7bf0;typeof exports==_0x440882(0xd8)&&typeof module<'u'?_0x531fd0(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x440882(0x104)&&define[_0x440882(0x13a)]?define([_0x440882(0xd5),_0x440882(0xef),_0x440882(0xf3),'@univerjs/core',_0x440882(0x131),_0x440882(0x117),'rxjs',_0x440882(0x126)],_0x531fd0):(_0x68ed5e=typeof globalThis<'u'?globalThis:_0x68ed5e||self,_0x531fd0(_0x68ed5e[_0x440882(0xeb)]={},_0x68ed5e[_0x440882(0xf7)],_0x68ed5e['UniverProLicense'],_0x68ed5e[_0x440882(0xfc)],_0x68ed5e['UniverThreadCommentUi'],_0x68ed5e['UniverThreadComment'],_0x68ed5e[_0x440882(0xd7)],_0x68ed5e[_0x440882(0x10e)]));}(this,function(_0x493579,_0x239869,_0x52c6be,_0x5c9a82,_0x153901,_0x6a4276,_0x56ece4,_0x1fc00b){'use strict';const _0x3271bc=_0x7bf0;const _0x404753='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x39bd4b=(_0x49323a=>(_0x49323a[_0x49323a['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x49323a[_0x49323a[_0x3271bc(0x114)]=0x1]=_0x3271bc(0x114),_0x49323a[_0x49323a[_0x3271bc(0x100)]=-0x1]=_0x3271bc(0x100),_0x49323a))(_0x39bd4b||{}),_0x47f367=(_0x4619d4=>(_0x4619d4[_0x4619d4['Unknown']=0x0]=_0x3271bc(0xd3),_0x4619d4[_0x4619d4['Add']=0x1]=_0x3271bc(0x148),_0x4619d4[_0x4619d4[_0x3271bc(0x108)]=0x2]=_0x3271bc(0x108),_0x4619d4[_0x4619d4['Edit']=0x3]=_0x3271bc(0x13c),_0x4619d4[_0x4619d4[_0x3271bc(0x10f)]=0x4]='Delete',_0x4619d4[_0x4619d4[_0x3271bc(0x144)]=0x5]=_0x3271bc(0x144),_0x4619d4[_0x4619d4[_0x3271bc(0x100)]=-0x1]=_0x3271bc(0x100),_0x4619d4))(_0x47f367||{});const _0x55c580=_0x4894cd=>_0x5c9a82[_0x3271bc(0xce)](new Date(+_0x4894cd))[_0x3271bc(0x115)](_0x3271bc(0x10b)),_0x428b40=async(_0x2c9d7c,_0x36654d)=>{const _0x56b366=_0x3271bc,_0x15c5c4=_0x2c9d7c['get'](_0x5c9a82[_0x56b366(0x14b)]),_0x536a38=_0x2c9d7c[_0x56b366(0x136)](_0x1fc00b[_0x56b366(0xfd)]);_0x36654d[_0x56b366(0xd2)](_0x13acc3=>{const _0x30051b=_0x56b366;_0x15c5c4[_0x30051b(0x12b)](_0x13acc3)&&_0x36654d[_0x30051b(0x140)](_0x13acc3);}),_0x36654d['size']&&(await _0x536a38[_0x56b366(0x136)](_0x56b366(0xcf),{'params':{'userIDs':[..._0x36654d]}}))[_0x56b366(0xe0)][_0x56b366(0x11e)][_0x56b366(0xd2)](_0x22902e=>{const _0x43bf86=_0x56b366;_0x22902e&&_0x15c5c4[_0x43bf86(0xd9)](_0x22902e);});};var _0x27575f=Object[_0x3271bc(0xc7)],_0x7b8758=(_0x4c5c45,_0x113d1d,_0x3709d0,_0x24b5bf)=>{for(var _0x537835=_0x24b5bf>0x1?void 0x0:_0x24b5bf?_0x27575f(_0x113d1d,_0x3709d0):_0x113d1d,_0x4148b9=_0x4c5c45['length']-0x1,_0x11002e;_0x4148b9>=0x0;_0x4148b9--)(_0x11002e=_0x4c5c45[_0x4148b9])&&(_0x537835=_0x11002e(_0x537835)||_0x537835);return _0x537835;},_0x3f1e5c=(_0x20d3aa,_0xad2120)=>(_0x180607,_0x1253e7)=>_0xad2120(_0x180607,_0x1253e7,_0x20d3aa);let _0x4a25b0=class extends _0x5c9a82['Disposable']{constructor(_0x2dd214,_0x2c2850,_0x4121ef,_0x3e0f03){const _0x1a76b4=_0x3271bc;super(),this[_0x1a76b4(0x133)]=_0x2dd214,this[_0x1a76b4(0xe3)]=_0x2c2850,this[_0x1a76b4(0x142)]=_0x4121ef,this[_0x1a76b4(0xf9)]=_0x3e0f03,this[_0x1a76b4(0xcb)](),this[_0x1a76b4(0x11f)]();}[_0x3271bc(0x11f)](){const _0x47a1d6=_0x3271bc;this[_0x47a1d6(0xf4)](this['_threadCommentModel'][_0x47a1d6(0x127)][_0x47a1d6(0x125)](_0x56ece4[_0x47a1d6(0x132)](0x10))[_0x47a1d6(0xed)](_0x4d2d57=>{const _0x604c5e=_0x47a1d6,_0x440ccf=new Set();_0x4d2d57['forEach'](_0x45c4ce=>{const _0x2e2927=_0x7bf0;if(_0x45c4ce['type']==='add'){const _0x2cdb9e=_0x45c4ce[_0x2e2927(0xe1)]['personId'];_0x440ccf[_0x2e2927(0x147)](_0x2cdb9e);}}),_0x428b40(this[_0x604c5e(0xf9)],_0x440ccf);}));}[_0x3271bc(0xcb)](){const _0x4c9a06=_0x3271bc;this[_0x4c9a06(0xf4)](this[_0x4c9a06(0x133)][_0x4c9a06(0x127)][_0x4c9a06(0xed)](async _0x5c3e2d=>{const _0x1a050d=_0x4c9a06;var _0x1f504a,_0x2f425a,_0x23698b,_0xb3552;const _0x4dc926=(_0x1f504a=this['_threadCommentModel']['getUnit'](_0x5c3e2d[_0x1a050d(0x14d)])['find'](_0xd3d6f=>_0xd3d6f[_0x1a050d(0x13d)]===_0x5c3e2d[_0x1a050d(0x13d)]))==null?void 0x0:_0x1f504a['root'];if(!_0x4dc926)return;const {unitId:_0x1d86cb,subUnitId:_0x11a20f}=_0x4dc926;switch(_0x5c3e2d[_0x1a050d(0xf2)]&&this[_0x1a050d(0x142)][_0x1a050d(0xd9)](_0x5c3e2d[_0x1a050d(0xf2)]),_0x5c3e2d[_0x1a050d(0xfe)]){case _0x47f367['Add']:break;case _0x47f367['Reply']:{this[_0x1a050d(0xe3)][_0x1a050d(0x145)](_0x1d86cb,_0x11a20f,{'unitId':_0x1d86cb,'subUnitId':_0x11a20f,'ref':'','id':_0x5c3e2d[_0x1a050d(0x123)],'dT':_0x55c580(+_0x5c3e2d['createTimestamp']),'threadId':_0x5c3e2d['threadId'],'personId':(_0x23698b=(_0x2f425a=_0x5c3e2d['user'])==null?void 0x0:_0x2f425a['userID'])!=null?_0x23698b:_0x5c3e2d[_0x1a050d(0x138)],'text':JSON[_0x1a050d(0x13b)](_0x5c3e2d[_0x1a050d(0x10d)]),'parentId':_0x4dc926['id']});break;}case _0x47f367[_0x1a050d(0x10f)]:{const _0x34fdbd=this[_0x1a050d(0xe3)][_0x1a050d(0x139)](_0x1d86cb,_0x11a20f,_0x5c3e2d[_0x1a050d(0x123)]);_0x34fdbd&&_0x34fdbd[_0x1a050d(0x14a)]&&this[_0x1a050d(0xe3)][_0x1a050d(0xd0)](_0x1d86cb,_0x11a20f,_0x5c3e2d[_0x1a050d(0x123)]);break;}case _0x47f367['Edit']:{this[_0x1a050d(0xe3)][_0x1a050d(0xea)](_0x1d86cb,_0x11a20f,{'commentId':_0x5c3e2d['replyId'],'text':JSON[_0x1a050d(0x13b)](_0x5c3e2d[_0x1a050d(0x10d)])});break;}case _0x47f367[_0x1a050d(0x144)]:{const _0x11da34=(_0xb3552=this[_0x1a050d(0xe3)][_0x1a050d(0xc9)](_0x5c3e2d[_0x1a050d(0x14d)])[_0x1a050d(0x143)](_0x51796f=>_0x51796f['threadId']===_0x5c3e2d[_0x1a050d(0x13d)]))==null?void 0x0:_0xb3552[_0x1a050d(0x149)];_0x11da34&&this[_0x1a050d(0xe3)][_0x1a050d(0x134)](_0x1d86cb,_0x11a20f,_0x11da34['id'],_0x5c3e2d['solved']===_0x39bd4b[_0x1a050d(0x114)]);break;}}}));}};_0x4a25b0=_0x7b8758([_0x3f1e5c(0x0,_0x5c9a82[_0x3271bc(0xd4)](_0x239869[_0x3271bc(0xf8)])),_0x3f1e5c(0x1,_0x5c9a82[_0x3271bc(0xd4)](_0x6a4276[_0x3271bc(0x14e)])),_0x3f1e5c(0x2,_0x5c9a82[_0x3271bc(0xd4)](_0x5c9a82[_0x3271bc(0x14b)])),_0x3f1e5c(0x3,_0x5c9a82[_0x3271bc(0xd4)](_0x5c9a82[_0x3271bc(0x105)]))],_0x4a25b0);const _0x1908f6='thread-comment-data-source.config',_0x3a28d0={};var _0x30b371=Object[_0x3271bc(0xc7)],_0x20e111=(_0x5abc25,_0x35a9c2,_0x49a17c,_0x3772f6)=>{const _0x45f99c=_0x3271bc;for(var _0x5b85b5=_0x3772f6>0x1?void 0x0:_0x3772f6?_0x30b371(_0x35a9c2,_0x49a17c):_0x35a9c2,_0x2d0b86=_0x5abc25[_0x45f99c(0xe5)]-0x1,_0x5c50c3;_0x2d0b86>=0x0;_0x2d0b86--)(_0x5c50c3=_0x5abc25[_0x2d0b86])&&(_0x5b85b5=_0x5c50c3(_0x5b85b5)||_0x5b85b5);return _0x5b85b5;},_0x142d77=(_0x5f2d53,_0x5f31fb)=>(_0x416972,_0x1ae9ee)=>_0x5f31fb(_0x416972,_0x1ae9ee,_0x5f2d53);function _0x2a8092(_0x1c6078,_0x3ef35a){const _0x29f466=_0x3271bc,_0x325932=_0x1c6078[_0x29f466(0x121)][0x0];return{..._0x3ef35a,'id':_0x325932['replyId'],'resolved':_0x1c6078[_0x29f466(0x12d)]===0x1,'dT':_0x55c580(_0x325932[_0x29f466(0x10c)]),'personId':_0x325932[_0x29f466(0x138)],'threadId':_0x325932['threadId']};}function _0x2cc8b6(_0x57156b,_0x2f89e5,_0x5b0664){const _0x418ed5=_0x3271bc;var _0x232fe9,_0xe115f7;if(((_0xe115f7=(_0x232fe9=_0x57156b==null?void 0x0:_0x57156b[_0x418ed5(0x121)])==null?void 0x0:_0x232fe9[_0x418ed5(0xe5)])!=null?_0xe115f7:0x0)>0x0){const _0x22d0d5=(_0x528c72,_0x5646b6)=>({'id':_0x528c72[_0x418ed5(0x123)],'threadId':_0x528c72['threadId'],'dT':_0x55c580(_0x528c72[_0x418ed5(0x10c)]),'personId':_0x528c72['userId'],'resolved':_0x57156b[_0x418ed5(0x12d)]===_0x39bd4b['Solved'],'unitId':_0x2f89e5,'subUnitId':_0x5b0664,'text':JSON['parse'](_0x528c72[_0x418ed5(0x10d)]),'parentId':_0x5646b6}),_0xa17b9a=_0x22d0d5(_0x57156b[_0x418ed5(0x121)][0x0]);return{..._0xa17b9a,'children':_0x57156b[_0x418ed5(0x121)]['slice'](0x1)[_0x418ed5(0xcd)](_0x50cd16=>_0x22d0d5(_0x50cd16,_0xa17b9a['id']))};}return null;}let _0x156bbf=class{constructor(_0x3c386d,_0x4d3288,_0x419503){const _0x261889=_0x3271bc;this[_0x261889(0xf5)]=_0x3c386d,this[_0x261889(0x142)]=_0x4d3288,this[_0x261889(0x11b)]=_0x419503;}async['addComment'](_0x42f6d7){const _0x19a092=_0x3271bc;var _0xc4050a,_0x874535;const {parentId:_0x112290,unitId:_0x4e9488,text:_0x197f04,threadId:_0x14f48d}=_0x42f6d7,_0x54a5fe=(_0x874535=(_0xc4050a=_0x197f04['customRanges'])==null?void 0x0:_0xc4050a[_0x19a092(0x110)](_0x992066=>_0x992066[_0x19a092(0xdf)]===_0x5c9a82[_0x19a092(0x103)]['COMMENT'])[_0x19a092(0xcd)](_0x17a798=>_0x17a798['rangeId']))!=null?_0x874535:[],_0xbd8df1=JSON[_0x19a092(0xd6)](_0x197f04),_0x46a64a=(await this['_sessionService'][_0x19a092(0x10a)](_0x4e9488))['getMemberID']();if(_0x112290){const _0x28a776={'memberId':_0x46a64a,'unitId':_0x4e9488,'content':_0xbd8df1,'mention':_0x54a5fe,'threadId':_0x14f48d},_0x5995eb=(await this['_httpService'][_0x19a092(0x107)](_0x19a092(0xda)+_0x4e9488+'/reply',{'body':_0x28a776}))['body']['reply'];return{..._0x42f6d7,'id':_0x5995eb[_0x19a092(0x123)],'dT':_0x5c9a82[_0x19a092(0xce)](+_0x5995eb[_0x19a092(0x10c)])[_0x19a092(0x115)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5995eb[_0x19a092(0x138)]};}else{const _0x5bfbbb={'memberId':_0x46a64a,'unitId':_0x4e9488,'content':_0xbd8df1,'mention':_0x54a5fe},_0x1e1ba9=await this[_0x19a092(0xf5)][_0x19a092(0x107)](_0x19a092(0xda)+_0x4e9488+_0x19a092(0xec),{'body':_0x5bfbbb});return _0x2a8092(_0x1e1ba9[_0x19a092(0xe0)][_0x19a092(0x12a)],_0x42f6d7);}}async[_0x3271bc(0xea)](_0x1b8a01){const _0x179623=_0x3271bc;var _0x3aaf70,_0xb663e2;const {text:_0x2334fd,unitId:_0x1f3843}=_0x1b8a01,_0x38435a=(_0xb663e2=(_0x3aaf70=_0x2334fd['customRanges'])==null?void 0x0:_0x3aaf70[_0x179623(0x110)](_0xc03c3b=>_0xc03c3b[_0x179623(0xdf)]===_0x5c9a82['CustomRangeType'][_0x179623(0xfb)])[_0x179623(0xcd)](_0x4e44ff=>_0x4e44ff[_0x179623(0x102)]))!=null?_0xb663e2:[],_0x11a971=JSON[_0x179623(0xd6)](_0x2334fd),_0x1f6318=_0x1b8a01[_0x179623(0x13d)],_0x41f250=_0x1b8a01['id'],_0x3398d8={'memberId':(await this[_0x179623(0x11b)]['requireSession'](_0x1f3843))[_0x179623(0x13e)](),'unitId':_0x1f3843,'threadId':_0x1f6318,'mention':_0x38435a,'content':_0x11a971,'replyId':_0x41f250},_0x571311=await this['_httpService'][_0x179623(0x107)](_0x179623(0xda)+_0x1f3843+_0x179623(0xe7),{'body':_0x3398d8});return!_0x571311[_0x179623(0xe0)][_0x179623(0x11c)]||_0x571311['body'][_0x179623(0x11c)]['code']===0x1;}async[_0x3271bc(0x134)](_0x53a73b){const _0x7bb84f=_0x3271bc,{unitId:_0x485e55}=_0x53a73b,_0x258fbc=_0x53a73b[_0x7bb84f(0x13d)],_0x15a0fa={'memberId':this[_0x7bb84f(0x142)][_0x7bb84f(0x13f)]()[_0x7bb84f(0x109)],'unitId':_0x485e55,'threadId':_0x258fbc,'solved':_0x53a73b[_0x7bb84f(0xff)]?_0x39bd4b[_0x7bb84f(0x114)]:_0x39bd4b[_0x7bb84f(0x128)]},_0x11751e=await this[_0x7bb84f(0xf5)][_0x7bb84f(0x107)]('/universer-api/comment/unit/'+_0x485e55+_0x7bb84f(0xc8),{'body':_0x15a0fa});return!_0x11751e[_0x7bb84f(0xe0)][_0x7bb84f(0x11c)]||_0x11751e['body'][_0x7bb84f(0x11c)][_0x7bb84f(0xdc)]===0x1;}async['deleteComment'](_0xe8993a,_0x3e2748,_0x2c23a9,_0x2c77bb){const _0x15713b=_0x3271bc,_0x321f47={'memberId':(await this[_0x15713b(0x11b)][_0x15713b(0x10a)](_0xe8993a))[_0x15713b(0x13e)](),'threadId':_0x2c23a9,'replyId':_0x2c77bb,'unitId':_0xe8993a},_0x1536e4=await this['_httpService'][_0x15713b(0x107)](_0x15713b(0xda)+_0xe8993a+_0x15713b(0xe2),{'body':_0x321f47});return!_0x1536e4[_0x15713b(0xe0)][_0x15713b(0x11c)]||_0x1536e4[_0x15713b(0xe0)][_0x15713b(0x11c)]['code']===0x1;}async[_0x3271bc(0x124)](_0x1a13dc,_0x38576f,_0x3d47e9){const _0x32eb4b=_0x3271bc,_0xe29d0a={'unitId':_0x1a13dc,'threadId':_0x3d47e9},_0x42fd1b=await this[_0x32eb4b(0xf5)][_0x32eb4b(0x107)](_0x32eb4b(0xda)+_0x1a13dc+_0x32eb4b(0xee),{'body':_0xe29d0a}),_0x21d62a=_0x3d47e9[_0x32eb4b(0xcd)](_0x4ad537=>_0x2cc8b6(_0x42fd1b[_0x32eb4b(0xe0)][_0x32eb4b(0xe4)][_0x4ad537],_0x1a13dc,_0x38576f))['filter'](Boolean);return Object[_0x32eb4b(0x11d)](_0x42fd1b['body']['users'])['forEach'](_0x99b37b=>{const _0x56f678=_0x32eb4b;this[_0x56f678(0x142)]['addUser'](_0x99b37b);}),_0x21d62a;}[_0x3271bc(0x111)](_0x58e2f9){const _0x90e8a2=_0x3271bc;return{'id':_0x58e2f9['id'],'threadId':_0x58e2f9['threadId'],'ref':_0x58e2f9[_0x90e8a2(0x113)]};}};_0x156bbf=_0x20e111([_0x142d77(0x0,_0x5c9a82[_0x3271bc(0xd4)](_0x1fc00b['HTTPService'])),_0x142d77(0x1,_0x5c9a82[_0x3271bc(0xd4)](_0x5c9a82[_0x3271bc(0x14b)])),_0x142d77(0x2,_0x5c9a82[_0x3271bc(0xd4)](_0x239869[_0x3271bc(0xf1)]))],_0x156bbf);var _0x119a1d=Object[_0x3271bc(0xc7)],_0x254f67=(_0x4b0b82,_0x3860a4,_0x1d7435,_0x42b375)=>{const _0x4b5248=_0x3271bc;for(var _0x24db03=_0x42b375>0x1?void 0x0:_0x42b375?_0x119a1d(_0x3860a4,_0x1d7435):_0x3860a4,_0x4d484d=_0x4b0b82[_0x4b5248(0xe5)]-0x1,_0x3d2e2a;_0x4d484d>=0x0;_0x4d484d--)(_0x3d2e2a=_0x4b0b82[_0x4d484d])&&(_0x24db03=_0x3d2e2a(_0x24db03)||_0x24db03);return _0x24db03;},_0x146329=(_0x5448cf,_0x22deda)=>(_0x9790a8,_0x5b5a68)=>_0x22deda(_0x9790a8,_0x5b5a68,_0x5448cf);let _0x46390e=class extends _0x5c9a82[_0x3271bc(0x12c)]{constructor(_0x21b9f7,_0x5c11e4){const _0x1c5897=_0x3271bc;super(),this[_0x1c5897(0xde)]=_0x21b9f7,this[_0x1c5897(0xfa)]=_0x5c11e4,this['_initDataSource']();}['_initDataSource'](){const _0x27b647=_0x3271bc;this[_0x27b647(0xde)][_0x27b647(0xe6)]=this[_0x27b647(0xfa)],this[_0x27b647(0xde)][_0x27b647(0xdd)]=!0x1;}};_0x46390e=_0x254f67([_0x146329(0x0,_0x6a4276[_0x3271bc(0x130)]),_0x146329(0x1,_0x5c9a82[_0x3271bc(0xd4)](_0x156bbf))],_0x46390e);var _0x52c7fd=Object[_0x3271bc(0x141)],_0x569ddc=Object[_0x3271bc(0xc7)],_0x13b162=(_0x328a16,_0x6cb625,_0x2184bf)=>_0x6cb625 in _0x328a16?_0x52c7fd(_0x328a16,_0x6cb625,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2184bf}):_0x328a16[_0x6cb625]=_0x2184bf,_0x5a3792=(_0x1a999,_0x786dc9,_0x19ec33,_0x295db4)=>{const _0x214d6b=_0x3271bc;for(var _0x519bb9=_0x295db4>0x1?void 0x0:_0x295db4?_0x569ddc(_0x786dc9,_0x19ec33):_0x786dc9,_0x4eea81=_0x1a999[_0x214d6b(0xe5)]-0x1,_0x2bc7bd;_0x4eea81>=0x0;_0x4eea81--)(_0x2bc7bd=_0x1a999[_0x4eea81])&&(_0x519bb9=_0x2bc7bd(_0x519bb9)||_0x519bb9);return _0x519bb9;},_0x5ca1e4=(_0xe5fcc1,_0x12ec80)=>(_0x2726d6,_0x4dc5b3)=>_0x12ec80(_0x2726d6,_0x4dc5b3,_0xe5fcc1),_0x2f01f2=(_0x57b874,_0x1515ef,_0x2a0258)=>_0x13b162(_0x57b874,typeof _0x1515ef!=_0x3271bc(0x112)?_0x1515ef+'':_0x1515ef,_0x2a0258);_0x493579['UniverThreadCommentDataSourcePlugin']=class extends _0x5c9a82['Plugin']{constructor(_0x53ba65=_0x3a28d0,_0x619cf8,_0x4b753c){const _0x1bc88a=_0x3271bc;super(),this[_0x1bc88a(0x116)]=_0x53ba65,this[_0x1bc88a(0xf9)]=_0x619cf8,this['_configService']=_0x4b753c;const {..._0x36c1d1}=_0x5c9a82[_0x1bc88a(0xcc)]({},_0x3a28d0,this[_0x1bc88a(0x116)]);this[_0x1bc88a(0xf0)][_0x1bc88a(0xd1)](_0x1908f6,_0x36c1d1);}[_0x3271bc(0x12f)](){const _0x1c5307=_0x3271bc;[[_0x156bbf],[_0x46390e],[_0x4a25b0]][_0x1c5307(0xd2)](_0x55a126=>{const _0x5e4f62=_0x1c5307;this[_0x5e4f62(0xf9)]['add'](_0x55a126);});}[_0x3271bc(0x137)](){const _0x498ac1=_0x3271bc;this[_0x498ac1(0xf9)]['get'](_0x46390e),this[_0x498ac1(0xf9)][_0x498ac1(0x136)](_0x4a25b0);}},_0x2f01f2(_0x493579['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x404753),_0x2f01f2(_0x493579[_0x3271bc(0x118)],_0x3271bc(0xfe),_0x5c9a82[_0x3271bc(0x129)]['UNIVER_UNKNOWN']),_0x493579[_0x3271bc(0x118)]=_0x5a3792([_0x5c9a82[_0x3271bc(0x135)](_0x153901['UniverThreadCommentUIPlugin'],_0x239869[_0x3271bc(0x14c)],_0x52c6be[_0x3271bc(0x122)]),_0x5ca1e4(0x1,_0x5c9a82['Inject'](_0x5c9a82[_0x3271bc(0x105)])),_0x5ca1e4(0x2,_0x5c9a82[_0x3271bc(0x106)])],_0x493579[_0x3271bc(0x118)]),Object['defineProperty'](_0x493579,Symbol[_0x3271bc(0x101)],{'value':'Module'});}));function _0x7bf0(_0x134e1a,_0x38b42d){_0x134e1a=_0x134e1a-0xc7;const _0x1e7193=_0x1e71();let _0x7bf0e6=_0x1e7193[_0x134e1a];return _0x7bf0e6;}function _0x1e71(){const _0x5d1cfb=['solved','48464TitTzn','onStarting','IThreadCommentDataSourceService','@univerjs/thread-comment-ui','bufferTime','_commentService','resolveComment','DependentOn','get','onReady','userId','getComment','amd','parse','Edit','threadId','getMemberID','getCurrentUser','delete','defineProperty','_userService','find','Solve','addComment','831055xTEehO','add','Add','root','parentId','UserManagerService','UniverCollaborationClientPlugin','unitId','ThreadCommentModel','getOwnPropertyDescriptor','/solved','getUnit','34152URQHoi','_init','merge','map','dayjs','/universer-api/user/list','deleteComment','setConfig','forEach','Unknown','Inject','exports','stringify','rxjs','object','addUser','/universer-api/comment/unit/','63XNCVFD','code','syncUpdateMutationToColla','_threadCommentDataSourceService','rangeType','body','payload','/delete','_threadCommentModel','comments','length','dataSource','/edit','4PfNdzq','1002axIqOC','updateComment','UniverProThreadCommentDatasource','/add','subscribe','/list','@univerjs-pro/collaboration-client','_configService','CollaborationSessionService','user','@univerjs-pro/license','disposeWithMe','_httpService','519673joOLmJ','UniverProCollaborationClient','CommentService','_injector','_threadCommentDataSource','COMMENT','UniverCore','HTTPService','type','resolved','UNRECOGNIZED','toStringTag','rangeId','CustomRangeType','function','Injector','IConfigService','post','Reply','userID','requireSession','YYYY/MM/DD\x20HH:mm','createTimestamp','content','UniverNetwork','Delete','filter','saveCommentToSnapshot','symbol','ref','Solved','format','_config','@univerjs/thread-comment','UniverThreadCommentDataSourcePlugin','184wDRHho','21948XYVBHM','_sessionService','error','values','users','_initUserSync','40040ISdDBl','replies','UniverLicensePlugin','replyId','listComments','pipe','@univerjs/network','commentUpdate$','OpenOrReOpen','UniverInstanceType','comment','getUser','Disposable'];_0x1e71=function(){return _0x5d1cfb;};return _0x1e71();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.15.0",
3
+ "version": "0.15.1-insiders.20260117-8ce4a01",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.15.0",
49
- "@univerjs/network": "0.15.0",
48
+ "@univerjs-pro/collaboration-client": "0.15.1-insiders.20260117-8ce4a01",
49
+ "@univerjs-pro/license": "0.15.1-insiders.20260117-8ce4a01",
50
50
  "@univerjs/protocol": "0.1.48",
51
- "@univerjs/core": "0.15.0",
52
- "@univerjs/thread-comment": "0.15.0",
53
- "@univerjs-pro/license": "0.15.0",
54
- "@univerjs/thread-comment-ui": "0.15.0"
51
+ "@univerjs/core": "0.15.1-insiders.20260117-8ce4a01",
52
+ "@univerjs/network": "0.15.1-insiders.20260117-8ce4a01",
53
+ "@univerjs/thread-comment-ui": "0.15.1-insiders.20260117-8ce4a01",
54
+ "@univerjs/thread-comment": "0.15.1-insiders.20260117-8ce4a01"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.9.3",
59
- "vite": "^7.3.0",
59
+ "vite": "^7.3.1",
60
60
  "vitest": "^4.0.16",
61
- "@univerjs-infra/shared": "0.15.0"
61
+ "@univerjs-infra/shared": "0.15.1"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",