@univerjs-pro/thread-comment-datasource 0.10.6-experimental.20250904-44da50e → 0.10.6-experimental.20250904-9591d16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x17a923=_0x2b21;(function(_0x34adcc,_0x5c448c){const _0x4e2ba1=_0x2b21,_0x6b2c4d=_0x34adcc();while(!![]){try{const _0x55d976=parseInt(_0x4e2ba1(0x12a))/0x1+-parseInt(_0x4e2ba1(0x155))/0x2*(-parseInt(_0x4e2ba1(0x15c))/0x3)+-parseInt(_0x4e2ba1(0x115))/0x4*(-parseInt(_0x4e2ba1(0x140))/0x5)+-parseInt(_0x4e2ba1(0x13e))/0x6*(-parseInt(_0x4e2ba1(0x163))/0x7)+parseInt(_0x4e2ba1(0x11a))/0x8*(-parseInt(_0x4e2ba1(0x10c))/0x9)+-parseInt(_0x4e2ba1(0x14d))/0xa+parseInt(_0x4e2ba1(0x14c))/0xb*(parseInt(_0x4e2ba1(0x12f))/0xc);if(_0x55d976===_0x5c448c)break;else _0x6b2c4d['push'](_0x6b2c4d['shift']());}catch(_0x101255){_0x6b2c4d['push'](_0x6b2c4d['shift']());}}}(_0x3c61,0xef29c));Object[_0x17a923(0x13b)](exports,Symbol[_0x17a923(0x161)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x17a923(0x117);var I=(_0x18f18c=>(_0x18f18c[_0x18f18c['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x18f18c[_0x18f18c[_0x17a923(0x12d)]=0x1]=_0x17a923(0x12d),_0x18f18c[_0x18f18c[_0x17a923(0x157)]=-0x1]='UNRECOGNIZED',_0x18f18c))(I||{}),v=(_0x5359ca=>(_0x5359ca[_0x5359ca[_0x17a923(0x16d)]=0x0]=_0x17a923(0x16d),_0x5359ca[_0x5359ca['Add']=0x1]=_0x17a923(0x129),_0x5359ca[_0x5359ca[_0x17a923(0x158)]=0x2]=_0x17a923(0x158),_0x5359ca[_0x5359ca[_0x17a923(0x173)]=0x3]='Edit',_0x5359ca[_0x5359ca[_0x17a923(0x14f)]=0x4]='Delete',_0x5359ca[_0x5359ca['Solve']=0x5]='Solve',_0x5359ca[_0x5359ca['UNRECOGNIZED']=-0x1]=_0x17a923(0x157),_0x5359ca))(v||{});const f=_0x3e9827=>c['dayjs'](new Date(+_0x3e9827))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x34bd6a,_0x10d434)=>{const _0x2f7c60=_0x17a923,_0x14be89=_0x34bd6a[_0x2f7c60(0x16b)](c[_0x2f7c60(0x141)]),_0x31c0e3=_0x34bd6a['get'](P[_0x2f7c60(0x126)]);_0x10d434[_0x2f7c60(0x14a)](_0x12da8f=>{const _0x2ca171=_0x2f7c60;_0x14be89[_0x2ca171(0x13f)](_0x12da8f)&&_0x10d434['delete'](_0x12da8f);}),_0x10d434[_0x2f7c60(0x160)]&&(await _0x31c0e3[_0x2f7c60(0x16b)]('/universer-api/user/list',{'params':{'userIDs':[..._0x10d434]}}))['body'][_0x2f7c60(0x110)][_0x2f7c60(0x14a)](_0x217bf7=>{const _0x5f39f2=_0x2f7c60;_0x217bf7&&_0x14be89[_0x5f39f2(0x162)](_0x217bf7);});};var $=Object[_0x17a923(0x120)],E=(_0xcd9ff5,_0x58b590,_0x55a2b6,_0x41cec4)=>{const _0x153d17=_0x17a923;for(var _0xad08ea=_0x41cec4>0x1?void 0x0:_0x41cec4?$(_0x58b590,_0x55a2b6):_0x58b590,_0x273a4c=_0xcd9ff5[_0x153d17(0x10b)]-0x1,_0x5010aa;_0x273a4c>=0x0;_0x273a4c--)(_0x5010aa=_0xcd9ff5[_0x273a4c])&&(_0xad08ea=_0x5010aa(_0xad08ea)||_0xad08ea);return _0xad08ea;},S=(_0x4d0986,_0x334c0f)=>(_0x37bdc2,_0x1d23ee)=>_0x334c0f(_0x37bdc2,_0x1d23ee,_0x4d0986);let _=class extends c['Disposable']{constructor(_0x4027a8,_0x5ec983,_0xf2570b,_0x35f1d8){const _0x5760b4=_0x17a923;super(),this['_commentService']=_0x4027a8,this[_0x5760b4(0x171)]=_0x5ec983,this[_0x5760b4(0x14b)]=_0xf2570b,this[_0x5760b4(0x156)]=_0x35f1d8,this['_init'](),this[_0x5760b4(0x154)]();}[_0x17a923(0x154)](){const _0x2b428c=_0x17a923;this[_0x2b428c(0x15e)](this[_0x2b428c(0x171)]['commentUpdate$']['pipe'](j[_0x2b428c(0x127)](0x10))[_0x2b428c(0x10f)](_0x16b060=>{const _0x5b6ddc=_0x2b428c,_0x4a99c6=new Set();_0x16b060[_0x5b6ddc(0x14a)](_0x2ea760=>{const _0x1dc34d=_0x5b6ddc;switch(_0x2ea760[_0x1dc34d(0x113)]){case _0x1dc34d(0x114):{const _0x1f6754=_0x2ea760['payload']['personId'];_0x4a99c6['add'](_0x1f6754);break;}}}),R(this[_0x5b6ddc(0x156)],_0x4a99c6);}));}[_0x17a923(0x106)](){const _0x4d9500=_0x17a923;this[_0x4d9500(0x15e)](this['_commentService'][_0x4d9500(0x11c)][_0x4d9500(0x10f)](async _0x53f952=>{const _0x505724=_0x4d9500;var _0x45f14a,_0x121590,_0x42e8,_0x3c2424;const _0x14e282=(_0x45f14a=this[_0x505724(0x171)][_0x505724(0x11f)](_0x53f952[_0x505724(0x111)])[_0x505724(0x13c)](_0x399f0e=>_0x399f0e[_0x505724(0x104)]===_0x53f952[_0x505724(0x104)]))==null?void 0x0:_0x45f14a[_0x505724(0x15a)];if(!_0x14e282)return;const {unitId:_0x54c24b,subUnitId:_0x564c16}=_0x14e282;switch(_0x53f952[_0x505724(0x122)]&&this[_0x505724(0x14b)][_0x505724(0x162)](_0x53f952['user']),_0x53f952['type']){case v[_0x505724(0x129)]:break;case v[_0x505724(0x158)]:{this[_0x505724(0x171)][_0x505724(0x144)](_0x54c24b,_0x564c16,{'unitId':_0x54c24b,'subUnitId':_0x564c16,'ref':'','id':_0x53f952[_0x505724(0x168)],'dT':f(+_0x53f952[_0x505724(0x12c)]),'threadId':_0x53f952[_0x505724(0x104)],'personId':(_0x42e8=(_0x121590=_0x53f952[_0x505724(0x122)])==null?void 0x0:_0x121590['userID'])!=null?_0x42e8:_0x53f952[_0x505724(0x13a)],'text':JSON[_0x505724(0x166)](_0x53f952['content']),'parentId':_0x14e282['id']});break;}case v[_0x505724(0x14f)]:{const _0x1a202d=this['_threadCommentModel'][_0x505724(0x124)](_0x54c24b,_0x564c16,_0x53f952[_0x505724(0x168)]);_0x1a202d&&_0x1a202d['parentId']&&this['_threadCommentModel'][_0x505724(0x138)](_0x54c24b,_0x564c16,_0x53f952[_0x505724(0x168)]);break;}case v['Edit']:{this[_0x505724(0x171)][_0x505724(0x152)](_0x54c24b,_0x564c16,{'commentId':_0x53f952['replyId'],'text':JSON['parse'](_0x53f952['content'])});break;}case v[_0x505724(0x118)]:{const _0x14a541=(_0x3c2424=this[_0x505724(0x171)]['getUnit'](_0x53f952[_0x505724(0x111)])[_0x505724(0x13c)](_0x216525=>_0x216525[_0x505724(0x104)]===_0x53f952[_0x505724(0x104)]))==null?void 0x0:_0x3c2424[_0x505724(0x15a)];_0x14a541&&this['_threadCommentModel'][_0x505724(0x135)](_0x54c24b,_0x564c16,_0x14a541['id'],_0x53f952['solved']===I['Solved']);break;}}}));}};function _0x2b21(_0x3e11ac,_0x55f48d){const _0x3c61fe=_0x3c61();return _0x2b21=function(_0x2b210f,_0x2223ba){_0x2b210f=_0x2b210f-0x103;let _0x4d3245=_0x3c61fe[_0x2b210f];return _0x4d3245;},_0x2b21(_0x3e11ac,_0x55f48d);}_=E([S(0x0,c[_0x17a923(0x146)](b[_0x17a923(0x131)])),S(0x1,c['Inject'](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0x17a923(0x141)])),S(0x3,c[_0x17a923(0x146)](c[_0x17a923(0x172)]))],_);const q=_0x17a923(0x15d),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x218446,_0x47b898,_0x386e25,_0xb6c767)=>{const _0x26df0e=_0x17a923;for(var _0x38887f=_0xb6c767>0x1?void 0x0:_0xb6c767?A(_0x47b898,_0x386e25):_0x47b898,_0x3a9e8f=_0x218446[_0x26df0e(0x10b)]-0x1,_0x1538a8;_0x3a9e8f>=0x0;_0x3a9e8f--)(_0x1538a8=_0x218446[_0x3a9e8f])&&(_0x38887f=_0x1538a8(_0x38887f)||_0x38887f);return _0x38887f;},C=(_0x19ec36,_0xf14032)=>(_0x576b85,_0x4d8bd4)=>_0xf14032(_0x576b85,_0x4d8bd4,_0x19ec36);function Y(_0xa8f09b,_0x101a09){const _0xb6ee41=_0x17a923,_0x5dce35=_0xa8f09b[_0xb6ee41(0x112)][0x0];return{..._0x101a09,'id':_0x5dce35[_0xb6ee41(0x168)],'resolved':_0xa8f09b[_0xb6ee41(0x176)]===0x1,'dT':f(_0x5dce35[_0xb6ee41(0x12c)]),'personId':_0x5dce35[_0xb6ee41(0x13a)],'threadId':_0x5dce35[_0xb6ee41(0x104)]};}function _0x3c61(){const _0x4a6156=['13816hQYCum','13857900kuLGlr','stringify','Delete','/reply','UniverInstanceType','updateComment','Plugin','_initUserSync','38TDkNXz','_injector','UNRECOGNIZED','Reply','UNIVER_UNKNOWN','root','_configService','201981bkpZgw','thread-comment-data-source.config','disposeWithMe','rangeId','size','toStringTag','addUser','70cdvpiT','comments','Disposable','parse','YYYY/MM/DD\x20HH:mm','replyId','_sessionService','IThreadCommentDataSourceService','get','/list','Unknown','saveCommentToSnapshot','body','_httpService','_threadCommentModel','Injector','Edit','dataSource','_config','solved','rangeType','threadId','content','_init','merge','DependentOn','/add','_threadCommentDataSourceService','length','9JdgcLs','code','post','subscribe','users','unitId','replies','type','add','328156GFpXwN','_threadCommentDataSource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Solve','IConfigService','8419816GfSxwA','symbol','commentUpdate$','userID','error','getUnit','getOwnPropertyDescriptor','getMemberID','user','UniverLicensePlugin','getComment','customRanges','HTTPService','bufferTime','UniverThreadCommentDataSourcePlugin','Add','352391fEcEQi','pluginName','createTimestamp','Solved','reply','24thGrKM','ref','CommentService','map','_initDataSource','UniverThreadCommentUIPlugin','resolveComment','onReady','requireSession','deleteComment','dayjs','userId','defineProperty','find','CollaborationSessionService','725694BAtvjx','getUser','35pWctbj','UserManagerService','/universer-api/comment/unit/','resolved','addComment','CustomRangeType','Inject','/edit','/delete','onStarting','forEach','_userService'];_0x3c61=function(){return _0x4a6156;};return _0x3c61();}function G(_0x441e15,_0x2dbc1e,_0x26e267){const _0x26157e=_0x17a923;var _0x147927,_0x52edcb;if(((_0x52edcb=(_0x147927=_0x441e15==null?void 0x0:_0x441e15['replies'])==null?void 0x0:_0x147927[_0x26157e(0x10b)])!=null?_0x52edcb:0x0)>0x0){const _0x52a144=(_0x49ab74,_0x1863c5)=>({'id':_0x49ab74[_0x26157e(0x168)],'threadId':_0x49ab74[_0x26157e(0x104)],'dT':f(_0x49ab74[_0x26157e(0x12c)]),'personId':_0x49ab74[_0x26157e(0x13a)],'resolved':_0x441e15['solved']===I['Solved'],'unitId':_0x2dbc1e,'subUnitId':_0x26e267,'text':JSON[_0x26157e(0x166)](_0x49ab74[_0x26157e(0x105)]),'parentId':_0x1863c5}),_0x531229=_0x52a144(_0x441e15['replies'][0x0]);return{..._0x531229,'children':_0x441e15[_0x26157e(0x112)]['slice'](0x1)[_0x26157e(0x132)](_0x47b7f8=>_0x52a144(_0x47b7f8,_0x531229['id']))};}return null;}let p=class{constructor(_0x3a6e3c,_0x3a561e,_0x7a6695){const _0x53d7b6=_0x17a923;this[_0x53d7b6(0x170)]=_0x3a6e3c,this[_0x53d7b6(0x14b)]=_0x3a561e,this[_0x53d7b6(0x169)]=_0x7a6695;}async['addComment'](_0x4f381b){const _0x4c5ddf=_0x17a923;var _0x131b95,_0x218ce0;const {parentId:_0x2e93e0,unitId:_0x23648a,text:_0x173ecb,threadId:_0x3bceb8}=_0x4f381b,_0x29193d=(_0x218ce0=(_0x131b95=_0x173ecb[_0x4c5ddf(0x125)])==null?void 0x0:_0x131b95['filter'](_0x3427dc=>_0x3427dc[_0x4c5ddf(0x103)]===c[_0x4c5ddf(0x145)]['COMMENT'])[_0x4c5ddf(0x132)](_0x12756d=>_0x12756d[_0x4c5ddf(0x15f)]))!=null?_0x218ce0:[],_0x5a9573=JSON[_0x4c5ddf(0x14e)](_0x173ecb),_0x5d0995=(await this[_0x4c5ddf(0x169)][_0x4c5ddf(0x137)](_0x23648a))[_0x4c5ddf(0x121)]();if(_0x2e93e0){const _0x5053e8={'memberId':_0x5d0995,'unitId':_0x23648a,'content':_0x5a9573,'mention':_0x29193d,'threadId':_0x3bceb8},_0x157261=(await this['_httpService']['post'](_0x4c5ddf(0x142)+_0x23648a+_0x4c5ddf(0x150),{'body':_0x5053e8}))[_0x4c5ddf(0x16f)][_0x4c5ddf(0x12e)];return{..._0x4f381b,'id':_0x157261['replyId'],'dT':c[_0x4c5ddf(0x139)](+_0x157261[_0x4c5ddf(0x12c)])['format'](_0x4c5ddf(0x167)),'personId':_0x157261[_0x4c5ddf(0x13a)]};}else{const _0x438407={'memberId':_0x5d0995,'unitId':_0x23648a,'content':_0x5a9573,'mention':_0x29193d},_0x4ff5c9=await this[_0x4c5ddf(0x170)][_0x4c5ddf(0x10e)](_0x4c5ddf(0x142)+_0x23648a+_0x4c5ddf(0x109),{'body':_0x438407});return Y(_0x4ff5c9[_0x4c5ddf(0x16f)]['comment'],_0x4f381b);}}async['updateComment'](_0x42a355){const _0x36b857=_0x17a923;var _0x1cd2ec,_0x5bc58a;const {text:_0x2e8d36,unitId:_0x5e644d}=_0x42a355,_0x3ac67e=(_0x5bc58a=(_0x1cd2ec=_0x2e8d36['customRanges'])==null?void 0x0:_0x1cd2ec['filter'](_0x30c58c=>_0x30c58c[_0x36b857(0x103)]===c[_0x36b857(0x145)]['COMMENT'])[_0x36b857(0x132)](_0x1a425b=>_0x1a425b['rangeId']))!=null?_0x5bc58a:[],_0x5270c1=JSON[_0x36b857(0x14e)](_0x2e8d36),_0x559e62=_0x42a355[_0x36b857(0x104)],_0x1ebea2=_0x42a355['id'],_0x4e8089={'memberId':(await this[_0x36b857(0x169)][_0x36b857(0x137)](_0x5e644d))[_0x36b857(0x121)](),'unitId':_0x5e644d,'threadId':_0x559e62,'mention':_0x3ac67e,'content':_0x5270c1,'replyId':_0x1ebea2},_0xe65926=await this['_httpService'][_0x36b857(0x10e)](_0x36b857(0x142)+_0x5e644d+_0x36b857(0x147),{'body':_0x4e8089});return!_0xe65926[_0x36b857(0x16f)][_0x36b857(0x11e)]||_0xe65926['body']['error'][_0x36b857(0x10d)]===0x1;}async['resolveComment'](_0x2bc4ad){const _0x120ec7=_0x17a923,{unitId:_0x520e33}=_0x2bc4ad,_0x29c7a3=_0x2bc4ad[_0x120ec7(0x104)],_0x5b4807={'memberId':this[_0x120ec7(0x14b)]['getCurrentUser']()[_0x120ec7(0x11d)],'unitId':_0x520e33,'threadId':_0x29c7a3,'solved':_0x2bc4ad[_0x120ec7(0x143)]?I['Solved']:I['OpenOrReOpen']},_0x516a9b=await this[_0x120ec7(0x170)][_0x120ec7(0x10e)](_0x120ec7(0x142)+_0x520e33+'/solved',{'body':_0x5b4807});return!_0x516a9b[_0x120ec7(0x16f)][_0x120ec7(0x11e)]||_0x516a9b[_0x120ec7(0x16f)][_0x120ec7(0x11e)][_0x120ec7(0x10d)]===0x1;}async[_0x17a923(0x138)](_0x1090a9,_0x396280,_0x412a0f,_0x1794ed){const _0x386bec=_0x17a923,_0x5be71e={'memberId':(await this[_0x386bec(0x169)][_0x386bec(0x137)](_0x1090a9))[_0x386bec(0x121)](),'threadId':_0x412a0f,'replyId':_0x1794ed,'unitId':_0x1090a9},_0x4d049e=await this['_httpService'][_0x386bec(0x10e)]('/universer-api/comment/unit/'+_0x1090a9+_0x386bec(0x148),{'body':_0x5be71e});return!_0x4d049e['body'][_0x386bec(0x11e)]||_0x4d049e[_0x386bec(0x16f)][_0x386bec(0x11e)][_0x386bec(0x10d)]===0x1;}async['listComments'](_0x36f0e9,_0x20b7b5,_0x57bccc){const _0x4efeec=_0x17a923,_0x555483={'unitId':_0x36f0e9,'threadId':_0x57bccc},_0x3ade1a=await this[_0x4efeec(0x170)][_0x4efeec(0x10e)](_0x4efeec(0x142)+_0x36f0e9+_0x4efeec(0x16c),{'body':_0x555483}),_0x1319f7=_0x57bccc[_0x4efeec(0x132)](_0x19e61b=>G(_0x3ade1a[_0x4efeec(0x16f)][_0x4efeec(0x164)][_0x19e61b],_0x36f0e9,_0x20b7b5))['filter'](Boolean);return Object['values'](_0x3ade1a[_0x4efeec(0x16f)][_0x4efeec(0x110)])[_0x4efeec(0x14a)](_0x21e268=>{const _0x6dfe0d=_0x4efeec;this[_0x6dfe0d(0x14b)][_0x6dfe0d(0x162)](_0x21e268);}),_0x1319f7;}[_0x17a923(0x16e)](_0x19a613){const _0x280c6a=_0x17a923;return{'id':_0x19a613['id'],'threadId':_0x19a613[_0x280c6a(0x104)],'ref':_0x19a613[_0x280c6a(0x130)]};}};p=x([C(0x0,c[_0x17a923(0x146)](P[_0x17a923(0x126)])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c[_0x17a923(0x146)](b[_0x17a923(0x13d)]))],p);var H=Object[_0x17a923(0x120)],J=(_0x441ca4,_0x48b653,_0x1ba51b,_0x311cd8)=>{const _0x74639=_0x17a923;for(var _0x4276b0=_0x311cd8>0x1?void 0x0:_0x311cd8?H(_0x48b653,_0x1ba51b):_0x48b653,_0x3a10bf=_0x441ca4[_0x74639(0x10b)]-0x1,_0x3eb6c9;_0x3a10bf>=0x0;_0x3a10bf--)(_0x3eb6c9=_0x441ca4[_0x3a10bf])&&(_0x4276b0=_0x3eb6c9(_0x4276b0)||_0x4276b0);return _0x4276b0;},y=(_0x3ccfa5,_0xe8e50a)=>(_0x568843,_0x154e41)=>_0xe8e50a(_0x568843,_0x154e41,_0x3ccfa5);let g=class extends c[_0x17a923(0x165)]{constructor(_0x454a79,_0x3e05a1){const _0x4728df=_0x17a923;super(),this[_0x4728df(0x10a)]=_0x454a79,this[_0x4728df(0x116)]=_0x3e05a1,this[_0x4728df(0x133)]();}[_0x17a923(0x133)](){const _0x272598=_0x17a923;this[_0x272598(0x10a)][_0x272598(0x174)]=this['_threadCommentDataSource'],this[_0x272598(0x10a)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x17a923(0x16a)]),y(0x1,c[_0x17a923(0x146)](p))],g);var F=Object[_0x17a923(0x13b)],L=Object[_0x17a923(0x120)],Z=(_0x4ddd5e,_0x750d1d,_0x1e2e57)=>_0x750d1d in _0x4ddd5e?F(_0x4ddd5e,_0x750d1d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1e2e57}):_0x4ddd5e[_0x750d1d]=_0x1e2e57,W=(_0x346d76,_0xd3a366,_0x75df50,_0x5cac40)=>{const _0x125517=_0x17a923;for(var _0x4dbe9d=_0x5cac40>0x1?void 0x0:_0x5cac40?L(_0xd3a366,_0x75df50):_0xd3a366,_0x5a535c=_0x346d76[_0x125517(0x10b)]-0x1,_0xa7820f;_0x5a535c>=0x0;_0x5a535c--)(_0xa7820f=_0x346d76[_0x5a535c])&&(_0x4dbe9d=_0xa7820f(_0x4dbe9d)||_0x4dbe9d);return _0x4dbe9d;},O=(_0x252342,_0x4e3c98)=>(_0x18ed69,_0x3a873e)=>_0x4e3c98(_0x18ed69,_0x3a873e,_0x252342),N=(_0x9b5a4a,_0x55e311,_0x14d3c0)=>Z(_0x9b5a4a,typeof _0x55e311!=_0x17a923(0x11b)?_0x55e311+'':_0x55e311,_0x14d3c0);exports[_0x17a923(0x128)]=class extends c[_0x17a923(0x153)]{constructor(_0x1a2e16=D,_0x305f63,_0x15eb23){const _0x10a61c=_0x17a923;super(),this[_0x10a61c(0x175)]=_0x1a2e16,this[_0x10a61c(0x156)]=_0x305f63,this[_0x10a61c(0x15b)]=_0x15eb23;const {..._0x124255}=c[_0x10a61c(0x107)]({},D,this[_0x10a61c(0x175)]);this[_0x10a61c(0x15b)]['setConfig'](q,_0x124255);}[_0x17a923(0x149)](){const _0x989aa3=_0x17a923;[[p],[g],[_]][_0x989aa3(0x14a)](_0x4bc35a=>{this['_injector']['add'](_0x4bc35a);});}[_0x17a923(0x136)](){const _0x4265ee=_0x17a923;this['_injector'][_0x4265ee(0x16b)](g),this[_0x4265ee(0x156)][_0x4265ee(0x16b)](_);}},N(exports[_0x17a923(0x128)],_0x17a923(0x12b),U),N(exports[_0x17a923(0x128)],_0x17a923(0x113),c[_0x17a923(0x151)][_0x17a923(0x159)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x17a923(0x108)](w[_0x17a923(0x134)],b['UniverCollaborationClientPlugin'],T[_0x17a923(0x123)]),O(0x1,c[_0x17a923(0x146)](c[_0x17a923(0x172)])),O(0x2,c[_0x17a923(0x119)])],exports[_0x17a923(0x128)]);
|
|
1
|
+
'use strict';const _0x59fa75=_0x28ea;(function(_0x1259e2,_0x393018){const _0x200562=_0x28ea,_0x262acb=_0x1259e2();while(!![]){try{const _0x1bda8b=-parseInt(_0x200562(0x1d7))/0x1+-parseInt(_0x200562(0x1dc))/0x2+-parseInt(_0x200562(0x1d8))/0x3+parseInt(_0x200562(0x1df))/0x4+parseInt(_0x200562(0x1e2))/0x5+parseInt(_0x200562(0x1e8))/0x6*(-parseInt(_0x200562(0x19d))/0x7)+-parseInt(_0x200562(0x191))/0x8*(-parseInt(_0x200562(0x1c5))/0x9);if(_0x1bda8b===_0x393018)break;else _0x262acb['push'](_0x262acb['shift']());}catch(_0xb68819){_0x262acb['push'](_0x262acb['shift']());}}}(_0x3fa4,0xd07af));Object[_0x59fa75(0x186)](exports,Symbol['toStringTag'],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x35b38e=>(_0x35b38e[_0x35b38e['OpenOrReOpen']=0x0]=_0x59fa75(0x190),_0x35b38e[_0x35b38e[_0x59fa75(0x178)]=0x1]=_0x59fa75(0x178),_0x35b38e[_0x35b38e['UNRECOGNIZED']=-0x1]=_0x59fa75(0x174),_0x35b38e))(I||{}),v=(_0x506303=>(_0x506303[_0x506303['Unknown']=0x0]=_0x59fa75(0x1b1),_0x506303[_0x506303[_0x59fa75(0x1cb)]=0x1]='Add',_0x506303[_0x506303['Reply']=0x2]='Reply',_0x506303[_0x506303[_0x59fa75(0x1b4)]=0x3]='Edit',_0x506303[_0x506303['Delete']=0x4]=_0x59fa75(0x1d9),_0x506303[_0x506303[_0x59fa75(0x185)]=0x5]=_0x59fa75(0x185),_0x506303[_0x506303[_0x59fa75(0x174)]=-0x1]=_0x59fa75(0x174),_0x506303))(v||{});function _0x3fa4(){const _0xec4133=['getComment','4399932aRviLk','commentUpdate$','customRanges','3285065wVkWRm','CollaborationSessionService','delete','getMemberID','UniverLicensePlugin','rangeType','120SMvVRi','_commentService','personId','UniverInstanceType','_initDataSource','DependentOn','UNRECOGNIZED','/reply','/add','replyId','Solved','UserManagerService','body','CommentService','parse','_userService','reply','getUnit','resolveComment','comment','add','values','filter','Solve','defineProperty','rangeId','thread-comment-data-source.config','getOwnPropertyDescriptor','Reply','solved','/solved','disposeWithMe','Injector','map','OpenOrReOpen','8NyeAuM','length','UniverCollaborationClientPlugin','find','root','get','size','createTimestamp','slice','updateComment','onReady','subscribe','466711BBfAIy','saveCommentToSnapshot','dayjs','syncUpdateMutationToColla','pluginName','Inject','IConfigService','content','UniverThreadCommentUIPlugin','_httpService','HTTPService','UniverThreadCommentDataSourcePlugin','_config','post','_injector','/universer-api/user/list','_configService','Plugin','getCurrentUser','setConfig','Unknown','requireSession','symbol','Edit','error','code','threadId','_sessionService','replies','/edit','dataSource','user','forEach','getUser','Disposable','unitId','/universer-api/comment/unit/','comments','CustomRangeType','stringify','28119051OhXUkg','ref','resolved','userId','type','pipe','Add','addUser','merge','YYYY/MM/DD\x20HH:mm','COMMENT','/delete','parentId','onStarting','_threadCommentDataSource','_threadCommentModel','_initUserSync','deleteComment','217045qBIqqh','4351770crlkIn','Delete','UNIVER_UNKNOWN','userID','2052610cyYycZ','addComment'];_0x3fa4=function(){return _0xec4133;};return _0x3fa4();}function _0x28ea(_0x58ad3e,_0x5514fd){const _0x3fa4f9=_0x3fa4();return _0x28ea=function(_0x28ea0b,_0x47dd47){_0x28ea0b=_0x28ea0b-0x174;let _0x22e492=_0x3fa4f9[_0x28ea0b];return _0x22e492;},_0x28ea(_0x58ad3e,_0x5514fd);}const f=_0x562171=>c[_0x59fa75(0x19f)](new Date(+_0x562171))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x5334df,_0x3e845d)=>{const _0x4e801f=_0x59fa75,_0x25abbd=_0x5334df[_0x4e801f(0x196)](c['UserManagerService']),_0x33687f=_0x5334df[_0x4e801f(0x196)](P[_0x4e801f(0x1a7)]);_0x3e845d['forEach'](_0x4cc28f=>{const _0x3eee29=_0x4e801f;_0x25abbd[_0x3eee29(0x1be)](_0x4cc28f)&&_0x3e845d[_0x3eee29(0x1e4)](_0x4cc28f);}),_0x3e845d[_0x4e801f(0x197)]&&(await _0x33687f[_0x4e801f(0x196)](_0x4e801f(0x1ac),{'params':{'userIDs':[..._0x3e845d]}}))[_0x4e801f(0x17a)]['users'][_0x4e801f(0x1bd)](_0x53face=>{const _0x20c6e8=_0x4e801f;_0x53face&&_0x25abbd[_0x20c6e8(0x1cc)](_0x53face);});};var $=Object[_0x59fa75(0x189)],E=(_0x152758,_0x24f8a9,_0x30247d,_0x808f29)=>{for(var _0x224313=_0x808f29>0x1?void 0x0:_0x808f29?$(_0x24f8a9,_0x30247d):_0x24f8a9,_0xf4d8aa=_0x152758['length']-0x1,_0x46c887;_0xf4d8aa>=0x0;_0xf4d8aa--)(_0x46c887=_0x152758[_0xf4d8aa])&&(_0x224313=_0x46c887(_0x224313)||_0x224313);return _0x224313;},S=(_0x21eac7,_0x54c01c)=>(_0x132ed2,_0x5bfbd5)=>_0x54c01c(_0x132ed2,_0x5bfbd5,_0x21eac7);let _=class extends c[_0x59fa75(0x1bf)]{constructor(_0x56978a,_0x22af80,_0x43dffc,_0x2975bf){const _0x56ba23=_0x59fa75;super(),this[_0x56ba23(0x1e9)]=_0x56978a,this[_0x56ba23(0x1d4)]=_0x22af80,this[_0x56ba23(0x17d)]=_0x43dffc,this[_0x56ba23(0x1ab)]=_0x2975bf,this['_init'](),this['_initUserSync']();}[_0x59fa75(0x1d5)](){const _0x5ed8cd=_0x59fa75;this[_0x5ed8cd(0x18d)](this[_0x5ed8cd(0x1d4)][_0x5ed8cd(0x1e0)][_0x5ed8cd(0x1ca)](j['bufferTime'](0x10))[_0x5ed8cd(0x19c)](_0x398383=>{const _0x5da550=_0x5ed8cd,_0x23adfd=new Set();_0x398383['forEach'](_0x3a1676=>{const _0x5ea460=_0x28ea;switch(_0x3a1676['type']){case _0x5ea460(0x182):{const _0x7eaa23=_0x3a1676['payload'][_0x5ea460(0x1ea)];_0x23adfd[_0x5ea460(0x182)](_0x7eaa23);break;}}}),R(this[_0x5da550(0x1ab)],_0x23adfd);}));}['_init'](){const _0x6c0229=_0x59fa75;this[_0x6c0229(0x18d)](this[_0x6c0229(0x1e9)][_0x6c0229(0x1e0)][_0x6c0229(0x19c)](async _0x48169a=>{const _0x495d63=_0x6c0229;var _0x2e4a63,_0xcd9bc5,_0x502e1b,_0x1a6ada;const _0x185f2f=(_0x2e4a63=this['_threadCommentModel'][_0x495d63(0x17f)](_0x48169a[_0x495d63(0x1c0)])[_0x495d63(0x194)](_0x36db9f=>_0x36db9f[_0x495d63(0x1b7)]===_0x48169a[_0x495d63(0x1b7)]))==null?void 0x0:_0x2e4a63['root'];if(!_0x185f2f)return;const {unitId:_0x5b51f5,subUnitId:_0x389276}=_0x185f2f;switch(_0x48169a[_0x495d63(0x1bc)]&&this[_0x495d63(0x17d)][_0x495d63(0x1cc)](_0x48169a['user']),_0x48169a['type']){case v[_0x495d63(0x1cb)]:break;case v[_0x495d63(0x18a)]:{this[_0x495d63(0x1d4)]['addComment'](_0x5b51f5,_0x389276,{'unitId':_0x5b51f5,'subUnitId':_0x389276,'ref':'','id':_0x48169a[_0x495d63(0x177)],'dT':f(+_0x48169a['createTimestamp']),'threadId':_0x48169a[_0x495d63(0x1b7)],'personId':(_0x502e1b=(_0xcd9bc5=_0x48169a[_0x495d63(0x1bc)])==null?void 0x0:_0xcd9bc5[_0x495d63(0x1db)])!=null?_0x502e1b:_0x48169a['userId'],'text':JSON[_0x495d63(0x17c)](_0x48169a[_0x495d63(0x1a4)]),'parentId':_0x185f2f['id']});break;}case v[_0x495d63(0x1d9)]:{const _0x39b51b=this['_threadCommentModel'][_0x495d63(0x1de)](_0x5b51f5,_0x389276,_0x48169a['replyId']);_0x39b51b&&_0x39b51b[_0x495d63(0x1d1)]&&this[_0x495d63(0x1d4)][_0x495d63(0x1d6)](_0x5b51f5,_0x389276,_0x48169a[_0x495d63(0x177)]);break;}case v[_0x495d63(0x1b4)]:{this['_threadCommentModel'][_0x495d63(0x19a)](_0x5b51f5,_0x389276,{'commentId':_0x48169a[_0x495d63(0x177)],'text':JSON[_0x495d63(0x17c)](_0x48169a[_0x495d63(0x1a4)])});break;}case v[_0x495d63(0x185)]:{const _0x5f5b2d=(_0x1a6ada=this[_0x495d63(0x1d4)]['getUnit'](_0x48169a[_0x495d63(0x1c0)])[_0x495d63(0x194)](_0x547311=>_0x547311[_0x495d63(0x1b7)]===_0x48169a[_0x495d63(0x1b7)]))==null?void 0x0:_0x1a6ada[_0x495d63(0x195)];_0x5f5b2d&&this[_0x495d63(0x1d4)][_0x495d63(0x180)](_0x5b51f5,_0x389276,_0x5f5b2d['id'],_0x48169a['solved']===I[_0x495d63(0x178)]);break;}}}));}};_=E([S(0x0,c[_0x59fa75(0x1a2)](b[_0x59fa75(0x17b)])),S(0x1,c[_0x59fa75(0x1a2)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0x59fa75(0x179)])),S(0x3,c[_0x59fa75(0x1a2)](c[_0x59fa75(0x18e)]))],_);const q=_0x59fa75(0x188),D={};var A=Object[_0x59fa75(0x189)],x=(_0x3a1f21,_0x150de6,_0x5f0dcc,_0x490724)=>{const _0x1af7bc=_0x59fa75;for(var _0x1509f4=_0x490724>0x1?void 0x0:_0x490724?A(_0x150de6,_0x5f0dcc):_0x150de6,_0x4e0cab=_0x3a1f21[_0x1af7bc(0x192)]-0x1,_0xd48312;_0x4e0cab>=0x0;_0x4e0cab--)(_0xd48312=_0x3a1f21[_0x4e0cab])&&(_0x1509f4=_0xd48312(_0x1509f4)||_0x1509f4);return _0x1509f4;},C=(_0x26b149,_0xf9b301)=>(_0x1125c2,_0x458935)=>_0xf9b301(_0x1125c2,_0x458935,_0x26b149);function Y(_0x325ccc,_0x11242d){const _0x317cce=_0x59fa75,_0x2f5003=_0x325ccc[_0x317cce(0x1b9)][0x0];return{..._0x11242d,'id':_0x2f5003[_0x317cce(0x177)],'resolved':_0x325ccc[_0x317cce(0x18b)]===0x1,'dT':f(_0x2f5003[_0x317cce(0x198)]),'personId':_0x2f5003[_0x317cce(0x1c8)],'threadId':_0x2f5003[_0x317cce(0x1b7)]};}function G(_0x216643,_0x20b91f,_0x49deb7){const _0x20557a=_0x59fa75;var _0x510e7d,_0x27ba7a;if(((_0x27ba7a=(_0x510e7d=_0x216643==null?void 0x0:_0x216643[_0x20557a(0x1b9)])==null?void 0x0:_0x510e7d[_0x20557a(0x192)])!=null?_0x27ba7a:0x0)>0x0){const _0x129bfd=(_0x504a9b,_0x17aa28)=>({'id':_0x504a9b[_0x20557a(0x177)],'threadId':_0x504a9b[_0x20557a(0x1b7)],'dT':f(_0x504a9b[_0x20557a(0x198)]),'personId':_0x504a9b[_0x20557a(0x1c8)],'resolved':_0x216643[_0x20557a(0x18b)]===I[_0x20557a(0x178)],'unitId':_0x20b91f,'subUnitId':_0x49deb7,'text':JSON['parse'](_0x504a9b[_0x20557a(0x1a4)]),'parentId':_0x17aa28}),_0x561652=_0x129bfd(_0x216643[_0x20557a(0x1b9)][0x0]);return{..._0x561652,'children':_0x216643[_0x20557a(0x1b9)][_0x20557a(0x199)](0x1)[_0x20557a(0x18f)](_0x6a8530=>_0x129bfd(_0x6a8530,_0x561652['id']))};}return null;}let p=class{constructor(_0x283659,_0x2aa68d,_0x6ddc78){const _0x57a4e4=_0x59fa75;this[_0x57a4e4(0x1a6)]=_0x283659,this['_userService']=_0x2aa68d,this['_sessionService']=_0x6ddc78;}async[_0x59fa75(0x1dd)](_0x10274a){const _0x522503=_0x59fa75;var _0x5bc5f7,_0x230df4;const {parentId:_0x17bb17,unitId:_0x2858cd,text:_0x5d174b,threadId:_0x97b971}=_0x10274a,_0x3a7c68=(_0x230df4=(_0x5bc5f7=_0x5d174b[_0x522503(0x1e1)])==null?void 0x0:_0x5bc5f7['filter'](_0x197221=>_0x197221[_0x522503(0x1e7)]===c['CustomRangeType']['COMMENT'])['map'](_0x223a11=>_0x223a11['rangeId']))!=null?_0x230df4:[],_0x419b09=JSON['stringify'](_0x5d174b),_0x2f4921=(await this[_0x522503(0x1b8)]['requireSession'](_0x2858cd))[_0x522503(0x1e5)]();if(_0x17bb17){const _0x4b2095={'memberId':_0x2f4921,'unitId':_0x2858cd,'content':_0x419b09,'mention':_0x3a7c68,'threadId':_0x97b971},_0xd27f80=(await this[_0x522503(0x1a6)][_0x522503(0x1aa)](_0x522503(0x1c1)+_0x2858cd+_0x522503(0x175),{'body':_0x4b2095}))[_0x522503(0x17a)][_0x522503(0x17e)];return{..._0x10274a,'id':_0xd27f80['replyId'],'dT':c[_0x522503(0x19f)](+_0xd27f80['createTimestamp'])['format'](_0x522503(0x1ce)),'personId':_0xd27f80[_0x522503(0x1c8)]};}else{const _0x3d2b7a={'memberId':_0x2f4921,'unitId':_0x2858cd,'content':_0x419b09,'mention':_0x3a7c68},_0x26cf6e=await this[_0x522503(0x1a6)][_0x522503(0x1aa)]('/universer-api/comment/unit/'+_0x2858cd+_0x522503(0x176),{'body':_0x3d2b7a});return Y(_0x26cf6e[_0x522503(0x17a)][_0x522503(0x181)],_0x10274a);}}async['updateComment'](_0x16a561){const _0x3e42fc=_0x59fa75;var _0x3c4342,_0x56b530;const {text:_0x2afde0,unitId:_0x428277}=_0x16a561,_0x567d1c=(_0x56b530=(_0x3c4342=_0x2afde0[_0x3e42fc(0x1e1)])==null?void 0x0:_0x3c4342['filter'](_0x5c7ac2=>_0x5c7ac2[_0x3e42fc(0x1e7)]===c[_0x3e42fc(0x1c3)][_0x3e42fc(0x1cf)])[_0x3e42fc(0x18f)](_0x3bd1c3=>_0x3bd1c3[_0x3e42fc(0x187)]))!=null?_0x56b530:[],_0x2de9da=JSON[_0x3e42fc(0x1c4)](_0x2afde0),_0x487f44=_0x16a561[_0x3e42fc(0x1b7)],_0x1c1b09=_0x16a561['id'],_0x4eb37d={'memberId':(await this['_sessionService']['requireSession'](_0x428277))[_0x3e42fc(0x1e5)](),'unitId':_0x428277,'threadId':_0x487f44,'mention':_0x567d1c,'content':_0x2de9da,'replyId':_0x1c1b09},_0x2e112e=await this['_httpService'][_0x3e42fc(0x1aa)](_0x3e42fc(0x1c1)+_0x428277+_0x3e42fc(0x1ba),{'body':_0x4eb37d});return!_0x2e112e['body']['error']||_0x2e112e['body'][_0x3e42fc(0x1b5)][_0x3e42fc(0x1b6)]===0x1;}async[_0x59fa75(0x180)](_0x333576){const _0x3bbefa=_0x59fa75,{unitId:_0x307522}=_0x333576,_0x5db4b7=_0x333576[_0x3bbefa(0x1b7)],_0x53a841={'memberId':this[_0x3bbefa(0x17d)][_0x3bbefa(0x1af)]()['userID'],'unitId':_0x307522,'threadId':_0x5db4b7,'solved':_0x333576[_0x3bbefa(0x1c7)]?I['Solved']:I[_0x3bbefa(0x190)]},_0x202fb2=await this['_httpService'][_0x3bbefa(0x1aa)](_0x3bbefa(0x1c1)+_0x307522+_0x3bbefa(0x18c),{'body':_0x53a841});return!_0x202fb2[_0x3bbefa(0x17a)][_0x3bbefa(0x1b5)]||_0x202fb2[_0x3bbefa(0x17a)]['error'][_0x3bbefa(0x1b6)]===0x1;}async[_0x59fa75(0x1d6)](_0x50a21a,_0x52c2d5,_0x18bd98,_0x399a94){const _0x5a302c=_0x59fa75,_0x1cbe5a={'memberId':(await this['_sessionService'][_0x5a302c(0x1b2)](_0x50a21a))[_0x5a302c(0x1e5)](),'threadId':_0x18bd98,'replyId':_0x399a94,'unitId':_0x50a21a},_0x3acceb=await this[_0x5a302c(0x1a6)][_0x5a302c(0x1aa)]('/universer-api/comment/unit/'+_0x50a21a+_0x5a302c(0x1d0),{'body':_0x1cbe5a});return!_0x3acceb[_0x5a302c(0x17a)]['error']||_0x3acceb[_0x5a302c(0x17a)]['error'][_0x5a302c(0x1b6)]===0x1;}async['listComments'](_0x5a5abe,_0x1dadcb,_0x5ba044){const _0x57da44=_0x59fa75,_0x24bc84={'unitId':_0x5a5abe,'threadId':_0x5ba044},_0x500633=await this['_httpService'][_0x57da44(0x1aa)](_0x57da44(0x1c1)+_0x5a5abe+'/list',{'body':_0x24bc84}),_0xdb0f46=_0x5ba044[_0x57da44(0x18f)](_0x557f54=>G(_0x500633['body'][_0x57da44(0x1c2)][_0x557f54],_0x5a5abe,_0x1dadcb))[_0x57da44(0x184)](Boolean);return Object[_0x57da44(0x183)](_0x500633[_0x57da44(0x17a)]['users'])['forEach'](_0x149269=>{this['_userService']['addUser'](_0x149269);}),_0xdb0f46;}[_0x59fa75(0x19e)](_0x5b7001){const _0x5c9bc2=_0x59fa75;return{'id':_0x5b7001['id'],'threadId':_0x5b7001['threadId'],'ref':_0x5b7001[_0x5c9bc2(0x1c6)]};}};p=x([C(0x0,c[_0x59fa75(0x1a2)](P[_0x59fa75(0x1a7)])),C(0x1,c['Inject'](c[_0x59fa75(0x179)])),C(0x2,c[_0x59fa75(0x1a2)](b[_0x59fa75(0x1e3)]))],p);var H=Object[_0x59fa75(0x189)],J=(_0xdbfd27,_0x1619b0,_0xee5469,_0x2291d8)=>{for(var _0x23b726=_0x2291d8>0x1?void 0x0:_0x2291d8?H(_0x1619b0,_0xee5469):_0x1619b0,_0x301ace=_0xdbfd27['length']-0x1,_0x3dbb3e;_0x301ace>=0x0;_0x301ace--)(_0x3dbb3e=_0xdbfd27[_0x301ace])&&(_0x23b726=_0x3dbb3e(_0x23b726)||_0x23b726);return _0x23b726;},y=(_0x110598,_0x3fee7f)=>(_0xb7b6e4,_0x379b3f)=>_0x3fee7f(_0xb7b6e4,_0x379b3f,_0x110598);let g=class extends c[_0x59fa75(0x1bf)]{constructor(_0x44bc05,_0x1f300a){const _0x530ca1=_0x59fa75;super(),this['_threadCommentDataSourceService']=_0x44bc05,this[_0x530ca1(0x1d3)]=_0x1f300a,this[_0x530ca1(0x1ec)]();}[_0x59fa75(0x1ec)](){const _0x11433d=_0x59fa75;this['_threadCommentDataSourceService'][_0x11433d(0x1bb)]=this[_0x11433d(0x1d3)],this['_threadCommentDataSourceService'][_0x11433d(0x1a0)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x59fa75(0x1a2)](p))],g);var F=Object[_0x59fa75(0x186)],L=Object[_0x59fa75(0x189)],Z=(_0x5068d1,_0x3b7527,_0x8b20cd)=>_0x3b7527 in _0x5068d1?F(_0x5068d1,_0x3b7527,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x8b20cd}):_0x5068d1[_0x3b7527]=_0x8b20cd,W=(_0x46c249,_0x45bc59,_0x50c243,_0x3e05dd)=>{for(var _0x1db9ae=_0x3e05dd>0x1?void 0x0:_0x3e05dd?L(_0x45bc59,_0x50c243):_0x45bc59,_0x568b11=_0x46c249['length']-0x1,_0x443b9e;_0x568b11>=0x0;_0x568b11--)(_0x443b9e=_0x46c249[_0x568b11])&&(_0x1db9ae=_0x443b9e(_0x1db9ae)||_0x1db9ae);return _0x1db9ae;},O=(_0x354c65,_0xed409d)=>(_0xef1645,_0x18550f)=>_0xed409d(_0xef1645,_0x18550f,_0x354c65),N=(_0x451b13,_0x480e45,_0x54f166)=>Z(_0x451b13,typeof _0x480e45!=_0x59fa75(0x1b3)?_0x480e45+'':_0x480e45,_0x54f166);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x59fa75(0x1ae)]{constructor(_0xd06a8c=D,_0x46735c,_0x31ff89){const _0x438e41=_0x59fa75;super(),this[_0x438e41(0x1a9)]=_0xd06a8c,this[_0x438e41(0x1ab)]=_0x46735c,this[_0x438e41(0x1ad)]=_0x31ff89;const {..._0x3ca28d}=c[_0x438e41(0x1cd)]({},D,this[_0x438e41(0x1a9)]);this['_configService'][_0x438e41(0x1b0)](q,_0x3ca28d);}[_0x59fa75(0x1d2)](){const _0x134498=_0x59fa75;[[p],[g],[_]][_0x134498(0x1bd)](_0x1e680e=>{const _0x5b4047=_0x134498;this[_0x5b4047(0x1ab)]['add'](_0x1e680e);});}[_0x59fa75(0x19b)](){const _0x5cf567=_0x59fa75;this[_0x5cf567(0x1ab)]['get'](g),this['_injector'][_0x5cf567(0x196)](_);}},N(exports[_0x59fa75(0x1a8)],_0x59fa75(0x1a1),U),N(exports[_0x59fa75(0x1a8)],_0x59fa75(0x1c9),c[_0x59fa75(0x1eb)][_0x59fa75(0x1da)]),exports[_0x59fa75(0x1a8)]=W([c[_0x59fa75(0x1ed)](w[_0x59fa75(0x1a5)],b[_0x59fa75(0x193)],T[_0x59fa75(0x1e6)]),O(0x1,c[_0x59fa75(0x1a2)](c['Injector'])),O(0x2,c[_0x59fa75(0x1a3)])],exports[_0x59fa75(0x1a8)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x38fb1a=_0x3a21;(function(_0x2cf1df,_0x4d081f){const _0x20b1b6=_0x3a21,_0x136645=_0x2cf1df();while(!![]){try{const _0x1c00ce=-parseInt(_0x20b1b6(0x172))/0x1+-parseInt(_0x20b1b6(0x14d))/0x2*(parseInt(_0x20b1b6(0x187))/0x3)+-parseInt(_0x20b1b6(0x1a3))/0x4+parseInt(_0x20b1b6(0x177))/0x5+parseInt(_0x20b1b6(0x16d))/0x6*(-parseInt(_0x20b1b6(0x14c))/0x7)+-parseInt(_0x20b1b6(0x19c))/0x8+-parseInt(_0x20b1b6(0x193))/0x9*(-parseInt(_0x20b1b6(0x14a))/0xa);if(_0x1c00ce===_0x4d081f)break;else _0x136645['push'](_0x136645['shift']());}catch(_0x1296b3){_0x136645['push'](_0x136645['shift']());}}}(_0x1614,0x6b83d));import{CommentService as _0x13a843,CollaborationSessionService as _0x11edac,UniverCollaborationClientPlugin as _0x468216}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1a398b}from'@univerjs-pro/license';import{dayjs as _0x18dc99,UserManagerService as _0x5e1c86,Inject as _0x4db969,Injector as _0x899ce6,Disposable as _0x1b061a,CustomRangeType as _0x274ae2,UniverInstanceType as _0x1c9e82,DependentOn as _0x2b1585,IConfigService as _0x2f3a09,Plugin as _0x255d8a,merge as _0x43ff99}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x829ca7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1cdbd8,IThreadCommentDataSourceService as _0x26b277}from'@univerjs/thread-comment';import{bufferTime as _0x1ef2de}from'rxjs';import{HTTPService as _0x1bacc9}from'@univerjs/network';const W=_0x38fb1a(0x192);function _0x1614(){const _0x47e130=['length','ref','_threadCommentDataSource','resolveComment','format','/universer-api/comment/unit/','requireSession','personId','map','reply','388956YLyiUF','saveCommentToSnapshot','Reply','parse','userID','post','root','Add','error','_threadCommentModel','_commentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','7425gmpgXZ','_initUserSync','size','replyId','solved','_config','get','/universer-api/user/list','addComment','4269472MHoOHI','getCurrentUser','delete','add','/list','userId','disposeWithMe','2767352iwQgum','thread-comment-data-source.config','symbol','Solved','slice','getComment','parentId','UNRECOGNIZED','_userService','subscribe','getOwnPropertyDescriptor','_initDataSource','_configService','defineProperty','addUser','29930YjcRdw','replies','37331wcPXSX','2HEmGta','comment','/add','unitId','createTimestamp','Solve','UNIVER_UNKNOWN','COMMENT','/edit','_threadCommentDataSourceService','code','user','customRanges','threadId','deleteComment','payload','getUser','resolved','getUnit','filter','YYYY/MM/DD\x20HH:mm','/delete','type','_sessionService','Edit','/solved','OpenOrReOpen','/reply','pluginName','users','rangeType','_injector','234aLZVuO','commentUpdate$','pipe','Delete','_httpService','583960ApnHTx','onReady','Unknown','onStarting','forEach','591385vLvltn','getMemberID','body','syncUpdateMutationToColla','updateComment','_init'];_0x1614=function(){return _0x47e130;};return _0x1614();}var I=(_0x552a99=>(_0x552a99[_0x552a99[_0x38fb1a(0x167)]=0x0]='OpenOrReOpen',_0x552a99[_0x552a99['Solved']=0x1]=_0x38fb1a(0x1a6),_0x552a99[_0x552a99[_0x38fb1a(0x1aa)]=-0x1]=_0x38fb1a(0x1aa),_0x552a99))(I||{}),v=(_0x1b2830=>(_0x1b2830[_0x1b2830[_0x38fb1a(0x174)]=0x0]='Unknown',_0x1b2830[_0x1b2830[_0x38fb1a(0x18e)]=0x1]=_0x38fb1a(0x18e),_0x1b2830[_0x1b2830[_0x38fb1a(0x189)]=0x2]='Reply',_0x1b2830[_0x1b2830[_0x38fb1a(0x165)]=0x3]='Edit',_0x1b2830[_0x1b2830[_0x38fb1a(0x170)]=0x4]=_0x38fb1a(0x170),_0x1b2830[_0x1b2830[_0x38fb1a(0x152)]=0x5]=_0x38fb1a(0x152),_0x1b2830[_0x1b2830['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x1b2830))(v||{});const y=_0x1908bf=>_0x18dc99(new Date(+_0x1908bf))[_0x38fb1a(0x181)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4c9f4e,_0x11283b)=>{const _0x37f6ef=_0x38fb1a,_0x529564=_0x4c9f4e[_0x37f6ef(0x199)](_0x5e1c86),_0x4cd0e2=_0x4c9f4e[_0x37f6ef(0x199)](_0x1bacc9);_0x11283b[_0x37f6ef(0x176)](_0x374081=>{const _0x475dc2=_0x37f6ef;_0x529564[_0x475dc2(0x15d)](_0x374081)&&_0x11283b[_0x475dc2(0x19e)](_0x374081);}),_0x11283b[_0x37f6ef(0x195)]&&(await _0x4cd0e2[_0x37f6ef(0x199)](_0x37f6ef(0x19a),{'params':{'userIDs':[..._0x11283b]}}))[_0x37f6ef(0x179)][_0x37f6ef(0x16a)][_0x37f6ef(0x176)](_0x509ccb=>{const _0x39f117=_0x37f6ef;_0x509ccb&&_0x529564[_0x39f117(0x149)](_0x509ccb);});};var K=Object[_0x38fb1a(0x145)],V=(_0x32a841,_0x567eb7,_0x439e18,_0x38a6ef)=>{for(var _0x339250=_0x38a6ef>0x1?void 0x0:_0x38a6ef?K(_0x567eb7,_0x439e18):_0x567eb7,_0x31ce1d=_0x32a841['length']-0x1,_0x543b1b;_0x31ce1d>=0x0;_0x31ce1d--)(_0x543b1b=_0x32a841[_0x31ce1d])&&(_0x339250=_0x543b1b(_0x339250)||_0x339250);return _0x339250;},p=(_0x6d784e,_0x243b2b)=>(_0x16773e,_0x26f6b7)=>_0x243b2b(_0x16773e,_0x26f6b7,_0x6d784e);let _=class extends _0x1b061a{constructor(_0xf0b40b,_0x3e57b0,_0x133b99,_0x39df8e){const _0x5efebe=_0x38fb1a;super(),this[_0x5efebe(0x191)]=_0xf0b40b,this['_threadCommentModel']=_0x3e57b0,this[_0x5efebe(0x1ab)]=_0x133b99,this[_0x5efebe(0x16c)]=_0x39df8e,this[_0x5efebe(0x17c)](),this['_initUserSync']();}[_0x38fb1a(0x194)](){const _0x4ab2cd=_0x38fb1a;this[_0x4ab2cd(0x1a2)](this['_threadCommentModel'][_0x4ab2cd(0x16e)][_0x4ab2cd(0x16f)](_0x1ef2de(0x10))[_0x4ab2cd(0x1ac)](_0x8a44d3=>{const _0x2ec5a0=new Set();_0x8a44d3['forEach'](_0x445f58=>{const _0x53daa6=_0x3a21;switch(_0x445f58[_0x53daa6(0x163)]){case _0x53daa6(0x19f):{const _0x2cd792=_0x445f58[_0x53daa6(0x15c)][_0x53daa6(0x184)];_0x2ec5a0[_0x53daa6(0x19f)](_0x2cd792);break;}}}),B(this['_injector'],_0x2ec5a0);}));}[_0x38fb1a(0x17c)](){const _0x5d646c=_0x38fb1a;this['disposeWithMe'](this[_0x5d646c(0x191)]['commentUpdate$']['subscribe'](async _0x698d12=>{const _0x16aab6=_0x5d646c;var _0x456d8e,_0x418fb0,_0x45095b,_0x5c1d25;const _0x16ddf3=(_0x456d8e=this[_0x16aab6(0x190)][_0x16aab6(0x15f)](_0x698d12[_0x16aab6(0x150)])['find'](_0xb0f637=>_0xb0f637[_0x16aab6(0x15a)]===_0x698d12[_0x16aab6(0x15a)]))==null?void 0x0:_0x456d8e['root'];if(!_0x16ddf3)return;const {unitId:_0x253c4e,subUnitId:_0x23e03b}=_0x16ddf3;switch(_0x698d12[_0x16aab6(0x158)]&&this[_0x16aab6(0x1ab)][_0x16aab6(0x149)](_0x698d12['user']),_0x698d12[_0x16aab6(0x163)]){case v[_0x16aab6(0x18e)]:break;case v[_0x16aab6(0x189)]:{this[_0x16aab6(0x190)][_0x16aab6(0x19b)](_0x253c4e,_0x23e03b,{'unitId':_0x253c4e,'subUnitId':_0x23e03b,'ref':'','id':_0x698d12['replyId'],'dT':y(+_0x698d12[_0x16aab6(0x151)]),'threadId':_0x698d12[_0x16aab6(0x15a)],'personId':(_0x45095b=(_0x418fb0=_0x698d12[_0x16aab6(0x158)])==null?void 0x0:_0x418fb0[_0x16aab6(0x18b)])!=null?_0x45095b:_0x698d12[_0x16aab6(0x1a1)],'text':JSON['parse'](_0x698d12['content']),'parentId':_0x16ddf3['id']});break;}case v[_0x16aab6(0x170)]:{const _0x53721e=this[_0x16aab6(0x190)][_0x16aab6(0x1a8)](_0x253c4e,_0x23e03b,_0x698d12[_0x16aab6(0x196)]);_0x53721e&&_0x53721e[_0x16aab6(0x1a9)]&&this[_0x16aab6(0x190)][_0x16aab6(0x15b)](_0x253c4e,_0x23e03b,_0x698d12[_0x16aab6(0x196)]);break;}case v['Edit']:{this[_0x16aab6(0x190)][_0x16aab6(0x17b)](_0x253c4e,_0x23e03b,{'commentId':_0x698d12['replyId'],'text':JSON[_0x16aab6(0x18a)](_0x698d12['content'])});break;}case v[_0x16aab6(0x152)]:{const _0x6bac75=(_0x5c1d25=this['_threadCommentModel'][_0x16aab6(0x15f)](_0x698d12['unitId'])['find'](_0x333087=>_0x333087[_0x16aab6(0x15a)]===_0x698d12[_0x16aab6(0x15a)]))==null?void 0x0:_0x5c1d25[_0x16aab6(0x18d)];_0x6bac75&&this[_0x16aab6(0x190)][_0x16aab6(0x180)](_0x253c4e,_0x23e03b,_0x6bac75['id'],_0x698d12['solved']===I[_0x16aab6(0x1a6)]);break;}}}));}};_=V([p(0x0,_0x4db969(_0x13a843)),p(0x1,_0x4db969(_0x1cdbd8)),p(0x2,_0x4db969(_0x5e1c86)),p(0x3,_0x4db969(_0x899ce6))],_);const z=_0x38fb1a(0x1a4),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1d9239,_0x53e06f,_0x3cedd4,_0x493e84)=>{for(var _0x13ab65=_0x493e84>0x1?void 0x0:_0x493e84?k(_0x53e06f,_0x3cedd4):_0x53e06f,_0x502c89=_0x1d9239['length']-0x1,_0x11f9bc;_0x502c89>=0x0;_0x502c89--)(_0x11f9bc=_0x1d9239[_0x502c89])&&(_0x13ab65=_0x11f9bc(_0x13ab65)||_0x13ab65);return _0x13ab65;},b=(_0x4ffacb,_0xa66fc1)=>(_0x4976fb,_0x39f977)=>_0xa66fc1(_0x4976fb,_0x39f977,_0x4ffacb);function X(_0x29c9c5,_0x39f4d8){const _0x55fd67=_0x38fb1a,_0x35bf36=_0x29c9c5[_0x55fd67(0x14b)][0x0];return{..._0x39f4d8,'id':_0x35bf36['replyId'],'resolved':_0x29c9c5[_0x55fd67(0x197)]===0x1,'dT':y(_0x35bf36['createTimestamp']),'personId':_0x35bf36[_0x55fd67(0x1a1)],'threadId':_0x35bf36[_0x55fd67(0x15a)]};}function ee(_0x14b2a7,_0x1b3c23,_0x565e6){const _0x39e9ac=_0x38fb1a;var _0x4eb305,_0xe22baf;if(((_0xe22baf=(_0x4eb305=_0x14b2a7==null?void 0x0:_0x14b2a7[_0x39e9ac(0x14b)])==null?void 0x0:_0x4eb305[_0x39e9ac(0x17d)])!=null?_0xe22baf:0x0)>0x0){const _0x3cbf1e=(_0x7e586f,_0x45fe3b)=>({'id':_0x7e586f[_0x39e9ac(0x196)],'threadId':_0x7e586f[_0x39e9ac(0x15a)],'dT':y(_0x7e586f[_0x39e9ac(0x151)]),'personId':_0x7e586f[_0x39e9ac(0x1a1)],'resolved':_0x14b2a7[_0x39e9ac(0x197)]===I[_0x39e9ac(0x1a6)],'unitId':_0x1b3c23,'subUnitId':_0x565e6,'text':JSON[_0x39e9ac(0x18a)](_0x7e586f['content']),'parentId':_0x45fe3b}),_0x4ba3ce=_0x3cbf1e(_0x14b2a7[_0x39e9ac(0x14b)][0x0]);return{..._0x4ba3ce,'children':_0x14b2a7[_0x39e9ac(0x14b)][_0x39e9ac(0x1a7)](0x1)[_0x39e9ac(0x185)](_0x575b10=>_0x3cbf1e(_0x575b10,_0x4ba3ce['id']))};}return null;}let S=class{constructor(_0x39bb57,_0x5e54b9,_0x431c39){const _0x2a50bb=_0x38fb1a;this['_httpService']=_0x39bb57,this[_0x2a50bb(0x1ab)]=_0x5e54b9,this[_0x2a50bb(0x164)]=_0x431c39;}async['addComment'](_0x559ef3){const _0x224580=_0x38fb1a;var _0x248c85,_0x3b89c1;const {parentId:_0x28ba24,unitId:_0x3c423c,text:_0x17199f,threadId:_0x5174ca}=_0x559ef3,_0x4b2b03=(_0x3b89c1=(_0x248c85=_0x17199f[_0x224580(0x159)])==null?void 0x0:_0x248c85[_0x224580(0x160)](_0x347df3=>_0x347df3[_0x224580(0x16b)]===_0x274ae2[_0x224580(0x154)])[_0x224580(0x185)](_0x2a0667=>_0x2a0667['rangeId']))!=null?_0x3b89c1:[],_0x54008a=JSON['stringify'](_0x17199f),_0x43aaf2=(await this['_sessionService']['requireSession'](_0x3c423c))[_0x224580(0x178)]();if(_0x28ba24){const _0x48b4bf={'memberId':_0x43aaf2,'unitId':_0x3c423c,'content':_0x54008a,'mention':_0x4b2b03,'threadId':_0x5174ca},_0x1e3877=(await this[_0x224580(0x171)][_0x224580(0x18c)](_0x224580(0x182)+_0x3c423c+_0x224580(0x168),{'body':_0x48b4bf}))[_0x224580(0x179)][_0x224580(0x186)];return{..._0x559ef3,'id':_0x1e3877['replyId'],'dT':_0x18dc99(+_0x1e3877['createTimestamp'])[_0x224580(0x181)](_0x224580(0x161)),'personId':_0x1e3877[_0x224580(0x1a1)]};}else{const _0x3650ab={'memberId':_0x43aaf2,'unitId':_0x3c423c,'content':_0x54008a,'mention':_0x4b2b03},_0x26b41b=await this[_0x224580(0x171)][_0x224580(0x18c)]('/universer-api/comment/unit/'+_0x3c423c+_0x224580(0x14f),{'body':_0x3650ab});return X(_0x26b41b['body'][_0x224580(0x14e)],_0x559ef3);}}async[_0x38fb1a(0x17b)](_0x439e8d){const _0x3946e2=_0x38fb1a;var _0x58f34e,_0x475c77;const {text:_0x20be11,unitId:_0xda99a1}=_0x439e8d,_0x4c2b5d=(_0x475c77=(_0x58f34e=_0x20be11[_0x3946e2(0x159)])==null?void 0x0:_0x58f34e['filter'](_0x1a5dff=>_0x1a5dff[_0x3946e2(0x16b)]===_0x274ae2[_0x3946e2(0x154)])[_0x3946e2(0x185)](_0x337f88=>_0x337f88['rangeId']))!=null?_0x475c77:[],_0x1b079a=JSON['stringify'](_0x20be11),_0x52626a=_0x439e8d[_0x3946e2(0x15a)],_0x53a621=_0x439e8d['id'],_0x31b228={'memberId':(await this[_0x3946e2(0x164)][_0x3946e2(0x183)](_0xda99a1))[_0x3946e2(0x178)](),'unitId':_0xda99a1,'threadId':_0x52626a,'mention':_0x4c2b5d,'content':_0x1b079a,'replyId':_0x53a621},_0x246a00=await this[_0x3946e2(0x171)][_0x3946e2(0x18c)](_0x3946e2(0x182)+_0xda99a1+_0x3946e2(0x155),{'body':_0x31b228});return!_0x246a00[_0x3946e2(0x179)]['error']||_0x246a00['body'][_0x3946e2(0x18f)][_0x3946e2(0x157)]===0x1;}async[_0x38fb1a(0x180)](_0x436090){const _0x4d56fc=_0x38fb1a,{unitId:_0x26abc7}=_0x436090,_0x5a7e44=_0x436090[_0x4d56fc(0x15a)],_0x2267bb={'memberId':this[_0x4d56fc(0x1ab)][_0x4d56fc(0x19d)]()[_0x4d56fc(0x18b)],'unitId':_0x26abc7,'threadId':_0x5a7e44,'solved':_0x436090[_0x4d56fc(0x15e)]?I[_0x4d56fc(0x1a6)]:I[_0x4d56fc(0x167)]},_0x257984=await this[_0x4d56fc(0x171)][_0x4d56fc(0x18c)](_0x4d56fc(0x182)+_0x26abc7+_0x4d56fc(0x166),{'body':_0x2267bb});return!_0x257984[_0x4d56fc(0x179)][_0x4d56fc(0x18f)]||_0x257984[_0x4d56fc(0x179)][_0x4d56fc(0x18f)][_0x4d56fc(0x157)]===0x1;}async[_0x38fb1a(0x15b)](_0x5c7992,_0x4da300,_0x36c9ff,_0x2bf270){const _0x50f4c9=_0x38fb1a,_0x4c63e6={'memberId':(await this[_0x50f4c9(0x164)]['requireSession'](_0x5c7992))['getMemberID'](),'threadId':_0x36c9ff,'replyId':_0x2bf270,'unitId':_0x5c7992},_0x595d97=await this[_0x50f4c9(0x171)]['post'](_0x50f4c9(0x182)+_0x5c7992+_0x50f4c9(0x162),{'body':_0x4c63e6});return!_0x595d97[_0x50f4c9(0x179)][_0x50f4c9(0x18f)]||_0x595d97[_0x50f4c9(0x179)][_0x50f4c9(0x18f)][_0x50f4c9(0x157)]===0x1;}async['listComments'](_0x35a972,_0x4b519a,_0x2ba610){const _0x2b6c05=_0x38fb1a,_0x2c8769={'unitId':_0x35a972,'threadId':_0x2ba610},_0x26fad6=await this[_0x2b6c05(0x171)]['post'](_0x2b6c05(0x182)+_0x35a972+_0x2b6c05(0x1a0),{'body':_0x2c8769}),_0x3fdc58=_0x2ba610[_0x2b6c05(0x185)](_0x11c814=>ee(_0x26fad6[_0x2b6c05(0x179)]['comments'][_0x11c814],_0x35a972,_0x4b519a))[_0x2b6c05(0x160)](Boolean);return Object['values'](_0x26fad6[_0x2b6c05(0x179)][_0x2b6c05(0x16a)])['forEach'](_0x59c3f4=>{const _0x49d500=_0x2b6c05;this[_0x49d500(0x1ab)][_0x49d500(0x149)](_0x59c3f4);}),_0x3fdc58;}[_0x38fb1a(0x188)](_0x46a07d){const _0x5e7bd3=_0x38fb1a;return{'id':_0x46a07d['id'],'threadId':_0x46a07d[_0x5e7bd3(0x15a)],'ref':_0x46a07d[_0x5e7bd3(0x17e)]};}};S=Q([b(0x0,_0x4db969(_0x1bacc9)),b(0x1,_0x4db969(_0x5e1c86)),b(0x2,_0x4db969(_0x11edac))],S);var re=Object[_0x38fb1a(0x145)],te=(_0x4fa28b,_0x579834,_0x11437f,_0x40e919)=>{const _0x440783=_0x38fb1a;for(var _0x4ba439=_0x40e919>0x1?void 0x0:_0x40e919?re(_0x579834,_0x11437f):_0x579834,_0x1358c5=_0x4fa28b[_0x440783(0x17d)]-0x1,_0x2141af;_0x1358c5>=0x0;_0x1358c5--)(_0x2141af=_0x4fa28b[_0x1358c5])&&(_0x4ba439=_0x2141af(_0x4ba439)||_0x4ba439);return _0x4ba439;},M=(_0x536d60,_0x24bb60)=>(_0x1cfb57,_0x592f20)=>_0x24bb60(_0x1cfb57,_0x592f20,_0x536d60);let f=class extends _0x1b061a{constructor(_0x2289ec,_0x185e4e){const _0xc25fbe=_0x38fb1a;super(),this[_0xc25fbe(0x156)]=_0x2289ec,this['_threadCommentDataSource']=_0x185e4e,this['_initDataSource']();}[_0x38fb1a(0x146)](){const _0x15b524=_0x38fb1a;this[_0x15b524(0x156)]['dataSource']=this[_0x15b524(0x17f)],this[_0x15b524(0x156)][_0x15b524(0x17a)]=!0x1;}};function _0x3a21(_0x32e8ab,_0x17c395){const _0x1614c3=_0x1614();return _0x3a21=function(_0x3a2174,_0x458669){_0x3a2174=_0x3a2174-0x145;let _0x166d32=_0x1614c3[_0x3a2174];return _0x166d32;},_0x3a21(_0x32e8ab,_0x17c395);}f=te([M(0x0,_0x26b277),M(0x1,_0x4db969(S))],f);var se=Object[_0x38fb1a(0x148)],oe=Object[_0x38fb1a(0x145)],ne=(_0xa66428,_0x40c905,_0xbf668b)=>_0x40c905 in _0xa66428?se(_0xa66428,_0x40c905,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xbf668b}):_0xa66428[_0x40c905]=_0xbf668b,ie=(_0x69f286,_0x1da40a,_0x5be4e4,_0x31cca6)=>{const _0x4988ae=_0x38fb1a;for(var _0x7c5c36=_0x31cca6>0x1?void 0x0:_0x31cca6?oe(_0x1da40a,_0x5be4e4):_0x1da40a,_0x2951f3=_0x69f286[_0x4988ae(0x17d)]-0x1,_0x3c4667;_0x2951f3>=0x0;_0x2951f3--)(_0x3c4667=_0x69f286[_0x2951f3])&&(_0x7c5c36=_0x3c4667(_0x7c5c36)||_0x7c5c36);return _0x7c5c36;},N=(_0x229923,_0xd682a)=>(_0x2e584d,_0x175e33)=>_0xd682a(_0x2e584d,_0x175e33,_0x229923),$=(_0x545f62,_0x3d8b26,_0x85a80a)=>ne(_0x545f62,typeof _0x3d8b26!=_0x38fb1a(0x1a5)?_0x3d8b26+'':_0x3d8b26,_0x85a80a);let g=class extends _0x255d8a{constructor(_0x735f4=O,_0x29601d,_0x2a3e7b){const _0x5c44f4=_0x38fb1a;super(),this['_config']=_0x735f4,this[_0x5c44f4(0x16c)]=_0x29601d,this[_0x5c44f4(0x147)]=_0x2a3e7b;const {..._0x1c2d4e}=_0x43ff99({},O,this[_0x5c44f4(0x198)]);this['_configService']['setConfig'](z,_0x1c2d4e);}[_0x38fb1a(0x175)](){[[S],[f],[_]]['forEach'](_0x32f8bf=>{const _0xbf509=_0x3a21;this[_0xbf509(0x16c)][_0xbf509(0x19f)](_0x32f8bf);});}[_0x38fb1a(0x173)](){const _0x25171b=_0x38fb1a;this[_0x25171b(0x16c)][_0x25171b(0x199)](f),this[_0x25171b(0x16c)][_0x25171b(0x199)](_);}};$(g,_0x38fb1a(0x169),W),$(g,_0x38fb1a(0x163),_0x1c9e82[_0x38fb1a(0x153)]),g=ie([_0x2b1585(_0x829ca7,_0x468216,_0x1a398b),N(0x1,_0x4db969(_0x899ce6)),N(0x2,_0x2f3a09)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x427a2e=_0xc44c;(function(_0x23b5e0,_0xa887ce){const _0x27737=_0xc44c,_0x4f2778=_0x23b5e0();while(!![]){try{const _0x487175=-parseInt(_0x27737(0x235))/0x1+parseInt(_0x27737(0x221))/0x2*(parseInt(_0x27737(0x210))/0x3)+-parseInt(_0x27737(0x22e))/0x4+-parseInt(_0x27737(0x1ef))/0x5*(parseInt(_0x27737(0x239))/0x6)+-parseInt(_0x27737(0x1ee))/0x7+-parseInt(_0x27737(0x225))/0x8+parseInt(_0x27737(0x234))/0x9*(parseInt(_0x27737(0x22f))/0xa);if(_0x487175===_0xa887ce)break;else _0x4f2778['push'](_0x4f2778['shift']());}catch(_0x3ddfb5){_0x4f2778['push'](_0x4f2778['shift']());}}}(_0x4991,0xbfe52));import{CommentService as _0x5e2ac9,CollaborationSessionService as _0x4747fc,UniverCollaborationClientPlugin as _0x5628d7}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x46b496}from'@univerjs-pro/license';import{dayjs as _0x7583d3,UserManagerService as _0x138878,Inject as _0xa91514,Injector as _0x31a0cf,Disposable as _0x9fb58a,CustomRangeType as _0x34f293,UniverInstanceType as _0x3bd6b7,DependentOn as _0x3efd0c,IConfigService as _0x5702e0,Plugin as _0x17f2a3,merge as _0x5641fc}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5cc0d1}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x35bfa3,IThreadCommentDataSourceService as _0x66b051}from'@univerjs/thread-comment';import{bufferTime as _0x16b7ca}from'rxjs';import{HTTPService as _0x2afb15}from'@univerjs/network';const W=_0x427a2e(0x23b);function _0xc44c(_0x440fa0,_0x44909f){const _0x4991cf=_0x4991();return _0xc44c=function(_0xc44cc0,_0x308b12){_0xc44cc0=_0xc44cc0-0x1eb;let _0x49fd14=_0x4991cf[_0xc44cc0];return _0x49fd14;},_0xc44c(_0x440fa0,_0x44909f);}var I=(_0x5b10af=>(_0x5b10af[_0x5b10af[_0x427a2e(0x21f)]=0x0]=_0x427a2e(0x21f),_0x5b10af[_0x5b10af['Solved']=0x1]='Solved',_0x5b10af[_0x5b10af['UNRECOGNIZED']=-0x1]=_0x427a2e(0x1ff),_0x5b10af))(I||{}),v=(_0x39172e=>(_0x39172e[_0x39172e[_0x427a2e(0x216)]=0x0]='Unknown',_0x39172e[_0x39172e[_0x427a2e(0x243)]=0x1]=_0x427a2e(0x243),_0x39172e[_0x39172e[_0x427a2e(0x249)]=0x2]=_0x427a2e(0x249),_0x39172e[_0x39172e['Edit']=0x3]=_0x427a2e(0x200),_0x39172e[_0x39172e[_0x427a2e(0x21c)]=0x4]=_0x427a2e(0x21c),_0x39172e[_0x39172e[_0x427a2e(0x21a)]=0x5]=_0x427a2e(0x21a),_0x39172e[_0x39172e[_0x427a2e(0x1ff)]=-0x1]=_0x427a2e(0x1ff),_0x39172e))(v||{});const y=_0x2d3265=>_0x7583d3(new Date(+_0x2d3265))[_0x427a2e(0x245)]('YYYY/MM/DD\x20HH:mm'),B=async(_0xec4c6f,_0x993a9a)=>{const _0x11e26d=_0x427a2e,_0x1362f3=_0xec4c6f[_0x11e26d(0x1fe)](_0x138878),_0x33adfc=_0xec4c6f[_0x11e26d(0x1fe)](_0x2afb15);_0x993a9a[_0x11e26d(0x246)](_0x3fe7ae=>{const _0x45cd00=_0x11e26d;_0x1362f3['getUser'](_0x3fe7ae)&&_0x993a9a[_0x45cd00(0x224)](_0x3fe7ae);}),_0x993a9a['size']&&(await _0x33adfc[_0x11e26d(0x1fe)](_0x11e26d(0x237),{'params':{'userIDs':[..._0x993a9a]}}))['body']['users'][_0x11e26d(0x246)](_0x444276=>{const _0x5ec002=_0x11e26d;_0x444276&&_0x1362f3[_0x5ec002(0x1fa)](_0x444276);});};var K=Object[_0x427a2e(0x24d)],V=(_0x56de3a,_0x135cae,_0xedd4b7,_0x1e1677)=>{const _0x324c8b=_0x427a2e;for(var _0x131aec=_0x1e1677>0x1?void 0x0:_0x1e1677?K(_0x135cae,_0xedd4b7):_0x135cae,_0x44a569=_0x56de3a[_0x324c8b(0x22d)]-0x1,_0x47d23f;_0x44a569>=0x0;_0x44a569--)(_0x47d23f=_0x56de3a[_0x44a569])&&(_0x131aec=_0x47d23f(_0x131aec)||_0x131aec);return _0x131aec;},p=(_0x40a3b5,_0x24f808)=>(_0x5a2adb,_0x3fe247)=>_0x24f808(_0x5a2adb,_0x3fe247,_0x40a3b5);let _=class extends _0x9fb58a{constructor(_0x33b69b,_0x93e34,_0x3437fb,_0x40045a){const _0x249cfb=_0x427a2e;super(),this[_0x249cfb(0x1f4)]=_0x33b69b,this[_0x249cfb(0x1eb)]=_0x93e34,this['_userService']=_0x3437fb,this['_injector']=_0x40045a,this[_0x249cfb(0x1ec)](),this['_initUserSync']();}[_0x427a2e(0x1fc)](){const _0x45830d=_0x427a2e;this[_0x45830d(0x230)](this[_0x45830d(0x1eb)][_0x45830d(0x233)]['pipe'](_0x16b7ca(0x10))['subscribe'](_0x4cd7c6=>{const _0x74cfca=_0x45830d,_0x1e118e=new Set();_0x4cd7c6['forEach'](_0x1bf6d0=>{const _0x44e670=_0xc44c;switch(_0x1bf6d0['type']){case _0x44e670(0x20c):{const _0x55c9a4=_0x1bf6d0[_0x44e670(0x232)]['personId'];_0x1e118e['add'](_0x55c9a4);break;}}}),B(this[_0x74cfca(0x240)],_0x1e118e);}));}[_0x427a2e(0x1ec)](){const _0xa0f61b=_0x427a2e;this[_0xa0f61b(0x230)](this[_0xa0f61b(0x1f4)][_0xa0f61b(0x233)][_0xa0f61b(0x213)](async _0x4f9689=>{const _0xf7d7c4=_0xa0f61b;var _0x99602b,_0x13eee6,_0x164819,_0xb79a5d;const _0x51473a=(_0x99602b=this[_0xf7d7c4(0x1eb)][_0xf7d7c4(0x248)](_0x4f9689[_0xf7d7c4(0x228)])['find'](_0x384a39=>_0x384a39[_0xf7d7c4(0x20e)]===_0x4f9689[_0xf7d7c4(0x20e)]))==null?void 0x0:_0x99602b[_0xf7d7c4(0x1fb)];if(!_0x51473a)return;const {unitId:_0x431e43,subUnitId:_0x50f156}=_0x51473a;switch(_0x4f9689[_0xf7d7c4(0x238)]&&this['_userService'][_0xf7d7c4(0x1fa)](_0x4f9689[_0xf7d7c4(0x238)]),_0x4f9689['type']){case v[_0xf7d7c4(0x243)]:break;case v[_0xf7d7c4(0x249)]:{this[_0xf7d7c4(0x1eb)]['addComment'](_0x431e43,_0x50f156,{'unitId':_0x431e43,'subUnitId':_0x50f156,'ref':'','id':_0x4f9689[_0xf7d7c4(0x242)],'dT':y(+_0x4f9689['createTimestamp']),'threadId':_0x4f9689['threadId'],'personId':(_0x164819=(_0x13eee6=_0x4f9689[_0xf7d7c4(0x238)])==null?void 0x0:_0x13eee6[_0xf7d7c4(0x203)])!=null?_0x164819:_0x4f9689[_0xf7d7c4(0x226)],'text':JSON['parse'](_0x4f9689[_0xf7d7c4(0x218)]),'parentId':_0x51473a['id']});break;}case v['Delete']:{const _0x2252ed=this[_0xf7d7c4(0x1eb)][_0xf7d7c4(0x21d)](_0x431e43,_0x50f156,_0x4f9689[_0xf7d7c4(0x242)]);_0x2252ed&&_0x2252ed[_0xf7d7c4(0x1f1)]&&this[_0xf7d7c4(0x1eb)][_0xf7d7c4(0x21b)](_0x431e43,_0x50f156,_0x4f9689['replyId']);break;}case v['Edit']:{this['_threadCommentModel'][_0xf7d7c4(0x24c)](_0x431e43,_0x50f156,{'commentId':_0x4f9689[_0xf7d7c4(0x242)],'text':JSON['parse'](_0x4f9689[_0xf7d7c4(0x218)])});break;}case v[_0xf7d7c4(0x21a)]:{const _0x5040f4=(_0xb79a5d=this[_0xf7d7c4(0x1eb)][_0xf7d7c4(0x248)](_0x4f9689[_0xf7d7c4(0x228)])[_0xf7d7c4(0x229)](_0xc0f8d8=>_0xc0f8d8[_0xf7d7c4(0x20e)]===_0x4f9689[_0xf7d7c4(0x20e)]))==null?void 0x0:_0xb79a5d[_0xf7d7c4(0x1fb)];_0x5040f4&&this[_0xf7d7c4(0x1eb)]['resolveComment'](_0x431e43,_0x50f156,_0x5040f4['id'],_0x4f9689[_0xf7d7c4(0x1f3)]===I[_0xf7d7c4(0x231)]);break;}}}));}};_=V([p(0x0,_0xa91514(_0x5e2ac9)),p(0x1,_0xa91514(_0x35bfa3)),p(0x2,_0xa91514(_0x138878)),p(0x3,_0xa91514(_0x31a0cf))],_);function _0x4991(){const _0x42cb06=['Solve','deleteComment','Delete','getComment','values','OpenOrReOpen','syncUpdateMutationToColla','2574434jPPtbC','_config','_userService','delete','11416928zuQPQW','userId','onStarting','unitId','find','stringify','customRanges','thread-comment-data-source.config','length','3739856FhhcGS','90JLYmrv','disposeWithMe','Solved','payload','commentUpdate$','4531203CbWJuF','1126568WICpuI','type','/universer-api/user/list','user','1033446PWXrjN','error','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','requireSession','/list','/universer-api/comment/unit/','_initDataSource','_injector','addComment','replyId','Add','comment','format','forEach','map','getUnit','Reply','YYYY/MM/DD\x20HH:mm','filter','updateComment','getOwnPropertyDescriptor','listComments','_threadCommentModel','_init','setConfig','5983642kkdulS','20pksfvd','getCurrentUser','parentId','rangeType','solved','_commentService','pluginName','parse','_httpService','createTimestamp','defineProperty','addUser','root','_initUserSync','getMemberID','get','UNRECOGNIZED','Edit','/add','saveCommentToSnapshot','userID','body','UNIVER_UNKNOWN','COMMENT','/edit','onReady','_sessionService','/reply','resolveComment','add','comments','threadId','replies','3RxAyRS','dataSource','post','subscribe','/delete','_threadCommentDataSourceService','Unknown','reply','content','code'];_0x4991=function(){return _0x42cb06;};return _0x4991();}const z=_0x427a2e(0x22c),O={};var k=Object[_0x427a2e(0x24d)],Q=(_0x326aa0,_0x166321,_0x2bcc10,_0x2d7868)=>{const _0x34c10c=_0x427a2e;for(var _0x1deb63=_0x2d7868>0x1?void 0x0:_0x2d7868?k(_0x166321,_0x2bcc10):_0x166321,_0x3247f9=_0x326aa0[_0x34c10c(0x22d)]-0x1,_0x1dd555;_0x3247f9>=0x0;_0x3247f9--)(_0x1dd555=_0x326aa0[_0x3247f9])&&(_0x1deb63=_0x1dd555(_0x1deb63)||_0x1deb63);return _0x1deb63;},b=(_0x57a633,_0x5ee277)=>(_0x564e99,_0x1fa0f6)=>_0x5ee277(_0x564e99,_0x1fa0f6,_0x57a633);function X(_0xe1072c,_0x41f460){const _0x7df795=_0x427a2e,_0x3777ab=_0xe1072c[_0x7df795(0x20f)][0x0];return{..._0x41f460,'id':_0x3777ab[_0x7df795(0x242)],'resolved':_0xe1072c[_0x7df795(0x1f3)]===0x1,'dT':y(_0x3777ab[_0x7df795(0x1f8)]),'personId':_0x3777ab[_0x7df795(0x226)],'threadId':_0x3777ab[_0x7df795(0x20e)]};}function ee(_0x13bc10,_0x5aa49a,_0x1a320b){const _0x510d89=_0x427a2e;var _0xc25905,_0x4e5c4e;if(((_0x4e5c4e=(_0xc25905=_0x13bc10==null?void 0x0:_0x13bc10['replies'])==null?void 0x0:_0xc25905[_0x510d89(0x22d)])!=null?_0x4e5c4e:0x0)>0x0){const _0x1b8324=(_0x5dc6fb,_0x593d96)=>({'id':_0x5dc6fb['replyId'],'threadId':_0x5dc6fb[_0x510d89(0x20e)],'dT':y(_0x5dc6fb[_0x510d89(0x1f8)]),'personId':_0x5dc6fb['userId'],'resolved':_0x13bc10['solved']===I[_0x510d89(0x231)],'unitId':_0x5aa49a,'subUnitId':_0x1a320b,'text':JSON[_0x510d89(0x1f6)](_0x5dc6fb[_0x510d89(0x218)]),'parentId':_0x593d96}),_0x936e72=_0x1b8324(_0x13bc10[_0x510d89(0x20f)][0x0]);return{..._0x936e72,'children':_0x13bc10[_0x510d89(0x20f)]['slice'](0x1)[_0x510d89(0x247)](_0x151331=>_0x1b8324(_0x151331,_0x936e72['id']))};}return null;}let S=class{constructor(_0x5665b4,_0x182fbb,_0x19a611){const _0x5dd2d0=_0x427a2e;this[_0x5dd2d0(0x1f7)]=_0x5665b4,this[_0x5dd2d0(0x223)]=_0x182fbb,this['_sessionService']=_0x19a611;}async[_0x427a2e(0x241)](_0x41fbd8){const _0x5d004e=_0x427a2e;var _0x47dd8b,_0x3f6441;const {parentId:_0x24f767,unitId:_0x5e07ef,text:_0x1fc884,threadId:_0x5503d6}=_0x41fbd8,_0x5e0a58=(_0x3f6441=(_0x47dd8b=_0x1fc884[_0x5d004e(0x22b)])==null?void 0x0:_0x47dd8b[_0x5d004e(0x24b)](_0x91b62d=>_0x91b62d[_0x5d004e(0x1f2)]===_0x34f293['COMMENT'])['map'](_0x4162a2=>_0x4162a2['rangeId']))!=null?_0x3f6441:[],_0x3386a2=JSON[_0x5d004e(0x22a)](_0x1fc884),_0x2e4836=(await this['_sessionService'][_0x5d004e(0x23c)](_0x5e07ef))[_0x5d004e(0x1fd)]();if(_0x24f767){const _0x52454b={'memberId':_0x2e4836,'unitId':_0x5e07ef,'content':_0x3386a2,'mention':_0x5e0a58,'threadId':_0x5503d6},_0xe944ce=(await this['_httpService'][_0x5d004e(0x212)](_0x5d004e(0x23e)+_0x5e07ef+_0x5d004e(0x20a),{'body':_0x52454b}))['body'][_0x5d004e(0x217)];return{..._0x41fbd8,'id':_0xe944ce[_0x5d004e(0x242)],'dT':_0x7583d3(+_0xe944ce[_0x5d004e(0x1f8)])['format'](_0x5d004e(0x24a)),'personId':_0xe944ce[_0x5d004e(0x226)]};}else{const _0x2218aa={'memberId':_0x2e4836,'unitId':_0x5e07ef,'content':_0x3386a2,'mention':_0x5e0a58},_0x155724=await this[_0x5d004e(0x1f7)][_0x5d004e(0x212)](_0x5d004e(0x23e)+_0x5e07ef+_0x5d004e(0x201),{'body':_0x2218aa});return X(_0x155724['body'][_0x5d004e(0x244)],_0x41fbd8);}}async[_0x427a2e(0x24c)](_0x1106ee){const _0x5786b0=_0x427a2e;var _0x3ca738,_0x419aa8;const {text:_0x30bbbe,unitId:_0x209525}=_0x1106ee,_0x43ce1b=(_0x419aa8=(_0x3ca738=_0x30bbbe['customRanges'])==null?void 0x0:_0x3ca738[_0x5786b0(0x24b)](_0x316819=>_0x316819[_0x5786b0(0x1f2)]===_0x34f293[_0x5786b0(0x206)])[_0x5786b0(0x247)](_0xaf055a=>_0xaf055a['rangeId']))!=null?_0x419aa8:[],_0x27dc97=JSON[_0x5786b0(0x22a)](_0x30bbbe),_0x5d6af7=_0x1106ee[_0x5786b0(0x20e)],_0x7a802a=_0x1106ee['id'],_0x1f9f51={'memberId':(await this[_0x5786b0(0x209)][_0x5786b0(0x23c)](_0x209525))['getMemberID'](),'unitId':_0x209525,'threadId':_0x5d6af7,'mention':_0x43ce1b,'content':_0x27dc97,'replyId':_0x7a802a},_0x5833fd=await this[_0x5786b0(0x1f7)][_0x5786b0(0x212)](_0x5786b0(0x23e)+_0x209525+_0x5786b0(0x207),{'body':_0x1f9f51});return!_0x5833fd[_0x5786b0(0x204)][_0x5786b0(0x23a)]||_0x5833fd[_0x5786b0(0x204)]['error'][_0x5786b0(0x219)]===0x1;}async[_0x427a2e(0x20b)](_0x3ed283){const _0x2d3af9=_0x427a2e,{unitId:_0x3cc81c}=_0x3ed283,_0x4be88b=_0x3ed283[_0x2d3af9(0x20e)],_0x36061f={'memberId':this[_0x2d3af9(0x223)][_0x2d3af9(0x1f0)]()[_0x2d3af9(0x203)],'unitId':_0x3cc81c,'threadId':_0x4be88b,'solved':_0x3ed283['resolved']?I[_0x2d3af9(0x231)]:I[_0x2d3af9(0x21f)]},_0x25c7f7=await this[_0x2d3af9(0x1f7)]['post'](_0x2d3af9(0x23e)+_0x3cc81c+'/solved',{'body':_0x36061f});return!_0x25c7f7[_0x2d3af9(0x204)][_0x2d3af9(0x23a)]||_0x25c7f7['body'][_0x2d3af9(0x23a)]['code']===0x1;}async[_0x427a2e(0x21b)](_0x1059db,_0xcea8a5,_0x4a5566,_0x55adc1){const _0xce10ff=_0x427a2e,_0x2ca44f={'memberId':(await this['_sessionService'][_0xce10ff(0x23c)](_0x1059db))[_0xce10ff(0x1fd)](),'threadId':_0x4a5566,'replyId':_0x55adc1,'unitId':_0x1059db},_0xdb2a1e=await this[_0xce10ff(0x1f7)][_0xce10ff(0x212)](_0xce10ff(0x23e)+_0x1059db+_0xce10ff(0x214),{'body':_0x2ca44f});return!_0xdb2a1e[_0xce10ff(0x204)][_0xce10ff(0x23a)]||_0xdb2a1e[_0xce10ff(0x204)][_0xce10ff(0x23a)][_0xce10ff(0x219)]===0x1;}async[_0x427a2e(0x24e)](_0x2fa4eb,_0x2d752f,_0x1da61d){const _0x16433b=_0x427a2e,_0x294ba6={'unitId':_0x2fa4eb,'threadId':_0x1da61d},_0x3c67b4=await this['_httpService']['post'](_0x16433b(0x23e)+_0x2fa4eb+_0x16433b(0x23d),{'body':_0x294ba6}),_0x4c1201=_0x1da61d[_0x16433b(0x247)](_0x54cc62=>ee(_0x3c67b4[_0x16433b(0x204)][_0x16433b(0x20d)][_0x54cc62],_0x2fa4eb,_0x2d752f))[_0x16433b(0x24b)](Boolean);return Object[_0x16433b(0x21e)](_0x3c67b4[_0x16433b(0x204)]['users'])[_0x16433b(0x246)](_0x39d062=>{const _0x3e2cf4=_0x16433b;this[_0x3e2cf4(0x223)]['addUser'](_0x39d062);}),_0x4c1201;}[_0x427a2e(0x202)](_0x343ffc){const _0x4e26f8=_0x427a2e;return{'id':_0x343ffc['id'],'threadId':_0x343ffc[_0x4e26f8(0x20e)],'ref':_0x343ffc['ref']};}};S=Q([b(0x0,_0xa91514(_0x2afb15)),b(0x1,_0xa91514(_0x138878)),b(0x2,_0xa91514(_0x4747fc))],S);var re=Object[_0x427a2e(0x24d)],te=(_0x2e6ac3,_0x100c47,_0x16a1be,_0x3eef32)=>{const _0x28ef98=_0x427a2e;for(var _0x2271f9=_0x3eef32>0x1?void 0x0:_0x3eef32?re(_0x100c47,_0x16a1be):_0x100c47,_0x2a8da0=_0x2e6ac3[_0x28ef98(0x22d)]-0x1,_0x327a13;_0x2a8da0>=0x0;_0x2a8da0--)(_0x327a13=_0x2e6ac3[_0x2a8da0])&&(_0x2271f9=_0x327a13(_0x2271f9)||_0x2271f9);return _0x2271f9;},M=(_0x22dab5,_0x596094)=>(_0x48d198,_0x479164)=>_0x596094(_0x48d198,_0x479164,_0x22dab5);let f=class extends _0x9fb58a{constructor(_0x4169e7,_0x40d77e){const _0x104a97=_0x427a2e;super(),this[_0x104a97(0x215)]=_0x4169e7,this['_threadCommentDataSource']=_0x40d77e,this[_0x104a97(0x23f)]();}[_0x427a2e(0x23f)](){const _0x330379=_0x427a2e;this[_0x330379(0x215)][_0x330379(0x211)]=this['_threadCommentDataSource'],this[_0x330379(0x215)][_0x330379(0x220)]=!0x1;}};f=te([M(0x0,_0x66b051),M(0x1,_0xa91514(S))],f);var se=Object[_0x427a2e(0x1f9)],oe=Object[_0x427a2e(0x24d)],ne=(_0x51658d,_0x4d14aa,_0x37ff1e)=>_0x4d14aa in _0x51658d?se(_0x51658d,_0x4d14aa,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x37ff1e}):_0x51658d[_0x4d14aa]=_0x37ff1e,ie=(_0x426eaf,_0x167da9,_0x43fe46,_0x5132e2)=>{const _0x3ce4df=_0x427a2e;for(var _0x52c174=_0x5132e2>0x1?void 0x0:_0x5132e2?oe(_0x167da9,_0x43fe46):_0x167da9,_0x5cdf6b=_0x426eaf[_0x3ce4df(0x22d)]-0x1,_0x338d47;_0x5cdf6b>=0x0;_0x5cdf6b--)(_0x338d47=_0x426eaf[_0x5cdf6b])&&(_0x52c174=_0x338d47(_0x52c174)||_0x52c174);return _0x52c174;},N=(_0x4140fe,_0x4c5c35)=>(_0x28658f,_0x481473)=>_0x4c5c35(_0x28658f,_0x481473,_0x4140fe),$=(_0x4a6810,_0xb11839,_0x13fd7e)=>ne(_0x4a6810,typeof _0xb11839!='symbol'?_0xb11839+'':_0xb11839,_0x13fd7e);let g=class extends _0x17f2a3{constructor(_0x194ecd=O,_0x1601d4,_0x7615ef){const _0x51e56e=_0x427a2e;super(),this[_0x51e56e(0x222)]=_0x194ecd,this[_0x51e56e(0x240)]=_0x1601d4,this['_configService']=_0x7615ef;const {..._0x462ad1}=_0x5641fc({},O,this[_0x51e56e(0x222)]);this['_configService'][_0x51e56e(0x1ed)](z,_0x462ad1);}[_0x427a2e(0x227)](){const _0x97533d=_0x427a2e;[[S],[f],[_]][_0x97533d(0x246)](_0x58b5e1=>{const _0x315ee5=_0x97533d;this[_0x315ee5(0x240)][_0x315ee5(0x20c)](_0x58b5e1);});}[_0x427a2e(0x208)](){const _0x141d9a=_0x427a2e;this[_0x141d9a(0x240)][_0x141d9a(0x1fe)](f),this[_0x141d9a(0x240)]['get'](_);}};$(g,_0x427a2e(0x1f5),W),$(g,_0x427a2e(0x236),_0x3bd6b7[_0x427a2e(0x205)]),g=ie([_0x3efd0c(_0x5cc0d1,_0x5628d7,_0x46b496),N(0x1,_0xa91514(_0x31a0cf)),N(0x2,_0x5702e0)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x38fb1a=_0x3a21;(function(_0x2cf1df,_0x4d081f){const _0x20b1b6=_0x3a21,_0x136645=_0x2cf1df();while(!![]){try{const _0x1c00ce=-parseInt(_0x20b1b6(0x172))/0x1+-parseInt(_0x20b1b6(0x14d))/0x2*(parseInt(_0x20b1b6(0x187))/0x3)+-parseInt(_0x20b1b6(0x1a3))/0x4+parseInt(_0x20b1b6(0x177))/0x5+parseInt(_0x20b1b6(0x16d))/0x6*(-parseInt(_0x20b1b6(0x14c))/0x7)+-parseInt(_0x20b1b6(0x19c))/0x8+-parseInt(_0x20b1b6(0x193))/0x9*(-parseInt(_0x20b1b6(0x14a))/0xa);if(_0x1c00ce===_0x4d081f)break;else _0x136645['push'](_0x136645['shift']());}catch(_0x1296b3){_0x136645['push'](_0x136645['shift']());}}}(_0x1614,0x6b83d));import{CommentService as _0x13a843,CollaborationSessionService as _0x11edac,UniverCollaborationClientPlugin as _0x468216}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1a398b}from'@univerjs-pro/license';import{dayjs as _0x18dc99,UserManagerService as _0x5e1c86,Inject as _0x4db969,Injector as _0x899ce6,Disposable as _0x1b061a,CustomRangeType as _0x274ae2,UniverInstanceType as _0x1c9e82,DependentOn as _0x2b1585,IConfigService as _0x2f3a09,Plugin as _0x255d8a,merge as _0x43ff99}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x829ca7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1cdbd8,IThreadCommentDataSourceService as _0x26b277}from'@univerjs/thread-comment';import{bufferTime as _0x1ef2de}from'rxjs';import{HTTPService as _0x1bacc9}from'@univerjs/network';const W=_0x38fb1a(0x192);function _0x1614(){const _0x47e130=['length','ref','_threadCommentDataSource','resolveComment','format','/universer-api/comment/unit/','requireSession','personId','map','reply','388956YLyiUF','saveCommentToSnapshot','Reply','parse','userID','post','root','Add','error','_threadCommentModel','_commentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','7425gmpgXZ','_initUserSync','size','replyId','solved','_config','get','/universer-api/user/list','addComment','4269472MHoOHI','getCurrentUser','delete','add','/list','userId','disposeWithMe','2767352iwQgum','thread-comment-data-source.config','symbol','Solved','slice','getComment','parentId','UNRECOGNIZED','_userService','subscribe','getOwnPropertyDescriptor','_initDataSource','_configService','defineProperty','addUser','29930YjcRdw','replies','37331wcPXSX','2HEmGta','comment','/add','unitId','createTimestamp','Solve','UNIVER_UNKNOWN','COMMENT','/edit','_threadCommentDataSourceService','code','user','customRanges','threadId','deleteComment','payload','getUser','resolved','getUnit','filter','YYYY/MM/DD\x20HH:mm','/delete','type','_sessionService','Edit','/solved','OpenOrReOpen','/reply','pluginName','users','rangeType','_injector','234aLZVuO','commentUpdate$','pipe','Delete','_httpService','583960ApnHTx','onReady','Unknown','onStarting','forEach','591385vLvltn','getMemberID','body','syncUpdateMutationToColla','updateComment','_init'];_0x1614=function(){return _0x47e130;};return _0x1614();}var I=(_0x552a99=>(_0x552a99[_0x552a99[_0x38fb1a(0x167)]=0x0]='OpenOrReOpen',_0x552a99[_0x552a99['Solved']=0x1]=_0x38fb1a(0x1a6),_0x552a99[_0x552a99[_0x38fb1a(0x1aa)]=-0x1]=_0x38fb1a(0x1aa),_0x552a99))(I||{}),v=(_0x1b2830=>(_0x1b2830[_0x1b2830[_0x38fb1a(0x174)]=0x0]='Unknown',_0x1b2830[_0x1b2830[_0x38fb1a(0x18e)]=0x1]=_0x38fb1a(0x18e),_0x1b2830[_0x1b2830[_0x38fb1a(0x189)]=0x2]='Reply',_0x1b2830[_0x1b2830[_0x38fb1a(0x165)]=0x3]='Edit',_0x1b2830[_0x1b2830[_0x38fb1a(0x170)]=0x4]=_0x38fb1a(0x170),_0x1b2830[_0x1b2830[_0x38fb1a(0x152)]=0x5]=_0x38fb1a(0x152),_0x1b2830[_0x1b2830['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x1b2830))(v||{});const y=_0x1908bf=>_0x18dc99(new Date(+_0x1908bf))[_0x38fb1a(0x181)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4c9f4e,_0x11283b)=>{const _0x37f6ef=_0x38fb1a,_0x529564=_0x4c9f4e[_0x37f6ef(0x199)](_0x5e1c86),_0x4cd0e2=_0x4c9f4e[_0x37f6ef(0x199)](_0x1bacc9);_0x11283b[_0x37f6ef(0x176)](_0x374081=>{const _0x475dc2=_0x37f6ef;_0x529564[_0x475dc2(0x15d)](_0x374081)&&_0x11283b[_0x475dc2(0x19e)](_0x374081);}),_0x11283b[_0x37f6ef(0x195)]&&(await _0x4cd0e2[_0x37f6ef(0x199)](_0x37f6ef(0x19a),{'params':{'userIDs':[..._0x11283b]}}))[_0x37f6ef(0x179)][_0x37f6ef(0x16a)][_0x37f6ef(0x176)](_0x509ccb=>{const _0x39f117=_0x37f6ef;_0x509ccb&&_0x529564[_0x39f117(0x149)](_0x509ccb);});};var K=Object[_0x38fb1a(0x145)],V=(_0x32a841,_0x567eb7,_0x439e18,_0x38a6ef)=>{for(var _0x339250=_0x38a6ef>0x1?void 0x0:_0x38a6ef?K(_0x567eb7,_0x439e18):_0x567eb7,_0x31ce1d=_0x32a841['length']-0x1,_0x543b1b;_0x31ce1d>=0x0;_0x31ce1d--)(_0x543b1b=_0x32a841[_0x31ce1d])&&(_0x339250=_0x543b1b(_0x339250)||_0x339250);return _0x339250;},p=(_0x6d784e,_0x243b2b)=>(_0x16773e,_0x26f6b7)=>_0x243b2b(_0x16773e,_0x26f6b7,_0x6d784e);let _=class extends _0x1b061a{constructor(_0xf0b40b,_0x3e57b0,_0x133b99,_0x39df8e){const _0x5efebe=_0x38fb1a;super(),this[_0x5efebe(0x191)]=_0xf0b40b,this['_threadCommentModel']=_0x3e57b0,this[_0x5efebe(0x1ab)]=_0x133b99,this[_0x5efebe(0x16c)]=_0x39df8e,this[_0x5efebe(0x17c)](),this['_initUserSync']();}[_0x38fb1a(0x194)](){const _0x4ab2cd=_0x38fb1a;this[_0x4ab2cd(0x1a2)](this['_threadCommentModel'][_0x4ab2cd(0x16e)][_0x4ab2cd(0x16f)](_0x1ef2de(0x10))[_0x4ab2cd(0x1ac)](_0x8a44d3=>{const _0x2ec5a0=new Set();_0x8a44d3['forEach'](_0x445f58=>{const _0x53daa6=_0x3a21;switch(_0x445f58[_0x53daa6(0x163)]){case _0x53daa6(0x19f):{const _0x2cd792=_0x445f58[_0x53daa6(0x15c)][_0x53daa6(0x184)];_0x2ec5a0[_0x53daa6(0x19f)](_0x2cd792);break;}}}),B(this['_injector'],_0x2ec5a0);}));}[_0x38fb1a(0x17c)](){const _0x5d646c=_0x38fb1a;this['disposeWithMe'](this[_0x5d646c(0x191)]['commentUpdate$']['subscribe'](async _0x698d12=>{const _0x16aab6=_0x5d646c;var _0x456d8e,_0x418fb0,_0x45095b,_0x5c1d25;const _0x16ddf3=(_0x456d8e=this[_0x16aab6(0x190)][_0x16aab6(0x15f)](_0x698d12[_0x16aab6(0x150)])['find'](_0xb0f637=>_0xb0f637[_0x16aab6(0x15a)]===_0x698d12[_0x16aab6(0x15a)]))==null?void 0x0:_0x456d8e['root'];if(!_0x16ddf3)return;const {unitId:_0x253c4e,subUnitId:_0x23e03b}=_0x16ddf3;switch(_0x698d12[_0x16aab6(0x158)]&&this[_0x16aab6(0x1ab)][_0x16aab6(0x149)](_0x698d12['user']),_0x698d12[_0x16aab6(0x163)]){case v[_0x16aab6(0x18e)]:break;case v[_0x16aab6(0x189)]:{this[_0x16aab6(0x190)][_0x16aab6(0x19b)](_0x253c4e,_0x23e03b,{'unitId':_0x253c4e,'subUnitId':_0x23e03b,'ref':'','id':_0x698d12['replyId'],'dT':y(+_0x698d12[_0x16aab6(0x151)]),'threadId':_0x698d12[_0x16aab6(0x15a)],'personId':(_0x45095b=(_0x418fb0=_0x698d12[_0x16aab6(0x158)])==null?void 0x0:_0x418fb0[_0x16aab6(0x18b)])!=null?_0x45095b:_0x698d12[_0x16aab6(0x1a1)],'text':JSON['parse'](_0x698d12['content']),'parentId':_0x16ddf3['id']});break;}case v[_0x16aab6(0x170)]:{const _0x53721e=this[_0x16aab6(0x190)][_0x16aab6(0x1a8)](_0x253c4e,_0x23e03b,_0x698d12[_0x16aab6(0x196)]);_0x53721e&&_0x53721e[_0x16aab6(0x1a9)]&&this[_0x16aab6(0x190)][_0x16aab6(0x15b)](_0x253c4e,_0x23e03b,_0x698d12[_0x16aab6(0x196)]);break;}case v['Edit']:{this[_0x16aab6(0x190)][_0x16aab6(0x17b)](_0x253c4e,_0x23e03b,{'commentId':_0x698d12['replyId'],'text':JSON[_0x16aab6(0x18a)](_0x698d12['content'])});break;}case v[_0x16aab6(0x152)]:{const _0x6bac75=(_0x5c1d25=this['_threadCommentModel'][_0x16aab6(0x15f)](_0x698d12['unitId'])['find'](_0x333087=>_0x333087[_0x16aab6(0x15a)]===_0x698d12[_0x16aab6(0x15a)]))==null?void 0x0:_0x5c1d25[_0x16aab6(0x18d)];_0x6bac75&&this[_0x16aab6(0x190)][_0x16aab6(0x180)](_0x253c4e,_0x23e03b,_0x6bac75['id'],_0x698d12['solved']===I[_0x16aab6(0x1a6)]);break;}}}));}};_=V([p(0x0,_0x4db969(_0x13a843)),p(0x1,_0x4db969(_0x1cdbd8)),p(0x2,_0x4db969(_0x5e1c86)),p(0x3,_0x4db969(_0x899ce6))],_);const z=_0x38fb1a(0x1a4),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1d9239,_0x53e06f,_0x3cedd4,_0x493e84)=>{for(var _0x13ab65=_0x493e84>0x1?void 0x0:_0x493e84?k(_0x53e06f,_0x3cedd4):_0x53e06f,_0x502c89=_0x1d9239['length']-0x1,_0x11f9bc;_0x502c89>=0x0;_0x502c89--)(_0x11f9bc=_0x1d9239[_0x502c89])&&(_0x13ab65=_0x11f9bc(_0x13ab65)||_0x13ab65);return _0x13ab65;},b=(_0x4ffacb,_0xa66fc1)=>(_0x4976fb,_0x39f977)=>_0xa66fc1(_0x4976fb,_0x39f977,_0x4ffacb);function X(_0x29c9c5,_0x39f4d8){const _0x55fd67=_0x38fb1a,_0x35bf36=_0x29c9c5[_0x55fd67(0x14b)][0x0];return{..._0x39f4d8,'id':_0x35bf36['replyId'],'resolved':_0x29c9c5[_0x55fd67(0x197)]===0x1,'dT':y(_0x35bf36['createTimestamp']),'personId':_0x35bf36[_0x55fd67(0x1a1)],'threadId':_0x35bf36[_0x55fd67(0x15a)]};}function ee(_0x14b2a7,_0x1b3c23,_0x565e6){const _0x39e9ac=_0x38fb1a;var _0x4eb305,_0xe22baf;if(((_0xe22baf=(_0x4eb305=_0x14b2a7==null?void 0x0:_0x14b2a7[_0x39e9ac(0x14b)])==null?void 0x0:_0x4eb305[_0x39e9ac(0x17d)])!=null?_0xe22baf:0x0)>0x0){const _0x3cbf1e=(_0x7e586f,_0x45fe3b)=>({'id':_0x7e586f[_0x39e9ac(0x196)],'threadId':_0x7e586f[_0x39e9ac(0x15a)],'dT':y(_0x7e586f[_0x39e9ac(0x151)]),'personId':_0x7e586f[_0x39e9ac(0x1a1)],'resolved':_0x14b2a7[_0x39e9ac(0x197)]===I[_0x39e9ac(0x1a6)],'unitId':_0x1b3c23,'subUnitId':_0x565e6,'text':JSON[_0x39e9ac(0x18a)](_0x7e586f['content']),'parentId':_0x45fe3b}),_0x4ba3ce=_0x3cbf1e(_0x14b2a7[_0x39e9ac(0x14b)][0x0]);return{..._0x4ba3ce,'children':_0x14b2a7[_0x39e9ac(0x14b)][_0x39e9ac(0x1a7)](0x1)[_0x39e9ac(0x185)](_0x575b10=>_0x3cbf1e(_0x575b10,_0x4ba3ce['id']))};}return null;}let S=class{constructor(_0x39bb57,_0x5e54b9,_0x431c39){const _0x2a50bb=_0x38fb1a;this['_httpService']=_0x39bb57,this[_0x2a50bb(0x1ab)]=_0x5e54b9,this[_0x2a50bb(0x164)]=_0x431c39;}async['addComment'](_0x559ef3){const _0x224580=_0x38fb1a;var _0x248c85,_0x3b89c1;const {parentId:_0x28ba24,unitId:_0x3c423c,text:_0x17199f,threadId:_0x5174ca}=_0x559ef3,_0x4b2b03=(_0x3b89c1=(_0x248c85=_0x17199f[_0x224580(0x159)])==null?void 0x0:_0x248c85[_0x224580(0x160)](_0x347df3=>_0x347df3[_0x224580(0x16b)]===_0x274ae2[_0x224580(0x154)])[_0x224580(0x185)](_0x2a0667=>_0x2a0667['rangeId']))!=null?_0x3b89c1:[],_0x54008a=JSON['stringify'](_0x17199f),_0x43aaf2=(await this['_sessionService']['requireSession'](_0x3c423c))[_0x224580(0x178)]();if(_0x28ba24){const _0x48b4bf={'memberId':_0x43aaf2,'unitId':_0x3c423c,'content':_0x54008a,'mention':_0x4b2b03,'threadId':_0x5174ca},_0x1e3877=(await this[_0x224580(0x171)][_0x224580(0x18c)](_0x224580(0x182)+_0x3c423c+_0x224580(0x168),{'body':_0x48b4bf}))[_0x224580(0x179)][_0x224580(0x186)];return{..._0x559ef3,'id':_0x1e3877['replyId'],'dT':_0x18dc99(+_0x1e3877['createTimestamp'])[_0x224580(0x181)](_0x224580(0x161)),'personId':_0x1e3877[_0x224580(0x1a1)]};}else{const _0x3650ab={'memberId':_0x43aaf2,'unitId':_0x3c423c,'content':_0x54008a,'mention':_0x4b2b03},_0x26b41b=await this[_0x224580(0x171)][_0x224580(0x18c)]('/universer-api/comment/unit/'+_0x3c423c+_0x224580(0x14f),{'body':_0x3650ab});return X(_0x26b41b['body'][_0x224580(0x14e)],_0x559ef3);}}async[_0x38fb1a(0x17b)](_0x439e8d){const _0x3946e2=_0x38fb1a;var _0x58f34e,_0x475c77;const {text:_0x20be11,unitId:_0xda99a1}=_0x439e8d,_0x4c2b5d=(_0x475c77=(_0x58f34e=_0x20be11[_0x3946e2(0x159)])==null?void 0x0:_0x58f34e['filter'](_0x1a5dff=>_0x1a5dff[_0x3946e2(0x16b)]===_0x274ae2[_0x3946e2(0x154)])[_0x3946e2(0x185)](_0x337f88=>_0x337f88['rangeId']))!=null?_0x475c77:[],_0x1b079a=JSON['stringify'](_0x20be11),_0x52626a=_0x439e8d[_0x3946e2(0x15a)],_0x53a621=_0x439e8d['id'],_0x31b228={'memberId':(await this[_0x3946e2(0x164)][_0x3946e2(0x183)](_0xda99a1))[_0x3946e2(0x178)](),'unitId':_0xda99a1,'threadId':_0x52626a,'mention':_0x4c2b5d,'content':_0x1b079a,'replyId':_0x53a621},_0x246a00=await this[_0x3946e2(0x171)][_0x3946e2(0x18c)](_0x3946e2(0x182)+_0xda99a1+_0x3946e2(0x155),{'body':_0x31b228});return!_0x246a00[_0x3946e2(0x179)]['error']||_0x246a00['body'][_0x3946e2(0x18f)][_0x3946e2(0x157)]===0x1;}async[_0x38fb1a(0x180)](_0x436090){const _0x4d56fc=_0x38fb1a,{unitId:_0x26abc7}=_0x436090,_0x5a7e44=_0x436090[_0x4d56fc(0x15a)],_0x2267bb={'memberId':this[_0x4d56fc(0x1ab)][_0x4d56fc(0x19d)]()[_0x4d56fc(0x18b)],'unitId':_0x26abc7,'threadId':_0x5a7e44,'solved':_0x436090[_0x4d56fc(0x15e)]?I[_0x4d56fc(0x1a6)]:I[_0x4d56fc(0x167)]},_0x257984=await this[_0x4d56fc(0x171)][_0x4d56fc(0x18c)](_0x4d56fc(0x182)+_0x26abc7+_0x4d56fc(0x166),{'body':_0x2267bb});return!_0x257984[_0x4d56fc(0x179)][_0x4d56fc(0x18f)]||_0x257984[_0x4d56fc(0x179)][_0x4d56fc(0x18f)][_0x4d56fc(0x157)]===0x1;}async[_0x38fb1a(0x15b)](_0x5c7992,_0x4da300,_0x36c9ff,_0x2bf270){const _0x50f4c9=_0x38fb1a,_0x4c63e6={'memberId':(await this[_0x50f4c9(0x164)]['requireSession'](_0x5c7992))['getMemberID'](),'threadId':_0x36c9ff,'replyId':_0x2bf270,'unitId':_0x5c7992},_0x595d97=await this[_0x50f4c9(0x171)]['post'](_0x50f4c9(0x182)+_0x5c7992+_0x50f4c9(0x162),{'body':_0x4c63e6});return!_0x595d97[_0x50f4c9(0x179)][_0x50f4c9(0x18f)]||_0x595d97[_0x50f4c9(0x179)][_0x50f4c9(0x18f)][_0x50f4c9(0x157)]===0x1;}async['listComments'](_0x35a972,_0x4b519a,_0x2ba610){const _0x2b6c05=_0x38fb1a,_0x2c8769={'unitId':_0x35a972,'threadId':_0x2ba610},_0x26fad6=await this[_0x2b6c05(0x171)]['post'](_0x2b6c05(0x182)+_0x35a972+_0x2b6c05(0x1a0),{'body':_0x2c8769}),_0x3fdc58=_0x2ba610[_0x2b6c05(0x185)](_0x11c814=>ee(_0x26fad6[_0x2b6c05(0x179)]['comments'][_0x11c814],_0x35a972,_0x4b519a))[_0x2b6c05(0x160)](Boolean);return Object['values'](_0x26fad6[_0x2b6c05(0x179)][_0x2b6c05(0x16a)])['forEach'](_0x59c3f4=>{const _0x49d500=_0x2b6c05;this[_0x49d500(0x1ab)][_0x49d500(0x149)](_0x59c3f4);}),_0x3fdc58;}[_0x38fb1a(0x188)](_0x46a07d){const _0x5e7bd3=_0x38fb1a;return{'id':_0x46a07d['id'],'threadId':_0x46a07d[_0x5e7bd3(0x15a)],'ref':_0x46a07d[_0x5e7bd3(0x17e)]};}};S=Q([b(0x0,_0x4db969(_0x1bacc9)),b(0x1,_0x4db969(_0x5e1c86)),b(0x2,_0x4db969(_0x11edac))],S);var re=Object[_0x38fb1a(0x145)],te=(_0x4fa28b,_0x579834,_0x11437f,_0x40e919)=>{const _0x440783=_0x38fb1a;for(var _0x4ba439=_0x40e919>0x1?void 0x0:_0x40e919?re(_0x579834,_0x11437f):_0x579834,_0x1358c5=_0x4fa28b[_0x440783(0x17d)]-0x1,_0x2141af;_0x1358c5>=0x0;_0x1358c5--)(_0x2141af=_0x4fa28b[_0x1358c5])&&(_0x4ba439=_0x2141af(_0x4ba439)||_0x4ba439);return _0x4ba439;},M=(_0x536d60,_0x24bb60)=>(_0x1cfb57,_0x592f20)=>_0x24bb60(_0x1cfb57,_0x592f20,_0x536d60);let f=class extends _0x1b061a{constructor(_0x2289ec,_0x185e4e){const _0xc25fbe=_0x38fb1a;super(),this[_0xc25fbe(0x156)]=_0x2289ec,this['_threadCommentDataSource']=_0x185e4e,this['_initDataSource']();}[_0x38fb1a(0x146)](){const _0x15b524=_0x38fb1a;this[_0x15b524(0x156)]['dataSource']=this[_0x15b524(0x17f)],this[_0x15b524(0x156)][_0x15b524(0x17a)]=!0x1;}};function _0x3a21(_0x32e8ab,_0x17c395){const _0x1614c3=_0x1614();return _0x3a21=function(_0x3a2174,_0x458669){_0x3a2174=_0x3a2174-0x145;let _0x166d32=_0x1614c3[_0x3a2174];return _0x166d32;},_0x3a21(_0x32e8ab,_0x17c395);}f=te([M(0x0,_0x26b277),M(0x1,_0x4db969(S))],f);var se=Object[_0x38fb1a(0x148)],oe=Object[_0x38fb1a(0x145)],ne=(_0xa66428,_0x40c905,_0xbf668b)=>_0x40c905 in _0xa66428?se(_0xa66428,_0x40c905,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xbf668b}):_0xa66428[_0x40c905]=_0xbf668b,ie=(_0x69f286,_0x1da40a,_0x5be4e4,_0x31cca6)=>{const _0x4988ae=_0x38fb1a;for(var _0x7c5c36=_0x31cca6>0x1?void 0x0:_0x31cca6?oe(_0x1da40a,_0x5be4e4):_0x1da40a,_0x2951f3=_0x69f286[_0x4988ae(0x17d)]-0x1,_0x3c4667;_0x2951f3>=0x0;_0x2951f3--)(_0x3c4667=_0x69f286[_0x2951f3])&&(_0x7c5c36=_0x3c4667(_0x7c5c36)||_0x7c5c36);return _0x7c5c36;},N=(_0x229923,_0xd682a)=>(_0x2e584d,_0x175e33)=>_0xd682a(_0x2e584d,_0x175e33,_0x229923),$=(_0x545f62,_0x3d8b26,_0x85a80a)=>ne(_0x545f62,typeof _0x3d8b26!=_0x38fb1a(0x1a5)?_0x3d8b26+'':_0x3d8b26,_0x85a80a);let g=class extends _0x255d8a{constructor(_0x735f4=O,_0x29601d,_0x2a3e7b){const _0x5c44f4=_0x38fb1a;super(),this['_config']=_0x735f4,this[_0x5c44f4(0x16c)]=_0x29601d,this[_0x5c44f4(0x147)]=_0x2a3e7b;const {..._0x1c2d4e}=_0x43ff99({},O,this[_0x5c44f4(0x198)]);this['_configService']['setConfig'](z,_0x1c2d4e);}[_0x38fb1a(0x175)](){[[S],[f],[_]]['forEach'](_0x32f8bf=>{const _0xbf509=_0x3a21;this[_0xbf509(0x16c)][_0xbf509(0x19f)](_0x32f8bf);});}[_0x38fb1a(0x173)](){const _0x25171b=_0x38fb1a;this[_0x25171b(0x16c)][_0x25171b(0x199)](f),this[_0x25171b(0x16c)][_0x25171b(0x199)](_);}};$(g,_0x38fb1a(0x169),W),$(g,_0x38fb1a(0x163),_0x1c9e82[_0x38fb1a(0x153)]),g=ie([_0x2b1585(_0x829ca7,_0x468216,_0x1a398b),N(0x1,_0x4db969(_0x899ce6)),N(0x2,_0x2f3a09)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x427a2e=_0xc44c;(function(_0x23b5e0,_0xa887ce){const _0x27737=_0xc44c,_0x4f2778=_0x23b5e0();while(!![]){try{const _0x487175=-parseInt(_0x27737(0x235))/0x1+parseInt(_0x27737(0x221))/0x2*(parseInt(_0x27737(0x210))/0x3)+-parseInt(_0x27737(0x22e))/0x4+-parseInt(_0x27737(0x1ef))/0x5*(parseInt(_0x27737(0x239))/0x6)+-parseInt(_0x27737(0x1ee))/0x7+-parseInt(_0x27737(0x225))/0x8+parseInt(_0x27737(0x234))/0x9*(parseInt(_0x27737(0x22f))/0xa);if(_0x487175===_0xa887ce)break;else _0x4f2778['push'](_0x4f2778['shift']());}catch(_0x3ddfb5){_0x4f2778['push'](_0x4f2778['shift']());}}}(_0x4991,0xbfe52));import{CommentService as _0x5e2ac9,CollaborationSessionService as _0x4747fc,UniverCollaborationClientPlugin as _0x5628d7}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x46b496}from'@univerjs-pro/license';import{dayjs as _0x7583d3,UserManagerService as _0x138878,Inject as _0xa91514,Injector as _0x31a0cf,Disposable as _0x9fb58a,CustomRangeType as _0x34f293,UniverInstanceType as _0x3bd6b7,DependentOn as _0x3efd0c,IConfigService as _0x5702e0,Plugin as _0x17f2a3,merge as _0x5641fc}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5cc0d1}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x35bfa3,IThreadCommentDataSourceService as _0x66b051}from'@univerjs/thread-comment';import{bufferTime as _0x16b7ca}from'rxjs';import{HTTPService as _0x2afb15}from'@univerjs/network';const W=_0x427a2e(0x23b);function _0xc44c(_0x440fa0,_0x44909f){const _0x4991cf=_0x4991();return _0xc44c=function(_0xc44cc0,_0x308b12){_0xc44cc0=_0xc44cc0-0x1eb;let _0x49fd14=_0x4991cf[_0xc44cc0];return _0x49fd14;},_0xc44c(_0x440fa0,_0x44909f);}var I=(_0x5b10af=>(_0x5b10af[_0x5b10af[_0x427a2e(0x21f)]=0x0]=_0x427a2e(0x21f),_0x5b10af[_0x5b10af['Solved']=0x1]='Solved',_0x5b10af[_0x5b10af['UNRECOGNIZED']=-0x1]=_0x427a2e(0x1ff),_0x5b10af))(I||{}),v=(_0x39172e=>(_0x39172e[_0x39172e[_0x427a2e(0x216)]=0x0]='Unknown',_0x39172e[_0x39172e[_0x427a2e(0x243)]=0x1]=_0x427a2e(0x243),_0x39172e[_0x39172e[_0x427a2e(0x249)]=0x2]=_0x427a2e(0x249),_0x39172e[_0x39172e['Edit']=0x3]=_0x427a2e(0x200),_0x39172e[_0x39172e[_0x427a2e(0x21c)]=0x4]=_0x427a2e(0x21c),_0x39172e[_0x39172e[_0x427a2e(0x21a)]=0x5]=_0x427a2e(0x21a),_0x39172e[_0x39172e[_0x427a2e(0x1ff)]=-0x1]=_0x427a2e(0x1ff),_0x39172e))(v||{});const y=_0x2d3265=>_0x7583d3(new Date(+_0x2d3265))[_0x427a2e(0x245)]('YYYY/MM/DD\x20HH:mm'),B=async(_0xec4c6f,_0x993a9a)=>{const _0x11e26d=_0x427a2e,_0x1362f3=_0xec4c6f[_0x11e26d(0x1fe)](_0x138878),_0x33adfc=_0xec4c6f[_0x11e26d(0x1fe)](_0x2afb15);_0x993a9a[_0x11e26d(0x246)](_0x3fe7ae=>{const _0x45cd00=_0x11e26d;_0x1362f3['getUser'](_0x3fe7ae)&&_0x993a9a[_0x45cd00(0x224)](_0x3fe7ae);}),_0x993a9a['size']&&(await _0x33adfc[_0x11e26d(0x1fe)](_0x11e26d(0x237),{'params':{'userIDs':[..._0x993a9a]}}))['body']['users'][_0x11e26d(0x246)](_0x444276=>{const _0x5ec002=_0x11e26d;_0x444276&&_0x1362f3[_0x5ec002(0x1fa)](_0x444276);});};var K=Object[_0x427a2e(0x24d)],V=(_0x56de3a,_0x135cae,_0xedd4b7,_0x1e1677)=>{const _0x324c8b=_0x427a2e;for(var _0x131aec=_0x1e1677>0x1?void 0x0:_0x1e1677?K(_0x135cae,_0xedd4b7):_0x135cae,_0x44a569=_0x56de3a[_0x324c8b(0x22d)]-0x1,_0x47d23f;_0x44a569>=0x0;_0x44a569--)(_0x47d23f=_0x56de3a[_0x44a569])&&(_0x131aec=_0x47d23f(_0x131aec)||_0x131aec);return _0x131aec;},p=(_0x40a3b5,_0x24f808)=>(_0x5a2adb,_0x3fe247)=>_0x24f808(_0x5a2adb,_0x3fe247,_0x40a3b5);let _=class extends _0x9fb58a{constructor(_0x33b69b,_0x93e34,_0x3437fb,_0x40045a){const _0x249cfb=_0x427a2e;super(),this[_0x249cfb(0x1f4)]=_0x33b69b,this[_0x249cfb(0x1eb)]=_0x93e34,this['_userService']=_0x3437fb,this['_injector']=_0x40045a,this[_0x249cfb(0x1ec)](),this['_initUserSync']();}[_0x427a2e(0x1fc)](){const _0x45830d=_0x427a2e;this[_0x45830d(0x230)](this[_0x45830d(0x1eb)][_0x45830d(0x233)]['pipe'](_0x16b7ca(0x10))['subscribe'](_0x4cd7c6=>{const _0x74cfca=_0x45830d,_0x1e118e=new Set();_0x4cd7c6['forEach'](_0x1bf6d0=>{const _0x44e670=_0xc44c;switch(_0x1bf6d0['type']){case _0x44e670(0x20c):{const _0x55c9a4=_0x1bf6d0[_0x44e670(0x232)]['personId'];_0x1e118e['add'](_0x55c9a4);break;}}}),B(this[_0x74cfca(0x240)],_0x1e118e);}));}[_0x427a2e(0x1ec)](){const _0xa0f61b=_0x427a2e;this[_0xa0f61b(0x230)](this[_0xa0f61b(0x1f4)][_0xa0f61b(0x233)][_0xa0f61b(0x213)](async _0x4f9689=>{const _0xf7d7c4=_0xa0f61b;var _0x99602b,_0x13eee6,_0x164819,_0xb79a5d;const _0x51473a=(_0x99602b=this[_0xf7d7c4(0x1eb)][_0xf7d7c4(0x248)](_0x4f9689[_0xf7d7c4(0x228)])['find'](_0x384a39=>_0x384a39[_0xf7d7c4(0x20e)]===_0x4f9689[_0xf7d7c4(0x20e)]))==null?void 0x0:_0x99602b[_0xf7d7c4(0x1fb)];if(!_0x51473a)return;const {unitId:_0x431e43,subUnitId:_0x50f156}=_0x51473a;switch(_0x4f9689[_0xf7d7c4(0x238)]&&this['_userService'][_0xf7d7c4(0x1fa)](_0x4f9689[_0xf7d7c4(0x238)]),_0x4f9689['type']){case v[_0xf7d7c4(0x243)]:break;case v[_0xf7d7c4(0x249)]:{this[_0xf7d7c4(0x1eb)]['addComment'](_0x431e43,_0x50f156,{'unitId':_0x431e43,'subUnitId':_0x50f156,'ref':'','id':_0x4f9689[_0xf7d7c4(0x242)],'dT':y(+_0x4f9689['createTimestamp']),'threadId':_0x4f9689['threadId'],'personId':(_0x164819=(_0x13eee6=_0x4f9689[_0xf7d7c4(0x238)])==null?void 0x0:_0x13eee6[_0xf7d7c4(0x203)])!=null?_0x164819:_0x4f9689[_0xf7d7c4(0x226)],'text':JSON['parse'](_0x4f9689[_0xf7d7c4(0x218)]),'parentId':_0x51473a['id']});break;}case v['Delete']:{const _0x2252ed=this[_0xf7d7c4(0x1eb)][_0xf7d7c4(0x21d)](_0x431e43,_0x50f156,_0x4f9689[_0xf7d7c4(0x242)]);_0x2252ed&&_0x2252ed[_0xf7d7c4(0x1f1)]&&this[_0xf7d7c4(0x1eb)][_0xf7d7c4(0x21b)](_0x431e43,_0x50f156,_0x4f9689['replyId']);break;}case v['Edit']:{this['_threadCommentModel'][_0xf7d7c4(0x24c)](_0x431e43,_0x50f156,{'commentId':_0x4f9689[_0xf7d7c4(0x242)],'text':JSON['parse'](_0x4f9689[_0xf7d7c4(0x218)])});break;}case v[_0xf7d7c4(0x21a)]:{const _0x5040f4=(_0xb79a5d=this[_0xf7d7c4(0x1eb)][_0xf7d7c4(0x248)](_0x4f9689[_0xf7d7c4(0x228)])[_0xf7d7c4(0x229)](_0xc0f8d8=>_0xc0f8d8[_0xf7d7c4(0x20e)]===_0x4f9689[_0xf7d7c4(0x20e)]))==null?void 0x0:_0xb79a5d[_0xf7d7c4(0x1fb)];_0x5040f4&&this[_0xf7d7c4(0x1eb)]['resolveComment'](_0x431e43,_0x50f156,_0x5040f4['id'],_0x4f9689[_0xf7d7c4(0x1f3)]===I[_0xf7d7c4(0x231)]);break;}}}));}};_=V([p(0x0,_0xa91514(_0x5e2ac9)),p(0x1,_0xa91514(_0x35bfa3)),p(0x2,_0xa91514(_0x138878)),p(0x3,_0xa91514(_0x31a0cf))],_);function _0x4991(){const _0x42cb06=['Solve','deleteComment','Delete','getComment','values','OpenOrReOpen','syncUpdateMutationToColla','2574434jPPtbC','_config','_userService','delete','11416928zuQPQW','userId','onStarting','unitId','find','stringify','customRanges','thread-comment-data-source.config','length','3739856FhhcGS','90JLYmrv','disposeWithMe','Solved','payload','commentUpdate$','4531203CbWJuF','1126568WICpuI','type','/universer-api/user/list','user','1033446PWXrjN','error','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','requireSession','/list','/universer-api/comment/unit/','_initDataSource','_injector','addComment','replyId','Add','comment','format','forEach','map','getUnit','Reply','YYYY/MM/DD\x20HH:mm','filter','updateComment','getOwnPropertyDescriptor','listComments','_threadCommentModel','_init','setConfig','5983642kkdulS','20pksfvd','getCurrentUser','parentId','rangeType','solved','_commentService','pluginName','parse','_httpService','createTimestamp','defineProperty','addUser','root','_initUserSync','getMemberID','get','UNRECOGNIZED','Edit','/add','saveCommentToSnapshot','userID','body','UNIVER_UNKNOWN','COMMENT','/edit','onReady','_sessionService','/reply','resolveComment','add','comments','threadId','replies','3RxAyRS','dataSource','post','subscribe','/delete','_threadCommentDataSourceService','Unknown','reply','content','code'];_0x4991=function(){return _0x42cb06;};return _0x4991();}const z=_0x427a2e(0x22c),O={};var k=Object[_0x427a2e(0x24d)],Q=(_0x326aa0,_0x166321,_0x2bcc10,_0x2d7868)=>{const _0x34c10c=_0x427a2e;for(var _0x1deb63=_0x2d7868>0x1?void 0x0:_0x2d7868?k(_0x166321,_0x2bcc10):_0x166321,_0x3247f9=_0x326aa0[_0x34c10c(0x22d)]-0x1,_0x1dd555;_0x3247f9>=0x0;_0x3247f9--)(_0x1dd555=_0x326aa0[_0x3247f9])&&(_0x1deb63=_0x1dd555(_0x1deb63)||_0x1deb63);return _0x1deb63;},b=(_0x57a633,_0x5ee277)=>(_0x564e99,_0x1fa0f6)=>_0x5ee277(_0x564e99,_0x1fa0f6,_0x57a633);function X(_0xe1072c,_0x41f460){const _0x7df795=_0x427a2e,_0x3777ab=_0xe1072c[_0x7df795(0x20f)][0x0];return{..._0x41f460,'id':_0x3777ab[_0x7df795(0x242)],'resolved':_0xe1072c[_0x7df795(0x1f3)]===0x1,'dT':y(_0x3777ab[_0x7df795(0x1f8)]),'personId':_0x3777ab[_0x7df795(0x226)],'threadId':_0x3777ab[_0x7df795(0x20e)]};}function ee(_0x13bc10,_0x5aa49a,_0x1a320b){const _0x510d89=_0x427a2e;var _0xc25905,_0x4e5c4e;if(((_0x4e5c4e=(_0xc25905=_0x13bc10==null?void 0x0:_0x13bc10['replies'])==null?void 0x0:_0xc25905[_0x510d89(0x22d)])!=null?_0x4e5c4e:0x0)>0x0){const _0x1b8324=(_0x5dc6fb,_0x593d96)=>({'id':_0x5dc6fb['replyId'],'threadId':_0x5dc6fb[_0x510d89(0x20e)],'dT':y(_0x5dc6fb[_0x510d89(0x1f8)]),'personId':_0x5dc6fb['userId'],'resolved':_0x13bc10['solved']===I[_0x510d89(0x231)],'unitId':_0x5aa49a,'subUnitId':_0x1a320b,'text':JSON[_0x510d89(0x1f6)](_0x5dc6fb[_0x510d89(0x218)]),'parentId':_0x593d96}),_0x936e72=_0x1b8324(_0x13bc10[_0x510d89(0x20f)][0x0]);return{..._0x936e72,'children':_0x13bc10[_0x510d89(0x20f)]['slice'](0x1)[_0x510d89(0x247)](_0x151331=>_0x1b8324(_0x151331,_0x936e72['id']))};}return null;}let S=class{constructor(_0x5665b4,_0x182fbb,_0x19a611){const _0x5dd2d0=_0x427a2e;this[_0x5dd2d0(0x1f7)]=_0x5665b4,this[_0x5dd2d0(0x223)]=_0x182fbb,this['_sessionService']=_0x19a611;}async[_0x427a2e(0x241)](_0x41fbd8){const _0x5d004e=_0x427a2e;var _0x47dd8b,_0x3f6441;const {parentId:_0x24f767,unitId:_0x5e07ef,text:_0x1fc884,threadId:_0x5503d6}=_0x41fbd8,_0x5e0a58=(_0x3f6441=(_0x47dd8b=_0x1fc884[_0x5d004e(0x22b)])==null?void 0x0:_0x47dd8b[_0x5d004e(0x24b)](_0x91b62d=>_0x91b62d[_0x5d004e(0x1f2)]===_0x34f293['COMMENT'])['map'](_0x4162a2=>_0x4162a2['rangeId']))!=null?_0x3f6441:[],_0x3386a2=JSON[_0x5d004e(0x22a)](_0x1fc884),_0x2e4836=(await this['_sessionService'][_0x5d004e(0x23c)](_0x5e07ef))[_0x5d004e(0x1fd)]();if(_0x24f767){const _0x52454b={'memberId':_0x2e4836,'unitId':_0x5e07ef,'content':_0x3386a2,'mention':_0x5e0a58,'threadId':_0x5503d6},_0xe944ce=(await this['_httpService'][_0x5d004e(0x212)](_0x5d004e(0x23e)+_0x5e07ef+_0x5d004e(0x20a),{'body':_0x52454b}))['body'][_0x5d004e(0x217)];return{..._0x41fbd8,'id':_0xe944ce[_0x5d004e(0x242)],'dT':_0x7583d3(+_0xe944ce[_0x5d004e(0x1f8)])['format'](_0x5d004e(0x24a)),'personId':_0xe944ce[_0x5d004e(0x226)]};}else{const _0x2218aa={'memberId':_0x2e4836,'unitId':_0x5e07ef,'content':_0x3386a2,'mention':_0x5e0a58},_0x155724=await this[_0x5d004e(0x1f7)][_0x5d004e(0x212)](_0x5d004e(0x23e)+_0x5e07ef+_0x5d004e(0x201),{'body':_0x2218aa});return X(_0x155724['body'][_0x5d004e(0x244)],_0x41fbd8);}}async[_0x427a2e(0x24c)](_0x1106ee){const _0x5786b0=_0x427a2e;var _0x3ca738,_0x419aa8;const {text:_0x30bbbe,unitId:_0x209525}=_0x1106ee,_0x43ce1b=(_0x419aa8=(_0x3ca738=_0x30bbbe['customRanges'])==null?void 0x0:_0x3ca738[_0x5786b0(0x24b)](_0x316819=>_0x316819[_0x5786b0(0x1f2)]===_0x34f293[_0x5786b0(0x206)])[_0x5786b0(0x247)](_0xaf055a=>_0xaf055a['rangeId']))!=null?_0x419aa8:[],_0x27dc97=JSON[_0x5786b0(0x22a)](_0x30bbbe),_0x5d6af7=_0x1106ee[_0x5786b0(0x20e)],_0x7a802a=_0x1106ee['id'],_0x1f9f51={'memberId':(await this[_0x5786b0(0x209)][_0x5786b0(0x23c)](_0x209525))['getMemberID'](),'unitId':_0x209525,'threadId':_0x5d6af7,'mention':_0x43ce1b,'content':_0x27dc97,'replyId':_0x7a802a},_0x5833fd=await this[_0x5786b0(0x1f7)][_0x5786b0(0x212)](_0x5786b0(0x23e)+_0x209525+_0x5786b0(0x207),{'body':_0x1f9f51});return!_0x5833fd[_0x5786b0(0x204)][_0x5786b0(0x23a)]||_0x5833fd[_0x5786b0(0x204)]['error'][_0x5786b0(0x219)]===0x1;}async[_0x427a2e(0x20b)](_0x3ed283){const _0x2d3af9=_0x427a2e,{unitId:_0x3cc81c}=_0x3ed283,_0x4be88b=_0x3ed283[_0x2d3af9(0x20e)],_0x36061f={'memberId':this[_0x2d3af9(0x223)][_0x2d3af9(0x1f0)]()[_0x2d3af9(0x203)],'unitId':_0x3cc81c,'threadId':_0x4be88b,'solved':_0x3ed283['resolved']?I[_0x2d3af9(0x231)]:I[_0x2d3af9(0x21f)]},_0x25c7f7=await this[_0x2d3af9(0x1f7)]['post'](_0x2d3af9(0x23e)+_0x3cc81c+'/solved',{'body':_0x36061f});return!_0x25c7f7[_0x2d3af9(0x204)][_0x2d3af9(0x23a)]||_0x25c7f7['body'][_0x2d3af9(0x23a)]['code']===0x1;}async[_0x427a2e(0x21b)](_0x1059db,_0xcea8a5,_0x4a5566,_0x55adc1){const _0xce10ff=_0x427a2e,_0x2ca44f={'memberId':(await this['_sessionService'][_0xce10ff(0x23c)](_0x1059db))[_0xce10ff(0x1fd)](),'threadId':_0x4a5566,'replyId':_0x55adc1,'unitId':_0x1059db},_0xdb2a1e=await this[_0xce10ff(0x1f7)][_0xce10ff(0x212)](_0xce10ff(0x23e)+_0x1059db+_0xce10ff(0x214),{'body':_0x2ca44f});return!_0xdb2a1e[_0xce10ff(0x204)][_0xce10ff(0x23a)]||_0xdb2a1e[_0xce10ff(0x204)][_0xce10ff(0x23a)][_0xce10ff(0x219)]===0x1;}async[_0x427a2e(0x24e)](_0x2fa4eb,_0x2d752f,_0x1da61d){const _0x16433b=_0x427a2e,_0x294ba6={'unitId':_0x2fa4eb,'threadId':_0x1da61d},_0x3c67b4=await this['_httpService']['post'](_0x16433b(0x23e)+_0x2fa4eb+_0x16433b(0x23d),{'body':_0x294ba6}),_0x4c1201=_0x1da61d[_0x16433b(0x247)](_0x54cc62=>ee(_0x3c67b4[_0x16433b(0x204)][_0x16433b(0x20d)][_0x54cc62],_0x2fa4eb,_0x2d752f))[_0x16433b(0x24b)](Boolean);return Object[_0x16433b(0x21e)](_0x3c67b4[_0x16433b(0x204)]['users'])[_0x16433b(0x246)](_0x39d062=>{const _0x3e2cf4=_0x16433b;this[_0x3e2cf4(0x223)]['addUser'](_0x39d062);}),_0x4c1201;}[_0x427a2e(0x202)](_0x343ffc){const _0x4e26f8=_0x427a2e;return{'id':_0x343ffc['id'],'threadId':_0x343ffc[_0x4e26f8(0x20e)],'ref':_0x343ffc['ref']};}};S=Q([b(0x0,_0xa91514(_0x2afb15)),b(0x1,_0xa91514(_0x138878)),b(0x2,_0xa91514(_0x4747fc))],S);var re=Object[_0x427a2e(0x24d)],te=(_0x2e6ac3,_0x100c47,_0x16a1be,_0x3eef32)=>{const _0x28ef98=_0x427a2e;for(var _0x2271f9=_0x3eef32>0x1?void 0x0:_0x3eef32?re(_0x100c47,_0x16a1be):_0x100c47,_0x2a8da0=_0x2e6ac3[_0x28ef98(0x22d)]-0x1,_0x327a13;_0x2a8da0>=0x0;_0x2a8da0--)(_0x327a13=_0x2e6ac3[_0x2a8da0])&&(_0x2271f9=_0x327a13(_0x2271f9)||_0x2271f9);return _0x2271f9;},M=(_0x22dab5,_0x596094)=>(_0x48d198,_0x479164)=>_0x596094(_0x48d198,_0x479164,_0x22dab5);let f=class extends _0x9fb58a{constructor(_0x4169e7,_0x40d77e){const _0x104a97=_0x427a2e;super(),this[_0x104a97(0x215)]=_0x4169e7,this['_threadCommentDataSource']=_0x40d77e,this[_0x104a97(0x23f)]();}[_0x427a2e(0x23f)](){const _0x330379=_0x427a2e;this[_0x330379(0x215)][_0x330379(0x211)]=this['_threadCommentDataSource'],this[_0x330379(0x215)][_0x330379(0x220)]=!0x1;}};f=te([M(0x0,_0x66b051),M(0x1,_0xa91514(S))],f);var se=Object[_0x427a2e(0x1f9)],oe=Object[_0x427a2e(0x24d)],ne=(_0x51658d,_0x4d14aa,_0x37ff1e)=>_0x4d14aa in _0x51658d?se(_0x51658d,_0x4d14aa,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x37ff1e}):_0x51658d[_0x4d14aa]=_0x37ff1e,ie=(_0x426eaf,_0x167da9,_0x43fe46,_0x5132e2)=>{const _0x3ce4df=_0x427a2e;for(var _0x52c174=_0x5132e2>0x1?void 0x0:_0x5132e2?oe(_0x167da9,_0x43fe46):_0x167da9,_0x5cdf6b=_0x426eaf[_0x3ce4df(0x22d)]-0x1,_0x338d47;_0x5cdf6b>=0x0;_0x5cdf6b--)(_0x338d47=_0x426eaf[_0x5cdf6b])&&(_0x52c174=_0x338d47(_0x52c174)||_0x52c174);return _0x52c174;},N=(_0x4140fe,_0x4c5c35)=>(_0x28658f,_0x481473)=>_0x4c5c35(_0x28658f,_0x481473,_0x4140fe),$=(_0x4a6810,_0xb11839,_0x13fd7e)=>ne(_0x4a6810,typeof _0xb11839!='symbol'?_0xb11839+'':_0xb11839,_0x13fd7e);let g=class extends _0x17f2a3{constructor(_0x194ecd=O,_0x1601d4,_0x7615ef){const _0x51e56e=_0x427a2e;super(),this[_0x51e56e(0x222)]=_0x194ecd,this[_0x51e56e(0x240)]=_0x1601d4,this['_configService']=_0x7615ef;const {..._0x462ad1}=_0x5641fc({},O,this[_0x51e56e(0x222)]);this['_configService'][_0x51e56e(0x1ed)](z,_0x462ad1);}[_0x427a2e(0x227)](){const _0x97533d=_0x427a2e;[[S],[f],[_]][_0x97533d(0x246)](_0x58b5e1=>{const _0x315ee5=_0x97533d;this[_0x315ee5(0x240)][_0x315ee5(0x20c)](_0x58b5e1);});}[_0x427a2e(0x208)](){const _0x141d9a=_0x427a2e;this[_0x141d9a(0x240)][_0x141d9a(0x1fe)](f),this[_0x141d9a(0x240)]['get'](_);}};$(g,_0x427a2e(0x1f5),W),$(g,_0x427a2e(0x236),_0x3bd6b7[_0x427a2e(0x205)]),g=ie([_0x3efd0c(_0x5cc0d1,_0x5628d7,_0x46b496),N(0x1,_0xa91514(_0x31a0cf)),N(0x2,_0x5702e0)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x5d58(){const _0x2955ea=['resolved','map','Add','parentId','replies','payload','@univerjs/core','replyId','rangeType','/edit','object','personId','solved','subscribe','parse','filter','491452ZwJpcS','get','@univerjs-pro/collaboration-client','unitId','11030PaMNuF','YYYY/MM/DD\x20HH:mm','resolveComment','customRanges','format','/solved','IConfigService','rxjs','_initUserSync','@univerjs/network','@univerjs/thread-comment-ui','comment','pluginName','_sessionService','saveCommentToSnapshot','function','UniverThreadCommentUIPlugin','UniverThreadCommentDataSourcePlugin','/universer-api/user/list','body','toStringTag','UNRECOGNIZED','pipe','thread-comment-data-source.config','post','root','getComment','error','size','rangeId','forEach','updateComment','7gGMOFx','692760FKuIDg','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','1605384scQgnH','624966LPvONN','1736064vMLRIM','UniverProCollaborationClient','dayjs','content','/list','_userService','Module','users','_threadCommentDataSource','_threadCommentDataSourceService','COMMENT','length','UniverNetwork','onReady','_commentService','3816fwnNGA','addUser','ref','Delete','userID','CustomRangeType','Inject','Reply','userId','bufferTime','user','disposeWithMe','symbol','UserManagerService','code','_init','308DoXuQZ','_config','_httpService','commentUpdate$','UniverThreadComment','Edit','getMemberID','OpenOrReOpen','defineProperty','setConfig','add','CommentService','requireSession','getUser','5RetjeG','amd','Solved','1XXEJxe','syncUpdateMutationToColla','UniverLicensePlugin','delete','DependentOn','Injector','deleteComment','getOwnPropertyDescriptor','createTimestamp','HTTPService','_initDataSource','Disposable','UNIVER_UNKNOWN','stringify','dataSource','/reply','_configService','_threadCommentModel','/universer-api/comment/unit/','UniverInstanceType','threadId','listComments','addComment','type','Solve','_injector'];_0x5d58=function(){return _0x2955ea;};return _0x5d58();}function _0x52f4(_0x48c124,_0x558102){const _0x5d587b=_0x5d58();return _0x52f4=function(_0x52f4d2,_0x3fa61a){_0x52f4d2=_0x52f4d2-0x13e;let _0x211209=_0x5d587b[_0x52f4d2];return _0x211209;},_0x52f4(_0x48c124,_0x558102);}(function(_0x522fa0,_0x525104){const _0x3334da=_0x52f4,_0x8f0174=_0x522fa0();while(!![]){try{const _0x2d5773=parseInt(_0x3334da(0x1b2))/0x1*(parseInt(_0x3334da(0x159))/0x2)+parseInt(_0x3334da(0x17e))/0x3+parseInt(_0x3334da(0x191))/0x4*(-parseInt(_0x3334da(0x1af))/0x5)+-parseInt(_0x3334da(0x181))/0x6*(-parseInt(_0x3334da(0x17d))/0x7)+-parseInt(_0x3334da(0x180))/0x8+-parseInt(_0x3334da(0x182))/0x9+parseInt(_0x3334da(0x15d))/0xa*(-parseInt(_0x3334da(0x1a1))/0xb);if(_0x2d5773===_0x525104)break;else _0x8f0174['push'](_0x8f0174['shift']());}catch(_0x4484b2){_0x8f0174['push'](_0x8f0174['shift']());}}}(_0x5d58,0x25f08),function(_0x335b13,_0x54984a){const _0x206d40=_0x52f4;typeof exports==_0x206d40(0x153)&&typeof module<'u'?_0x54984a(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==_0x206d40(0x16c)&&define[_0x206d40(0x1b0)]?define(['exports',_0x206d40(0x15b),'@univerjs-pro/license',_0x206d40(0x14f),_0x206d40(0x167),'@univerjs/thread-comment',_0x206d40(0x164),_0x206d40(0x166)],_0x54984a):(_0x335b13=typeof globalThis<'u'?globalThis:_0x335b13||self,_0x54984a(_0x335b13['UniverProThreadCommentDatasource']={},_0x335b13[_0x206d40(0x183)],_0x335b13['UniverProLicense'],_0x335b13['UniverCore'],_0x335b13['UniverThreadCommentUi'],_0x335b13[_0x206d40(0x1a5)],_0x335b13[_0x206d40(0x164)],_0x335b13[_0x206d40(0x18e)]));}(this,function(_0x31be16,_0x2a3f15,_0x3864a7,_0x2505c7,_0x5afae8,_0x1cc25f,_0x88232b,_0x3f9cb8){'use strict';const _0x524927=_0x52f4;const _0x116c35=_0x524927(0x17f);var _0xcba247=(_0x33be3d=>(_0x33be3d[_0x33be3d[_0x524927(0x1a8)]=0x0]=_0x524927(0x1a8),_0x33be3d[_0x33be3d['Solved']=0x1]='Solved',_0x33be3d[_0x33be3d['UNRECOGNIZED']=-0x1]=_0x524927(0x172),_0x33be3d))(_0xcba247||{}),_0x2a590b=(_0x3e4504=>(_0x3e4504[_0x3e4504['Unknown']=0x0]='Unknown',_0x3e4504[_0x3e4504[_0x524927(0x14b)]=0x1]=_0x524927(0x14b),_0x3e4504[_0x3e4504[_0x524927(0x198)]=0x2]='Reply',_0x3e4504[_0x3e4504[_0x524927(0x1a6)]=0x3]=_0x524927(0x1a6),_0x3e4504[_0x3e4504[_0x524927(0x194)]=0x4]=_0x524927(0x194),_0x3e4504[_0x3e4504[_0x524927(0x147)]=0x5]=_0x524927(0x147),_0x3e4504[_0x3e4504[_0x524927(0x172)]=-0x1]=_0x524927(0x172),_0x3e4504))(_0x2a590b||{});const _0x23b85e=_0x2271cd=>_0x2505c7[_0x524927(0x184)](new Date(+_0x2271cd))[_0x524927(0x161)](_0x524927(0x15e)),_0x1173f8=async(_0x11f3d0,_0x252298)=>{const _0x434cd0=_0x524927,_0x5f13d0=_0x11f3d0[_0x434cd0(0x15a)](_0x2505c7[_0x434cd0(0x19e)]),_0x2673b7=_0x11f3d0[_0x434cd0(0x15a)](_0x3f9cb8['HTTPService']);_0x252298['forEach'](_0x2faa44=>{const _0x4acba3=_0x434cd0;_0x5f13d0[_0x4acba3(0x1ae)](_0x2faa44)&&_0x252298[_0x4acba3(0x1b5)](_0x2faa44);}),_0x252298[_0x434cd0(0x179)]&&(await _0x2673b7[_0x434cd0(0x15a)](_0x434cd0(0x16f),{'params':{'userIDs':[..._0x252298]}}))[_0x434cd0(0x170)][_0x434cd0(0x189)]['forEach'](_0x14fc6a=>{_0x14fc6a&&_0x5f13d0['addUser'](_0x14fc6a);});};var _0x236e33=Object[_0x524927(0x1b9)],_0x57468c=(_0x10aeb7,_0x556850,_0x2443bf,_0x31f547)=>{const _0x34f3e6=_0x524927;for(var _0x32f5a6=_0x31f547>0x1?void 0x0:_0x31f547?_0x236e33(_0x556850,_0x2443bf):_0x556850,_0x51eccb=_0x10aeb7[_0x34f3e6(0x18d)]-0x1,_0x570114;_0x51eccb>=0x0;_0x51eccb--)(_0x570114=_0x10aeb7[_0x51eccb])&&(_0x32f5a6=_0x570114(_0x32f5a6)||_0x32f5a6);return _0x32f5a6;},_0x49d949=(_0x2a0ef4,_0x20926c)=>(_0x3e0c1b,_0x2f9fda)=>_0x20926c(_0x3e0c1b,_0x2f9fda,_0x2a0ef4);let _0x303171=class extends _0x2505c7[_0x524927(0x1bd)]{constructor(_0x3c1b01,_0x72dce8,_0xbafaf8,_0x43b363){const _0x3e8d7d=_0x524927;super(),this['_commentService']=_0x3c1b01,this[_0x3e8d7d(0x140)]=_0x72dce8,this['_userService']=_0xbafaf8,this[_0x3e8d7d(0x148)]=_0x43b363,this[_0x3e8d7d(0x1a0)](),this[_0x3e8d7d(0x165)]();}['_initUserSync'](){const _0x3d125c=_0x524927;this[_0x3d125c(0x19c)](this['_threadCommentModel'][_0x3d125c(0x1a4)][_0x3d125c(0x173)](_0x88232b[_0x3d125c(0x19a)](0x10))[_0x3d125c(0x156)](_0x1de809=>{const _0x3ccf1c=_0x3d125c,_0x1d8ccb=new Set();_0x1de809[_0x3ccf1c(0x17b)](_0x29d067=>{const _0x2c9e41=_0x3ccf1c;switch(_0x29d067[_0x2c9e41(0x146)]){case _0x2c9e41(0x1ab):{const _0x519436=_0x29d067[_0x2c9e41(0x14e)][_0x2c9e41(0x154)];_0x1d8ccb[_0x2c9e41(0x1ab)](_0x519436);break;}}}),_0x1173f8(this[_0x3ccf1c(0x148)],_0x1d8ccb);}));}[_0x524927(0x1a0)](){const _0x3960f7=_0x524927;this['disposeWithMe'](this[_0x3960f7(0x190)][_0x3960f7(0x1a4)][_0x3960f7(0x156)](async _0x292593=>{const _0x2c64cb=_0x3960f7;var _0x32db35,_0x232c11,_0x4695b8,_0x1448d8;const _0x18b305=(_0x32db35=this[_0x2c64cb(0x140)]['getUnit'](_0x292593[_0x2c64cb(0x15c)])['find'](_0x2c7004=>_0x2c7004[_0x2c64cb(0x143)]===_0x292593[_0x2c64cb(0x143)]))==null?void 0x0:_0x32db35[_0x2c64cb(0x176)];if(!_0x18b305)return;const {unitId:_0x44d947,subUnitId:_0x1d1a5a}=_0x18b305;switch(_0x292593[_0x2c64cb(0x19b)]&&this[_0x2c64cb(0x187)][_0x2c64cb(0x192)](_0x292593['user']),_0x292593[_0x2c64cb(0x146)]){case _0x2a590b[_0x2c64cb(0x14b)]:break;case _0x2a590b['Reply']:{this[_0x2c64cb(0x140)][_0x2c64cb(0x145)](_0x44d947,_0x1d1a5a,{'unitId':_0x44d947,'subUnitId':_0x1d1a5a,'ref':'','id':_0x292593[_0x2c64cb(0x150)],'dT':_0x23b85e(+_0x292593[_0x2c64cb(0x1ba)]),'threadId':_0x292593[_0x2c64cb(0x143)],'personId':(_0x4695b8=(_0x232c11=_0x292593[_0x2c64cb(0x19b)])==null?void 0x0:_0x232c11['userID'])!=null?_0x4695b8:_0x292593['userId'],'text':JSON[_0x2c64cb(0x157)](_0x292593['content']),'parentId':_0x18b305['id']});break;}case _0x2a590b[_0x2c64cb(0x194)]:{const _0x86de55=this['_threadCommentModel'][_0x2c64cb(0x177)](_0x44d947,_0x1d1a5a,_0x292593[_0x2c64cb(0x150)]);_0x86de55&&_0x86de55[_0x2c64cb(0x14c)]&&this[_0x2c64cb(0x140)]['deleteComment'](_0x44d947,_0x1d1a5a,_0x292593[_0x2c64cb(0x150)]);break;}case _0x2a590b[_0x2c64cb(0x1a6)]:{this[_0x2c64cb(0x140)][_0x2c64cb(0x17c)](_0x44d947,_0x1d1a5a,{'commentId':_0x292593[_0x2c64cb(0x150)],'text':JSON[_0x2c64cb(0x157)](_0x292593['content'])});break;}case _0x2a590b[_0x2c64cb(0x147)]:{const _0xef8825=(_0x1448d8=this[_0x2c64cb(0x140)]['getUnit'](_0x292593[_0x2c64cb(0x15c)])['find'](_0x11b0ee=>_0x11b0ee[_0x2c64cb(0x143)]===_0x292593[_0x2c64cb(0x143)]))==null?void 0x0:_0x1448d8[_0x2c64cb(0x176)];_0xef8825&&this['_threadCommentModel'][_0x2c64cb(0x15f)](_0x44d947,_0x1d1a5a,_0xef8825['id'],_0x292593[_0x2c64cb(0x155)]===_0xcba247[_0x2c64cb(0x1b1)]);break;}}}));}};_0x303171=_0x57468c([_0x49d949(0x0,_0x2505c7[_0x524927(0x197)](_0x2a3f15[_0x524927(0x1ac)])),_0x49d949(0x1,_0x2505c7[_0x524927(0x197)](_0x1cc25f['ThreadCommentModel'])),_0x49d949(0x2,_0x2505c7[_0x524927(0x197)](_0x2505c7[_0x524927(0x19e)])),_0x49d949(0x3,_0x2505c7[_0x524927(0x197)](_0x2505c7[_0x524927(0x1b7)]))],_0x303171);const _0x2ba8a4=_0x524927(0x174),_0x377573={};var _0x5c4d84=Object[_0x524927(0x1b9)],_0x5d8f3c=(_0x436b24,_0x321531,_0x9a23df,_0x22bff0)=>{const _0x119a45=_0x524927;for(var _0x4e54d4=_0x22bff0>0x1?void 0x0:_0x22bff0?_0x5c4d84(_0x321531,_0x9a23df):_0x321531,_0x1b3d02=_0x436b24[_0x119a45(0x18d)]-0x1,_0x42182f;_0x1b3d02>=0x0;_0x1b3d02--)(_0x42182f=_0x436b24[_0x1b3d02])&&(_0x4e54d4=_0x42182f(_0x4e54d4)||_0x4e54d4);return _0x4e54d4;},_0x341697=(_0x19c4e1,_0x32566c)=>(_0x4d0d69,_0x240287)=>_0x32566c(_0x4d0d69,_0x240287,_0x19c4e1);function _0x448893(_0x507144,_0x162841){const _0x3997a6=_0x524927,_0x167b42=_0x507144[_0x3997a6(0x14d)][0x0];return{..._0x162841,'id':_0x167b42[_0x3997a6(0x150)],'resolved':_0x507144[_0x3997a6(0x155)]===0x1,'dT':_0x23b85e(_0x167b42['createTimestamp']),'personId':_0x167b42[_0x3997a6(0x199)],'threadId':_0x167b42[_0x3997a6(0x143)]};}function _0x2e4b4c(_0x1ad78c,_0x4e8f05,_0x5f0db1){const _0x1b0749=_0x524927;var _0x45b000,_0x2a6aa3;if(((_0x2a6aa3=(_0x45b000=_0x1ad78c==null?void 0x0:_0x1ad78c[_0x1b0749(0x14d)])==null?void 0x0:_0x45b000[_0x1b0749(0x18d)])!=null?_0x2a6aa3:0x0)>0x0){const _0x2f888e=(_0x12452c,_0x87b355)=>({'id':_0x12452c[_0x1b0749(0x150)],'threadId':_0x12452c['threadId'],'dT':_0x23b85e(_0x12452c[_0x1b0749(0x1ba)]),'personId':_0x12452c[_0x1b0749(0x199)],'resolved':_0x1ad78c[_0x1b0749(0x155)]===_0xcba247[_0x1b0749(0x1b1)],'unitId':_0x4e8f05,'subUnitId':_0x5f0db1,'text':JSON['parse'](_0x12452c[_0x1b0749(0x185)]),'parentId':_0x87b355}),_0x27ff43=_0x2f888e(_0x1ad78c[_0x1b0749(0x14d)][0x0]);return{..._0x27ff43,'children':_0x1ad78c[_0x1b0749(0x14d)]['slice'](0x1)[_0x1b0749(0x14a)](_0x81b03b=>_0x2f888e(_0x81b03b,_0x27ff43['id']))};}return null;}let _0x460224=class{constructor(_0x54a6af,_0x5249d9,_0x17805e){const _0x1f34ee=_0x524927;this['_httpService']=_0x54a6af,this[_0x1f34ee(0x187)]=_0x5249d9,this[_0x1f34ee(0x16a)]=_0x17805e;}async[_0x524927(0x145)](_0x2a463a){const _0xde9a49=_0x524927;var _0x4b07e2,_0x5bf17e;const {parentId:_0x2154d4,unitId:_0x5923fe,text:_0x1cc7b7,threadId:_0x210930}=_0x2a463a,_0x4f7c30=(_0x5bf17e=(_0x4b07e2=_0x1cc7b7[_0xde9a49(0x160)])==null?void 0x0:_0x4b07e2[_0xde9a49(0x158)](_0x582e08=>_0x582e08[_0xde9a49(0x151)]===_0x2505c7[_0xde9a49(0x196)]['COMMENT'])[_0xde9a49(0x14a)](_0x3cd6c4=>_0x3cd6c4[_0xde9a49(0x17a)]))!=null?_0x5bf17e:[],_0x13887b=JSON['stringify'](_0x1cc7b7),_0x5dd00b=(await this['_sessionService'][_0xde9a49(0x1ad)](_0x5923fe))[_0xde9a49(0x1a7)]();if(_0x2154d4){const _0x23f8e9={'memberId':_0x5dd00b,'unitId':_0x5923fe,'content':_0x13887b,'mention':_0x4f7c30,'threadId':_0x210930},_0x2c0b88=(await this[_0xde9a49(0x1a3)]['post']('/universer-api/comment/unit/'+_0x5923fe+_0xde9a49(0x13e),{'body':_0x23f8e9}))[_0xde9a49(0x170)]['reply'];return{..._0x2a463a,'id':_0x2c0b88[_0xde9a49(0x150)],'dT':_0x2505c7[_0xde9a49(0x184)](+_0x2c0b88[_0xde9a49(0x1ba)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x2c0b88['userId']};}else{const _0x9e05e4={'memberId':_0x5dd00b,'unitId':_0x5923fe,'content':_0x13887b,'mention':_0x4f7c30},_0x3cbe45=await this['_httpService']['post'](_0xde9a49(0x141)+_0x5923fe+'/add',{'body':_0x9e05e4});return _0x448893(_0x3cbe45[_0xde9a49(0x170)][_0xde9a49(0x168)],_0x2a463a);}}async[_0x524927(0x17c)](_0x496cae){const _0x3d2b11=_0x524927;var _0x2900c7,_0x661325;const {text:_0x14d6d3,unitId:_0x385d22}=_0x496cae,_0x1fb72b=(_0x661325=(_0x2900c7=_0x14d6d3[_0x3d2b11(0x160)])==null?void 0x0:_0x2900c7[_0x3d2b11(0x158)](_0x5ae4d5=>_0x5ae4d5[_0x3d2b11(0x151)]===_0x2505c7[_0x3d2b11(0x196)][_0x3d2b11(0x18c)])[_0x3d2b11(0x14a)](_0x1c9ec3=>_0x1c9ec3['rangeId']))!=null?_0x661325:[],_0x2f96d9=JSON[_0x3d2b11(0x1bf)](_0x14d6d3),_0x465c26=_0x496cae[_0x3d2b11(0x143)],_0x9d7d6f=_0x496cae['id'],_0x129ad0={'memberId':(await this[_0x3d2b11(0x16a)][_0x3d2b11(0x1ad)](_0x385d22))[_0x3d2b11(0x1a7)](),'unitId':_0x385d22,'threadId':_0x465c26,'mention':_0x1fb72b,'content':_0x2f96d9,'replyId':_0x9d7d6f},_0x2c666c=await this[_0x3d2b11(0x1a3)][_0x3d2b11(0x175)]('/universer-api/comment/unit/'+_0x385d22+_0x3d2b11(0x152),{'body':_0x129ad0});return!_0x2c666c[_0x3d2b11(0x170)][_0x3d2b11(0x178)]||_0x2c666c[_0x3d2b11(0x170)][_0x3d2b11(0x178)][_0x3d2b11(0x19f)]===0x1;}async['resolveComment'](_0x40b857){const _0x407cd1=_0x524927,{unitId:_0x28f620}=_0x40b857,_0xecb2a2=_0x40b857['threadId'],_0x1878d0={'memberId':this[_0x407cd1(0x187)]['getCurrentUser']()[_0x407cd1(0x195)],'unitId':_0x28f620,'threadId':_0xecb2a2,'solved':_0x40b857[_0x407cd1(0x149)]?_0xcba247['Solved']:_0xcba247['OpenOrReOpen']},_0x5bf11b=await this[_0x407cd1(0x1a3)][_0x407cd1(0x175)](_0x407cd1(0x141)+_0x28f620+_0x407cd1(0x162),{'body':_0x1878d0});return!_0x5bf11b[_0x407cd1(0x170)]['error']||_0x5bf11b['body'][_0x407cd1(0x178)][_0x407cd1(0x19f)]===0x1;}async[_0x524927(0x1b8)](_0x261ab9,_0x32d705,_0x4212aa,_0x18e535){const _0x50bf2f=_0x524927,_0xd2a829={'memberId':(await this['_sessionService']['requireSession'](_0x261ab9))[_0x50bf2f(0x1a7)](),'threadId':_0x4212aa,'replyId':_0x18e535,'unitId':_0x261ab9},_0x13d92a=await this[_0x50bf2f(0x1a3)]['post'](_0x50bf2f(0x141)+_0x261ab9+'/delete',{'body':_0xd2a829});return!_0x13d92a[_0x50bf2f(0x170)][_0x50bf2f(0x178)]||_0x13d92a[_0x50bf2f(0x170)][_0x50bf2f(0x178)][_0x50bf2f(0x19f)]===0x1;}async[_0x524927(0x144)](_0x4ff7c0,_0xf9f5e1,_0x3a0ac0){const _0x23ce14=_0x524927,_0x587306={'unitId':_0x4ff7c0,'threadId':_0x3a0ac0},_0x4d255c=await this[_0x23ce14(0x1a3)]['post'](_0x23ce14(0x141)+_0x4ff7c0+_0x23ce14(0x186),{'body':_0x587306}),_0x84be09=_0x3a0ac0[_0x23ce14(0x14a)](_0x2a135c=>_0x2e4b4c(_0x4d255c['body']['comments'][_0x2a135c],_0x4ff7c0,_0xf9f5e1))[_0x23ce14(0x158)](Boolean);return Object['values'](_0x4d255c['body'][_0x23ce14(0x189)])[_0x23ce14(0x17b)](_0x3ca3dd=>{const _0x4dbb2c=_0x23ce14;this[_0x4dbb2c(0x187)][_0x4dbb2c(0x192)](_0x3ca3dd);}),_0x84be09;}[_0x524927(0x16b)](_0x29e776){const _0x1e0507=_0x524927;return{'id':_0x29e776['id'],'threadId':_0x29e776['threadId'],'ref':_0x29e776[_0x1e0507(0x193)]};}};_0x460224=_0x5d8f3c([_0x341697(0x0,_0x2505c7[_0x524927(0x197)](_0x3f9cb8[_0x524927(0x1bb)])),_0x341697(0x1,_0x2505c7['Inject'](_0x2505c7['UserManagerService'])),_0x341697(0x2,_0x2505c7[_0x524927(0x197)](_0x2a3f15['CollaborationSessionService']))],_0x460224);var _0x3bd491=Object[_0x524927(0x1b9)],_0x4aed2e=(_0x11825e,_0x819d48,_0x3749ea,_0xc1e8c1)=>{for(var _0x2e0e7b=_0xc1e8c1>0x1?void 0x0:_0xc1e8c1?_0x3bd491(_0x819d48,_0x3749ea):_0x819d48,_0x1ca906=_0x11825e['length']-0x1,_0x38152f;_0x1ca906>=0x0;_0x1ca906--)(_0x38152f=_0x11825e[_0x1ca906])&&(_0x2e0e7b=_0x38152f(_0x2e0e7b)||_0x2e0e7b);return _0x2e0e7b;},_0x4e685e=(_0x4d2cfb,_0x3d356e)=>(_0x2dab86,_0x363ae9)=>_0x3d356e(_0x2dab86,_0x363ae9,_0x4d2cfb);let _0x5b20bb=class extends _0x2505c7[_0x524927(0x1bd)]{constructor(_0x19345f,_0x4450b4){const _0x459490=_0x524927;super(),this[_0x459490(0x18b)]=_0x19345f,this[_0x459490(0x18a)]=_0x4450b4,this['_initDataSource']();}[_0x524927(0x1bc)](){const _0x22be38=_0x524927;this[_0x22be38(0x18b)][_0x22be38(0x1c0)]=this['_threadCommentDataSource'],this[_0x22be38(0x18b)][_0x22be38(0x1b3)]=!0x1;}};_0x5b20bb=_0x4aed2e([_0x4e685e(0x0,_0x1cc25f['IThreadCommentDataSourceService']),_0x4e685e(0x1,_0x2505c7[_0x524927(0x197)](_0x460224))],_0x5b20bb);var _0x177539=Object[_0x524927(0x1a9)],_0xe8c190=Object[_0x524927(0x1b9)],_0x49e077=(_0x27df85,_0x5761b2,_0x14edb1)=>_0x5761b2 in _0x27df85?_0x177539(_0x27df85,_0x5761b2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x14edb1}):_0x27df85[_0x5761b2]=_0x14edb1,_0x687430=(_0x3fd4d5,_0x4afa4e,_0x5b0167,_0x21eb1c)=>{const _0xcc0f83=_0x524927;for(var _0x241c4f=_0x21eb1c>0x1?void 0x0:_0x21eb1c?_0xe8c190(_0x4afa4e,_0x5b0167):_0x4afa4e,_0x3eb83f=_0x3fd4d5[_0xcc0f83(0x18d)]-0x1,_0x464d8e;_0x3eb83f>=0x0;_0x3eb83f--)(_0x464d8e=_0x3fd4d5[_0x3eb83f])&&(_0x241c4f=_0x464d8e(_0x241c4f)||_0x241c4f);return _0x241c4f;},_0x1c5880=(_0x3e4a9d,_0xd3480b)=>(_0x38eec7,_0x4dff36)=>_0xd3480b(_0x38eec7,_0x4dff36,_0x3e4a9d),_0x2c849b=(_0x16cd7b,_0x32fe1d,_0x36ecbb)=>_0x49e077(_0x16cd7b,typeof _0x32fe1d!=_0x524927(0x19d)?_0x32fe1d+'':_0x32fe1d,_0x36ecbb);_0x31be16[_0x524927(0x16e)]=class extends _0x2505c7['Plugin']{constructor(_0x1577c5=_0x377573,_0x6ecf80,_0x3fe706){const _0x5d4049=_0x524927;super(),this['_config']=_0x1577c5,this[_0x5d4049(0x148)]=_0x6ecf80,this['_configService']=_0x3fe706;const {..._0x462762}=_0x2505c7['merge']({},_0x377573,this[_0x5d4049(0x1a2)]);this[_0x5d4049(0x13f)][_0x5d4049(0x1aa)](_0x2ba8a4,_0x462762);}['onStarting'](){const _0x566091=_0x524927;[[_0x460224],[_0x5b20bb],[_0x303171]][_0x566091(0x17b)](_0x38c080=>{this['_injector']['add'](_0x38c080);});}[_0x524927(0x18f)](){const _0x4cb360=_0x524927;this[_0x4cb360(0x148)][_0x4cb360(0x15a)](_0x5b20bb),this[_0x4cb360(0x148)][_0x4cb360(0x15a)](_0x303171);}},_0x2c849b(_0x31be16['UniverThreadCommentDataSourcePlugin'],_0x524927(0x169),_0x116c35),_0x2c849b(_0x31be16[_0x524927(0x16e)],_0x524927(0x146),_0x2505c7[_0x524927(0x142)][_0x524927(0x1be)]),_0x31be16[_0x524927(0x16e)]=_0x687430([_0x2505c7[_0x524927(0x1b6)](_0x5afae8[_0x524927(0x16d)],_0x2a3f15['UniverCollaborationClientPlugin'],_0x3864a7[_0x524927(0x1b4)]),_0x1c5880(0x1,_0x2505c7[_0x524927(0x197)](_0x2505c7[_0x524927(0x1b7)])),_0x1c5880(0x2,_0x2505c7[_0x524927(0x163)])],_0x31be16[_0x524927(0x16e)]),Object['defineProperty'](_0x31be16,Symbol[_0x524927(0x171)],{'value':_0x524927(0x188)});}));
|
|
1
|
+
function _0x1786(_0x4cdcd8,_0x531a73){const _0x4b81df=_0x4b81();return _0x1786=function(_0x17869c,_0x52c0d1){_0x17869c=_0x17869c-0x1bf;let _0x22bee5=_0x4b81df[_0x17869c];return _0x22bee5;},_0x1786(_0x4cdcd8,_0x531a73);}function _0x4b81(){const _0x4071b7=['solved','IConfigService','forEach','dataSource','2813516KwzeKp','rangeId','comment','@univerjs/thread-comment','deleteComment','580644YIQVQG','replyId','listComments','ThreadCommentModel','UniverProCollaborationClient','threadId','UniverCollaborationClientPlugin','UNRECOGNIZED','@univerjs/core','amd','Injector','Reply','Add','151277VrTaSM','IThreadCommentDataSourceService','toStringTag','requireSession','saveCommentToSnapshot','40ccoFOt','add','Module','getCurrentUser','values','_config','getOwnPropertyDescriptor','_init','UniverInstanceType','createTimestamp','CommentService','422913rqxHOB','unitId','7859403hjXJHM','body','312jgufqq','CustomRangeType','Inject','parentId','@univerjs-pro/collaboration-client','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','updateComment','Solve','size','map','/reply','type','commentUpdate$','resolveComment','userId','/solved','UniverProLicense','dayjs','code','196122fvaPKt','format','_sessionService','length','UniverThreadCommentDataSourcePlugin','@univerjs/thread-comment-ui','getUser','parse','_commentService','slice','addComment','object','_threadCommentDataSource','root','userID','15iDLZrR','addUser','getUnit','users','_threadCommentDataSourceService','/universer-api/comment/unit/','OpenOrReOpen','_configService','post','delete','get','HTTPService','setConfig','rangeType','pluginName','personId','thread-comment-data-source.config','UniverProThreadCommentDatasource','stringify','UniverThreadCommentUi','content','Unknown','UserManagerService','defineProperty','user','DependentOn','/add','_userService','_injector','Solved','_httpService','@univerjs-pro/license','pipe','disposeWithMe','_threadCommentModel','replies','UniverLicensePlugin','symbol','6922390pyqteS','Disposable','getComment','filter','bufferTime','getMemberID','find','exports','YYYY/MM/DD\x20HH:mm','UniverNetwork','/edit','Delete','error','UniverThreadCommentUIPlugin','_initUserSync','Edit'];_0x4b81=function(){return _0x4071b7;};return _0x4b81();}(function(_0x5555e0,_0x4528b4){const _0x4b273f=_0x1786,_0x567f09=_0x5555e0();while(!![]){try{const _0x4796a5=parseInt(_0x4b273f(0x202))/0x1+parseInt(_0x4b273f(0x219))/0x2*(parseInt(_0x4b273f(0x228))/0x3)+-parseInt(_0x4b273f(0x1e0))/0x4+-parseInt(_0x4b273f(0x1f7))/0x5*(parseInt(_0x4b273f(0x1e5))/0x6)+-parseInt(_0x4b273f(0x1f2))/0x7*(-parseInt(_0x4b273f(0x206))/0x8)+parseInt(_0x4b273f(0x204))/0x9+-parseInt(_0x4b273f(0x1cc))/0xa;if(_0x4796a5===_0x4528b4)break;else _0x567f09['push'](_0x567f09['shift']());}catch(_0x311457){_0x567f09['push'](_0x567f09['shift']());}}}(_0x4b81,0x702f0),function(_0x98137f,_0x3e2571){const _0x39576b=_0x1786;typeof exports==_0x39576b(0x224)&&typeof module<'u'?_0x3e2571(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[_0x39576b(0x1ee)]?define([_0x39576b(0x1d3),_0x39576b(0x20a),_0x39576b(0x1c5),_0x39576b(0x1ed),_0x39576b(0x21e),_0x39576b(0x1e3),'rxjs','@univerjs/network'],_0x3e2571):(_0x98137f=typeof globalThis<'u'?globalThis:_0x98137f||self,_0x3e2571(_0x98137f[_0x39576b(0x239)]={},_0x98137f[_0x39576b(0x1e9)],_0x98137f[_0x39576b(0x216)],_0x98137f['UniverCore'],_0x98137f[_0x39576b(0x23b)],_0x98137f['UniverThreadComment'],_0x98137f['rxjs'],_0x98137f[_0x39576b(0x1d5)]));}(this,function(_0x1c69aa,_0x1ce932,_0x18806b,_0x2764e5,_0x544142,_0x1326db,_0x2a1585,_0x23f582){'use strict';const _0x8f8da4=_0x1786;const _0x1d809b=_0x8f8da4(0x20b);var _0x2b8b1d=(_0x573d21=>(_0x573d21[_0x573d21[_0x8f8da4(0x22e)]=0x0]=_0x8f8da4(0x22e),_0x573d21[_0x573d21[_0x8f8da4(0x1c3)]=0x1]=_0x8f8da4(0x1c3),_0x573d21[_0x573d21[_0x8f8da4(0x1ec)]=-0x1]=_0x8f8da4(0x1ec),_0x573d21))(_0x2b8b1d||{}),_0x30e06f=(_0x37bf05=>(_0x37bf05[_0x37bf05[_0x8f8da4(0x23d)]=0x0]=_0x8f8da4(0x23d),_0x37bf05[_0x37bf05[_0x8f8da4(0x1f1)]=0x1]=_0x8f8da4(0x1f1),_0x37bf05[_0x37bf05[_0x8f8da4(0x1f0)]=0x2]='Reply',_0x37bf05[_0x37bf05[_0x8f8da4(0x1db)]=0x3]=_0x8f8da4(0x1db),_0x37bf05[_0x37bf05['Delete']=0x4]=_0x8f8da4(0x1d7),_0x37bf05[_0x37bf05[_0x8f8da4(0x20d)]=0x5]='Solve',_0x37bf05[_0x37bf05[_0x8f8da4(0x1ec)]=-0x1]='UNRECOGNIZED',_0x37bf05))(_0x30e06f||{});const _0x37dc3f=_0x32e2e9=>_0x2764e5['dayjs'](new Date(+_0x32e2e9))[_0x8f8da4(0x21a)](_0x8f8da4(0x1d4)),_0x46c544=async(_0x441ce6,_0x440899)=>{const _0x10e2ec=_0x8f8da4,_0x1a89be=_0x441ce6[_0x10e2ec(0x232)](_0x2764e5[_0x10e2ec(0x23e)]),_0x2fb0dc=_0x441ce6[_0x10e2ec(0x232)](_0x23f582[_0x10e2ec(0x233)]);_0x440899[_0x10e2ec(0x1de)](_0x435851=>{const _0x51be69=_0x10e2ec;_0x1a89be[_0x51be69(0x21f)](_0x435851)&&_0x440899[_0x51be69(0x231)](_0x435851);}),_0x440899[_0x10e2ec(0x20e)]&&(await _0x2fb0dc[_0x10e2ec(0x232)]('/universer-api/user/list',{'params':{'userIDs':[..._0x440899]}}))[_0x10e2ec(0x205)]['users'][_0x10e2ec(0x1de)](_0x5be17c=>{const _0x298f56=_0x10e2ec;_0x5be17c&&_0x1a89be[_0x298f56(0x229)](_0x5be17c);});};var _0x3102e5=Object[_0x8f8da4(0x1fd)],_0xae37e7=(_0xa53c39,_0x35ff45,_0x658df8,_0x57107f)=>{const _0x31b9f8=_0x8f8da4;for(var _0x5f4bcc=_0x57107f>0x1?void 0x0:_0x57107f?_0x3102e5(_0x35ff45,_0x658df8):_0x35ff45,_0x30f7f5=_0xa53c39[_0x31b9f8(0x21c)]-0x1,_0x35b7a1;_0x30f7f5>=0x0;_0x30f7f5--)(_0x35b7a1=_0xa53c39[_0x30f7f5])&&(_0x5f4bcc=_0x35b7a1(_0x5f4bcc)||_0x5f4bcc);return _0x5f4bcc;},_0x7c81b2=(_0xe42556,_0x36baa5)=>(_0x4bcfc5,_0x4b2e0a)=>_0x36baa5(_0x4bcfc5,_0x4b2e0a,_0xe42556);let _0x1d8466=class extends _0x2764e5[_0x8f8da4(0x1cd)]{constructor(_0x2f143d,_0x5be5de,_0x174102,_0x54b74b){const _0x2b5151=_0x8f8da4;super(),this[_0x2b5151(0x221)]=_0x2f143d,this['_threadCommentModel']=_0x5be5de,this[_0x2b5151(0x1c1)]=_0x174102,this[_0x2b5151(0x1c2)]=_0x54b74b,this[_0x2b5151(0x1fe)](),this[_0x2b5151(0x1da)]();}[_0x8f8da4(0x1da)](){const _0xd71ce1=_0x8f8da4;this[_0xd71ce1(0x1c7)](this['_threadCommentModel'][_0xd71ce1(0x212)][_0xd71ce1(0x1c6)](_0x2a1585[_0xd71ce1(0x1d0)](0x10))['subscribe'](_0x57889d=>{const _0x11f194=_0xd71ce1,_0x54e52e=new Set();_0x57889d[_0x11f194(0x1de)](_0xc040a0=>{const _0x48e32c=_0x11f194;switch(_0xc040a0[_0x48e32c(0x211)]){case _0x48e32c(0x1f8):{const _0x38e34a=_0xc040a0['payload'][_0x48e32c(0x237)];_0x54e52e['add'](_0x38e34a);break;}}}),_0x46c544(this[_0x11f194(0x1c2)],_0x54e52e);}));}[_0x8f8da4(0x1fe)](){const _0x5d19f7=_0x8f8da4;this[_0x5d19f7(0x1c7)](this[_0x5d19f7(0x221)]['commentUpdate$']['subscribe'](async _0xa832af=>{const _0x262dc5=_0x5d19f7;var _0x4ed35d,_0x11da0d,_0x857c4e,_0x3f33be;const _0x368b4b=(_0x4ed35d=this[_0x262dc5(0x1c8)][_0x262dc5(0x22a)](_0xa832af[_0x262dc5(0x203)])[_0x262dc5(0x1d2)](_0x5c1388=>_0x5c1388['threadId']===_0xa832af[_0x262dc5(0x1ea)]))==null?void 0x0:_0x4ed35d[_0x262dc5(0x226)];if(!_0x368b4b)return;const {unitId:_0x450b1a,subUnitId:_0x363786}=_0x368b4b;switch(_0xa832af[_0x262dc5(0x240)]&&this['_userService'][_0x262dc5(0x229)](_0xa832af[_0x262dc5(0x240)]),_0xa832af['type']){case _0x30e06f['Add']:break;case _0x30e06f[_0x262dc5(0x1f0)]:{this[_0x262dc5(0x1c8)][_0x262dc5(0x223)](_0x450b1a,_0x363786,{'unitId':_0x450b1a,'subUnitId':_0x363786,'ref':'','id':_0xa832af[_0x262dc5(0x1e6)],'dT':_0x37dc3f(+_0xa832af['createTimestamp']),'threadId':_0xa832af[_0x262dc5(0x1ea)],'personId':(_0x857c4e=(_0x11da0d=_0xa832af[_0x262dc5(0x240)])==null?void 0x0:_0x11da0d['userID'])!=null?_0x857c4e:_0xa832af['userId'],'text':JSON['parse'](_0xa832af[_0x262dc5(0x23c)]),'parentId':_0x368b4b['id']});break;}case _0x30e06f[_0x262dc5(0x1d7)]:{const _0x1f0ab1=this[_0x262dc5(0x1c8)][_0x262dc5(0x1ce)](_0x450b1a,_0x363786,_0xa832af['replyId']);_0x1f0ab1&&_0x1f0ab1[_0x262dc5(0x209)]&&this[_0x262dc5(0x1c8)][_0x262dc5(0x1e4)](_0x450b1a,_0x363786,_0xa832af[_0x262dc5(0x1e6)]);break;}case _0x30e06f[_0x262dc5(0x1db)]:{this[_0x262dc5(0x1c8)][_0x262dc5(0x20c)](_0x450b1a,_0x363786,{'commentId':_0xa832af[_0x262dc5(0x1e6)],'text':JSON[_0x262dc5(0x220)](_0xa832af['content'])});break;}case _0x30e06f[_0x262dc5(0x20d)]:{const _0x22def8=(_0x3f33be=this['_threadCommentModel'][_0x262dc5(0x22a)](_0xa832af['unitId'])['find'](_0x4c397e=>_0x4c397e[_0x262dc5(0x1ea)]===_0xa832af[_0x262dc5(0x1ea)]))==null?void 0x0:_0x3f33be[_0x262dc5(0x226)];_0x22def8&&this[_0x262dc5(0x1c8)][_0x262dc5(0x213)](_0x450b1a,_0x363786,_0x22def8['id'],_0xa832af[_0x262dc5(0x1dc)]===_0x2b8b1d[_0x262dc5(0x1c3)]);break;}}}));}};_0x1d8466=_0xae37e7([_0x7c81b2(0x0,_0x2764e5[_0x8f8da4(0x208)](_0x1ce932[_0x8f8da4(0x201)])),_0x7c81b2(0x1,_0x2764e5[_0x8f8da4(0x208)](_0x1326db[_0x8f8da4(0x1e8)])),_0x7c81b2(0x2,_0x2764e5['Inject'](_0x2764e5[_0x8f8da4(0x23e)])),_0x7c81b2(0x3,_0x2764e5[_0x8f8da4(0x208)](_0x2764e5[_0x8f8da4(0x1ef)]))],_0x1d8466);const _0x1c77e8=_0x8f8da4(0x238),_0x5515c9={};var _0x118178=Object[_0x8f8da4(0x1fd)],_0x40818f=(_0xc7cae9,_0x20e855,_0x149ba3,_0x21e261)=>{const _0x27d5cd=_0x8f8da4;for(var _0x379faa=_0x21e261>0x1?void 0x0:_0x21e261?_0x118178(_0x20e855,_0x149ba3):_0x20e855,_0x591fab=_0xc7cae9[_0x27d5cd(0x21c)]-0x1,_0x345171;_0x591fab>=0x0;_0x591fab--)(_0x345171=_0xc7cae9[_0x591fab])&&(_0x379faa=_0x345171(_0x379faa)||_0x379faa);return _0x379faa;},_0xa13acf=(_0x19e448,_0x1a8215)=>(_0x366628,_0x43a788)=>_0x1a8215(_0x366628,_0x43a788,_0x19e448);function _0x11e21d(_0x355519,_0xf3488c){const _0x3ab8bf=_0x8f8da4,_0x173b4f=_0x355519[_0x3ab8bf(0x1c9)][0x0];return{..._0xf3488c,'id':_0x173b4f['replyId'],'resolved':_0x355519[_0x3ab8bf(0x1dc)]===0x1,'dT':_0x37dc3f(_0x173b4f[_0x3ab8bf(0x200)]),'personId':_0x173b4f[_0x3ab8bf(0x214)],'threadId':_0x173b4f[_0x3ab8bf(0x1ea)]};}function _0x27ea1e(_0x3fef39,_0x3c0351,_0x5b5902){const _0x1a032b=_0x8f8da4;var _0x2134a3,_0x46ffad;if(((_0x46ffad=(_0x2134a3=_0x3fef39==null?void 0x0:_0x3fef39[_0x1a032b(0x1c9)])==null?void 0x0:_0x2134a3[_0x1a032b(0x21c)])!=null?_0x46ffad:0x0)>0x0){const _0x441481=(_0x360f04,_0x79614)=>({'id':_0x360f04['replyId'],'threadId':_0x360f04['threadId'],'dT':_0x37dc3f(_0x360f04[_0x1a032b(0x200)]),'personId':_0x360f04[_0x1a032b(0x214)],'resolved':_0x3fef39['solved']===_0x2b8b1d[_0x1a032b(0x1c3)],'unitId':_0x3c0351,'subUnitId':_0x5b5902,'text':JSON['parse'](_0x360f04['content']),'parentId':_0x79614}),_0x15afc5=_0x441481(_0x3fef39[_0x1a032b(0x1c9)][0x0]);return{..._0x15afc5,'children':_0x3fef39['replies'][_0x1a032b(0x222)](0x1)['map'](_0xfc969f=>_0x441481(_0xfc969f,_0x15afc5['id']))};}return null;}let _0x486f3b=class{constructor(_0x2a8029,_0x520a3b,_0x190e98){const _0x3a912b=_0x8f8da4;this[_0x3a912b(0x1c4)]=_0x2a8029,this[_0x3a912b(0x1c1)]=_0x520a3b,this[_0x3a912b(0x21b)]=_0x190e98;}async[_0x8f8da4(0x223)](_0xe746fe){const _0x43fb0d=_0x8f8da4;var _0x460908,_0x2fb447;const {parentId:_0x397220,unitId:_0x49ae66,text:_0x4736f1,threadId:_0x52b2f6}=_0xe746fe,_0x217814=(_0x2fb447=(_0x460908=_0x4736f1['customRanges'])==null?void 0x0:_0x460908[_0x43fb0d(0x1cf)](_0x125269=>_0x125269[_0x43fb0d(0x235)]===_0x2764e5['CustomRangeType']['COMMENT'])[_0x43fb0d(0x20f)](_0x498d87=>_0x498d87['rangeId']))!=null?_0x2fb447:[],_0x1057a1=JSON[_0x43fb0d(0x23a)](_0x4736f1),_0x1c9b8e=(await this[_0x43fb0d(0x21b)][_0x43fb0d(0x1f5)](_0x49ae66))[_0x43fb0d(0x1d1)]();if(_0x397220){const _0x21345b={'memberId':_0x1c9b8e,'unitId':_0x49ae66,'content':_0x1057a1,'mention':_0x217814,'threadId':_0x52b2f6},_0x2c461b=(await this[_0x43fb0d(0x1c4)][_0x43fb0d(0x230)](_0x43fb0d(0x22d)+_0x49ae66+_0x43fb0d(0x210),{'body':_0x21345b}))[_0x43fb0d(0x205)]['reply'];return{..._0xe746fe,'id':_0x2c461b[_0x43fb0d(0x1e6)],'dT':_0x2764e5[_0x43fb0d(0x217)](+_0x2c461b[_0x43fb0d(0x200)])['format'](_0x43fb0d(0x1d4)),'personId':_0x2c461b[_0x43fb0d(0x214)]};}else{const _0x534a59={'memberId':_0x1c9b8e,'unitId':_0x49ae66,'content':_0x1057a1,'mention':_0x217814},_0x4c37c7=await this[_0x43fb0d(0x1c4)][_0x43fb0d(0x230)](_0x43fb0d(0x22d)+_0x49ae66+_0x43fb0d(0x1c0),{'body':_0x534a59});return _0x11e21d(_0x4c37c7[_0x43fb0d(0x205)][_0x43fb0d(0x1e2)],_0xe746fe);}}async['updateComment'](_0x9db4ec){const _0x232436=_0x8f8da4;var _0x20a5fb,_0x523137;const {text:_0x13ca94,unitId:_0x1fba14}=_0x9db4ec,_0x2bf0ab=(_0x523137=(_0x20a5fb=_0x13ca94['customRanges'])==null?void 0x0:_0x20a5fb[_0x232436(0x1cf)](_0x2ca485=>_0x2ca485[_0x232436(0x235)]===_0x2764e5[_0x232436(0x207)]['COMMENT'])[_0x232436(0x20f)](_0x4c1696=>_0x4c1696[_0x232436(0x1e1)]))!=null?_0x523137:[],_0x261701=JSON[_0x232436(0x23a)](_0x13ca94),_0x552905=_0x9db4ec[_0x232436(0x1ea)],_0x5b7215=_0x9db4ec['id'],_0x4c0643={'memberId':(await this[_0x232436(0x21b)][_0x232436(0x1f5)](_0x1fba14))[_0x232436(0x1d1)](),'unitId':_0x1fba14,'threadId':_0x552905,'mention':_0x2bf0ab,'content':_0x261701,'replyId':_0x5b7215},_0x58be6b=await this[_0x232436(0x1c4)][_0x232436(0x230)]('/universer-api/comment/unit/'+_0x1fba14+_0x232436(0x1d6),{'body':_0x4c0643});return!_0x58be6b[_0x232436(0x205)][_0x232436(0x1d8)]||_0x58be6b['body'][_0x232436(0x1d8)]['code']===0x1;}async[_0x8f8da4(0x213)](_0x3a97d4){const _0x229453=_0x8f8da4,{unitId:_0xdc1e3}=_0x3a97d4,_0x4555d1=_0x3a97d4[_0x229453(0x1ea)],_0xb64be={'memberId':this[_0x229453(0x1c1)][_0x229453(0x1fa)]()[_0x229453(0x227)],'unitId':_0xdc1e3,'threadId':_0x4555d1,'solved':_0x3a97d4['resolved']?_0x2b8b1d[_0x229453(0x1c3)]:_0x2b8b1d[_0x229453(0x22e)]},_0x2959d9=await this[_0x229453(0x1c4)][_0x229453(0x230)](_0x229453(0x22d)+_0xdc1e3+_0x229453(0x215),{'body':_0xb64be});return!_0x2959d9[_0x229453(0x205)][_0x229453(0x1d8)]||_0x2959d9[_0x229453(0x205)][_0x229453(0x1d8)][_0x229453(0x218)]===0x1;}async[_0x8f8da4(0x1e4)](_0x354871,_0x9431b3,_0xa117d4,_0x56cba0){const _0x27a6c3=_0x8f8da4,_0x26d266={'memberId':(await this[_0x27a6c3(0x21b)][_0x27a6c3(0x1f5)](_0x354871))['getMemberID'](),'threadId':_0xa117d4,'replyId':_0x56cba0,'unitId':_0x354871},_0x2be28b=await this[_0x27a6c3(0x1c4)][_0x27a6c3(0x230)]('/universer-api/comment/unit/'+_0x354871+'/delete',{'body':_0x26d266});return!_0x2be28b[_0x27a6c3(0x205)][_0x27a6c3(0x1d8)]||_0x2be28b['body'][_0x27a6c3(0x1d8)][_0x27a6c3(0x218)]===0x1;}async[_0x8f8da4(0x1e7)](_0x1fac75,_0x1e74e5,_0x2a59bf){const _0x33be0e=_0x8f8da4,_0x48085f={'unitId':_0x1fac75,'threadId':_0x2a59bf},_0x247148=await this[_0x33be0e(0x1c4)][_0x33be0e(0x230)](_0x33be0e(0x22d)+_0x1fac75+'/list',{'body':_0x48085f}),_0x5c7746=_0x2a59bf['map'](_0x3e1e18=>_0x27ea1e(_0x247148[_0x33be0e(0x205)]['comments'][_0x3e1e18],_0x1fac75,_0x1e74e5))[_0x33be0e(0x1cf)](Boolean);return Object[_0x33be0e(0x1fb)](_0x247148[_0x33be0e(0x205)][_0x33be0e(0x22b)])[_0x33be0e(0x1de)](_0x2f014a=>{this['_userService']['addUser'](_0x2f014a);}),_0x5c7746;}[_0x8f8da4(0x1f6)](_0x307dd3){const _0xf2ad6=_0x8f8da4;return{'id':_0x307dd3['id'],'threadId':_0x307dd3[_0xf2ad6(0x1ea)],'ref':_0x307dd3['ref']};}};_0x486f3b=_0x40818f([_0xa13acf(0x0,_0x2764e5[_0x8f8da4(0x208)](_0x23f582[_0x8f8da4(0x233)])),_0xa13acf(0x1,_0x2764e5[_0x8f8da4(0x208)](_0x2764e5['UserManagerService'])),_0xa13acf(0x2,_0x2764e5['Inject'](_0x1ce932['CollaborationSessionService']))],_0x486f3b);var _0x44bc2b=Object[_0x8f8da4(0x1fd)],_0xe960d7=(_0x12eef0,_0x2be8f2,_0x4e397e,_0x1b6995)=>{for(var _0x378887=_0x1b6995>0x1?void 0x0:_0x1b6995?_0x44bc2b(_0x2be8f2,_0x4e397e):_0x2be8f2,_0xb37d08=_0x12eef0['length']-0x1,_0x559318;_0xb37d08>=0x0;_0xb37d08--)(_0x559318=_0x12eef0[_0xb37d08])&&(_0x378887=_0x559318(_0x378887)||_0x378887);return _0x378887;},_0x1ab3ea=(_0x446bc2,_0x2bb984)=>(_0x4de4bc,_0x5b5184)=>_0x2bb984(_0x4de4bc,_0x5b5184,_0x446bc2);let _0xc789e6=class extends _0x2764e5[_0x8f8da4(0x1cd)]{constructor(_0x16087a,_0x225d47){const _0x28d8dd=_0x8f8da4;super(),this['_threadCommentDataSourceService']=_0x16087a,this[_0x28d8dd(0x225)]=_0x225d47,this['_initDataSource']();}['_initDataSource'](){const _0x4cc1e6=_0x8f8da4;this[_0x4cc1e6(0x22c)][_0x4cc1e6(0x1df)]=this[_0x4cc1e6(0x225)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0xc789e6=_0xe960d7([_0x1ab3ea(0x0,_0x1326db[_0x8f8da4(0x1f3)]),_0x1ab3ea(0x1,_0x2764e5[_0x8f8da4(0x208)](_0x486f3b))],_0xc789e6);var _0x10bf96=Object[_0x8f8da4(0x23f)],_0x22a4c2=Object[_0x8f8da4(0x1fd)],_0x42790c=(_0x128903,_0x337078,_0xd69cec)=>_0x337078 in _0x128903?_0x10bf96(_0x128903,_0x337078,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd69cec}):_0x128903[_0x337078]=_0xd69cec,_0x17cec2=(_0x429f1a,_0x555ce3,_0x2c8f46,_0x1a4821)=>{for(var _0x5228aa=_0x1a4821>0x1?void 0x0:_0x1a4821?_0x22a4c2(_0x555ce3,_0x2c8f46):_0x555ce3,_0x418df1=_0x429f1a['length']-0x1,_0x559782;_0x418df1>=0x0;_0x418df1--)(_0x559782=_0x429f1a[_0x418df1])&&(_0x5228aa=_0x559782(_0x5228aa)||_0x5228aa);return _0x5228aa;},_0x56d4a7=(_0x51831a,_0x5e252b)=>(_0xdb230b,_0x31fedb)=>_0x5e252b(_0xdb230b,_0x31fedb,_0x51831a),_0x282c90=(_0x1e51e2,_0x55b0c2,_0x2e5e3d)=>_0x42790c(_0x1e51e2,typeof _0x55b0c2!=_0x8f8da4(0x1cb)?_0x55b0c2+'':_0x55b0c2,_0x2e5e3d);_0x1c69aa[_0x8f8da4(0x21d)]=class extends _0x2764e5['Plugin']{constructor(_0x5c9a31=_0x5515c9,_0x595e5e,_0x130e5b){const _0x39ccb6=_0x8f8da4;super(),this[_0x39ccb6(0x1fc)]=_0x5c9a31,this[_0x39ccb6(0x1c2)]=_0x595e5e,this[_0x39ccb6(0x22f)]=_0x130e5b;const {..._0x6acc31}=_0x2764e5['merge']({},_0x5515c9,this[_0x39ccb6(0x1fc)]);this[_0x39ccb6(0x22f)][_0x39ccb6(0x234)](_0x1c77e8,_0x6acc31);}['onStarting'](){const _0x4fdc35=_0x8f8da4;[[_0x486f3b],[_0xc789e6],[_0x1d8466]][_0x4fdc35(0x1de)](_0x2cb39e=>{const _0x5a0ecd=_0x4fdc35;this['_injector'][_0x5a0ecd(0x1f8)](_0x2cb39e);});}['onReady'](){const _0xfb830b=_0x8f8da4;this[_0xfb830b(0x1c2)][_0xfb830b(0x232)](_0xc789e6),this[_0xfb830b(0x1c2)][_0xfb830b(0x232)](_0x1d8466);}},_0x282c90(_0x1c69aa['UniverThreadCommentDataSourcePlugin'],_0x8f8da4(0x236),_0x1d809b),_0x282c90(_0x1c69aa['UniverThreadCommentDataSourcePlugin'],'type',_0x2764e5[_0x8f8da4(0x1ff)]['UNIVER_UNKNOWN']),_0x1c69aa['UniverThreadCommentDataSourcePlugin']=_0x17cec2([_0x2764e5[_0x8f8da4(0x1bf)](_0x544142[_0x8f8da4(0x1d9)],_0x1ce932[_0x8f8da4(0x1eb)],_0x18806b[_0x8f8da4(0x1ca)]),_0x56d4a7(0x1,_0x2764e5['Inject'](_0x2764e5[_0x8f8da4(0x1ef)])),_0x56d4a7(0x2,_0x2764e5[_0x8f8da4(0x1dd)])],_0x1c69aa[_0x8f8da4(0x21d)]),Object[_0x8f8da4(0x23f)](_0x1c69aa,Symbol[_0x8f8da4(0x1f4)],{'value':_0x8f8da4(0x1f9)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.10.6-experimental.20250904-
|
|
3
|
+
"version": "0.10.6-experimental.20250904-9591d16",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.10.6-experimental.20250904-
|
|
49
|
-
"@univerjs-pro/license": "0.10.6-experimental.20250904-
|
|
50
|
-
"@univerjs/core": "0.10.6-experimental.20250904-
|
|
51
|
-
"@univerjs/network": "0.10.6-experimental.20250904-
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.10.6-experimental.20250904-
|
|
54
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.10.6-experimental.20250904-9591d16",
|
|
49
|
+
"@univerjs-pro/license": "0.10.6-experimental.20250904-9591d16",
|
|
50
|
+
"@univerjs/core": "0.10.6-experimental.20250904-9591d16",
|
|
51
|
+
"@univerjs/network": "0.10.6-experimental.20250904-9591d16",
|
|
52
|
+
"@univerjs/thread-comment": "0.10.6-experimental.20250904-9591d16",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.10.6-experimental.20250904-9591d16",
|
|
54
|
+
"@univerjs/protocol": "0.1.47-alpha.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|