@univerjs-pro/thread-comment-datasource 0.15.2-insiders.20260124-12fc7f0 → 0.15.3

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 _0x347130=_0x4f64;(function(_0x52acd4,_0x5c800c){const _0xa03dd=_0x4f64,_0x1d3953=_0x52acd4();while(!![]){try{const _0x3df49e=-parseInt(_0xa03dd(0x13e))/0x1+-parseInt(_0xa03dd(0x138))/0x2+parseInt(_0xa03dd(0x132))/0x3+parseInt(_0xa03dd(0x11c))/0x4*(-parseInt(_0xa03dd(0x103))/0x5)+-parseInt(_0xa03dd(0x112))/0x6*(parseInt(_0xa03dd(0x10a))/0x7)+-parseInt(_0xa03dd(0x130))/0x8+-parseInt(_0xa03dd(0x105))/0x9*(-parseInt(_0xa03dd(0x142))/0xa);if(_0x3df49e===_0x5c800c)break;else _0x1d3953['push'](_0x1d3953['shift']());}catch(_0x1aed91){_0x1d3953['push'](_0x1d3953['shift']());}}}(_0x1d56,0x42756));function _0x1d56(){const _0x492ae7=['/universer-api/user/list','_configService','50044bRmldF','updateComment','root','getUser','Edit','resolved','requireSession','_sessionService','users','UserManagerService','symbol','UniverCollaborationClientPlugin','HTTPService','user','Solve','parentId','Reply','_init','filter','find','1898856vHkqpK','YYYY/MM/DD\x20HH:mm','1245240tjQRIu','format','ref','/edit','thread-comment-data-source.config','_httpService','971512dJXNUp','dayjs','toStringTag','forEach','size','solved','156197SvAdfc','add','OpenOrReOpen','getCurrentUser','10gpHGHT','CommentService','pipe','getMemberID','onReady','saveCommentToSnapshot','unitId','rangeId','userId','commentUpdate$','body','DependentOn','Solved','UniverThreadCommentDataSourcePlugin','delete','replyId','post','UNIVER_UNKNOWN','Add','stringify','UniverLicensePlugin','error','parse','UNRECOGNIZED','threadId','length','UniverInstanceType','CustomRangeType','get','/delete','content','getUnit','customRanges','deleteComment','addUser','type','getOwnPropertyDescriptor','/reply','Delete','map','setConfig','disposeWithMe','Disposable','Injector','_userService','_initDataSource','replies','subscribe','values','115TWZwMQ','/universer-api/comment/unit/','9238689xVwSnl','code','_injector','addComment','IThreadCommentDataSourceService','581YLKIQi','_threadCommentModel','_threadCommentDataSourceService','slice','Unknown','getComment','COMMENT','payload','168cAQsIG','_threadCommentDataSource','UniverThreadCommentUIPlugin','defineProperty','createTimestamp','_initUserSync','Inject','resolveComment'];_0x1d56=function(){return _0x492ae7;};return _0x1d56();}Object['defineProperty'](exports,Symbol[_0x347130(0x13a)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3a49fc=>(_0x3a49fc[_0x3a49fc[_0x347130(0x140)]=0x0]='OpenOrReOpen',_0x3a49fc[_0x3a49fc['Solved']=0x1]=_0x347130(0x14e),_0x3a49fc[_0x3a49fc[_0x347130(0x159)]=-0x1]='UNRECOGNIZED',_0x3a49fc))(I||{}),v=(_0x391a3a=>(_0x391a3a[_0x391a3a['Unknown']=0x0]=_0x347130(0x10e),_0x391a3a[_0x391a3a[_0x347130(0x154)]=0x1]=_0x347130(0x154),_0x391a3a[_0x391a3a[_0x347130(0x12c)]=0x2]=_0x347130(0x12c),_0x391a3a[_0x391a3a[_0x347130(0x120)]=0x3]=_0x347130(0x120),_0x391a3a[_0x391a3a[_0x347130(0x168)]=0x4]=_0x347130(0x168),_0x391a3a[_0x391a3a[_0x347130(0x12a)]=0x5]='Solve',_0x391a3a[_0x391a3a['UNRECOGNIZED']=-0x1]=_0x347130(0x159),_0x391a3a))(v||{});const f=_0x54989f=>c[_0x347130(0x139)](new Date(+_0x54989f))[_0x347130(0x133)](_0x347130(0x131)),R=async(_0xae9b59,_0x41f7d6)=>{const _0x37f8fa=_0x347130,_0x6e29bd=_0xae9b59['get'](c[_0x37f8fa(0x125)]),_0x93d04c=_0xae9b59[_0x37f8fa(0x15e)](P[_0x37f8fa(0x128)]);_0x41f7d6[_0x37f8fa(0x13b)](_0x4966f3=>{const _0x34fb7b=_0x37f8fa;_0x6e29bd[_0x34fb7b(0x11f)](_0x4966f3)&&_0x41f7d6[_0x34fb7b(0x150)](_0x4966f3);}),_0x41f7d6[_0x37f8fa(0x13c)]&&(await _0x93d04c[_0x37f8fa(0x15e)](_0x37f8fa(0x11a),{'params':{'userIDs':[..._0x41f7d6]}}))[_0x37f8fa(0x14c)][_0x37f8fa(0x124)][_0x37f8fa(0x13b)](_0x3cdbc0=>{const _0x2b2159=_0x37f8fa;_0x3cdbc0&&_0x6e29bd[_0x2b2159(0x164)](_0x3cdbc0);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x5be219,_0x2a43e6,_0x207d97,_0x5927d7)=>{const _0x273c22=_0x347130;for(var _0x16473a=_0x5927d7>0x1?void 0x0:_0x5927d7?$(_0x2a43e6,_0x207d97):_0x2a43e6,_0x142c58=_0x5be219[_0x273c22(0x15b)]-0x1,_0x85e943;_0x142c58>=0x0;_0x142c58--)(_0x85e943=_0x5be219[_0x142c58])&&(_0x16473a=_0x85e943(_0x16473a)||_0x16473a);return _0x16473a;},S=(_0x4ff6ee,_0x1cd745)=>(_0x18e5e9,_0x2bb1d1)=>_0x1cd745(_0x18e5e9,_0x2bb1d1,_0x4ff6ee);let _=class extends c[_0x347130(0xfc)]{constructor(_0x2a690f,_0x26aee8,_0x3dcb5e,_0x7bbfda){const _0x533ade=_0x347130;super(),this['_commentService']=_0x2a690f,this[_0x533ade(0x10b)]=_0x26aee8,this[_0x533ade(0xfe)]=_0x3dcb5e,this[_0x533ade(0x107)]=_0x7bbfda,this[_0x533ade(0x12d)](),this['_initUserSync']();}[_0x347130(0x117)](){const _0x22eb92=_0x347130;this[_0x22eb92(0xfb)](this[_0x22eb92(0x10b)]['commentUpdate$'][_0x22eb92(0x144)](j['bufferTime'](0x10))[_0x22eb92(0x101)](_0x12de10=>{const _0x3b4012=_0x22eb92,_0x403fa8=new Set();_0x12de10['forEach'](_0x5a1b70=>{const _0x58e081=_0x4f64;if(_0x5a1b70[_0x58e081(0x165)]===_0x58e081(0x13f)){const _0x204d69=_0x5a1b70[_0x58e081(0x111)]['personId'];_0x403fa8[_0x58e081(0x13f)](_0x204d69);}}),R(this[_0x3b4012(0x107)],_0x403fa8);}));}[_0x347130(0x12d)](){const _0x5bc4d1=_0x347130;this[_0x5bc4d1(0xfb)](this['_commentService'][_0x5bc4d1(0x14b)][_0x5bc4d1(0x101)](async _0x26a95e=>{const _0x4e0aa6=_0x5bc4d1;var _0xcf8bc9,_0x936a1b,_0x85bff7,_0xe99c0b;const _0x2552df=(_0xcf8bc9=this[_0x4e0aa6(0x10b)]['getUnit'](_0x26a95e['unitId'])[_0x4e0aa6(0x12f)](_0x4a27dd=>_0x4a27dd['threadId']===_0x26a95e['threadId']))==null?void 0x0:_0xcf8bc9[_0x4e0aa6(0x11e)];if(!_0x2552df)return;const {unitId:_0xfdcc75,subUnitId:_0x533acd}=_0x2552df;switch(_0x26a95e[_0x4e0aa6(0x129)]&&this[_0x4e0aa6(0xfe)]['addUser'](_0x26a95e[_0x4e0aa6(0x129)]),_0x26a95e[_0x4e0aa6(0x165)]){case v['Add']:break;case v[_0x4e0aa6(0x12c)]:{this['_threadCommentModel'][_0x4e0aa6(0x108)](_0xfdcc75,_0x533acd,{'unitId':_0xfdcc75,'subUnitId':_0x533acd,'ref':'','id':_0x26a95e[_0x4e0aa6(0x151)],'dT':f(+_0x26a95e[_0x4e0aa6(0x116)]),'threadId':_0x26a95e[_0x4e0aa6(0x15a)],'personId':(_0x85bff7=(_0x936a1b=_0x26a95e[_0x4e0aa6(0x129)])==null?void 0x0:_0x936a1b['userID'])!=null?_0x85bff7:_0x26a95e[_0x4e0aa6(0x14a)],'text':JSON[_0x4e0aa6(0x158)](_0x26a95e[_0x4e0aa6(0x160)]),'parentId':_0x2552df['id']});break;}case v[_0x4e0aa6(0x168)]:{const _0x39a4fc=this[_0x4e0aa6(0x10b)][_0x4e0aa6(0x10f)](_0xfdcc75,_0x533acd,_0x26a95e[_0x4e0aa6(0x151)]);_0x39a4fc&&_0x39a4fc[_0x4e0aa6(0x12b)]&&this[_0x4e0aa6(0x10b)][_0x4e0aa6(0x163)](_0xfdcc75,_0x533acd,_0x26a95e[_0x4e0aa6(0x151)]);break;}case v['Edit']:{this[_0x4e0aa6(0x10b)][_0x4e0aa6(0x11d)](_0xfdcc75,_0x533acd,{'commentId':_0x26a95e[_0x4e0aa6(0x151)],'text':JSON[_0x4e0aa6(0x158)](_0x26a95e[_0x4e0aa6(0x160)])});break;}case v['Solve']:{const _0x22aff2=(_0xe99c0b=this[_0x4e0aa6(0x10b)][_0x4e0aa6(0x161)](_0x26a95e[_0x4e0aa6(0x148)])[_0x4e0aa6(0x12f)](_0x4e858d=>_0x4e858d[_0x4e0aa6(0x15a)]===_0x26a95e['threadId']))==null?void 0x0:_0xe99c0b[_0x4e0aa6(0x11e)];_0x22aff2&&this[_0x4e0aa6(0x10b)][_0x4e0aa6(0x119)](_0xfdcc75,_0x533acd,_0x22aff2['id'],_0x26a95e[_0x4e0aa6(0x13d)]===I[_0x4e0aa6(0x14e)]);break;}}}));}};_=E([S(0x0,c[_0x347130(0x118)](b[_0x347130(0x143)])),S(0x1,c['Inject'](M['ThreadCommentModel'])),S(0x2,c[_0x347130(0x118)](c[_0x347130(0x125)])),S(0x3,c[_0x347130(0x118)](c[_0x347130(0xfd)]))],_);const q=_0x347130(0x136),D={};var A=Object[_0x347130(0x166)],x=(_0xd75edd,_0xd9f53d,_0x42f41d,_0x2c4db7)=>{for(var _0x57b173=_0x2c4db7>0x1?void 0x0:_0x2c4db7?A(_0xd9f53d,_0x42f41d):_0xd9f53d,_0x559c7b=_0xd75edd['length']-0x1,_0x2215e3;_0x559c7b>=0x0;_0x559c7b--)(_0x2215e3=_0xd75edd[_0x559c7b])&&(_0x57b173=_0x2215e3(_0x57b173)||_0x57b173);return _0x57b173;},C=(_0x2621f5,_0x3822c5)=>(_0x42e15c,_0x4343ba)=>_0x3822c5(_0x42e15c,_0x4343ba,_0x2621f5);function Y(_0x115c41,_0x136d02){const _0x5bd4a5=_0x347130,_0x4be33d=_0x115c41[_0x5bd4a5(0x100)][0x0];return{..._0x136d02,'id':_0x4be33d[_0x5bd4a5(0x151)],'resolved':_0x115c41[_0x5bd4a5(0x13d)]===0x1,'dT':f(_0x4be33d[_0x5bd4a5(0x116)]),'personId':_0x4be33d[_0x5bd4a5(0x14a)],'threadId':_0x4be33d[_0x5bd4a5(0x15a)]};}function G(_0x2541df,_0x490f27,_0x329a76){const _0x5d50a2=_0x347130;var _0x2cf2f1,_0x2b77f0;if(((_0x2b77f0=(_0x2cf2f1=_0x2541df==null?void 0x0:_0x2541df['replies'])==null?void 0x0:_0x2cf2f1[_0x5d50a2(0x15b)])!=null?_0x2b77f0:0x0)>0x0){const _0x38ffd5=(_0x43e1e1,_0x381aee)=>({'id':_0x43e1e1[_0x5d50a2(0x151)],'threadId':_0x43e1e1[_0x5d50a2(0x15a)],'dT':f(_0x43e1e1[_0x5d50a2(0x116)]),'personId':_0x43e1e1[_0x5d50a2(0x14a)],'resolved':_0x2541df[_0x5d50a2(0x13d)]===I[_0x5d50a2(0x14e)],'unitId':_0x490f27,'subUnitId':_0x329a76,'text':JSON[_0x5d50a2(0x158)](_0x43e1e1[_0x5d50a2(0x160)]),'parentId':_0x381aee}),_0x36161e=_0x38ffd5(_0x2541df[_0x5d50a2(0x100)][0x0]);return{..._0x36161e,'children':_0x2541df[_0x5d50a2(0x100)][_0x5d50a2(0x10d)](0x1)[_0x5d50a2(0x169)](_0x5743c3=>_0x38ffd5(_0x5743c3,_0x36161e['id']))};}return null;}let p=class{constructor(_0x10dc9a,_0x2fbd84,_0x2d4a1e){const _0x4d6a1b=_0x347130;this[_0x4d6a1b(0x137)]=_0x10dc9a,this[_0x4d6a1b(0xfe)]=_0x2fbd84,this[_0x4d6a1b(0x123)]=_0x2d4a1e;}async[_0x347130(0x108)](_0x26071c){const _0x7185a9=_0x347130;var _0x13a5ca,_0x172152;const {parentId:_0x38605f,unitId:_0x40c384,text:_0x460e05,threadId:_0x59eda2}=_0x26071c,_0x553384=(_0x172152=(_0x13a5ca=_0x460e05[_0x7185a9(0x162)])==null?void 0x0:_0x13a5ca[_0x7185a9(0x12e)](_0x4d3e8d=>_0x4d3e8d['rangeType']===c[_0x7185a9(0x15d)][_0x7185a9(0x110)])['map'](_0x1f0153=>_0x1f0153['rangeId']))!=null?_0x172152:[],_0x44e5ec=JSON[_0x7185a9(0x155)](_0x460e05),_0x5df3d3=(await this[_0x7185a9(0x123)][_0x7185a9(0x122)](_0x40c384))[_0x7185a9(0x145)]();if(_0x38605f){const _0x27ceb8={'memberId':_0x5df3d3,'unitId':_0x40c384,'content':_0x44e5ec,'mention':_0x553384,'threadId':_0x59eda2},_0x159c67=(await this['_httpService'][_0x7185a9(0x152)](_0x7185a9(0x104)+_0x40c384+_0x7185a9(0x167),{'body':_0x27ceb8}))[_0x7185a9(0x14c)]['reply'];return{..._0x26071c,'id':_0x159c67[_0x7185a9(0x151)],'dT':c[_0x7185a9(0x139)](+_0x159c67[_0x7185a9(0x116)])['format'](_0x7185a9(0x131)),'personId':_0x159c67[_0x7185a9(0x14a)]};}else{const _0x16cddb={'memberId':_0x5df3d3,'unitId':_0x40c384,'content':_0x44e5ec,'mention':_0x553384},_0x323fb3=await this[_0x7185a9(0x137)][_0x7185a9(0x152)]('/universer-api/comment/unit/'+_0x40c384+'/add',{'body':_0x16cddb});return Y(_0x323fb3[_0x7185a9(0x14c)]['comment'],_0x26071c);}}async[_0x347130(0x11d)](_0x1222f5){const _0x3f048f=_0x347130;var _0x1d3efa,_0x46820d;const {text:_0x38bcfa,unitId:_0xe7b142}=_0x1222f5,_0xa424c2=(_0x46820d=(_0x1d3efa=_0x38bcfa['customRanges'])==null?void 0x0:_0x1d3efa['filter'](_0x3eb56c=>_0x3eb56c['rangeType']===c[_0x3f048f(0x15d)][_0x3f048f(0x110)])[_0x3f048f(0x169)](_0x15d09d=>_0x15d09d[_0x3f048f(0x149)]))!=null?_0x46820d:[],_0x52f380=JSON['stringify'](_0x38bcfa),_0x1c8567=_0x1222f5['threadId'],_0x1301bf=_0x1222f5['id'],_0x12ce35={'memberId':(await this[_0x3f048f(0x123)][_0x3f048f(0x122)](_0xe7b142))['getMemberID'](),'unitId':_0xe7b142,'threadId':_0x1c8567,'mention':_0xa424c2,'content':_0x52f380,'replyId':_0x1301bf},_0x8c80a=await this['_httpService'][_0x3f048f(0x152)](_0x3f048f(0x104)+_0xe7b142+_0x3f048f(0x135),{'body':_0x12ce35});return!_0x8c80a[_0x3f048f(0x14c)][_0x3f048f(0x157)]||_0x8c80a[_0x3f048f(0x14c)][_0x3f048f(0x157)][_0x3f048f(0x106)]===0x1;}async[_0x347130(0x119)](_0x2df55c){const _0x268e70=_0x347130,{unitId:_0x1e98a5}=_0x2df55c,_0x35040e=_0x2df55c[_0x268e70(0x15a)],_0x3cff48={'memberId':this[_0x268e70(0xfe)][_0x268e70(0x141)]()['userID'],'unitId':_0x1e98a5,'threadId':_0x35040e,'solved':_0x2df55c[_0x268e70(0x121)]?I[_0x268e70(0x14e)]:I['OpenOrReOpen']},_0x3775ac=await this[_0x268e70(0x137)][_0x268e70(0x152)](_0x268e70(0x104)+_0x1e98a5+'/solved',{'body':_0x3cff48});return!_0x3775ac[_0x268e70(0x14c)][_0x268e70(0x157)]||_0x3775ac[_0x268e70(0x14c)]['error'][_0x268e70(0x106)]===0x1;}async[_0x347130(0x163)](_0x30ff0b,_0x9f347f,_0x454aa9,_0x27362c){const _0x352717=_0x347130,_0x193070={'memberId':(await this['_sessionService'][_0x352717(0x122)](_0x30ff0b))[_0x352717(0x145)](),'threadId':_0x454aa9,'replyId':_0x27362c,'unitId':_0x30ff0b},_0x143563=await this[_0x352717(0x137)][_0x352717(0x152)](_0x352717(0x104)+_0x30ff0b+_0x352717(0x15f),{'body':_0x193070});return!_0x143563[_0x352717(0x14c)][_0x352717(0x157)]||_0x143563[_0x352717(0x14c)][_0x352717(0x157)][_0x352717(0x106)]===0x1;}async['listComments'](_0x2bb451,_0x1dc388,_0x138ebc){const _0x432f2f=_0x347130,_0x25077d={'unitId':_0x2bb451,'threadId':_0x138ebc},_0x3883b1=await this[_0x432f2f(0x137)][_0x432f2f(0x152)](_0x432f2f(0x104)+_0x2bb451+'/list',{'body':_0x25077d}),_0x4b4baa=_0x138ebc['map'](_0x58dcf1=>G(_0x3883b1[_0x432f2f(0x14c)]['comments'][_0x58dcf1],_0x2bb451,_0x1dc388))[_0x432f2f(0x12e)](Boolean);return Object[_0x432f2f(0x102)](_0x3883b1[_0x432f2f(0x14c)][_0x432f2f(0x124)])[_0x432f2f(0x13b)](_0x124246=>{const _0x3162b2=_0x432f2f;this[_0x3162b2(0xfe)][_0x3162b2(0x164)](_0x124246);}),_0x4b4baa;}[_0x347130(0x147)](_0x5e9bce){const _0x271f47=_0x347130;return{'id':_0x5e9bce['id'],'threadId':_0x5e9bce[_0x271f47(0x15a)],'ref':_0x5e9bce[_0x271f47(0x134)]};}};p=x([C(0x0,c[_0x347130(0x118)](P['HTTPService'])),C(0x1,c[_0x347130(0x118)](c[_0x347130(0x125)])),C(0x2,c[_0x347130(0x118)](b['CollaborationSessionService']))],p);var H=Object[_0x347130(0x166)],J=(_0xf3aa87,_0x16e6f5,_0x444f6b,_0x40b862)=>{const _0xc6e173=_0x347130;for(var _0x253c28=_0x40b862>0x1?void 0x0:_0x40b862?H(_0x16e6f5,_0x444f6b):_0x16e6f5,_0x4c650c=_0xf3aa87[_0xc6e173(0x15b)]-0x1,_0x1c2223;_0x4c650c>=0x0;_0x4c650c--)(_0x1c2223=_0xf3aa87[_0x4c650c])&&(_0x253c28=_0x1c2223(_0x253c28)||_0x253c28);return _0x253c28;},y=(_0xb3739c,_0x39ba2b)=>(_0x5566d0,_0xec8d4b)=>_0x39ba2b(_0x5566d0,_0xec8d4b,_0xb3739c);let g=class extends c[_0x347130(0xfc)]{constructor(_0x49c1d8,_0x2dd1a7){const _0x3ac574=_0x347130;super(),this[_0x3ac574(0x10c)]=_0x49c1d8,this['_threadCommentDataSource']=_0x2dd1a7,this['_initDataSource']();}[_0x347130(0xff)](){const _0x3e8aab=_0x347130;this[_0x3e8aab(0x10c)]['dataSource']=this[_0x3e8aab(0x113)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};function _0x4f64(_0xe4adf,_0x38ae8e){_0xe4adf=_0xe4adf-0xfa;const _0x1d569a=_0x1d56();let _0x4f6459=_0x1d569a[_0xe4adf];return _0x4f6459;}g=J([y(0x0,M[_0x347130(0x109)]),y(0x1,c[_0x347130(0x118)](p))],g);var F=Object[_0x347130(0x115)],L=Object[_0x347130(0x166)],Z=(_0x556c20,_0x3f5363,_0xf766cd)=>_0x3f5363 in _0x556c20?F(_0x556c20,_0x3f5363,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf766cd}):_0x556c20[_0x3f5363]=_0xf766cd,W=(_0x960383,_0x25eed0,_0xdecd40,_0x3ab13c)=>{const _0x1a61da=_0x347130;for(var _0x226990=_0x3ab13c>0x1?void 0x0:_0x3ab13c?L(_0x25eed0,_0xdecd40):_0x25eed0,_0x22aa39=_0x960383[_0x1a61da(0x15b)]-0x1,_0x5e318a;_0x22aa39>=0x0;_0x22aa39--)(_0x5e318a=_0x960383[_0x22aa39])&&(_0x226990=_0x5e318a(_0x226990)||_0x226990);return _0x226990;},O=(_0x15bc18,_0x73925c)=>(_0x3b168b,_0x446da6)=>_0x73925c(_0x3b168b,_0x446da6,_0x15bc18),N=(_0x153f20,_0x12bf76,_0xbad3a6)=>Z(_0x153f20,typeof _0x12bf76!=_0x347130(0x126)?_0x12bf76+'':_0x12bf76,_0xbad3a6);exports[_0x347130(0x14f)]=class extends c['Plugin']{constructor(_0x583899=D,_0x4edc80,_0x2d9b4d){const _0x228247=_0x347130;super(),this['_config']=_0x583899,this[_0x228247(0x107)]=_0x4edc80,this[_0x228247(0x11b)]=_0x2d9b4d;const {..._0x58e7a2}=c['merge']({},D,this['_config']);this[_0x228247(0x11b)][_0x228247(0xfa)](q,_0x58e7a2);}['onStarting'](){[[p],[g],[_]]['forEach'](_0x578e72=>{this['_injector']['add'](_0x578e72);});}[_0x347130(0x146)](){const _0x34ef3f=_0x347130;this[_0x34ef3f(0x107)][_0x34ef3f(0x15e)](g),this[_0x34ef3f(0x107)][_0x34ef3f(0x15e)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports[_0x347130(0x14f)],_0x347130(0x165),c[_0x347130(0x15c)][_0x347130(0x153)]),exports[_0x347130(0x14f)]=W([c[_0x347130(0x14d)](w[_0x347130(0x114)],b[_0x347130(0x127)],T[_0x347130(0x156)]),O(0x1,c['Inject'](c[_0x347130(0xfd)])),O(0x2,c['IConfigService'])],exports[_0x347130(0x14f)]);
1
+ 'use strict';const _0x4c278f=_0x5471;(function(_0x36a55f,_0x1768e3){const _0x27b043=_0x5471,_0x12776e=_0x36a55f();while(!![]){try{const _0x62b040=parseInt(_0x27b043(0x11b))/0x1+-parseInt(_0x27b043(0x133))/0x2+parseInt(_0x27b043(0x129))/0x3+-parseInt(_0x27b043(0x12c))/0x4*(parseInt(_0x27b043(0x11e))/0x5)+parseInt(_0x27b043(0x130))/0x6*(parseInt(_0x27b043(0x127))/0x7)+parseInt(_0x27b043(0x109))/0x8+parseInt(_0x27b043(0x124))/0x9*(parseInt(_0x27b043(0xf7))/0xa);if(_0x62b040===_0x1768e3)break;else _0x12776e['push'](_0x12776e['shift']());}catch(_0x3aa4ef){_0x12776e['push'](_0x12776e['shift']());}}}(_0x33b0,0xc9dcc));Object['defineProperty'](exports,Symbol[_0x4c278f(0xf5)],{'value':_0x4c278f(0x105)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x4c278f(0xfd);var I=(_0x4fbdc8=>(_0x4fbdc8[_0x4fbdc8[_0x4c278f(0x12e)]=0x0]=_0x4c278f(0x12e),_0x4fbdc8[_0x4fbdc8[_0x4c278f(0xf4)]=0x1]=_0x4c278f(0xf4),_0x4fbdc8[_0x4fbdc8[_0x4c278f(0xf0)]=-0x1]=_0x4c278f(0xf0),_0x4fbdc8))(I||{}),v=(_0xd7d5b7=>(_0xd7d5b7[_0xd7d5b7[_0x4c278f(0xd4)]=0x0]=_0x4c278f(0xd4),_0xd7d5b7[_0xd7d5b7[_0x4c278f(0x149)]=0x1]=_0x4c278f(0x149),_0xd7d5b7[_0xd7d5b7[_0x4c278f(0x146)]=0x2]=_0x4c278f(0x146),_0xd7d5b7[_0xd7d5b7[_0x4c278f(0x10b)]=0x3]=_0x4c278f(0x10b),_0xd7d5b7[_0xd7d5b7[_0x4c278f(0x113)]=0x4]=_0x4c278f(0x113),_0xd7d5b7[_0xd7d5b7[_0x4c278f(0x138)]=0x5]='Solve',_0xd7d5b7[_0xd7d5b7[_0x4c278f(0xf0)]=-0x1]=_0x4c278f(0xf0),_0xd7d5b7))(v||{});const f=_0x8b3e9b=>c[_0x4c278f(0xf9)](new Date(+_0x8b3e9b))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x5dcc31,_0x2d84d4)=>{const _0x22476d=_0x4c278f,_0x22127f=_0x5dcc31[_0x22476d(0x140)](c[_0x22476d(0x119)]),_0x216c75=_0x5dcc31[_0x22476d(0x140)](P[_0x22476d(0x14e)]);_0x2d84d4[_0x22476d(0xda)](_0x147f82=>{const _0x439b2a=_0x22476d;_0x22127f[_0x439b2a(0xf6)](_0x147f82)&&_0x2d84d4[_0x439b2a(0x111)](_0x147f82);}),_0x2d84d4[_0x22476d(0x135)]&&(await _0x216c75[_0x22476d(0x140)](_0x22476d(0x147),{'params':{'userIDs':[..._0x2d84d4]}}))[_0x22476d(0x13a)][_0x22476d(0x132)]['forEach'](_0x25ea8d=>{const _0xc0defd=_0x22476d;_0x25ea8d&&_0x22127f[_0xc0defd(0x120)](_0x25ea8d);});};var $=Object[_0x4c278f(0xea)],E=(_0xd4aba5,_0x503933,_0xeacf17,_0x3272a4)=>{const _0x11843e=_0x4c278f;for(var _0x22054d=_0x3272a4>0x1?void 0x0:_0x3272a4?$(_0x503933,_0xeacf17):_0x503933,_0x536d87=_0xd4aba5[_0x11843e(0x100)]-0x1,_0x4ba9ba;_0x536d87>=0x0;_0x536d87--)(_0x4ba9ba=_0xd4aba5[_0x536d87])&&(_0x22054d=_0x4ba9ba(_0x22054d)||_0x22054d);return _0x22054d;},S=(_0x244474,_0x3d416a)=>(_0x429413,_0x1f0bef)=>_0x3d416a(_0x429413,_0x1f0bef,_0x244474);let _=class extends c['Disposable']{constructor(_0xbe4b65,_0x4a3e6c,_0x36b9b3,_0x4ea56c){const _0x1f66ec=_0x4c278f;super(),this[_0x1f66ec(0xd6)]=_0xbe4b65,this[_0x1f66ec(0x14b)]=_0x4a3e6c,this[_0x1f66ec(0xf8)]=_0x36b9b3,this[_0x1f66ec(0x139)]=_0x4ea56c,this[_0x1f66ec(0x110)](),this[_0x1f66ec(0x12a)]();}[_0x4c278f(0x12a)](){const _0x2d64ce=_0x4c278f;this[_0x2d64ce(0xec)](this[_0x2d64ce(0x14b)]['commentUpdate$'][_0x2d64ce(0xd9)](j[_0x2d64ce(0x112)](0x10))[_0x2d64ce(0x13b)](_0x4db203=>{const _0x8c4965=_0x2d64ce,_0x2b5fe6=new Set();_0x4db203['forEach'](_0x3f6268=>{const _0x9f8598=_0x5471;if(_0x3f6268['type']===_0x9f8598(0x11c)){const _0x27b089=_0x3f6268[_0x9f8598(0xe5)]['personId'];_0x2b5fe6[_0x9f8598(0x11c)](_0x27b089);}}),R(this[_0x8c4965(0x139)],_0x2b5fe6);}));}[_0x4c278f(0x110)](){const _0x43589c=_0x4c278f;this['disposeWithMe'](this['_commentService']['commentUpdate$'][_0x43589c(0x13b)](async _0x528c9d=>{const _0x3e8ed8=_0x43589c;var _0x4413a1,_0x4e031b,_0x5c1054,_0x375ac7;const _0x2e4dcd=(_0x4413a1=this[_0x3e8ed8(0x14b)][_0x3e8ed8(0x145)](_0x528c9d['unitId'])[_0x3e8ed8(0xff)](_0x23df8f=>_0x23df8f[_0x3e8ed8(0xe2)]===_0x528c9d['threadId']))==null?void 0x0:_0x4413a1[_0x3e8ed8(0x12f)];if(!_0x2e4dcd)return;const {unitId:_0x447c94,subUnitId:_0x3ca42f}=_0x2e4dcd;switch(_0x528c9d['user']&&this[_0x3e8ed8(0xf8)]['addUser'](_0x528c9d[_0x3e8ed8(0x114)]),_0x528c9d[_0x3e8ed8(0xe8)]){case v[_0x3e8ed8(0x149)]:break;case v[_0x3e8ed8(0x146)]:{this[_0x3e8ed8(0x14b)][_0x3e8ed8(0xe3)](_0x447c94,_0x3ca42f,{'unitId':_0x447c94,'subUnitId':_0x3ca42f,'ref':'','id':_0x528c9d[_0x3e8ed8(0x13e)],'dT':f(+_0x528c9d['createTimestamp']),'threadId':_0x528c9d[_0x3e8ed8(0xe2)],'personId':(_0x5c1054=(_0x4e031b=_0x528c9d[_0x3e8ed8(0x114)])==null?void 0x0:_0x4e031b[_0x3e8ed8(0x141)])!=null?_0x5c1054:_0x528c9d[_0x3e8ed8(0x14d)],'text':JSON[_0x3e8ed8(0x134)](_0x528c9d[_0x3e8ed8(0xde)]),'parentId':_0x2e4dcd['id']});break;}case v[_0x3e8ed8(0x113)]:{const _0x5960a1=this[_0x3e8ed8(0x14b)][_0x3e8ed8(0xf1)](_0x447c94,_0x3ca42f,_0x528c9d[_0x3e8ed8(0x13e)]);_0x5960a1&&_0x5960a1[_0x3e8ed8(0x104)]&&this['_threadCommentModel'][_0x3e8ed8(0x125)](_0x447c94,_0x3ca42f,_0x528c9d[_0x3e8ed8(0x13e)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x3e8ed8(0xdc)](_0x447c94,_0x3ca42f,{'commentId':_0x528c9d[_0x3e8ed8(0x13e)],'text':JSON[_0x3e8ed8(0x134)](_0x528c9d['content'])});break;}case v[_0x3e8ed8(0x138)]:{const _0x5077cf=(_0x375ac7=this[_0x3e8ed8(0x14b)][_0x3e8ed8(0x145)](_0x528c9d[_0x3e8ed8(0xfc)])[_0x3e8ed8(0xff)](_0x41d019=>_0x41d019[_0x3e8ed8(0xe2)]===_0x528c9d[_0x3e8ed8(0xe2)]))==null?void 0x0:_0x375ac7[_0x3e8ed8(0x12f)];_0x5077cf&&this[_0x3e8ed8(0x14b)]['resolveComment'](_0x447c94,_0x3ca42f,_0x5077cf['id'],_0x528c9d['solved']===I[_0x3e8ed8(0xf4)]);break;}}}));}};function _0x5471(_0x5d808b,_0xce3ba7){_0x5d808b=_0x5d808b-0xd3;const _0x33b0e5=_0x33b0();let _0x5471df=_0x33b0e5[_0x5d808b];return _0x5471df;}_=E([S(0x0,c['Inject'](b['CommentService'])),S(0x1,c[_0x4c278f(0x115)](M[_0x4c278f(0x117)])),S(0x2,c[_0x4c278f(0x115)](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x4c278f(0x10f)]))],_);function _0x33b0(){const _0x44eded=['length','/list','Plugin','UniverThreadCommentUIPlugin','parentId','Module','map','values','onReady','4875352VGYBLT','UniverCollaborationClientPlugin','Edit','_sessionService','rangeId','listComments','Injector','_init','delete','bufferTime','Delete','user','Inject','_configService','ThreadCommentModel','_initDataSource','UserManagerService','comment','1618452muMaHr','add','Disposable','415gTHEVn','/solved','addUser','CustomRangeType','YYYY/MM/DD\x20HH:mm','stringify','4491JHQpBb','deleteComment','CollaborationSessionService','492709LbdSPT','format','2244393gWZzbv','_initUserSync','DependentOn','76748srsOue','ref','OpenOrReOpen','root','30dkCiZU','syncUpdateMutationToColla','users','3293218glWnZt','parse','size','/edit','filter','Solve','_injector','body','subscribe','reply','_config','replyId','solved','get','userID','dataSource','post','/delete','getUnit','Reply','/universer-api/user/list','/reply','Add','UniverInstanceType','_threadCommentModel','UniverLicensePlugin','userId','HTTPService','merge','Unknown','code','_commentService','UNIVER_UNKNOWN','slice','pipe','forEach','rangeType','updateComment','_httpService','content','_threadCommentDataSource','getMemberID','createTimestamp','threadId','addComment','_threadCommentDataSourceService','payload','thread-comment-data-source.config','saveCommentToSnapshot','type','getCurrentUser','getOwnPropertyDescriptor','onStarting','disposeWithMe','symbol','requireSession','replies','UNRECOGNIZED','getComment','customRanges','defineProperty','Solved','toStringTag','getUser','14790WuMJYf','_userService','dayjs','error','/universer-api/comment/unit/','unitId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverThreadCommentDataSourcePlugin','find'];_0x33b0=function(){return _0x44eded;};return _0x33b0();}const q=_0x4c278f(0xe6),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x5e71f7,_0x428554,_0x464c1d,_0x56c3e1)=>{const _0x6e29a9=_0x4c278f;for(var _0x1dc3fe=_0x56c3e1>0x1?void 0x0:_0x56c3e1?A(_0x428554,_0x464c1d):_0x428554,_0x4ee37e=_0x5e71f7[_0x6e29a9(0x100)]-0x1,_0x8fc2a6;_0x4ee37e>=0x0;_0x4ee37e--)(_0x8fc2a6=_0x5e71f7[_0x4ee37e])&&(_0x1dc3fe=_0x8fc2a6(_0x1dc3fe)||_0x1dc3fe);return _0x1dc3fe;},C=(_0x37bfa6,_0x41ce29)=>(_0x39ddd7,_0x21c4cc)=>_0x41ce29(_0x39ddd7,_0x21c4cc,_0x37bfa6);function Y(_0x38b05c,_0x9d5000){const _0x1e0fef=_0x4c278f,_0x54bfba=_0x38b05c['replies'][0x0];return{..._0x9d5000,'id':_0x54bfba['replyId'],'resolved':_0x38b05c[_0x1e0fef(0x13f)]===0x1,'dT':f(_0x54bfba[_0x1e0fef(0xe1)]),'personId':_0x54bfba[_0x1e0fef(0x14d)],'threadId':_0x54bfba['threadId']};}function G(_0x388a43,_0xcccd87,_0x14f0b3){const _0x18672c=_0x4c278f;var _0x44cb6f,_0x35ffd9;if(((_0x35ffd9=(_0x44cb6f=_0x388a43==null?void 0x0:_0x388a43['replies'])==null?void 0x0:_0x44cb6f[_0x18672c(0x100)])!=null?_0x35ffd9:0x0)>0x0){const _0x410351=(_0x2bb3fb,_0x44cdc4)=>({'id':_0x2bb3fb[_0x18672c(0x13e)],'threadId':_0x2bb3fb['threadId'],'dT':f(_0x2bb3fb[_0x18672c(0xe1)]),'personId':_0x2bb3fb['userId'],'resolved':_0x388a43[_0x18672c(0x13f)]===I[_0x18672c(0xf4)],'unitId':_0xcccd87,'subUnitId':_0x14f0b3,'text':JSON['parse'](_0x2bb3fb['content']),'parentId':_0x44cdc4}),_0x388da4=_0x410351(_0x388a43[_0x18672c(0xef)][0x0]);return{..._0x388da4,'children':_0x388a43[_0x18672c(0xef)][_0x18672c(0xd8)](0x1)[_0x18672c(0x106)](_0x591475=>_0x410351(_0x591475,_0x388da4['id']))};}return null;}let p=class{constructor(_0x5bd950,_0x2c9c22,_0x595bc2){const _0x4bd526=_0x4c278f;this[_0x4bd526(0xdd)]=_0x5bd950,this[_0x4bd526(0xf8)]=_0x2c9c22,this[_0x4bd526(0x10c)]=_0x595bc2;}async[_0x4c278f(0xe3)](_0x1cc0cd){const _0x3fa7af=_0x4c278f;var _0x2cdf20,_0x3d96fb;const {parentId:_0x450d2e,unitId:_0x37152e,text:_0x3a6ea8,threadId:_0x127e73}=_0x1cc0cd,_0x40c7fa=(_0x3d96fb=(_0x2cdf20=_0x3a6ea8[_0x3fa7af(0xf2)])==null?void 0x0:_0x2cdf20[_0x3fa7af(0x137)](_0x576049=>_0x576049[_0x3fa7af(0xdb)]===c[_0x3fa7af(0x121)]['COMMENT'])[_0x3fa7af(0x106)](_0x571cad=>_0x571cad[_0x3fa7af(0x10d)]))!=null?_0x3d96fb:[],_0xe3a833=JSON[_0x3fa7af(0x123)](_0x3a6ea8),_0x294a02=(await this[_0x3fa7af(0x10c)]['requireSession'](_0x37152e))[_0x3fa7af(0xe0)]();if(_0x450d2e){const _0x460249={'memberId':_0x294a02,'unitId':_0x37152e,'content':_0xe3a833,'mention':_0x40c7fa,'threadId':_0x127e73},_0x472aca=(await this['_httpService'][_0x3fa7af(0x143)](_0x3fa7af(0xfb)+_0x37152e+_0x3fa7af(0x148),{'body':_0x460249}))[_0x3fa7af(0x13a)][_0x3fa7af(0x13c)];return{..._0x1cc0cd,'id':_0x472aca[_0x3fa7af(0x13e)],'dT':c[_0x3fa7af(0xf9)](+_0x472aca[_0x3fa7af(0xe1)])[_0x3fa7af(0x128)](_0x3fa7af(0x122)),'personId':_0x472aca['userId']};}else{const _0x3998a4={'memberId':_0x294a02,'unitId':_0x37152e,'content':_0xe3a833,'mention':_0x40c7fa},_0x2e4164=await this[_0x3fa7af(0xdd)][_0x3fa7af(0x143)](_0x3fa7af(0xfb)+_0x37152e+'/add',{'body':_0x3998a4});return Y(_0x2e4164[_0x3fa7af(0x13a)][_0x3fa7af(0x11a)],_0x1cc0cd);}}async['updateComment'](_0x451a97){const _0x480617=_0x4c278f;var _0x191366,_0x5e5821;const {text:_0x463481,unitId:_0x590b06}=_0x451a97,_0x4ab46b=(_0x5e5821=(_0x191366=_0x463481[_0x480617(0xf2)])==null?void 0x0:_0x191366['filter'](_0x5995a4=>_0x5995a4[_0x480617(0xdb)]===c[_0x480617(0x121)]['COMMENT'])[_0x480617(0x106)](_0x55395a=>_0x55395a['rangeId']))!=null?_0x5e5821:[],_0xa7ecb4=JSON[_0x480617(0x123)](_0x463481),_0x12a3fd=_0x451a97[_0x480617(0xe2)],_0x6fc735=_0x451a97['id'],_0x387624={'memberId':(await this['_sessionService'][_0x480617(0xee)](_0x590b06))[_0x480617(0xe0)](),'unitId':_0x590b06,'threadId':_0x12a3fd,'mention':_0x4ab46b,'content':_0xa7ecb4,'replyId':_0x6fc735},_0x4e219e=await this[_0x480617(0xdd)][_0x480617(0x143)](_0x480617(0xfb)+_0x590b06+_0x480617(0x136),{'body':_0x387624});return!_0x4e219e[_0x480617(0x13a)][_0x480617(0xfa)]||_0x4e219e[_0x480617(0x13a)][_0x480617(0xfa)][_0x480617(0xd5)]===0x1;}async['resolveComment'](_0x546194){const _0x3b97d6=_0x4c278f,{unitId:_0x137fc0}=_0x546194,_0x51747f=_0x546194[_0x3b97d6(0xe2)],_0x434877={'memberId':this[_0x3b97d6(0xf8)][_0x3b97d6(0xe9)]()[_0x3b97d6(0x141)],'unitId':_0x137fc0,'threadId':_0x51747f,'solved':_0x546194['resolved']?I[_0x3b97d6(0xf4)]:I[_0x3b97d6(0x12e)]},_0xe3d56f=await this[_0x3b97d6(0xdd)]['post']('/universer-api/comment/unit/'+_0x137fc0+_0x3b97d6(0x11f),{'body':_0x434877});return!_0xe3d56f[_0x3b97d6(0x13a)][_0x3b97d6(0xfa)]||_0xe3d56f[_0x3b97d6(0x13a)][_0x3b97d6(0xfa)][_0x3b97d6(0xd5)]===0x1;}async[_0x4c278f(0x125)](_0x37bf83,_0x26f216,_0x416c61,_0x50c643){const _0x1cd7e9=_0x4c278f,_0x5f0469={'memberId':(await this[_0x1cd7e9(0x10c)][_0x1cd7e9(0xee)](_0x37bf83))[_0x1cd7e9(0xe0)](),'threadId':_0x416c61,'replyId':_0x50c643,'unitId':_0x37bf83},_0x1af403=await this['_httpService'][_0x1cd7e9(0x143)]('/universer-api/comment/unit/'+_0x37bf83+_0x1cd7e9(0x144),{'body':_0x5f0469});return!_0x1af403[_0x1cd7e9(0x13a)][_0x1cd7e9(0xfa)]||_0x1af403[_0x1cd7e9(0x13a)][_0x1cd7e9(0xfa)][_0x1cd7e9(0xd5)]===0x1;}async[_0x4c278f(0x10e)](_0x798907,_0x2a9558,_0x50f2eb){const _0xfdf931=_0x4c278f,_0x5a27be={'unitId':_0x798907,'threadId':_0x50f2eb},_0x385e6e=await this['_httpService']['post'](_0xfdf931(0xfb)+_0x798907+_0xfdf931(0x101),{'body':_0x5a27be}),_0x9d4849=_0x50f2eb['map'](_0x45a85f=>G(_0x385e6e[_0xfdf931(0x13a)]['comments'][_0x45a85f],_0x798907,_0x2a9558))[_0xfdf931(0x137)](Boolean);return Object[_0xfdf931(0x107)](_0x385e6e[_0xfdf931(0x13a)][_0xfdf931(0x132)])['forEach'](_0x16c329=>{const _0x4f0f89=_0xfdf931;this['_userService'][_0x4f0f89(0x120)](_0x16c329);}),_0x9d4849;}[_0x4c278f(0xe7)](_0x397a71){const _0x469e54=_0x4c278f;return{'id':_0x397a71['id'],'threadId':_0x397a71['threadId'],'ref':_0x397a71[_0x469e54(0x12d)]};}};p=x([C(0x0,c[_0x4c278f(0x115)](P[_0x4c278f(0x14e)])),C(0x1,c[_0x4c278f(0x115)](c['UserManagerService'])),C(0x2,c['Inject'](b[_0x4c278f(0x126)]))],p);var H=Object[_0x4c278f(0xea)],J=(_0x1555f5,_0x43d73b,_0x3c49c9,_0x575eca)=>{for(var _0x125123=_0x575eca>0x1?void 0x0:_0x575eca?H(_0x43d73b,_0x3c49c9):_0x43d73b,_0x57cc75=_0x1555f5['length']-0x1,_0x4dc913;_0x57cc75>=0x0;_0x57cc75--)(_0x4dc913=_0x1555f5[_0x57cc75])&&(_0x125123=_0x4dc913(_0x125123)||_0x125123);return _0x125123;},y=(_0x2856ec,_0x31586d)=>(_0x585b2e,_0x6a8972)=>_0x31586d(_0x585b2e,_0x6a8972,_0x2856ec);let g=class extends c[_0x4c278f(0x11d)]{constructor(_0x40c1d8,_0x5167d7){const _0x29d8e3=_0x4c278f;super(),this['_threadCommentDataSourceService']=_0x40c1d8,this[_0x29d8e3(0xdf)]=_0x5167d7,this[_0x29d8e3(0x118)]();}[_0x4c278f(0x118)](){const _0x199bf9=_0x4c278f;this[_0x199bf9(0xe4)][_0x199bf9(0x142)]=this[_0x199bf9(0xdf)],this[_0x199bf9(0xe4)][_0x199bf9(0x131)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x4c278f(0x115)](p))],g);var F=Object[_0x4c278f(0xf3)],L=Object['getOwnPropertyDescriptor'],Z=(_0x3b9453,_0x1d2cdb,_0x4330e9)=>_0x1d2cdb in _0x3b9453?F(_0x3b9453,_0x1d2cdb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4330e9}):_0x3b9453[_0x1d2cdb]=_0x4330e9,W=(_0x164923,_0x46373d,_0xa7aef9,_0x5358d1)=>{for(var _0x48e4f0=_0x5358d1>0x1?void 0x0:_0x5358d1?L(_0x46373d,_0xa7aef9):_0x46373d,_0x245923=_0x164923['length']-0x1,_0x429e09;_0x245923>=0x0;_0x245923--)(_0x429e09=_0x164923[_0x245923])&&(_0x48e4f0=_0x429e09(_0x48e4f0)||_0x48e4f0);return _0x48e4f0;},O=(_0x39cd3a,_0x2d276e)=>(_0x4dfd55,_0x13ef59)=>_0x2d276e(_0x4dfd55,_0x13ef59,_0x39cd3a),N=(_0x3710d0,_0x18d59c,_0x535f9b)=>Z(_0x3710d0,typeof _0x18d59c!=_0x4c278f(0xed)?_0x18d59c+'':_0x18d59c,_0x535f9b);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x4c278f(0x102)]{constructor(_0x493370=D,_0x3e2a7b,_0xd272a3){const _0x1585d7=_0x4c278f;super(),this[_0x1585d7(0x13d)]=_0x493370,this[_0x1585d7(0x139)]=_0x3e2a7b,this['_configService']=_0xd272a3;const {..._0x585be5}=c[_0x1585d7(0xd3)]({},D,this[_0x1585d7(0x13d)]);this[_0x1585d7(0x116)]['setConfig'](q,_0x585be5);}[_0x4c278f(0xeb)](){const _0x355c98=_0x4c278f;[[p],[g],[_]][_0x355c98(0xda)](_0x46b2e7=>{const _0x3e28e2=_0x355c98;this[_0x3e28e2(0x139)]['add'](_0x46b2e7);});}[_0x4c278f(0x108)](){const _0x25e3af=_0x4c278f;this[_0x25e3af(0x139)][_0x25e3af(0x140)](g),this[_0x25e3af(0x139)][_0x25e3af(0x140)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports[_0x4c278f(0xfe)],_0x4c278f(0xe8),c[_0x4c278f(0x14a)][_0x4c278f(0xd7)]),exports[_0x4c278f(0xfe)]=W([c[_0x4c278f(0x12b)](w[_0x4c278f(0x103)],b[_0x4c278f(0x10a)],T[_0x4c278f(0x14c)]),O(0x1,c[_0x4c278f(0x115)](c[_0x4c278f(0x10f)])),O(0x2,c['IConfigService'])],exports[_0x4c278f(0xfe)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x566e92=_0x4978;(function(_0x4151f4,_0x5ba13e){const _0xf53b9=_0x4978,_0x18764d=_0x4151f4();while(!![]){try{const _0x3c4c55=parseInt(_0xf53b9(0x1a4))/0x1+parseInt(_0xf53b9(0x17b))/0x2+parseInt(_0xf53b9(0x1ce))/0x3+-parseInt(_0xf53b9(0x182))/0x4*(-parseInt(_0xf53b9(0x1c0))/0x5)+-parseInt(_0xf53b9(0x18b))/0x6*(parseInt(_0xf53b9(0x1af))/0x7)+parseInt(_0xf53b9(0x1c4))/0x8+-parseInt(_0xf53b9(0x17f))/0x9;if(_0x3c4c55===_0x5ba13e)break;else _0x18764d['push'](_0x18764d['shift']());}catch(_0x1665a7){_0x18764d['push'](_0x18764d['shift']());}}}(_0x246c,0xb11be));import{CommentService as _0x2bf8f1,CollaborationSessionService as _0x19134d,UniverCollaborationClientPlugin as _0x428713}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x56de4c}from'@univerjs-pro/license';import{dayjs as _0x2a6e24,UserManagerService as _0x2b454a,Inject as _0x228d0a,Injector as _0x10100d,Disposable as _0x32bfe7,CustomRangeType as _0x5deff7,UniverInstanceType as _0x2ef3d3,DependentOn as _0x512e62,IConfigService as _0x5c0e15,Plugin as _0x4a70cc,merge as _0xa2d842}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3f1117}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x53e792,IThreadCommentDataSourceService as _0x505b6d}from'@univerjs/thread-comment';import{bufferTime as _0x1d13f7}from'rxjs';import{HTTPService as _0x38e1d4}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2fe957=>(_0x2fe957[_0x2fe957['OpenOrReOpen']=0x0]=_0x566e92(0x1ad),_0x2fe957[_0x2fe957[_0x566e92(0x192)]=0x1]=_0x566e92(0x192),_0x2fe957[_0x2fe957['UNRECOGNIZED']=-0x1]=_0x566e92(0x1cb),_0x2fe957))(I||{}),v=(_0x22bda5=>(_0x22bda5[_0x22bda5['Unknown']=0x0]='Unknown',_0x22bda5[_0x22bda5[_0x566e92(0x1cf)]=0x1]=_0x566e92(0x1cf),_0x22bda5[_0x22bda5['Reply']=0x2]=_0x566e92(0x1cd),_0x22bda5[_0x22bda5[_0x566e92(0x1b0)]=0x3]=_0x566e92(0x1b0),_0x22bda5[_0x22bda5[_0x566e92(0x1c3)]=0x4]=_0x566e92(0x1c3),_0x22bda5[_0x22bda5['Solve']=0x5]=_0x566e92(0x1a5),_0x22bda5[_0x22bda5[_0x566e92(0x1cb)]=-0x1]=_0x566e92(0x1cb),_0x22bda5))(v||{});const y=_0x2ebf51=>_0x2a6e24(new Date(+_0x2ebf51))[_0x566e92(0x1bb)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x484a1c,_0x2054c6)=>{const _0x562c9c=_0x566e92,_0x5ad13a=_0x484a1c['get'](_0x2b454a),_0x3d2df6=_0x484a1c[_0x562c9c(0x1d5)](_0x38e1d4);_0x2054c6[_0x562c9c(0x1d0)](_0x3331b7=>{const _0x34ad25=_0x562c9c;_0x5ad13a[_0x34ad25(0x1b9)](_0x3331b7)&&_0x2054c6[_0x34ad25(0x17a)](_0x3331b7);}),_0x2054c6[_0x562c9c(0x195)]&&(await _0x3d2df6['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x2054c6]}}))[_0x562c9c(0x1b1)]['users'][_0x562c9c(0x1d0)](_0x24e738=>{const _0x2b3ae3=_0x562c9c;_0x24e738&&_0x5ad13a[_0x2b3ae3(0x1d4)](_0x24e738);});};var K=Object[_0x566e92(0x1d9)],V=(_0x3378e3,_0x54873a,_0x33de9a,_0x1f6117)=>{for(var _0x40f0ca=_0x1f6117>0x1?void 0x0:_0x1f6117?K(_0x54873a,_0x33de9a):_0x54873a,_0x3536b5=_0x3378e3['length']-0x1,_0xaa7fde;_0x3536b5>=0x0;_0x3536b5--)(_0xaa7fde=_0x3378e3[_0x3536b5])&&(_0x40f0ca=_0xaa7fde(_0x40f0ca)||_0x40f0ca);return _0x40f0ca;},p=(_0x15fe6a,_0x2d562b)=>(_0x5e8232,_0x42d333)=>_0x2d562b(_0x5e8232,_0x42d333,_0x15fe6a);let _=class extends _0x32bfe7{constructor(_0x2228ee,_0x5edec9,_0x9e9716,_0xc65a00){const _0xa19c23=_0x566e92;super(),this[_0xa19c23(0x1ac)]=_0x2228ee,this[_0xa19c23(0x1a1)]=_0x5edec9,this['_userService']=_0x9e9716,this[_0xa19c23(0x184)]=_0xc65a00,this[_0xa19c23(0x19a)](),this[_0xa19c23(0x185)]();}['_initUserSync'](){const _0x57e692=_0x566e92;this['disposeWithMe'](this[_0x57e692(0x1a1)][_0x57e692(0x1c9)][_0x57e692(0x1d2)](_0x1d13f7(0x10))['subscribe'](_0x2e7828=>{const _0x1f2996=_0x57e692,_0x27d066=new Set();_0x2e7828['forEach'](_0x451d01=>{const _0x160bc1=_0x4978;if(_0x451d01['type']===_0x160bc1(0x18a)){const _0x3c8c0f=_0x451d01[_0x160bc1(0x17c)][_0x160bc1(0x18d)];_0x27d066[_0x160bc1(0x18a)](_0x3c8c0f);}}),B(this[_0x1f2996(0x184)],_0x27d066);}));}[_0x566e92(0x19a)](){const _0xf2abe2=_0x566e92;this[_0xf2abe2(0x1a6)](this['_commentService'][_0xf2abe2(0x1c9)]['subscribe'](async _0x91ed5b=>{const _0x12e023=_0xf2abe2;var _0x55fc1a,_0x41ac85,_0x3a1d81,_0x29c11e;const _0x16b4df=(_0x55fc1a=this['_threadCommentModel']['getUnit'](_0x91ed5b[_0x12e023(0x1b8)])[_0x12e023(0x188)](_0x1ba272=>_0x1ba272[_0x12e023(0x17d)]===_0x91ed5b[_0x12e023(0x17d)]))==null?void 0x0:_0x55fc1a[_0x12e023(0x1c6)];if(!_0x16b4df)return;const {unitId:_0x5c19df,subUnitId:_0x5ac403}=_0x16b4df;switch(_0x91ed5b[_0x12e023(0x196)]&&this[_0x12e023(0x1b5)][_0x12e023(0x1d4)](_0x91ed5b['user']),_0x91ed5b[_0x12e023(0x1c7)]){case v[_0x12e023(0x1cf)]:break;case v['Reply']:{this['_threadCommentModel'][_0x12e023(0x181)](_0x5c19df,_0x5ac403,{'unitId':_0x5c19df,'subUnitId':_0x5ac403,'ref':'','id':_0x91ed5b[_0x12e023(0x1ae)],'dT':y(+_0x91ed5b[_0x12e023(0x1bf)]),'threadId':_0x91ed5b[_0x12e023(0x17d)],'personId':(_0x3a1d81=(_0x41ac85=_0x91ed5b[_0x12e023(0x196)])==null?void 0x0:_0x41ac85['userID'])!=null?_0x3a1d81:_0x91ed5b[_0x12e023(0x19d)],'text':JSON[_0x12e023(0x1d7)](_0x91ed5b[_0x12e023(0x19c)]),'parentId':_0x16b4df['id']});break;}case v[_0x12e023(0x1c3)]:{const _0x5b3399=this[_0x12e023(0x1a1)]['getComment'](_0x5c19df,_0x5ac403,_0x91ed5b[_0x12e023(0x1ae)]);_0x5b3399&&_0x5b3399['parentId']&&this[_0x12e023(0x1a1)]['deleteComment'](_0x5c19df,_0x5ac403,_0x91ed5b[_0x12e023(0x1ae)]);break;}case v[_0x12e023(0x1b0)]:{this['_threadCommentModel'][_0x12e023(0x1ba)](_0x5c19df,_0x5ac403,{'commentId':_0x91ed5b[_0x12e023(0x1ae)],'text':JSON[_0x12e023(0x1d7)](_0x91ed5b[_0x12e023(0x19c)])});break;}case v[_0x12e023(0x1a5)]:{const _0x1e4aad=(_0x29c11e=this['_threadCommentModel']['getUnit'](_0x91ed5b['unitId'])[_0x12e023(0x188)](_0x9ca084=>_0x9ca084['threadId']===_0x91ed5b[_0x12e023(0x17d)]))==null?void 0x0:_0x29c11e[_0x12e023(0x1c6)];_0x1e4aad&&this[_0x12e023(0x1a1)]['resolveComment'](_0x5c19df,_0x5ac403,_0x1e4aad['id'],_0x91ed5b[_0x12e023(0x1b4)]===I[_0x12e023(0x192)]);break;}}}));}};_=V([p(0x0,_0x228d0a(_0x2bf8f1)),p(0x1,_0x228d0a(_0x53e792)),p(0x2,_0x228d0a(_0x2b454a)),p(0x3,_0x228d0a(_0x10100d))],_);const z=_0x566e92(0x1d8),O={};var k=Object[_0x566e92(0x1d9)],Q=(_0x1c0a2d,_0x336acf,_0x5e89ed,_0x56b986)=>{const _0x535c20=_0x566e92;for(var _0x54fc48=_0x56b986>0x1?void 0x0:_0x56b986?k(_0x336acf,_0x5e89ed):_0x336acf,_0x293dce=_0x1c0a2d[_0x535c20(0x1c1)]-0x1,_0x24429f;_0x293dce>=0x0;_0x293dce--)(_0x24429f=_0x1c0a2d[_0x293dce])&&(_0x54fc48=_0x24429f(_0x54fc48)||_0x54fc48);return _0x54fc48;},b=(_0x4e31dc,_0x1e03ef)=>(_0xfe5e48,_0x5c6a66)=>_0x1e03ef(_0xfe5e48,_0x5c6a66,_0x4e31dc);function X(_0x4dddad,_0x4830a0){const _0x3ed482=_0x566e92,_0x2b3cd6=_0x4dddad[_0x3ed482(0x190)][0x0];return{..._0x4830a0,'id':_0x2b3cd6[_0x3ed482(0x1ae)],'resolved':_0x4dddad['solved']===0x1,'dT':y(_0x2b3cd6[_0x3ed482(0x1bf)]),'personId':_0x2b3cd6['userId'],'threadId':_0x2b3cd6['threadId']};}function ee(_0x315331,_0x5225d0,_0x45cbfb){const _0x41a946=_0x566e92;var _0x2f2781,_0x59de68;if(((_0x59de68=(_0x2f2781=_0x315331==null?void 0x0:_0x315331[_0x41a946(0x190)])==null?void 0x0:_0x2f2781[_0x41a946(0x1c1)])!=null?_0x59de68:0x0)>0x0){const _0x475fe9=(_0x35f434,_0x1146b8)=>({'id':_0x35f434['replyId'],'threadId':_0x35f434['threadId'],'dT':y(_0x35f434[_0x41a946(0x1bf)]),'personId':_0x35f434[_0x41a946(0x19d)],'resolved':_0x315331['solved']===I[_0x41a946(0x192)],'unitId':_0x5225d0,'subUnitId':_0x45cbfb,'text':JSON[_0x41a946(0x1d7)](_0x35f434[_0x41a946(0x19c)]),'parentId':_0x1146b8}),_0x17b98d=_0x475fe9(_0x315331[_0x41a946(0x190)][0x0]);return{..._0x17b98d,'children':_0x315331['replies'][_0x41a946(0x1aa)](0x1)[_0x41a946(0x1c2)](_0x21b9b8=>_0x475fe9(_0x21b9b8,_0x17b98d['id']))};}return null;}function _0x4978(_0x2e8473,_0x14a663){_0x2e8473=_0x2e8473-0x17a;const _0x246c73=_0x246c();let _0x4978ed=_0x246c73[_0x2e8473];return _0x4978ed;}function _0x246c(){const _0x42e02a=['_httpService','unitId','getUser','updateComment','format','/add','_config','reply','createTimestamp','245065UcGrDW','length','map','Delete','2097704pMVOir','_configService','root','type','/delete','commentUpdate$','getMemberID','UNRECOGNIZED','onStarting','Reply','3906726bdBuof','Add','forEach','listComments','pipe','syncUpdateMutationToColla','addUser','get','customRanges','parse','thread-comment-data-source.config','getOwnPropertyDescriptor','values','ref','delete','459266BVNWdE','payload','threadId','/universer-api/comment/unit/','9947007nrrwdv','onReady','addComment','12RudHoH','requireSession','_injector','_initUserSync','_threadCommentDataSourceService','pluginName','find','stringify','add','7473438niRlcW','getCurrentUser','personId','/list','filter','replies','post','Solved','UNIVER_UNKNOWN','comments','size','user','/reply','_threadCommentDataSource','deleteComment','_init','rangeId','content','userId','saveCommentToSnapshot','dataSource','userID','_threadCommentModel','_initDataSource','resolveComment','1135107xIKmJr','Solve','disposeWithMe','code','COMMENT','rangeType','slice','_sessionService','_commentService','OpenOrReOpen','replyId','7hbXvVG','Edit','body','/solved','setConfig','solved','_userService','error'];_0x246c=function(){return _0x42e02a;};return _0x246c();}let S=class{constructor(_0x4635db,_0x2e161b,_0x34cd79){const _0x3eb3d6=_0x566e92;this['_httpService']=_0x4635db,this[_0x3eb3d6(0x1b5)]=_0x2e161b,this[_0x3eb3d6(0x1ab)]=_0x34cd79;}async['addComment'](_0x55d157){const _0x324ee0=_0x566e92;var _0x3f0b43,_0x145f0f;const {parentId:_0x3f8e8c,unitId:_0x1b23e9,text:_0x5b2696,threadId:_0xffca03}=_0x55d157,_0x1ee016=(_0x145f0f=(_0x3f0b43=_0x5b2696['customRanges'])==null?void 0x0:_0x3f0b43[_0x324ee0(0x18f)](_0x398ad0=>_0x398ad0[_0x324ee0(0x1a9)]===_0x5deff7[_0x324ee0(0x1a8)])[_0x324ee0(0x1c2)](_0xbf3763=>_0xbf3763[_0x324ee0(0x19b)]))!=null?_0x145f0f:[],_0x145931=JSON[_0x324ee0(0x189)](_0x5b2696),_0x39f568=(await this[_0x324ee0(0x1ab)][_0x324ee0(0x183)](_0x1b23e9))[_0x324ee0(0x1ca)]();if(_0x3f8e8c){const _0x2802c5={'memberId':_0x39f568,'unitId':_0x1b23e9,'content':_0x145931,'mention':_0x1ee016,'threadId':_0xffca03},_0x1750e4=(await this[_0x324ee0(0x1b7)][_0x324ee0(0x191)](_0x324ee0(0x17e)+_0x1b23e9+_0x324ee0(0x197),{'body':_0x2802c5}))[_0x324ee0(0x1b1)][_0x324ee0(0x1be)];return{..._0x55d157,'id':_0x1750e4[_0x324ee0(0x1ae)],'dT':_0x2a6e24(+_0x1750e4[_0x324ee0(0x1bf)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x1750e4[_0x324ee0(0x19d)]};}else{const _0x3b5c8d={'memberId':_0x39f568,'unitId':_0x1b23e9,'content':_0x145931,'mention':_0x1ee016},_0x52dd8c=await this[_0x324ee0(0x1b7)][_0x324ee0(0x191)](_0x324ee0(0x17e)+_0x1b23e9+_0x324ee0(0x1bc),{'body':_0x3b5c8d});return X(_0x52dd8c[_0x324ee0(0x1b1)]['comment'],_0x55d157);}}async[_0x566e92(0x1ba)](_0x26cf02){const _0x45b8de=_0x566e92;var _0x1da307,_0x58c17f;const {text:_0xc6bd56,unitId:_0x11530b}=_0x26cf02,_0x33160=(_0x58c17f=(_0x1da307=_0xc6bd56[_0x45b8de(0x1d6)])==null?void 0x0:_0x1da307[_0x45b8de(0x18f)](_0x219568=>_0x219568[_0x45b8de(0x1a9)]===_0x5deff7['COMMENT'])['map'](_0x494c58=>_0x494c58[_0x45b8de(0x19b)]))!=null?_0x58c17f:[],_0x2f0e0d=JSON['stringify'](_0xc6bd56),_0x1c7215=_0x26cf02[_0x45b8de(0x17d)],_0x5d7214=_0x26cf02['id'],_0x39d2d8={'memberId':(await this['_sessionService'][_0x45b8de(0x183)](_0x11530b))[_0x45b8de(0x1ca)](),'unitId':_0x11530b,'threadId':_0x1c7215,'mention':_0x33160,'content':_0x2f0e0d,'replyId':_0x5d7214},_0x3abf0f=await this[_0x45b8de(0x1b7)]['post'](_0x45b8de(0x17e)+_0x11530b+'/edit',{'body':_0x39d2d8});return!_0x3abf0f[_0x45b8de(0x1b1)]['error']||_0x3abf0f[_0x45b8de(0x1b1)][_0x45b8de(0x1b6)][_0x45b8de(0x1a7)]===0x1;}async[_0x566e92(0x1a3)](_0x4399d9){const _0x11ed0e=_0x566e92,{unitId:_0x3d244e}=_0x4399d9,_0x144746=_0x4399d9['threadId'],_0x5704ee={'memberId':this[_0x11ed0e(0x1b5)][_0x11ed0e(0x18c)]()[_0x11ed0e(0x1a0)],'unitId':_0x3d244e,'threadId':_0x144746,'solved':_0x4399d9['resolved']?I[_0x11ed0e(0x192)]:I[_0x11ed0e(0x1ad)]},_0x6f25b2=await this[_0x11ed0e(0x1b7)]['post'](_0x11ed0e(0x17e)+_0x3d244e+_0x11ed0e(0x1b2),{'body':_0x5704ee});return!_0x6f25b2[_0x11ed0e(0x1b1)][_0x11ed0e(0x1b6)]||_0x6f25b2[_0x11ed0e(0x1b1)][_0x11ed0e(0x1b6)][_0x11ed0e(0x1a7)]===0x1;}async[_0x566e92(0x199)](_0x431b40,_0xb61162,_0x50c8ee,_0x2d95f2){const _0x720422=_0x566e92,_0x36d9b0={'memberId':(await this[_0x720422(0x1ab)][_0x720422(0x183)](_0x431b40))[_0x720422(0x1ca)](),'threadId':_0x50c8ee,'replyId':_0x2d95f2,'unitId':_0x431b40},_0x30a198=await this[_0x720422(0x1b7)]['post'](_0x720422(0x17e)+_0x431b40+_0x720422(0x1c8),{'body':_0x36d9b0});return!_0x30a198[_0x720422(0x1b1)][_0x720422(0x1b6)]||_0x30a198['body'][_0x720422(0x1b6)][_0x720422(0x1a7)]===0x1;}async[_0x566e92(0x1d1)](_0x34d883,_0x2c75ce,_0x2def2b){const _0x2efd0c=_0x566e92,_0x3127a8={'unitId':_0x34d883,'threadId':_0x2def2b},_0x1a1361=await this[_0x2efd0c(0x1b7)][_0x2efd0c(0x191)]('/universer-api/comment/unit/'+_0x34d883+_0x2efd0c(0x18e),{'body':_0x3127a8}),_0x2b4838=_0x2def2b['map'](_0x496bbe=>ee(_0x1a1361[_0x2efd0c(0x1b1)][_0x2efd0c(0x194)][_0x496bbe],_0x34d883,_0x2c75ce))[_0x2efd0c(0x18f)](Boolean);return Object[_0x2efd0c(0x1da)](_0x1a1361[_0x2efd0c(0x1b1)]['users'])[_0x2efd0c(0x1d0)](_0x204390=>{const _0x53b07d=_0x2efd0c;this[_0x53b07d(0x1b5)][_0x53b07d(0x1d4)](_0x204390);}),_0x2b4838;}[_0x566e92(0x19e)](_0x1c54fb){const _0x44d066=_0x566e92;return{'id':_0x1c54fb['id'],'threadId':_0x1c54fb[_0x44d066(0x17d)],'ref':_0x1c54fb[_0x44d066(0x1db)]};}};S=Q([b(0x0,_0x228d0a(_0x38e1d4)),b(0x1,_0x228d0a(_0x2b454a)),b(0x2,_0x228d0a(_0x19134d))],S);var re=Object[_0x566e92(0x1d9)],te=(_0x4d767c,_0x501601,_0x37ebf1,_0x2ec760)=>{const _0x2dcdb7=_0x566e92;for(var _0xe5d630=_0x2ec760>0x1?void 0x0:_0x2ec760?re(_0x501601,_0x37ebf1):_0x501601,_0x18be74=_0x4d767c[_0x2dcdb7(0x1c1)]-0x1,_0x4b8bc2;_0x18be74>=0x0;_0x18be74--)(_0x4b8bc2=_0x4d767c[_0x18be74])&&(_0xe5d630=_0x4b8bc2(_0xe5d630)||_0xe5d630);return _0xe5d630;},M=(_0x2d48ba,_0x40c9fc)=>(_0x1f0988,_0x2a43ea)=>_0x40c9fc(_0x1f0988,_0x2a43ea,_0x2d48ba);let f=class extends _0x32bfe7{constructor(_0x38c894,_0x2d11c7){const _0x21f561=_0x566e92;super(),this[_0x21f561(0x186)]=_0x38c894,this[_0x21f561(0x198)]=_0x2d11c7,this[_0x21f561(0x1a2)]();}[_0x566e92(0x1a2)](){const _0x38a7e2=_0x566e92;this[_0x38a7e2(0x186)][_0x38a7e2(0x19f)]=this[_0x38a7e2(0x198)],this[_0x38a7e2(0x186)][_0x38a7e2(0x1d3)]=!0x1;}};f=te([M(0x0,_0x505b6d),M(0x1,_0x228d0a(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x5abbfa,_0x1ad024,_0x4c70f3)=>_0x1ad024 in _0x5abbfa?se(_0x5abbfa,_0x1ad024,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4c70f3}):_0x5abbfa[_0x1ad024]=_0x4c70f3,ie=(_0x25f4b1,_0x5a872d,_0x163863,_0x3ea07f)=>{const _0x2e7586=_0x566e92;for(var _0x30f392=_0x3ea07f>0x1?void 0x0:_0x3ea07f?oe(_0x5a872d,_0x163863):_0x5a872d,_0x1fcda5=_0x25f4b1[_0x2e7586(0x1c1)]-0x1,_0x569861;_0x1fcda5>=0x0;_0x1fcda5--)(_0x569861=_0x25f4b1[_0x1fcda5])&&(_0x30f392=_0x569861(_0x30f392)||_0x30f392);return _0x30f392;},N=(_0x5731a1,_0x2f5d71)=>(_0x1d6782,_0x43b46b)=>_0x2f5d71(_0x1d6782,_0x43b46b,_0x5731a1),$=(_0x247c28,_0x865b9a,_0x29865e)=>ne(_0x247c28,typeof _0x865b9a!='symbol'?_0x865b9a+'':_0x865b9a,_0x29865e);let g=class extends _0x4a70cc{constructor(_0x4750d7=O,_0x29d03c,_0x33b68d){const _0x153224=_0x566e92;super(),this[_0x153224(0x1bd)]=_0x4750d7,this['_injector']=_0x29d03c,this[_0x153224(0x1c5)]=_0x33b68d;const {..._0x577e68}=_0xa2d842({},O,this[_0x153224(0x1bd)]);this[_0x153224(0x1c5)][_0x153224(0x1b3)](z,_0x577e68);}[_0x566e92(0x1cc)](){const _0x18610c=_0x566e92;[[S],[f],[_]][_0x18610c(0x1d0)](_0x5acffd=>{const _0x2b5f70=_0x18610c;this['_injector'][_0x2b5f70(0x18a)](_0x5acffd);});}[_0x566e92(0x180)](){const _0x543873=_0x566e92;this[_0x543873(0x184)][_0x543873(0x1d5)](f),this[_0x543873(0x184)]['get'](_);}};$(g,_0x566e92(0x187),W),$(g,_0x566e92(0x1c7),_0x2ef3d3[_0x566e92(0x193)]),g=ie([_0x512e62(_0x3f1117,_0x428713,_0x56de4c),N(0x1,_0x228d0a(_0x10100d)),N(0x2,_0x5c0e15)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x1b5406=_0x18e2;(function(_0x233beb,_0x488ddc){const _0x34cc8d=_0x18e2,_0x34d4e3=_0x233beb();while(!![]){try{const _0x4ea703=-parseInt(_0x34cc8d(0x110))/0x1+parseInt(_0x34cc8d(0x12b))/0x2*(parseInt(_0x34cc8d(0xda))/0x3)+-parseInt(_0x34cc8d(0x12c))/0x4*(parseInt(_0x34cc8d(0x10a))/0x5)+parseInt(_0x34cc8d(0x10b))/0x6+-parseInt(_0x34cc8d(0x11f))/0x7*(-parseInt(_0x34cc8d(0xe3))/0x8)+parseInt(_0x34cc8d(0x126))/0x9*(-parseInt(_0x34cc8d(0xd7))/0xa)+parseInt(_0x34cc8d(0x138))/0xb;if(_0x4ea703===_0x488ddc)break;else _0x34d4e3['push'](_0x34d4e3['shift']());}catch(_0x4642c8){_0x34d4e3['push'](_0x34d4e3['shift']());}}}(_0x3e4e,0x90a8e));import{CommentService as _0x15fc73,CollaborationSessionService as _0x5d3e79,UniverCollaborationClientPlugin as _0x5bad45}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x49b678}from'@univerjs-pro/license';import{dayjs as _0x406bfa,UserManagerService as _0x1f4e32,Inject as _0x586d83,Injector as _0x1ecf46,Disposable as _0x5cea14,CustomRangeType as _0x3fcf68,UniverInstanceType as _0x5e18d6,DependentOn as _0xb7ae4b,IConfigService as _0x14eba5,Plugin as _0x1aeb3f,merge as _0x57c5e8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2f63eb}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4ad7f8,IThreadCommentDataSourceService as _0x313212}from'@univerjs/thread-comment';import{bufferTime as _0x2f4625}from'rxjs';import{HTTPService as _0x470d01}from'@univerjs/network';const W=_0x1b5406(0xd4);var I=(_0x3725ee=>(_0x3725ee[_0x3725ee[_0x1b5406(0x136)]=0x0]=_0x1b5406(0x136),_0x3725ee[_0x3725ee[_0x1b5406(0xf9)]=0x1]=_0x1b5406(0xf9),_0x3725ee[_0x3725ee[_0x1b5406(0xf0)]=-0x1]=_0x1b5406(0xf0),_0x3725ee))(I||{}),v=(_0x391de2=>(_0x391de2[_0x391de2['Unknown']=0x0]=_0x1b5406(0x106),_0x391de2[_0x391de2[_0x1b5406(0x123)]=0x1]=_0x1b5406(0x123),_0x391de2[_0x391de2[_0x1b5406(0xef)]=0x2]=_0x1b5406(0xef),_0x391de2[_0x391de2[_0x1b5406(0x131)]=0x3]='Edit',_0x391de2[_0x391de2[_0x1b5406(0x133)]=0x4]=_0x1b5406(0x133),_0x391de2[_0x391de2[_0x1b5406(0x122)]=0x5]=_0x1b5406(0x122),_0x391de2[_0x391de2[_0x1b5406(0xf0)]=-0x1]=_0x1b5406(0xf0),_0x391de2))(v||{});const y=_0x3e7f11=>_0x406bfa(new Date(+_0x3e7f11))['format'](_0x1b5406(0x101)),B=async(_0xc8bb5c,_0x39e530)=>{const _0x4fea06=_0x1b5406,_0x1d498b=_0xc8bb5c[_0x4fea06(0xfc)](_0x1f4e32),_0x4fc949=_0xc8bb5c[_0x4fea06(0xfc)](_0x470d01);_0x39e530[_0x4fea06(0xe6)](_0x22296c=>{const _0x8d2bcb=_0x4fea06;_0x1d498b[_0x8d2bcb(0xea)](_0x22296c)&&_0x39e530[_0x8d2bcb(0x109)](_0x22296c);}),_0x39e530[_0x4fea06(0xe0)]&&(await _0x4fc949[_0x4fea06(0xfc)](_0x4fea06(0x129),{'params':{'userIDs':[..._0x39e530]}}))[_0x4fea06(0x113)][_0x4fea06(0x11c)][_0x4fea06(0xe6)](_0x438b0a=>{_0x438b0a&&_0x1d498b['addUser'](_0x438b0a);});};var K=Object[_0x1b5406(0x11a)],V=(_0x363717,_0x29a8c7,_0x35840d,_0x1daeff)=>{const _0x557f45=_0x1b5406;for(var _0x2164d2=_0x1daeff>0x1?void 0x0:_0x1daeff?K(_0x29a8c7,_0x35840d):_0x29a8c7,_0x5b508d=_0x363717[_0x557f45(0x112)]-0x1,_0x2662bb;_0x5b508d>=0x0;_0x5b508d--)(_0x2662bb=_0x363717[_0x5b508d])&&(_0x2164d2=_0x2662bb(_0x2164d2)||_0x2164d2);return _0x2164d2;},p=(_0xe75e1e,_0x5f3f37)=>(_0x49c402,_0xd8dfaa)=>_0x5f3f37(_0x49c402,_0xd8dfaa,_0xe75e1e);let _=class extends _0x5cea14{constructor(_0x66d8fe,_0x15e4c9,_0x3a7103,_0x1190ae){const _0x5b0c8a=_0x1b5406;super(),this[_0x5b0c8a(0x127)]=_0x66d8fe,this[_0x5b0c8a(0xec)]=_0x15e4c9,this[_0x5b0c8a(0x102)]=_0x3a7103,this['_injector']=_0x1190ae,this[_0x5b0c8a(0xdc)](),this[_0x5b0c8a(0x139)]();}[_0x1b5406(0x139)](){const _0x3321e5=_0x1b5406;this[_0x3321e5(0xee)](this[_0x3321e5(0xec)][_0x3321e5(0x111)]['pipe'](_0x2f4625(0x10))[_0x3321e5(0x124)](_0x510577=>{const _0x9c4923=_0x3321e5,_0xebdc79=new Set();_0x510577[_0x9c4923(0xe6)](_0x1fcbd9=>{const _0x37f1fa=_0x9c4923;if(_0x1fcbd9['type']===_0x37f1fa(0x108)){const _0x300fa5=_0x1fcbd9[_0x37f1fa(0x103)][_0x37f1fa(0x128)];_0xebdc79['add'](_0x300fa5);}}),B(this[_0x9c4923(0x119)],_0xebdc79);}));}['_init'](){const _0x243838=_0x1b5406;this[_0x243838(0xee)](this[_0x243838(0x127)][_0x243838(0x111)][_0x243838(0x124)](async _0x38c17c=>{const _0x316e9c=_0x243838;var _0x4b9974,_0x225332,_0x3efdca,_0x42fe40;const _0xf9de9e=(_0x4b9974=this[_0x316e9c(0xec)]['getUnit'](_0x38c17c[_0x316e9c(0x118)])[_0x316e9c(0x117)](_0x5cf53e=>_0x5cf53e[_0x316e9c(0x10d)]===_0x38c17c[_0x316e9c(0x10d)]))==null?void 0x0:_0x4b9974[_0x316e9c(0x120)];if(!_0xf9de9e)return;const {unitId:_0x1add03,subUnitId:_0x19a264}=_0xf9de9e;switch(_0x38c17c[_0x316e9c(0x11d)]&&this[_0x316e9c(0x102)][_0x316e9c(0x132)](_0x38c17c[_0x316e9c(0x11d)]),_0x38c17c[_0x316e9c(0xd6)]){case v[_0x316e9c(0x123)]:break;case v['Reply']:{this[_0x316e9c(0xec)][_0x316e9c(0xd9)](_0x1add03,_0x19a264,{'unitId':_0x1add03,'subUnitId':_0x19a264,'ref':'','id':_0x38c17c[_0x316e9c(0xf6)],'dT':y(+_0x38c17c[_0x316e9c(0xf3)]),'threadId':_0x38c17c['threadId'],'personId':(_0x3efdca=(_0x225332=_0x38c17c[_0x316e9c(0x11d)])==null?void 0x0:_0x225332[_0x316e9c(0xe7)])!=null?_0x3efdca:_0x38c17c['userId'],'text':JSON[_0x316e9c(0xfa)](_0x38c17c[_0x316e9c(0x125)]),'parentId':_0xf9de9e['id']});break;}case v[_0x316e9c(0x133)]:{const _0x347434=this[_0x316e9c(0xec)]['getComment'](_0x1add03,_0x19a264,_0x38c17c[_0x316e9c(0xf6)]);_0x347434&&_0x347434[_0x316e9c(0xd8)]&&this[_0x316e9c(0xec)][_0x316e9c(0xf8)](_0x1add03,_0x19a264,_0x38c17c[_0x316e9c(0xf6)]);break;}case v[_0x316e9c(0x131)]:{this[_0x316e9c(0xec)]['updateComment'](_0x1add03,_0x19a264,{'commentId':_0x38c17c[_0x316e9c(0xf6)],'text':JSON[_0x316e9c(0xfa)](_0x38c17c[_0x316e9c(0x125)])});break;}case v[_0x316e9c(0x122)]:{const _0xe32ed8=(_0x42fe40=this['_threadCommentModel'][_0x316e9c(0xeb)](_0x38c17c[_0x316e9c(0x118)])[_0x316e9c(0x117)](_0x5e790b=>_0x5e790b['threadId']===_0x38c17c[_0x316e9c(0x10d)]))==null?void 0x0:_0x42fe40[_0x316e9c(0x120)];_0xe32ed8&&this[_0x316e9c(0xec)][_0x316e9c(0x100)](_0x1add03,_0x19a264,_0xe32ed8['id'],_0x38c17c[_0x316e9c(0x12f)]===I[_0x316e9c(0xf9)]);break;}}}));}};_=V([p(0x0,_0x586d83(_0x15fc73)),p(0x1,_0x586d83(_0x4ad7f8)),p(0x2,_0x586d83(_0x1f4e32)),p(0x3,_0x586d83(_0x1ecf46))],_);const z=_0x1b5406(0xde),O={};var k=Object[_0x1b5406(0x11a)],Q=(_0x2919d5,_0x24ec4c,_0x182952,_0x4e05af)=>{const _0x1fbb41=_0x1b5406;for(var _0x69bb8c=_0x4e05af>0x1?void 0x0:_0x4e05af?k(_0x24ec4c,_0x182952):_0x24ec4c,_0x13a448=_0x2919d5[_0x1fbb41(0x112)]-0x1,_0x2746c0;_0x13a448>=0x0;_0x13a448--)(_0x2746c0=_0x2919d5[_0x13a448])&&(_0x69bb8c=_0x2746c0(_0x69bb8c)||_0x69bb8c);return _0x69bb8c;},b=(_0x3e66b5,_0xce4029)=>(_0x3fea9c,_0x52fd53)=>_0xce4029(_0x3fea9c,_0x52fd53,_0x3e66b5);function X(_0x270f1a,_0x5212d8){const _0x2ee303=_0x1b5406,_0x590ed6=_0x270f1a[_0x2ee303(0x116)][0x0];return{..._0x5212d8,'id':_0x590ed6[_0x2ee303(0xf6)],'resolved':_0x270f1a['solved']===0x1,'dT':y(_0x590ed6['createTimestamp']),'personId':_0x590ed6[_0x2ee303(0xf7)],'threadId':_0x590ed6[_0x2ee303(0x10d)]};}function ee(_0x558d7c,_0x45e9e2,_0x8b898b){const _0x3c3f07=_0x1b5406;var _0x511cb6,_0xc79b;if(((_0xc79b=(_0x511cb6=_0x558d7c==null?void 0x0:_0x558d7c[_0x3c3f07(0x116)])==null?void 0x0:_0x511cb6[_0x3c3f07(0x112)])!=null?_0xc79b:0x0)>0x0){const _0x445141=(_0xfd3c6c,_0x5473b0)=>({'id':_0xfd3c6c[_0x3c3f07(0xf6)],'threadId':_0xfd3c6c[_0x3c3f07(0x10d)],'dT':y(_0xfd3c6c[_0x3c3f07(0xf3)]),'personId':_0xfd3c6c[_0x3c3f07(0xf7)],'resolved':_0x558d7c[_0x3c3f07(0x12f)]===I['Solved'],'unitId':_0x45e9e2,'subUnitId':_0x8b898b,'text':JSON[_0x3c3f07(0xfa)](_0xfd3c6c[_0x3c3f07(0x125)]),'parentId':_0x5473b0}),_0x5339b7=_0x445141(_0x558d7c[_0x3c3f07(0x116)][0x0]);return{..._0x5339b7,'children':_0x558d7c['replies'][_0x3c3f07(0xfb)](0x1)['map'](_0x1fc8a0=>_0x445141(_0x1fc8a0,_0x5339b7['id']))};}return null;}let S=class{constructor(_0x4a88c4,_0x24c375,_0x360582){const _0x5ebc5b=_0x1b5406;this[_0x5ebc5b(0x11b)]=_0x4a88c4,this[_0x5ebc5b(0x102)]=_0x24c375,this[_0x5ebc5b(0xf1)]=_0x360582;}async[_0x1b5406(0xd9)](_0x1fb0e7){const _0x14596f=_0x1b5406;var _0x1edfdb,_0x1698ba;const {parentId:_0x58288b,unitId:_0x1210f3,text:_0x18f7be,threadId:_0x478c44}=_0x1fb0e7,_0xa35879=(_0x1698ba=(_0x1edfdb=_0x18f7be['customRanges'])==null?void 0x0:_0x1edfdb['filter'](_0x4d3bae=>_0x4d3bae[_0x14596f(0xe4)]===_0x3fcf68[_0x14596f(0x135)])[_0x14596f(0xfd)](_0x4c2791=>_0x4c2791[_0x14596f(0x10f)]))!=null?_0x1698ba:[],_0x3c4c20=JSON['stringify'](_0x18f7be),_0x6faecb=(await this[_0x14596f(0xf1)][_0x14596f(0x10e)](_0x1210f3))[_0x14596f(0x107)]();if(_0x58288b){const _0x22c659={'memberId':_0x6faecb,'unitId':_0x1210f3,'content':_0x3c4c20,'mention':_0xa35879,'threadId':_0x478c44},_0x43acbd=(await this['_httpService']['post'](_0x14596f(0x130)+_0x1210f3+_0x14596f(0x105),{'body':_0x22c659}))[_0x14596f(0x113)]['reply'];return{..._0x1fb0e7,'id':_0x43acbd[_0x14596f(0xf6)],'dT':_0x406bfa(+_0x43acbd[_0x14596f(0xf3)])[_0x14596f(0x115)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x43acbd[_0x14596f(0xf7)]};}else{const _0x3c1eb0={'memberId':_0x6faecb,'unitId':_0x1210f3,'content':_0x3c4c20,'mention':_0xa35879},_0x183bc3=await this[_0x14596f(0x11b)][_0x14596f(0xf2)](_0x14596f(0x130)+_0x1210f3+_0x14596f(0xf4),{'body':_0x3c1eb0});return X(_0x183bc3[_0x14596f(0x113)][_0x14596f(0xdd)],_0x1fb0e7);}}async[_0x1b5406(0x12e)](_0x4dd125){const _0x304818=_0x1b5406;var _0xe1b8b7,_0x33740a;const {text:_0x18c549,unitId:_0xcfb341}=_0x4dd125,_0x5efbc3=(_0x33740a=(_0xe1b8b7=_0x18c549[_0x304818(0xe5)])==null?void 0x0:_0xe1b8b7[_0x304818(0xe1)](_0x27d4b0=>_0x27d4b0[_0x304818(0xe4)]===_0x3fcf68['COMMENT'])['map'](_0x3ba5b0=>_0x3ba5b0[_0x304818(0x10f)]))!=null?_0x33740a:[],_0x552f43=JSON['stringify'](_0x18c549),_0xd665e3=_0x4dd125[_0x304818(0x10d)],_0x3b0970=_0x4dd125['id'],_0x11b202={'memberId':(await this[_0x304818(0xf1)][_0x304818(0x10e)](_0xcfb341))[_0x304818(0x107)](),'unitId':_0xcfb341,'threadId':_0xd665e3,'mention':_0x5efbc3,'content':_0x552f43,'replyId':_0x3b0970},_0xf9a3b0=await this[_0x304818(0x11b)][_0x304818(0xf2)]('/universer-api/comment/unit/'+_0xcfb341+_0x304818(0xed),{'body':_0x11b202});return!_0xf9a3b0[_0x304818(0x113)][_0x304818(0xe2)]||_0xf9a3b0['body']['error'][_0x304818(0xff)]===0x1;}async['resolveComment'](_0x1275e3){const _0x354d53=_0x1b5406,{unitId:_0x136af7}=_0x1275e3,_0x464ab2=_0x1275e3['threadId'],_0x11e476={'memberId':this[_0x354d53(0x102)]['getCurrentUser']()[_0x354d53(0xe7)],'unitId':_0x136af7,'threadId':_0x464ab2,'solved':_0x1275e3[_0x354d53(0x12d)]?I[_0x354d53(0xf9)]:I['OpenOrReOpen']},_0x2b4554=await this[_0x354d53(0x11b)][_0x354d53(0xf2)](_0x354d53(0x130)+_0x136af7+_0x354d53(0xf5),{'body':_0x11e476});return!_0x2b4554[_0x354d53(0x113)][_0x354d53(0xe2)]||_0x2b4554[_0x354d53(0x113)]['error'][_0x354d53(0xff)]===0x1;}async[_0x1b5406(0xf8)](_0xfda7ad,_0x522ac5,_0x239cff,_0x2e480a){const _0x276ac7=_0x1b5406,_0x4e75e1={'memberId':(await this['_sessionService']['requireSession'](_0xfda7ad))[_0x276ac7(0x107)](),'threadId':_0x239cff,'replyId':_0x2e480a,'unitId':_0xfda7ad},_0x5c7e5d=await this['_httpService'][_0x276ac7(0xf2)](_0x276ac7(0x130)+_0xfda7ad+_0x276ac7(0x11e),{'body':_0x4e75e1});return!_0x5c7e5d[_0x276ac7(0x113)]['error']||_0x5c7e5d['body'][_0x276ac7(0xe2)][_0x276ac7(0xff)]===0x1;}async[_0x1b5406(0x10c)](_0xda3720,_0x2125b4,_0x431ae3){const _0x1aea5f=_0x1b5406,_0x29a89c={'unitId':_0xda3720,'threadId':_0x431ae3},_0x533cc3=await this[_0x1aea5f(0x11b)]['post'](_0x1aea5f(0x130)+_0xda3720+_0x1aea5f(0xe8),{'body':_0x29a89c}),_0x46589f=_0x431ae3[_0x1aea5f(0xfd)](_0x50301b=>ee(_0x533cc3[_0x1aea5f(0x113)][_0x1aea5f(0x12a)][_0x50301b],_0xda3720,_0x2125b4))[_0x1aea5f(0xe1)](Boolean);return Object[_0x1aea5f(0xfe)](_0x533cc3[_0x1aea5f(0x113)][_0x1aea5f(0x11c)])[_0x1aea5f(0xe6)](_0x44614a=>{const _0x1cc9cd=_0x1aea5f;this[_0x1cc9cd(0x102)]['addUser'](_0x44614a);}),_0x46589f;}['saveCommentToSnapshot'](_0x57f1eb){const _0xb53a2=_0x1b5406;return{'id':_0x57f1eb['id'],'threadId':_0x57f1eb[_0xb53a2(0x10d)],'ref':_0x57f1eb['ref']};}};S=Q([b(0x0,_0x586d83(_0x470d01)),b(0x1,_0x586d83(_0x1f4e32)),b(0x2,_0x586d83(_0x5d3e79))],S);function _0x18e2(_0x4de6a,_0x55e864){_0x4de6a=_0x4de6a-0xd4;const _0x3e4eec=_0x3e4e();let _0x18e2ac=_0x3e4eec[_0x4de6a];return _0x18e2ac;}var re=Object[_0x1b5406(0x11a)],te=(_0x45c44a,_0x2b99f5,_0x579b52,_0x1e3d45)=>{const _0x277717=_0x1b5406;for(var _0x4a1cc3=_0x1e3d45>0x1?void 0x0:_0x1e3d45?re(_0x2b99f5,_0x579b52):_0x2b99f5,_0x5d89f2=_0x45c44a[_0x277717(0x112)]-0x1,_0x3bad21;_0x5d89f2>=0x0;_0x5d89f2--)(_0x3bad21=_0x45c44a[_0x5d89f2])&&(_0x4a1cc3=_0x3bad21(_0x4a1cc3)||_0x4a1cc3);return _0x4a1cc3;},M=(_0x2a5e7f,_0x3aae73)=>(_0x4e732e,_0x4ede68)=>_0x3aae73(_0x4e732e,_0x4ede68,_0x2a5e7f);function _0x3e4e(){const _0x13e357=['/reply','Unknown','getMemberID','add','delete','320EuPzmk','4036248oXdEKR','listComments','threadId','requireSession','rangeId','1089589KqsCCr','commentUpdate$','length','body','symbol','format','replies','find','unitId','_injector','getOwnPropertyDescriptor','_httpService','users','user','/delete','525edRnwi','root','_threadCommentDataSourceService','Solve','Add','subscribe','content','5121YsUYKL','_commentService','personId','/universer-api/user/list','comments','258pUqroZ','7244ppUTyL','resolved','updateComment','solved','/universer-api/comment/unit/','Edit','addUser','Delete','UNIVER_UNKNOWN','COMMENT','OpenOrReOpen','setConfig','3099580IzMCyH','_initUserSync','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','defineProperty','type','7530LfaHSp','parentId','addComment','11691avSzPw','_threadCommentDataSource','_init','comment','thread-comment-data-source.config','_initDataSource','size','filter','error','82056hWMTZb','rangeType','customRanges','forEach','userID','/list','_configService','getUser','getUnit','_threadCommentModel','/edit','disposeWithMe','Reply','UNRECOGNIZED','_sessionService','post','createTimestamp','/add','/solved','replyId','userId','deleteComment','Solved','parse','slice','get','map','values','code','resolveComment','YYYY/MM/DD\x20HH:mm','_userService','payload','_config'];_0x3e4e=function(){return _0x13e357;};return _0x3e4e();}let f=class extends _0x5cea14{constructor(_0x197beb,_0x4bec77){const _0xd2a1b4=_0x1b5406;super(),this[_0xd2a1b4(0x121)]=_0x197beb,this[_0xd2a1b4(0xdb)]=_0x4bec77,this[_0xd2a1b4(0xdf)]();}[_0x1b5406(0xdf)](){const _0x30188d=_0x1b5406;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x30188d(0x121)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x313212),M(0x1,_0x586d83(S))],f);var se=Object[_0x1b5406(0xd5)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x35bb38,_0x3b17a0,_0x3dc517)=>_0x3b17a0 in _0x35bb38?se(_0x35bb38,_0x3b17a0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3dc517}):_0x35bb38[_0x3b17a0]=_0x3dc517,ie=(_0x554245,_0x15d35b,_0x14aabb,_0xa51bd1)=>{const _0x1fcd48=_0x1b5406;for(var _0x582c76=_0xa51bd1>0x1?void 0x0:_0xa51bd1?oe(_0x15d35b,_0x14aabb):_0x15d35b,_0x5c9007=_0x554245[_0x1fcd48(0x112)]-0x1,_0x1217e5;_0x5c9007>=0x0;_0x5c9007--)(_0x1217e5=_0x554245[_0x5c9007])&&(_0x582c76=_0x1217e5(_0x582c76)||_0x582c76);return _0x582c76;},N=(_0x397e4f,_0x167e4a)=>(_0x2bd8e8,_0x255d06)=>_0x167e4a(_0x2bd8e8,_0x255d06,_0x397e4f),$=(_0x234f8f,_0x5bc48a,_0xa57e39)=>ne(_0x234f8f,typeof _0x5bc48a!=_0x1b5406(0x114)?_0x5bc48a+'':_0x5bc48a,_0xa57e39);let g=class extends _0x1aeb3f{constructor(_0x4572fa=O,_0x209452,_0x580de0){const _0x124164=_0x1b5406;super(),this[_0x124164(0x104)]=_0x4572fa,this['_injector']=_0x209452,this[_0x124164(0xe9)]=_0x580de0;const {..._0x374e2f}=_0x57c5e8({},O,this[_0x124164(0x104)]);this[_0x124164(0xe9)][_0x124164(0x137)](z,_0x374e2f);}['onStarting'](){const _0x1b5a8b=_0x1b5406;[[S],[f],[_]][_0x1b5a8b(0xe6)](_0x394cc2=>{const _0x478beb=_0x1b5a8b;this[_0x478beb(0x119)][_0x478beb(0x108)](_0x394cc2);});}['onReady'](){const _0x1ab5a8=_0x1b5406;this['_injector'][_0x1ab5a8(0xfc)](f),this[_0x1ab5a8(0x119)][_0x1ab5a8(0xfc)](_);}};$(g,'pluginName',W),$(g,_0x1b5406(0xd6),_0x5e18d6[_0x1b5406(0x134)]),g=ie([_0xb7ae4b(_0x2f63eb,_0x5bad45,_0x49b678),N(0x1,_0x586d83(_0x1ecf46)),N(0x2,_0x14eba5)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x566e92=_0x4978;(function(_0x4151f4,_0x5ba13e){const _0xf53b9=_0x4978,_0x18764d=_0x4151f4();while(!![]){try{const _0x3c4c55=parseInt(_0xf53b9(0x1a4))/0x1+parseInt(_0xf53b9(0x17b))/0x2+parseInt(_0xf53b9(0x1ce))/0x3+-parseInt(_0xf53b9(0x182))/0x4*(-parseInt(_0xf53b9(0x1c0))/0x5)+-parseInt(_0xf53b9(0x18b))/0x6*(parseInt(_0xf53b9(0x1af))/0x7)+parseInt(_0xf53b9(0x1c4))/0x8+-parseInt(_0xf53b9(0x17f))/0x9;if(_0x3c4c55===_0x5ba13e)break;else _0x18764d['push'](_0x18764d['shift']());}catch(_0x1665a7){_0x18764d['push'](_0x18764d['shift']());}}}(_0x246c,0xb11be));import{CommentService as _0x2bf8f1,CollaborationSessionService as _0x19134d,UniverCollaborationClientPlugin as _0x428713}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x56de4c}from'@univerjs-pro/license';import{dayjs as _0x2a6e24,UserManagerService as _0x2b454a,Inject as _0x228d0a,Injector as _0x10100d,Disposable as _0x32bfe7,CustomRangeType as _0x5deff7,UniverInstanceType as _0x2ef3d3,DependentOn as _0x512e62,IConfigService as _0x5c0e15,Plugin as _0x4a70cc,merge as _0xa2d842}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3f1117}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x53e792,IThreadCommentDataSourceService as _0x505b6d}from'@univerjs/thread-comment';import{bufferTime as _0x1d13f7}from'rxjs';import{HTTPService as _0x38e1d4}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2fe957=>(_0x2fe957[_0x2fe957['OpenOrReOpen']=0x0]=_0x566e92(0x1ad),_0x2fe957[_0x2fe957[_0x566e92(0x192)]=0x1]=_0x566e92(0x192),_0x2fe957[_0x2fe957['UNRECOGNIZED']=-0x1]=_0x566e92(0x1cb),_0x2fe957))(I||{}),v=(_0x22bda5=>(_0x22bda5[_0x22bda5['Unknown']=0x0]='Unknown',_0x22bda5[_0x22bda5[_0x566e92(0x1cf)]=0x1]=_0x566e92(0x1cf),_0x22bda5[_0x22bda5['Reply']=0x2]=_0x566e92(0x1cd),_0x22bda5[_0x22bda5[_0x566e92(0x1b0)]=0x3]=_0x566e92(0x1b0),_0x22bda5[_0x22bda5[_0x566e92(0x1c3)]=0x4]=_0x566e92(0x1c3),_0x22bda5[_0x22bda5['Solve']=0x5]=_0x566e92(0x1a5),_0x22bda5[_0x22bda5[_0x566e92(0x1cb)]=-0x1]=_0x566e92(0x1cb),_0x22bda5))(v||{});const y=_0x2ebf51=>_0x2a6e24(new Date(+_0x2ebf51))[_0x566e92(0x1bb)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x484a1c,_0x2054c6)=>{const _0x562c9c=_0x566e92,_0x5ad13a=_0x484a1c['get'](_0x2b454a),_0x3d2df6=_0x484a1c[_0x562c9c(0x1d5)](_0x38e1d4);_0x2054c6[_0x562c9c(0x1d0)](_0x3331b7=>{const _0x34ad25=_0x562c9c;_0x5ad13a[_0x34ad25(0x1b9)](_0x3331b7)&&_0x2054c6[_0x34ad25(0x17a)](_0x3331b7);}),_0x2054c6[_0x562c9c(0x195)]&&(await _0x3d2df6['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x2054c6]}}))[_0x562c9c(0x1b1)]['users'][_0x562c9c(0x1d0)](_0x24e738=>{const _0x2b3ae3=_0x562c9c;_0x24e738&&_0x5ad13a[_0x2b3ae3(0x1d4)](_0x24e738);});};var K=Object[_0x566e92(0x1d9)],V=(_0x3378e3,_0x54873a,_0x33de9a,_0x1f6117)=>{for(var _0x40f0ca=_0x1f6117>0x1?void 0x0:_0x1f6117?K(_0x54873a,_0x33de9a):_0x54873a,_0x3536b5=_0x3378e3['length']-0x1,_0xaa7fde;_0x3536b5>=0x0;_0x3536b5--)(_0xaa7fde=_0x3378e3[_0x3536b5])&&(_0x40f0ca=_0xaa7fde(_0x40f0ca)||_0x40f0ca);return _0x40f0ca;},p=(_0x15fe6a,_0x2d562b)=>(_0x5e8232,_0x42d333)=>_0x2d562b(_0x5e8232,_0x42d333,_0x15fe6a);let _=class extends _0x32bfe7{constructor(_0x2228ee,_0x5edec9,_0x9e9716,_0xc65a00){const _0xa19c23=_0x566e92;super(),this[_0xa19c23(0x1ac)]=_0x2228ee,this[_0xa19c23(0x1a1)]=_0x5edec9,this['_userService']=_0x9e9716,this[_0xa19c23(0x184)]=_0xc65a00,this[_0xa19c23(0x19a)](),this[_0xa19c23(0x185)]();}['_initUserSync'](){const _0x57e692=_0x566e92;this['disposeWithMe'](this[_0x57e692(0x1a1)][_0x57e692(0x1c9)][_0x57e692(0x1d2)](_0x1d13f7(0x10))['subscribe'](_0x2e7828=>{const _0x1f2996=_0x57e692,_0x27d066=new Set();_0x2e7828['forEach'](_0x451d01=>{const _0x160bc1=_0x4978;if(_0x451d01['type']===_0x160bc1(0x18a)){const _0x3c8c0f=_0x451d01[_0x160bc1(0x17c)][_0x160bc1(0x18d)];_0x27d066[_0x160bc1(0x18a)](_0x3c8c0f);}}),B(this[_0x1f2996(0x184)],_0x27d066);}));}[_0x566e92(0x19a)](){const _0xf2abe2=_0x566e92;this[_0xf2abe2(0x1a6)](this['_commentService'][_0xf2abe2(0x1c9)]['subscribe'](async _0x91ed5b=>{const _0x12e023=_0xf2abe2;var _0x55fc1a,_0x41ac85,_0x3a1d81,_0x29c11e;const _0x16b4df=(_0x55fc1a=this['_threadCommentModel']['getUnit'](_0x91ed5b[_0x12e023(0x1b8)])[_0x12e023(0x188)](_0x1ba272=>_0x1ba272[_0x12e023(0x17d)]===_0x91ed5b[_0x12e023(0x17d)]))==null?void 0x0:_0x55fc1a[_0x12e023(0x1c6)];if(!_0x16b4df)return;const {unitId:_0x5c19df,subUnitId:_0x5ac403}=_0x16b4df;switch(_0x91ed5b[_0x12e023(0x196)]&&this[_0x12e023(0x1b5)][_0x12e023(0x1d4)](_0x91ed5b['user']),_0x91ed5b[_0x12e023(0x1c7)]){case v[_0x12e023(0x1cf)]:break;case v['Reply']:{this['_threadCommentModel'][_0x12e023(0x181)](_0x5c19df,_0x5ac403,{'unitId':_0x5c19df,'subUnitId':_0x5ac403,'ref':'','id':_0x91ed5b[_0x12e023(0x1ae)],'dT':y(+_0x91ed5b[_0x12e023(0x1bf)]),'threadId':_0x91ed5b[_0x12e023(0x17d)],'personId':(_0x3a1d81=(_0x41ac85=_0x91ed5b[_0x12e023(0x196)])==null?void 0x0:_0x41ac85['userID'])!=null?_0x3a1d81:_0x91ed5b[_0x12e023(0x19d)],'text':JSON[_0x12e023(0x1d7)](_0x91ed5b[_0x12e023(0x19c)]),'parentId':_0x16b4df['id']});break;}case v[_0x12e023(0x1c3)]:{const _0x5b3399=this[_0x12e023(0x1a1)]['getComment'](_0x5c19df,_0x5ac403,_0x91ed5b[_0x12e023(0x1ae)]);_0x5b3399&&_0x5b3399['parentId']&&this[_0x12e023(0x1a1)]['deleteComment'](_0x5c19df,_0x5ac403,_0x91ed5b[_0x12e023(0x1ae)]);break;}case v[_0x12e023(0x1b0)]:{this['_threadCommentModel'][_0x12e023(0x1ba)](_0x5c19df,_0x5ac403,{'commentId':_0x91ed5b[_0x12e023(0x1ae)],'text':JSON[_0x12e023(0x1d7)](_0x91ed5b[_0x12e023(0x19c)])});break;}case v[_0x12e023(0x1a5)]:{const _0x1e4aad=(_0x29c11e=this['_threadCommentModel']['getUnit'](_0x91ed5b['unitId'])[_0x12e023(0x188)](_0x9ca084=>_0x9ca084['threadId']===_0x91ed5b[_0x12e023(0x17d)]))==null?void 0x0:_0x29c11e[_0x12e023(0x1c6)];_0x1e4aad&&this[_0x12e023(0x1a1)]['resolveComment'](_0x5c19df,_0x5ac403,_0x1e4aad['id'],_0x91ed5b[_0x12e023(0x1b4)]===I[_0x12e023(0x192)]);break;}}}));}};_=V([p(0x0,_0x228d0a(_0x2bf8f1)),p(0x1,_0x228d0a(_0x53e792)),p(0x2,_0x228d0a(_0x2b454a)),p(0x3,_0x228d0a(_0x10100d))],_);const z=_0x566e92(0x1d8),O={};var k=Object[_0x566e92(0x1d9)],Q=(_0x1c0a2d,_0x336acf,_0x5e89ed,_0x56b986)=>{const _0x535c20=_0x566e92;for(var _0x54fc48=_0x56b986>0x1?void 0x0:_0x56b986?k(_0x336acf,_0x5e89ed):_0x336acf,_0x293dce=_0x1c0a2d[_0x535c20(0x1c1)]-0x1,_0x24429f;_0x293dce>=0x0;_0x293dce--)(_0x24429f=_0x1c0a2d[_0x293dce])&&(_0x54fc48=_0x24429f(_0x54fc48)||_0x54fc48);return _0x54fc48;},b=(_0x4e31dc,_0x1e03ef)=>(_0xfe5e48,_0x5c6a66)=>_0x1e03ef(_0xfe5e48,_0x5c6a66,_0x4e31dc);function X(_0x4dddad,_0x4830a0){const _0x3ed482=_0x566e92,_0x2b3cd6=_0x4dddad[_0x3ed482(0x190)][0x0];return{..._0x4830a0,'id':_0x2b3cd6[_0x3ed482(0x1ae)],'resolved':_0x4dddad['solved']===0x1,'dT':y(_0x2b3cd6[_0x3ed482(0x1bf)]),'personId':_0x2b3cd6['userId'],'threadId':_0x2b3cd6['threadId']};}function ee(_0x315331,_0x5225d0,_0x45cbfb){const _0x41a946=_0x566e92;var _0x2f2781,_0x59de68;if(((_0x59de68=(_0x2f2781=_0x315331==null?void 0x0:_0x315331[_0x41a946(0x190)])==null?void 0x0:_0x2f2781[_0x41a946(0x1c1)])!=null?_0x59de68:0x0)>0x0){const _0x475fe9=(_0x35f434,_0x1146b8)=>({'id':_0x35f434['replyId'],'threadId':_0x35f434['threadId'],'dT':y(_0x35f434[_0x41a946(0x1bf)]),'personId':_0x35f434[_0x41a946(0x19d)],'resolved':_0x315331['solved']===I[_0x41a946(0x192)],'unitId':_0x5225d0,'subUnitId':_0x45cbfb,'text':JSON[_0x41a946(0x1d7)](_0x35f434[_0x41a946(0x19c)]),'parentId':_0x1146b8}),_0x17b98d=_0x475fe9(_0x315331[_0x41a946(0x190)][0x0]);return{..._0x17b98d,'children':_0x315331['replies'][_0x41a946(0x1aa)](0x1)[_0x41a946(0x1c2)](_0x21b9b8=>_0x475fe9(_0x21b9b8,_0x17b98d['id']))};}return null;}function _0x4978(_0x2e8473,_0x14a663){_0x2e8473=_0x2e8473-0x17a;const _0x246c73=_0x246c();let _0x4978ed=_0x246c73[_0x2e8473];return _0x4978ed;}function _0x246c(){const _0x42e02a=['_httpService','unitId','getUser','updateComment','format','/add','_config','reply','createTimestamp','245065UcGrDW','length','map','Delete','2097704pMVOir','_configService','root','type','/delete','commentUpdate$','getMemberID','UNRECOGNIZED','onStarting','Reply','3906726bdBuof','Add','forEach','listComments','pipe','syncUpdateMutationToColla','addUser','get','customRanges','parse','thread-comment-data-source.config','getOwnPropertyDescriptor','values','ref','delete','459266BVNWdE','payload','threadId','/universer-api/comment/unit/','9947007nrrwdv','onReady','addComment','12RudHoH','requireSession','_injector','_initUserSync','_threadCommentDataSourceService','pluginName','find','stringify','add','7473438niRlcW','getCurrentUser','personId','/list','filter','replies','post','Solved','UNIVER_UNKNOWN','comments','size','user','/reply','_threadCommentDataSource','deleteComment','_init','rangeId','content','userId','saveCommentToSnapshot','dataSource','userID','_threadCommentModel','_initDataSource','resolveComment','1135107xIKmJr','Solve','disposeWithMe','code','COMMENT','rangeType','slice','_sessionService','_commentService','OpenOrReOpen','replyId','7hbXvVG','Edit','body','/solved','setConfig','solved','_userService','error'];_0x246c=function(){return _0x42e02a;};return _0x246c();}let S=class{constructor(_0x4635db,_0x2e161b,_0x34cd79){const _0x3eb3d6=_0x566e92;this['_httpService']=_0x4635db,this[_0x3eb3d6(0x1b5)]=_0x2e161b,this[_0x3eb3d6(0x1ab)]=_0x34cd79;}async['addComment'](_0x55d157){const _0x324ee0=_0x566e92;var _0x3f0b43,_0x145f0f;const {parentId:_0x3f8e8c,unitId:_0x1b23e9,text:_0x5b2696,threadId:_0xffca03}=_0x55d157,_0x1ee016=(_0x145f0f=(_0x3f0b43=_0x5b2696['customRanges'])==null?void 0x0:_0x3f0b43[_0x324ee0(0x18f)](_0x398ad0=>_0x398ad0[_0x324ee0(0x1a9)]===_0x5deff7[_0x324ee0(0x1a8)])[_0x324ee0(0x1c2)](_0xbf3763=>_0xbf3763[_0x324ee0(0x19b)]))!=null?_0x145f0f:[],_0x145931=JSON[_0x324ee0(0x189)](_0x5b2696),_0x39f568=(await this[_0x324ee0(0x1ab)][_0x324ee0(0x183)](_0x1b23e9))[_0x324ee0(0x1ca)]();if(_0x3f8e8c){const _0x2802c5={'memberId':_0x39f568,'unitId':_0x1b23e9,'content':_0x145931,'mention':_0x1ee016,'threadId':_0xffca03},_0x1750e4=(await this[_0x324ee0(0x1b7)][_0x324ee0(0x191)](_0x324ee0(0x17e)+_0x1b23e9+_0x324ee0(0x197),{'body':_0x2802c5}))[_0x324ee0(0x1b1)][_0x324ee0(0x1be)];return{..._0x55d157,'id':_0x1750e4[_0x324ee0(0x1ae)],'dT':_0x2a6e24(+_0x1750e4[_0x324ee0(0x1bf)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x1750e4[_0x324ee0(0x19d)]};}else{const _0x3b5c8d={'memberId':_0x39f568,'unitId':_0x1b23e9,'content':_0x145931,'mention':_0x1ee016},_0x52dd8c=await this[_0x324ee0(0x1b7)][_0x324ee0(0x191)](_0x324ee0(0x17e)+_0x1b23e9+_0x324ee0(0x1bc),{'body':_0x3b5c8d});return X(_0x52dd8c[_0x324ee0(0x1b1)]['comment'],_0x55d157);}}async[_0x566e92(0x1ba)](_0x26cf02){const _0x45b8de=_0x566e92;var _0x1da307,_0x58c17f;const {text:_0xc6bd56,unitId:_0x11530b}=_0x26cf02,_0x33160=(_0x58c17f=(_0x1da307=_0xc6bd56[_0x45b8de(0x1d6)])==null?void 0x0:_0x1da307[_0x45b8de(0x18f)](_0x219568=>_0x219568[_0x45b8de(0x1a9)]===_0x5deff7['COMMENT'])['map'](_0x494c58=>_0x494c58[_0x45b8de(0x19b)]))!=null?_0x58c17f:[],_0x2f0e0d=JSON['stringify'](_0xc6bd56),_0x1c7215=_0x26cf02[_0x45b8de(0x17d)],_0x5d7214=_0x26cf02['id'],_0x39d2d8={'memberId':(await this['_sessionService'][_0x45b8de(0x183)](_0x11530b))[_0x45b8de(0x1ca)](),'unitId':_0x11530b,'threadId':_0x1c7215,'mention':_0x33160,'content':_0x2f0e0d,'replyId':_0x5d7214},_0x3abf0f=await this[_0x45b8de(0x1b7)]['post'](_0x45b8de(0x17e)+_0x11530b+'/edit',{'body':_0x39d2d8});return!_0x3abf0f[_0x45b8de(0x1b1)]['error']||_0x3abf0f[_0x45b8de(0x1b1)][_0x45b8de(0x1b6)][_0x45b8de(0x1a7)]===0x1;}async[_0x566e92(0x1a3)](_0x4399d9){const _0x11ed0e=_0x566e92,{unitId:_0x3d244e}=_0x4399d9,_0x144746=_0x4399d9['threadId'],_0x5704ee={'memberId':this[_0x11ed0e(0x1b5)][_0x11ed0e(0x18c)]()[_0x11ed0e(0x1a0)],'unitId':_0x3d244e,'threadId':_0x144746,'solved':_0x4399d9['resolved']?I[_0x11ed0e(0x192)]:I[_0x11ed0e(0x1ad)]},_0x6f25b2=await this[_0x11ed0e(0x1b7)]['post'](_0x11ed0e(0x17e)+_0x3d244e+_0x11ed0e(0x1b2),{'body':_0x5704ee});return!_0x6f25b2[_0x11ed0e(0x1b1)][_0x11ed0e(0x1b6)]||_0x6f25b2[_0x11ed0e(0x1b1)][_0x11ed0e(0x1b6)][_0x11ed0e(0x1a7)]===0x1;}async[_0x566e92(0x199)](_0x431b40,_0xb61162,_0x50c8ee,_0x2d95f2){const _0x720422=_0x566e92,_0x36d9b0={'memberId':(await this[_0x720422(0x1ab)][_0x720422(0x183)](_0x431b40))[_0x720422(0x1ca)](),'threadId':_0x50c8ee,'replyId':_0x2d95f2,'unitId':_0x431b40},_0x30a198=await this[_0x720422(0x1b7)]['post'](_0x720422(0x17e)+_0x431b40+_0x720422(0x1c8),{'body':_0x36d9b0});return!_0x30a198[_0x720422(0x1b1)][_0x720422(0x1b6)]||_0x30a198['body'][_0x720422(0x1b6)][_0x720422(0x1a7)]===0x1;}async[_0x566e92(0x1d1)](_0x34d883,_0x2c75ce,_0x2def2b){const _0x2efd0c=_0x566e92,_0x3127a8={'unitId':_0x34d883,'threadId':_0x2def2b},_0x1a1361=await this[_0x2efd0c(0x1b7)][_0x2efd0c(0x191)]('/universer-api/comment/unit/'+_0x34d883+_0x2efd0c(0x18e),{'body':_0x3127a8}),_0x2b4838=_0x2def2b['map'](_0x496bbe=>ee(_0x1a1361[_0x2efd0c(0x1b1)][_0x2efd0c(0x194)][_0x496bbe],_0x34d883,_0x2c75ce))[_0x2efd0c(0x18f)](Boolean);return Object[_0x2efd0c(0x1da)](_0x1a1361[_0x2efd0c(0x1b1)]['users'])[_0x2efd0c(0x1d0)](_0x204390=>{const _0x53b07d=_0x2efd0c;this[_0x53b07d(0x1b5)][_0x53b07d(0x1d4)](_0x204390);}),_0x2b4838;}[_0x566e92(0x19e)](_0x1c54fb){const _0x44d066=_0x566e92;return{'id':_0x1c54fb['id'],'threadId':_0x1c54fb[_0x44d066(0x17d)],'ref':_0x1c54fb[_0x44d066(0x1db)]};}};S=Q([b(0x0,_0x228d0a(_0x38e1d4)),b(0x1,_0x228d0a(_0x2b454a)),b(0x2,_0x228d0a(_0x19134d))],S);var re=Object[_0x566e92(0x1d9)],te=(_0x4d767c,_0x501601,_0x37ebf1,_0x2ec760)=>{const _0x2dcdb7=_0x566e92;for(var _0xe5d630=_0x2ec760>0x1?void 0x0:_0x2ec760?re(_0x501601,_0x37ebf1):_0x501601,_0x18be74=_0x4d767c[_0x2dcdb7(0x1c1)]-0x1,_0x4b8bc2;_0x18be74>=0x0;_0x18be74--)(_0x4b8bc2=_0x4d767c[_0x18be74])&&(_0xe5d630=_0x4b8bc2(_0xe5d630)||_0xe5d630);return _0xe5d630;},M=(_0x2d48ba,_0x40c9fc)=>(_0x1f0988,_0x2a43ea)=>_0x40c9fc(_0x1f0988,_0x2a43ea,_0x2d48ba);let f=class extends _0x32bfe7{constructor(_0x38c894,_0x2d11c7){const _0x21f561=_0x566e92;super(),this[_0x21f561(0x186)]=_0x38c894,this[_0x21f561(0x198)]=_0x2d11c7,this[_0x21f561(0x1a2)]();}[_0x566e92(0x1a2)](){const _0x38a7e2=_0x566e92;this[_0x38a7e2(0x186)][_0x38a7e2(0x19f)]=this[_0x38a7e2(0x198)],this[_0x38a7e2(0x186)][_0x38a7e2(0x1d3)]=!0x1;}};f=te([M(0x0,_0x505b6d),M(0x1,_0x228d0a(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x5abbfa,_0x1ad024,_0x4c70f3)=>_0x1ad024 in _0x5abbfa?se(_0x5abbfa,_0x1ad024,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4c70f3}):_0x5abbfa[_0x1ad024]=_0x4c70f3,ie=(_0x25f4b1,_0x5a872d,_0x163863,_0x3ea07f)=>{const _0x2e7586=_0x566e92;for(var _0x30f392=_0x3ea07f>0x1?void 0x0:_0x3ea07f?oe(_0x5a872d,_0x163863):_0x5a872d,_0x1fcda5=_0x25f4b1[_0x2e7586(0x1c1)]-0x1,_0x569861;_0x1fcda5>=0x0;_0x1fcda5--)(_0x569861=_0x25f4b1[_0x1fcda5])&&(_0x30f392=_0x569861(_0x30f392)||_0x30f392);return _0x30f392;},N=(_0x5731a1,_0x2f5d71)=>(_0x1d6782,_0x43b46b)=>_0x2f5d71(_0x1d6782,_0x43b46b,_0x5731a1),$=(_0x247c28,_0x865b9a,_0x29865e)=>ne(_0x247c28,typeof _0x865b9a!='symbol'?_0x865b9a+'':_0x865b9a,_0x29865e);let g=class extends _0x4a70cc{constructor(_0x4750d7=O,_0x29d03c,_0x33b68d){const _0x153224=_0x566e92;super(),this[_0x153224(0x1bd)]=_0x4750d7,this['_injector']=_0x29d03c,this[_0x153224(0x1c5)]=_0x33b68d;const {..._0x577e68}=_0xa2d842({},O,this[_0x153224(0x1bd)]);this[_0x153224(0x1c5)][_0x153224(0x1b3)](z,_0x577e68);}[_0x566e92(0x1cc)](){const _0x18610c=_0x566e92;[[S],[f],[_]][_0x18610c(0x1d0)](_0x5acffd=>{const _0x2b5f70=_0x18610c;this['_injector'][_0x2b5f70(0x18a)](_0x5acffd);});}[_0x566e92(0x180)](){const _0x543873=_0x566e92;this[_0x543873(0x184)][_0x543873(0x1d5)](f),this[_0x543873(0x184)]['get'](_);}};$(g,_0x566e92(0x187),W),$(g,_0x566e92(0x1c7),_0x2ef3d3[_0x566e92(0x193)]),g=ie([_0x512e62(_0x3f1117,_0x428713,_0x56de4c),N(0x1,_0x228d0a(_0x10100d)),N(0x2,_0x5c0e15)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x1b5406=_0x18e2;(function(_0x233beb,_0x488ddc){const _0x34cc8d=_0x18e2,_0x34d4e3=_0x233beb();while(!![]){try{const _0x4ea703=-parseInt(_0x34cc8d(0x110))/0x1+parseInt(_0x34cc8d(0x12b))/0x2*(parseInt(_0x34cc8d(0xda))/0x3)+-parseInt(_0x34cc8d(0x12c))/0x4*(parseInt(_0x34cc8d(0x10a))/0x5)+parseInt(_0x34cc8d(0x10b))/0x6+-parseInt(_0x34cc8d(0x11f))/0x7*(-parseInt(_0x34cc8d(0xe3))/0x8)+parseInt(_0x34cc8d(0x126))/0x9*(-parseInt(_0x34cc8d(0xd7))/0xa)+parseInt(_0x34cc8d(0x138))/0xb;if(_0x4ea703===_0x488ddc)break;else _0x34d4e3['push'](_0x34d4e3['shift']());}catch(_0x4642c8){_0x34d4e3['push'](_0x34d4e3['shift']());}}}(_0x3e4e,0x90a8e));import{CommentService as _0x15fc73,CollaborationSessionService as _0x5d3e79,UniverCollaborationClientPlugin as _0x5bad45}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x49b678}from'@univerjs-pro/license';import{dayjs as _0x406bfa,UserManagerService as _0x1f4e32,Inject as _0x586d83,Injector as _0x1ecf46,Disposable as _0x5cea14,CustomRangeType as _0x3fcf68,UniverInstanceType as _0x5e18d6,DependentOn as _0xb7ae4b,IConfigService as _0x14eba5,Plugin as _0x1aeb3f,merge as _0x57c5e8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2f63eb}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4ad7f8,IThreadCommentDataSourceService as _0x313212}from'@univerjs/thread-comment';import{bufferTime as _0x2f4625}from'rxjs';import{HTTPService as _0x470d01}from'@univerjs/network';const W=_0x1b5406(0xd4);var I=(_0x3725ee=>(_0x3725ee[_0x3725ee[_0x1b5406(0x136)]=0x0]=_0x1b5406(0x136),_0x3725ee[_0x3725ee[_0x1b5406(0xf9)]=0x1]=_0x1b5406(0xf9),_0x3725ee[_0x3725ee[_0x1b5406(0xf0)]=-0x1]=_0x1b5406(0xf0),_0x3725ee))(I||{}),v=(_0x391de2=>(_0x391de2[_0x391de2['Unknown']=0x0]=_0x1b5406(0x106),_0x391de2[_0x391de2[_0x1b5406(0x123)]=0x1]=_0x1b5406(0x123),_0x391de2[_0x391de2[_0x1b5406(0xef)]=0x2]=_0x1b5406(0xef),_0x391de2[_0x391de2[_0x1b5406(0x131)]=0x3]='Edit',_0x391de2[_0x391de2[_0x1b5406(0x133)]=0x4]=_0x1b5406(0x133),_0x391de2[_0x391de2[_0x1b5406(0x122)]=0x5]=_0x1b5406(0x122),_0x391de2[_0x391de2[_0x1b5406(0xf0)]=-0x1]=_0x1b5406(0xf0),_0x391de2))(v||{});const y=_0x3e7f11=>_0x406bfa(new Date(+_0x3e7f11))['format'](_0x1b5406(0x101)),B=async(_0xc8bb5c,_0x39e530)=>{const _0x4fea06=_0x1b5406,_0x1d498b=_0xc8bb5c[_0x4fea06(0xfc)](_0x1f4e32),_0x4fc949=_0xc8bb5c[_0x4fea06(0xfc)](_0x470d01);_0x39e530[_0x4fea06(0xe6)](_0x22296c=>{const _0x8d2bcb=_0x4fea06;_0x1d498b[_0x8d2bcb(0xea)](_0x22296c)&&_0x39e530[_0x8d2bcb(0x109)](_0x22296c);}),_0x39e530[_0x4fea06(0xe0)]&&(await _0x4fc949[_0x4fea06(0xfc)](_0x4fea06(0x129),{'params':{'userIDs':[..._0x39e530]}}))[_0x4fea06(0x113)][_0x4fea06(0x11c)][_0x4fea06(0xe6)](_0x438b0a=>{_0x438b0a&&_0x1d498b['addUser'](_0x438b0a);});};var K=Object[_0x1b5406(0x11a)],V=(_0x363717,_0x29a8c7,_0x35840d,_0x1daeff)=>{const _0x557f45=_0x1b5406;for(var _0x2164d2=_0x1daeff>0x1?void 0x0:_0x1daeff?K(_0x29a8c7,_0x35840d):_0x29a8c7,_0x5b508d=_0x363717[_0x557f45(0x112)]-0x1,_0x2662bb;_0x5b508d>=0x0;_0x5b508d--)(_0x2662bb=_0x363717[_0x5b508d])&&(_0x2164d2=_0x2662bb(_0x2164d2)||_0x2164d2);return _0x2164d2;},p=(_0xe75e1e,_0x5f3f37)=>(_0x49c402,_0xd8dfaa)=>_0x5f3f37(_0x49c402,_0xd8dfaa,_0xe75e1e);let _=class extends _0x5cea14{constructor(_0x66d8fe,_0x15e4c9,_0x3a7103,_0x1190ae){const _0x5b0c8a=_0x1b5406;super(),this[_0x5b0c8a(0x127)]=_0x66d8fe,this[_0x5b0c8a(0xec)]=_0x15e4c9,this[_0x5b0c8a(0x102)]=_0x3a7103,this['_injector']=_0x1190ae,this[_0x5b0c8a(0xdc)](),this[_0x5b0c8a(0x139)]();}[_0x1b5406(0x139)](){const _0x3321e5=_0x1b5406;this[_0x3321e5(0xee)](this[_0x3321e5(0xec)][_0x3321e5(0x111)]['pipe'](_0x2f4625(0x10))[_0x3321e5(0x124)](_0x510577=>{const _0x9c4923=_0x3321e5,_0xebdc79=new Set();_0x510577[_0x9c4923(0xe6)](_0x1fcbd9=>{const _0x37f1fa=_0x9c4923;if(_0x1fcbd9['type']===_0x37f1fa(0x108)){const _0x300fa5=_0x1fcbd9[_0x37f1fa(0x103)][_0x37f1fa(0x128)];_0xebdc79['add'](_0x300fa5);}}),B(this[_0x9c4923(0x119)],_0xebdc79);}));}['_init'](){const _0x243838=_0x1b5406;this[_0x243838(0xee)](this[_0x243838(0x127)][_0x243838(0x111)][_0x243838(0x124)](async _0x38c17c=>{const _0x316e9c=_0x243838;var _0x4b9974,_0x225332,_0x3efdca,_0x42fe40;const _0xf9de9e=(_0x4b9974=this[_0x316e9c(0xec)]['getUnit'](_0x38c17c[_0x316e9c(0x118)])[_0x316e9c(0x117)](_0x5cf53e=>_0x5cf53e[_0x316e9c(0x10d)]===_0x38c17c[_0x316e9c(0x10d)]))==null?void 0x0:_0x4b9974[_0x316e9c(0x120)];if(!_0xf9de9e)return;const {unitId:_0x1add03,subUnitId:_0x19a264}=_0xf9de9e;switch(_0x38c17c[_0x316e9c(0x11d)]&&this[_0x316e9c(0x102)][_0x316e9c(0x132)](_0x38c17c[_0x316e9c(0x11d)]),_0x38c17c[_0x316e9c(0xd6)]){case v[_0x316e9c(0x123)]:break;case v['Reply']:{this[_0x316e9c(0xec)][_0x316e9c(0xd9)](_0x1add03,_0x19a264,{'unitId':_0x1add03,'subUnitId':_0x19a264,'ref':'','id':_0x38c17c[_0x316e9c(0xf6)],'dT':y(+_0x38c17c[_0x316e9c(0xf3)]),'threadId':_0x38c17c['threadId'],'personId':(_0x3efdca=(_0x225332=_0x38c17c[_0x316e9c(0x11d)])==null?void 0x0:_0x225332[_0x316e9c(0xe7)])!=null?_0x3efdca:_0x38c17c['userId'],'text':JSON[_0x316e9c(0xfa)](_0x38c17c[_0x316e9c(0x125)]),'parentId':_0xf9de9e['id']});break;}case v[_0x316e9c(0x133)]:{const _0x347434=this[_0x316e9c(0xec)]['getComment'](_0x1add03,_0x19a264,_0x38c17c[_0x316e9c(0xf6)]);_0x347434&&_0x347434[_0x316e9c(0xd8)]&&this[_0x316e9c(0xec)][_0x316e9c(0xf8)](_0x1add03,_0x19a264,_0x38c17c[_0x316e9c(0xf6)]);break;}case v[_0x316e9c(0x131)]:{this[_0x316e9c(0xec)]['updateComment'](_0x1add03,_0x19a264,{'commentId':_0x38c17c[_0x316e9c(0xf6)],'text':JSON[_0x316e9c(0xfa)](_0x38c17c[_0x316e9c(0x125)])});break;}case v[_0x316e9c(0x122)]:{const _0xe32ed8=(_0x42fe40=this['_threadCommentModel'][_0x316e9c(0xeb)](_0x38c17c[_0x316e9c(0x118)])[_0x316e9c(0x117)](_0x5e790b=>_0x5e790b['threadId']===_0x38c17c[_0x316e9c(0x10d)]))==null?void 0x0:_0x42fe40[_0x316e9c(0x120)];_0xe32ed8&&this[_0x316e9c(0xec)][_0x316e9c(0x100)](_0x1add03,_0x19a264,_0xe32ed8['id'],_0x38c17c[_0x316e9c(0x12f)]===I[_0x316e9c(0xf9)]);break;}}}));}};_=V([p(0x0,_0x586d83(_0x15fc73)),p(0x1,_0x586d83(_0x4ad7f8)),p(0x2,_0x586d83(_0x1f4e32)),p(0x3,_0x586d83(_0x1ecf46))],_);const z=_0x1b5406(0xde),O={};var k=Object[_0x1b5406(0x11a)],Q=(_0x2919d5,_0x24ec4c,_0x182952,_0x4e05af)=>{const _0x1fbb41=_0x1b5406;for(var _0x69bb8c=_0x4e05af>0x1?void 0x0:_0x4e05af?k(_0x24ec4c,_0x182952):_0x24ec4c,_0x13a448=_0x2919d5[_0x1fbb41(0x112)]-0x1,_0x2746c0;_0x13a448>=0x0;_0x13a448--)(_0x2746c0=_0x2919d5[_0x13a448])&&(_0x69bb8c=_0x2746c0(_0x69bb8c)||_0x69bb8c);return _0x69bb8c;},b=(_0x3e66b5,_0xce4029)=>(_0x3fea9c,_0x52fd53)=>_0xce4029(_0x3fea9c,_0x52fd53,_0x3e66b5);function X(_0x270f1a,_0x5212d8){const _0x2ee303=_0x1b5406,_0x590ed6=_0x270f1a[_0x2ee303(0x116)][0x0];return{..._0x5212d8,'id':_0x590ed6[_0x2ee303(0xf6)],'resolved':_0x270f1a['solved']===0x1,'dT':y(_0x590ed6['createTimestamp']),'personId':_0x590ed6[_0x2ee303(0xf7)],'threadId':_0x590ed6[_0x2ee303(0x10d)]};}function ee(_0x558d7c,_0x45e9e2,_0x8b898b){const _0x3c3f07=_0x1b5406;var _0x511cb6,_0xc79b;if(((_0xc79b=(_0x511cb6=_0x558d7c==null?void 0x0:_0x558d7c[_0x3c3f07(0x116)])==null?void 0x0:_0x511cb6[_0x3c3f07(0x112)])!=null?_0xc79b:0x0)>0x0){const _0x445141=(_0xfd3c6c,_0x5473b0)=>({'id':_0xfd3c6c[_0x3c3f07(0xf6)],'threadId':_0xfd3c6c[_0x3c3f07(0x10d)],'dT':y(_0xfd3c6c[_0x3c3f07(0xf3)]),'personId':_0xfd3c6c[_0x3c3f07(0xf7)],'resolved':_0x558d7c[_0x3c3f07(0x12f)]===I['Solved'],'unitId':_0x45e9e2,'subUnitId':_0x8b898b,'text':JSON[_0x3c3f07(0xfa)](_0xfd3c6c[_0x3c3f07(0x125)]),'parentId':_0x5473b0}),_0x5339b7=_0x445141(_0x558d7c[_0x3c3f07(0x116)][0x0]);return{..._0x5339b7,'children':_0x558d7c['replies'][_0x3c3f07(0xfb)](0x1)['map'](_0x1fc8a0=>_0x445141(_0x1fc8a0,_0x5339b7['id']))};}return null;}let S=class{constructor(_0x4a88c4,_0x24c375,_0x360582){const _0x5ebc5b=_0x1b5406;this[_0x5ebc5b(0x11b)]=_0x4a88c4,this[_0x5ebc5b(0x102)]=_0x24c375,this[_0x5ebc5b(0xf1)]=_0x360582;}async[_0x1b5406(0xd9)](_0x1fb0e7){const _0x14596f=_0x1b5406;var _0x1edfdb,_0x1698ba;const {parentId:_0x58288b,unitId:_0x1210f3,text:_0x18f7be,threadId:_0x478c44}=_0x1fb0e7,_0xa35879=(_0x1698ba=(_0x1edfdb=_0x18f7be['customRanges'])==null?void 0x0:_0x1edfdb['filter'](_0x4d3bae=>_0x4d3bae[_0x14596f(0xe4)]===_0x3fcf68[_0x14596f(0x135)])[_0x14596f(0xfd)](_0x4c2791=>_0x4c2791[_0x14596f(0x10f)]))!=null?_0x1698ba:[],_0x3c4c20=JSON['stringify'](_0x18f7be),_0x6faecb=(await this[_0x14596f(0xf1)][_0x14596f(0x10e)](_0x1210f3))[_0x14596f(0x107)]();if(_0x58288b){const _0x22c659={'memberId':_0x6faecb,'unitId':_0x1210f3,'content':_0x3c4c20,'mention':_0xa35879,'threadId':_0x478c44},_0x43acbd=(await this['_httpService']['post'](_0x14596f(0x130)+_0x1210f3+_0x14596f(0x105),{'body':_0x22c659}))[_0x14596f(0x113)]['reply'];return{..._0x1fb0e7,'id':_0x43acbd[_0x14596f(0xf6)],'dT':_0x406bfa(+_0x43acbd[_0x14596f(0xf3)])[_0x14596f(0x115)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x43acbd[_0x14596f(0xf7)]};}else{const _0x3c1eb0={'memberId':_0x6faecb,'unitId':_0x1210f3,'content':_0x3c4c20,'mention':_0xa35879},_0x183bc3=await this[_0x14596f(0x11b)][_0x14596f(0xf2)](_0x14596f(0x130)+_0x1210f3+_0x14596f(0xf4),{'body':_0x3c1eb0});return X(_0x183bc3[_0x14596f(0x113)][_0x14596f(0xdd)],_0x1fb0e7);}}async[_0x1b5406(0x12e)](_0x4dd125){const _0x304818=_0x1b5406;var _0xe1b8b7,_0x33740a;const {text:_0x18c549,unitId:_0xcfb341}=_0x4dd125,_0x5efbc3=(_0x33740a=(_0xe1b8b7=_0x18c549[_0x304818(0xe5)])==null?void 0x0:_0xe1b8b7[_0x304818(0xe1)](_0x27d4b0=>_0x27d4b0[_0x304818(0xe4)]===_0x3fcf68['COMMENT'])['map'](_0x3ba5b0=>_0x3ba5b0[_0x304818(0x10f)]))!=null?_0x33740a:[],_0x552f43=JSON['stringify'](_0x18c549),_0xd665e3=_0x4dd125[_0x304818(0x10d)],_0x3b0970=_0x4dd125['id'],_0x11b202={'memberId':(await this[_0x304818(0xf1)][_0x304818(0x10e)](_0xcfb341))[_0x304818(0x107)](),'unitId':_0xcfb341,'threadId':_0xd665e3,'mention':_0x5efbc3,'content':_0x552f43,'replyId':_0x3b0970},_0xf9a3b0=await this[_0x304818(0x11b)][_0x304818(0xf2)]('/universer-api/comment/unit/'+_0xcfb341+_0x304818(0xed),{'body':_0x11b202});return!_0xf9a3b0[_0x304818(0x113)][_0x304818(0xe2)]||_0xf9a3b0['body']['error'][_0x304818(0xff)]===0x1;}async['resolveComment'](_0x1275e3){const _0x354d53=_0x1b5406,{unitId:_0x136af7}=_0x1275e3,_0x464ab2=_0x1275e3['threadId'],_0x11e476={'memberId':this[_0x354d53(0x102)]['getCurrentUser']()[_0x354d53(0xe7)],'unitId':_0x136af7,'threadId':_0x464ab2,'solved':_0x1275e3[_0x354d53(0x12d)]?I[_0x354d53(0xf9)]:I['OpenOrReOpen']},_0x2b4554=await this[_0x354d53(0x11b)][_0x354d53(0xf2)](_0x354d53(0x130)+_0x136af7+_0x354d53(0xf5),{'body':_0x11e476});return!_0x2b4554[_0x354d53(0x113)][_0x354d53(0xe2)]||_0x2b4554[_0x354d53(0x113)]['error'][_0x354d53(0xff)]===0x1;}async[_0x1b5406(0xf8)](_0xfda7ad,_0x522ac5,_0x239cff,_0x2e480a){const _0x276ac7=_0x1b5406,_0x4e75e1={'memberId':(await this['_sessionService']['requireSession'](_0xfda7ad))[_0x276ac7(0x107)](),'threadId':_0x239cff,'replyId':_0x2e480a,'unitId':_0xfda7ad},_0x5c7e5d=await this['_httpService'][_0x276ac7(0xf2)](_0x276ac7(0x130)+_0xfda7ad+_0x276ac7(0x11e),{'body':_0x4e75e1});return!_0x5c7e5d[_0x276ac7(0x113)]['error']||_0x5c7e5d['body'][_0x276ac7(0xe2)][_0x276ac7(0xff)]===0x1;}async[_0x1b5406(0x10c)](_0xda3720,_0x2125b4,_0x431ae3){const _0x1aea5f=_0x1b5406,_0x29a89c={'unitId':_0xda3720,'threadId':_0x431ae3},_0x533cc3=await this[_0x1aea5f(0x11b)]['post'](_0x1aea5f(0x130)+_0xda3720+_0x1aea5f(0xe8),{'body':_0x29a89c}),_0x46589f=_0x431ae3[_0x1aea5f(0xfd)](_0x50301b=>ee(_0x533cc3[_0x1aea5f(0x113)][_0x1aea5f(0x12a)][_0x50301b],_0xda3720,_0x2125b4))[_0x1aea5f(0xe1)](Boolean);return Object[_0x1aea5f(0xfe)](_0x533cc3[_0x1aea5f(0x113)][_0x1aea5f(0x11c)])[_0x1aea5f(0xe6)](_0x44614a=>{const _0x1cc9cd=_0x1aea5f;this[_0x1cc9cd(0x102)]['addUser'](_0x44614a);}),_0x46589f;}['saveCommentToSnapshot'](_0x57f1eb){const _0xb53a2=_0x1b5406;return{'id':_0x57f1eb['id'],'threadId':_0x57f1eb[_0xb53a2(0x10d)],'ref':_0x57f1eb['ref']};}};S=Q([b(0x0,_0x586d83(_0x470d01)),b(0x1,_0x586d83(_0x1f4e32)),b(0x2,_0x586d83(_0x5d3e79))],S);function _0x18e2(_0x4de6a,_0x55e864){_0x4de6a=_0x4de6a-0xd4;const _0x3e4eec=_0x3e4e();let _0x18e2ac=_0x3e4eec[_0x4de6a];return _0x18e2ac;}var re=Object[_0x1b5406(0x11a)],te=(_0x45c44a,_0x2b99f5,_0x579b52,_0x1e3d45)=>{const _0x277717=_0x1b5406;for(var _0x4a1cc3=_0x1e3d45>0x1?void 0x0:_0x1e3d45?re(_0x2b99f5,_0x579b52):_0x2b99f5,_0x5d89f2=_0x45c44a[_0x277717(0x112)]-0x1,_0x3bad21;_0x5d89f2>=0x0;_0x5d89f2--)(_0x3bad21=_0x45c44a[_0x5d89f2])&&(_0x4a1cc3=_0x3bad21(_0x4a1cc3)||_0x4a1cc3);return _0x4a1cc3;},M=(_0x2a5e7f,_0x3aae73)=>(_0x4e732e,_0x4ede68)=>_0x3aae73(_0x4e732e,_0x4ede68,_0x2a5e7f);function _0x3e4e(){const _0x13e357=['/reply','Unknown','getMemberID','add','delete','320EuPzmk','4036248oXdEKR','listComments','threadId','requireSession','rangeId','1089589KqsCCr','commentUpdate$','length','body','symbol','format','replies','find','unitId','_injector','getOwnPropertyDescriptor','_httpService','users','user','/delete','525edRnwi','root','_threadCommentDataSourceService','Solve','Add','subscribe','content','5121YsUYKL','_commentService','personId','/universer-api/user/list','comments','258pUqroZ','7244ppUTyL','resolved','updateComment','solved','/universer-api/comment/unit/','Edit','addUser','Delete','UNIVER_UNKNOWN','COMMENT','OpenOrReOpen','setConfig','3099580IzMCyH','_initUserSync','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','defineProperty','type','7530LfaHSp','parentId','addComment','11691avSzPw','_threadCommentDataSource','_init','comment','thread-comment-data-source.config','_initDataSource','size','filter','error','82056hWMTZb','rangeType','customRanges','forEach','userID','/list','_configService','getUser','getUnit','_threadCommentModel','/edit','disposeWithMe','Reply','UNRECOGNIZED','_sessionService','post','createTimestamp','/add','/solved','replyId','userId','deleteComment','Solved','parse','slice','get','map','values','code','resolveComment','YYYY/MM/DD\x20HH:mm','_userService','payload','_config'];_0x3e4e=function(){return _0x13e357;};return _0x3e4e();}let f=class extends _0x5cea14{constructor(_0x197beb,_0x4bec77){const _0xd2a1b4=_0x1b5406;super(),this[_0xd2a1b4(0x121)]=_0x197beb,this[_0xd2a1b4(0xdb)]=_0x4bec77,this[_0xd2a1b4(0xdf)]();}[_0x1b5406(0xdf)](){const _0x30188d=_0x1b5406;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x30188d(0x121)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x313212),M(0x1,_0x586d83(S))],f);var se=Object[_0x1b5406(0xd5)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x35bb38,_0x3b17a0,_0x3dc517)=>_0x3b17a0 in _0x35bb38?se(_0x35bb38,_0x3b17a0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3dc517}):_0x35bb38[_0x3b17a0]=_0x3dc517,ie=(_0x554245,_0x15d35b,_0x14aabb,_0xa51bd1)=>{const _0x1fcd48=_0x1b5406;for(var _0x582c76=_0xa51bd1>0x1?void 0x0:_0xa51bd1?oe(_0x15d35b,_0x14aabb):_0x15d35b,_0x5c9007=_0x554245[_0x1fcd48(0x112)]-0x1,_0x1217e5;_0x5c9007>=0x0;_0x5c9007--)(_0x1217e5=_0x554245[_0x5c9007])&&(_0x582c76=_0x1217e5(_0x582c76)||_0x582c76);return _0x582c76;},N=(_0x397e4f,_0x167e4a)=>(_0x2bd8e8,_0x255d06)=>_0x167e4a(_0x2bd8e8,_0x255d06,_0x397e4f),$=(_0x234f8f,_0x5bc48a,_0xa57e39)=>ne(_0x234f8f,typeof _0x5bc48a!=_0x1b5406(0x114)?_0x5bc48a+'':_0x5bc48a,_0xa57e39);let g=class extends _0x1aeb3f{constructor(_0x4572fa=O,_0x209452,_0x580de0){const _0x124164=_0x1b5406;super(),this[_0x124164(0x104)]=_0x4572fa,this['_injector']=_0x209452,this[_0x124164(0xe9)]=_0x580de0;const {..._0x374e2f}=_0x57c5e8({},O,this[_0x124164(0x104)]);this[_0x124164(0xe9)][_0x124164(0x137)](z,_0x374e2f);}['onStarting'](){const _0x1b5a8b=_0x1b5406;[[S],[f],[_]][_0x1b5a8b(0xe6)](_0x394cc2=>{const _0x478beb=_0x1b5a8b;this[_0x478beb(0x119)][_0x478beb(0x108)](_0x394cc2);});}['onReady'](){const _0x1ab5a8=_0x1b5406;this['_injector'][_0x1ab5a8(0xfc)](f),this[_0x1ab5a8(0x119)][_0x1ab5a8(0xfc)](_);}};$(g,'pluginName',W),$(g,_0x1b5406(0xd6),_0x5e18d6[_0x1b5406(0x134)]),g=ie([_0xb7ae4b(_0x2f63eb,_0x5bad45,_0x49b678),N(0x1,_0x586d83(_0x1ecf46)),N(0x2,_0x14eba5)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x15a8(_0x2eb11b,_0x28df04){_0x2eb11b=_0x2eb11b-0xdb;const _0x884ca0=_0x884c();let _0x15a848=_0x884ca0[_0x2eb11b];return _0x15a848;}(function(_0x3d10ec,_0x1b9790){const _0x20bb58=_0x15a8,_0x1356ac=_0x3d10ec();while(!![]){try{const _0x109b18=-parseInt(_0x20bb58(0x13c))/0x1+parseInt(_0x20bb58(0xf5))/0x2*(-parseInt(_0x20bb58(0x10a))/0x3)+parseInt(_0x20bb58(0x163))/0x4+parseInt(_0x20bb58(0x106))/0x5*(parseInt(_0x20bb58(0xe4))/0x6)+-parseInt(_0x20bb58(0x10f))/0x7+-parseInt(_0x20bb58(0x15c))/0x8*(-parseInt(_0x20bb58(0x141))/0x9)+parseInt(_0x20bb58(0x112))/0xa;if(_0x109b18===_0x1b9790)break;else _0x1356ac['push'](_0x1356ac['shift']());}catch(_0x52375c){_0x1356ac['push'](_0x1356ac['shift']());}}}(_0x884c,0x49120),function(_0xc4bc2,_0x18b0cc){const _0x5679fb=_0x15a8;typeof exports=='object'&&typeof module<'u'?_0x18b0cc(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x5679fb(0x138)&&define[_0x5679fb(0x146)]?define([_0x5679fb(0xed),_0x5679fb(0x14d),_0x5679fb(0x15b),_0x5679fb(0x15a),_0x5679fb(0x122),_0x5679fb(0x10d),_0x5679fb(0xfd),_0x5679fb(0x162)],_0x18b0cc):(_0xc4bc2=typeof globalThis<'u'?globalThis:_0xc4bc2||self,_0x18b0cc(_0xc4bc2[_0x5679fb(0x134)]={},_0xc4bc2['UniverProCollaborationClient'],_0xc4bc2['UniverProLicense'],_0xc4bc2[_0x5679fb(0x147)],_0xc4bc2[_0x5679fb(0x115)],_0xc4bc2[_0x5679fb(0x14f)],_0xc4bc2[_0x5679fb(0xfd)],_0xc4bc2[_0x5679fb(0xe0)]));}(this,function(_0x2bd891,_0x182376,_0x55a627,_0x3cf436,_0x3221c6,_0x9352bb,_0x23deff,_0xece950){'use strict';const _0x24d132=_0x15a8;const _0x422647='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x3ca880=(_0x466370=>(_0x466370[_0x466370[_0x24d132(0xfc)]=0x0]=_0x24d132(0xfc),_0x466370[_0x466370[_0x24d132(0x139)]=0x1]=_0x24d132(0x139),_0x466370[_0x466370[_0x24d132(0x109)]=-0x1]=_0x24d132(0x109),_0x466370))(_0x3ca880||{}),_0x39795b=(_0x24e338=>(_0x24e338[_0x24e338[_0x24d132(0xe7)]=0x0]=_0x24d132(0xe7),_0x24e338[_0x24e338[_0x24d132(0xf6)]=0x1]=_0x24d132(0xf6),_0x24e338[_0x24e338[_0x24d132(0x153)]=0x2]=_0x24d132(0x153),_0x24e338[_0x24e338['Edit']=0x3]=_0x24d132(0x10c),_0x24e338[_0x24e338[_0x24d132(0x151)]=0x4]='Delete',_0x24e338[_0x24e338[_0x24d132(0x13f)]=0x5]='Solve',_0x24e338[_0x24e338[_0x24d132(0x109)]=-0x1]=_0x24d132(0x109),_0x24e338))(_0x39795b||{});const _0x26178e=_0x4f3ab2=>_0x3cf436[_0x24d132(0x127)](new Date(+_0x4f3ab2))[_0x24d132(0xef)](_0x24d132(0x155)),_0x135771=async(_0x1ccca4,_0x5cf549)=>{const _0x280103=_0x24d132,_0x43cc16=_0x1ccca4[_0x280103(0xe5)](_0x3cf436[_0x280103(0xdd)]),_0x59ffcb=_0x1ccca4['get'](_0xece950[_0x280103(0x144)]);_0x5cf549[_0x280103(0xe6)](_0x4cbe26=>{const _0x5a2c33=_0x280103;_0x43cc16[_0x5a2c33(0xe2)](_0x4cbe26)&&_0x5cf549[_0x5a2c33(0x158)](_0x4cbe26);}),_0x5cf549['size']&&(await _0x59ffcb[_0x280103(0xe5)](_0x280103(0xe3),{'params':{'userIDs':[..._0x5cf549]}}))[_0x280103(0xdf)]['users']['forEach'](_0x4ecff7=>{_0x4ecff7&&_0x43cc16['addUser'](_0x4ecff7);});};var _0x2b795e=Object['getOwnPropertyDescriptor'],_0x49a6ec=(_0x58aa84,_0x54b70b,_0x2a44cb,_0x10933c)=>{const _0x155eb9=_0x24d132;for(var _0xd74da2=_0x10933c>0x1?void 0x0:_0x10933c?_0x2b795e(_0x54b70b,_0x2a44cb):_0x54b70b,_0xc8e322=_0x58aa84[_0x155eb9(0x113)]-0x1,_0x5268e0;_0xc8e322>=0x0;_0xc8e322--)(_0x5268e0=_0x58aa84[_0xc8e322])&&(_0xd74da2=_0x5268e0(_0xd74da2)||_0xd74da2);return _0xd74da2;},_0x40294f=(_0x34d9bd,_0x11e520)=>(_0x472376,_0x2f18c1)=>_0x11e520(_0x472376,_0x2f18c1,_0x34d9bd);let _0x468484=class extends _0x3cf436[_0x24d132(0xf3)]{constructor(_0x36ef92,_0x1612ab,_0x5d3e5a,_0x3568cf){const _0xf52273=_0x24d132;super(),this[_0xf52273(0x104)]=_0x36ef92,this[_0xf52273(0x11e)]=_0x1612ab,this[_0xf52273(0x125)]=_0x5d3e5a,this[_0xf52273(0xdc)]=_0x3568cf,this[_0xf52273(0x130)](),this['_initUserSync']();}['_initUserSync'](){const _0x4e2889=_0x24d132;this[_0x4e2889(0x15e)](this[_0x4e2889(0x11e)][_0x4e2889(0x11c)]['pipe'](_0x23deff[_0x4e2889(0x14e)](0x10))[_0x4e2889(0x128)](_0x24d7ca=>{const _0x18961b=_0x4e2889,_0x5a886e=new Set();_0x24d7ca[_0x18961b(0xe6)](_0x43f4ab=>{const _0x4e735f=_0x18961b;if(_0x43f4ab[_0x4e735f(0xfa)]===_0x4e735f(0x135)){const _0x3d5bcd=_0x43f4ab[_0x4e735f(0x12b)][_0x4e735f(0x13a)];_0x5a886e[_0x4e735f(0x135)](_0x3d5bcd);}}),_0x135771(this['_injector'],_0x5a886e);}));}[_0x24d132(0x130)](){const _0x367e49=_0x24d132;this[_0x367e49(0x15e)](this[_0x367e49(0x104)]['commentUpdate$'][_0x367e49(0x128)](async _0x45de5f=>{const _0x32cafb=_0x367e49;var _0x56eb6b,_0x15716f,_0x346d69,_0x558db7;const _0xa827cf=(_0x56eb6b=this[_0x32cafb(0x11e)][_0x32cafb(0x136)](_0x45de5f['unitId'])[_0x32cafb(0x133)](_0x363650=>_0x363650[_0x32cafb(0x137)]===_0x45de5f[_0x32cafb(0x137)]))==null?void 0x0:_0x56eb6b[_0x32cafb(0x148)];if(!_0xa827cf)return;const {unitId:_0x30fd0d,subUnitId:_0x511970}=_0xa827cf;switch(_0x45de5f['user']&&this[_0x32cafb(0x125)][_0x32cafb(0xff)](_0x45de5f['user']),_0x45de5f[_0x32cafb(0xfa)]){case _0x39795b[_0x32cafb(0xf6)]:break;case _0x39795b[_0x32cafb(0x153)]:{this[_0x32cafb(0x11e)][_0x32cafb(0x165)](_0x30fd0d,_0x511970,{'unitId':_0x30fd0d,'subUnitId':_0x511970,'ref':'','id':_0x45de5f[_0x32cafb(0xec)],'dT':_0x26178e(+_0x45de5f['createTimestamp']),'threadId':_0x45de5f[_0x32cafb(0x137)],'personId':(_0x346d69=(_0x15716f=_0x45de5f[_0x32cafb(0x117)])==null?void 0x0:_0x15716f[_0x32cafb(0x11a)])!=null?_0x346d69:_0x45de5f[_0x32cafb(0xf7)],'text':JSON['parse'](_0x45de5f[_0x32cafb(0x13b)]),'parentId':_0xa827cf['id']});break;}case _0x39795b['Delete']:{const _0xf8e80f=this[_0x32cafb(0x11e)][_0x32cafb(0x102)](_0x30fd0d,_0x511970,_0x45de5f['replyId']);_0xf8e80f&&_0xf8e80f[_0x32cafb(0x12c)]&&this[_0x32cafb(0x11e)][_0x32cafb(0x126)](_0x30fd0d,_0x511970,_0x45de5f['replyId']);break;}case _0x39795b[_0x32cafb(0x10c)]:{this[_0x32cafb(0x11e)][_0x32cafb(0xdb)](_0x30fd0d,_0x511970,{'commentId':_0x45de5f[_0x32cafb(0xec)],'text':JSON['parse'](_0x45de5f[_0x32cafb(0x13b)])});break;}case _0x39795b[_0x32cafb(0x13f)]:{const _0x4332ee=(_0x558db7=this[_0x32cafb(0x11e)][_0x32cafb(0x136)](_0x45de5f[_0x32cafb(0xe8)])[_0x32cafb(0x133)](_0x3286e8=>_0x3286e8['threadId']===_0x45de5f[_0x32cafb(0x137)]))==null?void 0x0:_0x558db7[_0x32cafb(0x148)];_0x4332ee&&this['_threadCommentModel'][_0x32cafb(0x107)](_0x30fd0d,_0x511970,_0x4332ee['id'],_0x45de5f[_0x32cafb(0x111)]===_0x3ca880[_0x32cafb(0x139)]);break;}}}));}};_0x468484=_0x49a6ec([_0x40294f(0x0,_0x3cf436[_0x24d132(0xea)](_0x182376[_0x24d132(0x149)])),_0x40294f(0x1,_0x3cf436[_0x24d132(0xea)](_0x9352bb[_0x24d132(0x120)])),_0x40294f(0x2,_0x3cf436[_0x24d132(0xea)](_0x3cf436[_0x24d132(0xdd)])),_0x40294f(0x3,_0x3cf436[_0x24d132(0xea)](_0x3cf436[_0x24d132(0x140)]))],_0x468484);const _0x5c4310=_0x24d132(0x157),_0x1b4fd6={};var _0x5cd200=Object[_0x24d132(0x145)],_0x28e893=(_0x5c4e62,_0x1050fe,_0x26ae88,_0x46817d)=>{const _0xf9058=_0x24d132;for(var _0x32bb62=_0x46817d>0x1?void 0x0:_0x46817d?_0x5cd200(_0x1050fe,_0x26ae88):_0x1050fe,_0x52e72e=_0x5c4e62[_0xf9058(0x113)]-0x1,_0x335ef4;_0x52e72e>=0x0;_0x52e72e--)(_0x335ef4=_0x5c4e62[_0x52e72e])&&(_0x32bb62=_0x335ef4(_0x32bb62)||_0x32bb62);return _0x32bb62;},_0x359717=(_0x3a7288,_0x4a46bf)=>(_0x586777,_0x3ae275)=>_0x4a46bf(_0x586777,_0x3ae275,_0x3a7288);function _0x1dae63(_0x130875,_0x28e711){const _0x4b4ea3=_0x24d132,_0x5dd877=_0x130875['replies'][0x0];return{..._0x28e711,'id':_0x5dd877[_0x4b4ea3(0xec)],'resolved':_0x130875[_0x4b4ea3(0x111)]===0x1,'dT':_0x26178e(_0x5dd877[_0x4b4ea3(0x13e)]),'personId':_0x5dd877[_0x4b4ea3(0xf7)],'threadId':_0x5dd877['threadId']};}function _0x35c8d0(_0x225682,_0x3455a6,_0x451c34){const _0x47c54e=_0x24d132;var _0x6fcaf3,_0x248d26;if(((_0x248d26=(_0x6fcaf3=_0x225682==null?void 0x0:_0x225682[_0x47c54e(0x118)])==null?void 0x0:_0x6fcaf3[_0x47c54e(0x113)])!=null?_0x248d26:0x0)>0x0){const _0x37925a=(_0x86a1e5,_0x5cdd67)=>({'id':_0x86a1e5['replyId'],'threadId':_0x86a1e5[_0x47c54e(0x137)],'dT':_0x26178e(_0x86a1e5[_0x47c54e(0x13e)]),'personId':_0x86a1e5[_0x47c54e(0xf7)],'resolved':_0x225682[_0x47c54e(0x111)]===_0x3ca880[_0x47c54e(0x139)],'unitId':_0x3455a6,'subUnitId':_0x451c34,'text':JSON[_0x47c54e(0xf8)](_0x86a1e5[_0x47c54e(0x13b)]),'parentId':_0x5cdd67}),_0xbf4485=_0x37925a(_0x225682[_0x47c54e(0x118)][0x0]);return{..._0xbf4485,'children':_0x225682['replies'][_0x47c54e(0x14b)](0x1)[_0x47c54e(0xf2)](_0x31ade6=>_0x37925a(_0x31ade6,_0xbf4485['id']))};}return null;}let _0x3dc6ee=class{constructor(_0x6f8e7b,_0x4fdaef,_0x5e8ca8){const _0x3c8e3d=_0x24d132;this[_0x3c8e3d(0x14c)]=_0x6f8e7b,this[_0x3c8e3d(0x125)]=_0x4fdaef,this[_0x3c8e3d(0xfe)]=_0x5e8ca8;}async[_0x24d132(0x165)](_0x81836d){const _0x45e161=_0x24d132;var _0x42cd96,_0x13746a;const {parentId:_0x37d2eb,unitId:_0x535c2a,text:_0x407665,threadId:_0x5d5dd4}=_0x81836d,_0x2d8f44=(_0x13746a=(_0x42cd96=_0x407665[_0x45e161(0x10e)])==null?void 0x0:_0x42cd96['filter'](_0x16e67f=>_0x16e67f[_0x45e161(0x12e)]===_0x3cf436['CustomRangeType'][_0x45e161(0xf9)])[_0x45e161(0xf2)](_0x1eb024=>_0x1eb024[_0x45e161(0x116)]))!=null?_0x13746a:[],_0x26ca0c=JSON[_0x45e161(0x150)](_0x407665),_0x3da2cb=(await this['_sessionService'][_0x45e161(0x124)](_0x535c2a))[_0x45e161(0x131)]();if(_0x37d2eb){const _0x454f84={'memberId':_0x3da2cb,'unitId':_0x535c2a,'content':_0x26ca0c,'mention':_0x2d8f44,'threadId':_0x5d5dd4},_0x3be613=(await this['_httpService']['post'](_0x45e161(0x11b)+_0x535c2a+_0x45e161(0x123),{'body':_0x454f84}))[_0x45e161(0xdf)][_0x45e161(0x12a)];return{..._0x81836d,'id':_0x3be613[_0x45e161(0xec)],'dT':_0x3cf436['dayjs'](+_0x3be613[_0x45e161(0x13e)])[_0x45e161(0xef)](_0x45e161(0x155)),'personId':_0x3be613[_0x45e161(0xf7)]};}else{const _0x36bc62={'memberId':_0x3da2cb,'unitId':_0x535c2a,'content':_0x26ca0c,'mention':_0x2d8f44},_0x4b107c=await this[_0x45e161(0x14c)][_0x45e161(0x164)](_0x45e161(0x11b)+_0x535c2a+'/add',{'body':_0x36bc62});return _0x1dae63(_0x4b107c[_0x45e161(0xdf)]['comment'],_0x81836d);}}async[_0x24d132(0xdb)](_0x235053){const _0x1085f7=_0x24d132;var _0x2c0075,_0x1b8137;const {text:_0x6b441,unitId:_0x24209a}=_0x235053,_0x168baf=(_0x1b8137=(_0x2c0075=_0x6b441[_0x1085f7(0x10e)])==null?void 0x0:_0x2c0075[_0x1085f7(0x160)](_0xae2a0b=>_0xae2a0b['rangeType']===_0x3cf436[_0x1085f7(0xf1)][_0x1085f7(0xf9)])['map'](_0xb070b0=>_0xb070b0[_0x1085f7(0x116)]))!=null?_0x1b8137:[],_0x44b424=JSON[_0x1085f7(0x150)](_0x6b441),_0x31894c=_0x235053[_0x1085f7(0x137)],_0x413f83=_0x235053['id'],_0x37fb44={'memberId':(await this[_0x1085f7(0xfe)]['requireSession'](_0x24209a))['getMemberID'](),'unitId':_0x24209a,'threadId':_0x31894c,'mention':_0x168baf,'content':_0x44b424,'replyId':_0x413f83},_0x2bb9a7=await this[_0x1085f7(0x14c)]['post'](_0x1085f7(0x11b)+_0x24209a+_0x1085f7(0x154),{'body':_0x37fb44});return!_0x2bb9a7[_0x1085f7(0xdf)][_0x1085f7(0x100)]||_0x2bb9a7[_0x1085f7(0xdf)]['error']['code']===0x1;}async[_0x24d132(0x107)](_0x190490){const _0x44a3f3=_0x24d132,{unitId:_0x4110a8}=_0x190490,_0x4048c4=_0x190490[_0x44a3f3(0x137)],_0x2c6584={'memberId':this[_0x44a3f3(0x125)][_0x44a3f3(0x152)]()['userID'],'unitId':_0x4110a8,'threadId':_0x4048c4,'solved':_0x190490[_0x44a3f3(0x159)]?_0x3ca880['Solved']:_0x3ca880[_0x44a3f3(0xfc)]},_0x58b44c=await this['_httpService'][_0x44a3f3(0x164)](_0x44a3f3(0x11b)+_0x4110a8+_0x44a3f3(0xf4),{'body':_0x2c6584});return!_0x58b44c['body'][_0x44a3f3(0x100)]||_0x58b44c['body'][_0x44a3f3(0x100)]['code']===0x1;}async[_0x24d132(0x126)](_0x1d3898,_0x204a59,_0x328f18,_0x8a9fbb){const _0x221508=_0x24d132,_0x390c00={'memberId':(await this[_0x221508(0xfe)][_0x221508(0x124)](_0x1d3898))[_0x221508(0x131)](),'threadId':_0x328f18,'replyId':_0x8a9fbb,'unitId':_0x1d3898},_0xa57bdb=await this[_0x221508(0x14c)][_0x221508(0x164)](_0x221508(0x11b)+_0x1d3898+_0x221508(0x15f),{'body':_0x390c00});return!_0xa57bdb[_0x221508(0xdf)][_0x221508(0x100)]||_0xa57bdb[_0x221508(0xdf)][_0x221508(0x100)][_0x221508(0x105)]===0x1;}async[_0x24d132(0x103)](_0x43384a,_0x2eb629,_0x3bccbc){const _0x267c2a=_0x24d132,_0x445819={'unitId':_0x43384a,'threadId':_0x3bccbc},_0x1c53ad=await this[_0x267c2a(0x14c)]['post']('/universer-api/comment/unit/'+_0x43384a+_0x267c2a(0x143),{'body':_0x445819}),_0xea8e62=_0x3bccbc[_0x267c2a(0xf2)](_0x4fe749=>_0x35c8d0(_0x1c53ad[_0x267c2a(0xdf)][_0x267c2a(0x11f)][_0x4fe749],_0x43384a,_0x2eb629))[_0x267c2a(0x160)](Boolean);return Object['values'](_0x1c53ad[_0x267c2a(0xdf)][_0x267c2a(0x108)])[_0x267c2a(0xe6)](_0x27a557=>{const _0x45a7cd=_0x267c2a;this[_0x45a7cd(0x125)][_0x45a7cd(0xff)](_0x27a557);}),_0xea8e62;}[_0x24d132(0x156)](_0x42b7a8){const _0x59ebbe=_0x24d132;return{'id':_0x42b7a8['id'],'threadId':_0x42b7a8[_0x59ebbe(0x137)],'ref':_0x42b7a8[_0x59ebbe(0x10b)]};}};_0x3dc6ee=_0x28e893([_0x359717(0x0,_0x3cf436[_0x24d132(0xea)](_0xece950[_0x24d132(0x144)])),_0x359717(0x1,_0x3cf436['Inject'](_0x3cf436['UserManagerService'])),_0x359717(0x2,_0x3cf436[_0x24d132(0xea)](_0x182376[_0x24d132(0x142)]))],_0x3dc6ee);var _0x40cae6=Object[_0x24d132(0x145)],_0x578f53=(_0x1e46e9,_0x38bc85,_0xc9100c,_0x11755e)=>{const _0x16ca4b=_0x24d132;for(var _0x346c6e=_0x11755e>0x1?void 0x0:_0x11755e?_0x40cae6(_0x38bc85,_0xc9100c):_0x38bc85,_0x44169f=_0x1e46e9[_0x16ca4b(0x113)]-0x1,_0x390d53;_0x44169f>=0x0;_0x44169f--)(_0x390d53=_0x1e46e9[_0x44169f])&&(_0x346c6e=_0x390d53(_0x346c6e)||_0x346c6e);return _0x346c6e;},_0x5a83a4=(_0x233c99,_0x1a2d9b)=>(_0x5a47f7,_0xd1a598)=>_0x1a2d9b(_0x5a47f7,_0xd1a598,_0x233c99);let _0x1c6ea4=class extends _0x3cf436[_0x24d132(0xf3)]{constructor(_0x1ce08b,_0x10b066){const _0x3efff2=_0x24d132;super(),this[_0x3efff2(0x14a)]=_0x1ce08b,this[_0x3efff2(0xde)]=_0x10b066,this['_initDataSource']();}[_0x24d132(0x13d)](){const _0xd6c6e8=_0x24d132;this[_0xd6c6e8(0x14a)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0xd6c6e8(0xeb)]=!0x1;}};_0x1c6ea4=_0x578f53([_0x5a83a4(0x0,_0x9352bb[_0x24d132(0x101)]),_0x5a83a4(0x1,_0x3cf436[_0x24d132(0xea)](_0x3dc6ee))],_0x1c6ea4);var _0x43e69b=Object[_0x24d132(0x12d)],_0xb1cf58=Object[_0x24d132(0x145)],_0x2f10b8=(_0x5b652d,_0x4f2325,_0x107721)=>_0x4f2325 in _0x5b652d?_0x43e69b(_0x5b652d,_0x4f2325,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x107721}):_0x5b652d[_0x4f2325]=_0x107721,_0x2772a9=(_0x39f55a,_0x57277b,_0x152232,_0x8b6177)=>{const _0x2a82c7=_0x24d132;for(var _0x1e3dd7=_0x8b6177>0x1?void 0x0:_0x8b6177?_0xb1cf58(_0x57277b,_0x152232):_0x57277b,_0x3835e1=_0x39f55a[_0x2a82c7(0x113)]-0x1,_0x379e6f;_0x3835e1>=0x0;_0x3835e1--)(_0x379e6f=_0x39f55a[_0x3835e1])&&(_0x1e3dd7=_0x379e6f(_0x1e3dd7)||_0x1e3dd7);return _0x1e3dd7;},_0x28de69=(_0xfa49cc,_0x435a01)=>(_0x44882d,_0x78046d)=>_0x435a01(_0x44882d,_0x78046d,_0xfa49cc),_0x48ee5c=(_0x374088,_0x4f5b9e,_0xae5018)=>_0x2f10b8(_0x374088,typeof _0x4f5b9e!='symbol'?_0x4f5b9e+'':_0x4f5b9e,_0xae5018);_0x2bd891[_0x24d132(0xe1)]=class extends _0x3cf436[_0x24d132(0x132)]{constructor(_0x349884=_0x1b4fd6,_0x2ba9c6,_0xc06f10){const _0x272aef=_0x24d132;super(),this[_0x272aef(0x114)]=_0x349884,this['_injector']=_0x2ba9c6,this[_0x272aef(0xe9)]=_0xc06f10;const {..._0x4da3d2}=_0x3cf436['merge']({},_0x1b4fd6,this['_config']);this[_0x272aef(0xe9)][_0x272aef(0x110)](_0x5c4310,_0x4da3d2);}[_0x24d132(0xfb)](){const _0x162992=_0x24d132;[[_0x3dc6ee],[_0x1c6ea4],[_0x468484]][_0x162992(0xe6)](_0x2d5f20=>{const _0x2bdaa3=_0x162992;this['_injector'][_0x2bdaa3(0x135)](_0x2d5f20);});}[_0x24d132(0x161)](){const _0x16e048=_0x24d132;this[_0x16e048(0xdc)][_0x16e048(0xe5)](_0x1c6ea4),this[_0x16e048(0xdc)][_0x16e048(0xe5)](_0x468484);}},_0x48ee5c(_0x2bd891[_0x24d132(0xe1)],_0x24d132(0x12f),_0x422647),_0x48ee5c(_0x2bd891[_0x24d132(0xe1)],_0x24d132(0xfa),_0x3cf436[_0x24d132(0x11d)][_0x24d132(0xf0)]),_0x2bd891[_0x24d132(0xe1)]=_0x2772a9([_0x3cf436['DependentOn'](_0x3221c6[_0x24d132(0xee)],_0x182376[_0x24d132(0x15d)],_0x55a627[_0x24d132(0x129)]),_0x28de69(0x1,_0x3cf436[_0x24d132(0xea)](_0x3cf436[_0x24d132(0x140)])),_0x28de69(0x2,_0x3cf436['IConfigService'])],_0x2bd891[_0x24d132(0xe1)]),Object[_0x24d132(0x12d)](_0x2bd891,Symbol[_0x24d132(0x121)],{'value':_0x24d132(0x119)});}));function _0x884c(){const _0x13c66e=['UniverLicensePlugin','reply','payload','parentId','defineProperty','rangeType','pluginName','_init','getMemberID','Plugin','find','UniverProThreadCommentDatasource','add','getUnit','threadId','function','Solved','personId','content','251839xVRRwD','_initDataSource','createTimestamp','Solve','Injector','198VrYyou','CollaborationSessionService','/list','HTTPService','getOwnPropertyDescriptor','amd','UniverCore','root','CommentService','_threadCommentDataSourceService','slice','_httpService','@univerjs-pro/collaboration-client','bufferTime','UniverThreadComment','stringify','Delete','getCurrentUser','Reply','/edit','YYYY/MM/DD\x20HH:mm','saveCommentToSnapshot','thread-comment-data-source.config','delete','resolved','@univerjs/core','@univerjs-pro/license','104CaOpjk','UniverCollaborationClientPlugin','disposeWithMe','/delete','filter','onReady','@univerjs/network','149176CZVNET','post','addComment','updateComment','_injector','UserManagerService','_threadCommentDataSource','body','UniverNetwork','UniverThreadCommentDataSourcePlugin','getUser','/universer-api/user/list','6FvMOQm','get','forEach','Unknown','unitId','_configService','Inject','syncUpdateMutationToColla','replyId','exports','UniverThreadCommentUIPlugin','format','UNIVER_UNKNOWN','CustomRangeType','map','Disposable','/solved','985154xsGTuW','Add','userId','parse','COMMENT','type','onStarting','OpenOrReOpen','rxjs','_sessionService','addUser','error','IThreadCommentDataSourceService','getComment','listComments','_commentService','code','1779155Mofyra','resolveComment','users','UNRECOGNIZED','3mNTWXM','ref','Edit','@univerjs/thread-comment','customRanges','4142712FsKydk','setConfig','solved','12421170wttOMU','length','_config','UniverThreadCommentUi','rangeId','user','replies','Module','userID','/universer-api/comment/unit/','commentUpdate$','UniverInstanceType','_threadCommentModel','comments','ThreadCommentModel','toStringTag','@univerjs/thread-comment-ui','/reply','requireSession','_userService','deleteComment','dayjs','subscribe'];_0x884c=function(){return _0x13c66e;};return _0x884c();}
1
+ (function(_0x37cc8a,_0x1b65ef){const _0x221d55=_0x2753,_0x1be6a4=_0x37cc8a();while(!![]){try{const _0xc2a873=parseInt(_0x221d55(0xbc))/0x1+parseInt(_0x221d55(0x106))/0x2*(parseInt(_0x221d55(0xff))/0x3)+parseInt(_0x221d55(0xd1))/0x4*(-parseInt(_0x221d55(0xd9))/0x5)+-parseInt(_0x221d55(0x100))/0x6*(parseInt(_0x221d55(0xd4))/0x7)+parseInt(_0x221d55(0xfd))/0x8+parseInt(_0x221d55(0xea))/0x9+-parseInt(_0x221d55(0x11a))/0xa*(-parseInt(_0x221d55(0xcf))/0xb);if(_0xc2a873===_0x1b65ef)break;else _0x1be6a4['push'](_0x1be6a4['shift']());}catch(_0x2ad85c){_0x1be6a4['push'](_0x1be6a4['shift']());}}}(_0x28b2,0x45600),function(_0x249af6,_0x14708d){const _0x30ef8f=_0x2753;typeof exports=='object'&&typeof module<'u'?_0x14708d(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x30ef8f(0x105)&&define[_0x30ef8f(0x126)]?define(['exports',_0x30ef8f(0xdd),'@univerjs-pro/license','@univerjs/core','@univerjs/thread-comment-ui',_0x30ef8f(0x11f),'rxjs','@univerjs/network'],_0x14708d):(_0x249af6=typeof globalThis<'u'?globalThis:_0x249af6||self,_0x14708d(_0x249af6[_0x30ef8f(0x104)]={},_0x249af6[_0x30ef8f(0xe6)],_0x249af6[_0x30ef8f(0x103)],_0x249af6['UniverCore'],_0x249af6[_0x30ef8f(0xe7)],_0x249af6[_0x30ef8f(0x122)],_0x249af6[_0x30ef8f(0x127)],_0x249af6[_0x30ef8f(0xce)]));}(this,function(_0x2a173f,_0x4e96c1,_0x41ea6f,_0x701864,_0x41d610,_0x232bab,_0x3cdf42,_0x23cd16){'use strict';const _0x31ac0b=_0x2753;const _0x4b06f5=_0x31ac0b(0xf4);var _0x4e8a3d=(_0x15d683=>(_0x15d683[_0x15d683['OpenOrReOpen']=0x0]=_0x31ac0b(0xef),_0x15d683[_0x15d683[_0x31ac0b(0x121)]=0x1]='Solved',_0x15d683[_0x15d683[_0x31ac0b(0xc5)]=-0x1]=_0x31ac0b(0xc5),_0x15d683))(_0x4e8a3d||{}),_0x2b85cf=(_0xbef567=>(_0xbef567[_0xbef567['Unknown']=0x0]='Unknown',_0xbef567[_0xbef567['Add']=0x1]=_0x31ac0b(0x12b),_0xbef567[_0xbef567['Reply']=0x2]=_0x31ac0b(0x129),_0xbef567[_0xbef567[_0x31ac0b(0xc7)]=0x3]=_0x31ac0b(0xc7),_0xbef567[_0xbef567['Delete']=0x4]='Delete',_0xbef567[_0xbef567[_0x31ac0b(0x109)]=0x5]=_0x31ac0b(0x109),_0xbef567[_0xbef567['UNRECOGNIZED']=-0x1]=_0x31ac0b(0xc5),_0xbef567))(_0x2b85cf||{});const _0x2591e5=_0x393598=>_0x701864['dayjs'](new Date(+_0x393598))[_0x31ac0b(0x114)](_0x31ac0b(0xd8)),_0x2d0687=async(_0x135450,_0x29ae36)=>{const _0x370392=_0x31ac0b,_0x21234c=_0x135450[_0x370392(0xfc)](_0x701864['UserManagerService']),_0x2434f1=_0x135450['get'](_0x23cd16[_0x370392(0xb9)]);_0x29ae36['forEach'](_0x2e709a=>{_0x21234c['getUser'](_0x2e709a)&&_0x29ae36['delete'](_0x2e709a);}),_0x29ae36[_0x370392(0xbb)]&&(await _0x2434f1[_0x370392(0xfc)]('/universer-api/user/list',{'params':{'userIDs':[..._0x29ae36]}}))[_0x370392(0xdc)][_0x370392(0x110)][_0x370392(0xc3)](_0x4afe2e=>{const _0x35d69a=_0x370392;_0x4afe2e&&_0x21234c[_0x35d69a(0xcb)](_0x4afe2e);});};var _0x36d332=Object[_0x31ac0b(0x107)],_0x315d58=(_0x265abc,_0x5c4709,_0x48002f,_0x42b6f7)=>{const _0x32fbff=_0x31ac0b;for(var _0x2da0ab=_0x42b6f7>0x1?void 0x0:_0x42b6f7?_0x36d332(_0x5c4709,_0x48002f):_0x5c4709,_0x3562e7=_0x265abc[_0x32fbff(0x10b)]-0x1,_0x1c9849;_0x3562e7>=0x0;_0x3562e7--)(_0x1c9849=_0x265abc[_0x3562e7])&&(_0x2da0ab=_0x1c9849(_0x2da0ab)||_0x2da0ab);return _0x2da0ab;},_0x55c261=(_0x5b3636,_0x46e825)=>(_0x4d719a,_0x4c561a)=>_0x46e825(_0x4d719a,_0x4c561a,_0x5b3636);let _0x2b3e43=class extends _0x701864[_0x31ac0b(0x101)]{constructor(_0x479c56,_0xdf596b,_0x510f5d,_0x58a06e){const _0x23b40a=_0x31ac0b;super(),this['_commentService']=_0x479c56,this[_0x23b40a(0xe4)]=_0xdf596b,this[_0x23b40a(0x124)]=_0x510f5d,this[_0x23b40a(0x11e)]=_0x58a06e,this[_0x23b40a(0xf6)](),this['_initUserSync']();}[_0x31ac0b(0xbe)](){const _0xbc9bc3=_0x31ac0b;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$'][_0xbc9bc3(0x123)](_0x3cdf42[_0xbc9bc3(0x11b)](0x10))[_0xbc9bc3(0x12a)](_0x1b3f85=>{const _0x4f881d=_0xbc9bc3,_0x38de33=new Set();_0x1b3f85['forEach'](_0x5d1dde=>{const _0x91f7ff=_0x2753;if(_0x5d1dde[_0x91f7ff(0xd3)]===_0x91f7ff(0xf8)){const _0x599f81=_0x5d1dde[_0x91f7ff(0xf1)][_0x91f7ff(0x112)];_0x38de33[_0x91f7ff(0xf8)](_0x599f81);}}),_0x2d0687(this[_0x4f881d(0x11e)],_0x38de33);}));}[_0x31ac0b(0xf6)](){const _0x34d7ed=_0x31ac0b;this[_0x34d7ed(0xc6)](this['_commentService']['commentUpdate$']['subscribe'](async _0x3144c5=>{const _0x4e1791=_0x34d7ed;var _0x2088bd,_0x277f28,_0x4676cc,_0x15c347;const _0xaa6f74=(_0x2088bd=this[_0x4e1791(0xe4)][_0x4e1791(0xba)](_0x3144c5['unitId'])[_0x4e1791(0xb3)](_0x5312c5=>_0x5312c5[_0x4e1791(0x10d)]===_0x3144c5['threadId']))==null?void 0x0:_0x2088bd['root'];if(!_0xaa6f74)return;const {unitId:_0x41354e,subUnitId:_0x1c7ee6}=_0xaa6f74;switch(_0x3144c5['user']&&this['_userService'][_0x4e1791(0xcb)](_0x3144c5[_0x4e1791(0xc2)]),_0x3144c5[_0x4e1791(0xd3)]){case _0x2b85cf[_0x4e1791(0x12b)]:break;case _0x2b85cf[_0x4e1791(0x129)]:{this['_threadCommentModel'][_0x4e1791(0x11c)](_0x41354e,_0x1c7ee6,{'unitId':_0x41354e,'subUnitId':_0x1c7ee6,'ref':'','id':_0x3144c5[_0x4e1791(0xc8)],'dT':_0x2591e5(+_0x3144c5[_0x4e1791(0x120)]),'threadId':_0x3144c5[_0x4e1791(0x10d)],'personId':(_0x4676cc=(_0x277f28=_0x3144c5[_0x4e1791(0xc2)])==null?void 0x0:_0x277f28[_0x4e1791(0x12c)])!=null?_0x4676cc:_0x3144c5[_0x4e1791(0x12f)],'text':JSON[_0x4e1791(0x102)](_0x3144c5[_0x4e1791(0xf9)]),'parentId':_0xaa6f74['id']});break;}case _0x2b85cf[_0x4e1791(0xc1)]:{const _0x42abc7=this[_0x4e1791(0xe4)]['getComment'](_0x41354e,_0x1c7ee6,_0x3144c5[_0x4e1791(0xc8)]);_0x42abc7&&_0x42abc7[_0x4e1791(0xf3)]&&this[_0x4e1791(0xe4)][_0x4e1791(0xf7)](_0x41354e,_0x1c7ee6,_0x3144c5[_0x4e1791(0xc8)]);break;}case _0x2b85cf[_0x4e1791(0xc7)]:{this['_threadCommentModel'][_0x4e1791(0xd2)](_0x41354e,_0x1c7ee6,{'commentId':_0x3144c5[_0x4e1791(0xc8)],'text':JSON[_0x4e1791(0x102)](_0x3144c5[_0x4e1791(0xf9)])});break;}case _0x2b85cf[_0x4e1791(0x109)]:{const _0x14d91a=(_0x15c347=this[_0x4e1791(0xe4)][_0x4e1791(0xba)](_0x3144c5[_0x4e1791(0xf5)])['find'](_0xe199a2=>_0xe199a2[_0x4e1791(0x10d)]===_0x3144c5[_0x4e1791(0x10d)]))==null?void 0x0:_0x15c347[_0x4e1791(0xfe)];_0x14d91a&&this[_0x4e1791(0xe4)][_0x4e1791(0xee)](_0x41354e,_0x1c7ee6,_0x14d91a['id'],_0x3144c5[_0x4e1791(0x118)]===_0x4e8a3d[_0x4e1791(0x121)]);break;}}}));}};_0x2b3e43=_0x315d58([_0x55c261(0x0,_0x701864[_0x31ac0b(0xe8)](_0x4e96c1['CommentService'])),_0x55c261(0x1,_0x701864[_0x31ac0b(0xe8)](_0x232bab['ThreadCommentModel'])),_0x55c261(0x2,_0x701864[_0x31ac0b(0xe8)](_0x701864['UserManagerService'])),_0x55c261(0x3,_0x701864[_0x31ac0b(0xe8)](_0x701864[_0x31ac0b(0xca)]))],_0x2b3e43);const _0x32b32a=_0x31ac0b(0xec),_0x3b126d={};var _0x4b87a8=Object[_0x31ac0b(0x107)],_0x422342=(_0x42c5e9,_0x4afe69,_0x4d5f3b,_0xb64c8e)=>{for(var _0x2742fe=_0xb64c8e>0x1?void 0x0:_0xb64c8e?_0x4b87a8(_0x4afe69,_0x4d5f3b):_0x4afe69,_0xc48573=_0x42c5e9['length']-0x1,_0x369f02;_0xc48573>=0x0;_0xc48573--)(_0x369f02=_0x42c5e9[_0xc48573])&&(_0x2742fe=_0x369f02(_0x2742fe)||_0x2742fe);return _0x2742fe;},_0x422c76=(_0xced758,_0x45526b)=>(_0x40d639,_0x273e15)=>_0x45526b(_0x40d639,_0x273e15,_0xced758);function _0x4d4293(_0xe5797b,_0x4254da){const _0x3a326e=_0x31ac0b,_0x5da552=_0xe5797b[_0x3a326e(0x128)][0x0];return{..._0x4254da,'id':_0x5da552[_0x3a326e(0xc8)],'resolved':_0xe5797b[_0x3a326e(0x118)]===0x1,'dT':_0x2591e5(_0x5da552[_0x3a326e(0x120)]),'personId':_0x5da552[_0x3a326e(0x12f)],'threadId':_0x5da552[_0x3a326e(0x10d)]};}function _0x15f7e0(_0x3fe78d,_0x4a30e1,_0x19ed9a){const _0x3fc5b8=_0x31ac0b;var _0x429380,_0x4c7b22;if(((_0x4c7b22=(_0x429380=_0x3fe78d==null?void 0x0:_0x3fe78d[_0x3fc5b8(0x128)])==null?void 0x0:_0x429380['length'])!=null?_0x4c7b22:0x0)>0x0){const _0x286fe2=(_0x292b51,_0x3f4625)=>({'id':_0x292b51['replyId'],'threadId':_0x292b51[_0x3fc5b8(0x10d)],'dT':_0x2591e5(_0x292b51['createTimestamp']),'personId':_0x292b51[_0x3fc5b8(0x12f)],'resolved':_0x3fe78d['solved']===_0x4e8a3d[_0x3fc5b8(0x121)],'unitId':_0x4a30e1,'subUnitId':_0x19ed9a,'text':JSON[_0x3fc5b8(0x102)](_0x292b51['content']),'parentId':_0x3f4625}),_0x6d0a25=_0x286fe2(_0x3fe78d[_0x3fc5b8(0x128)][0x0]);return{..._0x6d0a25,'children':_0x3fe78d['replies'][_0x3fc5b8(0x117)](0x1)['map'](_0x4aad15=>_0x286fe2(_0x4aad15,_0x6d0a25['id']))};}return null;}let _0x26d1e9=class{constructor(_0x46214a,_0x5e271c,_0x2446ac){const _0x17177b=_0x31ac0b;this[_0x17177b(0xd5)]=_0x46214a,this[_0x17177b(0x124)]=_0x5e271c,this[_0x17177b(0xb8)]=_0x2446ac;}async['addComment'](_0xc7efde){const _0x2d1853=_0x31ac0b;var _0x2c5b4c,_0x483e6f;const {parentId:_0x849c18,unitId:_0x97f01c,text:_0x5ccfa5,threadId:_0x17991f}=_0xc7efde,_0x1840ba=(_0x483e6f=(_0x2c5b4c=_0x5ccfa5['customRanges'])==null?void 0x0:_0x2c5b4c[_0x2d1853(0x10e)](_0xfb8d50=>_0xfb8d50[_0x2d1853(0x111)]===_0x701864[_0x2d1853(0x125)][_0x2d1853(0x12d)])[_0x2d1853(0xf2)](_0x4a00c3=>_0x4a00c3[_0x2d1853(0xde)]))!=null?_0x483e6f:[],_0x1e9ef5=JSON[_0x2d1853(0xed)](_0x5ccfa5),_0x55eb86=(await this['_sessionService'][_0x2d1853(0x115)](_0x97f01c))['getMemberID']();if(_0x849c18){const _0x14ea24={'memberId':_0x55eb86,'unitId':_0x97f01c,'content':_0x1e9ef5,'mention':_0x1840ba,'threadId':_0x17991f},_0x2e2c24=(await this[_0x2d1853(0xd5)][_0x2d1853(0x130)](_0x2d1853(0xcc)+_0x97f01c+_0x2d1853(0xb5),{'body':_0x14ea24}))[_0x2d1853(0xdc)][_0x2d1853(0xb6)];return{..._0xc7efde,'id':_0x2e2c24[_0x2d1853(0xc8)],'dT':_0x701864[_0x2d1853(0xfb)](+_0x2e2c24[_0x2d1853(0x120)])[_0x2d1853(0x114)](_0x2d1853(0xd8)),'personId':_0x2e2c24[_0x2d1853(0x12f)]};}else{const _0x3ca3c8={'memberId':_0x55eb86,'unitId':_0x97f01c,'content':_0x1e9ef5,'mention':_0x1840ba},_0x43c563=await this[_0x2d1853(0xd5)][_0x2d1853(0x130)](_0x2d1853(0xcc)+_0x97f01c+'/add',{'body':_0x3ca3c8});return _0x4d4293(_0x43c563[_0x2d1853(0xdc)]['comment'],_0xc7efde);}}async['updateComment'](_0x382e76){const _0x233c73=_0x31ac0b;var _0x5abf05,_0x8b7337;const {text:_0x282102,unitId:_0x2772b1}=_0x382e76,_0x6dfcc1=(_0x8b7337=(_0x5abf05=_0x282102['customRanges'])==null?void 0x0:_0x5abf05['filter'](_0x519c2b=>_0x519c2b[_0x233c73(0x111)]===_0x701864['CustomRangeType']['COMMENT'])[_0x233c73(0xf2)](_0x23e2bb=>_0x23e2bb[_0x233c73(0xde)]))!=null?_0x8b7337:[],_0x3f1f0d=JSON[_0x233c73(0xed)](_0x282102),_0x1cb79c=_0x382e76[_0x233c73(0x10d)],_0x451804=_0x382e76['id'],_0x50289f={'memberId':(await this[_0x233c73(0xb8)]['requireSession'](_0x2772b1))['getMemberID'](),'unitId':_0x2772b1,'threadId':_0x1cb79c,'mention':_0x6dfcc1,'content':_0x3f1f0d,'replyId':_0x451804},_0x40dc72=await this[_0x233c73(0xd5)][_0x233c73(0x130)](_0x233c73(0xcc)+_0x2772b1+'/edit',{'body':_0x50289f});return!_0x40dc72['body'][_0x233c73(0x10f)]||_0x40dc72[_0x233c73(0xdc)][_0x233c73(0x10f)]['code']===0x1;}async['resolveComment'](_0xe30df7){const _0x2e6f43=_0x31ac0b,{unitId:_0x11b55a}=_0xe30df7,_0x1cd960=_0xe30df7[_0x2e6f43(0x10d)],_0x3c9c21={'memberId':this['_userService'][_0x2e6f43(0xd6)]()['userID'],'unitId':_0x11b55a,'threadId':_0x1cd960,'solved':_0xe30df7[_0x2e6f43(0xe3)]?_0x4e8a3d[_0x2e6f43(0x121)]:_0x4e8a3d[_0x2e6f43(0xef)]},_0x3de757=await this[_0x2e6f43(0xd5)]['post'](_0x2e6f43(0xcc)+_0x11b55a+_0x2e6f43(0xb7),{'body':_0x3c9c21});return!_0x3de757[_0x2e6f43(0xdc)][_0x2e6f43(0x10f)]||_0x3de757[_0x2e6f43(0xdc)]['error'][_0x2e6f43(0x134)]===0x1;}async[_0x31ac0b(0xf7)](_0x4d2a85,_0x57c281,_0x7a1648,_0x25f70d){const _0x1080a5=_0x31ac0b,_0x37a241={'memberId':(await this[_0x1080a5(0xb8)][_0x1080a5(0x115)](_0x4d2a85))[_0x1080a5(0xd7)](),'threadId':_0x7a1648,'replyId':_0x25f70d,'unitId':_0x4d2a85},_0x56afbf=await this[_0x1080a5(0xd5)]['post'](_0x1080a5(0xcc)+_0x4d2a85+_0x1080a5(0xc0),{'body':_0x37a241});return!_0x56afbf[_0x1080a5(0xdc)][_0x1080a5(0x10f)]||_0x56afbf['body']['error'][_0x1080a5(0x134)]===0x1;}async['listComments'](_0x3540c6,_0x57adf4,_0x1f3eab){const _0x5b69bc=_0x31ac0b,_0x2efeb2={'unitId':_0x3540c6,'threadId':_0x1f3eab},_0x285252=await this[_0x5b69bc(0xd5)]['post'](_0x5b69bc(0xcc)+_0x3540c6+_0x5b69bc(0x108),{'body':_0x2efeb2}),_0x17fcb8=_0x1f3eab[_0x5b69bc(0xf2)](_0x4564f0=>_0x15f7e0(_0x285252['body'][_0x5b69bc(0x119)][_0x4564f0],_0x3540c6,_0x57adf4))['filter'](Boolean);return Object[_0x5b69bc(0xeb)](_0x285252[_0x5b69bc(0xdc)][_0x5b69bc(0x110)])[_0x5b69bc(0xc3)](_0x5eb8f8=>{const _0x4fe953=_0x5b69bc;this[_0x4fe953(0x124)]['addUser'](_0x5eb8f8);}),_0x17fcb8;}[_0x31ac0b(0xbf)](_0x2126e8){const _0x1790b3=_0x31ac0b;return{'id':_0x2126e8['id'],'threadId':_0x2126e8[_0x1790b3(0x10d)],'ref':_0x2126e8[_0x1790b3(0xda)]};}};_0x26d1e9=_0x422342([_0x422c76(0x0,_0x701864[_0x31ac0b(0xe8)](_0x23cd16[_0x31ac0b(0xb9)])),_0x422c76(0x1,_0x701864[_0x31ac0b(0xe8)](_0x701864[_0x31ac0b(0x10a)])),_0x422c76(0x2,_0x701864[_0x31ac0b(0xe8)](_0x4e96c1[_0x31ac0b(0x113)]))],_0x26d1e9);var _0x2912b7=Object[_0x31ac0b(0x107)],_0x4c61c3=(_0x41fa46,_0x4e2ef7,_0x27fe23,_0x15513d)=>{const _0x5706fa=_0x31ac0b;for(var _0x4cbd8c=_0x15513d>0x1?void 0x0:_0x15513d?_0x2912b7(_0x4e2ef7,_0x27fe23):_0x4e2ef7,_0xd6f053=_0x41fa46[_0x5706fa(0x10b)]-0x1,_0x11c6a5;_0xd6f053>=0x0;_0xd6f053--)(_0x11c6a5=_0x41fa46[_0xd6f053])&&(_0x4cbd8c=_0x11c6a5(_0x4cbd8c)||_0x4cbd8c);return _0x4cbd8c;},_0x4ae0c7=(_0x137205,_0x56f2bf)=>(_0x212996,_0x170f97)=>_0x56f2bf(_0x212996,_0x170f97,_0x137205);let _0x5892da=class extends _0x701864[_0x31ac0b(0x101)]{constructor(_0x4ca598,_0x20bcf4){const _0x4fedb8=_0x31ac0b;super(),this['_threadCommentDataSourceService']=_0x4ca598,this[_0x4fedb8(0x131)]=_0x20bcf4,this[_0x4fedb8(0x11d)]();}[_0x31ac0b(0x11d)](){const _0x46b567=_0x31ac0b;this[_0x46b567(0x116)]['dataSource']=this[_0x46b567(0x131)],this[_0x46b567(0x116)][_0x46b567(0x132)]=!0x1;}};_0x5892da=_0x4c61c3([_0x4ae0c7(0x0,_0x232bab[_0x31ac0b(0x133)]),_0x4ae0c7(0x1,_0x701864[_0x31ac0b(0xe8)](_0x26d1e9))],_0x5892da);var _0x1cb282=Object[_0x31ac0b(0xf0)],_0x34e6bd=Object[_0x31ac0b(0x107)],_0x36f5c4=(_0x4bd9a4,_0x46bccb,_0x1b518f)=>_0x46bccb in _0x4bd9a4?_0x1cb282(_0x4bd9a4,_0x46bccb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1b518f}):_0x4bd9a4[_0x46bccb]=_0x1b518f,_0x1d45ee=(_0x3ff03d,_0x1d50cf,_0x297d3b,_0x292401)=>{const _0x529e5d=_0x31ac0b;for(var _0x5c8a86=_0x292401>0x1?void 0x0:_0x292401?_0x34e6bd(_0x1d50cf,_0x297d3b):_0x1d50cf,_0xc3721=_0x3ff03d[_0x529e5d(0x10b)]-0x1,_0x295b32;_0xc3721>=0x0;_0xc3721--)(_0x295b32=_0x3ff03d[_0xc3721])&&(_0x5c8a86=_0x295b32(_0x5c8a86)||_0x5c8a86);return _0x5c8a86;},_0x455bf7=(_0x4a0be0,_0x272705)=>(_0x28d1a8,_0x203d29)=>_0x272705(_0x28d1a8,_0x203d29,_0x4a0be0),_0x4c075c=(_0x4812a0,_0x10f184,_0x22619e)=>_0x36f5c4(_0x4812a0,typeof _0x10f184!='symbol'?_0x10f184+'':_0x10f184,_0x22619e);_0x2a173f[_0x31ac0b(0xfa)]=class extends _0x701864[_0x31ac0b(0xdb)]{constructor(_0x263496=_0x3b126d,_0x1374fb,_0x35542c){const _0x4f3183=_0x31ac0b;super(),this[_0x4f3183(0xc4)]=_0x263496,this[_0x4f3183(0x11e)]=_0x1374fb,this[_0x4f3183(0x10c)]=_0x35542c;const {..._0x346384}=_0x701864[_0x4f3183(0xe2)]({},_0x3b126d,this[_0x4f3183(0xc4)]);this[_0x4f3183(0x10c)][_0x4f3183(0xe0)](_0x32b32a,_0x346384);}['onStarting'](){[[_0x26d1e9],[_0x5892da],[_0x2b3e43]]['forEach'](_0x236ecd=>{const _0x521d30=_0x2753;this[_0x521d30(0x11e)][_0x521d30(0xf8)](_0x236ecd);});}[_0x31ac0b(0xe9)](){const _0x44ee27=_0x31ac0b;this['_injector']['get'](_0x5892da),this[_0x44ee27(0x11e)]['get'](_0x2b3e43);}},_0x4c075c(_0x2a173f[_0x31ac0b(0xfa)],_0x31ac0b(0xe5),_0x4b06f5),_0x4c075c(_0x2a173f[_0x31ac0b(0xfa)],'type',_0x701864[_0x31ac0b(0xcd)][_0x31ac0b(0xb4)]),_0x2a173f[_0x31ac0b(0xfa)]=_0x1d45ee([_0x701864[_0x31ac0b(0xdf)](_0x41d610['UniverThreadCommentUIPlugin'],_0x4e96c1[_0x31ac0b(0xd0)],_0x41ea6f[_0x31ac0b(0xe1)]),_0x455bf7(0x1,_0x701864['Inject'](_0x701864[_0x31ac0b(0xca)])),_0x455bf7(0x2,_0x701864[_0x31ac0b(0xbd)])],_0x2a173f[_0x31ac0b(0xfa)]),Object[_0x31ac0b(0xf0)](_0x2a173f,Symbol[_0x31ac0b(0x12e)],{'value':_0x31ac0b(0xc9)});}));function _0x2753(_0x34805a,_0xe2a37d){_0x34805a=_0x34805a-0xb3;const _0x28b215=_0x28b2();let _0x275318=_0x28b215[_0x34805a];return _0x275318;}function _0x28b2(){const _0x47ed50=['_userService','CustomRangeType','amd','rxjs','replies','Reply','subscribe','Add','userID','COMMENT','toStringTag','userId','post','_threadCommentDataSource','syncUpdateMutationToColla','IThreadCommentDataSourceService','code','find','UNIVER_UNKNOWN','/reply','reply','/solved','_sessionService','HTTPService','getUnit','size','271782tzfgOl','IConfigService','_initUserSync','saveCommentToSnapshot','/delete','Delete','user','forEach','_config','UNRECOGNIZED','disposeWithMe','Edit','replyId','Module','Injector','addUser','/universer-api/comment/unit/','UniverInstanceType','UniverNetwork','1705aFjmBA','UniverCollaborationClientPlugin','48folUnR','updateComment','type','206227lVFcbQ','_httpService','getCurrentUser','getMemberID','YYYY/MM/DD\x20HH:mm','103360FiThTt','ref','Plugin','body','@univerjs-pro/collaboration-client','rangeId','DependentOn','setConfig','UniverLicensePlugin','merge','resolved','_threadCommentModel','pluginName','UniverProCollaborationClient','UniverThreadCommentUi','Inject','onReady','1281240ucTilx','values','thread-comment-data-source.config','stringify','resolveComment','OpenOrReOpen','defineProperty','payload','map','parentId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','unitId','_init','deleteComment','add','content','UniverThreadCommentDataSourcePlugin','dayjs','get','1778336EGChzj','root','758892wRkYBy','114Igrbvo','Disposable','parse','UniverProLicense','UniverProThreadCommentDatasource','function','2yDMxaF','getOwnPropertyDescriptor','/list','Solve','UserManagerService','length','_configService','threadId','filter','error','users','rangeType','personId','CollaborationSessionService','format','requireSession','_threadCommentDataSourceService','slice','solved','comments','13070hgmWrV','bufferTime','addComment','_initDataSource','_injector','@univerjs/thread-comment','createTimestamp','Solved','UniverThreadComment','pipe'];_0x28b2=function(){return _0x47ed50;};return _0x28b2();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.15.2-insiders.20260124-12fc7f0",
3
+ "version": "0.15.3",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.15.2-insiders.20260124-12fc7f0",
48
+ "@univerjs-pro/collaboration-client": "0.15.3",
49
+ "@univerjs/core": "0.15.3",
50
+ "@univerjs/network": "0.15.3",
51
+ "@univerjs-pro/license": "0.15.3",
49
52
  "@univerjs/protocol": "0.1.48",
50
- "@univerjs/network": "0.15.2-insiders.20260124-12fc7f0",
51
- "@univerjs/thread-comment": "0.15.2-insiders.20260124-12fc7f0",
52
- "@univerjs/thread-comment-ui": "0.15.2-insiders.20260124-12fc7f0",
53
- "@univerjs-pro/license": "0.15.2-insiders.20260124-12fc7f0",
54
- "@univerjs/core": "0.15.2-insiders.20260124-12fc7f0"
53
+ "@univerjs/thread-comment-ui": "0.15.3",
54
+ "@univerjs/thread-comment": "0.15.3"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.9.3",
59
59
  "vite": "^7.3.1",
60
60
  "vitest": "^4.0.16",
61
- "@univerjs-infra/shared": "0.15.2"
61
+ "@univerjs-infra/shared": "0.15.3"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",