@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202505121607 → 0.7.0-nightly.202505131607

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 _0x1a1030=_0x428a;(function(_0x1ef0fe,_0x546022){const _0x5a031c=_0x428a,_0x50d066=_0x1ef0fe();while(!![]){try{const _0x5f0265=parseInt(_0x5a031c(0x11a))/0x1+-parseInt(_0x5a031c(0x189))/0x2*(parseInt(_0x5a031c(0x161))/0x3)+-parseInt(_0x5a031c(0x17a))/0x4+parseInt(_0x5a031c(0x158))/0x5*(parseInt(_0x5a031c(0x15c))/0x6)+parseInt(_0x5a031c(0x16f))/0x7+parseInt(_0x5a031c(0x125))/0x8+-parseInt(_0x5a031c(0x176))/0x9;if(_0x5f0265===_0x546022)break;else _0x50d066['push'](_0x50d066['shift']());}catch(_0x822738){_0x50d066['push'](_0x50d066['shift']());}}}(_0x4fc6,0x39efd));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x1a1030(0x152)});function _0x4fc6(){const _0x1a853a=['679848rgcKSO','customRanges','updateComment','@univerjs/thread-comment-ui','replyId','/add','UniverLicensePlugin','symbol','comments','Edit','Plugin','/list','_httpService','@univerjs-pro/license','map','333786njOtsi','users','/universer-api/comment/unit/','_commentService','/reply','YYYY/MM/DD\x20HH:mm','Inject','UniverCollaborationClientPlugin','setConfig','Add','personId','deleteComment','commentUpdate$','CommentService','223077NYzbaf','/delete','getCurrentUser','dataSource','_init','IThreadCommentDataSourceService','delete','length','CustomRangeType','UniverThreadCommentDataSourcePlugin','/solved','1789528XErIci','_initUserSync','post','_sessionService','merge','Reply','getUser','getUnit','getMemberID','body','/edit','payload','UserManagerService','UNIVER_UNKNOWN','onStarting','size','onReady','userId','user','add','_initDataSource','rangeId','userID','COMMENT','CollaborationSessionService','stringify','UNRECOGNIZED','_userService','values','_threadCommentDataSource','parse','UniverThreadCommentUIPlugin','pluginName','Unknown','rangeType','find','parentId','OpenOrReOpen','pipe','getOwnPropertyDescriptor','threadId','get','_config','_threadCommentDataSourceService','unitId','Module','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','subscribe','_configService','_threadCommentModel','UniverInstanceType','340XyVvrS','listComments','type','slice','30462aovnMG','ThreadCommentModel','Injector','error','root','3swqxJM','format','code','content','requireSession','disposeWithMe','Solved','solved','Delete','Solve','replies','addComment','HTTPService','filter','654948PpyfRQ','Disposable','@univerjs/network','forEach','createTimestamp','thread-comment-data-source.config','syncUpdateMutationToColla','2802636LVoKaK','resolveComment','_injector','reply'];_0x4fc6=function(){return _0x1a853a;};return _0x4fc6();}const b=require('@univerjs-pro/collaboration-client'),T=require(_0x1a1030(0x187)),c=require('@univerjs/core'),j=require(_0x1a1030(0x17d)),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require(_0x1a1030(0x171)),U=_0x1a1030(0x153);function _0x428a(_0x3229ed,_0x523355){const _0x4fc6f7=_0x4fc6();return _0x428a=function(_0x428a87,_0x30704b){_0x428a87=_0x428a87-0x111;let _0x1ace59=_0x4fc6f7[_0x428a87];return _0x1ace59;},_0x428a(_0x3229ed,_0x523355);}var I=(_0xbbfb20=>(_0xbbfb20[_0xbbfb20[_0x1a1030(0x14a)]=0x0]=_0x1a1030(0x14a),_0xbbfb20[_0xbbfb20[_0x1a1030(0x167)]=0x1]=_0x1a1030(0x167),_0xbbfb20[_0xbbfb20[_0x1a1030(0x13f)]=-0x1]=_0x1a1030(0x13f),_0xbbfb20))(I||{}),v=(_0x29b682=>(_0x29b682[_0x29b682[_0x1a1030(0x146)]=0x0]=_0x1a1030(0x146),_0x29b682[_0x29b682[_0x1a1030(0x115)]=0x1]='Add',_0x29b682[_0x29b682[_0x1a1030(0x12a)]=0x2]=_0x1a1030(0x12a),_0x29b682[_0x29b682['Edit']=0x3]=_0x1a1030(0x183),_0x29b682[_0x29b682[_0x1a1030(0x169)]=0x4]=_0x1a1030(0x169),_0x29b682[_0x29b682[_0x1a1030(0x16a)]=0x5]=_0x1a1030(0x16a),_0x29b682[_0x29b682[_0x1a1030(0x13f)]=-0x1]=_0x1a1030(0x13f),_0x29b682))(v||{});const f=_0x258112=>c['dayjs'](new Date(+_0x258112))[_0x1a1030(0x162)](_0x1a1030(0x111)),R=async(_0x5e95c1,_0x51e35d)=>{const _0x155133=_0x1a1030,_0x2a068b=_0x5e95c1['get'](c[_0x155133(0x131)]),_0x22bb05=_0x5e95c1['get'](P[_0x155133(0x16d)]);_0x51e35d[_0x155133(0x172)](_0x5e5120=>{const _0x4d8740=_0x155133;_0x2a068b[_0x4d8740(0x12b)](_0x5e5120)&&_0x51e35d[_0x4d8740(0x120)](_0x5e5120);}),_0x51e35d[_0x155133(0x134)]&&(await _0x22bb05[_0x155133(0x14e)]('/universer-api/user/list',{'params':{'userIDs':[..._0x51e35d]}}))[_0x155133(0x12e)]['users'][_0x155133(0x172)](_0xbc885b=>{_0xbc885b&&_0x2a068b['addUser'](_0xbc885b);});};var $=Object[_0x1a1030(0x14c)],E=(_0x3d029f,_0x59cbab,_0x4ec347,_0x57c013)=>{const _0x211f10=_0x1a1030;for(var _0x28e789=_0x57c013>0x1?void 0x0:_0x57c013?$(_0x59cbab,_0x4ec347):_0x59cbab,_0x1227c9=_0x3d029f[_0x211f10(0x121)]-0x1,_0x285c4b;_0x1227c9>=0x0;_0x1227c9--)(_0x285c4b=_0x3d029f[_0x1227c9])&&(_0x28e789=_0x285c4b(_0x28e789)||_0x28e789);return _0x28e789;},S=(_0x1bd01e,_0x59671a)=>(_0x38565e,_0x219328)=>_0x59671a(_0x38565e,_0x219328,_0x1bd01e);let p=class extends c[_0x1a1030(0x170)]{constructor(_0x351039,_0x376ccb,_0x46c0fd,_0x366226){const _0xfa981e=_0x1a1030;super(),this[_0xfa981e(0x18c)]=_0x351039,this[_0xfa981e(0x156)]=_0x376ccb,this[_0xfa981e(0x140)]=_0x46c0fd,this[_0xfa981e(0x178)]=_0x366226,this[_0xfa981e(0x11e)](),this[_0xfa981e(0x126)]();}['_initUserSync'](){const _0x414b59=_0x1a1030;this[_0x414b59(0x166)](this[_0x414b59(0x156)][_0x414b59(0x118)][_0x414b59(0x14b)](w['bufferTime'](0x10))[_0x414b59(0x154)](_0x45272d=>{const _0x872a47=_0x414b59,_0x5c6c1f=new Set();_0x45272d[_0x872a47(0x172)](_0x5ac2fa=>{const _0x106ffd=_0x872a47;switch(_0x5ac2fa[_0x106ffd(0x15a)]){case'add':{const _0x3e0d81=_0x5ac2fa[_0x106ffd(0x130)][_0x106ffd(0x116)];_0x5c6c1f[_0x106ffd(0x138)](_0x3e0d81);break;}}}),R(this[_0x872a47(0x178)],_0x5c6c1f);}));}['_init'](){const _0x3ec11d=_0x1a1030;this[_0x3ec11d(0x166)](this[_0x3ec11d(0x18c)][_0x3ec11d(0x118)]['subscribe'](async _0x1a482d=>{const _0x49a30f=_0x3ec11d;var _0x5ecee0,_0x200137,_0x4153da,_0x5f1aa7;const _0x1c3f5e=(_0x5ecee0=this['_threadCommentModel'][_0x49a30f(0x12c)](_0x1a482d['unitId'])[_0x49a30f(0x148)](_0x5f0318=>_0x5f0318['threadId']===_0x1a482d['threadId']))==null?void 0x0:_0x5ecee0[_0x49a30f(0x160)];if(!_0x1c3f5e)return;const {unitId:_0x431db3,subUnitId:_0x5b95c0}=_0x1c3f5e;switch(_0x1a482d['user']&&this[_0x49a30f(0x140)]['addUser'](_0x1a482d['user']),_0x1a482d[_0x49a30f(0x15a)]){case v[_0x49a30f(0x115)]:break;case v[_0x49a30f(0x12a)]:{this[_0x49a30f(0x156)]['addComment'](_0x431db3,_0x5b95c0,{'unitId':_0x431db3,'subUnitId':_0x5b95c0,'ref':'','id':_0x1a482d[_0x49a30f(0x17e)],'dT':f(+_0x1a482d[_0x49a30f(0x173)]),'threadId':_0x1a482d[_0x49a30f(0x14d)],'personId':(_0x4153da=(_0x200137=_0x1a482d[_0x49a30f(0x137)])==null?void 0x0:_0x200137[_0x49a30f(0x13b)])!=null?_0x4153da:_0x1a482d['userId'],'text':JSON[_0x49a30f(0x143)](_0x1a482d[_0x49a30f(0x164)]),'parentId':_0x1c3f5e['id']});break;}case v[_0x49a30f(0x169)]:{const _0x26cb38=this[_0x49a30f(0x156)]['getComment'](_0x431db3,_0x5b95c0,_0x1a482d['replyId']);_0x26cb38&&_0x26cb38[_0x49a30f(0x149)]&&this['_threadCommentModel'][_0x49a30f(0x117)](_0x431db3,_0x5b95c0,_0x1a482d[_0x49a30f(0x17e)]);break;}case v[_0x49a30f(0x183)]:{this[_0x49a30f(0x156)][_0x49a30f(0x17c)](_0x431db3,_0x5b95c0,{'commentId':_0x1a482d[_0x49a30f(0x17e)],'text':JSON[_0x49a30f(0x143)](_0x1a482d[_0x49a30f(0x164)])});break;}case v['Solve']:{const _0x49e35a=(_0x5f1aa7=this['_threadCommentModel'][_0x49a30f(0x12c)](_0x1a482d[_0x49a30f(0x151)])[_0x49a30f(0x148)](_0x5816e6=>_0x5816e6['threadId']===_0x1a482d[_0x49a30f(0x14d)]))==null?void 0x0:_0x5f1aa7['root'];_0x49e35a&&this[_0x49a30f(0x156)][_0x49a30f(0x177)](_0x431db3,_0x5b95c0,_0x49e35a['id'],_0x1a482d['solved']===I['Solved']);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x1a1030(0x119)])),S(0x1,c[_0x1a1030(0x112)](M[_0x1a1030(0x15d)])),S(0x2,c['Inject'](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x1a1030(0x15e)]))],p);const q=_0x1a1030(0x174),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x57248b,_0x319dfc,_0x4a30bc,_0x26519c)=>{const _0x113799=_0x1a1030;for(var _0x387b7f=_0x26519c>0x1?void 0x0:_0x26519c?A(_0x319dfc,_0x4a30bc):_0x319dfc,_0x466d32=_0x57248b[_0x113799(0x121)]-0x1,_0xe28a66;_0x466d32>=0x0;_0x466d32--)(_0xe28a66=_0x57248b[_0x466d32])&&(_0x387b7f=_0xe28a66(_0x387b7f)||_0x387b7f);return _0x387b7f;},_=(_0x1f5a08,_0x4fa508)=>(_0x5be2cc,_0x13125f)=>_0x4fa508(_0x5be2cc,_0x13125f,_0x1f5a08);function Y(_0xd5d793,_0x132761){const _0xa1cdad=_0x1a1030,_0x1ffcc4=_0xd5d793['replies'][0x0];return{..._0x132761,'id':_0x1ffcc4[_0xa1cdad(0x17e)],'resolved':_0xd5d793[_0xa1cdad(0x168)]===0x1,'dT':f(_0x1ffcc4[_0xa1cdad(0x173)]),'personId':_0x1ffcc4['userId'],'threadId':_0x1ffcc4[_0xa1cdad(0x14d)]};}function G(_0x2e1431,_0x3765a4,_0x3cd16f){const _0x201214=_0x1a1030;var _0x2882e4,_0x555baf;if(((_0x555baf=(_0x2882e4=_0x2e1431==null?void 0x0:_0x2e1431[_0x201214(0x16b)])==null?void 0x0:_0x2882e4[_0x201214(0x121)])!=null?_0x555baf:0x0)>0x0){const _0x445995=(_0x52db64,_0x2a6401)=>({'id':_0x52db64[_0x201214(0x17e)],'threadId':_0x52db64[_0x201214(0x14d)],'dT':f(_0x52db64[_0x201214(0x173)]),'personId':_0x52db64[_0x201214(0x136)],'resolved':_0x2e1431[_0x201214(0x168)]===I[_0x201214(0x167)],'unitId':_0x3765a4,'subUnitId':_0x3cd16f,'text':JSON[_0x201214(0x143)](_0x52db64['content']),'parentId':_0x2a6401}),_0x2bc8bd=_0x445995(_0x2e1431['replies'][0x0]);return{..._0x2bc8bd,'children':_0x2e1431[_0x201214(0x16b)][_0x201214(0x15b)](0x1)[_0x201214(0x188)](_0x54a3e0=>_0x445995(_0x54a3e0,_0x2bc8bd['id']))};}return null;}let g=class{constructor(_0x1ef6ba,_0x4d7365,_0x8f38f5,_0x596111){const _0x48454a=_0x1a1030;this[_0x48454a(0x186)]=_0x1ef6ba,this[_0x48454a(0x140)]=_0x4d7365,this[_0x48454a(0x128)]=_0x8f38f5,this[_0x48454a(0x178)]=_0x596111;}async[_0x1a1030(0x16c)](_0x32c25e){const _0x27ada3=_0x1a1030;var _0x16ced3,_0x4d98b7;const {parentId:_0x357084,unitId:_0x4e59f2,text:_0x34df88,threadId:_0x37eed2}=_0x32c25e,_0xc55285=(_0x4d98b7=(_0x16ced3=_0x34df88[_0x27ada3(0x17b)])==null?void 0x0:_0x16ced3['filter'](_0x3a1e5d=>_0x3a1e5d[_0x27ada3(0x147)]===c[_0x27ada3(0x122)][_0x27ada3(0x13c)])['map'](_0x368ae6=>_0x368ae6[_0x27ada3(0x13a)]))!=null?_0x4d98b7:[],_0x2d52be=JSON[_0x27ada3(0x13e)](_0x34df88),_0x42564d=(await this[_0x27ada3(0x128)]['requireSession'](_0x4e59f2))['getMemberID']();if(_0x357084){const _0x29500b={'memberId':_0x42564d,'unitId':_0x4e59f2,'content':_0x2d52be,'mention':_0xc55285,'threadId':_0x37eed2},_0x1a502e=(await this['_httpService'][_0x27ada3(0x127)](_0x27ada3(0x18b)+_0x4e59f2+_0x27ada3(0x18d),{'body':_0x29500b}))[_0x27ada3(0x12e)][_0x27ada3(0x179)];return{..._0x32c25e,'id':_0x1a502e['replyId'],'dT':c['dayjs'](+_0x1a502e[_0x27ada3(0x173)])[_0x27ada3(0x162)](_0x27ada3(0x111)),'personId':_0x1a502e[_0x27ada3(0x136)]};}else{const _0x5e87cd={'memberId':_0x42564d,'unitId':_0x4e59f2,'content':_0x2d52be,'mention':_0xc55285},_0x4f90d2=await this['_httpService'][_0x27ada3(0x127)](_0x27ada3(0x18b)+_0x4e59f2+_0x27ada3(0x17f),{'body':_0x5e87cd});return Y(_0x4f90d2[_0x27ada3(0x12e)]['comment'],_0x32c25e);}}async[_0x1a1030(0x17c)](_0x234d77){const _0xb8cd0e=_0x1a1030;var _0x417bd4,_0x33bbb1;const {text:_0x375892,unitId:_0x104dbd}=_0x234d77,_0x5290fc=(_0x33bbb1=(_0x417bd4=_0x375892[_0xb8cd0e(0x17b)])==null?void 0x0:_0x417bd4[_0xb8cd0e(0x16e)](_0x5bad5b=>_0x5bad5b[_0xb8cd0e(0x147)]===c[_0xb8cd0e(0x122)]['COMMENT'])[_0xb8cd0e(0x188)](_0x197585=>_0x197585[_0xb8cd0e(0x13a)]))!=null?_0x33bbb1:[],_0x287b31=JSON[_0xb8cd0e(0x13e)](_0x375892),_0x2c5d22=_0x234d77['threadId'],_0x7f6c6c=_0x234d77['id'],_0x145fca={'memberId':(await this[_0xb8cd0e(0x128)][_0xb8cd0e(0x165)](_0x104dbd))[_0xb8cd0e(0x12d)](),'unitId':_0x104dbd,'threadId':_0x2c5d22,'mention':_0x5290fc,'content':_0x287b31,'replyId':_0x7f6c6c},_0x3ab238=await this[_0xb8cd0e(0x186)]['post'](_0xb8cd0e(0x18b)+_0x104dbd+_0xb8cd0e(0x12f),{'body':_0x145fca});return!_0x3ab238[_0xb8cd0e(0x12e)]['error']||_0x3ab238[_0xb8cd0e(0x12e)]['error'][_0xb8cd0e(0x163)]===0x1;}async['resolveComment'](_0x57a4aa){const _0x3c7a32=_0x1a1030,{unitId:_0x4fb85d}=_0x57a4aa,_0x5ae9aa=_0x57a4aa[_0x3c7a32(0x14d)],_0xe8dc10={'memberId':this[_0x3c7a32(0x140)][_0x3c7a32(0x11c)]()[_0x3c7a32(0x13b)],'unitId':_0x4fb85d,'threadId':_0x5ae9aa,'solved':_0x57a4aa['resolved']?I[_0x3c7a32(0x167)]:I[_0x3c7a32(0x14a)]},_0x4146b1=await this[_0x3c7a32(0x186)][_0x3c7a32(0x127)](_0x3c7a32(0x18b)+_0x4fb85d+_0x3c7a32(0x124),{'body':_0xe8dc10});return!_0x4146b1['body']['error']||_0x4146b1[_0x3c7a32(0x12e)]['error'][_0x3c7a32(0x163)]===0x1;}async[_0x1a1030(0x117)](_0x264bb3,_0x3d5080,_0xd93d32,_0x547dde){const _0x211657=_0x1a1030,_0x35b179={'memberId':(await this[_0x211657(0x128)][_0x211657(0x165)](_0x264bb3))[_0x211657(0x12d)](),'threadId':_0xd93d32,'replyId':_0x547dde,'unitId':_0x264bb3},_0x95f292=await this[_0x211657(0x186)]['post'](_0x211657(0x18b)+_0x264bb3+_0x211657(0x11b),{'body':_0x35b179});return!_0x95f292[_0x211657(0x12e)][_0x211657(0x15f)]||_0x95f292[_0x211657(0x12e)][_0x211657(0x15f)][_0x211657(0x163)]===0x1;}async[_0x1a1030(0x159)](_0xbc48b6,_0x5dbb41,_0x57e252){const _0x3b7d74=_0x1a1030,_0xeec34={'unitId':_0xbc48b6,'threadId':_0x57e252},_0x5301ef=await this['_httpService'][_0x3b7d74(0x127)](_0x3b7d74(0x18b)+_0xbc48b6+_0x3b7d74(0x185),{'body':_0xeec34}),_0x47ebbb=_0x57e252[_0x3b7d74(0x188)](_0x4a5f4d=>G(_0x5301ef[_0x3b7d74(0x12e)][_0x3b7d74(0x182)][_0x4a5f4d],_0xbc48b6,_0x5dbb41))['filter'](Boolean);return Object[_0x3b7d74(0x141)](_0x5301ef[_0x3b7d74(0x12e)][_0x3b7d74(0x18a)])[_0x3b7d74(0x172)](_0x3be9d7=>{const _0x247a29=_0x3b7d74;this[_0x247a29(0x140)]['addUser'](_0x3be9d7);}),_0x47ebbb;}['saveCommentToSnapshot'](_0x3ac8d9){const _0x205c2b=_0x1a1030;return{'id':_0x3ac8d9['id'],'threadId':_0x3ac8d9[_0x205c2b(0x14d)],'ref':_0x3ac8d9['ref']};}};g=x([_(0x0,c[_0x1a1030(0x112)](P[_0x1a1030(0x16d)])),_(0x1,c[_0x1a1030(0x112)](c['UserManagerService'])),_(0x2,c[_0x1a1030(0x112)](b[_0x1a1030(0x13d)])),_(0x3,c[_0x1a1030(0x112)](c[_0x1a1030(0x15e)]))],g);var H=Object[_0x1a1030(0x14c)],J=(_0xf738dd,_0x1ba1ae,_0x52d6a1,_0x35dfbb)=>{const _0x5f28dd=_0x1a1030;for(var _0x57d8bc=_0x35dfbb>0x1?void 0x0:_0x35dfbb?H(_0x1ba1ae,_0x52d6a1):_0x1ba1ae,_0x39d5a8=_0xf738dd[_0x5f28dd(0x121)]-0x1,_0x212917;_0x39d5a8>=0x0;_0x39d5a8--)(_0x212917=_0xf738dd[_0x39d5a8])&&(_0x57d8bc=_0x212917(_0x57d8bc)||_0x57d8bc);return _0x57d8bc;},y=(_0x4f7cf1,_0x3358e2)=>(_0x4b00f3,_0x5e7695)=>_0x3358e2(_0x4b00f3,_0x5e7695,_0x4f7cf1);let C=class extends c[_0x1a1030(0x170)]{constructor(_0x3880cd,_0x186589){const _0x493847=_0x1a1030;super(),this['_threadCommentDataSourceService']=_0x3880cd,this[_0x493847(0x142)]=_0x186589,this[_0x493847(0x139)]();}[_0x1a1030(0x139)](){const _0x10531c=_0x1a1030;this[_0x10531c(0x150)][_0x10531c(0x11d)]=this[_0x10531c(0x142)],this[_0x10531c(0x150)][_0x10531c(0x175)]=!0x1;}};C=J([y(0x0,M[_0x1a1030(0x11f)]),y(0x1,c['Inject'](g))],C);var F=Object['defineProperty'],L=Object[_0x1a1030(0x14c)],Z=(_0x3305ca,_0x9dbaa3,_0x2953cd)=>_0x9dbaa3 in _0x3305ca?F(_0x3305ca,_0x9dbaa3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2953cd}):_0x3305ca[_0x9dbaa3]=_0x2953cd,W=(_0x3067b3,_0x3a7658,_0x4c8e95,_0x3daf97)=>{const _0x39f9c1=_0x1a1030;for(var _0x49071d=_0x3daf97>0x1?void 0x0:_0x3daf97?L(_0x3a7658,_0x4c8e95):_0x3a7658,_0x391a5a=_0x3067b3[_0x39f9c1(0x121)]-0x1,_0x323bcb;_0x391a5a>=0x0;_0x391a5a--)(_0x323bcb=_0x3067b3[_0x391a5a])&&(_0x49071d=_0x323bcb(_0x49071d)||_0x49071d);return _0x49071d;},O=(_0x4f8101,_0x73850e)=>(_0xebb4fe,_0x4921f9)=>_0x73850e(_0xebb4fe,_0x4921f9,_0x4f8101),N=(_0x2ce280,_0x5e5110,_0x5f1cf6)=>Z(_0x2ce280,typeof _0x5e5110!=_0x1a1030(0x181)?_0x5e5110+'':_0x5e5110,_0x5f1cf6);exports[_0x1a1030(0x123)]=class extends c[_0x1a1030(0x184)]{constructor(_0x479847=D,_0x4cb67b,_0x47dd66){const _0x1307d7=_0x1a1030;super(),this[_0x1307d7(0x14f)]=_0x479847,this[_0x1307d7(0x178)]=_0x4cb67b,this[_0x1307d7(0x155)]=_0x47dd66;const {..._0x2d614a}=c[_0x1307d7(0x129)]({},D,this['_config']);this[_0x1307d7(0x155)][_0x1307d7(0x114)](q,_0x2d614a);}[_0x1a1030(0x133)](){const _0x3564fd=_0x1a1030;[[g],[C],[p]][_0x3564fd(0x172)](_0x28d6b5=>{const _0x10e30d=_0x3564fd;this[_0x10e30d(0x178)][_0x10e30d(0x138)](_0x28d6b5);});}[_0x1a1030(0x135)](){const _0x10699b=_0x1a1030;this['_injector']['get'](C),this['_injector'][_0x10699b(0x14e)](p);}},N(exports[_0x1a1030(0x123)],_0x1a1030(0x145),U),N(exports[_0x1a1030(0x123)],'type',c[_0x1a1030(0x157)][_0x1a1030(0x132)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](j[_0x1a1030(0x144)],b[_0x1a1030(0x113)],T[_0x1a1030(0x180)]),O(0x1,c[_0x1a1030(0x112)](c['Injector'])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';function _0x2c6f(){const _0x275c8a=['pipe','UserManagerService','1165098XMmDSL','_initDataSource','users','/add','/reply','/delete','getOwnPropertyDescriptor','onReady','_commentService','size','thread-comment-data-source.config','replyId','Solved','Inject','find','bufferTime','12VLrnNE','_initUserSync','post','293268IgJwaz','map','Delete','listComments','_threadCommentDataSource','replies','forEach','@univerjs-pro/collaboration-client','_httpService','filter','parse','content','length','Reply','CollaborationSessionService','IConfigService','commentUpdate$','unitId','@univerjs/thread-comment','defineProperty','DependentOn','UniverInstanceType','_sessionService','Injector','/solved','CustomRangeType','userId','YYYY/MM/DD\x20HH:mm','user','symbol','_userService','Disposable','getMemberID','type','customRanges','code','threadId','addComment','_threadCommentDataSourceService','rxjs','updateComment','stringify','toStringTag','saveCommentToSnapshot','@univerjs/network','add','get','1305140OGyfRg','reply','17991coURTN','UNRECOGNIZED','_config','CommentService','24zAeIST','5075497kXWimN','Solve','root','ref','createTimestamp','UNIVER_UNKNOWN','error','delete','dayjs','getUser','HTTPService','UniverCollaborationClientPlugin','body','IThreadCommentDataSourceService','Unknown','_init','UniverThreadCommentDataSourcePlugin','pluginName','disposeWithMe','format','requireSession','@univerjs/core','setConfig','_threadCommentModel','syncUpdateMutationToColla','/universer-api/comment/unit/','Add','@univerjs/thread-comment-ui','rangeId','solved','onStarting','addUser','3440riHWkV','14421710qQMcdW','UniverThreadCommentUIPlugin','COMMENT','subscribe','comment','OpenOrReOpen','comments','44648oJqXCW','rangeType','Edit','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_configService','slice'];_0x2c6f=function(){return _0x275c8a;};return _0x2c6f();}const _0x52d492=_0x5cbb;(function(_0x289697,_0x29d15f){const _0x5c60fd=_0x5cbb,_0x377570=_0x289697();while(!![]){try{const _0x89b301=-parseInt(_0x5c60fd(0xe2))/0x1+parseInt(_0x5c60fd(0xf5))/0x2*(parseInt(_0x5c60fd(0x12a))/0x3)+-parseInt(_0x5c60fd(0x153))/0x4+parseInt(_0x5c60fd(0x124))/0x5*(parseInt(_0x5c60fd(0xf2))/0x6)+parseInt(_0x5c60fd(0x12b))/0x7+-parseInt(_0x5c60fd(0x14b))/0x8*(-parseInt(_0x5c60fd(0x126))/0x9)+-parseInt(_0x5c60fd(0x14c))/0xa;if(_0x89b301===_0x29d15f)break;else _0x377570['push'](_0x377570['shift']());}catch(_0x2415d4){_0x377570['push'](_0x377570['shift']());}}}(_0x2c6f,0xa175a));Object['defineProperty'](exports,Symbol[_0x52d492(0x11f)],{'value':'Module'});const b=require(_0x52d492(0xfc)),T=require('@univerjs-pro/license'),c=require(_0x52d492(0x140)),j=require(_0x52d492(0x146)),M=require(_0x52d492(0x107)),w=require(_0x52d492(0x11c)),P=require(_0x52d492(0x121)),U=_0x52d492(0xdd);var I=(_0x3c323b=>(_0x3c323b[_0x3c323b[_0x52d492(0x151)]=0x0]=_0x52d492(0x151),_0x3c323b[_0x3c323b[_0x52d492(0xee)]=0x1]=_0x52d492(0xee),_0x3c323b[_0x3c323b[_0x52d492(0x127)]=-0x1]='UNRECOGNIZED',_0x3c323b))(I||{}),v=(_0x35857a=>(_0x35857a[_0x35857a[_0x52d492(0x139)]=0x0]=_0x52d492(0x139),_0x35857a[_0x35857a[_0x52d492(0x145)]=0x1]='Add',_0x35857a[_0x35857a[_0x52d492(0x102)]=0x2]='Reply',_0x35857a[_0x35857a[_0x52d492(0xdc)]=0x3]=_0x52d492(0xdc),_0x35857a[_0x35857a['Delete']=0x4]='Delete',_0x35857a[_0x35857a[_0x52d492(0x12c)]=0x5]=_0x52d492(0x12c),_0x35857a[_0x35857a['UNRECOGNIZED']=-0x1]=_0x52d492(0x127),_0x35857a))(v||{});const f=_0x50f58a=>c[_0x52d492(0x133)](new Date(+_0x50f58a))[_0x52d492(0x13e)](_0x52d492(0x110)),R=async(_0x3e4551,_0x2e68a6)=>{const _0x456585=_0x52d492,_0x167d32=_0x3e4551[_0x456585(0x123)](c[_0x456585(0xe1)]),_0xadfbdc=_0x3e4551[_0x456585(0x123)](P[_0x456585(0x135)]);_0x2e68a6[_0x456585(0xfb)](_0x38bc84=>{const _0x10e004=_0x456585;_0x167d32[_0x10e004(0x134)](_0x38bc84)&&_0x2e68a6[_0x10e004(0x132)](_0x38bc84);}),_0x2e68a6[_0x456585(0xeb)]&&(await _0xadfbdc[_0x456585(0x123)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2e68a6]}}))[_0x456585(0x137)][_0x456585(0xe4)]['forEach'](_0x3154f9=>{_0x3154f9&&_0x167d32['addUser'](_0x3154f9);});};var $=Object[_0x52d492(0xe8)],E=(_0x480dc3,_0x378425,_0x31f26d,_0x2d5ed8)=>{for(var _0x3aeaf4=_0x2d5ed8>0x1?void 0x0:_0x2d5ed8?$(_0x378425,_0x31f26d):_0x378425,_0x1b0ee1=_0x480dc3['length']-0x1,_0x262460;_0x1b0ee1>=0x0;_0x1b0ee1--)(_0x262460=_0x480dc3[_0x1b0ee1])&&(_0x3aeaf4=_0x262460(_0x3aeaf4)||_0x3aeaf4);return _0x3aeaf4;},S=(_0x206ed4,_0x24139e)=>(_0x21e656,_0x142334)=>_0x24139e(_0x21e656,_0x142334,_0x206ed4);let p=class extends c[_0x52d492(0x114)]{constructor(_0x54d593,_0x4fe6b8,_0x31c5df,_0x10c478){const _0x5bb7b5=_0x52d492;super(),this['_commentService']=_0x54d593,this[_0x5bb7b5(0x142)]=_0x4fe6b8,this['_userService']=_0x31c5df,this['_injector']=_0x10c478,this['_init'](),this['_initUserSync']();}[_0x52d492(0xf3)](){const _0x5017b7=_0x52d492;this[_0x5017b7(0x13d)](this['_threadCommentModel'][_0x5017b7(0x105)][_0x5017b7(0xe0)](w[_0x5017b7(0xf1)](0x10))[_0x5017b7(0x14f)](_0x3bf1f0=>{const _0x3f711d=_0x5017b7,_0x5b6cce=new Set();_0x3bf1f0[_0x3f711d(0xfb)](_0x4e0b13=>{const _0x3d28dd=_0x3f711d;switch(_0x4e0b13[_0x3d28dd(0x116)]){case _0x3d28dd(0x122):{const _0x3fcd40=_0x4e0b13['payload']['personId'];_0x5b6cce[_0x3d28dd(0x122)](_0x3fcd40);break;}}}),R(this['_injector'],_0x5b6cce);}));}[_0x52d492(0x13a)](){const _0x40bcda=_0x52d492;this['disposeWithMe'](this[_0x40bcda(0xea)]['commentUpdate$']['subscribe'](async _0x33d99d=>{const _0xa038a3=_0x40bcda;var _0x1a211f,_0x462cf9,_0x57fa23,_0x407767;const _0x512956=(_0x1a211f=this[_0xa038a3(0x142)]['getUnit'](_0x33d99d[_0xa038a3(0x106)])[_0xa038a3(0xf0)](_0x2c531e=>_0x2c531e['threadId']===_0x33d99d[_0xa038a3(0x119)]))==null?void 0x0:_0x1a211f[_0xa038a3(0x12d)];if(!_0x512956)return;const {unitId:_0x263c90,subUnitId:_0x3bf227}=_0x512956;switch(_0x33d99d[_0xa038a3(0x111)]&&this[_0xa038a3(0x113)][_0xa038a3(0x14a)](_0x33d99d[_0xa038a3(0x111)]),_0x33d99d[_0xa038a3(0x116)]){case v[_0xa038a3(0x145)]:break;case v['Reply']:{this[_0xa038a3(0x142)][_0xa038a3(0x11a)](_0x263c90,_0x3bf227,{'unitId':_0x263c90,'subUnitId':_0x3bf227,'ref':'','id':_0x33d99d[_0xa038a3(0xed)],'dT':f(+_0x33d99d[_0xa038a3(0x12f)]),'threadId':_0x33d99d['threadId'],'personId':(_0x57fa23=(_0x462cf9=_0x33d99d[_0xa038a3(0x111)])==null?void 0x0:_0x462cf9['userID'])!=null?_0x57fa23:_0x33d99d[_0xa038a3(0x10f)],'text':JSON[_0xa038a3(0xff)](_0x33d99d[_0xa038a3(0x100)]),'parentId':_0x512956['id']});break;}case v[_0xa038a3(0xf7)]:{const _0x25e7a1=this['_threadCommentModel']['getComment'](_0x263c90,_0x3bf227,_0x33d99d[_0xa038a3(0xed)]);_0x25e7a1&&_0x25e7a1['parentId']&&this['_threadCommentModel']['deleteComment'](_0x263c90,_0x3bf227,_0x33d99d[_0xa038a3(0xed)]);break;}case v[_0xa038a3(0xdc)]:{this['_threadCommentModel'][_0xa038a3(0x11d)](_0x263c90,_0x3bf227,{'commentId':_0x33d99d[_0xa038a3(0xed)],'text':JSON[_0xa038a3(0xff)](_0x33d99d['content'])});break;}case v['Solve']:{const _0x563983=(_0x407767=this[_0xa038a3(0x142)]['getUnit'](_0x33d99d[_0xa038a3(0x106)])[_0xa038a3(0xf0)](_0x11df3e=>_0x11df3e[_0xa038a3(0x119)]===_0x33d99d[_0xa038a3(0x119)]))==null?void 0x0:_0x407767['root'];_0x563983&&this[_0xa038a3(0x142)]['resolveComment'](_0x263c90,_0x3bf227,_0x563983['id'],_0x33d99d[_0xa038a3(0x148)]===I[_0xa038a3(0xee)]);break;}}}));}};p=E([S(0x0,c[_0x52d492(0xef)](b[_0x52d492(0x129)])),S(0x1,c[_0x52d492(0xef)](M['ThreadCommentModel'])),S(0x2,c[_0x52d492(0xef)](c['UserManagerService'])),S(0x3,c[_0x52d492(0xef)](c[_0x52d492(0x10c)]))],p);const q=_0x52d492(0xec),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0xfa79dc,_0x527692,_0x4ebdfb,_0x209ca1)=>{for(var _0x210442=_0x209ca1>0x1?void 0x0:_0x209ca1?A(_0x527692,_0x4ebdfb):_0x527692,_0x346fad=_0xfa79dc['length']-0x1,_0x4a2b4d;_0x346fad>=0x0;_0x346fad--)(_0x4a2b4d=_0xfa79dc[_0x346fad])&&(_0x210442=_0x4a2b4d(_0x210442)||_0x210442);return _0x210442;},_=(_0x2e6ebc,_0x5f462e)=>(_0x5f2f53,_0x48d8d4)=>_0x5f462e(_0x5f2f53,_0x48d8d4,_0x2e6ebc);function Y(_0x5c2536,_0x544f3a){const _0x1d8907=_0x52d492,_0x4e9d9d=_0x5c2536[_0x1d8907(0xfa)][0x0];return{..._0x544f3a,'id':_0x4e9d9d[_0x1d8907(0xed)],'resolved':_0x5c2536['solved']===0x1,'dT':f(_0x4e9d9d[_0x1d8907(0x12f)]),'personId':_0x4e9d9d[_0x1d8907(0x10f)],'threadId':_0x4e9d9d[_0x1d8907(0x119)]};}function G(_0x230f90,_0x5259d5,_0x56c241){const _0x42220a=_0x52d492;var _0x4b92a9,_0x2ceb98;if(((_0x2ceb98=(_0x4b92a9=_0x230f90==null?void 0x0:_0x230f90[_0x42220a(0xfa)])==null?void 0x0:_0x4b92a9[_0x42220a(0x101)])!=null?_0x2ceb98:0x0)>0x0){const _0x32f4fb=(_0x5460ec,_0x15b6b4)=>({'id':_0x5460ec[_0x42220a(0xed)],'threadId':_0x5460ec[_0x42220a(0x119)],'dT':f(_0x5460ec[_0x42220a(0x12f)]),'personId':_0x5460ec[_0x42220a(0x10f)],'resolved':_0x230f90[_0x42220a(0x148)]===I[_0x42220a(0xee)],'unitId':_0x5259d5,'subUnitId':_0x56c241,'text':JSON[_0x42220a(0xff)](_0x5460ec[_0x42220a(0x100)]),'parentId':_0x15b6b4}),_0x549642=_0x32f4fb(_0x230f90[_0x42220a(0xfa)][0x0]);return{..._0x549642,'children':_0x230f90[_0x42220a(0xfa)][_0x42220a(0xdf)](0x1)[_0x42220a(0xf6)](_0x2f6215=>_0x32f4fb(_0x2f6215,_0x549642['id']))};}return null;}function _0x5cbb(_0x273ca0,_0x9e87c){const _0x2c6f55=_0x2c6f();return _0x5cbb=function(_0x5cbb59,_0x7ce387){_0x5cbb59=_0x5cbb59-0xdc;let _0x4bb5cb=_0x2c6f55[_0x5cbb59];return _0x4bb5cb;},_0x5cbb(_0x273ca0,_0x9e87c);}let g=class{constructor(_0x56b0b8,_0x3176e3,_0x5927e8,_0x3b23de){const _0x242b20=_0x52d492;this[_0x242b20(0xfd)]=_0x56b0b8,this['_userService']=_0x3176e3,this[_0x242b20(0x10b)]=_0x5927e8,this['_injector']=_0x3b23de;}async[_0x52d492(0x11a)](_0x4f24fa){const _0x3ee37f=_0x52d492;var _0x1a5991,_0x222131;const {parentId:_0x2b1dbb,unitId:_0x2e625d,text:_0x5538cb,threadId:_0x1699b0}=_0x4f24fa,_0x4ed9d9=(_0x222131=(_0x1a5991=_0x5538cb[_0x3ee37f(0x117)])==null?void 0x0:_0x1a5991[_0x3ee37f(0xfe)](_0x193cad=>_0x193cad['rangeType']===c[_0x3ee37f(0x10e)][_0x3ee37f(0x14e)])[_0x3ee37f(0xf6)](_0xd62db4=>_0xd62db4[_0x3ee37f(0x147)]))!=null?_0x222131:[],_0xd042b6=JSON['stringify'](_0x5538cb),_0x3b0f9b=(await this[_0x3ee37f(0x10b)][_0x3ee37f(0x13f)](_0x2e625d))[_0x3ee37f(0x115)]();if(_0x2b1dbb){const _0x1c6640={'memberId':_0x3b0f9b,'unitId':_0x2e625d,'content':_0xd042b6,'mention':_0x4ed9d9,'threadId':_0x1699b0},_0x27b720=(await this[_0x3ee37f(0xfd)][_0x3ee37f(0xf4)]('/universer-api/comment/unit/'+_0x2e625d+_0x3ee37f(0xe6),{'body':_0x1c6640}))[_0x3ee37f(0x137)][_0x3ee37f(0x125)];return{..._0x4f24fa,'id':_0x27b720['replyId'],'dT':c[_0x3ee37f(0x133)](+_0x27b720['createTimestamp'])[_0x3ee37f(0x13e)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x27b720[_0x3ee37f(0x10f)]};}else{const _0x45fde2={'memberId':_0x3b0f9b,'unitId':_0x2e625d,'content':_0xd042b6,'mention':_0x4ed9d9},_0x177768=await this[_0x3ee37f(0xfd)][_0x3ee37f(0xf4)](_0x3ee37f(0x144)+_0x2e625d+_0x3ee37f(0xe5),{'body':_0x45fde2});return Y(_0x177768['body'][_0x3ee37f(0x150)],_0x4f24fa);}}async[_0x52d492(0x11d)](_0x496874){const _0xe9378=_0x52d492;var _0x84af71,_0x218cb9;const {text:_0xd733ef,unitId:_0x553b79}=_0x496874,_0x34608b=(_0x218cb9=(_0x84af71=_0xd733ef['customRanges'])==null?void 0x0:_0x84af71['filter'](_0x3965ff=>_0x3965ff[_0xe9378(0x154)]===c[_0xe9378(0x10e)]['COMMENT'])[_0xe9378(0xf6)](_0x4365b5=>_0x4365b5['rangeId']))!=null?_0x218cb9:[],_0x180480=JSON[_0xe9378(0x11e)](_0xd733ef),_0x90c881=_0x496874[_0xe9378(0x119)],_0x2b6d9e=_0x496874['id'],_0x21b491={'memberId':(await this['_sessionService'][_0xe9378(0x13f)](_0x553b79))['getMemberID'](),'unitId':_0x553b79,'threadId':_0x90c881,'mention':_0x34608b,'content':_0x180480,'replyId':_0x2b6d9e},_0x222471=await this['_httpService']['post'](_0xe9378(0x144)+_0x553b79+'/edit',{'body':_0x21b491});return!_0x222471[_0xe9378(0x137)]['error']||_0x222471[_0xe9378(0x137)][_0xe9378(0x131)]['code']===0x1;}async['resolveComment'](_0x245a9d){const _0x1c2749=_0x52d492,{unitId:_0x3b3785}=_0x245a9d,_0x7ebe1a=_0x245a9d[_0x1c2749(0x119)],_0x17179e={'memberId':this[_0x1c2749(0x113)]['getCurrentUser']()['userID'],'unitId':_0x3b3785,'threadId':_0x7ebe1a,'solved':_0x245a9d['resolved']?I[_0x1c2749(0xee)]:I[_0x1c2749(0x151)]},_0x27c567=await this[_0x1c2749(0xfd)][_0x1c2749(0xf4)](_0x1c2749(0x144)+_0x3b3785+_0x1c2749(0x10d),{'body':_0x17179e});return!_0x27c567[_0x1c2749(0x137)][_0x1c2749(0x131)]||_0x27c567[_0x1c2749(0x137)][_0x1c2749(0x131)][_0x1c2749(0x118)]===0x1;}async['deleteComment'](_0x5d4ff0,_0x265a85,_0x26f52f,_0x5b1e79){const _0x310660=_0x52d492,_0x57baba={'memberId':(await this[_0x310660(0x10b)]['requireSession'](_0x5d4ff0))[_0x310660(0x115)](),'threadId':_0x26f52f,'replyId':_0x5b1e79,'unitId':_0x5d4ff0},_0x547379=await this[_0x310660(0xfd)][_0x310660(0xf4)](_0x310660(0x144)+_0x5d4ff0+_0x310660(0xe7),{'body':_0x57baba});return!_0x547379['body']['error']||_0x547379['body'][_0x310660(0x131)][_0x310660(0x118)]===0x1;}async[_0x52d492(0xf8)](_0x4678a3,_0xa9b060,_0x38662c){const _0x4ed5f5=_0x52d492,_0x5e896e={'unitId':_0x4678a3,'threadId':_0x38662c},_0x47168d=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x4678a3+'/list',{'body':_0x5e896e}),_0x55f7a6=_0x38662c[_0x4ed5f5(0xf6)](_0x1419c2=>G(_0x47168d[_0x4ed5f5(0x137)][_0x4ed5f5(0x152)][_0x1419c2],_0x4678a3,_0xa9b060))[_0x4ed5f5(0xfe)](Boolean);return Object['values'](_0x47168d[_0x4ed5f5(0x137)][_0x4ed5f5(0xe4)])['forEach'](_0x3ea75a=>{const _0xc17e7a=_0x4ed5f5;this[_0xc17e7a(0x113)][_0xc17e7a(0x14a)](_0x3ea75a);}),_0x55f7a6;}[_0x52d492(0x120)](_0x21e1d5){const _0x2ba870=_0x52d492;return{'id':_0x21e1d5['id'],'threadId':_0x21e1d5[_0x2ba870(0x119)],'ref':_0x21e1d5[_0x2ba870(0x12e)]};}};g=x([_(0x0,c[_0x52d492(0xef)](P[_0x52d492(0x135)])),_(0x1,c[_0x52d492(0xef)](c[_0x52d492(0xe1)])),_(0x2,c[_0x52d492(0xef)](b[_0x52d492(0x103)])),_(0x3,c['Inject'](c[_0x52d492(0x10c)]))],g);var H=Object[_0x52d492(0xe8)],J=(_0x1209ae,_0x152d5d,_0x32e88b,_0x1c0f8f)=>{const _0x242148=_0x52d492;for(var _0x5c233d=_0x1c0f8f>0x1?void 0x0:_0x1c0f8f?H(_0x152d5d,_0x32e88b):_0x152d5d,_0x4a5440=_0x1209ae[_0x242148(0x101)]-0x1,_0x24738d;_0x4a5440>=0x0;_0x4a5440--)(_0x24738d=_0x1209ae[_0x4a5440])&&(_0x5c233d=_0x24738d(_0x5c233d)||_0x5c233d);return _0x5c233d;},y=(_0x17a926,_0x40c1f8)=>(_0x2916d8,_0x2d52d4)=>_0x40c1f8(_0x2916d8,_0x2d52d4,_0x17a926);let C=class extends c[_0x52d492(0x114)]{constructor(_0x5bb3e5,_0x2e2c7d){const _0x4dfa64=_0x52d492;super(),this[_0x4dfa64(0x11b)]=_0x5bb3e5,this[_0x4dfa64(0xf9)]=_0x2e2c7d,this[_0x4dfa64(0xe3)]();}['_initDataSource'](){const _0x13057c=_0x52d492;this[_0x13057c(0x11b)]['dataSource']=this[_0x13057c(0xf9)],this[_0x13057c(0x11b)][_0x13057c(0x143)]=!0x1;}};C=J([y(0x0,M[_0x52d492(0x138)]),y(0x1,c[_0x52d492(0xef)](g))],C);var F=Object[_0x52d492(0x108)],L=Object[_0x52d492(0xe8)],Z=(_0x2e9e8e,_0x1f3053,_0x135968)=>_0x1f3053 in _0x2e9e8e?F(_0x2e9e8e,_0x1f3053,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x135968}):_0x2e9e8e[_0x1f3053]=_0x135968,W=(_0x389f31,_0x3cf823,_0x5983d9,_0xf80b0d)=>{const _0x1f9a62=_0x52d492;for(var _0x463b88=_0xf80b0d>0x1?void 0x0:_0xf80b0d?L(_0x3cf823,_0x5983d9):_0x3cf823,_0x539e76=_0x389f31[_0x1f9a62(0x101)]-0x1,_0x52f355;_0x539e76>=0x0;_0x539e76--)(_0x52f355=_0x389f31[_0x539e76])&&(_0x463b88=_0x52f355(_0x463b88)||_0x463b88);return _0x463b88;},O=(_0x5970b7,_0x42492c)=>(_0xe041dc,_0x484066)=>_0x42492c(_0xe041dc,_0x484066,_0x5970b7),N=(_0x436571,_0x257778,_0x36954c)=>Z(_0x436571,typeof _0x257778!=_0x52d492(0x112)?_0x257778+'':_0x257778,_0x36954c);exports['UniverThreadCommentDataSourcePlugin']=class extends c['Plugin']{constructor(_0x3c9009=D,_0x28b657,_0x44cd1c){const _0x5bc01f=_0x52d492;super(),this[_0x5bc01f(0x128)]=_0x3c9009,this['_injector']=_0x28b657,this[_0x5bc01f(0xde)]=_0x44cd1c;const {..._0x36046e}=c['merge']({},D,this[_0x5bc01f(0x128)]);this[_0x5bc01f(0xde)][_0x5bc01f(0x141)](q,_0x36046e);}[_0x52d492(0x149)](){const _0x3bd074=_0x52d492;[[g],[C],[p]][_0x3bd074(0xfb)](_0x17ac63=>{const _0x58ee54=_0x3bd074;this['_injector'][_0x58ee54(0x122)](_0x17ac63);});}[_0x52d492(0xe9)](){const _0xc2bdf=_0x52d492;this['_injector'][_0xc2bdf(0x123)](C),this['_injector']['get'](p);}},N(exports[_0x52d492(0x13b)],_0x52d492(0x13c),U),N(exports[_0x52d492(0x13b)],_0x52d492(0x116),c[_0x52d492(0x10a)][_0x52d492(0x130)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x52d492(0x109)](j[_0x52d492(0x14d)],b[_0x52d492(0x136)],T['UniverLicensePlugin']),O(0x1,c[_0x52d492(0xef)](c['Injector'])),O(0x2,c[_0x52d492(0x104)])],exports[_0x52d492(0x13b)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x597f96=_0x5f55;(function(_0x299bf7,_0x2b77b8){const _0x5b4259=_0x5f55,_0x21cc96=_0x299bf7();while(!![]){try{const _0x397444=parseInt(_0x5b4259(0x172))/0x1*(parseInt(_0x5b4259(0x16f))/0x2)+parseInt(_0x5b4259(0x194))/0x3*(-parseInt(_0x5b4259(0x17c))/0x4)+-parseInt(_0x5b4259(0x164))/0x5+parseInt(_0x5b4259(0x14b))/0x6*(parseInt(_0x5b4259(0x15b))/0x7)+-parseInt(_0x5b4259(0x16c))/0x8*(parseInt(_0x5b4259(0x16d))/0x9)+parseInt(_0x5b4259(0x186))/0xa*(parseInt(_0x5b4259(0x184))/0xb)+parseInt(_0x5b4259(0x19e))/0xc;if(_0x397444===_0x2b77b8)break;else _0x21cc96['push'](_0x21cc96['shift']());}catch(_0x418b09){_0x21cc96['push'](_0x21cc96['shift']());}}}(_0x35bf,0x23011));import{CommentService as _0x870a6e,CollaborationSessionService as _0x32baf8,UniverCollaborationClientPlugin as _0x53a35a}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5b5c78}from'@univerjs-pro/license';import{dayjs as _0x3a4c00,UserManagerService as _0x5eb8f1,Inject as _0x3319bd,Injector as _0x2a9806,Disposable as _0x4b16b4,CustomRangeType as _0xc9d637,UniverInstanceType as _0x2a8601,DependentOn as _0x32eefa,IConfigService as _0x2dc9fb,Plugin as _0x2469e2,merge as _0x4f5a3a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1d2348}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xa098e9,IThreadCommentDataSourceService as _0x524bce}from'@univerjs/thread-comment';import{bufferTime as _0x55f664}from'rxjs';import{HTTPService as _0xeee792}from'@univerjs/network';function _0x35bf(){const _0x340636=['map','createTimestamp','_commentService','add','forEach','content','926710TcxCXI','user','getComment','_sessionService','get','/solved','post','code','48376uaZsJd','9EVZyoq','slice','183970KYbNiI','size','_userService','1PmjoYO','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/reply','COMMENT','delete','deleteComment','/list','stringify','customRanges','root','4aNwqoT','OpenOrReOpen','_config','comment','personId','error','getUnit','Reply','96613aFNbfN','Solve','20zmhijx','thread-comment-data-source.config','users','_threadCommentDataSource','parse','defineProperty','_initDataSource','addUser','userId','/universer-api/comment/unit/','disposeWithMe','type','/add','rangeId','127989fZcHHY','filter','listComments','format','_injector','_configService','Add','pipe','solved','replies','2375436jNmUbt','parentId','Delete','Edit','resolveComment','getMemberID','threadId','length','/delete','Unknown','userID','subscribe','_httpService','commentUpdate$','/edit','419550sMPSZJ','requireSession','resolved','UNRECOGNIZED','replyId','saveCommentToSnapshot','_threadCommentDataSourceService','body','_init','YYYY/MM/DD\x20HH:mm','setConfig','_threadCommentModel','symbol','Solved','values','getOwnPropertyDescriptor','7wjJgVf','unitId','_initUserSync'];_0x35bf=function(){return _0x340636;};return _0x35bf();}const W=_0x597f96(0x173);function _0x5f55(_0x4e0e0a,_0x7c0f12){const _0x35bfd2=_0x35bf();return _0x5f55=function(_0x5f554e,_0x4591eb){_0x5f554e=_0x5f554e-0x148;let _0x27154a=_0x35bfd2[_0x5f554e];return _0x27154a;},_0x5f55(_0x4e0e0a,_0x7c0f12);}var I=(_0xb883fe=>(_0xb883fe[_0xb883fe[_0x597f96(0x17d)]=0x0]=_0x597f96(0x17d),_0xb883fe[_0xb883fe[_0x597f96(0x158)]=0x1]=_0x597f96(0x158),_0xb883fe[_0xb883fe[_0x597f96(0x14e)]=-0x1]=_0x597f96(0x14e),_0xb883fe))(I||{}),v=(_0x1e09c6=>(_0x1e09c6[_0x1e09c6[_0x597f96(0x1a7)]=0x0]=_0x597f96(0x1a7),_0x1e09c6[_0x1e09c6[_0x597f96(0x19a)]=0x1]=_0x597f96(0x19a),_0x1e09c6[_0x1e09c6[_0x597f96(0x183)]=0x2]=_0x597f96(0x183),_0x1e09c6[_0x1e09c6[_0x597f96(0x1a1)]=0x3]=_0x597f96(0x1a1),_0x1e09c6[_0x1e09c6[_0x597f96(0x1a0)]=0x4]=_0x597f96(0x1a0),_0x1e09c6[_0x1e09c6['Solve']=0x5]=_0x597f96(0x185),_0x1e09c6[_0x1e09c6[_0x597f96(0x14e)]=-0x1]=_0x597f96(0x14e),_0x1e09c6))(v||{});const D=_0x3591a0=>_0x3a4c00(new Date(+_0x3591a0))[_0x597f96(0x197)](_0x597f96(0x154)),B=async(_0x42e457,_0x30674a)=>{const _0x473a52=_0x597f96,_0x5869a7=_0x42e457[_0x473a52(0x168)](_0x5eb8f1),_0x26300c=_0x42e457['get'](_0xeee792);_0x30674a[_0x473a52(0x162)](_0x5caa43=>{const _0x3829c8=_0x473a52;_0x5869a7['getUser'](_0x5caa43)&&_0x30674a[_0x3829c8(0x176)](_0x5caa43);}),_0x30674a[_0x473a52(0x170)]&&(await _0x26300c['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x30674a]}}))[_0x473a52(0x152)][_0x473a52(0x188)][_0x473a52(0x162)](_0x32b78c=>{const _0xc10422=_0x473a52;_0x32b78c&&_0x5869a7[_0xc10422(0x18d)](_0x32b78c);});};var K=Object[_0x597f96(0x15a)],V=(_0x285199,_0x568b53,_0x17f0ff,_0x62f402)=>{const _0x2f26d5=_0x597f96;for(var _0xd2c762=_0x62f402>0x1?void 0x0:_0x62f402?K(_0x568b53,_0x17f0ff):_0x568b53,_0x1e654d=_0x285199[_0x2f26d5(0x1a5)]-0x1,_0x4d2e64;_0x1e654d>=0x0;_0x1e654d--)(_0x4d2e64=_0x285199[_0x1e654d])&&(_0xd2c762=_0x4d2e64(_0xd2c762)||_0xd2c762);return _0xd2c762;},p=(_0x31ed3b,_0x137a6c)=>(_0x22ef5c,_0x58feb4)=>_0x137a6c(_0x22ef5c,_0x58feb4,_0x31ed3b);let S=class extends _0x4b16b4{constructor(_0x43c20b,_0xf30329,_0x6c99d3,_0x56d514){const _0x40841b=_0x597f96;super(),this[_0x40841b(0x160)]=_0x43c20b,this[_0x40841b(0x156)]=_0xf30329,this[_0x40841b(0x171)]=_0x6c99d3,this['_injector']=_0x56d514,this[_0x40841b(0x153)](),this[_0x40841b(0x15d)]();}[_0x597f96(0x15d)](){const _0xa79a10=_0x597f96;this[_0xa79a10(0x190)](this['_threadCommentModel']['commentUpdate$'][_0xa79a10(0x19b)](_0x55f664(0x10))[_0xa79a10(0x1a9)](_0x2f0b64=>{const _0x55dd1d=_0xa79a10,_0x10ddd1=new Set();_0x2f0b64['forEach'](_0x110dcf=>{const _0x3ac234=_0x5f55;switch(_0x110dcf[_0x3ac234(0x191)]){case'add':{const _0x499f8a=_0x110dcf['payload'][_0x3ac234(0x180)];_0x10ddd1[_0x3ac234(0x161)](_0x499f8a);break;}}}),B(this[_0x55dd1d(0x198)],_0x10ddd1);}));}[_0x597f96(0x153)](){const _0x3d182b=_0x597f96;this[_0x3d182b(0x190)](this[_0x3d182b(0x160)][_0x3d182b(0x149)][_0x3d182b(0x1a9)](async _0x16063c=>{const _0x144ffe=_0x3d182b;var _0x3ce913,_0x414d9f,_0x517bbb,_0x4c2310;const _0x127d08=(_0x3ce913=this['_threadCommentModel'][_0x144ffe(0x182)](_0x16063c['unitId'])['find'](_0x70efa8=>_0x70efa8['threadId']===_0x16063c['threadId']))==null?void 0x0:_0x3ce913['root'];if(!_0x127d08)return;const {unitId:_0x38dcef,subUnitId:_0x4519bc}=_0x127d08;switch(_0x16063c[_0x144ffe(0x165)]&&this['_userService'][_0x144ffe(0x18d)](_0x16063c[_0x144ffe(0x165)]),_0x16063c['type']){case v[_0x144ffe(0x19a)]:break;case v[_0x144ffe(0x183)]:{this[_0x144ffe(0x156)]['addComment'](_0x38dcef,_0x4519bc,{'unitId':_0x38dcef,'subUnitId':_0x4519bc,'ref':'','id':_0x16063c[_0x144ffe(0x14f)],'dT':D(+_0x16063c[_0x144ffe(0x15f)]),'threadId':_0x16063c['threadId'],'personId':(_0x517bbb=(_0x414d9f=_0x16063c['user'])==null?void 0x0:_0x414d9f[_0x144ffe(0x1a8)])!=null?_0x517bbb:_0x16063c[_0x144ffe(0x18e)],'text':JSON[_0x144ffe(0x18a)](_0x16063c[_0x144ffe(0x163)]),'parentId':_0x127d08['id']});break;}case v['Delete']:{const _0x3c14f8=this[_0x144ffe(0x156)][_0x144ffe(0x166)](_0x38dcef,_0x4519bc,_0x16063c[_0x144ffe(0x14f)]);_0x3c14f8&&_0x3c14f8[_0x144ffe(0x19f)]&&this['_threadCommentModel'][_0x144ffe(0x177)](_0x38dcef,_0x4519bc,_0x16063c[_0x144ffe(0x14f)]);break;}case v['Edit']:{this['_threadCommentModel']['updateComment'](_0x38dcef,_0x4519bc,{'commentId':_0x16063c['replyId'],'text':JSON['parse'](_0x16063c[_0x144ffe(0x163)])});break;}case v[_0x144ffe(0x185)]:{const _0x46e105=(_0x4c2310=this['_threadCommentModel'][_0x144ffe(0x182)](_0x16063c[_0x144ffe(0x15c)])['find'](_0x140f7e=>_0x140f7e[_0x144ffe(0x1a4)]===_0x16063c['threadId']))==null?void 0x0:_0x4c2310[_0x144ffe(0x17b)];_0x46e105&&this[_0x144ffe(0x156)]['resolveComment'](_0x38dcef,_0x4519bc,_0x46e105['id'],_0x16063c[_0x144ffe(0x19c)]===I[_0x144ffe(0x158)]);break;}}}));}};S=V([p(0x0,_0x3319bd(_0x870a6e)),p(0x1,_0x3319bd(_0xa098e9)),p(0x2,_0x3319bd(_0x5eb8f1)),p(0x3,_0x3319bd(_0x2a9806))],S);const z=_0x597f96(0x187),M={};var k=Object[_0x597f96(0x15a)],Q=(_0x10532d,_0x59c67e,_0x9c1fe6,_0x543e0b)=>{const _0x2a5bb0=_0x597f96;for(var _0x582c49=_0x543e0b>0x1?void 0x0:_0x543e0b?k(_0x59c67e,_0x9c1fe6):_0x59c67e,_0x52b088=_0x10532d[_0x2a5bb0(0x1a5)]-0x1,_0x558edf;_0x52b088>=0x0;_0x52b088--)(_0x558edf=_0x10532d[_0x52b088])&&(_0x582c49=_0x558edf(_0x582c49)||_0x582c49);return _0x582c49;},_=(_0xde9a76,_0x300404)=>(_0x2f5898,_0x226a7d)=>_0x300404(_0x2f5898,_0x226a7d,_0xde9a76);function X(_0xe3fd93,_0x5f0ac8){const _0x3a4758=_0x597f96,_0x212ad5=_0xe3fd93[_0x3a4758(0x19d)][0x0];return{..._0x5f0ac8,'id':_0x212ad5[_0x3a4758(0x14f)],'resolved':_0xe3fd93[_0x3a4758(0x19c)]===0x1,'dT':D(_0x212ad5[_0x3a4758(0x15f)]),'personId':_0x212ad5['userId'],'threadId':_0x212ad5['threadId']};}function ee(_0x18d791,_0x44d536,_0x55dc40){const _0x3aea06=_0x597f96;var _0x231397,_0x1c43da;if(((_0x1c43da=(_0x231397=_0x18d791==null?void 0x0:_0x18d791[_0x3aea06(0x19d)])==null?void 0x0:_0x231397[_0x3aea06(0x1a5)])!=null?_0x1c43da:0x0)>0x0){const _0x2d5661=(_0x4a6db1,_0xb98591)=>({'id':_0x4a6db1[_0x3aea06(0x14f)],'threadId':_0x4a6db1[_0x3aea06(0x1a4)],'dT':D(_0x4a6db1[_0x3aea06(0x15f)]),'personId':_0x4a6db1[_0x3aea06(0x18e)],'resolved':_0x18d791[_0x3aea06(0x19c)]===I[_0x3aea06(0x158)],'unitId':_0x44d536,'subUnitId':_0x55dc40,'text':JSON[_0x3aea06(0x18a)](_0x4a6db1[_0x3aea06(0x163)]),'parentId':_0xb98591}),_0x206aa8=_0x2d5661(_0x18d791[_0x3aea06(0x19d)][0x0]);return{..._0x206aa8,'children':_0x18d791[_0x3aea06(0x19d)][_0x3aea06(0x16e)](0x1)[_0x3aea06(0x15e)](_0x44bdf9=>_0x2d5661(_0x44bdf9,_0x206aa8['id']))};}return null;}let f=class{constructor(_0x30794d,_0x280658,_0x194daa,_0x463807){const _0x338733=_0x597f96;this[_0x338733(0x148)]=_0x30794d,this[_0x338733(0x171)]=_0x280658,this[_0x338733(0x167)]=_0x194daa,this['_injector']=_0x463807;}async['addComment'](_0x5d8f4d){const _0x2ac765=_0x597f96;var _0x3219c4,_0x3bdaca;const {parentId:_0x25d9dd,unitId:_0x5dcb58,text:_0x217d9b,threadId:_0x6f770b}=_0x5d8f4d,_0x2a4e4c=(_0x3bdaca=(_0x3219c4=_0x217d9b['customRanges'])==null?void 0x0:_0x3219c4[_0x2ac765(0x195)](_0x2872c9=>_0x2872c9['rangeType']===_0xc9d637[_0x2ac765(0x175)])[_0x2ac765(0x15e)](_0x427f35=>_0x427f35[_0x2ac765(0x193)]))!=null?_0x3bdaca:[],_0x11c187=JSON[_0x2ac765(0x179)](_0x217d9b),_0x6d173d=(await this[_0x2ac765(0x167)]['requireSession'](_0x5dcb58))[_0x2ac765(0x1a3)]();if(_0x25d9dd){const _0x4fb426={'memberId':_0x6d173d,'unitId':_0x5dcb58,'content':_0x11c187,'mention':_0x2a4e4c,'threadId':_0x6f770b},_0x4c0835=(await this[_0x2ac765(0x148)][_0x2ac765(0x16a)](_0x2ac765(0x18f)+_0x5dcb58+_0x2ac765(0x174),{'body':_0x4fb426}))['body']['reply'];return{..._0x5d8f4d,'id':_0x4c0835['replyId'],'dT':_0x3a4c00(+_0x4c0835[_0x2ac765(0x15f)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x4c0835[_0x2ac765(0x18e)]};}else{const _0x22181d={'memberId':_0x6d173d,'unitId':_0x5dcb58,'content':_0x11c187,'mention':_0x2a4e4c},_0xd465d5=await this[_0x2ac765(0x148)]['post'](_0x2ac765(0x18f)+_0x5dcb58+_0x2ac765(0x192),{'body':_0x22181d});return X(_0xd465d5['body'][_0x2ac765(0x17f)],_0x5d8f4d);}}async['updateComment'](_0x286a9b){const _0x420817=_0x597f96;var _0x34c9a7,_0x4b3f4e;const {text:_0x3a8bc7,unitId:_0x4aeadd}=_0x286a9b,_0x107907=(_0x4b3f4e=(_0x34c9a7=_0x3a8bc7[_0x420817(0x17a)])==null?void 0x0:_0x34c9a7['filter'](_0x21e0d0=>_0x21e0d0['rangeType']===_0xc9d637[_0x420817(0x175)])[_0x420817(0x15e)](_0x2f6d3a=>_0x2f6d3a[_0x420817(0x193)]))!=null?_0x4b3f4e:[],_0x517a57=JSON[_0x420817(0x179)](_0x3a8bc7),_0x12241f=_0x286a9b[_0x420817(0x1a4)],_0x3d6cb6=_0x286a9b['id'],_0x43f11f={'memberId':(await this[_0x420817(0x167)][_0x420817(0x14c)](_0x4aeadd))['getMemberID'](),'unitId':_0x4aeadd,'threadId':_0x12241f,'mention':_0x107907,'content':_0x517a57,'replyId':_0x3d6cb6},_0x10ae1d=await this[_0x420817(0x148)][_0x420817(0x16a)]('/universer-api/comment/unit/'+_0x4aeadd+_0x420817(0x14a),{'body':_0x43f11f});return!_0x10ae1d[_0x420817(0x152)]['error']||_0x10ae1d[_0x420817(0x152)][_0x420817(0x181)][_0x420817(0x16b)]===0x1;}async[_0x597f96(0x1a2)](_0x2cf37d){const _0x384a16=_0x597f96,{unitId:_0x483f2a}=_0x2cf37d,_0x10e469=_0x2cf37d[_0x384a16(0x1a4)],_0xec4560={'memberId':this[_0x384a16(0x171)]['getCurrentUser']()[_0x384a16(0x1a8)],'unitId':_0x483f2a,'threadId':_0x10e469,'solved':_0x2cf37d[_0x384a16(0x14d)]?I[_0x384a16(0x158)]:I[_0x384a16(0x17d)]},_0x4a6017=await this[_0x384a16(0x148)][_0x384a16(0x16a)](_0x384a16(0x18f)+_0x483f2a+_0x384a16(0x169),{'body':_0xec4560});return!_0x4a6017['body'][_0x384a16(0x181)]||_0x4a6017[_0x384a16(0x152)][_0x384a16(0x181)][_0x384a16(0x16b)]===0x1;}async['deleteComment'](_0x1fe00d,_0x33f6dd,_0x4f2c4c,_0x259f47){const _0x1536bb=_0x597f96,_0x2b3e31={'memberId':(await this['_sessionService']['requireSession'](_0x1fe00d))[_0x1536bb(0x1a3)](),'threadId':_0x4f2c4c,'replyId':_0x259f47,'unitId':_0x1fe00d},_0xbabc2=await this['_httpService'][_0x1536bb(0x16a)](_0x1536bb(0x18f)+_0x1fe00d+_0x1536bb(0x1a6),{'body':_0x2b3e31});return!_0xbabc2[_0x1536bb(0x152)][_0x1536bb(0x181)]||_0xbabc2[_0x1536bb(0x152)][_0x1536bb(0x181)][_0x1536bb(0x16b)]===0x1;}async[_0x597f96(0x196)](_0xa08590,_0x532cfe,_0x24b1c2){const _0x40a35f=_0x597f96,_0x4178d1={'unitId':_0xa08590,'threadId':_0x24b1c2},_0x261a59=await this['_httpService'][_0x40a35f(0x16a)](_0x40a35f(0x18f)+_0xa08590+_0x40a35f(0x178),{'body':_0x4178d1}),_0xe09690=_0x24b1c2[_0x40a35f(0x15e)](_0x54aeec=>ee(_0x261a59['body']['comments'][_0x54aeec],_0xa08590,_0x532cfe))[_0x40a35f(0x195)](Boolean);return Object[_0x40a35f(0x159)](_0x261a59[_0x40a35f(0x152)]['users'])['forEach'](_0xbfb615=>{const _0xc31d2d=_0x40a35f;this[_0xc31d2d(0x171)]['addUser'](_0xbfb615);}),_0xe09690;}[_0x597f96(0x150)](_0x70e505){const _0x1ef39f=_0x597f96;return{'id':_0x70e505['id'],'threadId':_0x70e505[_0x1ef39f(0x1a4)],'ref':_0x70e505['ref']};}};f=Q([_(0x0,_0x3319bd(_0xeee792)),_(0x1,_0x3319bd(_0x5eb8f1)),_(0x2,_0x3319bd(_0x32baf8)),_(0x3,_0x3319bd(_0x2a9806))],f);var re=Object[_0x597f96(0x15a)],te=(_0xda6ae8,_0xafc026,_0x6084be,_0x25b53e)=>{for(var _0x5a10cc=_0x25b53e>0x1?void 0x0:_0x25b53e?re(_0xafc026,_0x6084be):_0xafc026,_0xd1af38=_0xda6ae8['length']-0x1,_0x34b42d;_0xd1af38>=0x0;_0xd1af38--)(_0x34b42d=_0xda6ae8[_0xd1af38])&&(_0x5a10cc=_0x34b42d(_0x5a10cc)||_0x5a10cc);return _0x5a10cc;},N=(_0xaf04b8,_0x46ef6f)=>(_0x575db9,_0x160f09)=>_0x46ef6f(_0x575db9,_0x160f09,_0xaf04b8);let g=class extends _0x4b16b4{constructor(_0x696a20,_0x217382){const _0x55f272=_0x597f96;super(),this[_0x55f272(0x151)]=_0x696a20,this[_0x55f272(0x189)]=_0x217382,this[_0x55f272(0x18c)]();}[_0x597f96(0x18c)](){const _0x416c56=_0x597f96;this['_threadCommentDataSourceService']['dataSource']=this[_0x416c56(0x189)],this[_0x416c56(0x151)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x524bce),N(0x1,_0x3319bd(f))],g);var se=Object[_0x597f96(0x18b)],oe=Object[_0x597f96(0x15a)],ne=(_0x5a1a53,_0x2d9d4e,_0x2d07ec)=>_0x2d9d4e in _0x5a1a53?se(_0x5a1a53,_0x2d9d4e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2d07ec}):_0x5a1a53[_0x2d9d4e]=_0x2d07ec,ie=(_0x2ac3d0,_0x5935b3,_0x12851b,_0x1f4f36)=>{const _0x301a83=_0x597f96;for(var _0x3d8a92=_0x1f4f36>0x1?void 0x0:_0x1f4f36?oe(_0x5935b3,_0x12851b):_0x5935b3,_0x5b01e5=_0x2ac3d0[_0x301a83(0x1a5)]-0x1,_0x417de6;_0x5b01e5>=0x0;_0x5b01e5--)(_0x417de6=_0x2ac3d0[_0x5b01e5])&&(_0x3d8a92=_0x417de6(_0x3d8a92)||_0x3d8a92);return _0x3d8a92;},w=(_0x5f34b8,_0x2d1046)=>(_0x121a8e,_0x14767b)=>_0x2d1046(_0x121a8e,_0x14767b,_0x5f34b8),$=(_0x17e997,_0xd52f66,_0x17d923)=>ne(_0x17e997,typeof _0xd52f66!=_0x597f96(0x157)?_0xd52f66+'':_0xd52f66,_0x17d923);let b=class extends _0x2469e2{constructor(_0x5dd388=M,_0x32acef,_0xe35147){const _0xdb3830=_0x597f96;super(),this[_0xdb3830(0x17e)]=_0x5dd388,this['_injector']=_0x32acef,this[_0xdb3830(0x199)]=_0xe35147;const {..._0x3bc1f7}=_0x4f5a3a({},M,this[_0xdb3830(0x17e)]);this[_0xdb3830(0x199)][_0xdb3830(0x155)](z,_0x3bc1f7);}['onStarting'](){const _0xe0f8c=_0x597f96;[[f],[g],[S]][_0xe0f8c(0x162)](_0x35634b=>{const _0x522e91=_0xe0f8c;this['_injector'][_0x522e91(0x161)](_0x35634b);});}['onReady'](){const _0x43d2ea=_0x597f96;this[_0x43d2ea(0x198)]['get'](g),this[_0x43d2ea(0x198)][_0x43d2ea(0x168)](S);}};$(b,'pluginName',W),$(b,_0x597f96(0x191),_0x2a8601['UNIVER_UNKNOWN']),b=ie([_0x32eefa(_0x1d2348,_0x53a35a,_0x5b5c78),w(0x1,_0x3319bd(_0x2a9806)),w(0x2,_0x2dc9fb)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x297170=_0x31ac;(function(_0xc07465,_0x3389ea){const _0x20f3da=_0x31ac,_0x426425=_0xc07465();while(!![]){try{const _0x8681e=parseInt(_0x20f3da(0x107))/0x1*(parseInt(_0x20f3da(0x11f))/0x2)+parseInt(_0x20f3da(0x14a))/0x3*(parseInt(_0x20f3da(0x11e))/0x4)+-parseInt(_0x20f3da(0x135))/0x5*(parseInt(_0x20f3da(0x101))/0x6)+-parseInt(_0x20f3da(0x157))/0x7+-parseInt(_0x20f3da(0x11b))/0x8+-parseInt(_0x20f3da(0x129))/0x9+parseInt(_0x20f3da(0xfd))/0xa;if(_0x8681e===_0x3389ea)break;else _0x426425['push'](_0x426425['shift']());}catch(_0x15324e){_0x426425['push'](_0x426425['shift']());}}}(_0x8653,0x428f0));import{CommentService as _0x402890,CollaborationSessionService as _0x288d12,UniverCollaborationClientPlugin as _0x32f6c5}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3729ac}from'@univerjs-pro/license';import{dayjs as _0x14c484,UserManagerService as _0x95a105,Inject as _0x3ff32b,Injector as _0x47bae4,Disposable as _0x5963a4,CustomRangeType as _0x9ed84b,UniverInstanceType as _0x2678d6,DependentOn as _0x557d35,IConfigService as _0x309048,Plugin as _0x341216,merge as _0x2c3e44}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x16c7d9}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x47dbdb,IThreadCommentDataSourceService as _0x373199}from'@univerjs/thread-comment';import{bufferTime as _0x2cb961}from'rxjs';import{HTTPService as _0x48d5dd}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3518fa=>(_0x3518fa[_0x3518fa[_0x297170(0x106)]=0x0]=_0x297170(0x106),_0x3518fa[_0x3518fa[_0x297170(0x110)]=0x1]=_0x297170(0x110),_0x3518fa[_0x3518fa[_0x297170(0x134)]=-0x1]=_0x297170(0x134),_0x3518fa))(I||{}),v=(_0x5883e3=>(_0x5883e3[_0x5883e3[_0x297170(0x158)]=0x0]='Unknown',_0x5883e3[_0x5883e3['Add']=0x1]='Add',_0x5883e3[_0x5883e3[_0x297170(0x144)]=0x2]='Reply',_0x5883e3[_0x5883e3[_0x297170(0x124)]=0x3]=_0x297170(0x124),_0x5883e3[_0x5883e3['Delete']=0x4]='Delete',_0x5883e3[_0x5883e3[_0x297170(0x12c)]=0x5]='Solve',_0x5883e3[_0x5883e3[_0x297170(0x134)]=-0x1]='UNRECOGNIZED',_0x5883e3))(v||{});const D=_0x7b9742=>_0x14c484(new Date(+_0x7b9742))[_0x297170(0x156)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x1a4b51,_0x3f5962)=>{const _0x39f0cb=_0x297170,_0x4cb4c2=_0x1a4b51[_0x39f0cb(0x12d)](_0x95a105),_0x30f6f9=_0x1a4b51[_0x39f0cb(0x12d)](_0x48d5dd);_0x3f5962[_0x39f0cb(0x13a)](_0x21e445=>{const _0x17298d=_0x39f0cb;_0x4cb4c2[_0x17298d(0xfa)](_0x21e445)&&_0x3f5962[_0x17298d(0x100)](_0x21e445);}),_0x3f5962[_0x39f0cb(0x126)]&&(await _0x30f6f9[_0x39f0cb(0x12d)](_0x39f0cb(0x10c),{'params':{'userIDs':[..._0x3f5962]}}))['body'][_0x39f0cb(0x108)]['forEach'](_0x4b56e7=>{const _0x406ffb=_0x39f0cb;_0x4b56e7&&_0x4cb4c2[_0x406ffb(0x10b)](_0x4b56e7);});};var K=Object[_0x297170(0x141)],V=(_0xc97fb3,_0x126c51,_0x1e6d93,_0x3c4003)=>{const _0x3de073=_0x297170;for(var _0x4fea08=_0x3c4003>0x1?void 0x0:_0x3c4003?K(_0x126c51,_0x1e6d93):_0x126c51,_0x1e3d37=_0xc97fb3[_0x3de073(0x121)]-0x1,_0x461261;_0x1e3d37>=0x0;_0x1e3d37--)(_0x461261=_0xc97fb3[_0x1e3d37])&&(_0x4fea08=_0x461261(_0x4fea08)||_0x4fea08);return _0x4fea08;},p=(_0x31e203,_0x3d4932)=>(_0x3e528a,_0xf3a76)=>_0x3d4932(_0x3e528a,_0xf3a76,_0x31e203);let S=class extends _0x5963a4{constructor(_0x16e23e,_0x34eca4,_0x407fbd,_0x3c0d92){const _0x44c808=_0x297170;super(),this[_0x44c808(0x13e)]=_0x16e23e,this['_threadCommentModel']=_0x34eca4,this[_0x44c808(0x12a)]=_0x407fbd,this[_0x44c808(0x10a)]=_0x3c0d92,this[_0x44c808(0x13d)](),this[_0x44c808(0x133)]();}['_initUserSync'](){const _0x20d196=_0x297170;this['disposeWithMe'](this[_0x20d196(0x120)][_0x20d196(0x109)]['pipe'](_0x2cb961(0x10))[_0x20d196(0x131)](_0x147f5c=>{const _0x4e198f=_0x20d196,_0x56af3c=new Set();_0x147f5c[_0x4e198f(0x13a)](_0x47d622=>{const _0x4cc4a3=_0x4e198f;switch(_0x47d622[_0x4cc4a3(0x13c)]){case _0x4cc4a3(0x116):{const _0x16a166=_0x47d622[_0x4cc4a3(0x122)]['personId'];_0x56af3c['add'](_0x16a166);break;}}}),B(this[_0x4e198f(0x10a)],_0x56af3c);}));}[_0x297170(0x13d)](){const _0xbcc2b0=_0x297170;this[_0xbcc2b0(0x111)](this[_0xbcc2b0(0x13e)]['commentUpdate$'][_0xbcc2b0(0x131)](async _0x463f1e=>{const _0x3c1d79=_0xbcc2b0;var _0x1a0523,_0x5d5bf3,_0x1399e1,_0x4f4acd;const _0x3c71a8=(_0x1a0523=this[_0x3c1d79(0x120)][_0x3c1d79(0x140)](_0x463f1e[_0x3c1d79(0x10f)])[_0x3c1d79(0x154)](_0x4d2534=>_0x4d2534[_0x3c1d79(0x11d)]===_0x463f1e[_0x3c1d79(0x11d)]))==null?void 0x0:_0x1a0523['root'];if(!_0x3c71a8)return;const {unitId:_0x167d17,subUnitId:_0x1197a4}=_0x3c71a8;switch(_0x463f1e[_0x3c1d79(0x142)]&&this[_0x3c1d79(0x12a)][_0x3c1d79(0x10b)](_0x463f1e['user']),_0x463f1e[_0x3c1d79(0x13c)]){case v[_0x3c1d79(0x132)]:break;case v[_0x3c1d79(0x144)]:{this[_0x3c1d79(0x120)][_0x3c1d79(0x127)](_0x167d17,_0x1197a4,{'unitId':_0x167d17,'subUnitId':_0x1197a4,'ref':'','id':_0x463f1e[_0x3c1d79(0x136)],'dT':D(+_0x463f1e[_0x3c1d79(0x14e)]),'threadId':_0x463f1e['threadId'],'personId':(_0x1399e1=(_0x5d5bf3=_0x463f1e['user'])==null?void 0x0:_0x5d5bf3['userID'])!=null?_0x1399e1:_0x463f1e[_0x3c1d79(0x12f)],'text':JSON[_0x3c1d79(0x125)](_0x463f1e[_0x3c1d79(0x114)]),'parentId':_0x3c71a8['id']});break;}case v['Delete']:{const _0x3d558f=this[_0x3c1d79(0x120)][_0x3c1d79(0x14d)](_0x167d17,_0x1197a4,_0x463f1e[_0x3c1d79(0x136)]);_0x3d558f&&_0x3d558f['parentId']&&this['_threadCommentModel'][_0x3c1d79(0x137)](_0x167d17,_0x1197a4,_0x463f1e[_0x3c1d79(0x136)]);break;}case v[_0x3c1d79(0x124)]:{this['_threadCommentModel'][_0x3c1d79(0x138)](_0x167d17,_0x1197a4,{'commentId':_0x463f1e[_0x3c1d79(0x136)],'text':JSON[_0x3c1d79(0x125)](_0x463f1e[_0x3c1d79(0x114)])});break;}case v['Solve']:{const _0x437ec6=(_0x4f4acd=this[_0x3c1d79(0x120)]['getUnit'](_0x463f1e[_0x3c1d79(0x10f)])[_0x3c1d79(0x154)](_0x1a2b04=>_0x1a2b04['threadId']===_0x463f1e[_0x3c1d79(0x11d)]))==null?void 0x0:_0x4f4acd[_0x3c1d79(0x14b)];_0x437ec6&&this[_0x3c1d79(0x120)][_0x3c1d79(0xfe)](_0x167d17,_0x1197a4,_0x437ec6['id'],_0x463f1e[_0x3c1d79(0x103)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x3ff32b(_0x402890)),p(0x1,_0x3ff32b(_0x47dbdb)),p(0x2,_0x3ff32b(_0x95a105)),p(0x3,_0x3ff32b(_0x47bae4))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x28ff8a,_0x2fb894,_0x495986,_0x362829)=>{const _0x1b199c=_0x297170;for(var _0x8f0b6d=_0x362829>0x1?void 0x0:_0x362829?k(_0x2fb894,_0x495986):_0x2fb894,_0x1af1d5=_0x28ff8a[_0x1b199c(0x121)]-0x1,_0x37cbc0;_0x1af1d5>=0x0;_0x1af1d5--)(_0x37cbc0=_0x28ff8a[_0x1af1d5])&&(_0x8f0b6d=_0x37cbc0(_0x8f0b6d)||_0x8f0b6d);return _0x8f0b6d;},_=(_0x12b65c,_0x1c7902)=>(_0x5ed37e,_0x2fed6d)=>_0x1c7902(_0x5ed37e,_0x2fed6d,_0x12b65c);function X(_0x3184ff,_0x2d6b4b){const _0xcaa39=_0x297170,_0x1d5c88=_0x3184ff[_0xcaa39(0xfb)][0x0];return{..._0x2d6b4b,'id':_0x1d5c88['replyId'],'resolved':_0x3184ff['solved']===0x1,'dT':D(_0x1d5c88[_0xcaa39(0x14e)]),'personId':_0x1d5c88[_0xcaa39(0x12f)],'threadId':_0x1d5c88[_0xcaa39(0x11d)]};}function ee(_0x47b1c7,_0x428aa3,_0x4cd724){const _0x564aae=_0x297170;var _0x2ac0a5,_0x38e522;if(((_0x38e522=(_0x2ac0a5=_0x47b1c7==null?void 0x0:_0x47b1c7[_0x564aae(0xfb)])==null?void 0x0:_0x2ac0a5['length'])!=null?_0x38e522:0x0)>0x0){const _0x2592d3=(_0x562d01,_0x5749f7)=>({'id':_0x562d01['replyId'],'threadId':_0x562d01[_0x564aae(0x11d)],'dT':D(_0x562d01[_0x564aae(0x14e)]),'personId':_0x562d01[_0x564aae(0x12f)],'resolved':_0x47b1c7['solved']===I[_0x564aae(0x110)],'unitId':_0x428aa3,'subUnitId':_0x4cd724,'text':JSON['parse'](_0x562d01[_0x564aae(0x114)]),'parentId':_0x5749f7}),_0x19c2f4=_0x2592d3(_0x47b1c7[_0x564aae(0xfb)][0x0]);return{..._0x19c2f4,'children':_0x47b1c7['replies']['slice'](0x1)['map'](_0x80f21f=>_0x2592d3(_0x80f21f,_0x19c2f4['id']))};}return null;}let f=class{constructor(_0x5557e5,_0x16bf2a,_0x13e01e,_0x455c67){const _0xa36daf=_0x297170;this[_0xa36daf(0x115)]=_0x5557e5,this['_userService']=_0x16bf2a,this[_0xa36daf(0x113)]=_0x13e01e,this[_0xa36daf(0x10a)]=_0x455c67;}async[_0x297170(0x127)](_0x2aa293){const _0x21200b=_0x297170;var _0x41aeb9,_0x3fe16c;const {parentId:_0x291a68,unitId:_0x4a6a21,text:_0x29c4e6,threadId:_0x59e976}=_0x2aa293,_0x3c73e6=(_0x3fe16c=(_0x41aeb9=_0x29c4e6['customRanges'])==null?void 0x0:_0x41aeb9[_0x21200b(0x119)](_0x599dfe=>_0x599dfe['rangeType']===_0x9ed84b['COMMENT'])[_0x21200b(0x150)](_0x4f9cbe=>_0x4f9cbe[_0x21200b(0x149)]))!=null?_0x3fe16c:[],_0x3a927e=JSON[_0x21200b(0x143)](_0x29c4e6),_0x894962=(await this[_0x21200b(0x113)][_0x21200b(0x12e)](_0x4a6a21))[_0x21200b(0x148)]();if(_0x291a68){const _0xf7b59={'memberId':_0x894962,'unitId':_0x4a6a21,'content':_0x3a927e,'mention':_0x3c73e6,'threadId':_0x59e976},_0x336f01=(await this[_0x21200b(0x115)][_0x21200b(0x155)](_0x21200b(0x11a)+_0x4a6a21+'/reply',{'body':_0xf7b59}))[_0x21200b(0x104)]['reply'];return{..._0x2aa293,'id':_0x336f01['replyId'],'dT':_0x14c484(+_0x336f01[_0x21200b(0x14e)])[_0x21200b(0x156)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x336f01[_0x21200b(0x12f)]};}else{const _0x27932b={'memberId':_0x894962,'unitId':_0x4a6a21,'content':_0x3a927e,'mention':_0x3c73e6},_0x52d768=await this[_0x21200b(0x115)][_0x21200b(0x155)](_0x21200b(0x11a)+_0x4a6a21+'/add',{'body':_0x27932b});return X(_0x52d768[_0x21200b(0x104)][_0x21200b(0x14c)],_0x2aa293);}}async['updateComment'](_0x4275a5){const _0x457dc0=_0x297170;var _0x3ee75a,_0x24bdcb;const {text:_0x3e620e,unitId:_0x3e0aef}=_0x4275a5,_0x1e13ba=(_0x24bdcb=(_0x3ee75a=_0x3e620e['customRanges'])==null?void 0x0:_0x3ee75a[_0x457dc0(0x119)](_0x576a6d=>_0x576a6d[_0x457dc0(0x102)]===_0x9ed84b[_0x457dc0(0x130)])[_0x457dc0(0x150)](_0x1a4377=>_0x1a4377[_0x457dc0(0x149)]))!=null?_0x24bdcb:[],_0x1b3d75=JSON['stringify'](_0x3e620e),_0xf2f4e6=_0x4275a5['threadId'],_0x485d71=_0x4275a5['id'],_0x2b4b03={'memberId':(await this[_0x457dc0(0x113)][_0x457dc0(0x12e)](_0x3e0aef))['getMemberID'](),'unitId':_0x3e0aef,'threadId':_0xf2f4e6,'mention':_0x1e13ba,'content':_0x1b3d75,'replyId':_0x485d71},_0x44539d=await this[_0x457dc0(0x115)][_0x457dc0(0x155)]('/universer-api/comment/unit/'+_0x3e0aef+_0x457dc0(0xff),{'body':_0x2b4b03});return!_0x44539d[_0x457dc0(0x104)][_0x457dc0(0x14f)]||_0x44539d['body'][_0x457dc0(0x14f)][_0x457dc0(0x145)]===0x1;}async[_0x297170(0xfe)](_0x4388ea){const _0x4577a2=_0x297170,{unitId:_0x42e453}=_0x4388ea,_0x300be7=_0x4388ea['threadId'],_0x203583={'memberId':this[_0x4577a2(0x12a)][_0x4577a2(0x146)]()[_0x4577a2(0x117)],'unitId':_0x42e453,'threadId':_0x300be7,'solved':_0x4388ea[_0x4577a2(0x152)]?I[_0x4577a2(0x110)]:I[_0x4577a2(0x106)]},_0xd88d6=await this['_httpService']['post'](_0x4577a2(0x11a)+_0x42e453+'/solved',{'body':_0x203583});return!_0xd88d6[_0x4577a2(0x104)][_0x4577a2(0x14f)]||_0xd88d6[_0x4577a2(0x104)][_0x4577a2(0x14f)][_0x4577a2(0x145)]===0x1;}async['deleteComment'](_0x3fd85c,_0x18fefd,_0x489806,_0x15076b){const _0xa9eea6=_0x297170,_0x631d8c={'memberId':(await this['_sessionService'][_0xa9eea6(0x12e)](_0x3fd85c))[_0xa9eea6(0x148)](),'threadId':_0x489806,'replyId':_0x15076b,'unitId':_0x3fd85c},_0x5620b2=await this[_0xa9eea6(0x115)][_0xa9eea6(0x155)](_0xa9eea6(0x11a)+_0x3fd85c+_0xa9eea6(0x118),{'body':_0x631d8c});return!_0x5620b2[_0xa9eea6(0x104)][_0xa9eea6(0x14f)]||_0x5620b2[_0xa9eea6(0x104)][_0xa9eea6(0x14f)][_0xa9eea6(0x145)]===0x1;}async[_0x297170(0x10d)](_0x1bb5dc,_0x47b91c,_0x31be4b){const _0x21c9f4=_0x297170,_0x203d0b={'unitId':_0x1bb5dc,'threadId':_0x31be4b},_0x347204=await this['_httpService'][_0x21c9f4(0x155)](_0x21c9f4(0x11a)+_0x1bb5dc+'/list',{'body':_0x203d0b}),_0x3175fa=_0x31be4b[_0x21c9f4(0x150)](_0x21ef01=>ee(_0x347204['body'][_0x21c9f4(0x13b)][_0x21ef01],_0x1bb5dc,_0x47b91c))['filter'](Boolean);return Object[_0x21c9f4(0x10e)](_0x347204[_0x21c9f4(0x104)]['users'])[_0x21c9f4(0x13a)](_0x2e2be9=>{const _0x552646=_0x21c9f4;this[_0x552646(0x12a)][_0x552646(0x10b)](_0x2e2be9);}),_0x3175fa;}[_0x297170(0x147)](_0xc5e6f9){const _0x337170=_0x297170;return{'id':_0xc5e6f9['id'],'threadId':_0xc5e6f9['threadId'],'ref':_0xc5e6f9[_0x337170(0x13f)]};}};f=Q([_(0x0,_0x3ff32b(_0x48d5dd)),_(0x1,_0x3ff32b(_0x95a105)),_(0x2,_0x3ff32b(_0x288d12)),_(0x3,_0x3ff32b(_0x47bae4))],f);var re=Object[_0x297170(0x141)],te=(_0x457479,_0x5bc6ad,_0x3da56e,_0x377ae9)=>{for(var _0x5eb2a8=_0x377ae9>0x1?void 0x0:_0x377ae9?re(_0x5bc6ad,_0x3da56e):_0x5bc6ad,_0x39e7d9=_0x457479['length']-0x1,_0x2c78cc;_0x39e7d9>=0x0;_0x39e7d9--)(_0x2c78cc=_0x457479[_0x39e7d9])&&(_0x5eb2a8=_0x2c78cc(_0x5eb2a8)||_0x5eb2a8);return _0x5eb2a8;},N=(_0x5e6060,_0x3d014b)=>(_0x2a4acf,_0x199fdd)=>_0x3d014b(_0x2a4acf,_0x199fdd,_0x5e6060);function _0x8653(){const _0x28528e=['Add','_initUserSync','UNRECOGNIZED','5DiDFMz','replyId','deleteComment','updateComment','_threadCommentDataSourceService','forEach','comments','type','_init','_commentService','ref','getUnit','getOwnPropertyDescriptor','user','stringify','Reply','code','getCurrentUser','saveCommentToSnapshot','getMemberID','rangeId','3eTCogY','root','comment','getComment','createTimestamp','error','map','dataSource','resolved','_threadCommentDataSource','find','post','format','172333QGzNtl','Unknown','getUser','replies','pluginName','1220970MdGIXG','resolveComment','/edit','delete','1711902WgvgCy','rangeType','solved','body','onStarting','OpenOrReOpen','103NmfUIF','users','commentUpdate$','_injector','addUser','/universer-api/user/list','listComments','values','unitId','Solved','disposeWithMe','_config','_sessionService','content','_httpService','add','userID','/delete','filter','/universer-api/comment/unit/','2354984vEiZUJ','syncUpdateMutationToColla','threadId','1617556yvFYPg','8198OXsyWT','_threadCommentModel','length','payload','onReady','Edit','parse','size','addComment','_configService','645750vyYLTg','_userService','setConfig','Solve','get','requireSession','userId','COMMENT','subscribe'];_0x8653=function(){return _0x28528e;};return _0x8653();}let g=class extends _0x5963a4{constructor(_0x33c47a,_0x49917b){const _0x5c615a=_0x297170;super(),this[_0x5c615a(0x139)]=_0x33c47a,this[_0x5c615a(0x153)]=_0x49917b,this['_initDataSource']();}['_initDataSource'](){const _0xc9355f=_0x297170;this[_0xc9355f(0x139)][_0xc9355f(0x151)]=this[_0xc9355f(0x153)],this['_threadCommentDataSourceService'][_0xc9355f(0x11c)]=!0x1;}};function _0x31ac(_0x497322,_0x50a33){const _0x865386=_0x8653();return _0x31ac=function(_0x31ac2d,_0xb9e28f){_0x31ac2d=_0x31ac2d-0xfa;let _0x162a10=_0x865386[_0x31ac2d];return _0x162a10;},_0x31ac(_0x497322,_0x50a33);}g=te([N(0x0,_0x373199),N(0x1,_0x3ff32b(f))],g);var se=Object['defineProperty'],oe=Object[_0x297170(0x141)],ne=(_0x1dab4c,_0x139882,_0x41354c)=>_0x139882 in _0x1dab4c?se(_0x1dab4c,_0x139882,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x41354c}):_0x1dab4c[_0x139882]=_0x41354c,ie=(_0x4752d3,_0xf5acd2,_0x5136fb,_0x190eb4)=>{const _0x53a8a4=_0x297170;for(var _0x359ab7=_0x190eb4>0x1?void 0x0:_0x190eb4?oe(_0xf5acd2,_0x5136fb):_0xf5acd2,_0x4fba82=_0x4752d3[_0x53a8a4(0x121)]-0x1,_0x13b13d;_0x4fba82>=0x0;_0x4fba82--)(_0x13b13d=_0x4752d3[_0x4fba82])&&(_0x359ab7=_0x13b13d(_0x359ab7)||_0x359ab7);return _0x359ab7;},w=(_0x48566f,_0x1b73c8)=>(_0x339429,_0x482147)=>_0x1b73c8(_0x339429,_0x482147,_0x48566f),$=(_0x5e0f3e,_0x12d9e5,_0x3bdc21)=>ne(_0x5e0f3e,typeof _0x12d9e5!='symbol'?_0x12d9e5+'':_0x12d9e5,_0x3bdc21);let b=class extends _0x341216{constructor(_0x313507=M,_0x1b58fa,_0x5165ba){const _0x2221f8=_0x297170;super(),this['_config']=_0x313507,this[_0x2221f8(0x10a)]=_0x1b58fa,this[_0x2221f8(0x128)]=_0x5165ba;const {..._0x4384e8}=_0x2c3e44({},M,this[_0x2221f8(0x112)]);this[_0x2221f8(0x128)][_0x2221f8(0x12b)](z,_0x4384e8);}[_0x297170(0x105)](){const _0x5b3bac=_0x297170;[[f],[g],[S]][_0x5b3bac(0x13a)](_0x5b3774=>{const _0x50a89d=_0x5b3bac;this[_0x50a89d(0x10a)][_0x50a89d(0x116)](_0x5b3774);});}[_0x297170(0x123)](){const _0x2c0756=_0x297170;this[_0x2c0756(0x10a)][_0x2c0756(0x12d)](g),this[_0x2c0756(0x10a)]['get'](S);}};$(b,_0x297170(0xfc),W),$(b,_0x297170(0x13c),_0x2678d6['UNIVER_UNKNOWN']),b=ie([_0x557d35(_0x16c7d9,_0x32f6c5,_0x3729ac),w(0x1,_0x3ff32b(_0x47bae4)),w(0x2,_0x309048)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x597f96=_0x5f55;(function(_0x299bf7,_0x2b77b8){const _0x5b4259=_0x5f55,_0x21cc96=_0x299bf7();while(!![]){try{const _0x397444=parseInt(_0x5b4259(0x172))/0x1*(parseInt(_0x5b4259(0x16f))/0x2)+parseInt(_0x5b4259(0x194))/0x3*(-parseInt(_0x5b4259(0x17c))/0x4)+-parseInt(_0x5b4259(0x164))/0x5+parseInt(_0x5b4259(0x14b))/0x6*(parseInt(_0x5b4259(0x15b))/0x7)+-parseInt(_0x5b4259(0x16c))/0x8*(parseInt(_0x5b4259(0x16d))/0x9)+parseInt(_0x5b4259(0x186))/0xa*(parseInt(_0x5b4259(0x184))/0xb)+parseInt(_0x5b4259(0x19e))/0xc;if(_0x397444===_0x2b77b8)break;else _0x21cc96['push'](_0x21cc96['shift']());}catch(_0x418b09){_0x21cc96['push'](_0x21cc96['shift']());}}}(_0x35bf,0x23011));import{CommentService as _0x870a6e,CollaborationSessionService as _0x32baf8,UniverCollaborationClientPlugin as _0x53a35a}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5b5c78}from'@univerjs-pro/license';import{dayjs as _0x3a4c00,UserManagerService as _0x5eb8f1,Inject as _0x3319bd,Injector as _0x2a9806,Disposable as _0x4b16b4,CustomRangeType as _0xc9d637,UniverInstanceType as _0x2a8601,DependentOn as _0x32eefa,IConfigService as _0x2dc9fb,Plugin as _0x2469e2,merge as _0x4f5a3a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1d2348}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xa098e9,IThreadCommentDataSourceService as _0x524bce}from'@univerjs/thread-comment';import{bufferTime as _0x55f664}from'rxjs';import{HTTPService as _0xeee792}from'@univerjs/network';function _0x35bf(){const _0x340636=['map','createTimestamp','_commentService','add','forEach','content','926710TcxCXI','user','getComment','_sessionService','get','/solved','post','code','48376uaZsJd','9EVZyoq','slice','183970KYbNiI','size','_userService','1PmjoYO','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/reply','COMMENT','delete','deleteComment','/list','stringify','customRanges','root','4aNwqoT','OpenOrReOpen','_config','comment','personId','error','getUnit','Reply','96613aFNbfN','Solve','20zmhijx','thread-comment-data-source.config','users','_threadCommentDataSource','parse','defineProperty','_initDataSource','addUser','userId','/universer-api/comment/unit/','disposeWithMe','type','/add','rangeId','127989fZcHHY','filter','listComments','format','_injector','_configService','Add','pipe','solved','replies','2375436jNmUbt','parentId','Delete','Edit','resolveComment','getMemberID','threadId','length','/delete','Unknown','userID','subscribe','_httpService','commentUpdate$','/edit','419550sMPSZJ','requireSession','resolved','UNRECOGNIZED','replyId','saveCommentToSnapshot','_threadCommentDataSourceService','body','_init','YYYY/MM/DD\x20HH:mm','setConfig','_threadCommentModel','symbol','Solved','values','getOwnPropertyDescriptor','7wjJgVf','unitId','_initUserSync'];_0x35bf=function(){return _0x340636;};return _0x35bf();}const W=_0x597f96(0x173);function _0x5f55(_0x4e0e0a,_0x7c0f12){const _0x35bfd2=_0x35bf();return _0x5f55=function(_0x5f554e,_0x4591eb){_0x5f554e=_0x5f554e-0x148;let _0x27154a=_0x35bfd2[_0x5f554e];return _0x27154a;},_0x5f55(_0x4e0e0a,_0x7c0f12);}var I=(_0xb883fe=>(_0xb883fe[_0xb883fe[_0x597f96(0x17d)]=0x0]=_0x597f96(0x17d),_0xb883fe[_0xb883fe[_0x597f96(0x158)]=0x1]=_0x597f96(0x158),_0xb883fe[_0xb883fe[_0x597f96(0x14e)]=-0x1]=_0x597f96(0x14e),_0xb883fe))(I||{}),v=(_0x1e09c6=>(_0x1e09c6[_0x1e09c6[_0x597f96(0x1a7)]=0x0]=_0x597f96(0x1a7),_0x1e09c6[_0x1e09c6[_0x597f96(0x19a)]=0x1]=_0x597f96(0x19a),_0x1e09c6[_0x1e09c6[_0x597f96(0x183)]=0x2]=_0x597f96(0x183),_0x1e09c6[_0x1e09c6[_0x597f96(0x1a1)]=0x3]=_0x597f96(0x1a1),_0x1e09c6[_0x1e09c6[_0x597f96(0x1a0)]=0x4]=_0x597f96(0x1a0),_0x1e09c6[_0x1e09c6['Solve']=0x5]=_0x597f96(0x185),_0x1e09c6[_0x1e09c6[_0x597f96(0x14e)]=-0x1]=_0x597f96(0x14e),_0x1e09c6))(v||{});const D=_0x3591a0=>_0x3a4c00(new Date(+_0x3591a0))[_0x597f96(0x197)](_0x597f96(0x154)),B=async(_0x42e457,_0x30674a)=>{const _0x473a52=_0x597f96,_0x5869a7=_0x42e457[_0x473a52(0x168)](_0x5eb8f1),_0x26300c=_0x42e457['get'](_0xeee792);_0x30674a[_0x473a52(0x162)](_0x5caa43=>{const _0x3829c8=_0x473a52;_0x5869a7['getUser'](_0x5caa43)&&_0x30674a[_0x3829c8(0x176)](_0x5caa43);}),_0x30674a[_0x473a52(0x170)]&&(await _0x26300c['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x30674a]}}))[_0x473a52(0x152)][_0x473a52(0x188)][_0x473a52(0x162)](_0x32b78c=>{const _0xc10422=_0x473a52;_0x32b78c&&_0x5869a7[_0xc10422(0x18d)](_0x32b78c);});};var K=Object[_0x597f96(0x15a)],V=(_0x285199,_0x568b53,_0x17f0ff,_0x62f402)=>{const _0x2f26d5=_0x597f96;for(var _0xd2c762=_0x62f402>0x1?void 0x0:_0x62f402?K(_0x568b53,_0x17f0ff):_0x568b53,_0x1e654d=_0x285199[_0x2f26d5(0x1a5)]-0x1,_0x4d2e64;_0x1e654d>=0x0;_0x1e654d--)(_0x4d2e64=_0x285199[_0x1e654d])&&(_0xd2c762=_0x4d2e64(_0xd2c762)||_0xd2c762);return _0xd2c762;},p=(_0x31ed3b,_0x137a6c)=>(_0x22ef5c,_0x58feb4)=>_0x137a6c(_0x22ef5c,_0x58feb4,_0x31ed3b);let S=class extends _0x4b16b4{constructor(_0x43c20b,_0xf30329,_0x6c99d3,_0x56d514){const _0x40841b=_0x597f96;super(),this[_0x40841b(0x160)]=_0x43c20b,this[_0x40841b(0x156)]=_0xf30329,this[_0x40841b(0x171)]=_0x6c99d3,this['_injector']=_0x56d514,this[_0x40841b(0x153)](),this[_0x40841b(0x15d)]();}[_0x597f96(0x15d)](){const _0xa79a10=_0x597f96;this[_0xa79a10(0x190)](this['_threadCommentModel']['commentUpdate$'][_0xa79a10(0x19b)](_0x55f664(0x10))[_0xa79a10(0x1a9)](_0x2f0b64=>{const _0x55dd1d=_0xa79a10,_0x10ddd1=new Set();_0x2f0b64['forEach'](_0x110dcf=>{const _0x3ac234=_0x5f55;switch(_0x110dcf[_0x3ac234(0x191)]){case'add':{const _0x499f8a=_0x110dcf['payload'][_0x3ac234(0x180)];_0x10ddd1[_0x3ac234(0x161)](_0x499f8a);break;}}}),B(this[_0x55dd1d(0x198)],_0x10ddd1);}));}[_0x597f96(0x153)](){const _0x3d182b=_0x597f96;this[_0x3d182b(0x190)](this[_0x3d182b(0x160)][_0x3d182b(0x149)][_0x3d182b(0x1a9)](async _0x16063c=>{const _0x144ffe=_0x3d182b;var _0x3ce913,_0x414d9f,_0x517bbb,_0x4c2310;const _0x127d08=(_0x3ce913=this['_threadCommentModel'][_0x144ffe(0x182)](_0x16063c['unitId'])['find'](_0x70efa8=>_0x70efa8['threadId']===_0x16063c['threadId']))==null?void 0x0:_0x3ce913['root'];if(!_0x127d08)return;const {unitId:_0x38dcef,subUnitId:_0x4519bc}=_0x127d08;switch(_0x16063c[_0x144ffe(0x165)]&&this['_userService'][_0x144ffe(0x18d)](_0x16063c[_0x144ffe(0x165)]),_0x16063c['type']){case v[_0x144ffe(0x19a)]:break;case v[_0x144ffe(0x183)]:{this[_0x144ffe(0x156)]['addComment'](_0x38dcef,_0x4519bc,{'unitId':_0x38dcef,'subUnitId':_0x4519bc,'ref':'','id':_0x16063c[_0x144ffe(0x14f)],'dT':D(+_0x16063c[_0x144ffe(0x15f)]),'threadId':_0x16063c['threadId'],'personId':(_0x517bbb=(_0x414d9f=_0x16063c['user'])==null?void 0x0:_0x414d9f[_0x144ffe(0x1a8)])!=null?_0x517bbb:_0x16063c[_0x144ffe(0x18e)],'text':JSON[_0x144ffe(0x18a)](_0x16063c[_0x144ffe(0x163)]),'parentId':_0x127d08['id']});break;}case v['Delete']:{const _0x3c14f8=this[_0x144ffe(0x156)][_0x144ffe(0x166)](_0x38dcef,_0x4519bc,_0x16063c[_0x144ffe(0x14f)]);_0x3c14f8&&_0x3c14f8[_0x144ffe(0x19f)]&&this['_threadCommentModel'][_0x144ffe(0x177)](_0x38dcef,_0x4519bc,_0x16063c[_0x144ffe(0x14f)]);break;}case v['Edit']:{this['_threadCommentModel']['updateComment'](_0x38dcef,_0x4519bc,{'commentId':_0x16063c['replyId'],'text':JSON['parse'](_0x16063c[_0x144ffe(0x163)])});break;}case v[_0x144ffe(0x185)]:{const _0x46e105=(_0x4c2310=this['_threadCommentModel'][_0x144ffe(0x182)](_0x16063c[_0x144ffe(0x15c)])['find'](_0x140f7e=>_0x140f7e[_0x144ffe(0x1a4)]===_0x16063c['threadId']))==null?void 0x0:_0x4c2310[_0x144ffe(0x17b)];_0x46e105&&this[_0x144ffe(0x156)]['resolveComment'](_0x38dcef,_0x4519bc,_0x46e105['id'],_0x16063c[_0x144ffe(0x19c)]===I[_0x144ffe(0x158)]);break;}}}));}};S=V([p(0x0,_0x3319bd(_0x870a6e)),p(0x1,_0x3319bd(_0xa098e9)),p(0x2,_0x3319bd(_0x5eb8f1)),p(0x3,_0x3319bd(_0x2a9806))],S);const z=_0x597f96(0x187),M={};var k=Object[_0x597f96(0x15a)],Q=(_0x10532d,_0x59c67e,_0x9c1fe6,_0x543e0b)=>{const _0x2a5bb0=_0x597f96;for(var _0x582c49=_0x543e0b>0x1?void 0x0:_0x543e0b?k(_0x59c67e,_0x9c1fe6):_0x59c67e,_0x52b088=_0x10532d[_0x2a5bb0(0x1a5)]-0x1,_0x558edf;_0x52b088>=0x0;_0x52b088--)(_0x558edf=_0x10532d[_0x52b088])&&(_0x582c49=_0x558edf(_0x582c49)||_0x582c49);return _0x582c49;},_=(_0xde9a76,_0x300404)=>(_0x2f5898,_0x226a7d)=>_0x300404(_0x2f5898,_0x226a7d,_0xde9a76);function X(_0xe3fd93,_0x5f0ac8){const _0x3a4758=_0x597f96,_0x212ad5=_0xe3fd93[_0x3a4758(0x19d)][0x0];return{..._0x5f0ac8,'id':_0x212ad5[_0x3a4758(0x14f)],'resolved':_0xe3fd93[_0x3a4758(0x19c)]===0x1,'dT':D(_0x212ad5[_0x3a4758(0x15f)]),'personId':_0x212ad5['userId'],'threadId':_0x212ad5['threadId']};}function ee(_0x18d791,_0x44d536,_0x55dc40){const _0x3aea06=_0x597f96;var _0x231397,_0x1c43da;if(((_0x1c43da=(_0x231397=_0x18d791==null?void 0x0:_0x18d791[_0x3aea06(0x19d)])==null?void 0x0:_0x231397[_0x3aea06(0x1a5)])!=null?_0x1c43da:0x0)>0x0){const _0x2d5661=(_0x4a6db1,_0xb98591)=>({'id':_0x4a6db1[_0x3aea06(0x14f)],'threadId':_0x4a6db1[_0x3aea06(0x1a4)],'dT':D(_0x4a6db1[_0x3aea06(0x15f)]),'personId':_0x4a6db1[_0x3aea06(0x18e)],'resolved':_0x18d791[_0x3aea06(0x19c)]===I[_0x3aea06(0x158)],'unitId':_0x44d536,'subUnitId':_0x55dc40,'text':JSON[_0x3aea06(0x18a)](_0x4a6db1[_0x3aea06(0x163)]),'parentId':_0xb98591}),_0x206aa8=_0x2d5661(_0x18d791[_0x3aea06(0x19d)][0x0]);return{..._0x206aa8,'children':_0x18d791[_0x3aea06(0x19d)][_0x3aea06(0x16e)](0x1)[_0x3aea06(0x15e)](_0x44bdf9=>_0x2d5661(_0x44bdf9,_0x206aa8['id']))};}return null;}let f=class{constructor(_0x30794d,_0x280658,_0x194daa,_0x463807){const _0x338733=_0x597f96;this[_0x338733(0x148)]=_0x30794d,this[_0x338733(0x171)]=_0x280658,this[_0x338733(0x167)]=_0x194daa,this['_injector']=_0x463807;}async['addComment'](_0x5d8f4d){const _0x2ac765=_0x597f96;var _0x3219c4,_0x3bdaca;const {parentId:_0x25d9dd,unitId:_0x5dcb58,text:_0x217d9b,threadId:_0x6f770b}=_0x5d8f4d,_0x2a4e4c=(_0x3bdaca=(_0x3219c4=_0x217d9b['customRanges'])==null?void 0x0:_0x3219c4[_0x2ac765(0x195)](_0x2872c9=>_0x2872c9['rangeType']===_0xc9d637[_0x2ac765(0x175)])[_0x2ac765(0x15e)](_0x427f35=>_0x427f35[_0x2ac765(0x193)]))!=null?_0x3bdaca:[],_0x11c187=JSON[_0x2ac765(0x179)](_0x217d9b),_0x6d173d=(await this[_0x2ac765(0x167)]['requireSession'](_0x5dcb58))[_0x2ac765(0x1a3)]();if(_0x25d9dd){const _0x4fb426={'memberId':_0x6d173d,'unitId':_0x5dcb58,'content':_0x11c187,'mention':_0x2a4e4c,'threadId':_0x6f770b},_0x4c0835=(await this[_0x2ac765(0x148)][_0x2ac765(0x16a)](_0x2ac765(0x18f)+_0x5dcb58+_0x2ac765(0x174),{'body':_0x4fb426}))['body']['reply'];return{..._0x5d8f4d,'id':_0x4c0835['replyId'],'dT':_0x3a4c00(+_0x4c0835[_0x2ac765(0x15f)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x4c0835[_0x2ac765(0x18e)]};}else{const _0x22181d={'memberId':_0x6d173d,'unitId':_0x5dcb58,'content':_0x11c187,'mention':_0x2a4e4c},_0xd465d5=await this[_0x2ac765(0x148)]['post'](_0x2ac765(0x18f)+_0x5dcb58+_0x2ac765(0x192),{'body':_0x22181d});return X(_0xd465d5['body'][_0x2ac765(0x17f)],_0x5d8f4d);}}async['updateComment'](_0x286a9b){const _0x420817=_0x597f96;var _0x34c9a7,_0x4b3f4e;const {text:_0x3a8bc7,unitId:_0x4aeadd}=_0x286a9b,_0x107907=(_0x4b3f4e=(_0x34c9a7=_0x3a8bc7[_0x420817(0x17a)])==null?void 0x0:_0x34c9a7['filter'](_0x21e0d0=>_0x21e0d0['rangeType']===_0xc9d637[_0x420817(0x175)])[_0x420817(0x15e)](_0x2f6d3a=>_0x2f6d3a[_0x420817(0x193)]))!=null?_0x4b3f4e:[],_0x517a57=JSON[_0x420817(0x179)](_0x3a8bc7),_0x12241f=_0x286a9b[_0x420817(0x1a4)],_0x3d6cb6=_0x286a9b['id'],_0x43f11f={'memberId':(await this[_0x420817(0x167)][_0x420817(0x14c)](_0x4aeadd))['getMemberID'](),'unitId':_0x4aeadd,'threadId':_0x12241f,'mention':_0x107907,'content':_0x517a57,'replyId':_0x3d6cb6},_0x10ae1d=await this[_0x420817(0x148)][_0x420817(0x16a)]('/universer-api/comment/unit/'+_0x4aeadd+_0x420817(0x14a),{'body':_0x43f11f});return!_0x10ae1d[_0x420817(0x152)]['error']||_0x10ae1d[_0x420817(0x152)][_0x420817(0x181)][_0x420817(0x16b)]===0x1;}async[_0x597f96(0x1a2)](_0x2cf37d){const _0x384a16=_0x597f96,{unitId:_0x483f2a}=_0x2cf37d,_0x10e469=_0x2cf37d[_0x384a16(0x1a4)],_0xec4560={'memberId':this[_0x384a16(0x171)]['getCurrentUser']()[_0x384a16(0x1a8)],'unitId':_0x483f2a,'threadId':_0x10e469,'solved':_0x2cf37d[_0x384a16(0x14d)]?I[_0x384a16(0x158)]:I[_0x384a16(0x17d)]},_0x4a6017=await this[_0x384a16(0x148)][_0x384a16(0x16a)](_0x384a16(0x18f)+_0x483f2a+_0x384a16(0x169),{'body':_0xec4560});return!_0x4a6017['body'][_0x384a16(0x181)]||_0x4a6017[_0x384a16(0x152)][_0x384a16(0x181)][_0x384a16(0x16b)]===0x1;}async['deleteComment'](_0x1fe00d,_0x33f6dd,_0x4f2c4c,_0x259f47){const _0x1536bb=_0x597f96,_0x2b3e31={'memberId':(await this['_sessionService']['requireSession'](_0x1fe00d))[_0x1536bb(0x1a3)](),'threadId':_0x4f2c4c,'replyId':_0x259f47,'unitId':_0x1fe00d},_0xbabc2=await this['_httpService'][_0x1536bb(0x16a)](_0x1536bb(0x18f)+_0x1fe00d+_0x1536bb(0x1a6),{'body':_0x2b3e31});return!_0xbabc2[_0x1536bb(0x152)][_0x1536bb(0x181)]||_0xbabc2[_0x1536bb(0x152)][_0x1536bb(0x181)][_0x1536bb(0x16b)]===0x1;}async[_0x597f96(0x196)](_0xa08590,_0x532cfe,_0x24b1c2){const _0x40a35f=_0x597f96,_0x4178d1={'unitId':_0xa08590,'threadId':_0x24b1c2},_0x261a59=await this['_httpService'][_0x40a35f(0x16a)](_0x40a35f(0x18f)+_0xa08590+_0x40a35f(0x178),{'body':_0x4178d1}),_0xe09690=_0x24b1c2[_0x40a35f(0x15e)](_0x54aeec=>ee(_0x261a59['body']['comments'][_0x54aeec],_0xa08590,_0x532cfe))[_0x40a35f(0x195)](Boolean);return Object[_0x40a35f(0x159)](_0x261a59[_0x40a35f(0x152)]['users'])['forEach'](_0xbfb615=>{const _0xc31d2d=_0x40a35f;this[_0xc31d2d(0x171)]['addUser'](_0xbfb615);}),_0xe09690;}[_0x597f96(0x150)](_0x70e505){const _0x1ef39f=_0x597f96;return{'id':_0x70e505['id'],'threadId':_0x70e505[_0x1ef39f(0x1a4)],'ref':_0x70e505['ref']};}};f=Q([_(0x0,_0x3319bd(_0xeee792)),_(0x1,_0x3319bd(_0x5eb8f1)),_(0x2,_0x3319bd(_0x32baf8)),_(0x3,_0x3319bd(_0x2a9806))],f);var re=Object[_0x597f96(0x15a)],te=(_0xda6ae8,_0xafc026,_0x6084be,_0x25b53e)=>{for(var _0x5a10cc=_0x25b53e>0x1?void 0x0:_0x25b53e?re(_0xafc026,_0x6084be):_0xafc026,_0xd1af38=_0xda6ae8['length']-0x1,_0x34b42d;_0xd1af38>=0x0;_0xd1af38--)(_0x34b42d=_0xda6ae8[_0xd1af38])&&(_0x5a10cc=_0x34b42d(_0x5a10cc)||_0x5a10cc);return _0x5a10cc;},N=(_0xaf04b8,_0x46ef6f)=>(_0x575db9,_0x160f09)=>_0x46ef6f(_0x575db9,_0x160f09,_0xaf04b8);let g=class extends _0x4b16b4{constructor(_0x696a20,_0x217382){const _0x55f272=_0x597f96;super(),this[_0x55f272(0x151)]=_0x696a20,this[_0x55f272(0x189)]=_0x217382,this[_0x55f272(0x18c)]();}[_0x597f96(0x18c)](){const _0x416c56=_0x597f96;this['_threadCommentDataSourceService']['dataSource']=this[_0x416c56(0x189)],this[_0x416c56(0x151)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x524bce),N(0x1,_0x3319bd(f))],g);var se=Object[_0x597f96(0x18b)],oe=Object[_0x597f96(0x15a)],ne=(_0x5a1a53,_0x2d9d4e,_0x2d07ec)=>_0x2d9d4e in _0x5a1a53?se(_0x5a1a53,_0x2d9d4e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2d07ec}):_0x5a1a53[_0x2d9d4e]=_0x2d07ec,ie=(_0x2ac3d0,_0x5935b3,_0x12851b,_0x1f4f36)=>{const _0x301a83=_0x597f96;for(var _0x3d8a92=_0x1f4f36>0x1?void 0x0:_0x1f4f36?oe(_0x5935b3,_0x12851b):_0x5935b3,_0x5b01e5=_0x2ac3d0[_0x301a83(0x1a5)]-0x1,_0x417de6;_0x5b01e5>=0x0;_0x5b01e5--)(_0x417de6=_0x2ac3d0[_0x5b01e5])&&(_0x3d8a92=_0x417de6(_0x3d8a92)||_0x3d8a92);return _0x3d8a92;},w=(_0x5f34b8,_0x2d1046)=>(_0x121a8e,_0x14767b)=>_0x2d1046(_0x121a8e,_0x14767b,_0x5f34b8),$=(_0x17e997,_0xd52f66,_0x17d923)=>ne(_0x17e997,typeof _0xd52f66!=_0x597f96(0x157)?_0xd52f66+'':_0xd52f66,_0x17d923);let b=class extends _0x2469e2{constructor(_0x5dd388=M,_0x32acef,_0xe35147){const _0xdb3830=_0x597f96;super(),this[_0xdb3830(0x17e)]=_0x5dd388,this['_injector']=_0x32acef,this[_0xdb3830(0x199)]=_0xe35147;const {..._0x3bc1f7}=_0x4f5a3a({},M,this[_0xdb3830(0x17e)]);this[_0xdb3830(0x199)][_0xdb3830(0x155)](z,_0x3bc1f7);}['onStarting'](){const _0xe0f8c=_0x597f96;[[f],[g],[S]][_0xe0f8c(0x162)](_0x35634b=>{const _0x522e91=_0xe0f8c;this['_injector'][_0x522e91(0x161)](_0x35634b);});}['onReady'](){const _0x43d2ea=_0x597f96;this[_0x43d2ea(0x198)]['get'](g),this[_0x43d2ea(0x198)][_0x43d2ea(0x168)](S);}};$(b,'pluginName',W),$(b,_0x597f96(0x191),_0x2a8601['UNIVER_UNKNOWN']),b=ie([_0x32eefa(_0x1d2348,_0x53a35a,_0x5b5c78),w(0x1,_0x3319bd(_0x2a9806)),w(0x2,_0x2dc9fb)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x297170=_0x31ac;(function(_0xc07465,_0x3389ea){const _0x20f3da=_0x31ac,_0x426425=_0xc07465();while(!![]){try{const _0x8681e=parseInt(_0x20f3da(0x107))/0x1*(parseInt(_0x20f3da(0x11f))/0x2)+parseInt(_0x20f3da(0x14a))/0x3*(parseInt(_0x20f3da(0x11e))/0x4)+-parseInt(_0x20f3da(0x135))/0x5*(parseInt(_0x20f3da(0x101))/0x6)+-parseInt(_0x20f3da(0x157))/0x7+-parseInt(_0x20f3da(0x11b))/0x8+-parseInt(_0x20f3da(0x129))/0x9+parseInt(_0x20f3da(0xfd))/0xa;if(_0x8681e===_0x3389ea)break;else _0x426425['push'](_0x426425['shift']());}catch(_0x15324e){_0x426425['push'](_0x426425['shift']());}}}(_0x8653,0x428f0));import{CommentService as _0x402890,CollaborationSessionService as _0x288d12,UniverCollaborationClientPlugin as _0x32f6c5}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3729ac}from'@univerjs-pro/license';import{dayjs as _0x14c484,UserManagerService as _0x95a105,Inject as _0x3ff32b,Injector as _0x47bae4,Disposable as _0x5963a4,CustomRangeType as _0x9ed84b,UniverInstanceType as _0x2678d6,DependentOn as _0x557d35,IConfigService as _0x309048,Plugin as _0x341216,merge as _0x2c3e44}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x16c7d9}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x47dbdb,IThreadCommentDataSourceService as _0x373199}from'@univerjs/thread-comment';import{bufferTime as _0x2cb961}from'rxjs';import{HTTPService as _0x48d5dd}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3518fa=>(_0x3518fa[_0x3518fa[_0x297170(0x106)]=0x0]=_0x297170(0x106),_0x3518fa[_0x3518fa[_0x297170(0x110)]=0x1]=_0x297170(0x110),_0x3518fa[_0x3518fa[_0x297170(0x134)]=-0x1]=_0x297170(0x134),_0x3518fa))(I||{}),v=(_0x5883e3=>(_0x5883e3[_0x5883e3[_0x297170(0x158)]=0x0]='Unknown',_0x5883e3[_0x5883e3['Add']=0x1]='Add',_0x5883e3[_0x5883e3[_0x297170(0x144)]=0x2]='Reply',_0x5883e3[_0x5883e3[_0x297170(0x124)]=0x3]=_0x297170(0x124),_0x5883e3[_0x5883e3['Delete']=0x4]='Delete',_0x5883e3[_0x5883e3[_0x297170(0x12c)]=0x5]='Solve',_0x5883e3[_0x5883e3[_0x297170(0x134)]=-0x1]='UNRECOGNIZED',_0x5883e3))(v||{});const D=_0x7b9742=>_0x14c484(new Date(+_0x7b9742))[_0x297170(0x156)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x1a4b51,_0x3f5962)=>{const _0x39f0cb=_0x297170,_0x4cb4c2=_0x1a4b51[_0x39f0cb(0x12d)](_0x95a105),_0x30f6f9=_0x1a4b51[_0x39f0cb(0x12d)](_0x48d5dd);_0x3f5962[_0x39f0cb(0x13a)](_0x21e445=>{const _0x17298d=_0x39f0cb;_0x4cb4c2[_0x17298d(0xfa)](_0x21e445)&&_0x3f5962[_0x17298d(0x100)](_0x21e445);}),_0x3f5962[_0x39f0cb(0x126)]&&(await _0x30f6f9[_0x39f0cb(0x12d)](_0x39f0cb(0x10c),{'params':{'userIDs':[..._0x3f5962]}}))['body'][_0x39f0cb(0x108)]['forEach'](_0x4b56e7=>{const _0x406ffb=_0x39f0cb;_0x4b56e7&&_0x4cb4c2[_0x406ffb(0x10b)](_0x4b56e7);});};var K=Object[_0x297170(0x141)],V=(_0xc97fb3,_0x126c51,_0x1e6d93,_0x3c4003)=>{const _0x3de073=_0x297170;for(var _0x4fea08=_0x3c4003>0x1?void 0x0:_0x3c4003?K(_0x126c51,_0x1e6d93):_0x126c51,_0x1e3d37=_0xc97fb3[_0x3de073(0x121)]-0x1,_0x461261;_0x1e3d37>=0x0;_0x1e3d37--)(_0x461261=_0xc97fb3[_0x1e3d37])&&(_0x4fea08=_0x461261(_0x4fea08)||_0x4fea08);return _0x4fea08;},p=(_0x31e203,_0x3d4932)=>(_0x3e528a,_0xf3a76)=>_0x3d4932(_0x3e528a,_0xf3a76,_0x31e203);let S=class extends _0x5963a4{constructor(_0x16e23e,_0x34eca4,_0x407fbd,_0x3c0d92){const _0x44c808=_0x297170;super(),this[_0x44c808(0x13e)]=_0x16e23e,this['_threadCommentModel']=_0x34eca4,this[_0x44c808(0x12a)]=_0x407fbd,this[_0x44c808(0x10a)]=_0x3c0d92,this[_0x44c808(0x13d)](),this[_0x44c808(0x133)]();}['_initUserSync'](){const _0x20d196=_0x297170;this['disposeWithMe'](this[_0x20d196(0x120)][_0x20d196(0x109)]['pipe'](_0x2cb961(0x10))[_0x20d196(0x131)](_0x147f5c=>{const _0x4e198f=_0x20d196,_0x56af3c=new Set();_0x147f5c[_0x4e198f(0x13a)](_0x47d622=>{const _0x4cc4a3=_0x4e198f;switch(_0x47d622[_0x4cc4a3(0x13c)]){case _0x4cc4a3(0x116):{const _0x16a166=_0x47d622[_0x4cc4a3(0x122)]['personId'];_0x56af3c['add'](_0x16a166);break;}}}),B(this[_0x4e198f(0x10a)],_0x56af3c);}));}[_0x297170(0x13d)](){const _0xbcc2b0=_0x297170;this[_0xbcc2b0(0x111)](this[_0xbcc2b0(0x13e)]['commentUpdate$'][_0xbcc2b0(0x131)](async _0x463f1e=>{const _0x3c1d79=_0xbcc2b0;var _0x1a0523,_0x5d5bf3,_0x1399e1,_0x4f4acd;const _0x3c71a8=(_0x1a0523=this[_0x3c1d79(0x120)][_0x3c1d79(0x140)](_0x463f1e[_0x3c1d79(0x10f)])[_0x3c1d79(0x154)](_0x4d2534=>_0x4d2534[_0x3c1d79(0x11d)]===_0x463f1e[_0x3c1d79(0x11d)]))==null?void 0x0:_0x1a0523['root'];if(!_0x3c71a8)return;const {unitId:_0x167d17,subUnitId:_0x1197a4}=_0x3c71a8;switch(_0x463f1e[_0x3c1d79(0x142)]&&this[_0x3c1d79(0x12a)][_0x3c1d79(0x10b)](_0x463f1e['user']),_0x463f1e[_0x3c1d79(0x13c)]){case v[_0x3c1d79(0x132)]:break;case v[_0x3c1d79(0x144)]:{this[_0x3c1d79(0x120)][_0x3c1d79(0x127)](_0x167d17,_0x1197a4,{'unitId':_0x167d17,'subUnitId':_0x1197a4,'ref':'','id':_0x463f1e[_0x3c1d79(0x136)],'dT':D(+_0x463f1e[_0x3c1d79(0x14e)]),'threadId':_0x463f1e['threadId'],'personId':(_0x1399e1=(_0x5d5bf3=_0x463f1e['user'])==null?void 0x0:_0x5d5bf3['userID'])!=null?_0x1399e1:_0x463f1e[_0x3c1d79(0x12f)],'text':JSON[_0x3c1d79(0x125)](_0x463f1e[_0x3c1d79(0x114)]),'parentId':_0x3c71a8['id']});break;}case v['Delete']:{const _0x3d558f=this[_0x3c1d79(0x120)][_0x3c1d79(0x14d)](_0x167d17,_0x1197a4,_0x463f1e[_0x3c1d79(0x136)]);_0x3d558f&&_0x3d558f['parentId']&&this['_threadCommentModel'][_0x3c1d79(0x137)](_0x167d17,_0x1197a4,_0x463f1e[_0x3c1d79(0x136)]);break;}case v[_0x3c1d79(0x124)]:{this['_threadCommentModel'][_0x3c1d79(0x138)](_0x167d17,_0x1197a4,{'commentId':_0x463f1e[_0x3c1d79(0x136)],'text':JSON[_0x3c1d79(0x125)](_0x463f1e[_0x3c1d79(0x114)])});break;}case v['Solve']:{const _0x437ec6=(_0x4f4acd=this[_0x3c1d79(0x120)]['getUnit'](_0x463f1e[_0x3c1d79(0x10f)])[_0x3c1d79(0x154)](_0x1a2b04=>_0x1a2b04['threadId']===_0x463f1e[_0x3c1d79(0x11d)]))==null?void 0x0:_0x4f4acd[_0x3c1d79(0x14b)];_0x437ec6&&this[_0x3c1d79(0x120)][_0x3c1d79(0xfe)](_0x167d17,_0x1197a4,_0x437ec6['id'],_0x463f1e[_0x3c1d79(0x103)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x3ff32b(_0x402890)),p(0x1,_0x3ff32b(_0x47dbdb)),p(0x2,_0x3ff32b(_0x95a105)),p(0x3,_0x3ff32b(_0x47bae4))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x28ff8a,_0x2fb894,_0x495986,_0x362829)=>{const _0x1b199c=_0x297170;for(var _0x8f0b6d=_0x362829>0x1?void 0x0:_0x362829?k(_0x2fb894,_0x495986):_0x2fb894,_0x1af1d5=_0x28ff8a[_0x1b199c(0x121)]-0x1,_0x37cbc0;_0x1af1d5>=0x0;_0x1af1d5--)(_0x37cbc0=_0x28ff8a[_0x1af1d5])&&(_0x8f0b6d=_0x37cbc0(_0x8f0b6d)||_0x8f0b6d);return _0x8f0b6d;},_=(_0x12b65c,_0x1c7902)=>(_0x5ed37e,_0x2fed6d)=>_0x1c7902(_0x5ed37e,_0x2fed6d,_0x12b65c);function X(_0x3184ff,_0x2d6b4b){const _0xcaa39=_0x297170,_0x1d5c88=_0x3184ff[_0xcaa39(0xfb)][0x0];return{..._0x2d6b4b,'id':_0x1d5c88['replyId'],'resolved':_0x3184ff['solved']===0x1,'dT':D(_0x1d5c88[_0xcaa39(0x14e)]),'personId':_0x1d5c88[_0xcaa39(0x12f)],'threadId':_0x1d5c88[_0xcaa39(0x11d)]};}function ee(_0x47b1c7,_0x428aa3,_0x4cd724){const _0x564aae=_0x297170;var _0x2ac0a5,_0x38e522;if(((_0x38e522=(_0x2ac0a5=_0x47b1c7==null?void 0x0:_0x47b1c7[_0x564aae(0xfb)])==null?void 0x0:_0x2ac0a5['length'])!=null?_0x38e522:0x0)>0x0){const _0x2592d3=(_0x562d01,_0x5749f7)=>({'id':_0x562d01['replyId'],'threadId':_0x562d01[_0x564aae(0x11d)],'dT':D(_0x562d01[_0x564aae(0x14e)]),'personId':_0x562d01[_0x564aae(0x12f)],'resolved':_0x47b1c7['solved']===I[_0x564aae(0x110)],'unitId':_0x428aa3,'subUnitId':_0x4cd724,'text':JSON['parse'](_0x562d01[_0x564aae(0x114)]),'parentId':_0x5749f7}),_0x19c2f4=_0x2592d3(_0x47b1c7[_0x564aae(0xfb)][0x0]);return{..._0x19c2f4,'children':_0x47b1c7['replies']['slice'](0x1)['map'](_0x80f21f=>_0x2592d3(_0x80f21f,_0x19c2f4['id']))};}return null;}let f=class{constructor(_0x5557e5,_0x16bf2a,_0x13e01e,_0x455c67){const _0xa36daf=_0x297170;this[_0xa36daf(0x115)]=_0x5557e5,this['_userService']=_0x16bf2a,this[_0xa36daf(0x113)]=_0x13e01e,this[_0xa36daf(0x10a)]=_0x455c67;}async[_0x297170(0x127)](_0x2aa293){const _0x21200b=_0x297170;var _0x41aeb9,_0x3fe16c;const {parentId:_0x291a68,unitId:_0x4a6a21,text:_0x29c4e6,threadId:_0x59e976}=_0x2aa293,_0x3c73e6=(_0x3fe16c=(_0x41aeb9=_0x29c4e6['customRanges'])==null?void 0x0:_0x41aeb9[_0x21200b(0x119)](_0x599dfe=>_0x599dfe['rangeType']===_0x9ed84b['COMMENT'])[_0x21200b(0x150)](_0x4f9cbe=>_0x4f9cbe[_0x21200b(0x149)]))!=null?_0x3fe16c:[],_0x3a927e=JSON[_0x21200b(0x143)](_0x29c4e6),_0x894962=(await this[_0x21200b(0x113)][_0x21200b(0x12e)](_0x4a6a21))[_0x21200b(0x148)]();if(_0x291a68){const _0xf7b59={'memberId':_0x894962,'unitId':_0x4a6a21,'content':_0x3a927e,'mention':_0x3c73e6,'threadId':_0x59e976},_0x336f01=(await this[_0x21200b(0x115)][_0x21200b(0x155)](_0x21200b(0x11a)+_0x4a6a21+'/reply',{'body':_0xf7b59}))[_0x21200b(0x104)]['reply'];return{..._0x2aa293,'id':_0x336f01['replyId'],'dT':_0x14c484(+_0x336f01[_0x21200b(0x14e)])[_0x21200b(0x156)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x336f01[_0x21200b(0x12f)]};}else{const _0x27932b={'memberId':_0x894962,'unitId':_0x4a6a21,'content':_0x3a927e,'mention':_0x3c73e6},_0x52d768=await this[_0x21200b(0x115)][_0x21200b(0x155)](_0x21200b(0x11a)+_0x4a6a21+'/add',{'body':_0x27932b});return X(_0x52d768[_0x21200b(0x104)][_0x21200b(0x14c)],_0x2aa293);}}async['updateComment'](_0x4275a5){const _0x457dc0=_0x297170;var _0x3ee75a,_0x24bdcb;const {text:_0x3e620e,unitId:_0x3e0aef}=_0x4275a5,_0x1e13ba=(_0x24bdcb=(_0x3ee75a=_0x3e620e['customRanges'])==null?void 0x0:_0x3ee75a[_0x457dc0(0x119)](_0x576a6d=>_0x576a6d[_0x457dc0(0x102)]===_0x9ed84b[_0x457dc0(0x130)])[_0x457dc0(0x150)](_0x1a4377=>_0x1a4377[_0x457dc0(0x149)]))!=null?_0x24bdcb:[],_0x1b3d75=JSON['stringify'](_0x3e620e),_0xf2f4e6=_0x4275a5['threadId'],_0x485d71=_0x4275a5['id'],_0x2b4b03={'memberId':(await this[_0x457dc0(0x113)][_0x457dc0(0x12e)](_0x3e0aef))['getMemberID'](),'unitId':_0x3e0aef,'threadId':_0xf2f4e6,'mention':_0x1e13ba,'content':_0x1b3d75,'replyId':_0x485d71},_0x44539d=await this[_0x457dc0(0x115)][_0x457dc0(0x155)]('/universer-api/comment/unit/'+_0x3e0aef+_0x457dc0(0xff),{'body':_0x2b4b03});return!_0x44539d[_0x457dc0(0x104)][_0x457dc0(0x14f)]||_0x44539d['body'][_0x457dc0(0x14f)][_0x457dc0(0x145)]===0x1;}async[_0x297170(0xfe)](_0x4388ea){const _0x4577a2=_0x297170,{unitId:_0x42e453}=_0x4388ea,_0x300be7=_0x4388ea['threadId'],_0x203583={'memberId':this[_0x4577a2(0x12a)][_0x4577a2(0x146)]()[_0x4577a2(0x117)],'unitId':_0x42e453,'threadId':_0x300be7,'solved':_0x4388ea[_0x4577a2(0x152)]?I[_0x4577a2(0x110)]:I[_0x4577a2(0x106)]},_0xd88d6=await this['_httpService']['post'](_0x4577a2(0x11a)+_0x42e453+'/solved',{'body':_0x203583});return!_0xd88d6[_0x4577a2(0x104)][_0x4577a2(0x14f)]||_0xd88d6[_0x4577a2(0x104)][_0x4577a2(0x14f)][_0x4577a2(0x145)]===0x1;}async['deleteComment'](_0x3fd85c,_0x18fefd,_0x489806,_0x15076b){const _0xa9eea6=_0x297170,_0x631d8c={'memberId':(await this['_sessionService'][_0xa9eea6(0x12e)](_0x3fd85c))[_0xa9eea6(0x148)](),'threadId':_0x489806,'replyId':_0x15076b,'unitId':_0x3fd85c},_0x5620b2=await this[_0xa9eea6(0x115)][_0xa9eea6(0x155)](_0xa9eea6(0x11a)+_0x3fd85c+_0xa9eea6(0x118),{'body':_0x631d8c});return!_0x5620b2[_0xa9eea6(0x104)][_0xa9eea6(0x14f)]||_0x5620b2[_0xa9eea6(0x104)][_0xa9eea6(0x14f)][_0xa9eea6(0x145)]===0x1;}async[_0x297170(0x10d)](_0x1bb5dc,_0x47b91c,_0x31be4b){const _0x21c9f4=_0x297170,_0x203d0b={'unitId':_0x1bb5dc,'threadId':_0x31be4b},_0x347204=await this['_httpService'][_0x21c9f4(0x155)](_0x21c9f4(0x11a)+_0x1bb5dc+'/list',{'body':_0x203d0b}),_0x3175fa=_0x31be4b[_0x21c9f4(0x150)](_0x21ef01=>ee(_0x347204['body'][_0x21c9f4(0x13b)][_0x21ef01],_0x1bb5dc,_0x47b91c))['filter'](Boolean);return Object[_0x21c9f4(0x10e)](_0x347204[_0x21c9f4(0x104)]['users'])[_0x21c9f4(0x13a)](_0x2e2be9=>{const _0x552646=_0x21c9f4;this[_0x552646(0x12a)][_0x552646(0x10b)](_0x2e2be9);}),_0x3175fa;}[_0x297170(0x147)](_0xc5e6f9){const _0x337170=_0x297170;return{'id':_0xc5e6f9['id'],'threadId':_0xc5e6f9['threadId'],'ref':_0xc5e6f9[_0x337170(0x13f)]};}};f=Q([_(0x0,_0x3ff32b(_0x48d5dd)),_(0x1,_0x3ff32b(_0x95a105)),_(0x2,_0x3ff32b(_0x288d12)),_(0x3,_0x3ff32b(_0x47bae4))],f);var re=Object[_0x297170(0x141)],te=(_0x457479,_0x5bc6ad,_0x3da56e,_0x377ae9)=>{for(var _0x5eb2a8=_0x377ae9>0x1?void 0x0:_0x377ae9?re(_0x5bc6ad,_0x3da56e):_0x5bc6ad,_0x39e7d9=_0x457479['length']-0x1,_0x2c78cc;_0x39e7d9>=0x0;_0x39e7d9--)(_0x2c78cc=_0x457479[_0x39e7d9])&&(_0x5eb2a8=_0x2c78cc(_0x5eb2a8)||_0x5eb2a8);return _0x5eb2a8;},N=(_0x5e6060,_0x3d014b)=>(_0x2a4acf,_0x199fdd)=>_0x3d014b(_0x2a4acf,_0x199fdd,_0x5e6060);function _0x8653(){const _0x28528e=['Add','_initUserSync','UNRECOGNIZED','5DiDFMz','replyId','deleteComment','updateComment','_threadCommentDataSourceService','forEach','comments','type','_init','_commentService','ref','getUnit','getOwnPropertyDescriptor','user','stringify','Reply','code','getCurrentUser','saveCommentToSnapshot','getMemberID','rangeId','3eTCogY','root','comment','getComment','createTimestamp','error','map','dataSource','resolved','_threadCommentDataSource','find','post','format','172333QGzNtl','Unknown','getUser','replies','pluginName','1220970MdGIXG','resolveComment','/edit','delete','1711902WgvgCy','rangeType','solved','body','onStarting','OpenOrReOpen','103NmfUIF','users','commentUpdate$','_injector','addUser','/universer-api/user/list','listComments','values','unitId','Solved','disposeWithMe','_config','_sessionService','content','_httpService','add','userID','/delete','filter','/universer-api/comment/unit/','2354984vEiZUJ','syncUpdateMutationToColla','threadId','1617556yvFYPg','8198OXsyWT','_threadCommentModel','length','payload','onReady','Edit','parse','size','addComment','_configService','645750vyYLTg','_userService','setConfig','Solve','get','requireSession','userId','COMMENT','subscribe'];_0x8653=function(){return _0x28528e;};return _0x8653();}let g=class extends _0x5963a4{constructor(_0x33c47a,_0x49917b){const _0x5c615a=_0x297170;super(),this[_0x5c615a(0x139)]=_0x33c47a,this[_0x5c615a(0x153)]=_0x49917b,this['_initDataSource']();}['_initDataSource'](){const _0xc9355f=_0x297170;this[_0xc9355f(0x139)][_0xc9355f(0x151)]=this[_0xc9355f(0x153)],this['_threadCommentDataSourceService'][_0xc9355f(0x11c)]=!0x1;}};function _0x31ac(_0x497322,_0x50a33){const _0x865386=_0x8653();return _0x31ac=function(_0x31ac2d,_0xb9e28f){_0x31ac2d=_0x31ac2d-0xfa;let _0x162a10=_0x865386[_0x31ac2d];return _0x162a10;},_0x31ac(_0x497322,_0x50a33);}g=te([N(0x0,_0x373199),N(0x1,_0x3ff32b(f))],g);var se=Object['defineProperty'],oe=Object[_0x297170(0x141)],ne=(_0x1dab4c,_0x139882,_0x41354c)=>_0x139882 in _0x1dab4c?se(_0x1dab4c,_0x139882,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x41354c}):_0x1dab4c[_0x139882]=_0x41354c,ie=(_0x4752d3,_0xf5acd2,_0x5136fb,_0x190eb4)=>{const _0x53a8a4=_0x297170;for(var _0x359ab7=_0x190eb4>0x1?void 0x0:_0x190eb4?oe(_0xf5acd2,_0x5136fb):_0xf5acd2,_0x4fba82=_0x4752d3[_0x53a8a4(0x121)]-0x1,_0x13b13d;_0x4fba82>=0x0;_0x4fba82--)(_0x13b13d=_0x4752d3[_0x4fba82])&&(_0x359ab7=_0x13b13d(_0x359ab7)||_0x359ab7);return _0x359ab7;},w=(_0x48566f,_0x1b73c8)=>(_0x339429,_0x482147)=>_0x1b73c8(_0x339429,_0x482147,_0x48566f),$=(_0x5e0f3e,_0x12d9e5,_0x3bdc21)=>ne(_0x5e0f3e,typeof _0x12d9e5!='symbol'?_0x12d9e5+'':_0x12d9e5,_0x3bdc21);let b=class extends _0x341216{constructor(_0x313507=M,_0x1b58fa,_0x5165ba){const _0x2221f8=_0x297170;super(),this['_config']=_0x313507,this[_0x2221f8(0x10a)]=_0x1b58fa,this[_0x2221f8(0x128)]=_0x5165ba;const {..._0x4384e8}=_0x2c3e44({},M,this[_0x2221f8(0x112)]);this[_0x2221f8(0x128)][_0x2221f8(0x12b)](z,_0x4384e8);}[_0x297170(0x105)](){const _0x5b3bac=_0x297170;[[f],[g],[S]][_0x5b3bac(0x13a)](_0x5b3774=>{const _0x50a89d=_0x5b3bac;this[_0x50a89d(0x10a)][_0x50a89d(0x116)](_0x5b3774);});}[_0x297170(0x123)](){const _0x2c0756=_0x297170;this[_0x2c0756(0x10a)][_0x2c0756(0x12d)](g),this[_0x2c0756(0x10a)]['get'](S);}};$(b,_0x297170(0xfc),W),$(b,_0x297170(0x13c),_0x2678d6['UNIVER_UNKNOWN']),b=ie([_0x557d35(_0x16c7d9,_0x32f6c5,_0x3729ac),w(0x1,_0x3ff32b(_0x47bae4)),w(0x2,_0x309048)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x3f16(){const _0x533f13=['add','error','ThreadCommentModel','87584HUhFhV','symbol','_httpService','Module','parentId','Reply','post','rangeType','deleteComment','1365480RVqRuJ','@univerjs-pro/collaboration-client','UniverInstanceType','HTTPService','_injector','getUnit','onReady','root','_threadCommentDataSource','code','UniverThreadCommentUi','updateComment','function','232508SapGpd','DependentOn','listComments','/reply','_commentService','/solved','addComment','forEach','getUser','@univerjs/network','comments','body','length','size','dayjs','addUser','UniverProCollaborationClient','CollaborationSessionService','defineProperty','UniverNetwork','ref','requireSession','commentUpdate$','createTimestamp','995547YZsnWG','Inject','filter','_threadCommentDataSourceService','replies','81xDmrgV','@univerjs/core','resolved','Solved','customRanges','3WWqiKj','getCurrentUser','Plugin','rxjs','UniverProLicense','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','bufferTime','getMemberID','COMMENT','_userService','exports','Delete','personId','find','UniverProThreadCommentDatasource','slice','values','Add','threadId','CommentService','UNRECOGNIZED','userId','comment','Unknown','solved','5YYHDJh','amd','_sessionService','subscribe','map','OpenOrReOpen','780968YRzPcN','unitId','rangeId','_configService','_init','getOwnPropertyDescriptor','setConfig','/universer-api/comment/unit/','_config','UniverLicensePlugin','Disposable','onStarting','CustomRangeType','format','disposeWithMe','replyId','Injector','/edit','type','/delete','_initUserSync','object','users','user','stringify','UniverThreadCommentDataSourcePlugin','pluginName','Solve','merge','/list','syncUpdateMutationToColla','content','928506spmift','UNIVER_UNKNOWN','57104OAPFPZ','userID','parse','dataSource','thread-comment-data-source.config','@univerjs/thread-comment-ui','get','/universer-api/user/list','UserManagerService','_threadCommentModel','Edit','YYYY/MM/DD\x20HH:mm','reply'];_0x3f16=function(){return _0x533f13;};return _0x3f16();}function _0x1b41(_0x379ebb,_0x52d64b){const _0x3f1671=_0x3f16();return _0x1b41=function(_0x1b41a7,_0x54ffd4){_0x1b41a7=_0x1b41a7-0x1b7;let _0x5826e8=_0x3f1671[_0x1b41a7];return _0x5826e8;},_0x1b41(_0x379ebb,_0x52d64b);}(function(_0x585621,_0x29707e){const _0x59cb97=_0x1b41,_0x36dc0d=_0x585621();while(!![]){try{const _0x423c35=parseInt(_0x59cb97(0x218))/0x1+parseInt(_0x59cb97(0x22e))/0x2*(parseInt(_0x59cb97(0x1c7))/0x3)+-parseInt(_0x59cb97(0x1e6))/0x4+-parseInt(_0x59cb97(0x1e0))/0x5*(-parseInt(_0x59cb97(0x206))/0x6)+parseInt(_0x59cb97(0x1bd))/0x7+parseInt(_0x59cb97(0x208))/0x8*(-parseInt(_0x59cb97(0x1c2))/0x9)+-parseInt(_0x59cb97(0x221))/0xa;if(_0x423c35===_0x29707e)break;else _0x36dc0d['push'](_0x36dc0d['shift']());}catch(_0x3e592c){_0x36dc0d['push'](_0x36dc0d['shift']());}}}(_0x3f16,0x1994a),function(_0x3f16f6,_0x290e1d){const _0x4465f7=_0x1b41;typeof exports==_0x4465f7(0x1fb)&&typeof module<'u'?_0x290e1d(exports,require(_0x4465f7(0x222)),require('@univerjs-pro/license'),require(_0x4465f7(0x1c3)),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require(_0x4465f7(0x1ca)),require(_0x4465f7(0x237))):typeof define==_0x4465f7(0x22d)&&define[_0x4465f7(0x1e1)]?define([_0x4465f7(0x1d1),_0x4465f7(0x222),'@univerjs-pro/license',_0x4465f7(0x1c3),_0x4465f7(0x20d),'@univerjs/thread-comment',_0x4465f7(0x1ca),'@univerjs/network'],_0x290e1d):(_0x3f16f6=typeof globalThis<'u'?globalThis:_0x3f16f6||self,_0x290e1d(_0x3f16f6[_0x4465f7(0x1d5)]={},_0x3f16f6[_0x4465f7(0x23e)],_0x3f16f6[_0x4465f7(0x1cb)],_0x3f16f6['UniverCore'],_0x3f16f6[_0x4465f7(0x22b)],_0x3f16f6['UniverThreadComment'],_0x3f16f6['rxjs'],_0x3f16f6[_0x4465f7(0x1b8)]));}(this,function(_0x24ed3d,_0x4b6958,_0x4a61dd,_0x8ba108,_0x56d5d9,_0x47d0a6,_0x39e82a,_0x50014d){'use strict';const _0xd9dc20=_0x1b41;const _0x299ca5=_0xd9dc20(0x1cc);var _0x527132=(_0x8292e0=>(_0x8292e0[_0x8292e0['OpenOrReOpen']=0x0]=_0xd9dc20(0x1e5),_0x8292e0[_0x8292e0[_0xd9dc20(0x1c5)]=0x1]=_0xd9dc20(0x1c5),_0x8292e0[_0x8292e0['UNRECOGNIZED']=-0x1]=_0xd9dc20(0x1db),_0x8292e0))(_0x527132||{}),_0x1ab4b5=(_0x22f7ef=>(_0x22f7ef[_0x22f7ef['Unknown']=0x0]=_0xd9dc20(0x1de),_0x22f7ef[_0x22f7ef[_0xd9dc20(0x1d8)]=0x1]='Add',_0x22f7ef[_0x22f7ef[_0xd9dc20(0x21d)]=0x2]='Reply',_0x22f7ef[_0x22f7ef[_0xd9dc20(0x212)]=0x3]=_0xd9dc20(0x212),_0x22f7ef[_0x22f7ef[_0xd9dc20(0x1d2)]=0x4]='Delete',_0x22f7ef[_0x22f7ef[_0xd9dc20(0x201)]=0x5]=_0xd9dc20(0x201),_0x22f7ef[_0x22f7ef[_0xd9dc20(0x1db)]=-0x1]=_0xd9dc20(0x1db),_0x22f7ef))(_0x1ab4b5||{});const _0x19b69f=_0x2f4cae=>_0x8ba108[_0xd9dc20(0x23c)](new Date(+_0x2f4cae))[_0xd9dc20(0x1f3)](_0xd9dc20(0x213)),_0x36a832=async(_0x5e7c4d,_0x5b1517)=>{const _0x395be8=_0xd9dc20,_0x4229e1=_0x5e7c4d[_0x395be8(0x20e)](_0x8ba108['UserManagerService']),_0x5ac6e9=_0x5e7c4d[_0x395be8(0x20e)](_0x50014d[_0x395be8(0x224)]);_0x5b1517[_0x395be8(0x235)](_0x4a8641=>{const _0x419481=_0x395be8;_0x4229e1[_0x419481(0x236)](_0x4a8641)&&_0x5b1517['delete'](_0x4a8641);}),_0x5b1517[_0x395be8(0x23b)]&&(await _0x5ac6e9['get'](_0x395be8(0x20f),{'params':{'userIDs':[..._0x5b1517]}}))[_0x395be8(0x239)][_0x395be8(0x1fc)]['forEach'](_0x558660=>{const _0x129931=_0x395be8;_0x558660&&_0x4229e1[_0x129931(0x23d)](_0x558660);});};var _0xe1934b=Object['getOwnPropertyDescriptor'],_0x2801e3=(_0x58b446,_0x3732db,_0x4204c1,_0x41e259)=>{const _0x1edf36=_0xd9dc20;for(var _0xb60792=_0x41e259>0x1?void 0x0:_0x41e259?_0xe1934b(_0x3732db,_0x4204c1):_0x3732db,_0x39bf7d=_0x58b446[_0x1edf36(0x23a)]-0x1,_0x43f59f;_0x39bf7d>=0x0;_0x39bf7d--)(_0x43f59f=_0x58b446[_0x39bf7d])&&(_0xb60792=_0x43f59f(_0xb60792)||_0xb60792);return _0xb60792;},_0x46d7c4=(_0x544d68,_0x2d9244)=>(_0x26664a,_0x2618ec)=>_0x2d9244(_0x26664a,_0x2618ec,_0x544d68);let _0x257958=class extends _0x8ba108['Disposable']{constructor(_0x3d3cea,_0x443e0d,_0x4dadf9,_0x5f5725){const _0x27717d=_0xd9dc20;super(),this[_0x27717d(0x232)]=_0x3d3cea,this[_0x27717d(0x211)]=_0x443e0d,this['_userService']=_0x4dadf9,this[_0x27717d(0x225)]=_0x5f5725,this['_init'](),this['_initUserSync']();}[_0xd9dc20(0x1fa)](){const _0x32dd7a=_0xd9dc20;this['disposeWithMe'](this['_threadCommentModel'][_0x32dd7a(0x1bb)]['pipe'](_0x39e82a[_0x32dd7a(0x1cd)](0x10))[_0x32dd7a(0x1e3)](_0x19b19b=>{const _0x58c893=_0x32dd7a,_0x5f1b95=new Set();_0x19b19b['forEach'](_0x57da52=>{const _0x39a007=_0x1b41;switch(_0x57da52['type']){case _0x39a007(0x215):{const _0x1c3733=_0x57da52['payload'][_0x39a007(0x1d3)];_0x5f1b95['add'](_0x1c3733);break;}}}),_0x36a832(this[_0x58c893(0x225)],_0x5f1b95);}));}[_0xd9dc20(0x1ea)](){const _0x2c8c79=_0xd9dc20;this[_0x2c8c79(0x1f4)](this[_0x2c8c79(0x232)][_0x2c8c79(0x1bb)]['subscribe'](async _0x28c715=>{const _0x179b25=_0x2c8c79;var _0x841773,_0x24c0af,_0x4f0f7b,_0x21afd1;const _0xc1bf97=(_0x841773=this[_0x179b25(0x211)][_0x179b25(0x226)](_0x28c715[_0x179b25(0x1e7)])[_0x179b25(0x1d4)](_0xab4354=>_0xab4354[_0x179b25(0x1d9)]===_0x28c715[_0x179b25(0x1d9)]))==null?void 0x0:_0x841773['root'];if(!_0xc1bf97)return;const {unitId:_0x3f8a30,subUnitId:_0x433acd}=_0xc1bf97;switch(_0x28c715[_0x179b25(0x1fd)]&&this[_0x179b25(0x1d0)][_0x179b25(0x23d)](_0x28c715[_0x179b25(0x1fd)]),_0x28c715['type']){case _0x1ab4b5[_0x179b25(0x1d8)]:break;case _0x1ab4b5['Reply']:{this[_0x179b25(0x211)][_0x179b25(0x234)](_0x3f8a30,_0x433acd,{'unitId':_0x3f8a30,'subUnitId':_0x433acd,'ref':'','id':_0x28c715[_0x179b25(0x1f5)],'dT':_0x19b69f(+_0x28c715[_0x179b25(0x1bc)]),'threadId':_0x28c715['threadId'],'personId':(_0x4f0f7b=(_0x24c0af=_0x28c715[_0x179b25(0x1fd)])==null?void 0x0:_0x24c0af[_0x179b25(0x209)])!=null?_0x4f0f7b:_0x28c715[_0x179b25(0x1dc)],'text':JSON['parse'](_0x28c715[_0x179b25(0x205)]),'parentId':_0xc1bf97['id']});break;}case _0x1ab4b5[_0x179b25(0x1d2)]:{const _0x57d38c=this['_threadCommentModel']['getComment'](_0x3f8a30,_0x433acd,_0x28c715['replyId']);_0x57d38c&&_0x57d38c[_0x179b25(0x21c)]&&this['_threadCommentModel'][_0x179b25(0x220)](_0x3f8a30,_0x433acd,_0x28c715[_0x179b25(0x1f5)]);break;}case _0x1ab4b5['Edit']:{this[_0x179b25(0x211)][_0x179b25(0x22c)](_0x3f8a30,_0x433acd,{'commentId':_0x28c715[_0x179b25(0x1f5)],'text':JSON[_0x179b25(0x20a)](_0x28c715[_0x179b25(0x205)])});break;}case _0x1ab4b5[_0x179b25(0x201)]:{const _0x969f8d=(_0x21afd1=this[_0x179b25(0x211)][_0x179b25(0x226)](_0x28c715[_0x179b25(0x1e7)])[_0x179b25(0x1d4)](_0x19c65b=>_0x19c65b[_0x179b25(0x1d9)]===_0x28c715[_0x179b25(0x1d9)]))==null?void 0x0:_0x21afd1[_0x179b25(0x228)];_0x969f8d&&this[_0x179b25(0x211)]['resolveComment'](_0x3f8a30,_0x433acd,_0x969f8d['id'],_0x28c715['solved']===_0x527132[_0x179b25(0x1c5)]);break;}}}));}};_0x257958=_0x2801e3([_0x46d7c4(0x0,_0x8ba108[_0xd9dc20(0x1be)](_0x4b6958[_0xd9dc20(0x1da)])),_0x46d7c4(0x1,_0x8ba108[_0xd9dc20(0x1be)](_0x47d0a6[_0xd9dc20(0x217)])),_0x46d7c4(0x2,_0x8ba108[_0xd9dc20(0x1be)](_0x8ba108[_0xd9dc20(0x210)])),_0x46d7c4(0x3,_0x8ba108[_0xd9dc20(0x1be)](_0x8ba108[_0xd9dc20(0x1f6)]))],_0x257958);const _0x5963a3=_0xd9dc20(0x20c),_0x1ebfe0={};var _0x3e93cd=Object[_0xd9dc20(0x1eb)],_0x20ec76=(_0x3625dd,_0x5f48f5,_0x563321,_0x1c2b44)=>{for(var _0x55c0a9=_0x1c2b44>0x1?void 0x0:_0x1c2b44?_0x3e93cd(_0x5f48f5,_0x563321):_0x5f48f5,_0x238d0d=_0x3625dd['length']-0x1,_0x522b42;_0x238d0d>=0x0;_0x238d0d--)(_0x522b42=_0x3625dd[_0x238d0d])&&(_0x55c0a9=_0x522b42(_0x55c0a9)||_0x55c0a9);return _0x55c0a9;},_0x50759f=(_0x2c26ad,_0x2a780f)=>(_0x5d51d3,_0x4ff7b2)=>_0x2a780f(_0x5d51d3,_0x4ff7b2,_0x2c26ad);function _0x4cc20f(_0x39220e,_0x502e8e){const _0x3eff86=_0xd9dc20,_0xc14e70=_0x39220e[_0x3eff86(0x1c1)][0x0];return{..._0x502e8e,'id':_0xc14e70[_0x3eff86(0x1f5)],'resolved':_0x39220e[_0x3eff86(0x1df)]===0x1,'dT':_0x19b69f(_0xc14e70[_0x3eff86(0x1bc)]),'personId':_0xc14e70['userId'],'threadId':_0xc14e70[_0x3eff86(0x1d9)]};}function _0xd260ef(_0x1484f3,_0x1523d3,_0x3f0219){const _0x38ea1e=_0xd9dc20;var _0x4ab1d0,_0x26b215;if(((_0x26b215=(_0x4ab1d0=_0x1484f3==null?void 0x0:_0x1484f3[_0x38ea1e(0x1c1)])==null?void 0x0:_0x4ab1d0[_0x38ea1e(0x23a)])!=null?_0x26b215:0x0)>0x0){const _0x24602e=(_0x1a45f1,_0x63a4c7)=>({'id':_0x1a45f1['replyId'],'threadId':_0x1a45f1[_0x38ea1e(0x1d9)],'dT':_0x19b69f(_0x1a45f1[_0x38ea1e(0x1bc)]),'personId':_0x1a45f1[_0x38ea1e(0x1dc)],'resolved':_0x1484f3['solved']===_0x527132[_0x38ea1e(0x1c5)],'unitId':_0x1523d3,'subUnitId':_0x3f0219,'text':JSON[_0x38ea1e(0x20a)](_0x1a45f1[_0x38ea1e(0x205)]),'parentId':_0x63a4c7}),_0x411958=_0x24602e(_0x1484f3[_0x38ea1e(0x1c1)][0x0]);return{..._0x411958,'children':_0x1484f3[_0x38ea1e(0x1c1)][_0x38ea1e(0x1d6)](0x1)['map'](_0x4b5b50=>_0x24602e(_0x4b5b50,_0x411958['id']))};}return null;}let _0x24593d=class{constructor(_0x553aea,_0x2c1d2b,_0xf58014,_0x10891f){const _0x54ce37=_0xd9dc20;this['_httpService']=_0x553aea,this[_0x54ce37(0x1d0)]=_0x2c1d2b,this[_0x54ce37(0x1e2)]=_0xf58014,this['_injector']=_0x10891f;}async[_0xd9dc20(0x234)](_0x16f180){const _0x50ab45=_0xd9dc20;var _0x72bc6,_0x3239cc;const {parentId:_0x3fad65,unitId:_0x51c35a,text:_0x35a7ca,threadId:_0x1b7e8d}=_0x16f180,_0x1eae6f=(_0x3239cc=(_0x72bc6=_0x35a7ca['customRanges'])==null?void 0x0:_0x72bc6[_0x50ab45(0x1bf)](_0xcbc757=>_0xcbc757[_0x50ab45(0x21f)]===_0x8ba108[_0x50ab45(0x1f2)][_0x50ab45(0x1cf)])[_0x50ab45(0x1e4)](_0x65bf2e=>_0x65bf2e['rangeId']))!=null?_0x3239cc:[],_0x5b1528=JSON[_0x50ab45(0x1fe)](_0x35a7ca),_0x501eb5=(await this[_0x50ab45(0x1e2)][_0x50ab45(0x1ba)](_0x51c35a))[_0x50ab45(0x1ce)]();if(_0x3fad65){const _0x3b7fef={'memberId':_0x501eb5,'unitId':_0x51c35a,'content':_0x5b1528,'mention':_0x1eae6f,'threadId':_0x1b7e8d},_0x120f60=(await this[_0x50ab45(0x21a)][_0x50ab45(0x21e)]('/universer-api/comment/unit/'+_0x51c35a+_0x50ab45(0x231),{'body':_0x3b7fef}))[_0x50ab45(0x239)][_0x50ab45(0x214)];return{..._0x16f180,'id':_0x120f60['replyId'],'dT':_0x8ba108['dayjs'](+_0x120f60[_0x50ab45(0x1bc)])[_0x50ab45(0x1f3)](_0x50ab45(0x213)),'personId':_0x120f60[_0x50ab45(0x1dc)]};}else{const _0x2a34f2={'memberId':_0x501eb5,'unitId':_0x51c35a,'content':_0x5b1528,'mention':_0x1eae6f},_0x511c95=await this[_0x50ab45(0x21a)][_0x50ab45(0x21e)](_0x50ab45(0x1ed)+_0x51c35a+'/add',{'body':_0x2a34f2});return _0x4cc20f(_0x511c95[_0x50ab45(0x239)][_0x50ab45(0x1dd)],_0x16f180);}}async[_0xd9dc20(0x22c)](_0x33e952){const _0x21e1a8=_0xd9dc20;var _0x1a8cc9,_0x3e21ea;const {text:_0x5f91a1,unitId:_0x5ef23a}=_0x33e952,_0x217489=(_0x3e21ea=(_0x1a8cc9=_0x5f91a1[_0x21e1a8(0x1c6)])==null?void 0x0:_0x1a8cc9['filter'](_0x226faa=>_0x226faa[_0x21e1a8(0x21f)]===_0x8ba108[_0x21e1a8(0x1f2)][_0x21e1a8(0x1cf)])['map'](_0x57e31a=>_0x57e31a[_0x21e1a8(0x1e8)]))!=null?_0x3e21ea:[],_0x51b7d8=JSON[_0x21e1a8(0x1fe)](_0x5f91a1),_0x1da904=_0x33e952[_0x21e1a8(0x1d9)],_0x893c32=_0x33e952['id'],_0x3e0f57={'memberId':(await this['_sessionService'][_0x21e1a8(0x1ba)](_0x5ef23a))[_0x21e1a8(0x1ce)](),'unitId':_0x5ef23a,'threadId':_0x1da904,'mention':_0x217489,'content':_0x51b7d8,'replyId':_0x893c32},_0x41ee93=await this['_httpService'][_0x21e1a8(0x21e)](_0x21e1a8(0x1ed)+_0x5ef23a+_0x21e1a8(0x1f7),{'body':_0x3e0f57});return!_0x41ee93['body'][_0x21e1a8(0x216)]||_0x41ee93['body'][_0x21e1a8(0x216)][_0x21e1a8(0x22a)]===0x1;}async['resolveComment'](_0x4666e7){const _0x38f7fa=_0xd9dc20,{unitId:_0x26e269}=_0x4666e7,_0x5be4a8=_0x4666e7[_0x38f7fa(0x1d9)],_0x5d5715={'memberId':this[_0x38f7fa(0x1d0)][_0x38f7fa(0x1c8)]()[_0x38f7fa(0x209)],'unitId':_0x26e269,'threadId':_0x5be4a8,'solved':_0x4666e7[_0x38f7fa(0x1c4)]?_0x527132['Solved']:_0x527132['OpenOrReOpen']},_0x55923b=await this[_0x38f7fa(0x21a)][_0x38f7fa(0x21e)](_0x38f7fa(0x1ed)+_0x26e269+_0x38f7fa(0x233),{'body':_0x5d5715});return!_0x55923b[_0x38f7fa(0x239)]['error']||_0x55923b[_0x38f7fa(0x239)][_0x38f7fa(0x216)]['code']===0x1;}async[_0xd9dc20(0x220)](_0x3a33d0,_0x152566,_0x469ebc,_0x1e5209){const _0x4b9d6b=_0xd9dc20,_0x496e8a={'memberId':(await this[_0x4b9d6b(0x1e2)][_0x4b9d6b(0x1ba)](_0x3a33d0))[_0x4b9d6b(0x1ce)](),'threadId':_0x469ebc,'replyId':_0x1e5209,'unitId':_0x3a33d0},_0x1e8124=await this['_httpService'][_0x4b9d6b(0x21e)](_0x4b9d6b(0x1ed)+_0x3a33d0+_0x4b9d6b(0x1f9),{'body':_0x496e8a});return!_0x1e8124[_0x4b9d6b(0x239)][_0x4b9d6b(0x216)]||_0x1e8124[_0x4b9d6b(0x239)][_0x4b9d6b(0x216)][_0x4b9d6b(0x22a)]===0x1;}async[_0xd9dc20(0x230)](_0x30eaed,_0x96dbff,_0x168369){const _0x107396=_0xd9dc20,_0x2404ef={'unitId':_0x30eaed,'threadId':_0x168369},_0x186d56=await this['_httpService']['post'](_0x107396(0x1ed)+_0x30eaed+_0x107396(0x203),{'body':_0x2404ef}),_0x51e000=_0x168369[_0x107396(0x1e4)](_0x3fbb51=>_0xd260ef(_0x186d56[_0x107396(0x239)][_0x107396(0x238)][_0x3fbb51],_0x30eaed,_0x96dbff))['filter'](Boolean);return Object[_0x107396(0x1d7)](_0x186d56['body'][_0x107396(0x1fc)])[_0x107396(0x235)](_0x3ec5b2=>{const _0x4d018c=_0x107396;this[_0x4d018c(0x1d0)]['addUser'](_0x3ec5b2);}),_0x51e000;}['saveCommentToSnapshot'](_0x34564c){const _0x2efb7d=_0xd9dc20;return{'id':_0x34564c['id'],'threadId':_0x34564c['threadId'],'ref':_0x34564c[_0x2efb7d(0x1b9)]};}};_0x24593d=_0x20ec76([_0x50759f(0x0,_0x8ba108[_0xd9dc20(0x1be)](_0x50014d['HTTPService'])),_0x50759f(0x1,_0x8ba108[_0xd9dc20(0x1be)](_0x8ba108[_0xd9dc20(0x210)])),_0x50759f(0x2,_0x8ba108[_0xd9dc20(0x1be)](_0x4b6958[_0xd9dc20(0x23f)])),_0x50759f(0x3,_0x8ba108[_0xd9dc20(0x1be)](_0x8ba108[_0xd9dc20(0x1f6)]))],_0x24593d);var _0x87a981=Object[_0xd9dc20(0x1eb)],_0x409830=(_0x2339e2,_0x81f701,_0x1f8de0,_0x51e9cb)=>{const _0x5b3069=_0xd9dc20;for(var _0x413706=_0x51e9cb>0x1?void 0x0:_0x51e9cb?_0x87a981(_0x81f701,_0x1f8de0):_0x81f701,_0x25c93e=_0x2339e2[_0x5b3069(0x23a)]-0x1,_0x130753;_0x25c93e>=0x0;_0x25c93e--)(_0x130753=_0x2339e2[_0x25c93e])&&(_0x413706=_0x130753(_0x413706)||_0x413706);return _0x413706;},_0x507e96=(_0x5b4773,_0xdd4361)=>(_0x2fab3d,_0x7e9d78)=>_0xdd4361(_0x2fab3d,_0x7e9d78,_0x5b4773);let _0x366456=class extends _0x8ba108[_0xd9dc20(0x1f0)]{constructor(_0xedf1e4,_0x43400a){const _0x3bd067=_0xd9dc20;super(),this['_threadCommentDataSourceService']=_0xedf1e4,this[_0x3bd067(0x229)]=_0x43400a,this['_initDataSource']();}['_initDataSource'](){const _0x477bf6=_0xd9dc20;this[_0x477bf6(0x1c0)][_0x477bf6(0x20b)]=this[_0x477bf6(0x229)],this[_0x477bf6(0x1c0)][_0x477bf6(0x204)]=!0x1;}};_0x366456=_0x409830([_0x507e96(0x0,_0x47d0a6['IThreadCommentDataSourceService']),_0x507e96(0x1,_0x8ba108['Inject'](_0x24593d))],_0x366456);var _0x2c2bc6=Object[_0xd9dc20(0x1b7)],_0x11e524=Object[_0xd9dc20(0x1eb)],_0xfe42b7=(_0x5bc393,_0x148947,_0x2337f3)=>_0x148947 in _0x5bc393?_0x2c2bc6(_0x5bc393,_0x148947,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2337f3}):_0x5bc393[_0x148947]=_0x2337f3,_0x36df0e=(_0x4ccf5c,_0x2e9607,_0x217ed9,_0x1efb0d)=>{const _0x1da006=_0xd9dc20;for(var _0x484964=_0x1efb0d>0x1?void 0x0:_0x1efb0d?_0x11e524(_0x2e9607,_0x217ed9):_0x2e9607,_0x42d1c0=_0x4ccf5c[_0x1da006(0x23a)]-0x1,_0x13f870;_0x42d1c0>=0x0;_0x42d1c0--)(_0x13f870=_0x4ccf5c[_0x42d1c0])&&(_0x484964=_0x13f870(_0x484964)||_0x484964);return _0x484964;},_0x5cd221=(_0x3da58b,_0x2b3e65)=>(_0x3e9376,_0x3e6b04)=>_0x2b3e65(_0x3e9376,_0x3e6b04,_0x3da58b),_0x772518=(_0x56614d,_0x5e97ff,_0x180108)=>_0xfe42b7(_0x56614d,typeof _0x5e97ff!=_0xd9dc20(0x219)?_0x5e97ff+'':_0x5e97ff,_0x180108);_0x24ed3d[_0xd9dc20(0x1ff)]=class extends _0x8ba108[_0xd9dc20(0x1c9)]{constructor(_0x35f5a1=_0x1ebfe0,_0x1f28ce,_0x299bbf){const _0x350231=_0xd9dc20;super(),this['_config']=_0x35f5a1,this['_injector']=_0x1f28ce,this['_configService']=_0x299bbf;const {..._0xbef2b2}=_0x8ba108[_0x350231(0x202)]({},_0x1ebfe0,this[_0x350231(0x1ee)]);this[_0x350231(0x1e9)][_0x350231(0x1ec)](_0x5963a3,_0xbef2b2);}[_0xd9dc20(0x1f1)](){const _0x3b0d56=_0xd9dc20;[[_0x24593d],[_0x366456],[_0x257958]][_0x3b0d56(0x235)](_0x2ebb08=>{const _0x5daf72=_0x3b0d56;this[_0x5daf72(0x225)][_0x5daf72(0x215)](_0x2ebb08);});}[_0xd9dc20(0x227)](){const _0x358fb7=_0xd9dc20;this[_0x358fb7(0x225)][_0x358fb7(0x20e)](_0x366456),this[_0x358fb7(0x225)]['get'](_0x257958);}},_0x772518(_0x24ed3d[_0xd9dc20(0x1ff)],_0xd9dc20(0x200),_0x299ca5),_0x772518(_0x24ed3d[_0xd9dc20(0x1ff)],_0xd9dc20(0x1f8),_0x8ba108[_0xd9dc20(0x223)][_0xd9dc20(0x207)]),_0x24ed3d['UniverThreadCommentDataSourcePlugin']=_0x36df0e([_0x8ba108[_0xd9dc20(0x22f)](_0x56d5d9['UniverThreadCommentUIPlugin'],_0x4b6958['UniverCollaborationClientPlugin'],_0x4a61dd[_0xd9dc20(0x1ef)]),_0x5cd221(0x1,_0x8ba108['Inject'](_0x8ba108[_0xd9dc20(0x1f6)])),_0x5cd221(0x2,_0x8ba108['IConfigService'])],_0x24ed3d[_0xd9dc20(0x1ff)]),Object[_0xd9dc20(0x1b7)](_0x24ed3d,Symbol['toStringTag'],{'value':_0xd9dc20(0x21b)});}));
1
+ function _0x1112(){const _0x4b0cba=['Add','solved','replies','Edit','_config','IConfigService','pluginName','UniverThreadCommentDataSourcePlugin','_httpService','customRanges','_threadCommentDataSourceService','map','2664204jdvbHY','_initDataSource','size','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Solve','getUnit','2793801oyiLSv','Inject','addComment','root','disposeWithMe','Disposable','@univerjs/thread-comment-ui','dataSource','getUser','code','getComment','pipe','toStringTag','_commentService','object','/reply','subscribe','4eZZEEr','get','_sessionService','@univerjs/thread-comment','type','UniverProThreadCommentDatasource','body','@univerjs/core','UniverLicensePlugin','COMMENT','userID','reply','UserManagerService','6UcrZLU','/edit','commentUpdate$','CustomRangeType','find','personId','forEach','HTTPService','CollaborationSessionService','parse','UNRECOGNIZED','6659710TBUZyt','Solved','/solved','payload','userId','add','ref','deleteComment','369AmeUqr','dayjs','_init','unitId','_threadCommentModel','_initUserSync','@univerjs/network','254472kaXVmc','rangeType','values','delete','_threadCommentDataSource','user','listComments','Delete','1520958SDnoQM','/universer-api/comment/unit/','UniverProLicense','11799240rxStyU','resolveComment','bufferTime','_injector','/list','onReady','stringify','/universer-api/user/list','Unknown','/delete','Reply','threadId','rxjs','onStarting','_userService','rangeId','content','DependentOn','addUser','YYYY/MM/DD\x20HH:mm','@univerjs-pro/license','format','getOwnPropertyDescriptor','Injector','Plugin','replyId','UniverThreadComment','error','8149533aBUdKt','filter','ThreadCommentModel','parentId','defineProperty','getMemberID','saveCommentToSnapshot','CommentService','createTimestamp','function','@univerjs-pro/collaboration-client','_configService','post','OpenOrReOpen','requireSession','syncUpdateMutationToColla','users','setConfig','UniverProCollaborationClient','IThreadCommentDataSourceService','UniverCore'];_0x1112=function(){return _0x4b0cba;};return _0x1112();}function _0x161e(_0x14ee43,_0x2c0c88){const _0x111207=_0x1112();return _0x161e=function(_0x161e95,_0x1f046b){_0x161e95=_0x161e95-0x6e;let _0x2fddd1=_0x111207[_0x161e95];return _0x2fddd1;},_0x161e(_0x14ee43,_0x2c0c88);}(function(_0x1edce7,_0x4d7f6c){const _0x334bb7=_0x161e,_0x3fbab4=_0x1edce7();while(!![]){try{const _0x17f395=-parseInt(_0x334bb7(0xe0))/0x1+parseInt(_0x334bb7(0xb1))/0x2*(parseInt(_0x334bb7(0xa0))/0x3)+parseInt(_0x334bb7(0x9a))/0x4+-parseInt(_0x334bb7(0xc9))/0x5+parseInt(_0x334bb7(0xbe))/0x6*(parseInt(_0x334bb7(0x79))/0x7)+-parseInt(_0x334bb7(0xd8))/0x8*(-parseInt(_0x334bb7(0xd1))/0x9)+-parseInt(_0x334bb7(0xe3))/0xa;if(_0x17f395===_0x4d7f6c)break;else _0x3fbab4['push'](_0x3fbab4['shift']());}catch(_0xaf17ab){_0x3fbab4['push'](_0x3fbab4['shift']());}}}(_0x1112,0xeb635),function(_0x13e501,_0x1fa985){const _0x1c9895=_0x161e;typeof exports==_0x1c9895(0xae)&&typeof module<'u'?_0x1fa985(exports,require(_0x1c9895(0x83)),require(_0x1c9895(0x71)),require(_0x1c9895(0xb8)),require(_0x1c9895(0xa6)),require(_0x1c9895(0xb4)),require(_0x1c9895(0xef)),require('@univerjs/network')):typeof define==_0x1c9895(0x82)&&define['amd']?define(['exports',_0x1c9895(0x83),_0x1c9895(0x71),_0x1c9895(0xb8),_0x1c9895(0xa6),_0x1c9895(0xb4),'rxjs',_0x1c9895(0xd7)],_0x1fa985):(_0x13e501=typeof globalThis<'u'?globalThis:_0x13e501||self,_0x1fa985(_0x13e501[_0x1c9895(0xb6)]={},_0x13e501[_0x1c9895(0x8b)],_0x13e501[_0x1c9895(0xe2)],_0x13e501[_0x1c9895(0x8d)],_0x13e501['UniverThreadCommentUi'],_0x13e501[_0x1c9895(0x77)],_0x13e501['rxjs'],_0x13e501['UniverNetwork']));}(this,function(_0x51a636,_0x2b6358,_0x59453f,_0x54ffd4,_0x3067d4,_0x2ebc91,_0x157b87,_0x250d5f){'use strict';const _0x572099=_0x161e;const _0x3b74b7=_0x572099(0x9d);var _0xdf7756=(_0x186fea=>(_0x186fea[_0x186fea[_0x572099(0x86)]=0x0]=_0x572099(0x86),_0x186fea[_0x186fea[_0x572099(0xca)]=0x1]='Solved',_0x186fea[_0x186fea[_0x572099(0xc8)]=-0x1]=_0x572099(0xc8),_0x186fea))(_0xdf7756||{}),_0x3715e2=(_0x28258d=>(_0x28258d[_0x28258d[_0x572099(0xeb)]=0x0]=_0x572099(0xeb),_0x28258d[_0x28258d[_0x572099(0x8e)]=0x1]='Add',_0x28258d[_0x28258d[_0x572099(0xed)]=0x2]=_0x572099(0xed),_0x28258d[_0x28258d['Edit']=0x3]=_0x572099(0x91),_0x28258d[_0x28258d[_0x572099(0xdf)]=0x4]='Delete',_0x28258d[_0x28258d[_0x572099(0x9e)]=0x5]=_0x572099(0x9e),_0x28258d[_0x28258d[_0x572099(0xc8)]=-0x1]=_0x572099(0xc8),_0x28258d))(_0x3715e2||{});const _0x90f2d8=_0x4d6ca6=>_0x54ffd4[_0x572099(0xd2)](new Date(+_0x4d6ca6))[_0x572099(0x72)](_0x572099(0x70)),_0x98a820=async(_0xb4e071,_0x2d6b41)=>{const _0x4fde0b=_0x572099,_0x2f61e1=_0xb4e071['get'](_0x54ffd4['UserManagerService']),_0x4a548d=_0xb4e071[_0x4fde0b(0xb2)](_0x250d5f[_0x4fde0b(0xc5)]);_0x2d6b41[_0x4fde0b(0xc4)](_0x2324f1=>{const _0x5d6587=_0x4fde0b;_0x2f61e1[_0x5d6587(0xa8)](_0x2324f1)&&_0x2d6b41[_0x5d6587(0xdb)](_0x2324f1);}),_0x2d6b41[_0x4fde0b(0x9c)]&&(await _0x4a548d[_0x4fde0b(0xb2)](_0x4fde0b(0xea),{'params':{'userIDs':[..._0x2d6b41]}}))[_0x4fde0b(0xb7)][_0x4fde0b(0x89)]['forEach'](_0x2a0195=>{_0x2a0195&&_0x2f61e1['addUser'](_0x2a0195);});};var _0x29f4ff=Object['getOwnPropertyDescriptor'],_0x25e013=(_0x136a56,_0x5b47ad,_0x3d566c,_0x3cea01)=>{for(var _0x448435=_0x3cea01>0x1?void 0x0:_0x3cea01?_0x29f4ff(_0x5b47ad,_0x3d566c):_0x5b47ad,_0x4bcb8a=_0x136a56['length']-0x1,_0x1c2bc6;_0x4bcb8a>=0x0;_0x4bcb8a--)(_0x1c2bc6=_0x136a56[_0x4bcb8a])&&(_0x448435=_0x1c2bc6(_0x448435)||_0x448435);return _0x448435;},_0x5cd4a0=(_0xac2cf4,_0x943a75)=>(_0x5387ee,_0x5a063d)=>_0x943a75(_0x5387ee,_0x5a063d,_0xac2cf4);let _0x5bf372=class extends _0x54ffd4['Disposable']{constructor(_0xa26889,_0x32d3a0,_0x2a9bb0,_0x1c7642){const _0x385ce1=_0x572099;super(),this[_0x385ce1(0xad)]=_0xa26889,this[_0x385ce1(0xd5)]=_0x32d3a0,this[_0x385ce1(0xf1)]=_0x2a9bb0,this[_0x385ce1(0xe6)]=_0x1c7642,this[_0x385ce1(0xd3)](),this[_0x385ce1(0xd6)]();}[_0x572099(0xd6)](){const _0x4f52cc=_0x572099;this[_0x4f52cc(0xa4)](this[_0x4f52cc(0xd5)][_0x4f52cc(0xc0)][_0x4f52cc(0xab)](_0x157b87[_0x4f52cc(0xe5)](0x10))['subscribe'](_0x353ec2=>{const _0x45ea74=_0x4f52cc,_0x392500=new Set();_0x353ec2['forEach'](_0x5d69a8=>{const _0x3b7b06=_0x161e;switch(_0x5d69a8['type']){case _0x3b7b06(0xce):{const _0x4f12bf=_0x5d69a8[_0x3b7b06(0xcc)][_0x3b7b06(0xc3)];_0x392500['add'](_0x4f12bf);break;}}}),_0x98a820(this[_0x45ea74(0xe6)],_0x392500);}));}[_0x572099(0xd3)](){const _0x363196=_0x572099;this[_0x363196(0xa4)](this['_commentService'][_0x363196(0xc0)][_0x363196(0xb0)](async _0x381a48=>{const _0xfa0907=_0x363196;var _0x4e343a,_0x459d32,_0x5596ce,_0x219bca;const _0x1fe0da=(_0x4e343a=this['_threadCommentModel']['getUnit'](_0x381a48[_0xfa0907(0xd4)])[_0xfa0907(0xc2)](_0x4a30aa=>_0x4a30aa['threadId']===_0x381a48[_0xfa0907(0xee)]))==null?void 0x0:_0x4e343a['root'];if(!_0x1fe0da)return;const {unitId:_0x4bbfdd,subUnitId:_0x3c8e46}=_0x1fe0da;switch(_0x381a48['user']&&this[_0xfa0907(0xf1)]['addUser'](_0x381a48[_0xfa0907(0xdd)]),_0x381a48[_0xfa0907(0xb5)]){case _0x3715e2[_0xfa0907(0x8e)]:break;case _0x3715e2['Reply']:{this[_0xfa0907(0xd5)][_0xfa0907(0xa2)](_0x4bbfdd,_0x3c8e46,{'unitId':_0x4bbfdd,'subUnitId':_0x3c8e46,'ref':'','id':_0x381a48['replyId'],'dT':_0x90f2d8(+_0x381a48['createTimestamp']),'threadId':_0x381a48[_0xfa0907(0xee)],'personId':(_0x5596ce=(_0x459d32=_0x381a48[_0xfa0907(0xdd)])==null?void 0x0:_0x459d32[_0xfa0907(0xbb)])!=null?_0x5596ce:_0x381a48[_0xfa0907(0xcd)],'text':JSON['parse'](_0x381a48[_0xfa0907(0xf3)]),'parentId':_0x1fe0da['id']});break;}case _0x3715e2[_0xfa0907(0xdf)]:{const _0x7aa9c3=this[_0xfa0907(0xd5)][_0xfa0907(0xaa)](_0x4bbfdd,_0x3c8e46,_0x381a48[_0xfa0907(0x76)]);_0x7aa9c3&&_0x7aa9c3[_0xfa0907(0x7c)]&&this[_0xfa0907(0xd5)][_0xfa0907(0xd0)](_0x4bbfdd,_0x3c8e46,_0x381a48[_0xfa0907(0x76)]);break;}case _0x3715e2[_0xfa0907(0x91)]:{this['_threadCommentModel']['updateComment'](_0x4bbfdd,_0x3c8e46,{'commentId':_0x381a48['replyId'],'text':JSON[_0xfa0907(0xc7)](_0x381a48[_0xfa0907(0xf3)])});break;}case _0x3715e2[_0xfa0907(0x9e)]:{const _0x63de75=(_0x219bca=this[_0xfa0907(0xd5)][_0xfa0907(0x9f)](_0x381a48[_0xfa0907(0xd4)])[_0xfa0907(0xc2)](_0x40c982=>_0x40c982[_0xfa0907(0xee)]===_0x381a48[_0xfa0907(0xee)]))==null?void 0x0:_0x219bca[_0xfa0907(0xa3)];_0x63de75&&this[_0xfa0907(0xd5)][_0xfa0907(0xe4)](_0x4bbfdd,_0x3c8e46,_0x63de75['id'],_0x381a48[_0xfa0907(0x8f)]===_0xdf7756[_0xfa0907(0xca)]);break;}}}));}};_0x5bf372=_0x25e013([_0x5cd4a0(0x0,_0x54ffd4[_0x572099(0xa1)](_0x2b6358[_0x572099(0x80)])),_0x5cd4a0(0x1,_0x54ffd4['Inject'](_0x2ebc91[_0x572099(0x7b)])),_0x5cd4a0(0x2,_0x54ffd4[_0x572099(0xa1)](_0x54ffd4[_0x572099(0xbd)])),_0x5cd4a0(0x3,_0x54ffd4['Inject'](_0x54ffd4[_0x572099(0x74)]))],_0x5bf372);const _0xc03f36='thread-comment-data-source.config',_0xa91f75={};var _0x44e6f5=Object[_0x572099(0x73)],_0x560841=(_0x2c627c,_0x45fa1d,_0x34bfb3,_0x2f67b6)=>{for(var _0x3ecac3=_0x2f67b6>0x1?void 0x0:_0x2f67b6?_0x44e6f5(_0x45fa1d,_0x34bfb3):_0x45fa1d,_0x575842=_0x2c627c['length']-0x1,_0x467e2a;_0x575842>=0x0;_0x575842--)(_0x467e2a=_0x2c627c[_0x575842])&&(_0x3ecac3=_0x467e2a(_0x3ecac3)||_0x3ecac3);return _0x3ecac3;},_0x2481fc=(_0x253287,_0x561a56)=>(_0x2b6d3b,_0x3686bb)=>_0x561a56(_0x2b6d3b,_0x3686bb,_0x253287);function _0x582824(_0x5d02be,_0x792373){const _0x5c68b0=_0x572099,_0x15e4ee=_0x5d02be['replies'][0x0];return{..._0x792373,'id':_0x15e4ee['replyId'],'resolved':_0x5d02be['solved']===0x1,'dT':_0x90f2d8(_0x15e4ee['createTimestamp']),'personId':_0x15e4ee[_0x5c68b0(0xcd)],'threadId':_0x15e4ee['threadId']};}function _0x4cedc5(_0xd69e4f,_0x2bd781,_0x524556){const _0x26f8c3=_0x572099;var _0x3f1dd1,_0x230b24;if(((_0x230b24=(_0x3f1dd1=_0xd69e4f==null?void 0x0:_0xd69e4f[_0x26f8c3(0x90)])==null?void 0x0:_0x3f1dd1['length'])!=null?_0x230b24:0x0)>0x0){const _0x157ce0=(_0x4c06a7,_0x15aeea)=>({'id':_0x4c06a7['replyId'],'threadId':_0x4c06a7[_0x26f8c3(0xee)],'dT':_0x90f2d8(_0x4c06a7[_0x26f8c3(0x81)]),'personId':_0x4c06a7[_0x26f8c3(0xcd)],'resolved':_0xd69e4f[_0x26f8c3(0x8f)]===_0xdf7756[_0x26f8c3(0xca)],'unitId':_0x2bd781,'subUnitId':_0x524556,'text':JSON['parse'](_0x4c06a7[_0x26f8c3(0xf3)]),'parentId':_0x15aeea}),_0x1af92b=_0x157ce0(_0xd69e4f['replies'][0x0]);return{..._0x1af92b,'children':_0xd69e4f[_0x26f8c3(0x90)]['slice'](0x1)['map'](_0x2f3bf3=>_0x157ce0(_0x2f3bf3,_0x1af92b['id']))};}return null;}let _0x555366=class{constructor(_0xa2339d,_0x225475,_0x53a667,_0xdd2ea8){const _0x181265=_0x572099;this[_0x181265(0x96)]=_0xa2339d,this[_0x181265(0xf1)]=_0x225475,this[_0x181265(0xb3)]=_0x53a667,this[_0x181265(0xe6)]=_0xdd2ea8;}async[_0x572099(0xa2)](_0x2aa453){const _0x298d08=_0x572099;var _0x5a7a0f,_0xca09e7;const {parentId:_0x27f1ba,unitId:_0x4eeb5a,text:_0x3bed92,threadId:_0x1bc5db}=_0x2aa453,_0x313b24=(_0xca09e7=(_0x5a7a0f=_0x3bed92[_0x298d08(0x97)])==null?void 0x0:_0x5a7a0f[_0x298d08(0x7a)](_0x484631=>_0x484631['rangeType']===_0x54ffd4[_0x298d08(0xc1)][_0x298d08(0xba)])[_0x298d08(0x99)](_0x3f3a87=>_0x3f3a87['rangeId']))!=null?_0xca09e7:[],_0x476eb1=JSON['stringify'](_0x3bed92),_0x4f949b=(await this['_sessionService']['requireSession'](_0x4eeb5a))[_0x298d08(0x7e)]();if(_0x27f1ba){const _0x1692ba={'memberId':_0x4f949b,'unitId':_0x4eeb5a,'content':_0x476eb1,'mention':_0x313b24,'threadId':_0x1bc5db},_0x1d8132=(await this['_httpService'][_0x298d08(0x85)](_0x298d08(0xe1)+_0x4eeb5a+_0x298d08(0xaf),{'body':_0x1692ba}))[_0x298d08(0xb7)][_0x298d08(0xbc)];return{..._0x2aa453,'id':_0x1d8132[_0x298d08(0x76)],'dT':_0x54ffd4[_0x298d08(0xd2)](+_0x1d8132[_0x298d08(0x81)])['format'](_0x298d08(0x70)),'personId':_0x1d8132[_0x298d08(0xcd)]};}else{const _0x249eda={'memberId':_0x4f949b,'unitId':_0x4eeb5a,'content':_0x476eb1,'mention':_0x313b24},_0x5b7ed4=await this[_0x298d08(0x96)][_0x298d08(0x85)]('/universer-api/comment/unit/'+_0x4eeb5a+'/add',{'body':_0x249eda});return _0x582824(_0x5b7ed4[_0x298d08(0xb7)]['comment'],_0x2aa453);}}async['updateComment'](_0x2810e5){const _0x3c9a3b=_0x572099;var _0x216e58,_0x158df2;const {text:_0x17c710,unitId:_0x312bbe}=_0x2810e5,_0x26e05e=(_0x158df2=(_0x216e58=_0x17c710[_0x3c9a3b(0x97)])==null?void 0x0:_0x216e58[_0x3c9a3b(0x7a)](_0x41cd11=>_0x41cd11[_0x3c9a3b(0xd9)]===_0x54ffd4['CustomRangeType'][_0x3c9a3b(0xba)])['map'](_0x173ac9=>_0x173ac9[_0x3c9a3b(0xf2)]))!=null?_0x158df2:[],_0x1c5914=JSON[_0x3c9a3b(0xe9)](_0x17c710),_0x3adfca=_0x2810e5[_0x3c9a3b(0xee)],_0x4ac943=_0x2810e5['id'],_0x4329ed={'memberId':(await this[_0x3c9a3b(0xb3)][_0x3c9a3b(0x87)](_0x312bbe))[_0x3c9a3b(0x7e)](),'unitId':_0x312bbe,'threadId':_0x3adfca,'mention':_0x26e05e,'content':_0x1c5914,'replyId':_0x4ac943},_0x47d476=await this[_0x3c9a3b(0x96)][_0x3c9a3b(0x85)](_0x3c9a3b(0xe1)+_0x312bbe+_0x3c9a3b(0xbf),{'body':_0x4329ed});return!_0x47d476[_0x3c9a3b(0xb7)][_0x3c9a3b(0x78)]||_0x47d476[_0x3c9a3b(0xb7)][_0x3c9a3b(0x78)][_0x3c9a3b(0xa9)]===0x1;}async['resolveComment'](_0x30292f){const _0x17f947=_0x572099,{unitId:_0x48741d}=_0x30292f,_0x249d2f=_0x30292f[_0x17f947(0xee)],_0x535fbc={'memberId':this['_userService']['getCurrentUser']()[_0x17f947(0xbb)],'unitId':_0x48741d,'threadId':_0x249d2f,'solved':_0x30292f['resolved']?_0xdf7756[_0x17f947(0xca)]:_0xdf7756[_0x17f947(0x86)]},_0x29694a=await this[_0x17f947(0x96)][_0x17f947(0x85)](_0x17f947(0xe1)+_0x48741d+_0x17f947(0xcb),{'body':_0x535fbc});return!_0x29694a[_0x17f947(0xb7)][_0x17f947(0x78)]||_0x29694a[_0x17f947(0xb7)]['error'][_0x17f947(0xa9)]===0x1;}async[_0x572099(0xd0)](_0x4f305f,_0x5afb70,_0x406ea2,_0x571a14){const _0x3dfb63=_0x572099,_0x4e74ca={'memberId':(await this[_0x3dfb63(0xb3)][_0x3dfb63(0x87)](_0x4f305f))[_0x3dfb63(0x7e)](),'threadId':_0x406ea2,'replyId':_0x571a14,'unitId':_0x4f305f},_0x11d6f0=await this[_0x3dfb63(0x96)][_0x3dfb63(0x85)](_0x3dfb63(0xe1)+_0x4f305f+_0x3dfb63(0xec),{'body':_0x4e74ca});return!_0x11d6f0['body'][_0x3dfb63(0x78)]||_0x11d6f0[_0x3dfb63(0xb7)][_0x3dfb63(0x78)][_0x3dfb63(0xa9)]===0x1;}async[_0x572099(0xde)](_0x1012db,_0x1ba1b9,_0x4a1561){const _0x16e622=_0x572099,_0x4247ff={'unitId':_0x1012db,'threadId':_0x4a1561},_0x111852=await this[_0x16e622(0x96)][_0x16e622(0x85)](_0x16e622(0xe1)+_0x1012db+_0x16e622(0xe7),{'body':_0x4247ff}),_0x2d8a6d=_0x4a1561[_0x16e622(0x99)](_0x1793ba=>_0x4cedc5(_0x111852[_0x16e622(0xb7)]['comments'][_0x1793ba],_0x1012db,_0x1ba1b9))[_0x16e622(0x7a)](Boolean);return Object[_0x16e622(0xda)](_0x111852[_0x16e622(0xb7)][_0x16e622(0x89)])[_0x16e622(0xc4)](_0x517e71=>{const _0x47f05b=_0x16e622;this[_0x47f05b(0xf1)][_0x47f05b(0x6f)](_0x517e71);}),_0x2d8a6d;}[_0x572099(0x7f)](_0x5a98d7){const _0x37308b=_0x572099;return{'id':_0x5a98d7['id'],'threadId':_0x5a98d7[_0x37308b(0xee)],'ref':_0x5a98d7[_0x37308b(0xcf)]};}};_0x555366=_0x560841([_0x2481fc(0x0,_0x54ffd4[_0x572099(0xa1)](_0x250d5f[_0x572099(0xc5)])),_0x2481fc(0x1,_0x54ffd4[_0x572099(0xa1)](_0x54ffd4[_0x572099(0xbd)])),_0x2481fc(0x2,_0x54ffd4[_0x572099(0xa1)](_0x2b6358[_0x572099(0xc6)])),_0x2481fc(0x3,_0x54ffd4[_0x572099(0xa1)](_0x54ffd4[_0x572099(0x74)]))],_0x555366);var _0x3487d8=Object[_0x572099(0x73)],_0x4a4a93=(_0x1497d7,_0x473e2b,_0x263bb5,_0x2d1017)=>{for(var _0x263252=_0x2d1017>0x1?void 0x0:_0x2d1017?_0x3487d8(_0x473e2b,_0x263bb5):_0x473e2b,_0x156827=_0x1497d7['length']-0x1,_0x4d1cd2;_0x156827>=0x0;_0x156827--)(_0x4d1cd2=_0x1497d7[_0x156827])&&(_0x263252=_0x4d1cd2(_0x263252)||_0x263252);return _0x263252;},_0x56c455=(_0x23c27d,_0x5a3956)=>(_0x1e0545,_0x2f55a0)=>_0x5a3956(_0x1e0545,_0x2f55a0,_0x23c27d);let _0x396e23=class extends _0x54ffd4[_0x572099(0xa5)]{constructor(_0x378bd5,_0x2d308e){const _0x5d053d=_0x572099;super(),this['_threadCommentDataSourceService']=_0x378bd5,this[_0x5d053d(0xdc)]=_0x2d308e,this[_0x5d053d(0x9b)]();}['_initDataSource'](){const _0x3ec657=_0x572099;this[_0x3ec657(0x98)][_0x3ec657(0xa7)]=this['_threadCommentDataSource'],this[_0x3ec657(0x98)][_0x3ec657(0x88)]=!0x1;}};_0x396e23=_0x4a4a93([_0x56c455(0x0,_0x2ebc91[_0x572099(0x8c)]),_0x56c455(0x1,_0x54ffd4[_0x572099(0xa1)](_0x555366))],_0x396e23);var _0x5dca1a=Object[_0x572099(0x7d)],_0x5b0d88=Object[_0x572099(0x73)],_0x34a1dd=(_0x53d08a,_0x1d495a,_0x4d1628)=>_0x1d495a in _0x53d08a?_0x5dca1a(_0x53d08a,_0x1d495a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4d1628}):_0x53d08a[_0x1d495a]=_0x4d1628,_0x249dab=(_0x167c6c,_0x3ec4e2,_0x39ed15,_0x39935c)=>{for(var _0x17b2b9=_0x39935c>0x1?void 0x0:_0x39935c?_0x5b0d88(_0x3ec4e2,_0x39ed15):_0x3ec4e2,_0x4c0e69=_0x167c6c['length']-0x1,_0x5042c8;_0x4c0e69>=0x0;_0x4c0e69--)(_0x5042c8=_0x167c6c[_0x4c0e69])&&(_0x17b2b9=_0x5042c8(_0x17b2b9)||_0x17b2b9);return _0x17b2b9;},_0x3436a3=(_0x971775,_0x4e5239)=>(_0x57eadf,_0x3fad5a)=>_0x4e5239(_0x57eadf,_0x3fad5a,_0x971775),_0x537625=(_0x1a370f,_0x56557b,_0x51ac59)=>_0x34a1dd(_0x1a370f,typeof _0x56557b!='symbol'?_0x56557b+'':_0x56557b,_0x51ac59);_0x51a636[_0x572099(0x95)]=class extends _0x54ffd4[_0x572099(0x75)]{constructor(_0x348933=_0xa91f75,_0x2a8e72,_0x49a954){const _0x4f69df=_0x572099;super(),this[_0x4f69df(0x92)]=_0x348933,this[_0x4f69df(0xe6)]=_0x2a8e72,this[_0x4f69df(0x84)]=_0x49a954;const {..._0x1dcccb}=_0x54ffd4['merge']({},_0xa91f75,this[_0x4f69df(0x92)]);this['_configService'][_0x4f69df(0x8a)](_0xc03f36,_0x1dcccb);}[_0x572099(0xf0)](){const _0x43f506=_0x572099;[[_0x555366],[_0x396e23],[_0x5bf372]][_0x43f506(0xc4)](_0x4e3a8d=>{const _0x34ed3a=_0x43f506;this[_0x34ed3a(0xe6)]['add'](_0x4e3a8d);});}[_0x572099(0xe8)](){const _0x26eabd=_0x572099;this['_injector'][_0x26eabd(0xb2)](_0x396e23),this[_0x26eabd(0xe6)][_0x26eabd(0xb2)](_0x5bf372);}},_0x537625(_0x51a636['UniverThreadCommentDataSourcePlugin'],_0x572099(0x94),_0x3b74b7),_0x537625(_0x51a636['UniverThreadCommentDataSourcePlugin'],'type',_0x54ffd4['UniverInstanceType']['UNIVER_UNKNOWN']),_0x51a636[_0x572099(0x95)]=_0x249dab([_0x54ffd4[_0x572099(0x6e)](_0x3067d4['UniverThreadCommentUIPlugin'],_0x2b6358['UniverCollaborationClientPlugin'],_0x59453f[_0x572099(0xb9)]),_0x3436a3(0x1,_0x54ffd4[_0x572099(0xa1)](_0x54ffd4[_0x572099(0x74)])),_0x3436a3(0x2,_0x54ffd4[_0x572099(0x93)])],_0x51a636[_0x572099(0x95)]),Object['defineProperty'](_0x51a636,Symbol[_0x572099(0xac)],{'value':'Module'});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.7.0-nightly.202505121607",
3
+ "version": "0.7.0-nightly.202505131607",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.7.0-nightly.202505121607",
49
- "@univerjs/thread-comment": "0.7.0-nightly.202505121607",
50
- "@univerjs/core": "0.7.0-nightly.202505121607",
51
- "@univerjs-pro/license": "0.7.0-nightly.202505121607",
48
+ "@univerjs-pro/collaboration-client": "0.7.0-nightly.202505131607",
49
+ "@univerjs/core": "0.7.0-nightly.202505131607",
52
50
  "@univerjs/protocol": "0.1.46-alpha.3",
53
- "@univerjs/thread-comment-ui": "0.7.0-nightly.202505121607",
54
- "@univerjs/network": "0.7.0-nightly.202505121607"
51
+ "@univerjs-pro/license": "0.7.0-nightly.202505131607",
52
+ "@univerjs/thread-comment-ui": "0.7.0-nightly.202505131607",
53
+ "@univerjs/thread-comment": "0.7.0-nightly.202505131607",
54
+ "@univerjs/network": "0.7.0-nightly.202505131607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",