@univerjs-pro/thread-comment-datasource 0.9.2 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +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 +9 -9
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function _0x154d(_0x964fa3,_0x4b2814){const _0x27bfea=_0x27bf();return _0x154d=function(_0x154da2,_0x1f5e06){_0x154da2=_0x154da2-0xf8;let _0x283ff9=_0x27bfea[_0x154da2];return _0x283ff9;},_0x154d(_0x964fa3,_0x4b2814);}const _0x1cdece=_0x154d;(function(_0x4a1b3e,_0x55a7a5){const _0x4038c3=_0x154d,_0x42aba7=_0x4a1b3e();while(!![]){try{const _0x3378f1=parseInt(_0x4038c3(0x110))/0x1+parseInt(_0x4038c3(0x11f))/0x2+parseInt(_0x4038c3(0x12d))/0x3+parseInt(_0x4038c3(0x101))/0x4+parseInt(_0x4038c3(0x141))/0x5+parseInt(_0x4038c3(0x122))/0x6*(-parseInt(_0x4038c3(0x115))/0x7)+parseInt(_0x4038c3(0x160))/0x8*(-parseInt(_0x4038c3(0x12f))/0x9);if(_0x3378f1===_0x55a7a5)break;else _0x42aba7['push'](_0x42aba7['shift']());}catch(_0x5128ee){_0x42aba7['push'](_0x42aba7['shift']());}}}(_0x27bf,0x712ab));Object[_0x1cdece(0x12e)](exports,Symbol[_0x1cdece(0x111)],{'value':_0x1cdece(0x134)});function _0x27bf(){const _0x29c928=['Inject','body','1925574vRjHuN','_threadCommentDataSourceService','length','unitId','bufferTime','commentUpdate$','replies','payload','getComment','Delete','add','487335uwUWyG','defineProperty','9RGlLtV','Plugin','/universer-api/comment/unit/','type','replyId','Module','size','IThreadCommentDataSourceService','disposeWithMe','_threadCommentDataSource','updateComment','/add','_configService','/delete','rangeType','/solved','_sessionService','customRanges','361145BryIfe','OpenOrReOpen','filter','COMMENT','comment','userId','Unknown','CustomRangeType','_threadCommentModel','threadId','DependentOn','UniverThreadCommentDataSourcePlugin','userID','user','reply','YYYY/MM/DD\x20HH:mm','dataSource','UNRECOGNIZED','UniverThreadCommentUIPlugin','error','onStarting','_injector','_httpService','addComment','thread-comment-data-source.config','UniverInstanceType','getMemberID','/list','subscribe','requireSession','addUser','4485752aiYdZy','post','Disposable','_commentService','parentId','listComments','Solved','map','UNIVER_UNKNOWN','deleteComment','root','CollaborationSessionService','IConfigService','getUnit','UserManagerService','format','_initDataSource','CommentService','syncUpdateMutationToColla','dayjs','getOwnPropertyDescriptor','createTimestamp','solved','getUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_init','1414984EDOTdi','Edit','forEach','get','resolved','HTTPService','Add','code','slice','getCurrentUser','rangeId','content','Reply','_config','setConfig','265910WrinAP','toStringTag','Injector','find','_initUserSync','14osAUJY','UniverLicensePlugin','onReady','pluginName','_userService','stringify','Solve','pipe','comments','/universer-api/user/list','1623556ZlRzjx'];_0x27bf=function(){return _0x29c928;};return _0x27bf();}const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x1cdece(0xff);var I=(_0x9b81c8=>(_0x9b81c8[_0x9b81c8[_0x1cdece(0x142)]=0x0]=_0x1cdece(0x142),_0x9b81c8[_0x9b81c8['Solved']=0x1]=_0x1cdece(0x166),_0x9b81c8[_0x9b81c8['UNRECOGNIZED']=-0x1]=_0x1cdece(0x152),_0x9b81c8))(I||{}),v=(_0x498ae7=>(_0x498ae7[_0x498ae7[_0x1cdece(0x147)]=0x0]=_0x1cdece(0x147),_0x498ae7[_0x498ae7[_0x1cdece(0x107)]=0x1]=_0x1cdece(0x107),_0x498ae7[_0x498ae7[_0x1cdece(0x10d)]=0x2]=_0x1cdece(0x10d),_0x498ae7[_0x498ae7[_0x1cdece(0x102)]=0x3]=_0x1cdece(0x102),_0x498ae7[_0x498ae7['Delete']=0x4]=_0x1cdece(0x12b),_0x498ae7[_0x498ae7[_0x1cdece(0x11b)]=0x5]=_0x1cdece(0x11b),_0x498ae7[_0x498ae7[_0x1cdece(0x152)]=-0x1]=_0x1cdece(0x152),_0x498ae7))(v||{});const f=_0x205ced=>c[_0x1cdece(0xfa)](new Date(+_0x205ced))[_0x1cdece(0x16f)](_0x1cdece(0x150)),R=async(_0x2160ae,_0x13f704)=>{const _0x2f4b7a=_0x1cdece,_0x41e62a=_0x2160ae[_0x2f4b7a(0x104)](c[_0x2f4b7a(0x16e)]),_0x39b5d9=_0x2160ae[_0x2f4b7a(0x104)](P[_0x2f4b7a(0x106)]);_0x13f704[_0x2f4b7a(0x103)](_0x47ec22=>{const _0x217a33=_0x2f4b7a;_0x41e62a[_0x217a33(0xfe)](_0x47ec22)&&_0x13f704['delete'](_0x47ec22);}),_0x13f704[_0x2f4b7a(0x135)]&&(await _0x39b5d9[_0x2f4b7a(0x104)](_0x2f4b7a(0x11e),{'params':{'userIDs':[..._0x13f704]}}))['body']['users'][_0x2f4b7a(0x103)](_0x1297ad=>{const _0x58ab69=_0x2f4b7a;_0x1297ad&&_0x41e62a[_0x58ab69(0x15f)](_0x1297ad);});};var $=Object[_0x1cdece(0xfb)],E=(_0x2d9da3,_0x460848,_0x1e027e,_0x12ab78)=>{for(var _0x532b86=_0x12ab78>0x1?void 0x0:_0x12ab78?$(_0x460848,_0x1e027e):_0x460848,_0x326f93=_0x2d9da3['length']-0x1,_0x1211ff;_0x326f93>=0x0;_0x326f93--)(_0x1211ff=_0x2d9da3[_0x326f93])&&(_0x532b86=_0x1211ff(_0x532b86)||_0x532b86);return _0x532b86;},S=(_0x4e48ca,_0x50a9d9)=>(_0x1c3054,_0x3ff8cc)=>_0x50a9d9(_0x1c3054,_0x3ff8cc,_0x4e48ca);let p=class extends c['Disposable']{constructor(_0x5e66ba,_0x3cdf92,_0x3b7156,_0x2a1d42){const _0x1fb3a4=_0x1cdece;super(),this[_0x1fb3a4(0x163)]=_0x5e66ba,this[_0x1fb3a4(0x149)]=_0x3cdf92,this[_0x1fb3a4(0x119)]=_0x3b7156,this[_0x1fb3a4(0x156)]=_0x2a1d42,this[_0x1fb3a4(0x100)](),this[_0x1fb3a4(0x114)]();}[_0x1cdece(0x114)](){const _0x4cd5a5=_0x1cdece;this[_0x4cd5a5(0x137)](this[_0x4cd5a5(0x149)][_0x4cd5a5(0x127)][_0x4cd5a5(0x11c)](w[_0x4cd5a5(0x126)](0x10))['subscribe'](_0x4f99b9=>{const _0x130571=_0x4cd5a5,_0x5a8002=new Set();_0x4f99b9[_0x130571(0x103)](_0x31c19c=>{const _0x681396=_0x130571;switch(_0x31c19c[_0x681396(0x132)]){case _0x681396(0x12c):{const _0x6e8a49=_0x31c19c[_0x681396(0x129)]['personId'];_0x5a8002[_0x681396(0x12c)](_0x6e8a49);break;}}}),R(this[_0x130571(0x156)],_0x5a8002);}));}[_0x1cdece(0x100)](){const _0x4e8600=_0x1cdece;this[_0x4e8600(0x137)](this[_0x4e8600(0x163)][_0x4e8600(0x127)][_0x4e8600(0x15d)](async _0x3858a3=>{const _0x217a7e=_0x4e8600;var _0x166ff9,_0x3185a1,_0x44375f,_0x447faf;const _0x4982d3=(_0x166ff9=this[_0x217a7e(0x149)][_0x217a7e(0x16d)](_0x3858a3[_0x217a7e(0x125)])[_0x217a7e(0x113)](_0x5e911f=>_0x5e911f[_0x217a7e(0x14a)]===_0x3858a3['threadId']))==null?void 0x0:_0x166ff9[_0x217a7e(0x16a)];if(!_0x4982d3)return;const {unitId:_0x313877,subUnitId:_0x596427}=_0x4982d3;switch(_0x3858a3[_0x217a7e(0x14e)]&&this['_userService'][_0x217a7e(0x15f)](_0x3858a3[_0x217a7e(0x14e)]),_0x3858a3[_0x217a7e(0x132)]){case v[_0x217a7e(0x107)]:break;case v[_0x217a7e(0x10d)]:{this['_threadCommentModel'][_0x217a7e(0x158)](_0x313877,_0x596427,{'unitId':_0x313877,'subUnitId':_0x596427,'ref':'','id':_0x3858a3[_0x217a7e(0x133)],'dT':f(+_0x3858a3['createTimestamp']),'threadId':_0x3858a3[_0x217a7e(0x14a)],'personId':(_0x44375f=(_0x3185a1=_0x3858a3['user'])==null?void 0x0:_0x3185a1[_0x217a7e(0x14d)])!=null?_0x44375f:_0x3858a3[_0x217a7e(0x146)],'text':JSON['parse'](_0x3858a3[_0x217a7e(0x10c)]),'parentId':_0x4982d3['id']});break;}case v[_0x217a7e(0x12b)]:{const _0x3f3ddb=this[_0x217a7e(0x149)][_0x217a7e(0x12a)](_0x313877,_0x596427,_0x3858a3['replyId']);_0x3f3ddb&&_0x3f3ddb[_0x217a7e(0x164)]&&this['_threadCommentModel']['deleteComment'](_0x313877,_0x596427,_0x3858a3[_0x217a7e(0x133)]);break;}case v[_0x217a7e(0x102)]:{this[_0x217a7e(0x149)][_0x217a7e(0x139)](_0x313877,_0x596427,{'commentId':_0x3858a3[_0x217a7e(0x133)],'text':JSON['parse'](_0x3858a3['content'])});break;}case v['Solve']:{const _0x20326f=(_0x447faf=this['_threadCommentModel'][_0x217a7e(0x16d)](_0x3858a3['unitId'])['find'](_0x5f1975=>_0x5f1975[_0x217a7e(0x14a)]===_0x3858a3[_0x217a7e(0x14a)]))==null?void 0x0:_0x447faf[_0x217a7e(0x16a)];_0x20326f&&this[_0x217a7e(0x149)]['resolveComment'](_0x313877,_0x596427,_0x20326f['id'],_0x3858a3[_0x217a7e(0xfd)]===I[_0x217a7e(0x166)]);break;}}}));}};p=E([S(0x0,c[_0x1cdece(0x120)](b[_0x1cdece(0xf8)])),S(0x1,c[_0x1cdece(0x120)](M['ThreadCommentModel'])),S(0x2,c[_0x1cdece(0x120)](c[_0x1cdece(0x16e)])),S(0x3,c[_0x1cdece(0x120)](c[_0x1cdece(0x112)]))],p);const q=_0x1cdece(0x159),D={};var A=Object[_0x1cdece(0xfb)],x=(_0x39797c,_0x4b75e4,_0xfe5d86,_0x519f8c)=>{const _0x1b3acf=_0x1cdece;for(var _0xa10a53=_0x519f8c>0x1?void 0x0:_0x519f8c?A(_0x4b75e4,_0xfe5d86):_0x4b75e4,_0x2fc488=_0x39797c[_0x1b3acf(0x124)]-0x1,_0x4da0b4;_0x2fc488>=0x0;_0x2fc488--)(_0x4da0b4=_0x39797c[_0x2fc488])&&(_0xa10a53=_0x4da0b4(_0xa10a53)||_0xa10a53);return _0xa10a53;},_=(_0x58dcd7,_0x3fa1ae)=>(_0x42a870,_0x5ef034)=>_0x3fa1ae(_0x42a870,_0x5ef034,_0x58dcd7);function Y(_0x539976,_0xbc8b85){const _0x2ab75a=_0x1cdece,_0xc19200=_0x539976[_0x2ab75a(0x128)][0x0];return{..._0xbc8b85,'id':_0xc19200[_0x2ab75a(0x133)],'resolved':_0x539976[_0x2ab75a(0xfd)]===0x1,'dT':f(_0xc19200[_0x2ab75a(0xfc)]),'personId':_0xc19200['userId'],'threadId':_0xc19200[_0x2ab75a(0x14a)]};}function G(_0x1e12bb,_0xa59bee,_0x153b3a){const _0x41b7a6=_0x1cdece;var _0x15668e,_0x51c009;if(((_0x51c009=(_0x15668e=_0x1e12bb==null?void 0x0:_0x1e12bb[_0x41b7a6(0x128)])==null?void 0x0:_0x15668e[_0x41b7a6(0x124)])!=null?_0x51c009:0x0)>0x0){const _0x351812=(_0x54f8a3,_0xae6f83)=>({'id':_0x54f8a3[_0x41b7a6(0x133)],'threadId':_0x54f8a3[_0x41b7a6(0x14a)],'dT':f(_0x54f8a3['createTimestamp']),'personId':_0x54f8a3[_0x41b7a6(0x146)],'resolved':_0x1e12bb[_0x41b7a6(0xfd)]===I['Solved'],'unitId':_0xa59bee,'subUnitId':_0x153b3a,'text':JSON['parse'](_0x54f8a3['content']),'parentId':_0xae6f83}),_0x56c4de=_0x351812(_0x1e12bb[_0x41b7a6(0x128)][0x0]);return{..._0x56c4de,'children':_0x1e12bb[_0x41b7a6(0x128)][_0x41b7a6(0x109)](0x1)[_0x41b7a6(0x167)](_0x2c7e1b=>_0x351812(_0x2c7e1b,_0x56c4de['id']))};}return null;}let g=class{constructor(_0x566e26,_0x4b8a12,_0x5c42ca,_0x228291){const _0x25b0f8=_0x1cdece;this[_0x25b0f8(0x157)]=_0x566e26,this['_userService']=_0x4b8a12,this['_sessionService']=_0x5c42ca,this[_0x25b0f8(0x156)]=_0x228291;}async[_0x1cdece(0x158)](_0x468c9d){const _0x4dbec8=_0x1cdece;var _0x1dfce3,_0x1ed8cb;const {parentId:_0x19009f,unitId:_0x3850a9,text:_0x560911,threadId:_0x47c88a}=_0x468c9d,_0x4dce38=(_0x1ed8cb=(_0x1dfce3=_0x560911['customRanges'])==null?void 0x0:_0x1dfce3[_0x4dbec8(0x143)](_0x166642=>_0x166642[_0x4dbec8(0x13d)]===c['CustomRangeType'][_0x4dbec8(0x144)])[_0x4dbec8(0x167)](_0x127664=>_0x127664[_0x4dbec8(0x10b)]))!=null?_0x1ed8cb:[],_0x5c821e=JSON['stringify'](_0x560911),_0x273c0b=(await this[_0x4dbec8(0x13f)][_0x4dbec8(0x15e)](_0x3850a9))[_0x4dbec8(0x15b)]();if(_0x19009f){const _0x5538cd={'memberId':_0x273c0b,'unitId':_0x3850a9,'content':_0x5c821e,'mention':_0x4dce38,'threadId':_0x47c88a},_0x19a1a=(await this[_0x4dbec8(0x157)][_0x4dbec8(0x161)](_0x4dbec8(0x131)+_0x3850a9+'/reply',{'body':_0x5538cd}))['body'][_0x4dbec8(0x14f)];return{..._0x468c9d,'id':_0x19a1a[_0x4dbec8(0x133)],'dT':c[_0x4dbec8(0xfa)](+_0x19a1a['createTimestamp'])[_0x4dbec8(0x16f)](_0x4dbec8(0x150)),'personId':_0x19a1a['userId']};}else{const _0x404a47={'memberId':_0x273c0b,'unitId':_0x3850a9,'content':_0x5c821e,'mention':_0x4dce38},_0x5b5af9=await this['_httpService'][_0x4dbec8(0x161)]('/universer-api/comment/unit/'+_0x3850a9+_0x4dbec8(0x13a),{'body':_0x404a47});return Y(_0x5b5af9[_0x4dbec8(0x121)][_0x4dbec8(0x145)],_0x468c9d);}}async[_0x1cdece(0x139)](_0x300020){const _0xdf3f14=_0x1cdece;var _0x3b86a6,_0x343760;const {text:_0x388880,unitId:_0x5aa23d}=_0x300020,_0x56e823=(_0x343760=(_0x3b86a6=_0x388880[_0xdf3f14(0x140)])==null?void 0x0:_0x3b86a6['filter'](_0xce2df8=>_0xce2df8[_0xdf3f14(0x13d)]===c[_0xdf3f14(0x148)][_0xdf3f14(0x144)])[_0xdf3f14(0x167)](_0x5a04d7=>_0x5a04d7['rangeId']))!=null?_0x343760:[],_0x283bef=JSON[_0xdf3f14(0x11a)](_0x388880),_0x1329c5=_0x300020[_0xdf3f14(0x14a)],_0x54a21d=_0x300020['id'],_0x53e41d={'memberId':(await this['_sessionService'][_0xdf3f14(0x15e)](_0x5aa23d))['getMemberID'](),'unitId':_0x5aa23d,'threadId':_0x1329c5,'mention':_0x56e823,'content':_0x283bef,'replyId':_0x54a21d},_0x5cb09b=await this[_0xdf3f14(0x157)][_0xdf3f14(0x161)](_0xdf3f14(0x131)+_0x5aa23d+'/edit',{'body':_0x53e41d});return!_0x5cb09b[_0xdf3f14(0x121)]['error']||_0x5cb09b[_0xdf3f14(0x121)][_0xdf3f14(0x154)][_0xdf3f14(0x108)]===0x1;}async['resolveComment'](_0x27d730){const _0xf810fa=_0x1cdece,{unitId:_0x4dbc09}=_0x27d730,_0x294e20=_0x27d730[_0xf810fa(0x14a)],_0x243e45={'memberId':this[_0xf810fa(0x119)][_0xf810fa(0x10a)]()[_0xf810fa(0x14d)],'unitId':_0x4dbc09,'threadId':_0x294e20,'solved':_0x27d730[_0xf810fa(0x105)]?I[_0xf810fa(0x166)]:I[_0xf810fa(0x142)]},_0x1d0096=await this[_0xf810fa(0x157)][_0xf810fa(0x161)]('/universer-api/comment/unit/'+_0x4dbc09+_0xf810fa(0x13e),{'body':_0x243e45});return!_0x1d0096['body'][_0xf810fa(0x154)]||_0x1d0096[_0xf810fa(0x121)][_0xf810fa(0x154)][_0xf810fa(0x108)]===0x1;}async[_0x1cdece(0x169)](_0x161750,_0x5966e9,_0x109b11,_0x1e0a92){const _0xd049e8=_0x1cdece,_0x24761c={'memberId':(await this[_0xd049e8(0x13f)][_0xd049e8(0x15e)](_0x161750))[_0xd049e8(0x15b)](),'threadId':_0x109b11,'replyId':_0x1e0a92,'unitId':_0x161750},_0x568120=await this[_0xd049e8(0x157)][_0xd049e8(0x161)](_0xd049e8(0x131)+_0x161750+_0xd049e8(0x13c),{'body':_0x24761c});return!_0x568120['body']['error']||_0x568120[_0xd049e8(0x121)][_0xd049e8(0x154)][_0xd049e8(0x108)]===0x1;}async[_0x1cdece(0x165)](_0x528d11,_0xfa5bd3,_0x359e70){const _0xecf4f=_0x1cdece,_0x534d6d={'unitId':_0x528d11,'threadId':_0x359e70},_0x4e224b=await this[_0xecf4f(0x157)][_0xecf4f(0x161)](_0xecf4f(0x131)+_0x528d11+_0xecf4f(0x15c),{'body':_0x534d6d}),_0xaf194c=_0x359e70['map'](_0x9c682e=>G(_0x4e224b[_0xecf4f(0x121)][_0xecf4f(0x11d)][_0x9c682e],_0x528d11,_0xfa5bd3))[_0xecf4f(0x143)](Boolean);return Object['values'](_0x4e224b[_0xecf4f(0x121)]['users'])[_0xecf4f(0x103)](_0x2badab=>{const _0x15cecc=_0xecf4f;this[_0x15cecc(0x119)][_0x15cecc(0x15f)](_0x2badab);}),_0xaf194c;}['saveCommentToSnapshot'](_0x1556c9){const _0x26cd28=_0x1cdece;return{'id':_0x1556c9['id'],'threadId':_0x1556c9[_0x26cd28(0x14a)],'ref':_0x1556c9['ref']};}};g=x([_(0x0,c[_0x1cdece(0x120)](P['HTTPService'])),_(0x1,c[_0x1cdece(0x120)](c['UserManagerService'])),_(0x2,c[_0x1cdece(0x120)](b[_0x1cdece(0x16b)])),_(0x3,c['Inject'](c['Injector']))],g);var H=Object[_0x1cdece(0xfb)],J=(_0x533032,_0x4f0731,_0x5ec73b,_0x40dcf7)=>{const _0x35f5ff=_0x1cdece;for(var _0x3119e6=_0x40dcf7>0x1?void 0x0:_0x40dcf7?H(_0x4f0731,_0x5ec73b):_0x4f0731,_0x650bf6=_0x533032[_0x35f5ff(0x124)]-0x1,_0x172e11;_0x650bf6>=0x0;_0x650bf6--)(_0x172e11=_0x533032[_0x650bf6])&&(_0x3119e6=_0x172e11(_0x3119e6)||_0x3119e6);return _0x3119e6;},y=(_0x35453e,_0x2f0e55)=>(_0x49ab9b,_0x50e254)=>_0x2f0e55(_0x49ab9b,_0x50e254,_0x35453e);let C=class extends c[_0x1cdece(0x162)]{constructor(_0x22f54e,_0x5e3926){const _0x159814=_0x1cdece;super(),this[_0x159814(0x123)]=_0x22f54e,this[_0x159814(0x138)]=_0x5e3926,this['_initDataSource']();}[_0x1cdece(0x170)](){const _0x16087b=_0x1cdece;this['_threadCommentDataSourceService'][_0x16087b(0x151)]=this['_threadCommentDataSource'],this[_0x16087b(0x123)][_0x16087b(0xf9)]=!0x1;}};C=J([y(0x0,M[_0x1cdece(0x136)]),y(0x1,c[_0x1cdece(0x120)](g))],C);var F=Object[_0x1cdece(0x12e)],L=Object[_0x1cdece(0xfb)],Z=(_0x141202,_0x33f99f,_0x3f2a81)=>_0x33f99f in _0x141202?F(_0x141202,_0x33f99f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3f2a81}):_0x141202[_0x33f99f]=_0x3f2a81,W=(_0x3c3207,_0x516a3d,_0x29fde6,_0x8fa4b5)=>{const _0x3d53f8=_0x1cdece;for(var _0x3dce79=_0x8fa4b5>0x1?void 0x0:_0x8fa4b5?L(_0x516a3d,_0x29fde6):_0x516a3d,_0x189abd=_0x3c3207[_0x3d53f8(0x124)]-0x1,_0x38e621;_0x189abd>=0x0;_0x189abd--)(_0x38e621=_0x3c3207[_0x189abd])&&(_0x3dce79=_0x38e621(_0x3dce79)||_0x3dce79);return _0x3dce79;},O=(_0x12cfe2,_0x565765)=>(_0x2ad9d3,_0x543848)=>_0x565765(_0x2ad9d3,_0x543848,_0x12cfe2),N=(_0x5638c7,_0x5c6e0f,_0x45823c)=>Z(_0x5638c7,typeof _0x5c6e0f!='symbol'?_0x5c6e0f+'':_0x5c6e0f,_0x45823c);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x1cdece(0x130)]{constructor(_0x12bdf6=D,_0x59d21a,_0x47225f){const _0x115432=_0x1cdece;super(),this[_0x115432(0x10e)]=_0x12bdf6,this[_0x115432(0x156)]=_0x59d21a,this[_0x115432(0x13b)]=_0x47225f;const {..._0x1d2680}=c['merge']({},D,this['_config']);this[_0x115432(0x13b)][_0x115432(0x10f)](q,_0x1d2680);}[_0x1cdece(0x155)](){const _0x23a3e3=_0x1cdece;[[g],[C],[p]][_0x23a3e3(0x103)](_0x18acf7=>{const _0x534c8b=_0x23a3e3;this[_0x534c8b(0x156)][_0x534c8b(0x12c)](_0x18acf7);});}[_0x1cdece(0x117)](){const _0x133745=_0x1cdece;this[_0x133745(0x156)][_0x133745(0x104)](C),this[_0x133745(0x156)][_0x133745(0x104)](p);}},N(exports[_0x1cdece(0x14c)],_0x1cdece(0x118),U),N(exports[_0x1cdece(0x14c)],_0x1cdece(0x132),c[_0x1cdece(0x15a)][_0x1cdece(0x168)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x1cdece(0x14b)](j[_0x1cdece(0x153)],b['UniverCollaborationClientPlugin'],T[_0x1cdece(0x116)]),O(0x1,c[_0x1cdece(0x120)](c[_0x1cdece(0x112)])),O(0x2,c[_0x1cdece(0x16c)])],exports[_0x1cdece(0x14c)]);
|
|
1
|
+
'use strict';const _0x537e25=_0x28fc;(function(_0x3d7770,_0x3ca40f){const _0x1b99c0=_0x28fc,_0x5735e2=_0x3d7770();while(!![]){try{const _0x569e07=parseInt(_0x1b99c0(0xc0))/0x1*(parseInt(_0x1b99c0(0x10e))/0x2)+-parseInt(_0x1b99c0(0xbf))/0x3*(parseInt(_0x1b99c0(0x11b))/0x4)+-parseInt(_0x1b99c0(0x123))/0x5+-parseInt(_0x1b99c0(0x116))/0x6*(parseInt(_0x1b99c0(0xdb))/0x7)+parseInt(_0x1b99c0(0x105))/0x8*(parseInt(_0x1b99c0(0xd9))/0x9)+parseInt(_0x1b99c0(0x10c))/0xa+parseInt(_0x1b99c0(0xf7))/0xb*(parseInt(_0x1b99c0(0x103))/0xc);if(_0x569e07===_0x3ca40f)break;else _0x5735e2['push'](_0x5735e2['shift']());}catch(_0x36b8a1){_0x5735e2['push'](_0x5735e2['shift']());}}}(_0x43e7,0x57a5f));Object[_0x537e25(0xaf)](exports,Symbol[_0x537e25(0x111)],{'value':_0x537e25(0x126)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x537e25(0xb0);var I=(_0x2f6e2b=>(_0x2f6e2b[_0x2f6e2b['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x2f6e2b[_0x2f6e2b[_0x537e25(0xac)]=0x1]=_0x537e25(0xac),_0x2f6e2b[_0x2f6e2b['UNRECOGNIZED']=-0x1]=_0x537e25(0xf2),_0x2f6e2b))(I||{}),v=(_0x241dc0=>(_0x241dc0[_0x241dc0[_0x537e25(0x114)]=0x0]='Unknown',_0x241dc0[_0x241dc0['Add']=0x1]=_0x537e25(0xd4),_0x241dc0[_0x241dc0[_0x537e25(0x102)]=0x2]=_0x537e25(0x102),_0x241dc0[_0x241dc0[_0x537e25(0xc9)]=0x3]=_0x537e25(0xc9),_0x241dc0[_0x241dc0[_0x537e25(0x119)]=0x4]=_0x537e25(0x119),_0x241dc0[_0x241dc0['Solve']=0x5]='Solve',_0x241dc0[_0x241dc0[_0x537e25(0xf2)]=-0x1]=_0x537e25(0xf2),_0x241dc0))(v||{});const f=_0x599bf6=>c[_0x537e25(0xe1)](new Date(+_0x599bf6))['format'](_0x537e25(0xff)),R=async(_0x5b01e5,_0x554425)=>{const _0x148884=_0x537e25,_0x55092e=_0x5b01e5['get'](c[_0x148884(0xd7)]),_0xe91d8f=_0x5b01e5[_0x148884(0x109)](P['HTTPService']);_0x554425[_0x148884(0xe9)](_0x223e37=>{const _0x3e35c0=_0x148884;_0x55092e[_0x3e35c0(0xf9)](_0x223e37)&&_0x554425[_0x3e35c0(0x104)](_0x223e37);}),_0x554425[_0x148884(0x124)]&&(await _0xe91d8f[_0x148884(0x109)](_0x148884(0xd0),{'params':{'userIDs':[..._0x554425]}}))[_0x148884(0xe0)][_0x148884(0xf8)][_0x148884(0xe9)](_0x4b8757=>{const _0x99ae40=_0x148884;_0x4b8757&&_0x55092e[_0x99ae40(0xe3)](_0x4b8757);});};function _0x43e7(){const _0x52e6c0=['_initUserSync','getComment','UserManagerService','stringify','289287aIFvOA','userId','29869IdMftz','_config','root','add','rangeType','body','dayjs','getUnit','addUser','pluginName','unitId','map','UNIVER_UNKNOWN','replies','forEach','UniverThreadCommentUIPlugin','_threadCommentDataSourceService','user','/edit','/reply','replyId','/universer-api/comment/unit/','type','UNRECOGNIZED','OpenOrReOpen','IConfigService','_init','parentId','303039LlFzFk','users','getUser','_userService','values','HTTPService','find','_httpService','YYYY/MM/DD\x20HH:mm','UniverLicensePlugin','getOwnPropertyDescriptor','Reply','120xZqsxX','delete','8FlbzwJ','/solved','error','CommentService','get','payload','_commentService','6406120vdakte','merge','159754qOyxDF','customRanges','Disposable','toStringTag','resolved','rangeId','Unknown','Inject','318OksRSt','threadId','createTimestamp','Delete','subscribe','36oLTbjz','code','Solve','DependentOn','length','COMMENT','reply','disposeWithMe','1569295LGTVjU','size','UniverThreadCommentDataSourcePlugin','Module','Solved','addComment','content','defineProperty','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','dataSource','_sessionService','onReady','resolveComment','userID','_injector','post','IThreadCommentDataSourceService','personId','bufferTime','slice','comments','pipe','setConfig','43035RSFaRi','1WklhnS','thread-comment-data-source.config','updateComment','/add','/delete','onStarting','ThreadCommentModel','getCurrentUser','parse','Edit','_configService','saveCommentToSnapshot','_initDataSource','filter','comment','requireSession','/universer-api/user/list','getMemberID','_threadCommentModel','solved','Add'];_0x43e7=function(){return _0x52e6c0;};return _0x43e7();}var $=Object[_0x537e25(0x101)],E=(_0x25f78d,_0x345e63,_0x26fe70,_0x338327)=>{const _0x22f9f1=_0x537e25;for(var _0x2fa20a=_0x338327>0x1?void 0x0:_0x338327?$(_0x345e63,_0x26fe70):_0x345e63,_0x4f2d5d=_0x25f78d[_0x22f9f1(0x11f)]-0x1,_0x3b679f;_0x4f2d5d>=0x0;_0x4f2d5d--)(_0x3b679f=_0x25f78d[_0x4f2d5d])&&(_0x2fa20a=_0x3b679f(_0x2fa20a)||_0x2fa20a);return _0x2fa20a;},S=(_0x3f8610,_0x3ab7f2)=>(_0x3c4136,_0x5c7990)=>_0x3ab7f2(_0x3c4136,_0x5c7990,_0x3f8610);function _0x28fc(_0x20aa04,_0x196297){const _0x43e73e=_0x43e7();return _0x28fc=function(_0x28fce2,_0x502005){_0x28fce2=_0x28fce2-0xac;let _0x143b90=_0x43e73e[_0x28fce2];return _0x143b90;},_0x28fc(_0x20aa04,_0x196297);}let p=class extends c['Disposable']{constructor(_0x436a32,_0x791b2f,_0x32ea79,_0x146f5e){const _0x1dec4b=_0x537e25;super(),this[_0x1dec4b(0x10b)]=_0x436a32,this[_0x1dec4b(0xd2)]=_0x791b2f,this[_0x1dec4b(0xfa)]=_0x32ea79,this[_0x1dec4b(0xb6)]=_0x146f5e,this[_0x1dec4b(0xf5)](),this[_0x1dec4b(0xd5)]();}[_0x537e25(0xd5)](){const _0x25c184=_0x537e25;this[_0x25c184(0x122)](this[_0x25c184(0xd2)]['commentUpdate$'][_0x25c184(0xbd)](w[_0x25c184(0xba)](0x10))[_0x25c184(0x11a)](_0x1044c0=>{const _0x45a007=_0x25c184,_0x53159b=new Set();_0x1044c0[_0x45a007(0xe9)](_0x48357a=>{const _0x287f3e=_0x45a007;switch(_0x48357a['type']){case _0x287f3e(0xde):{const _0x24bb2b=_0x48357a[_0x287f3e(0x10a)][_0x287f3e(0xb9)];_0x53159b[_0x287f3e(0xde)](_0x24bb2b);break;}}}),R(this[_0x45a007(0xb6)],_0x53159b);}));}[_0x537e25(0xf5)](){const _0x6b0ae6=_0x537e25;this[_0x6b0ae6(0x122)](this[_0x6b0ae6(0x10b)]['commentUpdate$'][_0x6b0ae6(0x11a)](async _0x2413c2=>{const _0x118ca4=_0x6b0ae6;var _0x291608,_0x56fc14,_0x3b23d7,_0x24e08f;const _0x29f28a=(_0x291608=this[_0x118ca4(0xd2)][_0x118ca4(0xe2)](_0x2413c2[_0x118ca4(0xe5)])[_0x118ca4(0xfd)](_0x2847a5=>_0x2847a5[_0x118ca4(0x117)]===_0x2413c2[_0x118ca4(0x117)]))==null?void 0x0:_0x291608[_0x118ca4(0xdd)];if(!_0x29f28a)return;const {unitId:_0x52d860,subUnitId:_0x56b0ff}=_0x29f28a;switch(_0x2413c2[_0x118ca4(0xec)]&&this[_0x118ca4(0xfa)][_0x118ca4(0xe3)](_0x2413c2[_0x118ca4(0xec)]),_0x2413c2[_0x118ca4(0xf1)]){case v[_0x118ca4(0xd4)]:break;case v['Reply']:{this[_0x118ca4(0xd2)][_0x118ca4(0xad)](_0x52d860,_0x56b0ff,{'unitId':_0x52d860,'subUnitId':_0x56b0ff,'ref':'','id':_0x2413c2[_0x118ca4(0xef)],'dT':f(+_0x2413c2[_0x118ca4(0x118)]),'threadId':_0x2413c2['threadId'],'personId':(_0x3b23d7=(_0x56fc14=_0x2413c2[_0x118ca4(0xec)])==null?void 0x0:_0x56fc14[_0x118ca4(0xb5)])!=null?_0x3b23d7:_0x2413c2['userId'],'text':JSON['parse'](_0x2413c2[_0x118ca4(0xae)]),'parentId':_0x29f28a['id']});break;}case v[_0x118ca4(0x119)]:{const _0x1a7c0c=this[_0x118ca4(0xd2)][_0x118ca4(0xd6)](_0x52d860,_0x56b0ff,_0x2413c2[_0x118ca4(0xef)]);_0x1a7c0c&&_0x1a7c0c[_0x118ca4(0xf6)]&&this[_0x118ca4(0xd2)]['deleteComment'](_0x52d860,_0x56b0ff,_0x2413c2[_0x118ca4(0xef)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x118ca4(0xc2)](_0x52d860,_0x56b0ff,{'commentId':_0x2413c2[_0x118ca4(0xef)],'text':JSON[_0x118ca4(0xc8)](_0x2413c2['content'])});break;}case v[_0x118ca4(0x11d)]:{const _0x33134f=(_0x24e08f=this[_0x118ca4(0xd2)][_0x118ca4(0xe2)](_0x2413c2['unitId'])['find'](_0x483573=>_0x483573['threadId']===_0x2413c2[_0x118ca4(0x117)]))==null?void 0x0:_0x24e08f[_0x118ca4(0xdd)];_0x33134f&&this['_threadCommentModel'][_0x118ca4(0xb4)](_0x52d860,_0x56b0ff,_0x33134f['id'],_0x2413c2[_0x118ca4(0xd3)]===I[_0x118ca4(0xac)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x537e25(0x108)])),S(0x1,c[_0x537e25(0x115)](M[_0x537e25(0xc6)])),S(0x2,c[_0x537e25(0x115)](c['UserManagerService'])),S(0x3,c[_0x537e25(0x115)](c['Injector']))],p);const q=_0x537e25(0xc1),D={};var A=Object[_0x537e25(0x101)],x=(_0x46b23a,_0x183003,_0x378d78,_0x5ac0e8)=>{for(var _0x2236a4=_0x5ac0e8>0x1?void 0x0:_0x5ac0e8?A(_0x183003,_0x378d78):_0x183003,_0x3e3f30=_0x46b23a['length']-0x1,_0x496946;_0x3e3f30>=0x0;_0x3e3f30--)(_0x496946=_0x46b23a[_0x3e3f30])&&(_0x2236a4=_0x496946(_0x2236a4)||_0x2236a4);return _0x2236a4;},_=(_0x544788,_0x59d85b)=>(_0x460181,_0xe5bcea)=>_0x59d85b(_0x460181,_0xe5bcea,_0x544788);function Y(_0xa4b98b,_0x17c63d){const _0x24f4b6=_0x537e25,_0x361ce3=_0xa4b98b[_0x24f4b6(0xe8)][0x0];return{..._0x17c63d,'id':_0x361ce3['replyId'],'resolved':_0xa4b98b[_0x24f4b6(0xd3)]===0x1,'dT':f(_0x361ce3[_0x24f4b6(0x118)]),'personId':_0x361ce3[_0x24f4b6(0xda)],'threadId':_0x361ce3[_0x24f4b6(0x117)]};}function G(_0xd166dc,_0x15ae85,_0x10ad5e){const _0x4bbde8=_0x537e25;var _0xbb440e,_0x480962;if(((_0x480962=(_0xbb440e=_0xd166dc==null?void 0x0:_0xd166dc['replies'])==null?void 0x0:_0xbb440e['length'])!=null?_0x480962:0x0)>0x0){const _0x18cefd=(_0x598173,_0x2a7359)=>({'id':_0x598173[_0x4bbde8(0xef)],'threadId':_0x598173['threadId'],'dT':f(_0x598173[_0x4bbde8(0x118)]),'personId':_0x598173['userId'],'resolved':_0xd166dc[_0x4bbde8(0xd3)]===I[_0x4bbde8(0xac)],'unitId':_0x15ae85,'subUnitId':_0x10ad5e,'text':JSON[_0x4bbde8(0xc8)](_0x598173[_0x4bbde8(0xae)]),'parentId':_0x2a7359}),_0x2e59fe=_0x18cefd(_0xd166dc[_0x4bbde8(0xe8)][0x0]);return{..._0x2e59fe,'children':_0xd166dc[_0x4bbde8(0xe8)][_0x4bbde8(0xbb)](0x1)[_0x4bbde8(0xe6)](_0x279bf7=>_0x18cefd(_0x279bf7,_0x2e59fe['id']))};}return null;}let g=class{constructor(_0x4fb84d,_0x4b9d39,_0x17ab6a,_0x2d5e5c){const _0x343df8=_0x537e25;this['_httpService']=_0x4fb84d,this[_0x343df8(0xfa)]=_0x4b9d39,this[_0x343df8(0xb2)]=_0x17ab6a,this[_0x343df8(0xb6)]=_0x2d5e5c;}async[_0x537e25(0xad)](_0xc35956){const _0x2d4571=_0x537e25;var _0x37dfe7,_0x9b3a4c;const {parentId:_0x52fdf0,unitId:_0x1ad11d,text:_0x3c89cb,threadId:_0x3a5c6f}=_0xc35956,_0x5a26c4=(_0x9b3a4c=(_0x37dfe7=_0x3c89cb['customRanges'])==null?void 0x0:_0x37dfe7['filter'](_0x5bdf15=>_0x5bdf15['rangeType']===c['CustomRangeType'][_0x2d4571(0x120)])[_0x2d4571(0xe6)](_0x4ae2a9=>_0x4ae2a9[_0x2d4571(0x113)]))!=null?_0x9b3a4c:[],_0x253c2e=JSON['stringify'](_0x3c89cb),_0x1c84ba=(await this[_0x2d4571(0xb2)][_0x2d4571(0xcf)](_0x1ad11d))[_0x2d4571(0xd1)]();if(_0x52fdf0){const _0x5aefae={'memberId':_0x1c84ba,'unitId':_0x1ad11d,'content':_0x253c2e,'mention':_0x5a26c4,'threadId':_0x3a5c6f},_0x200713=(await this[_0x2d4571(0xfe)]['post'](_0x2d4571(0xf0)+_0x1ad11d+_0x2d4571(0xee),{'body':_0x5aefae}))['body'][_0x2d4571(0x121)];return{..._0xc35956,'id':_0x200713['replyId'],'dT':c[_0x2d4571(0xe1)](+_0x200713[_0x2d4571(0x118)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x200713['userId']};}else{const _0x297e05={'memberId':_0x1c84ba,'unitId':_0x1ad11d,'content':_0x253c2e,'mention':_0x5a26c4},_0x5163bb=await this[_0x2d4571(0xfe)][_0x2d4571(0xb7)](_0x2d4571(0xf0)+_0x1ad11d+_0x2d4571(0xc3),{'body':_0x297e05});return Y(_0x5163bb[_0x2d4571(0xe0)][_0x2d4571(0xce)],_0xc35956);}}async[_0x537e25(0xc2)](_0x106ec9){const _0x2d6a23=_0x537e25;var _0x457b86,_0x4aa8f7;const {text:_0x3ae864,unitId:_0x482cc4}=_0x106ec9,_0x5eecc1=(_0x4aa8f7=(_0x457b86=_0x3ae864[_0x2d6a23(0x10f)])==null?void 0x0:_0x457b86[_0x2d6a23(0xcd)](_0x1e2b3c=>_0x1e2b3c[_0x2d6a23(0xdf)]===c['CustomRangeType'][_0x2d6a23(0x120)])['map'](_0x213ae3=>_0x213ae3[_0x2d6a23(0x113)]))!=null?_0x4aa8f7:[],_0x2274a0=JSON[_0x2d6a23(0xd8)](_0x3ae864),_0x551287=_0x106ec9['threadId'],_0x37e2b3=_0x106ec9['id'],_0x36fafc={'memberId':(await this[_0x2d6a23(0xb2)][_0x2d6a23(0xcf)](_0x482cc4))[_0x2d6a23(0xd1)](),'unitId':_0x482cc4,'threadId':_0x551287,'mention':_0x5eecc1,'content':_0x2274a0,'replyId':_0x37e2b3},_0x10f10a=await this['_httpService'][_0x2d6a23(0xb7)](_0x2d6a23(0xf0)+_0x482cc4+_0x2d6a23(0xed),{'body':_0x36fafc});return!_0x10f10a[_0x2d6a23(0xe0)][_0x2d6a23(0x107)]||_0x10f10a[_0x2d6a23(0xe0)]['error'][_0x2d6a23(0x11c)]===0x1;}async['resolveComment'](_0x38c9a9){const _0x3d63d8=_0x537e25,{unitId:_0x4444d6}=_0x38c9a9,_0x219343=_0x38c9a9[_0x3d63d8(0x117)],_0x44f15c={'memberId':this['_userService'][_0x3d63d8(0xc7)]()[_0x3d63d8(0xb5)],'unitId':_0x4444d6,'threadId':_0x219343,'solved':_0x38c9a9[_0x3d63d8(0x112)]?I[_0x3d63d8(0xac)]:I[_0x3d63d8(0xf3)]},_0x1351d7=await this[_0x3d63d8(0xfe)]['post'](_0x3d63d8(0xf0)+_0x4444d6+_0x3d63d8(0x106),{'body':_0x44f15c});return!_0x1351d7[_0x3d63d8(0xe0)][_0x3d63d8(0x107)]||_0x1351d7[_0x3d63d8(0xe0)]['error']['code']===0x1;}async['deleteComment'](_0xb0cb48,_0xf5b0fd,_0x33803c,_0x44fa68){const _0x3a4ec4=_0x537e25,_0x16431a={'memberId':(await this[_0x3a4ec4(0xb2)][_0x3a4ec4(0xcf)](_0xb0cb48))[_0x3a4ec4(0xd1)](),'threadId':_0x33803c,'replyId':_0x44fa68,'unitId':_0xb0cb48},_0x58318=await this[_0x3a4ec4(0xfe)][_0x3a4ec4(0xb7)](_0x3a4ec4(0xf0)+_0xb0cb48+_0x3a4ec4(0xc4),{'body':_0x16431a});return!_0x58318['body'][_0x3a4ec4(0x107)]||_0x58318[_0x3a4ec4(0xe0)][_0x3a4ec4(0x107)][_0x3a4ec4(0x11c)]===0x1;}async['listComments'](_0x2c4ad8,_0x4a695b,_0x5ed734){const _0x4f82ad=_0x537e25,_0x53023c={'unitId':_0x2c4ad8,'threadId':_0x5ed734},_0x30a8bc=await this['_httpService'][_0x4f82ad(0xb7)](_0x4f82ad(0xf0)+_0x2c4ad8+'/list',{'body':_0x53023c}),_0x44a6d9=_0x5ed734[_0x4f82ad(0xe6)](_0xe1820=>G(_0x30a8bc[_0x4f82ad(0xe0)][_0x4f82ad(0xbc)][_0xe1820],_0x2c4ad8,_0x4a695b))[_0x4f82ad(0xcd)](Boolean);return Object[_0x4f82ad(0xfb)](_0x30a8bc[_0x4f82ad(0xe0)][_0x4f82ad(0xf8)])[_0x4f82ad(0xe9)](_0x418acb=>{const _0x570462=_0x4f82ad;this[_0x570462(0xfa)]['addUser'](_0x418acb);}),_0x44a6d9;}[_0x537e25(0xcb)](_0x591586){return{'id':_0x591586['id'],'threadId':_0x591586['threadId'],'ref':_0x591586['ref']};}};g=x([_(0x0,c[_0x537e25(0x115)](P[_0x537e25(0xfc)])),_(0x1,c[_0x537e25(0x115)](c[_0x537e25(0xd7)])),_(0x2,c[_0x537e25(0x115)](b['CollaborationSessionService'])),_(0x3,c['Inject'](c['Injector']))],g);var H=Object[_0x537e25(0x101)],J=(_0xca9081,_0x393739,_0x4926a6,_0x1e62ec)=>{for(var _0x1f3bd=_0x1e62ec>0x1?void 0x0:_0x1e62ec?H(_0x393739,_0x4926a6):_0x393739,_0x3e06ed=_0xca9081['length']-0x1,_0x3f1fb1;_0x3e06ed>=0x0;_0x3e06ed--)(_0x3f1fb1=_0xca9081[_0x3e06ed])&&(_0x1f3bd=_0x3f1fb1(_0x1f3bd)||_0x1f3bd);return _0x1f3bd;},y=(_0x510d14,_0xe382f1)=>(_0x5bc488,_0x5aba03)=>_0xe382f1(_0x5bc488,_0x5aba03,_0x510d14);let C=class extends c[_0x537e25(0x110)]{constructor(_0x41313a,_0xcf6f00){const _0x38f279=_0x537e25;super(),this['_threadCommentDataSourceService']=_0x41313a,this['_threadCommentDataSource']=_0xcf6f00,this[_0x38f279(0xcc)]();}[_0x537e25(0xcc)](){const _0x43fcdf=_0x537e25;this[_0x43fcdf(0xeb)][_0x43fcdf(0xb1)]=this['_threadCommentDataSource'],this[_0x43fcdf(0xeb)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x537e25(0xb8)]),y(0x1,c[_0x537e25(0x115)](g))],C);var F=Object[_0x537e25(0xaf)],L=Object[_0x537e25(0x101)],Z=(_0x483c4c,_0x561605,_0x19c3c9)=>_0x561605 in _0x483c4c?F(_0x483c4c,_0x561605,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x19c3c9}):_0x483c4c[_0x561605]=_0x19c3c9,W=(_0x1dccb7,_0x2e8fcc,_0x548089,_0x3429dd)=>{for(var _0x3e8f5b=_0x3429dd>0x1?void 0x0:_0x3429dd?L(_0x2e8fcc,_0x548089):_0x2e8fcc,_0x97b84d=_0x1dccb7['length']-0x1,_0x129f1c;_0x97b84d>=0x0;_0x97b84d--)(_0x129f1c=_0x1dccb7[_0x97b84d])&&(_0x3e8f5b=_0x129f1c(_0x3e8f5b)||_0x3e8f5b);return _0x3e8f5b;},O=(_0x21ef7d,_0x5e11d9)=>(_0x4acc8c,_0x3ad932)=>_0x5e11d9(_0x4acc8c,_0x3ad932,_0x21ef7d),N=(_0x3901bf,_0x503a5d,_0x155087)=>Z(_0x3901bf,typeof _0x503a5d!='symbol'?_0x503a5d+'':_0x503a5d,_0x155087);exports[_0x537e25(0x125)]=class extends c['Plugin']{constructor(_0x182ebd=D,_0x2608c8,_0x5840d8){const _0xf15156=_0x537e25;super(),this[_0xf15156(0xdc)]=_0x182ebd,this[_0xf15156(0xb6)]=_0x2608c8,this[_0xf15156(0xca)]=_0x5840d8;const {..._0xf23c28}=c[_0xf15156(0x10d)]({},D,this[_0xf15156(0xdc)]);this[_0xf15156(0xca)][_0xf15156(0xbe)](q,_0xf23c28);}[_0x537e25(0xc5)](){[[g],[C],[p]]['forEach'](_0x216b4e=>{const _0x185a8d=_0x28fc;this['_injector'][_0x185a8d(0xde)](_0x216b4e);});}[_0x537e25(0xb3)](){const _0xcf05d9=_0x537e25;this[_0xcf05d9(0xb6)][_0xcf05d9(0x109)](C),this[_0xcf05d9(0xb6)][_0xcf05d9(0x109)](p);}},N(exports[_0x537e25(0x125)],_0x537e25(0xe4),U),N(exports[_0x537e25(0x125)],_0x537e25(0xf1),c['UniverInstanceType'][_0x537e25(0xe7)]),exports[_0x537e25(0x125)]=W([c[_0x537e25(0x11e)](j[_0x537e25(0xea)],b['UniverCollaborationClientPlugin'],T[_0x537e25(0x100)]),O(0x1,c[_0x537e25(0x115)](c['Injector'])),O(0x2,c[_0x537e25(0xf4)])],exports[_0x537e25(0x125)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3ac7fc=_0x1e53;(function(_0x3c488b,_0x46a2d5){const _0x2b441d=_0x1e53,_0x788a96=_0x3c488b();while(!![]){try{const _0x3aa45e=-parseInt(_0x2b441d(0x183))/0x1*(-parseInt(_0x2b441d(0x165))/0x2)+parseInt(_0x2b441d(0x163))/0x3+-parseInt(_0x2b441d(0x16f))/0x4+-parseInt(_0x2b441d(0x168))/0x5*(parseInt(_0x2b441d(0x132))/0x6)+parseInt(_0x2b441d(0x169))/0x7+-parseInt(_0x2b441d(0x17d))/0x8*(parseInt(_0x2b441d(0x182))/0x9)+-parseInt(_0x2b441d(0x140))/0xa*(-parseInt(_0x2b441d(0x126))/0xb);if(_0x3aa45e===_0x46a2d5)break;else _0x788a96['push'](_0x788a96['shift']());}catch(_0x2160f3){_0x788a96['push'](_0x788a96['shift']());}}}(_0x4a8f,0x648a8));import{CommentService as _0xc12547,CollaborationSessionService as _0x4085da,UniverCollaborationClientPlugin as _0x25082e}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x34bfc7}from'@univerjs-pro/license';import{dayjs as _0x4356fa,UserManagerService as _0x2b2172,Inject as _0x133874,Injector as _0x43a099,Disposable as _0x2967d0,CustomRangeType as _0x370612,UniverInstanceType as _0x29d262,DependentOn as _0x541538,IConfigService as _0x55cc27,Plugin as _0x365976,merge as _0x531f64}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x37de3d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2b6937,IThreadCommentDataSourceService as _0xecaf32}from'@univerjs/thread-comment';import{bufferTime as _0x10be35}from'rxjs';import{HTTPService as _0x16aebc}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x64e6af=>(_0x64e6af[_0x64e6af[_0x3ac7fc(0x136)]=0x0]=_0x3ac7fc(0x136),_0x64e6af[_0x64e6af[_0x3ac7fc(0x13d)]=0x1]='Solved',_0x64e6af[_0x64e6af[_0x3ac7fc(0x12c)]=-0x1]=_0x3ac7fc(0x12c),_0x64e6af))(I||{}),v=(_0x1c4999=>(_0x1c4999[_0x1c4999[_0x3ac7fc(0x150)]=0x0]='Unknown',_0x1c4999[_0x1c4999[_0x3ac7fc(0x170)]=0x1]=_0x3ac7fc(0x170),_0x1c4999[_0x1c4999['Reply']=0x2]=_0x3ac7fc(0x133),_0x1c4999[_0x1c4999[_0x3ac7fc(0x124)]=0x3]=_0x3ac7fc(0x124),_0x1c4999[_0x1c4999[_0x3ac7fc(0x147)]=0x4]=_0x3ac7fc(0x147),_0x1c4999[_0x1c4999['Solve']=0x5]=_0x3ac7fc(0x173),_0x1c4999[_0x1c4999[_0x3ac7fc(0x12c)]=-0x1]=_0x3ac7fc(0x12c),_0x1c4999))(v||{});const D=_0x1fcb2b=>_0x4356fa(new Date(+_0x1fcb2b))[_0x3ac7fc(0x12d)](_0x3ac7fc(0x14c)),B=async(_0x5dda6b,_0x32ae58)=>{const _0x3786f1=_0x3ac7fc,_0x5d46d2=_0x5dda6b[_0x3786f1(0x14e)](_0x2b2172),_0x3ea773=_0x5dda6b[_0x3786f1(0x14e)](_0x16aebc);_0x32ae58['forEach'](_0x30952f=>{const _0x4f4d26=_0x3786f1;_0x5d46d2[_0x4f4d26(0x16c)](_0x30952f)&&_0x32ae58['delete'](_0x30952f);}),_0x32ae58['size']&&(await _0x3ea773[_0x3786f1(0x14e)](_0x3786f1(0x12e),{'params':{'userIDs':[..._0x32ae58]}}))[_0x3786f1(0x171)][_0x3786f1(0x17b)][_0x3786f1(0x15a)](_0x27cd20=>{_0x27cd20&&_0x5d46d2['addUser'](_0x27cd20);});};var K=Object[_0x3ac7fc(0x13a)],V=(_0x9c9ec5,_0x54eea9,_0x1784f6,_0x3ecb5c)=>{const _0xa9d929=_0x3ac7fc;for(var _0x1f5f09=_0x3ecb5c>0x1?void 0x0:_0x3ecb5c?K(_0x54eea9,_0x1784f6):_0x54eea9,_0x16c95a=_0x9c9ec5[_0xa9d929(0x143)]-0x1,_0x481af1;_0x16c95a>=0x0;_0x16c95a--)(_0x481af1=_0x9c9ec5[_0x16c95a])&&(_0x1f5f09=_0x481af1(_0x1f5f09)||_0x1f5f09);return _0x1f5f09;},p=(_0x140d90,_0x244f45)=>(_0x1dc97a,_0x40ab5d)=>_0x244f45(_0x1dc97a,_0x40ab5d,_0x140d90);let S=class extends _0x2967d0{constructor(_0x4e5bac,_0x190b4b,_0xb469e6,_0x5060ed){const _0x2dd255=_0x3ac7fc;super(),this[_0x2dd255(0x180)]=_0x4e5bac,this[_0x2dd255(0x139)]=_0x190b4b,this[_0x2dd255(0x144)]=_0xb469e6,this[_0x2dd255(0x135)]=_0x5060ed,this['_init'](),this['_initUserSync']();}['_initUserSync'](){const _0x45abb6=_0x3ac7fc;this[_0x45abb6(0x167)](this['_threadCommentModel'][_0x45abb6(0x14f)]['pipe'](_0x10be35(0x10))[_0x45abb6(0x131)](_0x1f3872=>{const _0x52825b=_0x45abb6,_0x59c1fa=new Set();_0x1f3872['forEach'](_0x5fafbc=>{const _0x363275=_0x1e53;switch(_0x5fafbc[_0x363275(0x16a)]){case _0x363275(0x177):{const _0x1234cf=_0x5fafbc['payload'][_0x363275(0x164)];_0x59c1fa['add'](_0x1234cf);break;}}}),B(this[_0x52825b(0x135)],_0x59c1fa);}));}['_init'](){const _0x57fda4=_0x3ac7fc;this[_0x57fda4(0x167)](this[_0x57fda4(0x180)]['commentUpdate$'][_0x57fda4(0x131)](async _0x3175ea=>{const _0x3ad442=_0x57fda4;var _0x431cc8,_0x50fdf5,_0x1367aa,_0x7df48c;const _0x4db176=(_0x431cc8=this[_0x3ad442(0x139)][_0x3ad442(0x137)](_0x3175ea[_0x3ad442(0x174)])[_0x3ad442(0x181)](_0x3bd968=>_0x3bd968[_0x3ad442(0x148)]===_0x3175ea[_0x3ad442(0x148)]))==null?void 0x0:_0x431cc8[_0x3ad442(0x14a)];if(!_0x4db176)return;const {unitId:_0xf50944,subUnitId:_0x1b9ca5}=_0x4db176;switch(_0x3175ea['user']&&this[_0x3ad442(0x144)]['addUser'](_0x3175ea['user']),_0x3175ea[_0x3ad442(0x16a)]){case v[_0x3ad442(0x170)]:break;case v[_0x3ad442(0x133)]:{this['_threadCommentModel']['addComment'](_0xf50944,_0x1b9ca5,{'unitId':_0xf50944,'subUnitId':_0x1b9ca5,'ref':'','id':_0x3175ea[_0x3ad442(0x15e)],'dT':D(+_0x3175ea[_0x3ad442(0x175)]),'threadId':_0x3175ea['threadId'],'personId':(_0x1367aa=(_0x50fdf5=_0x3175ea[_0x3ad442(0x151)])==null?void 0x0:_0x50fdf5[_0x3ad442(0x152)])!=null?_0x1367aa:_0x3175ea[_0x3ad442(0x12b)],'text':JSON[_0x3ad442(0x16b)](_0x3175ea['content']),'parentId':_0x4db176['id']});break;}case v[_0x3ad442(0x147)]:{const _0x2a42a5=this['_threadCommentModel'][_0x3ad442(0x123)](_0xf50944,_0x1b9ca5,_0x3175ea[_0x3ad442(0x15e)]);_0x2a42a5&&_0x2a42a5[_0x3ad442(0x179)]&&this[_0x3ad442(0x139)]['deleteComment'](_0xf50944,_0x1b9ca5,_0x3175ea['replyId']);break;}case v[_0x3ad442(0x124)]:{this['_threadCommentModel'][_0x3ad442(0x161)](_0xf50944,_0x1b9ca5,{'commentId':_0x3175ea['replyId'],'text':JSON[_0x3ad442(0x16b)](_0x3175ea[_0x3ad442(0x162)])});break;}case v[_0x3ad442(0x173)]:{const _0x9d67ab=(_0x7df48c=this[_0x3ad442(0x139)][_0x3ad442(0x137)](_0x3175ea[_0x3ad442(0x174)])[_0x3ad442(0x181)](_0x1aea0d=>_0x1aea0d[_0x3ad442(0x148)]===_0x3175ea['threadId']))==null?void 0x0:_0x7df48c[_0x3ad442(0x14a)];_0x9d67ab&&this[_0x3ad442(0x139)][_0x3ad442(0x15b)](_0xf50944,_0x1b9ca5,_0x9d67ab['id'],_0x3175ea[_0x3ad442(0x141)]===I[_0x3ad442(0x13d)]);break;}}}));}};S=V([p(0x0,_0x133874(_0xc12547)),p(0x1,_0x133874(_0x2b6937)),p(0x2,_0x133874(_0x2b2172)),p(0x3,_0x133874(_0x43a099))],S);const z=_0x3ac7fc(0x13e),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x501ca2,_0xa1fbc4,_0x11fb06,_0x28900e)=>{const _0x2df4fa=_0x3ac7fc;for(var _0x362364=_0x28900e>0x1?void 0x0:_0x28900e?k(_0xa1fbc4,_0x11fb06):_0xa1fbc4,_0x4bb0d6=_0x501ca2[_0x2df4fa(0x143)]-0x1,_0x59e303;_0x4bb0d6>=0x0;_0x4bb0d6--)(_0x59e303=_0x501ca2[_0x4bb0d6])&&(_0x362364=_0x59e303(_0x362364)||_0x362364);return _0x362364;},_=(_0x49ec5c,_0x25eaf1)=>(_0x390f4d,_0x35d4b7)=>_0x25eaf1(_0x390f4d,_0x35d4b7,_0x49ec5c);function X(_0xa0b21e,_0x34cf6d){const _0x3bf43d=_0x3ac7fc,_0x3e3523=_0xa0b21e['replies'][0x0];return{..._0x34cf6d,'id':_0x3e3523[_0x3bf43d(0x15e)],'resolved':_0xa0b21e[_0x3bf43d(0x141)]===0x1,'dT':D(_0x3e3523[_0x3bf43d(0x175)]),'personId':_0x3e3523[_0x3bf43d(0x12b)],'threadId':_0x3e3523[_0x3bf43d(0x148)]};}function ee(_0x2c04df,_0xb3cb9c,_0x136815){const _0x58017a=_0x3ac7fc;var _0x1baa27,_0x49920f;if(((_0x49920f=(_0x1baa27=_0x2c04df==null?void 0x0:_0x2c04df[_0x58017a(0x122)])==null?void 0x0:_0x1baa27[_0x58017a(0x143)])!=null?_0x49920f:0x0)>0x0){const _0x519d5b=(_0x43cf51,_0x1df085)=>({'id':_0x43cf51['replyId'],'threadId':_0x43cf51[_0x58017a(0x148)],'dT':D(_0x43cf51[_0x58017a(0x175)]),'personId':_0x43cf51[_0x58017a(0x12b)],'resolved':_0x2c04df[_0x58017a(0x141)]===I['Solved'],'unitId':_0xb3cb9c,'subUnitId':_0x136815,'text':JSON[_0x58017a(0x16b)](_0x43cf51[_0x58017a(0x162)]),'parentId':_0x1df085}),_0x153840=_0x519d5b(_0x2c04df[_0x58017a(0x122)][0x0]);return{..._0x153840,'children':_0x2c04df[_0x58017a(0x122)][_0x58017a(0x185)](0x1)[_0x58017a(0x142)](_0x314fd5=>_0x519d5b(_0x314fd5,_0x153840['id']))};}return null;}let f=class{constructor(_0x18366e,_0x278479,_0x19eaf3,_0xdd2b2){const _0x39ed7a=_0x3ac7fc;this[_0x39ed7a(0x14b)]=_0x18366e,this['_userService']=_0x278479,this['_sessionService']=_0x19eaf3,this[_0x39ed7a(0x135)]=_0xdd2b2;}async[_0x3ac7fc(0x160)](_0x2e9431){const _0x421395=_0x3ac7fc;var _0x47bbc4,_0xfce07;const {parentId:_0x13553b,unitId:_0x392ad9,text:_0x20e764,threadId:_0xade419}=_0x2e9431,_0x4978bc=(_0xfce07=(_0x47bbc4=_0x20e764[_0x421395(0x153)])==null?void 0x0:_0x47bbc4[_0x421395(0x154)](_0x2685e3=>_0x2685e3[_0x421395(0x178)]===_0x370612[_0x421395(0x127)])[_0x421395(0x142)](_0x3a1302=>_0x3a1302[_0x421395(0x15f)]))!=null?_0xfce07:[],_0x1c2407=JSON[_0x421395(0x155)](_0x20e764),_0x25570c=(await this[_0x421395(0x125)][_0x421395(0x176)](_0x392ad9))[_0x421395(0x17f)]();if(_0x13553b){const _0x139d8a={'memberId':_0x25570c,'unitId':_0x392ad9,'content':_0x1c2407,'mention':_0x4978bc,'threadId':_0xade419},_0x3b3648=(await this[_0x421395(0x14b)]['post']('/universer-api/comment/unit/'+_0x392ad9+'/reply',{'body':_0x139d8a}))[_0x421395(0x171)][_0x421395(0x159)];return{..._0x2e9431,'id':_0x3b3648['replyId'],'dT':_0x4356fa(+_0x3b3648[_0x421395(0x175)])[_0x421395(0x12d)](_0x421395(0x14c)),'personId':_0x3b3648[_0x421395(0x12b)]};}else{const _0x8f02d3={'memberId':_0x25570c,'unitId':_0x392ad9,'content':_0x1c2407,'mention':_0x4978bc},_0x67b627=await this[_0x421395(0x14b)][_0x421395(0x130)]('/universer-api/comment/unit/'+_0x392ad9+_0x421395(0x15d),{'body':_0x8f02d3});return X(_0x67b627[_0x421395(0x171)][_0x421395(0x13c)],_0x2e9431);}}async[_0x3ac7fc(0x161)](_0x72161b){const _0xec4031=_0x3ac7fc;var _0x178880,_0x8ade41;const {text:_0x168322,unitId:_0x393c03}=_0x72161b,_0x3f46aa=(_0x8ade41=(_0x178880=_0x168322[_0xec4031(0x153)])==null?void 0x0:_0x178880[_0xec4031(0x154)](_0x2cf5f6=>_0x2cf5f6[_0xec4031(0x178)]===_0x370612[_0xec4031(0x127)])['map'](_0x21570f=>_0x21570f[_0xec4031(0x15f)]))!=null?_0x8ade41:[],_0x18aa83=JSON['stringify'](_0x168322),_0x37893f=_0x72161b[_0xec4031(0x148)],_0x34221d=_0x72161b['id'],_0x4cb833={'memberId':(await this[_0xec4031(0x125)][_0xec4031(0x176)](_0x393c03))['getMemberID'](),'unitId':_0x393c03,'threadId':_0x37893f,'mention':_0x3f46aa,'content':_0x18aa83,'replyId':_0x34221d},_0x3da072=await this['_httpService']['post'](_0xec4031(0x129)+_0x393c03+_0xec4031(0x15c),{'body':_0x4cb833});return!_0x3da072[_0xec4031(0x171)][_0xec4031(0x156)]||_0x3da072[_0xec4031(0x171)]['error'][_0xec4031(0x134)]===0x1;}async[_0x3ac7fc(0x15b)](_0x59af16){const _0x51fe06=_0x3ac7fc,{unitId:_0x3e53e2}=_0x59af16,_0x3ab3c5=_0x59af16[_0x51fe06(0x148)],_0x172970={'memberId':this[_0x51fe06(0x144)][_0x51fe06(0x13f)]()[_0x51fe06(0x152)],'unitId':_0x3e53e2,'threadId':_0x3ab3c5,'solved':_0x59af16[_0x51fe06(0x17a)]?I[_0x51fe06(0x13d)]:I['OpenOrReOpen']},_0x5a6c0a=await this['_httpService'][_0x51fe06(0x130)](_0x51fe06(0x129)+_0x3e53e2+_0x51fe06(0x17e),{'body':_0x172970});return!_0x5a6c0a['body']['error']||_0x5a6c0a[_0x51fe06(0x171)][_0x51fe06(0x156)][_0x51fe06(0x134)]===0x1;}async[_0x3ac7fc(0x12a)](_0x5e6025,_0x43bec9,_0x5a8ca1,_0x5321c1){const _0x50bfec=_0x3ac7fc,_0x28f8cf={'memberId':(await this[_0x50bfec(0x125)][_0x50bfec(0x176)](_0x5e6025))[_0x50bfec(0x17f)](),'threadId':_0x5a8ca1,'replyId':_0x5321c1,'unitId':_0x5e6025},_0xaea3cb=await this['_httpService'][_0x50bfec(0x130)](_0x50bfec(0x129)+_0x5e6025+_0x50bfec(0x166),{'body':_0x28f8cf});return!_0xaea3cb[_0x50bfec(0x171)][_0x50bfec(0x156)]||_0xaea3cb['body']['error'][_0x50bfec(0x134)]===0x1;}async['listComments'](_0x5ac970,_0x13f9fd,_0x2ba9fd){const _0x35e3d3=_0x3ac7fc,_0x58a38c={'unitId':_0x5ac970,'threadId':_0x2ba9fd},_0x5e5aaa=await this['_httpService']['post'](_0x35e3d3(0x129)+_0x5ac970+_0x35e3d3(0x128),{'body':_0x58a38c}),_0x30b1d6=_0x2ba9fd['map'](_0xf8fb31=>ee(_0x5e5aaa['body'][_0x35e3d3(0x14d)][_0xf8fb31],_0x5ac970,_0x13f9fd))[_0x35e3d3(0x154)](Boolean);return Object['values'](_0x5e5aaa[_0x35e3d3(0x171)][_0x35e3d3(0x17b)])[_0x35e3d3(0x15a)](_0x113258=>{const _0x994361=_0x35e3d3;this[_0x994361(0x144)]['addUser'](_0x113258);}),_0x30b1d6;}[_0x3ac7fc(0x145)](_0x4aba45){return{'id':_0x4aba45['id'],'threadId':_0x4aba45['threadId'],'ref':_0x4aba45['ref']};}};function _0x4a8f(){const _0x880634=['syncUpdateMutationToColla','defineProperty','reply','forEach','resolveComment','/edit','/add','replyId','rangeId','addComment','updateComment','content','736005lLkIqg','personId','2GPnCqa','/delete','disposeWithMe','291695PyWAwR','3511102DxeEgM','type','parse','getUser','dataSource','_config','2299816UByDWs','Add','body','UNIVER_UNKNOWN','Solve','unitId','createTimestamp','requireSession','add','rangeType','parentId','resolved','users','_threadCommentDataSourceService','136RJtCLK','/solved','getMemberID','_commentService','find','74124jiXvNm','552835koRClE','pluginName','slice','_threadCommentDataSource','replies','getComment','Edit','_sessionService','7491beKqOM','COMMENT','/list','/universer-api/comment/unit/','deleteComment','userId','UNRECOGNIZED','format','/universer-api/user/list','onReady','post','subscribe','36DuTVYe','Reply','code','_injector','OpenOrReOpen','getUnit','_initDataSource','_threadCommentModel','getOwnPropertyDescriptor','setConfig','comment','Solved','thread-comment-data-source.config','getCurrentUser','2600eeSHJB','solved','map','length','_userService','saveCommentToSnapshot','symbol','Delete','threadId','_configService','root','_httpService','YYYY/MM/DD\x20HH:mm','comments','get','commentUpdate$','Unknown','user','userID','customRanges','filter','stringify','error'];_0x4a8f=function(){return _0x880634;};return _0x4a8f();}f=Q([_(0x0,_0x133874(_0x16aebc)),_(0x1,_0x133874(_0x2b2172)),_(0x2,_0x133874(_0x4085da)),_(0x3,_0x133874(_0x43a099))],f);var re=Object[_0x3ac7fc(0x13a)],te=(_0x5543c5,_0x32b8d4,_0x5cc2e2,_0x184b1e)=>{const _0x347c38=_0x3ac7fc;for(var _0x25f001=_0x184b1e>0x1?void 0x0:_0x184b1e?re(_0x32b8d4,_0x5cc2e2):_0x32b8d4,_0x19c13b=_0x5543c5[_0x347c38(0x143)]-0x1,_0x209cc4;_0x19c13b>=0x0;_0x19c13b--)(_0x209cc4=_0x5543c5[_0x19c13b])&&(_0x25f001=_0x209cc4(_0x25f001)||_0x25f001);return _0x25f001;},N=(_0x29267f,_0x57e409)=>(_0x561270,_0x4f56af)=>_0x57e409(_0x561270,_0x4f56af,_0x29267f);let g=class extends _0x2967d0{constructor(_0x392f63,_0x2d8064){const _0x3f5f85=_0x3ac7fc;super(),this[_0x3f5f85(0x17c)]=_0x392f63,this[_0x3f5f85(0x121)]=_0x2d8064,this[_0x3f5f85(0x138)]();}['_initDataSource'](){const _0x1c745a=_0x3ac7fc;this[_0x1c745a(0x17c)][_0x1c745a(0x16d)]=this[_0x1c745a(0x121)],this[_0x1c745a(0x17c)][_0x1c745a(0x157)]=!0x1;}};g=te([N(0x0,_0xecaf32),N(0x1,_0x133874(f))],g);var se=Object[_0x3ac7fc(0x158)],oe=Object[_0x3ac7fc(0x13a)],ne=(_0x20ec89,_0xa8e439,_0x1fc979)=>_0xa8e439 in _0x20ec89?se(_0x20ec89,_0xa8e439,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1fc979}):_0x20ec89[_0xa8e439]=_0x1fc979,ie=(_0x53e0b9,_0x4d8263,_0x97d81d,_0x1e97ae)=>{const _0x216cdf=_0x3ac7fc;for(var _0x2b8073=_0x1e97ae>0x1?void 0x0:_0x1e97ae?oe(_0x4d8263,_0x97d81d):_0x4d8263,_0x4c531f=_0x53e0b9[_0x216cdf(0x143)]-0x1,_0xcfb379;_0x4c531f>=0x0;_0x4c531f--)(_0xcfb379=_0x53e0b9[_0x4c531f])&&(_0x2b8073=_0xcfb379(_0x2b8073)||_0x2b8073);return _0x2b8073;},w=(_0x2f1726,_0x4591cc)=>(_0x2cb41b,_0x28b6e3)=>_0x4591cc(_0x2cb41b,_0x28b6e3,_0x2f1726),$=(_0x4b8505,_0x2bd292,_0x503f3a)=>ne(_0x4b8505,typeof _0x2bd292!=_0x3ac7fc(0x146)?_0x2bd292+'':_0x2bd292,_0x503f3a);let b=class extends _0x365976{constructor(_0x41552d=M,_0x372897,_0x2d67fd){const _0x41b63b=_0x3ac7fc;super(),this['_config']=_0x41552d,this[_0x41b63b(0x135)]=_0x372897,this[_0x41b63b(0x149)]=_0x2d67fd;const {..._0xee986e}=_0x531f64({},M,this[_0x41b63b(0x16e)]);this['_configService'][_0x41b63b(0x13b)](z,_0xee986e);}['onStarting'](){const _0x3e29e0=_0x3ac7fc;[[f],[g],[S]][_0x3e29e0(0x15a)](_0x5ad961=>{const _0x15ccb9=_0x3e29e0;this[_0x15ccb9(0x135)][_0x15ccb9(0x177)](_0x5ad961);});}[_0x3ac7fc(0x12f)](){const _0x155de3=_0x3ac7fc;this[_0x155de3(0x135)][_0x155de3(0x14e)](g),this[_0x155de3(0x135)][_0x155de3(0x14e)](S);}};function _0x1e53(_0x41dabb,_0x2a22ed){const _0x4a8f57=_0x4a8f();return _0x1e53=function(_0x1e5396,_0x44f623){_0x1e5396=_0x1e5396-0x121;let _0x47d694=_0x4a8f57[_0x1e5396];return _0x47d694;},_0x1e53(_0x41dabb,_0x2a22ed);}$(b,_0x3ac7fc(0x184),W),$(b,_0x3ac7fc(0x16a),_0x29d262[_0x3ac7fc(0x172)]),b=ie([_0x541538(_0x37de3d,_0x25082e,_0x34bfc7),w(0x1,_0x133874(_0x43a099)),w(0x2,_0x55cc27)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
function _0x4119(_0x33c396,_0x7ecedc){const _0x3a31fa=_0x3a31();return _0x4119=function(_0x411952,_0x372456){_0x411952=_0x411952-0xab;let _0x2b7fee=_0x3a31fa[_0x411952];return _0x2b7fee;},_0x4119(_0x33c396,_0x7ecedc);}const _0x425e5f=_0x4119;(function(_0x4e8257,_0x4fb90c){const _0x64ad97=_0x4119,_0x46e20c=_0x4e8257();while(!![]){try{const _0x4641a8=-parseInt(_0x64ad97(0xab))/0x1*(-parseInt(_0x64ad97(0xc0))/0x2)+-parseInt(_0x64ad97(0x103))/0x3+-parseInt(_0x64ad97(0xfd))/0x4*(parseInt(_0x64ad97(0x10f))/0x5)+-parseInt(_0x64ad97(0xf6))/0x6*(parseInt(_0x64ad97(0xb9))/0x7)+parseInt(_0x64ad97(0xc1))/0x8*(parseInt(_0x64ad97(0xdf))/0x9)+-parseInt(_0x64ad97(0xbe))/0xa+-parseInt(_0x64ad97(0xd7))/0xb*(-parseInt(_0x64ad97(0xdc))/0xc);if(_0x4641a8===_0x4fb90c)break;else _0x46e20c['push'](_0x46e20c['shift']());}catch(_0x269378){_0x46e20c['push'](_0x46e20c['shift']());}}}(_0x3a31,0xdad0c));import{CommentService as _0x241de7,CollaborationSessionService as _0x1c1e03,UniverCollaborationClientPlugin as _0x21f04b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x548071}from'@univerjs-pro/license';import{dayjs as _0x56839b,UserManagerService as _0x517fcb,Inject as _0x722246,Injector as _0x25b10c,Disposable as _0x4d0fd0,CustomRangeType as _0x5dbbf9,UniverInstanceType as _0x1d123f,DependentOn as _0x5a38b0,IConfigService as _0x54164f,Plugin as _0x5d2b76,merge as _0x316a9a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x49f318}from'@univerjs/thread-comment-ui';function _0x3a31(){const _0xd4b343=['_initDataSource','_userService','ref','_sessionService','_httpService','rangeId','root','listComments','forEach','add','error','filter','type','UNRECOGNIZED','saveCommentToSnapshot','addUser','4376614JRHNeu','syncUpdateMutationToColla','personId','post','solved','36EegEBS','YYYY/MM/DD\x20HH:mm','_configService','15938298nApGbu','getOwnPropertyDescriptor','threadId','symbol','subscribe','_commentService','get','COMMENT','deleteComment','pluginName','replyId','stringify','length','UNIVER_UNKNOWN','userId','user','values','reply','getUnit','/edit','_config','/solved','users','6lzmEmW','parse','Delete','defineProperty','content','_threadCommentDataSourceService','code','956JswijB','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','format','dataSource','Edit','_threadCommentDataSource','2998938AVjVwi','onReady','rangeType','comment','body','Unknown','_initUserSync','/universer-api/user/list','comments','Reply','map','OpenOrReOpen','17040GOukcz','replies','pipe','5KrXTfL','getCurrentUser','onStarting','userID','_threadCommentModel','Solve','createTimestamp','addComment','_init','/list','/universer-api/comment/unit/','getUser','payload','updateComment','6410089oSZpGB','unitId','_injector','customRanges','resolveComment','6631360LdEBdm','requireSession','529898THPCxt','8cvOfnx','Solved','Add','disposeWithMe','find','getMemberID'];_0x3a31=function(){return _0xd4b343;};return _0x3a31();}import{ThreadCommentModel as _0x33a7b8,IThreadCommentDataSourceService as _0x36983c}from'@univerjs/thread-comment';import{bufferTime as _0x250bbc}from'rxjs';import{HTTPService as _0x199b25}from'@univerjs/network';const W=_0x425e5f(0xfe);var I=(_0x42248f=>(_0x42248f[_0x42248f['OpenOrReOpen']=0x0]=_0x425e5f(0x10e),_0x42248f[_0x42248f[_0x425e5f(0xc2)]=0x1]='Solved',_0x42248f[_0x42248f[_0x425e5f(0xd4)]=-0x1]=_0x425e5f(0xd4),_0x42248f))(I||{}),v=(_0x5abfa2=>(_0x5abfa2[_0x5abfa2[_0x425e5f(0x108)]=0x0]=_0x425e5f(0x108),_0x5abfa2[_0x5abfa2[_0x425e5f(0xc3)]=0x1]=_0x425e5f(0xc3),_0x5abfa2[_0x5abfa2[_0x425e5f(0x10c)]=0x2]=_0x425e5f(0x10c),_0x5abfa2[_0x5abfa2[_0x425e5f(0x101)]=0x3]='Edit',_0x5abfa2[_0x5abfa2[_0x425e5f(0xf8)]=0x4]=_0x425e5f(0xf8),_0x5abfa2[_0x5abfa2[_0x425e5f(0xb0)]=0x5]=_0x425e5f(0xb0),_0x5abfa2[_0x5abfa2[_0x425e5f(0xd4)]=-0x1]=_0x425e5f(0xd4),_0x5abfa2))(v||{});const D=_0x284839=>_0x56839b(new Date(+_0x284839))[_0x425e5f(0xff)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4507a7,_0x31b235)=>{const _0x3ce1d8=_0x425e5f,_0x2f7b8d=_0x4507a7[_0x3ce1d8(0xe5)](_0x517fcb),_0x2c8720=_0x4507a7[_0x3ce1d8(0xe5)](_0x199b25);_0x31b235['forEach'](_0xc331e7=>{const _0x356049=_0x3ce1d8;_0x2f7b8d[_0x356049(0xb6)](_0xc331e7)&&_0x31b235['delete'](_0xc331e7);}),_0x31b235['size']&&(await _0x2c8720[_0x3ce1d8(0xe5)](_0x3ce1d8(0x10a),{'params':{'userIDs':[..._0x31b235]}}))[_0x3ce1d8(0x107)][_0x3ce1d8(0xf5)][_0x3ce1d8(0xcf)](_0x424c44=>{const _0x144387=_0x3ce1d8;_0x424c44&&_0x2f7b8d[_0x144387(0xd6)](_0x424c44);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x500302,_0x2e2fd0,_0x404d4e,_0x17012f)=>{const _0x525ac6=_0x425e5f;for(var _0x383411=_0x17012f>0x1?void 0x0:_0x17012f?K(_0x2e2fd0,_0x404d4e):_0x2e2fd0,_0xd73450=_0x500302[_0x525ac6(0xeb)]-0x1,_0x396eca;_0xd73450>=0x0;_0xd73450--)(_0x396eca=_0x500302[_0xd73450])&&(_0x383411=_0x396eca(_0x383411)||_0x383411);return _0x383411;},p=(_0x36b10a,_0x517527)=>(_0x3a8b79,_0x3dfb77)=>_0x517527(_0x3a8b79,_0x3dfb77,_0x36b10a);let S=class extends _0x4d0fd0{constructor(_0x1fa63b,_0x14cb90,_0x295174,_0x1b7135){const _0x3a2ad7=_0x425e5f;super(),this[_0x3a2ad7(0xe4)]=_0x1fa63b,this[_0x3a2ad7(0xaf)]=_0x14cb90,this['_userService']=_0x295174,this[_0x3a2ad7(0xbb)]=_0x1b7135,this['_init'](),this[_0x3a2ad7(0x109)]();}[_0x425e5f(0x109)](){const _0x4a568c=_0x425e5f;this[_0x4a568c(0xc4)](this[_0x4a568c(0xaf)]['commentUpdate$'][_0x4a568c(0x111)](_0x250bbc(0x10))[_0x4a568c(0xe3)](_0x3fad4e=>{const _0x245149=_0x4a568c,_0x5666d7=new Set();_0x3fad4e[_0x245149(0xcf)](_0x17fa86=>{const _0x8bf604=_0x245149;switch(_0x17fa86[_0x8bf604(0xd3)]){case _0x8bf604(0xd0):{const _0x46d500=_0x17fa86[_0x8bf604(0xb7)][_0x8bf604(0xd9)];_0x5666d7[_0x8bf604(0xd0)](_0x46d500);break;}}}),B(this['_injector'],_0x5666d7);}));}[_0x425e5f(0xb3)](){const _0x302938=_0x425e5f;this[_0x302938(0xc4)](this['_commentService']['commentUpdate$'][_0x302938(0xe3)](async _0x27400f=>{const _0x125426=_0x302938;var _0x290c8b,_0x27b31d,_0x128787,_0x55de0e;const _0x434ff4=(_0x290c8b=this[_0x125426(0xaf)][_0x125426(0xf1)](_0x27400f[_0x125426(0xba)])[_0x125426(0xc5)](_0x3e61dd=>_0x3e61dd['threadId']===_0x27400f['threadId']))==null?void 0x0:_0x290c8b[_0x125426(0xcd)];if(!_0x434ff4)return;const {unitId:_0x3bc7cb,subUnitId:_0x188ab5}=_0x434ff4;switch(_0x27400f[_0x125426(0xee)]&&this[_0x125426(0xc8)]['addUser'](_0x27400f[_0x125426(0xee)]),_0x27400f[_0x125426(0xd3)]){case v['Add']:break;case v[_0x125426(0x10c)]:{this[_0x125426(0xaf)][_0x125426(0xb2)](_0x3bc7cb,_0x188ab5,{'unitId':_0x3bc7cb,'subUnitId':_0x188ab5,'ref':'','id':_0x27400f[_0x125426(0xe9)],'dT':D(+_0x27400f[_0x125426(0xb1)]),'threadId':_0x27400f['threadId'],'personId':(_0x128787=(_0x27b31d=_0x27400f[_0x125426(0xee)])==null?void 0x0:_0x27b31d[_0x125426(0xae)])!=null?_0x128787:_0x27400f[_0x125426(0xed)],'text':JSON[_0x125426(0xf7)](_0x27400f[_0x125426(0xfa)]),'parentId':_0x434ff4['id']});break;}case v['Delete']:{const _0xb1ffec=this[_0x125426(0xaf)]['getComment'](_0x3bc7cb,_0x188ab5,_0x27400f[_0x125426(0xe9)]);_0xb1ffec&&_0xb1ffec['parentId']&&this[_0x125426(0xaf)]['deleteComment'](_0x3bc7cb,_0x188ab5,_0x27400f['replyId']);break;}case v['Edit']:{this[_0x125426(0xaf)]['updateComment'](_0x3bc7cb,_0x188ab5,{'commentId':_0x27400f[_0x125426(0xe9)],'text':JSON[_0x125426(0xf7)](_0x27400f[_0x125426(0xfa)])});break;}case v['Solve']:{const _0x30b031=(_0x55de0e=this['_threadCommentModel'][_0x125426(0xf1)](_0x27400f['unitId'])['find'](_0x50d026=>_0x50d026[_0x125426(0xe1)]===_0x27400f[_0x125426(0xe1)]))==null?void 0x0:_0x55de0e[_0x125426(0xcd)];_0x30b031&&this[_0x125426(0xaf)][_0x125426(0xbd)](_0x3bc7cb,_0x188ab5,_0x30b031['id'],_0x27400f['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x722246(_0x241de7)),p(0x1,_0x722246(_0x33a7b8)),p(0x2,_0x722246(_0x517fcb)),p(0x3,_0x722246(_0x25b10c))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x425e5f(0xe0)],Q=(_0x2c9e87,_0x5bbf41,_0xc0d470,_0x3ca685)=>{for(var _0x150eff=_0x3ca685>0x1?void 0x0:_0x3ca685?k(_0x5bbf41,_0xc0d470):_0x5bbf41,_0x4b8d08=_0x2c9e87['length']-0x1,_0x1a0084;_0x4b8d08>=0x0;_0x4b8d08--)(_0x1a0084=_0x2c9e87[_0x4b8d08])&&(_0x150eff=_0x1a0084(_0x150eff)||_0x150eff);return _0x150eff;},_=(_0x35841f,_0x122090)=>(_0x5452d1,_0x397167)=>_0x122090(_0x5452d1,_0x397167,_0x35841f);function X(_0x45627c,_0x2314e5){const _0x3425bc=_0x425e5f,_0x494270=_0x45627c[_0x3425bc(0x110)][0x0];return{..._0x2314e5,'id':_0x494270[_0x3425bc(0xe9)],'resolved':_0x45627c[_0x3425bc(0xdb)]===0x1,'dT':D(_0x494270[_0x3425bc(0xb1)]),'personId':_0x494270['userId'],'threadId':_0x494270[_0x3425bc(0xe1)]};}function ee(_0x5bb631,_0x51d510,_0x56c115){const _0x265688=_0x425e5f;var _0x2b78d2,_0x94154a;if(((_0x94154a=(_0x2b78d2=_0x5bb631==null?void 0x0:_0x5bb631[_0x265688(0x110)])==null?void 0x0:_0x2b78d2[_0x265688(0xeb)])!=null?_0x94154a:0x0)>0x0){const _0x4bc798=(_0x193266,_0x145d37)=>({'id':_0x193266[_0x265688(0xe9)],'threadId':_0x193266[_0x265688(0xe1)],'dT':D(_0x193266[_0x265688(0xb1)]),'personId':_0x193266[_0x265688(0xed)],'resolved':_0x5bb631[_0x265688(0xdb)]===I['Solved'],'unitId':_0x51d510,'subUnitId':_0x56c115,'text':JSON[_0x265688(0xf7)](_0x193266[_0x265688(0xfa)]),'parentId':_0x145d37}),_0x5badc1=_0x4bc798(_0x5bb631['replies'][0x0]);return{..._0x5badc1,'children':_0x5bb631['replies']['slice'](0x1)['map'](_0x4cd4a4=>_0x4bc798(_0x4cd4a4,_0x5badc1['id']))};}return null;}let f=class{constructor(_0x4664a5,_0x1bc530,_0x453a75,_0x1da0e6){const _0x1027f7=_0x425e5f;this[_0x1027f7(0xcb)]=_0x4664a5,this[_0x1027f7(0xc8)]=_0x1bc530,this[_0x1027f7(0xca)]=_0x453a75,this[_0x1027f7(0xbb)]=_0x1da0e6;}async[_0x425e5f(0xb2)](_0x689999){const _0x86f68c=_0x425e5f;var _0x1faf94,_0x4b25bc;const {parentId:_0x53a94,unitId:_0x50aa87,text:_0x52355e,threadId:_0x2e3457}=_0x689999,_0x3c684e=(_0x4b25bc=(_0x1faf94=_0x52355e[_0x86f68c(0xbc)])==null?void 0x0:_0x1faf94[_0x86f68c(0xd2)](_0x5728cd=>_0x5728cd[_0x86f68c(0x105)]===_0x5dbbf9[_0x86f68c(0xe6)])[_0x86f68c(0x10d)](_0x4200a0=>_0x4200a0[_0x86f68c(0xcc)]))!=null?_0x4b25bc:[],_0x229563=JSON['stringify'](_0x52355e),_0x2c1fa3=(await this[_0x86f68c(0xca)][_0x86f68c(0xbf)](_0x50aa87))[_0x86f68c(0xc6)]();if(_0x53a94){const _0x47317a={'memberId':_0x2c1fa3,'unitId':_0x50aa87,'content':_0x229563,'mention':_0x3c684e,'threadId':_0x2e3457},_0x3dfa63=(await this['_httpService'][_0x86f68c(0xda)](_0x86f68c(0xb5)+_0x50aa87+'/reply',{'body':_0x47317a}))[_0x86f68c(0x107)][_0x86f68c(0xf0)];return{..._0x689999,'id':_0x3dfa63[_0x86f68c(0xe9)],'dT':_0x56839b(+_0x3dfa63[_0x86f68c(0xb1)])[_0x86f68c(0xff)](_0x86f68c(0xdd)),'personId':_0x3dfa63[_0x86f68c(0xed)]};}else{const _0x51d8e1={'memberId':_0x2c1fa3,'unitId':_0x50aa87,'content':_0x229563,'mention':_0x3c684e},_0x1d87d9=await this[_0x86f68c(0xcb)][_0x86f68c(0xda)](_0x86f68c(0xb5)+_0x50aa87+'/add',{'body':_0x51d8e1});return X(_0x1d87d9[_0x86f68c(0x107)][_0x86f68c(0x106)],_0x689999);}}async[_0x425e5f(0xb8)](_0x54c835){const _0x54e91c=_0x425e5f;var _0x40dafe,_0x5ef016;const {text:_0x5177ac,unitId:_0x6575d}=_0x54c835,_0x37d918=(_0x5ef016=(_0x40dafe=_0x5177ac['customRanges'])==null?void 0x0:_0x40dafe[_0x54e91c(0xd2)](_0x5721ab=>_0x5721ab[_0x54e91c(0x105)]===_0x5dbbf9['COMMENT'])['map'](_0x2ce100=>_0x2ce100['rangeId']))!=null?_0x5ef016:[],_0x381bc6=JSON[_0x54e91c(0xea)](_0x5177ac),_0x17e5f7=_0x54c835[_0x54e91c(0xe1)],_0x13cb70=_0x54c835['id'],_0x461bec={'memberId':(await this[_0x54e91c(0xca)]['requireSession'](_0x6575d))[_0x54e91c(0xc6)](),'unitId':_0x6575d,'threadId':_0x17e5f7,'mention':_0x37d918,'content':_0x381bc6,'replyId':_0x13cb70},_0x38e3a2=await this[_0x54e91c(0xcb)][_0x54e91c(0xda)](_0x54e91c(0xb5)+_0x6575d+_0x54e91c(0xf2),{'body':_0x461bec});return!_0x38e3a2[_0x54e91c(0x107)]['error']||_0x38e3a2['body'][_0x54e91c(0xd1)][_0x54e91c(0xfc)]===0x1;}async[_0x425e5f(0xbd)](_0x30762f){const _0x1cbdd4=_0x425e5f,{unitId:_0x4980a6}=_0x30762f,_0x5227a3=_0x30762f[_0x1cbdd4(0xe1)],_0x2cd44d={'memberId':this[_0x1cbdd4(0xc8)][_0x1cbdd4(0xac)]()[_0x1cbdd4(0xae)],'unitId':_0x4980a6,'threadId':_0x5227a3,'solved':_0x30762f['resolved']?I['Solved']:I['OpenOrReOpen']},_0x540e0c=await this[_0x1cbdd4(0xcb)][_0x1cbdd4(0xda)](_0x1cbdd4(0xb5)+_0x4980a6+_0x1cbdd4(0xf4),{'body':_0x2cd44d});return!_0x540e0c[_0x1cbdd4(0x107)][_0x1cbdd4(0xd1)]||_0x540e0c[_0x1cbdd4(0x107)][_0x1cbdd4(0xd1)][_0x1cbdd4(0xfc)]===0x1;}async[_0x425e5f(0xe7)](_0x562ce5,_0x31c8ae,_0x5d192c,_0x51c657){const _0x27aa85=_0x425e5f,_0x527fc1={'memberId':(await this[_0x27aa85(0xca)]['requireSession'](_0x562ce5))[_0x27aa85(0xc6)](),'threadId':_0x5d192c,'replyId':_0x51c657,'unitId':_0x562ce5},_0x255052=await this['_httpService'][_0x27aa85(0xda)](_0x27aa85(0xb5)+_0x562ce5+'/delete',{'body':_0x527fc1});return!_0x255052[_0x27aa85(0x107)][_0x27aa85(0xd1)]||_0x255052[_0x27aa85(0x107)][_0x27aa85(0xd1)]['code']===0x1;}async[_0x425e5f(0xce)](_0x22ca3f,_0x1dcfce,_0x4dafc7){const _0x5a5b03=_0x425e5f,_0x5dbc47={'unitId':_0x22ca3f,'threadId':_0x4dafc7},_0x2a0489=await this['_httpService']['post'](_0x5a5b03(0xb5)+_0x22ca3f+_0x5a5b03(0xb4),{'body':_0x5dbc47}),_0x533b53=_0x4dafc7[_0x5a5b03(0x10d)](_0x54fb20=>ee(_0x2a0489[_0x5a5b03(0x107)][_0x5a5b03(0x10b)][_0x54fb20],_0x22ca3f,_0x1dcfce))[_0x5a5b03(0xd2)](Boolean);return Object[_0x5a5b03(0xef)](_0x2a0489[_0x5a5b03(0x107)][_0x5a5b03(0xf5)])[_0x5a5b03(0xcf)](_0x16fd25=>{const _0x81b8fd=_0x5a5b03;this[_0x81b8fd(0xc8)]['addUser'](_0x16fd25);}),_0x533b53;}[_0x425e5f(0xd5)](_0x3a387d){const _0x597b38=_0x425e5f;return{'id':_0x3a387d['id'],'threadId':_0x3a387d['threadId'],'ref':_0x3a387d[_0x597b38(0xc9)]};}};f=Q([_(0x0,_0x722246(_0x199b25)),_(0x1,_0x722246(_0x517fcb)),_(0x2,_0x722246(_0x1c1e03)),_(0x3,_0x722246(_0x25b10c))],f);var re=Object[_0x425e5f(0xe0)],te=(_0x9f81f9,_0x54c8b6,_0x266938,_0xa26a6a)=>{const _0x394d41=_0x425e5f;for(var _0x3fa3cb=_0xa26a6a>0x1?void 0x0:_0xa26a6a?re(_0x54c8b6,_0x266938):_0x54c8b6,_0x4f72cb=_0x9f81f9[_0x394d41(0xeb)]-0x1,_0x59c7bb;_0x4f72cb>=0x0;_0x4f72cb--)(_0x59c7bb=_0x9f81f9[_0x4f72cb])&&(_0x3fa3cb=_0x59c7bb(_0x3fa3cb)||_0x3fa3cb);return _0x3fa3cb;},N=(_0x16bcfb,_0x1b5152)=>(_0xaedfca,_0x27e232)=>_0x1b5152(_0xaedfca,_0x27e232,_0x16bcfb);let g=class extends _0x4d0fd0{constructor(_0x2434d1,_0x318b48){const _0x42aafc=_0x425e5f;super(),this['_threadCommentDataSourceService']=_0x2434d1,this['_threadCommentDataSource']=_0x318b48,this[_0x42aafc(0xc7)]();}[_0x425e5f(0xc7)](){const _0x14d606=_0x425e5f;this[_0x14d606(0xfb)][_0x14d606(0x100)]=this[_0x14d606(0x102)],this[_0x14d606(0xfb)][_0x14d606(0xd8)]=!0x1;}};g=te([N(0x0,_0x36983c),N(0x1,_0x722246(f))],g);var se=Object[_0x425e5f(0xf9)],oe=Object[_0x425e5f(0xe0)],ne=(_0x5a9072,_0x5ec4fc,_0x6da4c2)=>_0x5ec4fc in _0x5a9072?se(_0x5a9072,_0x5ec4fc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x6da4c2}):_0x5a9072[_0x5ec4fc]=_0x6da4c2,ie=(_0x4bb8e5,_0x19a3e5,_0x55390e,_0x43e9a5)=>{for(var _0x5a7cec=_0x43e9a5>0x1?void 0x0:_0x43e9a5?oe(_0x19a3e5,_0x55390e):_0x19a3e5,_0x48a66c=_0x4bb8e5['length']-0x1,_0x1d0097;_0x48a66c>=0x0;_0x48a66c--)(_0x1d0097=_0x4bb8e5[_0x48a66c])&&(_0x5a7cec=_0x1d0097(_0x5a7cec)||_0x5a7cec);return _0x5a7cec;},w=(_0x5de127,_0xc2847b)=>(_0x3d3baf,_0x514773)=>_0xc2847b(_0x3d3baf,_0x514773,_0x5de127),$=(_0x4a50ef,_0xdaae1c,_0x148dd2)=>ne(_0x4a50ef,typeof _0xdaae1c!=_0x425e5f(0xe2)?_0xdaae1c+'':_0xdaae1c,_0x148dd2);let b=class extends _0x5d2b76{constructor(_0x45c136=M,_0x4fe88f,_0x1a949d){const _0x41c0d3=_0x425e5f;super(),this[_0x41c0d3(0xf3)]=_0x45c136,this[_0x41c0d3(0xbb)]=_0x4fe88f,this[_0x41c0d3(0xde)]=_0x1a949d;const {..._0x3fbf03}=_0x316a9a({},M,this[_0x41c0d3(0xf3)]);this[_0x41c0d3(0xde)]['setConfig'](z,_0x3fbf03);}[_0x425e5f(0xad)](){const _0x5490df=_0x425e5f;[[f],[g],[S]][_0x5490df(0xcf)](_0xf0efb=>{const _0x533850=_0x5490df;this[_0x533850(0xbb)]['add'](_0xf0efb);});}[_0x425e5f(0x104)](){this['_injector']['get'](g),this['_injector']['get'](S);}};$(b,_0x425e5f(0xe8),W),$(b,_0x425e5f(0xd3),_0x1d123f[_0x425e5f(0xec)]),b=ie([_0x5a38b0(_0x49f318,_0x21f04b,_0x548071),w(0x1,_0x722246(_0x25b10c)),w(0x2,_0x54164f)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3ac7fc=_0x1e53;(function(_0x3c488b,_0x46a2d5){const _0x2b441d=_0x1e53,_0x788a96=_0x3c488b();while(!![]){try{const _0x3aa45e=-parseInt(_0x2b441d(0x183))/0x1*(-parseInt(_0x2b441d(0x165))/0x2)+parseInt(_0x2b441d(0x163))/0x3+-parseInt(_0x2b441d(0x16f))/0x4+-parseInt(_0x2b441d(0x168))/0x5*(parseInt(_0x2b441d(0x132))/0x6)+parseInt(_0x2b441d(0x169))/0x7+-parseInt(_0x2b441d(0x17d))/0x8*(parseInt(_0x2b441d(0x182))/0x9)+-parseInt(_0x2b441d(0x140))/0xa*(-parseInt(_0x2b441d(0x126))/0xb);if(_0x3aa45e===_0x46a2d5)break;else _0x788a96['push'](_0x788a96['shift']());}catch(_0x2160f3){_0x788a96['push'](_0x788a96['shift']());}}}(_0x4a8f,0x648a8));import{CommentService as _0xc12547,CollaborationSessionService as _0x4085da,UniverCollaborationClientPlugin as _0x25082e}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x34bfc7}from'@univerjs-pro/license';import{dayjs as _0x4356fa,UserManagerService as _0x2b2172,Inject as _0x133874,Injector as _0x43a099,Disposable as _0x2967d0,CustomRangeType as _0x370612,UniverInstanceType as _0x29d262,DependentOn as _0x541538,IConfigService as _0x55cc27,Plugin as _0x365976,merge as _0x531f64}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x37de3d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2b6937,IThreadCommentDataSourceService as _0xecaf32}from'@univerjs/thread-comment';import{bufferTime as _0x10be35}from'rxjs';import{HTTPService as _0x16aebc}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x64e6af=>(_0x64e6af[_0x64e6af[_0x3ac7fc(0x136)]=0x0]=_0x3ac7fc(0x136),_0x64e6af[_0x64e6af[_0x3ac7fc(0x13d)]=0x1]='Solved',_0x64e6af[_0x64e6af[_0x3ac7fc(0x12c)]=-0x1]=_0x3ac7fc(0x12c),_0x64e6af))(I||{}),v=(_0x1c4999=>(_0x1c4999[_0x1c4999[_0x3ac7fc(0x150)]=0x0]='Unknown',_0x1c4999[_0x1c4999[_0x3ac7fc(0x170)]=0x1]=_0x3ac7fc(0x170),_0x1c4999[_0x1c4999['Reply']=0x2]=_0x3ac7fc(0x133),_0x1c4999[_0x1c4999[_0x3ac7fc(0x124)]=0x3]=_0x3ac7fc(0x124),_0x1c4999[_0x1c4999[_0x3ac7fc(0x147)]=0x4]=_0x3ac7fc(0x147),_0x1c4999[_0x1c4999['Solve']=0x5]=_0x3ac7fc(0x173),_0x1c4999[_0x1c4999[_0x3ac7fc(0x12c)]=-0x1]=_0x3ac7fc(0x12c),_0x1c4999))(v||{});const D=_0x1fcb2b=>_0x4356fa(new Date(+_0x1fcb2b))[_0x3ac7fc(0x12d)](_0x3ac7fc(0x14c)),B=async(_0x5dda6b,_0x32ae58)=>{const _0x3786f1=_0x3ac7fc,_0x5d46d2=_0x5dda6b[_0x3786f1(0x14e)](_0x2b2172),_0x3ea773=_0x5dda6b[_0x3786f1(0x14e)](_0x16aebc);_0x32ae58['forEach'](_0x30952f=>{const _0x4f4d26=_0x3786f1;_0x5d46d2[_0x4f4d26(0x16c)](_0x30952f)&&_0x32ae58['delete'](_0x30952f);}),_0x32ae58['size']&&(await _0x3ea773[_0x3786f1(0x14e)](_0x3786f1(0x12e),{'params':{'userIDs':[..._0x32ae58]}}))[_0x3786f1(0x171)][_0x3786f1(0x17b)][_0x3786f1(0x15a)](_0x27cd20=>{_0x27cd20&&_0x5d46d2['addUser'](_0x27cd20);});};var K=Object[_0x3ac7fc(0x13a)],V=(_0x9c9ec5,_0x54eea9,_0x1784f6,_0x3ecb5c)=>{const _0xa9d929=_0x3ac7fc;for(var _0x1f5f09=_0x3ecb5c>0x1?void 0x0:_0x3ecb5c?K(_0x54eea9,_0x1784f6):_0x54eea9,_0x16c95a=_0x9c9ec5[_0xa9d929(0x143)]-0x1,_0x481af1;_0x16c95a>=0x0;_0x16c95a--)(_0x481af1=_0x9c9ec5[_0x16c95a])&&(_0x1f5f09=_0x481af1(_0x1f5f09)||_0x1f5f09);return _0x1f5f09;},p=(_0x140d90,_0x244f45)=>(_0x1dc97a,_0x40ab5d)=>_0x244f45(_0x1dc97a,_0x40ab5d,_0x140d90);let S=class extends _0x2967d0{constructor(_0x4e5bac,_0x190b4b,_0xb469e6,_0x5060ed){const _0x2dd255=_0x3ac7fc;super(),this[_0x2dd255(0x180)]=_0x4e5bac,this[_0x2dd255(0x139)]=_0x190b4b,this[_0x2dd255(0x144)]=_0xb469e6,this[_0x2dd255(0x135)]=_0x5060ed,this['_init'](),this['_initUserSync']();}['_initUserSync'](){const _0x45abb6=_0x3ac7fc;this[_0x45abb6(0x167)](this['_threadCommentModel'][_0x45abb6(0x14f)]['pipe'](_0x10be35(0x10))[_0x45abb6(0x131)](_0x1f3872=>{const _0x52825b=_0x45abb6,_0x59c1fa=new Set();_0x1f3872['forEach'](_0x5fafbc=>{const _0x363275=_0x1e53;switch(_0x5fafbc[_0x363275(0x16a)]){case _0x363275(0x177):{const _0x1234cf=_0x5fafbc['payload'][_0x363275(0x164)];_0x59c1fa['add'](_0x1234cf);break;}}}),B(this[_0x52825b(0x135)],_0x59c1fa);}));}['_init'](){const _0x57fda4=_0x3ac7fc;this[_0x57fda4(0x167)](this[_0x57fda4(0x180)]['commentUpdate$'][_0x57fda4(0x131)](async _0x3175ea=>{const _0x3ad442=_0x57fda4;var _0x431cc8,_0x50fdf5,_0x1367aa,_0x7df48c;const _0x4db176=(_0x431cc8=this[_0x3ad442(0x139)][_0x3ad442(0x137)](_0x3175ea[_0x3ad442(0x174)])[_0x3ad442(0x181)](_0x3bd968=>_0x3bd968[_0x3ad442(0x148)]===_0x3175ea[_0x3ad442(0x148)]))==null?void 0x0:_0x431cc8[_0x3ad442(0x14a)];if(!_0x4db176)return;const {unitId:_0xf50944,subUnitId:_0x1b9ca5}=_0x4db176;switch(_0x3175ea['user']&&this[_0x3ad442(0x144)]['addUser'](_0x3175ea['user']),_0x3175ea[_0x3ad442(0x16a)]){case v[_0x3ad442(0x170)]:break;case v[_0x3ad442(0x133)]:{this['_threadCommentModel']['addComment'](_0xf50944,_0x1b9ca5,{'unitId':_0xf50944,'subUnitId':_0x1b9ca5,'ref':'','id':_0x3175ea[_0x3ad442(0x15e)],'dT':D(+_0x3175ea[_0x3ad442(0x175)]),'threadId':_0x3175ea['threadId'],'personId':(_0x1367aa=(_0x50fdf5=_0x3175ea[_0x3ad442(0x151)])==null?void 0x0:_0x50fdf5[_0x3ad442(0x152)])!=null?_0x1367aa:_0x3175ea[_0x3ad442(0x12b)],'text':JSON[_0x3ad442(0x16b)](_0x3175ea['content']),'parentId':_0x4db176['id']});break;}case v[_0x3ad442(0x147)]:{const _0x2a42a5=this['_threadCommentModel'][_0x3ad442(0x123)](_0xf50944,_0x1b9ca5,_0x3175ea[_0x3ad442(0x15e)]);_0x2a42a5&&_0x2a42a5[_0x3ad442(0x179)]&&this[_0x3ad442(0x139)]['deleteComment'](_0xf50944,_0x1b9ca5,_0x3175ea['replyId']);break;}case v[_0x3ad442(0x124)]:{this['_threadCommentModel'][_0x3ad442(0x161)](_0xf50944,_0x1b9ca5,{'commentId':_0x3175ea['replyId'],'text':JSON[_0x3ad442(0x16b)](_0x3175ea[_0x3ad442(0x162)])});break;}case v[_0x3ad442(0x173)]:{const _0x9d67ab=(_0x7df48c=this[_0x3ad442(0x139)][_0x3ad442(0x137)](_0x3175ea[_0x3ad442(0x174)])[_0x3ad442(0x181)](_0x1aea0d=>_0x1aea0d[_0x3ad442(0x148)]===_0x3175ea['threadId']))==null?void 0x0:_0x7df48c[_0x3ad442(0x14a)];_0x9d67ab&&this[_0x3ad442(0x139)][_0x3ad442(0x15b)](_0xf50944,_0x1b9ca5,_0x9d67ab['id'],_0x3175ea[_0x3ad442(0x141)]===I[_0x3ad442(0x13d)]);break;}}}));}};S=V([p(0x0,_0x133874(_0xc12547)),p(0x1,_0x133874(_0x2b6937)),p(0x2,_0x133874(_0x2b2172)),p(0x3,_0x133874(_0x43a099))],S);const z=_0x3ac7fc(0x13e),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x501ca2,_0xa1fbc4,_0x11fb06,_0x28900e)=>{const _0x2df4fa=_0x3ac7fc;for(var _0x362364=_0x28900e>0x1?void 0x0:_0x28900e?k(_0xa1fbc4,_0x11fb06):_0xa1fbc4,_0x4bb0d6=_0x501ca2[_0x2df4fa(0x143)]-0x1,_0x59e303;_0x4bb0d6>=0x0;_0x4bb0d6--)(_0x59e303=_0x501ca2[_0x4bb0d6])&&(_0x362364=_0x59e303(_0x362364)||_0x362364);return _0x362364;},_=(_0x49ec5c,_0x25eaf1)=>(_0x390f4d,_0x35d4b7)=>_0x25eaf1(_0x390f4d,_0x35d4b7,_0x49ec5c);function X(_0xa0b21e,_0x34cf6d){const _0x3bf43d=_0x3ac7fc,_0x3e3523=_0xa0b21e['replies'][0x0];return{..._0x34cf6d,'id':_0x3e3523[_0x3bf43d(0x15e)],'resolved':_0xa0b21e[_0x3bf43d(0x141)]===0x1,'dT':D(_0x3e3523[_0x3bf43d(0x175)]),'personId':_0x3e3523[_0x3bf43d(0x12b)],'threadId':_0x3e3523[_0x3bf43d(0x148)]};}function ee(_0x2c04df,_0xb3cb9c,_0x136815){const _0x58017a=_0x3ac7fc;var _0x1baa27,_0x49920f;if(((_0x49920f=(_0x1baa27=_0x2c04df==null?void 0x0:_0x2c04df[_0x58017a(0x122)])==null?void 0x0:_0x1baa27[_0x58017a(0x143)])!=null?_0x49920f:0x0)>0x0){const _0x519d5b=(_0x43cf51,_0x1df085)=>({'id':_0x43cf51['replyId'],'threadId':_0x43cf51[_0x58017a(0x148)],'dT':D(_0x43cf51[_0x58017a(0x175)]),'personId':_0x43cf51[_0x58017a(0x12b)],'resolved':_0x2c04df[_0x58017a(0x141)]===I['Solved'],'unitId':_0xb3cb9c,'subUnitId':_0x136815,'text':JSON[_0x58017a(0x16b)](_0x43cf51[_0x58017a(0x162)]),'parentId':_0x1df085}),_0x153840=_0x519d5b(_0x2c04df[_0x58017a(0x122)][0x0]);return{..._0x153840,'children':_0x2c04df[_0x58017a(0x122)][_0x58017a(0x185)](0x1)[_0x58017a(0x142)](_0x314fd5=>_0x519d5b(_0x314fd5,_0x153840['id']))};}return null;}let f=class{constructor(_0x18366e,_0x278479,_0x19eaf3,_0xdd2b2){const _0x39ed7a=_0x3ac7fc;this[_0x39ed7a(0x14b)]=_0x18366e,this['_userService']=_0x278479,this['_sessionService']=_0x19eaf3,this[_0x39ed7a(0x135)]=_0xdd2b2;}async[_0x3ac7fc(0x160)](_0x2e9431){const _0x421395=_0x3ac7fc;var _0x47bbc4,_0xfce07;const {parentId:_0x13553b,unitId:_0x392ad9,text:_0x20e764,threadId:_0xade419}=_0x2e9431,_0x4978bc=(_0xfce07=(_0x47bbc4=_0x20e764[_0x421395(0x153)])==null?void 0x0:_0x47bbc4[_0x421395(0x154)](_0x2685e3=>_0x2685e3[_0x421395(0x178)]===_0x370612[_0x421395(0x127)])[_0x421395(0x142)](_0x3a1302=>_0x3a1302[_0x421395(0x15f)]))!=null?_0xfce07:[],_0x1c2407=JSON[_0x421395(0x155)](_0x20e764),_0x25570c=(await this[_0x421395(0x125)][_0x421395(0x176)](_0x392ad9))[_0x421395(0x17f)]();if(_0x13553b){const _0x139d8a={'memberId':_0x25570c,'unitId':_0x392ad9,'content':_0x1c2407,'mention':_0x4978bc,'threadId':_0xade419},_0x3b3648=(await this[_0x421395(0x14b)]['post']('/universer-api/comment/unit/'+_0x392ad9+'/reply',{'body':_0x139d8a}))[_0x421395(0x171)][_0x421395(0x159)];return{..._0x2e9431,'id':_0x3b3648['replyId'],'dT':_0x4356fa(+_0x3b3648[_0x421395(0x175)])[_0x421395(0x12d)](_0x421395(0x14c)),'personId':_0x3b3648[_0x421395(0x12b)]};}else{const _0x8f02d3={'memberId':_0x25570c,'unitId':_0x392ad9,'content':_0x1c2407,'mention':_0x4978bc},_0x67b627=await this[_0x421395(0x14b)][_0x421395(0x130)]('/universer-api/comment/unit/'+_0x392ad9+_0x421395(0x15d),{'body':_0x8f02d3});return X(_0x67b627[_0x421395(0x171)][_0x421395(0x13c)],_0x2e9431);}}async[_0x3ac7fc(0x161)](_0x72161b){const _0xec4031=_0x3ac7fc;var _0x178880,_0x8ade41;const {text:_0x168322,unitId:_0x393c03}=_0x72161b,_0x3f46aa=(_0x8ade41=(_0x178880=_0x168322[_0xec4031(0x153)])==null?void 0x0:_0x178880[_0xec4031(0x154)](_0x2cf5f6=>_0x2cf5f6[_0xec4031(0x178)]===_0x370612[_0xec4031(0x127)])['map'](_0x21570f=>_0x21570f[_0xec4031(0x15f)]))!=null?_0x8ade41:[],_0x18aa83=JSON['stringify'](_0x168322),_0x37893f=_0x72161b[_0xec4031(0x148)],_0x34221d=_0x72161b['id'],_0x4cb833={'memberId':(await this[_0xec4031(0x125)][_0xec4031(0x176)](_0x393c03))['getMemberID'](),'unitId':_0x393c03,'threadId':_0x37893f,'mention':_0x3f46aa,'content':_0x18aa83,'replyId':_0x34221d},_0x3da072=await this['_httpService']['post'](_0xec4031(0x129)+_0x393c03+_0xec4031(0x15c),{'body':_0x4cb833});return!_0x3da072[_0xec4031(0x171)][_0xec4031(0x156)]||_0x3da072[_0xec4031(0x171)]['error'][_0xec4031(0x134)]===0x1;}async[_0x3ac7fc(0x15b)](_0x59af16){const _0x51fe06=_0x3ac7fc,{unitId:_0x3e53e2}=_0x59af16,_0x3ab3c5=_0x59af16[_0x51fe06(0x148)],_0x172970={'memberId':this[_0x51fe06(0x144)][_0x51fe06(0x13f)]()[_0x51fe06(0x152)],'unitId':_0x3e53e2,'threadId':_0x3ab3c5,'solved':_0x59af16[_0x51fe06(0x17a)]?I[_0x51fe06(0x13d)]:I['OpenOrReOpen']},_0x5a6c0a=await this['_httpService'][_0x51fe06(0x130)](_0x51fe06(0x129)+_0x3e53e2+_0x51fe06(0x17e),{'body':_0x172970});return!_0x5a6c0a['body']['error']||_0x5a6c0a[_0x51fe06(0x171)][_0x51fe06(0x156)][_0x51fe06(0x134)]===0x1;}async[_0x3ac7fc(0x12a)](_0x5e6025,_0x43bec9,_0x5a8ca1,_0x5321c1){const _0x50bfec=_0x3ac7fc,_0x28f8cf={'memberId':(await this[_0x50bfec(0x125)][_0x50bfec(0x176)](_0x5e6025))[_0x50bfec(0x17f)](),'threadId':_0x5a8ca1,'replyId':_0x5321c1,'unitId':_0x5e6025},_0xaea3cb=await this['_httpService'][_0x50bfec(0x130)](_0x50bfec(0x129)+_0x5e6025+_0x50bfec(0x166),{'body':_0x28f8cf});return!_0xaea3cb[_0x50bfec(0x171)][_0x50bfec(0x156)]||_0xaea3cb['body']['error'][_0x50bfec(0x134)]===0x1;}async['listComments'](_0x5ac970,_0x13f9fd,_0x2ba9fd){const _0x35e3d3=_0x3ac7fc,_0x58a38c={'unitId':_0x5ac970,'threadId':_0x2ba9fd},_0x5e5aaa=await this['_httpService']['post'](_0x35e3d3(0x129)+_0x5ac970+_0x35e3d3(0x128),{'body':_0x58a38c}),_0x30b1d6=_0x2ba9fd['map'](_0xf8fb31=>ee(_0x5e5aaa['body'][_0x35e3d3(0x14d)][_0xf8fb31],_0x5ac970,_0x13f9fd))[_0x35e3d3(0x154)](Boolean);return Object['values'](_0x5e5aaa[_0x35e3d3(0x171)][_0x35e3d3(0x17b)])[_0x35e3d3(0x15a)](_0x113258=>{const _0x994361=_0x35e3d3;this[_0x994361(0x144)]['addUser'](_0x113258);}),_0x30b1d6;}[_0x3ac7fc(0x145)](_0x4aba45){return{'id':_0x4aba45['id'],'threadId':_0x4aba45['threadId'],'ref':_0x4aba45['ref']};}};function _0x4a8f(){const _0x880634=['syncUpdateMutationToColla','defineProperty','reply','forEach','resolveComment','/edit','/add','replyId','rangeId','addComment','updateComment','content','736005lLkIqg','personId','2GPnCqa','/delete','disposeWithMe','291695PyWAwR','3511102DxeEgM','type','parse','getUser','dataSource','_config','2299816UByDWs','Add','body','UNIVER_UNKNOWN','Solve','unitId','createTimestamp','requireSession','add','rangeType','parentId','resolved','users','_threadCommentDataSourceService','136RJtCLK','/solved','getMemberID','_commentService','find','74124jiXvNm','552835koRClE','pluginName','slice','_threadCommentDataSource','replies','getComment','Edit','_sessionService','7491beKqOM','COMMENT','/list','/universer-api/comment/unit/','deleteComment','userId','UNRECOGNIZED','format','/universer-api/user/list','onReady','post','subscribe','36DuTVYe','Reply','code','_injector','OpenOrReOpen','getUnit','_initDataSource','_threadCommentModel','getOwnPropertyDescriptor','setConfig','comment','Solved','thread-comment-data-source.config','getCurrentUser','2600eeSHJB','solved','map','length','_userService','saveCommentToSnapshot','symbol','Delete','threadId','_configService','root','_httpService','YYYY/MM/DD\x20HH:mm','comments','get','commentUpdate$','Unknown','user','userID','customRanges','filter','stringify','error'];_0x4a8f=function(){return _0x880634;};return _0x4a8f();}f=Q([_(0x0,_0x133874(_0x16aebc)),_(0x1,_0x133874(_0x2b2172)),_(0x2,_0x133874(_0x4085da)),_(0x3,_0x133874(_0x43a099))],f);var re=Object[_0x3ac7fc(0x13a)],te=(_0x5543c5,_0x32b8d4,_0x5cc2e2,_0x184b1e)=>{const _0x347c38=_0x3ac7fc;for(var _0x25f001=_0x184b1e>0x1?void 0x0:_0x184b1e?re(_0x32b8d4,_0x5cc2e2):_0x32b8d4,_0x19c13b=_0x5543c5[_0x347c38(0x143)]-0x1,_0x209cc4;_0x19c13b>=0x0;_0x19c13b--)(_0x209cc4=_0x5543c5[_0x19c13b])&&(_0x25f001=_0x209cc4(_0x25f001)||_0x25f001);return _0x25f001;},N=(_0x29267f,_0x57e409)=>(_0x561270,_0x4f56af)=>_0x57e409(_0x561270,_0x4f56af,_0x29267f);let g=class extends _0x2967d0{constructor(_0x392f63,_0x2d8064){const _0x3f5f85=_0x3ac7fc;super(),this[_0x3f5f85(0x17c)]=_0x392f63,this[_0x3f5f85(0x121)]=_0x2d8064,this[_0x3f5f85(0x138)]();}['_initDataSource'](){const _0x1c745a=_0x3ac7fc;this[_0x1c745a(0x17c)][_0x1c745a(0x16d)]=this[_0x1c745a(0x121)],this[_0x1c745a(0x17c)][_0x1c745a(0x157)]=!0x1;}};g=te([N(0x0,_0xecaf32),N(0x1,_0x133874(f))],g);var se=Object[_0x3ac7fc(0x158)],oe=Object[_0x3ac7fc(0x13a)],ne=(_0x20ec89,_0xa8e439,_0x1fc979)=>_0xa8e439 in _0x20ec89?se(_0x20ec89,_0xa8e439,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1fc979}):_0x20ec89[_0xa8e439]=_0x1fc979,ie=(_0x53e0b9,_0x4d8263,_0x97d81d,_0x1e97ae)=>{const _0x216cdf=_0x3ac7fc;for(var _0x2b8073=_0x1e97ae>0x1?void 0x0:_0x1e97ae?oe(_0x4d8263,_0x97d81d):_0x4d8263,_0x4c531f=_0x53e0b9[_0x216cdf(0x143)]-0x1,_0xcfb379;_0x4c531f>=0x0;_0x4c531f--)(_0xcfb379=_0x53e0b9[_0x4c531f])&&(_0x2b8073=_0xcfb379(_0x2b8073)||_0x2b8073);return _0x2b8073;},w=(_0x2f1726,_0x4591cc)=>(_0x2cb41b,_0x28b6e3)=>_0x4591cc(_0x2cb41b,_0x28b6e3,_0x2f1726),$=(_0x4b8505,_0x2bd292,_0x503f3a)=>ne(_0x4b8505,typeof _0x2bd292!=_0x3ac7fc(0x146)?_0x2bd292+'':_0x2bd292,_0x503f3a);let b=class extends _0x365976{constructor(_0x41552d=M,_0x372897,_0x2d67fd){const _0x41b63b=_0x3ac7fc;super(),this['_config']=_0x41552d,this[_0x41b63b(0x135)]=_0x372897,this[_0x41b63b(0x149)]=_0x2d67fd;const {..._0xee986e}=_0x531f64({},M,this[_0x41b63b(0x16e)]);this['_configService'][_0x41b63b(0x13b)](z,_0xee986e);}['onStarting'](){const _0x3e29e0=_0x3ac7fc;[[f],[g],[S]][_0x3e29e0(0x15a)](_0x5ad961=>{const _0x15ccb9=_0x3e29e0;this[_0x15ccb9(0x135)][_0x15ccb9(0x177)](_0x5ad961);});}[_0x3ac7fc(0x12f)](){const _0x155de3=_0x3ac7fc;this[_0x155de3(0x135)][_0x155de3(0x14e)](g),this[_0x155de3(0x135)][_0x155de3(0x14e)](S);}};function _0x1e53(_0x41dabb,_0x2a22ed){const _0x4a8f57=_0x4a8f();return _0x1e53=function(_0x1e5396,_0x44f623){_0x1e5396=_0x1e5396-0x121;let _0x47d694=_0x4a8f57[_0x1e5396];return _0x47d694;},_0x1e53(_0x41dabb,_0x2a22ed);}$(b,_0x3ac7fc(0x184),W),$(b,_0x3ac7fc(0x16a),_0x29d262[_0x3ac7fc(0x172)]),b=ie([_0x541538(_0x37de3d,_0x25082e,_0x34bfc7),w(0x1,_0x133874(_0x43a099)),w(0x2,_0x55cc27)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
function _0x4119(_0x33c396,_0x7ecedc){const _0x3a31fa=_0x3a31();return _0x4119=function(_0x411952,_0x372456){_0x411952=_0x411952-0xab;let _0x2b7fee=_0x3a31fa[_0x411952];return _0x2b7fee;},_0x4119(_0x33c396,_0x7ecedc);}const _0x425e5f=_0x4119;(function(_0x4e8257,_0x4fb90c){const _0x64ad97=_0x4119,_0x46e20c=_0x4e8257();while(!![]){try{const _0x4641a8=-parseInt(_0x64ad97(0xab))/0x1*(-parseInt(_0x64ad97(0xc0))/0x2)+-parseInt(_0x64ad97(0x103))/0x3+-parseInt(_0x64ad97(0xfd))/0x4*(parseInt(_0x64ad97(0x10f))/0x5)+-parseInt(_0x64ad97(0xf6))/0x6*(parseInt(_0x64ad97(0xb9))/0x7)+parseInt(_0x64ad97(0xc1))/0x8*(parseInt(_0x64ad97(0xdf))/0x9)+-parseInt(_0x64ad97(0xbe))/0xa+-parseInt(_0x64ad97(0xd7))/0xb*(-parseInt(_0x64ad97(0xdc))/0xc);if(_0x4641a8===_0x4fb90c)break;else _0x46e20c['push'](_0x46e20c['shift']());}catch(_0x269378){_0x46e20c['push'](_0x46e20c['shift']());}}}(_0x3a31,0xdad0c));import{CommentService as _0x241de7,CollaborationSessionService as _0x1c1e03,UniverCollaborationClientPlugin as _0x21f04b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x548071}from'@univerjs-pro/license';import{dayjs as _0x56839b,UserManagerService as _0x517fcb,Inject as _0x722246,Injector as _0x25b10c,Disposable as _0x4d0fd0,CustomRangeType as _0x5dbbf9,UniverInstanceType as _0x1d123f,DependentOn as _0x5a38b0,IConfigService as _0x54164f,Plugin as _0x5d2b76,merge as _0x316a9a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x49f318}from'@univerjs/thread-comment-ui';function _0x3a31(){const _0xd4b343=['_initDataSource','_userService','ref','_sessionService','_httpService','rangeId','root','listComments','forEach','add','error','filter','type','UNRECOGNIZED','saveCommentToSnapshot','addUser','4376614JRHNeu','syncUpdateMutationToColla','personId','post','solved','36EegEBS','YYYY/MM/DD\x20HH:mm','_configService','15938298nApGbu','getOwnPropertyDescriptor','threadId','symbol','subscribe','_commentService','get','COMMENT','deleteComment','pluginName','replyId','stringify','length','UNIVER_UNKNOWN','userId','user','values','reply','getUnit','/edit','_config','/solved','users','6lzmEmW','parse','Delete','defineProperty','content','_threadCommentDataSourceService','code','956JswijB','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','format','dataSource','Edit','_threadCommentDataSource','2998938AVjVwi','onReady','rangeType','comment','body','Unknown','_initUserSync','/universer-api/user/list','comments','Reply','map','OpenOrReOpen','17040GOukcz','replies','pipe','5KrXTfL','getCurrentUser','onStarting','userID','_threadCommentModel','Solve','createTimestamp','addComment','_init','/list','/universer-api/comment/unit/','getUser','payload','updateComment','6410089oSZpGB','unitId','_injector','customRanges','resolveComment','6631360LdEBdm','requireSession','529898THPCxt','8cvOfnx','Solved','Add','disposeWithMe','find','getMemberID'];_0x3a31=function(){return _0xd4b343;};return _0x3a31();}import{ThreadCommentModel as _0x33a7b8,IThreadCommentDataSourceService as _0x36983c}from'@univerjs/thread-comment';import{bufferTime as _0x250bbc}from'rxjs';import{HTTPService as _0x199b25}from'@univerjs/network';const W=_0x425e5f(0xfe);var I=(_0x42248f=>(_0x42248f[_0x42248f['OpenOrReOpen']=0x0]=_0x425e5f(0x10e),_0x42248f[_0x42248f[_0x425e5f(0xc2)]=0x1]='Solved',_0x42248f[_0x42248f[_0x425e5f(0xd4)]=-0x1]=_0x425e5f(0xd4),_0x42248f))(I||{}),v=(_0x5abfa2=>(_0x5abfa2[_0x5abfa2[_0x425e5f(0x108)]=0x0]=_0x425e5f(0x108),_0x5abfa2[_0x5abfa2[_0x425e5f(0xc3)]=0x1]=_0x425e5f(0xc3),_0x5abfa2[_0x5abfa2[_0x425e5f(0x10c)]=0x2]=_0x425e5f(0x10c),_0x5abfa2[_0x5abfa2[_0x425e5f(0x101)]=0x3]='Edit',_0x5abfa2[_0x5abfa2[_0x425e5f(0xf8)]=0x4]=_0x425e5f(0xf8),_0x5abfa2[_0x5abfa2[_0x425e5f(0xb0)]=0x5]=_0x425e5f(0xb0),_0x5abfa2[_0x5abfa2[_0x425e5f(0xd4)]=-0x1]=_0x425e5f(0xd4),_0x5abfa2))(v||{});const D=_0x284839=>_0x56839b(new Date(+_0x284839))[_0x425e5f(0xff)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4507a7,_0x31b235)=>{const _0x3ce1d8=_0x425e5f,_0x2f7b8d=_0x4507a7[_0x3ce1d8(0xe5)](_0x517fcb),_0x2c8720=_0x4507a7[_0x3ce1d8(0xe5)](_0x199b25);_0x31b235['forEach'](_0xc331e7=>{const _0x356049=_0x3ce1d8;_0x2f7b8d[_0x356049(0xb6)](_0xc331e7)&&_0x31b235['delete'](_0xc331e7);}),_0x31b235['size']&&(await _0x2c8720[_0x3ce1d8(0xe5)](_0x3ce1d8(0x10a),{'params':{'userIDs':[..._0x31b235]}}))[_0x3ce1d8(0x107)][_0x3ce1d8(0xf5)][_0x3ce1d8(0xcf)](_0x424c44=>{const _0x144387=_0x3ce1d8;_0x424c44&&_0x2f7b8d[_0x144387(0xd6)](_0x424c44);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x500302,_0x2e2fd0,_0x404d4e,_0x17012f)=>{const _0x525ac6=_0x425e5f;for(var _0x383411=_0x17012f>0x1?void 0x0:_0x17012f?K(_0x2e2fd0,_0x404d4e):_0x2e2fd0,_0xd73450=_0x500302[_0x525ac6(0xeb)]-0x1,_0x396eca;_0xd73450>=0x0;_0xd73450--)(_0x396eca=_0x500302[_0xd73450])&&(_0x383411=_0x396eca(_0x383411)||_0x383411);return _0x383411;},p=(_0x36b10a,_0x517527)=>(_0x3a8b79,_0x3dfb77)=>_0x517527(_0x3a8b79,_0x3dfb77,_0x36b10a);let S=class extends _0x4d0fd0{constructor(_0x1fa63b,_0x14cb90,_0x295174,_0x1b7135){const _0x3a2ad7=_0x425e5f;super(),this[_0x3a2ad7(0xe4)]=_0x1fa63b,this[_0x3a2ad7(0xaf)]=_0x14cb90,this['_userService']=_0x295174,this[_0x3a2ad7(0xbb)]=_0x1b7135,this['_init'](),this[_0x3a2ad7(0x109)]();}[_0x425e5f(0x109)](){const _0x4a568c=_0x425e5f;this[_0x4a568c(0xc4)](this[_0x4a568c(0xaf)]['commentUpdate$'][_0x4a568c(0x111)](_0x250bbc(0x10))[_0x4a568c(0xe3)](_0x3fad4e=>{const _0x245149=_0x4a568c,_0x5666d7=new Set();_0x3fad4e[_0x245149(0xcf)](_0x17fa86=>{const _0x8bf604=_0x245149;switch(_0x17fa86[_0x8bf604(0xd3)]){case _0x8bf604(0xd0):{const _0x46d500=_0x17fa86[_0x8bf604(0xb7)][_0x8bf604(0xd9)];_0x5666d7[_0x8bf604(0xd0)](_0x46d500);break;}}}),B(this['_injector'],_0x5666d7);}));}[_0x425e5f(0xb3)](){const _0x302938=_0x425e5f;this[_0x302938(0xc4)](this['_commentService']['commentUpdate$'][_0x302938(0xe3)](async _0x27400f=>{const _0x125426=_0x302938;var _0x290c8b,_0x27b31d,_0x128787,_0x55de0e;const _0x434ff4=(_0x290c8b=this[_0x125426(0xaf)][_0x125426(0xf1)](_0x27400f[_0x125426(0xba)])[_0x125426(0xc5)](_0x3e61dd=>_0x3e61dd['threadId']===_0x27400f['threadId']))==null?void 0x0:_0x290c8b[_0x125426(0xcd)];if(!_0x434ff4)return;const {unitId:_0x3bc7cb,subUnitId:_0x188ab5}=_0x434ff4;switch(_0x27400f[_0x125426(0xee)]&&this[_0x125426(0xc8)]['addUser'](_0x27400f[_0x125426(0xee)]),_0x27400f[_0x125426(0xd3)]){case v['Add']:break;case v[_0x125426(0x10c)]:{this[_0x125426(0xaf)][_0x125426(0xb2)](_0x3bc7cb,_0x188ab5,{'unitId':_0x3bc7cb,'subUnitId':_0x188ab5,'ref':'','id':_0x27400f[_0x125426(0xe9)],'dT':D(+_0x27400f[_0x125426(0xb1)]),'threadId':_0x27400f['threadId'],'personId':(_0x128787=(_0x27b31d=_0x27400f[_0x125426(0xee)])==null?void 0x0:_0x27b31d[_0x125426(0xae)])!=null?_0x128787:_0x27400f[_0x125426(0xed)],'text':JSON[_0x125426(0xf7)](_0x27400f[_0x125426(0xfa)]),'parentId':_0x434ff4['id']});break;}case v['Delete']:{const _0xb1ffec=this[_0x125426(0xaf)]['getComment'](_0x3bc7cb,_0x188ab5,_0x27400f[_0x125426(0xe9)]);_0xb1ffec&&_0xb1ffec['parentId']&&this[_0x125426(0xaf)]['deleteComment'](_0x3bc7cb,_0x188ab5,_0x27400f['replyId']);break;}case v['Edit']:{this[_0x125426(0xaf)]['updateComment'](_0x3bc7cb,_0x188ab5,{'commentId':_0x27400f[_0x125426(0xe9)],'text':JSON[_0x125426(0xf7)](_0x27400f[_0x125426(0xfa)])});break;}case v['Solve']:{const _0x30b031=(_0x55de0e=this['_threadCommentModel'][_0x125426(0xf1)](_0x27400f['unitId'])['find'](_0x50d026=>_0x50d026[_0x125426(0xe1)]===_0x27400f[_0x125426(0xe1)]))==null?void 0x0:_0x55de0e[_0x125426(0xcd)];_0x30b031&&this[_0x125426(0xaf)][_0x125426(0xbd)](_0x3bc7cb,_0x188ab5,_0x30b031['id'],_0x27400f['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x722246(_0x241de7)),p(0x1,_0x722246(_0x33a7b8)),p(0x2,_0x722246(_0x517fcb)),p(0x3,_0x722246(_0x25b10c))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x425e5f(0xe0)],Q=(_0x2c9e87,_0x5bbf41,_0xc0d470,_0x3ca685)=>{for(var _0x150eff=_0x3ca685>0x1?void 0x0:_0x3ca685?k(_0x5bbf41,_0xc0d470):_0x5bbf41,_0x4b8d08=_0x2c9e87['length']-0x1,_0x1a0084;_0x4b8d08>=0x0;_0x4b8d08--)(_0x1a0084=_0x2c9e87[_0x4b8d08])&&(_0x150eff=_0x1a0084(_0x150eff)||_0x150eff);return _0x150eff;},_=(_0x35841f,_0x122090)=>(_0x5452d1,_0x397167)=>_0x122090(_0x5452d1,_0x397167,_0x35841f);function X(_0x45627c,_0x2314e5){const _0x3425bc=_0x425e5f,_0x494270=_0x45627c[_0x3425bc(0x110)][0x0];return{..._0x2314e5,'id':_0x494270[_0x3425bc(0xe9)],'resolved':_0x45627c[_0x3425bc(0xdb)]===0x1,'dT':D(_0x494270[_0x3425bc(0xb1)]),'personId':_0x494270['userId'],'threadId':_0x494270[_0x3425bc(0xe1)]};}function ee(_0x5bb631,_0x51d510,_0x56c115){const _0x265688=_0x425e5f;var _0x2b78d2,_0x94154a;if(((_0x94154a=(_0x2b78d2=_0x5bb631==null?void 0x0:_0x5bb631[_0x265688(0x110)])==null?void 0x0:_0x2b78d2[_0x265688(0xeb)])!=null?_0x94154a:0x0)>0x0){const _0x4bc798=(_0x193266,_0x145d37)=>({'id':_0x193266[_0x265688(0xe9)],'threadId':_0x193266[_0x265688(0xe1)],'dT':D(_0x193266[_0x265688(0xb1)]),'personId':_0x193266[_0x265688(0xed)],'resolved':_0x5bb631[_0x265688(0xdb)]===I['Solved'],'unitId':_0x51d510,'subUnitId':_0x56c115,'text':JSON[_0x265688(0xf7)](_0x193266[_0x265688(0xfa)]),'parentId':_0x145d37}),_0x5badc1=_0x4bc798(_0x5bb631['replies'][0x0]);return{..._0x5badc1,'children':_0x5bb631['replies']['slice'](0x1)['map'](_0x4cd4a4=>_0x4bc798(_0x4cd4a4,_0x5badc1['id']))};}return null;}let f=class{constructor(_0x4664a5,_0x1bc530,_0x453a75,_0x1da0e6){const _0x1027f7=_0x425e5f;this[_0x1027f7(0xcb)]=_0x4664a5,this[_0x1027f7(0xc8)]=_0x1bc530,this[_0x1027f7(0xca)]=_0x453a75,this[_0x1027f7(0xbb)]=_0x1da0e6;}async[_0x425e5f(0xb2)](_0x689999){const _0x86f68c=_0x425e5f;var _0x1faf94,_0x4b25bc;const {parentId:_0x53a94,unitId:_0x50aa87,text:_0x52355e,threadId:_0x2e3457}=_0x689999,_0x3c684e=(_0x4b25bc=(_0x1faf94=_0x52355e[_0x86f68c(0xbc)])==null?void 0x0:_0x1faf94[_0x86f68c(0xd2)](_0x5728cd=>_0x5728cd[_0x86f68c(0x105)]===_0x5dbbf9[_0x86f68c(0xe6)])[_0x86f68c(0x10d)](_0x4200a0=>_0x4200a0[_0x86f68c(0xcc)]))!=null?_0x4b25bc:[],_0x229563=JSON['stringify'](_0x52355e),_0x2c1fa3=(await this[_0x86f68c(0xca)][_0x86f68c(0xbf)](_0x50aa87))[_0x86f68c(0xc6)]();if(_0x53a94){const _0x47317a={'memberId':_0x2c1fa3,'unitId':_0x50aa87,'content':_0x229563,'mention':_0x3c684e,'threadId':_0x2e3457},_0x3dfa63=(await this['_httpService'][_0x86f68c(0xda)](_0x86f68c(0xb5)+_0x50aa87+'/reply',{'body':_0x47317a}))[_0x86f68c(0x107)][_0x86f68c(0xf0)];return{..._0x689999,'id':_0x3dfa63[_0x86f68c(0xe9)],'dT':_0x56839b(+_0x3dfa63[_0x86f68c(0xb1)])[_0x86f68c(0xff)](_0x86f68c(0xdd)),'personId':_0x3dfa63[_0x86f68c(0xed)]};}else{const _0x51d8e1={'memberId':_0x2c1fa3,'unitId':_0x50aa87,'content':_0x229563,'mention':_0x3c684e},_0x1d87d9=await this[_0x86f68c(0xcb)][_0x86f68c(0xda)](_0x86f68c(0xb5)+_0x50aa87+'/add',{'body':_0x51d8e1});return X(_0x1d87d9[_0x86f68c(0x107)][_0x86f68c(0x106)],_0x689999);}}async[_0x425e5f(0xb8)](_0x54c835){const _0x54e91c=_0x425e5f;var _0x40dafe,_0x5ef016;const {text:_0x5177ac,unitId:_0x6575d}=_0x54c835,_0x37d918=(_0x5ef016=(_0x40dafe=_0x5177ac['customRanges'])==null?void 0x0:_0x40dafe[_0x54e91c(0xd2)](_0x5721ab=>_0x5721ab[_0x54e91c(0x105)]===_0x5dbbf9['COMMENT'])['map'](_0x2ce100=>_0x2ce100['rangeId']))!=null?_0x5ef016:[],_0x381bc6=JSON[_0x54e91c(0xea)](_0x5177ac),_0x17e5f7=_0x54c835[_0x54e91c(0xe1)],_0x13cb70=_0x54c835['id'],_0x461bec={'memberId':(await this[_0x54e91c(0xca)]['requireSession'](_0x6575d))[_0x54e91c(0xc6)](),'unitId':_0x6575d,'threadId':_0x17e5f7,'mention':_0x37d918,'content':_0x381bc6,'replyId':_0x13cb70},_0x38e3a2=await this[_0x54e91c(0xcb)][_0x54e91c(0xda)](_0x54e91c(0xb5)+_0x6575d+_0x54e91c(0xf2),{'body':_0x461bec});return!_0x38e3a2[_0x54e91c(0x107)]['error']||_0x38e3a2['body'][_0x54e91c(0xd1)][_0x54e91c(0xfc)]===0x1;}async[_0x425e5f(0xbd)](_0x30762f){const _0x1cbdd4=_0x425e5f,{unitId:_0x4980a6}=_0x30762f,_0x5227a3=_0x30762f[_0x1cbdd4(0xe1)],_0x2cd44d={'memberId':this[_0x1cbdd4(0xc8)][_0x1cbdd4(0xac)]()[_0x1cbdd4(0xae)],'unitId':_0x4980a6,'threadId':_0x5227a3,'solved':_0x30762f['resolved']?I['Solved']:I['OpenOrReOpen']},_0x540e0c=await this[_0x1cbdd4(0xcb)][_0x1cbdd4(0xda)](_0x1cbdd4(0xb5)+_0x4980a6+_0x1cbdd4(0xf4),{'body':_0x2cd44d});return!_0x540e0c[_0x1cbdd4(0x107)][_0x1cbdd4(0xd1)]||_0x540e0c[_0x1cbdd4(0x107)][_0x1cbdd4(0xd1)][_0x1cbdd4(0xfc)]===0x1;}async[_0x425e5f(0xe7)](_0x562ce5,_0x31c8ae,_0x5d192c,_0x51c657){const _0x27aa85=_0x425e5f,_0x527fc1={'memberId':(await this[_0x27aa85(0xca)]['requireSession'](_0x562ce5))[_0x27aa85(0xc6)](),'threadId':_0x5d192c,'replyId':_0x51c657,'unitId':_0x562ce5},_0x255052=await this['_httpService'][_0x27aa85(0xda)](_0x27aa85(0xb5)+_0x562ce5+'/delete',{'body':_0x527fc1});return!_0x255052[_0x27aa85(0x107)][_0x27aa85(0xd1)]||_0x255052[_0x27aa85(0x107)][_0x27aa85(0xd1)]['code']===0x1;}async[_0x425e5f(0xce)](_0x22ca3f,_0x1dcfce,_0x4dafc7){const _0x5a5b03=_0x425e5f,_0x5dbc47={'unitId':_0x22ca3f,'threadId':_0x4dafc7},_0x2a0489=await this['_httpService']['post'](_0x5a5b03(0xb5)+_0x22ca3f+_0x5a5b03(0xb4),{'body':_0x5dbc47}),_0x533b53=_0x4dafc7[_0x5a5b03(0x10d)](_0x54fb20=>ee(_0x2a0489[_0x5a5b03(0x107)][_0x5a5b03(0x10b)][_0x54fb20],_0x22ca3f,_0x1dcfce))[_0x5a5b03(0xd2)](Boolean);return Object[_0x5a5b03(0xef)](_0x2a0489[_0x5a5b03(0x107)][_0x5a5b03(0xf5)])[_0x5a5b03(0xcf)](_0x16fd25=>{const _0x81b8fd=_0x5a5b03;this[_0x81b8fd(0xc8)]['addUser'](_0x16fd25);}),_0x533b53;}[_0x425e5f(0xd5)](_0x3a387d){const _0x597b38=_0x425e5f;return{'id':_0x3a387d['id'],'threadId':_0x3a387d['threadId'],'ref':_0x3a387d[_0x597b38(0xc9)]};}};f=Q([_(0x0,_0x722246(_0x199b25)),_(0x1,_0x722246(_0x517fcb)),_(0x2,_0x722246(_0x1c1e03)),_(0x3,_0x722246(_0x25b10c))],f);var re=Object[_0x425e5f(0xe0)],te=(_0x9f81f9,_0x54c8b6,_0x266938,_0xa26a6a)=>{const _0x394d41=_0x425e5f;for(var _0x3fa3cb=_0xa26a6a>0x1?void 0x0:_0xa26a6a?re(_0x54c8b6,_0x266938):_0x54c8b6,_0x4f72cb=_0x9f81f9[_0x394d41(0xeb)]-0x1,_0x59c7bb;_0x4f72cb>=0x0;_0x4f72cb--)(_0x59c7bb=_0x9f81f9[_0x4f72cb])&&(_0x3fa3cb=_0x59c7bb(_0x3fa3cb)||_0x3fa3cb);return _0x3fa3cb;},N=(_0x16bcfb,_0x1b5152)=>(_0xaedfca,_0x27e232)=>_0x1b5152(_0xaedfca,_0x27e232,_0x16bcfb);let g=class extends _0x4d0fd0{constructor(_0x2434d1,_0x318b48){const _0x42aafc=_0x425e5f;super(),this['_threadCommentDataSourceService']=_0x2434d1,this['_threadCommentDataSource']=_0x318b48,this[_0x42aafc(0xc7)]();}[_0x425e5f(0xc7)](){const _0x14d606=_0x425e5f;this[_0x14d606(0xfb)][_0x14d606(0x100)]=this[_0x14d606(0x102)],this[_0x14d606(0xfb)][_0x14d606(0xd8)]=!0x1;}};g=te([N(0x0,_0x36983c),N(0x1,_0x722246(f))],g);var se=Object[_0x425e5f(0xf9)],oe=Object[_0x425e5f(0xe0)],ne=(_0x5a9072,_0x5ec4fc,_0x6da4c2)=>_0x5ec4fc in _0x5a9072?se(_0x5a9072,_0x5ec4fc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x6da4c2}):_0x5a9072[_0x5ec4fc]=_0x6da4c2,ie=(_0x4bb8e5,_0x19a3e5,_0x55390e,_0x43e9a5)=>{for(var _0x5a7cec=_0x43e9a5>0x1?void 0x0:_0x43e9a5?oe(_0x19a3e5,_0x55390e):_0x19a3e5,_0x48a66c=_0x4bb8e5['length']-0x1,_0x1d0097;_0x48a66c>=0x0;_0x48a66c--)(_0x1d0097=_0x4bb8e5[_0x48a66c])&&(_0x5a7cec=_0x1d0097(_0x5a7cec)||_0x5a7cec);return _0x5a7cec;},w=(_0x5de127,_0xc2847b)=>(_0x3d3baf,_0x514773)=>_0xc2847b(_0x3d3baf,_0x514773,_0x5de127),$=(_0x4a50ef,_0xdaae1c,_0x148dd2)=>ne(_0x4a50ef,typeof _0xdaae1c!=_0x425e5f(0xe2)?_0xdaae1c+'':_0xdaae1c,_0x148dd2);let b=class extends _0x5d2b76{constructor(_0x45c136=M,_0x4fe88f,_0x1a949d){const _0x41c0d3=_0x425e5f;super(),this[_0x41c0d3(0xf3)]=_0x45c136,this[_0x41c0d3(0xbb)]=_0x4fe88f,this[_0x41c0d3(0xde)]=_0x1a949d;const {..._0x3fbf03}=_0x316a9a({},M,this[_0x41c0d3(0xf3)]);this[_0x41c0d3(0xde)]['setConfig'](z,_0x3fbf03);}[_0x425e5f(0xad)](){const _0x5490df=_0x425e5f;[[f],[g],[S]][_0x5490df(0xcf)](_0xf0efb=>{const _0x533850=_0x5490df;this[_0x533850(0xbb)]['add'](_0xf0efb);});}[_0x425e5f(0x104)](){this['_injector']['get'](g),this['_injector']['get'](S);}};$(b,_0x425e5f(0xe8),W),$(b,_0x425e5f(0xd3),_0x1d123f[_0x425e5f(0xec)]),b=ie([_0x5a38b0(_0x49f318,_0x21f04b,_0x548071),w(0x1,_0x722246(_0x25b10c)),w(0x2,_0x54164f)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x476fde,_0x526651){const _0x1c2f3b=_0x374f,_0x206f9b=_0x476fde();while(!![]){try{const _0x56806d=parseInt(_0x1c2f3b(0x211))/0x1+parseInt(_0x1c2f3b(0x1c7))/0x2*(parseInt(_0x1c2f3b(0x1cc))/0x3)+parseInt(_0x1c2f3b(0x21c))/0x4+-parseInt(_0x1c2f3b(0x1bb))/0x5+parseInt(_0x1c2f3b(0x1fc))/0x6*(parseInt(_0x1c2f3b(0x1be))/0x7)+parseInt(_0x1c2f3b(0x1e5))/0x8+-parseInt(_0x1c2f3b(0x1ee))/0x9*(parseInt(_0x1c2f3b(0x1ed))/0xa);if(_0x56806d===_0x526651)break;else _0x206f9b['push'](_0x206f9b['shift']());}catch(_0x26d4ee){_0x206f9b['push'](_0x206f9b['shift']());}}}(_0x36e1,0x79168),function(_0x5b3448,_0x11b030){const _0x5f3e1a=_0x374f;typeof exports==_0x5f3e1a(0x1ef)&&typeof module<'u'?_0x11b030(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x5f3e1a(0x239)&&define['amd']?define([_0x5f3e1a(0x21f),_0x5f3e1a(0x236),'@univerjs-pro/license',_0x5f3e1a(0x1d7),_0x5f3e1a(0x1c2),_0x5f3e1a(0x1f4),'rxjs',_0x5f3e1a(0x1f7)],_0x11b030):(_0x5b3448=typeof globalThis<'u'?globalThis:_0x5b3448||self,_0x11b030(_0x5b3448[_0x5f3e1a(0x209)]={},_0x5b3448['UniverProCollaborationClient'],_0x5b3448[_0x5f3e1a(0x210)],_0x5b3448[_0x5f3e1a(0x228)],_0x5b3448[_0x5f3e1a(0x1c1)],_0x5b3448[_0x5f3e1a(0x223)],_0x5b3448['rxjs'],_0x5b3448[_0x5f3e1a(0x1d2)]));}(this,function(_0x3249bc,_0x5e13bf,_0x1cc471,_0x3ca6c2,_0x54c9f1,_0x5cdebe,_0x56fbfb,_0x4e4338){'use strict';const _0x3017c1=_0x374f;const _0x12dec8=_0x3017c1(0x22e);var _0x4938f1=(_0x56a403=>(_0x56a403[_0x56a403[_0x3017c1(0x1e9)]=0x0]=_0x3017c1(0x1e9),_0x56a403[_0x56a403[_0x3017c1(0x1db)]=0x1]=_0x3017c1(0x1db),_0x56a403[_0x56a403[_0x3017c1(0x1ff)]=-0x1]=_0x3017c1(0x1ff),_0x56a403))(_0x4938f1||{}),_0x2b0a24=(_0x3fdf6a=>(_0x3fdf6a[_0x3fdf6a['Unknown']=0x0]=_0x3017c1(0x230),_0x3fdf6a[_0x3fdf6a[_0x3017c1(0x204)]=0x1]=_0x3017c1(0x204),_0x3fdf6a[_0x3fdf6a[_0x3017c1(0x22f)]=0x2]=_0x3017c1(0x22f),_0x3fdf6a[_0x3fdf6a['Edit']=0x3]='Edit',_0x3fdf6a[_0x3fdf6a['Delete']=0x4]=_0x3017c1(0x1e1),_0x3fdf6a[_0x3fdf6a[_0x3017c1(0x220)]=0x5]=_0x3017c1(0x220),_0x3fdf6a[_0x3fdf6a[_0x3017c1(0x1ff)]=-0x1]=_0x3017c1(0x1ff),_0x3fdf6a))(_0x2b0a24||{});const _0x2a4cdf=_0x5c5dac=>_0x3ca6c2[_0x3017c1(0x1c5)](new Date(+_0x5c5dac))[_0x3017c1(0x202)](_0x3017c1(0x1da)),_0x5bc2e7=async(_0x4e3809,_0xedac2d)=>{const _0x415695=_0x3017c1,_0x44f117=_0x4e3809['get'](_0x3ca6c2[_0x415695(0x226)]),_0x2600b7=_0x4e3809[_0x415695(0x20d)](_0x4e4338[_0x415695(0x1d8)]);_0xedac2d[_0x415695(0x1fd)](_0x26d4bf=>{const _0x430b15=_0x415695;_0x44f117[_0x430b15(0x1f1)](_0x26d4bf)&&_0xedac2d[_0x430b15(0x221)](_0x26d4bf);}),_0xedac2d['size']&&(await _0x2600b7[_0x415695(0x20d)](_0x415695(0x1cf),{'params':{'userIDs':[..._0xedac2d]}}))['body']['users']['forEach'](_0x32d64e=>{const _0x361ed3=_0x415695;_0x32d64e&&_0x44f117[_0x361ed3(0x1ba)](_0x32d64e);});};var _0x515550=Object['getOwnPropertyDescriptor'],_0x2de564=(_0x521c1e,_0x569597,_0x4e4a7e,_0x5689d0)=>{for(var _0x53cd1c=_0x5689d0>0x1?void 0x0:_0x5689d0?_0x515550(_0x569597,_0x4e4a7e):_0x569597,_0x576b99=_0x521c1e['length']-0x1,_0x5d4a35;_0x576b99>=0x0;_0x576b99--)(_0x5d4a35=_0x521c1e[_0x576b99])&&(_0x53cd1c=_0x5d4a35(_0x53cd1c)||_0x53cd1c);return _0x53cd1c;},_0x5b70e9=(_0x23964c,_0x2fef51)=>(_0x39b160,_0x47cfff)=>_0x2fef51(_0x39b160,_0x47cfff,_0x23964c);let _0x519bdd=class extends _0x3ca6c2[_0x3017c1(0x22b)]{constructor(_0x362321,_0x398b1e,_0x59b215,_0x32390a){const _0x13025d=_0x3017c1;super(),this[_0x13025d(0x20b)]=_0x362321,this[_0x13025d(0x1f5)]=_0x398b1e,this[_0x13025d(0x23a)]=_0x59b215,this['_injector']=_0x32390a,this[_0x13025d(0x229)](),this['_initUserSync']();}['_initUserSync'](){const _0x5d4d85=_0x3017c1;this[_0x5d4d85(0x21e)](this['_threadCommentModel'][_0x5d4d85(0x207)][_0x5d4d85(0x213)](_0x56fbfb[_0x5d4d85(0x1c6)](0x10))[_0x5d4d85(0x1e2)](_0x20945d=>{const _0xcb932b=_0x5d4d85,_0x4264ef=new Set();_0x20945d[_0xcb932b(0x1fd)](_0x3ac9e1=>{const _0x1d01ec=_0xcb932b;switch(_0x3ac9e1[_0x1d01ec(0x1b7)]){case'add':{const _0x188f16=_0x3ac9e1[_0x1d01ec(0x1b6)][_0x1d01ec(0x21d)];_0x4264ef[_0x1d01ec(0x1b8)](_0x188f16);break;}}}),_0x5bc2e7(this[_0xcb932b(0x1d9)],_0x4264ef);}));}['_init'](){const _0x10a2db=_0x3017c1;this[_0x10a2db(0x21e)](this[_0x10a2db(0x20b)][_0x10a2db(0x207)][_0x10a2db(0x1e2)](async _0x4b8479=>{const _0x146273=_0x10a2db;var _0x8a399,_0x3ad49e,_0x580ccc,_0x1b7273;const _0x528be3=(_0x8a399=this[_0x146273(0x1f5)]['getUnit'](_0x4b8479[_0x146273(0x1e6)])[_0x146273(0x20a)](_0x58fa35=>_0x58fa35[_0x146273(0x1bd)]===_0x4b8479[_0x146273(0x1bd)]))==null?void 0x0:_0x8a399[_0x146273(0x222)];if(!_0x528be3)return;const {unitId:_0x5ce8bf,subUnitId:_0x3066c4}=_0x528be3;switch(_0x4b8479[_0x146273(0x1c9)]&&this[_0x146273(0x23a)][_0x146273(0x1ba)](_0x4b8479[_0x146273(0x1c9)]),_0x4b8479['type']){case _0x2b0a24[_0x146273(0x204)]:break;case _0x2b0a24['Reply']:{this[_0x146273(0x1f5)][_0x146273(0x1cd)](_0x5ce8bf,_0x3066c4,{'unitId':_0x5ce8bf,'subUnitId':_0x3066c4,'ref':'','id':_0x4b8479[_0x146273(0x1d3)],'dT':_0x2a4cdf(+_0x4b8479[_0x146273(0x1f0)]),'threadId':_0x4b8479[_0x146273(0x1bd)],'personId':(_0x580ccc=(_0x3ad49e=_0x4b8479[_0x146273(0x1c9)])==null?void 0x0:_0x3ad49e['userID'])!=null?_0x580ccc:_0x4b8479[_0x146273(0x1d4)],'text':JSON['parse'](_0x4b8479[_0x146273(0x227)]),'parentId':_0x528be3['id']});break;}case _0x2b0a24[_0x146273(0x1e1)]:{const _0x36521f=this['_threadCommentModel'][_0x146273(0x203)](_0x5ce8bf,_0x3066c4,_0x4b8479[_0x146273(0x1d3)]);_0x36521f&&_0x36521f[_0x146273(0x1d5)]&&this[_0x146273(0x1f5)][_0x146273(0x201)](_0x5ce8bf,_0x3066c4,_0x4b8479[_0x146273(0x1d3)]);break;}case _0x2b0a24['Edit']:{this[_0x146273(0x1f5)][_0x146273(0x1f3)](_0x5ce8bf,_0x3066c4,{'commentId':_0x4b8479[_0x146273(0x1d3)],'text':JSON[_0x146273(0x231)](_0x4b8479[_0x146273(0x227)])});break;}case _0x2b0a24[_0x146273(0x220)]:{const _0x110252=(_0x1b7273=this[_0x146273(0x1f5)][_0x146273(0x1e0)](_0x4b8479[_0x146273(0x1e6)])[_0x146273(0x20a)](_0x532782=>_0x532782[_0x146273(0x1bd)]===_0x4b8479[_0x146273(0x1bd)]))==null?void 0x0:_0x1b7273[_0x146273(0x222)];_0x110252&&this['_threadCommentModel'][_0x146273(0x1e3)](_0x5ce8bf,_0x3066c4,_0x110252['id'],_0x4b8479['solved']===_0x4938f1[_0x146273(0x1db)]);break;}}}));}};_0x519bdd=_0x2de564([_0x5b70e9(0x0,_0x3ca6c2['Inject'](_0x5e13bf[_0x3017c1(0x1de)])),_0x5b70e9(0x1,_0x3ca6c2[_0x3017c1(0x1c0)](_0x5cdebe[_0x3017c1(0x234)])),_0x5b70e9(0x2,_0x3ca6c2['Inject'](_0x3ca6c2['UserManagerService'])),_0x5b70e9(0x3,_0x3ca6c2[_0x3017c1(0x1c0)](_0x3ca6c2['Injector']))],_0x519bdd);const _0x270cda=_0x3017c1(0x212),_0x52a5e4={};var _0x57c51d=Object[_0x3017c1(0x215)],_0x1249c1=(_0x19c6b3,_0x3d9bf2,_0x45c62f,_0x387434)=>{const _0x1bd3f1=_0x3017c1;for(var _0x29e935=_0x387434>0x1?void 0x0:_0x387434?_0x57c51d(_0x3d9bf2,_0x45c62f):_0x3d9bf2,_0x452926=_0x19c6b3[_0x1bd3f1(0x1fa)]-0x1,_0x3c0c6a;_0x452926>=0x0;_0x452926--)(_0x3c0c6a=_0x19c6b3[_0x452926])&&(_0x29e935=_0x3c0c6a(_0x29e935)||_0x29e935);return _0x29e935;},_0x58a856=(_0x212ac0,_0x503595)=>(_0x3b6b0e,_0x2d08dc)=>_0x503595(_0x3b6b0e,_0x2d08dc,_0x212ac0);function _0x5cceda(_0x340f21,_0x5210b6){const _0x572e2e=_0x3017c1,_0x4f86e4=_0x340f21[_0x572e2e(0x1d6)][0x0];return{..._0x5210b6,'id':_0x4f86e4[_0x572e2e(0x1d3)],'resolved':_0x340f21[_0x572e2e(0x22d)]===0x1,'dT':_0x2a4cdf(_0x4f86e4[_0x572e2e(0x1f0)]),'personId':_0x4f86e4[_0x572e2e(0x1d4)],'threadId':_0x4f86e4[_0x572e2e(0x1bd)]};}function _0x12ce0b(_0x3849ae,_0x884c53,_0x34c86e){const _0x5bf7f1=_0x3017c1;var _0x267a81,_0xe426ce;if(((_0xe426ce=(_0x267a81=_0x3849ae==null?void 0x0:_0x3849ae['replies'])==null?void 0x0:_0x267a81['length'])!=null?_0xe426ce:0x0)>0x0){const _0x165d8e=(_0x3b4927,_0x364701)=>({'id':_0x3b4927[_0x5bf7f1(0x1d3)],'threadId':_0x3b4927[_0x5bf7f1(0x1bd)],'dT':_0x2a4cdf(_0x3b4927['createTimestamp']),'personId':_0x3b4927[_0x5bf7f1(0x1d4)],'resolved':_0x3849ae[_0x5bf7f1(0x22d)]===_0x4938f1['Solved'],'unitId':_0x884c53,'subUnitId':_0x34c86e,'text':JSON[_0x5bf7f1(0x231)](_0x3b4927[_0x5bf7f1(0x227)]),'parentId':_0x364701}),_0x21eb18=_0x165d8e(_0x3849ae['replies'][0x0]);return{..._0x21eb18,'children':_0x3849ae[_0x5bf7f1(0x1d6)][_0x5bf7f1(0x22a)](0x1)['map'](_0x5eb299=>_0x165d8e(_0x5eb299,_0x21eb18['id']))};}return null;}let _0x1bcc49=class{constructor(_0x3114f9,_0x33bc1b,_0x2763af,_0x45bead){const _0x2bb272=_0x3017c1;this[_0x2bb272(0x1fe)]=_0x3114f9,this[_0x2bb272(0x23a)]=_0x33bc1b,this['_sessionService']=_0x2763af,this[_0x2bb272(0x1d9)]=_0x45bead;}async['addComment'](_0x468777){const _0x415ddd=_0x3017c1;var _0x42d03e,_0x547247;const {parentId:_0x527323,unitId:_0x2232a9,text:_0x4a2a76,threadId:_0x4af3d8}=_0x468777,_0x28267c=(_0x547247=(_0x42d03e=_0x4a2a76[_0x415ddd(0x1f2)])==null?void 0x0:_0x42d03e['filter'](_0x3d43b1=>_0x3d43b1['rangeType']===_0x3ca6c2[_0x415ddd(0x1cb)]['COMMENT'])[_0x415ddd(0x22c)](_0x15e4c0=>_0x15e4c0['rangeId']))!=null?_0x547247:[],_0x2ae1bf=JSON[_0x415ddd(0x233)](_0x4a2a76),_0x36959c=(await this[_0x415ddd(0x1e4)][_0x415ddd(0x1ca)](_0x2232a9))[_0x415ddd(0x216)]();if(_0x527323){const _0x16b6a8={'memberId':_0x36959c,'unitId':_0x2232a9,'content':_0x2ae1bf,'mention':_0x28267c,'threadId':_0x4af3d8},_0x19c26e=(await this[_0x415ddd(0x1fe)]['post']('/universer-api/comment/unit/'+_0x2232a9+_0x415ddd(0x1c8),{'body':_0x16b6a8}))['body']['reply'];return{..._0x468777,'id':_0x19c26e['replyId'],'dT':_0x3ca6c2['dayjs'](+_0x19c26e['createTimestamp'])[_0x415ddd(0x202)](_0x415ddd(0x1da)),'personId':_0x19c26e[_0x415ddd(0x1d4)]};}else{const _0x2e845f={'memberId':_0x36959c,'unitId':_0x2232a9,'content':_0x2ae1bf,'mention':_0x28267c},_0x3b2ca0=await this[_0x415ddd(0x1fe)][_0x415ddd(0x224)](_0x415ddd(0x237)+_0x2232a9+_0x415ddd(0x1bc),{'body':_0x2e845f});return _0x5cceda(_0x3b2ca0[_0x415ddd(0x1df)][_0x415ddd(0x1c3)],_0x468777);}}async[_0x3017c1(0x1f3)](_0x18fa89){const _0x283c3b=_0x3017c1;var _0x1b36d5,_0xee6228;const {text:_0x142e19,unitId:_0x3f69b0}=_0x18fa89,_0x3c4c56=(_0xee6228=(_0x1b36d5=_0x142e19[_0x283c3b(0x1f2)])==null?void 0x0:_0x1b36d5[_0x283c3b(0x20e)](_0x18c8c4=>_0x18c8c4[_0x283c3b(0x1eb)]===_0x3ca6c2[_0x283c3b(0x1cb)]['COMMENT'])[_0x283c3b(0x22c)](_0x5a17d8=>_0x5a17d8[_0x283c3b(0x20c)]))!=null?_0xee6228:[],_0x1eda19=JSON[_0x283c3b(0x233)](_0x142e19),_0x53c5ad=_0x18fa89[_0x283c3b(0x1bd)],_0x244537=_0x18fa89['id'],_0xa5d1b8={'memberId':(await this[_0x283c3b(0x1e4)][_0x283c3b(0x1ca)](_0x3f69b0))[_0x283c3b(0x216)](),'unitId':_0x3f69b0,'threadId':_0x53c5ad,'mention':_0x3c4c56,'content':_0x1eda19,'replyId':_0x244537},_0x3eb265=await this[_0x283c3b(0x1fe)][_0x283c3b(0x224)](_0x283c3b(0x237)+_0x3f69b0+_0x283c3b(0x1f8),{'body':_0xa5d1b8});return!_0x3eb265[_0x283c3b(0x1df)][_0x283c3b(0x1ec)]||_0x3eb265['body'][_0x283c3b(0x1ec)][_0x283c3b(0x238)]===0x1;}async[_0x3017c1(0x1e3)](_0x4a97df){const _0x379756=_0x3017c1,{unitId:_0x4d0b85}=_0x4a97df,_0x51f954=_0x4a97df[_0x379756(0x1bd)],_0x40398a={'memberId':this[_0x379756(0x23a)][_0x379756(0x1e8)]()[_0x379756(0x1d1)],'unitId':_0x4d0b85,'threadId':_0x51f954,'solved':_0x4a97df[_0x379756(0x217)]?_0x4938f1[_0x379756(0x1db)]:_0x4938f1[_0x379756(0x1e9)]},_0x34f48b=await this[_0x379756(0x1fe)][_0x379756(0x224)](_0x379756(0x237)+_0x4d0b85+'/solved',{'body':_0x40398a});return!_0x34f48b[_0x379756(0x1df)]['error']||_0x34f48b[_0x379756(0x1df)]['error'][_0x379756(0x238)]===0x1;}async[_0x3017c1(0x201)](_0x4541a3,_0xcee5e1,_0x59d6a7,_0x5ede43){const _0x195171=_0x3017c1,_0x115f07={'memberId':(await this[_0x195171(0x1e4)]['requireSession'](_0x4541a3))['getMemberID'](),'threadId':_0x59d6a7,'replyId':_0x5ede43,'unitId':_0x4541a3},_0x288c4f=await this[_0x195171(0x1fe)][_0x195171(0x224)](_0x195171(0x237)+_0x4541a3+'/delete',{'body':_0x115f07});return!_0x288c4f['body'][_0x195171(0x1ec)]||_0x288c4f[_0x195171(0x1df)][_0x195171(0x1ec)][_0x195171(0x238)]===0x1;}async[_0x3017c1(0x235)](_0x27468b,_0x2abccc,_0x57a189){const _0x80fb8c=_0x3017c1,_0x13546e={'unitId':_0x27468b,'threadId':_0x57a189},_0x5d1c9a=await this[_0x80fb8c(0x1fe)][_0x80fb8c(0x224)](_0x80fb8c(0x237)+_0x27468b+_0x80fb8c(0x208),{'body':_0x13546e}),_0x1737d2=_0x57a189['map'](_0x41e9fe=>_0x12ce0b(_0x5d1c9a[_0x80fb8c(0x1df)][_0x80fb8c(0x20f)][_0x41e9fe],_0x27468b,_0x2abccc))[_0x80fb8c(0x20e)](Boolean);return Object[_0x80fb8c(0x1ea)](_0x5d1c9a['body']['users'])[_0x80fb8c(0x1fd)](_0x309b07=>{const _0x581385=_0x80fb8c;this[_0x581385(0x23a)][_0x581385(0x1ba)](_0x309b07);}),_0x1737d2;}['saveCommentToSnapshot'](_0x47eebb){const _0x4b2188=_0x3017c1;return{'id':_0x47eebb['id'],'threadId':_0x47eebb['threadId'],'ref':_0x47eebb[_0x4b2188(0x214)]};}};_0x1bcc49=_0x1249c1([_0x58a856(0x0,_0x3ca6c2[_0x3017c1(0x1c0)](_0x4e4338[_0x3017c1(0x1d8)])),_0x58a856(0x1,_0x3ca6c2['Inject'](_0x3ca6c2[_0x3017c1(0x226)])),_0x58a856(0x2,_0x3ca6c2[_0x3017c1(0x1c0)](_0x5e13bf['CollaborationSessionService'])),_0x58a856(0x3,_0x3ca6c2[_0x3017c1(0x1c0)](_0x3ca6c2[_0x3017c1(0x1b5)]))],_0x1bcc49);var _0x5da1f1=Object['getOwnPropertyDescriptor'],_0x3e075d=(_0x38aa85,_0x5cdd21,_0xbb6b56,_0xf84515)=>{for(var _0x56be57=_0xf84515>0x1?void 0x0:_0xf84515?_0x5da1f1(_0x5cdd21,_0xbb6b56):_0x5cdd21,_0x52d949=_0x38aa85['length']-0x1,_0x1129d2;_0x52d949>=0x0;_0x52d949--)(_0x1129d2=_0x38aa85[_0x52d949])&&(_0x56be57=_0x1129d2(_0x56be57)||_0x56be57);return _0x56be57;},_0x289326=(_0x18d567,_0x49136a)=>(_0x2b61f3,_0xbd4666)=>_0x49136a(_0x2b61f3,_0xbd4666,_0x18d567);let _0x1e3fea=class extends _0x3ca6c2[_0x3017c1(0x22b)]{constructor(_0x21dd43,_0x377f55){const _0x55f807=_0x3017c1;super(),this[_0x55f807(0x21b)]=_0x21dd43,this['_threadCommentDataSource']=_0x377f55,this['_initDataSource']();}[_0x3017c1(0x205)](){const _0x2374dd=_0x3017c1;this[_0x2374dd(0x21b)][_0x2374dd(0x232)]=this[_0x2374dd(0x219)],this[_0x2374dd(0x21b)][_0x2374dd(0x1e7)]=!0x1;}};_0x1e3fea=_0x3e075d([_0x289326(0x0,_0x5cdebe[_0x3017c1(0x1b9)]),_0x289326(0x1,_0x3ca6c2[_0x3017c1(0x1c0)](_0x1bcc49))],_0x1e3fea);var _0x178877=Object[_0x3017c1(0x225)],_0x4c9661=Object[_0x3017c1(0x215)],_0x576344=(_0x1d48d1,_0x20b164,_0x4cc996)=>_0x20b164 in _0x1d48d1?_0x178877(_0x1d48d1,_0x20b164,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4cc996}):_0x1d48d1[_0x20b164]=_0x4cc996,_0xec005e=(_0x102822,_0x421ddb,_0x4416de,_0xf8031e)=>{const _0x34285f=_0x3017c1;for(var _0x408611=_0xf8031e>0x1?void 0x0:_0xf8031e?_0x4c9661(_0x421ddb,_0x4416de):_0x421ddb,_0x466eb6=_0x102822[_0x34285f(0x1fa)]-0x1,_0x2fc491;_0x466eb6>=0x0;_0x466eb6--)(_0x2fc491=_0x102822[_0x466eb6])&&(_0x408611=_0x2fc491(_0x408611)||_0x408611);return _0x408611;},_0x245f9e=(_0x4f4d3f,_0x4d915a)=>(_0x896c1b,_0x5eb7c2)=>_0x4d915a(_0x896c1b,_0x5eb7c2,_0x4f4d3f),_0x43d67a=(_0x61863e,_0x4ad5bf,_0x5b5ce5)=>_0x576344(_0x61863e,typeof _0x4ad5bf!=_0x3017c1(0x1f9)?_0x4ad5bf+'':_0x4ad5bf,_0x5b5ce5);_0x3249bc['UniverThreadCommentDataSourcePlugin']=class extends _0x3ca6c2[_0x3017c1(0x1fb)]{constructor(_0x4e70b4=_0x52a5e4,_0x4fe8a6,_0x7b65ee){const _0x28ea32=_0x3017c1;super(),this['_config']=_0x4e70b4,this[_0x28ea32(0x1d9)]=_0x4fe8a6,this['_configService']=_0x7b65ee;const {..._0x45293b}=_0x3ca6c2[_0x28ea32(0x1f6)]({},_0x52a5e4,this[_0x28ea32(0x1bf)]);this[_0x28ea32(0x21a)]['setConfig'](_0x270cda,_0x45293b);}['onStarting'](){const _0x9532a3=_0x3017c1;[[_0x1bcc49],[_0x1e3fea],[_0x519bdd]][_0x9532a3(0x1fd)](_0x10abdb=>{const _0x2ad315=_0x9532a3;this[_0x2ad315(0x1d9)][_0x2ad315(0x1b8)](_0x10abdb);});}[_0x3017c1(0x1d0)](){const _0x14a6ba=_0x3017c1;this[_0x14a6ba(0x1d9)][_0x14a6ba(0x20d)](_0x1e3fea),this[_0x14a6ba(0x1d9)][_0x14a6ba(0x20d)](_0x519bdd);}},_0x43d67a(_0x3249bc[_0x3017c1(0x1dd)],_0x3017c1(0x218),_0x12dec8),_0x43d67a(_0x3249bc[_0x3017c1(0x1dd)],_0x3017c1(0x1b7),_0x3ca6c2['UniverInstanceType'][_0x3017c1(0x1ce)]),_0x3249bc[_0x3017c1(0x1dd)]=_0xec005e([_0x3ca6c2['DependentOn'](_0x54c9f1['UniverThreadCommentUIPlugin'],_0x5e13bf[_0x3017c1(0x1dc)],_0x1cc471[_0x3017c1(0x200)]),_0x245f9e(0x1,_0x3ca6c2[_0x3017c1(0x1c0)](_0x3ca6c2['Injector'])),_0x245f9e(0x2,_0x3ca6c2[_0x3017c1(0x1c4)])],_0x3249bc['UniverThreadCommentDataSourcePlugin']),Object[_0x3017c1(0x225)](_0x3249bc,Symbol[_0x3017c1(0x206)],{'value':'Module'});}));function _0x374f(_0x4b7f2d,_0x391662){const _0x36e16d=_0x36e1();return _0x374f=function(_0x374f04,_0x25f069){_0x374f04=_0x374f04-0x1b5;let _0x598e8c=_0x36e16d[_0x374f04];return _0x598e8c;},_0x374f(_0x4b7f2d,_0x391662);}function _0x36e1(){const _0x40f506=['unitId','syncUpdateMutationToColla','getCurrentUser','OpenOrReOpen','values','rangeType','error','1466930GjVAhe','99eQyksA','object','createTimestamp','getUser','customRanges','updateComment','@univerjs/thread-comment','_threadCommentModel','merge','@univerjs/network','/edit','symbol','length','Plugin','144048vlrzlJ','forEach','_httpService','UNRECOGNIZED','UniverLicensePlugin','deleteComment','format','getComment','Add','_initDataSource','toStringTag','commentUpdate$','/list','UniverProThreadCommentDatasource','find','_commentService','rangeId','get','filter','comments','UniverProLicense','271330OZdTkH','thread-comment-data-source.config','pipe','ref','getOwnPropertyDescriptor','getMemberID','resolved','pluginName','_threadCommentDataSource','_configService','_threadCommentDataSourceService','1721160RJkqyV','personId','disposeWithMe','exports','Solve','delete','root','UniverThreadComment','post','defineProperty','UserManagerService','content','UniverCore','_init','slice','Disposable','map','solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Reply','Unknown','parse','dataSource','stringify','ThreadCommentModel','listComments','@univerjs-pro/collaboration-client','/universer-api/comment/unit/','code','function','_userService','Injector','payload','type','add','IThreadCommentDataSourceService','addUser','15140LqUrKa','/add','threadId','140BkCGAh','_config','Inject','UniverThreadCommentUi','@univerjs/thread-comment-ui','comment','IConfigService','dayjs','bufferTime','156954kYDJYT','/reply','user','requireSession','CustomRangeType','3IoIkBX','addComment','UNIVER_UNKNOWN','/universer-api/user/list','onReady','userID','UniverNetwork','replyId','userId','parentId','replies','@univerjs/core','HTTPService','_injector','YYYY/MM/DD\x20HH:mm','Solved','UniverCollaborationClientPlugin','UniverThreadCommentDataSourcePlugin','CommentService','body','getUnit','Delete','subscribe','resolveComment','_sessionService','6818960xWncrB'];_0x36e1=function(){return _0x40f506;};return _0x36e1();}
|
|
1
|
+
function _0xac8b(_0x349f53,_0x1b7620){const _0x210c8d=_0x210c();return _0xac8b=function(_0xac8bb9,_0x4e2e7b){_0xac8bb9=_0xac8bb9-0xa4;let _0x235519=_0x210c8d[_0xac8bb9];return _0x235519;},_0xac8b(_0x349f53,_0x1b7620);}(function(_0x38003a,_0x17c3e0){const _0x5ed62e=_0xac8b,_0x231e73=_0x38003a();while(!![]){try{const _0x3e5fc9=parseInt(_0x5ed62e(0x11f))/0x1*(parseInt(_0x5ed62e(0xd8))/0x2)+parseInt(_0x5ed62e(0xcf))/0x3+parseInt(_0x5ed62e(0xd0))/0x4*(parseInt(_0x5ed62e(0xc2))/0x5)+-parseInt(_0x5ed62e(0xe5))/0x6+-parseInt(_0x5ed62e(0xbd))/0x7*(-parseInt(_0x5ed62e(0xb4))/0x8)+-parseInt(_0x5ed62e(0xe3))/0x9*(parseInt(_0x5ed62e(0xf7))/0xa)+-parseInt(_0x5ed62e(0x103))/0xb;if(_0x3e5fc9===_0x17c3e0)break;else _0x231e73['push'](_0x231e73['shift']());}catch(_0xb42b70){_0x231e73['push'](_0x231e73['shift']());}}}(_0x210c,0x78ea9),function(_0x472981,_0x10d18d){const _0x24b9d0=_0xac8b;typeof exports==_0x24b9d0(0xbf)&&typeof module<'u'?_0x10d18d(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x24b9d0(0x116)]?define([_0x24b9d0(0xda),_0x24b9d0(0x122),_0x24b9d0(0xe4),_0x24b9d0(0xa9),_0x24b9d0(0xba),'@univerjs/thread-comment',_0x24b9d0(0xd5),_0x24b9d0(0xd7)],_0x10d18d):(_0x472981=typeof globalThis<'u'?globalThis:_0x472981||self,_0x10d18d(_0x472981[_0x24b9d0(0xc1)]={},_0x472981[_0x24b9d0(0xdb)],_0x472981[_0x24b9d0(0xa8)],_0x472981['UniverCore'],_0x472981[_0x24b9d0(0x110)],_0x472981[_0x24b9d0(0xb9)],_0x472981[_0x24b9d0(0xd5)],_0x472981[_0x24b9d0(0x121)]));}(this,function(_0x3f28f9,_0x464d37,_0x3841b4,_0x4175d3,_0x14644c,_0x391618,_0x399f04,_0x3c568e){'use strict';const _0x3e564b=_0xac8b;const _0x3eb321=_0x3e564b(0x10e);var _0x58b7cb=(_0x3b7cf9=>(_0x3b7cf9[_0x3b7cf9[_0x3e564b(0xe7)]=0x0]='OpenOrReOpen',_0x3b7cf9[_0x3b7cf9[_0x3e564b(0xf5)]=0x1]='Solved',_0x3b7cf9[_0x3b7cf9[_0x3e564b(0xe0)]=-0x1]='UNRECOGNIZED',_0x3b7cf9))(_0x58b7cb||{}),_0x3503fc=(_0x506305=>(_0x506305[_0x506305[_0x3e564b(0x120)]=0x0]=_0x3e564b(0x120),_0x506305[_0x506305[_0x3e564b(0xc9)]=0x1]=_0x3e564b(0xc9),_0x506305[_0x506305['Reply']=0x2]=_0x3e564b(0xd4),_0x506305[_0x506305[_0x3e564b(0xbc)]=0x3]=_0x3e564b(0xbc),_0x506305[_0x506305[_0x3e564b(0xff)]=0x4]=_0x3e564b(0xff),_0x506305[_0x506305[_0x3e564b(0xf1)]=0x5]=_0x3e564b(0xf1),_0x506305[_0x506305[_0x3e564b(0xe0)]=-0x1]='UNRECOGNIZED',_0x506305))(_0x3503fc||{});const _0x658574=_0x3819c9=>_0x4175d3[_0x3e564b(0x109)](new Date(+_0x3819c9))['format']('YYYY/MM/DD\x20HH:mm'),_0x3ecf13=async(_0x4f5c70,_0x3b711f)=>{const _0x2d7db1=_0x3e564b,_0x5c4c6e=_0x4f5c70[_0x2d7db1(0x10f)](_0x4175d3[_0x2d7db1(0x10a)]),_0x540302=_0x4f5c70['get'](_0x3c568e[_0x2d7db1(0xcd)]);_0x3b711f[_0x2d7db1(0xcc)](_0xfbe496=>{const _0x4347a0=_0x2d7db1;_0x5c4c6e[_0x4347a0(0x119)](_0xfbe496)&&_0x3b711f[_0x4347a0(0xf0)](_0xfbe496);}),_0x3b711f[_0x2d7db1(0x11e)]&&(await _0x540302[_0x2d7db1(0x10f)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3b711f]}}))[_0x2d7db1(0xd2)]['users'][_0x2d7db1(0xcc)](_0x35314e=>{const _0x1dc96a=_0x2d7db1;_0x35314e&&_0x5c4c6e[_0x1dc96a(0xfb)](_0x35314e);});};var _0x47a7c6=Object[_0x3e564b(0xc8)],_0x2cd025=(_0x90ba7d,_0x564a02,_0x5d5e0c,_0x2eb20e)=>{const _0x28d1a6=_0x3e564b;for(var _0x35cd4c=_0x2eb20e>0x1?void 0x0:_0x2eb20e?_0x47a7c6(_0x564a02,_0x5d5e0c):_0x564a02,_0x362b74=_0x90ba7d[_0x28d1a6(0xc7)]-0x1,_0x5ca26b;_0x362b74>=0x0;_0x362b74--)(_0x5ca26b=_0x90ba7d[_0x362b74])&&(_0x35cd4c=_0x5ca26b(_0x35cd4c)||_0x35cd4c);return _0x35cd4c;},_0x52f777=(_0x3a51d2,_0x5527f1)=>(_0x1537b4,_0x105b2c)=>_0x5527f1(_0x1537b4,_0x105b2c,_0x3a51d2);let _0x96850c=class extends _0x4175d3[_0x3e564b(0x124)]{constructor(_0x20d0f9,_0x287d0b,_0x32c68d,_0x36ff36){const _0x2e2b96=_0x3e564b;super(),this[_0x2e2b96(0xf9)]=_0x20d0f9,this['_threadCommentModel']=_0x287d0b,this[_0x2e2b96(0xdc)]=_0x32c68d,this[_0x2e2b96(0xdd)]=_0x36ff36,this['_init'](),this[_0x2e2b96(0x108)]();}['_initUserSync'](){const _0x36c5c6=_0x3e564b;this['disposeWithMe'](this['_threadCommentModel'][_0x36c5c6(0xf3)][_0x36c5c6(0xab)](_0x399f04[_0x36c5c6(0x101)](0x10))[_0x36c5c6(0x11a)](_0x2c3fcc=>{const _0x595183=_0x36c5c6,_0x5d52f2=new Set();_0x2c3fcc[_0x595183(0xcc)](_0x268d27=>{const _0x3fd078=_0x595183;switch(_0x268d27[_0x3fd078(0x115)]){case _0x3fd078(0xa5):{const _0x556f0a=_0x268d27[_0x3fd078(0xaf)][_0x3fd078(0xfa)];_0x5d52f2[_0x3fd078(0xa5)](_0x556f0a);break;}}}),_0x3ecf13(this[_0x595183(0xdd)],_0x5d52f2);}));}[_0x3e564b(0xec)](){const _0x29fdf2=_0x3e564b;this[_0x29fdf2(0x10c)](this[_0x29fdf2(0xf9)]['commentUpdate$'][_0x29fdf2(0x11a)](async _0x5a13c6=>{const _0x5c4bb2=_0x29fdf2;var _0x5b570e,_0x4a6f68,_0x3e6bf4,_0x25353c;const _0x131a71=(_0x5b570e=this[_0x5c4bb2(0xae)]['getUnit'](_0x5a13c6[_0x5c4bb2(0xa6)])[_0x5c4bb2(0xb7)](_0x85e900=>_0x85e900[_0x5c4bb2(0xf8)]===_0x5a13c6[_0x5c4bb2(0xf8)]))==null?void 0x0:_0x5b570e[_0x5c4bb2(0xad)];if(!_0x131a71)return;const {unitId:_0x9f94a6,subUnitId:_0x21bc47}=_0x131a71;switch(_0x5a13c6[_0x5c4bb2(0xf6)]&&this['_userService']['addUser'](_0x5a13c6[_0x5c4bb2(0xf6)]),_0x5a13c6[_0x5c4bb2(0x115)]){case _0x3503fc[_0x5c4bb2(0xc9)]:break;case _0x3503fc[_0x5c4bb2(0xd4)]:{this[_0x5c4bb2(0xae)][_0x5c4bb2(0x104)](_0x9f94a6,_0x21bc47,{'unitId':_0x9f94a6,'subUnitId':_0x21bc47,'ref':'','id':_0x5a13c6[_0x5c4bb2(0xce)],'dT':_0x658574(+_0x5a13c6[_0x5c4bb2(0xd9)]),'threadId':_0x5a13c6[_0x5c4bb2(0xf8)],'personId':(_0x3e6bf4=(_0x4a6f68=_0x5a13c6['user'])==null?void 0x0:_0x4a6f68[_0x5c4bb2(0x10b)])!=null?_0x3e6bf4:_0x5a13c6[_0x5c4bb2(0x11c)],'text':JSON[_0x5c4bb2(0xc5)](_0x5a13c6[_0x5c4bb2(0x118)]),'parentId':_0x131a71['id']});break;}case _0x3503fc[_0x5c4bb2(0xff)]:{const _0x259ad8=this[_0x5c4bb2(0xae)]['getComment'](_0x9f94a6,_0x21bc47,_0x5a13c6['replyId']);_0x259ad8&&_0x259ad8[_0x5c4bb2(0x11b)]&&this[_0x5c4bb2(0xae)]['deleteComment'](_0x9f94a6,_0x21bc47,_0x5a13c6[_0x5c4bb2(0xce)]);break;}case _0x3503fc['Edit']:{this[_0x5c4bb2(0xae)][_0x5c4bb2(0xd6)](_0x9f94a6,_0x21bc47,{'commentId':_0x5a13c6[_0x5c4bb2(0xce)],'text':JSON['parse'](_0x5a13c6[_0x5c4bb2(0x118)])});break;}case _0x3503fc['Solve']:{const _0x34e606=(_0x25353c=this[_0x5c4bb2(0xae)][_0x5c4bb2(0xb1)](_0x5a13c6[_0x5c4bb2(0xa6)])[_0x5c4bb2(0xb7)](_0x2afe88=>_0x2afe88[_0x5c4bb2(0xf8)]===_0x5a13c6[_0x5c4bb2(0xf8)]))==null?void 0x0:_0x25353c[_0x5c4bb2(0xad)];_0x34e606&&this[_0x5c4bb2(0xae)][_0x5c4bb2(0xcb)](_0x9f94a6,_0x21bc47,_0x34e606['id'],_0x5a13c6[_0x5c4bb2(0xfe)]===_0x58b7cb[_0x5c4bb2(0xf5)]);break;}}}));}};_0x96850c=_0x2cd025([_0x52f777(0x0,_0x4175d3[_0x3e564b(0xca)](_0x464d37[_0x3e564b(0xe8)])),_0x52f777(0x1,_0x4175d3[_0x3e564b(0xca)](_0x391618[_0x3e564b(0xea)])),_0x52f777(0x2,_0x4175d3[_0x3e564b(0xca)](_0x4175d3[_0x3e564b(0x10a)])),_0x52f777(0x3,_0x4175d3['Inject'](_0x4175d3[_0x3e564b(0x113)]))],_0x96850c);const _0x7b069a='thread-comment-data-source.config',_0x4dbde8={};var _0x467f3a=Object[_0x3e564b(0xc8)],_0x287e6a=(_0xcf2adb,_0x3ee68e,_0x41a483,_0x5d5741)=>{for(var _0x30e891=_0x5d5741>0x1?void 0x0:_0x5d5741?_0x467f3a(_0x3ee68e,_0x41a483):_0x3ee68e,_0x52e78e=_0xcf2adb['length']-0x1,_0x3824a7;_0x52e78e>=0x0;_0x52e78e--)(_0x3824a7=_0xcf2adb[_0x52e78e])&&(_0x30e891=_0x3824a7(_0x30e891)||_0x30e891);return _0x30e891;},_0x46a99e=(_0x222e6d,_0x5a5a22)=>(_0x32f9ae,_0x2e5302)=>_0x5a5a22(_0x32f9ae,_0x2e5302,_0x222e6d);function _0x1fe52e(_0x302cd0,_0x4c4c81){const _0x7e5952=_0x3e564b,_0x3ba1de=_0x302cd0['replies'][0x0];return{..._0x4c4c81,'id':_0x3ba1de['replyId'],'resolved':_0x302cd0[_0x7e5952(0xfe)]===0x1,'dT':_0x658574(_0x3ba1de[_0x7e5952(0xd9)]),'personId':_0x3ba1de['userId'],'threadId':_0x3ba1de[_0x7e5952(0xf8)]};}function _0x22ae1d(_0x2a93d1,_0x2129dd,_0x35f1ce){const _0x17a96a=_0x3e564b;var _0x9be277,_0xc8a0fc;if(((_0xc8a0fc=(_0x9be277=_0x2a93d1==null?void 0x0:_0x2a93d1['replies'])==null?void 0x0:_0x9be277[_0x17a96a(0xc7)])!=null?_0xc8a0fc:0x0)>0x0){const _0x3ff6e4=(_0xe02805,_0x40a35c)=>({'id':_0xe02805['replyId'],'threadId':_0xe02805[_0x17a96a(0xf8)],'dT':_0x658574(_0xe02805[_0x17a96a(0xd9)]),'personId':_0xe02805[_0x17a96a(0x11c)],'resolved':_0x2a93d1[_0x17a96a(0xfe)]===_0x58b7cb[_0x17a96a(0xf5)],'unitId':_0x2129dd,'subUnitId':_0x35f1ce,'text':JSON['parse'](_0xe02805[_0x17a96a(0x118)]),'parentId':_0x40a35c}),_0xd27222=_0x3ff6e4(_0x2a93d1[_0x17a96a(0x10d)][0x0]);return{..._0xd27222,'children':_0x2a93d1[_0x17a96a(0x10d)][_0x17a96a(0x106)](0x1)[_0x17a96a(0xb8)](_0x2db525=>_0x3ff6e4(_0x2db525,_0xd27222['id']))};}return null;}let _0x369bbe=class{constructor(_0x46a5b0,_0x42e198,_0x2c2bab,_0x411807){const _0x3080ff=_0x3e564b;this[_0x3080ff(0xde)]=_0x46a5b0,this[_0x3080ff(0xdc)]=_0x42e198,this[_0x3080ff(0x100)]=_0x2c2bab,this[_0x3080ff(0xdd)]=_0x411807;}async[_0x3e564b(0x104)](_0x51c8fe){const _0x3e00c5=_0x3e564b;var _0x227dd3,_0x38417a;const {parentId:_0x249894,unitId:_0xe80e5a,text:_0x3dfb2b,threadId:_0x42adc3}=_0x51c8fe,_0x1904a4=(_0x38417a=(_0x227dd3=_0x3dfb2b['customRanges'])==null?void 0x0:_0x227dd3[_0x3e00c5(0x111)](_0x1f54d0=>_0x1f54d0[_0x3e00c5(0xd1)]===_0x4175d3[_0x3e00c5(0x102)][_0x3e00c5(0x125)])[_0x3e00c5(0xb8)](_0x58aa17=>_0x58aa17[_0x3e00c5(0xfc)]))!=null?_0x38417a:[],_0x12bb57=JSON[_0x3e00c5(0x11d)](_0x3dfb2b),_0x233b85=(await this[_0x3e00c5(0x100)]['requireSession'](_0xe80e5a))[_0x3e00c5(0xe6)]();if(_0x249894){const _0x35f514={'memberId':_0x233b85,'unitId':_0xe80e5a,'content':_0x12bb57,'mention':_0x1904a4,'threadId':_0x42adc3},_0x36eb4b=(await this['_httpService'][_0x3e00c5(0xf4)]('/universer-api/comment/unit/'+_0xe80e5a+'/reply',{'body':_0x35f514}))['body']['reply'];return{..._0x51c8fe,'id':_0x36eb4b[_0x3e00c5(0xce)],'dT':_0x4175d3[_0x3e00c5(0x109)](+_0x36eb4b[_0x3e00c5(0xd9)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x36eb4b['userId']};}else{const _0x1d0074={'memberId':_0x233b85,'unitId':_0xe80e5a,'content':_0x12bb57,'mention':_0x1904a4},_0x4bc478=await this[_0x3e00c5(0xde)]['post'](_0x3e00c5(0xeb)+_0xe80e5a+_0x3e00c5(0xac),{'body':_0x1d0074});return _0x1fe52e(_0x4bc478['body']['comment'],_0x51c8fe);}}async[_0x3e564b(0xd6)](_0x244ca8){const _0x32d504=_0x3e564b;var _0x3aef65,_0x309d8b;const {text:_0x24f84e,unitId:_0x122036}=_0x244ca8,_0x136274=(_0x309d8b=(_0x3aef65=_0x24f84e['customRanges'])==null?void 0x0:_0x3aef65[_0x32d504(0x111)](_0x176e2b=>_0x176e2b[_0x32d504(0xd1)]===_0x4175d3[_0x32d504(0x102)]['COMMENT'])['map'](_0x20881b=>_0x20881b[_0x32d504(0xfc)]))!=null?_0x309d8b:[],_0x436414=JSON[_0x32d504(0x11d)](_0x24f84e),_0x821e43=_0x244ca8[_0x32d504(0xf8)],_0x171a8a=_0x244ca8['id'],_0x40fe34={'memberId':(await this['_sessionService'][_0x32d504(0x117)](_0x122036))[_0x32d504(0xe6)](),'unitId':_0x122036,'threadId':_0x821e43,'mention':_0x136274,'content':_0x436414,'replyId':_0x171a8a},_0x1f8d4f=await this[_0x32d504(0xde)][_0x32d504(0xf4)](_0x32d504(0xeb)+_0x122036+_0x32d504(0xe1),{'body':_0x40fe34});return!_0x1f8d4f[_0x32d504(0xd2)]['error']||_0x1f8d4f[_0x32d504(0xd2)][_0x32d504(0xc6)][_0x32d504(0xb5)]===0x1;}async[_0x3e564b(0xcb)](_0x5dfd00){const _0x3d360f=_0x3e564b,{unitId:_0x2ca0b6}=_0x5dfd00,_0x1a2cc4=_0x5dfd00[_0x3d360f(0xf8)],_0x4f80f1={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x2ca0b6,'threadId':_0x1a2cc4,'solved':_0x5dfd00['resolved']?_0x58b7cb[_0x3d360f(0xf5)]:_0x58b7cb[_0x3d360f(0xe7)]},_0x915efb=await this[_0x3d360f(0xde)][_0x3d360f(0xf4)](_0x3d360f(0xeb)+_0x2ca0b6+_0x3d360f(0xb0),{'body':_0x4f80f1});return!_0x915efb[_0x3d360f(0xd2)][_0x3d360f(0xc6)]||_0x915efb[_0x3d360f(0xd2)]['error'][_0x3d360f(0xb5)]===0x1;}async[_0x3e564b(0xd3)](_0x42d30a,_0x2d39af,_0x2b96ec,_0x4fdefd){const _0x86e240=_0x3e564b,_0x41cb9b={'memberId':(await this[_0x86e240(0x100)]['requireSession'](_0x42d30a))['getMemberID'](),'threadId':_0x2b96ec,'replyId':_0x4fdefd,'unitId':_0x42d30a},_0x29a43c=await this['_httpService'][_0x86e240(0xf4)](_0x86e240(0xeb)+_0x42d30a+_0x86e240(0xee),{'body':_0x41cb9b});return!_0x29a43c[_0x86e240(0xd2)][_0x86e240(0xc6)]||_0x29a43c[_0x86e240(0xd2)][_0x86e240(0xc6)][_0x86e240(0xb5)]===0x1;}async[_0x3e564b(0xed)](_0x395c90,_0x1d13a1,_0x70230e){const _0x1366cd=_0x3e564b,_0x13e976={'unitId':_0x395c90,'threadId':_0x70230e},_0x18e67c=await this['_httpService'][_0x1366cd(0xf4)]('/universer-api/comment/unit/'+_0x395c90+_0x1366cd(0xc0),{'body':_0x13e976}),_0x32f4da=_0x70230e[_0x1366cd(0xb8)](_0x595a0d=>_0x22ae1d(_0x18e67c[_0x1366cd(0xd2)]['comments'][_0x595a0d],_0x395c90,_0x1d13a1))['filter'](Boolean);return Object[_0x1366cd(0xc3)](_0x18e67c['body']['users'])[_0x1366cd(0xcc)](_0x682e37=>{const _0x1fb726=_0x1366cd;this['_userService'][_0x1fb726(0xfb)](_0x682e37);}),_0x32f4da;}[_0x3e564b(0xc4)](_0x47ae3c){const _0x1cb56e=_0x3e564b;return{'id':_0x47ae3c['id'],'threadId':_0x47ae3c['threadId'],'ref':_0x47ae3c[_0x1cb56e(0x114)]};}};_0x369bbe=_0x287e6a([_0x46a99e(0x0,_0x4175d3[_0x3e564b(0xca)](_0x3c568e[_0x3e564b(0xcd)])),_0x46a99e(0x1,_0x4175d3[_0x3e564b(0xca)](_0x4175d3[_0x3e564b(0x10a)])),_0x46a99e(0x2,_0x4175d3[_0x3e564b(0xca)](_0x464d37['CollaborationSessionService'])),_0x46a99e(0x3,_0x4175d3[_0x3e564b(0xca)](_0x4175d3[_0x3e564b(0x113)]))],_0x369bbe);var _0x2bc4de=Object[_0x3e564b(0xc8)],_0x371cfc=(_0x5a0b52,_0x26efad,_0x46baf9,_0x2e57e0)=>{const _0x156372=_0x3e564b;for(var _0x1e2c62=_0x2e57e0>0x1?void 0x0:_0x2e57e0?_0x2bc4de(_0x26efad,_0x46baf9):_0x26efad,_0x4708e9=_0x5a0b52[_0x156372(0xc7)]-0x1,_0x511da0;_0x4708e9>=0x0;_0x4708e9--)(_0x511da0=_0x5a0b52[_0x4708e9])&&(_0x1e2c62=_0x511da0(_0x1e2c62)||_0x1e2c62);return _0x1e2c62;},_0x95ec7b=(_0x240974,_0x366164)=>(_0x1a7414,_0x1c7fd7)=>_0x366164(_0x1a7414,_0x1c7fd7,_0x240974);let _0x360983=class extends _0x4175d3[_0x3e564b(0x124)]{constructor(_0x3d6a10,_0x1ff145){const _0x3f06eb=_0x3e564b;super(),this[_0x3f06eb(0xe9)]=_0x3d6a10,this[_0x3f06eb(0xbb)]=_0x1ff145,this[_0x3f06eb(0xa7)]();}[_0x3e564b(0xa7)](){const _0x16958f=_0x3e564b;this[_0x16958f(0xe9)]['dataSource']=this[_0x16958f(0xbb)],this[_0x16958f(0xe9)][_0x16958f(0x105)]=!0x1;}};_0x360983=_0x371cfc([_0x95ec7b(0x0,_0x391618['IThreadCommentDataSourceService']),_0x95ec7b(0x1,_0x4175d3[_0x3e564b(0xca)](_0x369bbe))],_0x360983);var _0x2a9408=Object[_0x3e564b(0x107)],_0x1361a4=Object[_0x3e564b(0xc8)],_0x4fb667=(_0x2d3bd2,_0x984f08,_0x2eceb6)=>_0x984f08 in _0x2d3bd2?_0x2a9408(_0x2d3bd2,_0x984f08,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2eceb6}):_0x2d3bd2[_0x984f08]=_0x2eceb6,_0x5055dc=(_0x1aa075,_0x1ee6c1,_0x3b7c90,_0x616a0b)=>{const _0x43b492=_0x3e564b;for(var _0x5a47cc=_0x616a0b>0x1?void 0x0:_0x616a0b?_0x1361a4(_0x1ee6c1,_0x3b7c90):_0x1ee6c1,_0x12ba76=_0x1aa075[_0x43b492(0xc7)]-0x1,_0x25bf1a;_0x12ba76>=0x0;_0x12ba76--)(_0x25bf1a=_0x1aa075[_0x12ba76])&&(_0x5a47cc=_0x25bf1a(_0x5a47cc)||_0x5a47cc);return _0x5a47cc;},_0x1f8e79=(_0x310d99,_0x59d82a)=>(_0x2c9bdc,_0x3cb947)=>_0x59d82a(_0x2c9bdc,_0x3cb947,_0x310d99),_0x593af9=(_0x578f18,_0x45fa19,_0x58abc8)=>_0x4fb667(_0x578f18,typeof _0x45fa19!='symbol'?_0x45fa19+'':_0x45fa19,_0x58abc8);_0x3f28f9[_0x3e564b(0xaa)]=class extends _0x4175d3[_0x3e564b(0xa4)]{constructor(_0x25447d=_0x4dbde8,_0x5d657a,_0x90cca0){const _0x778fd=_0x3e564b;super(),this[_0x778fd(0xbe)]=_0x25447d,this[_0x778fd(0xdd)]=_0x5d657a,this[_0x778fd(0xef)]=_0x90cca0;const {..._0x47ef4e}=_0x4175d3[_0x778fd(0xe2)]({},_0x4dbde8,this[_0x778fd(0xbe)]);this[_0x778fd(0xef)][_0x778fd(0xb2)](_0x7b069a,_0x47ef4e);}[_0x3e564b(0x123)](){const _0x5b5ef7=_0x3e564b;[[_0x369bbe],[_0x360983],[_0x96850c]][_0x5b5ef7(0xcc)](_0x456643=>{const _0x262ea1=_0x5b5ef7;this['_injector'][_0x262ea1(0xa5)](_0x456643);});}['onReady'](){const _0x4b108c=_0x3e564b;this[_0x4b108c(0xdd)][_0x4b108c(0x10f)](_0x360983),this[_0x4b108c(0xdd)][_0x4b108c(0x10f)](_0x96850c);}},_0x593af9(_0x3f28f9[_0x3e564b(0xaa)],_0x3e564b(0xb3),_0x3eb321),_0x593af9(_0x3f28f9['UniverThreadCommentDataSourcePlugin'],_0x3e564b(0x115),_0x4175d3[_0x3e564b(0xb6)]['UNIVER_UNKNOWN']),_0x3f28f9[_0x3e564b(0xaa)]=_0x5055dc([_0x4175d3['DependentOn'](_0x14644c['UniverThreadCommentUIPlugin'],_0x464d37[_0x3e564b(0xfd)],_0x3841b4[_0x3e564b(0xdf)]),_0x1f8e79(0x1,_0x4175d3[_0x3e564b(0xca)](_0x4175d3[_0x3e564b(0x113)])),_0x1f8e79(0x2,_0x4175d3[_0x3e564b(0xf2)])],_0x3f28f9[_0x3e564b(0xaa)]),Object[_0x3e564b(0x107)](_0x3f28f9,Symbol[_0x3e564b(0x112)],{'value':'Module'});}));function _0x210c(){const _0x267a4a=['userId','stringify','size','1091MCqtuA','Unknown','UniverNetwork','@univerjs-pro/collaboration-client','onStarting','Disposable','COMMENT','Plugin','add','unitId','_initDataSource','UniverProLicense','@univerjs/core','UniverThreadCommentDataSourcePlugin','pipe','/add','root','_threadCommentModel','payload','/solved','getUnit','setConfig','pluginName','70664OmCdrq','code','UniverInstanceType','find','map','UniverThreadComment','@univerjs/thread-comment-ui','_threadCommentDataSource','Edit','7YUqZoz','_config','object','/list','UniverProThreadCommentDatasource','185buNbAc','values','saveCommentToSnapshot','parse','error','length','getOwnPropertyDescriptor','Add','Inject','resolveComment','forEach','HTTPService','replyId','2592711cDDvxi','31368VamJlx','rangeType','body','deleteComment','Reply','rxjs','updateComment','@univerjs/network','1074UZXkCH','createTimestamp','exports','UniverProCollaborationClient','_userService','_injector','_httpService','UniverLicensePlugin','UNRECOGNIZED','/edit','merge','162VtWLJt','@univerjs-pro/license','4738914HFaisk','getMemberID','OpenOrReOpen','CommentService','_threadCommentDataSourceService','ThreadCommentModel','/universer-api/comment/unit/','_init','listComments','/delete','_configService','delete','Solve','IConfigService','commentUpdate$','post','Solved','user','243670fLqxUZ','threadId','_commentService','personId','addUser','rangeId','UniverCollaborationClientPlugin','solved','Delete','_sessionService','bufferTime','CustomRangeType','279323UhsFrU','addComment','syncUpdateMutationToColla','slice','defineProperty','_initUserSync','dayjs','UserManagerService','userID','disposeWithMe','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','get','UniverThreadCommentUi','filter','toStringTag','Injector','ref','type','amd','requireSession','content','getUser','subscribe','parentId'];_0x210c=function(){return _0x267a4a;};return _0x210c();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.9.
|
|
49
|
-
"@univerjs
|
|
50
|
-
"@univerjs/network": "0.9.
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/thread-comment": "0.9.2",
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.9.3",
|
|
49
|
+
"@univerjs/core": "0.9.3",
|
|
50
|
+
"@univerjs/network": "0.9.3",
|
|
51
|
+
"@univerjs/thread-comment": "0.9.3",
|
|
53
52
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.9.
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.9.3",
|
|
54
|
+
"@univerjs-pro/license": "0.9.3"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.8.3",
|
|
59
|
-
"vite": "^
|
|
59
|
+
"vite": "^7.0.5",
|
|
60
60
|
"vitest": "^3.2.4",
|
|
61
|
-
"@univerjs-infra/shared": "0.9.
|
|
61
|
+
"@univerjs-infra/shared": "0.9.3"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|