@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202505241606 → 0.7.0-nightly.202505251606
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x444990=_0x4014;function _0x4014(_0x1f8217,_0x35ab7f){const _0x4e0e8c=_0x4e0e();return _0x4014=function(_0x401498,_0x45de70){_0x401498=_0x401498-0x13c;let _0x349ca9=_0x4e0e8c[_0x401498];return _0x349ca9;},_0x4014(_0x1f8217,_0x35ab7f);}(function(_0x221fca,_0x1f6e29){const _0x33b3e3=_0x4014,_0x4efeec=_0x221fca();while(!![]){try{const _0x12fb78=parseInt(_0x33b3e3(0x161))/0x1*(-parseInt(_0x33b3e3(0x146))/0x2)+parseInt(_0x33b3e3(0x173))/0x3*(-parseInt(_0x33b3e3(0x13c))/0x4)+parseInt(_0x33b3e3(0x18b))/0x5*(-parseInt(_0x33b3e3(0x19e))/0x6)+-parseInt(_0x33b3e3(0x160))/0x7+parseInt(_0x33b3e3(0x148))/0x8*(parseInt(_0x33b3e3(0x13e))/0x9)+-parseInt(_0x33b3e3(0x1a4))/0xa*(-parseInt(_0x33b3e3(0x182))/0xb)+parseInt(_0x33b3e3(0x141))/0xc*(parseInt(_0x33b3e3(0x186))/0xd);if(_0x12fb78===_0x1f6e29)break;else _0x4efeec['push'](_0x4efeec['shift']());}catch(_0x11ea45){_0x4efeec['push'](_0x4efeec['shift']());}}}(_0x4e0e,0x9c2bd));Object[_0x444990(0x17f)](exports,Symbol[_0x444990(0x1a2)],{'value':_0x444990(0x1b4)});function _0x4e0e(){const _0x4c82c6=['CommentService','_threadCommentDataSource','merge','symbol','rangeId','userID','Solved','content','get','stringify','solved','getCurrentUser','@univerjs/network','3989174woVEwf','546283iBmdsx','/solved','rxjs','_threadCommentModel','dayjs','post','replyId','deleteComment','root','subscribe','pluginName','UniverThreadCommentDataSourcePlugin','comments','@univerjs-pro/license','find','forEach','COMMENT','error','3TqwWkc','onStarting','values','CollaborationSessionService','UniverThreadCommentUIPlugin','filter','/add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','requireSession','IThreadCommentDataSourceService','length','UNRECOGNIZED','defineProperty','unitId','YYYY/MM/DD\x20HH:mm','477884qXyLus','Unknown','user','UserManagerService','4616573LUqmPP','IConfigService','@univerjs-pro/collaboration-client','HTTPService','UniverCollaborationClientPlugin','93580oTUwtn','updateComment','onReady','getComment','_userService','resolveComment','Disposable','Inject','resolved','replies','/edit','/list','UniverInstanceType','Solve','_httpService','@univerjs/core','_config','users','map','42DhWtRS','dataSource','userId','getMemberID','toStringTag','threadId','190TgwgDd','addUser','getOwnPropertyDescriptor','/delete','Add','Injector','UniverLicensePlugin','thread-comment-data-source.config','CustomRangeType','/reply','/universer-api/comment/unit/','body','Delete','_commentService','Plugin','_configService','Module','comment','reply','_initUserSync','rangeType','@univerjs/thread-comment','format','customRanges','commentUpdate$','_injector','5093068EcNZzn','createTimestamp','36WPWLjF','getUnit','delete','60zfhwGE','disposeWithMe','Reply','payload','setConfig','2euAjwZ','_threadCommentDataSourceService','1118160lNSrne','_sessionService','type','_init','parse','code','Edit','OpenOrReOpen','_initDataSource','/universer-api/user/list','addComment'];_0x4e0e=function(){return _0x4c82c6;};return _0x4e0e();}const b=require(_0x444990(0x188)),T=require(_0x444990(0x16e)),c=require(_0x444990(0x19a)),j=require('@univerjs/thread-comment-ui'),M=require(_0x444990(0x1b9)),w=require(_0x444990(0x163)),P=require(_0x444990(0x15f)),U=_0x444990(0x17a);var I=(_0x4c3320=>(_0x4c3320[_0x4c3320['OpenOrReOpen']=0x0]=_0x444990(0x14f),_0x4c3320[_0x4c3320[_0x444990(0x159)]=0x1]=_0x444990(0x159),_0x4c3320[_0x4c3320[_0x444990(0x17e)]=-0x1]='UNRECOGNIZED',_0x4c3320))(I||{}),v=(_0x31bf7a=>(_0x31bf7a[_0x31bf7a[_0x444990(0x183)]=0x0]=_0x444990(0x183),_0x31bf7a[_0x31bf7a[_0x444990(0x1a8)]=0x1]=_0x444990(0x1a8),_0x31bf7a[_0x31bf7a[_0x444990(0x143)]=0x2]=_0x444990(0x143),_0x31bf7a[_0x31bf7a['Edit']=0x3]=_0x444990(0x14e),_0x31bf7a[_0x31bf7a['Delete']=0x4]=_0x444990(0x1b0),_0x31bf7a[_0x31bf7a[_0x444990(0x198)]=0x5]=_0x444990(0x198),_0x31bf7a[_0x31bf7a[_0x444990(0x17e)]=-0x1]=_0x444990(0x17e),_0x31bf7a))(v||{});const f=_0xca6986=>c[_0x444990(0x165)](new Date(+_0xca6986))[_0x444990(0x1ba)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x1e1164,_0x9baa00)=>{const _0x2694a8=_0x444990,_0x172b08=_0x1e1164[_0x2694a8(0x15b)](c['UserManagerService']),_0x3cf7de=_0x1e1164[_0x2694a8(0x15b)](P['HTTPService']);_0x9baa00[_0x2694a8(0x170)](_0x18870a=>{const _0x19c2da=_0x2694a8;_0x172b08['getUser'](_0x18870a)&&_0x9baa00[_0x19c2da(0x140)](_0x18870a);}),_0x9baa00['size']&&(await _0x3cf7de[_0x2694a8(0x15b)](_0x2694a8(0x151),{'params':{'userIDs':[..._0x9baa00]}}))['body'][_0x2694a8(0x19c)]['forEach'](_0x41dbc5=>{const _0x40b35f=_0x2694a8;_0x41dbc5&&_0x172b08[_0x40b35f(0x1a5)](_0x41dbc5);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x2e278e,_0xd9780a,_0x254b88,_0x2eb11c)=>{for(var _0x59b28e=_0x2eb11c>0x1?void 0x0:_0x2eb11c?$(_0xd9780a,_0x254b88):_0xd9780a,_0x13fdaf=_0x2e278e['length']-0x1,_0x376b57;_0x13fdaf>=0x0;_0x13fdaf--)(_0x376b57=_0x2e278e[_0x13fdaf])&&(_0x59b28e=_0x376b57(_0x59b28e)||_0x59b28e);return _0x59b28e;},S=(_0x457594,_0x76e887)=>(_0x9eb10,_0x4d63db)=>_0x76e887(_0x9eb10,_0x4d63db,_0x457594);let p=class extends c[_0x444990(0x191)]{constructor(_0x1e98d3,_0x4c1d08,_0x10042f,_0x31502f){const _0x572d89=_0x444990;super(),this[_0x572d89(0x1b1)]=_0x1e98d3,this[_0x572d89(0x164)]=_0x4c1d08,this[_0x572d89(0x18f)]=_0x10042f,this[_0x572d89(0x1bd)]=_0x31502f,this['_init'](),this[_0x572d89(0x1b7)]();}['_initUserSync'](){const _0x3de091=_0x444990;this[_0x3de091(0x142)](this['_threadCommentModel'][_0x3de091(0x1bc)]['pipe'](w['bufferTime'](0x10))['subscribe'](_0x34b0b0=>{const _0x66e41a=_0x3de091,_0x2f2e20=new Set();_0x34b0b0['forEach'](_0xcee43d=>{const _0x1e3b01=_0x4014;switch(_0xcee43d[_0x1e3b01(0x14a)]){case'add':{const _0x46d99d=_0xcee43d[_0x1e3b01(0x144)]['personId'];_0x2f2e20['add'](_0x46d99d);break;}}}),R(this[_0x66e41a(0x1bd)],_0x2f2e20);}));}[_0x444990(0x14b)](){const _0x3170e9=_0x444990;this['disposeWithMe'](this['_commentService'][_0x3170e9(0x1bc)][_0x3170e9(0x16a)](async _0x570230=>{const _0x4d23a8=_0x3170e9;var _0x3665ca,_0x5668a9,_0x37ea15,_0x1f2380;const _0x4e2d21=(_0x3665ca=this[_0x4d23a8(0x164)][_0x4d23a8(0x13f)](_0x570230[_0x4d23a8(0x180)])[_0x4d23a8(0x16f)](_0x290583=>_0x290583['threadId']===_0x570230[_0x4d23a8(0x1a3)]))==null?void 0x0:_0x3665ca[_0x4d23a8(0x169)];if(!_0x4e2d21)return;const {unitId:_0x23561c,subUnitId:_0x516b61}=_0x4e2d21;switch(_0x570230[_0x4d23a8(0x184)]&&this[_0x4d23a8(0x18f)]['addUser'](_0x570230[_0x4d23a8(0x184)]),_0x570230[_0x4d23a8(0x14a)]){case v[_0x4d23a8(0x1a8)]:break;case v[_0x4d23a8(0x143)]:{this[_0x4d23a8(0x164)][_0x4d23a8(0x152)](_0x23561c,_0x516b61,{'unitId':_0x23561c,'subUnitId':_0x516b61,'ref':'','id':_0x570230[_0x4d23a8(0x167)],'dT':f(+_0x570230[_0x4d23a8(0x13d)]),'threadId':_0x570230[_0x4d23a8(0x1a3)],'personId':(_0x37ea15=(_0x5668a9=_0x570230['user'])==null?void 0x0:_0x5668a9[_0x4d23a8(0x158)])!=null?_0x37ea15:_0x570230[_0x4d23a8(0x1a0)],'text':JSON[_0x4d23a8(0x14c)](_0x570230[_0x4d23a8(0x15a)]),'parentId':_0x4e2d21['id']});break;}case v[_0x4d23a8(0x1b0)]:{const _0x45b0b3=this[_0x4d23a8(0x164)][_0x4d23a8(0x18e)](_0x23561c,_0x516b61,_0x570230[_0x4d23a8(0x167)]);_0x45b0b3&&_0x45b0b3['parentId']&&this['_threadCommentModel'][_0x4d23a8(0x168)](_0x23561c,_0x516b61,_0x570230[_0x4d23a8(0x167)]);break;}case v['Edit']:{this[_0x4d23a8(0x164)][_0x4d23a8(0x18c)](_0x23561c,_0x516b61,{'commentId':_0x570230[_0x4d23a8(0x167)],'text':JSON[_0x4d23a8(0x14c)](_0x570230[_0x4d23a8(0x15a)])});break;}case v[_0x4d23a8(0x198)]:{const _0x52e14a=(_0x1f2380=this[_0x4d23a8(0x164)]['getUnit'](_0x570230[_0x4d23a8(0x180)])[_0x4d23a8(0x16f)](_0x25f2f0=>_0x25f2f0[_0x4d23a8(0x1a3)]===_0x570230[_0x4d23a8(0x1a3)]))==null?void 0x0:_0x1f2380[_0x4d23a8(0x169)];_0x52e14a&&this[_0x4d23a8(0x164)][_0x4d23a8(0x190)](_0x23561c,_0x516b61,_0x52e14a['id'],_0x570230[_0x4d23a8(0x15d)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x444990(0x192)](b[_0x444990(0x153)])),S(0x1,c[_0x444990(0x192)](M['ThreadCommentModel'])),S(0x2,c[_0x444990(0x192)](c[_0x444990(0x185)])),S(0x3,c[_0x444990(0x192)](c[_0x444990(0x1a9)]))],p);const q=_0x444990(0x1ab),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x127b30,_0x169359,_0x3a174b,_0xaf9644)=>{const _0x107f4e=_0x444990;for(var _0x14a8a8=_0xaf9644>0x1?void 0x0:_0xaf9644?A(_0x169359,_0x3a174b):_0x169359,_0x856333=_0x127b30[_0x107f4e(0x17d)]-0x1,_0x2eb7ed;_0x856333>=0x0;_0x856333--)(_0x2eb7ed=_0x127b30[_0x856333])&&(_0x14a8a8=_0x2eb7ed(_0x14a8a8)||_0x14a8a8);return _0x14a8a8;},_=(_0x21fe17,_0x40d0d9)=>(_0x3535b9,_0x28b632)=>_0x40d0d9(_0x3535b9,_0x28b632,_0x21fe17);function Y(_0x4d73b5,_0x2c1fea){const _0x5bb067=_0x444990,_0x58ae5f=_0x4d73b5[_0x5bb067(0x194)][0x0];return{..._0x2c1fea,'id':_0x58ae5f[_0x5bb067(0x167)],'resolved':_0x4d73b5[_0x5bb067(0x15d)]===0x1,'dT':f(_0x58ae5f[_0x5bb067(0x13d)]),'personId':_0x58ae5f['userId'],'threadId':_0x58ae5f['threadId']};}function G(_0xb8891a,_0x2f0a74,_0x38a5f8){const _0x5ecfc3=_0x444990;var _0x5d3612,_0x31c5f5;if(((_0x31c5f5=(_0x5d3612=_0xb8891a==null?void 0x0:_0xb8891a[_0x5ecfc3(0x194)])==null?void 0x0:_0x5d3612[_0x5ecfc3(0x17d)])!=null?_0x31c5f5:0x0)>0x0){const _0x5a8879=(_0x219f1f,_0x540761)=>({'id':_0x219f1f['replyId'],'threadId':_0x219f1f[_0x5ecfc3(0x1a3)],'dT':f(_0x219f1f[_0x5ecfc3(0x13d)]),'personId':_0x219f1f['userId'],'resolved':_0xb8891a[_0x5ecfc3(0x15d)]===I['Solved'],'unitId':_0x2f0a74,'subUnitId':_0x38a5f8,'text':JSON[_0x5ecfc3(0x14c)](_0x219f1f[_0x5ecfc3(0x15a)]),'parentId':_0x540761}),_0x4c0c6e=_0x5a8879(_0xb8891a[_0x5ecfc3(0x194)][0x0]);return{..._0x4c0c6e,'children':_0xb8891a['replies']['slice'](0x1)[_0x5ecfc3(0x19d)](_0x7bbcc2=>_0x5a8879(_0x7bbcc2,_0x4c0c6e['id']))};}return null;}let g=class{constructor(_0x3e102c,_0x2defb8,_0x38496e,_0x5d474c){const _0x3b07b1=_0x444990;this[_0x3b07b1(0x199)]=_0x3e102c,this['_userService']=_0x2defb8,this[_0x3b07b1(0x149)]=_0x38496e,this[_0x3b07b1(0x1bd)]=_0x5d474c;}async['addComment'](_0x214d76){const _0x52cdb2=_0x444990;var _0x21e1b3,_0x44d7ed;const {parentId:_0x4fb749,unitId:_0x56f580,text:_0x727d8a,threadId:_0x586c16}=_0x214d76,_0x2dc21c=(_0x44d7ed=(_0x21e1b3=_0x727d8a[_0x52cdb2(0x1bb)])==null?void 0x0:_0x21e1b3[_0x52cdb2(0x178)](_0x3a4173=>_0x3a4173[_0x52cdb2(0x1b8)]===c['CustomRangeType'][_0x52cdb2(0x171)])[_0x52cdb2(0x19d)](_0x375826=>_0x375826['rangeId']))!=null?_0x44d7ed:[],_0x24d855=JSON[_0x52cdb2(0x15c)](_0x727d8a),_0x4e1c3c=(await this[_0x52cdb2(0x149)][_0x52cdb2(0x17b)](_0x56f580))['getMemberID']();if(_0x4fb749){const _0x302e66={'memberId':_0x4e1c3c,'unitId':_0x56f580,'content':_0x24d855,'mention':_0x2dc21c,'threadId':_0x586c16},_0x5a4dc0=(await this[_0x52cdb2(0x199)][_0x52cdb2(0x166)](_0x52cdb2(0x1ae)+_0x56f580+_0x52cdb2(0x1ad),{'body':_0x302e66}))[_0x52cdb2(0x1af)][_0x52cdb2(0x1b6)];return{..._0x214d76,'id':_0x5a4dc0[_0x52cdb2(0x167)],'dT':c[_0x52cdb2(0x165)](+_0x5a4dc0[_0x52cdb2(0x13d)])[_0x52cdb2(0x1ba)](_0x52cdb2(0x181)),'personId':_0x5a4dc0['userId']};}else{const _0x15faf5={'memberId':_0x4e1c3c,'unitId':_0x56f580,'content':_0x24d855,'mention':_0x2dc21c},_0x11a2de=await this[_0x52cdb2(0x199)][_0x52cdb2(0x166)](_0x52cdb2(0x1ae)+_0x56f580+_0x52cdb2(0x179),{'body':_0x15faf5});return Y(_0x11a2de[_0x52cdb2(0x1af)][_0x52cdb2(0x1b5)],_0x214d76);}}async[_0x444990(0x18c)](_0x57a3fc){const _0x3610db=_0x444990;var _0x76c8cb,_0x3d6196;const {text:_0x3f5654,unitId:_0x2cf297}=_0x57a3fc,_0x26b436=(_0x3d6196=(_0x76c8cb=_0x3f5654[_0x3610db(0x1bb)])==null?void 0x0:_0x76c8cb[_0x3610db(0x178)](_0x26afcd=>_0x26afcd[_0x3610db(0x1b8)]===c[_0x3610db(0x1ac)][_0x3610db(0x171)])[_0x3610db(0x19d)](_0x4e07fb=>_0x4e07fb[_0x3610db(0x157)]))!=null?_0x3d6196:[],_0x5dece3=JSON[_0x3610db(0x15c)](_0x3f5654),_0x5bd27b=_0x57a3fc[_0x3610db(0x1a3)],_0x543ae0=_0x57a3fc['id'],_0x44d441={'memberId':(await this[_0x3610db(0x149)][_0x3610db(0x17b)](_0x2cf297))[_0x3610db(0x1a1)](),'unitId':_0x2cf297,'threadId':_0x5bd27b,'mention':_0x26b436,'content':_0x5dece3,'replyId':_0x543ae0},_0x4b72c4=await this['_httpService'][_0x3610db(0x166)](_0x3610db(0x1ae)+_0x2cf297+_0x3610db(0x195),{'body':_0x44d441});return!_0x4b72c4['body']['error']||_0x4b72c4[_0x3610db(0x1af)][_0x3610db(0x172)][_0x3610db(0x14d)]===0x1;}async['resolveComment'](_0x5dc68e){const _0x4ce88e=_0x444990,{unitId:_0x876bba}=_0x5dc68e,_0x2ec9a6=_0x5dc68e['threadId'],_0x31e232={'memberId':this[_0x4ce88e(0x18f)][_0x4ce88e(0x15e)]()['userID'],'unitId':_0x876bba,'threadId':_0x2ec9a6,'solved':_0x5dc68e[_0x4ce88e(0x193)]?I[_0x4ce88e(0x159)]:I[_0x4ce88e(0x14f)]},_0x41831f=await this[_0x4ce88e(0x199)][_0x4ce88e(0x166)](_0x4ce88e(0x1ae)+_0x876bba+_0x4ce88e(0x162),{'body':_0x31e232});return!_0x41831f[_0x4ce88e(0x1af)][_0x4ce88e(0x172)]||_0x41831f[_0x4ce88e(0x1af)][_0x4ce88e(0x172)][_0x4ce88e(0x14d)]===0x1;}async[_0x444990(0x168)](_0x3df187,_0x51b829,_0x13655b,_0x833810){const _0x2fb14a=_0x444990,_0x4d7321={'memberId':(await this[_0x2fb14a(0x149)][_0x2fb14a(0x17b)](_0x3df187))[_0x2fb14a(0x1a1)](),'threadId':_0x13655b,'replyId':_0x833810,'unitId':_0x3df187},_0x1ad100=await this['_httpService'][_0x2fb14a(0x166)](_0x2fb14a(0x1ae)+_0x3df187+_0x2fb14a(0x1a7),{'body':_0x4d7321});return!_0x1ad100[_0x2fb14a(0x1af)]['error']||_0x1ad100[_0x2fb14a(0x1af)][_0x2fb14a(0x172)]['code']===0x1;}async['listComments'](_0x150726,_0x4f6af8,_0x490e55){const _0x14abcb=_0x444990,_0x186358={'unitId':_0x150726,'threadId':_0x490e55},_0x426630=await this['_httpService'][_0x14abcb(0x166)](_0x14abcb(0x1ae)+_0x150726+_0x14abcb(0x196),{'body':_0x186358}),_0x446258=_0x490e55[_0x14abcb(0x19d)](_0x435115=>G(_0x426630[_0x14abcb(0x1af)][_0x14abcb(0x16d)][_0x435115],_0x150726,_0x4f6af8))[_0x14abcb(0x178)](Boolean);return Object[_0x14abcb(0x175)](_0x426630[_0x14abcb(0x1af)]['users'])[_0x14abcb(0x170)](_0xb0e210=>{const _0x364d31=_0x14abcb;this['_userService'][_0x364d31(0x1a5)](_0xb0e210);}),_0x446258;}['saveCommentToSnapshot'](_0x1d9dd0){const _0x306401=_0x444990;return{'id':_0x1d9dd0['id'],'threadId':_0x1d9dd0[_0x306401(0x1a3)],'ref':_0x1d9dd0['ref']};}};g=x([_(0x0,c['Inject'](P[_0x444990(0x189)])),_(0x1,c[_0x444990(0x192)](c[_0x444990(0x185)])),_(0x2,c['Inject'](b[_0x444990(0x176)])),_(0x3,c[_0x444990(0x192)](c[_0x444990(0x1a9)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x4cda63,_0x5d23ab,_0x59c923,_0xfd89f3)=>{const _0x3a79cf=_0x444990;for(var _0x5eeb1c=_0xfd89f3>0x1?void 0x0:_0xfd89f3?H(_0x5d23ab,_0x59c923):_0x5d23ab,_0x3d937b=_0x4cda63[_0x3a79cf(0x17d)]-0x1,_0x5b57f9;_0x3d937b>=0x0;_0x3d937b--)(_0x5b57f9=_0x4cda63[_0x3d937b])&&(_0x5eeb1c=_0x5b57f9(_0x5eeb1c)||_0x5eeb1c);return _0x5eeb1c;},y=(_0x451236,_0x44c315)=>(_0x3969c5,_0x21f6a3)=>_0x44c315(_0x3969c5,_0x21f6a3,_0x451236);let C=class extends c[_0x444990(0x191)]{constructor(_0x5bd023,_0x290d00){const _0x1a2c13=_0x444990;super(),this[_0x1a2c13(0x147)]=_0x5bd023,this[_0x1a2c13(0x154)]=_0x290d00,this[_0x1a2c13(0x150)]();}['_initDataSource'](){const _0x4a8b5a=_0x444990;this[_0x4a8b5a(0x147)][_0x4a8b5a(0x19f)]=this[_0x4a8b5a(0x154)],this[_0x4a8b5a(0x147)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x444990(0x17c)]),y(0x1,c[_0x444990(0x192)](g))],C);var F=Object[_0x444990(0x17f)],L=Object[_0x444990(0x1a6)],Z=(_0x255e70,_0x36786b,_0x5cb627)=>_0x36786b in _0x255e70?F(_0x255e70,_0x36786b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5cb627}):_0x255e70[_0x36786b]=_0x5cb627,W=(_0x6e7628,_0x16021b,_0x1b17c5,_0x2c2057)=>{const _0xe73a94=_0x444990;for(var _0x24bc6d=_0x2c2057>0x1?void 0x0:_0x2c2057?L(_0x16021b,_0x1b17c5):_0x16021b,_0x4dffef=_0x6e7628[_0xe73a94(0x17d)]-0x1,_0x5b06f3;_0x4dffef>=0x0;_0x4dffef--)(_0x5b06f3=_0x6e7628[_0x4dffef])&&(_0x24bc6d=_0x5b06f3(_0x24bc6d)||_0x24bc6d);return _0x24bc6d;},O=(_0x4faa36,_0x4ccbd7)=>(_0x141df0,_0x512ac5)=>_0x4ccbd7(_0x141df0,_0x512ac5,_0x4faa36),N=(_0x27fa45,_0x3aecc2,_0x15e001)=>Z(_0x27fa45,typeof _0x3aecc2!=_0x444990(0x156)?_0x3aecc2+'':_0x3aecc2,_0x15e001);exports[_0x444990(0x16c)]=class extends c[_0x444990(0x1b2)]{constructor(_0x19327d=D,_0x56cd96,_0x2feeb5){const _0x4ad3a7=_0x444990;super(),this[_0x4ad3a7(0x19b)]=_0x19327d,this[_0x4ad3a7(0x1bd)]=_0x56cd96,this[_0x4ad3a7(0x1b3)]=_0x2feeb5;const {..._0x27773e}=c[_0x4ad3a7(0x155)]({},D,this[_0x4ad3a7(0x19b)]);this[_0x4ad3a7(0x1b3)][_0x4ad3a7(0x145)](q,_0x27773e);}[_0x444990(0x174)](){[[g],[C],[p]]['forEach'](_0x1fed09=>{const _0x4f88a4=_0x4014;this[_0x4f88a4(0x1bd)]['add'](_0x1fed09);});}[_0x444990(0x18d)](){const _0xbd5c0b=_0x444990;this[_0xbd5c0b(0x1bd)][_0xbd5c0b(0x15b)](C),this[_0xbd5c0b(0x1bd)][_0xbd5c0b(0x15b)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x444990(0x16b),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x444990(0x14a),c[_0x444990(0x197)]['UNIVER_UNKNOWN']),exports[_0x444990(0x16c)]=W([c['DependentOn'](j[_0x444990(0x177)],b[_0x444990(0x18a)],T[_0x444990(0x1aa)]),O(0x1,c[_0x444990(0x192)](c['Injector'])),O(0x2,c[_0x444990(0x187)])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';const _0x4113a8=_0x38e9;function _0x51f1(){const _0x27aa18=['UniverLicensePlugin','payload','code','IThreadCommentDataSourceService','map','@univerjs-pro/collaboration-client','pipe','error','@univerjs/thread-comment-ui','filter','/reply','root','/universer-api/comment/unit/','format','_threadCommentModel','pluginName','@univerjs-pro/license','OpenOrReOpen','Injector','COMMENT','userID','1271NkOJee','forEach','508dfhVZU','12HCHzBm','comments','getUnit','UniverThreadCommentDataSourcePlugin','rangeId','UNRECOGNIZED','getCurrentUser','bufferTime','replyId','onStarting','onReady','find','UNIVER_UNKNOWN','1526010LjZVLG','UserManagerService','HTTPService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_sessionService','body','reply','users','_threadCommentDataSource','unitId','parentId','_init','threadId','content','_initUserSync','type','DependentOn','UniverCollaborationClientPlugin','Delete','3852827wokJai','parse','add','requireSession','deleteComment','YYYY/MM/DD\x20HH:mm','userId','@univerjs/core','1963620jUXMdG','replies','stringify','setConfig','comment','values','_commentService','UniverInstanceType','CustomRangeType','/edit','thread-comment-data-source.config','/universer-api/user/list','_injector','addComment','_configService','Unknown','ThreadCommentModel','get','IConfigService','slice','_initDataSource','Inject','/add','symbol','Solved','Add','getMemberID','_httpService','2224eEPWse','Module','@univerjs/network','length','user','77126bnyVTV','size','addUser','getOwnPropertyDescriptor','Plugin','Reply','toStringTag','customRanges','commentUpdate$','9eVxBWM','getUser','resolveComment','merge','createTimestamp','post','6441560kvLTFl','Edit','Solve','rangeType','6535wAKbla','_threadCommentDataSourceService','_config','_userService','UniverThreadCommentUIPlugin','disposeWithMe','subscribe','defineProperty','CollaborationSessionService'];_0x51f1=function(){return _0x27aa18;};return _0x51f1();}function _0x38e9(_0x3152bf,_0x43d9fc){const _0x51f1f4=_0x51f1();return _0x38e9=function(_0x38e94f,_0xe359e8){_0x38e94f=_0x38e94f-0x1c6;let _0x554c9c=_0x51f1f4[_0x38e94f];return _0x554c9c;},_0x38e9(_0x3152bf,_0x43d9fc);}(function(_0x52407c,_0x4f9533){const _0x33a2aa=_0x38e9,_0x301fdf=_0x52407c();while(!![]){try{const _0x35f4cd=-parseInt(_0x33a2aa(0x1f0))/0x1*(-parseInt(_0x33a2aa(0x1f2))/0x2)+-parseInt(_0x33a2aa(0x200))/0x3+-parseInt(_0x33a2aa(0x237))/0x4*(parseInt(_0x33a2aa(0x1d2))/0x5)+parseInt(_0x33a2aa(0x1f3))/0x6*(-parseInt(_0x33a2aa(0x23c))/0x7)+parseInt(_0x33a2aa(0x1ce))/0x8*(parseInt(_0x33a2aa(0x1c8))/0x9)+parseInt(_0x33a2aa(0x21b))/0xa+parseInt(_0x33a2aa(0x213))/0xb;if(_0x35f4cd===_0x4f9533)break;else _0x301fdf['push'](_0x301fdf['shift']());}catch(_0x188d20){_0x301fdf['push'](_0x301fdf['shift']());}}}(_0x51f1,0x65de2));Object[_0x4113a8(0x1d9)](exports,Symbol[_0x4113a8(0x242)],{'value':_0x4113a8(0x238)});const b=require(_0x4113a8(0x1e0)),T=require(_0x4113a8(0x1eb)),c=require(_0x4113a8(0x21a)),j=require(_0x4113a8(0x1e3)),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require(_0x4113a8(0x239)),U=_0x4113a8(0x203);var I=(_0x4411c0=>(_0x4411c0[_0x4411c0['OpenOrReOpen']=0x0]=_0x4113a8(0x1ec),_0x4411c0[_0x4411c0['Solved']=0x1]=_0x4113a8(0x233),_0x4411c0[_0x4411c0[_0x4113a8(0x1f8)]=-0x1]='UNRECOGNIZED',_0x4411c0))(I||{}),v=(_0x2d7c7f=>(_0x2d7c7f[_0x2d7c7f['Unknown']=0x0]=_0x4113a8(0x22a),_0x2d7c7f[_0x2d7c7f[_0x4113a8(0x234)]=0x1]=_0x4113a8(0x234),_0x2d7c7f[_0x2d7c7f[_0x4113a8(0x241)]=0x2]=_0x4113a8(0x241),_0x2d7c7f[_0x2d7c7f[_0x4113a8(0x1cf)]=0x3]=_0x4113a8(0x1cf),_0x2d7c7f[_0x2d7c7f[_0x4113a8(0x212)]=0x4]=_0x4113a8(0x212),_0x2d7c7f[_0x2d7c7f[_0x4113a8(0x1d0)]=0x5]='Solve',_0x2d7c7f[_0x2d7c7f[_0x4113a8(0x1f8)]=-0x1]=_0x4113a8(0x1f8),_0x2d7c7f))(v||{});const f=_0x3f3b66=>c['dayjs'](new Date(+_0x3f3b66))['format'](_0x4113a8(0x218)),R=async(_0xe55dd1,_0x260f5f)=>{const _0xe6a3c3=_0x4113a8,_0xf4e131=_0xe55dd1[_0xe6a3c3(0x22c)](c['UserManagerService']),_0x498f6d=_0xe55dd1['get'](P[_0xe6a3c3(0x202)]);_0x260f5f[_0xe6a3c3(0x1f1)](_0x510e79=>{const _0x164cfd=_0xe6a3c3;_0xf4e131[_0x164cfd(0x1c9)](_0x510e79)&&_0x260f5f['delete'](_0x510e79);}),_0x260f5f[_0xe6a3c3(0x23d)]&&(await _0x498f6d[_0xe6a3c3(0x22c)](_0xe6a3c3(0x226),{'params':{'userIDs':[..._0x260f5f]}}))[_0xe6a3c3(0x205)]['users']['forEach'](_0x43baa7=>{const _0x72d471=_0xe6a3c3;_0x43baa7&&_0xf4e131[_0x72d471(0x23e)](_0x43baa7);});};var $=Object[_0x4113a8(0x23f)],E=(_0x32a1d1,_0x3c56fd,_0x14fff0,_0x3deae2)=>{const _0x4c3ee3=_0x4113a8;for(var _0x4bef7b=_0x3deae2>0x1?void 0x0:_0x3deae2?$(_0x3c56fd,_0x14fff0):_0x3c56fd,_0x37b848=_0x32a1d1[_0x4c3ee3(0x23a)]-0x1,_0xd721ab;_0x37b848>=0x0;_0x37b848--)(_0xd721ab=_0x32a1d1[_0x37b848])&&(_0x4bef7b=_0xd721ab(_0x4bef7b)||_0x4bef7b);return _0x4bef7b;},S=(_0x7b0b65,_0x288673)=>(_0x5db9c5,_0x31bc0c)=>_0x288673(_0x5db9c5,_0x31bc0c,_0x7b0b65);let p=class extends c['Disposable']{constructor(_0x51e5d9,_0x3c4769,_0x281c25,_0x2266a8){const _0x1e97dd=_0x4113a8;super(),this[_0x1e97dd(0x221)]=_0x51e5d9,this['_threadCommentModel']=_0x3c4769,this[_0x1e97dd(0x1d5)]=_0x281c25,this[_0x1e97dd(0x227)]=_0x2266a8,this[_0x1e97dd(0x20b)](),this[_0x1e97dd(0x20e)]();}[_0x4113a8(0x20e)](){const _0x2bf860=_0x4113a8;this[_0x2bf860(0x1d7)](this[_0x2bf860(0x1e9)]['commentUpdate$'][_0x2bf860(0x1e1)](w[_0x2bf860(0x1fa)](0x10))[_0x2bf860(0x1d8)](_0x2c1a30=>{const _0x16c62d=_0x2bf860,_0x210e47=new Set();_0x2c1a30['forEach'](_0x343ded=>{const _0x1d1121=_0x38e9;switch(_0x343ded[_0x1d1121(0x20f)]){case'add':{const _0x16a64e=_0x343ded[_0x1d1121(0x1dc)]['personId'];_0x210e47[_0x1d1121(0x215)](_0x16a64e);break;}}}),R(this[_0x16c62d(0x227)],_0x210e47);}));}[_0x4113a8(0x20b)](){const _0x36f372=_0x4113a8;this[_0x36f372(0x1d7)](this[_0x36f372(0x221)][_0x36f372(0x1c7)]['subscribe'](async _0x1f704a=>{const _0x1248aa=_0x36f372;var _0x23faf0,_0x292ad8,_0x3c7b47,_0x4e1a6a;const _0x29305f=(_0x23faf0=this[_0x1248aa(0x1e9)]['getUnit'](_0x1f704a[_0x1248aa(0x209)])[_0x1248aa(0x1fe)](_0xacc3e7=>_0xacc3e7[_0x1248aa(0x20c)]===_0x1f704a['threadId']))==null?void 0x0:_0x23faf0[_0x1248aa(0x1e6)];if(!_0x29305f)return;const {unitId:_0x8e2f9,subUnitId:_0x1dc25d}=_0x29305f;switch(_0x1f704a['user']&&this['_userService']['addUser'](_0x1f704a[_0x1248aa(0x23b)]),_0x1f704a[_0x1248aa(0x20f)]){case v[_0x1248aa(0x234)]:break;case v[_0x1248aa(0x241)]:{this[_0x1248aa(0x1e9)][_0x1248aa(0x228)](_0x8e2f9,_0x1dc25d,{'unitId':_0x8e2f9,'subUnitId':_0x1dc25d,'ref':'','id':_0x1f704a[_0x1248aa(0x1fb)],'dT':f(+_0x1f704a[_0x1248aa(0x1cc)]),'threadId':_0x1f704a[_0x1248aa(0x20c)],'personId':(_0x3c7b47=(_0x292ad8=_0x1f704a[_0x1248aa(0x23b)])==null?void 0x0:_0x292ad8['userID'])!=null?_0x3c7b47:_0x1f704a[_0x1248aa(0x219)],'text':JSON['parse'](_0x1f704a[_0x1248aa(0x20d)]),'parentId':_0x29305f['id']});break;}case v[_0x1248aa(0x212)]:{const _0x361caf=this[_0x1248aa(0x1e9)]['getComment'](_0x8e2f9,_0x1dc25d,_0x1f704a[_0x1248aa(0x1fb)]);_0x361caf&&_0x361caf[_0x1248aa(0x20a)]&&this['_threadCommentModel'][_0x1248aa(0x217)](_0x8e2f9,_0x1dc25d,_0x1f704a[_0x1248aa(0x1fb)]);break;}case v['Edit']:{this[_0x1248aa(0x1e9)]['updateComment'](_0x8e2f9,_0x1dc25d,{'commentId':_0x1f704a['replyId'],'text':JSON['parse'](_0x1f704a[_0x1248aa(0x20d)])});break;}case v[_0x1248aa(0x1d0)]:{const _0x3113cc=(_0x4e1a6a=this[_0x1248aa(0x1e9)][_0x1248aa(0x1f5)](_0x1f704a[_0x1248aa(0x209)])[_0x1248aa(0x1fe)](_0x5388e0=>_0x5388e0['threadId']===_0x1f704a['threadId']))==null?void 0x0:_0x4e1a6a['root'];_0x3113cc&&this['_threadCommentModel'][_0x1248aa(0x1ca)](_0x8e2f9,_0x1dc25d,_0x3113cc['id'],_0x1f704a['solved']===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x4113a8(0x230)](b['CommentService'])),S(0x1,c[_0x4113a8(0x230)](M[_0x4113a8(0x22b)])),S(0x2,c[_0x4113a8(0x230)](c['UserManagerService'])),S(0x3,c[_0x4113a8(0x230)](c['Injector']))],p);const q=_0x4113a8(0x225),D={};var A=Object[_0x4113a8(0x23f)],x=(_0x385f3e,_0xce6763,_0x2fcb52,_0x1a7fa5)=>{for(var _0x5f4582=_0x1a7fa5>0x1?void 0x0:_0x1a7fa5?A(_0xce6763,_0x2fcb52):_0xce6763,_0x29cded=_0x385f3e['length']-0x1,_0x209b13;_0x29cded>=0x0;_0x29cded--)(_0x209b13=_0x385f3e[_0x29cded])&&(_0x5f4582=_0x209b13(_0x5f4582)||_0x5f4582);return _0x5f4582;},_=(_0x1fa1cb,_0x17cfb0)=>(_0x52528f,_0x5563d7)=>_0x17cfb0(_0x52528f,_0x5563d7,_0x1fa1cb);function Y(_0x4a5642,_0x31250f){const _0x5aec06=_0x4113a8,_0x123897=_0x4a5642[_0x5aec06(0x21c)][0x0];return{..._0x31250f,'id':_0x123897[_0x5aec06(0x1fb)],'resolved':_0x4a5642['solved']===0x1,'dT':f(_0x123897['createTimestamp']),'personId':_0x123897[_0x5aec06(0x219)],'threadId':_0x123897[_0x5aec06(0x20c)]};}function G(_0x120e7a,_0x2f47d2,_0x535424){const _0x37a1b2=_0x4113a8;var _0x155931,_0x28d530;if(((_0x28d530=(_0x155931=_0x120e7a==null?void 0x0:_0x120e7a[_0x37a1b2(0x21c)])==null?void 0x0:_0x155931[_0x37a1b2(0x23a)])!=null?_0x28d530:0x0)>0x0){const _0x3321d8=(_0x4e67fe,_0x24141d)=>({'id':_0x4e67fe['replyId'],'threadId':_0x4e67fe['threadId'],'dT':f(_0x4e67fe['createTimestamp']),'personId':_0x4e67fe[_0x37a1b2(0x219)],'resolved':_0x120e7a['solved']===I[_0x37a1b2(0x233)],'unitId':_0x2f47d2,'subUnitId':_0x535424,'text':JSON[_0x37a1b2(0x214)](_0x4e67fe['content']),'parentId':_0x24141d}),_0x59107b=_0x3321d8(_0x120e7a[_0x37a1b2(0x21c)][0x0]);return{..._0x59107b,'children':_0x120e7a[_0x37a1b2(0x21c)][_0x37a1b2(0x22e)](0x1)[_0x37a1b2(0x1df)](_0x6b735d=>_0x3321d8(_0x6b735d,_0x59107b['id']))};}return null;}let g=class{constructor(_0x484bcb,_0x20b6d4,_0x3c884a,_0x1787c3){const _0x5b5e41=_0x4113a8;this[_0x5b5e41(0x236)]=_0x484bcb,this[_0x5b5e41(0x1d5)]=_0x20b6d4,this[_0x5b5e41(0x204)]=_0x3c884a,this[_0x5b5e41(0x227)]=_0x1787c3;}async[_0x4113a8(0x228)](_0x488e8a){const _0x14f53c=_0x4113a8;var _0xe187d9,_0x3eb708;const {parentId:_0x20e1e2,unitId:_0x184b1e,text:_0x41e5f0,threadId:_0x56b48d}=_0x488e8a,_0x316ad7=(_0x3eb708=(_0xe187d9=_0x41e5f0[_0x14f53c(0x1c6)])==null?void 0x0:_0xe187d9[_0x14f53c(0x1e4)](_0x911662=>_0x911662[_0x14f53c(0x1d1)]===c[_0x14f53c(0x223)][_0x14f53c(0x1ee)])[_0x14f53c(0x1df)](_0x1bbf82=>_0x1bbf82[_0x14f53c(0x1f7)]))!=null?_0x3eb708:[],_0x2cbbd8=JSON[_0x14f53c(0x21d)](_0x41e5f0),_0x113aa6=(await this[_0x14f53c(0x204)][_0x14f53c(0x216)](_0x184b1e))[_0x14f53c(0x235)]();if(_0x20e1e2){const _0x49f05f={'memberId':_0x113aa6,'unitId':_0x184b1e,'content':_0x2cbbd8,'mention':_0x316ad7,'threadId':_0x56b48d},_0x5102e6=(await this['_httpService'][_0x14f53c(0x1cd)](_0x14f53c(0x1e7)+_0x184b1e+_0x14f53c(0x1e5),{'body':_0x49f05f}))[_0x14f53c(0x205)][_0x14f53c(0x206)];return{..._0x488e8a,'id':_0x5102e6['replyId'],'dT':c['dayjs'](+_0x5102e6['createTimestamp'])[_0x14f53c(0x1e8)](_0x14f53c(0x218)),'personId':_0x5102e6['userId']};}else{const _0x1ded3b={'memberId':_0x113aa6,'unitId':_0x184b1e,'content':_0x2cbbd8,'mention':_0x316ad7},_0x381404=await this[_0x14f53c(0x236)][_0x14f53c(0x1cd)](_0x14f53c(0x1e7)+_0x184b1e+_0x14f53c(0x231),{'body':_0x1ded3b});return Y(_0x381404[_0x14f53c(0x205)][_0x14f53c(0x21f)],_0x488e8a);}}async['updateComment'](_0x2d63f7){const _0x5c08e3=_0x4113a8;var _0x489070,_0x38cf43;const {text:_0x526526,unitId:_0x332dc3}=_0x2d63f7,_0x2e49a2=(_0x38cf43=(_0x489070=_0x526526['customRanges'])==null?void 0x0:_0x489070['filter'](_0x5ba3c1=>_0x5ba3c1['rangeType']===c[_0x5c08e3(0x223)]['COMMENT'])['map'](_0x3d1f40=>_0x3d1f40[_0x5c08e3(0x1f7)]))!=null?_0x38cf43:[],_0x1965ff=JSON['stringify'](_0x526526),_0x16d809=_0x2d63f7['threadId'],_0x2e6fb2=_0x2d63f7['id'],_0x48d839={'memberId':(await this['_sessionService'][_0x5c08e3(0x216)](_0x332dc3))[_0x5c08e3(0x235)](),'unitId':_0x332dc3,'threadId':_0x16d809,'mention':_0x2e49a2,'content':_0x1965ff,'replyId':_0x2e6fb2},_0x40f2a0=await this[_0x5c08e3(0x236)][_0x5c08e3(0x1cd)](_0x5c08e3(0x1e7)+_0x332dc3+_0x5c08e3(0x224),{'body':_0x48d839});return!_0x40f2a0[_0x5c08e3(0x205)][_0x5c08e3(0x1e2)]||_0x40f2a0['body'][_0x5c08e3(0x1e2)][_0x5c08e3(0x1dd)]===0x1;}async[_0x4113a8(0x1ca)](_0x3bfb78){const _0x48884b=_0x4113a8,{unitId:_0x1b18ad}=_0x3bfb78,_0x87d4ce=_0x3bfb78[_0x48884b(0x20c)],_0x56322a={'memberId':this[_0x48884b(0x1d5)][_0x48884b(0x1f9)]()[_0x48884b(0x1ef)],'unitId':_0x1b18ad,'threadId':_0x87d4ce,'solved':_0x3bfb78['resolved']?I[_0x48884b(0x233)]:I['OpenOrReOpen']},_0x3ee492=await this[_0x48884b(0x236)]['post'](_0x48884b(0x1e7)+_0x1b18ad+'/solved',{'body':_0x56322a});return!_0x3ee492['body'][_0x48884b(0x1e2)]||_0x3ee492[_0x48884b(0x205)][_0x48884b(0x1e2)][_0x48884b(0x1dd)]===0x1;}async['deleteComment'](_0x1e2f7a,_0x52cf2a,_0x453e85,_0x4ca25e){const _0x5b3ad3=_0x4113a8,_0x1f4751={'memberId':(await this[_0x5b3ad3(0x204)]['requireSession'](_0x1e2f7a))[_0x5b3ad3(0x235)](),'threadId':_0x453e85,'replyId':_0x4ca25e,'unitId':_0x1e2f7a},_0x54f686=await this[_0x5b3ad3(0x236)]['post'](_0x5b3ad3(0x1e7)+_0x1e2f7a+'/delete',{'body':_0x1f4751});return!_0x54f686[_0x5b3ad3(0x205)][_0x5b3ad3(0x1e2)]||_0x54f686['body'][_0x5b3ad3(0x1e2)][_0x5b3ad3(0x1dd)]===0x1;}async['listComments'](_0x3149f0,_0x4648a1,_0x2740c9){const _0x3616eb=_0x4113a8,_0xab4b72={'unitId':_0x3149f0,'threadId':_0x2740c9},_0x3e23a9=await this[_0x3616eb(0x236)][_0x3616eb(0x1cd)]('/universer-api/comment/unit/'+_0x3149f0+'/list',{'body':_0xab4b72}),_0x5318e7=_0x2740c9[_0x3616eb(0x1df)](_0x4d90f2=>G(_0x3e23a9[_0x3616eb(0x205)][_0x3616eb(0x1f4)][_0x4d90f2],_0x3149f0,_0x4648a1))[_0x3616eb(0x1e4)](Boolean);return Object[_0x3616eb(0x220)](_0x3e23a9[_0x3616eb(0x205)][_0x3616eb(0x207)])[_0x3616eb(0x1f1)](_0x286d76=>{const _0x447b64=_0x3616eb;this[_0x447b64(0x1d5)][_0x447b64(0x23e)](_0x286d76);}),_0x5318e7;}['saveCommentToSnapshot'](_0x3b0ee9){const _0x434ec9=_0x4113a8;return{'id':_0x3b0ee9['id'],'threadId':_0x3b0ee9[_0x434ec9(0x20c)],'ref':_0x3b0ee9['ref']};}};g=x([_(0x0,c['Inject'](P[_0x4113a8(0x202)])),_(0x1,c['Inject'](c[_0x4113a8(0x201)])),_(0x2,c[_0x4113a8(0x230)](b[_0x4113a8(0x1da)])),_(0x3,c[_0x4113a8(0x230)](c[_0x4113a8(0x1ed)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0xa15eac,_0x1b8d67,_0xb46098,_0x30d6a8)=>{const _0x2a626f=_0x4113a8;for(var _0x3fa584=_0x30d6a8>0x1?void 0x0:_0x30d6a8?H(_0x1b8d67,_0xb46098):_0x1b8d67,_0x5458f8=_0xa15eac[_0x2a626f(0x23a)]-0x1,_0x510a64;_0x5458f8>=0x0;_0x5458f8--)(_0x510a64=_0xa15eac[_0x5458f8])&&(_0x3fa584=_0x510a64(_0x3fa584)||_0x3fa584);return _0x3fa584;},y=(_0x409cc1,_0x366c16)=>(_0x1cdbc0,_0x5a9b5e)=>_0x366c16(_0x1cdbc0,_0x5a9b5e,_0x409cc1);let C=class extends c['Disposable']{constructor(_0x3d0898,_0x2782b3){const _0xd00cf0=_0x4113a8;super(),this[_0xd00cf0(0x1d3)]=_0x3d0898,this['_threadCommentDataSource']=_0x2782b3,this[_0xd00cf0(0x22f)]();}[_0x4113a8(0x22f)](){const _0x1825ad=_0x4113a8;this[_0x1825ad(0x1d3)]['dataSource']=this[_0x1825ad(0x208)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x4113a8(0x1de)]),y(0x1,c[_0x4113a8(0x230)](g))],C);var F=Object[_0x4113a8(0x1d9)],L=Object[_0x4113a8(0x23f)],Z=(_0x2dcb73,_0x186a03,_0x6cbfdd)=>_0x186a03 in _0x2dcb73?F(_0x2dcb73,_0x186a03,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x6cbfdd}):_0x2dcb73[_0x186a03]=_0x6cbfdd,W=(_0x49a1b1,_0x1ff37d,_0x907e77,_0x408acd)=>{const _0x301a04=_0x4113a8;for(var _0x175cac=_0x408acd>0x1?void 0x0:_0x408acd?L(_0x1ff37d,_0x907e77):_0x1ff37d,_0x1fcf5=_0x49a1b1[_0x301a04(0x23a)]-0x1,_0x395712;_0x1fcf5>=0x0;_0x1fcf5--)(_0x395712=_0x49a1b1[_0x1fcf5])&&(_0x175cac=_0x395712(_0x175cac)||_0x175cac);return _0x175cac;},O=(_0x1ce1ca,_0x5f0b8d)=>(_0x1bd4a2,_0x4922fd)=>_0x5f0b8d(_0x1bd4a2,_0x4922fd,_0x1ce1ca),N=(_0xe6d993,_0x15c927,_0x341d1b)=>Z(_0xe6d993,typeof _0x15c927!=_0x4113a8(0x232)?_0x15c927+'':_0x15c927,_0x341d1b);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x4113a8(0x240)]{constructor(_0x71895d=D,_0x5801f8,_0x24f14e){const _0x193b4c=_0x4113a8;super(),this['_config']=_0x71895d,this[_0x193b4c(0x227)]=_0x5801f8,this[_0x193b4c(0x229)]=_0x24f14e;const {..._0x25d43a}=c[_0x193b4c(0x1cb)]({},D,this[_0x193b4c(0x1d4)]);this[_0x193b4c(0x229)][_0x193b4c(0x21e)](q,_0x25d43a);}[_0x4113a8(0x1fc)](){const _0xbca2d1=_0x4113a8;[[g],[C],[p]][_0xbca2d1(0x1f1)](_0x1163db=>{const _0x6b72a4=_0xbca2d1;this[_0x6b72a4(0x227)][_0x6b72a4(0x215)](_0x1163db);});}[_0x4113a8(0x1fd)](){const _0x28a180=_0x4113a8;this['_injector'][_0x28a180(0x22c)](C),this[_0x28a180(0x227)][_0x28a180(0x22c)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x4113a8(0x1ea),U),N(exports[_0x4113a8(0x1f6)],'type',c[_0x4113a8(0x222)][_0x4113a8(0x1ff)]),exports[_0x4113a8(0x1f6)]=W([c[_0x4113a8(0x210)](j[_0x4113a8(0x1d6)],b[_0x4113a8(0x211)],T[_0x4113a8(0x1db)]),O(0x1,c[_0x4113a8(0x230)](c[_0x4113a8(0x1ed)])),O(0x2,c[_0x4113a8(0x22d)])],exports[_0x4113a8(0x1f6)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x538291=_0x2055;(function(_0x2199bb,_0x488327){const _0x30ccad=_0x2055,_0x1a1a7d=_0x2199bb();while(!![]){try{const _0x3304a7=-parseInt(_0x30ccad(0x17b))/0x1*(parseInt(_0x30ccad(0x1bc))/0x2)+-parseInt(_0x30ccad(0x1a3))/0x3*(parseInt(_0x30ccad(0x190))/0x4)+parseInt(_0x30ccad(0x193))/0x5*(-parseInt(_0x30ccad(0x1d3))/0x6)+parseInt(_0x30ccad(0x1b4))/0x7+parseInt(_0x30ccad(0x1ac))/0x8*(parseInt(_0x30ccad(0x18d))/0x9)+parseInt(_0x30ccad(0x1c8))/0xa+parseInt(_0x30ccad(0x1b7))/0xb;if(_0x3304a7===_0x488327)break;else _0x1a1a7d['push'](_0x1a1a7d['shift']());}catch(_0x2f3a6d){_0x1a1a7d['push'](_0x1a1a7d['shift']());}}}(_0x3bcc,0x3de09));function _0x3bcc(){const _0x12b173=['threadId','27NRirsB','requireSession','post','7244kReAcO','_configService','deleteComment','638545uszlaG','ref','_init','setConfig','Reply','code','saveCommentToSnapshot','getMemberID','/edit','_config','users','replies','pipe','resolveComment','getCurrentUser','YYYY/MM/DD\x20HH:mm','48nSlLuC','forEach','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','_sessionService','_httpService','Edit','userID','resolved','90776JnFdmT','_threadCommentDataSourceService','/universer-api/user/list','_initDataSource','user','reply','UNRECOGNIZED','getOwnPropertyDescriptor','423822idlzCi','Solve','getUser','1772353zQEwug','syncUpdateMutationToColla','Solved','length','OpenOrReOpen','2IFKSXl','/universer-api/comment/unit/','symbol','createTimestamp','subscribe','_initUserSync','customRanges','comments','content','map','parse','comment','1895180fDURGT','updateComment','parentId','onReady','type','filter','addComment','unitId','pluginName','body','/delete','6IFrCvt','/solved','userId','delete','COMMENT','_injector','format','rangeId','get','stringify','payload','find','dataSource','commentUpdate$','values','35094YIGGGH','defineProperty','disposeWithMe','_userService','error','add','/add','root','getComment','thread-comment-data-source.config','_threadCommentModel','_commentService','rangeType','Add','Unknown','Delete','replyId'];_0x3bcc=function(){return _0x12b173;};return _0x3bcc();}function _0x2055(_0x1eba7f,_0x2c9c60){const _0x3bcc10=_0x3bcc();return _0x2055=function(_0x2055bc,_0x262525){_0x2055bc=_0x2055bc-0x173;let _0x3d2650=_0x3bcc10[_0x2055bc];return _0x3d2650;},_0x2055(_0x1eba7f,_0x2c9c60);}import{CommentService as _0x1c15ac,CollaborationSessionService as _0x190768,UniverCollaborationClientPlugin as _0x38e298}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x15d46a}from'@univerjs-pro/license';import{dayjs as _0x2fc50a,UserManagerService as _0x28089d,Inject as _0x329691,Injector as _0x516ead,Disposable as _0x3745f8,CustomRangeType as _0x29ac7f,UniverInstanceType as _0x369264,DependentOn as _0x322c5e,IConfigService as _0x387356,Plugin as _0x41684c,merge as _0x4b727e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x7ab6ad}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2ef6b5,IThreadCommentDataSourceService as _0x3a072d}from'@univerjs/thread-comment';import{bufferTime as _0x309254}from'rxjs';import{HTTPService as _0x3ec942}from'@univerjs/network';const W=_0x538291(0x1a5);var I=(_0xa56933=>(_0xa56933[_0xa56933[_0x538291(0x1bb)]=0x0]=_0x538291(0x1bb),_0xa56933[_0xa56933[_0x538291(0x1b9)]=0x1]=_0x538291(0x1b9),_0xa56933[_0xa56933[_0x538291(0x1b2)]=-0x1]=_0x538291(0x1b2),_0xa56933))(I||{}),v=(_0x41679c=>(_0x41679c[_0x41679c[_0x538291(0x189)]=0x0]=_0x538291(0x189),_0x41679c[_0x41679c['Add']=0x1]=_0x538291(0x188),_0x41679c[_0x41679c[_0x538291(0x197)]=0x2]='Reply',_0x41679c[_0x41679c[_0x538291(0x1a9)]=0x3]=_0x538291(0x1a9),_0x41679c[_0x41679c[_0x538291(0x18a)]=0x4]=_0x538291(0x18a),_0x41679c[_0x41679c['Solve']=0x5]=_0x538291(0x1b5),_0x41679c[_0x41679c['UNRECOGNIZED']=-0x1]=_0x538291(0x1b2),_0x41679c))(v||{});const D=_0x8d4208=>_0x2fc50a(new Date(+_0x8d4208))[_0x538291(0x1d9)](_0x538291(0x1a2)),B=async(_0xccda61,_0x34c742)=>{const _0x4e13ff=_0x538291,_0xb877de=_0xccda61[_0x4e13ff(0x174)](_0x28089d),_0x25ed45=_0xccda61[_0x4e13ff(0x174)](_0x3ec942);_0x34c742[_0x4e13ff(0x1a4)](_0x32d03c=>{const _0x4123bd=_0x4e13ff;_0xb877de[_0x4123bd(0x1b6)](_0x32d03c)&&_0x34c742[_0x4123bd(0x1d6)](_0x32d03c);}),_0x34c742['size']&&(await _0x25ed45['get'](_0x4e13ff(0x1ae),{'params':{'userIDs':[..._0x34c742]}}))[_0x4e13ff(0x1d1)][_0x4e13ff(0x19d)][_0x4e13ff(0x1a4)](_0x119ea5=>{_0x119ea5&&_0xb877de['addUser'](_0x119ea5);});};var K=Object[_0x538291(0x1b3)],V=(_0x455b9c,_0x5a6467,_0x1bdf95,_0x444213)=>{for(var _0x35c436=_0x444213>0x1?void 0x0:_0x444213?K(_0x5a6467,_0x1bdf95):_0x5a6467,_0x1b5b54=_0x455b9c['length']-0x1,_0x2962e5;_0x1b5b54>=0x0;_0x1b5b54--)(_0x2962e5=_0x455b9c[_0x1b5b54])&&(_0x35c436=_0x2962e5(_0x35c436)||_0x35c436);return _0x35c436;},p=(_0x2168e9,_0x5f506e)=>(_0x1f3b7d,_0x7841a1)=>_0x5f506e(_0x1f3b7d,_0x7841a1,_0x2168e9);let S=class extends _0x3745f8{constructor(_0x38a8c5,_0xb3cdad,_0x5890df,_0x1c2049){const _0x3b61a0=_0x538291;super(),this[_0x3b61a0(0x186)]=_0x38a8c5,this[_0x3b61a0(0x185)]=_0xb3cdad,this[_0x3b61a0(0x17e)]=_0x5890df,this[_0x3b61a0(0x1d8)]=_0x1c2049,this[_0x3b61a0(0x195)](),this[_0x3b61a0(0x1c1)]();}[_0x538291(0x1c1)](){const _0x5b1783=_0x538291;this[_0x5b1783(0x17d)](this[_0x5b1783(0x185)][_0x5b1783(0x179)][_0x5b1783(0x19f)](_0x309254(0x10))[_0x5b1783(0x1c0)](_0x226f61=>{const _0x17e890=_0x5b1783,_0x5c8fd1=new Set();_0x226f61[_0x17e890(0x1a4)](_0x3bf874=>{const _0x3948b1=_0x17e890;switch(_0x3bf874[_0x3948b1(0x1cc)]){case _0x3948b1(0x180):{const _0x5cad9e=_0x3bf874[_0x3948b1(0x176)]['personId'];_0x5c8fd1[_0x3948b1(0x180)](_0x5cad9e);break;}}}),B(this[_0x17e890(0x1d8)],_0x5c8fd1);}));}[_0x538291(0x195)](){const _0x173566=_0x538291;this[_0x173566(0x17d)](this[_0x173566(0x186)][_0x173566(0x179)]['subscribe'](async _0x3757a8=>{const _0x2a4326=_0x173566;var _0x1079f0,_0x513fcb,_0x399fd0,_0x1b41a4;const _0x261fc5=(_0x1079f0=this[_0x2a4326(0x185)]['getUnit'](_0x3757a8[_0x2a4326(0x1cf)])[_0x2a4326(0x177)](_0x52efdf=>_0x52efdf[_0x2a4326(0x18c)]===_0x3757a8['threadId']))==null?void 0x0:_0x1079f0[_0x2a4326(0x182)];if(!_0x261fc5)return;const {unitId:_0x49e7b2,subUnitId:_0x48f14f}=_0x261fc5;switch(_0x3757a8[_0x2a4326(0x1b0)]&&this[_0x2a4326(0x17e)]['addUser'](_0x3757a8['user']),_0x3757a8[_0x2a4326(0x1cc)]){case v[_0x2a4326(0x188)]:break;case v['Reply']:{this[_0x2a4326(0x185)][_0x2a4326(0x1ce)](_0x49e7b2,_0x48f14f,{'unitId':_0x49e7b2,'subUnitId':_0x48f14f,'ref':'','id':_0x3757a8[_0x2a4326(0x18b)],'dT':D(+_0x3757a8[_0x2a4326(0x1bf)]),'threadId':_0x3757a8[_0x2a4326(0x18c)],'personId':(_0x399fd0=(_0x513fcb=_0x3757a8[_0x2a4326(0x1b0)])==null?void 0x0:_0x513fcb[_0x2a4326(0x1aa)])!=null?_0x399fd0:_0x3757a8['userId'],'text':JSON[_0x2a4326(0x1c6)](_0x3757a8[_0x2a4326(0x1c4)]),'parentId':_0x261fc5['id']});break;}case v[_0x2a4326(0x18a)]:{const _0x307deb=this[_0x2a4326(0x185)][_0x2a4326(0x183)](_0x49e7b2,_0x48f14f,_0x3757a8[_0x2a4326(0x18b)]);_0x307deb&&_0x307deb[_0x2a4326(0x1ca)]&&this['_threadCommentModel'][_0x2a4326(0x192)](_0x49e7b2,_0x48f14f,_0x3757a8[_0x2a4326(0x18b)]);break;}case v[_0x2a4326(0x1a9)]:{this['_threadCommentModel']['updateComment'](_0x49e7b2,_0x48f14f,{'commentId':_0x3757a8[_0x2a4326(0x18b)],'text':JSON[_0x2a4326(0x1c6)](_0x3757a8[_0x2a4326(0x1c4)])});break;}case v[_0x2a4326(0x1b5)]:{const _0x2cdfcc=(_0x1b41a4=this[_0x2a4326(0x185)]['getUnit'](_0x3757a8[_0x2a4326(0x1cf)])[_0x2a4326(0x177)](_0x2b702f=>_0x2b702f[_0x2a4326(0x18c)]===_0x3757a8['threadId']))==null?void 0x0:_0x1b41a4[_0x2a4326(0x182)];_0x2cdfcc&&this[_0x2a4326(0x185)][_0x2a4326(0x1a0)](_0x49e7b2,_0x48f14f,_0x2cdfcc['id'],_0x3757a8[_0x2a4326(0x1a6)]===I[_0x2a4326(0x1b9)]);break;}}}));}};S=V([p(0x0,_0x329691(_0x1c15ac)),p(0x1,_0x329691(_0x2ef6b5)),p(0x2,_0x329691(_0x28089d)),p(0x3,_0x329691(_0x516ead))],S);const z=_0x538291(0x184),M={};var k=Object[_0x538291(0x1b3)],Q=(_0x1f2b4f,_0xff8fc8,_0x5a0dc2,_0x53a9f5)=>{const _0x2b98ba=_0x538291;for(var _0x3cb3d4=_0x53a9f5>0x1?void 0x0:_0x53a9f5?k(_0xff8fc8,_0x5a0dc2):_0xff8fc8,_0x301514=_0x1f2b4f[_0x2b98ba(0x1ba)]-0x1,_0x358680;_0x301514>=0x0;_0x301514--)(_0x358680=_0x1f2b4f[_0x301514])&&(_0x3cb3d4=_0x358680(_0x3cb3d4)||_0x3cb3d4);return _0x3cb3d4;},_=(_0x119234,_0xcaf1f8)=>(_0x51066f,_0x1df5fc)=>_0xcaf1f8(_0x51066f,_0x1df5fc,_0x119234);function X(_0x520b7b,_0x2672bc){const _0x551ea5=_0x538291,_0x15cf3a=_0x520b7b[_0x551ea5(0x19e)][0x0];return{..._0x2672bc,'id':_0x15cf3a[_0x551ea5(0x18b)],'resolved':_0x520b7b[_0x551ea5(0x1a6)]===0x1,'dT':D(_0x15cf3a['createTimestamp']),'personId':_0x15cf3a['userId'],'threadId':_0x15cf3a['threadId']};}function ee(_0x8d6b51,_0x3cc82a,_0x3f9fb2){const _0x8fc40a=_0x538291;var _0x53dce2,_0x1d1ac1;if(((_0x1d1ac1=(_0x53dce2=_0x8d6b51==null?void 0x0:_0x8d6b51[_0x8fc40a(0x19e)])==null?void 0x0:_0x53dce2[_0x8fc40a(0x1ba)])!=null?_0x1d1ac1:0x0)>0x0){const _0x5c8fe1=(_0xeed7d0,_0x325a62)=>({'id':_0xeed7d0[_0x8fc40a(0x18b)],'threadId':_0xeed7d0[_0x8fc40a(0x18c)],'dT':D(_0xeed7d0['createTimestamp']),'personId':_0xeed7d0[_0x8fc40a(0x1d5)],'resolved':_0x8d6b51[_0x8fc40a(0x1a6)]===I[_0x8fc40a(0x1b9)],'unitId':_0x3cc82a,'subUnitId':_0x3f9fb2,'text':JSON[_0x8fc40a(0x1c6)](_0xeed7d0[_0x8fc40a(0x1c4)]),'parentId':_0x325a62}),_0x897949=_0x5c8fe1(_0x8d6b51['replies'][0x0]);return{..._0x897949,'children':_0x8d6b51[_0x8fc40a(0x19e)]['slice'](0x1)[_0x8fc40a(0x1c5)](_0x36de77=>_0x5c8fe1(_0x36de77,_0x897949['id']))};}return null;}let f=class{constructor(_0x36d7d3,_0x236f7c,_0x2729ce,_0x307b9b){const _0x16593c=_0x538291;this[_0x16593c(0x1a8)]=_0x36d7d3,this[_0x16593c(0x17e)]=_0x236f7c,this[_0x16593c(0x1a7)]=_0x2729ce,this[_0x16593c(0x1d8)]=_0x307b9b;}async[_0x538291(0x1ce)](_0x9d1832){const _0x45c7d8=_0x538291;var _0x4e0ed1,_0x99d1f2;const {parentId:_0x21c98f,unitId:_0x1ad9ab,text:_0x3ba24f,threadId:_0x10bea4}=_0x9d1832,_0x1aa727=(_0x99d1f2=(_0x4e0ed1=_0x3ba24f['customRanges'])==null?void 0x0:_0x4e0ed1[_0x45c7d8(0x1cd)](_0x5c4fe1=>_0x5c4fe1['rangeType']===_0x29ac7f[_0x45c7d8(0x1d7)])[_0x45c7d8(0x1c5)](_0x23631a=>_0x23631a[_0x45c7d8(0x173)]))!=null?_0x99d1f2:[],_0x2eaa3a=JSON[_0x45c7d8(0x175)](_0x3ba24f),_0x41fe6b=(await this[_0x45c7d8(0x1a7)][_0x45c7d8(0x18e)](_0x1ad9ab))[_0x45c7d8(0x19a)]();if(_0x21c98f){const _0x484fa8={'memberId':_0x41fe6b,'unitId':_0x1ad9ab,'content':_0x2eaa3a,'mention':_0x1aa727,'threadId':_0x10bea4},_0x35b2e2=(await this[_0x45c7d8(0x1a8)][_0x45c7d8(0x18f)](_0x45c7d8(0x1bd)+_0x1ad9ab+'/reply',{'body':_0x484fa8}))[_0x45c7d8(0x1d1)][_0x45c7d8(0x1b1)];return{..._0x9d1832,'id':_0x35b2e2[_0x45c7d8(0x18b)],'dT':_0x2fc50a(+_0x35b2e2[_0x45c7d8(0x1bf)])[_0x45c7d8(0x1d9)](_0x45c7d8(0x1a2)),'personId':_0x35b2e2[_0x45c7d8(0x1d5)]};}else{const _0x34bbfd={'memberId':_0x41fe6b,'unitId':_0x1ad9ab,'content':_0x2eaa3a,'mention':_0x1aa727},_0x565a61=await this[_0x45c7d8(0x1a8)][_0x45c7d8(0x18f)](_0x45c7d8(0x1bd)+_0x1ad9ab+_0x45c7d8(0x181),{'body':_0x34bbfd});return X(_0x565a61['body'][_0x45c7d8(0x1c7)],_0x9d1832);}}async[_0x538291(0x1c9)](_0x58d82b){const _0x4577ab=_0x538291;var _0x11da9a,_0x3dd819;const {text:_0x5f5a75,unitId:_0x8b3d30}=_0x58d82b,_0x24030d=(_0x3dd819=(_0x11da9a=_0x5f5a75[_0x4577ab(0x1c2)])==null?void 0x0:_0x11da9a[_0x4577ab(0x1cd)](_0x44a8dd=>_0x44a8dd[_0x4577ab(0x187)]===_0x29ac7f[_0x4577ab(0x1d7)])['map'](_0x328309=>_0x328309[_0x4577ab(0x173)]))!=null?_0x3dd819:[],_0x19cb58=JSON[_0x4577ab(0x175)](_0x5f5a75),_0xf76dbd=_0x58d82b['threadId'],_0x2cabc9=_0x58d82b['id'],_0x38828a={'memberId':(await this[_0x4577ab(0x1a7)][_0x4577ab(0x18e)](_0x8b3d30))[_0x4577ab(0x19a)](),'unitId':_0x8b3d30,'threadId':_0xf76dbd,'mention':_0x24030d,'content':_0x19cb58,'replyId':_0x2cabc9},_0x1b206c=await this[_0x4577ab(0x1a8)][_0x4577ab(0x18f)](_0x4577ab(0x1bd)+_0x8b3d30+_0x4577ab(0x19b),{'body':_0x38828a});return!_0x1b206c['body'][_0x4577ab(0x17f)]||_0x1b206c[_0x4577ab(0x1d1)][_0x4577ab(0x17f)]['code']===0x1;}async[_0x538291(0x1a0)](_0x11ce62){const _0x1d8a7b=_0x538291,{unitId:_0x345cac}=_0x11ce62,_0x1a5921=_0x11ce62['threadId'],_0x22bb61={'memberId':this[_0x1d8a7b(0x17e)][_0x1d8a7b(0x1a1)]()[_0x1d8a7b(0x1aa)],'unitId':_0x345cac,'threadId':_0x1a5921,'solved':_0x11ce62[_0x1d8a7b(0x1ab)]?I[_0x1d8a7b(0x1b9)]:I['OpenOrReOpen']},_0x4eea7f=await this['_httpService'][_0x1d8a7b(0x18f)]('/universer-api/comment/unit/'+_0x345cac+_0x1d8a7b(0x1d4),{'body':_0x22bb61});return!_0x4eea7f[_0x1d8a7b(0x1d1)][_0x1d8a7b(0x17f)]||_0x4eea7f['body'][_0x1d8a7b(0x17f)]['code']===0x1;}async[_0x538291(0x192)](_0x468974,_0x529428,_0x2624b8,_0xe6714){const _0x42526d=_0x538291,_0x3f4001={'memberId':(await this[_0x42526d(0x1a7)][_0x42526d(0x18e)](_0x468974))[_0x42526d(0x19a)](),'threadId':_0x2624b8,'replyId':_0xe6714,'unitId':_0x468974},_0x3cb96d=await this[_0x42526d(0x1a8)][_0x42526d(0x18f)](_0x42526d(0x1bd)+_0x468974+_0x42526d(0x1d2),{'body':_0x3f4001});return!_0x3cb96d['body'][_0x42526d(0x17f)]||_0x3cb96d['body']['error'][_0x42526d(0x198)]===0x1;}async['listComments'](_0x48c972,_0x14d79c,_0x5cbcc4){const _0x513782=_0x538291,_0x3e9161={'unitId':_0x48c972,'threadId':_0x5cbcc4},_0x155762=await this['_httpService'][_0x513782(0x18f)](_0x513782(0x1bd)+_0x48c972+'/list',{'body':_0x3e9161}),_0x5791ea=_0x5cbcc4[_0x513782(0x1c5)](_0x5d076c=>ee(_0x155762[_0x513782(0x1d1)][_0x513782(0x1c3)][_0x5d076c],_0x48c972,_0x14d79c))['filter'](Boolean);return Object[_0x513782(0x17a)](_0x155762[_0x513782(0x1d1)][_0x513782(0x19d)])[_0x513782(0x1a4)](_0x3d79ab=>{const _0x2b7ee8=_0x513782;this[_0x2b7ee8(0x17e)]['addUser'](_0x3d79ab);}),_0x5791ea;}[_0x538291(0x199)](_0x1e5a2d){const _0x44e406=_0x538291;return{'id':_0x1e5a2d['id'],'threadId':_0x1e5a2d[_0x44e406(0x18c)],'ref':_0x1e5a2d[_0x44e406(0x194)]};}};f=Q([_(0x0,_0x329691(_0x3ec942)),_(0x1,_0x329691(_0x28089d)),_(0x2,_0x329691(_0x190768)),_(0x3,_0x329691(_0x516ead))],f);var re=Object[_0x538291(0x1b3)],te=(_0x8041a6,_0xb50ba1,_0x1249f5,_0x27a16f)=>{const _0x180695=_0x538291;for(var _0x5c1b68=_0x27a16f>0x1?void 0x0:_0x27a16f?re(_0xb50ba1,_0x1249f5):_0xb50ba1,_0x52f524=_0x8041a6[_0x180695(0x1ba)]-0x1,_0x2c29e6;_0x52f524>=0x0;_0x52f524--)(_0x2c29e6=_0x8041a6[_0x52f524])&&(_0x5c1b68=_0x2c29e6(_0x5c1b68)||_0x5c1b68);return _0x5c1b68;},N=(_0x3ca649,_0x55dcb7)=>(_0x351829,_0x4ea4a2)=>_0x55dcb7(_0x351829,_0x4ea4a2,_0x3ca649);let g=class extends _0x3745f8{constructor(_0x54dfb6,_0x894be5){const _0x18d696=_0x538291;super(),this[_0x18d696(0x1ad)]=_0x54dfb6,this['_threadCommentDataSource']=_0x894be5,this[_0x18d696(0x1af)]();}[_0x538291(0x1af)](){const _0x4e5d2f=_0x538291;this['_threadCommentDataSourceService'][_0x4e5d2f(0x178)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x4e5d2f(0x1b8)]=!0x1;}};g=te([N(0x0,_0x3a072d),N(0x1,_0x329691(f))],g);var se=Object[_0x538291(0x17c)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1270e6,_0x9d2c40,_0x4ee5b5)=>_0x9d2c40 in _0x1270e6?se(_0x1270e6,_0x9d2c40,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4ee5b5}):_0x1270e6[_0x9d2c40]=_0x4ee5b5,ie=(_0x48c929,_0x408c92,_0x137a77,_0x291fdc)=>{const _0x3383cd=_0x538291;for(var _0x572b0a=_0x291fdc>0x1?void 0x0:_0x291fdc?oe(_0x408c92,_0x137a77):_0x408c92,_0x4d7c1c=_0x48c929[_0x3383cd(0x1ba)]-0x1,_0x406a04;_0x4d7c1c>=0x0;_0x4d7c1c--)(_0x406a04=_0x48c929[_0x4d7c1c])&&(_0x572b0a=_0x406a04(_0x572b0a)||_0x572b0a);return _0x572b0a;},w=(_0x5d543c,_0x40fa1b)=>(_0x3950f9,_0x1040ef)=>_0x40fa1b(_0x3950f9,_0x1040ef,_0x5d543c),$=(_0xc4b4f4,_0x2d6c68,_0xa676de)=>ne(_0xc4b4f4,typeof _0x2d6c68!=_0x538291(0x1be)?_0x2d6c68+'':_0x2d6c68,_0xa676de);let b=class extends _0x41684c{constructor(_0x3e48fc=M,_0x32d75d,_0x31acf9){const _0x192ce9=_0x538291;super(),this['_config']=_0x3e48fc,this[_0x192ce9(0x1d8)]=_0x32d75d,this[_0x192ce9(0x191)]=_0x31acf9;const {..._0x3a9ee7}=_0x4b727e({},M,this[_0x192ce9(0x19c)]);this[_0x192ce9(0x191)][_0x192ce9(0x196)](z,_0x3a9ee7);}['onStarting'](){const _0x5318cd=_0x538291;[[f],[g],[S]][_0x5318cd(0x1a4)](_0x38800f=>{const _0x14054d=_0x5318cd;this[_0x14054d(0x1d8)]['add'](_0x38800f);});}[_0x538291(0x1cb)](){const _0x586434=_0x538291;this[_0x586434(0x1d8)][_0x586434(0x174)](g),this[_0x586434(0x1d8)][_0x586434(0x174)](S);}};$(b,_0x538291(0x1d0),W),$(b,'type',_0x369264['UNIVER_UNKNOWN']),b=ie([_0x322c5e(_0x7ab6ad,_0x38e298,_0x15d46a),w(0x1,_0x329691(_0x516ead)),w(0x2,_0x387356)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x32593b=_0x51fd;(function(_0x59556a,_0x213cce){const _0x290389=_0x51fd,_0x437077=_0x59556a();while(!![]){try{const _0x307ce9=-parseInt(_0x290389(0x22f))/0x1+parseInt(_0x290389(0x1f2))/0x2+-parseInt(_0x290389(0x1fd))/0x3+parseInt(_0x290389(0x251))/0x4+-parseInt(_0x290389(0x23e))/0x5+parseInt(_0x290389(0x215))/0x6*(parseInt(_0x290389(0x245))/0x7)+parseInt(_0x290389(0x21b))/0x8;if(_0x307ce9===_0x213cce)break;else _0x437077['push'](_0x437077['shift']());}catch(_0x1c2812){_0x437077['push'](_0x437077['shift']());}}}(_0x3725,0x4d5e9));import{CommentService as _0x3b45f0,CollaborationSessionService as _0x197a37,UniverCollaborationClientPlugin as _0x182658}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3592f4}from'@univerjs-pro/license';import{dayjs as _0x255919,UserManagerService as _0x43f749,Inject as _0x9b5830,Injector as _0x57c758,Disposable as _0x136e8f,CustomRangeType as _0x49f0f2,UniverInstanceType as _0x34926c,DependentOn as _0x44d782,IConfigService as _0x46444d,Plugin as _0x4332cb,merge as _0x2aa03e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xea9a1}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2927dc,IThreadCommentDataSourceService as _0x49413f}from'@univerjs/thread-comment';import{bufferTime as _0x14c0b1}from'rxjs';import{HTTPService as _0x5af417}from'@univerjs/network';const W=_0x32593b(0x231);var I=(_0x22bc7d=>(_0x22bc7d[_0x22bc7d[_0x32593b(0x227)]=0x0]=_0x32593b(0x227),_0x22bc7d[_0x22bc7d[_0x32593b(0x212)]=0x1]='Solved',_0x22bc7d[_0x22bc7d['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x22bc7d))(I||{}),v=(_0x2a8bc9=>(_0x2a8bc9[_0x2a8bc9[_0x32593b(0x249)]=0x0]=_0x32593b(0x249),_0x2a8bc9[_0x2a8bc9[_0x32593b(0x22d)]=0x1]='Add',_0x2a8bc9[_0x2a8bc9[_0x32593b(0x23a)]=0x2]=_0x32593b(0x23a),_0x2a8bc9[_0x2a8bc9[_0x32593b(0x228)]=0x3]=_0x32593b(0x228),_0x2a8bc9[_0x2a8bc9[_0x32593b(0x24f)]=0x4]=_0x32593b(0x24f),_0x2a8bc9[_0x2a8bc9[_0x32593b(0x214)]=0x5]='Solve',_0x2a8bc9[_0x2a8bc9[_0x32593b(0x20b)]=-0x1]=_0x32593b(0x20b),_0x2a8bc9))(v||{});const D=_0x17c914=>_0x255919(new Date(+_0x17c914))[_0x32593b(0x209)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x380532,_0x32ceff)=>{const _0x1e2646=_0x32593b,_0x97741c=_0x380532[_0x1e2646(0x254)](_0x43f749),_0x1b563b=_0x380532[_0x1e2646(0x254)](_0x5af417);_0x32ceff[_0x1e2646(0x236)](_0x488096=>{const _0x570972=_0x1e2646;_0x97741c[_0x570972(0x1fc)](_0x488096)&&_0x32ceff[_0x570972(0x234)](_0x488096);}),_0x32ceff[_0x1e2646(0x23d)]&&(await _0x1b563b['get'](_0x1e2646(0x20a),{'params':{'userIDs':[..._0x32ceff]}}))[_0x1e2646(0x20f)]['users'][_0x1e2646(0x236)](_0x27270e=>{const _0x30b19a=_0x1e2646;_0x27270e&&_0x97741c[_0x30b19a(0x253)](_0x27270e);});};var K=Object[_0x32593b(0x216)],V=(_0x1c2360,_0x54a8d6,_0x57aa88,_0x4f1f5c)=>{for(var _0x28251d=_0x4f1f5c>0x1?void 0x0:_0x4f1f5c?K(_0x54a8d6,_0x57aa88):_0x54a8d6,_0x339191=_0x1c2360['length']-0x1,_0x3c6e4c;_0x339191>=0x0;_0x339191--)(_0x3c6e4c=_0x1c2360[_0x339191])&&(_0x28251d=_0x3c6e4c(_0x28251d)||_0x28251d);return _0x28251d;},p=(_0x6a970d,_0x463f6f)=>(_0xb43242,_0x5d22bc)=>_0x463f6f(_0xb43242,_0x5d22bc,_0x6a970d);let S=class extends _0x136e8f{constructor(_0x2e455,_0x34bf1b,_0x531665,_0x2b23fe){const _0x272032=_0x32593b;super(),this[_0x272032(0x205)]=_0x2e455,this[_0x272032(0x224)]=_0x34bf1b,this[_0x272032(0x238)]=_0x531665,this[_0x272032(0x252)]=_0x2b23fe,this[_0x272032(0x1f6)](),this[_0x272032(0x206)]();}[_0x32593b(0x206)](){const _0x29804b=_0x32593b;this[_0x29804b(0x201)](this['_threadCommentModel'][_0x29804b(0x24e)][_0x29804b(0x244)](_0x14c0b1(0x10))[_0x29804b(0x21a)](_0x345ba8=>{const _0x39fc88=_0x29804b,_0x4425b4=new Set();_0x345ba8[_0x39fc88(0x236)](_0x5be4d5=>{const _0x5db378=_0x39fc88;switch(_0x5be4d5[_0x5db378(0x218)]){case _0x5db378(0x220):{const _0x4d2234=_0x5be4d5[_0x5db378(0x24d)][_0x5db378(0x24b)];_0x4425b4[_0x5db378(0x220)](_0x4d2234);break;}}}),B(this[_0x39fc88(0x252)],_0x4425b4);}));}[_0x32593b(0x1f6)](){const _0x416e53=_0x32593b;this[_0x416e53(0x201)](this['_commentService'][_0x416e53(0x24e)]['subscribe'](async _0xbfeb65=>{const _0x1cf9a0=_0x416e53;var _0x58c403,_0x45b09,_0xccaf01,_0x63a4a;const _0x153dbe=(_0x58c403=this[_0x1cf9a0(0x224)][_0x1cf9a0(0x21d)](_0xbfeb65[_0x1cf9a0(0x200)])[_0x1cf9a0(0x222)](_0x34cc77=>_0x34cc77['threadId']===_0xbfeb65[_0x1cf9a0(0x243)]))==null?void 0x0:_0x58c403[_0x1cf9a0(0x213)];if(!_0x153dbe)return;const {unitId:_0x50510d,subUnitId:_0x4552f7}=_0x153dbe;switch(_0xbfeb65[_0x1cf9a0(0x242)]&&this['_userService'][_0x1cf9a0(0x253)](_0xbfeb65['user']),_0xbfeb65[_0x1cf9a0(0x218)]){case v[_0x1cf9a0(0x22d)]:break;case v[_0x1cf9a0(0x23a)]:{this[_0x1cf9a0(0x224)][_0x1cf9a0(0x1fb)](_0x50510d,_0x4552f7,{'unitId':_0x50510d,'subUnitId':_0x4552f7,'ref':'','id':_0xbfeb65[_0x1cf9a0(0x240)],'dT':D(+_0xbfeb65[_0x1cf9a0(0x233)]),'threadId':_0xbfeb65['threadId'],'personId':(_0xccaf01=(_0x45b09=_0xbfeb65[_0x1cf9a0(0x242)])==null?void 0x0:_0x45b09['userID'])!=null?_0xccaf01:_0xbfeb65['userId'],'text':JSON[_0x1cf9a0(0x230)](_0xbfeb65[_0x1cf9a0(0x223)]),'parentId':_0x153dbe['id']});break;}case v['Delete']:{const _0x5599c1=this[_0x1cf9a0(0x224)]['getComment'](_0x50510d,_0x4552f7,_0xbfeb65[_0x1cf9a0(0x240)]);_0x5599c1&&_0x5599c1[_0x1cf9a0(0x20d)]&&this['_threadCommentModel'][_0x1cf9a0(0x1f4)](_0x50510d,_0x4552f7,_0xbfeb65[_0x1cf9a0(0x240)]);break;}case v[_0x1cf9a0(0x228)]:{this[_0x1cf9a0(0x224)]['updateComment'](_0x50510d,_0x4552f7,{'commentId':_0xbfeb65[_0x1cf9a0(0x240)],'text':JSON[_0x1cf9a0(0x230)](_0xbfeb65[_0x1cf9a0(0x223)])});break;}case v[_0x1cf9a0(0x214)]:{const _0x5ca788=(_0x63a4a=this[_0x1cf9a0(0x224)][_0x1cf9a0(0x21d)](_0xbfeb65['unitId'])[_0x1cf9a0(0x222)](_0x21e169=>_0x21e169[_0x1cf9a0(0x243)]===_0xbfeb65[_0x1cf9a0(0x243)]))==null?void 0x0:_0x63a4a[_0x1cf9a0(0x213)];_0x5ca788&&this[_0x1cf9a0(0x224)]['resolveComment'](_0x50510d,_0x4552f7,_0x5ca788['id'],_0xbfeb65[_0x1cf9a0(0x22a)]===I[_0x1cf9a0(0x212)]);break;}}}));}};S=V([p(0x0,_0x9b5830(_0x3b45f0)),p(0x1,_0x9b5830(_0x2927dc)),p(0x2,_0x9b5830(_0x43f749)),p(0x3,_0x9b5830(_0x57c758))],S);const z=_0x32593b(0x239),M={};var k=Object[_0x32593b(0x216)],Q=(_0x441207,_0x35647d,_0x5644f9,_0x2e9c15)=>{for(var _0x1bdebe=_0x2e9c15>0x1?void 0x0:_0x2e9c15?k(_0x35647d,_0x5644f9):_0x35647d,_0xedc7a6=_0x441207['length']-0x1,_0x87c2c4;_0xedc7a6>=0x0;_0xedc7a6--)(_0x87c2c4=_0x441207[_0xedc7a6])&&(_0x1bdebe=_0x87c2c4(_0x1bdebe)||_0x1bdebe);return _0x1bdebe;},_=(_0x38dbe1,_0x5c61db)=>(_0x20721d,_0x1cd919)=>_0x5c61db(_0x20721d,_0x1cd919,_0x38dbe1);function X(_0x20f192,_0x1d3a33){const _0x3abfb5=_0x32593b,_0x1613a2=_0x20f192['replies'][0x0];return{..._0x1d3a33,'id':_0x1613a2[_0x3abfb5(0x240)],'resolved':_0x20f192['solved']===0x1,'dT':D(_0x1613a2['createTimestamp']),'personId':_0x1613a2[_0x3abfb5(0x208)],'threadId':_0x1613a2[_0x3abfb5(0x243)]};}function ee(_0x5cbf13,_0xb12159,_0x3af956){const _0x4c3d03=_0x32593b;var _0x5732c3,_0x2c9ee9;if(((_0x2c9ee9=(_0x5732c3=_0x5cbf13==null?void 0x0:_0x5cbf13[_0x4c3d03(0x241)])==null?void 0x0:_0x5732c3[_0x4c3d03(0x248)])!=null?_0x2c9ee9:0x0)>0x0){const _0x81b62f=(_0x260e4b,_0x1c37f0)=>({'id':_0x260e4b[_0x4c3d03(0x240)],'threadId':_0x260e4b['threadId'],'dT':D(_0x260e4b[_0x4c3d03(0x233)]),'personId':_0x260e4b['userId'],'resolved':_0x5cbf13[_0x4c3d03(0x22a)]===I[_0x4c3d03(0x212)],'unitId':_0xb12159,'subUnitId':_0x3af956,'text':JSON[_0x4c3d03(0x230)](_0x260e4b[_0x4c3d03(0x223)]),'parentId':_0x1c37f0}),_0x2aa118=_0x81b62f(_0x5cbf13[_0x4c3d03(0x241)][0x0]);return{..._0x2aa118,'children':_0x5cbf13[_0x4c3d03(0x241)][_0x4c3d03(0x1f9)](0x1)[_0x4c3d03(0x21c)](_0x21ce8b=>_0x81b62f(_0x21ce8b,_0x2aa118['id']))};}return null;}let f=class{constructor(_0x5649fe,_0x45d19d,_0x24f100,_0x5ca544){const _0x26223d=_0x32593b;this[_0x26223d(0x203)]=_0x5649fe,this[_0x26223d(0x238)]=_0x45d19d,this[_0x26223d(0x22c)]=_0x24f100,this[_0x26223d(0x252)]=_0x5ca544;}async['addComment'](_0xda541f){const _0x2c0383=_0x32593b;var _0x39be13,_0x5effbd;const {parentId:_0xa7b38d,unitId:_0x708db6,text:_0x1eb77a,threadId:_0x54d336}=_0xda541f,_0x3782d7=(_0x5effbd=(_0x39be13=_0x1eb77a[_0x2c0383(0x1fe)])==null?void 0x0:_0x39be13['filter'](_0x4c4f83=>_0x4c4f83[_0x2c0383(0x20c)]===_0x49f0f2[_0x2c0383(0x229)])[_0x2c0383(0x21c)](_0x30424d=>_0x30424d[_0x2c0383(0x1f8)]))!=null?_0x5effbd:[],_0x350802=JSON['stringify'](_0x1eb77a),_0x543b9f=(await this[_0x2c0383(0x22c)]['requireSession'](_0x708db6))[_0x2c0383(0x1f3)]();if(_0xa7b38d){const _0x1bd899={'memberId':_0x543b9f,'unitId':_0x708db6,'content':_0x350802,'mention':_0x3782d7,'threadId':_0x54d336},_0xec6ee8=(await this[_0x2c0383(0x203)][_0x2c0383(0x1f5)](_0x2c0383(0x22b)+_0x708db6+_0x2c0383(0x237),{'body':_0x1bd899}))[_0x2c0383(0x20f)]['reply'];return{..._0xda541f,'id':_0xec6ee8[_0x2c0383(0x240)],'dT':_0x255919(+_0xec6ee8[_0x2c0383(0x233)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0xec6ee8[_0x2c0383(0x208)]};}else{const _0xe5a528={'memberId':_0x543b9f,'unitId':_0x708db6,'content':_0x350802,'mention':_0x3782d7},_0x19485b=await this['_httpService'][_0x2c0383(0x1f5)](_0x2c0383(0x22b)+_0x708db6+_0x2c0383(0x217),{'body':_0xe5a528});return X(_0x19485b[_0x2c0383(0x20f)][_0x2c0383(0x221)],_0xda541f);}}async['updateComment'](_0x522fcd){const _0x132034=_0x32593b;var _0x44a055,_0x4b17cd;const {text:_0x1ce70e,unitId:_0x57df11}=_0x522fcd,_0x48a142=(_0x4b17cd=(_0x44a055=_0x1ce70e[_0x132034(0x1fe)])==null?void 0x0:_0x44a055[_0x132034(0x1f7)](_0x3b1956=>_0x3b1956[_0x132034(0x20c)]===_0x49f0f2[_0x132034(0x229)])[_0x132034(0x21c)](_0x253041=>_0x253041[_0x132034(0x1f8)]))!=null?_0x4b17cd:[],_0x2e926d=JSON['stringify'](_0x1ce70e),_0xa2564e=_0x522fcd[_0x132034(0x243)],_0x49f8f9=_0x522fcd['id'],_0x5654e7={'memberId':(await this[_0x132034(0x22c)][_0x132034(0x232)](_0x57df11))[_0x132034(0x1f3)](),'unitId':_0x57df11,'threadId':_0xa2564e,'mention':_0x48a142,'content':_0x2e926d,'replyId':_0x49f8f9},_0x372dca=await this['_httpService']['post'](_0x132034(0x22b)+_0x57df11+_0x132034(0x24c),{'body':_0x5654e7});return!_0x372dca[_0x132034(0x20f)][_0x132034(0x21e)]||_0x372dca[_0x132034(0x20f)]['error']['code']===0x1;}async['resolveComment'](_0x42f97b){const _0x3d2006=_0x32593b,{unitId:_0x2e3279}=_0x42f97b,_0x351c9c=_0x42f97b[_0x3d2006(0x243)],_0xe382b5={'memberId':this[_0x3d2006(0x238)][_0x3d2006(0x23f)]()[_0x3d2006(0x23c)],'unitId':_0x2e3279,'threadId':_0x351c9c,'solved':_0x42f97b['resolved']?I[_0x3d2006(0x212)]:I[_0x3d2006(0x227)]},_0x15daf5=await this['_httpService']['post'](_0x3d2006(0x22b)+_0x2e3279+_0x3d2006(0x20e),{'body':_0xe382b5});return!_0x15daf5[_0x3d2006(0x20f)][_0x3d2006(0x21e)]||_0x15daf5['body'][_0x3d2006(0x21e)]['code']===0x1;}async['deleteComment'](_0x2f9b23,_0x1fa5a9,_0x10131e,_0x380a9e){const _0x4f8190=_0x32593b,_0x5c3ebe={'memberId':(await this[_0x4f8190(0x22c)][_0x4f8190(0x232)](_0x2f9b23))[_0x4f8190(0x1f3)](),'threadId':_0x10131e,'replyId':_0x380a9e,'unitId':_0x2f9b23},_0x15a431=await this[_0x4f8190(0x203)][_0x4f8190(0x1f5)](_0x4f8190(0x22b)+_0x2f9b23+_0x4f8190(0x1fa),{'body':_0x5c3ebe});return!_0x15a431[_0x4f8190(0x20f)][_0x4f8190(0x21e)]||_0x15a431['body'][_0x4f8190(0x21e)]['code']===0x1;}async[_0x32593b(0x235)](_0x2d56a6,_0x160fd3,_0x139651){const _0x3dfaea=_0x32593b,_0x160338={'unitId':_0x2d56a6,'threadId':_0x139651},_0x1bdfed=await this[_0x3dfaea(0x203)][_0x3dfaea(0x1f5)](_0x3dfaea(0x22b)+_0x2d56a6+_0x3dfaea(0x247),{'body':_0x160338}),_0x36079b=_0x139651[_0x3dfaea(0x21c)](_0x4e6117=>ee(_0x1bdfed['body'][_0x3dfaea(0x23b)][_0x4e6117],_0x2d56a6,_0x160fd3))[_0x3dfaea(0x1f7)](Boolean);return Object['values'](_0x1bdfed[_0x3dfaea(0x20f)][_0x3dfaea(0x219)])[_0x3dfaea(0x236)](_0x5c508c=>{const _0x5142b1=_0x3dfaea;this[_0x5142b1(0x238)]['addUser'](_0x5c508c);}),_0x36079b;}['saveCommentToSnapshot'](_0x379471){const _0xe40a1b=_0x32593b;return{'id':_0x379471['id'],'threadId':_0x379471[_0xe40a1b(0x243)],'ref':_0x379471['ref']};}};f=Q([_(0x0,_0x9b5830(_0x5af417)),_(0x1,_0x9b5830(_0x43f749)),_(0x2,_0x9b5830(_0x197a37)),_(0x3,_0x9b5830(_0x57c758))],f);function _0x51fd(_0x73eb84,_0x4da1fb){const _0x3725c3=_0x3725();return _0x51fd=function(_0x51fd1b,_0x15c1c6){_0x51fd1b=_0x51fd1b-0x1f2;let _0x276321=_0x3725c3[_0x51fd1b];return _0x276321;},_0x51fd(_0x73eb84,_0x4da1fb);}var re=Object['getOwnPropertyDescriptor'],te=(_0x3e59ae,_0x1db0a4,_0x5cfe78,_0x3b14f7)=>{const _0x43997f=_0x32593b;for(var _0x43fdac=_0x3b14f7>0x1?void 0x0:_0x3b14f7?re(_0x1db0a4,_0x5cfe78):_0x1db0a4,_0x19760a=_0x3e59ae[_0x43997f(0x248)]-0x1,_0x266302;_0x19760a>=0x0;_0x19760a--)(_0x266302=_0x3e59ae[_0x19760a])&&(_0x43fdac=_0x266302(_0x43fdac)||_0x43fdac);return _0x43fdac;},N=(_0x4d749b,_0x5a760b)=>(_0xea4c70,_0x2d46ec)=>_0x5a760b(_0xea4c70,_0x2d46ec,_0x4d749b);let g=class extends _0x136e8f{constructor(_0x269df9,_0x3fe1dc){const _0x59bfb6=_0x32593b;super(),this['_threadCommentDataSourceService']=_0x269df9,this[_0x59bfb6(0x1ff)]=_0x3fe1dc,this[_0x59bfb6(0x210)]();}[_0x32593b(0x210)](){const _0x1315d5=_0x32593b;this[_0x1315d5(0x202)][_0x1315d5(0x211)]=this[_0x1315d5(0x1ff)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x49413f),N(0x1,_0x9b5830(f))],g);var se=Object[_0x32593b(0x21f)],oe=Object[_0x32593b(0x216)],ne=(_0x2dbdc4,_0x27d5e7,_0x1bd7b1)=>_0x27d5e7 in _0x2dbdc4?se(_0x2dbdc4,_0x27d5e7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1bd7b1}):_0x2dbdc4[_0x27d5e7]=_0x1bd7b1,ie=(_0x292f9f,_0x2f3d92,_0x19eb8a,_0x204101)=>{const _0x39aa67=_0x32593b;for(var _0x3878f6=_0x204101>0x1?void 0x0:_0x204101?oe(_0x2f3d92,_0x19eb8a):_0x2f3d92,_0x4660e3=_0x292f9f[_0x39aa67(0x248)]-0x1,_0x14b78d;_0x4660e3>=0x0;_0x4660e3--)(_0x14b78d=_0x292f9f[_0x4660e3])&&(_0x3878f6=_0x14b78d(_0x3878f6)||_0x3878f6);return _0x3878f6;},w=(_0x46c5ba,_0x381f8e)=>(_0x508835,_0x25aec6)=>_0x381f8e(_0x508835,_0x25aec6,_0x46c5ba),$=(_0x5c2db0,_0x32d758,_0x481fca)=>ne(_0x5c2db0,typeof _0x32d758!=_0x32593b(0x204)?_0x32d758+'':_0x32d758,_0x481fca);function _0x3725(){const _0xd10164=['Delete','onStarting','2342116CkcUOL','_injector','addUser','get','525676eAFmsL','getMemberID','deleteComment','post','_init','filter','rangeId','slice','/delete','addComment','getUser','1435665PkjsXQ','customRanges','_threadCommentDataSource','unitId','disposeWithMe','_threadCommentDataSourceService','_httpService','symbol','_commentService','_initUserSync','_config','userId','format','/universer-api/user/list','UNRECOGNIZED','rangeType','parentId','/solved','body','_initDataSource','dataSource','Solved','root','Solve','1764YCiPbl','getOwnPropertyDescriptor','/add','type','users','subscribe','3060968CAjsgA','map','getUnit','error','defineProperty','add','comment','find','content','_threadCommentModel','onReady','UNIVER_UNKNOWN','OpenOrReOpen','Edit','COMMENT','solved','/universer-api/comment/unit/','_sessionService','Add','_configService','149484eiySRq','parse','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','requireSession','createTimestamp','delete','listComments','forEach','/reply','_userService','thread-comment-data-source.config','Reply','comments','userID','size','3145710ICPYuK','getCurrentUser','replyId','replies','user','threadId','pipe','8169DWLpUl','pluginName','/list','length','Unknown','setConfig','personId','/edit','payload','commentUpdate$'];_0x3725=function(){return _0xd10164;};return _0x3725();}let b=class extends _0x4332cb{constructor(_0x3dc5cf=M,_0x546445,_0x6b2e7f){const _0xffff0e=_0x32593b;super(),this[_0xffff0e(0x207)]=_0x3dc5cf,this['_injector']=_0x546445,this[_0xffff0e(0x22e)]=_0x6b2e7f;const {..._0x1546e0}=_0x2aa03e({},M,this[_0xffff0e(0x207)]);this[_0xffff0e(0x22e)][_0xffff0e(0x24a)](z,_0x1546e0);}[_0x32593b(0x250)](){const _0x1a7124=_0x32593b;[[f],[g],[S]][_0x1a7124(0x236)](_0x2c8a2e=>{const _0x3533c6=_0x1a7124;this[_0x3533c6(0x252)][_0x3533c6(0x220)](_0x2c8a2e);});}[_0x32593b(0x225)](){const _0xe1971f=_0x32593b;this['_injector']['get'](g),this[_0xe1971f(0x252)][_0xe1971f(0x254)](S);}};$(b,_0x32593b(0x246),W),$(b,_0x32593b(0x218),_0x34926c[_0x32593b(0x226)]),b=ie([_0x44d782(_0xea9a1,_0x182658,_0x3592f4),w(0x1,_0x9b5830(_0x57c758)),w(0x2,_0x46444d)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x538291=_0x2055;(function(_0x2199bb,_0x488327){const _0x30ccad=_0x2055,_0x1a1a7d=_0x2199bb();while(!![]){try{const _0x3304a7=-parseInt(_0x30ccad(0x17b))/0x1*(parseInt(_0x30ccad(0x1bc))/0x2)+-parseInt(_0x30ccad(0x1a3))/0x3*(parseInt(_0x30ccad(0x190))/0x4)+parseInt(_0x30ccad(0x193))/0x5*(-parseInt(_0x30ccad(0x1d3))/0x6)+parseInt(_0x30ccad(0x1b4))/0x7+parseInt(_0x30ccad(0x1ac))/0x8*(parseInt(_0x30ccad(0x18d))/0x9)+parseInt(_0x30ccad(0x1c8))/0xa+parseInt(_0x30ccad(0x1b7))/0xb;if(_0x3304a7===_0x488327)break;else _0x1a1a7d['push'](_0x1a1a7d['shift']());}catch(_0x2f3a6d){_0x1a1a7d['push'](_0x1a1a7d['shift']());}}}(_0x3bcc,0x3de09));function _0x3bcc(){const _0x12b173=['threadId','27NRirsB','requireSession','post','7244kReAcO','_configService','deleteComment','638545uszlaG','ref','_init','setConfig','Reply','code','saveCommentToSnapshot','getMemberID','/edit','_config','users','replies','pipe','resolveComment','getCurrentUser','YYYY/MM/DD\x20HH:mm','48nSlLuC','forEach','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','_sessionService','_httpService','Edit','userID','resolved','90776JnFdmT','_threadCommentDataSourceService','/universer-api/user/list','_initDataSource','user','reply','UNRECOGNIZED','getOwnPropertyDescriptor','423822idlzCi','Solve','getUser','1772353zQEwug','syncUpdateMutationToColla','Solved','length','OpenOrReOpen','2IFKSXl','/universer-api/comment/unit/','symbol','createTimestamp','subscribe','_initUserSync','customRanges','comments','content','map','parse','comment','1895180fDURGT','updateComment','parentId','onReady','type','filter','addComment','unitId','pluginName','body','/delete','6IFrCvt','/solved','userId','delete','COMMENT','_injector','format','rangeId','get','stringify','payload','find','dataSource','commentUpdate$','values','35094YIGGGH','defineProperty','disposeWithMe','_userService','error','add','/add','root','getComment','thread-comment-data-source.config','_threadCommentModel','_commentService','rangeType','Add','Unknown','Delete','replyId'];_0x3bcc=function(){return _0x12b173;};return _0x3bcc();}function _0x2055(_0x1eba7f,_0x2c9c60){const _0x3bcc10=_0x3bcc();return _0x2055=function(_0x2055bc,_0x262525){_0x2055bc=_0x2055bc-0x173;let _0x3d2650=_0x3bcc10[_0x2055bc];return _0x3d2650;},_0x2055(_0x1eba7f,_0x2c9c60);}import{CommentService as _0x1c15ac,CollaborationSessionService as _0x190768,UniverCollaborationClientPlugin as _0x38e298}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x15d46a}from'@univerjs-pro/license';import{dayjs as _0x2fc50a,UserManagerService as _0x28089d,Inject as _0x329691,Injector as _0x516ead,Disposable as _0x3745f8,CustomRangeType as _0x29ac7f,UniverInstanceType as _0x369264,DependentOn as _0x322c5e,IConfigService as _0x387356,Plugin as _0x41684c,merge as _0x4b727e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x7ab6ad}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2ef6b5,IThreadCommentDataSourceService as _0x3a072d}from'@univerjs/thread-comment';import{bufferTime as _0x309254}from'rxjs';import{HTTPService as _0x3ec942}from'@univerjs/network';const W=_0x538291(0x1a5);var I=(_0xa56933=>(_0xa56933[_0xa56933[_0x538291(0x1bb)]=0x0]=_0x538291(0x1bb),_0xa56933[_0xa56933[_0x538291(0x1b9)]=0x1]=_0x538291(0x1b9),_0xa56933[_0xa56933[_0x538291(0x1b2)]=-0x1]=_0x538291(0x1b2),_0xa56933))(I||{}),v=(_0x41679c=>(_0x41679c[_0x41679c[_0x538291(0x189)]=0x0]=_0x538291(0x189),_0x41679c[_0x41679c['Add']=0x1]=_0x538291(0x188),_0x41679c[_0x41679c[_0x538291(0x197)]=0x2]='Reply',_0x41679c[_0x41679c[_0x538291(0x1a9)]=0x3]=_0x538291(0x1a9),_0x41679c[_0x41679c[_0x538291(0x18a)]=0x4]=_0x538291(0x18a),_0x41679c[_0x41679c['Solve']=0x5]=_0x538291(0x1b5),_0x41679c[_0x41679c['UNRECOGNIZED']=-0x1]=_0x538291(0x1b2),_0x41679c))(v||{});const D=_0x8d4208=>_0x2fc50a(new Date(+_0x8d4208))[_0x538291(0x1d9)](_0x538291(0x1a2)),B=async(_0xccda61,_0x34c742)=>{const _0x4e13ff=_0x538291,_0xb877de=_0xccda61[_0x4e13ff(0x174)](_0x28089d),_0x25ed45=_0xccda61[_0x4e13ff(0x174)](_0x3ec942);_0x34c742[_0x4e13ff(0x1a4)](_0x32d03c=>{const _0x4123bd=_0x4e13ff;_0xb877de[_0x4123bd(0x1b6)](_0x32d03c)&&_0x34c742[_0x4123bd(0x1d6)](_0x32d03c);}),_0x34c742['size']&&(await _0x25ed45['get'](_0x4e13ff(0x1ae),{'params':{'userIDs':[..._0x34c742]}}))[_0x4e13ff(0x1d1)][_0x4e13ff(0x19d)][_0x4e13ff(0x1a4)](_0x119ea5=>{_0x119ea5&&_0xb877de['addUser'](_0x119ea5);});};var K=Object[_0x538291(0x1b3)],V=(_0x455b9c,_0x5a6467,_0x1bdf95,_0x444213)=>{for(var _0x35c436=_0x444213>0x1?void 0x0:_0x444213?K(_0x5a6467,_0x1bdf95):_0x5a6467,_0x1b5b54=_0x455b9c['length']-0x1,_0x2962e5;_0x1b5b54>=0x0;_0x1b5b54--)(_0x2962e5=_0x455b9c[_0x1b5b54])&&(_0x35c436=_0x2962e5(_0x35c436)||_0x35c436);return _0x35c436;},p=(_0x2168e9,_0x5f506e)=>(_0x1f3b7d,_0x7841a1)=>_0x5f506e(_0x1f3b7d,_0x7841a1,_0x2168e9);let S=class extends _0x3745f8{constructor(_0x38a8c5,_0xb3cdad,_0x5890df,_0x1c2049){const _0x3b61a0=_0x538291;super(),this[_0x3b61a0(0x186)]=_0x38a8c5,this[_0x3b61a0(0x185)]=_0xb3cdad,this[_0x3b61a0(0x17e)]=_0x5890df,this[_0x3b61a0(0x1d8)]=_0x1c2049,this[_0x3b61a0(0x195)](),this[_0x3b61a0(0x1c1)]();}[_0x538291(0x1c1)](){const _0x5b1783=_0x538291;this[_0x5b1783(0x17d)](this[_0x5b1783(0x185)][_0x5b1783(0x179)][_0x5b1783(0x19f)](_0x309254(0x10))[_0x5b1783(0x1c0)](_0x226f61=>{const _0x17e890=_0x5b1783,_0x5c8fd1=new Set();_0x226f61[_0x17e890(0x1a4)](_0x3bf874=>{const _0x3948b1=_0x17e890;switch(_0x3bf874[_0x3948b1(0x1cc)]){case _0x3948b1(0x180):{const _0x5cad9e=_0x3bf874[_0x3948b1(0x176)]['personId'];_0x5c8fd1[_0x3948b1(0x180)](_0x5cad9e);break;}}}),B(this[_0x17e890(0x1d8)],_0x5c8fd1);}));}[_0x538291(0x195)](){const _0x173566=_0x538291;this[_0x173566(0x17d)](this[_0x173566(0x186)][_0x173566(0x179)]['subscribe'](async _0x3757a8=>{const _0x2a4326=_0x173566;var _0x1079f0,_0x513fcb,_0x399fd0,_0x1b41a4;const _0x261fc5=(_0x1079f0=this[_0x2a4326(0x185)]['getUnit'](_0x3757a8[_0x2a4326(0x1cf)])[_0x2a4326(0x177)](_0x52efdf=>_0x52efdf[_0x2a4326(0x18c)]===_0x3757a8['threadId']))==null?void 0x0:_0x1079f0[_0x2a4326(0x182)];if(!_0x261fc5)return;const {unitId:_0x49e7b2,subUnitId:_0x48f14f}=_0x261fc5;switch(_0x3757a8[_0x2a4326(0x1b0)]&&this[_0x2a4326(0x17e)]['addUser'](_0x3757a8['user']),_0x3757a8[_0x2a4326(0x1cc)]){case v[_0x2a4326(0x188)]:break;case v['Reply']:{this[_0x2a4326(0x185)][_0x2a4326(0x1ce)](_0x49e7b2,_0x48f14f,{'unitId':_0x49e7b2,'subUnitId':_0x48f14f,'ref':'','id':_0x3757a8[_0x2a4326(0x18b)],'dT':D(+_0x3757a8[_0x2a4326(0x1bf)]),'threadId':_0x3757a8[_0x2a4326(0x18c)],'personId':(_0x399fd0=(_0x513fcb=_0x3757a8[_0x2a4326(0x1b0)])==null?void 0x0:_0x513fcb[_0x2a4326(0x1aa)])!=null?_0x399fd0:_0x3757a8['userId'],'text':JSON[_0x2a4326(0x1c6)](_0x3757a8[_0x2a4326(0x1c4)]),'parentId':_0x261fc5['id']});break;}case v[_0x2a4326(0x18a)]:{const _0x307deb=this[_0x2a4326(0x185)][_0x2a4326(0x183)](_0x49e7b2,_0x48f14f,_0x3757a8[_0x2a4326(0x18b)]);_0x307deb&&_0x307deb[_0x2a4326(0x1ca)]&&this['_threadCommentModel'][_0x2a4326(0x192)](_0x49e7b2,_0x48f14f,_0x3757a8[_0x2a4326(0x18b)]);break;}case v[_0x2a4326(0x1a9)]:{this['_threadCommentModel']['updateComment'](_0x49e7b2,_0x48f14f,{'commentId':_0x3757a8[_0x2a4326(0x18b)],'text':JSON[_0x2a4326(0x1c6)](_0x3757a8[_0x2a4326(0x1c4)])});break;}case v[_0x2a4326(0x1b5)]:{const _0x2cdfcc=(_0x1b41a4=this[_0x2a4326(0x185)]['getUnit'](_0x3757a8[_0x2a4326(0x1cf)])[_0x2a4326(0x177)](_0x2b702f=>_0x2b702f[_0x2a4326(0x18c)]===_0x3757a8['threadId']))==null?void 0x0:_0x1b41a4[_0x2a4326(0x182)];_0x2cdfcc&&this[_0x2a4326(0x185)][_0x2a4326(0x1a0)](_0x49e7b2,_0x48f14f,_0x2cdfcc['id'],_0x3757a8[_0x2a4326(0x1a6)]===I[_0x2a4326(0x1b9)]);break;}}}));}};S=V([p(0x0,_0x329691(_0x1c15ac)),p(0x1,_0x329691(_0x2ef6b5)),p(0x2,_0x329691(_0x28089d)),p(0x3,_0x329691(_0x516ead))],S);const z=_0x538291(0x184),M={};var k=Object[_0x538291(0x1b3)],Q=(_0x1f2b4f,_0xff8fc8,_0x5a0dc2,_0x53a9f5)=>{const _0x2b98ba=_0x538291;for(var _0x3cb3d4=_0x53a9f5>0x1?void 0x0:_0x53a9f5?k(_0xff8fc8,_0x5a0dc2):_0xff8fc8,_0x301514=_0x1f2b4f[_0x2b98ba(0x1ba)]-0x1,_0x358680;_0x301514>=0x0;_0x301514--)(_0x358680=_0x1f2b4f[_0x301514])&&(_0x3cb3d4=_0x358680(_0x3cb3d4)||_0x3cb3d4);return _0x3cb3d4;},_=(_0x119234,_0xcaf1f8)=>(_0x51066f,_0x1df5fc)=>_0xcaf1f8(_0x51066f,_0x1df5fc,_0x119234);function X(_0x520b7b,_0x2672bc){const _0x551ea5=_0x538291,_0x15cf3a=_0x520b7b[_0x551ea5(0x19e)][0x0];return{..._0x2672bc,'id':_0x15cf3a[_0x551ea5(0x18b)],'resolved':_0x520b7b[_0x551ea5(0x1a6)]===0x1,'dT':D(_0x15cf3a['createTimestamp']),'personId':_0x15cf3a['userId'],'threadId':_0x15cf3a['threadId']};}function ee(_0x8d6b51,_0x3cc82a,_0x3f9fb2){const _0x8fc40a=_0x538291;var _0x53dce2,_0x1d1ac1;if(((_0x1d1ac1=(_0x53dce2=_0x8d6b51==null?void 0x0:_0x8d6b51[_0x8fc40a(0x19e)])==null?void 0x0:_0x53dce2[_0x8fc40a(0x1ba)])!=null?_0x1d1ac1:0x0)>0x0){const _0x5c8fe1=(_0xeed7d0,_0x325a62)=>({'id':_0xeed7d0[_0x8fc40a(0x18b)],'threadId':_0xeed7d0[_0x8fc40a(0x18c)],'dT':D(_0xeed7d0['createTimestamp']),'personId':_0xeed7d0[_0x8fc40a(0x1d5)],'resolved':_0x8d6b51[_0x8fc40a(0x1a6)]===I[_0x8fc40a(0x1b9)],'unitId':_0x3cc82a,'subUnitId':_0x3f9fb2,'text':JSON[_0x8fc40a(0x1c6)](_0xeed7d0[_0x8fc40a(0x1c4)]),'parentId':_0x325a62}),_0x897949=_0x5c8fe1(_0x8d6b51['replies'][0x0]);return{..._0x897949,'children':_0x8d6b51[_0x8fc40a(0x19e)]['slice'](0x1)[_0x8fc40a(0x1c5)](_0x36de77=>_0x5c8fe1(_0x36de77,_0x897949['id']))};}return null;}let f=class{constructor(_0x36d7d3,_0x236f7c,_0x2729ce,_0x307b9b){const _0x16593c=_0x538291;this[_0x16593c(0x1a8)]=_0x36d7d3,this[_0x16593c(0x17e)]=_0x236f7c,this[_0x16593c(0x1a7)]=_0x2729ce,this[_0x16593c(0x1d8)]=_0x307b9b;}async[_0x538291(0x1ce)](_0x9d1832){const _0x45c7d8=_0x538291;var _0x4e0ed1,_0x99d1f2;const {parentId:_0x21c98f,unitId:_0x1ad9ab,text:_0x3ba24f,threadId:_0x10bea4}=_0x9d1832,_0x1aa727=(_0x99d1f2=(_0x4e0ed1=_0x3ba24f['customRanges'])==null?void 0x0:_0x4e0ed1[_0x45c7d8(0x1cd)](_0x5c4fe1=>_0x5c4fe1['rangeType']===_0x29ac7f[_0x45c7d8(0x1d7)])[_0x45c7d8(0x1c5)](_0x23631a=>_0x23631a[_0x45c7d8(0x173)]))!=null?_0x99d1f2:[],_0x2eaa3a=JSON[_0x45c7d8(0x175)](_0x3ba24f),_0x41fe6b=(await this[_0x45c7d8(0x1a7)][_0x45c7d8(0x18e)](_0x1ad9ab))[_0x45c7d8(0x19a)]();if(_0x21c98f){const _0x484fa8={'memberId':_0x41fe6b,'unitId':_0x1ad9ab,'content':_0x2eaa3a,'mention':_0x1aa727,'threadId':_0x10bea4},_0x35b2e2=(await this[_0x45c7d8(0x1a8)][_0x45c7d8(0x18f)](_0x45c7d8(0x1bd)+_0x1ad9ab+'/reply',{'body':_0x484fa8}))[_0x45c7d8(0x1d1)][_0x45c7d8(0x1b1)];return{..._0x9d1832,'id':_0x35b2e2[_0x45c7d8(0x18b)],'dT':_0x2fc50a(+_0x35b2e2[_0x45c7d8(0x1bf)])[_0x45c7d8(0x1d9)](_0x45c7d8(0x1a2)),'personId':_0x35b2e2[_0x45c7d8(0x1d5)]};}else{const _0x34bbfd={'memberId':_0x41fe6b,'unitId':_0x1ad9ab,'content':_0x2eaa3a,'mention':_0x1aa727},_0x565a61=await this[_0x45c7d8(0x1a8)][_0x45c7d8(0x18f)](_0x45c7d8(0x1bd)+_0x1ad9ab+_0x45c7d8(0x181),{'body':_0x34bbfd});return X(_0x565a61['body'][_0x45c7d8(0x1c7)],_0x9d1832);}}async[_0x538291(0x1c9)](_0x58d82b){const _0x4577ab=_0x538291;var _0x11da9a,_0x3dd819;const {text:_0x5f5a75,unitId:_0x8b3d30}=_0x58d82b,_0x24030d=(_0x3dd819=(_0x11da9a=_0x5f5a75[_0x4577ab(0x1c2)])==null?void 0x0:_0x11da9a[_0x4577ab(0x1cd)](_0x44a8dd=>_0x44a8dd[_0x4577ab(0x187)]===_0x29ac7f[_0x4577ab(0x1d7)])['map'](_0x328309=>_0x328309[_0x4577ab(0x173)]))!=null?_0x3dd819:[],_0x19cb58=JSON[_0x4577ab(0x175)](_0x5f5a75),_0xf76dbd=_0x58d82b['threadId'],_0x2cabc9=_0x58d82b['id'],_0x38828a={'memberId':(await this[_0x4577ab(0x1a7)][_0x4577ab(0x18e)](_0x8b3d30))[_0x4577ab(0x19a)](),'unitId':_0x8b3d30,'threadId':_0xf76dbd,'mention':_0x24030d,'content':_0x19cb58,'replyId':_0x2cabc9},_0x1b206c=await this[_0x4577ab(0x1a8)][_0x4577ab(0x18f)](_0x4577ab(0x1bd)+_0x8b3d30+_0x4577ab(0x19b),{'body':_0x38828a});return!_0x1b206c['body'][_0x4577ab(0x17f)]||_0x1b206c[_0x4577ab(0x1d1)][_0x4577ab(0x17f)]['code']===0x1;}async[_0x538291(0x1a0)](_0x11ce62){const _0x1d8a7b=_0x538291,{unitId:_0x345cac}=_0x11ce62,_0x1a5921=_0x11ce62['threadId'],_0x22bb61={'memberId':this[_0x1d8a7b(0x17e)][_0x1d8a7b(0x1a1)]()[_0x1d8a7b(0x1aa)],'unitId':_0x345cac,'threadId':_0x1a5921,'solved':_0x11ce62[_0x1d8a7b(0x1ab)]?I[_0x1d8a7b(0x1b9)]:I['OpenOrReOpen']},_0x4eea7f=await this['_httpService'][_0x1d8a7b(0x18f)]('/universer-api/comment/unit/'+_0x345cac+_0x1d8a7b(0x1d4),{'body':_0x22bb61});return!_0x4eea7f[_0x1d8a7b(0x1d1)][_0x1d8a7b(0x17f)]||_0x4eea7f['body'][_0x1d8a7b(0x17f)]['code']===0x1;}async[_0x538291(0x192)](_0x468974,_0x529428,_0x2624b8,_0xe6714){const _0x42526d=_0x538291,_0x3f4001={'memberId':(await this[_0x42526d(0x1a7)][_0x42526d(0x18e)](_0x468974))[_0x42526d(0x19a)](),'threadId':_0x2624b8,'replyId':_0xe6714,'unitId':_0x468974},_0x3cb96d=await this[_0x42526d(0x1a8)][_0x42526d(0x18f)](_0x42526d(0x1bd)+_0x468974+_0x42526d(0x1d2),{'body':_0x3f4001});return!_0x3cb96d['body'][_0x42526d(0x17f)]||_0x3cb96d['body']['error'][_0x42526d(0x198)]===0x1;}async['listComments'](_0x48c972,_0x14d79c,_0x5cbcc4){const _0x513782=_0x538291,_0x3e9161={'unitId':_0x48c972,'threadId':_0x5cbcc4},_0x155762=await this['_httpService'][_0x513782(0x18f)](_0x513782(0x1bd)+_0x48c972+'/list',{'body':_0x3e9161}),_0x5791ea=_0x5cbcc4[_0x513782(0x1c5)](_0x5d076c=>ee(_0x155762[_0x513782(0x1d1)][_0x513782(0x1c3)][_0x5d076c],_0x48c972,_0x14d79c))['filter'](Boolean);return Object[_0x513782(0x17a)](_0x155762[_0x513782(0x1d1)][_0x513782(0x19d)])[_0x513782(0x1a4)](_0x3d79ab=>{const _0x2b7ee8=_0x513782;this[_0x2b7ee8(0x17e)]['addUser'](_0x3d79ab);}),_0x5791ea;}[_0x538291(0x199)](_0x1e5a2d){const _0x44e406=_0x538291;return{'id':_0x1e5a2d['id'],'threadId':_0x1e5a2d[_0x44e406(0x18c)],'ref':_0x1e5a2d[_0x44e406(0x194)]};}};f=Q([_(0x0,_0x329691(_0x3ec942)),_(0x1,_0x329691(_0x28089d)),_(0x2,_0x329691(_0x190768)),_(0x3,_0x329691(_0x516ead))],f);var re=Object[_0x538291(0x1b3)],te=(_0x8041a6,_0xb50ba1,_0x1249f5,_0x27a16f)=>{const _0x180695=_0x538291;for(var _0x5c1b68=_0x27a16f>0x1?void 0x0:_0x27a16f?re(_0xb50ba1,_0x1249f5):_0xb50ba1,_0x52f524=_0x8041a6[_0x180695(0x1ba)]-0x1,_0x2c29e6;_0x52f524>=0x0;_0x52f524--)(_0x2c29e6=_0x8041a6[_0x52f524])&&(_0x5c1b68=_0x2c29e6(_0x5c1b68)||_0x5c1b68);return _0x5c1b68;},N=(_0x3ca649,_0x55dcb7)=>(_0x351829,_0x4ea4a2)=>_0x55dcb7(_0x351829,_0x4ea4a2,_0x3ca649);let g=class extends _0x3745f8{constructor(_0x54dfb6,_0x894be5){const _0x18d696=_0x538291;super(),this[_0x18d696(0x1ad)]=_0x54dfb6,this['_threadCommentDataSource']=_0x894be5,this[_0x18d696(0x1af)]();}[_0x538291(0x1af)](){const _0x4e5d2f=_0x538291;this['_threadCommentDataSourceService'][_0x4e5d2f(0x178)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x4e5d2f(0x1b8)]=!0x1;}};g=te([N(0x0,_0x3a072d),N(0x1,_0x329691(f))],g);var se=Object[_0x538291(0x17c)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1270e6,_0x9d2c40,_0x4ee5b5)=>_0x9d2c40 in _0x1270e6?se(_0x1270e6,_0x9d2c40,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4ee5b5}):_0x1270e6[_0x9d2c40]=_0x4ee5b5,ie=(_0x48c929,_0x408c92,_0x137a77,_0x291fdc)=>{const _0x3383cd=_0x538291;for(var _0x572b0a=_0x291fdc>0x1?void 0x0:_0x291fdc?oe(_0x408c92,_0x137a77):_0x408c92,_0x4d7c1c=_0x48c929[_0x3383cd(0x1ba)]-0x1,_0x406a04;_0x4d7c1c>=0x0;_0x4d7c1c--)(_0x406a04=_0x48c929[_0x4d7c1c])&&(_0x572b0a=_0x406a04(_0x572b0a)||_0x572b0a);return _0x572b0a;},w=(_0x5d543c,_0x40fa1b)=>(_0x3950f9,_0x1040ef)=>_0x40fa1b(_0x3950f9,_0x1040ef,_0x5d543c),$=(_0xc4b4f4,_0x2d6c68,_0xa676de)=>ne(_0xc4b4f4,typeof _0x2d6c68!=_0x538291(0x1be)?_0x2d6c68+'':_0x2d6c68,_0xa676de);let b=class extends _0x41684c{constructor(_0x3e48fc=M,_0x32d75d,_0x31acf9){const _0x192ce9=_0x538291;super(),this['_config']=_0x3e48fc,this[_0x192ce9(0x1d8)]=_0x32d75d,this[_0x192ce9(0x191)]=_0x31acf9;const {..._0x3a9ee7}=_0x4b727e({},M,this[_0x192ce9(0x19c)]);this[_0x192ce9(0x191)][_0x192ce9(0x196)](z,_0x3a9ee7);}['onStarting'](){const _0x5318cd=_0x538291;[[f],[g],[S]][_0x5318cd(0x1a4)](_0x38800f=>{const _0x14054d=_0x5318cd;this[_0x14054d(0x1d8)]['add'](_0x38800f);});}[_0x538291(0x1cb)](){const _0x586434=_0x538291;this[_0x586434(0x1d8)][_0x586434(0x174)](g),this[_0x586434(0x1d8)][_0x586434(0x174)](S);}};$(b,_0x538291(0x1d0),W),$(b,'type',_0x369264['UNIVER_UNKNOWN']),b=ie([_0x322c5e(_0x7ab6ad,_0x38e298,_0x15d46a),w(0x1,_0x329691(_0x516ead)),w(0x2,_0x387356)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x32593b=_0x51fd;(function(_0x59556a,_0x213cce){const _0x290389=_0x51fd,_0x437077=_0x59556a();while(!![]){try{const _0x307ce9=-parseInt(_0x290389(0x22f))/0x1+parseInt(_0x290389(0x1f2))/0x2+-parseInt(_0x290389(0x1fd))/0x3+parseInt(_0x290389(0x251))/0x4+-parseInt(_0x290389(0x23e))/0x5+parseInt(_0x290389(0x215))/0x6*(parseInt(_0x290389(0x245))/0x7)+parseInt(_0x290389(0x21b))/0x8;if(_0x307ce9===_0x213cce)break;else _0x437077['push'](_0x437077['shift']());}catch(_0x1c2812){_0x437077['push'](_0x437077['shift']());}}}(_0x3725,0x4d5e9));import{CommentService as _0x3b45f0,CollaborationSessionService as _0x197a37,UniverCollaborationClientPlugin as _0x182658}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3592f4}from'@univerjs-pro/license';import{dayjs as _0x255919,UserManagerService as _0x43f749,Inject as _0x9b5830,Injector as _0x57c758,Disposable as _0x136e8f,CustomRangeType as _0x49f0f2,UniverInstanceType as _0x34926c,DependentOn as _0x44d782,IConfigService as _0x46444d,Plugin as _0x4332cb,merge as _0x2aa03e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xea9a1}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2927dc,IThreadCommentDataSourceService as _0x49413f}from'@univerjs/thread-comment';import{bufferTime as _0x14c0b1}from'rxjs';import{HTTPService as _0x5af417}from'@univerjs/network';const W=_0x32593b(0x231);var I=(_0x22bc7d=>(_0x22bc7d[_0x22bc7d[_0x32593b(0x227)]=0x0]=_0x32593b(0x227),_0x22bc7d[_0x22bc7d[_0x32593b(0x212)]=0x1]='Solved',_0x22bc7d[_0x22bc7d['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x22bc7d))(I||{}),v=(_0x2a8bc9=>(_0x2a8bc9[_0x2a8bc9[_0x32593b(0x249)]=0x0]=_0x32593b(0x249),_0x2a8bc9[_0x2a8bc9[_0x32593b(0x22d)]=0x1]='Add',_0x2a8bc9[_0x2a8bc9[_0x32593b(0x23a)]=0x2]=_0x32593b(0x23a),_0x2a8bc9[_0x2a8bc9[_0x32593b(0x228)]=0x3]=_0x32593b(0x228),_0x2a8bc9[_0x2a8bc9[_0x32593b(0x24f)]=0x4]=_0x32593b(0x24f),_0x2a8bc9[_0x2a8bc9[_0x32593b(0x214)]=0x5]='Solve',_0x2a8bc9[_0x2a8bc9[_0x32593b(0x20b)]=-0x1]=_0x32593b(0x20b),_0x2a8bc9))(v||{});const D=_0x17c914=>_0x255919(new Date(+_0x17c914))[_0x32593b(0x209)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x380532,_0x32ceff)=>{const _0x1e2646=_0x32593b,_0x97741c=_0x380532[_0x1e2646(0x254)](_0x43f749),_0x1b563b=_0x380532[_0x1e2646(0x254)](_0x5af417);_0x32ceff[_0x1e2646(0x236)](_0x488096=>{const _0x570972=_0x1e2646;_0x97741c[_0x570972(0x1fc)](_0x488096)&&_0x32ceff[_0x570972(0x234)](_0x488096);}),_0x32ceff[_0x1e2646(0x23d)]&&(await _0x1b563b['get'](_0x1e2646(0x20a),{'params':{'userIDs':[..._0x32ceff]}}))[_0x1e2646(0x20f)]['users'][_0x1e2646(0x236)](_0x27270e=>{const _0x30b19a=_0x1e2646;_0x27270e&&_0x97741c[_0x30b19a(0x253)](_0x27270e);});};var K=Object[_0x32593b(0x216)],V=(_0x1c2360,_0x54a8d6,_0x57aa88,_0x4f1f5c)=>{for(var _0x28251d=_0x4f1f5c>0x1?void 0x0:_0x4f1f5c?K(_0x54a8d6,_0x57aa88):_0x54a8d6,_0x339191=_0x1c2360['length']-0x1,_0x3c6e4c;_0x339191>=0x0;_0x339191--)(_0x3c6e4c=_0x1c2360[_0x339191])&&(_0x28251d=_0x3c6e4c(_0x28251d)||_0x28251d);return _0x28251d;},p=(_0x6a970d,_0x463f6f)=>(_0xb43242,_0x5d22bc)=>_0x463f6f(_0xb43242,_0x5d22bc,_0x6a970d);let S=class extends _0x136e8f{constructor(_0x2e455,_0x34bf1b,_0x531665,_0x2b23fe){const _0x272032=_0x32593b;super(),this[_0x272032(0x205)]=_0x2e455,this[_0x272032(0x224)]=_0x34bf1b,this[_0x272032(0x238)]=_0x531665,this[_0x272032(0x252)]=_0x2b23fe,this[_0x272032(0x1f6)](),this[_0x272032(0x206)]();}[_0x32593b(0x206)](){const _0x29804b=_0x32593b;this[_0x29804b(0x201)](this['_threadCommentModel'][_0x29804b(0x24e)][_0x29804b(0x244)](_0x14c0b1(0x10))[_0x29804b(0x21a)](_0x345ba8=>{const _0x39fc88=_0x29804b,_0x4425b4=new Set();_0x345ba8[_0x39fc88(0x236)](_0x5be4d5=>{const _0x5db378=_0x39fc88;switch(_0x5be4d5[_0x5db378(0x218)]){case _0x5db378(0x220):{const _0x4d2234=_0x5be4d5[_0x5db378(0x24d)][_0x5db378(0x24b)];_0x4425b4[_0x5db378(0x220)](_0x4d2234);break;}}}),B(this[_0x39fc88(0x252)],_0x4425b4);}));}[_0x32593b(0x1f6)](){const _0x416e53=_0x32593b;this[_0x416e53(0x201)](this['_commentService'][_0x416e53(0x24e)]['subscribe'](async _0xbfeb65=>{const _0x1cf9a0=_0x416e53;var _0x58c403,_0x45b09,_0xccaf01,_0x63a4a;const _0x153dbe=(_0x58c403=this[_0x1cf9a0(0x224)][_0x1cf9a0(0x21d)](_0xbfeb65[_0x1cf9a0(0x200)])[_0x1cf9a0(0x222)](_0x34cc77=>_0x34cc77['threadId']===_0xbfeb65[_0x1cf9a0(0x243)]))==null?void 0x0:_0x58c403[_0x1cf9a0(0x213)];if(!_0x153dbe)return;const {unitId:_0x50510d,subUnitId:_0x4552f7}=_0x153dbe;switch(_0xbfeb65[_0x1cf9a0(0x242)]&&this['_userService'][_0x1cf9a0(0x253)](_0xbfeb65['user']),_0xbfeb65[_0x1cf9a0(0x218)]){case v[_0x1cf9a0(0x22d)]:break;case v[_0x1cf9a0(0x23a)]:{this[_0x1cf9a0(0x224)][_0x1cf9a0(0x1fb)](_0x50510d,_0x4552f7,{'unitId':_0x50510d,'subUnitId':_0x4552f7,'ref':'','id':_0xbfeb65[_0x1cf9a0(0x240)],'dT':D(+_0xbfeb65[_0x1cf9a0(0x233)]),'threadId':_0xbfeb65['threadId'],'personId':(_0xccaf01=(_0x45b09=_0xbfeb65[_0x1cf9a0(0x242)])==null?void 0x0:_0x45b09['userID'])!=null?_0xccaf01:_0xbfeb65['userId'],'text':JSON[_0x1cf9a0(0x230)](_0xbfeb65[_0x1cf9a0(0x223)]),'parentId':_0x153dbe['id']});break;}case v['Delete']:{const _0x5599c1=this[_0x1cf9a0(0x224)]['getComment'](_0x50510d,_0x4552f7,_0xbfeb65[_0x1cf9a0(0x240)]);_0x5599c1&&_0x5599c1[_0x1cf9a0(0x20d)]&&this['_threadCommentModel'][_0x1cf9a0(0x1f4)](_0x50510d,_0x4552f7,_0xbfeb65[_0x1cf9a0(0x240)]);break;}case v[_0x1cf9a0(0x228)]:{this[_0x1cf9a0(0x224)]['updateComment'](_0x50510d,_0x4552f7,{'commentId':_0xbfeb65[_0x1cf9a0(0x240)],'text':JSON[_0x1cf9a0(0x230)](_0xbfeb65[_0x1cf9a0(0x223)])});break;}case v[_0x1cf9a0(0x214)]:{const _0x5ca788=(_0x63a4a=this[_0x1cf9a0(0x224)][_0x1cf9a0(0x21d)](_0xbfeb65['unitId'])[_0x1cf9a0(0x222)](_0x21e169=>_0x21e169[_0x1cf9a0(0x243)]===_0xbfeb65[_0x1cf9a0(0x243)]))==null?void 0x0:_0x63a4a[_0x1cf9a0(0x213)];_0x5ca788&&this[_0x1cf9a0(0x224)]['resolveComment'](_0x50510d,_0x4552f7,_0x5ca788['id'],_0xbfeb65[_0x1cf9a0(0x22a)]===I[_0x1cf9a0(0x212)]);break;}}}));}};S=V([p(0x0,_0x9b5830(_0x3b45f0)),p(0x1,_0x9b5830(_0x2927dc)),p(0x2,_0x9b5830(_0x43f749)),p(0x3,_0x9b5830(_0x57c758))],S);const z=_0x32593b(0x239),M={};var k=Object[_0x32593b(0x216)],Q=(_0x441207,_0x35647d,_0x5644f9,_0x2e9c15)=>{for(var _0x1bdebe=_0x2e9c15>0x1?void 0x0:_0x2e9c15?k(_0x35647d,_0x5644f9):_0x35647d,_0xedc7a6=_0x441207['length']-0x1,_0x87c2c4;_0xedc7a6>=0x0;_0xedc7a6--)(_0x87c2c4=_0x441207[_0xedc7a6])&&(_0x1bdebe=_0x87c2c4(_0x1bdebe)||_0x1bdebe);return _0x1bdebe;},_=(_0x38dbe1,_0x5c61db)=>(_0x20721d,_0x1cd919)=>_0x5c61db(_0x20721d,_0x1cd919,_0x38dbe1);function X(_0x20f192,_0x1d3a33){const _0x3abfb5=_0x32593b,_0x1613a2=_0x20f192['replies'][0x0];return{..._0x1d3a33,'id':_0x1613a2[_0x3abfb5(0x240)],'resolved':_0x20f192['solved']===0x1,'dT':D(_0x1613a2['createTimestamp']),'personId':_0x1613a2[_0x3abfb5(0x208)],'threadId':_0x1613a2[_0x3abfb5(0x243)]};}function ee(_0x5cbf13,_0xb12159,_0x3af956){const _0x4c3d03=_0x32593b;var _0x5732c3,_0x2c9ee9;if(((_0x2c9ee9=(_0x5732c3=_0x5cbf13==null?void 0x0:_0x5cbf13[_0x4c3d03(0x241)])==null?void 0x0:_0x5732c3[_0x4c3d03(0x248)])!=null?_0x2c9ee9:0x0)>0x0){const _0x81b62f=(_0x260e4b,_0x1c37f0)=>({'id':_0x260e4b[_0x4c3d03(0x240)],'threadId':_0x260e4b['threadId'],'dT':D(_0x260e4b[_0x4c3d03(0x233)]),'personId':_0x260e4b['userId'],'resolved':_0x5cbf13[_0x4c3d03(0x22a)]===I[_0x4c3d03(0x212)],'unitId':_0xb12159,'subUnitId':_0x3af956,'text':JSON[_0x4c3d03(0x230)](_0x260e4b[_0x4c3d03(0x223)]),'parentId':_0x1c37f0}),_0x2aa118=_0x81b62f(_0x5cbf13[_0x4c3d03(0x241)][0x0]);return{..._0x2aa118,'children':_0x5cbf13[_0x4c3d03(0x241)][_0x4c3d03(0x1f9)](0x1)[_0x4c3d03(0x21c)](_0x21ce8b=>_0x81b62f(_0x21ce8b,_0x2aa118['id']))};}return null;}let f=class{constructor(_0x5649fe,_0x45d19d,_0x24f100,_0x5ca544){const _0x26223d=_0x32593b;this[_0x26223d(0x203)]=_0x5649fe,this[_0x26223d(0x238)]=_0x45d19d,this[_0x26223d(0x22c)]=_0x24f100,this[_0x26223d(0x252)]=_0x5ca544;}async['addComment'](_0xda541f){const _0x2c0383=_0x32593b;var _0x39be13,_0x5effbd;const {parentId:_0xa7b38d,unitId:_0x708db6,text:_0x1eb77a,threadId:_0x54d336}=_0xda541f,_0x3782d7=(_0x5effbd=(_0x39be13=_0x1eb77a[_0x2c0383(0x1fe)])==null?void 0x0:_0x39be13['filter'](_0x4c4f83=>_0x4c4f83[_0x2c0383(0x20c)]===_0x49f0f2[_0x2c0383(0x229)])[_0x2c0383(0x21c)](_0x30424d=>_0x30424d[_0x2c0383(0x1f8)]))!=null?_0x5effbd:[],_0x350802=JSON['stringify'](_0x1eb77a),_0x543b9f=(await this[_0x2c0383(0x22c)]['requireSession'](_0x708db6))[_0x2c0383(0x1f3)]();if(_0xa7b38d){const _0x1bd899={'memberId':_0x543b9f,'unitId':_0x708db6,'content':_0x350802,'mention':_0x3782d7,'threadId':_0x54d336},_0xec6ee8=(await this[_0x2c0383(0x203)][_0x2c0383(0x1f5)](_0x2c0383(0x22b)+_0x708db6+_0x2c0383(0x237),{'body':_0x1bd899}))[_0x2c0383(0x20f)]['reply'];return{..._0xda541f,'id':_0xec6ee8[_0x2c0383(0x240)],'dT':_0x255919(+_0xec6ee8[_0x2c0383(0x233)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0xec6ee8[_0x2c0383(0x208)]};}else{const _0xe5a528={'memberId':_0x543b9f,'unitId':_0x708db6,'content':_0x350802,'mention':_0x3782d7},_0x19485b=await this['_httpService'][_0x2c0383(0x1f5)](_0x2c0383(0x22b)+_0x708db6+_0x2c0383(0x217),{'body':_0xe5a528});return X(_0x19485b[_0x2c0383(0x20f)][_0x2c0383(0x221)],_0xda541f);}}async['updateComment'](_0x522fcd){const _0x132034=_0x32593b;var _0x44a055,_0x4b17cd;const {text:_0x1ce70e,unitId:_0x57df11}=_0x522fcd,_0x48a142=(_0x4b17cd=(_0x44a055=_0x1ce70e[_0x132034(0x1fe)])==null?void 0x0:_0x44a055[_0x132034(0x1f7)](_0x3b1956=>_0x3b1956[_0x132034(0x20c)]===_0x49f0f2[_0x132034(0x229)])[_0x132034(0x21c)](_0x253041=>_0x253041[_0x132034(0x1f8)]))!=null?_0x4b17cd:[],_0x2e926d=JSON['stringify'](_0x1ce70e),_0xa2564e=_0x522fcd[_0x132034(0x243)],_0x49f8f9=_0x522fcd['id'],_0x5654e7={'memberId':(await this[_0x132034(0x22c)][_0x132034(0x232)](_0x57df11))[_0x132034(0x1f3)](),'unitId':_0x57df11,'threadId':_0xa2564e,'mention':_0x48a142,'content':_0x2e926d,'replyId':_0x49f8f9},_0x372dca=await this['_httpService']['post'](_0x132034(0x22b)+_0x57df11+_0x132034(0x24c),{'body':_0x5654e7});return!_0x372dca[_0x132034(0x20f)][_0x132034(0x21e)]||_0x372dca[_0x132034(0x20f)]['error']['code']===0x1;}async['resolveComment'](_0x42f97b){const _0x3d2006=_0x32593b,{unitId:_0x2e3279}=_0x42f97b,_0x351c9c=_0x42f97b[_0x3d2006(0x243)],_0xe382b5={'memberId':this[_0x3d2006(0x238)][_0x3d2006(0x23f)]()[_0x3d2006(0x23c)],'unitId':_0x2e3279,'threadId':_0x351c9c,'solved':_0x42f97b['resolved']?I[_0x3d2006(0x212)]:I[_0x3d2006(0x227)]},_0x15daf5=await this['_httpService']['post'](_0x3d2006(0x22b)+_0x2e3279+_0x3d2006(0x20e),{'body':_0xe382b5});return!_0x15daf5[_0x3d2006(0x20f)][_0x3d2006(0x21e)]||_0x15daf5['body'][_0x3d2006(0x21e)]['code']===0x1;}async['deleteComment'](_0x2f9b23,_0x1fa5a9,_0x10131e,_0x380a9e){const _0x4f8190=_0x32593b,_0x5c3ebe={'memberId':(await this[_0x4f8190(0x22c)][_0x4f8190(0x232)](_0x2f9b23))[_0x4f8190(0x1f3)](),'threadId':_0x10131e,'replyId':_0x380a9e,'unitId':_0x2f9b23},_0x15a431=await this[_0x4f8190(0x203)][_0x4f8190(0x1f5)](_0x4f8190(0x22b)+_0x2f9b23+_0x4f8190(0x1fa),{'body':_0x5c3ebe});return!_0x15a431[_0x4f8190(0x20f)][_0x4f8190(0x21e)]||_0x15a431['body'][_0x4f8190(0x21e)]['code']===0x1;}async[_0x32593b(0x235)](_0x2d56a6,_0x160fd3,_0x139651){const _0x3dfaea=_0x32593b,_0x160338={'unitId':_0x2d56a6,'threadId':_0x139651},_0x1bdfed=await this[_0x3dfaea(0x203)][_0x3dfaea(0x1f5)](_0x3dfaea(0x22b)+_0x2d56a6+_0x3dfaea(0x247),{'body':_0x160338}),_0x36079b=_0x139651[_0x3dfaea(0x21c)](_0x4e6117=>ee(_0x1bdfed['body'][_0x3dfaea(0x23b)][_0x4e6117],_0x2d56a6,_0x160fd3))[_0x3dfaea(0x1f7)](Boolean);return Object['values'](_0x1bdfed[_0x3dfaea(0x20f)][_0x3dfaea(0x219)])[_0x3dfaea(0x236)](_0x5c508c=>{const _0x5142b1=_0x3dfaea;this[_0x5142b1(0x238)]['addUser'](_0x5c508c);}),_0x36079b;}['saveCommentToSnapshot'](_0x379471){const _0xe40a1b=_0x32593b;return{'id':_0x379471['id'],'threadId':_0x379471[_0xe40a1b(0x243)],'ref':_0x379471['ref']};}};f=Q([_(0x0,_0x9b5830(_0x5af417)),_(0x1,_0x9b5830(_0x43f749)),_(0x2,_0x9b5830(_0x197a37)),_(0x3,_0x9b5830(_0x57c758))],f);function _0x51fd(_0x73eb84,_0x4da1fb){const _0x3725c3=_0x3725();return _0x51fd=function(_0x51fd1b,_0x15c1c6){_0x51fd1b=_0x51fd1b-0x1f2;let _0x276321=_0x3725c3[_0x51fd1b];return _0x276321;},_0x51fd(_0x73eb84,_0x4da1fb);}var re=Object['getOwnPropertyDescriptor'],te=(_0x3e59ae,_0x1db0a4,_0x5cfe78,_0x3b14f7)=>{const _0x43997f=_0x32593b;for(var _0x43fdac=_0x3b14f7>0x1?void 0x0:_0x3b14f7?re(_0x1db0a4,_0x5cfe78):_0x1db0a4,_0x19760a=_0x3e59ae[_0x43997f(0x248)]-0x1,_0x266302;_0x19760a>=0x0;_0x19760a--)(_0x266302=_0x3e59ae[_0x19760a])&&(_0x43fdac=_0x266302(_0x43fdac)||_0x43fdac);return _0x43fdac;},N=(_0x4d749b,_0x5a760b)=>(_0xea4c70,_0x2d46ec)=>_0x5a760b(_0xea4c70,_0x2d46ec,_0x4d749b);let g=class extends _0x136e8f{constructor(_0x269df9,_0x3fe1dc){const _0x59bfb6=_0x32593b;super(),this['_threadCommentDataSourceService']=_0x269df9,this[_0x59bfb6(0x1ff)]=_0x3fe1dc,this[_0x59bfb6(0x210)]();}[_0x32593b(0x210)](){const _0x1315d5=_0x32593b;this[_0x1315d5(0x202)][_0x1315d5(0x211)]=this[_0x1315d5(0x1ff)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x49413f),N(0x1,_0x9b5830(f))],g);var se=Object[_0x32593b(0x21f)],oe=Object[_0x32593b(0x216)],ne=(_0x2dbdc4,_0x27d5e7,_0x1bd7b1)=>_0x27d5e7 in _0x2dbdc4?se(_0x2dbdc4,_0x27d5e7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1bd7b1}):_0x2dbdc4[_0x27d5e7]=_0x1bd7b1,ie=(_0x292f9f,_0x2f3d92,_0x19eb8a,_0x204101)=>{const _0x39aa67=_0x32593b;for(var _0x3878f6=_0x204101>0x1?void 0x0:_0x204101?oe(_0x2f3d92,_0x19eb8a):_0x2f3d92,_0x4660e3=_0x292f9f[_0x39aa67(0x248)]-0x1,_0x14b78d;_0x4660e3>=0x0;_0x4660e3--)(_0x14b78d=_0x292f9f[_0x4660e3])&&(_0x3878f6=_0x14b78d(_0x3878f6)||_0x3878f6);return _0x3878f6;},w=(_0x46c5ba,_0x381f8e)=>(_0x508835,_0x25aec6)=>_0x381f8e(_0x508835,_0x25aec6,_0x46c5ba),$=(_0x5c2db0,_0x32d758,_0x481fca)=>ne(_0x5c2db0,typeof _0x32d758!=_0x32593b(0x204)?_0x32d758+'':_0x32d758,_0x481fca);function _0x3725(){const _0xd10164=['Delete','onStarting','2342116CkcUOL','_injector','addUser','get','525676eAFmsL','getMemberID','deleteComment','post','_init','filter','rangeId','slice','/delete','addComment','getUser','1435665PkjsXQ','customRanges','_threadCommentDataSource','unitId','disposeWithMe','_threadCommentDataSourceService','_httpService','symbol','_commentService','_initUserSync','_config','userId','format','/universer-api/user/list','UNRECOGNIZED','rangeType','parentId','/solved','body','_initDataSource','dataSource','Solved','root','Solve','1764YCiPbl','getOwnPropertyDescriptor','/add','type','users','subscribe','3060968CAjsgA','map','getUnit','error','defineProperty','add','comment','find','content','_threadCommentModel','onReady','UNIVER_UNKNOWN','OpenOrReOpen','Edit','COMMENT','solved','/universer-api/comment/unit/','_sessionService','Add','_configService','149484eiySRq','parse','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','requireSession','createTimestamp','delete','listComments','forEach','/reply','_userService','thread-comment-data-source.config','Reply','comments','userID','size','3145710ICPYuK','getCurrentUser','replyId','replies','user','threadId','pipe','8169DWLpUl','pluginName','/list','length','Unknown','setConfig','personId','/edit','payload','commentUpdate$'];_0x3725=function(){return _0xd10164;};return _0x3725();}let b=class extends _0x4332cb{constructor(_0x3dc5cf=M,_0x546445,_0x6b2e7f){const _0xffff0e=_0x32593b;super(),this[_0xffff0e(0x207)]=_0x3dc5cf,this['_injector']=_0x546445,this[_0xffff0e(0x22e)]=_0x6b2e7f;const {..._0x1546e0}=_0x2aa03e({},M,this[_0xffff0e(0x207)]);this[_0xffff0e(0x22e)][_0xffff0e(0x24a)](z,_0x1546e0);}[_0x32593b(0x250)](){const _0x1a7124=_0x32593b;[[f],[g],[S]][_0x1a7124(0x236)](_0x2c8a2e=>{const _0x3533c6=_0x1a7124;this[_0x3533c6(0x252)][_0x3533c6(0x220)](_0x2c8a2e);});}[_0x32593b(0x225)](){const _0xe1971f=_0x32593b;this['_injector']['get'](g),this[_0xe1971f(0x252)][_0xe1971f(0x254)](S);}};$(b,_0x32593b(0x246),W),$(b,_0x32593b(0x218),_0x34926c[_0x32593b(0x226)]),b=ie([_0x44d782(_0xea9a1,_0x182658,_0x3592f4),w(0x1,_0x9b5830(_0x57c758)),w(0x2,_0x46444d)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x511a(){const _0x2eba55=['pipe','type','HTTPService','949860XXOyLp','/add','UserManagerService','UniverNetwork','createTimestamp','UniverProLicense','subscribe','Unknown','filter','replyId','root','_init','personId','Injector','resolveComment','_initUserSync','customRanges','getMemberID','reply','addUser','object','_userService','map','UniverInstanceType','UniverLicensePlugin','@univerjs-pro/collaboration-client','65090xIopcw','_injector','_initDataSource','userId','user','/list','getOwnPropertyDescriptor','comments','error','_threadCommentDataSourceService','Add','24FwAfId','@univerjs/core','rangeId','Inject','parentId','rangeType','addComment','UniverThreadCommentUIPlugin','@univerjs/thread-comment-ui','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','comment','threadId','Disposable','dayjs','payload','220jMakYv','getCurrentUser','/delete','size','432452zbeWyL','rxjs','OpenOrReOpen','disposeWithMe','@univerjs/thread-comment','55786ZaqKdg','UniverCore','onReady','ThreadCommentModel','UniverProThreadCommentDatasource','bufferTime','replies','parse','pluginName','find','code','getUser','thread-comment-data-source.config','add','forEach','CollaborationSessionService','_httpService','Solve','content','UniverThreadComment','Solved','updateComment','toStringTag','YYYY/MM/DD\x20HH:mm','format','UniverProCollaborationClient','Reply','solved','post','CustomRangeType','get','_config','amd','6WLZLDw','24925JgrQxF','Edit','defineProperty','_threadCommentDataSource','requireSession','length','@univerjs/network','2677024HWWJfk','CommentService','deleteComment','resolved','unitId','88839KXsVVN','symbol','_configService','UNIVER_UNKNOWN','@univerjs-pro/license','saveCommentToSnapshot','commentUpdate$','4jsUhHz','/universer-api/comment/unit/','body','Plugin','values','UNRECOGNIZED','userID','UniverThreadCommentDataSourcePlugin','_threadCommentModel','getUnit','listComments','DependentOn','Delete','_sessionService'];_0x511a=function(){return _0x2eba55;};return _0x511a();}function _0x25fe(_0x20a59d,_0x5b0339){const _0x511aa1=_0x511a();return _0x25fe=function(_0x25fe7d,_0x4b795d){_0x25fe7d=_0x25fe7d-0xcf;let _0x348d34=_0x511aa1[_0x25fe7d];return _0x348d34;},_0x25fe(_0x20a59d,_0x5b0339);}(function(_0x4dfa07,_0x3536bc){const _0x5b59d7=_0x25fe,_0x417a86=_0x4dfa07();while(!![]){try{const _0x9b51e3=parseInt(_0x5b59d7(0x108))/0x1+parseInt(_0x5b59d7(0x103))/0x2+parseInt(_0x5b59d7(0x14e))/0x3*(-parseInt(_0x5b59d7(0x13d))/0x4)+-parseInt(_0x5b59d7(0x12a))/0x5*(-parseInt(_0x5b59d7(0x129))/0x6)+parseInt(_0x5b59d7(0x131))/0x7+parseInt(_0x5b59d7(0xef))/0x8*(parseInt(_0x5b59d7(0x136))/0x9)+parseInt(_0x5b59d7(0xe4))/0xa*(-parseInt(_0x5b59d7(0xff))/0xb);if(_0x9b51e3===_0x3536bc)break;else _0x417a86['push'](_0x417a86['shift']());}catch(_0x4da99a){_0x417a86['push'](_0x417a86['shift']());}}}(_0x511a,0x3b242),function(_0x4769a6,_0x3dbadd){const _0x2efb78=_0x25fe;typeof exports==_0x2efb78(0xde)&&typeof module<'u'?_0x3dbadd(exports,require(_0x2efb78(0xe3)),require(_0x2efb78(0x13a)),require(_0x2efb78(0xf0)),require('@univerjs/thread-comment-ui'),require(_0x2efb78(0x107)),require(_0x2efb78(0x104)),require(_0x2efb78(0x130))):typeof define=='function'&&define[_0x2efb78(0x128)]?define(['exports',_0x2efb78(0xe3),'@univerjs-pro/license',_0x2efb78(0xf0),_0x2efb78(0xf7),_0x2efb78(0x107),_0x2efb78(0x104),_0x2efb78(0x130)],_0x3dbadd):(_0x4769a6=typeof globalThis<'u'?globalThis:_0x4769a6||self,_0x3dbadd(_0x4769a6[_0x2efb78(0x10c)]={},_0x4769a6[_0x2efb78(0x121)],_0x4769a6[_0x2efb78(0xcf)],_0x4769a6[_0x2efb78(0x109)],_0x4769a6['UniverThreadCommentUi'],_0x4769a6[_0x2efb78(0x11b)],_0x4769a6[_0x2efb78(0x104)],_0x4769a6[_0x2efb78(0x151)]));}(this,function(_0x24f1da,_0x372d68,_0x538c50,_0x25b392,_0x584479,_0x55314c,_0x38d11b,_0x2c508c){'use strict';const _0x56ddbb=_0x25fe;const _0x2f69d9=_0x56ddbb(0xf9);var _0x3b34bb=(_0x5cfdd5=>(_0x5cfdd5[_0x5cfdd5[_0x56ddbb(0x105)]=0x0]=_0x56ddbb(0x105),_0x5cfdd5[_0x5cfdd5[_0x56ddbb(0x11c)]=0x1]='Solved',_0x5cfdd5[_0x5cfdd5[_0x56ddbb(0x142)]=-0x1]='UNRECOGNIZED',_0x5cfdd5))(_0x3b34bb||{}),_0x1cbc4d=(_0x531341=>(_0x531341[_0x531341['Unknown']=0x0]=_0x56ddbb(0xd1),_0x531341[_0x531341[_0x56ddbb(0xee)]=0x1]=_0x56ddbb(0xee),_0x531341[_0x531341['Reply']=0x2]=_0x56ddbb(0x122),_0x531341[_0x531341[_0x56ddbb(0x12b)]=0x3]='Edit',_0x531341[_0x531341[_0x56ddbb(0x149)]=0x4]=_0x56ddbb(0x149),_0x531341[_0x531341[_0x56ddbb(0x119)]=0x5]=_0x56ddbb(0x119),_0x531341[_0x531341[_0x56ddbb(0x142)]=-0x1]=_0x56ddbb(0x142),_0x531341))(_0x1cbc4d||{});const _0x57307f=_0x3b4753=>_0x25b392[_0x56ddbb(0xfd)](new Date(+_0x3b4753))[_0x56ddbb(0x120)](_0x56ddbb(0x11f)),_0x55fdee=async(_0x50cdd5,_0x57a998)=>{const _0x3e2144=_0x56ddbb,_0x11ad5b=_0x50cdd5[_0x3e2144(0x126)](_0x25b392[_0x3e2144(0x150)]),_0x5712a7=_0x50cdd5[_0x3e2144(0x126)](_0x2c508c[_0x3e2144(0x14d)]);_0x57a998[_0x3e2144(0x116)](_0x596c31=>{const _0x32b74c=_0x3e2144;_0x11ad5b[_0x32b74c(0x113)](_0x596c31)&&_0x57a998['delete'](_0x596c31);}),_0x57a998[_0x3e2144(0x102)]&&(await _0x5712a7[_0x3e2144(0x126)]('/universer-api/user/list',{'params':{'userIDs':[..._0x57a998]}}))[_0x3e2144(0x13f)][_0x3e2144(0xf8)][_0x3e2144(0x116)](_0x5e9be9=>{const _0x11a4cf=_0x3e2144;_0x5e9be9&&_0x11ad5b[_0x11a4cf(0xdd)](_0x5e9be9);});};var _0x4a3493=Object[_0x56ddbb(0xea)],_0x2a24ad=(_0x75b29c,_0x2b07e4,_0x19d179,_0x3b59b7)=>{const _0x1d07e5=_0x56ddbb;for(var _0x34b13f=_0x3b59b7>0x1?void 0x0:_0x3b59b7?_0x4a3493(_0x2b07e4,_0x19d179):_0x2b07e4,_0x40a5e3=_0x75b29c[_0x1d07e5(0x12f)]-0x1,_0x4ff5d5;_0x40a5e3>=0x0;_0x40a5e3--)(_0x4ff5d5=_0x75b29c[_0x40a5e3])&&(_0x34b13f=_0x4ff5d5(_0x34b13f)||_0x34b13f);return _0x34b13f;},_0x888b6e=(_0x2ef694,_0x3a8229)=>(_0x34a205,_0x5b1467)=>_0x3a8229(_0x34a205,_0x5b1467,_0x2ef694);let _0x523feb=class extends _0x25b392[_0x56ddbb(0xfc)]{constructor(_0x169549,_0x14a32e,_0x534b01,_0x5d3656){const _0x21c1d5=_0x56ddbb;super(),this['_commentService']=_0x169549,this[_0x21c1d5(0x145)]=_0x14a32e,this[_0x21c1d5(0xdf)]=_0x534b01,this['_injector']=_0x5d3656,this['_init'](),this['_initUserSync']();}[_0x56ddbb(0xd9)](){const _0x5648f4=_0x56ddbb;this[_0x5648f4(0x106)](this[_0x5648f4(0x145)][_0x5648f4(0x13c)][_0x5648f4(0x14b)](_0x38d11b[_0x5648f4(0x10d)](0x10))[_0x5648f4(0xd0)](_0x1a8d59=>{const _0x4db600=_0x5648f4,_0x2aa8cc=new Set();_0x1a8d59[_0x4db600(0x116)](_0x4c2ec6=>{const _0x2fe55f=_0x4db600;switch(_0x4c2ec6['type']){case _0x2fe55f(0x115):{const _0x45e685=_0x4c2ec6[_0x2fe55f(0xfe)][_0x2fe55f(0xd6)];_0x2aa8cc['add'](_0x45e685);break;}}}),_0x55fdee(this[_0x4db600(0xe5)],_0x2aa8cc);}));}[_0x56ddbb(0xd5)](){const _0x517243=_0x56ddbb;this[_0x517243(0x106)](this['_commentService'][_0x517243(0x13c)][_0x517243(0xd0)](async _0x1c57f9=>{const _0xf0b260=_0x517243;var _0x57dc73,_0x16bffd,_0x4106e9,_0x5a41b0;const _0x337c91=(_0x57dc73=this['_threadCommentModel'][_0xf0b260(0x146)](_0x1c57f9[_0xf0b260(0x135)])[_0xf0b260(0x111)](_0x425c52=>_0x425c52[_0xf0b260(0xfb)]===_0x1c57f9[_0xf0b260(0xfb)]))==null?void 0x0:_0x57dc73[_0xf0b260(0xd4)];if(!_0x337c91)return;const {unitId:_0x28ad31,subUnitId:_0xedaf5c}=_0x337c91;switch(_0x1c57f9[_0xf0b260(0xe8)]&&this[_0xf0b260(0xdf)][_0xf0b260(0xdd)](_0x1c57f9[_0xf0b260(0xe8)]),_0x1c57f9['type']){case _0x1cbc4d[_0xf0b260(0xee)]:break;case _0x1cbc4d[_0xf0b260(0x122)]:{this['_threadCommentModel'][_0xf0b260(0xf5)](_0x28ad31,_0xedaf5c,{'unitId':_0x28ad31,'subUnitId':_0xedaf5c,'ref':'','id':_0x1c57f9[_0xf0b260(0xd3)],'dT':_0x57307f(+_0x1c57f9[_0xf0b260(0x152)]),'threadId':_0x1c57f9[_0xf0b260(0xfb)],'personId':(_0x4106e9=(_0x16bffd=_0x1c57f9[_0xf0b260(0xe8)])==null?void 0x0:_0x16bffd[_0xf0b260(0x143)])!=null?_0x4106e9:_0x1c57f9['userId'],'text':JSON[_0xf0b260(0x10f)](_0x1c57f9['content']),'parentId':_0x337c91['id']});break;}case _0x1cbc4d[_0xf0b260(0x149)]:{const _0x498a8e=this[_0xf0b260(0x145)]['getComment'](_0x28ad31,_0xedaf5c,_0x1c57f9[_0xf0b260(0xd3)]);_0x498a8e&&_0x498a8e[_0xf0b260(0xf3)]&&this['_threadCommentModel'][_0xf0b260(0x133)](_0x28ad31,_0xedaf5c,_0x1c57f9[_0xf0b260(0xd3)]);break;}case _0x1cbc4d[_0xf0b260(0x12b)]:{this[_0xf0b260(0x145)][_0xf0b260(0x11d)](_0x28ad31,_0xedaf5c,{'commentId':_0x1c57f9['replyId'],'text':JSON[_0xf0b260(0x10f)](_0x1c57f9['content'])});break;}case _0x1cbc4d[_0xf0b260(0x119)]:{const _0x298bbf=(_0x5a41b0=this[_0xf0b260(0x145)][_0xf0b260(0x146)](_0x1c57f9['unitId'])[_0xf0b260(0x111)](_0x517e8f=>_0x517e8f['threadId']===_0x1c57f9[_0xf0b260(0xfb)]))==null?void 0x0:_0x5a41b0[_0xf0b260(0xd4)];_0x298bbf&&this[_0xf0b260(0x145)][_0xf0b260(0xd8)](_0x28ad31,_0xedaf5c,_0x298bbf['id'],_0x1c57f9['solved']===_0x3b34bb[_0xf0b260(0x11c)]);break;}}}));}};_0x523feb=_0x2a24ad([_0x888b6e(0x0,_0x25b392[_0x56ddbb(0xf2)](_0x372d68[_0x56ddbb(0x132)])),_0x888b6e(0x1,_0x25b392[_0x56ddbb(0xf2)](_0x55314c[_0x56ddbb(0x10b)])),_0x888b6e(0x2,_0x25b392[_0x56ddbb(0xf2)](_0x25b392[_0x56ddbb(0x150)])),_0x888b6e(0x3,_0x25b392['Inject'](_0x25b392[_0x56ddbb(0xd7)]))],_0x523feb);const _0x540751=_0x56ddbb(0x114),_0x5a9e16={};var _0x40ea32=Object[_0x56ddbb(0xea)],_0x5a21ec=(_0x5d39b4,_0x39afe8,_0x648e76,_0x52f972)=>{for(var _0x403c09=_0x52f972>0x1?void 0x0:_0x52f972?_0x40ea32(_0x39afe8,_0x648e76):_0x39afe8,_0x2dabeb=_0x5d39b4['length']-0x1,_0x34715b;_0x2dabeb>=0x0;_0x2dabeb--)(_0x34715b=_0x5d39b4[_0x2dabeb])&&(_0x403c09=_0x34715b(_0x403c09)||_0x403c09);return _0x403c09;},_0x380a4f=(_0x59822c,_0x5e270d)=>(_0x1895d7,_0x31c988)=>_0x5e270d(_0x1895d7,_0x31c988,_0x59822c);function _0x4a9c8f(_0x3fd72a,_0x14837c){const _0x67b6bc=_0x56ddbb,_0x285078=_0x3fd72a['replies'][0x0];return{..._0x14837c,'id':_0x285078['replyId'],'resolved':_0x3fd72a[_0x67b6bc(0x123)]===0x1,'dT':_0x57307f(_0x285078[_0x67b6bc(0x152)]),'personId':_0x285078['userId'],'threadId':_0x285078['threadId']};}function _0x1bf24b(_0x4b2b5b,_0x2ff0c8,_0xb6ca2f){const _0x1576d9=_0x56ddbb;var _0x56af50,_0xc5c06;if(((_0xc5c06=(_0x56af50=_0x4b2b5b==null?void 0x0:_0x4b2b5b[_0x1576d9(0x10e)])==null?void 0x0:_0x56af50[_0x1576d9(0x12f)])!=null?_0xc5c06:0x0)>0x0){const _0x597d35=(_0x24b955,_0x5ccd67)=>({'id':_0x24b955['replyId'],'threadId':_0x24b955[_0x1576d9(0xfb)],'dT':_0x57307f(_0x24b955[_0x1576d9(0x152)]),'personId':_0x24b955[_0x1576d9(0xe7)],'resolved':_0x4b2b5b['solved']===_0x3b34bb['Solved'],'unitId':_0x2ff0c8,'subUnitId':_0xb6ca2f,'text':JSON['parse'](_0x24b955[_0x1576d9(0x11a)]),'parentId':_0x5ccd67}),_0x385e7=_0x597d35(_0x4b2b5b[_0x1576d9(0x10e)][0x0]);return{..._0x385e7,'children':_0x4b2b5b[_0x1576d9(0x10e)]['slice'](0x1)[_0x1576d9(0xe0)](_0x2339ce=>_0x597d35(_0x2339ce,_0x385e7['id']))};}return null;}let _0x172675=class{constructor(_0x2ffed3,_0x4e17f8,_0x1647fb,_0x19dbe1){const _0x2407a7=_0x56ddbb;this['_httpService']=_0x2ffed3,this[_0x2407a7(0xdf)]=_0x4e17f8,this[_0x2407a7(0x14a)]=_0x1647fb,this[_0x2407a7(0xe5)]=_0x19dbe1;}async['addComment'](_0xbf7f76){const _0x4f6114=_0x56ddbb;var _0x741e17,_0x529af8;const {parentId:_0x40b7c1,unitId:_0x399dde,text:_0x2c9245,threadId:_0x1591f8}=_0xbf7f76,_0x5e97b3=(_0x529af8=(_0x741e17=_0x2c9245[_0x4f6114(0xda)])==null?void 0x0:_0x741e17[_0x4f6114(0xd2)](_0xf0a0b8=>_0xf0a0b8[_0x4f6114(0xf4)]===_0x25b392['CustomRangeType']['COMMENT'])[_0x4f6114(0xe0)](_0x4040b4=>_0x4040b4[_0x4f6114(0xf1)]))!=null?_0x529af8:[],_0x1ac260=JSON['stringify'](_0x2c9245),_0x11a18c=(await this[_0x4f6114(0x14a)][_0x4f6114(0x12e)](_0x399dde))['getMemberID']();if(_0x40b7c1){const _0x146ecc={'memberId':_0x11a18c,'unitId':_0x399dde,'content':_0x1ac260,'mention':_0x5e97b3,'threadId':_0x1591f8},_0x42f292=(await this[_0x4f6114(0x118)][_0x4f6114(0x124)](_0x4f6114(0x13e)+_0x399dde+'/reply',{'body':_0x146ecc}))[_0x4f6114(0x13f)][_0x4f6114(0xdc)];return{..._0xbf7f76,'id':_0x42f292[_0x4f6114(0xd3)],'dT':_0x25b392['dayjs'](+_0x42f292['createTimestamp'])['format'](_0x4f6114(0x11f)),'personId':_0x42f292[_0x4f6114(0xe7)]};}else{const _0x34b0c4={'memberId':_0x11a18c,'unitId':_0x399dde,'content':_0x1ac260,'mention':_0x5e97b3},_0x2008da=await this[_0x4f6114(0x118)][_0x4f6114(0x124)]('/universer-api/comment/unit/'+_0x399dde+_0x4f6114(0x14f),{'body':_0x34b0c4});return _0x4a9c8f(_0x2008da[_0x4f6114(0x13f)][_0x4f6114(0xfa)],_0xbf7f76);}}async[_0x56ddbb(0x11d)](_0x3bb57f){const _0x5acfa4=_0x56ddbb;var _0x2b7391,_0x243866;const {text:_0x4b18ae,unitId:_0x45659d}=_0x3bb57f,_0xa711b7=(_0x243866=(_0x2b7391=_0x4b18ae[_0x5acfa4(0xda)])==null?void 0x0:_0x2b7391[_0x5acfa4(0xd2)](_0x47ecbc=>_0x47ecbc[_0x5acfa4(0xf4)]===_0x25b392[_0x5acfa4(0x125)]['COMMENT'])['map'](_0x535f4e=>_0x535f4e[_0x5acfa4(0xf1)]))!=null?_0x243866:[],_0x575ffe=JSON['stringify'](_0x4b18ae),_0x1d1c6=_0x3bb57f[_0x5acfa4(0xfb)],_0x2a094b=_0x3bb57f['id'],_0x243e85={'memberId':(await this[_0x5acfa4(0x14a)][_0x5acfa4(0x12e)](_0x45659d))[_0x5acfa4(0xdb)](),'unitId':_0x45659d,'threadId':_0x1d1c6,'mention':_0xa711b7,'content':_0x575ffe,'replyId':_0x2a094b},_0x2abe19=await this[_0x5acfa4(0x118)][_0x5acfa4(0x124)](_0x5acfa4(0x13e)+_0x45659d+'/edit',{'body':_0x243e85});return!_0x2abe19['body'][_0x5acfa4(0xec)]||_0x2abe19['body'][_0x5acfa4(0xec)][_0x5acfa4(0x112)]===0x1;}async[_0x56ddbb(0xd8)](_0x2ead13){const _0x124507=_0x56ddbb,{unitId:_0x4acd03}=_0x2ead13,_0x57200d=_0x2ead13[_0x124507(0xfb)],_0x51c4cb={'memberId':this['_userService'][_0x124507(0x100)]()[_0x124507(0x143)],'unitId':_0x4acd03,'threadId':_0x57200d,'solved':_0x2ead13[_0x124507(0x134)]?_0x3b34bb[_0x124507(0x11c)]:_0x3b34bb[_0x124507(0x105)]},_0x513b14=await this[_0x124507(0x118)][_0x124507(0x124)](_0x124507(0x13e)+_0x4acd03+'/solved',{'body':_0x51c4cb});return!_0x513b14[_0x124507(0x13f)][_0x124507(0xec)]||_0x513b14[_0x124507(0x13f)][_0x124507(0xec)][_0x124507(0x112)]===0x1;}async[_0x56ddbb(0x133)](_0x226acd,_0xbc52aa,_0x15c374,_0x39064d){const _0x45df2b=_0x56ddbb,_0x321360={'memberId':(await this['_sessionService'][_0x45df2b(0x12e)](_0x226acd))[_0x45df2b(0xdb)](),'threadId':_0x15c374,'replyId':_0x39064d,'unitId':_0x226acd},_0x771905=await this[_0x45df2b(0x118)][_0x45df2b(0x124)](_0x45df2b(0x13e)+_0x226acd+_0x45df2b(0x101),{'body':_0x321360});return!_0x771905[_0x45df2b(0x13f)][_0x45df2b(0xec)]||_0x771905[_0x45df2b(0x13f)][_0x45df2b(0xec)]['code']===0x1;}async[_0x56ddbb(0x147)](_0x38acb4,_0x1492c2,_0x436540){const _0x421be3=_0x56ddbb,_0x283c1f={'unitId':_0x38acb4,'threadId':_0x436540},_0x2ec7c9=await this['_httpService'][_0x421be3(0x124)](_0x421be3(0x13e)+_0x38acb4+_0x421be3(0xe9),{'body':_0x283c1f}),_0x462037=_0x436540[_0x421be3(0xe0)](_0x3295c3=>_0x1bf24b(_0x2ec7c9[_0x421be3(0x13f)][_0x421be3(0xeb)][_0x3295c3],_0x38acb4,_0x1492c2))[_0x421be3(0xd2)](Boolean);return Object[_0x421be3(0x141)](_0x2ec7c9[_0x421be3(0x13f)]['users'])[_0x421be3(0x116)](_0x527363=>{const _0x1c3991=_0x421be3;this[_0x1c3991(0xdf)]['addUser'](_0x527363);}),_0x462037;}[_0x56ddbb(0x13b)](_0x56ae1d){const _0x350568=_0x56ddbb;return{'id':_0x56ae1d['id'],'threadId':_0x56ae1d[_0x350568(0xfb)],'ref':_0x56ae1d['ref']};}};_0x172675=_0x5a21ec([_0x380a4f(0x0,_0x25b392[_0x56ddbb(0xf2)](_0x2c508c[_0x56ddbb(0x14d)])),_0x380a4f(0x1,_0x25b392[_0x56ddbb(0xf2)](_0x25b392[_0x56ddbb(0x150)])),_0x380a4f(0x2,_0x25b392[_0x56ddbb(0xf2)](_0x372d68[_0x56ddbb(0x117)])),_0x380a4f(0x3,_0x25b392[_0x56ddbb(0xf2)](_0x25b392[_0x56ddbb(0xd7)]))],_0x172675);var _0x1d61a2=Object[_0x56ddbb(0xea)],_0x56e75b=(_0x43ffe3,_0x58cce2,_0x4b0b3f,_0x44846c)=>{const _0x2493d6=_0x56ddbb;for(var _0x263263=_0x44846c>0x1?void 0x0:_0x44846c?_0x1d61a2(_0x58cce2,_0x4b0b3f):_0x58cce2,_0x4c2576=_0x43ffe3[_0x2493d6(0x12f)]-0x1,_0x2ba90d;_0x4c2576>=0x0;_0x4c2576--)(_0x2ba90d=_0x43ffe3[_0x4c2576])&&(_0x263263=_0x2ba90d(_0x263263)||_0x263263);return _0x263263;},_0x47e928=(_0x5bf162,_0x1d72d1)=>(_0x52deb9,_0x2924d9)=>_0x1d72d1(_0x52deb9,_0x2924d9,_0x5bf162);let _0x22b563=class extends _0x25b392[_0x56ddbb(0xfc)]{constructor(_0x48e1ad,_0x10881c){const _0xc1e7a1=_0x56ddbb;super(),this['_threadCommentDataSourceService']=_0x48e1ad,this[_0xc1e7a1(0x12d)]=_0x10881c,this[_0xc1e7a1(0xe6)]();}[_0x56ddbb(0xe6)](){const _0x4c6623=_0x56ddbb;this[_0x4c6623(0xed)]['dataSource']=this[_0x4c6623(0x12d)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x22b563=_0x56e75b([_0x47e928(0x0,_0x55314c['IThreadCommentDataSourceService']),_0x47e928(0x1,_0x25b392[_0x56ddbb(0xf2)](_0x172675))],_0x22b563);var _0x64ab7d=Object['defineProperty'],_0x5946f9=Object['getOwnPropertyDescriptor'],_0x4d6bdd=(_0x14ae54,_0x127eb9,_0x220473)=>_0x127eb9 in _0x14ae54?_0x64ab7d(_0x14ae54,_0x127eb9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x220473}):_0x14ae54[_0x127eb9]=_0x220473,_0xd2b78c=(_0x176d91,_0x218061,_0x118a83,_0x1cec75)=>{for(var _0x2b150f=_0x1cec75>0x1?void 0x0:_0x1cec75?_0x5946f9(_0x218061,_0x118a83):_0x218061,_0x231cbd=_0x176d91['length']-0x1,_0xa465ae;_0x231cbd>=0x0;_0x231cbd--)(_0xa465ae=_0x176d91[_0x231cbd])&&(_0x2b150f=_0xa465ae(_0x2b150f)||_0x2b150f);return _0x2b150f;},_0x20436a=(_0x29970a,_0x2bdedc)=>(_0x5d4a71,_0x5f10bb)=>_0x2bdedc(_0x5d4a71,_0x5f10bb,_0x29970a),_0x223641=(_0xb038fc,_0x362881,_0x187b28)=>_0x4d6bdd(_0xb038fc,typeof _0x362881!=_0x56ddbb(0x137)?_0x362881+'':_0x362881,_0x187b28);_0x24f1da[_0x56ddbb(0x144)]=class extends _0x25b392[_0x56ddbb(0x140)]{constructor(_0x1d2d5a=_0x5a9e16,_0x2b5226,_0x4207e9){const _0x386b11=_0x56ddbb;super(),this[_0x386b11(0x127)]=_0x1d2d5a,this[_0x386b11(0xe5)]=_0x2b5226,this[_0x386b11(0x138)]=_0x4207e9;const {..._0x1a5112}=_0x25b392['merge']({},_0x5a9e16,this[_0x386b11(0x127)]);this[_0x386b11(0x138)]['setConfig'](_0x540751,_0x1a5112);}['onStarting'](){const _0x1b409c=_0x56ddbb;[[_0x172675],[_0x22b563],[_0x523feb]][_0x1b409c(0x116)](_0x4c0292=>{const _0x4b89dc=_0x1b409c;this[_0x4b89dc(0xe5)][_0x4b89dc(0x115)](_0x4c0292);});}[_0x56ddbb(0x10a)](){const _0x4a576e=_0x56ddbb;this['_injector']['get'](_0x22b563),this[_0x4a576e(0xe5)][_0x4a576e(0x126)](_0x523feb);}},_0x223641(_0x24f1da[_0x56ddbb(0x144)],_0x56ddbb(0x110),_0x2f69d9),_0x223641(_0x24f1da[_0x56ddbb(0x144)],_0x56ddbb(0x14c),_0x25b392[_0x56ddbb(0xe1)][_0x56ddbb(0x139)]),_0x24f1da[_0x56ddbb(0x144)]=_0xd2b78c([_0x25b392[_0x56ddbb(0x148)](_0x584479[_0x56ddbb(0xf6)],_0x372d68['UniverCollaborationClientPlugin'],_0x538c50[_0x56ddbb(0xe2)]),_0x20436a(0x1,_0x25b392[_0x56ddbb(0xf2)](_0x25b392[_0x56ddbb(0xd7)])),_0x20436a(0x2,_0x25b392['IConfigService'])],_0x24f1da[_0x56ddbb(0x144)]),Object[_0x56ddbb(0x12c)](_0x24f1da,Symbol[_0x56ddbb(0x11e)],{'value':'Module'});}));
|
|
1
|
+
function _0xfcf5(){const _0x1bef4e=['comments','resolved','replies','56616OXHIZI','10479771AevuVK','Reply','@univerjs/core','find','_userService','resolveComment','UniverProCollaborationClient','syncUpdateMutationToColla','rangeId','object','5819664IJZZTV','Delete','map','values','thread-comment-data-source.config','_config','UserManagerService','_threadCommentDataSource','_configService','getMemberID','ThreadCommentModel','add','UniverNetwork','_threadCommentModel','forEach','post','YYYY/MM/DD\x20HH:mm','Solved','parse','merge','replyId','filter','/delete','_init','disposeWithMe','Solve','_threadCommentDataSourceService','Module','commentUpdate$','setConfig','/universer-api/comment/unit/','18780QPBfKm','_initUserSync','8131501Plkygq','UniverInstanceType','Edit','function','HTTPService','parentId','Injector','root','UniverLicensePlugin','_sessionService','Unknown','10RKLdfP','listComments','OpenOrReOpen','getUnit','_initDataSource','UniverThreadCommentUi','addUser','addComment','dataSource','getComment','_httpService','CommentService','@univerjs-pro/license','format','user','amd','personId','threadId','stringify','body','solved','getOwnPropertyDescriptor','/list','UNIVER_UNKNOWN','unitId','IThreadCommentDataSourceService','slice','users','_commentService','3251610ArrXoK','UniverCollaborationClientPlugin','getUser','2473614EdhzTH','rxjs','saveCommentToSnapshot','rangeType','CustomRangeType','UniverProLicense','toStringTag','IConfigService','onReady','@univerjs/network','bufferTime','/solved','requireSession','/add','/reply','userID','dayjs','size','code','createTimestamp','26YdarCI','UniverThreadCommentDataSourcePlugin','pipe','defineProperty','Inject','COMMENT','UniverThreadCommentUIPlugin','get','414TNSvTi','UNRECOGNIZED','@univerjs/thread-comment-ui','length','reply','UniverThreadComment','userId','DependentOn','deleteComment','subscribe','_injector','error','UniverCore','@univerjs-pro/collaboration-client','updateComment','type'];_0xfcf5=function(){return _0x1bef4e;};return _0xfcf5();}function _0x249c(_0x4990fa,_0x9fbd97){const _0xfcf510=_0xfcf5();return _0x249c=function(_0x249c10,_0x1b6188){_0x249c10=_0x249c10-0x1e7;let _0x564cc5=_0xfcf510[_0x249c10];return _0x564cc5;},_0x249c(_0x4990fa,_0x9fbd97);}(function(_0x10eedd,_0x4cb075){const _0x3ba7de=_0x249c,_0x294252=_0x10eedd();while(!![]){try{const _0x5615ff=parseInt(_0x3ba7de(0x24c))/0x1*(parseInt(_0x3ba7de(0x231))/0x2)+parseInt(_0x3ba7de(0x239))/0x3*(-parseInt(_0x3ba7de(0x1f0))/0x4)+-parseInt(_0x3ba7de(0x21a))/0x5+-parseInt(_0x3ba7de(0x21d))/0x6+parseInt(_0x3ba7de(0x1f2))/0x7+-parseInt(_0x3ba7de(0x257))/0x8+-parseInt(_0x3ba7de(0x24d))/0x9*(-parseInt(_0x3ba7de(0x1fd))/0xa);if(_0x5615ff===_0x4cb075)break;else _0x294252['push'](_0x294252['shift']());}catch(_0x1cdc3c){_0x294252['push'](_0x294252['shift']());}}}(_0xfcf5,0x985ef),function(_0xdd4d13,_0x4f199d){const _0x5ecbf8=_0x249c;typeof exports==_0x5ecbf8(0x256)&&typeof module<'u'?_0x4f199d(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require(_0x5ecbf8(0x24f)),require(_0x5ecbf8(0x23b)),require('@univerjs/thread-comment'),require('rxjs'),require(_0x5ecbf8(0x226))):typeof define==_0x5ecbf8(0x1f5)&&define[_0x5ecbf8(0x20c)]?define(['exports',_0x5ecbf8(0x246),_0x5ecbf8(0x209),_0x5ecbf8(0x24f),_0x5ecbf8(0x23b),'@univerjs/thread-comment',_0x5ecbf8(0x21e),_0x5ecbf8(0x226)],_0x4f199d):(_0xdd4d13=typeof globalThis<'u'?globalThis:_0xdd4d13||self,_0x4f199d(_0xdd4d13['UniverProThreadCommentDatasource']={},_0xdd4d13[_0x5ecbf8(0x253)],_0xdd4d13[_0x5ecbf8(0x222)],_0xdd4d13[_0x5ecbf8(0x245)],_0xdd4d13[_0x5ecbf8(0x202)],_0xdd4d13[_0x5ecbf8(0x23e)],_0xdd4d13[_0x5ecbf8(0x21e)],_0xdd4d13[_0x5ecbf8(0x263)]));}(this,function(_0x2845e5,_0x509d44,_0x1b1acc,_0x1b5fb0,_0x3ad4ec,_0x4c7067,_0x5c3ac0,_0x5b10eb){'use strict';const _0x4e3d65=_0x249c;const _0x465670='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0xc5d00b=(_0x49f292=>(_0x49f292[_0x49f292[_0x4e3d65(0x1ff)]=0x0]=_0x4e3d65(0x1ff),_0x49f292[_0x49f292[_0x4e3d65(0x268)]=0x1]=_0x4e3d65(0x268),_0x49f292[_0x49f292[_0x4e3d65(0x23a)]=-0x1]='UNRECOGNIZED',_0x49f292))(_0xc5d00b||{}),_0x39b66d=(_0x2a3c77=>(_0x2a3c77[_0x2a3c77[_0x4e3d65(0x1fc)]=0x0]=_0x4e3d65(0x1fc),_0x2a3c77[_0x2a3c77['Add']=0x1]='Add',_0x2a3c77[_0x2a3c77[_0x4e3d65(0x24e)]=0x2]=_0x4e3d65(0x24e),_0x2a3c77[_0x2a3c77[_0x4e3d65(0x1f4)]=0x3]=_0x4e3d65(0x1f4),_0x2a3c77[_0x2a3c77[_0x4e3d65(0x258)]=0x4]=_0x4e3d65(0x258),_0x2a3c77[_0x2a3c77['Solve']=0x5]=_0x4e3d65(0x1ea),_0x2a3c77[_0x2a3c77[_0x4e3d65(0x23a)]=-0x1]=_0x4e3d65(0x23a),_0x2a3c77))(_0x39b66d||{});const _0xfbee1b=_0x2fd03f=>_0x1b5fb0[_0x4e3d65(0x22d)](new Date(+_0x2fd03f))['format']('YYYY/MM/DD\x20HH:mm'),_0x146e38=async(_0x89e8c0,_0x19fe16)=>{const _0x2c0045=_0x4e3d65,_0x1891a7=_0x89e8c0[_0x2c0045(0x238)](_0x1b5fb0['UserManagerService']),_0x4a25f7=_0x89e8c0[_0x2c0045(0x238)](_0x5b10eb['HTTPService']);_0x19fe16[_0x2c0045(0x265)](_0xa54b54=>{const _0x3b00f3=_0x2c0045;_0x1891a7[_0x3b00f3(0x21c)](_0xa54b54)&&_0x19fe16['delete'](_0xa54b54);}),_0x19fe16[_0x2c0045(0x22e)]&&(await _0x4a25f7[_0x2c0045(0x238)]('/universer-api/user/list',{'params':{'userIDs':[..._0x19fe16]}}))[_0x2c0045(0x210)][_0x2c0045(0x218)]['forEach'](_0x3ecefc=>{const _0x599bf4=_0x2c0045;_0x3ecefc&&_0x1891a7[_0x599bf4(0x203)](_0x3ecefc);});};var _0x125952=Object[_0x4e3d65(0x212)],_0x192f83=(_0x3328ec,_0x4d5a63,_0x458a54,_0x3b7c6f)=>{const _0xae4899=_0x4e3d65;for(var _0x17cc7b=_0x3b7c6f>0x1?void 0x0:_0x3b7c6f?_0x125952(_0x4d5a63,_0x458a54):_0x4d5a63,_0x15e0f8=_0x3328ec[_0xae4899(0x23c)]-0x1,_0x36de45;_0x15e0f8>=0x0;_0x15e0f8--)(_0x36de45=_0x3328ec[_0x15e0f8])&&(_0x17cc7b=_0x36de45(_0x17cc7b)||_0x17cc7b);return _0x17cc7b;},_0x3248f1=(_0x517955,_0x1a7d8e)=>(_0x37931d,_0x876ea0)=>_0x1a7d8e(_0x37931d,_0x876ea0,_0x517955);let _0x39a0a6=class extends _0x1b5fb0['Disposable']{constructor(_0x32d915,_0x211a5b,_0x11062c,_0xfae724){const _0x40866a=_0x4e3d65;super(),this[_0x40866a(0x219)]=_0x32d915,this['_threadCommentModel']=_0x211a5b,this[_0x40866a(0x251)]=_0x11062c,this['_injector']=_0xfae724,this['_init'](),this[_0x40866a(0x1f1)]();}[_0x4e3d65(0x1f1)](){const _0x3d5cbd=_0x4e3d65;this[_0x3d5cbd(0x1e9)](this[_0x3d5cbd(0x264)][_0x3d5cbd(0x1ed)][_0x3d5cbd(0x233)](_0x5c3ac0[_0x3d5cbd(0x227)](0x10))[_0x3d5cbd(0x242)](_0x1be6c2=>{const _0x509db1=_0x3d5cbd,_0x35c1d1=new Set();_0x1be6c2['forEach'](_0x428f96=>{const _0xb3eb1f=_0x249c;switch(_0x428f96['type']){case _0xb3eb1f(0x262):{const _0x2b3668=_0x428f96['payload'][_0xb3eb1f(0x20d)];_0x35c1d1[_0xb3eb1f(0x262)](_0x2b3668);break;}}}),_0x146e38(this[_0x509db1(0x243)],_0x35c1d1);}));}[_0x4e3d65(0x1e8)](){const _0x359d37=_0x4e3d65;this[_0x359d37(0x1e9)](this[_0x359d37(0x219)][_0x359d37(0x1ed)]['subscribe'](async _0x1d6846=>{const _0xe94713=_0x359d37;var _0x5b343b,_0x5af259,_0x27c1c1,_0x422bfb;const _0x1042fb=(_0x5b343b=this[_0xe94713(0x264)][_0xe94713(0x200)](_0x1d6846[_0xe94713(0x215)])['find'](_0x182fe8=>_0x182fe8[_0xe94713(0x20e)]===_0x1d6846['threadId']))==null?void 0x0:_0x5b343b[_0xe94713(0x1f9)];if(!_0x1042fb)return;const {unitId:_0x67a126,subUnitId:_0x19c4ba}=_0x1042fb;switch(_0x1d6846[_0xe94713(0x20b)]&&this[_0xe94713(0x251)][_0xe94713(0x203)](_0x1d6846[_0xe94713(0x20b)]),_0x1d6846[_0xe94713(0x248)]){case _0x39b66d['Add']:break;case _0x39b66d['Reply']:{this['_threadCommentModel'][_0xe94713(0x204)](_0x67a126,_0x19c4ba,{'unitId':_0x67a126,'subUnitId':_0x19c4ba,'ref':'','id':_0x1d6846[_0xe94713(0x26b)],'dT':_0xfbee1b(+_0x1d6846[_0xe94713(0x230)]),'threadId':_0x1d6846[_0xe94713(0x20e)],'personId':(_0x27c1c1=(_0x5af259=_0x1d6846[_0xe94713(0x20b)])==null?void 0x0:_0x5af259[_0xe94713(0x22c)])!=null?_0x27c1c1:_0x1d6846[_0xe94713(0x23f)],'text':JSON[_0xe94713(0x269)](_0x1d6846['content']),'parentId':_0x1042fb['id']});break;}case _0x39b66d['Delete']:{const _0x3109fa=this[_0xe94713(0x264)][_0xe94713(0x206)](_0x67a126,_0x19c4ba,_0x1d6846[_0xe94713(0x26b)]);_0x3109fa&&_0x3109fa[_0xe94713(0x1f7)]&&this[_0xe94713(0x264)]['deleteComment'](_0x67a126,_0x19c4ba,_0x1d6846[_0xe94713(0x26b)]);break;}case _0x39b66d[_0xe94713(0x1f4)]:{this['_threadCommentModel']['updateComment'](_0x67a126,_0x19c4ba,{'commentId':_0x1d6846[_0xe94713(0x26b)],'text':JSON[_0xe94713(0x269)](_0x1d6846['content'])});break;}case _0x39b66d[_0xe94713(0x1ea)]:{const _0x3d1c6e=(_0x422bfb=this['_threadCommentModel'][_0xe94713(0x200)](_0x1d6846[_0xe94713(0x215)])[_0xe94713(0x250)](_0xe5fcd7=>_0xe5fcd7[_0xe94713(0x20e)]===_0x1d6846[_0xe94713(0x20e)]))==null?void 0x0:_0x422bfb['root'];_0x3d1c6e&&this['_threadCommentModel'][_0xe94713(0x252)](_0x67a126,_0x19c4ba,_0x3d1c6e['id'],_0x1d6846[_0xe94713(0x211)]===_0xc5d00b[_0xe94713(0x268)]);break;}}}));}};_0x39a0a6=_0x192f83([_0x3248f1(0x0,_0x1b5fb0[_0x4e3d65(0x235)](_0x509d44[_0x4e3d65(0x208)])),_0x3248f1(0x1,_0x1b5fb0[_0x4e3d65(0x235)](_0x4c7067[_0x4e3d65(0x261)])),_0x3248f1(0x2,_0x1b5fb0[_0x4e3d65(0x235)](_0x1b5fb0[_0x4e3d65(0x25d)])),_0x3248f1(0x3,_0x1b5fb0[_0x4e3d65(0x235)](_0x1b5fb0[_0x4e3d65(0x1f8)]))],_0x39a0a6);const _0x5b2358=_0x4e3d65(0x25b),_0x1767a4={};var _0x5e2b8a=Object[_0x4e3d65(0x212)],_0xefe7b0=(_0x6cee85,_0x1773c0,_0x2de8d6,_0x44d8e2)=>{for(var _0x3fbb3d=_0x44d8e2>0x1?void 0x0:_0x44d8e2?_0x5e2b8a(_0x1773c0,_0x2de8d6):_0x1773c0,_0x2daeb3=_0x6cee85['length']-0x1,_0x463c8e;_0x2daeb3>=0x0;_0x2daeb3--)(_0x463c8e=_0x6cee85[_0x2daeb3])&&(_0x3fbb3d=_0x463c8e(_0x3fbb3d)||_0x3fbb3d);return _0x3fbb3d;},_0x22d778=(_0x313867,_0x38f2cf)=>(_0x315a37,_0x1606eb)=>_0x38f2cf(_0x315a37,_0x1606eb,_0x313867);function _0x547d6e(_0x5a7e22,_0x5b1769){const _0x17366c=_0x4e3d65,_0xc3715d=_0x5a7e22['replies'][0x0];return{..._0x5b1769,'id':_0xc3715d['replyId'],'resolved':_0x5a7e22[_0x17366c(0x211)]===0x1,'dT':_0xfbee1b(_0xc3715d[_0x17366c(0x230)]),'personId':_0xc3715d['userId'],'threadId':_0xc3715d[_0x17366c(0x20e)]};}function _0x4ea554(_0x36b28f,_0x3d5499,_0x3be22a){const _0x958824=_0x4e3d65;var _0x177685,_0x12a44a;if(((_0x12a44a=(_0x177685=_0x36b28f==null?void 0x0:_0x36b28f[_0x958824(0x24b)])==null?void 0x0:_0x177685[_0x958824(0x23c)])!=null?_0x12a44a:0x0)>0x0){const _0x351afc=(_0x2e6d55,_0x2da14b)=>({'id':_0x2e6d55[_0x958824(0x26b)],'threadId':_0x2e6d55[_0x958824(0x20e)],'dT':_0xfbee1b(_0x2e6d55[_0x958824(0x230)]),'personId':_0x2e6d55['userId'],'resolved':_0x36b28f['solved']===_0xc5d00b[_0x958824(0x268)],'unitId':_0x3d5499,'subUnitId':_0x3be22a,'text':JSON[_0x958824(0x269)](_0x2e6d55['content']),'parentId':_0x2da14b}),_0x3a1603=_0x351afc(_0x36b28f[_0x958824(0x24b)][0x0]);return{..._0x3a1603,'children':_0x36b28f[_0x958824(0x24b)][_0x958824(0x217)](0x1)['map'](_0x2877a5=>_0x351afc(_0x2877a5,_0x3a1603['id']))};}return null;}let _0xcf1639=class{constructor(_0x5b0265,_0x1d36d2,_0x4f8af9,_0x189876){const _0x4c5141=_0x4e3d65;this[_0x4c5141(0x207)]=_0x5b0265,this[_0x4c5141(0x251)]=_0x1d36d2,this[_0x4c5141(0x1fb)]=_0x4f8af9,this[_0x4c5141(0x243)]=_0x189876;}async[_0x4e3d65(0x204)](_0xf58068){const _0x16765a=_0x4e3d65;var _0x32c232,_0x5c6da3;const {parentId:_0x1792a5,unitId:_0x5b5802,text:_0x2eeab4,threadId:_0x1de2b6}=_0xf58068,_0x503e97=(_0x5c6da3=(_0x32c232=_0x2eeab4['customRanges'])==null?void 0x0:_0x32c232[_0x16765a(0x26c)](_0xff8601=>_0xff8601[_0x16765a(0x220)]===_0x1b5fb0[_0x16765a(0x221)][_0x16765a(0x236)])['map'](_0x1643ff=>_0x1643ff['rangeId']))!=null?_0x5c6da3:[],_0xce3c20=JSON[_0x16765a(0x20f)](_0x2eeab4),_0x5c3461=(await this[_0x16765a(0x1fb)][_0x16765a(0x229)](_0x5b5802))['getMemberID']();if(_0x1792a5){const _0x2c6205={'memberId':_0x5c3461,'unitId':_0x5b5802,'content':_0xce3c20,'mention':_0x503e97,'threadId':_0x1de2b6},_0x41dec0=(await this[_0x16765a(0x207)][_0x16765a(0x266)](_0x16765a(0x1ef)+_0x5b5802+_0x16765a(0x22b),{'body':_0x2c6205}))[_0x16765a(0x210)][_0x16765a(0x23d)];return{..._0xf58068,'id':_0x41dec0[_0x16765a(0x26b)],'dT':_0x1b5fb0['dayjs'](+_0x41dec0['createTimestamp'])[_0x16765a(0x20a)](_0x16765a(0x267)),'personId':_0x41dec0[_0x16765a(0x23f)]};}else{const _0x166e1c={'memberId':_0x5c3461,'unitId':_0x5b5802,'content':_0xce3c20,'mention':_0x503e97},_0x4b510f=await this[_0x16765a(0x207)][_0x16765a(0x266)]('/universer-api/comment/unit/'+_0x5b5802+_0x16765a(0x22a),{'body':_0x166e1c});return _0x547d6e(_0x4b510f[_0x16765a(0x210)]['comment'],_0xf58068);}}async[_0x4e3d65(0x247)](_0x31da81){const _0x47822e=_0x4e3d65;var _0x2aba96,_0x755453;const {text:_0x56dfe7,unitId:_0x230246}=_0x31da81,_0x53170e=(_0x755453=(_0x2aba96=_0x56dfe7['customRanges'])==null?void 0x0:_0x2aba96[_0x47822e(0x26c)](_0x1af25c=>_0x1af25c[_0x47822e(0x220)]===_0x1b5fb0[_0x47822e(0x221)]['COMMENT'])[_0x47822e(0x259)](_0x524020=>_0x524020[_0x47822e(0x255)]))!=null?_0x755453:[],_0x366d25=JSON['stringify'](_0x56dfe7),_0x13daa7=_0x31da81[_0x47822e(0x20e)],_0x4abdff=_0x31da81['id'],_0x364515={'memberId':(await this[_0x47822e(0x1fb)][_0x47822e(0x229)](_0x230246))['getMemberID'](),'unitId':_0x230246,'threadId':_0x13daa7,'mention':_0x53170e,'content':_0x366d25,'replyId':_0x4abdff},_0x376f4d=await this[_0x47822e(0x207)]['post'](_0x47822e(0x1ef)+_0x230246+'/edit',{'body':_0x364515});return!_0x376f4d['body'][_0x47822e(0x244)]||_0x376f4d[_0x47822e(0x210)][_0x47822e(0x244)][_0x47822e(0x22f)]===0x1;}async[_0x4e3d65(0x252)](_0x9b318){const _0x4f6bbf=_0x4e3d65,{unitId:_0x3b1410}=_0x9b318,_0x5c2f84=_0x9b318[_0x4f6bbf(0x20e)],_0x1410b5={'memberId':this[_0x4f6bbf(0x251)]['getCurrentUser']()['userID'],'unitId':_0x3b1410,'threadId':_0x5c2f84,'solved':_0x9b318[_0x4f6bbf(0x24a)]?_0xc5d00b[_0x4f6bbf(0x268)]:_0xc5d00b[_0x4f6bbf(0x1ff)]},_0x17feea=await this[_0x4f6bbf(0x207)]['post']('/universer-api/comment/unit/'+_0x3b1410+_0x4f6bbf(0x228),{'body':_0x1410b5});return!_0x17feea['body'][_0x4f6bbf(0x244)]||_0x17feea[_0x4f6bbf(0x210)]['error'][_0x4f6bbf(0x22f)]===0x1;}async[_0x4e3d65(0x241)](_0x39b090,_0x3da594,_0x4d23ab,_0x29e9da){const _0x1be58d=_0x4e3d65,_0x30dc73={'memberId':(await this[_0x1be58d(0x1fb)]['requireSession'](_0x39b090))[_0x1be58d(0x260)](),'threadId':_0x4d23ab,'replyId':_0x29e9da,'unitId':_0x39b090},_0x454c5c=await this['_httpService'][_0x1be58d(0x266)](_0x1be58d(0x1ef)+_0x39b090+_0x1be58d(0x1e7),{'body':_0x30dc73});return!_0x454c5c['body'][_0x1be58d(0x244)]||_0x454c5c['body'][_0x1be58d(0x244)]['code']===0x1;}async[_0x4e3d65(0x1fe)](_0x352076,_0x4b8623,_0x5d9059){const _0x3f602a=_0x4e3d65,_0x1b3aef={'unitId':_0x352076,'threadId':_0x5d9059},_0x5dd7d9=await this[_0x3f602a(0x207)][_0x3f602a(0x266)]('/universer-api/comment/unit/'+_0x352076+_0x3f602a(0x213),{'body':_0x1b3aef}),_0x53e40f=_0x5d9059[_0x3f602a(0x259)](_0x233d54=>_0x4ea554(_0x5dd7d9[_0x3f602a(0x210)][_0x3f602a(0x249)][_0x233d54],_0x352076,_0x4b8623))['filter'](Boolean);return Object[_0x3f602a(0x25a)](_0x5dd7d9['body']['users'])[_0x3f602a(0x265)](_0x66014e=>{const _0x420f84=_0x3f602a;this[_0x420f84(0x251)]['addUser'](_0x66014e);}),_0x53e40f;}[_0x4e3d65(0x21f)](_0x540631){return{'id':_0x540631['id'],'threadId':_0x540631['threadId'],'ref':_0x540631['ref']};}};_0xcf1639=_0xefe7b0([_0x22d778(0x0,_0x1b5fb0[_0x4e3d65(0x235)](_0x5b10eb[_0x4e3d65(0x1f6)])),_0x22d778(0x1,_0x1b5fb0[_0x4e3d65(0x235)](_0x1b5fb0[_0x4e3d65(0x25d)])),_0x22d778(0x2,_0x1b5fb0['Inject'](_0x509d44['CollaborationSessionService'])),_0x22d778(0x3,_0x1b5fb0[_0x4e3d65(0x235)](_0x1b5fb0[_0x4e3d65(0x1f8)]))],_0xcf1639);var _0x427a14=Object[_0x4e3d65(0x212)],_0x5760e5=(_0x464205,_0x45c31e,_0x4861e7,_0x5ce170)=>{for(var _0x1c1169=_0x5ce170>0x1?void 0x0:_0x5ce170?_0x427a14(_0x45c31e,_0x4861e7):_0x45c31e,_0xdbe8f6=_0x464205['length']-0x1,_0x4ae0b1;_0xdbe8f6>=0x0;_0xdbe8f6--)(_0x4ae0b1=_0x464205[_0xdbe8f6])&&(_0x1c1169=_0x4ae0b1(_0x1c1169)||_0x1c1169);return _0x1c1169;},_0x7ca01e=(_0x5140f5,_0x22259f)=>(_0x36dbbf,_0x282413)=>_0x22259f(_0x36dbbf,_0x282413,_0x5140f5);let _0x5dbf72=class extends _0x1b5fb0['Disposable']{constructor(_0x5d5b43,_0x56c2d3){const _0x366070=_0x4e3d65;super(),this['_threadCommentDataSourceService']=_0x5d5b43,this[_0x366070(0x25e)]=_0x56c2d3,this[_0x366070(0x201)]();}[_0x4e3d65(0x201)](){const _0x1e69c4=_0x4e3d65;this[_0x1e69c4(0x1eb)][_0x1e69c4(0x205)]=this[_0x1e69c4(0x25e)],this[_0x1e69c4(0x1eb)][_0x1e69c4(0x254)]=!0x1;}};_0x5dbf72=_0x5760e5([_0x7ca01e(0x0,_0x4c7067[_0x4e3d65(0x216)]),_0x7ca01e(0x1,_0x1b5fb0['Inject'](_0xcf1639))],_0x5dbf72);var _0x3eaa5b=Object['defineProperty'],_0x2cdd98=Object[_0x4e3d65(0x212)],_0xf95243=(_0x36e973,_0x2c8915,_0x3aa8f2)=>_0x2c8915 in _0x36e973?_0x3eaa5b(_0x36e973,_0x2c8915,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3aa8f2}):_0x36e973[_0x2c8915]=_0x3aa8f2,_0x5eeab4=(_0x28cd7f,_0x30feb9,_0x14a876,_0x555251)=>{const _0x5197b2=_0x4e3d65;for(var _0x517a13=_0x555251>0x1?void 0x0:_0x555251?_0x2cdd98(_0x30feb9,_0x14a876):_0x30feb9,_0xac875e=_0x28cd7f[_0x5197b2(0x23c)]-0x1,_0x4a1546;_0xac875e>=0x0;_0xac875e--)(_0x4a1546=_0x28cd7f[_0xac875e])&&(_0x517a13=_0x4a1546(_0x517a13)||_0x517a13);return _0x517a13;},_0x9631c0=(_0x1d7d98,_0x187cd2)=>(_0x4915e3,_0x38b8fc)=>_0x187cd2(_0x4915e3,_0x38b8fc,_0x1d7d98),_0xe9441=(_0x59231f,_0x15bb1b,_0x1f9124)=>_0xf95243(_0x59231f,typeof _0x15bb1b!='symbol'?_0x15bb1b+'':_0x15bb1b,_0x1f9124);_0x2845e5[_0x4e3d65(0x232)]=class extends _0x1b5fb0['Plugin']{constructor(_0x688da0=_0x1767a4,_0x1be308,_0x513f0a){const _0x1b025c=_0x4e3d65;super(),this[_0x1b025c(0x25c)]=_0x688da0,this[_0x1b025c(0x243)]=_0x1be308,this[_0x1b025c(0x25f)]=_0x513f0a;const {..._0x12d38a}=_0x1b5fb0[_0x1b025c(0x26a)]({},_0x1767a4,this[_0x1b025c(0x25c)]);this['_configService'][_0x1b025c(0x1ee)](_0x5b2358,_0x12d38a);}['onStarting'](){const _0x27165c=_0x4e3d65;[[_0xcf1639],[_0x5dbf72],[_0x39a0a6]][_0x27165c(0x265)](_0x4fd03e=>{const _0x110214=_0x27165c;this[_0x110214(0x243)][_0x110214(0x262)](_0x4fd03e);});}[_0x4e3d65(0x225)](){const _0x22a19a=_0x4e3d65;this[_0x22a19a(0x243)][_0x22a19a(0x238)](_0x5dbf72),this[_0x22a19a(0x243)][_0x22a19a(0x238)](_0x39a0a6);}},_0xe9441(_0x2845e5[_0x4e3d65(0x232)],'pluginName',_0x465670),_0xe9441(_0x2845e5['UniverThreadCommentDataSourcePlugin'],_0x4e3d65(0x248),_0x1b5fb0[_0x4e3d65(0x1f3)][_0x4e3d65(0x214)]),_0x2845e5[_0x4e3d65(0x232)]=_0x5eeab4([_0x1b5fb0[_0x4e3d65(0x240)](_0x3ad4ec[_0x4e3d65(0x237)],_0x509d44[_0x4e3d65(0x21b)],_0x1b1acc[_0x4e3d65(0x1fa)]),_0x9631c0(0x1,_0x1b5fb0[_0x4e3d65(0x235)](_0x1b5fb0['Injector'])),_0x9631c0(0x2,_0x1b5fb0[_0x4e3d65(0x224)])],_0x2845e5[_0x4e3d65(0x232)]),Object[_0x4e3d65(0x234)](_0x2845e5,Symbol[_0x4e3d65(0x223)],{'value':_0x4e3d65(0x1ec)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.7.0-nightly.
|
|
3
|
+
"version": "0.7.0-nightly.202505251606",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.7.0-nightly.
|
|
49
|
-
"@univerjs-pro/license": "0.7.0-nightly.
|
|
50
|
-
"@univerjs/core": "0.7.0-nightly.
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.7.0-nightly.202505251606",
|
|
49
|
+
"@univerjs-pro/license": "0.7.0-nightly.202505251606",
|
|
50
|
+
"@univerjs/core": "0.7.0-nightly.202505251606",
|
|
51
|
+
"@univerjs/network": "0.7.0-nightly.202505251606",
|
|
51
52
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
52
|
-
"@univerjs/thread-comment": "0.7.0-nightly.
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.7.0-nightly.
|
|
54
|
-
"@univerjs/network": "0.7.0-nightly.202505241606"
|
|
53
|
+
"@univerjs/thread-comment": "0.7.0-nightly.202505251606",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.7.0-nightly.202505251606"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|