@univerjs-pro/thread-comment-datasource 0.6.1 → 0.6.2
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/umd/index.js +1 -1
- package/package.json +11 -11
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x153259=_0x573a;function _0x3da2(){const _0x44ccc2=['7EpsGwa','requireSession','_commentService','IConfigService','createTimestamp','map','solved','onStarting','DependentOn','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','15286792FaZMVe','user','Solve','CustomRangeType','getUnit','getComment','/reply','onReady','find','deleteComment','Disposable','rangeType','personId','add','userID','Module','_httpService','@univerjs/thread-comment','addUser','4ivYFez','736516RtegBk','52160339VTCdOA','body','3673645UEmfQE','/list','rxjs','@univerjs/core','UNRECOGNIZED','thread-comment-data-source.config','IThreadCommentDataSourceService','UNIVER_UNKNOWN','customRanges','10LFkNxg','/solved','subscribe','getMemberID','_config','format','listComments','getCurrentUser','resolveComment','_configService','Injector','userId','COMMENT','/universer-api/comment/unit/','type','ThreadCommentModel','_initDataSource','threadId','pluginName','replies','post','getOwnPropertyDescriptor','UniverCollaborationClientPlugin','ref','_threadCommentDataSourceService','dayjs','/edit','code','forEach','UniverThreadCommentDataSourcePlugin','Solved','_threadCommentModel','360966FlGtzm','saveCommentToSnapshot','syncUpdateMutationToColla','/universer-api/user/list','UniverLicensePlugin','Edit','_init','replyId','UserManagerService','error','getUser','bufferTime','Delete','1120958cOlwYp','parse','@univerjs-pro/license','Add','unitId','updateComment','filter','@univerjs-pro/collaboration-client','_sessionService','users','HTTPService','values','14113107RWVsql','rangeId','@univerjs/thread-comment-ui','disposeWithMe','UniverThreadCommentUIPlugin','commentUpdate$','_injector','reply','stringify','get','parentId','delete','YYYY/MM/DD\x20HH:mm','Inject','resolved','dataSource','pipe','CollaborationSessionService','_threadCommentDataSource','6qMRKty','Unknown','Reply','addComment','defineProperty','content','@univerjs/network','payload','_userService','comments','length'];_0x3da2=function(){return _0x44ccc2;};return _0x3da2();}(function(_0x40f8a2,_0x2e68c1){const _0x217744=_0x573a,_0x2411c4=_0x40f8a2();while(!![]){try{const _0x5ab198=-parseInt(_0x217744(0x103))/0x1+parseInt(_0x217744(0x13c))/0x2*(parseInt(_0x217744(0xda))/0x3)+-parseInt(_0x217744(0x102))/0x4*(parseInt(_0x217744(0x106))/0x5)+parseInt(_0x217744(0x12f))/0x6*(parseInt(_0x217744(0xe5))/0x7)+-parseInt(_0x217744(0xef))/0x8+-parseInt(_0x217744(0xc7))/0x9*(parseInt(_0x217744(0x10f))/0xa)+parseInt(_0x217744(0x104))/0xb;if(_0x5ab198===_0x2e68c1)break;else _0x2411c4['push'](_0x2411c4['shift']());}catch(_0x349f55){_0x2411c4['push'](_0x2411c4['shift']());}}}(_0x3da2,0xed7cf));Object[_0x153259(0xde)](exports,Symbol['toStringTag'],{'value':_0x153259(0xfe)});const b=require(_0x153259(0x143)),T=require(_0x153259(0x13e)),c=require(_0x153259(0x109)),j=require(_0x153259(0xc9)),M=require(_0x153259(0x100)),w=require(_0x153259(0x108)),P=require(_0x153259(0xe0)),U=_0x153259(0xee);var I=(_0xc58103=>(_0xc58103[_0xc58103['OpenOrReOpen']=0x0]='OpenOrReOpen',_0xc58103[_0xc58103[_0x153259(0x12d)]=0x1]=_0x153259(0x12d),_0xc58103[_0xc58103['UNRECOGNIZED']=-0x1]=_0x153259(0x10a),_0xc58103))(I||{}),v=(_0x12db65=>(_0x12db65[_0x12db65[_0x153259(0xdb)]=0x0]='Unknown',_0x12db65[_0x12db65['Add']=0x1]=_0x153259(0x13f),_0x12db65[_0x12db65[_0x153259(0xdc)]=0x2]=_0x153259(0xdc),_0x12db65[_0x12db65[_0x153259(0x134)]=0x3]='Edit',_0x12db65[_0x12db65['Delete']=0x4]=_0x153259(0x13b),_0x12db65[_0x12db65[_0x153259(0xf1)]=0x5]='Solve',_0x12db65[_0x12db65[_0x153259(0x10a)]=-0x1]='UNRECOGNIZED',_0x12db65))(v||{});const f=_0x496775=>c['dayjs'](new Date(+_0x496775))[_0x153259(0x114)](_0x153259(0xd3)),R=async(_0xe2191b,_0x57da1e)=>{const _0x2f21e8=_0x153259,_0x2f2065=_0xe2191b['get'](c[_0x2f21e8(0x137)]),_0x37ebab=_0xe2191b['get'](P['HTTPService']);_0x57da1e[_0x2f21e8(0x12b)](_0x26f019=>{const _0x3c2ca4=_0x2f21e8;_0x2f2065[_0x3c2ca4(0x139)](_0x26f019)&&_0x57da1e[_0x3c2ca4(0xd2)](_0x26f019);}),_0x57da1e['size']&&(await _0x37ebab[_0x2f21e8(0xd0)](_0x2f21e8(0x132),{'params':{'userIDs':[..._0x57da1e]}}))[_0x2f21e8(0x105)][_0x2f21e8(0xc4)][_0x2f21e8(0x12b)](_0x123790=>{const _0x2044e7=_0x2f21e8;_0x123790&&_0x2f2065[_0x2044e7(0x101)](_0x123790);});};function _0x573a(_0x44e0f2,_0x6365d8){const _0x3da262=_0x3da2();return _0x573a=function(_0x573a6a,_0x4f6b19){_0x573a6a=_0x573a6a-0xc4;let _0x183c49=_0x3da262[_0x573a6a];return _0x183c49;},_0x573a(_0x44e0f2,_0x6365d8);}var $=Object[_0x153259(0x124)],E=(_0x4e378e,_0x283f08,_0x2239f1,_0x26a02c)=>{for(var _0x242bcc=_0x26a02c>0x1?void 0x0:_0x26a02c?$(_0x283f08,_0x2239f1):_0x283f08,_0x993af4=_0x4e378e['length']-0x1,_0x2b943f;_0x993af4>=0x0;_0x993af4--)(_0x2b943f=_0x4e378e[_0x993af4])&&(_0x242bcc=_0x2b943f(_0x242bcc)||_0x242bcc);return _0x242bcc;},S=(_0x4a0562,_0x4d1423)=>(_0xb07afb,_0x4ba6f6)=>_0x4d1423(_0xb07afb,_0x4ba6f6,_0x4a0562);let p=class extends c[_0x153259(0xf9)]{constructor(_0x31123a,_0x229bb5,_0xab1c50,_0x389c06){const _0x2a2c92=_0x153259;super(),this[_0x2a2c92(0xe7)]=_0x31123a,this['_threadCommentModel']=_0x229bb5,this['_userService']=_0xab1c50,this['_injector']=_0x389c06,this[_0x2a2c92(0x135)](),this['_initUserSync']();}['_initUserSync'](){const _0x4a63ce=_0x153259;this[_0x4a63ce(0xca)](this[_0x4a63ce(0x12e)][_0x4a63ce(0xcc)][_0x4a63ce(0xd7)](w[_0x4a63ce(0x13a)](0x10))[_0x4a63ce(0x111)](_0x30cf12=>{const _0x5d2f7b=new Set();_0x30cf12['forEach'](_0x444ed1=>{const _0x1fb518=_0x573a;switch(_0x444ed1[_0x1fb518(0x11d)]){case _0x1fb518(0xfc):{const _0xf7c9a4=_0x444ed1[_0x1fb518(0xe1)][_0x1fb518(0xfb)];_0x5d2f7b[_0x1fb518(0xfc)](_0xf7c9a4);break;}}}),R(this['_injector'],_0x5d2f7b);}));}[_0x153259(0x135)](){const _0x165a2c=_0x153259;this['disposeWithMe'](this['_commentService'][_0x165a2c(0xcc)][_0x165a2c(0x111)](async _0x6b053c=>{const _0xb6cb6f=_0x165a2c;var _0x5b4a1f,_0x5f21b9,_0x5775e1,_0x389025;const _0x331fff=(_0x5b4a1f=this[_0xb6cb6f(0x12e)]['getUnit'](_0x6b053c[_0xb6cb6f(0x140)])[_0xb6cb6f(0xf7)](_0x267d2b=>_0x267d2b['threadId']===_0x6b053c['threadId']))==null?void 0x0:_0x5b4a1f['root'];if(!_0x331fff)return;const {unitId:_0x34244c,subUnitId:_0x2bcce8}=_0x331fff;switch(_0x6b053c[_0xb6cb6f(0xf0)]&&this[_0xb6cb6f(0xe2)][_0xb6cb6f(0x101)](_0x6b053c['user']),_0x6b053c[_0xb6cb6f(0x11d)]){case v[_0xb6cb6f(0x13f)]:break;case v[_0xb6cb6f(0xdc)]:{this[_0xb6cb6f(0x12e)][_0xb6cb6f(0xdd)](_0x34244c,_0x2bcce8,{'unitId':_0x34244c,'subUnitId':_0x2bcce8,'ref':'','id':_0x6b053c['replyId'],'dT':f(+_0x6b053c[_0xb6cb6f(0xe9)]),'threadId':_0x6b053c['threadId'],'personId':(_0x5775e1=(_0x5f21b9=_0x6b053c['user'])==null?void 0x0:_0x5f21b9[_0xb6cb6f(0xfd)])!=null?_0x5775e1:_0x6b053c[_0xb6cb6f(0x11a)],'text':JSON[_0xb6cb6f(0x13d)](_0x6b053c[_0xb6cb6f(0xdf)]),'parentId':_0x331fff['id']});break;}case v[_0xb6cb6f(0x13b)]:{const _0x12079d=this[_0xb6cb6f(0x12e)][_0xb6cb6f(0xf4)](_0x34244c,_0x2bcce8,_0x6b053c[_0xb6cb6f(0x136)]);_0x12079d&&_0x12079d[_0xb6cb6f(0xd1)]&&this[_0xb6cb6f(0x12e)][_0xb6cb6f(0xf8)](_0x34244c,_0x2bcce8,_0x6b053c[_0xb6cb6f(0x136)]);break;}case v['Edit']:{this[_0xb6cb6f(0x12e)][_0xb6cb6f(0x141)](_0x34244c,_0x2bcce8,{'commentId':_0x6b053c['replyId'],'text':JSON['parse'](_0x6b053c[_0xb6cb6f(0xdf)])});break;}case v[_0xb6cb6f(0xf1)]:{const _0x35b3b2=(_0x389025=this[_0xb6cb6f(0x12e)][_0xb6cb6f(0xf3)](_0x6b053c['unitId'])[_0xb6cb6f(0xf7)](_0x49868a=>_0x49868a[_0xb6cb6f(0x120)]===_0x6b053c[_0xb6cb6f(0x120)]))==null?void 0x0:_0x389025['root'];_0x35b3b2&&this[_0xb6cb6f(0x12e)][_0xb6cb6f(0x117)](_0x34244c,_0x2bcce8,_0x35b3b2['id'],_0x6b053c[_0xb6cb6f(0xeb)]===I[_0xb6cb6f(0x12d)]);break;}}}));}};p=E([S(0x0,c[_0x153259(0xd4)](b['CommentService'])),S(0x1,c['Inject'](M[_0x153259(0x11e)])),S(0x2,c[_0x153259(0xd4)](c[_0x153259(0x137)])),S(0x3,c[_0x153259(0xd4)](c[_0x153259(0x119)]))],p);const q=_0x153259(0x10b),D={};var A=Object[_0x153259(0x124)],x=(_0x5e3839,_0x3bb5ad,_0x424a57,_0x2e5258)=>{const _0x45c3e7=_0x153259;for(var _0x5f5c14=_0x2e5258>0x1?void 0x0:_0x2e5258?A(_0x3bb5ad,_0x424a57):_0x3bb5ad,_0x734136=_0x5e3839[_0x45c3e7(0xe4)]-0x1,_0x1dede9;_0x734136>=0x0;_0x734136--)(_0x1dede9=_0x5e3839[_0x734136])&&(_0x5f5c14=_0x1dede9(_0x5f5c14)||_0x5f5c14);return _0x5f5c14;},_=(_0x55bb87,_0xdabfb3)=>(_0x44693e,_0x31902b)=>_0xdabfb3(_0x44693e,_0x31902b,_0x55bb87);function Y(_0x3e9307,_0xedbab9){const _0x49bde7=_0x153259,_0x12e711=_0x3e9307['replies'][0x0];return{..._0xedbab9,'id':_0x12e711[_0x49bde7(0x136)],'resolved':_0x3e9307[_0x49bde7(0xeb)]===0x1,'dT':f(_0x12e711[_0x49bde7(0xe9)]),'personId':_0x12e711[_0x49bde7(0x11a)],'threadId':_0x12e711[_0x49bde7(0x120)]};}function G(_0x4ab868,_0x460ece,_0x25e337){const _0x475db0=_0x153259;var _0x5bf14f,_0x4a8ace;if(((_0x4a8ace=(_0x5bf14f=_0x4ab868==null?void 0x0:_0x4ab868[_0x475db0(0x122)])==null?void 0x0:_0x5bf14f['length'])!=null?_0x4a8ace:0x0)>0x0){const _0x25a209=(_0x1ec2d8,_0x24ab34)=>({'id':_0x1ec2d8['replyId'],'threadId':_0x1ec2d8['threadId'],'dT':f(_0x1ec2d8['createTimestamp']),'personId':_0x1ec2d8[_0x475db0(0x11a)],'resolved':_0x4ab868['solved']===I[_0x475db0(0x12d)],'unitId':_0x460ece,'subUnitId':_0x25e337,'text':JSON['parse'](_0x1ec2d8['content']),'parentId':_0x24ab34}),_0xec3a50=_0x25a209(_0x4ab868[_0x475db0(0x122)][0x0]);return{..._0xec3a50,'children':_0x4ab868[_0x475db0(0x122)]['slice'](0x1)[_0x475db0(0xea)](_0x3b68e1=>_0x25a209(_0x3b68e1,_0xec3a50['id']))};}return null;}let g=class{constructor(_0x440ffb,_0x3e275d,_0x5d7b98,_0x43c70d){const _0x31d4cf=_0x153259;this[_0x31d4cf(0xff)]=_0x440ffb,this[_0x31d4cf(0xe2)]=_0x3e275d,this['_sessionService']=_0x5d7b98,this[_0x31d4cf(0xcd)]=_0x43c70d;}async[_0x153259(0xdd)](_0x4fed14){const _0x124be3=_0x153259;var _0x56c865,_0x346e6b;const {parentId:_0x5e1d33,unitId:_0x5585e0,text:_0x2191db,threadId:_0x126ce6}=_0x4fed14,_0x3a07d6=(_0x346e6b=(_0x56c865=_0x2191db[_0x124be3(0x10e)])==null?void 0x0:_0x56c865['filter'](_0x19b519=>_0x19b519[_0x124be3(0xfa)]===c[_0x124be3(0xf2)][_0x124be3(0x11b)])[_0x124be3(0xea)](_0x4dbdb8=>_0x4dbdb8[_0x124be3(0xc8)]))!=null?_0x346e6b:[],_0x7594e=JSON[_0x124be3(0xcf)](_0x2191db),_0x5a8fb6=(await this[_0x124be3(0x144)]['requireSession'](_0x5585e0))[_0x124be3(0x112)]();if(_0x5e1d33){const _0x56948b={'memberId':_0x5a8fb6,'unitId':_0x5585e0,'content':_0x7594e,'mention':_0x3a07d6,'threadId':_0x126ce6},_0x353fa9=(await this[_0x124be3(0xff)][_0x124be3(0x123)](_0x124be3(0x11c)+_0x5585e0+_0x124be3(0xf5),{'body':_0x56948b}))[_0x124be3(0x105)][_0x124be3(0xce)];return{..._0x4fed14,'id':_0x353fa9[_0x124be3(0x136)],'dT':c[_0x124be3(0x128)](+_0x353fa9['createTimestamp'])[_0x124be3(0x114)](_0x124be3(0xd3)),'personId':_0x353fa9['userId']};}else{const _0x557eea={'memberId':_0x5a8fb6,'unitId':_0x5585e0,'content':_0x7594e,'mention':_0x3a07d6},_0x53bcdb=await this[_0x124be3(0xff)][_0x124be3(0x123)](_0x124be3(0x11c)+_0x5585e0+'/add',{'body':_0x557eea});return Y(_0x53bcdb[_0x124be3(0x105)]['comment'],_0x4fed14);}}async['updateComment'](_0x5d82a7){const _0xb2b8ab=_0x153259;var _0x1c8d88,_0x4309a6;const {text:_0x1dc847,unitId:_0x21457f}=_0x5d82a7,_0x1acaa3=(_0x4309a6=(_0x1c8d88=_0x1dc847['customRanges'])==null?void 0x0:_0x1c8d88[_0xb2b8ab(0x142)](_0x14d690=>_0x14d690[_0xb2b8ab(0xfa)]===c[_0xb2b8ab(0xf2)]['COMMENT'])['map'](_0x46b2c0=>_0x46b2c0['rangeId']))!=null?_0x4309a6:[],_0x277819=JSON[_0xb2b8ab(0xcf)](_0x1dc847),_0x1a0acf=_0x5d82a7['threadId'],_0x6576f9=_0x5d82a7['id'],_0x35ee97={'memberId':(await this[_0xb2b8ab(0x144)][_0xb2b8ab(0xe6)](_0x21457f))[_0xb2b8ab(0x112)](),'unitId':_0x21457f,'threadId':_0x1a0acf,'mention':_0x1acaa3,'content':_0x277819,'replyId':_0x6576f9},_0x111da2=await this[_0xb2b8ab(0xff)][_0xb2b8ab(0x123)](_0xb2b8ab(0x11c)+_0x21457f+_0xb2b8ab(0x129),{'body':_0x35ee97});return!_0x111da2['body'][_0xb2b8ab(0x138)]||_0x111da2[_0xb2b8ab(0x105)]['error'][_0xb2b8ab(0x12a)]===0x1;}async[_0x153259(0x117)](_0x218fe7){const _0x406fdf=_0x153259,{unitId:_0x39bc9a}=_0x218fe7,_0x8b869=_0x218fe7['threadId'],_0x588471={'memberId':this['_userService'][_0x406fdf(0x116)]()[_0x406fdf(0xfd)],'unitId':_0x39bc9a,'threadId':_0x8b869,'solved':_0x218fe7[_0x406fdf(0xd5)]?I['Solved']:I['OpenOrReOpen']},_0xb6d735=await this[_0x406fdf(0xff)]['post'](_0x406fdf(0x11c)+_0x39bc9a+_0x406fdf(0x110),{'body':_0x588471});return!_0xb6d735['body'][_0x406fdf(0x138)]||_0xb6d735[_0x406fdf(0x105)][_0x406fdf(0x138)][_0x406fdf(0x12a)]===0x1;}async[_0x153259(0xf8)](_0x3c228f,_0x40bf2e,_0x5910ea,_0x2a4cce){const _0x12f587=_0x153259,_0x21b617={'memberId':(await this[_0x12f587(0x144)][_0x12f587(0xe6)](_0x3c228f))[_0x12f587(0x112)](),'threadId':_0x5910ea,'replyId':_0x2a4cce,'unitId':_0x3c228f},_0x35df84=await this[_0x12f587(0xff)][_0x12f587(0x123)](_0x12f587(0x11c)+_0x3c228f+'/delete',{'body':_0x21b617});return!_0x35df84[_0x12f587(0x105)][_0x12f587(0x138)]||_0x35df84[_0x12f587(0x105)]['error'][_0x12f587(0x12a)]===0x1;}async[_0x153259(0x115)](_0xca1bf,_0x4ecb50,_0x4bd003){const _0x5eff24=_0x153259,_0x3b52d5={'unitId':_0xca1bf,'threadId':_0x4bd003},_0x274ab1=await this[_0x5eff24(0xff)][_0x5eff24(0x123)]('/universer-api/comment/unit/'+_0xca1bf+_0x5eff24(0x107),{'body':_0x3b52d5}),_0x2e2e54=_0x4bd003[_0x5eff24(0xea)](_0x1b3152=>G(_0x274ab1[_0x5eff24(0x105)][_0x5eff24(0xe3)][_0x1b3152],_0xca1bf,_0x4ecb50))[_0x5eff24(0x142)](Boolean);return Object[_0x5eff24(0xc6)](_0x274ab1[_0x5eff24(0x105)][_0x5eff24(0xc4)])['forEach'](_0x2b2cd9=>{const _0x181769=_0x5eff24;this[_0x181769(0xe2)][_0x181769(0x101)](_0x2b2cd9);}),_0x2e2e54;}[_0x153259(0x130)](_0x473926){const _0x42d1c8=_0x153259;return{'id':_0x473926['id'],'threadId':_0x473926[_0x42d1c8(0x120)],'ref':_0x473926[_0x42d1c8(0x126)]};}};g=x([_(0x0,c[_0x153259(0xd4)](P[_0x153259(0xc5)])),_(0x1,c[_0x153259(0xd4)](c['UserManagerService'])),_(0x2,c['Inject'](b[_0x153259(0xd8)])),_(0x3,c[_0x153259(0xd4)](c[_0x153259(0x119)]))],g);var H=Object[_0x153259(0x124)],J=(_0x233908,_0x5d0202,_0x5767e7,_0x663d9c)=>{const _0x29f15c=_0x153259;for(var _0x11404b=_0x663d9c>0x1?void 0x0:_0x663d9c?H(_0x5d0202,_0x5767e7):_0x5d0202,_0x26967b=_0x233908[_0x29f15c(0xe4)]-0x1,_0x18f775;_0x26967b>=0x0;_0x26967b--)(_0x18f775=_0x233908[_0x26967b])&&(_0x11404b=_0x18f775(_0x11404b)||_0x11404b);return _0x11404b;},y=(_0x1f41d7,_0x11eafc)=>(_0x3223e9,_0x31c36e)=>_0x11eafc(_0x3223e9,_0x31c36e,_0x1f41d7);let C=class extends c['Disposable']{constructor(_0x45604b,_0x32b273){const _0x1e4233=_0x153259;super(),this[_0x1e4233(0x127)]=_0x45604b,this[_0x1e4233(0xd9)]=_0x32b273,this['_initDataSource']();}[_0x153259(0x11f)](){const _0x5f0ca0=_0x153259;this[_0x5f0ca0(0x127)][_0x5f0ca0(0xd6)]=this[_0x5f0ca0(0xd9)],this[_0x5f0ca0(0x127)][_0x5f0ca0(0x131)]=!0x1;}};C=J([y(0x0,M[_0x153259(0x10c)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x153259(0xde)],L=Object[_0x153259(0x124)],Z=(_0x3ce056,_0x2aaf54,_0xe60ec)=>_0x2aaf54 in _0x3ce056?F(_0x3ce056,_0x2aaf54,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xe60ec}):_0x3ce056[_0x2aaf54]=_0xe60ec,W=(_0x3fe632,_0x45ce44,_0x323244,_0x4899ce)=>{const _0x41bca7=_0x153259;for(var _0x3996cb=_0x4899ce>0x1?void 0x0:_0x4899ce?L(_0x45ce44,_0x323244):_0x45ce44,_0x196e16=_0x3fe632[_0x41bca7(0xe4)]-0x1,_0x314d6c;_0x196e16>=0x0;_0x196e16--)(_0x314d6c=_0x3fe632[_0x196e16])&&(_0x3996cb=_0x314d6c(_0x3996cb)||_0x3996cb);return _0x3996cb;},O=(_0x1b9a58,_0x1535cb)=>(_0x22aa72,_0x55641d)=>_0x1535cb(_0x22aa72,_0x55641d,_0x1b9a58),N=(_0x3a739a,_0x53c538,_0x581cd1)=>Z(_0x3a739a,typeof _0x53c538!='symbol'?_0x53c538+'':_0x53c538,_0x581cd1);exports[_0x153259(0x12c)]=class extends c['Plugin']{constructor(_0xd1394e=D,_0x121799,_0xcdb078){const _0xda47da=_0x153259;super(),this['_config']=_0xd1394e,this[_0xda47da(0xcd)]=_0x121799,this['_configService']=_0xcdb078;const {..._0x4b9835}=c['merge']({},D,this[_0xda47da(0x113)]);this[_0xda47da(0x118)]['setConfig'](q,_0x4b9835);}[_0x153259(0xec)](){const _0x23d7eb=_0x153259;[[g],[C],[p]][_0x23d7eb(0x12b)](_0x512246=>{const _0x41d877=_0x23d7eb;this[_0x41d877(0xcd)][_0x41d877(0xfc)](_0x512246);});}[_0x153259(0xf6)](){const _0x29fa3c=_0x153259;this[_0x29fa3c(0xcd)][_0x29fa3c(0xd0)](C),this[_0x29fa3c(0xcd)]['get'](p);}},N(exports[_0x153259(0x12c)],_0x153259(0x121),U),N(exports[_0x153259(0x12c)],'type',c['UniverInstanceType'][_0x153259(0x10d)]),exports[_0x153259(0x12c)]=W([c[_0x153259(0xed)](j[_0x153259(0xcb)],b[_0x153259(0x125)],T[_0x153259(0x133)]),O(0x1,c[_0x153259(0xd4)](c[_0x153259(0x119)])),O(0x2,c[_0x153259(0xe8)])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';const _0x36155a=_0x5362;(function(_0x347c8f,_0x3f1e39){const _0xce9fd=_0x5362,_0x3518e1=_0x347c8f();while(!![]){try{const _0x2d6555=-parseInt(_0xce9fd(0x1b0))/0x1+-parseInt(_0xce9fd(0x1fb))/0x2*(parseInt(_0xce9fd(0x1f9))/0x3)+-parseInt(_0xce9fd(0x20e))/0x4*(parseInt(_0xce9fd(0x20b))/0x5)+parseInt(_0xce9fd(0x1a1))/0x6*(parseInt(_0xce9fd(0x1f3))/0x7)+-parseInt(_0xce9fd(0x191))/0x8*(-parseInt(_0xce9fd(0x1a5))/0x9)+parseInt(_0xce9fd(0x1a2))/0xa*(parseInt(_0xce9fd(0x1c5))/0xb)+parseInt(_0xce9fd(0x1b4))/0xc*(parseInt(_0xce9fd(0x1a6))/0xd);if(_0x2d6555===_0x3f1e39)break;else _0x3518e1['push'](_0x3518e1['shift']());}catch(_0x93f037){_0x3518e1['push'](_0x3518e1['shift']());}}}(_0x374e,0x49522));Object[_0x36155a(0x204)](exports,Symbol[_0x36155a(0x211)],{'value':_0x36155a(0x1fa)});const b=require(_0x36155a(0x210)),T=require(_0x36155a(0x1cb)),c=require(_0x36155a(0x1d6)),j=require('@univerjs/thread-comment-ui'),M=require(_0x36155a(0x1bf)),w=require(_0x36155a(0x1c6)),P=require(_0x36155a(0x1ab)),U=_0x36155a(0x1b8);var I=(_0x379c06=>(_0x379c06[_0x379c06[_0x36155a(0x1ef)]=0x0]=_0x36155a(0x1ef),_0x379c06[_0x379c06[_0x36155a(0x1cc)]=0x1]=_0x36155a(0x1cc),_0x379c06[_0x379c06['UNRECOGNIZED']=-0x1]=_0x36155a(0x18e),_0x379c06))(I||{}),v=(_0x1cc1a7=>(_0x1cc1a7[_0x1cc1a7[_0x36155a(0x1a9)]=0x0]=_0x36155a(0x1a9),_0x1cc1a7[_0x1cc1a7[_0x36155a(0x1ca)]=0x1]=_0x36155a(0x1ca),_0x1cc1a7[_0x1cc1a7[_0x36155a(0x1e2)]=0x2]=_0x36155a(0x1e2),_0x1cc1a7[_0x1cc1a7[_0x36155a(0x194)]=0x3]=_0x36155a(0x194),_0x1cc1a7[_0x1cc1a7[_0x36155a(0x196)]=0x4]=_0x36155a(0x196),_0x1cc1a7[_0x1cc1a7[_0x36155a(0x19a)]=0x5]=_0x36155a(0x19a),_0x1cc1a7[_0x1cc1a7[_0x36155a(0x18e)]=-0x1]=_0x36155a(0x18e),_0x1cc1a7))(v||{});const f=_0x1402e1=>c['dayjs'](new Date(+_0x1402e1))[_0x36155a(0x199)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x2f90d3,_0x47eb6a)=>{const _0x20cae1=_0x36155a,_0x484113=_0x2f90d3[_0x20cae1(0x1d3)](c[_0x20cae1(0x193)]),_0x259369=_0x2f90d3[_0x20cae1(0x1d3)](P['HTTPService']);_0x47eb6a[_0x20cae1(0x1db)](_0x3aa0bc=>{const _0x9bd1b1=_0x20cae1;_0x484113[_0x9bd1b1(0x212)](_0x3aa0bc)&&_0x47eb6a[_0x9bd1b1(0x1e1)](_0x3aa0bc);}),_0x47eb6a[_0x20cae1(0x19f)]&&(await _0x259369[_0x20cae1(0x1d3)](_0x20cae1(0x195),{'params':{'userIDs':[..._0x47eb6a]}}))[_0x20cae1(0x1f4)]['users']['forEach'](_0x40cd0e=>{const _0x13733f=_0x20cae1;_0x40cd0e&&_0x484113[_0x13733f(0x1f2)](_0x40cd0e);});};var $=Object[_0x36155a(0x1ba)],E=(_0x4dd63d,_0x388d68,_0x3f390c,_0x1d00c2)=>{const _0x4d09cb=_0x36155a;for(var _0x1d780c=_0x1d00c2>0x1?void 0x0:_0x1d00c2?$(_0x388d68,_0x3f390c):_0x388d68,_0x57408c=_0x4dd63d[_0x4d09cb(0x216)]-0x1,_0x1b2ece;_0x57408c>=0x0;_0x57408c--)(_0x1b2ece=_0x4dd63d[_0x57408c])&&(_0x1d780c=_0x1b2ece(_0x1d780c)||_0x1d780c);return _0x1d780c;},S=(_0x2c3e1d,_0x30500c)=>(_0x14eb89,_0x117599)=>_0x30500c(_0x14eb89,_0x117599,_0x2c3e1d);let p=class extends c['Disposable']{constructor(_0x3dd9c7,_0x46b594,_0x5e6e95,_0x48bd2f){const _0xc9e584=_0x36155a;super(),this[_0xc9e584(0x208)]=_0x3dd9c7,this[_0xc9e584(0x1e3)]=_0x46b594,this[_0xc9e584(0x1c3)]=_0x5e6e95,this[_0xc9e584(0x1fd)]=_0x48bd2f,this[_0xc9e584(0x217)](),this['_initUserSync']();}[_0x36155a(0x1ae)](){const _0x1fcc9b=_0x36155a;this['disposeWithMe'](this['_threadCommentModel'][_0x1fcc9b(0x19b)][_0x1fcc9b(0x19c)](w[_0x1fcc9b(0x1ff)](0x10))[_0x1fcc9b(0x1a0)](_0x405129=>{const _0x12bb9f=_0x1fcc9b,_0x33464a=new Set();_0x405129[_0x12bb9f(0x1db)](_0x5d2745=>{const _0x561fe4=_0x12bb9f;switch(_0x5d2745[_0x561fe4(0x1f7)]){case _0x561fe4(0x1d1):{const _0x4cc317=_0x5d2745['payload'][_0x561fe4(0x1e6)];_0x33464a[_0x561fe4(0x1d1)](_0x4cc317);break;}}}),R(this['_injector'],_0x33464a);}));}['_init'](){const _0x123b15=_0x36155a;this[_0x123b15(0x1e8)](this[_0x123b15(0x208)]['commentUpdate$']['subscribe'](async _0x3a64e7=>{const _0x4c5b9d=_0x123b15;var _0x6b3c04,_0x116769,_0x99df78,_0x3c8e22;const _0x51ab3c=(_0x6b3c04=this[_0x4c5b9d(0x1e3)]['getUnit'](_0x3a64e7['unitId'])['find'](_0x5b02a7=>_0x5b02a7[_0x4c5b9d(0x1c9)]===_0x3a64e7['threadId']))==null?void 0x0:_0x6b3c04[_0x4c5b9d(0x1d8)];if(!_0x51ab3c)return;const {unitId:_0x86b56c,subUnitId:_0x22696b}=_0x51ab3c;switch(_0x3a64e7[_0x4c5b9d(0x206)]&&this[_0x4c5b9d(0x1c3)][_0x4c5b9d(0x1f2)](_0x3a64e7[_0x4c5b9d(0x206)]),_0x3a64e7['type']){case v[_0x4c5b9d(0x1ca)]:break;case v[_0x4c5b9d(0x1e2)]:{this[_0x4c5b9d(0x1e3)][_0x4c5b9d(0x1ce)](_0x86b56c,_0x22696b,{'unitId':_0x86b56c,'subUnitId':_0x22696b,'ref':'','id':_0x3a64e7['replyId'],'dT':f(+_0x3a64e7['createTimestamp']),'threadId':_0x3a64e7[_0x4c5b9d(0x1c9)],'personId':(_0x99df78=(_0x116769=_0x3a64e7[_0x4c5b9d(0x206)])==null?void 0x0:_0x116769['userID'])!=null?_0x99df78:_0x3a64e7[_0x4c5b9d(0x1d0)],'text':JSON[_0x4c5b9d(0x1c8)](_0x3a64e7[_0x4c5b9d(0x1f8)]),'parentId':_0x51ab3c['id']});break;}case v[_0x4c5b9d(0x196)]:{const _0x75d090=this[_0x4c5b9d(0x1e3)][_0x4c5b9d(0x1d2)](_0x86b56c,_0x22696b,_0x3a64e7[_0x4c5b9d(0x198)]);_0x75d090&&_0x75d090[_0x4c5b9d(0x1ac)]&&this[_0x4c5b9d(0x1e3)][_0x4c5b9d(0x18d)](_0x86b56c,_0x22696b,_0x3a64e7[_0x4c5b9d(0x198)]);break;}case v['Edit']:{this[_0x4c5b9d(0x1e3)][_0x4c5b9d(0x1f1)](_0x86b56c,_0x22696b,{'commentId':_0x3a64e7[_0x4c5b9d(0x198)],'text':JSON[_0x4c5b9d(0x1c8)](_0x3a64e7[_0x4c5b9d(0x1f8)])});break;}case v['Solve']:{const _0x189ade=(_0x3c8e22=this[_0x4c5b9d(0x1e3)][_0x4c5b9d(0x1b3)](_0x3a64e7[_0x4c5b9d(0x201)])[_0x4c5b9d(0x1ea)](_0x1ab160=>_0x1ab160[_0x4c5b9d(0x1c9)]===_0x3a64e7[_0x4c5b9d(0x1c9)]))==null?void 0x0:_0x3c8e22[_0x4c5b9d(0x1d8)];_0x189ade&&this[_0x4c5b9d(0x1e3)][_0x4c5b9d(0x1cd)](_0x86b56c,_0x22696b,_0x189ade['id'],_0x3a64e7[_0x4c5b9d(0x1c1)]===I[_0x4c5b9d(0x1cc)]);break;}}}));}};p=E([S(0x0,c[_0x36155a(0x197)](b['CommentService'])),S(0x1,c[_0x36155a(0x197)](M[_0x36155a(0x1b7)])),S(0x2,c[_0x36155a(0x197)](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x36155a(0x218)]))],p);const q=_0x36155a(0x1e5),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x397994,_0xc93a58,_0x140f70,_0x39a49e)=>{for(var _0x46b8c1=_0x39a49e>0x1?void 0x0:_0x39a49e?A(_0xc93a58,_0x140f70):_0xc93a58,_0x486b26=_0x397994['length']-0x1,_0x26b1a0;_0x486b26>=0x0;_0x486b26--)(_0x26b1a0=_0x397994[_0x486b26])&&(_0x46b8c1=_0x26b1a0(_0x46b8c1)||_0x46b8c1);return _0x46b8c1;},_=(_0x49dde2,_0xb2f56b)=>(_0x3f0d1d,_0x3fbbd0)=>_0xb2f56b(_0x3f0d1d,_0x3fbbd0,_0x49dde2);function Y(_0x13b2e1,_0x2e9c72){const _0x2afc43=_0x36155a,_0xfc6e35=_0x13b2e1[_0x2afc43(0x1d4)][0x0];return{..._0x2e9c72,'id':_0xfc6e35[_0x2afc43(0x198)],'resolved':_0x13b2e1[_0x2afc43(0x1c1)]===0x1,'dT':f(_0xfc6e35[_0x2afc43(0x1be)]),'personId':_0xfc6e35['userId'],'threadId':_0xfc6e35[_0x2afc43(0x1c9)]};}function G(_0x2202c9,_0x18e323,_0x2ad138){const _0x4a1c0f=_0x36155a;var _0x5cee34,_0x36d095;if(((_0x36d095=(_0x5cee34=_0x2202c9==null?void 0x0:_0x2202c9[_0x4a1c0f(0x1d4)])==null?void 0x0:_0x5cee34[_0x4a1c0f(0x216)])!=null?_0x36d095:0x0)>0x0){const _0x45f42f=(_0x97dfde,_0x516cfc)=>({'id':_0x97dfde[_0x4a1c0f(0x198)],'threadId':_0x97dfde['threadId'],'dT':f(_0x97dfde[_0x4a1c0f(0x1be)]),'personId':_0x97dfde['userId'],'resolved':_0x2202c9[_0x4a1c0f(0x1c1)]===I[_0x4a1c0f(0x1cc)],'unitId':_0x18e323,'subUnitId':_0x2ad138,'text':JSON['parse'](_0x97dfde['content']),'parentId':_0x516cfc}),_0x38c074=_0x45f42f(_0x2202c9[_0x4a1c0f(0x1d4)][0x0]);return{..._0x38c074,'children':_0x2202c9[_0x4a1c0f(0x1d4)]['slice'](0x1)[_0x4a1c0f(0x203)](_0x1b9ed1=>_0x45f42f(_0x1b9ed1,_0x38c074['id']))};}return null;}let g=class{constructor(_0x3b1a11,_0xe94ebe,_0x261bb2,_0x402e99){const _0x3e6e7d=_0x36155a;this[_0x3e6e7d(0x1dd)]=_0x3b1a11,this['_userService']=_0xe94ebe,this[_0x3e6e7d(0x1ec)]=_0x261bb2,this[_0x3e6e7d(0x1fd)]=_0x402e99;}async[_0x36155a(0x1ce)](_0x1267d3){const _0xc24f0b=_0x36155a;var _0x3818d2,_0x564b78;const {parentId:_0x430103,unitId:_0xb10179,text:_0xb27a63,threadId:_0x21e17b}=_0x1267d3,_0x2b6590=(_0x564b78=(_0x3818d2=_0xb27a63[_0xc24f0b(0x1bb)])==null?void 0x0:_0x3818d2[_0xc24f0b(0x1bc)](_0x544b5a=>_0x544b5a[_0xc24f0b(0x1a3)]===c[_0xc24f0b(0x20a)]['COMMENT'])[_0xc24f0b(0x203)](_0x3717c2=>_0x3717c2['rangeId']))!=null?_0x564b78:[],_0x50bfae=JSON[_0xc24f0b(0x214)](_0xb27a63),_0x1723a6=(await this[_0xc24f0b(0x1ec)][_0xc24f0b(0x205)](_0xb10179))[_0xc24f0b(0x1d9)]();if(_0x430103){const _0x19a4e3={'memberId':_0x1723a6,'unitId':_0xb10179,'content':_0x50bfae,'mention':_0x2b6590,'threadId':_0x21e17b},_0x5a75d1=(await this[_0xc24f0b(0x1dd)][_0xc24f0b(0x202)](_0xc24f0b(0x1f5)+_0xb10179+_0xc24f0b(0x190),{'body':_0x19a4e3}))['body'][_0xc24f0b(0x1ee)];return{..._0x1267d3,'id':_0x5a75d1[_0xc24f0b(0x198)],'dT':c[_0xc24f0b(0x1c4)](+_0x5a75d1[_0xc24f0b(0x1be)])[_0xc24f0b(0x199)](_0xc24f0b(0x1e0)),'personId':_0x5a75d1['userId']};}else{const _0x28fa3b={'memberId':_0x1723a6,'unitId':_0xb10179,'content':_0x50bfae,'mention':_0x2b6590},_0x34712a=await this[_0xc24f0b(0x1dd)]['post'](_0xc24f0b(0x1f5)+_0xb10179+_0xc24f0b(0x1a7),{'body':_0x28fa3b});return Y(_0x34712a[_0xc24f0b(0x1f4)][_0xc24f0b(0x1ed)],_0x1267d3);}}async[_0x36155a(0x1f1)](_0xf5677a){const _0x25ae6b=_0x36155a;var _0x10cb9a,_0x3b42ec;const {text:_0x80b723,unitId:_0x37c048}=_0xf5677a,_0xf7f777=(_0x3b42ec=(_0x10cb9a=_0x80b723['customRanges'])==null?void 0x0:_0x10cb9a[_0x25ae6b(0x1bc)](_0x5802f9=>_0x5802f9[_0x25ae6b(0x1a3)]===c[_0x25ae6b(0x20a)][_0x25ae6b(0x1e9)])['map'](_0x156094=>_0x156094[_0x25ae6b(0x1cf)]))!=null?_0x3b42ec:[],_0x4ef2cf=JSON[_0x25ae6b(0x214)](_0x80b723),_0x438611=_0xf5677a[_0x25ae6b(0x1c9)],_0x8c5d84=_0xf5677a['id'],_0x3fe365={'memberId':(await this['_sessionService']['requireSession'](_0x37c048))[_0x25ae6b(0x1d9)](),'unitId':_0x37c048,'threadId':_0x438611,'mention':_0xf7f777,'content':_0x4ef2cf,'replyId':_0x8c5d84},_0x3f13ec=await this[_0x25ae6b(0x1dd)][_0x25ae6b(0x202)](_0x25ae6b(0x1f5)+_0x37c048+_0x25ae6b(0x1b1),{'body':_0x3fe365});return!_0x3f13ec[_0x25ae6b(0x1f4)]['error']||_0x3f13ec[_0x25ae6b(0x1f4)][_0x25ae6b(0x1fe)][_0x25ae6b(0x19e)]===0x1;}async[_0x36155a(0x1cd)](_0x43522d){const _0x37890c=_0x36155a,{unitId:_0x730f06}=_0x43522d,_0x505f0d=_0x43522d[_0x37890c(0x1c9)],_0x3d734c={'memberId':this[_0x37890c(0x1c3)][_0x37890c(0x1df)]()[_0x37890c(0x18f)],'unitId':_0x730f06,'threadId':_0x505f0d,'solved':_0x43522d[_0x37890c(0x1c7)]?I['Solved']:I[_0x37890c(0x1ef)]},_0x51c68e=await this['_httpService'][_0x37890c(0x202)](_0x37890c(0x1f5)+_0x730f06+_0x37890c(0x1de),{'body':_0x3d734c});return!_0x51c68e[_0x37890c(0x1f4)][_0x37890c(0x1fe)]||_0x51c68e[_0x37890c(0x1f4)][_0x37890c(0x1fe)][_0x37890c(0x19e)]===0x1;}async[_0x36155a(0x18d)](_0x5d96dc,_0x25f4b1,_0x32cd8a,_0x57ed6a){const _0xb9b723=_0x36155a,_0x3b2133={'memberId':(await this['_sessionService'][_0xb9b723(0x205)](_0x5d96dc))[_0xb9b723(0x1d9)](),'threadId':_0x32cd8a,'replyId':_0x57ed6a,'unitId':_0x5d96dc},_0x57993d=await this[_0xb9b723(0x1dd)]['post'](_0xb9b723(0x1f5)+_0x5d96dc+_0xb9b723(0x1b5),{'body':_0x3b2133});return!_0x57993d[_0xb9b723(0x1f4)][_0xb9b723(0x1fe)]||_0x57993d[_0xb9b723(0x1f4)][_0xb9b723(0x1fe)]['code']===0x1;}async[_0x36155a(0x1fc)](_0x19cb0a,_0x3c9975,_0x5c495e){const _0x4badca=_0x36155a,_0x2da396={'unitId':_0x19cb0a,'threadId':_0x5c495e},_0x10fcbe=await this[_0x4badca(0x1dd)]['post']('/universer-api/comment/unit/'+_0x19cb0a+_0x4badca(0x1c0),{'body':_0x2da396}),_0x41c389=_0x5c495e['map'](_0x5cbf2d=>G(_0x10fcbe['body']['comments'][_0x5cbf2d],_0x19cb0a,_0x3c9975))[_0x4badca(0x1bc)](Boolean);return Object[_0x4badca(0x1b6)](_0x10fcbe[_0x4badca(0x1f4)][_0x4badca(0x1ad)])[_0x4badca(0x1db)](_0x1d92e6=>{const _0x22a6cc=_0x4badca;this[_0x22a6cc(0x1c3)][_0x22a6cc(0x1f2)](_0x1d92e6);}),_0x41c389;}[_0x36155a(0x1a8)](_0x201acd){const _0x40a234=_0x36155a;return{'id':_0x201acd['id'],'threadId':_0x201acd[_0x40a234(0x1c9)],'ref':_0x201acd[_0x40a234(0x1e7)]};}};function _0x5362(_0x436b95,_0x3f2868){const _0x374eb0=_0x374e();return _0x5362=function(_0x5362cc,_0x3d30c1){_0x5362cc=_0x5362cc-0x18d;let _0x4108fb=_0x374eb0[_0x5362cc];return _0x4108fb;},_0x5362(_0x436b95,_0x3f2868);}g=x([_(0x0,c[_0x36155a(0x197)](P[_0x36155a(0x19d)])),_(0x1,c[_0x36155a(0x197)](c[_0x36155a(0x193)])),_(0x2,c['Inject'](b[_0x36155a(0x1aa)])),_(0x3,c[_0x36155a(0x197)](c[_0x36155a(0x218)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0xeb10eb,_0x12a2e9,_0x23d3a8,_0x8936b2)=>{const _0x3bf85f=_0x36155a;for(var _0xc21ae6=_0x8936b2>0x1?void 0x0:_0x8936b2?H(_0x12a2e9,_0x23d3a8):_0x12a2e9,_0x240712=_0xeb10eb[_0x3bf85f(0x216)]-0x1,_0x1ad6f8;_0x240712>=0x0;_0x240712--)(_0x1ad6f8=_0xeb10eb[_0x240712])&&(_0xc21ae6=_0x1ad6f8(_0xc21ae6)||_0xc21ae6);return _0xc21ae6;},y=(_0x4c3b62,_0x2d77cc)=>(_0x21316b,_0x3f0832)=>_0x2d77cc(_0x21316b,_0x3f0832,_0x4c3b62);let C=class extends c[_0x36155a(0x1bd)]{constructor(_0x1dde57,_0x365be2){const _0x16ef70=_0x36155a;super(),this[_0x16ef70(0x1c2)]=_0x1dde57,this[_0x16ef70(0x207)]=_0x365be2,this[_0x16ef70(0x1d5)]();}[_0x36155a(0x1d5)](){const _0x327b35=_0x36155a;this[_0x327b35(0x1c2)][_0x327b35(0x192)]=this[_0x327b35(0x207)],this[_0x327b35(0x1c2)][_0x327b35(0x1da)]=!0x1;}};function _0x374e(){const _0x4efb77=['forEach','pluginName','_httpService','/solved','getCurrentUser','YYYY/MM/DD\x20HH:mm','delete','Reply','_threadCommentModel','Plugin','thread-comment-data-source.config','personId','ref','disposeWithMe','COMMENT','find','symbol','_sessionService','comment','reply','OpenOrReOpen','UniverCollaborationClientPlugin','updateComment','addUser','49SNXnvx','body','/universer-api/comment/unit/','UNIVER_UNKNOWN','type','content','101397FGImzt','Module','2swsEtN','listComments','_injector','error','bufferTime','setConfig','unitId','post','map','defineProperty','requireSession','user','_threadCommentDataSource','_commentService','UniverThreadCommentUIPlugin','CustomRangeType','29740itYsBL','UniverInstanceType','_configService','8hIHRqJ','DependentOn','@univerjs-pro/collaboration-client','toStringTag','getUser','merge','stringify','onReady','length','_init','Injector','deleteComment','UNRECOGNIZED','userID','/reply','352392sDYQBa','dataSource','UserManagerService','Edit','/universer-api/user/list','Delete','Inject','replyId','format','Solve','commentUpdate$','pipe','HTTPService','code','size','subscribe','11838CiItpT','262970lTvodi','rangeType','UniverThreadCommentDataSourcePlugin','36DomRgc','3524339CNbVJC','/add','saveCommentToSnapshot','Unknown','CollaborationSessionService','@univerjs/network','parentId','users','_initUserSync','UniverLicensePlugin','193984hgzMXh','/edit','IThreadCommentDataSourceService','getUnit','12WQyekx','/delete','values','ThreadCommentModel','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','IConfigService','getOwnPropertyDescriptor','customRanges','filter','Disposable','createTimestamp','@univerjs/thread-comment','/list','solved','_threadCommentDataSourceService','_userService','dayjs','33KOqZCS','rxjs','resolved','parse','threadId','Add','@univerjs-pro/license','Solved','resolveComment','addComment','rangeId','userId','add','getComment','get','replies','_initDataSource','@univerjs/core','_config','root','getMemberID','syncUpdateMutationToColla'];_0x374e=function(){return _0x4efb77;};return _0x374e();}C=J([y(0x0,M[_0x36155a(0x1b2)]),y(0x1,c['Inject'](g))],C);var F=Object['defineProperty'],L=Object[_0x36155a(0x1ba)],Z=(_0x52ba7e,_0x4d94d3,_0x30f673)=>_0x4d94d3 in _0x52ba7e?F(_0x52ba7e,_0x4d94d3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x30f673}):_0x52ba7e[_0x4d94d3]=_0x30f673,W=(_0x4fab5a,_0x1abf17,_0x59833f,_0x49e22f)=>{const _0x55ca05=_0x36155a;for(var _0x5b7a76=_0x49e22f>0x1?void 0x0:_0x49e22f?L(_0x1abf17,_0x59833f):_0x1abf17,_0x5a598c=_0x4fab5a[_0x55ca05(0x216)]-0x1,_0xecbeff;_0x5a598c>=0x0;_0x5a598c--)(_0xecbeff=_0x4fab5a[_0x5a598c])&&(_0x5b7a76=_0xecbeff(_0x5b7a76)||_0x5b7a76);return _0x5b7a76;},O=(_0x28f1c7,_0x4a95fb)=>(_0x83ca4f,_0x3b537f)=>_0x4a95fb(_0x83ca4f,_0x3b537f,_0x28f1c7),N=(_0x2b4baa,_0x322063,_0x36a352)=>Z(_0x2b4baa,typeof _0x322063!=_0x36155a(0x1eb)?_0x322063+'':_0x322063,_0x36a352);exports[_0x36155a(0x1a4)]=class extends c[_0x36155a(0x1e4)]{constructor(_0xe0e9eb=D,_0x2a2dc1,_0x2d28f9){const _0x324650=_0x36155a;super(),this['_config']=_0xe0e9eb,this[_0x324650(0x1fd)]=_0x2a2dc1,this[_0x324650(0x20d)]=_0x2d28f9;const {..._0x39593f}=c[_0x324650(0x213)]({},D,this[_0x324650(0x1d7)]);this['_configService'][_0x324650(0x200)](q,_0x39593f);}['onStarting'](){[[g],[C],[p]]['forEach'](_0xb3d572=>{const _0x42799e=_0x5362;this[_0x42799e(0x1fd)][_0x42799e(0x1d1)](_0xb3d572);});}[_0x36155a(0x215)](){const _0xedb4de=_0x36155a;this[_0xedb4de(0x1fd)][_0xedb4de(0x1d3)](C),this[_0xedb4de(0x1fd)][_0xedb4de(0x1d3)](p);}},N(exports[_0x36155a(0x1a4)],_0x36155a(0x1dc),U),N(exports[_0x36155a(0x1a4)],_0x36155a(0x1f7),c[_0x36155a(0x20c)][_0x36155a(0x1f6)]),exports[_0x36155a(0x1a4)]=W([c[_0x36155a(0x20f)](j[_0x36155a(0x209)],b[_0x36155a(0x1f0)],T[_0x36155a(0x1af)]),O(0x1,c[_0x36155a(0x197)](c[_0x36155a(0x218)])),O(0x2,c[_0x36155a(0x1b9)])],exports[_0x36155a(0x1a4)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3f576e=_0x2bba;(function(_0x8fc6b8,_0x31236a){const _0x4e00a6=_0x2bba,_0x2260fc=_0x8fc6b8();while(!![]){try{const _0x2134fb=-parseInt(_0x4e00a6(0x165))/0x1+-parseInt(_0x4e00a6(0x17b))/0x2+-parseInt(_0x4e00a6(0x186))/0x3*(-parseInt(_0x4e00a6(0x160))/0x4)+parseInt(_0x4e00a6(0x157))/0x5+-parseInt(_0x4e00a6(0x13b))/0x6*(-parseInt(_0x4e00a6(0x188))/0x7)+-parseInt(_0x4e00a6(0x137))/0x8+-parseInt(_0x4e00a6(0x13d))/0x9*(-parseInt(_0x4e00a6(0x19a))/0xa);if(_0x2134fb===_0x31236a)break;else _0x2260fc['push'](_0x2260fc['shift']());}catch(_0x3928ea){_0x2260fc['push'](_0x2260fc['shift']());}}}(_0x1891,0x771ec));import{CommentService as _0x5e1c55,CollaborationSessionService as _0x204e5c,UniverCollaborationClientPlugin as _0x5c2273}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x135297}from'@univerjs-pro/license';import{dayjs as _0x2a150e,UserManagerService as _0x2a30d4,Inject as _0x592b52,Injector as _0x4a76a3,Disposable as _0x9723fb,CustomRangeType as _0xae705a,UniverInstanceType as _0x42e5e1,DependentOn as _0x1b0624,IConfigService as _0x1b40d4,Plugin as _0x583448,merge as _0x3c6b71}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x7d5c51}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x13689c,IThreadCommentDataSourceService as _0x3137f2}from'@univerjs/thread-comment';import{bufferTime as _0x5c3244}from'rxjs';import{HTTPService as _0x588dab}from'@univerjs/network';const W=_0x3f576e(0x18b);var I=(_0x17370e=>(_0x17370e[_0x17370e['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x17370e[_0x17370e[_0x3f576e(0x154)]=0x1]=_0x3f576e(0x154),_0x17370e[_0x17370e[_0x3f576e(0x16e)]=-0x1]=_0x3f576e(0x16e),_0x17370e))(I||{}),v=(_0x571eb8=>(_0x571eb8[_0x571eb8[_0x3f576e(0x187)]=0x0]=_0x3f576e(0x187),_0x571eb8[_0x571eb8['Add']=0x1]=_0x3f576e(0x138),_0x571eb8[_0x571eb8[_0x3f576e(0x164)]=0x2]=_0x3f576e(0x164),_0x571eb8[_0x571eb8[_0x3f576e(0x17d)]=0x3]='Edit',_0x571eb8[_0x571eb8[_0x3f576e(0x18e)]=0x4]=_0x3f576e(0x18e),_0x571eb8[_0x571eb8['Solve']=0x5]=_0x3f576e(0x18a),_0x571eb8[_0x571eb8['UNRECOGNIZED']=-0x1]=_0x3f576e(0x16e),_0x571eb8))(v||{});const D=_0x20d79b=>_0x2a150e(new Date(+_0x20d79b))[_0x3f576e(0x197)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x398d7b,_0x4f34e1)=>{const _0x284fc5=_0x3f576e,_0xa22078=_0x398d7b[_0x284fc5(0x18d)](_0x2a30d4),_0x46095f=_0x398d7b['get'](_0x588dab);_0x4f34e1[_0x284fc5(0x182)](_0x3d6165=>{const _0x5caf99=_0x284fc5;_0xa22078[_0x5caf99(0x169)](_0x3d6165)&&_0x4f34e1[_0x5caf99(0x13f)](_0x3d6165);}),_0x4f34e1[_0x284fc5(0x189)]&&(await _0x46095f[_0x284fc5(0x18d)](_0x284fc5(0x155),{'params':{'userIDs':[..._0x4f34e1]}}))['body'][_0x284fc5(0x13a)][_0x284fc5(0x182)](_0x3fa92c=>{const _0xf5a411=_0x284fc5;_0x3fa92c&&_0xa22078[_0xf5a411(0x172)](_0x3fa92c);});};function _0x1891(){const _0x3330e0=['onReady','parse','addUser','_configService','filter','_initUserSync','_commentService','resolveComment','rangeType','/solved','dataSource','1125664EIijNR','getUnit','Edit','thread-comment-data-source.config','_config','customRanges','parentId','forEach','values','_threadCommentDataSourceService','body','447Wxkvyq','Unknown','14Wmbwta','size','Solve','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','deleteComment','get','Delete','createTimestamp','user','commentUpdate$','symbol','/delete','listComments','root','error','format','_init','requireSession','615670SavEmg','getMemberID','/add','unitId','/list','5087032COvAAV','Add','personId','users','114330VolXZP','_threadCommentModel','117LZjAlx','_sessionService','delete','getOwnPropertyDescriptor','COMMENT','OpenOrReOpen','find','length','_threadCommentDataSource','content','disposeWithMe','saveCommentToSnapshot','/universer-api/comment/unit/','code','reply','post','_httpService','comments','add','onStarting','slice','_injector','threadId','Solved','/universer-api/user/list','comment','279975kGAILP','replies','rangeId','subscribe','solved','userID','/reply','_initDataSource','defineProperty','24864eelevK','map','type','replyId','Reply','134033YklwcN','UNIVER_UNKNOWN','updateComment','syncUpdateMutationToColla','getUser','userId','addComment','_userService','setConfig','UNRECOGNIZED','stringify'];_0x1891=function(){return _0x3330e0;};return _0x1891();}var K=Object[_0x3f576e(0x140)],V=(_0x4d70c4,_0x307f50,_0x4de368,_0x5f176a)=>{const _0x17aaca=_0x3f576e;for(var _0x1ef6c3=_0x5f176a>0x1?void 0x0:_0x5f176a?K(_0x307f50,_0x4de368):_0x307f50,_0x9719ed=_0x4d70c4[_0x17aaca(0x144)]-0x1,_0x3a2416;_0x9719ed>=0x0;_0x9719ed--)(_0x3a2416=_0x4d70c4[_0x9719ed])&&(_0x1ef6c3=_0x3a2416(_0x1ef6c3)||_0x1ef6c3);return _0x1ef6c3;},p=(_0x29ae7a,_0x45ce74)=>(_0x538d1c,_0x3f0d04)=>_0x45ce74(_0x538d1c,_0x3f0d04,_0x29ae7a);let S=class extends _0x9723fb{constructor(_0x23c811,_0x24c69a,_0x30f5fa,_0x356520){const _0xcfb457=_0x3f576e;super(),this[_0xcfb457(0x176)]=_0x23c811,this['_threadCommentModel']=_0x24c69a,this[_0xcfb457(0x16c)]=_0x30f5fa,this['_injector']=_0x356520,this[_0xcfb457(0x198)](),this[_0xcfb457(0x175)]();}['_initUserSync'](){const _0x484262=_0x3f576e;this[_0x484262(0x147)](this['_threadCommentModel'][_0x484262(0x191)]['pipe'](_0x5c3244(0x10))[_0x484262(0x15a)](_0x193d1d=>{const _0x49ed96=_0x484262,_0x2ccb6e=new Set();_0x193d1d['forEach'](_0x2ec015=>{const _0x5c761c=_0x2bba;switch(_0x2ec015['type']){case _0x5c761c(0x14f):{const _0x3ffbe6=_0x2ec015['payload'][_0x5c761c(0x139)];_0x2ccb6e['add'](_0x3ffbe6);break;}}}),B(this[_0x49ed96(0x152)],_0x2ccb6e);}));}[_0x3f576e(0x198)](){const _0x2b2210=_0x3f576e;this[_0x2b2210(0x147)](this[_0x2b2210(0x176)][_0x2b2210(0x191)][_0x2b2210(0x15a)](async _0x8fd85c=>{const _0x46ec60=_0x2b2210;var _0x24292a,_0x457c6a,_0x237f77,_0x1df3fd;const _0x19ebfc=(_0x24292a=this['_threadCommentModel'][_0x46ec60(0x17c)](_0x8fd85c[_0x46ec60(0x19d)])[_0x46ec60(0x143)](_0x222b6c=>_0x222b6c[_0x46ec60(0x153)]===_0x8fd85c[_0x46ec60(0x153)]))==null?void 0x0:_0x24292a['root'];if(!_0x19ebfc)return;const {unitId:_0x589714,subUnitId:_0xae0290}=_0x19ebfc;switch(_0x8fd85c[_0x46ec60(0x190)]&&this[_0x46ec60(0x16c)][_0x46ec60(0x172)](_0x8fd85c[_0x46ec60(0x190)]),_0x8fd85c[_0x46ec60(0x162)]){case v[_0x46ec60(0x138)]:break;case v[_0x46ec60(0x164)]:{this[_0x46ec60(0x13c)][_0x46ec60(0x16b)](_0x589714,_0xae0290,{'unitId':_0x589714,'subUnitId':_0xae0290,'ref':'','id':_0x8fd85c[_0x46ec60(0x163)],'dT':D(+_0x8fd85c[_0x46ec60(0x18f)]),'threadId':_0x8fd85c[_0x46ec60(0x153)],'personId':(_0x237f77=(_0x457c6a=_0x8fd85c[_0x46ec60(0x190)])==null?void 0x0:_0x457c6a[_0x46ec60(0x15c)])!=null?_0x237f77:_0x8fd85c['userId'],'text':JSON[_0x46ec60(0x171)](_0x8fd85c[_0x46ec60(0x146)]),'parentId':_0x19ebfc['id']});break;}case v[_0x46ec60(0x18e)]:{const _0x433285=this['_threadCommentModel']['getComment'](_0x589714,_0xae0290,_0x8fd85c[_0x46ec60(0x163)]);_0x433285&&_0x433285[_0x46ec60(0x181)]&&this[_0x46ec60(0x13c)][_0x46ec60(0x18c)](_0x589714,_0xae0290,_0x8fd85c[_0x46ec60(0x163)]);break;}case v[_0x46ec60(0x17d)]:{this[_0x46ec60(0x13c)][_0x46ec60(0x167)](_0x589714,_0xae0290,{'commentId':_0x8fd85c[_0x46ec60(0x163)],'text':JSON[_0x46ec60(0x171)](_0x8fd85c[_0x46ec60(0x146)])});break;}case v[_0x46ec60(0x18a)]:{const _0x37f24b=(_0x1df3fd=this[_0x46ec60(0x13c)][_0x46ec60(0x17c)](_0x8fd85c[_0x46ec60(0x19d)])[_0x46ec60(0x143)](_0x141efb=>_0x141efb[_0x46ec60(0x153)]===_0x8fd85c['threadId']))==null?void 0x0:_0x1df3fd[_0x46ec60(0x195)];_0x37f24b&&this[_0x46ec60(0x13c)][_0x46ec60(0x177)](_0x589714,_0xae0290,_0x37f24b['id'],_0x8fd85c['solved']===I[_0x46ec60(0x154)]);break;}}}));}};function _0x2bba(_0x4be3f1,_0x4021db){const _0x18913b=_0x1891();return _0x2bba=function(_0x2bbaf1,_0x818b6f){_0x2bbaf1=_0x2bbaf1-0x136;let _0x25ef84=_0x18913b[_0x2bbaf1];return _0x25ef84;},_0x2bba(_0x4be3f1,_0x4021db);}S=V([p(0x0,_0x592b52(_0x5e1c55)),p(0x1,_0x592b52(_0x13689c)),p(0x2,_0x592b52(_0x2a30d4)),p(0x3,_0x592b52(_0x4a76a3))],S);const z=_0x3f576e(0x17e),M={};var k=Object[_0x3f576e(0x140)],Q=(_0x106f82,_0x276829,_0x173cb9,_0x5a0b33)=>{const _0x4333d1=_0x3f576e;for(var _0x2b1f1b=_0x5a0b33>0x1?void 0x0:_0x5a0b33?k(_0x276829,_0x173cb9):_0x276829,_0x17edec=_0x106f82[_0x4333d1(0x144)]-0x1,_0x442e5d;_0x17edec>=0x0;_0x17edec--)(_0x442e5d=_0x106f82[_0x17edec])&&(_0x2b1f1b=_0x442e5d(_0x2b1f1b)||_0x2b1f1b);return _0x2b1f1b;},_=(_0xb7ebd4,_0x19d7e0)=>(_0x40ca97,_0x3f8652)=>_0x19d7e0(_0x40ca97,_0x3f8652,_0xb7ebd4);function X(_0x429ef0,_0x5db180){const _0x5def07=_0x3f576e,_0x288292=_0x429ef0['replies'][0x0];return{..._0x5db180,'id':_0x288292['replyId'],'resolved':_0x429ef0[_0x5def07(0x15b)]===0x1,'dT':D(_0x288292[_0x5def07(0x18f)]),'personId':_0x288292['userId'],'threadId':_0x288292[_0x5def07(0x153)]};}function ee(_0x5ce140,_0x5993bc,_0x2513d4){const _0x530b77=_0x3f576e;var _0xdaf972,_0x18c2e1;if(((_0x18c2e1=(_0xdaf972=_0x5ce140==null?void 0x0:_0x5ce140[_0x530b77(0x158)])==null?void 0x0:_0xdaf972[_0x530b77(0x144)])!=null?_0x18c2e1:0x0)>0x0){const _0x38e37f=(_0x15fb0e,_0x588788)=>({'id':_0x15fb0e[_0x530b77(0x163)],'threadId':_0x15fb0e[_0x530b77(0x153)],'dT':D(_0x15fb0e[_0x530b77(0x18f)]),'personId':_0x15fb0e[_0x530b77(0x16a)],'resolved':_0x5ce140['solved']===I[_0x530b77(0x154)],'unitId':_0x5993bc,'subUnitId':_0x2513d4,'text':JSON[_0x530b77(0x171)](_0x15fb0e[_0x530b77(0x146)]),'parentId':_0x588788}),_0x24c196=_0x38e37f(_0x5ce140['replies'][0x0]);return{..._0x24c196,'children':_0x5ce140[_0x530b77(0x158)][_0x530b77(0x151)](0x1)[_0x530b77(0x161)](_0x11e028=>_0x38e37f(_0x11e028,_0x24c196['id']))};}return null;}let f=class{constructor(_0x7bd1fc,_0x42294b,_0x344372,_0x18f904){const _0x54b862=_0x3f576e;this['_httpService']=_0x7bd1fc,this[_0x54b862(0x16c)]=_0x42294b,this[_0x54b862(0x13e)]=_0x344372,this[_0x54b862(0x152)]=_0x18f904;}async[_0x3f576e(0x16b)](_0x2d8607){const _0x15fea3=_0x3f576e;var _0x471769,_0x21cd34;const {parentId:_0x3bf006,unitId:_0x49d3b7,text:_0x5ec571,threadId:_0x565c34}=_0x2d8607,_0x20705b=(_0x21cd34=(_0x471769=_0x5ec571[_0x15fea3(0x180)])==null?void 0x0:_0x471769['filter'](_0x279921=>_0x279921[_0x15fea3(0x178)]===_0xae705a['COMMENT'])[_0x15fea3(0x161)](_0x122d4d=>_0x122d4d['rangeId']))!=null?_0x21cd34:[],_0x45e22b=JSON[_0x15fea3(0x16f)](_0x5ec571),_0x525742=(await this[_0x15fea3(0x13e)][_0x15fea3(0x199)](_0x49d3b7))['getMemberID']();if(_0x3bf006){const _0x3f7c49={'memberId':_0x525742,'unitId':_0x49d3b7,'content':_0x45e22b,'mention':_0x20705b,'threadId':_0x565c34},_0x197977=(await this[_0x15fea3(0x14d)][_0x15fea3(0x14c)](_0x15fea3(0x149)+_0x49d3b7+_0x15fea3(0x15d),{'body':_0x3f7c49}))[_0x15fea3(0x185)][_0x15fea3(0x14b)];return{..._0x2d8607,'id':_0x197977[_0x15fea3(0x163)],'dT':_0x2a150e(+_0x197977[_0x15fea3(0x18f)])[_0x15fea3(0x197)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x197977['userId']};}else{const _0x19388e={'memberId':_0x525742,'unitId':_0x49d3b7,'content':_0x45e22b,'mention':_0x20705b},_0xdb4060=await this[_0x15fea3(0x14d)][_0x15fea3(0x14c)]('/universer-api/comment/unit/'+_0x49d3b7+_0x15fea3(0x19c),{'body':_0x19388e});return X(_0xdb4060[_0x15fea3(0x185)][_0x15fea3(0x156)],_0x2d8607);}}async[_0x3f576e(0x167)](_0x1eba1f){const _0x1d2a88=_0x3f576e;var _0x33369e,_0x3eabe6;const {text:_0x1cdf30,unitId:_0x4297a7}=_0x1eba1f,_0x5e524b=(_0x3eabe6=(_0x33369e=_0x1cdf30[_0x1d2a88(0x180)])==null?void 0x0:_0x33369e[_0x1d2a88(0x174)](_0xa5e4ad=>_0xa5e4ad[_0x1d2a88(0x178)]===_0xae705a[_0x1d2a88(0x141)])[_0x1d2a88(0x161)](_0xe5249e=>_0xe5249e[_0x1d2a88(0x159)]))!=null?_0x3eabe6:[],_0x30faef=JSON['stringify'](_0x1cdf30),_0x5d3e4e=_0x1eba1f[_0x1d2a88(0x153)],_0x50bd77=_0x1eba1f['id'],_0x178f21={'memberId':(await this['_sessionService'][_0x1d2a88(0x199)](_0x4297a7))[_0x1d2a88(0x19b)](),'unitId':_0x4297a7,'threadId':_0x5d3e4e,'mention':_0x5e524b,'content':_0x30faef,'replyId':_0x50bd77},_0xc400a8=await this[_0x1d2a88(0x14d)]['post']('/universer-api/comment/unit/'+_0x4297a7+'/edit',{'body':_0x178f21});return!_0xc400a8[_0x1d2a88(0x185)][_0x1d2a88(0x196)]||_0xc400a8[_0x1d2a88(0x185)][_0x1d2a88(0x196)][_0x1d2a88(0x14a)]===0x1;}async['resolveComment'](_0xae1d7d){const _0x329dac=_0x3f576e,{unitId:_0x99bc9f}=_0xae1d7d,_0xc1e4ea=_0xae1d7d[_0x329dac(0x153)],_0x5eea92={'memberId':this[_0x329dac(0x16c)]['getCurrentUser']()[_0x329dac(0x15c)],'unitId':_0x99bc9f,'threadId':_0xc1e4ea,'solved':_0xae1d7d['resolved']?I['Solved']:I[_0x329dac(0x142)]},_0x21eb3d=await this['_httpService'][_0x329dac(0x14c)]('/universer-api/comment/unit/'+_0x99bc9f+_0x329dac(0x179),{'body':_0x5eea92});return!_0x21eb3d[_0x329dac(0x185)][_0x329dac(0x196)]||_0x21eb3d[_0x329dac(0x185)]['error'][_0x329dac(0x14a)]===0x1;}async[_0x3f576e(0x18c)](_0x3a844e,_0x4973ea,_0x421bcb,_0x293cbd){const _0x17e78e=_0x3f576e,_0x406cb9={'memberId':(await this[_0x17e78e(0x13e)][_0x17e78e(0x199)](_0x3a844e))[_0x17e78e(0x19b)](),'threadId':_0x421bcb,'replyId':_0x293cbd,'unitId':_0x3a844e},_0x397c5e=await this[_0x17e78e(0x14d)][_0x17e78e(0x14c)]('/universer-api/comment/unit/'+_0x3a844e+_0x17e78e(0x193),{'body':_0x406cb9});return!_0x397c5e[_0x17e78e(0x185)]['error']||_0x397c5e[_0x17e78e(0x185)][_0x17e78e(0x196)][_0x17e78e(0x14a)]===0x1;}async[_0x3f576e(0x194)](_0x3bae5a,_0x5abb49,_0x3d6be4){const _0x1d5948=_0x3f576e,_0x19ac59={'unitId':_0x3bae5a,'threadId':_0x3d6be4},_0x3b2215=await this['_httpService']['post'](_0x1d5948(0x149)+_0x3bae5a+_0x1d5948(0x136),{'body':_0x19ac59}),_0x3efb55=_0x3d6be4[_0x1d5948(0x161)](_0x350303=>ee(_0x3b2215['body'][_0x1d5948(0x14e)][_0x350303],_0x3bae5a,_0x5abb49))[_0x1d5948(0x174)](Boolean);return Object[_0x1d5948(0x183)](_0x3b2215[_0x1d5948(0x185)][_0x1d5948(0x13a)])[_0x1d5948(0x182)](_0x56fa3d=>{const _0x2e4ca0=_0x1d5948;this['_userService'][_0x2e4ca0(0x172)](_0x56fa3d);}),_0x3efb55;}[_0x3f576e(0x148)](_0x443126){const _0x3a481f=_0x3f576e;return{'id':_0x443126['id'],'threadId':_0x443126[_0x3a481f(0x153)],'ref':_0x443126['ref']};}};f=Q([_(0x0,_0x592b52(_0x588dab)),_(0x1,_0x592b52(_0x2a30d4)),_(0x2,_0x592b52(_0x204e5c)),_(0x3,_0x592b52(_0x4a76a3))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x384ff3,_0x54b0ce,_0x4bf32d,_0x43f53f)=>{const _0x3dcc9b=_0x3f576e;for(var _0x321d61=_0x43f53f>0x1?void 0x0:_0x43f53f?re(_0x54b0ce,_0x4bf32d):_0x54b0ce,_0x432c53=_0x384ff3[_0x3dcc9b(0x144)]-0x1,_0x5b245a;_0x432c53>=0x0;_0x432c53--)(_0x5b245a=_0x384ff3[_0x432c53])&&(_0x321d61=_0x5b245a(_0x321d61)||_0x321d61);return _0x321d61;},N=(_0xd78bfe,_0x90ae10)=>(_0x4b9510,_0x1bfcf6)=>_0x90ae10(_0x4b9510,_0x1bfcf6,_0xd78bfe);let g=class extends _0x9723fb{constructor(_0x4453c2,_0x5515e2){const _0x31406b=_0x3f576e;super(),this[_0x31406b(0x184)]=_0x4453c2,this['_threadCommentDataSource']=_0x5515e2,this[_0x31406b(0x15e)]();}[_0x3f576e(0x15e)](){const _0x1ac0a3=_0x3f576e;this[_0x1ac0a3(0x184)][_0x1ac0a3(0x17a)]=this[_0x1ac0a3(0x145)],this[_0x1ac0a3(0x184)][_0x1ac0a3(0x168)]=!0x1;}};g=te([N(0x0,_0x3137f2),N(0x1,_0x592b52(f))],g);var se=Object[_0x3f576e(0x15f)],oe=Object[_0x3f576e(0x140)],ne=(_0x18455d,_0x22fae1,_0x1ddba7)=>_0x22fae1 in _0x18455d?se(_0x18455d,_0x22fae1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1ddba7}):_0x18455d[_0x22fae1]=_0x1ddba7,ie=(_0x41f713,_0x286c02,_0x2bcd9f,_0x4c9485)=>{for(var _0x5227ac=_0x4c9485>0x1?void 0x0:_0x4c9485?oe(_0x286c02,_0x2bcd9f):_0x286c02,_0x3187da=_0x41f713['length']-0x1,_0x4c2fe8;_0x3187da>=0x0;_0x3187da--)(_0x4c2fe8=_0x41f713[_0x3187da])&&(_0x5227ac=_0x4c2fe8(_0x5227ac)||_0x5227ac);return _0x5227ac;},w=(_0x38c06f,_0x4a69fd)=>(_0x1107dd,_0x1f449c)=>_0x4a69fd(_0x1107dd,_0x1f449c,_0x38c06f),$=(_0x2f1d3b,_0x2512aa,_0x4bfa68)=>ne(_0x2f1d3b,typeof _0x2512aa!=_0x3f576e(0x192)?_0x2512aa+'':_0x2512aa,_0x4bfa68);let b=class extends _0x583448{constructor(_0x20d472=M,_0x13c453,_0x58f12e){const _0x306b7e=_0x3f576e;super(),this[_0x306b7e(0x17f)]=_0x20d472,this[_0x306b7e(0x152)]=_0x13c453,this['_configService']=_0x58f12e;const {..._0x448c87}=_0x3c6b71({},M,this[_0x306b7e(0x17f)]);this[_0x306b7e(0x173)][_0x306b7e(0x16d)](z,_0x448c87);}[_0x3f576e(0x150)](){const _0x444a63=_0x3f576e;[[f],[g],[S]][_0x444a63(0x182)](_0x18b1a1=>{const _0x3c7aee=_0x444a63;this[_0x3c7aee(0x152)][_0x3c7aee(0x14f)](_0x18b1a1);});}[_0x3f576e(0x170)](){const _0x5e908e=_0x3f576e;this[_0x5e908e(0x152)][_0x5e908e(0x18d)](g),this[_0x5e908e(0x152)][_0x5e908e(0x18d)](S);}};$(b,'pluginName',W),$(b,_0x3f576e(0x162),_0x42e5e1[_0x3f576e(0x166)]),b=ie([_0x1b0624(_0x7d5c51,_0x5c2273,_0x135297),w(0x1,_0x592b52(_0x4a76a3)),w(0x2,_0x1b40d4)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
function _0x3767(){const _0x5233a8=['solved','addUser','getCurrentUser','rangeId','post','4154064AHckNC','thread-comment-data-source.config','Unknown','disposeWithMe','setConfig','root','updateComment','filter','Edit','getUser','_threadCommentDataSource','21847VoEvdh','_sessionService','body','length','onStarting','content','reply','customRanges','/edit','createTimestamp','addComment','_injector','Solve','ref','onReady','1900593PgXnwe','UNIVER_UNKNOWN','_config','user','format','/universer-api/user/list','/add','_httpService','UNRECOGNIZED','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','YYYY/MM/DD\x20HH:mm','stringify','Delete','symbol','replies','Add','/list','get','slice','dataSource','add','unitId','_commentService','resolveComment','/reply','getComment','personId','2934FYSOcN','syncUpdateMutationToColla','userID','map','115100MLLqVg','_initUserSync','/universer-api/comment/unit/','Solved','OpenOrReOpen','code','commentUpdate$','type','requireSession','rangeType','pluginName','Reply','find','threadId','listComments','8630390Yumofa','getMemberID','getUnit','4675692FsTVDL','comments','parse','getOwnPropertyDescriptor','payload','3271586Xmexbm','parentId','subscribe','_threadCommentDataSourceService','_init','_userService','userId','_initDataSource','delete','deleteComment','1GVUxAp','users','saveCommentToSnapshot','size','_threadCommentModel','replyId','forEach','error'];_0x3767=function(){return _0x5233a8;};return _0x3767();}const _0x471d44=_0x4b1d;function _0x4b1d(_0x4517b0,_0x5e6e6a){const _0x37671b=_0x3767();return _0x4b1d=function(_0x4b1d76,_0x13d919){_0x4b1d76=_0x4b1d76-0x126;let _0xad7dff=_0x37671b[_0x4b1d76];return _0xad7dff;},_0x4b1d(_0x4517b0,_0x5e6e6a);}(function(_0x56376d,_0x57cdbb){const _0x2fe99a=_0x4b1d,_0x2c80b1=_0x56376d();while(!![]){try{const _0x5572ba=-parseInt(_0x2fe99a(0x13f))/0x1*(-parseInt(_0x2fe99a(0x135))/0x2)+-parseInt(_0x2fe99a(0x130))/0x3+-parseInt(_0x2fe99a(0x185))/0x4+parseInt(_0x2fe99a(0x12d))/0x5+parseInt(_0x2fe99a(0x181))/0x6*(-parseInt(_0x2fe99a(0x157))/0x7)+parseInt(_0x2fe99a(0x14c))/0x8+parseInt(_0x2fe99a(0x166))/0x9;if(_0x5572ba===_0x57cdbb)break;else _0x2c80b1['push'](_0x2c80b1['shift']());}catch(_0x8394ac){_0x2c80b1['push'](_0x2c80b1['shift']());}}}(_0x3767,0xeef6e));import{CommentService as _0x33903b,CollaborationSessionService as _0x57fc12,UniverCollaborationClientPlugin as _0x25f22d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4830c9}from'@univerjs-pro/license';import{dayjs as _0x542289,UserManagerService as _0x2f2550,Inject as _0x585a25,Injector as _0x38d7e2,Disposable as _0xd8303e,CustomRangeType as _0x5b5935,UniverInstanceType as _0xa7757e,DependentOn as _0x5eb8d0,IConfigService as _0x44404c,Plugin as _0x522f37,merge as _0x3dd9ff}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x38085d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x53494f,IThreadCommentDataSourceService as _0x28d703}from'@univerjs/thread-comment';import{bufferTime as _0x6080b5}from'rxjs';import{HTTPService as _0x2b4352}from'@univerjs/network';const W=_0x471d44(0x16f);var I=(_0x40630c=>(_0x40630c[_0x40630c[_0x471d44(0x189)]=0x0]=_0x471d44(0x189),_0x40630c[_0x40630c[_0x471d44(0x188)]=0x1]='Solved',_0x40630c[_0x40630c[_0x471d44(0x16e)]=-0x1]=_0x471d44(0x16e),_0x40630c))(I||{}),v=(_0x5f237c=>(_0x5f237c[_0x5f237c[_0x471d44(0x14e)]=0x0]=_0x471d44(0x14e),_0x5f237c[_0x5f237c[_0x471d44(0x175)]=0x1]='Add',_0x5f237c[_0x5f237c[_0x471d44(0x129)]=0x2]='Reply',_0x5f237c[_0x5f237c[_0x471d44(0x154)]=0x3]=_0x471d44(0x154),_0x5f237c[_0x5f237c['Delete']=0x4]=_0x471d44(0x172),_0x5f237c[_0x5f237c[_0x471d44(0x163)]=0x5]=_0x471d44(0x163),_0x5f237c[_0x5f237c['UNRECOGNIZED']=-0x1]=_0x471d44(0x16e),_0x5f237c))(v||{});const D=_0x4a2a4e=>_0x542289(new Date(+_0x4a2a4e))[_0x471d44(0x16a)](_0x471d44(0x170)),B=async(_0x27e73a,_0xb1756a)=>{const _0x53e5bd=_0x471d44,_0x1a24bb=_0x27e73a[_0x53e5bd(0x177)](_0x2f2550),_0x14693e=_0x27e73a[_0x53e5bd(0x177)](_0x2b4352);_0xb1756a['forEach'](_0xaf2485=>{const _0x1f1c0d=_0x53e5bd;_0x1a24bb[_0x1f1c0d(0x155)](_0xaf2485)&&_0xb1756a[_0x1f1c0d(0x13d)](_0xaf2485);}),_0xb1756a[_0x53e5bd(0x142)]&&(await _0x14693e[_0x53e5bd(0x177)](_0x53e5bd(0x16b),{'params':{'userIDs':[..._0xb1756a]}}))['body'][_0x53e5bd(0x140)]['forEach'](_0x5e6c0c=>{const _0x3d5a5e=_0x53e5bd;_0x5e6c0c&&_0x1a24bb[_0x3d5a5e(0x148)](_0x5e6c0c);});};var K=Object[_0x471d44(0x133)],V=(_0x368e01,_0x36656a,_0x487054,_0xb8eacb)=>{for(var _0x50c4a8=_0xb8eacb>0x1?void 0x0:_0xb8eacb?K(_0x36656a,_0x487054):_0x36656a,_0x52f94f=_0x368e01['length']-0x1,_0x43201b;_0x52f94f>=0x0;_0x52f94f--)(_0x43201b=_0x368e01[_0x52f94f])&&(_0x50c4a8=_0x43201b(_0x50c4a8)||_0x50c4a8);return _0x50c4a8;},p=(_0x407725,_0x1c159f)=>(_0x32831a,_0x38b1a3)=>_0x1c159f(_0x32831a,_0x38b1a3,_0x407725);let S=class extends _0xd8303e{constructor(_0x128ea7,_0x2eea8b,_0x29a2ff,_0x2e0f3e){const _0x12d17b=_0x471d44;super(),this['_commentService']=_0x128ea7,this[_0x12d17b(0x143)]=_0x2eea8b,this[_0x12d17b(0x13a)]=_0x29a2ff,this[_0x12d17b(0x162)]=_0x2e0f3e,this[_0x12d17b(0x139)](),this[_0x12d17b(0x186)]();}[_0x471d44(0x186)](){const _0x173794=_0x471d44;this[_0x173794(0x14f)](this[_0x173794(0x143)][_0x173794(0x18b)]['pipe'](_0x6080b5(0x10))[_0x173794(0x137)](_0x120f1f=>{const _0x212c6c=_0x173794,_0x528956=new Set();_0x120f1f[_0x212c6c(0x145)](_0x3573b8=>{const _0x1c0739=_0x212c6c;switch(_0x3573b8[_0x1c0739(0x18c)]){case _0x1c0739(0x17a):{const _0x56f427=_0x3573b8[_0x1c0739(0x134)][_0x1c0739(0x180)];_0x528956['add'](_0x56f427);break;}}}),B(this['_injector'],_0x528956);}));}[_0x471d44(0x139)](){const _0x1d7c68=_0x471d44;this[_0x1d7c68(0x14f)](this[_0x1d7c68(0x17c)][_0x1d7c68(0x18b)][_0x1d7c68(0x137)](async _0x9fe908=>{const _0x39dde8=_0x1d7c68;var _0xf88db7,_0x1b28d6,_0x1640a7,_0x3cfa2d;const _0x4f292b=(_0xf88db7=this[_0x39dde8(0x143)]['getUnit'](_0x9fe908[_0x39dde8(0x17b)])['find'](_0x48dffd=>_0x48dffd[_0x39dde8(0x12b)]===_0x9fe908[_0x39dde8(0x12b)]))==null?void 0x0:_0xf88db7['root'];if(!_0x4f292b)return;const {unitId:_0x4af91a,subUnitId:_0x9092ef}=_0x4f292b;switch(_0x9fe908[_0x39dde8(0x169)]&&this[_0x39dde8(0x13a)]['addUser'](_0x9fe908[_0x39dde8(0x169)]),_0x9fe908[_0x39dde8(0x18c)]){case v['Add']:break;case v['Reply']:{this[_0x39dde8(0x143)]['addComment'](_0x4af91a,_0x9092ef,{'unitId':_0x4af91a,'subUnitId':_0x9092ef,'ref':'','id':_0x9fe908[_0x39dde8(0x144)],'dT':D(+_0x9fe908[_0x39dde8(0x160)]),'threadId':_0x9fe908[_0x39dde8(0x12b)],'personId':(_0x1640a7=(_0x1b28d6=_0x9fe908['user'])==null?void 0x0:_0x1b28d6[_0x39dde8(0x183)])!=null?_0x1640a7:_0x9fe908[_0x39dde8(0x13b)],'text':JSON[_0x39dde8(0x132)](_0x9fe908[_0x39dde8(0x15c)]),'parentId':_0x4f292b['id']});break;}case v[_0x39dde8(0x172)]:{const _0x251db2=this['_threadCommentModel'][_0x39dde8(0x17f)](_0x4af91a,_0x9092ef,_0x9fe908['replyId']);_0x251db2&&_0x251db2[_0x39dde8(0x136)]&&this['_threadCommentModel'][_0x39dde8(0x13e)](_0x4af91a,_0x9092ef,_0x9fe908[_0x39dde8(0x144)]);break;}case v[_0x39dde8(0x154)]:{this['_threadCommentModel'][_0x39dde8(0x152)](_0x4af91a,_0x9092ef,{'commentId':_0x9fe908[_0x39dde8(0x144)],'text':JSON[_0x39dde8(0x132)](_0x9fe908[_0x39dde8(0x15c)])});break;}case v['Solve']:{const _0x213adc=(_0x3cfa2d=this[_0x39dde8(0x143)][_0x39dde8(0x12f)](_0x9fe908[_0x39dde8(0x17b)])[_0x39dde8(0x12a)](_0x17c11f=>_0x17c11f['threadId']===_0x9fe908['threadId']))==null?void 0x0:_0x3cfa2d[_0x39dde8(0x151)];_0x213adc&&this['_threadCommentModel'][_0x39dde8(0x17d)](_0x4af91a,_0x9092ef,_0x213adc['id'],_0x9fe908[_0x39dde8(0x147)]===I[_0x39dde8(0x188)]);break;}}}));}};S=V([p(0x0,_0x585a25(_0x33903b)),p(0x1,_0x585a25(_0x53494f)),p(0x2,_0x585a25(_0x2f2550)),p(0x3,_0x585a25(_0x38d7e2))],S);const z=_0x471d44(0x14d),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x51de9a,_0x239ad9,_0x2cce2e,_0x53e134)=>{const _0x143909=_0x471d44;for(var _0x1e7090=_0x53e134>0x1?void 0x0:_0x53e134?k(_0x239ad9,_0x2cce2e):_0x239ad9,_0xd443e9=_0x51de9a[_0x143909(0x15a)]-0x1,_0x50b3f2;_0xd443e9>=0x0;_0xd443e9--)(_0x50b3f2=_0x51de9a[_0xd443e9])&&(_0x1e7090=_0x50b3f2(_0x1e7090)||_0x1e7090);return _0x1e7090;},_=(_0x26d4d6,_0x48b834)=>(_0x276825,_0xd2df3d)=>_0x48b834(_0x276825,_0xd2df3d,_0x26d4d6);function X(_0x5d354c,_0x12f0c0){const _0x541d2f=_0x471d44,_0x3a906b=_0x5d354c[_0x541d2f(0x174)][0x0];return{..._0x12f0c0,'id':_0x3a906b[_0x541d2f(0x144)],'resolved':_0x5d354c[_0x541d2f(0x147)]===0x1,'dT':D(_0x3a906b[_0x541d2f(0x160)]),'personId':_0x3a906b[_0x541d2f(0x13b)],'threadId':_0x3a906b[_0x541d2f(0x12b)]};}function ee(_0x35b3d2,_0x33f0af,_0x60c4b5){const _0x30ede9=_0x471d44;var _0x239069,_0x532cef;if(((_0x532cef=(_0x239069=_0x35b3d2==null?void 0x0:_0x35b3d2['replies'])==null?void 0x0:_0x239069[_0x30ede9(0x15a)])!=null?_0x532cef:0x0)>0x0){const _0x24bdf0=(_0x187021,_0x4147a4)=>({'id':_0x187021[_0x30ede9(0x144)],'threadId':_0x187021[_0x30ede9(0x12b)],'dT':D(_0x187021[_0x30ede9(0x160)]),'personId':_0x187021['userId'],'resolved':_0x35b3d2['solved']===I['Solved'],'unitId':_0x33f0af,'subUnitId':_0x60c4b5,'text':JSON[_0x30ede9(0x132)](_0x187021[_0x30ede9(0x15c)]),'parentId':_0x4147a4}),_0x15d48a=_0x24bdf0(_0x35b3d2['replies'][0x0]);return{..._0x15d48a,'children':_0x35b3d2[_0x30ede9(0x174)][_0x30ede9(0x178)](0x1)[_0x30ede9(0x184)](_0x56f781=>_0x24bdf0(_0x56f781,_0x15d48a['id']))};}return null;}let f=class{constructor(_0x32bcbd,_0x36feeb,_0x5d84e6,_0x25eb31){const _0x1fe988=_0x471d44;this[_0x1fe988(0x16d)]=_0x32bcbd,this[_0x1fe988(0x13a)]=_0x36feeb,this[_0x1fe988(0x158)]=_0x5d84e6,this['_injector']=_0x25eb31;}async[_0x471d44(0x161)](_0x38196b){const _0x10b164=_0x471d44;var _0xcaf37b,_0x1b9e61;const {parentId:_0x275e51,unitId:_0x196b63,text:_0x14dcc1,threadId:_0x224f2a}=_0x38196b,_0x25cac2=(_0x1b9e61=(_0xcaf37b=_0x14dcc1['customRanges'])==null?void 0x0:_0xcaf37b[_0x10b164(0x153)](_0x291021=>_0x291021[_0x10b164(0x127)]===_0x5b5935['COMMENT'])[_0x10b164(0x184)](_0x2be23d=>_0x2be23d[_0x10b164(0x14a)]))!=null?_0x1b9e61:[],_0x5a7063=JSON[_0x10b164(0x171)](_0x14dcc1),_0x95c005=(await this[_0x10b164(0x158)][_0x10b164(0x126)](_0x196b63))[_0x10b164(0x12e)]();if(_0x275e51){const _0x40552e={'memberId':_0x95c005,'unitId':_0x196b63,'content':_0x5a7063,'mention':_0x25cac2,'threadId':_0x224f2a},_0x43617b=(await this[_0x10b164(0x16d)][_0x10b164(0x14b)](_0x10b164(0x187)+_0x196b63+_0x10b164(0x17e),{'body':_0x40552e}))['body'][_0x10b164(0x15d)];return{..._0x38196b,'id':_0x43617b['replyId'],'dT':_0x542289(+_0x43617b['createTimestamp'])[_0x10b164(0x16a)](_0x10b164(0x170)),'personId':_0x43617b[_0x10b164(0x13b)]};}else{const _0x3487a3={'memberId':_0x95c005,'unitId':_0x196b63,'content':_0x5a7063,'mention':_0x25cac2},_0x536e54=await this[_0x10b164(0x16d)][_0x10b164(0x14b)](_0x10b164(0x187)+_0x196b63+_0x10b164(0x16c),{'body':_0x3487a3});return X(_0x536e54[_0x10b164(0x159)]['comment'],_0x38196b);}}async['updateComment'](_0x2cc9fd){const _0x4c14fd=_0x471d44;var _0x9ddf99,_0x3b0d3a;const {text:_0x2892cc,unitId:_0x3ed4b2}=_0x2cc9fd,_0x112963=(_0x3b0d3a=(_0x9ddf99=_0x2892cc[_0x4c14fd(0x15e)])==null?void 0x0:_0x9ddf99[_0x4c14fd(0x153)](_0x3c85ba=>_0x3c85ba[_0x4c14fd(0x127)]===_0x5b5935['COMMENT'])['map'](_0x1ee985=>_0x1ee985[_0x4c14fd(0x14a)]))!=null?_0x3b0d3a:[],_0x45feac=JSON['stringify'](_0x2892cc),_0x51644f=_0x2cc9fd[_0x4c14fd(0x12b)],_0x4a7d86=_0x2cc9fd['id'],_0x46a03b={'memberId':(await this['_sessionService'][_0x4c14fd(0x126)](_0x3ed4b2))['getMemberID'](),'unitId':_0x3ed4b2,'threadId':_0x51644f,'mention':_0x112963,'content':_0x45feac,'replyId':_0x4a7d86},_0x42aed9=await this[_0x4c14fd(0x16d)][_0x4c14fd(0x14b)]('/universer-api/comment/unit/'+_0x3ed4b2+_0x4c14fd(0x15f),{'body':_0x46a03b});return!_0x42aed9[_0x4c14fd(0x159)][_0x4c14fd(0x146)]||_0x42aed9[_0x4c14fd(0x159)][_0x4c14fd(0x146)][_0x4c14fd(0x18a)]===0x1;}async[_0x471d44(0x17d)](_0x583b9d){const _0x387b43=_0x471d44,{unitId:_0x2c606a}=_0x583b9d,_0x13818a=_0x583b9d[_0x387b43(0x12b)],_0x4a443e={'memberId':this[_0x387b43(0x13a)][_0x387b43(0x149)]()[_0x387b43(0x183)],'unitId':_0x2c606a,'threadId':_0x13818a,'solved':_0x583b9d['resolved']?I[_0x387b43(0x188)]:I[_0x387b43(0x189)]},_0xe4c21a=await this[_0x387b43(0x16d)]['post']('/universer-api/comment/unit/'+_0x2c606a+'/solved',{'body':_0x4a443e});return!_0xe4c21a['body'][_0x387b43(0x146)]||_0xe4c21a[_0x387b43(0x159)][_0x387b43(0x146)]['code']===0x1;}async[_0x471d44(0x13e)](_0x38393e,_0x2eb112,_0x4ace57,_0x2809b9){const _0x2e628f=_0x471d44,_0x1e5a4b={'memberId':(await this['_sessionService'][_0x2e628f(0x126)](_0x38393e))[_0x2e628f(0x12e)](),'threadId':_0x4ace57,'replyId':_0x2809b9,'unitId':_0x38393e},_0x3f3636=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x38393e+'/delete',{'body':_0x1e5a4b});return!_0x3f3636[_0x2e628f(0x159)]['error']||_0x3f3636['body']['error'][_0x2e628f(0x18a)]===0x1;}async[_0x471d44(0x12c)](_0xbc7f52,_0x248a26,_0x3816b7){const _0x579359=_0x471d44,_0x2202a3={'unitId':_0xbc7f52,'threadId':_0x3816b7},_0x3c3116=await this[_0x579359(0x16d)][_0x579359(0x14b)]('/universer-api/comment/unit/'+_0xbc7f52+_0x579359(0x176),{'body':_0x2202a3}),_0x52e62a=_0x3816b7['map'](_0x50ab08=>ee(_0x3c3116['body'][_0x579359(0x131)][_0x50ab08],_0xbc7f52,_0x248a26))[_0x579359(0x153)](Boolean);return Object['values'](_0x3c3116['body']['users'])[_0x579359(0x145)](_0x1dc94d=>{const _0x1f1c78=_0x579359;this[_0x1f1c78(0x13a)][_0x1f1c78(0x148)](_0x1dc94d);}),_0x52e62a;}[_0x471d44(0x141)](_0x882e40){const _0x546fd7=_0x471d44;return{'id':_0x882e40['id'],'threadId':_0x882e40[_0x546fd7(0x12b)],'ref':_0x882e40[_0x546fd7(0x164)]};}};f=Q([_(0x0,_0x585a25(_0x2b4352)),_(0x1,_0x585a25(_0x2f2550)),_(0x2,_0x585a25(_0x57fc12)),_(0x3,_0x585a25(_0x38d7e2))],f);var re=Object[_0x471d44(0x133)],te=(_0x4d8d55,_0x3c08d0,_0x331d20,_0x526fd1)=>{const _0x5c0597=_0x471d44;for(var _0x46aeeb=_0x526fd1>0x1?void 0x0:_0x526fd1?re(_0x3c08d0,_0x331d20):_0x3c08d0,_0x2542d8=_0x4d8d55[_0x5c0597(0x15a)]-0x1,_0x2277fe;_0x2542d8>=0x0;_0x2542d8--)(_0x2277fe=_0x4d8d55[_0x2542d8])&&(_0x46aeeb=_0x2277fe(_0x46aeeb)||_0x46aeeb);return _0x46aeeb;},N=(_0x188d4c,_0x28561a)=>(_0x20fe74,_0x1281eb)=>_0x28561a(_0x20fe74,_0x1281eb,_0x188d4c);let g=class extends _0xd8303e{constructor(_0xa9e4c0,_0x30dbd7){const _0x20e9ff=_0x471d44;super(),this[_0x20e9ff(0x138)]=_0xa9e4c0,this[_0x20e9ff(0x156)]=_0x30dbd7,this[_0x20e9ff(0x13c)]();}['_initDataSource'](){const _0x57519e=_0x471d44;this['_threadCommentDataSourceService'][_0x57519e(0x179)]=this['_threadCommentDataSource'],this[_0x57519e(0x138)][_0x57519e(0x182)]=!0x1;}};g=te([N(0x0,_0x28d703),N(0x1,_0x585a25(f))],g);var se=Object['defineProperty'],oe=Object[_0x471d44(0x133)],ne=(_0x456740,_0xf43f12,_0xf1cd68)=>_0xf43f12 in _0x456740?se(_0x456740,_0xf43f12,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf1cd68}):_0x456740[_0xf43f12]=_0xf1cd68,ie=(_0x9fc310,_0x28407b,_0x227a99,_0x54bf50)=>{for(var _0x2dc6db=_0x54bf50>0x1?void 0x0:_0x54bf50?oe(_0x28407b,_0x227a99):_0x28407b,_0x57d890=_0x9fc310['length']-0x1,_0x377612;_0x57d890>=0x0;_0x57d890--)(_0x377612=_0x9fc310[_0x57d890])&&(_0x2dc6db=_0x377612(_0x2dc6db)||_0x2dc6db);return _0x2dc6db;},w=(_0x303ee3,_0x577386)=>(_0x3ec565,_0x4d3584)=>_0x577386(_0x3ec565,_0x4d3584,_0x303ee3),$=(_0x59955b,_0x1dbea9,_0x282183)=>ne(_0x59955b,typeof _0x1dbea9!=_0x471d44(0x173)?_0x1dbea9+'':_0x1dbea9,_0x282183);let b=class extends _0x522f37{constructor(_0x434a5a=M,_0x257695,_0x5f4bec){const _0x2ca925=_0x471d44;super(),this[_0x2ca925(0x168)]=_0x434a5a,this[_0x2ca925(0x162)]=_0x257695,this['_configService']=_0x5f4bec;const {..._0x360271}=_0x3dd9ff({},M,this[_0x2ca925(0x168)]);this['_configService'][_0x2ca925(0x150)](z,_0x360271);}[_0x471d44(0x15b)](){const _0x5999f6=_0x471d44;[[f],[g],[S]][_0x5999f6(0x145)](_0x581e38=>{const _0x41c65b=_0x5999f6;this[_0x41c65b(0x162)][_0x41c65b(0x17a)](_0x581e38);});}[_0x471d44(0x165)](){const _0x5467ad=_0x471d44;this['_injector'][_0x5467ad(0x177)](g),this[_0x5467ad(0x162)]['get'](S);}};$(b,_0x471d44(0x128),W),$(b,'type',_0xa7757e[_0x471d44(0x167)]),b=ie([_0x5eb8d0(_0x38085d,_0x25f22d,_0x4830c9),w(0x1,_0x585a25(_0x38d7e2)),w(0x2,_0x44404c)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0xb520d2,_0xd688d9){const _0x24b211=_0x1f47,_0x291b0c=_0xb520d2();while(!![]){try{const _0x54edaa=-parseInt(_0x24b211(0x1b2))/0x1*(parseInt(_0x24b211(0x1da))/0x2)+-parseInt(_0x24b211(0x177))/0x3*(parseInt(_0x24b211(0x1a7))/0x4)+parseInt(_0x24b211(0x170))/0x5*(parseInt(_0x24b211(0x1a9))/0x6)+parseInt(_0x24b211(0x17c))/0x7*(-parseInt(_0x24b211(0x188))/0x8)+parseInt(_0x24b211(0x185))/0x9*(parseInt(_0x24b211(0x1d6))/0xa)+parseInt(_0x24b211(0x17a))/0xb+-parseInt(_0x24b211(0x1cc))/0xc*(-parseInt(_0x24b211(0x190))/0xd);if(_0x54edaa===_0xd688d9)break;else _0x291b0c['push'](_0x291b0c['shift']());}catch(_0x34bf3e){_0x291b0c['push'](_0x291b0c['shift']());}}}(_0x4a3b,0x3fec0),function(_0x33de4d,_0x340c14){const _0x11a207=_0x1f47;typeof exports==_0x11a207(0x168)&&typeof module<'u'?_0x340c14(exports,require(_0x11a207(0x175)),require(_0x11a207(0x1c8)),require('@univerjs/core'),require(_0x11a207(0x1ba)),require('@univerjs/thread-comment'),require(_0x11a207(0x193)),require(_0x11a207(0x1aa))):typeof define=='function'&&define[_0x11a207(0x1c2)]?define([_0x11a207(0x197),_0x11a207(0x175),'@univerjs-pro/license',_0x11a207(0x195),'@univerjs/thread-comment-ui','@univerjs/thread-comment','rxjs',_0x11a207(0x1aa)],_0x340c14):(_0x33de4d=typeof globalThis<'u'?globalThis:_0x33de4d||self,_0x340c14(_0x33de4d['UniverProThreadCommentDatasource']={},_0x33de4d[_0x11a207(0x1c4)],_0x33de4d['UniverProLicense'],_0x33de4d['UniverCore'],_0x33de4d[_0x11a207(0x167)],_0x33de4d['UniverThreadComment'],_0x33de4d[_0x11a207(0x193)],_0x33de4d['UniverNetwork']));}(this,function(_0x2f5869,_0x1964b2,_0x2356c0,_0x4ecff4,_0x392893,_0x223cf2,_0x170bcb,_0x5071d1){'use strict';const _0x1565f7=_0x1f47;const _0x577ec7=_0x1565f7(0x16c);var _0x4bf784=(_0x4a8aa0=>(_0x4a8aa0[_0x4a8aa0['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x4a8aa0[_0x4a8aa0[_0x1565f7(0x1d9)]=0x1]=_0x1565f7(0x1d9),_0x4a8aa0[_0x4a8aa0[_0x1565f7(0x1ad)]=-0x1]=_0x1565f7(0x1ad),_0x4a8aa0))(_0x4bf784||{}),_0x532eb8=(_0x58e9f6=>(_0x58e9f6[_0x58e9f6[_0x1565f7(0x1e9)]=0x0]=_0x1565f7(0x1e9),_0x58e9f6[_0x58e9f6['Add']=0x1]=_0x1565f7(0x1d5),_0x58e9f6[_0x58e9f6[_0x1565f7(0x19b)]=0x2]=_0x1565f7(0x19b),_0x58e9f6[_0x58e9f6[_0x1565f7(0x16b)]=0x3]=_0x1565f7(0x16b),_0x58e9f6[_0x58e9f6[_0x1565f7(0x182)]=0x4]='Delete',_0x58e9f6[_0x58e9f6[_0x1565f7(0x1cb)]=0x5]=_0x1565f7(0x1cb),_0x58e9f6[_0x58e9f6['UNRECOGNIZED']=-0x1]=_0x1565f7(0x1ad),_0x58e9f6))(_0x532eb8||{});const _0x7c2e05=_0x3285ae=>_0x4ecff4['dayjs'](new Date(+_0x3285ae))[_0x1565f7(0x17f)](_0x1565f7(0x1ec)),_0x5d1307=async(_0x398a5d,_0x5f2bb7)=>{const _0x1c00b9=_0x1565f7,_0x365795=_0x398a5d[_0x1c00b9(0x163)](_0x4ecff4[_0x1c00b9(0x173)]),_0x4c42dd=_0x398a5d[_0x1c00b9(0x163)](_0x5071d1[_0x1c00b9(0x1a0)]);_0x5f2bb7[_0x1c00b9(0x1bd)](_0x1a39d3=>{const _0x17c5f0=_0x1c00b9;_0x365795[_0x17c5f0(0x199)](_0x1a39d3)&&_0x5f2bb7[_0x17c5f0(0x1c6)](_0x1a39d3);}),_0x5f2bb7[_0x1c00b9(0x166)]&&(await _0x4c42dd[_0x1c00b9(0x163)](_0x1c00b9(0x1e5),{'params':{'userIDs':[..._0x5f2bb7]}}))[_0x1c00b9(0x1d4)][_0x1c00b9(0x1c5)][_0x1c00b9(0x1bd)](_0x533de4=>{_0x533de4&&_0x365795['addUser'](_0x533de4);});};var _0x1f3567=Object['getOwnPropertyDescriptor'],_0x48368a=(_0x1af139,_0x5216b2,_0x47a5ea,_0x3e747a)=>{for(var _0x321e93=_0x3e747a>0x1?void 0x0:_0x3e747a?_0x1f3567(_0x5216b2,_0x47a5ea):_0x5216b2,_0x3576c2=_0x1af139['length']-0x1,_0x4b43ce;_0x3576c2>=0x0;_0x3576c2--)(_0x4b43ce=_0x1af139[_0x3576c2])&&(_0x321e93=_0x4b43ce(_0x321e93)||_0x321e93);return _0x321e93;},_0x2d7630=(_0x426114,_0x577956)=>(_0x411ae3,_0x13ef2d)=>_0x577956(_0x411ae3,_0x13ef2d,_0x426114);let _0x22d035=class extends _0x4ecff4[_0x1565f7(0x1bc)]{constructor(_0x21e631,_0x5c46da,_0x1e17cf,_0x5ef412){const _0x5dfd2f=_0x1565f7;super(),this[_0x5dfd2f(0x1eb)]=_0x21e631,this[_0x5dfd2f(0x1ce)]=_0x5c46da,this[_0x5dfd2f(0x1ab)]=_0x1e17cf,this[_0x5dfd2f(0x19a)]=_0x5ef412,this[_0x5dfd2f(0x178)](),this[_0x5dfd2f(0x1b3)]();}[_0x1565f7(0x1b3)](){const _0x3d296a=_0x1565f7;this[_0x3d296a(0x189)](this['_threadCommentModel'][_0x3d296a(0x184)][_0x3d296a(0x1db)](_0x170bcb[_0x3d296a(0x1ae)](0x10))[_0x3d296a(0x1b5)](_0x1a4497=>{const _0x58ee65=_0x3d296a,_0x2a7346=new Set();_0x1a4497[_0x58ee65(0x1bd)](_0x149438=>{const _0x1cb2a3=_0x58ee65;switch(_0x149438['type']){case'add':{const _0x1861e5=_0x149438[_0x1cb2a3(0x18e)][_0x1cb2a3(0x186)];_0x2a7346[_0x1cb2a3(0x169)](_0x1861e5);break;}}}),_0x5d1307(this[_0x58ee65(0x19a)],_0x2a7346);}));}['_init'](){const _0x32e36b=_0x1565f7;this[_0x32e36b(0x189)](this['_commentService'][_0x32e36b(0x184)][_0x32e36b(0x1b5)](async _0x1b5d9a=>{const _0x30e761=_0x32e36b;var _0x1c0ea2,_0x1f50c0,_0x1840d3,_0x45e24c;const _0x5e0d2d=(_0x1c0ea2=this[_0x30e761(0x1ce)]['getUnit'](_0x1b5d9a[_0x30e761(0x183)])[_0x30e761(0x1ca)](_0x436048=>_0x436048[_0x30e761(0x1a3)]===_0x1b5d9a[_0x30e761(0x1a3)]))==null?void 0x0:_0x1c0ea2[_0x30e761(0x18c)];if(!_0x5e0d2d)return;const {unitId:_0x4a36f7,subUnitId:_0x4c66fd}=_0x5e0d2d;switch(_0x1b5d9a[_0x30e761(0x19e)]&&this[_0x30e761(0x1ab)]['addUser'](_0x1b5d9a[_0x30e761(0x19e)]),_0x1b5d9a[_0x30e761(0x1c3)]){case _0x532eb8[_0x30e761(0x1d5)]:break;case _0x532eb8[_0x30e761(0x19b)]:{this[_0x30e761(0x1ce)][_0x30e761(0x198)](_0x4a36f7,_0x4c66fd,{'unitId':_0x4a36f7,'subUnitId':_0x4c66fd,'ref':'','id':_0x1b5d9a[_0x30e761(0x1bb)],'dT':_0x7c2e05(+_0x1b5d9a[_0x30e761(0x1ac)]),'threadId':_0x1b5d9a[_0x30e761(0x1a3)],'personId':(_0x1840d3=(_0x1f50c0=_0x1b5d9a[_0x30e761(0x19e)])==null?void 0x0:_0x1f50c0[_0x30e761(0x1bf)])!=null?_0x1840d3:_0x1b5d9a[_0x30e761(0x16d)],'text':JSON['parse'](_0x1b5d9a['content']),'parentId':_0x5e0d2d['id']});break;}case _0x532eb8[_0x30e761(0x182)]:{const _0x4507d1=this[_0x30e761(0x1ce)][_0x30e761(0x164)](_0x4a36f7,_0x4c66fd,_0x1b5d9a['replyId']);_0x4507d1&&_0x4507d1[_0x30e761(0x187)]&&this[_0x30e761(0x1ce)][_0x30e761(0x1d0)](_0x4a36f7,_0x4c66fd,_0x1b5d9a[_0x30e761(0x1bb)]);break;}case _0x532eb8['Edit']:{this[_0x30e761(0x1ce)][_0x30e761(0x17d)](_0x4a36f7,_0x4c66fd,{'commentId':_0x1b5d9a[_0x30e761(0x1bb)],'text':JSON['parse'](_0x1b5d9a['content'])});break;}case _0x532eb8[_0x30e761(0x1cb)]:{const _0x54c31e=(_0x45e24c=this[_0x30e761(0x1ce)]['getUnit'](_0x1b5d9a['unitId'])[_0x30e761(0x1ca)](_0x5ec8a2=>_0x5ec8a2[_0x30e761(0x1a3)]===_0x1b5d9a[_0x30e761(0x1a3)]))==null?void 0x0:_0x45e24c[_0x30e761(0x18c)];_0x54c31e&&this['_threadCommentModel'][_0x30e761(0x194)](_0x4a36f7,_0x4c66fd,_0x54c31e['id'],_0x1b5d9a[_0x30e761(0x18a)]===_0x4bf784['Solved']);break;}}}));}};_0x22d035=_0x48368a([_0x2d7630(0x0,_0x4ecff4[_0x1565f7(0x17e)](_0x1964b2['CommentService'])),_0x2d7630(0x1,_0x4ecff4[_0x1565f7(0x17e)](_0x223cf2[_0x1565f7(0x165)])),_0x2d7630(0x2,_0x4ecff4['Inject'](_0x4ecff4['UserManagerService'])),_0x2d7630(0x3,_0x4ecff4[_0x1565f7(0x17e)](_0x4ecff4['Injector']))],_0x22d035);const _0x36e886='thread-comment-data-source.config',_0x2e8f12={};var _0x847824=Object[_0x1565f7(0x1b8)],_0x3a377e=(_0x1dcf84,_0x32971d,_0x1d3118,_0x328b5b)=>{const _0x4eb1cb=_0x1565f7;for(var _0x12bbdb=_0x328b5b>0x1?void 0x0:_0x328b5b?_0x847824(_0x32971d,_0x1d3118):_0x32971d,_0x50aa27=_0x1dcf84[_0x4eb1cb(0x176)]-0x1,_0x5a64eb;_0x50aa27>=0x0;_0x50aa27--)(_0x5a64eb=_0x1dcf84[_0x50aa27])&&(_0x12bbdb=_0x5a64eb(_0x12bbdb)||_0x12bbdb);return _0x12bbdb;},_0x2bdfc5=(_0x2d17e0,_0x11b3d0)=>(_0x3595a3,_0x2a1778)=>_0x11b3d0(_0x3595a3,_0x2a1778,_0x2d17e0);function _0x36cda4(_0x2f63ae,_0x2d2c32){const _0x5aa780=_0x1565f7,_0x2ea3e6=_0x2f63ae['replies'][0x0];return{..._0x2d2c32,'id':_0x2ea3e6[_0x5aa780(0x1bb)],'resolved':_0x2f63ae[_0x5aa780(0x18a)]===0x1,'dT':_0x7c2e05(_0x2ea3e6['createTimestamp']),'personId':_0x2ea3e6[_0x5aa780(0x16d)],'threadId':_0x2ea3e6[_0x5aa780(0x1a3)]};}function _0x2b555f(_0x3af6c7,_0x5a744a,_0x564665){const _0xf15fcd=_0x1565f7;var _0x417bcd,_0x51cbaa;if(((_0x51cbaa=(_0x417bcd=_0x3af6c7==null?void 0x0:_0x3af6c7[_0xf15fcd(0x174)])==null?void 0x0:_0x417bcd[_0xf15fcd(0x176)])!=null?_0x51cbaa:0x0)>0x0){const _0x263106=(_0x43f653,_0x45b493)=>({'id':_0x43f653['replyId'],'threadId':_0x43f653[_0xf15fcd(0x1a3)],'dT':_0x7c2e05(_0x43f653['createTimestamp']),'personId':_0x43f653[_0xf15fcd(0x16d)],'resolved':_0x3af6c7[_0xf15fcd(0x18a)]===_0x4bf784[_0xf15fcd(0x1d9)],'unitId':_0x5a744a,'subUnitId':_0x564665,'text':JSON[_0xf15fcd(0x1dc)](_0x43f653[_0xf15fcd(0x16a)]),'parentId':_0x45b493}),_0x4b2a26=_0x263106(_0x3af6c7[_0xf15fcd(0x174)][0x0]);return{..._0x4b2a26,'children':_0x3af6c7[_0xf15fcd(0x174)][_0xf15fcd(0x1a8)](0x1)['map'](_0x50b9ce=>_0x263106(_0x50b9ce,_0x4b2a26['id']))};}return null;}let _0x3123b7=class{constructor(_0x2bfba8,_0x48b265,_0x28989c,_0x140840){const _0x19fbe8=_0x1565f7;this[_0x19fbe8(0x1b6)]=_0x2bfba8,this[_0x19fbe8(0x1ab)]=_0x48b265,this[_0x19fbe8(0x16e)]=_0x28989c,this[_0x19fbe8(0x19a)]=_0x140840;}async[_0x1565f7(0x198)](_0x4d53ea){const _0xecf319=_0x1565f7;var _0x1893c7,_0x557973;const {parentId:_0x38ece6,unitId:_0x2127c1,text:_0x547914,threadId:_0x286b80}=_0x4d53ea,_0x18cf56=(_0x557973=(_0x1893c7=_0x547914['customRanges'])==null?void 0x0:_0x1893c7[_0xecf319(0x1cf)](_0x45cc02=>_0x45cc02['rangeType']===_0x4ecff4[_0xecf319(0x16f)][_0xecf319(0x18f)])['map'](_0x4f6253=>_0x4f6253[_0xecf319(0x1a6)]))!=null?_0x557973:[],_0x4f4f7d=JSON[_0xecf319(0x181)](_0x547914),_0x23326d=(await this['_sessionService'][_0xecf319(0x192)](_0x2127c1))['getMemberID']();if(_0x38ece6){const _0x193e40={'memberId':_0x23326d,'unitId':_0x2127c1,'content':_0x4f4f7d,'mention':_0x18cf56,'threadId':_0x286b80},_0x5b2552=(await this[_0xecf319(0x1b6)]['post'](_0xecf319(0x1e1)+_0x2127c1+_0xecf319(0x161),{'body':_0x193e40}))[_0xecf319(0x1d4)][_0xecf319(0x162)];return{..._0x4d53ea,'id':_0x5b2552[_0xecf319(0x1bb)],'dT':_0x4ecff4[_0xecf319(0x1c0)](+_0x5b2552[_0xecf319(0x1ac)])['format'](_0xecf319(0x1ec)),'personId':_0x5b2552[_0xecf319(0x16d)]};}else{const _0x27f0b5={'memberId':_0x23326d,'unitId':_0x2127c1,'content':_0x4f4f7d,'mention':_0x18cf56},_0xf1aab9=await this[_0xecf319(0x1b6)][_0xecf319(0x1d8)]('/universer-api/comment/unit/'+_0x2127c1+_0xecf319(0x19f),{'body':_0x27f0b5});return _0x36cda4(_0xf1aab9['body'][_0xecf319(0x1a2)],_0x4d53ea);}}async[_0x1565f7(0x17d)](_0x55519f){const _0x401c59=_0x1565f7;var _0x3f4e93,_0x43225f;const {text:_0x3d87b6,unitId:_0x530de5}=_0x55519f,_0x470201=(_0x43225f=(_0x3f4e93=_0x3d87b6[_0x401c59(0x179)])==null?void 0x0:_0x3f4e93[_0x401c59(0x1cf)](_0x27f9ba=>_0x27f9ba[_0x401c59(0x1e8)]===_0x4ecff4['CustomRangeType'][_0x401c59(0x18f)])[_0x401c59(0x18d)](_0x3236fa=>_0x3236fa[_0x401c59(0x1a6)]))!=null?_0x43225f:[],_0xced78=JSON[_0x401c59(0x181)](_0x3d87b6),_0x4001ff=_0x55519f[_0x401c59(0x1a3)],_0x392105=_0x55519f['id'],_0xc61612={'memberId':(await this['_sessionService']['requireSession'](_0x530de5))[_0x401c59(0x19c)](),'unitId':_0x530de5,'threadId':_0x4001ff,'mention':_0x470201,'content':_0xced78,'replyId':_0x392105},_0x5b1fd5=await this[_0x401c59(0x1b6)][_0x401c59(0x1d8)]('/universer-api/comment/unit/'+_0x530de5+_0x401c59(0x171),{'body':_0xc61612});return!_0x5b1fd5[_0x401c59(0x1d4)][_0x401c59(0x1a5)]||_0x5b1fd5[_0x401c59(0x1d4)]['error'][_0x401c59(0x180)]===0x1;}async['resolveComment'](_0xebf8e){const _0x4ed956=_0x1565f7,{unitId:_0x2a93f6}=_0xebf8e,_0x11ec66=_0xebf8e['threadId'],_0xc3cb5c={'memberId':this[_0x4ed956(0x1ab)][_0x4ed956(0x191)]()[_0x4ed956(0x1bf)],'unitId':_0x2a93f6,'threadId':_0x11ec66,'solved':_0xebf8e[_0x4ed956(0x1b7)]?_0x4bf784['Solved']:_0x4bf784[_0x4ed956(0x18b)]},_0x470aa9=await this[_0x4ed956(0x1b6)][_0x4ed956(0x1d8)](_0x4ed956(0x1e1)+_0x2a93f6+_0x4ed956(0x1e7),{'body':_0xc3cb5c});return!_0x470aa9[_0x4ed956(0x1d4)]['error']||_0x470aa9[_0x4ed956(0x1d4)][_0x4ed956(0x1a5)][_0x4ed956(0x180)]===0x1;}async['deleteComment'](_0x10db93,_0x2b6a62,_0x3c5b18,_0x4e58c5){const _0x570acb=_0x1565f7,_0x2bb34b={'memberId':(await this[_0x570acb(0x16e)][_0x570acb(0x192)](_0x10db93))[_0x570acb(0x19c)](),'threadId':_0x3c5b18,'replyId':_0x4e58c5,'unitId':_0x10db93},_0x3c0787=await this[_0x570acb(0x1b6)][_0x570acb(0x1d8)]('/universer-api/comment/unit/'+_0x10db93+_0x570acb(0x1b4),{'body':_0x2bb34b});return!_0x3c0787[_0x570acb(0x1d4)][_0x570acb(0x1a5)]||_0x3c0787[_0x570acb(0x1d4)]['error'][_0x570acb(0x180)]===0x1;}async[_0x1565f7(0x1d7)](_0x3e0893,_0xdfafd7,_0x3eaf12){const _0xf17b9a=_0x1565f7,_0x54cff3={'unitId':_0x3e0893,'threadId':_0x3eaf12},_0x1249c2=await this[_0xf17b9a(0x1b6)][_0xf17b9a(0x1d8)](_0xf17b9a(0x1e1)+_0x3e0893+_0xf17b9a(0x1e2),{'body':_0x54cff3}),_0x5c0a0e=_0x3eaf12['map'](_0x2606c2=>_0x2b555f(_0x1249c2[_0xf17b9a(0x1d4)]['comments'][_0x2606c2],_0x3e0893,_0xdfafd7))['filter'](Boolean);return Object['values'](_0x1249c2[_0xf17b9a(0x1d4)]['users'])[_0xf17b9a(0x1bd)](_0x5ded80=>{const _0x4b874b=_0xf17b9a;this[_0x4b874b(0x1ab)][_0x4b874b(0x1df)](_0x5ded80);}),_0x5c0a0e;}['saveCommentToSnapshot'](_0x1a5074){const _0x58e8a4=_0x1565f7;return{'id':_0x1a5074['id'],'threadId':_0x1a5074[_0x58e8a4(0x1a3)],'ref':_0x1a5074[_0x58e8a4(0x1e3)]};}};_0x3123b7=_0x3a377e([_0x2bdfc5(0x0,_0x4ecff4[_0x1565f7(0x17e)](_0x5071d1['HTTPService'])),_0x2bdfc5(0x1,_0x4ecff4[_0x1565f7(0x17e)](_0x4ecff4['UserManagerService'])),_0x2bdfc5(0x2,_0x4ecff4['Inject'](_0x1964b2[_0x1565f7(0x1dd)])),_0x2bdfc5(0x3,_0x4ecff4[_0x1565f7(0x17e)](_0x4ecff4[_0x1565f7(0x1d1)]))],_0x3123b7);var _0x34817e=Object[_0x1565f7(0x1b8)],_0x5219a3=(_0x29bbc5,_0x357171,_0x5ca252,_0x54c407)=>{const _0x34047=_0x1565f7;for(var _0xb7a9de=_0x54c407>0x1?void 0x0:_0x54c407?_0x34817e(_0x357171,_0x5ca252):_0x357171,_0x4fcfcb=_0x29bbc5[_0x34047(0x176)]-0x1,_0x4d4e19;_0x4fcfcb>=0x0;_0x4fcfcb--)(_0x4d4e19=_0x29bbc5[_0x4fcfcb])&&(_0xb7a9de=_0x4d4e19(_0xb7a9de)||_0xb7a9de);return _0xb7a9de;},_0x16a223=(_0x183c3d,_0x40b296)=>(_0x5da1f7,_0x561c0f)=>_0x40b296(_0x5da1f7,_0x561c0f,_0x183c3d);let _0x28da2a=class extends _0x4ecff4[_0x1565f7(0x1bc)]{constructor(_0x36a8c7,_0x19cdd8){const _0x5cc775=_0x1565f7;super(),this[_0x5cc775(0x1a1)]=_0x36a8c7,this[_0x5cc775(0x1c9)]=_0x19cdd8,this['_initDataSource']();}[_0x1565f7(0x1c1)](){const _0x469df5=_0x1565f7;this[_0x469df5(0x1a1)][_0x469df5(0x1a4)]=this[_0x469df5(0x1c9)],this['_threadCommentDataSourceService'][_0x469df5(0x1d2)]=!0x1;}};_0x28da2a=_0x5219a3([_0x16a223(0x0,_0x223cf2['IThreadCommentDataSourceService']),_0x16a223(0x1,_0x4ecff4[_0x1565f7(0x17e)](_0x3123b7))],_0x28da2a);var _0x2c5d99=Object[_0x1565f7(0x172)],_0x14fd11=Object['getOwnPropertyDescriptor'],_0x27ea05=(_0x463728,_0x1e7ebd,_0x1a7353)=>_0x1e7ebd in _0x463728?_0x2c5d99(_0x463728,_0x1e7ebd,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1a7353}):_0x463728[_0x1e7ebd]=_0x1a7353,_0x1ba6b4=(_0x5d9495,_0x3e726a,_0x101750,_0x5e31fa)=>{const _0x4cfcfd=_0x1565f7;for(var _0x4bfdb9=_0x5e31fa>0x1?void 0x0:_0x5e31fa?_0x14fd11(_0x3e726a,_0x101750):_0x3e726a,_0x3e5982=_0x5d9495[_0x4cfcfd(0x176)]-0x1,_0x21298f;_0x3e5982>=0x0;_0x3e5982--)(_0x21298f=_0x5d9495[_0x3e5982])&&(_0x4bfdb9=_0x21298f(_0x4bfdb9)||_0x4bfdb9);return _0x4bfdb9;},_0x4a63be=(_0x3c6f76,_0x379ad4)=>(_0x40640a,_0x14700c)=>_0x379ad4(_0x40640a,_0x14700c,_0x3c6f76),_0x8efde3=(_0x41e6df,_0x5e84e4,_0x51f6be)=>_0x27ea05(_0x41e6df,typeof _0x5e84e4!=_0x1565f7(0x1b1)?_0x5e84e4+'':_0x5e84e4,_0x51f6be);_0x2f5869['UniverThreadCommentDataSourcePlugin']=class extends _0x4ecff4[_0x1565f7(0x1cd)]{constructor(_0x4281af=_0x2e8f12,_0x460c90,_0x50dba1){const _0x2b02c6=_0x1565f7;super(),this[_0x2b02c6(0x1ea)]=_0x4281af,this[_0x2b02c6(0x19a)]=_0x460c90,this[_0x2b02c6(0x1d3)]=_0x50dba1;const {..._0x1377bc}=_0x4ecff4[_0x2b02c6(0x17b)]({},_0x2e8f12,this[_0x2b02c6(0x1ea)]);this[_0x2b02c6(0x1d3)]['setConfig'](_0x36e886,_0x1377bc);}[_0x1565f7(0x1c7)](){[[_0x3123b7],[_0x28da2a],[_0x22d035]]['forEach'](_0x53e0b9=>{const _0x3a885f=_0x1f47;this[_0x3a885f(0x19a)][_0x3a885f(0x169)](_0x53e0b9);});}['onReady'](){const _0x154628=_0x1565f7;this[_0x154628(0x19a)][_0x154628(0x163)](_0x28da2a),this[_0x154628(0x19a)][_0x154628(0x163)](_0x22d035);}},_0x8efde3(_0x2f5869[_0x1565f7(0x1b0)],'pluginName',_0x577ec7),_0x8efde3(_0x2f5869[_0x1565f7(0x1b0)],'type',_0x4ecff4[_0x1565f7(0x196)][_0x1565f7(0x1b9)]),_0x2f5869[_0x1565f7(0x1b0)]=_0x1ba6b4([_0x4ecff4[_0x1565f7(0x1af)](_0x392893[_0x1565f7(0x1de)],_0x1964b2[_0x1565f7(0x1e6)],_0x2356c0[_0x1565f7(0x1e4)]),_0x4a63be(0x1,_0x4ecff4[_0x1565f7(0x17e)](_0x4ecff4[_0x1565f7(0x1d1)])),_0x4a63be(0x2,_0x4ecff4[_0x1565f7(0x1e0)])],_0x2f5869[_0x1565f7(0x1b0)]),Object['defineProperty'](_0x2f5869,Symbol[_0x1565f7(0x19d)],{'value':_0x1565f7(0x1be)});}));function _0x1f47(_0x20a5a5,_0x2a1ee2){const _0x4a3bf6=_0x4a3b();return _0x1f47=function(_0x1f473d,_0x335606){_0x1f473d=_0x1f473d-0x161;let _0x4fa57a=_0x4a3bf6[_0x1f473d];return _0x4fa57a;},_0x1f47(_0x20a5a5,_0x2a1ee2);}function _0x4a3b(){const _0x3f0f7f=['users','delete','onStarting','@univerjs-pro/license','_threadCommentDataSource','find','Solve','60vnaIMm','Plugin','_threadCommentModel','filter','deleteComment','Injector','syncUpdateMutationToColla','_configService','body','Add','10sPPmUr','listComments','post','Solved','58274FOUwXn','pipe','parse','CollaborationSessionService','UniverThreadCommentUIPlugin','addUser','IConfigService','/universer-api/comment/unit/','/list','ref','UniverLicensePlugin','/universer-api/user/list','UniverCollaborationClientPlugin','/solved','rangeType','Unknown','_config','_commentService','YYYY/MM/DD\x20HH:mm','/reply','reply','get','getComment','ThreadCommentModel','size','UniverThreadCommentUi','object','add','content','Edit','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','userId','_sessionService','CustomRangeType','2395bXnbuJ','/edit','defineProperty','UserManagerService','replies','@univerjs-pro/collaboration-client','length','434640osFCnB','_init','customRanges','4707549yxvdIp','merge','6251iudBiM','updateComment','Inject','format','code','stringify','Delete','unitId','commentUpdate$','1824777DFXsQw','personId','parentId','1912zGYjYY','disposeWithMe','solved','OpenOrReOpen','root','map','payload','COMMENT','1073293SDIWGE','getCurrentUser','requireSession','rxjs','resolveComment','@univerjs/core','UniverInstanceType','exports','addComment','getUser','_injector','Reply','getMemberID','toStringTag','user','/add','HTTPService','_threadCommentDataSourceService','comment','threadId','dataSource','error','rangeId','8LUoDsI','slice','1986NZSfrq','@univerjs/network','_userService','createTimestamp','UNRECOGNIZED','bufferTime','DependentOn','UniverThreadCommentDataSourcePlugin','symbol','15AHhEXM','_initUserSync','/delete','subscribe','_httpService','resolved','getOwnPropertyDescriptor','UNIVER_UNKNOWN','@univerjs/thread-comment-ui','replyId','Disposable','forEach','Module','userID','dayjs','_initDataSource','amd','type','UniverProCollaborationClient'];_0x4a3b=function(){return _0x3f0f7f;};return _0x4a3b();}
|
|
1
|
+
function _0x28d8(_0x2e18a7,_0x1c4bd5){const _0xe45183=_0xe451();return _0x28d8=function(_0x28d830,_0x1952ac){_0x28d830=_0x28d830-0x115;let _0x1a0f71=_0xe45183[_0x28d830];return _0x1a0f71;},_0x28d8(_0x2e18a7,_0x1c4bd5);}(function(_0x737da0,_0x2ebf78){const _0x440944=_0x28d8,_0x5deac3=_0x737da0();while(!![]){try{const _0x280ceb=-parseInt(_0x440944(0x130))/0x1+-parseInt(_0x440944(0x17d))/0x2*(parseInt(_0x440944(0x17a))/0x3)+-parseInt(_0x440944(0x173))/0x4*(parseInt(_0x440944(0x135))/0x5)+-parseInt(_0x440944(0x167))/0x6+-parseInt(_0x440944(0x179))/0x7*(parseInt(_0x440944(0x17b))/0x8)+parseInt(_0x440944(0x159))/0x9+parseInt(_0x440944(0x150))/0xa;if(_0x280ceb===_0x2ebf78)break;else _0x5deac3['push'](_0x5deac3['shift']());}catch(_0x246cda){_0x5deac3['push'](_0x5deac3['shift']());}}}(_0xe451,0xd33db),function(_0x56e5c8,_0x3eb2fb){const _0xfe108b=_0x28d8;typeof exports==_0xfe108b(0x160)&&typeof module<'u'?_0x3eb2fb(exports,require('@univerjs-pro/collaboration-client'),require(_0xfe108b(0x15e)),require(_0xfe108b(0x174)),require(_0xfe108b(0x151)),require(_0xfe108b(0x13d)),require(_0xfe108b(0x161)),require(_0xfe108b(0x158))):typeof define==_0xfe108b(0x15b)&&define[_0xfe108b(0x184)]?define([_0xfe108b(0x188),'@univerjs-pro/collaboration-client',_0xfe108b(0x15e),_0xfe108b(0x174),_0xfe108b(0x151),_0xfe108b(0x13d),_0xfe108b(0x161),_0xfe108b(0x158)],_0x3eb2fb):(_0x56e5c8=typeof globalThis<'u'?globalThis:_0x56e5c8||self,_0x3eb2fb(_0x56e5c8[_0xfe108b(0x180)]={},_0x56e5c8['UniverProCollaborationClient'],_0x56e5c8[_0xfe108b(0x183)],_0x56e5c8[_0xfe108b(0x162)],_0x56e5c8['UniverThreadCommentUi'],_0x56e5c8[_0xfe108b(0x178)],_0x56e5c8[_0xfe108b(0x161)],_0x56e5c8[_0xfe108b(0x12a)]));}(this,function(_0x3bc6a7,_0x433cce,_0x1b2383,_0x514b15,_0x561bbe,_0x289cbf,_0x250e03,_0x488e04){'use strict';const _0x39ff1a=_0x28d8;const _0x4e1eaa=_0x39ff1a(0x18d);var _0x299546=(_0x212bf6=>(_0x212bf6[_0x212bf6['OpenOrReOpen']=0x0]=_0x39ff1a(0x125),_0x212bf6[_0x212bf6[_0x39ff1a(0x12e)]=0x1]=_0x39ff1a(0x12e),_0x212bf6[_0x212bf6[_0x39ff1a(0x194)]=-0x1]='UNRECOGNIZED',_0x212bf6))(_0x299546||{}),_0x5fb325=(_0x3fd63b=>(_0x3fd63b[_0x3fd63b[_0x39ff1a(0x168)]=0x0]=_0x39ff1a(0x168),_0x3fd63b[_0x3fd63b['Add']=0x1]=_0x39ff1a(0x153),_0x3fd63b[_0x3fd63b[_0x39ff1a(0x134)]=0x2]=_0x39ff1a(0x134),_0x3fd63b[_0x3fd63b[_0x39ff1a(0x126)]=0x3]=_0x39ff1a(0x126),_0x3fd63b[_0x3fd63b[_0x39ff1a(0x166)]=0x4]=_0x39ff1a(0x166),_0x3fd63b[_0x3fd63b[_0x39ff1a(0x163)]=0x5]=_0x39ff1a(0x163),_0x3fd63b[_0x3fd63b[_0x39ff1a(0x194)]=-0x1]=_0x39ff1a(0x194),_0x3fd63b))(_0x5fb325||{});const _0x261f0d=_0x40603b=>_0x514b15[_0x39ff1a(0x14b)](new Date(+_0x40603b))[_0x39ff1a(0x13b)](_0x39ff1a(0x11a)),_0x2ba4ef=async(_0x16c1a8,_0x30ae07)=>{const _0x2cf05a=_0x39ff1a,_0x37ae9f=_0x16c1a8[_0x2cf05a(0x16b)](_0x514b15[_0x2cf05a(0x147)]),_0x40c3f1=_0x16c1a8[_0x2cf05a(0x16b)](_0x488e04[_0x2cf05a(0x120)]);_0x30ae07['forEach'](_0x48c749=>{_0x37ae9f['getUser'](_0x48c749)&&_0x30ae07['delete'](_0x48c749);}),_0x30ae07[_0x2cf05a(0x136)]&&(await _0x40c3f1[_0x2cf05a(0x16b)]('/universer-api/user/list',{'params':{'userIDs':[..._0x30ae07]}}))[_0x2cf05a(0x142)]['users'][_0x2cf05a(0x15c)](_0x581abf=>{const _0x385168=_0x2cf05a;_0x581abf&&_0x37ae9f[_0x385168(0x143)](_0x581abf);});};var _0x3e7340=Object['getOwnPropertyDescriptor'],_0x43b55f=(_0x3e2d90,_0x42c2cc,_0x5bae41,_0xb22255)=>{const _0x3e524c=_0x39ff1a;for(var _0x3a3b7f=_0xb22255>0x1?void 0x0:_0xb22255?_0x3e7340(_0x42c2cc,_0x5bae41):_0x42c2cc,_0x48690a=_0x3e2d90[_0x3e524c(0x118)]-0x1,_0x5b1768;_0x48690a>=0x0;_0x48690a--)(_0x5b1768=_0x3e2d90[_0x48690a])&&(_0x3a3b7f=_0x5b1768(_0x3a3b7f)||_0x3a3b7f);return _0x3a3b7f;},_0x62c980=(_0x18c22c,_0x43fb89)=>(_0x3ec1fa,_0x1833da)=>_0x43fb89(_0x3ec1fa,_0x1833da,_0x18c22c);let _0x52e0e4=class extends _0x514b15[_0x39ff1a(0x164)]{constructor(_0x5f3ab3,_0x2df38e,_0x52008d,_0xa513c7){const _0x56a037=_0x39ff1a;super(),this[_0x56a037(0x175)]=_0x5f3ab3,this[_0x56a037(0x140)]=_0x2df38e,this['_userService']=_0x52008d,this[_0x56a037(0x181)]=_0xa513c7,this[_0x56a037(0x131)](),this[_0x56a037(0x141)]();}[_0x39ff1a(0x141)](){const _0xcc0314=_0x39ff1a;this['disposeWithMe'](this[_0xcc0314(0x140)]['commentUpdate$'][_0xcc0314(0x145)](_0x250e03[_0xcc0314(0x123)](0x10))[_0xcc0314(0x11e)](_0x4557ea=>{const _0xbe4a9f=_0xcc0314,_0x506999=new Set();_0x4557ea[_0xbe4a9f(0x15c)](_0x277ffe=>{const _0x190a29=_0xbe4a9f;switch(_0x277ffe['type']){case _0x190a29(0x17f):{const _0x3288d9=_0x277ffe['payload'][_0x190a29(0x16f)];_0x506999[_0x190a29(0x17f)](_0x3288d9);break;}}}),_0x2ba4ef(this[_0xbe4a9f(0x181)],_0x506999);}));}[_0x39ff1a(0x131)](){const _0x10fab1=_0x39ff1a;this[_0x10fab1(0x18b)](this[_0x10fab1(0x175)]['commentUpdate$'][_0x10fab1(0x11e)](async _0x1175f9=>{const _0x3c4531=_0x10fab1;var _0x3ab5d3,_0x74ea7a,_0x2fd40b,_0x5d4d14;const _0x51b733=(_0x3ab5d3=this[_0x3c4531(0x140)][_0x3c4531(0x177)](_0x1175f9['unitId'])[_0x3c4531(0x154)](_0x6d54f3=>_0x6d54f3[_0x3c4531(0x137)]===_0x1175f9[_0x3c4531(0x137)]))==null?void 0x0:_0x3ab5d3[_0x3c4531(0x122)];if(!_0x51b733)return;const {unitId:_0x42f872,subUnitId:_0x2a5642}=_0x51b733;switch(_0x1175f9[_0x3c4531(0x18a)]&&this['_userService'][_0x3c4531(0x143)](_0x1175f9[_0x3c4531(0x18a)]),_0x1175f9[_0x3c4531(0x124)]){case _0x5fb325[_0x3c4531(0x153)]:break;case _0x5fb325[_0x3c4531(0x134)]:{this['_threadCommentModel'][_0x3c4531(0x12f)](_0x42f872,_0x2a5642,{'unitId':_0x42f872,'subUnitId':_0x2a5642,'ref':'','id':_0x1175f9[_0x3c4531(0x189)],'dT':_0x261f0d(+_0x1175f9[_0x3c4531(0x14d)]),'threadId':_0x1175f9['threadId'],'personId':(_0x2fd40b=(_0x74ea7a=_0x1175f9[_0x3c4531(0x18a)])==null?void 0x0:_0x74ea7a[_0x3c4531(0x185)])!=null?_0x2fd40b:_0x1175f9[_0x3c4531(0x171)],'text':JSON[_0x3c4531(0x148)](_0x1175f9[_0x3c4531(0x13a)]),'parentId':_0x51b733['id']});break;}case _0x5fb325['Delete']:{const _0x135f5a=this['_threadCommentModel'][_0x3c4531(0x13f)](_0x42f872,_0x2a5642,_0x1175f9[_0x3c4531(0x189)]);_0x135f5a&&_0x135f5a['parentId']&&this[_0x3c4531(0x140)][_0x3c4531(0x182)](_0x42f872,_0x2a5642,_0x1175f9['replyId']);break;}case _0x5fb325['Edit']:{this[_0x3c4531(0x140)][_0x3c4531(0x12d)](_0x42f872,_0x2a5642,{'commentId':_0x1175f9['replyId'],'text':JSON['parse'](_0x1175f9[_0x3c4531(0x13a)])});break;}case _0x5fb325[_0x3c4531(0x163)]:{const _0x5ec84e=(_0x5d4d14=this[_0x3c4531(0x140)]['getUnit'](_0x1175f9[_0x3c4531(0x121)])[_0x3c4531(0x154)](_0xf016b1=>_0xf016b1['threadId']===_0x1175f9[_0x3c4531(0x137)]))==null?void 0x0:_0x5d4d14[_0x3c4531(0x122)];_0x5ec84e&&this['_threadCommentModel']['resolveComment'](_0x42f872,_0x2a5642,_0x5ec84e['id'],_0x1175f9['solved']===_0x299546[_0x3c4531(0x12e)]);break;}}}));}};_0x52e0e4=_0x43b55f([_0x62c980(0x0,_0x514b15['Inject'](_0x433cce[_0x39ff1a(0x156)])),_0x62c980(0x1,_0x514b15['Inject'](_0x289cbf[_0x39ff1a(0x165)])),_0x62c980(0x2,_0x514b15[_0x39ff1a(0x144)](_0x514b15[_0x39ff1a(0x147)])),_0x62c980(0x3,_0x514b15['Inject'](_0x514b15['Injector']))],_0x52e0e4);const _0x32ebf5='thread-comment-data-source.config',_0x4e82a1={};var _0x2ce1e1=Object[_0x39ff1a(0x11f)],_0x32318a=(_0x23b9b2,_0x5d4ced,_0x1e8177,_0x1d7d5b)=>{const _0x1b8973=_0x39ff1a;for(var _0x4fa3c5=_0x1d7d5b>0x1?void 0x0:_0x1d7d5b?_0x2ce1e1(_0x5d4ced,_0x1e8177):_0x5d4ced,_0x2d2cd7=_0x23b9b2[_0x1b8973(0x118)]-0x1,_0x2c78f5;_0x2d2cd7>=0x0;_0x2d2cd7--)(_0x2c78f5=_0x23b9b2[_0x2d2cd7])&&(_0x4fa3c5=_0x2c78f5(_0x4fa3c5)||_0x4fa3c5);return _0x4fa3c5;},_0x1c4644=(_0x3b983c,_0x3b9658)=>(_0x22fd22,_0x356069)=>_0x3b9658(_0x22fd22,_0x356069,_0x3b983c);function _0x1de4da(_0x129b7b,_0x47e127){const _0x112af7=_0x39ff1a,_0x525712=_0x129b7b['replies'][0x0];return{..._0x47e127,'id':_0x525712[_0x112af7(0x189)],'resolved':_0x129b7b[_0x112af7(0x14a)]===0x1,'dT':_0x261f0d(_0x525712[_0x112af7(0x14d)]),'personId':_0x525712[_0x112af7(0x171)],'threadId':_0x525712[_0x112af7(0x137)]};}function _0x909113(_0x539bbd,_0x210351,_0x3f87e1){const _0x3db8f2=_0x39ff1a;var _0x1fa803,_0x5d0fa3;if(((_0x5d0fa3=(_0x1fa803=_0x539bbd==null?void 0x0:_0x539bbd[_0x3db8f2(0x176)])==null?void 0x0:_0x1fa803[_0x3db8f2(0x118)])!=null?_0x5d0fa3:0x0)>0x0){const _0x3ef28d=(_0x2bf431,_0x22d6c4)=>({'id':_0x2bf431[_0x3db8f2(0x189)],'threadId':_0x2bf431[_0x3db8f2(0x137)],'dT':_0x261f0d(_0x2bf431[_0x3db8f2(0x14d)]),'personId':_0x2bf431[_0x3db8f2(0x171)],'resolved':_0x539bbd['solved']===_0x299546[_0x3db8f2(0x12e)],'unitId':_0x210351,'subUnitId':_0x3f87e1,'text':JSON[_0x3db8f2(0x148)](_0x2bf431[_0x3db8f2(0x13a)]),'parentId':_0x22d6c4}),_0x2eb553=_0x3ef28d(_0x539bbd[_0x3db8f2(0x176)][0x0]);return{..._0x2eb553,'children':_0x539bbd[_0x3db8f2(0x176)][_0x3db8f2(0x11b)](0x1)[_0x3db8f2(0x149)](_0x4ddce8=>_0x3ef28d(_0x4ddce8,_0x2eb553['id']))};}return null;}let _0xc24ad0=class{constructor(_0x24026f,_0x5f245d,_0x2ba8d7,_0x17f2ad){const _0x2e0ec3=_0x39ff1a;this[_0x2e0ec3(0x17c)]=_0x24026f,this['_userService']=_0x5f245d,this['_sessionService']=_0x2ba8d7,this[_0x2e0ec3(0x181)]=_0x17f2ad;}async[_0x39ff1a(0x12f)](_0x1f2a98){const _0x38c028=_0x39ff1a;var _0x1720f7,_0x347cb5;const {parentId:_0x4ef067,unitId:_0x166a6d,text:_0x150974,threadId:_0x3e08f6}=_0x1f2a98,_0x500840=(_0x347cb5=(_0x1720f7=_0x150974[_0x38c028(0x18c)])==null?void 0x0:_0x1720f7[_0x38c028(0x127)](_0x8227b6=>_0x8227b6[_0x38c028(0x11d)]===_0x514b15['CustomRangeType'][_0x38c028(0x195)])[_0x38c028(0x149)](_0x145cb4=>_0x145cb4['rangeId']))!=null?_0x347cb5:[],_0x4859ab=JSON[_0x38c028(0x155)](_0x150974),_0x29fdb8=(await this[_0x38c028(0x157)]['requireSession'](_0x166a6d))[_0x38c028(0x16e)]();if(_0x4ef067){const _0x5a1d12={'memberId':_0x29fdb8,'unitId':_0x166a6d,'content':_0x4859ab,'mention':_0x500840,'threadId':_0x3e08f6},_0x51ef3f=(await this['_httpService'][_0x38c028(0x138)](_0x38c028(0x18f)+_0x166a6d+'/reply',{'body':_0x5a1d12}))[_0x38c028(0x142)][_0x38c028(0x15a)];return{..._0x1f2a98,'id':_0x51ef3f['replyId'],'dT':_0x514b15['dayjs'](+_0x51ef3f[_0x38c028(0x14d)])['format'](_0x38c028(0x11a)),'personId':_0x51ef3f['userId']};}else{const _0x36e0ff={'memberId':_0x29fdb8,'unitId':_0x166a6d,'content':_0x4859ab,'mention':_0x500840},_0x73d9a3=await this['_httpService'][_0x38c028(0x138)](_0x38c028(0x18f)+_0x166a6d+'/add',{'body':_0x36e0ff});return _0x1de4da(_0x73d9a3[_0x38c028(0x142)][_0x38c028(0x169)],_0x1f2a98);}}async[_0x39ff1a(0x12d)](_0x5a9fe3){const _0x4e620c=_0x39ff1a;var _0x4795ad,_0x26c8a7;const {text:_0x25c4ab,unitId:_0xe7c26a}=_0x5a9fe3,_0x1ec216=(_0x26c8a7=(_0x4795ad=_0x25c4ab['customRanges'])==null?void 0x0:_0x4795ad[_0x4e620c(0x127)](_0x5ab97d=>_0x5ab97d[_0x4e620c(0x11d)]===_0x514b15['CustomRangeType'][_0x4e620c(0x195)])[_0x4e620c(0x149)](_0x12dcdd=>_0x12dcdd[_0x4e620c(0x17e)]))!=null?_0x26c8a7:[],_0x14b51b=JSON[_0x4e620c(0x155)](_0x25c4ab),_0x12f209=_0x5a9fe3[_0x4e620c(0x137)],_0x5cac7e=_0x5a9fe3['id'],_0x426872={'memberId':(await this['_sessionService']['requireSession'](_0xe7c26a))[_0x4e620c(0x16e)](),'unitId':_0xe7c26a,'threadId':_0x12f209,'mention':_0x1ec216,'content':_0x14b51b,'replyId':_0x5cac7e},_0x50e5ea=await this['_httpService'][_0x4e620c(0x138)](_0x4e620c(0x18f)+_0xe7c26a+_0x4e620c(0x14e),{'body':_0x426872});return!_0x50e5ea[_0x4e620c(0x142)]['error']||_0x50e5ea[_0x4e620c(0x142)][_0x4e620c(0x12c)][_0x4e620c(0x193)]===0x1;}async[_0x39ff1a(0x116)](_0x5d8f3f){const _0x33234b=_0x39ff1a,{unitId:_0x3b60bf}=_0x5d8f3f,_0x2a40c9=_0x5d8f3f['threadId'],_0x4bcc0d={'memberId':this[_0x33234b(0x15f)][_0x33234b(0x146)]()[_0x33234b(0x185)],'unitId':_0x3b60bf,'threadId':_0x2a40c9,'solved':_0x5d8f3f[_0x33234b(0x12b)]?_0x299546[_0x33234b(0x12e)]:_0x299546[_0x33234b(0x125)]},_0x33528e=await this[_0x33234b(0x17c)]['post'](_0x33234b(0x18f)+_0x3b60bf+_0x33234b(0x129),{'body':_0x4bcc0d});return!_0x33528e['body']['error']||_0x33528e[_0x33234b(0x142)][_0x33234b(0x12c)][_0x33234b(0x193)]===0x1;}async[_0x39ff1a(0x182)](_0xca75ce,_0x35d151,_0x15dcd2,_0x2c0d7b){const _0x598356=_0x39ff1a,_0x16ef66={'memberId':(await this[_0x598356(0x157)]['requireSession'](_0xca75ce))['getMemberID'](),'threadId':_0x15dcd2,'replyId':_0x2c0d7b,'unitId':_0xca75ce},_0x2c6aad=await this['_httpService'][_0x598356(0x138)](_0x598356(0x18f)+_0xca75ce+_0x598356(0x133),{'body':_0x16ef66});return!_0x2c6aad[_0x598356(0x142)][_0x598356(0x12c)]||_0x2c6aad[_0x598356(0x142)]['error']['code']===0x1;}async['listComments'](_0x9e41a8,_0x22a1ee,_0x30617f){const _0x572724=_0x39ff1a,_0x127b24={'unitId':_0x9e41a8,'threadId':_0x30617f},_0x15eb15=await this['_httpService'][_0x572724(0x138)](_0x572724(0x18f)+_0x9e41a8+_0x572724(0x190),{'body':_0x127b24}),_0x2943e0=_0x30617f[_0x572724(0x149)](_0xab23a0=>_0x909113(_0x15eb15['body'][_0x572724(0x132)][_0xab23a0],_0x9e41a8,_0x22a1ee))[_0x572724(0x127)](Boolean);return Object['values'](_0x15eb15['body'][_0x572724(0x117)])[_0x572724(0x15c)](_0x459b1f=>{const _0x162f58=_0x572724;this[_0x162f58(0x15f)][_0x162f58(0x143)](_0x459b1f);}),_0x2943e0;}['saveCommentToSnapshot'](_0x2873ec){const _0x10c9eb=_0x39ff1a;return{'id':_0x2873ec['id'],'threadId':_0x2873ec[_0x10c9eb(0x137)],'ref':_0x2873ec[_0x10c9eb(0x16d)]};}};_0xc24ad0=_0x32318a([_0x1c4644(0x0,_0x514b15[_0x39ff1a(0x144)](_0x488e04[_0x39ff1a(0x120)])),_0x1c4644(0x1,_0x514b15[_0x39ff1a(0x144)](_0x514b15['UserManagerService'])),_0x1c4644(0x2,_0x514b15[_0x39ff1a(0x144)](_0x433cce[_0x39ff1a(0x14c)])),_0x1c4644(0x3,_0x514b15[_0x39ff1a(0x144)](_0x514b15[_0x39ff1a(0x16a)]))],_0xc24ad0);var _0x3e8732=Object[_0x39ff1a(0x11f)],_0x295c63=(_0x31f1b2,_0x3dea74,_0x5b028f,_0x5337a6)=>{const _0x29e976=_0x39ff1a;for(var _0x3fb7b6=_0x5337a6>0x1?void 0x0:_0x5337a6?_0x3e8732(_0x3dea74,_0x5b028f):_0x3dea74,_0x3bf6e6=_0x31f1b2[_0x29e976(0x118)]-0x1,_0x493d50;_0x3bf6e6>=0x0;_0x3bf6e6--)(_0x493d50=_0x31f1b2[_0x3bf6e6])&&(_0x3fb7b6=_0x493d50(_0x3fb7b6)||_0x3fb7b6);return _0x3fb7b6;},_0x36e747=(_0x1252c7,_0x1148cb)=>(_0x3888bd,_0xbb72ce)=>_0x1148cb(_0x3888bd,_0xbb72ce,_0x1252c7);let _0xce4b48=class extends _0x514b15[_0x39ff1a(0x164)]{constructor(_0x568040,_0x4d1166){const _0x4a2326=_0x39ff1a;super(),this[_0x4a2326(0x191)]=_0x568040,this['_threadCommentDataSource']=_0x4d1166,this['_initDataSource']();}[_0x39ff1a(0x15d)](){const _0x54159b=_0x39ff1a;this[_0x54159b(0x191)]['dataSource']=this[_0x54159b(0x16c)],this[_0x54159b(0x191)]['syncUpdateMutationToColla']=!0x1;}};_0xce4b48=_0x295c63([_0x36e747(0x0,_0x289cbf[_0x39ff1a(0x13c)]),_0x36e747(0x1,_0x514b15[_0x39ff1a(0x144)](_0xc24ad0))],_0xce4b48);var _0x4c7c2f=Object[_0x39ff1a(0x115)],_0x5d2e2b=Object[_0x39ff1a(0x11f)],_0xe8cb57=(_0x19a10a,_0x228aa3,_0x35eab3)=>_0x228aa3 in _0x19a10a?_0x4c7c2f(_0x19a10a,_0x228aa3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x35eab3}):_0x19a10a[_0x228aa3]=_0x35eab3,_0x58fa7b=(_0x1c1a31,_0x28d79a,_0x563487,_0x34197b)=>{const _0x5329ad=_0x39ff1a;for(var _0x46326a=_0x34197b>0x1?void 0x0:_0x34197b?_0x5d2e2b(_0x28d79a,_0x563487):_0x28d79a,_0x484530=_0x1c1a31[_0x5329ad(0x118)]-0x1,_0x207d85;_0x484530>=0x0;_0x484530--)(_0x207d85=_0x1c1a31[_0x484530])&&(_0x46326a=_0x207d85(_0x46326a)||_0x46326a);return _0x46326a;},_0x45423c=(_0x4fd6a5,_0x408011)=>(_0x43ea0c,_0x562c54)=>_0x408011(_0x43ea0c,_0x562c54,_0x4fd6a5),_0x1b9ecd=(_0x27fb26,_0x381767,_0x41265f)=>_0xe8cb57(_0x27fb26,typeof _0x381767!=_0x39ff1a(0x11c)?_0x381767+'':_0x381767,_0x41265f);_0x3bc6a7['UniverThreadCommentDataSourcePlugin']=class extends _0x514b15[_0x39ff1a(0x172)]{constructor(_0x198908=_0x4e82a1,_0x33cb24,_0x578cd2){const _0x12963a=_0x39ff1a;super(),this[_0x12963a(0x119)]=_0x198908,this[_0x12963a(0x181)]=_0x33cb24,this[_0x12963a(0x186)]=_0x578cd2;const {..._0x352027}=_0x514b15['merge']({},_0x4e82a1,this[_0x12963a(0x119)]);this[_0x12963a(0x186)][_0x12963a(0x170)](_0x32ebf5,_0x352027);}[_0x39ff1a(0x128)](){const _0x2e6d0a=_0x39ff1a;[[_0xc24ad0],[_0xce4b48],[_0x52e0e4]][_0x2e6d0a(0x15c)](_0x38e6a9=>{this['_injector']['add'](_0x38e6a9);});}['onReady'](){const _0x29da50=_0x39ff1a;this[_0x29da50(0x181)][_0x29da50(0x16b)](_0xce4b48),this[_0x29da50(0x181)][_0x29da50(0x16b)](_0x52e0e4);}},_0x1b9ecd(_0x3bc6a7['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x4e1eaa),_0x1b9ecd(_0x3bc6a7[_0x39ff1a(0x139)],_0x39ff1a(0x124),_0x514b15['UniverInstanceType'][_0x39ff1a(0x196)]),_0x3bc6a7[_0x39ff1a(0x139)]=_0x58fa7b([_0x514b15['DependentOn'](_0x561bbe[_0x39ff1a(0x13e)],_0x433cce[_0x39ff1a(0x192)],_0x1b2383[_0x39ff1a(0x14f)]),_0x45423c(0x1,_0x514b15[_0x39ff1a(0x144)](_0x514b15['Injector'])),_0x45423c(0x2,_0x514b15[_0x39ff1a(0x18e)])],_0x3bc6a7['UniverThreadCommentDataSourcePlugin']),Object[_0x39ff1a(0x115)](_0x3bc6a7,Symbol[_0x39ff1a(0x187)],{'value':_0x39ff1a(0x152)});}));function _0xe451(){const _0x1bda40=['resolveComment','users','length','_config','YYYY/MM/DD\x20HH:mm','slice','symbol','rangeType','subscribe','getOwnPropertyDescriptor','HTTPService','unitId','root','bufferTime','type','OpenOrReOpen','Edit','filter','onStarting','/solved','UniverNetwork','resolved','error','updateComment','Solved','addComment','1108509bhQbDs','_init','comments','/delete','Reply','155QEVSbh','size','threadId','post','UniverThreadCommentDataSourcePlugin','content','format','IThreadCommentDataSourceService','@univerjs/thread-comment','UniverThreadCommentUIPlugin','getComment','_threadCommentModel','_initUserSync','body','addUser','Inject','pipe','getCurrentUser','UserManagerService','parse','map','solved','dayjs','CollaborationSessionService','createTimestamp','/edit','UniverLicensePlugin','46848700YClbAh','@univerjs/thread-comment-ui','Module','Add','find','stringify','CommentService','_sessionService','@univerjs/network','3832911jGSiKB','reply','function','forEach','_initDataSource','@univerjs-pro/license','_userService','object','rxjs','UniverCore','Solve','Disposable','ThreadCommentModel','Delete','5526948swRozM','Unknown','comment','Injector','get','_threadCommentDataSource','ref','getMemberID','personId','setConfig','userId','Plugin','175196xsjvlw','@univerjs/core','_commentService','replies','getUnit','UniverThreadComment','19369URKQPz','141QTFfyu','952dOunuF','_httpService','22502dOOGLQ','rangeId','add','UniverProThreadCommentDatasource','_injector','deleteComment','UniverProLicense','amd','userID','_configService','toStringTag','exports','replyId','user','disposeWithMe','customRanges','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','IConfigService','/universer-api/comment/unit/','/list','_threadCommentDataSourceService','UniverCollaborationClientPlugin','code','UNRECOGNIZED','COMMENT','UNIVER_UNKNOWN','defineProperty'];_0xe451=function(){return _0x1bda40;};return _0xe451();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.6.
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.6.
|
|
54
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.6.2",
|
|
49
|
+
"@univerjs/protocol": "0.1.44-alpha.3",
|
|
50
|
+
"@univerjs-pro/license": "0.6.2",
|
|
51
|
+
"@univerjs/core": "0.6.2",
|
|
52
|
+
"@univerjs/network": "0.6.2",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.6.2",
|
|
54
|
+
"@univerjs/thread-comment": "0.6.2"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|
|
58
58
|
"typescript": "^5.7.3",
|
|
59
|
-
"vite": "^6.
|
|
60
|
-
"vitest": "^3.0.
|
|
61
|
-
"@univerjs-infra/shared": "0.6.
|
|
59
|
+
"vite": "^6.2.0",
|
|
60
|
+
"vitest": "^3.0.7",
|
|
61
|
+
"@univerjs-infra/shared": "0.6.2"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|