@univerjs-pro/thread-comment-datasource 0.15.5 → 0.16.0-insiders.20260228-a20b9a7
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 +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function _0x1169(_0x5703f7,_0x4f0a0d){_0x5703f7=_0x5703f7-0x173;const _0x3bb234=_0x3bb2();let _0x1169d7=_0x3bb234[_0x5703f7];return _0x1169d7;}const _0x3d1db5=_0x1169;(function(_0x401810,_0x34c493){const _0x2bd3db=_0x1169,_0x5555d7=_0x401810();while(!![]){try{const _0xe12e78=-parseInt(_0x2bd3db(0x1b7))/0x1*(-parseInt(_0x2bd3db(0x1bb))/0x2)+-parseInt(_0x2bd3db(0x1eb))/0x3+-parseInt(_0x2bd3db(0x1e4))/0x4*(-parseInt(_0x2bd3db(0x182))/0x5)+parseInt(_0x2bd3db(0x1b4))/0x6+parseInt(_0x2bd3db(0x1b0))/0x7*(-parseInt(_0x2bd3db(0x190))/0x8)+-parseInt(_0x2bd3db(0x19d))/0x9*(parseInt(_0x2bd3db(0x1ba))/0xa)+parseInt(_0x2bd3db(0x187))/0xb;if(_0xe12e78===_0x34c493)break;else _0x5555d7['push'](_0x5555d7['shift']());}catch(_0x174e6d){_0x5555d7['push'](_0x5555d7['shift']());}}}(_0x3bb2,0xcddfb));Object[_0x3d1db5(0x199)](exports,Symbol[_0x3d1db5(0x175)],{'value':_0x3d1db5(0x1c5)});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=_0x3d1db5(0x189);var I=(_0x46dec4=>(_0x46dec4[_0x46dec4[_0x3d1db5(0x1a9)]=0x0]='OpenOrReOpen',_0x46dec4[_0x46dec4[_0x3d1db5(0x1a2)]=0x1]=_0x3d1db5(0x1a2),_0x46dec4[_0x46dec4[_0x3d1db5(0x181)]=-0x1]=_0x3d1db5(0x181),_0x46dec4))(I||{}),v=(_0x191b06=>(_0x191b06[_0x191b06['Unknown']=0x0]=_0x3d1db5(0x18f),_0x191b06[_0x191b06[_0x3d1db5(0x176)]=0x1]=_0x3d1db5(0x176),_0x191b06[_0x191b06['Reply']=0x2]=_0x3d1db5(0x1a1),_0x191b06[_0x191b06[_0x3d1db5(0x1e9)]=0x3]=_0x3d1db5(0x1e9),_0x191b06[_0x191b06[_0x3d1db5(0x1d4)]=0x4]='Delete',_0x191b06[_0x191b06[_0x3d1db5(0x1b6)]=0x5]=_0x3d1db5(0x1b6),_0x191b06[_0x191b06[_0x3d1db5(0x181)]=-0x1]=_0x3d1db5(0x181),_0x191b06))(v||{});const f=_0x84494d=>c['dayjs'](new Date(+_0x84494d))['format'](_0x3d1db5(0x1d8)),R=async(_0x517b9d,_0x299b6a)=>{const _0x214aba=_0x3d1db5,_0x2f5da0=_0x517b9d[_0x214aba(0x1e1)](c[_0x214aba(0x1b2)]),_0x1fff50=_0x517b9d[_0x214aba(0x1e1)](P['HTTPService']);_0x299b6a[_0x214aba(0x19b)](_0x4381b7=>{const _0x141257=_0x214aba;_0x2f5da0[_0x141257(0x1a5)](_0x4381b7)&&_0x299b6a[_0x141257(0x1e3)](_0x4381b7);}),_0x299b6a[_0x214aba(0x1d5)]&&(await _0x1fff50['get'](_0x214aba(0x1ce),{'params':{'userIDs':[..._0x299b6a]}}))[_0x214aba(0x1a7)][_0x214aba(0x1b8)][_0x214aba(0x19b)](_0x2ab090=>{const _0x4e02b7=_0x214aba;_0x2ab090&&_0x2f5da0[_0x4e02b7(0x1e2)](_0x2ab090);});};function _0x3bb2(){const _0xd05a53=['filter','post','type','toStringTag','Add','saveCommentToSnapshot','thread-comment-data-source.config','comment','getOwnPropertyDescriptor','threadId','DependentOn','_httpService','UniverCollaborationClientPlugin','updateComment','find','UNRECOGNIZED','8440wOnyEd','getMemberID','subscribe','getComment','replies','8677174UuWOgG','/universer-api/comment/unit/','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','COMMENT','values','_threadCommentDataSource','format','ThreadCommentModel','Unknown','591144gXWTKK','Plugin','_init','_initDataSource','_initUserSync','_threadCommentDataSourceService','_injector','_commentService','/edit','defineProperty','CommentService','forEach','userId','117Bcsrft','requireSession','dayjs','rangeType','Reply','Solved','merge','_userService','getUser','map','body','stringify','OpenOrReOpen','onReady','content','Inject','CustomRangeType','setConfig','Disposable','63wrsbyg','_sessionService','UserManagerService','ref','7668594dEQJWW','user','Solve','1sGMOBp','users','add','767170YUbsEu','60042YqYbad','_configService','getUnit','UniverThreadCommentDataSourcePlugin','_threadCommentModel','syncUpdateMutationToColla','reply','parse','bufferTime','UniverInstanceType','Module','slice','getCurrentUser','listComments','onStarting','Injector','commentUpdate$','resolved','UNIVER_UNKNOWN','/universer-api/user/list','/solved','payload','_config','/reply','solved','Delete','size','CollaborationSessionService','deleteComment','YYYY/MM/DD\x20HH:mm','symbol','length','unitId','rangeId','addComment','code','pipe','customRanges','get','addUser','delete','3028ZRTTsJ','root','replyId','error','/delete','Edit','createTimestamp','2607459yVDESE','dataSource'];_0x3bb2=function(){return _0xd05a53;};return _0x3bb2();}var $=Object[_0x3d1db5(0x17a)],E=(_0x47afc7,_0x24d030,_0x27148a,_0xd37bf0)=>{const _0x4510d0=_0x3d1db5;for(var _0x5f920b=_0xd37bf0>0x1?void 0x0:_0xd37bf0?$(_0x24d030,_0x27148a):_0x24d030,_0xd75ae=_0x47afc7[_0x4510d0(0x1da)]-0x1,_0x72d327;_0xd75ae>=0x0;_0xd75ae--)(_0x72d327=_0x47afc7[_0xd75ae])&&(_0x5f920b=_0x72d327(_0x5f920b)||_0x5f920b);return _0x5f920b;},S=(_0x76aad5,_0x8c6167)=>(_0x3afec0,_0xf136f8)=>_0x8c6167(_0x3afec0,_0xf136f8,_0x76aad5);let _=class extends c[_0x3d1db5(0x1af)]{constructor(_0x1ccf63,_0x2247ac,_0x44b69f,_0x45fa01){const _0x12747f=_0x3d1db5;super(),this[_0x12747f(0x197)]=_0x1ccf63,this[_0x12747f(0x1bf)]=_0x2247ac,this[_0x12747f(0x1a4)]=_0x44b69f,this[_0x12747f(0x196)]=_0x45fa01,this[_0x12747f(0x192)](),this[_0x12747f(0x194)]();}['_initUserSync'](){const _0x49cded=_0x3d1db5;this['disposeWithMe'](this[_0x49cded(0x1bf)][_0x49cded(0x1cb)][_0x49cded(0x1df)](j[_0x49cded(0x1c3)](0x10))[_0x49cded(0x184)](_0x56cfdd=>{const _0x1e6c55=_0x49cded,_0xa25cd4=new Set();_0x56cfdd['forEach'](_0x4d064e=>{const _0x15b9a6=_0x1169;if(_0x4d064e[_0x15b9a6(0x174)]===_0x15b9a6(0x1b9)){const _0x8cfe1c=_0x4d064e[_0x15b9a6(0x1d0)]['personId'];_0xa25cd4[_0x15b9a6(0x1b9)](_0x8cfe1c);}}),R(this[_0x1e6c55(0x196)],_0xa25cd4);}));}['_init'](){const _0x4cea3=_0x3d1db5;this['disposeWithMe'](this['_commentService'][_0x4cea3(0x1cb)]['subscribe'](async _0x588f5c=>{const _0x4c11ef=_0x4cea3;var _0x21fc82,_0x3e6393,_0x11cbc1,_0x3d03f6;const _0x4e005a=(_0x21fc82=this[_0x4c11ef(0x1bf)]['getUnit'](_0x588f5c[_0x4c11ef(0x1db)])[_0x4c11ef(0x180)](_0x512c64=>_0x512c64[_0x4c11ef(0x17b)]===_0x588f5c[_0x4c11ef(0x17b)]))==null?void 0x0:_0x21fc82[_0x4c11ef(0x1e5)];if(!_0x4e005a)return;const {unitId:_0x10b12b,subUnitId:_0x5685bf}=_0x4e005a;switch(_0x588f5c[_0x4c11ef(0x1b5)]&&this[_0x4c11ef(0x1a4)][_0x4c11ef(0x1e2)](_0x588f5c[_0x4c11ef(0x1b5)]),_0x588f5c[_0x4c11ef(0x174)]){case v[_0x4c11ef(0x176)]:break;case v[_0x4c11ef(0x1a1)]:{this[_0x4c11ef(0x1bf)][_0x4c11ef(0x1dd)](_0x10b12b,_0x5685bf,{'unitId':_0x10b12b,'subUnitId':_0x5685bf,'ref':'','id':_0x588f5c[_0x4c11ef(0x1e6)],'dT':f(+_0x588f5c[_0x4c11ef(0x1ea)]),'threadId':_0x588f5c[_0x4c11ef(0x17b)],'personId':(_0x11cbc1=(_0x3e6393=_0x588f5c[_0x4c11ef(0x1b5)])==null?void 0x0:_0x3e6393['userID'])!=null?_0x11cbc1:_0x588f5c['userId'],'text':JSON[_0x4c11ef(0x1c2)](_0x588f5c['content']),'parentId':_0x4e005a['id']});break;}case v[_0x4c11ef(0x1d4)]:{const _0x4aad88=this[_0x4c11ef(0x1bf)][_0x4c11ef(0x185)](_0x10b12b,_0x5685bf,_0x588f5c[_0x4c11ef(0x1e6)]);_0x4aad88&&_0x4aad88['parentId']&&this[_0x4c11ef(0x1bf)][_0x4c11ef(0x1d7)](_0x10b12b,_0x5685bf,_0x588f5c[_0x4c11ef(0x1e6)]);break;}case v[_0x4c11ef(0x1e9)]:{this[_0x4c11ef(0x1bf)][_0x4c11ef(0x17f)](_0x10b12b,_0x5685bf,{'commentId':_0x588f5c['replyId'],'text':JSON['parse'](_0x588f5c['content'])});break;}case v[_0x4c11ef(0x1b6)]:{const _0x41529e=(_0x3d03f6=this[_0x4c11ef(0x1bf)][_0x4c11ef(0x1bd)](_0x588f5c[_0x4c11ef(0x1db)])['find'](_0x66b010=>_0x66b010[_0x4c11ef(0x17b)]===_0x588f5c['threadId']))==null?void 0x0:_0x3d03f6[_0x4c11ef(0x1e5)];_0x41529e&&this[_0x4c11ef(0x1bf)]['resolveComment'](_0x10b12b,_0x5685bf,_0x41529e['id'],_0x588f5c[_0x4c11ef(0x1d3)]===I[_0x4c11ef(0x1a2)]);break;}}}));}};_=E([S(0x0,c[_0x3d1db5(0x1ac)](b[_0x3d1db5(0x19a)])),S(0x1,c[_0x3d1db5(0x1ac)](M[_0x3d1db5(0x18e)])),S(0x2,c[_0x3d1db5(0x1ac)](c[_0x3d1db5(0x1b2)])),S(0x3,c[_0x3d1db5(0x1ac)](c[_0x3d1db5(0x1ca)]))],_);const q=_0x3d1db5(0x178),D={};var A=Object[_0x3d1db5(0x17a)],x=(_0x1bb383,_0x5a5faf,_0x25ccb3,_0x2f83cc)=>{const _0x4a51f3=_0x3d1db5;for(var _0x473590=_0x2f83cc>0x1?void 0x0:_0x2f83cc?A(_0x5a5faf,_0x25ccb3):_0x5a5faf,_0x2dac46=_0x1bb383[_0x4a51f3(0x1da)]-0x1,_0x593a08;_0x2dac46>=0x0;_0x2dac46--)(_0x593a08=_0x1bb383[_0x2dac46])&&(_0x473590=_0x593a08(_0x473590)||_0x473590);return _0x473590;},C=(_0x55562b,_0x4dd465)=>(_0x321bcf,_0x56ca1c)=>_0x4dd465(_0x321bcf,_0x56ca1c,_0x55562b);function Y(_0x24dd2f,_0x15efbb){const _0x5582ec=_0x3d1db5,_0x394d69=_0x24dd2f[_0x5582ec(0x186)][0x0];return{..._0x15efbb,'id':_0x394d69[_0x5582ec(0x1e6)],'resolved':_0x24dd2f[_0x5582ec(0x1d3)]===0x1,'dT':f(_0x394d69[_0x5582ec(0x1ea)]),'personId':_0x394d69[_0x5582ec(0x19c)],'threadId':_0x394d69['threadId']};}function G(_0x44a122,_0x5ec112,_0x415e88){const _0x3f2079=_0x3d1db5;var _0x89a76c,_0x3fb1f7;if(((_0x3fb1f7=(_0x89a76c=_0x44a122==null?void 0x0:_0x44a122[_0x3f2079(0x186)])==null?void 0x0:_0x89a76c['length'])!=null?_0x3fb1f7:0x0)>0x0){const _0x469814=(_0xe54661,_0x6fd75e)=>({'id':_0xe54661[_0x3f2079(0x1e6)],'threadId':_0xe54661[_0x3f2079(0x17b)],'dT':f(_0xe54661[_0x3f2079(0x1ea)]),'personId':_0xe54661[_0x3f2079(0x19c)],'resolved':_0x44a122[_0x3f2079(0x1d3)]===I[_0x3f2079(0x1a2)],'unitId':_0x5ec112,'subUnitId':_0x415e88,'text':JSON[_0x3f2079(0x1c2)](_0xe54661[_0x3f2079(0x1ab)]),'parentId':_0x6fd75e}),_0x20584a=_0x469814(_0x44a122[_0x3f2079(0x186)][0x0]);return{..._0x20584a,'children':_0x44a122[_0x3f2079(0x186)][_0x3f2079(0x1c6)](0x1)['map'](_0x22929c=>_0x469814(_0x22929c,_0x20584a['id']))};}return null;}let p=class{constructor(_0x16c7b8,_0x4406f8,_0x4f01d0){const _0x2a60fd=_0x3d1db5;this[_0x2a60fd(0x17d)]=_0x16c7b8,this[_0x2a60fd(0x1a4)]=_0x4406f8,this[_0x2a60fd(0x1b1)]=_0x4f01d0;}async[_0x3d1db5(0x1dd)](_0x5cb4ab){const _0x4c9668=_0x3d1db5;var _0x84c271,_0x51da51;const {parentId:_0x311af8,unitId:_0x389ef4,text:_0x1b5712,threadId:_0x15f9b3}=_0x5cb4ab,_0x2faeee=(_0x51da51=(_0x84c271=_0x1b5712[_0x4c9668(0x1e0)])==null?void 0x0:_0x84c271[_0x4c9668(0x1ed)](_0x3bc051=>_0x3bc051[_0x4c9668(0x1a0)]===c[_0x4c9668(0x1ad)][_0x4c9668(0x18a)])['map'](_0x30a2af=>_0x30a2af[_0x4c9668(0x1dc)]))!=null?_0x51da51:[],_0x59b363=JSON[_0x4c9668(0x1a8)](_0x1b5712),_0x2a8d37=(await this[_0x4c9668(0x1b1)][_0x4c9668(0x19e)](_0x389ef4))['getMemberID']();if(_0x311af8){const _0x224463={'memberId':_0x2a8d37,'unitId':_0x389ef4,'content':_0x59b363,'mention':_0x2faeee,'threadId':_0x15f9b3},_0x5e0b68=(await this[_0x4c9668(0x17d)][_0x4c9668(0x173)](_0x4c9668(0x188)+_0x389ef4+_0x4c9668(0x1d2),{'body':_0x224463}))['body'][_0x4c9668(0x1c1)];return{..._0x5cb4ab,'id':_0x5e0b68[_0x4c9668(0x1e6)],'dT':c[_0x4c9668(0x19f)](+_0x5e0b68['createTimestamp'])[_0x4c9668(0x18d)](_0x4c9668(0x1d8)),'personId':_0x5e0b68[_0x4c9668(0x19c)]};}else{const _0xc6694b={'memberId':_0x2a8d37,'unitId':_0x389ef4,'content':_0x59b363,'mention':_0x2faeee},_0x3ddbc0=await this[_0x4c9668(0x17d)][_0x4c9668(0x173)]('/universer-api/comment/unit/'+_0x389ef4+'/add',{'body':_0xc6694b});return Y(_0x3ddbc0[_0x4c9668(0x1a7)][_0x4c9668(0x179)],_0x5cb4ab);}}async[_0x3d1db5(0x17f)](_0x1b1784){const _0xf52251=_0x3d1db5;var _0x44f8b8,_0x322f8a;const {text:_0x235377,unitId:_0x1ce8bc}=_0x1b1784,_0x100dab=(_0x322f8a=(_0x44f8b8=_0x235377[_0xf52251(0x1e0)])==null?void 0x0:_0x44f8b8['filter'](_0x11462e=>_0x11462e[_0xf52251(0x1a0)]===c[_0xf52251(0x1ad)][_0xf52251(0x18a)])[_0xf52251(0x1a6)](_0x33e788=>_0x33e788['rangeId']))!=null?_0x322f8a:[],_0x54c1d6=JSON[_0xf52251(0x1a8)](_0x235377),_0xdf5469=_0x1b1784[_0xf52251(0x17b)],_0x1ef290=_0x1b1784['id'],_0x546811={'memberId':(await this[_0xf52251(0x1b1)][_0xf52251(0x19e)](_0x1ce8bc))[_0xf52251(0x183)](),'unitId':_0x1ce8bc,'threadId':_0xdf5469,'mention':_0x100dab,'content':_0x54c1d6,'replyId':_0x1ef290},_0xabbcf=await this[_0xf52251(0x17d)][_0xf52251(0x173)](_0xf52251(0x188)+_0x1ce8bc+_0xf52251(0x198),{'body':_0x546811});return!_0xabbcf[_0xf52251(0x1a7)][_0xf52251(0x1e7)]||_0xabbcf[_0xf52251(0x1a7)][_0xf52251(0x1e7)][_0xf52251(0x1de)]===0x1;}async['resolveComment'](_0x441e99){const _0x2b6ffb=_0x3d1db5,{unitId:_0x2094ae}=_0x441e99,_0x2614c3=_0x441e99[_0x2b6ffb(0x17b)],_0x33bc61={'memberId':this['_userService'][_0x2b6ffb(0x1c7)]()['userID'],'unitId':_0x2094ae,'threadId':_0x2614c3,'solved':_0x441e99[_0x2b6ffb(0x1cc)]?I['Solved']:I[_0x2b6ffb(0x1a9)]},_0x2f81bd=await this[_0x2b6ffb(0x17d)][_0x2b6ffb(0x173)](_0x2b6ffb(0x188)+_0x2094ae+_0x2b6ffb(0x1cf),{'body':_0x33bc61});return!_0x2f81bd[_0x2b6ffb(0x1a7)][_0x2b6ffb(0x1e7)]||_0x2f81bd[_0x2b6ffb(0x1a7)][_0x2b6ffb(0x1e7)][_0x2b6ffb(0x1de)]===0x1;}async[_0x3d1db5(0x1d7)](_0x3a4952,_0x1d118c,_0x57df27,_0x4205ef){const _0x320b71=_0x3d1db5,_0x1fe53e={'memberId':(await this['_sessionService'][_0x320b71(0x19e)](_0x3a4952))[_0x320b71(0x183)](),'threadId':_0x57df27,'replyId':_0x4205ef,'unitId':_0x3a4952},_0x4a00ca=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x3a4952+_0x320b71(0x1e8),{'body':_0x1fe53e});return!_0x4a00ca[_0x320b71(0x1a7)][_0x320b71(0x1e7)]||_0x4a00ca[_0x320b71(0x1a7)][_0x320b71(0x1e7)]['code']===0x1;}async[_0x3d1db5(0x1c8)](_0x20bc2e,_0x6338c2,_0x3da866){const _0x1b647d=_0x3d1db5,_0xcf5ede={'unitId':_0x20bc2e,'threadId':_0x3da866},_0x1e2518=await this[_0x1b647d(0x17d)][_0x1b647d(0x173)](_0x1b647d(0x188)+_0x20bc2e+'/list',{'body':_0xcf5ede}),_0x5a4582=_0x3da866[_0x1b647d(0x1a6)](_0x114e29=>G(_0x1e2518[_0x1b647d(0x1a7)]['comments'][_0x114e29],_0x20bc2e,_0x6338c2))[_0x1b647d(0x1ed)](Boolean);return Object[_0x1b647d(0x18b)](_0x1e2518[_0x1b647d(0x1a7)][_0x1b647d(0x1b8)])[_0x1b647d(0x19b)](_0x4a3f6f=>{const _0x52d2dd=_0x1b647d;this[_0x52d2dd(0x1a4)][_0x52d2dd(0x1e2)](_0x4a3f6f);}),_0x5a4582;}[_0x3d1db5(0x177)](_0x42f0ca){const _0x1612a2=_0x3d1db5;return{'id':_0x42f0ca['id'],'threadId':_0x42f0ca[_0x1612a2(0x17b)],'ref':_0x42f0ca[_0x1612a2(0x1b3)]};}};p=x([C(0x0,c[_0x3d1db5(0x1ac)](P['HTTPService'])),C(0x1,c[_0x3d1db5(0x1ac)](c[_0x3d1db5(0x1b2)])),C(0x2,c[_0x3d1db5(0x1ac)](b[_0x3d1db5(0x1d6)]))],p);var H=Object[_0x3d1db5(0x17a)],J=(_0x34bb68,_0x15c45f,_0x1481ac,_0x585eb5)=>{for(var _0x2f50e7=_0x585eb5>0x1?void 0x0:_0x585eb5?H(_0x15c45f,_0x1481ac):_0x15c45f,_0xf38a7a=_0x34bb68['length']-0x1,_0x2fa657;_0xf38a7a>=0x0;_0xf38a7a--)(_0x2fa657=_0x34bb68[_0xf38a7a])&&(_0x2f50e7=_0x2fa657(_0x2f50e7)||_0x2f50e7);return _0x2f50e7;},y=(_0xf3b23f,_0x1b9fa5)=>(_0xd764e,_0x53c52a)=>_0x1b9fa5(_0xd764e,_0x53c52a,_0xf3b23f);let g=class extends c[_0x3d1db5(0x1af)]{constructor(_0x26587c,_0x2b24af){const _0x5054b1=_0x3d1db5;super(),this[_0x5054b1(0x195)]=_0x26587c,this[_0x5054b1(0x18c)]=_0x2b24af,this[_0x5054b1(0x193)]();}['_initDataSource'](){const _0x24546c=_0x3d1db5;this[_0x24546c(0x195)][_0x24546c(0x1ec)]=this[_0x24546c(0x18c)],this[_0x24546c(0x195)][_0x24546c(0x1c0)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](p))],g);var F=Object[_0x3d1db5(0x199)],L=Object['getOwnPropertyDescriptor'],Z=(_0x40e8ff,_0x6f83ec,_0x4bf4e3)=>_0x6f83ec in _0x40e8ff?F(_0x40e8ff,_0x6f83ec,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4bf4e3}):_0x40e8ff[_0x6f83ec]=_0x4bf4e3,W=(_0x5c707f,_0x1c45b6,_0x89b6d6,_0xe58b47)=>{const _0x1b8303=_0x3d1db5;for(var _0x400917=_0xe58b47>0x1?void 0x0:_0xe58b47?L(_0x1c45b6,_0x89b6d6):_0x1c45b6,_0x4103a3=_0x5c707f[_0x1b8303(0x1da)]-0x1,_0x33683b;_0x4103a3>=0x0;_0x4103a3--)(_0x33683b=_0x5c707f[_0x4103a3])&&(_0x400917=_0x33683b(_0x400917)||_0x400917);return _0x400917;},O=(_0x368bd8,_0x4235c1)=>(_0x3886f4,_0x7614cd)=>_0x4235c1(_0x3886f4,_0x7614cd,_0x368bd8),N=(_0x54296e,_0x27b5d6,_0x4c1ab5)=>Z(_0x54296e,typeof _0x27b5d6!=_0x3d1db5(0x1d9)?_0x27b5d6+'':_0x27b5d6,_0x4c1ab5);exports[_0x3d1db5(0x1be)]=class extends c[_0x3d1db5(0x191)]{constructor(_0xd51dc9=D,_0x4641f3,_0x6ef878){const _0x1a47b3=_0x3d1db5;super(),this[_0x1a47b3(0x1d1)]=_0xd51dc9,this[_0x1a47b3(0x196)]=_0x4641f3,this['_configService']=_0x6ef878;const {..._0x5d8773}=c[_0x1a47b3(0x1a3)]({},D,this[_0x1a47b3(0x1d1)]);this[_0x1a47b3(0x1bc)][_0x1a47b3(0x1ae)](q,_0x5d8773);}[_0x3d1db5(0x1c9)](){[[p],[g],[_]]['forEach'](_0x3bb083=>{const _0x34af70=_0x1169;this[_0x34af70(0x196)][_0x34af70(0x1b9)](_0x3bb083);});}[_0x3d1db5(0x1aa)](){const _0x13240f=_0x3d1db5;this[_0x13240f(0x196)][_0x13240f(0x1e1)](g),this[_0x13240f(0x196)][_0x13240f(0x1e1)](_);}},N(exports[_0x3d1db5(0x1be)],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x3d1db5(0x174),c[_0x3d1db5(0x1c4)][_0x3d1db5(0x1cd)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x3d1db5(0x17c)](w['UniverThreadCommentUIPlugin'],b[_0x3d1db5(0x17e)],T['UniverLicensePlugin']),O(0x1,c['Inject'](c['Injector'])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';const _0x5110fb=_0x360d;function _0x3606(){const _0x2d54ee=['ThreadCommentModel','580054XLsTaD','IThreadCommentDataSourceService','UniverThreadCommentUIPlugin','error','/universer-api/user/list','createTimestamp','Solve','/edit','code','root','onStarting','Disposable','COMMENT','deleteComment','4862740rgYFqw','parse','IConfigService','2285MaZYEX','get','_commentService','symbol','_threadCommentDataSourceService','2386683fvzrKL','getUnit','/list','UNRECOGNIZED','addComment','personId','getOwnPropertyDescriptor','_initDataSource','YYYY/MM/DD\x20HH:mm','setConfig','CustomRangeType','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/add','Reply','_configService','Plugin','_config','getComment','_userService','content','defineProperty','filter','Add','length','unitId','UNIVER_UNKNOWN','ref','commentUpdate$','disposeWithMe','1366900uIQwqD','merge','4757648khFlSr','resolved','UserManagerService','pluginName','comment','_sessionService','bufferTime','thread-comment-data-source.config','onReady','forEach','HTTPService','solved','user','Injector','14568mAPwOH','add','/delete','userId','userID','getMemberID','rangeType','/solved','threadId','Delete','slice','CollaborationSessionService','UniverCollaborationClientPlugin','size','Solved','body','customRanges','_httpService','rangeId','DependentOn','map','dayjs','listComments','OpenOrReOpen','getCurrentUser','requireSession','resolveComment','subscribe','users','addUser','Unknown','replies','_threadCommentModel','find','Edit','3CzYINa','Inject','post','/universer-api/comment/unit/','_init','1292802GRepoy','_initUserSync','stringify','type','dataSource','comments','UniverThreadCommentDataSourcePlugin','3mRrdcz','parentId','replyId','_injector','pipe'];_0x3606=function(){return _0x2d54ee;};return _0x3606();}(function(_0x5482ba,_0x22b7b4){const _0xd4a338=_0x360d,_0x209ffc=_0x5482ba();while(!![]){try{const _0x1fcdaa=parseInt(_0xd4a338(0x135))/0x1*(-parseInt(_0xd4a338(0x13b))/0x2)+-parseInt(_0xd4a338(0x129))/0x3*(-parseInt(_0xd4a338(0xf6))/0x4)+-parseInt(_0xd4a338(0x14c))/0x5*(-parseInt(_0xd4a338(0x106))/0x6)+-parseInt(_0xd4a338(0x12e))/0x7+parseInt(_0xd4a338(0xf8))/0x8+parseInt(_0xd4a338(0x151))/0x9+-parseInt(_0xd4a338(0x149))/0xa;if(_0x1fcdaa===_0x22b7b4)break;else _0x209ffc['push'](_0x209ffc['shift']());}catch(_0x47a32c){_0x209ffc['push'](_0x209ffc['shift']());}}}(_0x3606,0xbc07d));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x5110fb(0x15c);var I=(_0xbc9332=>(_0xbc9332[_0xbc9332[_0x5110fb(0x11d)]=0x0]=_0x5110fb(0x11d),_0xbc9332[_0xbc9332[_0x5110fb(0x114)]=0x1]=_0x5110fb(0x114),_0xbc9332[_0xbc9332['UNRECOGNIZED']=-0x1]=_0x5110fb(0x154),_0xbc9332))(I||{}),v=(_0x2390d6=>(_0x2390d6[_0x2390d6[_0x5110fb(0x124)]=0x0]='Unknown',_0x2390d6[_0x2390d6[_0x5110fb(0xef)]=0x1]=_0x5110fb(0xef),_0x2390d6[_0x2390d6[_0x5110fb(0x15e)]=0x2]='Reply',_0x2390d6[_0x2390d6['Edit']=0x3]=_0x5110fb(0x128),_0x2390d6[_0x2390d6['Delete']=0x4]=_0x5110fb(0x10f),_0x2390d6[_0x2390d6[_0x5110fb(0x141)]=0x5]=_0x5110fb(0x141),_0x2390d6[_0x2390d6[_0x5110fb(0x154)]=-0x1]='UNRECOGNIZED',_0x2390d6))(v||{});const f=_0x1c7f29=>c[_0x5110fb(0x11b)](new Date(+_0x1c7f29))['format'](_0x5110fb(0x159)),R=async(_0x3db108,_0x3de373)=>{const _0x4718b6=_0x5110fb,_0x23f56d=_0x3db108[_0x4718b6(0x14d)](c[_0x4718b6(0xfa)]),_0x3e24fc=_0x3db108[_0x4718b6(0x14d)](P[_0x4718b6(0x102)]);_0x3de373[_0x4718b6(0x101)](_0x5e0a17=>{_0x23f56d['getUser'](_0x5e0a17)&&_0x3de373['delete'](_0x5e0a17);}),_0x3de373[_0x4718b6(0x113)]&&(await _0x3e24fc[_0x4718b6(0x14d)](_0x4718b6(0x13f),{'params':{'userIDs':[..._0x3de373]}}))[_0x4718b6(0x115)][_0x4718b6(0x122)]['forEach'](_0x8f5d84=>{const _0x4cc789=_0x4718b6;_0x8f5d84&&_0x23f56d[_0x4cc789(0x123)](_0x8f5d84);});};var $=Object[_0x5110fb(0x157)],E=(_0x36cdb6,_0x5d072d,_0x2cb729,_0x5d3779)=>{const _0x401e79=_0x5110fb;for(var _0x1fbe84=_0x5d3779>0x1?void 0x0:_0x5d3779?$(_0x5d072d,_0x2cb729):_0x5d072d,_0x3c6a67=_0x36cdb6[_0x401e79(0xf0)]-0x1,_0x5044f1;_0x3c6a67>=0x0;_0x3c6a67--)(_0x5044f1=_0x36cdb6[_0x3c6a67])&&(_0x1fbe84=_0x5044f1(_0x1fbe84)||_0x1fbe84);return _0x1fbe84;},S=(_0x3c8c62,_0x42605b)=>(_0x50c6c2,_0x56140b)=>_0x42605b(_0x50c6c2,_0x56140b,_0x3c8c62);let _=class extends c[_0x5110fb(0x146)]{constructor(_0x3e808a,_0x342704,_0xc329ff,_0x5a0e4f){const _0x30adbc=_0x5110fb;super(),this['_commentService']=_0x3e808a,this[_0x30adbc(0x126)]=_0x342704,this[_0x30adbc(0xeb)]=_0xc329ff,this[_0x30adbc(0x138)]=_0x5a0e4f,this[_0x30adbc(0x12d)](),this['_initUserSync']();}[_0x5110fb(0x12f)](){const _0x692582=_0x5110fb;this[_0x692582(0xf5)](this[_0x692582(0x126)][_0x692582(0xf4)][_0x692582(0x139)](j[_0x692582(0xfe)](0x10))[_0x692582(0x121)](_0x849ac0=>{const _0x177d2c=_0x692582,_0x4b2a3f=new Set();_0x849ac0[_0x177d2c(0x101)](_0x44c968=>{const _0xc55478=_0x177d2c;if(_0x44c968[_0xc55478(0x131)]===_0xc55478(0x107)){const _0x5dc99f=_0x44c968['payload'][_0xc55478(0x156)];_0x4b2a3f['add'](_0x5dc99f);}}),R(this['_injector'],_0x4b2a3f);}));}[_0x5110fb(0x12d)](){const _0x2512eb=_0x5110fb;this['disposeWithMe'](this[_0x2512eb(0x14e)][_0x2512eb(0xf4)][_0x2512eb(0x121)](async _0x7e0f67=>{const _0x128aa5=_0x2512eb;var _0x4d4cb0,_0x5d9ece,_0x228da3,_0x5e1b30;const _0x20e733=(_0x4d4cb0=this[_0x128aa5(0x126)]['getUnit'](_0x7e0f67[_0x128aa5(0xf1)])[_0x128aa5(0x127)](_0x16c7ac=>_0x16c7ac[_0x128aa5(0x10e)]===_0x7e0f67[_0x128aa5(0x10e)]))==null?void 0x0:_0x4d4cb0[_0x128aa5(0x144)];if(!_0x20e733)return;const {unitId:_0x2ff4ba,subUnitId:_0xafccfb}=_0x20e733;switch(_0x7e0f67[_0x128aa5(0x104)]&&this[_0x128aa5(0xeb)]['addUser'](_0x7e0f67['user']),_0x7e0f67[_0x128aa5(0x131)]){case v[_0x128aa5(0xef)]:break;case v[_0x128aa5(0x15e)]:{this[_0x128aa5(0x126)][_0x128aa5(0x155)](_0x2ff4ba,_0xafccfb,{'unitId':_0x2ff4ba,'subUnitId':_0xafccfb,'ref':'','id':_0x7e0f67[_0x128aa5(0x137)],'dT':f(+_0x7e0f67[_0x128aa5(0x140)]),'threadId':_0x7e0f67['threadId'],'personId':(_0x228da3=(_0x5d9ece=_0x7e0f67['user'])==null?void 0x0:_0x5d9ece[_0x128aa5(0x10a)])!=null?_0x228da3:_0x7e0f67[_0x128aa5(0x109)],'text':JSON[_0x128aa5(0x14a)](_0x7e0f67['content']),'parentId':_0x20e733['id']});break;}case v[_0x128aa5(0x10f)]:{const _0xc5e957=this['_threadCommentModel'][_0x128aa5(0xea)](_0x2ff4ba,_0xafccfb,_0x7e0f67[_0x128aa5(0x137)]);_0xc5e957&&_0xc5e957[_0x128aa5(0x136)]&&this['_threadCommentModel']['deleteComment'](_0x2ff4ba,_0xafccfb,_0x7e0f67[_0x128aa5(0x137)]);break;}case v[_0x128aa5(0x128)]:{this[_0x128aa5(0x126)]['updateComment'](_0x2ff4ba,_0xafccfb,{'commentId':_0x7e0f67[_0x128aa5(0x137)],'text':JSON[_0x128aa5(0x14a)](_0x7e0f67[_0x128aa5(0xec)])});break;}case v[_0x128aa5(0x141)]:{const _0x458363=(_0x5e1b30=this['_threadCommentModel'][_0x128aa5(0x152)](_0x7e0f67[_0x128aa5(0xf1)])[_0x128aa5(0x127)](_0x601384=>_0x601384[_0x128aa5(0x10e)]===_0x7e0f67['threadId']))==null?void 0x0:_0x5e1b30[_0x128aa5(0x144)];_0x458363&&this['_threadCommentModel'][_0x128aa5(0x120)](_0x2ff4ba,_0xafccfb,_0x458363['id'],_0x7e0f67[_0x128aa5(0x103)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x5110fb(0x12a)](b['CommentService'])),S(0x1,c[_0x5110fb(0x12a)](M[_0x5110fb(0x13a)])),S(0x2,c[_0x5110fb(0x12a)](c[_0x5110fb(0xfa)])),S(0x3,c['Inject'](c[_0x5110fb(0x105)]))],_);const q=_0x5110fb(0xff),D={};var A=Object[_0x5110fb(0x157)],x=(_0x4c5a44,_0xf8c558,_0x22813f,_0x40a613)=>{const _0x1dd3b9=_0x5110fb;for(var _0x13504f=_0x40a613>0x1?void 0x0:_0x40a613?A(_0xf8c558,_0x22813f):_0xf8c558,_0x14e466=_0x4c5a44[_0x1dd3b9(0xf0)]-0x1,_0x505474;_0x14e466>=0x0;_0x14e466--)(_0x505474=_0x4c5a44[_0x14e466])&&(_0x13504f=_0x505474(_0x13504f)||_0x13504f);return _0x13504f;},C=(_0x302772,_0x474478)=>(_0x4e1e15,_0x211d8a)=>_0x474478(_0x4e1e15,_0x211d8a,_0x302772);function _0x360d(_0x1f076c,_0x24b683){_0x1f076c=_0x1f076c-0xea;const _0x36062d=_0x3606();let _0x360dbb=_0x36062d[_0x1f076c];return _0x360dbb;}function Y(_0x126fe1,_0x1c3b21){const _0x568980=_0x5110fb,_0xee1a53=_0x126fe1[_0x568980(0x125)][0x0];return{..._0x1c3b21,'id':_0xee1a53[_0x568980(0x137)],'resolved':_0x126fe1[_0x568980(0x103)]===0x1,'dT':f(_0xee1a53['createTimestamp']),'personId':_0xee1a53[_0x568980(0x109)],'threadId':_0xee1a53[_0x568980(0x10e)]};}function G(_0x34ba81,_0x3864ce,_0x2f20c2){const _0x1504b4=_0x5110fb;var _0x3a4369,_0x319ac8;if(((_0x319ac8=(_0x3a4369=_0x34ba81==null?void 0x0:_0x34ba81[_0x1504b4(0x125)])==null?void 0x0:_0x3a4369['length'])!=null?_0x319ac8:0x0)>0x0){const _0x2b5da0=(_0x271620,_0x1368e3)=>({'id':_0x271620[_0x1504b4(0x137)],'threadId':_0x271620[_0x1504b4(0x10e)],'dT':f(_0x271620['createTimestamp']),'personId':_0x271620[_0x1504b4(0x109)],'resolved':_0x34ba81[_0x1504b4(0x103)]===I[_0x1504b4(0x114)],'unitId':_0x3864ce,'subUnitId':_0x2f20c2,'text':JSON['parse'](_0x271620[_0x1504b4(0xec)]),'parentId':_0x1368e3}),_0x5303cc=_0x2b5da0(_0x34ba81[_0x1504b4(0x125)][0x0]);return{..._0x5303cc,'children':_0x34ba81[_0x1504b4(0x125)][_0x1504b4(0x110)](0x1)[_0x1504b4(0x11a)](_0x57656c=>_0x2b5da0(_0x57656c,_0x5303cc['id']))};}return null;}let p=class{constructor(_0x2468d3,_0x16766d,_0x46208b){const _0x35fab0=_0x5110fb;this[_0x35fab0(0x117)]=_0x2468d3,this[_0x35fab0(0xeb)]=_0x16766d,this['_sessionService']=_0x46208b;}async[_0x5110fb(0x155)](_0x2648c2){const _0x279212=_0x5110fb;var _0x1fbca9,_0x5a9a77;const {parentId:_0x3bc7c3,unitId:_0x2fcc62,text:_0x3e76ce,threadId:_0x3f77f0}=_0x2648c2,_0x5e6e90=(_0x5a9a77=(_0x1fbca9=_0x3e76ce[_0x279212(0x116)])==null?void 0x0:_0x1fbca9[_0x279212(0xee)](_0x1d1ddf=>_0x1d1ddf[_0x279212(0x10c)]===c[_0x279212(0x15b)]['COMMENT'])[_0x279212(0x11a)](_0x188774=>_0x188774[_0x279212(0x118)]))!=null?_0x5a9a77:[],_0x4c72f5=JSON[_0x279212(0x130)](_0x3e76ce),_0x217647=(await this[_0x279212(0xfd)][_0x279212(0x11f)](_0x2fcc62))[_0x279212(0x10b)]();if(_0x3bc7c3){const _0x1e0201={'memberId':_0x217647,'unitId':_0x2fcc62,'content':_0x4c72f5,'mention':_0x5e6e90,'threadId':_0x3f77f0},_0x288410=(await this[_0x279212(0x117)][_0x279212(0x12b)]('/universer-api/comment/unit/'+_0x2fcc62+'/reply',{'body':_0x1e0201}))[_0x279212(0x115)]['reply'];return{..._0x2648c2,'id':_0x288410[_0x279212(0x137)],'dT':c[_0x279212(0x11b)](+_0x288410[_0x279212(0x140)])['format'](_0x279212(0x159)),'personId':_0x288410[_0x279212(0x109)]};}else{const _0x256a80={'memberId':_0x217647,'unitId':_0x2fcc62,'content':_0x4c72f5,'mention':_0x5e6e90},_0x2ff235=await this['_httpService'][_0x279212(0x12b)](_0x279212(0x12c)+_0x2fcc62+_0x279212(0x15d),{'body':_0x256a80});return Y(_0x2ff235[_0x279212(0x115)][_0x279212(0xfc)],_0x2648c2);}}async['updateComment'](_0x21cde8){const _0x243c56=_0x5110fb;var _0x4a405d,_0x21bbc7;const {text:_0x14fee2,unitId:_0x3d43c8}=_0x21cde8,_0x2c45e=(_0x21bbc7=(_0x4a405d=_0x14fee2[_0x243c56(0x116)])==null?void 0x0:_0x4a405d[_0x243c56(0xee)](_0x509b0a=>_0x509b0a[_0x243c56(0x10c)]===c[_0x243c56(0x15b)][_0x243c56(0x147)])[_0x243c56(0x11a)](_0xa4e25c=>_0xa4e25c[_0x243c56(0x118)]))!=null?_0x21bbc7:[],_0x839ff6=JSON[_0x243c56(0x130)](_0x14fee2),_0x16f5f9=_0x21cde8[_0x243c56(0x10e)],_0x189e30=_0x21cde8['id'],_0x2c1274={'memberId':(await this['_sessionService'][_0x243c56(0x11f)](_0x3d43c8))[_0x243c56(0x10b)](),'unitId':_0x3d43c8,'threadId':_0x16f5f9,'mention':_0x2c45e,'content':_0x839ff6,'replyId':_0x189e30},_0x5c3878=await this[_0x243c56(0x117)][_0x243c56(0x12b)]('/universer-api/comment/unit/'+_0x3d43c8+_0x243c56(0x142),{'body':_0x2c1274});return!_0x5c3878['body'][_0x243c56(0x13e)]||_0x5c3878[_0x243c56(0x115)][_0x243c56(0x13e)]['code']===0x1;}async[_0x5110fb(0x120)](_0x1d79fa){const _0xc105e3=_0x5110fb,{unitId:_0xcc3f52}=_0x1d79fa,_0x465380=_0x1d79fa['threadId'],_0x36d238={'memberId':this[_0xc105e3(0xeb)][_0xc105e3(0x11e)]()[_0xc105e3(0x10a)],'unitId':_0xcc3f52,'threadId':_0x465380,'solved':_0x1d79fa[_0xc105e3(0xf9)]?I[_0xc105e3(0x114)]:I[_0xc105e3(0x11d)]},_0x3057b6=await this[_0xc105e3(0x117)][_0xc105e3(0x12b)](_0xc105e3(0x12c)+_0xcc3f52+_0xc105e3(0x10d),{'body':_0x36d238});return!_0x3057b6[_0xc105e3(0x115)]['error']||_0x3057b6[_0xc105e3(0x115)]['error'][_0xc105e3(0x143)]===0x1;}async[_0x5110fb(0x148)](_0x2ad540,_0x4245dc,_0x5e17d1,_0xafd8e2){const _0x2d90e7=_0x5110fb,_0x4f7934={'memberId':(await this[_0x2d90e7(0xfd)]['requireSession'](_0x2ad540))['getMemberID'](),'threadId':_0x5e17d1,'replyId':_0xafd8e2,'unitId':_0x2ad540},_0x1d27ee=await this[_0x2d90e7(0x117)][_0x2d90e7(0x12b)]('/universer-api/comment/unit/'+_0x2ad540+_0x2d90e7(0x108),{'body':_0x4f7934});return!_0x1d27ee['body'][_0x2d90e7(0x13e)]||_0x1d27ee[_0x2d90e7(0x115)]['error']['code']===0x1;}async[_0x5110fb(0x11c)](_0x2859de,_0x2ba774,_0x1e84f8){const _0x5edb32=_0x5110fb,_0x17c038={'unitId':_0x2859de,'threadId':_0x1e84f8},_0x18271b=await this['_httpService']['post'](_0x5edb32(0x12c)+_0x2859de+_0x5edb32(0x153),{'body':_0x17c038}),_0x5ec30f=_0x1e84f8[_0x5edb32(0x11a)](_0x5b5f6c=>G(_0x18271b[_0x5edb32(0x115)][_0x5edb32(0x133)][_0x5b5f6c],_0x2859de,_0x2ba774))[_0x5edb32(0xee)](Boolean);return Object['values'](_0x18271b[_0x5edb32(0x115)]['users'])[_0x5edb32(0x101)](_0x359458=>{const _0x5e8509=_0x5edb32;this[_0x5e8509(0xeb)][_0x5e8509(0x123)](_0x359458);}),_0x5ec30f;}['saveCommentToSnapshot'](_0x4c9d81){const _0x100a7e=_0x5110fb;return{'id':_0x4c9d81['id'],'threadId':_0x4c9d81[_0x100a7e(0x10e)],'ref':_0x4c9d81[_0x100a7e(0xf3)]};}};p=x([C(0x0,c[_0x5110fb(0x12a)](P[_0x5110fb(0x102)])),C(0x1,c[_0x5110fb(0x12a)](c[_0x5110fb(0xfa)])),C(0x2,c[_0x5110fb(0x12a)](b[_0x5110fb(0x111)]))],p);var H=Object[_0x5110fb(0x157)],J=(_0x57ba91,_0x46e75e,_0x2054fb,_0x2b7016)=>{const _0x179a16=_0x5110fb;for(var _0x13fe35=_0x2b7016>0x1?void 0x0:_0x2b7016?H(_0x46e75e,_0x2054fb):_0x46e75e,_0x1acb00=_0x57ba91[_0x179a16(0xf0)]-0x1,_0x4235c5;_0x1acb00>=0x0;_0x1acb00--)(_0x4235c5=_0x57ba91[_0x1acb00])&&(_0x13fe35=_0x4235c5(_0x13fe35)||_0x13fe35);return _0x13fe35;},y=(_0x368f7f,_0x7b7b02)=>(_0x35515c,_0x30e916)=>_0x7b7b02(_0x35515c,_0x30e916,_0x368f7f);let g=class extends c['Disposable']{constructor(_0x94cb9d,_0x3a31c1){const _0x439847=_0x5110fb;super(),this[_0x439847(0x150)]=_0x94cb9d,this['_threadCommentDataSource']=_0x3a31c1,this[_0x439847(0x158)]();}[_0x5110fb(0x158)](){const _0x3eef42=_0x5110fb;this['_threadCommentDataSourceService'][_0x3eef42(0x132)]=this['_threadCommentDataSource'],this[_0x3eef42(0x150)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x5110fb(0x13c)]),y(0x1,c[_0x5110fb(0x12a)](p))],g);var F=Object[_0x5110fb(0xed)],L=Object['getOwnPropertyDescriptor'],Z=(_0x156cf2,_0x266f91,_0x137f75)=>_0x266f91 in _0x156cf2?F(_0x156cf2,_0x266f91,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x137f75}):_0x156cf2[_0x266f91]=_0x137f75,W=(_0x17d65e,_0x5c9edd,_0x4fe94e,_0x5ecfb1)=>{const _0x46f81f=_0x5110fb;for(var _0x1f4d93=_0x5ecfb1>0x1?void 0x0:_0x5ecfb1?L(_0x5c9edd,_0x4fe94e):_0x5c9edd,_0x51963d=_0x17d65e[_0x46f81f(0xf0)]-0x1,_0x574f2a;_0x51963d>=0x0;_0x51963d--)(_0x574f2a=_0x17d65e[_0x51963d])&&(_0x1f4d93=_0x574f2a(_0x1f4d93)||_0x1f4d93);return _0x1f4d93;},O=(_0x3e1250,_0xa72bd9)=>(_0x294a39,_0xc87a32)=>_0xa72bd9(_0x294a39,_0xc87a32,_0x3e1250),N=(_0xfbe1b1,_0x102731,_0xa1e9ef)=>Z(_0xfbe1b1,typeof _0x102731!=_0x5110fb(0x14f)?_0x102731+'':_0x102731,_0xa1e9ef);exports[_0x5110fb(0x134)]=class extends c[_0x5110fb(0x160)]{constructor(_0x589821=D,_0x571851,_0x3f6f79){const _0xa942ae=_0x5110fb;super(),this['_config']=_0x589821,this[_0xa942ae(0x138)]=_0x571851,this[_0xa942ae(0x15f)]=_0x3f6f79;const {..._0x143288}=c[_0xa942ae(0xf7)]({},D,this[_0xa942ae(0x161)]);this['_configService'][_0xa942ae(0x15a)](q,_0x143288);}[_0x5110fb(0x145)](){const _0x1889a5=_0x5110fb;[[p],[g],[_]][_0x1889a5(0x101)](_0x4bd7b1=>{const _0x266a7a=_0x1889a5;this[_0x266a7a(0x138)]['add'](_0x4bd7b1);});}[_0x5110fb(0x100)](){const _0x4299c2=_0x5110fb;this[_0x4299c2(0x138)][_0x4299c2(0x14d)](g),this[_0x4299c2(0x138)]['get'](_);}},N(exports[_0x5110fb(0x134)],_0x5110fb(0xfb),U),N(exports['UniverThreadCommentDataSourcePlugin'],'type',c['UniverInstanceType'][_0x5110fb(0xf2)]),exports[_0x5110fb(0x134)]=W([c[_0x5110fb(0x119)](w[_0x5110fb(0x13d)],b[_0x5110fb(0x112)],T['UniverLicensePlugin']),O(0x1,c[_0x5110fb(0x12a)](c[_0x5110fb(0x105)])),O(0x2,c[_0x5110fb(0x14b)])],exports[_0x5110fb(0x134)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x48fe2c=_0x331d;(function(_0x304275,_0x2e0c6c){const _0x53dd1b=_0x331d,_0x17d870=_0x304275();while(!![]){try{const _0x68ad7f=-parseInt(_0x53dd1b(0xba))/0x1+parseInt(_0x53dd1b(0x101))/0x2*(-parseInt(_0x53dd1b(0xa1))/0x3)+parseInt(_0x53dd1b(0xa5))/0x4*(parseInt(_0x53dd1b(0xcc))/0x5)+parseInt(_0x53dd1b(0xb7))/0x6*(parseInt(_0x53dd1b(0xfb))/0x7)+-parseInt(_0x53dd1b(0xf2))/0x8*(-parseInt(_0x53dd1b(0xe3))/0x9)+parseInt(_0x53dd1b(0xaa))/0xa+-parseInt(_0x53dd1b(0xac))/0xb;if(_0x68ad7f===_0x2e0c6c)break;else _0x17d870['push'](_0x17d870['shift']());}catch(_0x556b70){_0x17d870['push'](_0x17d870['shift']());}}}(_0x2786,0xc35c6));import{CommentService as _0x5c121d,CollaborationSessionService as _0x147544,UniverCollaborationClientPlugin as _0x167480}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x25820f}from'@univerjs-pro/license';import{dayjs as _0x5195b2,UserManagerService as _0x53574f,Inject as _0x428f3a,Injector as _0x29b08d,Disposable as _0xe221d9,CustomRangeType as _0x3c6003,UniverInstanceType as _0x4bc7a1,DependentOn as _0xdc118a,Plugin as _0x4b70ca,merge as _0x157acd,IConfigService as _0x5e1548}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5995f1}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5b2ea3,IThreadCommentDataSourceService as _0x38d035}from'@univerjs/thread-comment';import{bufferTime as _0x2af66c}from'rxjs';import{HTTPService as _0xa6dc27}from'@univerjs/network';const W=_0x48fe2c(0xed);var I=(_0x266a30=>(_0x266a30[_0x266a30[_0x48fe2c(0xa0)]=0x0]=_0x48fe2c(0xa0),_0x266a30[_0x266a30['Solved']=0x1]=_0x48fe2c(0x100),_0x266a30[_0x266a30[_0x48fe2c(0xa7)]=-0x1]=_0x48fe2c(0xa7),_0x266a30))(I||{}),v=(_0x3e4355=>(_0x3e4355[_0x3e4355[_0x48fe2c(0xc2)]=0x0]=_0x48fe2c(0xc2),_0x3e4355[_0x3e4355['Add']=0x1]='Add',_0x3e4355[_0x3e4355[_0x48fe2c(0xb8)]=0x2]=_0x48fe2c(0xb8),_0x3e4355[_0x3e4355['Edit']=0x3]='Edit',_0x3e4355[_0x3e4355['Delete']=0x4]=_0x48fe2c(0xb0),_0x3e4355[_0x3e4355[_0x48fe2c(0xec)]=0x5]=_0x48fe2c(0xec),_0x3e4355[_0x3e4355['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x3e4355))(v||{});const y=_0x4bc5e4=>_0x5195b2(new Date(+_0x4bc5e4))[_0x48fe2c(0xaf)](_0x48fe2c(0xb4)),B=async(_0x6dc9c8,_0x4964da)=>{const _0x1ba25a=_0x48fe2c,_0x10248a=_0x6dc9c8[_0x1ba25a(0xf0)](_0x53574f),_0x2bcd00=_0x6dc9c8['get'](_0xa6dc27);_0x4964da[_0x1ba25a(0xd1)](_0x240e29=>{const _0x24df96=_0x1ba25a;_0x10248a['getUser'](_0x240e29)&&_0x4964da[_0x24df96(0xe9)](_0x240e29);}),_0x4964da[_0x1ba25a(0xf1)]&&(await _0x2bcd00[_0x1ba25a(0xf0)](_0x1ba25a(0x102),{'params':{'userIDs':[..._0x4964da]}}))['body']['users'][_0x1ba25a(0xd1)](_0x526ae9=>{const _0x56833f=_0x1ba25a;_0x526ae9&&_0x10248a[_0x56833f(0xa2)](_0x526ae9);});};var K=Object[_0x48fe2c(0xa3)],V=(_0x357eef,_0x191289,_0x1b48f1,_0x37ff15)=>{for(var _0x2079ae=_0x37ff15>0x1?void 0x0:_0x37ff15?K(_0x191289,_0x1b48f1):_0x191289,_0x20a4f3=_0x357eef['length']-0x1,_0x2123a2;_0x20a4f3>=0x0;_0x20a4f3--)(_0x2123a2=_0x357eef[_0x20a4f3])&&(_0x2079ae=_0x2123a2(_0x2079ae)||_0x2079ae);return _0x2079ae;},p=(_0x1b0a29,_0x2c76a2)=>(_0x2bb2d7,_0x512358)=>_0x2c76a2(_0x2bb2d7,_0x512358,_0x1b0a29);let _=class extends _0xe221d9{constructor(_0x4ff4cb,_0x2f045e,_0x4e9578,_0x4e2071){const _0x1ea932=_0x48fe2c;super(),this[_0x1ea932(0xe2)]=_0x4ff4cb,this[_0x1ea932(0xbe)]=_0x2f045e,this[_0x1ea932(0xe4)]=_0x4e9578,this[_0x1ea932(0xdc)]=_0x4e2071,this[_0x1ea932(0xc8)](),this[_0x1ea932(0xc1)]();}[_0x48fe2c(0xc1)](){const _0x6ff1b0=_0x48fe2c;this[_0x6ff1b0(0xbd)](this[_0x6ff1b0(0xbe)]['commentUpdate$'][_0x6ff1b0(0xbf)](_0x2af66c(0x10))[_0x6ff1b0(0xd4)](_0x52b3a6=>{const _0x28d66e=_0x6ff1b0,_0x53c34d=new Set();_0x52b3a6['forEach'](_0x451407=>{const _0x10e342=_0x331d;if(_0x451407[_0x10e342(0xb2)]==='add'){const _0x39c55c=_0x451407[_0x10e342(0xfa)][_0x10e342(0xef)];_0x53c34d[_0x10e342(0xe1)](_0x39c55c);}}),B(this[_0x28d66e(0xdc)],_0x53c34d);}));}[_0x48fe2c(0xc8)](){const _0x1d947a=_0x48fe2c;this[_0x1d947a(0xbd)](this[_0x1d947a(0xe2)][_0x1d947a(0xc6)][_0x1d947a(0xd4)](async _0x312552=>{const _0x41bf6a=_0x1d947a;var _0x5933da,_0x1bd47a,_0x2d2caf,_0x2aae63;const _0x3b9dac=(_0x5933da=this[_0x41bf6a(0xbe)][_0x41bf6a(0xc4)](_0x312552[_0x41bf6a(0xb1)])[_0x41bf6a(0x9f)](_0xe9a6d1=>_0xe9a6d1['threadId']===_0x312552[_0x41bf6a(0xab)]))==null?void 0x0:_0x5933da[_0x41bf6a(0xdf)];if(!_0x3b9dac)return;const {unitId:_0x230f03,subUnitId:_0x4242d4}=_0x3b9dac;switch(_0x312552[_0x41bf6a(0xcf)]&&this[_0x41bf6a(0xe4)][_0x41bf6a(0xa2)](_0x312552[_0x41bf6a(0xcf)]),_0x312552[_0x41bf6a(0xb2)]){case v[_0x41bf6a(0xfe)]:break;case v['Reply']:{this['_threadCommentModel'][_0x41bf6a(0xf9)](_0x230f03,_0x4242d4,{'unitId':_0x230f03,'subUnitId':_0x4242d4,'ref':'','id':_0x312552[_0x41bf6a(0xf3)],'dT':y(+_0x312552[_0x41bf6a(0xe6)]),'threadId':_0x312552[_0x41bf6a(0xab)],'personId':(_0x2d2caf=(_0x1bd47a=_0x312552[_0x41bf6a(0xcf)])==null?void 0x0:_0x1bd47a[_0x41bf6a(0xea)])!=null?_0x2d2caf:_0x312552[_0x41bf6a(0xf4)],'text':JSON[_0x41bf6a(0xe8)](_0x312552['content']),'parentId':_0x3b9dac['id']});break;}case v[_0x41bf6a(0xb0)]:{const _0x1a0244=this[_0x41bf6a(0xbe)]['getComment'](_0x230f03,_0x4242d4,_0x312552[_0x41bf6a(0xf3)]);_0x1a0244&&_0x1a0244[_0x41bf6a(0xdb)]&&this[_0x41bf6a(0xbe)][_0x41bf6a(0xca)](_0x230f03,_0x4242d4,_0x312552['replyId']);break;}case v[_0x41bf6a(0xd5)]:{this[_0x41bf6a(0xbe)]['updateComment'](_0x230f03,_0x4242d4,{'commentId':_0x312552[_0x41bf6a(0xf3)],'text':JSON[_0x41bf6a(0xe8)](_0x312552['content'])});break;}case v[_0x41bf6a(0xec)]:{const _0xe12e5d=(_0x2aae63=this[_0x41bf6a(0xbe)]['getUnit'](_0x312552[_0x41bf6a(0xb1)])[_0x41bf6a(0x9f)](_0x129802=>_0x129802[_0x41bf6a(0xab)]===_0x312552[_0x41bf6a(0xab)]))==null?void 0x0:_0x2aae63[_0x41bf6a(0xdf)];_0xe12e5d&&this[_0x41bf6a(0xbe)][_0x41bf6a(0xda)](_0x230f03,_0x4242d4,_0xe12e5d['id'],_0x312552[_0x41bf6a(0xce)]===I[_0x41bf6a(0x100)]);break;}}}));}};_=V([p(0x0,_0x428f3a(_0x5c121d)),p(0x1,_0x428f3a(_0x5b2ea3)),p(0x2,_0x428f3a(_0x53574f)),p(0x3,_0x428f3a(_0x29b08d))],_);const z=_0x48fe2c(0xad),O={};function _0x331d(_0x4bc6b2,_0x45cb30){_0x4bc6b2=_0x4bc6b2-0x9d;const _0x2786b4=_0x2786();let _0x331dbf=_0x2786b4[_0x4bc6b2];return _0x331dbf;}var k=Object['getOwnPropertyDescriptor'],Q=(_0x139968,_0x470422,_0x3837ec,_0x826566)=>{const _0x1f42fd=_0x48fe2c;for(var _0x1c044d=_0x826566>0x1?void 0x0:_0x826566?k(_0x470422,_0x3837ec):_0x470422,_0x21f1e1=_0x139968[_0x1f42fd(0xcb)]-0x1,_0x191a22;_0x21f1e1>=0x0;_0x21f1e1--)(_0x191a22=_0x139968[_0x21f1e1])&&(_0x1c044d=_0x191a22(_0x1c044d)||_0x1c044d);return _0x1c044d;},b=(_0x36adec,_0x3903b4)=>(_0xeef47a,_0x2d48a8)=>_0x3903b4(_0xeef47a,_0x2d48a8,_0x36adec);function X(_0x30d231,_0x668fa0){const _0x3e41c4=_0x48fe2c,_0x419118=_0x30d231['replies'][0x0];return{..._0x668fa0,'id':_0x419118[_0x3e41c4(0xf3)],'resolved':_0x30d231[_0x3e41c4(0xce)]===0x1,'dT':y(_0x419118[_0x3e41c4(0xe6)]),'personId':_0x419118[_0x3e41c4(0xf4)],'threadId':_0x419118['threadId']};}function ee(_0x59ea32,_0xdda6b5,_0x10ccf5){const _0xc8bb0c=_0x48fe2c;var _0x4c05ec,_0xfb3f9c;if(((_0xfb3f9c=(_0x4c05ec=_0x59ea32==null?void 0x0:_0x59ea32['replies'])==null?void 0x0:_0x4c05ec[_0xc8bb0c(0xcb)])!=null?_0xfb3f9c:0x0)>0x0){const _0x41e3f1=(_0x7d6f27,_0x56684d)=>({'id':_0x7d6f27[_0xc8bb0c(0xf3)],'threadId':_0x7d6f27[_0xc8bb0c(0xab)],'dT':y(_0x7d6f27['createTimestamp']),'personId':_0x7d6f27[_0xc8bb0c(0xf4)],'resolved':_0x59ea32['solved']===I['Solved'],'unitId':_0xdda6b5,'subUnitId':_0x10ccf5,'text':JSON[_0xc8bb0c(0xe8)](_0x7d6f27[_0xc8bb0c(0xee)]),'parentId':_0x56684d}),_0x1c71f2=_0x41e3f1(_0x59ea32['replies'][0x0]);return{..._0x1c71f2,'children':_0x59ea32[_0xc8bb0c(0xd2)][_0xc8bb0c(0xb5)](0x1)['map'](_0x546bfa=>_0x41e3f1(_0x546bfa,_0x1c71f2['id']))};}return null;}let S=class{constructor(_0x317e21,_0x511b5e,_0x332787){const _0x2b3bef=_0x48fe2c;this[_0x2b3bef(0xd6)]=_0x317e21,this[_0x2b3bef(0xe4)]=_0x511b5e,this['_sessionService']=_0x332787;}async[_0x48fe2c(0xf9)](_0x1205f3){const _0x3ba5bb=_0x48fe2c;var _0x45718e,_0x1a0f78;const {parentId:_0x54a481,unitId:_0xa5eb06,text:_0x37c887,threadId:_0x2cc036}=_0x1205f3,_0x1b78ee=(_0x1a0f78=(_0x45718e=_0x37c887['customRanges'])==null?void 0x0:_0x45718e['filter'](_0x3dc5a3=>_0x3dc5a3['rangeType']===_0x3c6003[_0x3ba5bb(0xd8)])[_0x3ba5bb(0xd9)](_0x43c6c3=>_0x43c6c3[_0x3ba5bb(0xbb)]))!=null?_0x1a0f78:[],_0x585d95=JSON[_0x3ba5bb(0xfc)](_0x37c887),_0x4c38ac=(await this[_0x3ba5bb(0xff)][_0x3ba5bb(0xb6)](_0xa5eb06))[_0x3ba5bb(0xb3)]();if(_0x54a481){const _0x1fc30c={'memberId':_0x4c38ac,'unitId':_0xa5eb06,'content':_0x585d95,'mention':_0x1b78ee,'threadId':_0x2cc036},_0xfd1c58=(await this[_0x3ba5bb(0xd6)][_0x3ba5bb(0xc3)](_0x3ba5bb(0xd7)+_0xa5eb06+_0x3ba5bb(0xa8),{'body':_0x1fc30c}))[_0x3ba5bb(0xd0)][_0x3ba5bb(0xe0)];return{..._0x1205f3,'id':_0xfd1c58[_0x3ba5bb(0xf3)],'dT':_0x5195b2(+_0xfd1c58['createTimestamp'])[_0x3ba5bb(0xaf)](_0x3ba5bb(0xb4)),'personId':_0xfd1c58[_0x3ba5bb(0xf4)]};}else{const _0x395e9c={'memberId':_0x4c38ac,'unitId':_0xa5eb06,'content':_0x585d95,'mention':_0x1b78ee},_0x5efc40=await this['_httpService'][_0x3ba5bb(0xc3)](_0x3ba5bb(0xd7)+_0xa5eb06+'/add',{'body':_0x395e9c});return X(_0x5efc40[_0x3ba5bb(0xd0)]['comment'],_0x1205f3);}}async[_0x48fe2c(0xc5)](_0x546ec2){const _0x351375=_0x48fe2c;var _0x4f56fa,_0x5dfb48;const {text:_0x406710,unitId:_0x54c53f}=_0x546ec2,_0x274f9e=(_0x5dfb48=(_0x4f56fa=_0x406710['customRanges'])==null?void 0x0:_0x4f56fa[_0x351375(0xa6)](_0x5a5dac=>_0x5a5dac[_0x351375(0xeb)]===_0x3c6003[_0x351375(0xd8)])[_0x351375(0xd9)](_0x3ad921=>_0x3ad921[_0x351375(0xbb)]))!=null?_0x5dfb48:[],_0x402063=JSON['stringify'](_0x406710),_0x780143=_0x546ec2['threadId'],_0x23f0bb=_0x546ec2['id'],_0x3daf9f={'memberId':(await this['_sessionService'][_0x351375(0xb6)](_0x54c53f))[_0x351375(0xb3)](),'unitId':_0x54c53f,'threadId':_0x780143,'mention':_0x274f9e,'content':_0x402063,'replyId':_0x23f0bb},_0x461783=await this['_httpService'][_0x351375(0xc3)](_0x351375(0xd7)+_0x54c53f+'/edit',{'body':_0x3daf9f});return!_0x461783['body'][_0x351375(0xdd)]||_0x461783[_0x351375(0xd0)]['error'][_0x351375(0xb9)]===0x1;}async[_0x48fe2c(0xda)](_0x5980c1){const _0x46ba6d=_0x48fe2c,{unitId:_0x34d77b}=_0x5980c1,_0x161b40=_0x5980c1[_0x46ba6d(0xab)],_0x4cb8e5={'memberId':this[_0x46ba6d(0xe4)][_0x46ba6d(0xa4)]()[_0x46ba6d(0xea)],'unitId':_0x34d77b,'threadId':_0x161b40,'solved':_0x5980c1[_0x46ba6d(0xf8)]?I[_0x46ba6d(0x100)]:I['OpenOrReOpen']},_0x1e49cd=await this[_0x46ba6d(0xd6)][_0x46ba6d(0xc3)](_0x46ba6d(0xd7)+_0x34d77b+_0x46ba6d(0xc0),{'body':_0x4cb8e5});return!_0x1e49cd['body'][_0x46ba6d(0xdd)]||_0x1e49cd['body']['error'][_0x46ba6d(0xb9)]===0x1;}async[_0x48fe2c(0xca)](_0x1697cd,_0x54b36e,_0x5f3543,_0x2a2357){const _0x452c67=_0x48fe2c,_0x5d3ca7={'memberId':(await this[_0x452c67(0xff)][_0x452c67(0xb6)](_0x1697cd))['getMemberID'](),'threadId':_0x5f3543,'replyId':_0x2a2357,'unitId':_0x1697cd},_0x39c861=await this[_0x452c67(0xd6)][_0x452c67(0xc3)](_0x452c67(0xd7)+_0x1697cd+_0x452c67(0xa9),{'body':_0x5d3ca7});return!_0x39c861['body'][_0x452c67(0xdd)]||_0x39c861[_0x452c67(0xd0)]['error'][_0x452c67(0xb9)]===0x1;}async[_0x48fe2c(0xc7)](_0x2d80f1,_0x2e281b,_0xf29e7b){const _0x1785ef=_0x48fe2c,_0x3216ea={'unitId':_0x2d80f1,'threadId':_0xf29e7b},_0x5a7728=await this['_httpService']['post'](_0x1785ef(0xd7)+_0x2d80f1+'/list',{'body':_0x3216ea}),_0x331e03=_0xf29e7b['map'](_0x378d28=>ee(_0x5a7728[_0x1785ef(0xd0)]['comments'][_0x378d28],_0x2d80f1,_0x2e281b))[_0x1785ef(0xa6)](Boolean);return Object[_0x1785ef(0xde)](_0x5a7728[_0x1785ef(0xd0)][_0x1785ef(0xc9)])[_0x1785ef(0xd1)](_0x1ace91=>{const _0x5f48e4=_0x1785ef;this[_0x5f48e4(0xe4)][_0x5f48e4(0xa2)](_0x1ace91);}),_0x331e03;}['saveCommentToSnapshot'](_0x4cc305){const _0x5874fb=_0x48fe2c;return{'id':_0x4cc305['id'],'threadId':_0x4cc305[_0x5874fb(0xab)],'ref':_0x4cc305['ref']};}};S=Q([b(0x0,_0x428f3a(_0xa6dc27)),b(0x1,_0x428f3a(_0x53574f)),b(0x2,_0x428f3a(_0x147544))],S);function _0x2786(){const _0x45299d=['onReady','createTimestamp','syncUpdateMutationToColla','parse','delete','userID','rangeType','Solve','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','content','personId','get','size','70496CknnQN','replyId','userId','dataSource','pluginName','defineProperty','resolved','addComment','payload','282856xaBObW','stringify','_threadCommentDataSourceService','Add','_sessionService','Solved','2036bIFbsR','/universer-api/user/list','onStarting','UNIVER_UNKNOWN','find','OpenOrReOpen','933lYrrhG','addUser','getOwnPropertyDescriptor','getCurrentUser','2280OpjCZd','filter','UNRECOGNIZED','/reply','/delete','13850950wheMvX','threadId','3712808tbxHvx','thread-comment-data-source.config','_initDataSource','format','Delete','unitId','type','getMemberID','YYYY/MM/DD\x20HH:mm','slice','requireSession','6PXJwxv','Reply','code','1595405LKxwKH','rangeId','_configService','disposeWithMe','_threadCommentModel','pipe','/solved','_initUserSync','Unknown','post','getUnit','updateComment','commentUpdate$','listComments','_init','users','deleteComment','length','875SFjHxl','symbol','solved','user','body','forEach','replies','_config','subscribe','Edit','_httpService','/universer-api/comment/unit/','COMMENT','map','resolveComment','parentId','_injector','error','values','root','reply','add','_commentService','1557DOQOZp','_userService'];_0x2786=function(){return _0x45299d;};return _0x2786();}var re=Object['getOwnPropertyDescriptor'],te=(_0x11e342,_0x147bec,_0x3835ce,_0x4553a7)=>{const _0x3fc310=_0x48fe2c;for(var _0x5612a5=_0x4553a7>0x1?void 0x0:_0x4553a7?re(_0x147bec,_0x3835ce):_0x147bec,_0x4f0f61=_0x11e342[_0x3fc310(0xcb)]-0x1,_0x2b2bf6;_0x4f0f61>=0x0;_0x4f0f61--)(_0x2b2bf6=_0x11e342[_0x4f0f61])&&(_0x5612a5=_0x2b2bf6(_0x5612a5)||_0x5612a5);return _0x5612a5;},M=(_0x4b8006,_0x39bdd9)=>(_0x352980,_0x4c7fac)=>_0x39bdd9(_0x352980,_0x4c7fac,_0x4b8006);let f=class extends _0xe221d9{constructor(_0x1af98d,_0x3ebeef){const _0x3a67f2=_0x48fe2c;super(),this[_0x3a67f2(0xfd)]=_0x1af98d,this['_threadCommentDataSource']=_0x3ebeef,this[_0x3a67f2(0xae)]();}['_initDataSource'](){const _0xa271fa=_0x48fe2c;this['_threadCommentDataSourceService'][_0xa271fa(0xf5)]=this['_threadCommentDataSource'],this[_0xa271fa(0xfd)][_0xa271fa(0xe7)]=!0x1;}};f=te([M(0x0,_0x38d035),M(0x1,_0x428f3a(S))],f);var se=Object[_0x48fe2c(0xf7)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1bedea,_0x573693,_0x2a7bc3)=>_0x573693 in _0x1bedea?se(_0x1bedea,_0x573693,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2a7bc3}):_0x1bedea[_0x573693]=_0x2a7bc3,ie=(_0x463889,_0x1fa58d,_0x3a106a,_0x1da43e)=>{const _0x43c352=_0x48fe2c;for(var _0x4c8874=_0x1da43e>0x1?void 0x0:_0x1da43e?oe(_0x1fa58d,_0x3a106a):_0x1fa58d,_0x4de60a=_0x463889[_0x43c352(0xcb)]-0x1,_0x8b2b3a;_0x4de60a>=0x0;_0x4de60a--)(_0x8b2b3a=_0x463889[_0x4de60a])&&(_0x4c8874=_0x8b2b3a(_0x4c8874)||_0x4c8874);return _0x4c8874;},N=(_0xa95b56,_0x51f282)=>(_0x9be76c,_0x783e9b)=>_0x51f282(_0x9be76c,_0x783e9b,_0xa95b56),$=(_0x557a2e,_0x398208,_0xf836ae)=>ne(_0x557a2e,typeof _0x398208!=_0x48fe2c(0xcd)?_0x398208+'':_0x398208,_0xf836ae);let g=class extends _0x4b70ca{constructor(_0x54c2f7=O,_0x532645,_0x1e9e98){const _0x30e2cd=_0x48fe2c;super(),this['_config']=_0x54c2f7,this[_0x30e2cd(0xdc)]=_0x532645,this[_0x30e2cd(0xbc)]=_0x1e9e98;const {..._0x2274bf}=_0x157acd({},O,this[_0x30e2cd(0xd3)]);this[_0x30e2cd(0xbc)]['setConfig'](z,_0x2274bf);}[_0x48fe2c(0x9d)](){const _0x179386=_0x48fe2c;[[S],[f],[_]][_0x179386(0xd1)](_0x3344d6=>{const _0x2e55d4=_0x179386;this[_0x2e55d4(0xdc)][_0x2e55d4(0xe1)](_0x3344d6);});}[_0x48fe2c(0xe5)](){const _0x39a128=_0x48fe2c;this[_0x39a128(0xdc)]['get'](f),this[_0x39a128(0xdc)][_0x39a128(0xf0)](_);}};$(g,_0x48fe2c(0xf6),W),$(g,_0x48fe2c(0xb2),_0x4bc7a1[_0x48fe2c(0x9e)]),g=ie([_0xdc118a(_0x5995f1,_0x167480,_0x25820f),N(0x1,_0x428f3a(_0x29b08d)),N(0x2,_0x5e1548)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3dd77d=_0x2bfd;(function(_0x3e57bc,_0x12a729){const _0x2461c3=_0x2bfd,_0x32b35d=_0x3e57bc();while(!![]){try{const _0x8b4547=parseInt(_0x2461c3(0x142))/0x1*(-parseInt(_0x2461c3(0x124))/0x2)+-parseInt(_0x2461c3(0x11b))/0x3+parseInt(_0x2461c3(0x140))/0x4+parseInt(_0x2461c3(0x12c))/0x5+-parseInt(_0x2461c3(0x171))/0x6*(parseInt(_0x2461c3(0x14f))/0x7)+parseInt(_0x2461c3(0x138))/0x8+parseInt(_0x2461c3(0x174))/0x9*(parseInt(_0x2461c3(0x119))/0xa);if(_0x8b4547===_0x12a729)break;else _0x32b35d['push'](_0x32b35d['shift']());}catch(_0x39c403){_0x32b35d['push'](_0x32b35d['shift']());}}}(_0x1e89,0x9b41f));import{CommentService as _0x2d5050,CollaborationSessionService as _0x39b114,UniverCollaborationClientPlugin as _0x5b77bc}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x51acd4}from'@univerjs-pro/license';import{dayjs as _0x43457f,UserManagerService as _0x3d5d34,Inject as _0x4f05e2,Injector as _0x3680c0,Disposable as _0x7f332d,CustomRangeType as _0x35efce,UniverInstanceType as _0x2910e0,DependentOn as _0x194e0f,Plugin as _0x1dd15c,merge as _0x4c0c14,IConfigService as _0x590cc5}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3f46b2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x36aae8,IThreadCommentDataSourceService as _0x1b4b76}from'@univerjs/thread-comment';import{bufferTime as _0x563c27}from'rxjs';import{HTTPService as _0x1f3014}from'@univerjs/network';function _0x1e89(){const _0x269c31=['getOwnPropertyDescriptor','10bvUonc','onReady','2660865YSPQqH','unitId','_userService','ref','root','size','createTimestamp','Delete','Reply','332246sIRBqb','format','listComments','filter','Add','threadId','customRanges','setConfig','3188165gEzerd','/reply','_configService','getUnit','defineProperty','code','getUser','syncUpdateMutationToColla','type','find','map','parentId','9698448zpcYMD','thread-comment-data-source.config','length','_threadCommentDataSourceService','subscribe','deleteComment','onStarting','getMemberID','2912432xSObrW','Solve','7AKkFFQ','personId','_initDataSource','getComment','values','addUser','get','/solved','getCurrentUser','UNIVER_UNKNOWN','stringify','reply','rangeId','7MlBJmP','resolveComment','delete','forEach','rangeType','post','body','symbol','_commentService','_initUserSync','OpenOrReOpen','/add','/universer-api/comment/unit/','payload','updateComment','error','pluginName','disposeWithMe','parse','Solved','replyId','addComment','_threadCommentDataSource','dataSource','_sessionService','saveCommentToSnapshot','userID','replies','slice','/edit','_injector','requireSession','comments','UNRECOGNIZED','7437138JUUaEu','commentUpdate$','COMMENT','12125043DdGJCy','content','userId','solved','_httpService','resolved','Edit','users','user','add','/universer-api/user/list','_init','_threadCommentModel'];_0x1e89=function(){return _0x269c31;};return _0x1e89();}const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2053fe=>(_0x2053fe[_0x2053fe[_0x3dd77d(0x159)]=0x0]=_0x3dd77d(0x159),_0x2053fe[_0x2053fe[_0x3dd77d(0x162)]=0x1]='Solved',_0x2053fe[_0x2053fe[_0x3dd77d(0x170)]=-0x1]=_0x3dd77d(0x170),_0x2053fe))(I||{}),v=(_0x4ae843=>(_0x4ae843[_0x4ae843['Unknown']=0x0]='Unknown',_0x4ae843[_0x4ae843[_0x3dd77d(0x128)]=0x1]=_0x3dd77d(0x128),_0x4ae843[_0x4ae843[_0x3dd77d(0x123)]=0x2]=_0x3dd77d(0x123),_0x4ae843[_0x4ae843['Edit']=0x3]=_0x3dd77d(0x17a),_0x4ae843[_0x4ae843[_0x3dd77d(0x122)]=0x4]=_0x3dd77d(0x122),_0x4ae843[_0x4ae843[_0x3dd77d(0x141)]=0x5]=_0x3dd77d(0x141),_0x4ae843[_0x4ae843[_0x3dd77d(0x170)]=-0x1]=_0x3dd77d(0x170),_0x4ae843))(v||{});const y=_0x2f0f17=>_0x43457f(new Date(+_0x2f0f17))[_0x3dd77d(0x125)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4ddb5b,_0xccccc5)=>{const _0x10e9ab=_0x3dd77d,_0x1a165d=_0x4ddb5b['get'](_0x3d5d34),_0xcf7854=_0x4ddb5b[_0x10e9ab(0x148)](_0x1f3014);_0xccccc5[_0x10e9ab(0x152)](_0x349e45=>{const _0x34b4bf=_0x10e9ab;_0x1a165d[_0x34b4bf(0x132)](_0x349e45)&&_0xccccc5[_0x34b4bf(0x151)](_0x349e45);}),_0xccccc5[_0x10e9ab(0x120)]&&(await _0xcf7854[_0x10e9ab(0x148)](_0x10e9ab(0x17e),{'params':{'userIDs':[..._0xccccc5]}}))[_0x10e9ab(0x155)][_0x10e9ab(0x17b)][_0x10e9ab(0x152)](_0x3895cb=>{_0x3895cb&&_0x1a165d['addUser'](_0x3895cb);});};var K=Object[_0x3dd77d(0x118)],V=(_0x40cbc7,_0x4b7bad,_0x2fdfda,_0x4967aa)=>{for(var _0x377096=_0x4967aa>0x1?void 0x0:_0x4967aa?K(_0x4b7bad,_0x2fdfda):_0x4b7bad,_0x13bc31=_0x40cbc7['length']-0x1,_0xd9cf33;_0x13bc31>=0x0;_0x13bc31--)(_0xd9cf33=_0x40cbc7[_0x13bc31])&&(_0x377096=_0xd9cf33(_0x377096)||_0x377096);return _0x377096;},p=(_0x3be0ac,_0x97a6c8)=>(_0x138439,_0x12093a)=>_0x97a6c8(_0x138439,_0x12093a,_0x3be0ac);let _=class extends _0x7f332d{constructor(_0x21f1aa,_0x561f9e,_0x2ac151,_0x57c3c9){const _0x344410=_0x3dd77d;super(),this['_commentService']=_0x21f1aa,this[_0x344410(0x117)]=_0x561f9e,this[_0x344410(0x11d)]=_0x2ac151,this[_0x344410(0x16d)]=_0x57c3c9,this[_0x344410(0x17f)](),this[_0x344410(0x158)]();}[_0x3dd77d(0x158)](){const _0x2ffb4d=_0x3dd77d;this[_0x2ffb4d(0x160)](this[_0x2ffb4d(0x117)][_0x2ffb4d(0x172)]['pipe'](_0x563c27(0x10))['subscribe'](_0x36ad6f=>{const _0x472c48=_0x2ffb4d,_0x2f332c=new Set();_0x36ad6f['forEach'](_0x31ca8d=>{const _0x40aea2=_0x2bfd;if(_0x31ca8d[_0x40aea2(0x134)]===_0x40aea2(0x17d)){const _0x48fd99=_0x31ca8d[_0x40aea2(0x15c)][_0x40aea2(0x143)];_0x2f332c[_0x40aea2(0x17d)](_0x48fd99);}}),B(this[_0x472c48(0x16d)],_0x2f332c);}));}['_init'](){const _0x34f5c0=_0x3dd77d;this[_0x34f5c0(0x160)](this[_0x34f5c0(0x157)][_0x34f5c0(0x172)][_0x34f5c0(0x13c)](async _0x2094f2=>{const _0x44e3e8=_0x34f5c0;var _0x1e9d05,_0x392cc3,_0x1e22bc,_0x913477;const _0x34e12c=(_0x1e9d05=this[_0x44e3e8(0x117)]['getUnit'](_0x2094f2[_0x44e3e8(0x11c)])[_0x44e3e8(0x135)](_0x55a24b=>_0x55a24b['threadId']===_0x2094f2[_0x44e3e8(0x129)]))==null?void 0x0:_0x1e9d05[_0x44e3e8(0x11f)];if(!_0x34e12c)return;const {unitId:_0x3a6d71,subUnitId:_0x55efa8}=_0x34e12c;switch(_0x2094f2['user']&&this[_0x44e3e8(0x11d)][_0x44e3e8(0x147)](_0x2094f2[_0x44e3e8(0x17c)]),_0x2094f2['type']){case v['Add']:break;case v[_0x44e3e8(0x123)]:{this[_0x44e3e8(0x117)][_0x44e3e8(0x164)](_0x3a6d71,_0x55efa8,{'unitId':_0x3a6d71,'subUnitId':_0x55efa8,'ref':'','id':_0x2094f2[_0x44e3e8(0x163)],'dT':y(+_0x2094f2[_0x44e3e8(0x121)]),'threadId':_0x2094f2[_0x44e3e8(0x129)],'personId':(_0x1e22bc=(_0x392cc3=_0x2094f2['user'])==null?void 0x0:_0x392cc3[_0x44e3e8(0x169)])!=null?_0x1e22bc:_0x2094f2[_0x44e3e8(0x176)],'text':JSON[_0x44e3e8(0x161)](_0x2094f2[_0x44e3e8(0x175)]),'parentId':_0x34e12c['id']});break;}case v['Delete']:{const _0x4f7abb=this[_0x44e3e8(0x117)][_0x44e3e8(0x145)](_0x3a6d71,_0x55efa8,_0x2094f2['replyId']);_0x4f7abb&&_0x4f7abb[_0x44e3e8(0x137)]&&this[_0x44e3e8(0x117)][_0x44e3e8(0x13d)](_0x3a6d71,_0x55efa8,_0x2094f2[_0x44e3e8(0x163)]);break;}case v[_0x44e3e8(0x17a)]:{this[_0x44e3e8(0x117)][_0x44e3e8(0x15d)](_0x3a6d71,_0x55efa8,{'commentId':_0x2094f2[_0x44e3e8(0x163)],'text':JSON[_0x44e3e8(0x161)](_0x2094f2[_0x44e3e8(0x175)])});break;}case v[_0x44e3e8(0x141)]:{const _0x137d90=(_0x913477=this[_0x44e3e8(0x117)][_0x44e3e8(0x12f)](_0x2094f2[_0x44e3e8(0x11c)])['find'](_0x227476=>_0x227476[_0x44e3e8(0x129)]===_0x2094f2['threadId']))==null?void 0x0:_0x913477[_0x44e3e8(0x11f)];_0x137d90&&this['_threadCommentModel'][_0x44e3e8(0x150)](_0x3a6d71,_0x55efa8,_0x137d90['id'],_0x2094f2[_0x44e3e8(0x177)]===I[_0x44e3e8(0x162)]);break;}}}));}};_=V([p(0x0,_0x4f05e2(_0x2d5050)),p(0x1,_0x4f05e2(_0x36aae8)),p(0x2,_0x4f05e2(_0x3d5d34)),p(0x3,_0x4f05e2(_0x3680c0))],_);const z=_0x3dd77d(0x139),O={};var k=Object[_0x3dd77d(0x118)],Q=(_0xa94a29,_0x3451ee,_0x2f4544,_0x51a686)=>{const _0x5d572b=_0x3dd77d;for(var _0x410058=_0x51a686>0x1?void 0x0:_0x51a686?k(_0x3451ee,_0x2f4544):_0x3451ee,_0x8faa7c=_0xa94a29[_0x5d572b(0x13a)]-0x1,_0x13e62c;_0x8faa7c>=0x0;_0x8faa7c--)(_0x13e62c=_0xa94a29[_0x8faa7c])&&(_0x410058=_0x13e62c(_0x410058)||_0x410058);return _0x410058;},b=(_0x2a4db4,_0x2c909f)=>(_0x240f3b,_0x11dcc1)=>_0x2c909f(_0x240f3b,_0x11dcc1,_0x2a4db4);function X(_0x29c0b4,_0x59afcb){const _0x1c112b=_0x3dd77d,_0x4cbee2=_0x29c0b4[_0x1c112b(0x16a)][0x0];return{..._0x59afcb,'id':_0x4cbee2['replyId'],'resolved':_0x29c0b4[_0x1c112b(0x177)]===0x1,'dT':y(_0x4cbee2[_0x1c112b(0x121)]),'personId':_0x4cbee2[_0x1c112b(0x176)],'threadId':_0x4cbee2[_0x1c112b(0x129)]};}function ee(_0x432010,_0x2a5a8b,_0x114b33){const _0x3756f6=_0x3dd77d;var _0x1a7eec,_0x5108dc;if(((_0x5108dc=(_0x1a7eec=_0x432010==null?void 0x0:_0x432010[_0x3756f6(0x16a)])==null?void 0x0:_0x1a7eec['length'])!=null?_0x5108dc:0x0)>0x0){const _0x41d20f=(_0x57eb81,_0xb943f6)=>({'id':_0x57eb81[_0x3756f6(0x163)],'threadId':_0x57eb81['threadId'],'dT':y(_0x57eb81['createTimestamp']),'personId':_0x57eb81[_0x3756f6(0x176)],'resolved':_0x432010[_0x3756f6(0x177)]===I[_0x3756f6(0x162)],'unitId':_0x2a5a8b,'subUnitId':_0x114b33,'text':JSON[_0x3756f6(0x161)](_0x57eb81[_0x3756f6(0x175)]),'parentId':_0xb943f6}),_0xc1d4b1=_0x41d20f(_0x432010['replies'][0x0]);return{..._0xc1d4b1,'children':_0x432010[_0x3756f6(0x16a)][_0x3756f6(0x16b)](0x1)[_0x3756f6(0x136)](_0x49d0f3=>_0x41d20f(_0x49d0f3,_0xc1d4b1['id']))};}return null;}let S=class{constructor(_0x1b0c7a,_0x444f9e,_0x76d0cc){const _0x43bab5=_0x3dd77d;this[_0x43bab5(0x178)]=_0x1b0c7a,this[_0x43bab5(0x11d)]=_0x444f9e,this['_sessionService']=_0x76d0cc;}async[_0x3dd77d(0x164)](_0x1293a9){const _0x1bbf93=_0x3dd77d;var _0x201bf3,_0x1706d8;const {parentId:_0x2f39e6,unitId:_0x37c0ce,text:_0x3bb280,threadId:_0x1352ee}=_0x1293a9,_0x23cfc6=(_0x1706d8=(_0x201bf3=_0x3bb280[_0x1bbf93(0x12a)])==null?void 0x0:_0x201bf3[_0x1bbf93(0x127)](_0x38702d=>_0x38702d['rangeType']===_0x35efce[_0x1bbf93(0x173)])[_0x1bbf93(0x136)](_0x46e58f=>_0x46e58f[_0x1bbf93(0x14e)]))!=null?_0x1706d8:[],_0x1e2473=JSON[_0x1bbf93(0x14c)](_0x3bb280),_0x29f0dd=(await this[_0x1bbf93(0x167)][_0x1bbf93(0x16e)](_0x37c0ce))['getMemberID']();if(_0x2f39e6){const _0x2eaa13={'memberId':_0x29f0dd,'unitId':_0x37c0ce,'content':_0x1e2473,'mention':_0x23cfc6,'threadId':_0x1352ee},_0x2364c5=(await this[_0x1bbf93(0x178)][_0x1bbf93(0x154)](_0x1bbf93(0x15b)+_0x37c0ce+_0x1bbf93(0x12d),{'body':_0x2eaa13}))[_0x1bbf93(0x155)][_0x1bbf93(0x14d)];return{..._0x1293a9,'id':_0x2364c5[_0x1bbf93(0x163)],'dT':_0x43457f(+_0x2364c5[_0x1bbf93(0x121)])[_0x1bbf93(0x125)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2364c5['userId']};}else{const _0x51b561={'memberId':_0x29f0dd,'unitId':_0x37c0ce,'content':_0x1e2473,'mention':_0x23cfc6},_0x486b60=await this[_0x1bbf93(0x178)]['post'](_0x1bbf93(0x15b)+_0x37c0ce+_0x1bbf93(0x15a),{'body':_0x51b561});return X(_0x486b60[_0x1bbf93(0x155)]['comment'],_0x1293a9);}}async['updateComment'](_0x1a8028){const _0x51ca8b=_0x3dd77d;var _0x5ac72c,_0x5c8e05;const {text:_0x130c1b,unitId:_0x4e0d97}=_0x1a8028,_0x1ef336=(_0x5c8e05=(_0x5ac72c=_0x130c1b[_0x51ca8b(0x12a)])==null?void 0x0:_0x5ac72c[_0x51ca8b(0x127)](_0x59362d=>_0x59362d[_0x51ca8b(0x153)]===_0x35efce[_0x51ca8b(0x173)])[_0x51ca8b(0x136)](_0x3ff683=>_0x3ff683[_0x51ca8b(0x14e)]))!=null?_0x5c8e05:[],_0x291629=JSON[_0x51ca8b(0x14c)](_0x130c1b),_0xc4668=_0x1a8028[_0x51ca8b(0x129)],_0x38b43f=_0x1a8028['id'],_0x5a7f68={'memberId':(await this[_0x51ca8b(0x167)][_0x51ca8b(0x16e)](_0x4e0d97))['getMemberID'](),'unitId':_0x4e0d97,'threadId':_0xc4668,'mention':_0x1ef336,'content':_0x291629,'replyId':_0x38b43f},_0x5f51e3=await this[_0x51ca8b(0x178)][_0x51ca8b(0x154)]('/universer-api/comment/unit/'+_0x4e0d97+_0x51ca8b(0x16c),{'body':_0x5a7f68});return!_0x5f51e3[_0x51ca8b(0x155)]['error']||_0x5f51e3[_0x51ca8b(0x155)][_0x51ca8b(0x15e)]['code']===0x1;}async[_0x3dd77d(0x150)](_0x152d59){const _0x568e16=_0x3dd77d,{unitId:_0x525993}=_0x152d59,_0x3c6f10=_0x152d59[_0x568e16(0x129)],_0x22d1dc={'memberId':this[_0x568e16(0x11d)][_0x568e16(0x14a)]()[_0x568e16(0x169)],'unitId':_0x525993,'threadId':_0x3c6f10,'solved':_0x152d59[_0x568e16(0x179)]?I[_0x568e16(0x162)]:I[_0x568e16(0x159)]},_0x2a9dbb=await this[_0x568e16(0x178)][_0x568e16(0x154)]('/universer-api/comment/unit/'+_0x525993+_0x568e16(0x149),{'body':_0x22d1dc});return!_0x2a9dbb[_0x568e16(0x155)]['error']||_0x2a9dbb[_0x568e16(0x155)][_0x568e16(0x15e)][_0x568e16(0x131)]===0x1;}async[_0x3dd77d(0x13d)](_0x319791,_0x312467,_0x379ad4,_0x43daa2){const _0x2f7b20=_0x3dd77d,_0x41f172={'memberId':(await this[_0x2f7b20(0x167)][_0x2f7b20(0x16e)](_0x319791))[_0x2f7b20(0x13f)](),'threadId':_0x379ad4,'replyId':_0x43daa2,'unitId':_0x319791},_0x6b29ec=await this[_0x2f7b20(0x178)]['post']('/universer-api/comment/unit/'+_0x319791+'/delete',{'body':_0x41f172});return!_0x6b29ec['body']['error']||_0x6b29ec['body']['error'][_0x2f7b20(0x131)]===0x1;}async[_0x3dd77d(0x126)](_0x66c7e4,_0x1e2046,_0x2f8fb7){const _0x10899f=_0x3dd77d,_0x56dbaf={'unitId':_0x66c7e4,'threadId':_0x2f8fb7},_0x579f3f=await this[_0x10899f(0x178)]['post'](_0x10899f(0x15b)+_0x66c7e4+'/list',{'body':_0x56dbaf}),_0x597ab0=_0x2f8fb7[_0x10899f(0x136)](_0x4e7862=>ee(_0x579f3f[_0x10899f(0x155)][_0x10899f(0x16f)][_0x4e7862],_0x66c7e4,_0x1e2046))[_0x10899f(0x127)](Boolean);return Object[_0x10899f(0x146)](_0x579f3f['body'][_0x10899f(0x17b)])[_0x10899f(0x152)](_0x58816d=>{const _0xb17968=_0x10899f;this[_0xb17968(0x11d)][_0xb17968(0x147)](_0x58816d);}),_0x597ab0;}[_0x3dd77d(0x168)](_0x3e7ba9){const _0x1a1754=_0x3dd77d;return{'id':_0x3e7ba9['id'],'threadId':_0x3e7ba9[_0x1a1754(0x129)],'ref':_0x3e7ba9[_0x1a1754(0x11e)]};}};S=Q([b(0x0,_0x4f05e2(_0x1f3014)),b(0x1,_0x4f05e2(_0x3d5d34)),b(0x2,_0x4f05e2(_0x39b114))],S);function _0x2bfd(_0x3cd0d8,_0x1d3700){_0x3cd0d8=_0x3cd0d8-0x117;const _0x1e8946=_0x1e89();let _0x2bfd4b=_0x1e8946[_0x3cd0d8];return _0x2bfd4b;}var re=Object[_0x3dd77d(0x118)],te=(_0x3fd5a8,_0x444250,_0x47535b,_0xdbf404)=>{for(var _0x4d35bc=_0xdbf404>0x1?void 0x0:_0xdbf404?re(_0x444250,_0x47535b):_0x444250,_0x53ab7f=_0x3fd5a8['length']-0x1,_0x30b7a0;_0x53ab7f>=0x0;_0x53ab7f--)(_0x30b7a0=_0x3fd5a8[_0x53ab7f])&&(_0x4d35bc=_0x30b7a0(_0x4d35bc)||_0x4d35bc);return _0x4d35bc;},M=(_0xe9a0a4,_0x5f2058)=>(_0x583fb9,_0x377a7d)=>_0x5f2058(_0x583fb9,_0x377a7d,_0xe9a0a4);let f=class extends _0x7f332d{constructor(_0x14f089,_0x252b58){const _0x2df860=_0x3dd77d;super(),this[_0x2df860(0x13b)]=_0x14f089,this[_0x2df860(0x165)]=_0x252b58,this['_initDataSource']();}[_0x3dd77d(0x144)](){const _0x3b0698=_0x3dd77d;this['_threadCommentDataSourceService'][_0x3b0698(0x166)]=this[_0x3b0698(0x165)],this['_threadCommentDataSourceService'][_0x3b0698(0x133)]=!0x1;}};f=te([M(0x0,_0x1b4b76),M(0x1,_0x4f05e2(S))],f);var se=Object[_0x3dd77d(0x130)],oe=Object[_0x3dd77d(0x118)],ne=(_0x420cce,_0x587b85,_0x49b05)=>_0x587b85 in _0x420cce?se(_0x420cce,_0x587b85,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x49b05}):_0x420cce[_0x587b85]=_0x49b05,ie=(_0x255f15,_0x180750,_0x149809,_0x2a5f08)=>{const _0x2b3cab=_0x3dd77d;for(var _0x1c0d60=_0x2a5f08>0x1?void 0x0:_0x2a5f08?oe(_0x180750,_0x149809):_0x180750,_0x33af40=_0x255f15[_0x2b3cab(0x13a)]-0x1,_0x348ca1;_0x33af40>=0x0;_0x33af40--)(_0x348ca1=_0x255f15[_0x33af40])&&(_0x1c0d60=_0x348ca1(_0x1c0d60)||_0x1c0d60);return _0x1c0d60;},N=(_0x49c004,_0x1e8811)=>(_0x7411f6,_0x27b994)=>_0x1e8811(_0x7411f6,_0x27b994,_0x49c004),$=(_0x1d7067,_0x4248c8,_0x1a5a7f)=>ne(_0x1d7067,typeof _0x4248c8!=_0x3dd77d(0x156)?_0x4248c8+'':_0x4248c8,_0x1a5a7f);let g=class extends _0x1dd15c{constructor(_0x578ea7=O,_0x37589a,_0x966b55){const _0x292600=_0x3dd77d;super(),this['_config']=_0x578ea7,this['_injector']=_0x37589a,this[_0x292600(0x12e)]=_0x966b55;const {..._0x287a63}=_0x4c0c14({},O,this['_config']);this[_0x292600(0x12e)][_0x292600(0x12b)](z,_0x287a63);}[_0x3dd77d(0x13e)](){[[S],[f],[_]]['forEach'](_0x4c361c=>{const _0x357086=_0x2bfd;this[_0x357086(0x16d)][_0x357086(0x17d)](_0x4c361c);});}[_0x3dd77d(0x11a)](){const _0x5d875a=_0x3dd77d;this[_0x5d875a(0x16d)][_0x5d875a(0x148)](f),this['_injector'][_0x5d875a(0x148)](_);}};$(g,_0x3dd77d(0x15f),W),$(g,_0x3dd77d(0x134),_0x2910e0[_0x3dd77d(0x14b)]),g=ie([_0x194e0f(_0x3f46b2,_0x5b77bc,_0x51acd4),N(0x1,_0x4f05e2(_0x3680c0)),N(0x2,_0x590cc5)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x48fe2c=_0x331d;(function(_0x304275,_0x2e0c6c){const _0x53dd1b=_0x331d,_0x17d870=_0x304275();while(!![]){try{const _0x68ad7f=-parseInt(_0x53dd1b(0xba))/0x1+parseInt(_0x53dd1b(0x101))/0x2*(-parseInt(_0x53dd1b(0xa1))/0x3)+parseInt(_0x53dd1b(0xa5))/0x4*(parseInt(_0x53dd1b(0xcc))/0x5)+parseInt(_0x53dd1b(0xb7))/0x6*(parseInt(_0x53dd1b(0xfb))/0x7)+-parseInt(_0x53dd1b(0xf2))/0x8*(-parseInt(_0x53dd1b(0xe3))/0x9)+parseInt(_0x53dd1b(0xaa))/0xa+-parseInt(_0x53dd1b(0xac))/0xb;if(_0x68ad7f===_0x2e0c6c)break;else _0x17d870['push'](_0x17d870['shift']());}catch(_0x556b70){_0x17d870['push'](_0x17d870['shift']());}}}(_0x2786,0xc35c6));import{CommentService as _0x5c121d,CollaborationSessionService as _0x147544,UniverCollaborationClientPlugin as _0x167480}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x25820f}from'@univerjs-pro/license';import{dayjs as _0x5195b2,UserManagerService as _0x53574f,Inject as _0x428f3a,Injector as _0x29b08d,Disposable as _0xe221d9,CustomRangeType as _0x3c6003,UniverInstanceType as _0x4bc7a1,DependentOn as _0xdc118a,Plugin as _0x4b70ca,merge as _0x157acd,IConfigService as _0x5e1548}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5995f1}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5b2ea3,IThreadCommentDataSourceService as _0x38d035}from'@univerjs/thread-comment';import{bufferTime as _0x2af66c}from'rxjs';import{HTTPService as _0xa6dc27}from'@univerjs/network';const W=_0x48fe2c(0xed);var I=(_0x266a30=>(_0x266a30[_0x266a30[_0x48fe2c(0xa0)]=0x0]=_0x48fe2c(0xa0),_0x266a30[_0x266a30['Solved']=0x1]=_0x48fe2c(0x100),_0x266a30[_0x266a30[_0x48fe2c(0xa7)]=-0x1]=_0x48fe2c(0xa7),_0x266a30))(I||{}),v=(_0x3e4355=>(_0x3e4355[_0x3e4355[_0x48fe2c(0xc2)]=0x0]=_0x48fe2c(0xc2),_0x3e4355[_0x3e4355['Add']=0x1]='Add',_0x3e4355[_0x3e4355[_0x48fe2c(0xb8)]=0x2]=_0x48fe2c(0xb8),_0x3e4355[_0x3e4355['Edit']=0x3]='Edit',_0x3e4355[_0x3e4355['Delete']=0x4]=_0x48fe2c(0xb0),_0x3e4355[_0x3e4355[_0x48fe2c(0xec)]=0x5]=_0x48fe2c(0xec),_0x3e4355[_0x3e4355['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x3e4355))(v||{});const y=_0x4bc5e4=>_0x5195b2(new Date(+_0x4bc5e4))[_0x48fe2c(0xaf)](_0x48fe2c(0xb4)),B=async(_0x6dc9c8,_0x4964da)=>{const _0x1ba25a=_0x48fe2c,_0x10248a=_0x6dc9c8[_0x1ba25a(0xf0)](_0x53574f),_0x2bcd00=_0x6dc9c8['get'](_0xa6dc27);_0x4964da[_0x1ba25a(0xd1)](_0x240e29=>{const _0x24df96=_0x1ba25a;_0x10248a['getUser'](_0x240e29)&&_0x4964da[_0x24df96(0xe9)](_0x240e29);}),_0x4964da[_0x1ba25a(0xf1)]&&(await _0x2bcd00[_0x1ba25a(0xf0)](_0x1ba25a(0x102),{'params':{'userIDs':[..._0x4964da]}}))['body']['users'][_0x1ba25a(0xd1)](_0x526ae9=>{const _0x56833f=_0x1ba25a;_0x526ae9&&_0x10248a[_0x56833f(0xa2)](_0x526ae9);});};var K=Object[_0x48fe2c(0xa3)],V=(_0x357eef,_0x191289,_0x1b48f1,_0x37ff15)=>{for(var _0x2079ae=_0x37ff15>0x1?void 0x0:_0x37ff15?K(_0x191289,_0x1b48f1):_0x191289,_0x20a4f3=_0x357eef['length']-0x1,_0x2123a2;_0x20a4f3>=0x0;_0x20a4f3--)(_0x2123a2=_0x357eef[_0x20a4f3])&&(_0x2079ae=_0x2123a2(_0x2079ae)||_0x2079ae);return _0x2079ae;},p=(_0x1b0a29,_0x2c76a2)=>(_0x2bb2d7,_0x512358)=>_0x2c76a2(_0x2bb2d7,_0x512358,_0x1b0a29);let _=class extends _0xe221d9{constructor(_0x4ff4cb,_0x2f045e,_0x4e9578,_0x4e2071){const _0x1ea932=_0x48fe2c;super(),this[_0x1ea932(0xe2)]=_0x4ff4cb,this[_0x1ea932(0xbe)]=_0x2f045e,this[_0x1ea932(0xe4)]=_0x4e9578,this[_0x1ea932(0xdc)]=_0x4e2071,this[_0x1ea932(0xc8)](),this[_0x1ea932(0xc1)]();}[_0x48fe2c(0xc1)](){const _0x6ff1b0=_0x48fe2c;this[_0x6ff1b0(0xbd)](this[_0x6ff1b0(0xbe)]['commentUpdate$'][_0x6ff1b0(0xbf)](_0x2af66c(0x10))[_0x6ff1b0(0xd4)](_0x52b3a6=>{const _0x28d66e=_0x6ff1b0,_0x53c34d=new Set();_0x52b3a6['forEach'](_0x451407=>{const _0x10e342=_0x331d;if(_0x451407[_0x10e342(0xb2)]==='add'){const _0x39c55c=_0x451407[_0x10e342(0xfa)][_0x10e342(0xef)];_0x53c34d[_0x10e342(0xe1)](_0x39c55c);}}),B(this[_0x28d66e(0xdc)],_0x53c34d);}));}[_0x48fe2c(0xc8)](){const _0x1d947a=_0x48fe2c;this[_0x1d947a(0xbd)](this[_0x1d947a(0xe2)][_0x1d947a(0xc6)][_0x1d947a(0xd4)](async _0x312552=>{const _0x41bf6a=_0x1d947a;var _0x5933da,_0x1bd47a,_0x2d2caf,_0x2aae63;const _0x3b9dac=(_0x5933da=this[_0x41bf6a(0xbe)][_0x41bf6a(0xc4)](_0x312552[_0x41bf6a(0xb1)])[_0x41bf6a(0x9f)](_0xe9a6d1=>_0xe9a6d1['threadId']===_0x312552[_0x41bf6a(0xab)]))==null?void 0x0:_0x5933da[_0x41bf6a(0xdf)];if(!_0x3b9dac)return;const {unitId:_0x230f03,subUnitId:_0x4242d4}=_0x3b9dac;switch(_0x312552[_0x41bf6a(0xcf)]&&this[_0x41bf6a(0xe4)][_0x41bf6a(0xa2)](_0x312552[_0x41bf6a(0xcf)]),_0x312552[_0x41bf6a(0xb2)]){case v[_0x41bf6a(0xfe)]:break;case v['Reply']:{this['_threadCommentModel'][_0x41bf6a(0xf9)](_0x230f03,_0x4242d4,{'unitId':_0x230f03,'subUnitId':_0x4242d4,'ref':'','id':_0x312552[_0x41bf6a(0xf3)],'dT':y(+_0x312552[_0x41bf6a(0xe6)]),'threadId':_0x312552[_0x41bf6a(0xab)],'personId':(_0x2d2caf=(_0x1bd47a=_0x312552[_0x41bf6a(0xcf)])==null?void 0x0:_0x1bd47a[_0x41bf6a(0xea)])!=null?_0x2d2caf:_0x312552[_0x41bf6a(0xf4)],'text':JSON[_0x41bf6a(0xe8)](_0x312552['content']),'parentId':_0x3b9dac['id']});break;}case v[_0x41bf6a(0xb0)]:{const _0x1a0244=this[_0x41bf6a(0xbe)]['getComment'](_0x230f03,_0x4242d4,_0x312552[_0x41bf6a(0xf3)]);_0x1a0244&&_0x1a0244[_0x41bf6a(0xdb)]&&this[_0x41bf6a(0xbe)][_0x41bf6a(0xca)](_0x230f03,_0x4242d4,_0x312552['replyId']);break;}case v[_0x41bf6a(0xd5)]:{this[_0x41bf6a(0xbe)]['updateComment'](_0x230f03,_0x4242d4,{'commentId':_0x312552[_0x41bf6a(0xf3)],'text':JSON[_0x41bf6a(0xe8)](_0x312552['content'])});break;}case v[_0x41bf6a(0xec)]:{const _0xe12e5d=(_0x2aae63=this[_0x41bf6a(0xbe)]['getUnit'](_0x312552[_0x41bf6a(0xb1)])[_0x41bf6a(0x9f)](_0x129802=>_0x129802[_0x41bf6a(0xab)]===_0x312552[_0x41bf6a(0xab)]))==null?void 0x0:_0x2aae63[_0x41bf6a(0xdf)];_0xe12e5d&&this[_0x41bf6a(0xbe)][_0x41bf6a(0xda)](_0x230f03,_0x4242d4,_0xe12e5d['id'],_0x312552[_0x41bf6a(0xce)]===I[_0x41bf6a(0x100)]);break;}}}));}};_=V([p(0x0,_0x428f3a(_0x5c121d)),p(0x1,_0x428f3a(_0x5b2ea3)),p(0x2,_0x428f3a(_0x53574f)),p(0x3,_0x428f3a(_0x29b08d))],_);const z=_0x48fe2c(0xad),O={};function _0x331d(_0x4bc6b2,_0x45cb30){_0x4bc6b2=_0x4bc6b2-0x9d;const _0x2786b4=_0x2786();let _0x331dbf=_0x2786b4[_0x4bc6b2];return _0x331dbf;}var k=Object['getOwnPropertyDescriptor'],Q=(_0x139968,_0x470422,_0x3837ec,_0x826566)=>{const _0x1f42fd=_0x48fe2c;for(var _0x1c044d=_0x826566>0x1?void 0x0:_0x826566?k(_0x470422,_0x3837ec):_0x470422,_0x21f1e1=_0x139968[_0x1f42fd(0xcb)]-0x1,_0x191a22;_0x21f1e1>=0x0;_0x21f1e1--)(_0x191a22=_0x139968[_0x21f1e1])&&(_0x1c044d=_0x191a22(_0x1c044d)||_0x1c044d);return _0x1c044d;},b=(_0x36adec,_0x3903b4)=>(_0xeef47a,_0x2d48a8)=>_0x3903b4(_0xeef47a,_0x2d48a8,_0x36adec);function X(_0x30d231,_0x668fa0){const _0x3e41c4=_0x48fe2c,_0x419118=_0x30d231['replies'][0x0];return{..._0x668fa0,'id':_0x419118[_0x3e41c4(0xf3)],'resolved':_0x30d231[_0x3e41c4(0xce)]===0x1,'dT':y(_0x419118[_0x3e41c4(0xe6)]),'personId':_0x419118[_0x3e41c4(0xf4)],'threadId':_0x419118['threadId']};}function ee(_0x59ea32,_0xdda6b5,_0x10ccf5){const _0xc8bb0c=_0x48fe2c;var _0x4c05ec,_0xfb3f9c;if(((_0xfb3f9c=(_0x4c05ec=_0x59ea32==null?void 0x0:_0x59ea32['replies'])==null?void 0x0:_0x4c05ec[_0xc8bb0c(0xcb)])!=null?_0xfb3f9c:0x0)>0x0){const _0x41e3f1=(_0x7d6f27,_0x56684d)=>({'id':_0x7d6f27[_0xc8bb0c(0xf3)],'threadId':_0x7d6f27[_0xc8bb0c(0xab)],'dT':y(_0x7d6f27['createTimestamp']),'personId':_0x7d6f27[_0xc8bb0c(0xf4)],'resolved':_0x59ea32['solved']===I['Solved'],'unitId':_0xdda6b5,'subUnitId':_0x10ccf5,'text':JSON[_0xc8bb0c(0xe8)](_0x7d6f27[_0xc8bb0c(0xee)]),'parentId':_0x56684d}),_0x1c71f2=_0x41e3f1(_0x59ea32['replies'][0x0]);return{..._0x1c71f2,'children':_0x59ea32[_0xc8bb0c(0xd2)][_0xc8bb0c(0xb5)](0x1)['map'](_0x546bfa=>_0x41e3f1(_0x546bfa,_0x1c71f2['id']))};}return null;}let S=class{constructor(_0x317e21,_0x511b5e,_0x332787){const _0x2b3bef=_0x48fe2c;this[_0x2b3bef(0xd6)]=_0x317e21,this[_0x2b3bef(0xe4)]=_0x511b5e,this['_sessionService']=_0x332787;}async[_0x48fe2c(0xf9)](_0x1205f3){const _0x3ba5bb=_0x48fe2c;var _0x45718e,_0x1a0f78;const {parentId:_0x54a481,unitId:_0xa5eb06,text:_0x37c887,threadId:_0x2cc036}=_0x1205f3,_0x1b78ee=(_0x1a0f78=(_0x45718e=_0x37c887['customRanges'])==null?void 0x0:_0x45718e['filter'](_0x3dc5a3=>_0x3dc5a3['rangeType']===_0x3c6003[_0x3ba5bb(0xd8)])[_0x3ba5bb(0xd9)](_0x43c6c3=>_0x43c6c3[_0x3ba5bb(0xbb)]))!=null?_0x1a0f78:[],_0x585d95=JSON[_0x3ba5bb(0xfc)](_0x37c887),_0x4c38ac=(await this[_0x3ba5bb(0xff)][_0x3ba5bb(0xb6)](_0xa5eb06))[_0x3ba5bb(0xb3)]();if(_0x54a481){const _0x1fc30c={'memberId':_0x4c38ac,'unitId':_0xa5eb06,'content':_0x585d95,'mention':_0x1b78ee,'threadId':_0x2cc036},_0xfd1c58=(await this[_0x3ba5bb(0xd6)][_0x3ba5bb(0xc3)](_0x3ba5bb(0xd7)+_0xa5eb06+_0x3ba5bb(0xa8),{'body':_0x1fc30c}))[_0x3ba5bb(0xd0)][_0x3ba5bb(0xe0)];return{..._0x1205f3,'id':_0xfd1c58[_0x3ba5bb(0xf3)],'dT':_0x5195b2(+_0xfd1c58['createTimestamp'])[_0x3ba5bb(0xaf)](_0x3ba5bb(0xb4)),'personId':_0xfd1c58[_0x3ba5bb(0xf4)]};}else{const _0x395e9c={'memberId':_0x4c38ac,'unitId':_0xa5eb06,'content':_0x585d95,'mention':_0x1b78ee},_0x5efc40=await this['_httpService'][_0x3ba5bb(0xc3)](_0x3ba5bb(0xd7)+_0xa5eb06+'/add',{'body':_0x395e9c});return X(_0x5efc40[_0x3ba5bb(0xd0)]['comment'],_0x1205f3);}}async[_0x48fe2c(0xc5)](_0x546ec2){const _0x351375=_0x48fe2c;var _0x4f56fa,_0x5dfb48;const {text:_0x406710,unitId:_0x54c53f}=_0x546ec2,_0x274f9e=(_0x5dfb48=(_0x4f56fa=_0x406710['customRanges'])==null?void 0x0:_0x4f56fa[_0x351375(0xa6)](_0x5a5dac=>_0x5a5dac[_0x351375(0xeb)]===_0x3c6003[_0x351375(0xd8)])[_0x351375(0xd9)](_0x3ad921=>_0x3ad921[_0x351375(0xbb)]))!=null?_0x5dfb48:[],_0x402063=JSON['stringify'](_0x406710),_0x780143=_0x546ec2['threadId'],_0x23f0bb=_0x546ec2['id'],_0x3daf9f={'memberId':(await this['_sessionService'][_0x351375(0xb6)](_0x54c53f))[_0x351375(0xb3)](),'unitId':_0x54c53f,'threadId':_0x780143,'mention':_0x274f9e,'content':_0x402063,'replyId':_0x23f0bb},_0x461783=await this['_httpService'][_0x351375(0xc3)](_0x351375(0xd7)+_0x54c53f+'/edit',{'body':_0x3daf9f});return!_0x461783['body'][_0x351375(0xdd)]||_0x461783[_0x351375(0xd0)]['error'][_0x351375(0xb9)]===0x1;}async[_0x48fe2c(0xda)](_0x5980c1){const _0x46ba6d=_0x48fe2c,{unitId:_0x34d77b}=_0x5980c1,_0x161b40=_0x5980c1[_0x46ba6d(0xab)],_0x4cb8e5={'memberId':this[_0x46ba6d(0xe4)][_0x46ba6d(0xa4)]()[_0x46ba6d(0xea)],'unitId':_0x34d77b,'threadId':_0x161b40,'solved':_0x5980c1[_0x46ba6d(0xf8)]?I[_0x46ba6d(0x100)]:I['OpenOrReOpen']},_0x1e49cd=await this[_0x46ba6d(0xd6)][_0x46ba6d(0xc3)](_0x46ba6d(0xd7)+_0x34d77b+_0x46ba6d(0xc0),{'body':_0x4cb8e5});return!_0x1e49cd['body'][_0x46ba6d(0xdd)]||_0x1e49cd['body']['error'][_0x46ba6d(0xb9)]===0x1;}async[_0x48fe2c(0xca)](_0x1697cd,_0x54b36e,_0x5f3543,_0x2a2357){const _0x452c67=_0x48fe2c,_0x5d3ca7={'memberId':(await this[_0x452c67(0xff)][_0x452c67(0xb6)](_0x1697cd))['getMemberID'](),'threadId':_0x5f3543,'replyId':_0x2a2357,'unitId':_0x1697cd},_0x39c861=await this[_0x452c67(0xd6)][_0x452c67(0xc3)](_0x452c67(0xd7)+_0x1697cd+_0x452c67(0xa9),{'body':_0x5d3ca7});return!_0x39c861['body'][_0x452c67(0xdd)]||_0x39c861[_0x452c67(0xd0)]['error'][_0x452c67(0xb9)]===0x1;}async[_0x48fe2c(0xc7)](_0x2d80f1,_0x2e281b,_0xf29e7b){const _0x1785ef=_0x48fe2c,_0x3216ea={'unitId':_0x2d80f1,'threadId':_0xf29e7b},_0x5a7728=await this['_httpService']['post'](_0x1785ef(0xd7)+_0x2d80f1+'/list',{'body':_0x3216ea}),_0x331e03=_0xf29e7b['map'](_0x378d28=>ee(_0x5a7728[_0x1785ef(0xd0)]['comments'][_0x378d28],_0x2d80f1,_0x2e281b))[_0x1785ef(0xa6)](Boolean);return Object[_0x1785ef(0xde)](_0x5a7728[_0x1785ef(0xd0)][_0x1785ef(0xc9)])[_0x1785ef(0xd1)](_0x1ace91=>{const _0x5f48e4=_0x1785ef;this[_0x5f48e4(0xe4)][_0x5f48e4(0xa2)](_0x1ace91);}),_0x331e03;}['saveCommentToSnapshot'](_0x4cc305){const _0x5874fb=_0x48fe2c;return{'id':_0x4cc305['id'],'threadId':_0x4cc305[_0x5874fb(0xab)],'ref':_0x4cc305['ref']};}};S=Q([b(0x0,_0x428f3a(_0xa6dc27)),b(0x1,_0x428f3a(_0x53574f)),b(0x2,_0x428f3a(_0x147544))],S);function _0x2786(){const _0x45299d=['onReady','createTimestamp','syncUpdateMutationToColla','parse','delete','userID','rangeType','Solve','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','content','personId','get','size','70496CknnQN','replyId','userId','dataSource','pluginName','defineProperty','resolved','addComment','payload','282856xaBObW','stringify','_threadCommentDataSourceService','Add','_sessionService','Solved','2036bIFbsR','/universer-api/user/list','onStarting','UNIVER_UNKNOWN','find','OpenOrReOpen','933lYrrhG','addUser','getOwnPropertyDescriptor','getCurrentUser','2280OpjCZd','filter','UNRECOGNIZED','/reply','/delete','13850950wheMvX','threadId','3712808tbxHvx','thread-comment-data-source.config','_initDataSource','format','Delete','unitId','type','getMemberID','YYYY/MM/DD\x20HH:mm','slice','requireSession','6PXJwxv','Reply','code','1595405LKxwKH','rangeId','_configService','disposeWithMe','_threadCommentModel','pipe','/solved','_initUserSync','Unknown','post','getUnit','updateComment','commentUpdate$','listComments','_init','users','deleteComment','length','875SFjHxl','symbol','solved','user','body','forEach','replies','_config','subscribe','Edit','_httpService','/universer-api/comment/unit/','COMMENT','map','resolveComment','parentId','_injector','error','values','root','reply','add','_commentService','1557DOQOZp','_userService'];_0x2786=function(){return _0x45299d;};return _0x2786();}var re=Object['getOwnPropertyDescriptor'],te=(_0x11e342,_0x147bec,_0x3835ce,_0x4553a7)=>{const _0x3fc310=_0x48fe2c;for(var _0x5612a5=_0x4553a7>0x1?void 0x0:_0x4553a7?re(_0x147bec,_0x3835ce):_0x147bec,_0x4f0f61=_0x11e342[_0x3fc310(0xcb)]-0x1,_0x2b2bf6;_0x4f0f61>=0x0;_0x4f0f61--)(_0x2b2bf6=_0x11e342[_0x4f0f61])&&(_0x5612a5=_0x2b2bf6(_0x5612a5)||_0x5612a5);return _0x5612a5;},M=(_0x4b8006,_0x39bdd9)=>(_0x352980,_0x4c7fac)=>_0x39bdd9(_0x352980,_0x4c7fac,_0x4b8006);let f=class extends _0xe221d9{constructor(_0x1af98d,_0x3ebeef){const _0x3a67f2=_0x48fe2c;super(),this[_0x3a67f2(0xfd)]=_0x1af98d,this['_threadCommentDataSource']=_0x3ebeef,this[_0x3a67f2(0xae)]();}['_initDataSource'](){const _0xa271fa=_0x48fe2c;this['_threadCommentDataSourceService'][_0xa271fa(0xf5)]=this['_threadCommentDataSource'],this[_0xa271fa(0xfd)][_0xa271fa(0xe7)]=!0x1;}};f=te([M(0x0,_0x38d035),M(0x1,_0x428f3a(S))],f);var se=Object[_0x48fe2c(0xf7)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1bedea,_0x573693,_0x2a7bc3)=>_0x573693 in _0x1bedea?se(_0x1bedea,_0x573693,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2a7bc3}):_0x1bedea[_0x573693]=_0x2a7bc3,ie=(_0x463889,_0x1fa58d,_0x3a106a,_0x1da43e)=>{const _0x43c352=_0x48fe2c;for(var _0x4c8874=_0x1da43e>0x1?void 0x0:_0x1da43e?oe(_0x1fa58d,_0x3a106a):_0x1fa58d,_0x4de60a=_0x463889[_0x43c352(0xcb)]-0x1,_0x8b2b3a;_0x4de60a>=0x0;_0x4de60a--)(_0x8b2b3a=_0x463889[_0x4de60a])&&(_0x4c8874=_0x8b2b3a(_0x4c8874)||_0x4c8874);return _0x4c8874;},N=(_0xa95b56,_0x51f282)=>(_0x9be76c,_0x783e9b)=>_0x51f282(_0x9be76c,_0x783e9b,_0xa95b56),$=(_0x557a2e,_0x398208,_0xf836ae)=>ne(_0x557a2e,typeof _0x398208!=_0x48fe2c(0xcd)?_0x398208+'':_0x398208,_0xf836ae);let g=class extends _0x4b70ca{constructor(_0x54c2f7=O,_0x532645,_0x1e9e98){const _0x30e2cd=_0x48fe2c;super(),this['_config']=_0x54c2f7,this[_0x30e2cd(0xdc)]=_0x532645,this[_0x30e2cd(0xbc)]=_0x1e9e98;const {..._0x2274bf}=_0x157acd({},O,this[_0x30e2cd(0xd3)]);this[_0x30e2cd(0xbc)]['setConfig'](z,_0x2274bf);}[_0x48fe2c(0x9d)](){const _0x179386=_0x48fe2c;[[S],[f],[_]][_0x179386(0xd1)](_0x3344d6=>{const _0x2e55d4=_0x179386;this[_0x2e55d4(0xdc)][_0x2e55d4(0xe1)](_0x3344d6);});}[_0x48fe2c(0xe5)](){const _0x39a128=_0x48fe2c;this[_0x39a128(0xdc)]['get'](f),this[_0x39a128(0xdc)][_0x39a128(0xf0)](_);}};$(g,_0x48fe2c(0xf6),W),$(g,_0x48fe2c(0xb2),_0x4bc7a1[_0x48fe2c(0x9e)]),g=ie([_0xdc118a(_0x5995f1,_0x167480,_0x25820f),N(0x1,_0x428f3a(_0x29b08d)),N(0x2,_0x5e1548)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3dd77d=_0x2bfd;(function(_0x3e57bc,_0x12a729){const _0x2461c3=_0x2bfd,_0x32b35d=_0x3e57bc();while(!![]){try{const _0x8b4547=parseInt(_0x2461c3(0x142))/0x1*(-parseInt(_0x2461c3(0x124))/0x2)+-parseInt(_0x2461c3(0x11b))/0x3+parseInt(_0x2461c3(0x140))/0x4+parseInt(_0x2461c3(0x12c))/0x5+-parseInt(_0x2461c3(0x171))/0x6*(parseInt(_0x2461c3(0x14f))/0x7)+parseInt(_0x2461c3(0x138))/0x8+parseInt(_0x2461c3(0x174))/0x9*(parseInt(_0x2461c3(0x119))/0xa);if(_0x8b4547===_0x12a729)break;else _0x32b35d['push'](_0x32b35d['shift']());}catch(_0x39c403){_0x32b35d['push'](_0x32b35d['shift']());}}}(_0x1e89,0x9b41f));import{CommentService as _0x2d5050,CollaborationSessionService as _0x39b114,UniverCollaborationClientPlugin as _0x5b77bc}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x51acd4}from'@univerjs-pro/license';import{dayjs as _0x43457f,UserManagerService as _0x3d5d34,Inject as _0x4f05e2,Injector as _0x3680c0,Disposable as _0x7f332d,CustomRangeType as _0x35efce,UniverInstanceType as _0x2910e0,DependentOn as _0x194e0f,Plugin as _0x1dd15c,merge as _0x4c0c14,IConfigService as _0x590cc5}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3f46b2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x36aae8,IThreadCommentDataSourceService as _0x1b4b76}from'@univerjs/thread-comment';import{bufferTime as _0x563c27}from'rxjs';import{HTTPService as _0x1f3014}from'@univerjs/network';function _0x1e89(){const _0x269c31=['getOwnPropertyDescriptor','10bvUonc','onReady','2660865YSPQqH','unitId','_userService','ref','root','size','createTimestamp','Delete','Reply','332246sIRBqb','format','listComments','filter','Add','threadId','customRanges','setConfig','3188165gEzerd','/reply','_configService','getUnit','defineProperty','code','getUser','syncUpdateMutationToColla','type','find','map','parentId','9698448zpcYMD','thread-comment-data-source.config','length','_threadCommentDataSourceService','subscribe','deleteComment','onStarting','getMemberID','2912432xSObrW','Solve','7AKkFFQ','personId','_initDataSource','getComment','values','addUser','get','/solved','getCurrentUser','UNIVER_UNKNOWN','stringify','reply','rangeId','7MlBJmP','resolveComment','delete','forEach','rangeType','post','body','symbol','_commentService','_initUserSync','OpenOrReOpen','/add','/universer-api/comment/unit/','payload','updateComment','error','pluginName','disposeWithMe','parse','Solved','replyId','addComment','_threadCommentDataSource','dataSource','_sessionService','saveCommentToSnapshot','userID','replies','slice','/edit','_injector','requireSession','comments','UNRECOGNIZED','7437138JUUaEu','commentUpdate$','COMMENT','12125043DdGJCy','content','userId','solved','_httpService','resolved','Edit','users','user','add','/universer-api/user/list','_init','_threadCommentModel'];_0x1e89=function(){return _0x269c31;};return _0x1e89();}const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2053fe=>(_0x2053fe[_0x2053fe[_0x3dd77d(0x159)]=0x0]=_0x3dd77d(0x159),_0x2053fe[_0x2053fe[_0x3dd77d(0x162)]=0x1]='Solved',_0x2053fe[_0x2053fe[_0x3dd77d(0x170)]=-0x1]=_0x3dd77d(0x170),_0x2053fe))(I||{}),v=(_0x4ae843=>(_0x4ae843[_0x4ae843['Unknown']=0x0]='Unknown',_0x4ae843[_0x4ae843[_0x3dd77d(0x128)]=0x1]=_0x3dd77d(0x128),_0x4ae843[_0x4ae843[_0x3dd77d(0x123)]=0x2]=_0x3dd77d(0x123),_0x4ae843[_0x4ae843['Edit']=0x3]=_0x3dd77d(0x17a),_0x4ae843[_0x4ae843[_0x3dd77d(0x122)]=0x4]=_0x3dd77d(0x122),_0x4ae843[_0x4ae843[_0x3dd77d(0x141)]=0x5]=_0x3dd77d(0x141),_0x4ae843[_0x4ae843[_0x3dd77d(0x170)]=-0x1]=_0x3dd77d(0x170),_0x4ae843))(v||{});const y=_0x2f0f17=>_0x43457f(new Date(+_0x2f0f17))[_0x3dd77d(0x125)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4ddb5b,_0xccccc5)=>{const _0x10e9ab=_0x3dd77d,_0x1a165d=_0x4ddb5b['get'](_0x3d5d34),_0xcf7854=_0x4ddb5b[_0x10e9ab(0x148)](_0x1f3014);_0xccccc5[_0x10e9ab(0x152)](_0x349e45=>{const _0x34b4bf=_0x10e9ab;_0x1a165d[_0x34b4bf(0x132)](_0x349e45)&&_0xccccc5[_0x34b4bf(0x151)](_0x349e45);}),_0xccccc5[_0x10e9ab(0x120)]&&(await _0xcf7854[_0x10e9ab(0x148)](_0x10e9ab(0x17e),{'params':{'userIDs':[..._0xccccc5]}}))[_0x10e9ab(0x155)][_0x10e9ab(0x17b)][_0x10e9ab(0x152)](_0x3895cb=>{_0x3895cb&&_0x1a165d['addUser'](_0x3895cb);});};var K=Object[_0x3dd77d(0x118)],V=(_0x40cbc7,_0x4b7bad,_0x2fdfda,_0x4967aa)=>{for(var _0x377096=_0x4967aa>0x1?void 0x0:_0x4967aa?K(_0x4b7bad,_0x2fdfda):_0x4b7bad,_0x13bc31=_0x40cbc7['length']-0x1,_0xd9cf33;_0x13bc31>=0x0;_0x13bc31--)(_0xd9cf33=_0x40cbc7[_0x13bc31])&&(_0x377096=_0xd9cf33(_0x377096)||_0x377096);return _0x377096;},p=(_0x3be0ac,_0x97a6c8)=>(_0x138439,_0x12093a)=>_0x97a6c8(_0x138439,_0x12093a,_0x3be0ac);let _=class extends _0x7f332d{constructor(_0x21f1aa,_0x561f9e,_0x2ac151,_0x57c3c9){const _0x344410=_0x3dd77d;super(),this['_commentService']=_0x21f1aa,this[_0x344410(0x117)]=_0x561f9e,this[_0x344410(0x11d)]=_0x2ac151,this[_0x344410(0x16d)]=_0x57c3c9,this[_0x344410(0x17f)](),this[_0x344410(0x158)]();}[_0x3dd77d(0x158)](){const _0x2ffb4d=_0x3dd77d;this[_0x2ffb4d(0x160)](this[_0x2ffb4d(0x117)][_0x2ffb4d(0x172)]['pipe'](_0x563c27(0x10))['subscribe'](_0x36ad6f=>{const _0x472c48=_0x2ffb4d,_0x2f332c=new Set();_0x36ad6f['forEach'](_0x31ca8d=>{const _0x40aea2=_0x2bfd;if(_0x31ca8d[_0x40aea2(0x134)]===_0x40aea2(0x17d)){const _0x48fd99=_0x31ca8d[_0x40aea2(0x15c)][_0x40aea2(0x143)];_0x2f332c[_0x40aea2(0x17d)](_0x48fd99);}}),B(this[_0x472c48(0x16d)],_0x2f332c);}));}['_init'](){const _0x34f5c0=_0x3dd77d;this[_0x34f5c0(0x160)](this[_0x34f5c0(0x157)][_0x34f5c0(0x172)][_0x34f5c0(0x13c)](async _0x2094f2=>{const _0x44e3e8=_0x34f5c0;var _0x1e9d05,_0x392cc3,_0x1e22bc,_0x913477;const _0x34e12c=(_0x1e9d05=this[_0x44e3e8(0x117)]['getUnit'](_0x2094f2[_0x44e3e8(0x11c)])[_0x44e3e8(0x135)](_0x55a24b=>_0x55a24b['threadId']===_0x2094f2[_0x44e3e8(0x129)]))==null?void 0x0:_0x1e9d05[_0x44e3e8(0x11f)];if(!_0x34e12c)return;const {unitId:_0x3a6d71,subUnitId:_0x55efa8}=_0x34e12c;switch(_0x2094f2['user']&&this[_0x44e3e8(0x11d)][_0x44e3e8(0x147)](_0x2094f2[_0x44e3e8(0x17c)]),_0x2094f2['type']){case v['Add']:break;case v[_0x44e3e8(0x123)]:{this[_0x44e3e8(0x117)][_0x44e3e8(0x164)](_0x3a6d71,_0x55efa8,{'unitId':_0x3a6d71,'subUnitId':_0x55efa8,'ref':'','id':_0x2094f2[_0x44e3e8(0x163)],'dT':y(+_0x2094f2[_0x44e3e8(0x121)]),'threadId':_0x2094f2[_0x44e3e8(0x129)],'personId':(_0x1e22bc=(_0x392cc3=_0x2094f2['user'])==null?void 0x0:_0x392cc3[_0x44e3e8(0x169)])!=null?_0x1e22bc:_0x2094f2[_0x44e3e8(0x176)],'text':JSON[_0x44e3e8(0x161)](_0x2094f2[_0x44e3e8(0x175)]),'parentId':_0x34e12c['id']});break;}case v['Delete']:{const _0x4f7abb=this[_0x44e3e8(0x117)][_0x44e3e8(0x145)](_0x3a6d71,_0x55efa8,_0x2094f2['replyId']);_0x4f7abb&&_0x4f7abb[_0x44e3e8(0x137)]&&this[_0x44e3e8(0x117)][_0x44e3e8(0x13d)](_0x3a6d71,_0x55efa8,_0x2094f2[_0x44e3e8(0x163)]);break;}case v[_0x44e3e8(0x17a)]:{this[_0x44e3e8(0x117)][_0x44e3e8(0x15d)](_0x3a6d71,_0x55efa8,{'commentId':_0x2094f2[_0x44e3e8(0x163)],'text':JSON[_0x44e3e8(0x161)](_0x2094f2[_0x44e3e8(0x175)])});break;}case v[_0x44e3e8(0x141)]:{const _0x137d90=(_0x913477=this[_0x44e3e8(0x117)][_0x44e3e8(0x12f)](_0x2094f2[_0x44e3e8(0x11c)])['find'](_0x227476=>_0x227476[_0x44e3e8(0x129)]===_0x2094f2['threadId']))==null?void 0x0:_0x913477[_0x44e3e8(0x11f)];_0x137d90&&this['_threadCommentModel'][_0x44e3e8(0x150)](_0x3a6d71,_0x55efa8,_0x137d90['id'],_0x2094f2[_0x44e3e8(0x177)]===I[_0x44e3e8(0x162)]);break;}}}));}};_=V([p(0x0,_0x4f05e2(_0x2d5050)),p(0x1,_0x4f05e2(_0x36aae8)),p(0x2,_0x4f05e2(_0x3d5d34)),p(0x3,_0x4f05e2(_0x3680c0))],_);const z=_0x3dd77d(0x139),O={};var k=Object[_0x3dd77d(0x118)],Q=(_0xa94a29,_0x3451ee,_0x2f4544,_0x51a686)=>{const _0x5d572b=_0x3dd77d;for(var _0x410058=_0x51a686>0x1?void 0x0:_0x51a686?k(_0x3451ee,_0x2f4544):_0x3451ee,_0x8faa7c=_0xa94a29[_0x5d572b(0x13a)]-0x1,_0x13e62c;_0x8faa7c>=0x0;_0x8faa7c--)(_0x13e62c=_0xa94a29[_0x8faa7c])&&(_0x410058=_0x13e62c(_0x410058)||_0x410058);return _0x410058;},b=(_0x2a4db4,_0x2c909f)=>(_0x240f3b,_0x11dcc1)=>_0x2c909f(_0x240f3b,_0x11dcc1,_0x2a4db4);function X(_0x29c0b4,_0x59afcb){const _0x1c112b=_0x3dd77d,_0x4cbee2=_0x29c0b4[_0x1c112b(0x16a)][0x0];return{..._0x59afcb,'id':_0x4cbee2['replyId'],'resolved':_0x29c0b4[_0x1c112b(0x177)]===0x1,'dT':y(_0x4cbee2[_0x1c112b(0x121)]),'personId':_0x4cbee2[_0x1c112b(0x176)],'threadId':_0x4cbee2[_0x1c112b(0x129)]};}function ee(_0x432010,_0x2a5a8b,_0x114b33){const _0x3756f6=_0x3dd77d;var _0x1a7eec,_0x5108dc;if(((_0x5108dc=(_0x1a7eec=_0x432010==null?void 0x0:_0x432010[_0x3756f6(0x16a)])==null?void 0x0:_0x1a7eec['length'])!=null?_0x5108dc:0x0)>0x0){const _0x41d20f=(_0x57eb81,_0xb943f6)=>({'id':_0x57eb81[_0x3756f6(0x163)],'threadId':_0x57eb81['threadId'],'dT':y(_0x57eb81['createTimestamp']),'personId':_0x57eb81[_0x3756f6(0x176)],'resolved':_0x432010[_0x3756f6(0x177)]===I[_0x3756f6(0x162)],'unitId':_0x2a5a8b,'subUnitId':_0x114b33,'text':JSON[_0x3756f6(0x161)](_0x57eb81[_0x3756f6(0x175)]),'parentId':_0xb943f6}),_0xc1d4b1=_0x41d20f(_0x432010['replies'][0x0]);return{..._0xc1d4b1,'children':_0x432010[_0x3756f6(0x16a)][_0x3756f6(0x16b)](0x1)[_0x3756f6(0x136)](_0x49d0f3=>_0x41d20f(_0x49d0f3,_0xc1d4b1['id']))};}return null;}let S=class{constructor(_0x1b0c7a,_0x444f9e,_0x76d0cc){const _0x43bab5=_0x3dd77d;this[_0x43bab5(0x178)]=_0x1b0c7a,this[_0x43bab5(0x11d)]=_0x444f9e,this['_sessionService']=_0x76d0cc;}async[_0x3dd77d(0x164)](_0x1293a9){const _0x1bbf93=_0x3dd77d;var _0x201bf3,_0x1706d8;const {parentId:_0x2f39e6,unitId:_0x37c0ce,text:_0x3bb280,threadId:_0x1352ee}=_0x1293a9,_0x23cfc6=(_0x1706d8=(_0x201bf3=_0x3bb280[_0x1bbf93(0x12a)])==null?void 0x0:_0x201bf3[_0x1bbf93(0x127)](_0x38702d=>_0x38702d['rangeType']===_0x35efce[_0x1bbf93(0x173)])[_0x1bbf93(0x136)](_0x46e58f=>_0x46e58f[_0x1bbf93(0x14e)]))!=null?_0x1706d8:[],_0x1e2473=JSON[_0x1bbf93(0x14c)](_0x3bb280),_0x29f0dd=(await this[_0x1bbf93(0x167)][_0x1bbf93(0x16e)](_0x37c0ce))['getMemberID']();if(_0x2f39e6){const _0x2eaa13={'memberId':_0x29f0dd,'unitId':_0x37c0ce,'content':_0x1e2473,'mention':_0x23cfc6,'threadId':_0x1352ee},_0x2364c5=(await this[_0x1bbf93(0x178)][_0x1bbf93(0x154)](_0x1bbf93(0x15b)+_0x37c0ce+_0x1bbf93(0x12d),{'body':_0x2eaa13}))[_0x1bbf93(0x155)][_0x1bbf93(0x14d)];return{..._0x1293a9,'id':_0x2364c5[_0x1bbf93(0x163)],'dT':_0x43457f(+_0x2364c5[_0x1bbf93(0x121)])[_0x1bbf93(0x125)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2364c5['userId']};}else{const _0x51b561={'memberId':_0x29f0dd,'unitId':_0x37c0ce,'content':_0x1e2473,'mention':_0x23cfc6},_0x486b60=await this[_0x1bbf93(0x178)]['post'](_0x1bbf93(0x15b)+_0x37c0ce+_0x1bbf93(0x15a),{'body':_0x51b561});return X(_0x486b60[_0x1bbf93(0x155)]['comment'],_0x1293a9);}}async['updateComment'](_0x1a8028){const _0x51ca8b=_0x3dd77d;var _0x5ac72c,_0x5c8e05;const {text:_0x130c1b,unitId:_0x4e0d97}=_0x1a8028,_0x1ef336=(_0x5c8e05=(_0x5ac72c=_0x130c1b[_0x51ca8b(0x12a)])==null?void 0x0:_0x5ac72c[_0x51ca8b(0x127)](_0x59362d=>_0x59362d[_0x51ca8b(0x153)]===_0x35efce[_0x51ca8b(0x173)])[_0x51ca8b(0x136)](_0x3ff683=>_0x3ff683[_0x51ca8b(0x14e)]))!=null?_0x5c8e05:[],_0x291629=JSON[_0x51ca8b(0x14c)](_0x130c1b),_0xc4668=_0x1a8028[_0x51ca8b(0x129)],_0x38b43f=_0x1a8028['id'],_0x5a7f68={'memberId':(await this[_0x51ca8b(0x167)][_0x51ca8b(0x16e)](_0x4e0d97))['getMemberID'](),'unitId':_0x4e0d97,'threadId':_0xc4668,'mention':_0x1ef336,'content':_0x291629,'replyId':_0x38b43f},_0x5f51e3=await this[_0x51ca8b(0x178)][_0x51ca8b(0x154)]('/universer-api/comment/unit/'+_0x4e0d97+_0x51ca8b(0x16c),{'body':_0x5a7f68});return!_0x5f51e3[_0x51ca8b(0x155)]['error']||_0x5f51e3[_0x51ca8b(0x155)][_0x51ca8b(0x15e)]['code']===0x1;}async[_0x3dd77d(0x150)](_0x152d59){const _0x568e16=_0x3dd77d,{unitId:_0x525993}=_0x152d59,_0x3c6f10=_0x152d59[_0x568e16(0x129)],_0x22d1dc={'memberId':this[_0x568e16(0x11d)][_0x568e16(0x14a)]()[_0x568e16(0x169)],'unitId':_0x525993,'threadId':_0x3c6f10,'solved':_0x152d59[_0x568e16(0x179)]?I[_0x568e16(0x162)]:I[_0x568e16(0x159)]},_0x2a9dbb=await this[_0x568e16(0x178)][_0x568e16(0x154)]('/universer-api/comment/unit/'+_0x525993+_0x568e16(0x149),{'body':_0x22d1dc});return!_0x2a9dbb[_0x568e16(0x155)]['error']||_0x2a9dbb[_0x568e16(0x155)][_0x568e16(0x15e)][_0x568e16(0x131)]===0x1;}async[_0x3dd77d(0x13d)](_0x319791,_0x312467,_0x379ad4,_0x43daa2){const _0x2f7b20=_0x3dd77d,_0x41f172={'memberId':(await this[_0x2f7b20(0x167)][_0x2f7b20(0x16e)](_0x319791))[_0x2f7b20(0x13f)](),'threadId':_0x379ad4,'replyId':_0x43daa2,'unitId':_0x319791},_0x6b29ec=await this[_0x2f7b20(0x178)]['post']('/universer-api/comment/unit/'+_0x319791+'/delete',{'body':_0x41f172});return!_0x6b29ec['body']['error']||_0x6b29ec['body']['error'][_0x2f7b20(0x131)]===0x1;}async[_0x3dd77d(0x126)](_0x66c7e4,_0x1e2046,_0x2f8fb7){const _0x10899f=_0x3dd77d,_0x56dbaf={'unitId':_0x66c7e4,'threadId':_0x2f8fb7},_0x579f3f=await this[_0x10899f(0x178)]['post'](_0x10899f(0x15b)+_0x66c7e4+'/list',{'body':_0x56dbaf}),_0x597ab0=_0x2f8fb7[_0x10899f(0x136)](_0x4e7862=>ee(_0x579f3f[_0x10899f(0x155)][_0x10899f(0x16f)][_0x4e7862],_0x66c7e4,_0x1e2046))[_0x10899f(0x127)](Boolean);return Object[_0x10899f(0x146)](_0x579f3f['body'][_0x10899f(0x17b)])[_0x10899f(0x152)](_0x58816d=>{const _0xb17968=_0x10899f;this[_0xb17968(0x11d)][_0xb17968(0x147)](_0x58816d);}),_0x597ab0;}[_0x3dd77d(0x168)](_0x3e7ba9){const _0x1a1754=_0x3dd77d;return{'id':_0x3e7ba9['id'],'threadId':_0x3e7ba9[_0x1a1754(0x129)],'ref':_0x3e7ba9[_0x1a1754(0x11e)]};}};S=Q([b(0x0,_0x4f05e2(_0x1f3014)),b(0x1,_0x4f05e2(_0x3d5d34)),b(0x2,_0x4f05e2(_0x39b114))],S);function _0x2bfd(_0x3cd0d8,_0x1d3700){_0x3cd0d8=_0x3cd0d8-0x117;const _0x1e8946=_0x1e89();let _0x2bfd4b=_0x1e8946[_0x3cd0d8];return _0x2bfd4b;}var re=Object[_0x3dd77d(0x118)],te=(_0x3fd5a8,_0x444250,_0x47535b,_0xdbf404)=>{for(var _0x4d35bc=_0xdbf404>0x1?void 0x0:_0xdbf404?re(_0x444250,_0x47535b):_0x444250,_0x53ab7f=_0x3fd5a8['length']-0x1,_0x30b7a0;_0x53ab7f>=0x0;_0x53ab7f--)(_0x30b7a0=_0x3fd5a8[_0x53ab7f])&&(_0x4d35bc=_0x30b7a0(_0x4d35bc)||_0x4d35bc);return _0x4d35bc;},M=(_0xe9a0a4,_0x5f2058)=>(_0x583fb9,_0x377a7d)=>_0x5f2058(_0x583fb9,_0x377a7d,_0xe9a0a4);let f=class extends _0x7f332d{constructor(_0x14f089,_0x252b58){const _0x2df860=_0x3dd77d;super(),this[_0x2df860(0x13b)]=_0x14f089,this[_0x2df860(0x165)]=_0x252b58,this['_initDataSource']();}[_0x3dd77d(0x144)](){const _0x3b0698=_0x3dd77d;this['_threadCommentDataSourceService'][_0x3b0698(0x166)]=this[_0x3b0698(0x165)],this['_threadCommentDataSourceService'][_0x3b0698(0x133)]=!0x1;}};f=te([M(0x0,_0x1b4b76),M(0x1,_0x4f05e2(S))],f);var se=Object[_0x3dd77d(0x130)],oe=Object[_0x3dd77d(0x118)],ne=(_0x420cce,_0x587b85,_0x49b05)=>_0x587b85 in _0x420cce?se(_0x420cce,_0x587b85,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x49b05}):_0x420cce[_0x587b85]=_0x49b05,ie=(_0x255f15,_0x180750,_0x149809,_0x2a5f08)=>{const _0x2b3cab=_0x3dd77d;for(var _0x1c0d60=_0x2a5f08>0x1?void 0x0:_0x2a5f08?oe(_0x180750,_0x149809):_0x180750,_0x33af40=_0x255f15[_0x2b3cab(0x13a)]-0x1,_0x348ca1;_0x33af40>=0x0;_0x33af40--)(_0x348ca1=_0x255f15[_0x33af40])&&(_0x1c0d60=_0x348ca1(_0x1c0d60)||_0x1c0d60);return _0x1c0d60;},N=(_0x49c004,_0x1e8811)=>(_0x7411f6,_0x27b994)=>_0x1e8811(_0x7411f6,_0x27b994,_0x49c004),$=(_0x1d7067,_0x4248c8,_0x1a5a7f)=>ne(_0x1d7067,typeof _0x4248c8!=_0x3dd77d(0x156)?_0x4248c8+'':_0x4248c8,_0x1a5a7f);let g=class extends _0x1dd15c{constructor(_0x578ea7=O,_0x37589a,_0x966b55){const _0x292600=_0x3dd77d;super(),this['_config']=_0x578ea7,this['_injector']=_0x37589a,this[_0x292600(0x12e)]=_0x966b55;const {..._0x287a63}=_0x4c0c14({},O,this['_config']);this[_0x292600(0x12e)][_0x292600(0x12b)](z,_0x287a63);}[_0x3dd77d(0x13e)](){[[S],[f],[_]]['forEach'](_0x4c361c=>{const _0x357086=_0x2bfd;this[_0x357086(0x16d)][_0x357086(0x17d)](_0x4c361c);});}[_0x3dd77d(0x11a)](){const _0x5d875a=_0x3dd77d;this[_0x5d875a(0x16d)][_0x5d875a(0x148)](f),this['_injector'][_0x5d875a(0x148)](_);}};$(g,_0x3dd77d(0x15f),W),$(g,_0x3dd77d(0x134),_0x2910e0[_0x3dd77d(0x14b)]),g=ie([_0x194e0f(_0x3f46b2,_0x5b77bc,_0x51acd4),N(0x1,_0x4f05e2(_0x3680c0)),N(0x2,_0x590cc5)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0xc58f(_0x419dc4,_0x31a11c){_0x419dc4=_0x419dc4-0xc6;const _0x7464bc=_0x7464();let _0xc58fd5=_0x7464bc[_0x419dc4];return _0xc58fd5;}(function(_0x116b11,_0x1f4e16){const _0x36ab84=_0xc58f,_0x460837=_0x116b11();while(!![]){try{const _0x37f8f3=parseInt(_0x36ab84(0x108))/0x1*(parseInt(_0x36ab84(0x105))/0x2)+parseInt(_0x36ab84(0xff))/0x3+-parseInt(_0x36ab84(0x121))/0x4+-parseInt(_0x36ab84(0x13b))/0x5*(parseInt(_0x36ab84(0xd9))/0x6)+parseInt(_0x36ab84(0xd8))/0x7+-parseInt(_0x36ab84(0x138))/0x8*(-parseInt(_0x36ab84(0xe9))/0x9)+-parseInt(_0x36ab84(0xfd))/0xa;if(_0x37f8f3===_0x1f4e16)break;else _0x460837['push'](_0x460837['shift']());}catch(_0x213760){_0x460837['push'](_0x460837['shift']());}}}(_0x7464,0x364cb),function(_0x578ba9,_0x568c19){const _0x1ae1c6=_0xc58f;typeof exports==_0x1ae1c6(0xfb)&&typeof module<'u'?_0x568c19(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==_0x1ae1c6(0x151)&&define['amd']?define(['exports','@univerjs-pro/collaboration-client',_0x1ae1c6(0x139),_0x1ae1c6(0x13e),_0x1ae1c6(0x14d),'@univerjs/thread-comment',_0x1ae1c6(0xfe),_0x1ae1c6(0x126)],_0x568c19):(_0x578ba9=typeof globalThis<'u'?globalThis:_0x578ba9||self,_0x568c19(_0x578ba9[_0x1ae1c6(0xd2)]={},_0x578ba9[_0x1ae1c6(0xc9)],_0x578ba9['UniverProLicense'],_0x578ba9[_0x1ae1c6(0x128)],_0x578ba9[_0x1ae1c6(0xfa)],_0x578ba9[_0x1ae1c6(0x10a)],_0x578ba9['rxjs'],_0x578ba9[_0x1ae1c6(0x141)]));}(this,function(_0x3041a1,_0x1c91d7,_0x3db020,_0x3e4368,_0x2c2f02,_0x39bcb2,_0x4b9f61,_0x567a93){'use strict';const _0x307b38=_0xc58f;const _0x3fc2ff=_0x307b38(0x142);var _0x1b8961=(_0x509cca=>(_0x509cca[_0x509cca[_0x307b38(0xf2)]=0x0]='OpenOrReOpen',_0x509cca[_0x509cca[_0x307b38(0x10f)]=0x1]=_0x307b38(0x10f),_0x509cca[_0x509cca[_0x307b38(0xe7)]=-0x1]=_0x307b38(0xe7),_0x509cca))(_0x1b8961||{}),_0x222735=(_0x8af110=>(_0x8af110[_0x8af110[_0x307b38(0xcc)]=0x0]=_0x307b38(0xcc),_0x8af110[_0x8af110[_0x307b38(0x143)]=0x1]=_0x307b38(0x143),_0x8af110[_0x8af110['Reply']=0x2]=_0x307b38(0x124),_0x8af110[_0x8af110['Edit']=0x3]=_0x307b38(0x11a),_0x8af110[_0x8af110[_0x307b38(0x100)]=0x4]=_0x307b38(0x100),_0x8af110[_0x8af110[_0x307b38(0x104)]=0x5]='Solve',_0x8af110[_0x8af110['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x8af110))(_0x222735||{});const _0x16cba7=_0x570103=>_0x3e4368[_0x307b38(0xf6)](new Date(+_0x570103))['format'](_0x307b38(0x110)),_0x41556f=async(_0x3b4318,_0x198b61)=>{const _0x580195=_0x307b38,_0x140aa5=_0x3b4318['get'](_0x3e4368[_0x580195(0x11d)]),_0x379d93=_0x3b4318[_0x580195(0x133)](_0x567a93[_0x580195(0xeb)]);_0x198b61[_0x580195(0x137)](_0x5307bc=>{const _0x213b00=_0x580195;_0x140aa5[_0x213b00(0x114)](_0x5307bc)&&_0x198b61[_0x213b00(0x103)](_0x5307bc);}),_0x198b61['size']&&(await _0x379d93['get'](_0x580195(0xca),{'params':{'userIDs':[..._0x198b61]}}))[_0x580195(0x13f)][_0x580195(0x11e)][_0x580195(0x137)](_0x271206=>{const _0x3e287f=_0x580195;_0x271206&&_0x140aa5[_0x3e287f(0x149)](_0x271206);});};var _0x1a2a1c=Object['getOwnPropertyDescriptor'],_0x4a88ca=(_0x46fbeb,_0x3e51cd,_0x2a41d8,_0x5adc5c)=>{const _0x4417d5=_0x307b38;for(var _0x310687=_0x5adc5c>0x1?void 0x0:_0x5adc5c?_0x1a2a1c(_0x3e51cd,_0x2a41d8):_0x3e51cd,_0x2c5955=_0x46fbeb[_0x4417d5(0xcb)]-0x1,_0x52d27f;_0x2c5955>=0x0;_0x2c5955--)(_0x52d27f=_0x46fbeb[_0x2c5955])&&(_0x310687=_0x52d27f(_0x310687)||_0x310687);return _0x310687;},_0x480242=(_0x4d5ba6,_0x12a3e7)=>(_0x1dad85,_0x23587b)=>_0x12a3e7(_0x1dad85,_0x23587b,_0x4d5ba6);let _0x1b1de7=class extends _0x3e4368['Disposable']{constructor(_0x2f3f00,_0x20a898,_0x27989e,_0x5bf9e2){const _0x21699b=_0x307b38;super(),this[_0x21699b(0xe3)]=_0x2f3f00,this[_0x21699b(0xc8)]=_0x20a898,this[_0x21699b(0x125)]=_0x27989e,this[_0x21699b(0x129)]=_0x5bf9e2,this[_0x21699b(0x12e)](),this[_0x21699b(0x140)]();}[_0x307b38(0x140)](){const _0x2cf9de=_0x307b38;this['disposeWithMe'](this[_0x2cf9de(0xc8)][_0x2cf9de(0x130)][_0x2cf9de(0xce)](_0x4b9f61[_0x2cf9de(0xd1)](0x10))[_0x2cf9de(0xf3)](_0x232dc5=>{const _0x2e4bf6=_0x2cf9de,_0x21e3e8=new Set();_0x232dc5[_0x2e4bf6(0x137)](_0x17ac83=>{const _0x4aa66f=_0x2e4bf6;if(_0x17ac83[_0x4aa66f(0x14c)]==='add'){const _0x1858fe=_0x17ac83[_0x4aa66f(0xef)][_0x4aa66f(0xdc)];_0x21e3e8['add'](_0x1858fe);}}),_0x41556f(this[_0x2e4bf6(0x129)],_0x21e3e8);}));}[_0x307b38(0x12e)](){const _0x34aee1=_0x307b38;this[_0x34aee1(0x147)](this[_0x34aee1(0xe3)][_0x34aee1(0x130)][_0x34aee1(0xf3)](async _0x4155f2=>{const _0x4f74da=_0x34aee1;var _0x31695f,_0x1ab9d5,_0x26e9ed,_0x2ea8a6;const _0x26fcdc=(_0x31695f=this[_0x4f74da(0xc8)]['getUnit'](_0x4155f2[_0x4f74da(0x111)])['find'](_0x30cc86=>_0x30cc86[_0x4f74da(0xdb)]===_0x4155f2[_0x4f74da(0xdb)]))==null?void 0x0:_0x31695f[_0x4f74da(0x12c)];if(!_0x26fcdc)return;const {unitId:_0x30a454,subUnitId:_0x89c10}=_0x26fcdc;switch(_0x4155f2[_0x4f74da(0xe2)]&&this[_0x4f74da(0x125)][_0x4f74da(0x149)](_0x4155f2[_0x4f74da(0xe2)]),_0x4155f2[_0x4f74da(0x14c)]){case _0x222735['Add']:break;case _0x222735[_0x4f74da(0x124)]:{this[_0x4f74da(0xc8)][_0x4f74da(0x10e)](_0x30a454,_0x89c10,{'unitId':_0x30a454,'subUnitId':_0x89c10,'ref':'','id':_0x4155f2[_0x4f74da(0x146)],'dT':_0x16cba7(+_0x4155f2[_0x4f74da(0x11f)]),'threadId':_0x4155f2['threadId'],'personId':(_0x26e9ed=(_0x1ab9d5=_0x4155f2[_0x4f74da(0xe2)])==null?void 0x0:_0x1ab9d5[_0x4f74da(0xee)])!=null?_0x26e9ed:_0x4155f2[_0x4f74da(0x13d)],'text':JSON[_0x4f74da(0xd4)](_0x4155f2[_0x4f74da(0xe0)]),'parentId':_0x26fcdc['id']});break;}case _0x222735[_0x4f74da(0x100)]:{const _0x598d5e=this[_0x4f74da(0xc8)][_0x4f74da(0xc7)](_0x30a454,_0x89c10,_0x4155f2[_0x4f74da(0x146)]);_0x598d5e&&_0x598d5e[_0x4f74da(0x115)]&&this[_0x4f74da(0xc8)][_0x4f74da(0xd5)](_0x30a454,_0x89c10,_0x4155f2[_0x4f74da(0x146)]);break;}case _0x222735[_0x4f74da(0x11a)]:{this[_0x4f74da(0xc8)][_0x4f74da(0x14f)](_0x30a454,_0x89c10,{'commentId':_0x4155f2['replyId'],'text':JSON[_0x4f74da(0xd4)](_0x4155f2[_0x4f74da(0xe0)])});break;}case _0x222735[_0x4f74da(0x104)]:{const _0x1151a4=(_0x2ea8a6=this[_0x4f74da(0xc8)]['getUnit'](_0x4155f2[_0x4f74da(0x111)])[_0x4f74da(0x109)](_0x2c8fe4=>_0x2c8fe4[_0x4f74da(0xdb)]===_0x4155f2[_0x4f74da(0xdb)]))==null?void 0x0:_0x2ea8a6[_0x4f74da(0x12c)];_0x1151a4&&this[_0x4f74da(0xc8)][_0x4f74da(0xdf)](_0x30a454,_0x89c10,_0x1151a4['id'],_0x4155f2[_0x4f74da(0x117)]===_0x1b8961[_0x4f74da(0x10f)]);break;}}}));}};_0x1b1de7=_0x4a88ca([_0x480242(0x0,_0x3e4368[_0x307b38(0xc6)](_0x1c91d7[_0x307b38(0xf7)])),_0x480242(0x1,_0x3e4368[_0x307b38(0xc6)](_0x39bcb2[_0x307b38(0xf9)])),_0x480242(0x2,_0x3e4368[_0x307b38(0xc6)](_0x3e4368[_0x307b38(0x11d)])),_0x480242(0x3,_0x3e4368[_0x307b38(0xc6)](_0x3e4368[_0x307b38(0x123)]))],_0x1b1de7);const _0x381f78=_0x307b38(0xda),_0x4350f3={};var _0x30fce0=Object['getOwnPropertyDescriptor'],_0x22caad=(_0x4584b5,_0x5de675,_0x4fb57d,_0x893a35)=>{const _0x247999=_0x307b38;for(var _0x51055a=_0x893a35>0x1?void 0x0:_0x893a35?_0x30fce0(_0x5de675,_0x4fb57d):_0x5de675,_0x1f2e53=_0x4584b5[_0x247999(0xcb)]-0x1,_0x17812a;_0x1f2e53>=0x0;_0x1f2e53--)(_0x17812a=_0x4584b5[_0x1f2e53])&&(_0x51055a=_0x17812a(_0x51055a)||_0x51055a);return _0x51055a;},_0x3c845c=(_0xc52e01,_0x5bd81a)=>(_0x3aba7c,_0x34edc4)=>_0x5bd81a(_0x3aba7c,_0x34edc4,_0xc52e01);function _0x3946ad(_0x530888,_0x3f2300){const _0x5cc2a5=_0x307b38,_0x1f1252=_0x530888['replies'][0x0];return{..._0x3f2300,'id':_0x1f1252['replyId'],'resolved':_0x530888[_0x5cc2a5(0x117)]===0x1,'dT':_0x16cba7(_0x1f1252[_0x5cc2a5(0x11f)]),'personId':_0x1f1252[_0x5cc2a5(0x13d)],'threadId':_0x1f1252['threadId']};}function _0x4838de(_0x368f29,_0x57e35f,_0x16a428){const _0x274599=_0x307b38;var _0x165179,_0x5a4383;if(((_0x5a4383=(_0x165179=_0x368f29==null?void 0x0:_0x368f29['replies'])==null?void 0x0:_0x165179['length'])!=null?_0x5a4383:0x0)>0x0){const _0x828805=(_0x40c513,_0x32f072)=>({'id':_0x40c513[_0x274599(0x146)],'threadId':_0x40c513[_0x274599(0xdb)],'dT':_0x16cba7(_0x40c513['createTimestamp']),'personId':_0x40c513[_0x274599(0x13d)],'resolved':_0x368f29[_0x274599(0x117)]===_0x1b8961['Solved'],'unitId':_0x57e35f,'subUnitId':_0x16a428,'text':JSON[_0x274599(0xd4)](_0x40c513[_0x274599(0xe0)]),'parentId':_0x32f072}),_0x5b30e7=_0x828805(_0x368f29[_0x274599(0x11b)][0x0]);return{..._0x5b30e7,'children':_0x368f29[_0x274599(0x11b)][_0x274599(0xcd)](0x1)['map'](_0x40b264=>_0x828805(_0x40b264,_0x5b30e7['id']))};}return null;}let _0x1d1a6a=class{constructor(_0x457093,_0x2634e7,_0x1b802b){const _0x3d0d53=_0x307b38;this[_0x3d0d53(0x136)]=_0x457093,this[_0x3d0d53(0x125)]=_0x2634e7,this[_0x3d0d53(0x118)]=_0x1b802b;}async[_0x307b38(0x10e)](_0x46f12d){const _0x165e1f=_0x307b38;var _0x27aeff,_0x382a2a;const {parentId:_0x19f0d1,unitId:_0x32eab9,text:_0x45f610,threadId:_0x598edc}=_0x46f12d,_0x557e63=(_0x382a2a=(_0x27aeff=_0x45f610[_0x165e1f(0xea)])==null?void 0x0:_0x27aeff[_0x165e1f(0xf0)](_0x28854a=>_0x28854a[_0x165e1f(0x131)]===_0x3e4368[_0x165e1f(0x120)]['COMMENT'])['map'](_0x335278=>_0x335278['rangeId']))!=null?_0x382a2a:[],_0x1526e8=JSON[_0x165e1f(0x12d)](_0x45f610),_0x302a83=(await this[_0x165e1f(0x118)]['requireSession'](_0x32eab9))[_0x165e1f(0x11c)]();if(_0x19f0d1){const _0x432d08={'memberId':_0x302a83,'unitId':_0x32eab9,'content':_0x1526e8,'mention':_0x557e63,'threadId':_0x598edc},_0x4d8092=(await this[_0x165e1f(0x136)][_0x165e1f(0x102)]('/universer-api/comment/unit/'+_0x32eab9+'/reply',{'body':_0x432d08}))['body'][_0x165e1f(0x148)];return{..._0x46f12d,'id':_0x4d8092[_0x165e1f(0x146)],'dT':_0x3e4368['dayjs'](+_0x4d8092[_0x165e1f(0x11f)])[_0x165e1f(0xdd)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x4d8092[_0x165e1f(0x13d)]};}else{const _0x4b7c4e={'memberId':_0x302a83,'unitId':_0x32eab9,'content':_0x1526e8,'mention':_0x557e63},_0x48075c=await this[_0x165e1f(0x136)]['post'](_0x165e1f(0xe5)+_0x32eab9+'/add',{'body':_0x4b7c4e});return _0x3946ad(_0x48075c['body'][_0x165e1f(0x113)],_0x46f12d);}}async['updateComment'](_0x188848){const _0x459f88=_0x307b38;var _0x194259,_0x249f62;const {text:_0x45f752,unitId:_0x52fb8d}=_0x188848,_0x3b7c35=(_0x249f62=(_0x194259=_0x45f752[_0x459f88(0xea)])==null?void 0x0:_0x194259[_0x459f88(0xf0)](_0x1a329a=>_0x1a329a['rangeType']===_0x3e4368[_0x459f88(0x120)][_0x459f88(0x10b)])[_0x459f88(0x14a)](_0x2da044=>_0x2da044['rangeId']))!=null?_0x249f62:[],_0x56466e=JSON[_0x459f88(0x12d)](_0x45f752),_0x17c23c=_0x188848['threadId'],_0xcefc8a=_0x188848['id'],_0x260f37={'memberId':(await this[_0x459f88(0x118)][_0x459f88(0xe4)](_0x52fb8d))[_0x459f88(0x11c)](),'unitId':_0x52fb8d,'threadId':_0x17c23c,'mention':_0x3b7c35,'content':_0x56466e,'replyId':_0xcefc8a},_0x599a24=await this['_httpService'][_0x459f88(0x102)]('/universer-api/comment/unit/'+_0x52fb8d+_0x459f88(0xd6),{'body':_0x260f37});return!_0x599a24[_0x459f88(0x13f)][_0x459f88(0xd7)]||_0x599a24['body'][_0x459f88(0xd7)][_0x459f88(0x150)]===0x1;}async['resolveComment'](_0x11c00f){const _0x33d39f=_0x307b38,{unitId:_0x504d6a}=_0x11c00f,_0x52d740=_0x11c00f[_0x33d39f(0xdb)],_0x2b7ea3={'memberId':this[_0x33d39f(0x125)][_0x33d39f(0x144)]()[_0x33d39f(0xee)],'unitId':_0x504d6a,'threadId':_0x52d740,'solved':_0x11c00f[_0x33d39f(0x14b)]?_0x1b8961[_0x33d39f(0x10f)]:_0x1b8961[_0x33d39f(0xf2)]},_0x1675b8=await this[_0x33d39f(0x136)][_0x33d39f(0x102)](_0x33d39f(0xe5)+_0x504d6a+_0x33d39f(0x13a),{'body':_0x2b7ea3});return!_0x1675b8[_0x33d39f(0x13f)][_0x33d39f(0xd7)]||_0x1675b8[_0x33d39f(0x13f)][_0x33d39f(0xd7)][_0x33d39f(0x150)]===0x1;}async[_0x307b38(0xd5)](_0x2f66f2,_0xec20e8,_0x54bcd7,_0x2571d9){const _0x5e555a=_0x307b38,_0x1e8e6f={'memberId':(await this[_0x5e555a(0x118)][_0x5e555a(0xe4)](_0x2f66f2))[_0x5e555a(0x11c)](),'threadId':_0x54bcd7,'replyId':_0x2571d9,'unitId':_0x2f66f2},_0x4b90c0=await this[_0x5e555a(0x136)]['post'](_0x5e555a(0xe5)+_0x2f66f2+_0x5e555a(0xd0),{'body':_0x1e8e6f});return!_0x4b90c0[_0x5e555a(0x13f)][_0x5e555a(0xd7)]||_0x4b90c0[_0x5e555a(0x13f)][_0x5e555a(0xd7)][_0x5e555a(0x150)]===0x1;}async[_0x307b38(0x122)](_0x553527,_0x33975a,_0x2e4fd5){const _0x483703=_0x307b38,_0x22dc05={'unitId':_0x553527,'threadId':_0x2e4fd5},_0x20b655=await this[_0x483703(0x136)][_0x483703(0x102)]('/universer-api/comment/unit/'+_0x553527+_0x483703(0x107),{'body':_0x22dc05}),_0x2ff633=_0x2e4fd5[_0x483703(0x14a)](_0x12b870=>_0x4838de(_0x20b655[_0x483703(0x13f)][_0x483703(0x134)][_0x12b870],_0x553527,_0x33975a))[_0x483703(0xf0)](Boolean);return Object[_0x483703(0x135)](_0x20b655[_0x483703(0x13f)]['users'])[_0x483703(0x137)](_0x38b0e5=>{const _0x282cfe=_0x483703;this[_0x282cfe(0x125)][_0x282cfe(0x149)](_0x38b0e5);}),_0x2ff633;}[_0x307b38(0x12b)](_0x244ccb){const _0x1c7ea7=_0x307b38;return{'id':_0x244ccb['id'],'threadId':_0x244ccb['threadId'],'ref':_0x244ccb[_0x1c7ea7(0xe6)]};}};_0x1d1a6a=_0x22caad([_0x3c845c(0x0,_0x3e4368[_0x307b38(0xc6)](_0x567a93['HTTPService'])),_0x3c845c(0x1,_0x3e4368['Inject'](_0x3e4368['UserManagerService'])),_0x3c845c(0x2,_0x3e4368[_0x307b38(0xc6)](_0x1c91d7[_0x307b38(0xcf)]))],_0x1d1a6a);var _0x5ef8e1=Object[_0x307b38(0x12a)],_0x468072=(_0x5d73da,_0x2affaf,_0x27b624,_0x1cb375)=>{for(var _0x321916=_0x1cb375>0x1?void 0x0:_0x1cb375?_0x5ef8e1(_0x2affaf,_0x27b624):_0x2affaf,_0x1545ab=_0x5d73da['length']-0x1,_0x4ffb36;_0x1545ab>=0x0;_0x1545ab--)(_0x4ffb36=_0x5d73da[_0x1545ab])&&(_0x321916=_0x4ffb36(_0x321916)||_0x321916);return _0x321916;},_0x50cfa6=(_0x438f13,_0x11e92b)=>(_0x58e50c,_0x1e1afd)=>_0x11e92b(_0x58e50c,_0x1e1afd,_0x438f13);let _0xbd0b48=class extends _0x3e4368[_0x307b38(0x14e)]{constructor(_0x40545f,_0x818a41){const _0x577778=_0x307b38;super(),this[_0x577778(0xf4)]=_0x40545f,this[_0x577778(0x112)]=_0x818a41,this[_0x577778(0xe8)]();}[_0x307b38(0xe8)](){const _0x1ef6ce=_0x307b38;this[_0x1ef6ce(0xf4)][_0x1ef6ce(0xd3)]=this['_threadCommentDataSource'],this[_0x1ef6ce(0xf4)]['syncUpdateMutationToColla']=!0x1;}};_0xbd0b48=_0x468072([_0x50cfa6(0x0,_0x39bcb2[_0x307b38(0x106)]),_0x50cfa6(0x1,_0x3e4368['Inject'](_0x1d1a6a))],_0xbd0b48);var _0x5a9dd1=Object[_0x307b38(0x13c)],_0x104a55=Object[_0x307b38(0x12a)],_0x52a195=(_0x772605,_0x2d444f,_0x5e6938)=>_0x2d444f in _0x772605?_0x5a9dd1(_0x772605,_0x2d444f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5e6938}):_0x772605[_0x2d444f]=_0x5e6938,_0x2d7dd7=(_0x4e6c84,_0x5a43cd,_0x3adf6c,_0x54fcfb)=>{for(var _0x5aaef6=_0x54fcfb>0x1?void 0x0:_0x54fcfb?_0x104a55(_0x5a43cd,_0x3adf6c):_0x5a43cd,_0x5754cc=_0x4e6c84['length']-0x1,_0xb7fe61;_0x5754cc>=0x0;_0x5754cc--)(_0xb7fe61=_0x4e6c84[_0x5754cc])&&(_0x5aaef6=_0xb7fe61(_0x5aaef6)||_0x5aaef6);return _0x5aaef6;},_0xeb5f0e=(_0x108d1e,_0x135b13)=>(_0x1db150,_0x4bebc7)=>_0x135b13(_0x1db150,_0x4bebc7,_0x108d1e),_0x572a42=(_0x2061ae,_0x32a520,_0x59dd6c)=>_0x52a195(_0x2061ae,typeof _0x32a520!=_0x307b38(0x116)?_0x32a520+'':_0x32a520,_0x59dd6c);_0x3041a1['UniverThreadCommentDataSourcePlugin']=class extends _0x3e4368[_0x307b38(0xf8)]{constructor(_0x570fba=_0x4350f3,_0x82bf48,_0x1673a3){const _0x3ed5cb=_0x307b38;super(),this[_0x3ed5cb(0xed)]=_0x570fba,this['_injector']=_0x82bf48,this[_0x3ed5cb(0x119)]=_0x1673a3;const {..._0x23a79a}=_0x3e4368[_0x3ed5cb(0xf1)]({},_0x4350f3,this[_0x3ed5cb(0xed)]);this[_0x3ed5cb(0x119)]['setConfig'](_0x381f78,_0x23a79a);}[_0x307b38(0x127)](){const _0x585fc6=_0x307b38;[[_0x1d1a6a],[_0xbd0b48],[_0x1b1de7]][_0x585fc6(0x137)](_0x58d0f1=>{const _0x4e4917=_0x585fc6;this[_0x4e4917(0x129)][_0x4e4917(0xe1)](_0x58d0f1);});}[_0x307b38(0x12f)](){const _0x3228db=_0x307b38;this['_injector'][_0x3228db(0x133)](_0xbd0b48),this[_0x3228db(0x129)]['get'](_0x1b1de7);}},_0x572a42(_0x3041a1[_0x307b38(0x10c)],_0x307b38(0x132),_0x3fc2ff),_0x572a42(_0x3041a1['UniverThreadCommentDataSourcePlugin'],_0x307b38(0x14c),_0x3e4368[_0x307b38(0x145)]['UNIVER_UNKNOWN']),_0x3041a1[_0x307b38(0x10c)]=_0x2d7dd7([_0x3e4368[_0x307b38(0x101)](_0x2c2f02[_0x307b38(0xec)],_0x1c91d7['UniverCollaborationClientPlugin'],_0x3db020[_0x307b38(0xfc)]),_0xeb5f0e(0x1,_0x3e4368['Inject'](_0x3e4368[_0x307b38(0x123)])),_0xeb5f0e(0x2,_0x3e4368[_0x307b38(0x10d)])],_0x3041a1[_0x307b38(0x10c)]),Object[_0x307b38(0x13c)](_0x3041a1,Symbol[_0x307b38(0xf5)],{'value':_0x307b38(0xde)});}));function _0x7464(){const _0x59f0ad=['Module','resolveComment','content','add','user','_commentService','requireSession','/universer-api/comment/unit/','ref','UNRECOGNIZED','_initDataSource','9mULguU','customRanges','HTTPService','UniverThreadCommentUIPlugin','_config','userID','payload','filter','merge','OpenOrReOpen','subscribe','_threadCommentDataSourceService','toStringTag','dayjs','CommentService','Plugin','ThreadCommentModel','UniverThreadCommentUi','object','UniverLicensePlugin','937280nZFYtG','rxjs','766767LHDylP','Delete','DependentOn','post','delete','Solve','4bCWdQm','IThreadCommentDataSourceService','/list','33037ICWAde','find','UniverThreadComment','COMMENT','UniverThreadCommentDataSourcePlugin','IConfigService','addComment','Solved','YYYY/MM/DD\x20HH:mm','unitId','_threadCommentDataSource','comment','getUser','parentId','symbol','solved','_sessionService','_configService','Edit','replies','getMemberID','UserManagerService','users','createTimestamp','CustomRangeType','1168172QLKILw','listComments','Injector','Reply','_userService','@univerjs/network','onStarting','UniverCore','_injector','getOwnPropertyDescriptor','saveCommentToSnapshot','root','stringify','_init','onReady','commentUpdate$','rangeType','pluginName','get','comments','values','_httpService','forEach','3039864AFtMSB','@univerjs-pro/license','/solved','475gttTIe','defineProperty','userId','@univerjs/core','body','_initUserSync','UniverNetwork','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Add','getCurrentUser','UniverInstanceType','replyId','disposeWithMe','reply','addUser','map','resolved','type','@univerjs/thread-comment-ui','Disposable','updateComment','code','function','Inject','getComment','_threadCommentModel','UniverProCollaborationClient','/universer-api/user/list','length','Unknown','slice','pipe','CollaborationSessionService','/delete','bufferTime','UniverProThreadCommentDatasource','dataSource','parse','deleteComment','/edit','error','161042ZSegWj','7356TYLpMN','thread-comment-data-source.config','threadId','personId','format'];_0x7464=function(){return _0x59f0ad;};return _0x7464();}
|
|
1
|
+
function _0x579f(){const _0x4e1219=['comments','setConfig','values','YYYY/MM/DD\x20HH:mm','UniverProThreadCommentDatasource','Edit','@univerjs-pro/collaboration-client','deleteComment','userId','dataSource','rangeId','getUnit','createTimestamp','comment','_threadCommentModel','1051914qNnVKt','DependentOn','UniverCollaborationClientPlugin','_sessionService','@univerjs/core','_initUserSync','dayjs','format','toStringTag','_injector','syncUpdateMutationToColla','commentUpdate$','unitId','object','_commentService','4441010YrMYep','Solve','UserManagerService','resolveComment','saveCommentToSnapshot','29683XJdIOD','parse','@univerjs-pro/license','personId','CustomRangeType','6jySltj','_userService','replyId','UniverInstanceType','UniverThreadCommentDataSourcePlugin','onReady','symbol','Unknown','rangeType','body','onStarting','Solved','listComments','Add','_threadCommentDataSource','35oOkdaB','OpenOrReOpen','subscribe','IConfigService','14SEBUwW','1008312XESqaP','find','pluginName','customRanges','updateComment','Inject','/edit','bufferTime','delete','UniverProLicense','requireSession','22LeeTlo','/universer-api/user/list','171300ORhwCK','solved','_httpService','9FadWhk','ref','code','add','slice','replies','get','rxjs','exports','@univerjs/thread-comment','COMMENT','Injector','amd','error','post','payload','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','function','_initDataSource','_config','/solved','/list','/add','merge','content','Plugin','addUser','Disposable','_threadCommentDataSourceService','length','UNRECOGNIZED','_configService','disposeWithMe','filter','forEach','854272hsYvwC','CollaborationSessionService','/delete','_init','Reply','userID','defineProperty','threadId','users','type','map','addComment','Delete','size','/universer-api/comment/unit/','resolved','UniverLicensePlugin','getUser','UNIVER_UNKNOWN','UniverThreadCommentUi','getMemberID','ThreadCommentModel','UniverThreadComment','1314606yPIlDa','getOwnPropertyDescriptor'];_0x579f=function(){return _0x4e1219;};return _0x579f();}function _0x4a1e(_0x416e51,_0x4d4ffb){_0x416e51=_0x416e51-0x1f4;const _0x579fc7=_0x579f();let _0x4a1ea2=_0x579fc7[_0x416e51];return _0x4a1ea2;}(function(_0x8fb581,_0x1038b0){const _0xa842a1=_0x4a1e,_0x1e8b59=_0x8fb581();while(!![]){try{const _0x22bb03=parseInt(_0xa842a1(0x26d))/0x1*(parseInt(_0xa842a1(0x272))/0x2)+parseInt(_0xa842a1(0x248))/0x3+parseInt(_0xa842a1(0x20b))/0x4*(-parseInt(_0xa842a1(0x1f9))/0x5)+-parseInt(_0xa842a1(0x259))/0x6*(parseInt(_0xa842a1(0x1fd))/0x7)+parseInt(_0xa842a1(0x231))/0x8*(-parseInt(_0xa842a1(0x20e))/0x9)+parseInt(_0xa842a1(0x268))/0xa+parseInt(_0xa842a1(0x209))/0xb*(parseInt(_0xa842a1(0x1fe))/0xc);if(_0x22bb03===_0x1038b0)break;else _0x1e8b59['push'](_0x1e8b59['shift']());}catch(_0xa1dbc0){_0x1e8b59['push'](_0x1e8b59['shift']());}}}(_0x579f,0x5d4ff),function(_0x361a37,_0x123041){const _0x247c2f=_0x4a1e;typeof exports==_0x247c2f(0x266)&&typeof module<'u'?_0x123041(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==_0x247c2f(0x21f)&&define[_0x247c2f(0x21a)]?define([_0x247c2f(0x216),_0x247c2f(0x250),_0x247c2f(0x26f),_0x247c2f(0x25d),'@univerjs/thread-comment-ui',_0x247c2f(0x217),'rxjs','@univerjs/network'],_0x123041):(_0x361a37=typeof globalThis<'u'?globalThis:_0x361a37||self,_0x123041(_0x361a37[_0x247c2f(0x24e)]={},_0x361a37['UniverProCollaborationClient'],_0x361a37[_0x247c2f(0x207)],_0x361a37['UniverCore'],_0x361a37[_0x247c2f(0x244)],_0x361a37[_0x247c2f(0x247)],_0x361a37[_0x247c2f(0x215)],_0x361a37['UniverNetwork']));}(this,function(_0x5b90b8,_0x2d542e,_0x1e1c51,_0x799d5e,_0x496301,_0x18a8bf,_0x9e15d3,_0x59c027){'use strict';const _0x2da8d6=_0x4a1e;const _0x43146f=_0x2da8d6(0x21e);var _0x4baf88=(_0x51e712=>(_0x51e712[_0x51e712['OpenOrReOpen']=0x0]=_0x2da8d6(0x1fa),_0x51e712[_0x51e712[_0x2da8d6(0x1f5)]=0x1]=_0x2da8d6(0x1f5),_0x51e712[_0x51e712[_0x2da8d6(0x22c)]=-0x1]=_0x2da8d6(0x22c),_0x51e712))(_0x4baf88||{}),_0x3c1b1a=(_0x25b2e8=>(_0x25b2e8[_0x25b2e8['Unknown']=0x0]=_0x2da8d6(0x279),_0x25b2e8[_0x25b2e8[_0x2da8d6(0x1f7)]=0x1]=_0x2da8d6(0x1f7),_0x25b2e8[_0x25b2e8[_0x2da8d6(0x235)]=0x2]=_0x2da8d6(0x235),_0x25b2e8[_0x25b2e8[_0x2da8d6(0x24f)]=0x3]=_0x2da8d6(0x24f),_0x25b2e8[_0x25b2e8[_0x2da8d6(0x23d)]=0x4]='Delete',_0x25b2e8[_0x25b2e8[_0x2da8d6(0x269)]=0x5]=_0x2da8d6(0x269),_0x25b2e8[_0x25b2e8[_0x2da8d6(0x22c)]=-0x1]='UNRECOGNIZED',_0x25b2e8))(_0x3c1b1a||{});const _0x419f46=_0x54589f=>_0x799d5e[_0x2da8d6(0x25f)](new Date(+_0x54589f))[_0x2da8d6(0x260)](_0x2da8d6(0x24d)),_0x50183a=async(_0x2a018f,_0x268aeb)=>{const _0x3b2217=_0x2da8d6,_0x5dc036=_0x2a018f[_0x3b2217(0x214)](_0x799d5e[_0x3b2217(0x26a)]),_0x45ac16=_0x2a018f[_0x3b2217(0x214)](_0x59c027['HTTPService']);_0x268aeb[_0x3b2217(0x230)](_0x1f29d3=>{const _0x31a2ff=_0x3b2217;_0x5dc036[_0x31a2ff(0x242)](_0x1f29d3)&&_0x268aeb[_0x31a2ff(0x206)](_0x1f29d3);}),_0x268aeb[_0x3b2217(0x23e)]&&(await _0x45ac16[_0x3b2217(0x214)](_0x3b2217(0x20a),{'params':{'userIDs':[..._0x268aeb]}}))[_0x3b2217(0x27b)]['users'][_0x3b2217(0x230)](_0x5d3b4a=>{const _0x39b2fb=_0x3b2217;_0x5d3b4a&&_0x5dc036[_0x39b2fb(0x228)](_0x5d3b4a);});};var _0x28c545=Object[_0x2da8d6(0x249)],_0x7365d6=(_0x4f1ac2,_0x7e03b,_0x55cdd5,_0x5748e1)=>{for(var _0x505a91=_0x5748e1>0x1?void 0x0:_0x5748e1?_0x28c545(_0x7e03b,_0x55cdd5):_0x7e03b,_0x4dfc13=_0x4f1ac2['length']-0x1,_0x32d4b3;_0x4dfc13>=0x0;_0x4dfc13--)(_0x32d4b3=_0x4f1ac2[_0x4dfc13])&&(_0x505a91=_0x32d4b3(_0x505a91)||_0x505a91);return _0x505a91;},_0x2eff15=(_0x5e486f,_0x52c2c3)=>(_0x3665fc,_0x47c5da)=>_0x52c2c3(_0x3665fc,_0x47c5da,_0x5e486f);let _0xe9d823=class extends _0x799d5e['Disposable']{constructor(_0x5a915d,_0x1dc128,_0x31a012,_0x1e4e52){const _0x4fdc0b=_0x2da8d6;super(),this[_0x4fdc0b(0x267)]=_0x5a915d,this[_0x4fdc0b(0x258)]=_0x1dc128,this[_0x4fdc0b(0x273)]=_0x31a012,this[_0x4fdc0b(0x262)]=_0x1e4e52,this['_init'](),this[_0x4fdc0b(0x25e)]();}[_0x2da8d6(0x25e)](){const _0x229c93=_0x2da8d6;this[_0x229c93(0x22e)](this[_0x229c93(0x258)][_0x229c93(0x264)]['pipe'](_0x9e15d3[_0x229c93(0x205)](0x10))[_0x229c93(0x1fb)](_0x120b2b=>{const _0x5a7d86=_0x229c93,_0xd19060=new Set();_0x120b2b[_0x5a7d86(0x230)](_0x224a38=>{const _0x5e3c32=_0x5a7d86;if(_0x224a38['type']===_0x5e3c32(0x211)){const _0x258b26=_0x224a38[_0x5e3c32(0x21d)][_0x5e3c32(0x270)];_0xd19060[_0x5e3c32(0x211)](_0x258b26);}}),_0x50183a(this['_injector'],_0xd19060);}));}[_0x2da8d6(0x234)](){const _0x26c761=_0x2da8d6;this[_0x26c761(0x22e)](this[_0x26c761(0x267)][_0x26c761(0x264)][_0x26c761(0x1fb)](async _0x5cf766=>{const _0x453178=_0x26c761;var _0x1f5e83,_0x4dcee6,_0x3b960d,_0x1a92b8;const _0x17e366=(_0x1f5e83=this['_threadCommentModel'][_0x453178(0x255)](_0x5cf766[_0x453178(0x265)])[_0x453178(0x1ff)](_0x13a20a=>_0x13a20a[_0x453178(0x238)]===_0x5cf766[_0x453178(0x238)]))==null?void 0x0:_0x1f5e83['root'];if(!_0x17e366)return;const {unitId:_0xc2488b,subUnitId:_0x18b468}=_0x17e366;switch(_0x5cf766['user']&&this[_0x453178(0x273)]['addUser'](_0x5cf766['user']),_0x5cf766[_0x453178(0x23a)]){case _0x3c1b1a[_0x453178(0x1f7)]:break;case _0x3c1b1a[_0x453178(0x235)]:{this[_0x453178(0x258)][_0x453178(0x23c)](_0xc2488b,_0x18b468,{'unitId':_0xc2488b,'subUnitId':_0x18b468,'ref':'','id':_0x5cf766['replyId'],'dT':_0x419f46(+_0x5cf766[_0x453178(0x256)]),'threadId':_0x5cf766['threadId'],'personId':(_0x3b960d=(_0x4dcee6=_0x5cf766['user'])==null?void 0x0:_0x4dcee6['userID'])!=null?_0x3b960d:_0x5cf766[_0x453178(0x252)],'text':JSON[_0x453178(0x26e)](_0x5cf766['content']),'parentId':_0x17e366['id']});break;}case _0x3c1b1a['Delete']:{const _0x5e7d7a=this['_threadCommentModel']['getComment'](_0xc2488b,_0x18b468,_0x5cf766['replyId']);_0x5e7d7a&&_0x5e7d7a['parentId']&&this['_threadCommentModel']['deleteComment'](_0xc2488b,_0x18b468,_0x5cf766[_0x453178(0x274)]);break;}case _0x3c1b1a['Edit']:{this['_threadCommentModel'][_0x453178(0x202)](_0xc2488b,_0x18b468,{'commentId':_0x5cf766[_0x453178(0x274)],'text':JSON[_0x453178(0x26e)](_0x5cf766[_0x453178(0x226)])});break;}case _0x3c1b1a['Solve']:{const _0x5c2ad4=(_0x1a92b8=this[_0x453178(0x258)]['getUnit'](_0x5cf766[_0x453178(0x265)])[_0x453178(0x1ff)](_0x246e7e=>_0x246e7e[_0x453178(0x238)]===_0x5cf766[_0x453178(0x238)]))==null?void 0x0:_0x1a92b8['root'];_0x5c2ad4&&this[_0x453178(0x258)][_0x453178(0x26b)](_0xc2488b,_0x18b468,_0x5c2ad4['id'],_0x5cf766[_0x453178(0x20c)]===_0x4baf88[_0x453178(0x1f5)]);break;}}}));}};_0xe9d823=_0x7365d6([_0x2eff15(0x0,_0x799d5e[_0x2da8d6(0x203)](_0x2d542e['CommentService'])),_0x2eff15(0x1,_0x799d5e['Inject'](_0x18a8bf[_0x2da8d6(0x246)])),_0x2eff15(0x2,_0x799d5e[_0x2da8d6(0x203)](_0x799d5e['UserManagerService'])),_0x2eff15(0x3,_0x799d5e[_0x2da8d6(0x203)](_0x799d5e['Injector']))],_0xe9d823);const _0x2355f2='thread-comment-data-source.config',_0x440e52={};var _0x351972=Object[_0x2da8d6(0x249)],_0x31b616=(_0x910d5c,_0x465de8,_0x4dee90,_0x50a658)=>{const _0x421dea=_0x2da8d6;for(var _0xd3a29c=_0x50a658>0x1?void 0x0:_0x50a658?_0x351972(_0x465de8,_0x4dee90):_0x465de8,_0x4e688d=_0x910d5c[_0x421dea(0x22b)]-0x1,_0x16bb2e;_0x4e688d>=0x0;_0x4e688d--)(_0x16bb2e=_0x910d5c[_0x4e688d])&&(_0xd3a29c=_0x16bb2e(_0xd3a29c)||_0xd3a29c);return _0xd3a29c;},_0x3e8451=(_0x4b61d4,_0x300653)=>(_0xd980e,_0x4dd963)=>_0x300653(_0xd980e,_0x4dd963,_0x4b61d4);function _0x5237c0(_0x5a60ee,_0x62fdc6){const _0x12ef03=_0x2da8d6,_0x1a0464=_0x5a60ee[_0x12ef03(0x213)][0x0];return{..._0x62fdc6,'id':_0x1a0464['replyId'],'resolved':_0x5a60ee[_0x12ef03(0x20c)]===0x1,'dT':_0x419f46(_0x1a0464['createTimestamp']),'personId':_0x1a0464['userId'],'threadId':_0x1a0464['threadId']};}function _0x41d45a(_0x53a8d3,_0x13a7fa,_0x538ffd){const _0x16f236=_0x2da8d6;var _0x3e8b07,_0x6a4da1;if(((_0x6a4da1=(_0x3e8b07=_0x53a8d3==null?void 0x0:_0x53a8d3[_0x16f236(0x213)])==null?void 0x0:_0x3e8b07[_0x16f236(0x22b)])!=null?_0x6a4da1:0x0)>0x0){const _0x5d4dab=(_0x39492a,_0x18e104)=>({'id':_0x39492a['replyId'],'threadId':_0x39492a[_0x16f236(0x238)],'dT':_0x419f46(_0x39492a[_0x16f236(0x256)]),'personId':_0x39492a['userId'],'resolved':_0x53a8d3['solved']===_0x4baf88[_0x16f236(0x1f5)],'unitId':_0x13a7fa,'subUnitId':_0x538ffd,'text':JSON[_0x16f236(0x26e)](_0x39492a[_0x16f236(0x226)]),'parentId':_0x18e104}),_0x263f23=_0x5d4dab(_0x53a8d3[_0x16f236(0x213)][0x0]);return{..._0x263f23,'children':_0x53a8d3[_0x16f236(0x213)][_0x16f236(0x212)](0x1)['map'](_0x2bcfbe=>_0x5d4dab(_0x2bcfbe,_0x263f23['id']))};}return null;}let _0xfc23e3=class{constructor(_0x165625,_0x4b6ed1,_0x69de40){const _0x9078f0=_0x2da8d6;this[_0x9078f0(0x20d)]=_0x165625,this[_0x9078f0(0x273)]=_0x4b6ed1,this[_0x9078f0(0x25c)]=_0x69de40;}async[_0x2da8d6(0x23c)](_0x1c42fb){const _0x2567ac=_0x2da8d6;var _0x48be8f,_0x4f09bf;const {parentId:_0x231a0f,unitId:_0x15c00f,text:_0x41cf74,threadId:_0x338b08}=_0x1c42fb,_0x445091=(_0x4f09bf=(_0x48be8f=_0x41cf74['customRanges'])==null?void 0x0:_0x48be8f[_0x2567ac(0x22f)](_0x1d3f7a=>_0x1d3f7a['rangeType']===_0x799d5e[_0x2567ac(0x271)][_0x2567ac(0x218)])[_0x2567ac(0x23b)](_0x5260ae=>_0x5260ae[_0x2567ac(0x254)]))!=null?_0x4f09bf:[],_0x1a843c=JSON['stringify'](_0x41cf74),_0xe38f6a=(await this[_0x2567ac(0x25c)][_0x2567ac(0x208)](_0x15c00f))[_0x2567ac(0x245)]();if(_0x231a0f){const _0x2cb499={'memberId':_0xe38f6a,'unitId':_0x15c00f,'content':_0x1a843c,'mention':_0x445091,'threadId':_0x338b08},_0x1becdf=(await this[_0x2567ac(0x20d)]['post'](_0x2567ac(0x23f)+_0x15c00f+'/reply',{'body':_0x2cb499}))['body']['reply'];return{..._0x1c42fb,'id':_0x1becdf['replyId'],'dT':_0x799d5e[_0x2567ac(0x25f)](+_0x1becdf[_0x2567ac(0x256)])[_0x2567ac(0x260)](_0x2567ac(0x24d)),'personId':_0x1becdf[_0x2567ac(0x252)]};}else{const _0x4b9434={'memberId':_0xe38f6a,'unitId':_0x15c00f,'content':_0x1a843c,'mention':_0x445091},_0x28c76e=await this[_0x2567ac(0x20d)]['post']('/universer-api/comment/unit/'+_0x15c00f+_0x2567ac(0x224),{'body':_0x4b9434});return _0x5237c0(_0x28c76e[_0x2567ac(0x27b)][_0x2567ac(0x257)],_0x1c42fb);}}async['updateComment'](_0x6c8bea){const _0x5c07fc=_0x2da8d6;var _0x4eb727,_0x21d13e;const {text:_0x1d5196,unitId:_0x16acf9}=_0x6c8bea,_0x22af47=(_0x21d13e=(_0x4eb727=_0x1d5196[_0x5c07fc(0x201)])==null?void 0x0:_0x4eb727[_0x5c07fc(0x22f)](_0x415d08=>_0x415d08[_0x5c07fc(0x27a)]===_0x799d5e[_0x5c07fc(0x271)][_0x5c07fc(0x218)])[_0x5c07fc(0x23b)](_0x44b630=>_0x44b630[_0x5c07fc(0x254)]))!=null?_0x21d13e:[],_0x2d3b1f=JSON['stringify'](_0x1d5196),_0x1aa868=_0x6c8bea[_0x5c07fc(0x238)],_0x314dc8=_0x6c8bea['id'],_0x48d0e5={'memberId':(await this[_0x5c07fc(0x25c)]['requireSession'](_0x16acf9))[_0x5c07fc(0x245)](),'unitId':_0x16acf9,'threadId':_0x1aa868,'mention':_0x22af47,'content':_0x2d3b1f,'replyId':_0x314dc8},_0x2d3e43=await this[_0x5c07fc(0x20d)]['post'](_0x5c07fc(0x23f)+_0x16acf9+_0x5c07fc(0x204),{'body':_0x48d0e5});return!_0x2d3e43[_0x5c07fc(0x27b)][_0x5c07fc(0x21b)]||_0x2d3e43[_0x5c07fc(0x27b)][_0x5c07fc(0x21b)]['code']===0x1;}async['resolveComment'](_0x55f55c){const _0x4de091=_0x2da8d6,{unitId:_0x4061a8}=_0x55f55c,_0x76b6c8=_0x55f55c[_0x4de091(0x238)],_0x316b7c={'memberId':this[_0x4de091(0x273)]['getCurrentUser']()[_0x4de091(0x236)],'unitId':_0x4061a8,'threadId':_0x76b6c8,'solved':_0x55f55c[_0x4de091(0x240)]?_0x4baf88[_0x4de091(0x1f5)]:_0x4baf88[_0x4de091(0x1fa)]},_0x5d0234=await this[_0x4de091(0x20d)]['post'](_0x4de091(0x23f)+_0x4061a8+_0x4de091(0x222),{'body':_0x316b7c});return!_0x5d0234[_0x4de091(0x27b)]['error']||_0x5d0234[_0x4de091(0x27b)][_0x4de091(0x21b)][_0x4de091(0x210)]===0x1;}async[_0x2da8d6(0x251)](_0x1f961c,_0x14ba08,_0x43cf9f,_0x16c49f){const _0x64d2a3=_0x2da8d6,_0x28c443={'memberId':(await this[_0x64d2a3(0x25c)][_0x64d2a3(0x208)](_0x1f961c))[_0x64d2a3(0x245)](),'threadId':_0x43cf9f,'replyId':_0x16c49f,'unitId':_0x1f961c},_0x56aba1=await this['_httpService'][_0x64d2a3(0x21c)](_0x64d2a3(0x23f)+_0x1f961c+_0x64d2a3(0x233),{'body':_0x28c443});return!_0x56aba1['body']['error']||_0x56aba1[_0x64d2a3(0x27b)]['error'][_0x64d2a3(0x210)]===0x1;}async[_0x2da8d6(0x1f6)](_0x2a83bf,_0x353a60,_0x19bf6c){const _0x117f12=_0x2da8d6,_0x4d7373={'unitId':_0x2a83bf,'threadId':_0x19bf6c},_0x538e5e=await this[_0x117f12(0x20d)][_0x117f12(0x21c)](_0x117f12(0x23f)+_0x2a83bf+_0x117f12(0x223),{'body':_0x4d7373}),_0x405e12=_0x19bf6c[_0x117f12(0x23b)](_0x3cf1d5=>_0x41d45a(_0x538e5e[_0x117f12(0x27b)][_0x117f12(0x24a)][_0x3cf1d5],_0x2a83bf,_0x353a60))['filter'](Boolean);return Object[_0x117f12(0x24c)](_0x538e5e[_0x117f12(0x27b)][_0x117f12(0x239)])['forEach'](_0x18e32d=>{const _0x585eb5=_0x117f12;this[_0x585eb5(0x273)][_0x585eb5(0x228)](_0x18e32d);}),_0x405e12;}[_0x2da8d6(0x26c)](_0x18ecc9){const _0x2129d7=_0x2da8d6;return{'id':_0x18ecc9['id'],'threadId':_0x18ecc9[_0x2129d7(0x238)],'ref':_0x18ecc9[_0x2129d7(0x20f)]};}};_0xfc23e3=_0x31b616([_0x3e8451(0x0,_0x799d5e[_0x2da8d6(0x203)](_0x59c027['HTTPService'])),_0x3e8451(0x1,_0x799d5e[_0x2da8d6(0x203)](_0x799d5e[_0x2da8d6(0x26a)])),_0x3e8451(0x2,_0x799d5e[_0x2da8d6(0x203)](_0x2d542e[_0x2da8d6(0x232)]))],_0xfc23e3);var _0x1d9dd4=Object[_0x2da8d6(0x249)],_0x21d4ca=(_0x4c130e,_0x4993f2,_0x248d7f,_0x74ce99)=>{for(var _0x186fd6=_0x74ce99>0x1?void 0x0:_0x74ce99?_0x1d9dd4(_0x4993f2,_0x248d7f):_0x4993f2,_0x2ef918=_0x4c130e['length']-0x1,_0x5a4c82;_0x2ef918>=0x0;_0x2ef918--)(_0x5a4c82=_0x4c130e[_0x2ef918])&&(_0x186fd6=_0x5a4c82(_0x186fd6)||_0x186fd6);return _0x186fd6;},_0x7f0cd7=(_0x2ef82f,_0x1ecef4)=>(_0x4efdc1,_0x2257a4)=>_0x1ecef4(_0x4efdc1,_0x2257a4,_0x2ef82f);let _0x52137e=class extends _0x799d5e[_0x2da8d6(0x229)]{constructor(_0x1e7c32,_0x4fde19){const _0x3130c0=_0x2da8d6;super(),this['_threadCommentDataSourceService']=_0x1e7c32,this[_0x3130c0(0x1f8)]=_0x4fde19,this[_0x3130c0(0x220)]();}[_0x2da8d6(0x220)](){const _0x436904=_0x2da8d6;this[_0x436904(0x22a)][_0x436904(0x253)]=this[_0x436904(0x1f8)],this['_threadCommentDataSourceService'][_0x436904(0x263)]=!0x1;}};_0x52137e=_0x21d4ca([_0x7f0cd7(0x0,_0x18a8bf['IThreadCommentDataSourceService']),_0x7f0cd7(0x1,_0x799d5e[_0x2da8d6(0x203)](_0xfc23e3))],_0x52137e);var _0x1df60f=Object[_0x2da8d6(0x237)],_0x3a27cb=Object['getOwnPropertyDescriptor'],_0x12f881=(_0x1fc083,_0x16505f,_0x38c7dd)=>_0x16505f in _0x1fc083?_0x1df60f(_0x1fc083,_0x16505f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x38c7dd}):_0x1fc083[_0x16505f]=_0x38c7dd,_0xffe016=(_0x19be2f,_0x14820b,_0xc35339,_0x592abe)=>{const _0x17311b=_0x2da8d6;for(var _0x12ff01=_0x592abe>0x1?void 0x0:_0x592abe?_0x3a27cb(_0x14820b,_0xc35339):_0x14820b,_0x1e39a4=_0x19be2f[_0x17311b(0x22b)]-0x1,_0xd3fb7b;_0x1e39a4>=0x0;_0x1e39a4--)(_0xd3fb7b=_0x19be2f[_0x1e39a4])&&(_0x12ff01=_0xd3fb7b(_0x12ff01)||_0x12ff01);return _0x12ff01;},_0x6490ff=(_0x64c0f,_0x10c885)=>(_0x2e9b0b,_0x41e48c)=>_0x10c885(_0x2e9b0b,_0x41e48c,_0x64c0f),_0x4e0eed=(_0x5292de,_0x121261,_0x1fd5cf)=>_0x12f881(_0x5292de,typeof _0x121261!=_0x2da8d6(0x278)?_0x121261+'':_0x121261,_0x1fd5cf);_0x5b90b8[_0x2da8d6(0x276)]=class extends _0x799d5e[_0x2da8d6(0x227)]{constructor(_0x7c5096=_0x440e52,_0x4d2484,_0x3dfa25){const _0x17064e=_0x2da8d6;super(),this[_0x17064e(0x221)]=_0x7c5096,this[_0x17064e(0x262)]=_0x4d2484,this[_0x17064e(0x22d)]=_0x3dfa25;const {..._0x3c2e3e}=_0x799d5e[_0x17064e(0x225)]({},_0x440e52,this[_0x17064e(0x221)]);this[_0x17064e(0x22d)][_0x17064e(0x24b)](_0x2355f2,_0x3c2e3e);}[_0x2da8d6(0x1f4)](){[[_0xfc23e3],[_0x52137e],[_0xe9d823]]['forEach'](_0x13fd9c=>{const _0xc11fb9=_0x4a1e;this[_0xc11fb9(0x262)][_0xc11fb9(0x211)](_0x13fd9c);});}[_0x2da8d6(0x277)](){const _0x1f30b4=_0x2da8d6;this[_0x1f30b4(0x262)][_0x1f30b4(0x214)](_0x52137e),this[_0x1f30b4(0x262)]['get'](_0xe9d823);}},_0x4e0eed(_0x5b90b8[_0x2da8d6(0x276)],_0x2da8d6(0x200),_0x43146f),_0x4e0eed(_0x5b90b8[_0x2da8d6(0x276)],_0x2da8d6(0x23a),_0x799d5e[_0x2da8d6(0x275)][_0x2da8d6(0x243)]),_0x5b90b8[_0x2da8d6(0x276)]=_0xffe016([_0x799d5e[_0x2da8d6(0x25a)](_0x496301['UniverThreadCommentUIPlugin'],_0x2d542e[_0x2da8d6(0x25b)],_0x1e1c51[_0x2da8d6(0x241)]),_0x6490ff(0x1,_0x799d5e[_0x2da8d6(0x203)](_0x799d5e[_0x2da8d6(0x219)])),_0x6490ff(0x2,_0x799d5e[_0x2da8d6(0x1fc)])],_0x5b90b8[_0x2da8d6(0x276)]),Object[_0x2da8d6(0x237)](_0x5b90b8,Symbol[_0x2da8d6(0x261)],{'value':'Module'});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0-insiders.20260228-a20b9a7",
|
|
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.
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs
|
|
51
|
-
"@univerjs/network": "0.
|
|
52
|
-
"@univerjs/thread-comment": "0.15.5",
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.16.0-insiders.20260228-a20b9a7",
|
|
49
|
+
"@univerjs-pro/license": "0.16.0-insiders.20260228-a20b9a7",
|
|
50
|
+
"@univerjs/core": "0.16.0-insiders.20260228-a20b9a7",
|
|
51
|
+
"@univerjs/network": "0.16.0-insiders.20260228-a20b9a7",
|
|
53
52
|
"@univerjs/protocol": "0.1.48",
|
|
54
|
-
"@univerjs/thread-comment
|
|
53
|
+
"@univerjs/thread-comment": "0.16.0-insiders.20260228-a20b9a7",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.16.0-insiders.20260228-a20b9a7"
|
|
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.18",
|
|
61
|
-
"@univerjs-infra/shared": "0.
|
|
61
|
+
"@univerjs-infra/shared": "0.16.0"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|