@univerjs-pro/thread-comment-datasource 0.8.3-nightly.202507021607 → 0.8.3-nightly.202507031607
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x40798e=_0x1d14;function _0x1d14(_0x4a3085,_0x3fafd5){const _0x571d63=_0x571d();return _0x1d14=function(_0x1d14e6,_0x4e6e6f){_0x1d14e6=_0x1d14e6-0xef;let _0x326c10=_0x571d63[_0x1d14e6];return _0x326c10;},_0x1d14(_0x4a3085,_0x3fafd5);}(function(_0x578eb5,_0x21ba28){const _0xd19dcb=_0x1d14,_0x370dbe=_0x578eb5();while(!![]){try{const _0x25d615=-parseInt(_0xd19dcb(0x112))/0x1*(-parseInt(_0xd19dcb(0x127))/0x2)+-parseInt(_0xd19dcb(0x145))/0x3*(parseInt(_0xd19dcb(0x143))/0x4)+parseInt(_0xd19dcb(0x148))/0x5+-parseInt(_0xd19dcb(0x110))/0x6*(parseInt(_0xd19dcb(0x10a))/0x7)+parseInt(_0xd19dcb(0x119))/0x8+parseInt(_0xd19dcb(0x114))/0x9+-parseInt(_0xd19dcb(0x15e))/0xa*(parseInt(_0xd19dcb(0xf0))/0xb);if(_0x25d615===_0x21ba28)break;else _0x370dbe['push'](_0x370dbe['shift']());}catch(_0x513257){_0x370dbe['push'](_0x370dbe['shift']());}}}(_0x571d,0xeece1));Object[_0x40798e(0x108)](exports,Symbol[_0x40798e(0x128)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x40798e(0x14a);var I=(_0x38e03d=>(_0x38e03d[_0x38e03d[_0x40798e(0xff)]=0x0]=_0x40798e(0xff),_0x38e03d[_0x38e03d[_0x40798e(0x11f)]=0x1]='Solved',_0x38e03d[_0x38e03d['UNRECOGNIZED']=-0x1]=_0x40798e(0x155),_0x38e03d))(I||{}),v=(_0x10e497=>(_0x10e497[_0x10e497[_0x40798e(0x15d)]=0x0]=_0x40798e(0x15d),_0x10e497[_0x10e497[_0x40798e(0x11a)]=0x1]='Add',_0x10e497[_0x10e497[_0x40798e(0x13f)]=0x2]=_0x40798e(0x13f),_0x10e497[_0x10e497[_0x40798e(0x165)]=0x3]=_0x40798e(0x165),_0x10e497[_0x10e497[_0x40798e(0x130)]=0x4]='Delete',_0x10e497[_0x10e497[_0x40798e(0x14e)]=0x5]=_0x40798e(0x14e),_0x10e497[_0x10e497['UNRECOGNIZED']=-0x1]=_0x40798e(0x155),_0x10e497))(v||{});const f=_0x20964f=>c[_0x40798e(0x12f)](new Date(+_0x20964f))[_0x40798e(0x106)](_0x40798e(0x138)),R=async(_0x26322f,_0x1baf77)=>{const _0x5f0e7c=_0x40798e,_0x5f458a=_0x26322f[_0x5f0e7c(0x153)](c[_0x5f0e7c(0x11d)]),_0x640d3e=_0x26322f[_0x5f0e7c(0x153)](P[_0x5f0e7c(0xfe)]);_0x1baf77['forEach'](_0xbaadab=>{const _0x58b12f=_0x5f0e7c;_0x5f458a['getUser'](_0xbaadab)&&_0x1baf77[_0x58b12f(0x137)](_0xbaadab);}),_0x1baf77[_0x5f0e7c(0x140)]&&(await _0x640d3e[_0x5f0e7c(0x153)](_0x5f0e7c(0x154),{'params':{'userIDs':[..._0x1baf77]}}))[_0x5f0e7c(0x158)][_0x5f0e7c(0x13a)][_0x5f0e7c(0x163)](_0x2d7c41=>{_0x2d7c41&&_0x5f458a['addUser'](_0x2d7c41);});};var $=Object[_0x40798e(0xf1)],E=(_0x4b5627,_0x474e67,_0xe68e05,_0x3ac944)=>{const _0x527257=_0x40798e;for(var _0x5145f7=_0x3ac944>0x1?void 0x0:_0x3ac944?$(_0x474e67,_0xe68e05):_0x474e67,_0x558e4d=_0x4b5627[_0x527257(0x11b)]-0x1,_0x3fade1;_0x558e4d>=0x0;_0x558e4d--)(_0x3fade1=_0x4b5627[_0x558e4d])&&(_0x5145f7=_0x3fade1(_0x5145f7)||_0x5145f7);return _0x5145f7;},S=(_0x4166ae,_0x2f6fba)=>(_0x158919,_0x55d19a)=>_0x2f6fba(_0x158919,_0x55d19a,_0x4166ae);function _0x571d(){const _0x3699d1=['toStringTag','_threadCommentDataSourceService','error','map','thread-comment-data-source.config','post','reply','dayjs','Delete','_sessionService','comments','UniverLicensePlugin','Inject','UniverCollaborationClientPlugin','code','delete','YYYY/MM/DD\x20HH:mm','createTimestamp','users','DependentOn','_commentService','replies','_userService','Reply','size','getComment','resolved','8siAPBN','syncUpdateMutationToColla','2568219RCCGXe','personId','stringify','4139390vZUVJw','/solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/add','/reply','IConfigService','Solve','merge','/list','CollaborationSessionService','deleteComment','get','/universer-api/user/list','UNRECOGNIZED','content','user','body','getUnit','COMMENT','Injector','Plugin','Unknown','11630gMQJgq','rangeId','/universer-api/comment/unit/','_injector','addUser','forEach','resolveComment','Edit','payload','getMemberID','type','replyId','filter','132xQxwgj','getOwnPropertyDescriptor','saveCommentToSnapshot','_config','/delete','disposeWithMe','subscribe','addComment','userID','userId','threadId','UniverThreadCommentUIPlugin','solved','root','HTTPService','OpenOrReOpen','onStarting','CommentService','add','pluginName','pipe','ThreadCommentModel','format','parse','defineProperty','getCurrentUser','231CdgOch','UniverThreadCommentDataSourcePlugin','_init','parentId','IThreadCommentDataSourceService','_initUserSync','255174MIdWnV','_threadCommentDataSource','347828FDmCyR','updateComment','13768101MNbulV','slice','values','requireSession','onReady','8435048YzSfNt','Add','length','rangeType','UserManagerService','_threadCommentModel','Solved','customRanges','Disposable','listComments','_initDataSource','_httpService','/edit','CustomRangeType','4pIdeRO'];_0x571d=function(){return _0x3699d1;};return _0x571d();}let p=class extends c['Disposable']{constructor(_0x47dc7c,_0x20d08f,_0x1bf74c,_0x36ef46){const _0x10350d=_0x40798e;super(),this[_0x10350d(0x13c)]=_0x47dc7c,this[_0x10350d(0x11e)]=_0x20d08f,this[_0x10350d(0x13e)]=_0x1bf74c,this[_0x10350d(0x161)]=_0x36ef46,this[_0x10350d(0x10c)](),this['_initUserSync']();}[_0x40798e(0x10f)](){const _0x35f514=_0x40798e;this[_0x35f514(0xf5)](this[_0x35f514(0x11e)]['commentUpdate$'][_0x35f514(0x104)](w['bufferTime'](0x10))[_0x35f514(0xf6)](_0x14ccf4=>{const _0x623c4f=_0x35f514,_0xeeaed6=new Set();_0x14ccf4[_0x623c4f(0x163)](_0x5538cf=>{const _0x1102c3=_0x623c4f;switch(_0x5538cf['type']){case _0x1102c3(0x102):{const _0x3dcc8b=_0x5538cf[_0x1102c3(0x166)][_0x1102c3(0x146)];_0xeeaed6[_0x1102c3(0x102)](_0x3dcc8b);break;}}}),R(this[_0x623c4f(0x161)],_0xeeaed6);}));}['_init'](){const _0x3f43e3=_0x40798e;this['disposeWithMe'](this[_0x3f43e3(0x13c)]['commentUpdate$']['subscribe'](async _0xa15d29=>{const _0x443c6e=_0x3f43e3;var _0x446610,_0x2d9cf0,_0x1360c5,_0x1d0ad9;const _0x3bb8af=(_0x446610=this[_0x443c6e(0x11e)]['getUnit'](_0xa15d29['unitId'])['find'](_0x1b07b1=>_0x1b07b1['threadId']===_0xa15d29[_0x443c6e(0xfa)]))==null?void 0x0:_0x446610[_0x443c6e(0xfd)];if(!_0x3bb8af)return;const {unitId:_0x16220d,subUnitId:_0x4b8359}=_0x3bb8af;switch(_0xa15d29[_0x443c6e(0x157)]&&this['_userService'][_0x443c6e(0x162)](_0xa15d29[_0x443c6e(0x157)]),_0xa15d29[_0x443c6e(0x168)]){case v[_0x443c6e(0x11a)]:break;case v[_0x443c6e(0x13f)]:{this[_0x443c6e(0x11e)][_0x443c6e(0xf7)](_0x16220d,_0x4b8359,{'unitId':_0x16220d,'subUnitId':_0x4b8359,'ref':'','id':_0xa15d29[_0x443c6e(0x169)],'dT':f(+_0xa15d29['createTimestamp']),'threadId':_0xa15d29['threadId'],'personId':(_0x1360c5=(_0x2d9cf0=_0xa15d29[_0x443c6e(0x157)])==null?void 0x0:_0x2d9cf0[_0x443c6e(0xf8)])!=null?_0x1360c5:_0xa15d29[_0x443c6e(0xf9)],'text':JSON[_0x443c6e(0x107)](_0xa15d29['content']),'parentId':_0x3bb8af['id']});break;}case v[_0x443c6e(0x130)]:{const _0x1d17f1=this['_threadCommentModel'][_0x443c6e(0x141)](_0x16220d,_0x4b8359,_0xa15d29[_0x443c6e(0x169)]);_0x1d17f1&&_0x1d17f1[_0x443c6e(0x10d)]&&this['_threadCommentModel'][_0x443c6e(0x152)](_0x16220d,_0x4b8359,_0xa15d29['replyId']);break;}case v[_0x443c6e(0x165)]:{this['_threadCommentModel'][_0x443c6e(0x113)](_0x16220d,_0x4b8359,{'commentId':_0xa15d29[_0x443c6e(0x169)],'text':JSON[_0x443c6e(0x107)](_0xa15d29[_0x443c6e(0x156)])});break;}case v['Solve']:{const _0x49b380=(_0x1d0ad9=this[_0x443c6e(0x11e)][_0x443c6e(0x159)](_0xa15d29['unitId'])['find'](_0x355804=>_0x355804[_0x443c6e(0xfa)]===_0xa15d29[_0x443c6e(0xfa)]))==null?void 0x0:_0x1d0ad9[_0x443c6e(0xfd)];_0x49b380&&this[_0x443c6e(0x11e)][_0x443c6e(0x164)](_0x16220d,_0x4b8359,_0x49b380['id'],_0xa15d29[_0x443c6e(0xfc)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x40798e(0x134)](b[_0x40798e(0x101)])),S(0x1,c[_0x40798e(0x134)](M[_0x40798e(0x105)])),S(0x2,c['Inject'](c[_0x40798e(0x11d)])),S(0x3,c['Inject'](c[_0x40798e(0x15b)]))],p);const q=_0x40798e(0x12c),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x15197b,_0x2c11d2,_0x1f479f,_0x4fdae4)=>{const _0x4c25da=_0x40798e;for(var _0x56e961=_0x4fdae4>0x1?void 0x0:_0x4fdae4?A(_0x2c11d2,_0x1f479f):_0x2c11d2,_0x33fafc=_0x15197b[_0x4c25da(0x11b)]-0x1,_0x323baa;_0x33fafc>=0x0;_0x33fafc--)(_0x323baa=_0x15197b[_0x33fafc])&&(_0x56e961=_0x323baa(_0x56e961)||_0x56e961);return _0x56e961;},_=(_0x5861a6,_0x5b34ca)=>(_0x23bd4d,_0x5220a5)=>_0x5b34ca(_0x23bd4d,_0x5220a5,_0x5861a6);function Y(_0x13c486,_0x430008){const _0x21c137=_0x40798e,_0x4d6dd8=_0x13c486[_0x21c137(0x13d)][0x0];return{..._0x430008,'id':_0x4d6dd8['replyId'],'resolved':_0x13c486[_0x21c137(0xfc)]===0x1,'dT':f(_0x4d6dd8[_0x21c137(0x139)]),'personId':_0x4d6dd8[_0x21c137(0xf9)],'threadId':_0x4d6dd8[_0x21c137(0xfa)]};}function G(_0x3183ec,_0x813753,_0x516be9){const _0x4267c2=_0x40798e;var _0x41556e,_0x214a21;if(((_0x214a21=(_0x41556e=_0x3183ec==null?void 0x0:_0x3183ec[_0x4267c2(0x13d)])==null?void 0x0:_0x41556e[_0x4267c2(0x11b)])!=null?_0x214a21:0x0)>0x0){const _0x39cbf0=(_0x58f218,_0x479c13)=>({'id':_0x58f218['replyId'],'threadId':_0x58f218[_0x4267c2(0xfa)],'dT':f(_0x58f218['createTimestamp']),'personId':_0x58f218[_0x4267c2(0xf9)],'resolved':_0x3183ec[_0x4267c2(0xfc)]===I[_0x4267c2(0x11f)],'unitId':_0x813753,'subUnitId':_0x516be9,'text':JSON['parse'](_0x58f218[_0x4267c2(0x156)]),'parentId':_0x479c13}),_0x29ff4a=_0x39cbf0(_0x3183ec[_0x4267c2(0x13d)][0x0]);return{..._0x29ff4a,'children':_0x3183ec['replies'][_0x4267c2(0x115)](0x1)[_0x4267c2(0x12b)](_0x32615b=>_0x39cbf0(_0x32615b,_0x29ff4a['id']))};}return null;}let g=class{constructor(_0x5139be,_0xc72a93,_0x12259a,_0x4ec1de){const _0x226839=_0x40798e;this[_0x226839(0x124)]=_0x5139be,this[_0x226839(0x13e)]=_0xc72a93,this[_0x226839(0x131)]=_0x12259a,this[_0x226839(0x161)]=_0x4ec1de;}async[_0x40798e(0xf7)](_0x45fe02){const _0x923de7=_0x40798e;var _0x186aa9,_0x13eda2;const {parentId:_0x5dfb16,unitId:_0x4932c3,text:_0x3a2aa1,threadId:_0x488f5d}=_0x45fe02,_0x8c78a2=(_0x13eda2=(_0x186aa9=_0x3a2aa1[_0x923de7(0x120)])==null?void 0x0:_0x186aa9[_0x923de7(0xef)](_0x44ce20=>_0x44ce20[_0x923de7(0x11c)]===c[_0x923de7(0x126)][_0x923de7(0x15a)])[_0x923de7(0x12b)](_0x553e8a=>_0x553e8a[_0x923de7(0x15f)]))!=null?_0x13eda2:[],_0x369111=JSON['stringify'](_0x3a2aa1),_0x174b2d=(await this[_0x923de7(0x131)][_0x923de7(0x117)](_0x4932c3))[_0x923de7(0x167)]();if(_0x5dfb16){const _0x3d8610={'memberId':_0x174b2d,'unitId':_0x4932c3,'content':_0x369111,'mention':_0x8c78a2,'threadId':_0x488f5d},_0x49011c=(await this['_httpService'][_0x923de7(0x12d)](_0x923de7(0x160)+_0x4932c3+_0x923de7(0x14c),{'body':_0x3d8610}))['body'][_0x923de7(0x12e)];return{..._0x45fe02,'id':_0x49011c[_0x923de7(0x169)],'dT':c[_0x923de7(0x12f)](+_0x49011c[_0x923de7(0x139)])[_0x923de7(0x106)](_0x923de7(0x138)),'personId':_0x49011c['userId']};}else{const _0x3aac8c={'memberId':_0x174b2d,'unitId':_0x4932c3,'content':_0x369111,'mention':_0x8c78a2},_0x26d62f=await this[_0x923de7(0x124)]['post'](_0x923de7(0x160)+_0x4932c3+_0x923de7(0x14b),{'body':_0x3aac8c});return Y(_0x26d62f[_0x923de7(0x158)]['comment'],_0x45fe02);}}async['updateComment'](_0x188d77){const _0x218c4b=_0x40798e;var _0x3941b3,_0x570723;const {text:_0x584b27,unitId:_0x467f12}=_0x188d77,_0x5412e9=(_0x570723=(_0x3941b3=_0x584b27[_0x218c4b(0x120)])==null?void 0x0:_0x3941b3[_0x218c4b(0xef)](_0x15ecb6=>_0x15ecb6['rangeType']===c['CustomRangeType']['COMMENT'])['map'](_0x164968=>_0x164968['rangeId']))!=null?_0x570723:[],_0x356753=JSON[_0x218c4b(0x147)](_0x584b27),_0x57698f=_0x188d77[_0x218c4b(0xfa)],_0x4b1f8b=_0x188d77['id'],_0x65921e={'memberId':(await this[_0x218c4b(0x131)][_0x218c4b(0x117)](_0x467f12))['getMemberID'](),'unitId':_0x467f12,'threadId':_0x57698f,'mention':_0x5412e9,'content':_0x356753,'replyId':_0x4b1f8b},_0x4e2ec5=await this['_httpService'][_0x218c4b(0x12d)](_0x218c4b(0x160)+_0x467f12+_0x218c4b(0x125),{'body':_0x65921e});return!_0x4e2ec5[_0x218c4b(0x158)]['error']||_0x4e2ec5[_0x218c4b(0x158)]['error']['code']===0x1;}async[_0x40798e(0x164)](_0x3c2cf5){const _0x55e2a2=_0x40798e,{unitId:_0x185239}=_0x3c2cf5,_0x40cb72=_0x3c2cf5['threadId'],_0x113b15={'memberId':this[_0x55e2a2(0x13e)][_0x55e2a2(0x109)]()['userID'],'unitId':_0x185239,'threadId':_0x40cb72,'solved':_0x3c2cf5[_0x55e2a2(0x142)]?I[_0x55e2a2(0x11f)]:I[_0x55e2a2(0xff)]},_0x114d0d=await this[_0x55e2a2(0x124)][_0x55e2a2(0x12d)](_0x55e2a2(0x160)+_0x185239+_0x55e2a2(0x149),{'body':_0x113b15});return!_0x114d0d[_0x55e2a2(0x158)][_0x55e2a2(0x12a)]||_0x114d0d['body'][_0x55e2a2(0x12a)]['code']===0x1;}async[_0x40798e(0x152)](_0x33afcc,_0x4e0a32,_0x1071c6,_0x2bde7f){const _0x266519=_0x40798e,_0x4c5fe8={'memberId':(await this[_0x266519(0x131)][_0x266519(0x117)](_0x33afcc))[_0x266519(0x167)](),'threadId':_0x1071c6,'replyId':_0x2bde7f,'unitId':_0x33afcc},_0x137f76=await this[_0x266519(0x124)][_0x266519(0x12d)](_0x266519(0x160)+_0x33afcc+_0x266519(0xf4),{'body':_0x4c5fe8});return!_0x137f76['body'][_0x266519(0x12a)]||_0x137f76[_0x266519(0x158)][_0x266519(0x12a)][_0x266519(0x136)]===0x1;}async[_0x40798e(0x122)](_0x5b8429,_0x306226,_0x1370f1){const _0x35e9d3=_0x40798e,_0x1e7291={'unitId':_0x5b8429,'threadId':_0x1370f1},_0x35b716=await this['_httpService']['post'](_0x35e9d3(0x160)+_0x5b8429+_0x35e9d3(0x150),{'body':_0x1e7291}),_0x22f33b=_0x1370f1[_0x35e9d3(0x12b)](_0x2447ef=>G(_0x35b716['body'][_0x35e9d3(0x132)][_0x2447ef],_0x5b8429,_0x306226))[_0x35e9d3(0xef)](Boolean);return Object[_0x35e9d3(0x116)](_0x35b716[_0x35e9d3(0x158)][_0x35e9d3(0x13a)])[_0x35e9d3(0x163)](_0x3e0a5a=>{const _0x1323d8=_0x35e9d3;this[_0x1323d8(0x13e)][_0x1323d8(0x162)](_0x3e0a5a);}),_0x22f33b;}[_0x40798e(0xf2)](_0x56df15){const _0x7098f4=_0x40798e;return{'id':_0x56df15['id'],'threadId':_0x56df15[_0x7098f4(0xfa)],'ref':_0x56df15['ref']};}};g=x([_(0x0,c['Inject'](P[_0x40798e(0xfe)])),_(0x1,c['Inject'](c[_0x40798e(0x11d)])),_(0x2,c[_0x40798e(0x134)](b[_0x40798e(0x151)])),_(0x3,c[_0x40798e(0x134)](c['Injector']))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x5e976f,_0x3b490c,_0x3467fa,_0x5db027)=>{for(var _0x1fb190=_0x5db027>0x1?void 0x0:_0x5db027?H(_0x3b490c,_0x3467fa):_0x3b490c,_0x599c8b=_0x5e976f['length']-0x1,_0x5d1380;_0x599c8b>=0x0;_0x599c8b--)(_0x5d1380=_0x5e976f[_0x599c8b])&&(_0x1fb190=_0x5d1380(_0x1fb190)||_0x1fb190);return _0x1fb190;},y=(_0x2dd6d0,_0x49767c)=>(_0x36e196,_0x4c2c78)=>_0x49767c(_0x36e196,_0x4c2c78,_0x2dd6d0);let C=class extends c[_0x40798e(0x121)]{constructor(_0x39aa03,_0x4bb526){const _0x218095=_0x40798e;super(),this[_0x218095(0x129)]=_0x39aa03,this[_0x218095(0x111)]=_0x4bb526,this[_0x218095(0x123)]();}[_0x40798e(0x123)](){const _0x441661=_0x40798e;this[_0x441661(0x129)]['dataSource']=this[_0x441661(0x111)],this[_0x441661(0x129)][_0x441661(0x144)]=!0x1;}};C=J([y(0x0,M[_0x40798e(0x10e)]),y(0x1,c[_0x40798e(0x134)](g))],C);var F=Object[_0x40798e(0x108)],L=Object[_0x40798e(0xf1)],Z=(_0x259581,_0x1922c7,_0x1a80e3)=>_0x1922c7 in _0x259581?F(_0x259581,_0x1922c7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1a80e3}):_0x259581[_0x1922c7]=_0x1a80e3,W=(_0x2e8a60,_0x3ddae1,_0x14e091,_0x4699a0)=>{for(var _0xfe8abb=_0x4699a0>0x1?void 0x0:_0x4699a0?L(_0x3ddae1,_0x14e091):_0x3ddae1,_0x247c91=_0x2e8a60['length']-0x1,_0x635d6;_0x247c91>=0x0;_0x247c91--)(_0x635d6=_0x2e8a60[_0x247c91])&&(_0xfe8abb=_0x635d6(_0xfe8abb)||_0xfe8abb);return _0xfe8abb;},O=(_0x3a394e,_0xcea2f0)=>(_0x2995b5,_0x5b1d10)=>_0xcea2f0(_0x2995b5,_0x5b1d10,_0x3a394e),N=(_0x2d6e7b,_0x15ffe8,_0x309f17)=>Z(_0x2d6e7b,typeof _0x15ffe8!='symbol'?_0x15ffe8+'':_0x15ffe8,_0x309f17);exports[_0x40798e(0x10b)]=class extends c[_0x40798e(0x15c)]{constructor(_0x3973d3=D,_0x3628ae,_0x12a5a9){const _0x54dbb8=_0x40798e;super(),this[_0x54dbb8(0xf3)]=_0x3973d3,this[_0x54dbb8(0x161)]=_0x3628ae,this['_configService']=_0x12a5a9;const {..._0x5f376b}=c[_0x54dbb8(0x14f)]({},D,this[_0x54dbb8(0xf3)]);this['_configService']['setConfig'](q,_0x5f376b);}[_0x40798e(0x100)](){const _0x314986=_0x40798e;[[g],[C],[p]][_0x314986(0x163)](_0x541958=>{const _0x5d10bd=_0x314986;this[_0x5d10bd(0x161)]['add'](_0x541958);});}[_0x40798e(0x118)](){const _0x217db3=_0x40798e;this[_0x217db3(0x161)]['get'](C),this[_0x217db3(0x161)][_0x217db3(0x153)](p);}},N(exports[_0x40798e(0x10b)],_0x40798e(0x103),U),N(exports[_0x40798e(0x10b)],_0x40798e(0x168),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x40798e(0x13b)](j[_0x40798e(0xfb)],b[_0x40798e(0x135)],T[_0x40798e(0x133)]),O(0x1,c[_0x40798e(0x134)](c['Injector'])),O(0x2,c[_0x40798e(0x14d)])],exports[_0x40798e(0x10b)]);
|
|
1
|
+
'use strict';const _0x4e84ab=_0x23b9;(function(_0x216173,_0x45ee0c){const _0x5a95de=_0x23b9,_0x41541c=_0x216173();while(!![]){try{const _0x37a6d9=-parseInt(_0x5a95de(0x153))/0x1+parseInt(_0x5a95de(0x167))/0x2+parseInt(_0x5a95de(0x135))/0x3+parseInt(_0x5a95de(0x19f))/0x4*(-parseInt(_0x5a95de(0x132))/0x5)+-parseInt(_0x5a95de(0x146))/0x6*(-parseInt(_0x5a95de(0x12c))/0x7)+parseInt(_0x5a95de(0x136))/0x8*(parseInt(_0x5a95de(0x15e))/0x9)+-parseInt(_0x5a95de(0x152))/0xa*(parseInt(_0x5a95de(0x187))/0xb);if(_0x37a6d9===_0x45ee0c)break;else _0x41541c['push'](_0x41541c['shift']());}catch(_0x134a4f){_0x41541c['push'](_0x41541c['shift']());}}}(_0x3d9c,0xd890d));function _0x3d9c(){const _0x41624a=['Reply','_injector','pluginName','_commentService','Inject','dayjs','forEach','UserManagerService','commentUpdate$','dataSource','getMemberID','onReady','178004UpiZJo','parse','_initUserSync','users','Injector','HTTPService','values','defineProperty','slice','3878322ExRbck','resolveComment','_threadCommentDataSourceService','get','size','code','45pubZsk','Plugin','pipe','5085822ncKEpM','8tlHjLR','disposeWithMe','content','/universer-api/user/list','Unknown','add','replies','userID','Add','_configService','_threadCommentDataSource','subscribe','/universer-api/comment/unit/','delete','Edit','payload','6WlExkU','_httpService','UniverThreadCommentUIPlugin','getOwnPropertyDescriptor','_init','find','getUser','getUnit','resolved','Disposable','comment','map','26135930mZAFrN','1378159oZjLHl','CollaborationSessionService','OpenOrReOpen','/delete','ThreadCommentModel','comments','updateComment','requireSession','post','Solved','onStarting','11839194xvndzi','user','/list','parentId','replyId','ref','addComment','UniverInstanceType','UNRECOGNIZED','3429056nxNqQJ','toStringTag','/add','createTimestamp','rangeId','error','IConfigService','getComment','CustomRangeType','root','_sessionService','YYYY/MM/DD\x20HH:mm','Solve','Module','filter','_initDataSource','saveCommentToSnapshot','_userService','getCurrentUser','stringify','addUser','type','unitId','deleteComment','_config','body','thread-comment-data-source.config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','symbol','_threadCommentModel','userId','/solved','11UIDVPP','Delete','CommentService','setConfig','format','UniverThreadCommentDataSourcePlugin','rangeType','DependentOn','threadId','reply','solved','length'];_0x3d9c=function(){return _0x41624a;};return _0x3d9c();}Object['defineProperty'](exports,Symbol[_0x4e84ab(0x168)],{'value':_0x4e84ab(0x174)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x4e84ab(0x182);var I=(_0x4d83ae=>(_0x4d83ae[_0x4d83ae[_0x4e84ab(0x155)]=0x0]=_0x4e84ab(0x155),_0x4d83ae[_0x4d83ae[_0x4e84ab(0x15c)]=0x1]=_0x4e84ab(0x15c),_0x4d83ae[_0x4d83ae[_0x4e84ab(0x166)]=-0x1]=_0x4e84ab(0x166),_0x4d83ae))(I||{}),v=(_0xb3ccd=>(_0xb3ccd[_0xb3ccd[_0x4e84ab(0x13a)]=0x0]=_0x4e84ab(0x13a),_0xb3ccd[_0xb3ccd[_0x4e84ab(0x13e)]=0x1]='Add',_0xb3ccd[_0xb3ccd[_0x4e84ab(0x193)]=0x2]=_0x4e84ab(0x193),_0xb3ccd[_0xb3ccd[_0x4e84ab(0x144)]=0x3]=_0x4e84ab(0x144),_0xb3ccd[_0xb3ccd['Delete']=0x4]=_0x4e84ab(0x188),_0xb3ccd[_0xb3ccd[_0x4e84ab(0x173)]=0x5]=_0x4e84ab(0x173),_0xb3ccd[_0xb3ccd[_0x4e84ab(0x166)]=-0x1]=_0x4e84ab(0x166),_0xb3ccd))(v||{});const f=_0xf064c=>c[_0x4e84ab(0x198)](new Date(+_0xf064c))[_0x4e84ab(0x18b)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x34dc9a,_0x5305c9)=>{const _0x381676=_0x4e84ab,_0x2e8d2b=_0x34dc9a[_0x381676(0x12f)](c[_0x381676(0x19a)]),_0xaa0491=_0x34dc9a['get'](P['HTTPService']);_0x5305c9['forEach'](_0x4ee907=>{const _0x11b5a1=_0x381676;_0x2e8d2b[_0x11b5a1(0x14c)](_0x4ee907)&&_0x5305c9[_0x11b5a1(0x143)](_0x4ee907);}),_0x5305c9[_0x381676(0x130)]&&(await _0xaa0491[_0x381676(0x12f)](_0x381676(0x139),{'params':{'userIDs':[..._0x5305c9]}}))[_0x381676(0x180)][_0x381676(0x126)][_0x381676(0x199)](_0x2af014=>{const _0x20ea15=_0x381676;_0x2af014&&_0x2e8d2b[_0x20ea15(0x17b)](_0x2af014);});};var $=Object[_0x4e84ab(0x149)],E=(_0x1a7521,_0x3a3f61,_0x5ac869,_0xb636e6)=>{const _0x56cb84=_0x4e84ab;for(var _0x4be605=_0xb636e6>0x1?void 0x0:_0xb636e6?$(_0x3a3f61,_0x5ac869):_0x3a3f61,_0xb0ef9b=_0x1a7521[_0x56cb84(0x192)]-0x1,_0x4c8d65;_0xb0ef9b>=0x0;_0xb0ef9b--)(_0x4c8d65=_0x1a7521[_0xb0ef9b])&&(_0x4be605=_0x4c8d65(_0x4be605)||_0x4be605);return _0x4be605;},S=(_0xf9bfd2,_0x101af4)=>(_0x5e9be9,_0x2192b9)=>_0x101af4(_0x5e9be9,_0x2192b9,_0xf9bfd2);let p=class extends c[_0x4e84ab(0x14f)]{constructor(_0x5e6be0,_0x49e741,_0x466e51,_0x1f1645){const _0x26427c=_0x4e84ab;super(),this['_commentService']=_0x5e6be0,this[_0x26427c(0x184)]=_0x49e741,this[_0x26427c(0x178)]=_0x466e51,this[_0x26427c(0x194)]=_0x1f1645,this[_0x26427c(0x14a)](),this[_0x26427c(0x125)]();}[_0x4e84ab(0x125)](){const _0x8611d6=_0x4e84ab;this[_0x8611d6(0x137)](this['_threadCommentModel'][_0x8611d6(0x19b)][_0x8611d6(0x134)](w['bufferTime'](0x10))[_0x8611d6(0x141)](_0x5b9c4c=>{const _0x2da9e9=_0x8611d6,_0xafc9f8=new Set();_0x5b9c4c[_0x2da9e9(0x199)](_0x3bed3b=>{const _0x39749e=_0x2da9e9;switch(_0x3bed3b[_0x39749e(0x17c)]){case _0x39749e(0x13b):{const _0x1354e1=_0x3bed3b[_0x39749e(0x145)]['personId'];_0xafc9f8[_0x39749e(0x13b)](_0x1354e1);break;}}}),R(this['_injector'],_0xafc9f8);}));}[_0x4e84ab(0x14a)](){const _0x1bbe38=_0x4e84ab;this[_0x1bbe38(0x137)](this[_0x1bbe38(0x196)][_0x1bbe38(0x19b)][_0x1bbe38(0x141)](async _0x468e2d=>{const _0x51be95=_0x1bbe38;var _0x16cfaf,_0x1fd5c9,_0x507a82,_0xd1996d;const _0x18cf25=(_0x16cfaf=this[_0x51be95(0x184)][_0x51be95(0x14d)](_0x468e2d[_0x51be95(0x17d)])[_0x51be95(0x14b)](_0x46caad=>_0x46caad['threadId']===_0x468e2d[_0x51be95(0x18f)]))==null?void 0x0:_0x16cfaf[_0x51be95(0x170)];if(!_0x18cf25)return;const {unitId:_0x2a9d16,subUnitId:_0xa466e8}=_0x18cf25;switch(_0x468e2d[_0x51be95(0x15f)]&&this[_0x51be95(0x178)]['addUser'](_0x468e2d['user']),_0x468e2d[_0x51be95(0x17c)]){case v['Add']:break;case v[_0x51be95(0x193)]:{this['_threadCommentModel'][_0x51be95(0x164)](_0x2a9d16,_0xa466e8,{'unitId':_0x2a9d16,'subUnitId':_0xa466e8,'ref':'','id':_0x468e2d['replyId'],'dT':f(+_0x468e2d[_0x51be95(0x16a)]),'threadId':_0x468e2d['threadId'],'personId':(_0x507a82=(_0x1fd5c9=_0x468e2d['user'])==null?void 0x0:_0x1fd5c9['userID'])!=null?_0x507a82:_0x468e2d['userId'],'text':JSON[_0x51be95(0x1a0)](_0x468e2d[_0x51be95(0x138)]),'parentId':_0x18cf25['id']});break;}case v['Delete']:{const _0x52b5e1=this['_threadCommentModel'][_0x51be95(0x16e)](_0x2a9d16,_0xa466e8,_0x468e2d[_0x51be95(0x162)]);_0x52b5e1&&_0x52b5e1[_0x51be95(0x161)]&&this['_threadCommentModel'][_0x51be95(0x17e)](_0x2a9d16,_0xa466e8,_0x468e2d[_0x51be95(0x162)]);break;}case v['Edit']:{this[_0x51be95(0x184)]['updateComment'](_0x2a9d16,_0xa466e8,{'commentId':_0x468e2d[_0x51be95(0x162)],'text':JSON[_0x51be95(0x1a0)](_0x468e2d['content'])});break;}case v[_0x51be95(0x173)]:{const _0x59a7c5=(_0xd1996d=this['_threadCommentModel']['getUnit'](_0x468e2d[_0x51be95(0x17d)])['find'](_0xffed57=>_0xffed57['threadId']===_0x468e2d[_0x51be95(0x18f)]))==null?void 0x0:_0xd1996d[_0x51be95(0x170)];_0x59a7c5&&this['_threadCommentModel']['resolveComment'](_0x2a9d16,_0xa466e8,_0x59a7c5['id'],_0x468e2d['solved']===I[_0x51be95(0x15c)]);break;}}}));}};p=E([S(0x0,c[_0x4e84ab(0x197)](b[_0x4e84ab(0x189)])),S(0x1,c[_0x4e84ab(0x197)](M[_0x4e84ab(0x157)])),S(0x2,c[_0x4e84ab(0x197)](c['UserManagerService'])),S(0x3,c[_0x4e84ab(0x197)](c[_0x4e84ab(0x127)]))],p);const q=_0x4e84ab(0x181),D={};var A=Object[_0x4e84ab(0x149)],x=(_0x55e657,_0x4d15ea,_0x32dbb0,_0x592f4d)=>{const _0x4291b4=_0x4e84ab;for(var _0x372c4a=_0x592f4d>0x1?void 0x0:_0x592f4d?A(_0x4d15ea,_0x32dbb0):_0x4d15ea,_0x4056c0=_0x55e657[_0x4291b4(0x192)]-0x1,_0x2ba78c;_0x4056c0>=0x0;_0x4056c0--)(_0x2ba78c=_0x55e657[_0x4056c0])&&(_0x372c4a=_0x2ba78c(_0x372c4a)||_0x372c4a);return _0x372c4a;},_=(_0x2e5568,_0x745fcd)=>(_0x56a857,_0x28ede8)=>_0x745fcd(_0x56a857,_0x28ede8,_0x2e5568);function Y(_0x298ad9,_0x4a8ae0){const _0x244415=_0x4e84ab,_0x3c538a=_0x298ad9[_0x244415(0x13c)][0x0];return{..._0x4a8ae0,'id':_0x3c538a[_0x244415(0x162)],'resolved':_0x298ad9['solved']===0x1,'dT':f(_0x3c538a[_0x244415(0x16a)]),'personId':_0x3c538a[_0x244415(0x185)],'threadId':_0x3c538a[_0x244415(0x18f)]};}function G(_0x3124ce,_0x3011cf,_0x5bb8bd){const _0x267736=_0x4e84ab;var _0x45ff4e,_0x333ee6;if(((_0x333ee6=(_0x45ff4e=_0x3124ce==null?void 0x0:_0x3124ce[_0x267736(0x13c)])==null?void 0x0:_0x45ff4e['length'])!=null?_0x333ee6:0x0)>0x0){const _0x152e90=(_0x3bb274,_0x13cee0)=>({'id':_0x3bb274['replyId'],'threadId':_0x3bb274[_0x267736(0x18f)],'dT':f(_0x3bb274[_0x267736(0x16a)]),'personId':_0x3bb274[_0x267736(0x185)],'resolved':_0x3124ce[_0x267736(0x191)]===I[_0x267736(0x15c)],'unitId':_0x3011cf,'subUnitId':_0x5bb8bd,'text':JSON[_0x267736(0x1a0)](_0x3bb274[_0x267736(0x138)]),'parentId':_0x13cee0}),_0x832942=_0x152e90(_0x3124ce[_0x267736(0x13c)][0x0]);return{..._0x832942,'children':_0x3124ce[_0x267736(0x13c)][_0x267736(0x12b)](0x1)[_0x267736(0x151)](_0x2d5c0d=>_0x152e90(_0x2d5c0d,_0x832942['id']))};}return null;}let g=class{constructor(_0x8e07e9,_0x19bb23,_0xd024d9,_0x313050){const _0x19c56e=_0x4e84ab;this['_httpService']=_0x8e07e9,this['_userService']=_0x19bb23,this['_sessionService']=_0xd024d9,this[_0x19c56e(0x194)]=_0x313050;}async[_0x4e84ab(0x164)](_0x243777){const _0x349e9a=_0x4e84ab;var _0x40fcef,_0x1689d3;const {parentId:_0x1023f8,unitId:_0xa8571d,text:_0x55e2ed,threadId:_0x5dbbcd}=_0x243777,_0x58470c=(_0x1689d3=(_0x40fcef=_0x55e2ed['customRanges'])==null?void 0x0:_0x40fcef[_0x349e9a(0x175)](_0x46ff4d=>_0x46ff4d[_0x349e9a(0x18d)]===c[_0x349e9a(0x16f)]['COMMENT'])[_0x349e9a(0x151)](_0xef0184=>_0xef0184[_0x349e9a(0x16b)]))!=null?_0x1689d3:[],_0x2b201e=JSON['stringify'](_0x55e2ed),_0x205106=(await this['_sessionService']['requireSession'](_0xa8571d))[_0x349e9a(0x19d)]();if(_0x1023f8){const _0x239ef9={'memberId':_0x205106,'unitId':_0xa8571d,'content':_0x2b201e,'mention':_0x58470c,'threadId':_0x5dbbcd},_0x1e0f7b=(await this[_0x349e9a(0x147)][_0x349e9a(0x15b)]('/universer-api/comment/unit/'+_0xa8571d+'/reply',{'body':_0x239ef9}))['body'][_0x349e9a(0x190)];return{..._0x243777,'id':_0x1e0f7b['replyId'],'dT':c[_0x349e9a(0x198)](+_0x1e0f7b[_0x349e9a(0x16a)])['format'](_0x349e9a(0x172)),'personId':_0x1e0f7b['userId']};}else{const _0x21ba7b={'memberId':_0x205106,'unitId':_0xa8571d,'content':_0x2b201e,'mention':_0x58470c},_0x1c80f7=await this[_0x349e9a(0x147)][_0x349e9a(0x15b)](_0x349e9a(0x142)+_0xa8571d+_0x349e9a(0x169),{'body':_0x21ba7b});return Y(_0x1c80f7[_0x349e9a(0x180)][_0x349e9a(0x150)],_0x243777);}}async[_0x4e84ab(0x159)](_0x2ef49d){const _0x2d53bd=_0x4e84ab;var _0x2d18,_0x1e6576;const {text:_0x48e697,unitId:_0x32c95b}=_0x2ef49d,_0x50166c=(_0x1e6576=(_0x2d18=_0x48e697['customRanges'])==null?void 0x0:_0x2d18[_0x2d53bd(0x175)](_0x548f91=>_0x548f91[_0x2d53bd(0x18d)]===c[_0x2d53bd(0x16f)]['COMMENT'])['map'](_0x377eb1=>_0x377eb1[_0x2d53bd(0x16b)]))!=null?_0x1e6576:[],_0x25a1bf=JSON[_0x2d53bd(0x17a)](_0x48e697),_0x469105=_0x2ef49d[_0x2d53bd(0x18f)],_0x14ad60=_0x2ef49d['id'],_0x5c5272={'memberId':(await this[_0x2d53bd(0x171)]['requireSession'](_0x32c95b))[_0x2d53bd(0x19d)](),'unitId':_0x32c95b,'threadId':_0x469105,'mention':_0x50166c,'content':_0x25a1bf,'replyId':_0x14ad60},_0x10c2b8=await this[_0x2d53bd(0x147)]['post'](_0x2d53bd(0x142)+_0x32c95b+'/edit',{'body':_0x5c5272});return!_0x10c2b8[_0x2d53bd(0x180)][_0x2d53bd(0x16c)]||_0x10c2b8['body'][_0x2d53bd(0x16c)]['code']===0x1;}async[_0x4e84ab(0x12d)](_0x27ab3e){const _0x65785a=_0x4e84ab,{unitId:_0x47d61c}=_0x27ab3e,_0x18414d=_0x27ab3e[_0x65785a(0x18f)],_0x5a6ac9={'memberId':this[_0x65785a(0x178)][_0x65785a(0x179)]()[_0x65785a(0x13d)],'unitId':_0x47d61c,'threadId':_0x18414d,'solved':_0x27ab3e[_0x65785a(0x14e)]?I[_0x65785a(0x15c)]:I[_0x65785a(0x155)]},_0x474190=await this[_0x65785a(0x147)][_0x65785a(0x15b)](_0x65785a(0x142)+_0x47d61c+_0x65785a(0x186),{'body':_0x5a6ac9});return!_0x474190[_0x65785a(0x180)][_0x65785a(0x16c)]||_0x474190[_0x65785a(0x180)][_0x65785a(0x16c)][_0x65785a(0x131)]===0x1;}async[_0x4e84ab(0x17e)](_0x4f829e,_0x13d732,_0x295fe5,_0x5e995d){const _0x14e8a4=_0x4e84ab,_0xed1d7={'memberId':(await this[_0x14e8a4(0x171)][_0x14e8a4(0x15a)](_0x4f829e))[_0x14e8a4(0x19d)](),'threadId':_0x295fe5,'replyId':_0x5e995d,'unitId':_0x4f829e},_0x599fcc=await this[_0x14e8a4(0x147)]['post'](_0x14e8a4(0x142)+_0x4f829e+_0x14e8a4(0x156),{'body':_0xed1d7});return!_0x599fcc[_0x14e8a4(0x180)][_0x14e8a4(0x16c)]||_0x599fcc[_0x14e8a4(0x180)]['error'][_0x14e8a4(0x131)]===0x1;}async['listComments'](_0x58ff8f,_0x1cad4d,_0x4fc8de){const _0x296254=_0x4e84ab,_0x3f9746={'unitId':_0x58ff8f,'threadId':_0x4fc8de},_0x26ba12=await this[_0x296254(0x147)]['post'](_0x296254(0x142)+_0x58ff8f+_0x296254(0x160),{'body':_0x3f9746}),_0x366b7f=_0x4fc8de[_0x296254(0x151)](_0x48e9cc=>G(_0x26ba12[_0x296254(0x180)][_0x296254(0x158)][_0x48e9cc],_0x58ff8f,_0x1cad4d))['filter'](Boolean);return Object[_0x296254(0x129)](_0x26ba12[_0x296254(0x180)][_0x296254(0x126)])[_0x296254(0x199)](_0x4316d2=>{const _0x55d702=_0x296254;this['_userService'][_0x55d702(0x17b)](_0x4316d2);}),_0x366b7f;}[_0x4e84ab(0x177)](_0xd11fc1){const _0x120883=_0x4e84ab;return{'id':_0xd11fc1['id'],'threadId':_0xd11fc1['threadId'],'ref':_0xd11fc1[_0x120883(0x163)]};}};g=x([_(0x0,c[_0x4e84ab(0x197)](P[_0x4e84ab(0x128)])),_(0x1,c[_0x4e84ab(0x197)](c[_0x4e84ab(0x19a)])),_(0x2,c[_0x4e84ab(0x197)](b[_0x4e84ab(0x154)])),_(0x3,c['Inject'](c[_0x4e84ab(0x127)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x224d6d,_0x3db566,_0x4fb06c,_0x8ad20b)=>{const _0x2e0e17=_0x4e84ab;for(var _0x36b86e=_0x8ad20b>0x1?void 0x0:_0x8ad20b?H(_0x3db566,_0x4fb06c):_0x3db566,_0x3c45b6=_0x224d6d[_0x2e0e17(0x192)]-0x1,_0x5786e9;_0x3c45b6>=0x0;_0x3c45b6--)(_0x5786e9=_0x224d6d[_0x3c45b6])&&(_0x36b86e=_0x5786e9(_0x36b86e)||_0x36b86e);return _0x36b86e;},y=(_0x592954,_0x525b41)=>(_0x8ffe6a,_0x3db79c)=>_0x525b41(_0x8ffe6a,_0x3db79c,_0x592954);let C=class extends c[_0x4e84ab(0x14f)]{constructor(_0x7a5e60,_0x2c488d){const _0x3f9298=_0x4e84ab;super(),this['_threadCommentDataSourceService']=_0x7a5e60,this[_0x3f9298(0x140)]=_0x2c488d,this['_initDataSource']();}[_0x4e84ab(0x176)](){const _0x1d927b=_0x4e84ab;this[_0x1d927b(0x12e)][_0x1d927b(0x19c)]=this[_0x1d927b(0x140)],this[_0x1d927b(0x12e)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](g))],C);var F=Object[_0x4e84ab(0x12a)],L=Object[_0x4e84ab(0x149)],Z=(_0xc3ad5c,_0x21f5ad,_0xabd211)=>_0x21f5ad in _0xc3ad5c?F(_0xc3ad5c,_0x21f5ad,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xabd211}):_0xc3ad5c[_0x21f5ad]=_0xabd211,W=(_0x4724b7,_0x59c075,_0xaca50c,_0x57cd2c)=>{const _0x16aa39=_0x4e84ab;for(var _0xfe7ee8=_0x57cd2c>0x1?void 0x0:_0x57cd2c?L(_0x59c075,_0xaca50c):_0x59c075,_0x1a83be=_0x4724b7[_0x16aa39(0x192)]-0x1,_0x4221b5;_0x1a83be>=0x0;_0x1a83be--)(_0x4221b5=_0x4724b7[_0x1a83be])&&(_0xfe7ee8=_0x4221b5(_0xfe7ee8)||_0xfe7ee8);return _0xfe7ee8;},O=(_0x32a56f,_0x35f1ab)=>(_0x97b74d,_0x1cb5aa)=>_0x35f1ab(_0x97b74d,_0x1cb5aa,_0x32a56f),N=(_0x2cb767,_0x484726,_0x3cf55f)=>Z(_0x2cb767,typeof _0x484726!=_0x4e84ab(0x183)?_0x484726+'':_0x484726,_0x3cf55f);function _0x23b9(_0x43cbef,_0x3acac8){const _0x3d9c84=_0x3d9c();return _0x23b9=function(_0x23b9ba,_0x54b17c){_0x23b9ba=_0x23b9ba-0x125;let _0x57362f=_0x3d9c84[_0x23b9ba];return _0x57362f;},_0x23b9(_0x43cbef,_0x3acac8);}exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x4e84ab(0x133)]{constructor(_0x45389a=D,_0xa39258,_0x3d4c60){const _0x358049=_0x4e84ab;super(),this[_0x358049(0x17f)]=_0x45389a,this[_0x358049(0x194)]=_0xa39258,this[_0x358049(0x13f)]=_0x3d4c60;const {..._0x5d80c4}=c['merge']({},D,this[_0x358049(0x17f)]);this[_0x358049(0x13f)][_0x358049(0x18a)](q,_0x5d80c4);}[_0x4e84ab(0x15d)](){const _0xf84dad=_0x4e84ab;[[g],[C],[p]][_0xf84dad(0x199)](_0x362787=>{const _0x8835ee=_0xf84dad;this[_0x8835ee(0x194)][_0x8835ee(0x13b)](_0x362787);});}[_0x4e84ab(0x19e)](){const _0x187f4b=_0x4e84ab;this[_0x187f4b(0x194)][_0x187f4b(0x12f)](C),this[_0x187f4b(0x194)][_0x187f4b(0x12f)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x4e84ab(0x195),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x4e84ab(0x17c),c[_0x4e84ab(0x165)]['UNIVER_UNKNOWN']),exports[_0x4e84ab(0x18c)]=W([c[_0x4e84ab(0x18e)](j[_0x4e84ab(0x148)],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c[_0x4e84ab(0x197)](c[_0x4e84ab(0x127)])),O(0x2,c[_0x4e84ab(0x16d)])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x522987=_0x2161;(function(_0x2688fa,_0xd5e57){const _0x5507ad=_0x2161,_0x3ef85a=_0x2688fa();while(!![]){try{const _0x3533e0=-parseInt(_0x5507ad(0xea))/0x1*(-parseInt(_0x5507ad(0xad))/0x2)+-parseInt(_0x5507ad(0xf5))/0x3*(-parseInt(_0x5507ad(0xe1))/0x4)+parseInt(_0x5507ad(0xc0))/0x5*(parseInt(_0x5507ad(0xd6))/0x6)+-parseInt(_0x5507ad(0xf0))/0x7*(parseInt(_0x5507ad(0xf7))/0x8)+-parseInt(_0x5507ad(0xcc))/0x9+parseInt(_0x5507ad(0x96))/0xa+parseInt(_0x5507ad(0xe5))/0xb*(-parseInt(_0x5507ad(0xf8))/0xc);if(_0x3533e0===_0xd5e57)break;else _0x3ef85a['push'](_0x3ef85a['shift']());}catch(_0x4df065){_0x3ef85a['push'](_0x3ef85a['shift']());}}}(_0xe681,0x87140));function _0xe681(){const _0x3f8605=['_threadCommentModel','8DsQxNy','708BVUdEv','body','userID','user','content','_commentService','9559250OznUgH','getCurrentUser','/reply','/universer-api/comment/unit/','onReady','/add','UNIVER_UNKNOWN','payload','defineProperty','getUser','solved','slice','Solved','customRanges','rangeId','Delete','addComment','getUnit','ref','syncUpdateMutationToColla','comment','_config','root','30yHOuxf','add','deleteComment','filter','error','format','users','Add','pluginName','type','_sessionService','map','getMemberID','_initUserSync','parse','reply','resolved','requireSession','forEach','15HqkjhB','_httpService','subscribe','/edit','threadId','stringify','_initDataSource','onStarting','disposeWithMe','resolveComment','replyId','replies','9758340uOseKs','_configService','commentUpdate$','COMMENT','Solve','setConfig','addUser','get','Reply','_threadCommentDataSourceService','1399242QThYwk','Edit','listComments','length','comments','size','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getOwnPropertyDescriptor','/solved','_init','userId','2564416QIpoDa','unitId','values','rangeType','236687nHybkl','Unknown','_injector','post','UNRECOGNIZED','43969UoSnSH','_userService','YYYY/MM/DD\x20HH:mm','pipe','code','_threadCommentDataSource','343994VxSaIR','find','OpenOrReOpen','saveCommentToSnapshot','createTimestamp','3ZqJLFe'];_0xe681=function(){return _0x3f8605;};return _0xe681();}import{CommentService as _0x2428f5,CollaborationSessionService as _0x2f8845,UniverCollaborationClientPlugin as _0x10b110}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4c9a4e}from'@univerjs-pro/license';import{dayjs as _0x378f51,UserManagerService as _0x5a10c3,Inject as _0x2518d0,Injector as _0x5d3cee,Disposable as _0x6e4d38,CustomRangeType as _0x204202,UniverInstanceType as _0x5b882a,DependentOn as _0x4e1bfd,IConfigService as _0x51787d,Plugin as _0x2c9034,merge as _0x410a83}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x17dac6}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x59aa45,IThreadCommentDataSourceService as _0x3e559c}from'@univerjs/thread-comment';import{bufferTime as _0x50f19c}from'rxjs';import{HTTPService as _0xd30796}from'@univerjs/network';const W=_0x522987(0xdc);var I=(_0x2da422=>(_0x2da422[_0x2da422[_0x522987(0xf2)]=0x0]='OpenOrReOpen',_0x2da422[_0x2da422['Solved']=0x1]=_0x522987(0xa2),_0x2da422[_0x2da422[_0x522987(0xe9)]=-0x1]='UNRECOGNIZED',_0x2da422))(I||{}),v=(_0x5dc181=>(_0x5dc181[_0x5dc181['Unknown']=0x0]=_0x522987(0xe6),_0x5dc181[_0x5dc181[_0x522987(0xb4)]=0x1]=_0x522987(0xb4),_0x5dc181[_0x5dc181[_0x522987(0xd4)]=0x2]=_0x522987(0xd4),_0x5dc181[_0x5dc181[_0x522987(0xd7)]=0x3]=_0x522987(0xd7),_0x5dc181[_0x5dc181[_0x522987(0xa5)]=0x4]=_0x522987(0xa5),_0x5dc181[_0x5dc181[_0x522987(0xd0)]=0x5]=_0x522987(0xd0),_0x5dc181[_0x5dc181[_0x522987(0xe9)]=-0x1]='UNRECOGNIZED',_0x5dc181))(v||{});const D=_0x376f06=>_0x378f51(new Date(+_0x376f06))[_0x522987(0xb2)](_0x522987(0xec)),B=async(_0x1a2b62,_0x45ca7d)=>{const _0x3f9cbf=_0x522987,_0x1a8a54=_0x1a2b62[_0x3f9cbf(0xd3)](_0x5a10c3),_0x395f67=_0x1a2b62[_0x3f9cbf(0xd3)](_0xd30796);_0x45ca7d[_0x3f9cbf(0xbf)](_0x30136f=>{const _0x349cb2=_0x3f9cbf;_0x1a8a54[_0x349cb2(0x9f)](_0x30136f)&&_0x45ca7d['delete'](_0x30136f);}),_0x45ca7d[_0x3f9cbf(0xdb)]&&(await _0x395f67[_0x3f9cbf(0xd3)]('/universer-api/user/list',{'params':{'userIDs':[..._0x45ca7d]}}))[_0x3f9cbf(0xf9)][_0x3f9cbf(0xb3)]['forEach'](_0x3e8f72=>{const _0x2143a8=_0x3f9cbf;_0x3e8f72&&_0x1a8a54[_0x2143a8(0xd2)](_0x3e8f72);});};var K=Object[_0x522987(0xdd)],V=(_0x339ecc,_0x2d3d68,_0x4f8c64,_0x431291)=>{const _0x21e6f1=_0x522987;for(var _0x166369=_0x431291>0x1?void 0x0:_0x431291?K(_0x2d3d68,_0x4f8c64):_0x2d3d68,_0x1f8fae=_0x339ecc[_0x21e6f1(0xd9)]-0x1,_0x79512f;_0x1f8fae>=0x0;_0x1f8fae--)(_0x79512f=_0x339ecc[_0x1f8fae])&&(_0x166369=_0x79512f(_0x166369)||_0x166369);return _0x166369;},p=(_0x325c2d,_0x5e37b7)=>(_0x231b08,_0x27e5c3)=>_0x5e37b7(_0x231b08,_0x27e5c3,_0x325c2d);let S=class extends _0x6e4d38{constructor(_0x58f80a,_0x4d8abe,_0x17f978,_0x244822){const _0x5063d4=_0x522987;super(),this[_0x5063d4(0xfd)]=_0x58f80a,this['_threadCommentModel']=_0x4d8abe,this[_0x5063d4(0xeb)]=_0x17f978,this['_injector']=_0x244822,this['_init'](),this[_0x5063d4(0xba)]();}['_initUserSync'](){const _0xcbf5bd=_0x522987;this[_0xcbf5bd(0xc8)](this[_0xcbf5bd(0xf6)][_0xcbf5bd(0xce)][_0xcbf5bd(0xed)](_0x50f19c(0x10))[_0xcbf5bd(0xc2)](_0xa2d909=>{const _0x22d522=_0xcbf5bd,_0x3997cf=new Set();_0xa2d909[_0x22d522(0xbf)](_0x296b23=>{const _0x5f1fea=_0x22d522;switch(_0x296b23[_0x5f1fea(0xb6)]){case _0x5f1fea(0xae):{const _0x27cf85=_0x296b23[_0x5f1fea(0x9d)]['personId'];_0x3997cf[_0x5f1fea(0xae)](_0x27cf85);break;}}}),B(this[_0x22d522(0xe7)],_0x3997cf);}));}[_0x522987(0xdf)](){const _0x4a9d0c=_0x522987;this['disposeWithMe'](this[_0x4a9d0c(0xfd)]['commentUpdate$'][_0x4a9d0c(0xc2)](async _0x5995e1=>{const _0x1a30b2=_0x4a9d0c;var _0x27d087,_0x1afbd9,_0x4b2e9f,_0x47d3c6;const _0x4d0ddb=(_0x27d087=this[_0x1a30b2(0xf6)][_0x1a30b2(0xa7)](_0x5995e1[_0x1a30b2(0xe2)])['find'](_0x31a8e7=>_0x31a8e7['threadId']===_0x5995e1[_0x1a30b2(0xc4)]))==null?void 0x0:_0x27d087[_0x1a30b2(0xac)];if(!_0x4d0ddb)return;const {unitId:_0x32121f,subUnitId:_0x4ca891}=_0x4d0ddb;switch(_0x5995e1[_0x1a30b2(0xfb)]&&this[_0x1a30b2(0xeb)]['addUser'](_0x5995e1['user']),_0x5995e1[_0x1a30b2(0xb6)]){case v[_0x1a30b2(0xb4)]:break;case v[_0x1a30b2(0xd4)]:{this[_0x1a30b2(0xf6)]['addComment'](_0x32121f,_0x4ca891,{'unitId':_0x32121f,'subUnitId':_0x4ca891,'ref':'','id':_0x5995e1['replyId'],'dT':D(+_0x5995e1['createTimestamp']),'threadId':_0x5995e1[_0x1a30b2(0xc4)],'personId':(_0x4b2e9f=(_0x1afbd9=_0x5995e1[_0x1a30b2(0xfb)])==null?void 0x0:_0x1afbd9[_0x1a30b2(0xfa)])!=null?_0x4b2e9f:_0x5995e1['userId'],'text':JSON['parse'](_0x5995e1[_0x1a30b2(0xfc)]),'parentId':_0x4d0ddb['id']});break;}case v[_0x1a30b2(0xa5)]:{const _0x1e22b7=this[_0x1a30b2(0xf6)]['getComment'](_0x32121f,_0x4ca891,_0x5995e1[_0x1a30b2(0xca)]);_0x1e22b7&&_0x1e22b7['parentId']&&this['_threadCommentModel'][_0x1a30b2(0xaf)](_0x32121f,_0x4ca891,_0x5995e1[_0x1a30b2(0xca)]);break;}case v['Edit']:{this['_threadCommentModel']['updateComment'](_0x32121f,_0x4ca891,{'commentId':_0x5995e1['replyId'],'text':JSON[_0x1a30b2(0xbb)](_0x5995e1['content'])});break;}case v[_0x1a30b2(0xd0)]:{const _0x563b8c=(_0x47d3c6=this[_0x1a30b2(0xf6)]['getUnit'](_0x5995e1['unitId'])[_0x1a30b2(0xf1)](_0x55a2f8=>_0x55a2f8[_0x1a30b2(0xc4)]===_0x5995e1[_0x1a30b2(0xc4)]))==null?void 0x0:_0x47d3c6[_0x1a30b2(0xac)];_0x563b8c&&this[_0x1a30b2(0xf6)]['resolveComment'](_0x32121f,_0x4ca891,_0x563b8c['id'],_0x5995e1[_0x1a30b2(0xa0)]===I[_0x1a30b2(0xa2)]);break;}}}));}};S=V([p(0x0,_0x2518d0(_0x2428f5)),p(0x1,_0x2518d0(_0x59aa45)),p(0x2,_0x2518d0(_0x5a10c3)),p(0x3,_0x2518d0(_0x5d3cee))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x522987(0xdd)],Q=(_0xc7cf80,_0x2dc0c2,_0x43ef35,_0x3b5749)=>{const _0x3bd44d=_0x522987;for(var _0x5474ee=_0x3b5749>0x1?void 0x0:_0x3b5749?k(_0x2dc0c2,_0x43ef35):_0x2dc0c2,_0x19436d=_0xc7cf80[_0x3bd44d(0xd9)]-0x1,_0x385204;_0x19436d>=0x0;_0x19436d--)(_0x385204=_0xc7cf80[_0x19436d])&&(_0x5474ee=_0x385204(_0x5474ee)||_0x5474ee);return _0x5474ee;},_=(_0x3816e2,_0x25acd3)=>(_0x2cde7d,_0x175371)=>_0x25acd3(_0x2cde7d,_0x175371,_0x3816e2);function X(_0x468bcc,_0x1be89e){const _0x1b2ef8=_0x522987,_0x3074e1=_0x468bcc['replies'][0x0];return{..._0x1be89e,'id':_0x3074e1[_0x1b2ef8(0xca)],'resolved':_0x468bcc[_0x1b2ef8(0xa0)]===0x1,'dT':D(_0x3074e1[_0x1b2ef8(0xf4)]),'personId':_0x3074e1[_0x1b2ef8(0xe0)],'threadId':_0x3074e1[_0x1b2ef8(0xc4)]};}function ee(_0x42db8c,_0x32055f,_0x2e313d){const _0x47e4e8=_0x522987;var _0x5f719,_0x340b68;if(((_0x340b68=(_0x5f719=_0x42db8c==null?void 0x0:_0x42db8c['replies'])==null?void 0x0:_0x5f719['length'])!=null?_0x340b68:0x0)>0x0){const _0x43c09e=(_0x361da2,_0x16f9be)=>({'id':_0x361da2[_0x47e4e8(0xca)],'threadId':_0x361da2['threadId'],'dT':D(_0x361da2['createTimestamp']),'personId':_0x361da2['userId'],'resolved':_0x42db8c[_0x47e4e8(0xa0)]===I['Solved'],'unitId':_0x32055f,'subUnitId':_0x2e313d,'text':JSON[_0x47e4e8(0xbb)](_0x361da2[_0x47e4e8(0xfc)]),'parentId':_0x16f9be}),_0x584e96=_0x43c09e(_0x42db8c[_0x47e4e8(0xcb)][0x0]);return{..._0x584e96,'children':_0x42db8c['replies'][_0x47e4e8(0xa1)](0x1)[_0x47e4e8(0xb8)](_0x2617dd=>_0x43c09e(_0x2617dd,_0x584e96['id']))};}return null;}let f=class{constructor(_0x3b0e2c,_0x2510cb,_0xa4a287,_0xcec989){const _0x5957c6=_0x522987;this[_0x5957c6(0xc1)]=_0x3b0e2c,this[_0x5957c6(0xeb)]=_0x2510cb,this[_0x5957c6(0xb7)]=_0xa4a287,this['_injector']=_0xcec989;}async[_0x522987(0xa6)](_0x3e76b1){const _0x432314=_0x522987;var _0x1d0f8e,_0x2f5089;const {parentId:_0x5226e8,unitId:_0xbd3ae5,text:_0x30f583,threadId:_0x5ebefa}=_0x3e76b1,_0x512b79=(_0x2f5089=(_0x1d0f8e=_0x30f583[_0x432314(0xa3)])==null?void 0x0:_0x1d0f8e[_0x432314(0xb0)](_0x287682=>_0x287682[_0x432314(0xe4)]===_0x204202[_0x432314(0xcf)])[_0x432314(0xb8)](_0x415593=>_0x415593[_0x432314(0xa4)]))!=null?_0x2f5089:[],_0x3decfa=JSON['stringify'](_0x30f583),_0x2f97c2=(await this[_0x432314(0xb7)][_0x432314(0xbe)](_0xbd3ae5))[_0x432314(0xb9)]();if(_0x5226e8){const _0x14c681={'memberId':_0x2f97c2,'unitId':_0xbd3ae5,'content':_0x3decfa,'mention':_0x512b79,'threadId':_0x5ebefa},_0x1a2472=(await this[_0x432314(0xc1)]['post'](_0x432314(0x99)+_0xbd3ae5+_0x432314(0x98),{'body':_0x14c681}))[_0x432314(0xf9)][_0x432314(0xbc)];return{..._0x3e76b1,'id':_0x1a2472[_0x432314(0xca)],'dT':_0x378f51(+_0x1a2472[_0x432314(0xf4)])[_0x432314(0xb2)](_0x432314(0xec)),'personId':_0x1a2472['userId']};}else{const _0x3ec21d={'memberId':_0x2f97c2,'unitId':_0xbd3ae5,'content':_0x3decfa,'mention':_0x512b79},_0x3a311b=await this[_0x432314(0xc1)][_0x432314(0xe8)](_0x432314(0x99)+_0xbd3ae5+_0x432314(0x9b),{'body':_0x3ec21d});return X(_0x3a311b[_0x432314(0xf9)][_0x432314(0xaa)],_0x3e76b1);}}async['updateComment'](_0x3bae78){const _0x579241=_0x522987;var _0x4a77a5,_0x282a83;const {text:_0x4b05bc,unitId:_0x1a3bdf}=_0x3bae78,_0x27896c=(_0x282a83=(_0x4a77a5=_0x4b05bc[_0x579241(0xa3)])==null?void 0x0:_0x4a77a5['filter'](_0x411985=>_0x411985[_0x579241(0xe4)]===_0x204202[_0x579241(0xcf)])[_0x579241(0xb8)](_0x3fd34d=>_0x3fd34d[_0x579241(0xa4)]))!=null?_0x282a83:[],_0x5aa046=JSON[_0x579241(0xc5)](_0x4b05bc),_0x27368c=_0x3bae78[_0x579241(0xc4)],_0xdc28ec=_0x3bae78['id'],_0xf492bc={'memberId':(await this[_0x579241(0xb7)][_0x579241(0xbe)](_0x1a3bdf))[_0x579241(0xb9)](),'unitId':_0x1a3bdf,'threadId':_0x27368c,'mention':_0x27896c,'content':_0x5aa046,'replyId':_0xdc28ec},_0x501f07=await this[_0x579241(0xc1)]['post'](_0x579241(0x99)+_0x1a3bdf+_0x579241(0xc3),{'body':_0xf492bc});return!_0x501f07[_0x579241(0xf9)]['error']||_0x501f07['body'][_0x579241(0xb1)][_0x579241(0xee)]===0x1;}async[_0x522987(0xc9)](_0x2a7f13){const _0x278190=_0x522987,{unitId:_0x3c18f8}=_0x2a7f13,_0x56ede8=_0x2a7f13['threadId'],_0x2fa7a2={'memberId':this[_0x278190(0xeb)][_0x278190(0x97)]()[_0x278190(0xfa)],'unitId':_0x3c18f8,'threadId':_0x56ede8,'solved':_0x2a7f13[_0x278190(0xbd)]?I['Solved']:I[_0x278190(0xf2)]},_0x472706=await this[_0x278190(0xc1)][_0x278190(0xe8)](_0x278190(0x99)+_0x3c18f8+_0x278190(0xde),{'body':_0x2fa7a2});return!_0x472706[_0x278190(0xf9)][_0x278190(0xb1)]||_0x472706[_0x278190(0xf9)]['error'][_0x278190(0xee)]===0x1;}async[_0x522987(0xaf)](_0x5a3c3b,_0x4afe57,_0x2df827,_0x31cda6){const _0x1b9bed=_0x522987,_0x58a29a={'memberId':(await this[_0x1b9bed(0xb7)][_0x1b9bed(0xbe)](_0x5a3c3b))[_0x1b9bed(0xb9)](),'threadId':_0x2df827,'replyId':_0x31cda6,'unitId':_0x5a3c3b},_0x37fbd0=await this[_0x1b9bed(0xc1)][_0x1b9bed(0xe8)]('/universer-api/comment/unit/'+_0x5a3c3b+'/delete',{'body':_0x58a29a});return!_0x37fbd0[_0x1b9bed(0xf9)][_0x1b9bed(0xb1)]||_0x37fbd0[_0x1b9bed(0xf9)]['error']['code']===0x1;}async[_0x522987(0xd8)](_0x14f650,_0x4cc032,_0x28bf4a){const _0x3caefd=_0x522987,_0xa0d393={'unitId':_0x14f650,'threadId':_0x28bf4a},_0x3d0294=await this[_0x3caefd(0xc1)]['post'](_0x3caefd(0x99)+_0x14f650+'/list',{'body':_0xa0d393}),_0x4aebbe=_0x28bf4a[_0x3caefd(0xb8)](_0xa0e440=>ee(_0x3d0294['body'][_0x3caefd(0xda)][_0xa0e440],_0x14f650,_0x4cc032))[_0x3caefd(0xb0)](Boolean);return Object[_0x3caefd(0xe3)](_0x3d0294[_0x3caefd(0xf9)][_0x3caefd(0xb3)])[_0x3caefd(0xbf)](_0x56652f=>{const _0x3868f5=_0x3caefd;this['_userService'][_0x3868f5(0xd2)](_0x56652f);}),_0x4aebbe;}[_0x522987(0xf3)](_0x87a8b8){const _0x5b106c=_0x522987;return{'id':_0x87a8b8['id'],'threadId':_0x87a8b8[_0x5b106c(0xc4)],'ref':_0x87a8b8[_0x5b106c(0xa8)]};}};f=Q([_(0x0,_0x2518d0(_0xd30796)),_(0x1,_0x2518d0(_0x5a10c3)),_(0x2,_0x2518d0(_0x2f8845)),_(0x3,_0x2518d0(_0x5d3cee))],f);var re=Object[_0x522987(0xdd)],te=(_0x3f6d6f,_0x3ef338,_0x1f913d,_0x1fa1cf)=>{const _0x11a954=_0x522987;for(var _0x248338=_0x1fa1cf>0x1?void 0x0:_0x1fa1cf?re(_0x3ef338,_0x1f913d):_0x3ef338,_0x1f69d3=_0x3f6d6f[_0x11a954(0xd9)]-0x1,_0x49c5dc;_0x1f69d3>=0x0;_0x1f69d3--)(_0x49c5dc=_0x3f6d6f[_0x1f69d3])&&(_0x248338=_0x49c5dc(_0x248338)||_0x248338);return _0x248338;},N=(_0x32c5e9,_0x3265b0)=>(_0x1414f2,_0x44e43c)=>_0x3265b0(_0x1414f2,_0x44e43c,_0x32c5e9);let g=class extends _0x6e4d38{constructor(_0x3bd67a,_0x46c6db){const _0x713701=_0x522987;super(),this[_0x713701(0xd5)]=_0x3bd67a,this[_0x713701(0xef)]=_0x46c6db,this[_0x713701(0xc6)]();}['_initDataSource'](){const _0x2c1189=_0x522987;this[_0x2c1189(0xd5)]['dataSource']=this[_0x2c1189(0xef)],this[_0x2c1189(0xd5)][_0x2c1189(0xa9)]=!0x1;}};function _0x2161(_0x41c1b7,_0x2832b2){const _0xe6816e=_0xe681();return _0x2161=function(_0x21614d,_0x14d3c2){_0x21614d=_0x21614d-0x96;let _0x579043=_0xe6816e[_0x21614d];return _0x579043;},_0x2161(_0x41c1b7,_0x2832b2);}g=te([N(0x0,_0x3e559c),N(0x1,_0x2518d0(f))],g);var se=Object[_0x522987(0x9e)],oe=Object[_0x522987(0xdd)],ne=(_0x46b57e,_0x5f54c1,_0x513596)=>_0x5f54c1 in _0x46b57e?se(_0x46b57e,_0x5f54c1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x513596}):_0x46b57e[_0x5f54c1]=_0x513596,ie=(_0x2b1da5,_0x3906a7,_0x55dfc3,_0x57c459)=>{const _0x36354a=_0x522987;for(var _0x1deec0=_0x57c459>0x1?void 0x0:_0x57c459?oe(_0x3906a7,_0x55dfc3):_0x3906a7,_0x24b9da=_0x2b1da5[_0x36354a(0xd9)]-0x1,_0x248c04;_0x24b9da>=0x0;_0x24b9da--)(_0x248c04=_0x2b1da5[_0x24b9da])&&(_0x1deec0=_0x248c04(_0x1deec0)||_0x1deec0);return _0x1deec0;},w=(_0x3d63ce,_0x302982)=>(_0x5bf970,_0x2fc8b5)=>_0x302982(_0x5bf970,_0x2fc8b5,_0x3d63ce),$=(_0x2f1e41,_0x59a26b,_0x20bce3)=>ne(_0x2f1e41,typeof _0x59a26b!='symbol'?_0x59a26b+'':_0x59a26b,_0x20bce3);let b=class extends _0x2c9034{constructor(_0x120d09=M,_0x37434c,_0x1e543b){const _0x34b58d=_0x522987;super(),this[_0x34b58d(0xab)]=_0x120d09,this['_injector']=_0x37434c,this[_0x34b58d(0xcd)]=_0x1e543b;const {..._0xba917c}=_0x410a83({},M,this['_config']);this['_configService'][_0x34b58d(0xd1)](z,_0xba917c);}[_0x522987(0xc7)](){const _0x31f9bc=_0x522987;[[f],[g],[S]][_0x31f9bc(0xbf)](_0x5c723e=>{const _0x15fd0e=_0x31f9bc;this[_0x15fd0e(0xe7)]['add'](_0x5c723e);});}[_0x522987(0x9a)](){const _0x127f55=_0x522987;this[_0x127f55(0xe7)][_0x127f55(0xd3)](g),this[_0x127f55(0xe7)][_0x127f55(0xd3)](S);}};$(b,_0x522987(0xb5),W),$(b,_0x522987(0xb6),_0x5b882a[_0x522987(0x9c)]),b=ie([_0x4e1bfd(_0x17dac6,_0x10b110,_0x4c9a4e),w(0x1,_0x2518d0(_0x5d3cee)),w(0x2,_0x51787d)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x1f0f9a=_0x2bee;(function(_0x1367b1,_0x37c302){const _0x193c4f=_0x2bee,_0x4b2cce=_0x1367b1();while(!![]){try{const _0x268820=parseInt(_0x193c4f(0x12c))/0x1*(parseInt(_0x193c4f(0x135))/0x2)+parseInt(_0x193c4f(0x160))/0x3*(-parseInt(_0x193c4f(0x15a))/0x4)+-parseInt(_0x193c4f(0x13c))/0x5+parseInt(_0x193c4f(0x179))/0x6*(-parseInt(_0x193c4f(0x138))/0x7)+-parseInt(_0x193c4f(0x11f))/0x8*(-parseInt(_0x193c4f(0x125))/0x9)+-parseInt(_0x193c4f(0x152))/0xa*(-parseInt(_0x193c4f(0x156))/0xb)+parseInt(_0x193c4f(0x17e))/0xc*(-parseInt(_0x193c4f(0x167))/0xd);if(_0x268820===_0x37c302)break;else _0x4b2cce['push'](_0x4b2cce['shift']());}catch(_0x1bbc1b){_0x4b2cce['push'](_0x4b2cce['shift']());}}}(_0x321d,0x75a28));import{CommentService as _0x1fff95,CollaborationSessionService as _0x480a85,UniverCollaborationClientPlugin as _0x581945}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x37c301}from'@univerjs-pro/license';import{dayjs as _0x1f1040,UserManagerService as _0x4fcf10,Inject as _0x24f2a0,Injector as _0x1b6635,Disposable as _0x356973,CustomRangeType as _0x4c1e5e,UniverInstanceType as _0x2bb47e,DependentOn as _0xf2eb93,IConfigService as _0x450544,Plugin as _0x1be882,merge as _0x454f50}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x37f713}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2aec63,IThreadCommentDataSourceService as _0x57e9c9}from'@univerjs/thread-comment';import{bufferTime as _0x1db72a}from'rxjs';import{HTTPService as _0x19d659}from'@univerjs/network';const W=_0x1f0f9a(0x16b);var I=(_0x57d9ff=>(_0x57d9ff[_0x57d9ff[_0x1f0f9a(0x161)]=0x0]='OpenOrReOpen',_0x57d9ff[_0x57d9ff['Solved']=0x1]=_0x1f0f9a(0x175),_0x57d9ff[_0x57d9ff[_0x1f0f9a(0x13f)]=-0x1]=_0x1f0f9a(0x13f),_0x57d9ff))(I||{}),v=(_0x525402=>(_0x525402[_0x525402[_0x1f0f9a(0x171)]=0x0]='Unknown',_0x525402[_0x525402[_0x1f0f9a(0x14a)]=0x1]='Add',_0x525402[_0x525402[_0x1f0f9a(0x124)]=0x2]='Reply',_0x525402[_0x525402[_0x1f0f9a(0x16e)]=0x3]=_0x1f0f9a(0x16e),_0x525402[_0x525402['Delete']=0x4]='Delete',_0x525402[_0x525402[_0x1f0f9a(0x12f)]=0x5]='Solve',_0x525402[_0x525402['UNRECOGNIZED']=-0x1]=_0x1f0f9a(0x13f),_0x525402))(v||{});const D=_0x304c7d=>_0x1f1040(new Date(+_0x304c7d))[_0x1f0f9a(0x153)](_0x1f0f9a(0x132)),B=async(_0x592702,_0x53b76b)=>{const _0x266b0d=_0x1f0f9a,_0x3d5a7d=_0x592702['get'](_0x4fcf10),_0x4fe0f6=_0x592702[_0x266b0d(0x159)](_0x19d659);_0x53b76b['forEach'](_0x426bd5=>{const _0x5d4e66=_0x266b0d;_0x3d5a7d[_0x5d4e66(0x14c)](_0x426bd5)&&_0x53b76b[_0x5d4e66(0x151)](_0x426bd5);}),_0x53b76b[_0x266b0d(0x143)]&&(await _0x4fe0f6['get'](_0x266b0d(0x14d),{'params':{'userIDs':[..._0x53b76b]}}))[_0x266b0d(0x141)][_0x266b0d(0x157)][_0x266b0d(0x120)](_0x2b3374=>{const _0x1d2ce7=_0x266b0d;_0x2b3374&&_0x3d5a7d[_0x1d2ce7(0x128)](_0x2b3374);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x53a6ad,_0x1a19fd,_0x30142a,_0x3a3ce3)=>{const _0x104bbf=_0x1f0f9a;for(var _0x19a5fa=_0x3a3ce3>0x1?void 0x0:_0x3a3ce3?K(_0x1a19fd,_0x30142a):_0x1a19fd,_0x43a8d9=_0x53a6ad[_0x104bbf(0x15c)]-0x1,_0x15d24c;_0x43a8d9>=0x0;_0x43a8d9--)(_0x15d24c=_0x53a6ad[_0x43a8d9])&&(_0x19a5fa=_0x15d24c(_0x19a5fa)||_0x19a5fa);return _0x19a5fa;},p=(_0x4c499c,_0x495df5)=>(_0x42c950,_0x1656c7)=>_0x495df5(_0x42c950,_0x1656c7,_0x4c499c);let S=class extends _0x356973{constructor(_0x5d3899,_0x238abc,_0x11f66f,_0x22e63f){const _0x472e0b=_0x1f0f9a;super(),this['_commentService']=_0x5d3899,this[_0x472e0b(0x129)]=_0x238abc,this[_0x472e0b(0x146)]=_0x11f66f,this[_0x472e0b(0x13b)]=_0x22e63f,this[_0x472e0b(0x177)](),this[_0x472e0b(0x14f)]();}[_0x1f0f9a(0x14f)](){const _0x326599=_0x1f0f9a;this[_0x326599(0x12b)](this['_threadCommentModel'][_0x326599(0x154)][_0x326599(0x13d)](_0x1db72a(0x10))[_0x326599(0x176)](_0x32efc1=>{const _0x21c88f=_0x326599,_0xfbddf2=new Set();_0x32efc1[_0x21c88f(0x120)](_0x32e91a=>{const _0x1773b2=_0x21c88f;switch(_0x32e91a['type']){case _0x1773b2(0x14e):{const _0x50241e=_0x32e91a[_0x1773b2(0x145)][_0x1773b2(0x144)];_0xfbddf2['add'](_0x50241e);break;}}}),B(this[_0x21c88f(0x13b)],_0xfbddf2);}));}['_init'](){const _0x460a68=_0x1f0f9a;this[_0x460a68(0x12b)](this[_0x460a68(0x12e)][_0x460a68(0x154)][_0x460a68(0x176)](async _0x24b98b=>{const _0x56de22=_0x460a68;var _0x418536,_0x55c24f,_0x46eee2,_0x196c01;const _0x4a482e=(_0x418536=this[_0x56de22(0x129)]['getUnit'](_0x24b98b[_0x56de22(0x134)])['find'](_0x41eec2=>_0x41eec2[_0x56de22(0x15d)]===_0x24b98b['threadId']))==null?void 0x0:_0x418536[_0x56de22(0x13e)];if(!_0x4a482e)return;const {unitId:_0x3f5e97,subUnitId:_0x1932d6}=_0x4a482e;switch(_0x24b98b[_0x56de22(0x172)]&&this[_0x56de22(0x146)][_0x56de22(0x128)](_0x24b98b[_0x56de22(0x172)]),_0x24b98b[_0x56de22(0x12d)]){case v[_0x56de22(0x14a)]:break;case v[_0x56de22(0x124)]:{this[_0x56de22(0x129)][_0x56de22(0x147)](_0x3f5e97,_0x1932d6,{'unitId':_0x3f5e97,'subUnitId':_0x1932d6,'ref':'','id':_0x24b98b[_0x56de22(0x166)],'dT':D(+_0x24b98b[_0x56de22(0x133)]),'threadId':_0x24b98b[_0x56de22(0x15d)],'personId':(_0x46eee2=(_0x55c24f=_0x24b98b['user'])==null?void 0x0:_0x55c24f[_0x56de22(0x11d)])!=null?_0x46eee2:_0x24b98b['userId'],'text':JSON[_0x56de22(0x137)](_0x24b98b[_0x56de22(0x158)]),'parentId':_0x4a482e['id']});break;}case v[_0x56de22(0x16c)]:{const _0xf32fff=this[_0x56de22(0x129)][_0x56de22(0x11e)](_0x3f5e97,_0x1932d6,_0x24b98b['replyId']);_0xf32fff&&_0xf32fff['parentId']&&this[_0x56de22(0x129)][_0x56de22(0x16a)](_0x3f5e97,_0x1932d6,_0x24b98b['replyId']);break;}case v['Edit']:{this[_0x56de22(0x129)]['updateComment'](_0x3f5e97,_0x1932d6,{'commentId':_0x24b98b[_0x56de22(0x166)],'text':JSON['parse'](_0x24b98b['content'])});break;}case v[_0x56de22(0x12f)]:{const _0x95d5c2=(_0x196c01=this[_0x56de22(0x129)][_0x56de22(0x12a)](_0x24b98b['unitId'])[_0x56de22(0x123)](_0x3e7dac=>_0x3e7dac[_0x56de22(0x15d)]===_0x24b98b[_0x56de22(0x15d)]))==null?void 0x0:_0x196c01[_0x56de22(0x13e)];_0x95d5c2&&this[_0x56de22(0x129)][_0x56de22(0x149)](_0x3f5e97,_0x1932d6,_0x95d5c2['id'],_0x24b98b[_0x56de22(0x121)]===I[_0x56de22(0x175)]);break;}}}));}};S=V([p(0x0,_0x24f2a0(_0x1fff95)),p(0x1,_0x24f2a0(_0x2aec63)),p(0x2,_0x24f2a0(_0x4fcf10)),p(0x3,_0x24f2a0(_0x1b6635))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x1f0f9a(0x17a)],Q=(_0x2ebf55,_0x18f1f6,_0x275bc7,_0x376a4e)=>{for(var _0x54b5a5=_0x376a4e>0x1?void 0x0:_0x376a4e?k(_0x18f1f6,_0x275bc7):_0x18f1f6,_0x34940c=_0x2ebf55['length']-0x1,_0x38f2da;_0x34940c>=0x0;_0x34940c--)(_0x38f2da=_0x2ebf55[_0x34940c])&&(_0x54b5a5=_0x38f2da(_0x54b5a5)||_0x54b5a5);return _0x54b5a5;},_=(_0x36a96a,_0x3e111f)=>(_0x278b0d,_0x535457)=>_0x3e111f(_0x278b0d,_0x535457,_0x36a96a);function X(_0xf452c8,_0x54a8a2){const _0x4e6967=_0x1f0f9a,_0x51a459=_0xf452c8['replies'][0x0];return{..._0x54a8a2,'id':_0x51a459[_0x4e6967(0x166)],'resolved':_0xf452c8[_0x4e6967(0x121)]===0x1,'dT':D(_0x51a459['createTimestamp']),'personId':_0x51a459[_0x4e6967(0x174)],'threadId':_0x51a459['threadId']};}function ee(_0x5f23a3,_0x40b410,_0x245844){const _0x407f06=_0x1f0f9a;var _0x506a7e,_0x991a16;if(((_0x991a16=(_0x506a7e=_0x5f23a3==null?void 0x0:_0x5f23a3['replies'])==null?void 0x0:_0x506a7e[_0x407f06(0x15c)])!=null?_0x991a16:0x0)>0x0){const _0x17d779=(_0x134cc8,_0x568667)=>({'id':_0x134cc8[_0x407f06(0x166)],'threadId':_0x134cc8[_0x407f06(0x15d)],'dT':D(_0x134cc8[_0x407f06(0x133)]),'personId':_0x134cc8[_0x407f06(0x174)],'resolved':_0x5f23a3[_0x407f06(0x121)]===I[_0x407f06(0x175)],'unitId':_0x40b410,'subUnitId':_0x245844,'text':JSON[_0x407f06(0x137)](_0x134cc8[_0x407f06(0x158)]),'parentId':_0x568667}),_0x4d562a=_0x17d779(_0x5f23a3[_0x407f06(0x17d)][0x0]);return{..._0x4d562a,'children':_0x5f23a3[_0x407f06(0x17d)][_0x407f06(0x15f)](0x1)['map'](_0x1fa576=>_0x17d779(_0x1fa576,_0x4d562a['id']))};}return null;}let f=class{constructor(_0x66feb3,_0x13db32,_0x263497,_0x111819){const _0x172241=_0x1f0f9a;this[_0x172241(0x130)]=_0x66feb3,this[_0x172241(0x146)]=_0x13db32,this[_0x172241(0x118)]=_0x263497,this[_0x172241(0x13b)]=_0x111819;}async[_0x1f0f9a(0x147)](_0x24e19d){const _0x308a10=_0x1f0f9a;var _0x42c7c0,_0xc32d35;const {parentId:_0x4239c8,unitId:_0x5a8e90,text:_0x338559,threadId:_0x2b6ae9}=_0x24e19d,_0x179f2c=(_0xc32d35=(_0x42c7c0=_0x338559['customRanges'])==null?void 0x0:_0x42c7c0[_0x308a10(0x11c)](_0x2b77ac=>_0x2b77ac[_0x308a10(0x155)]===_0x4c1e5e[_0x308a10(0x17f)])[_0x308a10(0x11a)](_0xc9e792=>_0xc9e792[_0x308a10(0x163)]))!=null?_0xc32d35:[],_0x4e293a=JSON[_0x308a10(0x150)](_0x338559),_0x88fe2b=(await this[_0x308a10(0x118)][_0x308a10(0x15b)](_0x5a8e90))['getMemberID']();if(_0x4239c8){const _0x4e399f={'memberId':_0x88fe2b,'unitId':_0x5a8e90,'content':_0x4e293a,'mention':_0x179f2c,'threadId':_0x2b6ae9},_0xc107a3=(await this[_0x308a10(0x130)]['post']('/universer-api/comment/unit/'+_0x5a8e90+'/reply',{'body':_0x4e399f}))[_0x308a10(0x141)][_0x308a10(0x14b)];return{..._0x24e19d,'id':_0xc107a3['replyId'],'dT':_0x1f1040(+_0xc107a3['createTimestamp'])[_0x308a10(0x153)]('YYYY/MM/DD\x20HH:mm'),'personId':_0xc107a3['userId']};}else{const _0x162c79={'memberId':_0x88fe2b,'unitId':_0x5a8e90,'content':_0x4e293a,'mention':_0x179f2c},_0x5b6560=await this['_httpService'][_0x308a10(0x16d)](_0x308a10(0x140)+_0x5a8e90+'/add',{'body':_0x162c79});return X(_0x5b6560['body']['comment'],_0x24e19d);}}async[_0x1f0f9a(0x119)](_0x192f44){const _0x53e96f=_0x1f0f9a;var _0x2bd997,_0x2736e8;const {text:_0x58ba2f,unitId:_0x5908b3}=_0x192f44,_0x516694=(_0x2736e8=(_0x2bd997=_0x58ba2f[_0x53e96f(0x162)])==null?void 0x0:_0x2bd997['filter'](_0x157cd3=>_0x157cd3[_0x53e96f(0x155)]===_0x4c1e5e[_0x53e96f(0x17f)])[_0x53e96f(0x11a)](_0x204327=>_0x204327[_0x53e96f(0x163)]))!=null?_0x2736e8:[],_0x2a30f3=JSON[_0x53e96f(0x150)](_0x58ba2f),_0x2c5916=_0x192f44[_0x53e96f(0x15d)],_0x4553af=_0x192f44['id'],_0x422a33={'memberId':(await this['_sessionService']['requireSession'](_0x5908b3))[_0x53e96f(0x142)](),'unitId':_0x5908b3,'threadId':_0x2c5916,'mention':_0x516694,'content':_0x2a30f3,'replyId':_0x4553af},_0x40add2=await this[_0x53e96f(0x130)][_0x53e96f(0x16d)](_0x53e96f(0x140)+_0x5908b3+_0x53e96f(0x117),{'body':_0x422a33});return!_0x40add2[_0x53e96f(0x141)][_0x53e96f(0x169)]||_0x40add2[_0x53e96f(0x141)][_0x53e96f(0x169)][_0x53e96f(0x17c)]===0x1;}async[_0x1f0f9a(0x149)](_0x4aa02a){const _0x4a0fe7=_0x1f0f9a,{unitId:_0x43cd0f}=_0x4aa02a,_0x265af4=_0x4aa02a[_0x4a0fe7(0x15d)],_0x366515={'memberId':this[_0x4a0fe7(0x146)][_0x4a0fe7(0x126)]()[_0x4a0fe7(0x11d)],'unitId':_0x43cd0f,'threadId':_0x265af4,'solved':_0x4aa02a['resolved']?I[_0x4a0fe7(0x175)]:I['OpenOrReOpen']},_0xb54d45=await this[_0x4a0fe7(0x130)][_0x4a0fe7(0x16d)](_0x4a0fe7(0x140)+_0x43cd0f+_0x4a0fe7(0x15e),{'body':_0x366515});return!_0xb54d45[_0x4a0fe7(0x141)][_0x4a0fe7(0x169)]||_0xb54d45[_0x4a0fe7(0x141)][_0x4a0fe7(0x169)]['code']===0x1;}async[_0x1f0f9a(0x16a)](_0x40c98b,_0x5b6ec8,_0x2db7f3,_0x329cb7){const _0x3bc0e5=_0x1f0f9a,_0x5b614e={'memberId':(await this[_0x3bc0e5(0x118)][_0x3bc0e5(0x15b)](_0x40c98b))[_0x3bc0e5(0x142)](),'threadId':_0x2db7f3,'replyId':_0x329cb7,'unitId':_0x40c98b},_0x10f47d=await this[_0x3bc0e5(0x130)][_0x3bc0e5(0x16d)](_0x3bc0e5(0x140)+_0x40c98b+_0x3bc0e5(0x148),{'body':_0x5b614e});return!_0x10f47d[_0x3bc0e5(0x141)][_0x3bc0e5(0x169)]||_0x10f47d[_0x3bc0e5(0x141)][_0x3bc0e5(0x169)][_0x3bc0e5(0x17c)]===0x1;}async[_0x1f0f9a(0x168)](_0x3e5894,_0x38ca3f,_0xc938f7){const _0x269248=_0x1f0f9a,_0x2c6b54={'unitId':_0x3e5894,'threadId':_0xc938f7},_0x51ddcf=await this[_0x269248(0x130)][_0x269248(0x16d)](_0x269248(0x140)+_0x3e5894+'/list',{'body':_0x2c6b54}),_0x5e8c40=_0xc938f7['map'](_0x2c3920=>ee(_0x51ddcf['body']['comments'][_0x2c3920],_0x3e5894,_0x38ca3f))[_0x269248(0x11c)](Boolean);return Object[_0x269248(0x11b)](_0x51ddcf[_0x269248(0x141)]['users'])['forEach'](_0x219f7c=>{const _0x36cf75=_0x269248;this[_0x36cf75(0x146)][_0x36cf75(0x128)](_0x219f7c);}),_0x5e8c40;}['saveCommentToSnapshot'](_0x394171){const _0x523083=_0x1f0f9a;return{'id':_0x394171['id'],'threadId':_0x394171[_0x523083(0x15d)],'ref':_0x394171[_0x523083(0x170)]};}};f=Q([_(0x0,_0x24f2a0(_0x19d659)),_(0x1,_0x24f2a0(_0x4fcf10)),_(0x2,_0x24f2a0(_0x480a85)),_(0x3,_0x24f2a0(_0x1b6635))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x22ce1b,_0x2228d8,_0xb269d9,_0x11b450)=>{for(var _0x4512ab=_0x11b450>0x1?void 0x0:_0x11b450?re(_0x2228d8,_0xb269d9):_0x2228d8,_0x433662=_0x22ce1b['length']-0x1,_0x20f35f;_0x433662>=0x0;_0x433662--)(_0x20f35f=_0x22ce1b[_0x433662])&&(_0x4512ab=_0x20f35f(_0x4512ab)||_0x4512ab);return _0x4512ab;},N=(_0x5b1e18,_0x142ecd)=>(_0x47931b,_0x51a3fc)=>_0x142ecd(_0x47931b,_0x51a3fc,_0x5b1e18);function _0x321d(){const _0x3cea2d=['Edit','onReady','ref','Unknown','user','_configService','userId','Solved','subscribe','_init','UNIVER_UNKNOWN','875862PRRsky','getOwnPropertyDescriptor','onStarting','code','replies','98028MtvTPp','COMMENT','/edit','_sessionService','updateComment','map','values','filter','userID','getComment','8xtXqPK','forEach','solved','setConfig','find','Reply','7182612LbCiia','getCurrentUser','defineProperty','addUser','_threadCommentModel','getUnit','disposeWithMe','1lmIHHx','type','_commentService','Solve','_httpService','symbol','YYYY/MM/DD\x20HH:mm','createTimestamp','unitId','929498yYWsRr','_initDataSource','parse','7drTlZE','_config','syncUpdateMutationToColla','_injector','576640oLfKXh','pipe','root','UNRECOGNIZED','/universer-api/comment/unit/','body','getMemberID','size','personId','payload','_userService','addComment','/delete','resolveComment','Add','reply','getUser','/universer-api/user/list','add','_initUserSync','stringify','delete','10XbolXo','format','commentUpdate$','rangeType','6044687dSyarl','users','content','get','12NpPXVL','requireSession','length','threadId','/solved','slice','203283YjFyzD','OpenOrReOpen','customRanges','rangeId','_threadCommentDataSource','_threadCommentDataSourceService','replyId','1378vdUybR','listComments','error','deleteComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Delete','post'];_0x321d=function(){return _0x3cea2d;};return _0x321d();}let g=class extends _0x356973{constructor(_0x123da6,_0x3134fd){const _0x14bd4f=_0x1f0f9a;super(),this[_0x14bd4f(0x165)]=_0x123da6,this['_threadCommentDataSource']=_0x3134fd,this[_0x14bd4f(0x136)]();}[_0x1f0f9a(0x136)](){const _0x1ee8da=_0x1f0f9a;this['_threadCommentDataSourceService']['dataSource']=this[_0x1ee8da(0x164)],this[_0x1ee8da(0x165)][_0x1ee8da(0x13a)]=!0x1;}};g=te([N(0x0,_0x57e9c9),N(0x1,_0x24f2a0(f))],g);var se=Object[_0x1f0f9a(0x127)],oe=Object[_0x1f0f9a(0x17a)],ne=(_0x48d902,_0x3dba62,_0x895e79)=>_0x3dba62 in _0x48d902?se(_0x48d902,_0x3dba62,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x895e79}):_0x48d902[_0x3dba62]=_0x895e79,ie=(_0x915dde,_0x1fa65d,_0x53094a,_0x224d0b)=>{const _0x65151e=_0x1f0f9a;for(var _0x44272c=_0x224d0b>0x1?void 0x0:_0x224d0b?oe(_0x1fa65d,_0x53094a):_0x1fa65d,_0xd22428=_0x915dde[_0x65151e(0x15c)]-0x1,_0x1263c6;_0xd22428>=0x0;_0xd22428--)(_0x1263c6=_0x915dde[_0xd22428])&&(_0x44272c=_0x1263c6(_0x44272c)||_0x44272c);return _0x44272c;},w=(_0x42a473,_0x1127e7)=>(_0x42704b,_0x6b5a29)=>_0x1127e7(_0x42704b,_0x6b5a29,_0x42a473),$=(_0x3eaf3d,_0x2d0b31,_0x58c1b1)=>ne(_0x3eaf3d,typeof _0x2d0b31!=_0x1f0f9a(0x131)?_0x2d0b31+'':_0x2d0b31,_0x58c1b1);let b=class extends _0x1be882{constructor(_0xaa3004=M,_0x40ad70,_0x4dd054){const _0x20ad97=_0x1f0f9a;super(),this['_config']=_0xaa3004,this[_0x20ad97(0x13b)]=_0x40ad70,this[_0x20ad97(0x173)]=_0x4dd054;const {..._0x2e974f}=_0x454f50({},M,this[_0x20ad97(0x139)]);this[_0x20ad97(0x173)][_0x20ad97(0x122)](z,_0x2e974f);}[_0x1f0f9a(0x17b)](){const _0x346483=_0x1f0f9a;[[f],[g],[S]][_0x346483(0x120)](_0x38d1a8=>{const _0x3b95c1=_0x346483;this[_0x3b95c1(0x13b)][_0x3b95c1(0x14e)](_0x38d1a8);});}[_0x1f0f9a(0x16f)](){const _0x12c4cd=_0x1f0f9a;this[_0x12c4cd(0x13b)][_0x12c4cd(0x159)](g),this[_0x12c4cd(0x13b)][_0x12c4cd(0x159)](S);}};$(b,'pluginName',W),$(b,_0x1f0f9a(0x12d),_0x2bb47e[_0x1f0f9a(0x178)]),b=ie([_0xf2eb93(_0x37f713,_0x581945,_0x37c301),w(0x1,_0x24f2a0(_0x1b6635)),w(0x2,_0x450544)],b);function _0x2bee(_0x2113f1,_0x111fcf){const _0x321d46=_0x321d();return _0x2bee=function(_0x2bee1d,_0x4e0a8f){_0x2bee1d=_0x2bee1d-0x117;let _0x52748d=_0x321d46[_0x2bee1d];return _0x52748d;},_0x2bee(_0x2113f1,_0x111fcf);}export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x522987=_0x2161;(function(_0x2688fa,_0xd5e57){const _0x5507ad=_0x2161,_0x3ef85a=_0x2688fa();while(!![]){try{const _0x3533e0=-parseInt(_0x5507ad(0xea))/0x1*(-parseInt(_0x5507ad(0xad))/0x2)+-parseInt(_0x5507ad(0xf5))/0x3*(-parseInt(_0x5507ad(0xe1))/0x4)+parseInt(_0x5507ad(0xc0))/0x5*(parseInt(_0x5507ad(0xd6))/0x6)+-parseInt(_0x5507ad(0xf0))/0x7*(parseInt(_0x5507ad(0xf7))/0x8)+-parseInt(_0x5507ad(0xcc))/0x9+parseInt(_0x5507ad(0x96))/0xa+parseInt(_0x5507ad(0xe5))/0xb*(-parseInt(_0x5507ad(0xf8))/0xc);if(_0x3533e0===_0xd5e57)break;else _0x3ef85a['push'](_0x3ef85a['shift']());}catch(_0x4df065){_0x3ef85a['push'](_0x3ef85a['shift']());}}}(_0xe681,0x87140));function _0xe681(){const _0x3f8605=['_threadCommentModel','8DsQxNy','708BVUdEv','body','userID','user','content','_commentService','9559250OznUgH','getCurrentUser','/reply','/universer-api/comment/unit/','onReady','/add','UNIVER_UNKNOWN','payload','defineProperty','getUser','solved','slice','Solved','customRanges','rangeId','Delete','addComment','getUnit','ref','syncUpdateMutationToColla','comment','_config','root','30yHOuxf','add','deleteComment','filter','error','format','users','Add','pluginName','type','_sessionService','map','getMemberID','_initUserSync','parse','reply','resolved','requireSession','forEach','15HqkjhB','_httpService','subscribe','/edit','threadId','stringify','_initDataSource','onStarting','disposeWithMe','resolveComment','replyId','replies','9758340uOseKs','_configService','commentUpdate$','COMMENT','Solve','setConfig','addUser','get','Reply','_threadCommentDataSourceService','1399242QThYwk','Edit','listComments','length','comments','size','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getOwnPropertyDescriptor','/solved','_init','userId','2564416QIpoDa','unitId','values','rangeType','236687nHybkl','Unknown','_injector','post','UNRECOGNIZED','43969UoSnSH','_userService','YYYY/MM/DD\x20HH:mm','pipe','code','_threadCommentDataSource','343994VxSaIR','find','OpenOrReOpen','saveCommentToSnapshot','createTimestamp','3ZqJLFe'];_0xe681=function(){return _0x3f8605;};return _0xe681();}import{CommentService as _0x2428f5,CollaborationSessionService as _0x2f8845,UniverCollaborationClientPlugin as _0x10b110}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4c9a4e}from'@univerjs-pro/license';import{dayjs as _0x378f51,UserManagerService as _0x5a10c3,Inject as _0x2518d0,Injector as _0x5d3cee,Disposable as _0x6e4d38,CustomRangeType as _0x204202,UniverInstanceType as _0x5b882a,DependentOn as _0x4e1bfd,IConfigService as _0x51787d,Plugin as _0x2c9034,merge as _0x410a83}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x17dac6}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x59aa45,IThreadCommentDataSourceService as _0x3e559c}from'@univerjs/thread-comment';import{bufferTime as _0x50f19c}from'rxjs';import{HTTPService as _0xd30796}from'@univerjs/network';const W=_0x522987(0xdc);var I=(_0x2da422=>(_0x2da422[_0x2da422[_0x522987(0xf2)]=0x0]='OpenOrReOpen',_0x2da422[_0x2da422['Solved']=0x1]=_0x522987(0xa2),_0x2da422[_0x2da422[_0x522987(0xe9)]=-0x1]='UNRECOGNIZED',_0x2da422))(I||{}),v=(_0x5dc181=>(_0x5dc181[_0x5dc181['Unknown']=0x0]=_0x522987(0xe6),_0x5dc181[_0x5dc181[_0x522987(0xb4)]=0x1]=_0x522987(0xb4),_0x5dc181[_0x5dc181[_0x522987(0xd4)]=0x2]=_0x522987(0xd4),_0x5dc181[_0x5dc181[_0x522987(0xd7)]=0x3]=_0x522987(0xd7),_0x5dc181[_0x5dc181[_0x522987(0xa5)]=0x4]=_0x522987(0xa5),_0x5dc181[_0x5dc181[_0x522987(0xd0)]=0x5]=_0x522987(0xd0),_0x5dc181[_0x5dc181[_0x522987(0xe9)]=-0x1]='UNRECOGNIZED',_0x5dc181))(v||{});const D=_0x376f06=>_0x378f51(new Date(+_0x376f06))[_0x522987(0xb2)](_0x522987(0xec)),B=async(_0x1a2b62,_0x45ca7d)=>{const _0x3f9cbf=_0x522987,_0x1a8a54=_0x1a2b62[_0x3f9cbf(0xd3)](_0x5a10c3),_0x395f67=_0x1a2b62[_0x3f9cbf(0xd3)](_0xd30796);_0x45ca7d[_0x3f9cbf(0xbf)](_0x30136f=>{const _0x349cb2=_0x3f9cbf;_0x1a8a54[_0x349cb2(0x9f)](_0x30136f)&&_0x45ca7d['delete'](_0x30136f);}),_0x45ca7d[_0x3f9cbf(0xdb)]&&(await _0x395f67[_0x3f9cbf(0xd3)]('/universer-api/user/list',{'params':{'userIDs':[..._0x45ca7d]}}))[_0x3f9cbf(0xf9)][_0x3f9cbf(0xb3)]['forEach'](_0x3e8f72=>{const _0x2143a8=_0x3f9cbf;_0x3e8f72&&_0x1a8a54[_0x2143a8(0xd2)](_0x3e8f72);});};var K=Object[_0x522987(0xdd)],V=(_0x339ecc,_0x2d3d68,_0x4f8c64,_0x431291)=>{const _0x21e6f1=_0x522987;for(var _0x166369=_0x431291>0x1?void 0x0:_0x431291?K(_0x2d3d68,_0x4f8c64):_0x2d3d68,_0x1f8fae=_0x339ecc[_0x21e6f1(0xd9)]-0x1,_0x79512f;_0x1f8fae>=0x0;_0x1f8fae--)(_0x79512f=_0x339ecc[_0x1f8fae])&&(_0x166369=_0x79512f(_0x166369)||_0x166369);return _0x166369;},p=(_0x325c2d,_0x5e37b7)=>(_0x231b08,_0x27e5c3)=>_0x5e37b7(_0x231b08,_0x27e5c3,_0x325c2d);let S=class extends _0x6e4d38{constructor(_0x58f80a,_0x4d8abe,_0x17f978,_0x244822){const _0x5063d4=_0x522987;super(),this[_0x5063d4(0xfd)]=_0x58f80a,this['_threadCommentModel']=_0x4d8abe,this[_0x5063d4(0xeb)]=_0x17f978,this['_injector']=_0x244822,this['_init'](),this[_0x5063d4(0xba)]();}['_initUserSync'](){const _0xcbf5bd=_0x522987;this[_0xcbf5bd(0xc8)](this[_0xcbf5bd(0xf6)][_0xcbf5bd(0xce)][_0xcbf5bd(0xed)](_0x50f19c(0x10))[_0xcbf5bd(0xc2)](_0xa2d909=>{const _0x22d522=_0xcbf5bd,_0x3997cf=new Set();_0xa2d909[_0x22d522(0xbf)](_0x296b23=>{const _0x5f1fea=_0x22d522;switch(_0x296b23[_0x5f1fea(0xb6)]){case _0x5f1fea(0xae):{const _0x27cf85=_0x296b23[_0x5f1fea(0x9d)]['personId'];_0x3997cf[_0x5f1fea(0xae)](_0x27cf85);break;}}}),B(this[_0x22d522(0xe7)],_0x3997cf);}));}[_0x522987(0xdf)](){const _0x4a9d0c=_0x522987;this['disposeWithMe'](this[_0x4a9d0c(0xfd)]['commentUpdate$'][_0x4a9d0c(0xc2)](async _0x5995e1=>{const _0x1a30b2=_0x4a9d0c;var _0x27d087,_0x1afbd9,_0x4b2e9f,_0x47d3c6;const _0x4d0ddb=(_0x27d087=this[_0x1a30b2(0xf6)][_0x1a30b2(0xa7)](_0x5995e1[_0x1a30b2(0xe2)])['find'](_0x31a8e7=>_0x31a8e7['threadId']===_0x5995e1[_0x1a30b2(0xc4)]))==null?void 0x0:_0x27d087[_0x1a30b2(0xac)];if(!_0x4d0ddb)return;const {unitId:_0x32121f,subUnitId:_0x4ca891}=_0x4d0ddb;switch(_0x5995e1[_0x1a30b2(0xfb)]&&this[_0x1a30b2(0xeb)]['addUser'](_0x5995e1['user']),_0x5995e1[_0x1a30b2(0xb6)]){case v[_0x1a30b2(0xb4)]:break;case v[_0x1a30b2(0xd4)]:{this[_0x1a30b2(0xf6)]['addComment'](_0x32121f,_0x4ca891,{'unitId':_0x32121f,'subUnitId':_0x4ca891,'ref':'','id':_0x5995e1['replyId'],'dT':D(+_0x5995e1['createTimestamp']),'threadId':_0x5995e1[_0x1a30b2(0xc4)],'personId':(_0x4b2e9f=(_0x1afbd9=_0x5995e1[_0x1a30b2(0xfb)])==null?void 0x0:_0x1afbd9[_0x1a30b2(0xfa)])!=null?_0x4b2e9f:_0x5995e1['userId'],'text':JSON['parse'](_0x5995e1[_0x1a30b2(0xfc)]),'parentId':_0x4d0ddb['id']});break;}case v[_0x1a30b2(0xa5)]:{const _0x1e22b7=this[_0x1a30b2(0xf6)]['getComment'](_0x32121f,_0x4ca891,_0x5995e1[_0x1a30b2(0xca)]);_0x1e22b7&&_0x1e22b7['parentId']&&this['_threadCommentModel'][_0x1a30b2(0xaf)](_0x32121f,_0x4ca891,_0x5995e1[_0x1a30b2(0xca)]);break;}case v['Edit']:{this['_threadCommentModel']['updateComment'](_0x32121f,_0x4ca891,{'commentId':_0x5995e1['replyId'],'text':JSON[_0x1a30b2(0xbb)](_0x5995e1['content'])});break;}case v[_0x1a30b2(0xd0)]:{const _0x563b8c=(_0x47d3c6=this[_0x1a30b2(0xf6)]['getUnit'](_0x5995e1['unitId'])[_0x1a30b2(0xf1)](_0x55a2f8=>_0x55a2f8[_0x1a30b2(0xc4)]===_0x5995e1[_0x1a30b2(0xc4)]))==null?void 0x0:_0x47d3c6[_0x1a30b2(0xac)];_0x563b8c&&this[_0x1a30b2(0xf6)]['resolveComment'](_0x32121f,_0x4ca891,_0x563b8c['id'],_0x5995e1[_0x1a30b2(0xa0)]===I[_0x1a30b2(0xa2)]);break;}}}));}};S=V([p(0x0,_0x2518d0(_0x2428f5)),p(0x1,_0x2518d0(_0x59aa45)),p(0x2,_0x2518d0(_0x5a10c3)),p(0x3,_0x2518d0(_0x5d3cee))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x522987(0xdd)],Q=(_0xc7cf80,_0x2dc0c2,_0x43ef35,_0x3b5749)=>{const _0x3bd44d=_0x522987;for(var _0x5474ee=_0x3b5749>0x1?void 0x0:_0x3b5749?k(_0x2dc0c2,_0x43ef35):_0x2dc0c2,_0x19436d=_0xc7cf80[_0x3bd44d(0xd9)]-0x1,_0x385204;_0x19436d>=0x0;_0x19436d--)(_0x385204=_0xc7cf80[_0x19436d])&&(_0x5474ee=_0x385204(_0x5474ee)||_0x5474ee);return _0x5474ee;},_=(_0x3816e2,_0x25acd3)=>(_0x2cde7d,_0x175371)=>_0x25acd3(_0x2cde7d,_0x175371,_0x3816e2);function X(_0x468bcc,_0x1be89e){const _0x1b2ef8=_0x522987,_0x3074e1=_0x468bcc['replies'][0x0];return{..._0x1be89e,'id':_0x3074e1[_0x1b2ef8(0xca)],'resolved':_0x468bcc[_0x1b2ef8(0xa0)]===0x1,'dT':D(_0x3074e1[_0x1b2ef8(0xf4)]),'personId':_0x3074e1[_0x1b2ef8(0xe0)],'threadId':_0x3074e1[_0x1b2ef8(0xc4)]};}function ee(_0x42db8c,_0x32055f,_0x2e313d){const _0x47e4e8=_0x522987;var _0x5f719,_0x340b68;if(((_0x340b68=(_0x5f719=_0x42db8c==null?void 0x0:_0x42db8c['replies'])==null?void 0x0:_0x5f719['length'])!=null?_0x340b68:0x0)>0x0){const _0x43c09e=(_0x361da2,_0x16f9be)=>({'id':_0x361da2[_0x47e4e8(0xca)],'threadId':_0x361da2['threadId'],'dT':D(_0x361da2['createTimestamp']),'personId':_0x361da2['userId'],'resolved':_0x42db8c[_0x47e4e8(0xa0)]===I['Solved'],'unitId':_0x32055f,'subUnitId':_0x2e313d,'text':JSON[_0x47e4e8(0xbb)](_0x361da2[_0x47e4e8(0xfc)]),'parentId':_0x16f9be}),_0x584e96=_0x43c09e(_0x42db8c[_0x47e4e8(0xcb)][0x0]);return{..._0x584e96,'children':_0x42db8c['replies'][_0x47e4e8(0xa1)](0x1)[_0x47e4e8(0xb8)](_0x2617dd=>_0x43c09e(_0x2617dd,_0x584e96['id']))};}return null;}let f=class{constructor(_0x3b0e2c,_0x2510cb,_0xa4a287,_0xcec989){const _0x5957c6=_0x522987;this[_0x5957c6(0xc1)]=_0x3b0e2c,this[_0x5957c6(0xeb)]=_0x2510cb,this[_0x5957c6(0xb7)]=_0xa4a287,this['_injector']=_0xcec989;}async[_0x522987(0xa6)](_0x3e76b1){const _0x432314=_0x522987;var _0x1d0f8e,_0x2f5089;const {parentId:_0x5226e8,unitId:_0xbd3ae5,text:_0x30f583,threadId:_0x5ebefa}=_0x3e76b1,_0x512b79=(_0x2f5089=(_0x1d0f8e=_0x30f583[_0x432314(0xa3)])==null?void 0x0:_0x1d0f8e[_0x432314(0xb0)](_0x287682=>_0x287682[_0x432314(0xe4)]===_0x204202[_0x432314(0xcf)])[_0x432314(0xb8)](_0x415593=>_0x415593[_0x432314(0xa4)]))!=null?_0x2f5089:[],_0x3decfa=JSON['stringify'](_0x30f583),_0x2f97c2=(await this[_0x432314(0xb7)][_0x432314(0xbe)](_0xbd3ae5))[_0x432314(0xb9)]();if(_0x5226e8){const _0x14c681={'memberId':_0x2f97c2,'unitId':_0xbd3ae5,'content':_0x3decfa,'mention':_0x512b79,'threadId':_0x5ebefa},_0x1a2472=(await this[_0x432314(0xc1)]['post'](_0x432314(0x99)+_0xbd3ae5+_0x432314(0x98),{'body':_0x14c681}))[_0x432314(0xf9)][_0x432314(0xbc)];return{..._0x3e76b1,'id':_0x1a2472[_0x432314(0xca)],'dT':_0x378f51(+_0x1a2472[_0x432314(0xf4)])[_0x432314(0xb2)](_0x432314(0xec)),'personId':_0x1a2472['userId']};}else{const _0x3ec21d={'memberId':_0x2f97c2,'unitId':_0xbd3ae5,'content':_0x3decfa,'mention':_0x512b79},_0x3a311b=await this[_0x432314(0xc1)][_0x432314(0xe8)](_0x432314(0x99)+_0xbd3ae5+_0x432314(0x9b),{'body':_0x3ec21d});return X(_0x3a311b[_0x432314(0xf9)][_0x432314(0xaa)],_0x3e76b1);}}async['updateComment'](_0x3bae78){const _0x579241=_0x522987;var _0x4a77a5,_0x282a83;const {text:_0x4b05bc,unitId:_0x1a3bdf}=_0x3bae78,_0x27896c=(_0x282a83=(_0x4a77a5=_0x4b05bc[_0x579241(0xa3)])==null?void 0x0:_0x4a77a5['filter'](_0x411985=>_0x411985[_0x579241(0xe4)]===_0x204202[_0x579241(0xcf)])[_0x579241(0xb8)](_0x3fd34d=>_0x3fd34d[_0x579241(0xa4)]))!=null?_0x282a83:[],_0x5aa046=JSON[_0x579241(0xc5)](_0x4b05bc),_0x27368c=_0x3bae78[_0x579241(0xc4)],_0xdc28ec=_0x3bae78['id'],_0xf492bc={'memberId':(await this[_0x579241(0xb7)][_0x579241(0xbe)](_0x1a3bdf))[_0x579241(0xb9)](),'unitId':_0x1a3bdf,'threadId':_0x27368c,'mention':_0x27896c,'content':_0x5aa046,'replyId':_0xdc28ec},_0x501f07=await this[_0x579241(0xc1)]['post'](_0x579241(0x99)+_0x1a3bdf+_0x579241(0xc3),{'body':_0xf492bc});return!_0x501f07[_0x579241(0xf9)]['error']||_0x501f07['body'][_0x579241(0xb1)][_0x579241(0xee)]===0x1;}async[_0x522987(0xc9)](_0x2a7f13){const _0x278190=_0x522987,{unitId:_0x3c18f8}=_0x2a7f13,_0x56ede8=_0x2a7f13['threadId'],_0x2fa7a2={'memberId':this[_0x278190(0xeb)][_0x278190(0x97)]()[_0x278190(0xfa)],'unitId':_0x3c18f8,'threadId':_0x56ede8,'solved':_0x2a7f13[_0x278190(0xbd)]?I['Solved']:I[_0x278190(0xf2)]},_0x472706=await this[_0x278190(0xc1)][_0x278190(0xe8)](_0x278190(0x99)+_0x3c18f8+_0x278190(0xde),{'body':_0x2fa7a2});return!_0x472706[_0x278190(0xf9)][_0x278190(0xb1)]||_0x472706[_0x278190(0xf9)]['error'][_0x278190(0xee)]===0x1;}async[_0x522987(0xaf)](_0x5a3c3b,_0x4afe57,_0x2df827,_0x31cda6){const _0x1b9bed=_0x522987,_0x58a29a={'memberId':(await this[_0x1b9bed(0xb7)][_0x1b9bed(0xbe)](_0x5a3c3b))[_0x1b9bed(0xb9)](),'threadId':_0x2df827,'replyId':_0x31cda6,'unitId':_0x5a3c3b},_0x37fbd0=await this[_0x1b9bed(0xc1)][_0x1b9bed(0xe8)]('/universer-api/comment/unit/'+_0x5a3c3b+'/delete',{'body':_0x58a29a});return!_0x37fbd0[_0x1b9bed(0xf9)][_0x1b9bed(0xb1)]||_0x37fbd0[_0x1b9bed(0xf9)]['error']['code']===0x1;}async[_0x522987(0xd8)](_0x14f650,_0x4cc032,_0x28bf4a){const _0x3caefd=_0x522987,_0xa0d393={'unitId':_0x14f650,'threadId':_0x28bf4a},_0x3d0294=await this[_0x3caefd(0xc1)]['post'](_0x3caefd(0x99)+_0x14f650+'/list',{'body':_0xa0d393}),_0x4aebbe=_0x28bf4a[_0x3caefd(0xb8)](_0xa0e440=>ee(_0x3d0294['body'][_0x3caefd(0xda)][_0xa0e440],_0x14f650,_0x4cc032))[_0x3caefd(0xb0)](Boolean);return Object[_0x3caefd(0xe3)](_0x3d0294[_0x3caefd(0xf9)][_0x3caefd(0xb3)])[_0x3caefd(0xbf)](_0x56652f=>{const _0x3868f5=_0x3caefd;this['_userService'][_0x3868f5(0xd2)](_0x56652f);}),_0x4aebbe;}[_0x522987(0xf3)](_0x87a8b8){const _0x5b106c=_0x522987;return{'id':_0x87a8b8['id'],'threadId':_0x87a8b8[_0x5b106c(0xc4)],'ref':_0x87a8b8[_0x5b106c(0xa8)]};}};f=Q([_(0x0,_0x2518d0(_0xd30796)),_(0x1,_0x2518d0(_0x5a10c3)),_(0x2,_0x2518d0(_0x2f8845)),_(0x3,_0x2518d0(_0x5d3cee))],f);var re=Object[_0x522987(0xdd)],te=(_0x3f6d6f,_0x3ef338,_0x1f913d,_0x1fa1cf)=>{const _0x11a954=_0x522987;for(var _0x248338=_0x1fa1cf>0x1?void 0x0:_0x1fa1cf?re(_0x3ef338,_0x1f913d):_0x3ef338,_0x1f69d3=_0x3f6d6f[_0x11a954(0xd9)]-0x1,_0x49c5dc;_0x1f69d3>=0x0;_0x1f69d3--)(_0x49c5dc=_0x3f6d6f[_0x1f69d3])&&(_0x248338=_0x49c5dc(_0x248338)||_0x248338);return _0x248338;},N=(_0x32c5e9,_0x3265b0)=>(_0x1414f2,_0x44e43c)=>_0x3265b0(_0x1414f2,_0x44e43c,_0x32c5e9);let g=class extends _0x6e4d38{constructor(_0x3bd67a,_0x46c6db){const _0x713701=_0x522987;super(),this[_0x713701(0xd5)]=_0x3bd67a,this[_0x713701(0xef)]=_0x46c6db,this[_0x713701(0xc6)]();}['_initDataSource'](){const _0x2c1189=_0x522987;this[_0x2c1189(0xd5)]['dataSource']=this[_0x2c1189(0xef)],this[_0x2c1189(0xd5)][_0x2c1189(0xa9)]=!0x1;}};function _0x2161(_0x41c1b7,_0x2832b2){const _0xe6816e=_0xe681();return _0x2161=function(_0x21614d,_0x14d3c2){_0x21614d=_0x21614d-0x96;let _0x579043=_0xe6816e[_0x21614d];return _0x579043;},_0x2161(_0x41c1b7,_0x2832b2);}g=te([N(0x0,_0x3e559c),N(0x1,_0x2518d0(f))],g);var se=Object[_0x522987(0x9e)],oe=Object[_0x522987(0xdd)],ne=(_0x46b57e,_0x5f54c1,_0x513596)=>_0x5f54c1 in _0x46b57e?se(_0x46b57e,_0x5f54c1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x513596}):_0x46b57e[_0x5f54c1]=_0x513596,ie=(_0x2b1da5,_0x3906a7,_0x55dfc3,_0x57c459)=>{const _0x36354a=_0x522987;for(var _0x1deec0=_0x57c459>0x1?void 0x0:_0x57c459?oe(_0x3906a7,_0x55dfc3):_0x3906a7,_0x24b9da=_0x2b1da5[_0x36354a(0xd9)]-0x1,_0x248c04;_0x24b9da>=0x0;_0x24b9da--)(_0x248c04=_0x2b1da5[_0x24b9da])&&(_0x1deec0=_0x248c04(_0x1deec0)||_0x1deec0);return _0x1deec0;},w=(_0x3d63ce,_0x302982)=>(_0x5bf970,_0x2fc8b5)=>_0x302982(_0x5bf970,_0x2fc8b5,_0x3d63ce),$=(_0x2f1e41,_0x59a26b,_0x20bce3)=>ne(_0x2f1e41,typeof _0x59a26b!='symbol'?_0x59a26b+'':_0x59a26b,_0x20bce3);let b=class extends _0x2c9034{constructor(_0x120d09=M,_0x37434c,_0x1e543b){const _0x34b58d=_0x522987;super(),this[_0x34b58d(0xab)]=_0x120d09,this['_injector']=_0x37434c,this[_0x34b58d(0xcd)]=_0x1e543b;const {..._0xba917c}=_0x410a83({},M,this['_config']);this['_configService'][_0x34b58d(0xd1)](z,_0xba917c);}[_0x522987(0xc7)](){const _0x31f9bc=_0x522987;[[f],[g],[S]][_0x31f9bc(0xbf)](_0x5c723e=>{const _0x15fd0e=_0x31f9bc;this[_0x15fd0e(0xe7)]['add'](_0x5c723e);});}[_0x522987(0x9a)](){const _0x127f55=_0x522987;this[_0x127f55(0xe7)][_0x127f55(0xd3)](g),this[_0x127f55(0xe7)][_0x127f55(0xd3)](S);}};$(b,_0x522987(0xb5),W),$(b,_0x522987(0xb6),_0x5b882a[_0x522987(0x9c)]),b=ie([_0x4e1bfd(_0x17dac6,_0x10b110,_0x4c9a4e),w(0x1,_0x2518d0(_0x5d3cee)),w(0x2,_0x51787d)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x1f0f9a=_0x2bee;(function(_0x1367b1,_0x37c302){const _0x193c4f=_0x2bee,_0x4b2cce=_0x1367b1();while(!![]){try{const _0x268820=parseInt(_0x193c4f(0x12c))/0x1*(parseInt(_0x193c4f(0x135))/0x2)+parseInt(_0x193c4f(0x160))/0x3*(-parseInt(_0x193c4f(0x15a))/0x4)+-parseInt(_0x193c4f(0x13c))/0x5+parseInt(_0x193c4f(0x179))/0x6*(-parseInt(_0x193c4f(0x138))/0x7)+-parseInt(_0x193c4f(0x11f))/0x8*(-parseInt(_0x193c4f(0x125))/0x9)+-parseInt(_0x193c4f(0x152))/0xa*(-parseInt(_0x193c4f(0x156))/0xb)+parseInt(_0x193c4f(0x17e))/0xc*(-parseInt(_0x193c4f(0x167))/0xd);if(_0x268820===_0x37c302)break;else _0x4b2cce['push'](_0x4b2cce['shift']());}catch(_0x1bbc1b){_0x4b2cce['push'](_0x4b2cce['shift']());}}}(_0x321d,0x75a28));import{CommentService as _0x1fff95,CollaborationSessionService as _0x480a85,UniverCollaborationClientPlugin as _0x581945}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x37c301}from'@univerjs-pro/license';import{dayjs as _0x1f1040,UserManagerService as _0x4fcf10,Inject as _0x24f2a0,Injector as _0x1b6635,Disposable as _0x356973,CustomRangeType as _0x4c1e5e,UniverInstanceType as _0x2bb47e,DependentOn as _0xf2eb93,IConfigService as _0x450544,Plugin as _0x1be882,merge as _0x454f50}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x37f713}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2aec63,IThreadCommentDataSourceService as _0x57e9c9}from'@univerjs/thread-comment';import{bufferTime as _0x1db72a}from'rxjs';import{HTTPService as _0x19d659}from'@univerjs/network';const W=_0x1f0f9a(0x16b);var I=(_0x57d9ff=>(_0x57d9ff[_0x57d9ff[_0x1f0f9a(0x161)]=0x0]='OpenOrReOpen',_0x57d9ff[_0x57d9ff['Solved']=0x1]=_0x1f0f9a(0x175),_0x57d9ff[_0x57d9ff[_0x1f0f9a(0x13f)]=-0x1]=_0x1f0f9a(0x13f),_0x57d9ff))(I||{}),v=(_0x525402=>(_0x525402[_0x525402[_0x1f0f9a(0x171)]=0x0]='Unknown',_0x525402[_0x525402[_0x1f0f9a(0x14a)]=0x1]='Add',_0x525402[_0x525402[_0x1f0f9a(0x124)]=0x2]='Reply',_0x525402[_0x525402[_0x1f0f9a(0x16e)]=0x3]=_0x1f0f9a(0x16e),_0x525402[_0x525402['Delete']=0x4]='Delete',_0x525402[_0x525402[_0x1f0f9a(0x12f)]=0x5]='Solve',_0x525402[_0x525402['UNRECOGNIZED']=-0x1]=_0x1f0f9a(0x13f),_0x525402))(v||{});const D=_0x304c7d=>_0x1f1040(new Date(+_0x304c7d))[_0x1f0f9a(0x153)](_0x1f0f9a(0x132)),B=async(_0x592702,_0x53b76b)=>{const _0x266b0d=_0x1f0f9a,_0x3d5a7d=_0x592702['get'](_0x4fcf10),_0x4fe0f6=_0x592702[_0x266b0d(0x159)](_0x19d659);_0x53b76b['forEach'](_0x426bd5=>{const _0x5d4e66=_0x266b0d;_0x3d5a7d[_0x5d4e66(0x14c)](_0x426bd5)&&_0x53b76b[_0x5d4e66(0x151)](_0x426bd5);}),_0x53b76b[_0x266b0d(0x143)]&&(await _0x4fe0f6['get'](_0x266b0d(0x14d),{'params':{'userIDs':[..._0x53b76b]}}))[_0x266b0d(0x141)][_0x266b0d(0x157)][_0x266b0d(0x120)](_0x2b3374=>{const _0x1d2ce7=_0x266b0d;_0x2b3374&&_0x3d5a7d[_0x1d2ce7(0x128)](_0x2b3374);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x53a6ad,_0x1a19fd,_0x30142a,_0x3a3ce3)=>{const _0x104bbf=_0x1f0f9a;for(var _0x19a5fa=_0x3a3ce3>0x1?void 0x0:_0x3a3ce3?K(_0x1a19fd,_0x30142a):_0x1a19fd,_0x43a8d9=_0x53a6ad[_0x104bbf(0x15c)]-0x1,_0x15d24c;_0x43a8d9>=0x0;_0x43a8d9--)(_0x15d24c=_0x53a6ad[_0x43a8d9])&&(_0x19a5fa=_0x15d24c(_0x19a5fa)||_0x19a5fa);return _0x19a5fa;},p=(_0x4c499c,_0x495df5)=>(_0x42c950,_0x1656c7)=>_0x495df5(_0x42c950,_0x1656c7,_0x4c499c);let S=class extends _0x356973{constructor(_0x5d3899,_0x238abc,_0x11f66f,_0x22e63f){const _0x472e0b=_0x1f0f9a;super(),this['_commentService']=_0x5d3899,this[_0x472e0b(0x129)]=_0x238abc,this[_0x472e0b(0x146)]=_0x11f66f,this[_0x472e0b(0x13b)]=_0x22e63f,this[_0x472e0b(0x177)](),this[_0x472e0b(0x14f)]();}[_0x1f0f9a(0x14f)](){const _0x326599=_0x1f0f9a;this[_0x326599(0x12b)](this['_threadCommentModel'][_0x326599(0x154)][_0x326599(0x13d)](_0x1db72a(0x10))[_0x326599(0x176)](_0x32efc1=>{const _0x21c88f=_0x326599,_0xfbddf2=new Set();_0x32efc1[_0x21c88f(0x120)](_0x32e91a=>{const _0x1773b2=_0x21c88f;switch(_0x32e91a['type']){case _0x1773b2(0x14e):{const _0x50241e=_0x32e91a[_0x1773b2(0x145)][_0x1773b2(0x144)];_0xfbddf2['add'](_0x50241e);break;}}}),B(this[_0x21c88f(0x13b)],_0xfbddf2);}));}['_init'](){const _0x460a68=_0x1f0f9a;this[_0x460a68(0x12b)](this[_0x460a68(0x12e)][_0x460a68(0x154)][_0x460a68(0x176)](async _0x24b98b=>{const _0x56de22=_0x460a68;var _0x418536,_0x55c24f,_0x46eee2,_0x196c01;const _0x4a482e=(_0x418536=this[_0x56de22(0x129)]['getUnit'](_0x24b98b[_0x56de22(0x134)])['find'](_0x41eec2=>_0x41eec2[_0x56de22(0x15d)]===_0x24b98b['threadId']))==null?void 0x0:_0x418536[_0x56de22(0x13e)];if(!_0x4a482e)return;const {unitId:_0x3f5e97,subUnitId:_0x1932d6}=_0x4a482e;switch(_0x24b98b[_0x56de22(0x172)]&&this[_0x56de22(0x146)][_0x56de22(0x128)](_0x24b98b[_0x56de22(0x172)]),_0x24b98b[_0x56de22(0x12d)]){case v[_0x56de22(0x14a)]:break;case v[_0x56de22(0x124)]:{this[_0x56de22(0x129)][_0x56de22(0x147)](_0x3f5e97,_0x1932d6,{'unitId':_0x3f5e97,'subUnitId':_0x1932d6,'ref':'','id':_0x24b98b[_0x56de22(0x166)],'dT':D(+_0x24b98b[_0x56de22(0x133)]),'threadId':_0x24b98b[_0x56de22(0x15d)],'personId':(_0x46eee2=(_0x55c24f=_0x24b98b['user'])==null?void 0x0:_0x55c24f[_0x56de22(0x11d)])!=null?_0x46eee2:_0x24b98b['userId'],'text':JSON[_0x56de22(0x137)](_0x24b98b[_0x56de22(0x158)]),'parentId':_0x4a482e['id']});break;}case v[_0x56de22(0x16c)]:{const _0xf32fff=this[_0x56de22(0x129)][_0x56de22(0x11e)](_0x3f5e97,_0x1932d6,_0x24b98b['replyId']);_0xf32fff&&_0xf32fff['parentId']&&this[_0x56de22(0x129)][_0x56de22(0x16a)](_0x3f5e97,_0x1932d6,_0x24b98b['replyId']);break;}case v['Edit']:{this[_0x56de22(0x129)]['updateComment'](_0x3f5e97,_0x1932d6,{'commentId':_0x24b98b[_0x56de22(0x166)],'text':JSON['parse'](_0x24b98b['content'])});break;}case v[_0x56de22(0x12f)]:{const _0x95d5c2=(_0x196c01=this[_0x56de22(0x129)][_0x56de22(0x12a)](_0x24b98b['unitId'])[_0x56de22(0x123)](_0x3e7dac=>_0x3e7dac[_0x56de22(0x15d)]===_0x24b98b[_0x56de22(0x15d)]))==null?void 0x0:_0x196c01[_0x56de22(0x13e)];_0x95d5c2&&this[_0x56de22(0x129)][_0x56de22(0x149)](_0x3f5e97,_0x1932d6,_0x95d5c2['id'],_0x24b98b[_0x56de22(0x121)]===I[_0x56de22(0x175)]);break;}}}));}};S=V([p(0x0,_0x24f2a0(_0x1fff95)),p(0x1,_0x24f2a0(_0x2aec63)),p(0x2,_0x24f2a0(_0x4fcf10)),p(0x3,_0x24f2a0(_0x1b6635))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x1f0f9a(0x17a)],Q=(_0x2ebf55,_0x18f1f6,_0x275bc7,_0x376a4e)=>{for(var _0x54b5a5=_0x376a4e>0x1?void 0x0:_0x376a4e?k(_0x18f1f6,_0x275bc7):_0x18f1f6,_0x34940c=_0x2ebf55['length']-0x1,_0x38f2da;_0x34940c>=0x0;_0x34940c--)(_0x38f2da=_0x2ebf55[_0x34940c])&&(_0x54b5a5=_0x38f2da(_0x54b5a5)||_0x54b5a5);return _0x54b5a5;},_=(_0x36a96a,_0x3e111f)=>(_0x278b0d,_0x535457)=>_0x3e111f(_0x278b0d,_0x535457,_0x36a96a);function X(_0xf452c8,_0x54a8a2){const _0x4e6967=_0x1f0f9a,_0x51a459=_0xf452c8['replies'][0x0];return{..._0x54a8a2,'id':_0x51a459[_0x4e6967(0x166)],'resolved':_0xf452c8[_0x4e6967(0x121)]===0x1,'dT':D(_0x51a459['createTimestamp']),'personId':_0x51a459[_0x4e6967(0x174)],'threadId':_0x51a459['threadId']};}function ee(_0x5f23a3,_0x40b410,_0x245844){const _0x407f06=_0x1f0f9a;var _0x506a7e,_0x991a16;if(((_0x991a16=(_0x506a7e=_0x5f23a3==null?void 0x0:_0x5f23a3['replies'])==null?void 0x0:_0x506a7e[_0x407f06(0x15c)])!=null?_0x991a16:0x0)>0x0){const _0x17d779=(_0x134cc8,_0x568667)=>({'id':_0x134cc8[_0x407f06(0x166)],'threadId':_0x134cc8[_0x407f06(0x15d)],'dT':D(_0x134cc8[_0x407f06(0x133)]),'personId':_0x134cc8[_0x407f06(0x174)],'resolved':_0x5f23a3[_0x407f06(0x121)]===I[_0x407f06(0x175)],'unitId':_0x40b410,'subUnitId':_0x245844,'text':JSON[_0x407f06(0x137)](_0x134cc8[_0x407f06(0x158)]),'parentId':_0x568667}),_0x4d562a=_0x17d779(_0x5f23a3[_0x407f06(0x17d)][0x0]);return{..._0x4d562a,'children':_0x5f23a3[_0x407f06(0x17d)][_0x407f06(0x15f)](0x1)['map'](_0x1fa576=>_0x17d779(_0x1fa576,_0x4d562a['id']))};}return null;}let f=class{constructor(_0x66feb3,_0x13db32,_0x263497,_0x111819){const _0x172241=_0x1f0f9a;this[_0x172241(0x130)]=_0x66feb3,this[_0x172241(0x146)]=_0x13db32,this[_0x172241(0x118)]=_0x263497,this[_0x172241(0x13b)]=_0x111819;}async[_0x1f0f9a(0x147)](_0x24e19d){const _0x308a10=_0x1f0f9a;var _0x42c7c0,_0xc32d35;const {parentId:_0x4239c8,unitId:_0x5a8e90,text:_0x338559,threadId:_0x2b6ae9}=_0x24e19d,_0x179f2c=(_0xc32d35=(_0x42c7c0=_0x338559['customRanges'])==null?void 0x0:_0x42c7c0[_0x308a10(0x11c)](_0x2b77ac=>_0x2b77ac[_0x308a10(0x155)]===_0x4c1e5e[_0x308a10(0x17f)])[_0x308a10(0x11a)](_0xc9e792=>_0xc9e792[_0x308a10(0x163)]))!=null?_0xc32d35:[],_0x4e293a=JSON[_0x308a10(0x150)](_0x338559),_0x88fe2b=(await this[_0x308a10(0x118)][_0x308a10(0x15b)](_0x5a8e90))['getMemberID']();if(_0x4239c8){const _0x4e399f={'memberId':_0x88fe2b,'unitId':_0x5a8e90,'content':_0x4e293a,'mention':_0x179f2c,'threadId':_0x2b6ae9},_0xc107a3=(await this[_0x308a10(0x130)]['post']('/universer-api/comment/unit/'+_0x5a8e90+'/reply',{'body':_0x4e399f}))[_0x308a10(0x141)][_0x308a10(0x14b)];return{..._0x24e19d,'id':_0xc107a3['replyId'],'dT':_0x1f1040(+_0xc107a3['createTimestamp'])[_0x308a10(0x153)]('YYYY/MM/DD\x20HH:mm'),'personId':_0xc107a3['userId']};}else{const _0x162c79={'memberId':_0x88fe2b,'unitId':_0x5a8e90,'content':_0x4e293a,'mention':_0x179f2c},_0x5b6560=await this['_httpService'][_0x308a10(0x16d)](_0x308a10(0x140)+_0x5a8e90+'/add',{'body':_0x162c79});return X(_0x5b6560['body']['comment'],_0x24e19d);}}async[_0x1f0f9a(0x119)](_0x192f44){const _0x53e96f=_0x1f0f9a;var _0x2bd997,_0x2736e8;const {text:_0x58ba2f,unitId:_0x5908b3}=_0x192f44,_0x516694=(_0x2736e8=(_0x2bd997=_0x58ba2f[_0x53e96f(0x162)])==null?void 0x0:_0x2bd997['filter'](_0x157cd3=>_0x157cd3[_0x53e96f(0x155)]===_0x4c1e5e[_0x53e96f(0x17f)])[_0x53e96f(0x11a)](_0x204327=>_0x204327[_0x53e96f(0x163)]))!=null?_0x2736e8:[],_0x2a30f3=JSON[_0x53e96f(0x150)](_0x58ba2f),_0x2c5916=_0x192f44[_0x53e96f(0x15d)],_0x4553af=_0x192f44['id'],_0x422a33={'memberId':(await this['_sessionService']['requireSession'](_0x5908b3))[_0x53e96f(0x142)](),'unitId':_0x5908b3,'threadId':_0x2c5916,'mention':_0x516694,'content':_0x2a30f3,'replyId':_0x4553af},_0x40add2=await this[_0x53e96f(0x130)][_0x53e96f(0x16d)](_0x53e96f(0x140)+_0x5908b3+_0x53e96f(0x117),{'body':_0x422a33});return!_0x40add2[_0x53e96f(0x141)][_0x53e96f(0x169)]||_0x40add2[_0x53e96f(0x141)][_0x53e96f(0x169)][_0x53e96f(0x17c)]===0x1;}async[_0x1f0f9a(0x149)](_0x4aa02a){const _0x4a0fe7=_0x1f0f9a,{unitId:_0x43cd0f}=_0x4aa02a,_0x265af4=_0x4aa02a[_0x4a0fe7(0x15d)],_0x366515={'memberId':this[_0x4a0fe7(0x146)][_0x4a0fe7(0x126)]()[_0x4a0fe7(0x11d)],'unitId':_0x43cd0f,'threadId':_0x265af4,'solved':_0x4aa02a['resolved']?I[_0x4a0fe7(0x175)]:I['OpenOrReOpen']},_0xb54d45=await this[_0x4a0fe7(0x130)][_0x4a0fe7(0x16d)](_0x4a0fe7(0x140)+_0x43cd0f+_0x4a0fe7(0x15e),{'body':_0x366515});return!_0xb54d45[_0x4a0fe7(0x141)][_0x4a0fe7(0x169)]||_0xb54d45[_0x4a0fe7(0x141)][_0x4a0fe7(0x169)]['code']===0x1;}async[_0x1f0f9a(0x16a)](_0x40c98b,_0x5b6ec8,_0x2db7f3,_0x329cb7){const _0x3bc0e5=_0x1f0f9a,_0x5b614e={'memberId':(await this[_0x3bc0e5(0x118)][_0x3bc0e5(0x15b)](_0x40c98b))[_0x3bc0e5(0x142)](),'threadId':_0x2db7f3,'replyId':_0x329cb7,'unitId':_0x40c98b},_0x10f47d=await this[_0x3bc0e5(0x130)][_0x3bc0e5(0x16d)](_0x3bc0e5(0x140)+_0x40c98b+_0x3bc0e5(0x148),{'body':_0x5b614e});return!_0x10f47d[_0x3bc0e5(0x141)][_0x3bc0e5(0x169)]||_0x10f47d[_0x3bc0e5(0x141)][_0x3bc0e5(0x169)][_0x3bc0e5(0x17c)]===0x1;}async[_0x1f0f9a(0x168)](_0x3e5894,_0x38ca3f,_0xc938f7){const _0x269248=_0x1f0f9a,_0x2c6b54={'unitId':_0x3e5894,'threadId':_0xc938f7},_0x51ddcf=await this[_0x269248(0x130)][_0x269248(0x16d)](_0x269248(0x140)+_0x3e5894+'/list',{'body':_0x2c6b54}),_0x5e8c40=_0xc938f7['map'](_0x2c3920=>ee(_0x51ddcf['body']['comments'][_0x2c3920],_0x3e5894,_0x38ca3f))[_0x269248(0x11c)](Boolean);return Object[_0x269248(0x11b)](_0x51ddcf[_0x269248(0x141)]['users'])['forEach'](_0x219f7c=>{const _0x36cf75=_0x269248;this[_0x36cf75(0x146)][_0x36cf75(0x128)](_0x219f7c);}),_0x5e8c40;}['saveCommentToSnapshot'](_0x394171){const _0x523083=_0x1f0f9a;return{'id':_0x394171['id'],'threadId':_0x394171[_0x523083(0x15d)],'ref':_0x394171[_0x523083(0x170)]};}};f=Q([_(0x0,_0x24f2a0(_0x19d659)),_(0x1,_0x24f2a0(_0x4fcf10)),_(0x2,_0x24f2a0(_0x480a85)),_(0x3,_0x24f2a0(_0x1b6635))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x22ce1b,_0x2228d8,_0xb269d9,_0x11b450)=>{for(var _0x4512ab=_0x11b450>0x1?void 0x0:_0x11b450?re(_0x2228d8,_0xb269d9):_0x2228d8,_0x433662=_0x22ce1b['length']-0x1,_0x20f35f;_0x433662>=0x0;_0x433662--)(_0x20f35f=_0x22ce1b[_0x433662])&&(_0x4512ab=_0x20f35f(_0x4512ab)||_0x4512ab);return _0x4512ab;},N=(_0x5b1e18,_0x142ecd)=>(_0x47931b,_0x51a3fc)=>_0x142ecd(_0x47931b,_0x51a3fc,_0x5b1e18);function _0x321d(){const _0x3cea2d=['Edit','onReady','ref','Unknown','user','_configService','userId','Solved','subscribe','_init','UNIVER_UNKNOWN','875862PRRsky','getOwnPropertyDescriptor','onStarting','code','replies','98028MtvTPp','COMMENT','/edit','_sessionService','updateComment','map','values','filter','userID','getComment','8xtXqPK','forEach','solved','setConfig','find','Reply','7182612LbCiia','getCurrentUser','defineProperty','addUser','_threadCommentModel','getUnit','disposeWithMe','1lmIHHx','type','_commentService','Solve','_httpService','symbol','YYYY/MM/DD\x20HH:mm','createTimestamp','unitId','929498yYWsRr','_initDataSource','parse','7drTlZE','_config','syncUpdateMutationToColla','_injector','576640oLfKXh','pipe','root','UNRECOGNIZED','/universer-api/comment/unit/','body','getMemberID','size','personId','payload','_userService','addComment','/delete','resolveComment','Add','reply','getUser','/universer-api/user/list','add','_initUserSync','stringify','delete','10XbolXo','format','commentUpdate$','rangeType','6044687dSyarl','users','content','get','12NpPXVL','requireSession','length','threadId','/solved','slice','203283YjFyzD','OpenOrReOpen','customRanges','rangeId','_threadCommentDataSource','_threadCommentDataSourceService','replyId','1378vdUybR','listComments','error','deleteComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Delete','post'];_0x321d=function(){return _0x3cea2d;};return _0x321d();}let g=class extends _0x356973{constructor(_0x123da6,_0x3134fd){const _0x14bd4f=_0x1f0f9a;super(),this[_0x14bd4f(0x165)]=_0x123da6,this['_threadCommentDataSource']=_0x3134fd,this[_0x14bd4f(0x136)]();}[_0x1f0f9a(0x136)](){const _0x1ee8da=_0x1f0f9a;this['_threadCommentDataSourceService']['dataSource']=this[_0x1ee8da(0x164)],this[_0x1ee8da(0x165)][_0x1ee8da(0x13a)]=!0x1;}};g=te([N(0x0,_0x57e9c9),N(0x1,_0x24f2a0(f))],g);var se=Object[_0x1f0f9a(0x127)],oe=Object[_0x1f0f9a(0x17a)],ne=(_0x48d902,_0x3dba62,_0x895e79)=>_0x3dba62 in _0x48d902?se(_0x48d902,_0x3dba62,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x895e79}):_0x48d902[_0x3dba62]=_0x895e79,ie=(_0x915dde,_0x1fa65d,_0x53094a,_0x224d0b)=>{const _0x65151e=_0x1f0f9a;for(var _0x44272c=_0x224d0b>0x1?void 0x0:_0x224d0b?oe(_0x1fa65d,_0x53094a):_0x1fa65d,_0xd22428=_0x915dde[_0x65151e(0x15c)]-0x1,_0x1263c6;_0xd22428>=0x0;_0xd22428--)(_0x1263c6=_0x915dde[_0xd22428])&&(_0x44272c=_0x1263c6(_0x44272c)||_0x44272c);return _0x44272c;},w=(_0x42a473,_0x1127e7)=>(_0x42704b,_0x6b5a29)=>_0x1127e7(_0x42704b,_0x6b5a29,_0x42a473),$=(_0x3eaf3d,_0x2d0b31,_0x58c1b1)=>ne(_0x3eaf3d,typeof _0x2d0b31!=_0x1f0f9a(0x131)?_0x2d0b31+'':_0x2d0b31,_0x58c1b1);let b=class extends _0x1be882{constructor(_0xaa3004=M,_0x40ad70,_0x4dd054){const _0x20ad97=_0x1f0f9a;super(),this['_config']=_0xaa3004,this[_0x20ad97(0x13b)]=_0x40ad70,this[_0x20ad97(0x173)]=_0x4dd054;const {..._0x2e974f}=_0x454f50({},M,this[_0x20ad97(0x139)]);this[_0x20ad97(0x173)][_0x20ad97(0x122)](z,_0x2e974f);}[_0x1f0f9a(0x17b)](){const _0x346483=_0x1f0f9a;[[f],[g],[S]][_0x346483(0x120)](_0x38d1a8=>{const _0x3b95c1=_0x346483;this[_0x3b95c1(0x13b)][_0x3b95c1(0x14e)](_0x38d1a8);});}[_0x1f0f9a(0x16f)](){const _0x12c4cd=_0x1f0f9a;this[_0x12c4cd(0x13b)][_0x12c4cd(0x159)](g),this[_0x12c4cd(0x13b)][_0x12c4cd(0x159)](S);}};$(b,'pluginName',W),$(b,_0x1f0f9a(0x12d),_0x2bb47e[_0x1f0f9a(0x178)]),b=ie([_0xf2eb93(_0x37f713,_0x581945,_0x37c301),w(0x1,_0x24f2a0(_0x1b6635)),w(0x2,_0x450544)],b);function _0x2bee(_0x2113f1,_0x111fcf){const _0x321d46=_0x321d();return _0x2bee=function(_0x2bee1d,_0x4e0a8f){_0x2bee1d=_0x2bee1d-0x117;let _0x52748d=_0x321d46[_0x2bee1d];return _0x52748d;},_0x2bee(_0x2113f1,_0x111fcf);}export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x27ba(){const _0x5dbe36=['length','body','YYYY/MM/DD\x20HH:mm','get','Edit','/solved','UniverNetwork','Inject','getUser','_initDataSource','_config','parentId','getMemberID','20989xUHvlc','filter','disposeWithMe','values','listComments','_userService','function','OpenOrReOpen','commentUpdate$','size','HTTPService','UniverThreadCommentUIPlugin','Solve','bufferTime','rxjs','@univerjs/core','Reply','UniverInstanceType','addUser','user','_sessionService','stringify','Disposable','UserManagerService','@univerjs-pro/collaboration-client','1817792rWquJj','resolveComment','Injector','36ioeyGu','post','UniverCore','userID','_threadCommentDataSourceService','/list','saveCommentToSnapshot','UniverProCollaborationClient','slice','_injector','requireSession','@univerjs/thread-comment-ui','getUnit','Module','@univerjs/network','UniverProThreadCommentDatasource','addComment','map','error','getCurrentUser','parse','UNRECOGNIZED','_initUserSync','Delete','onStarting','root','_commentService','find','UNIVER_UNKNOWN','reply','IConfigService','threadId','users','IThreadCommentDataSourceService','Plugin','UniverThreadCommentUi','715680SJjxOX','dayjs','thread-comment-data-source.config','defineProperty','_threadCommentDataSource','merge','exports','@univerjs-pro/license','UniverProLicense','type','Add','userId','pipe','syncUpdateMutationToColla','createTimestamp','format','CollaborationSessionService','object','_threadCommentModel','unitId','onReady','rangeType','replies','Solved','amd','@univerjs/thread-comment','rangeId','388080nQucPE','_httpService','setConfig','ThreadCommentModel','79107ifHWnh','12104prPIsh','getComment','_configService','customRanges','getOwnPropertyDescriptor','UniverThreadCommentDataSourcePlugin','/universer-api/comment/unit/','Unknown','ref','dataSource','solved','subscribe','/add','replyId','forEach','code','284075TPXikQ','updateComment','add','content','UniverCollaborationClientPlugin'];_0x27ba=function(){return _0x5dbe36;};return _0x27ba();}function _0x296e(_0x182cbb,_0x2d3252){const _0x27baaa=_0x27ba();return _0x296e=function(_0x296e1f,_0x38be05){_0x296e1f=_0x296e1f-0x15f;let _0x418931=_0x27baaa[_0x296e1f];return _0x418931;},_0x296e(_0x182cbb,_0x2d3252);}(function(_0x463bf2,_0x416852){const _0x48c2e3=_0x296e,_0x49cb11=_0x463bf2();while(!![]){try{const _0x3c84f2=-parseInt(_0x48c2e3(0x189))/0x1+-parseInt(_0x48c2e3(0x167))/0x2+parseInt(_0x48c2e3(0x162))/0x3+-parseInt(_0x48c2e3(0x1c9))/0x4+-parseInt(_0x48c2e3(0x177))/0x5+parseInt(_0x48c2e3(0x1a5))/0x6*(parseInt(_0x48c2e3(0x166))/0x7)+parseInt(_0x48c2e3(0x1a2))/0x8;if(_0x3c84f2===_0x416852)break;else _0x49cb11['push'](_0x49cb11['shift']());}catch(_0x40249e){_0x49cb11['push'](_0x49cb11['shift']());}}}(_0x27ba,0x2774e),function(_0x11eb3e,_0x3e13ac){const _0x3afeee=_0x296e;typeof exports==_0x3afeee(0x1da)&&typeof module<'u'?_0x3e13ac(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==_0x3afeee(0x18f)&&define[_0x3afeee(0x15f)]?define([_0x3afeee(0x1cf),_0x3afeee(0x1a1),_0x3afeee(0x1d0),_0x3afeee(0x198),_0x3afeee(0x1b0),_0x3afeee(0x160),_0x3afeee(0x197),_0x3afeee(0x1b3)],_0x3e13ac):(_0x11eb3e=typeof globalThis<'u'?globalThis:_0x11eb3e||self,_0x3e13ac(_0x11eb3e[_0x3afeee(0x1b4)]={},_0x11eb3e[_0x3afeee(0x1ac)],_0x11eb3e[_0x3afeee(0x1d1)],_0x11eb3e[_0x3afeee(0x1a7)],_0x11eb3e[_0x3afeee(0x1c8)],_0x11eb3e['UniverThreadComment'],_0x11eb3e['rxjs'],_0x11eb3e[_0x3afeee(0x182)]));}(this,function(_0x1be192,_0x122ca6,_0x1662bf,_0x327e68,_0x51d297,_0x5ca066,_0x454cf7,_0x555e23){'use strict';const _0x542998=_0x296e;const _0x5f15e8='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x45144=(_0x3e5794=>(_0x3e5794[_0x3e5794[_0x542998(0x190)]=0x0]=_0x542998(0x190),_0x3e5794[_0x3e5794['Solved']=0x1]=_0x542998(0x1e0),_0x3e5794[_0x3e5794[_0x542998(0x1ba)]=-0x1]=_0x542998(0x1ba),_0x3e5794))(_0x45144||{}),_0x3b98c8=(_0x42cc59=>(_0x42cc59[_0x42cc59[_0x542998(0x16e)]=0x0]=_0x542998(0x16e),_0x42cc59[_0x42cc59[_0x542998(0x1d3)]=0x1]=_0x542998(0x1d3),_0x42cc59[_0x42cc59[_0x542998(0x199)]=0x2]=_0x542998(0x199),_0x42cc59[_0x42cc59['Edit']=0x3]=_0x542998(0x180),_0x42cc59[_0x42cc59[_0x542998(0x1bc)]=0x4]=_0x542998(0x1bc),_0x42cc59[_0x42cc59[_0x542998(0x195)]=0x5]=_0x542998(0x195),_0x42cc59[_0x42cc59[_0x542998(0x1ba)]=-0x1]=_0x542998(0x1ba),_0x42cc59))(_0x3b98c8||{});const _0x265423=_0x3a8748=>_0x327e68[_0x542998(0x1ca)](new Date(+_0x3a8748))[_0x542998(0x1d8)](_0x542998(0x17e)),_0x5938c1=async(_0x414d93,_0x15c403)=>{const _0x3e7b95=_0x542998,_0x35eb17=_0x414d93['get'](_0x327e68[_0x3e7b95(0x1a0)]),_0x1335fd=_0x414d93[_0x3e7b95(0x17f)](_0x555e23[_0x3e7b95(0x193)]);_0x15c403[_0x3e7b95(0x175)](_0x5e8af0=>{const _0x264f91=_0x3e7b95;_0x35eb17[_0x264f91(0x184)](_0x5e8af0)&&_0x15c403['delete'](_0x5e8af0);}),_0x15c403[_0x3e7b95(0x192)]&&(await _0x1335fd[_0x3e7b95(0x17f)]('/universer-api/user/list',{'params':{'userIDs':[..._0x15c403]}}))['body'][_0x3e7b95(0x1c5)][_0x3e7b95(0x175)](_0x415064=>{const _0x1e9c7a=_0x3e7b95;_0x415064&&_0x35eb17[_0x1e9c7a(0x19b)](_0x415064);});};var _0x48ac66=Object[_0x542998(0x16b)],_0x39d7c6=(_0x24bf4c,_0x4247c5,_0x83987e,_0x29471f)=>{const _0x190849=_0x542998;for(var _0x49a9e1=_0x29471f>0x1?void 0x0:_0x29471f?_0x48ac66(_0x4247c5,_0x83987e):_0x4247c5,_0x42acb3=_0x24bf4c[_0x190849(0x17c)]-0x1,_0x75d734;_0x42acb3>=0x0;_0x42acb3--)(_0x75d734=_0x24bf4c[_0x42acb3])&&(_0x49a9e1=_0x75d734(_0x49a9e1)||_0x49a9e1);return _0x49a9e1;},_0x23a466=(_0x23ae46,_0x4fcb85)=>(_0x390b73,_0x360bbe)=>_0x4fcb85(_0x390b73,_0x360bbe,_0x23ae46);let _0x4fddc2=class extends _0x327e68[_0x542998(0x19f)]{constructor(_0x2df145,_0x338b28,_0x84aee,_0x3377d3){const _0x36d213=_0x542998;super(),this['_commentService']=_0x2df145,this[_0x36d213(0x1db)]=_0x338b28,this['_userService']=_0x84aee,this[_0x36d213(0x1ae)]=_0x3377d3,this['_init'](),this[_0x36d213(0x1bb)]();}[_0x542998(0x1bb)](){const _0x4573b9=_0x542998;this[_0x4573b9(0x18b)](this[_0x4573b9(0x1db)][_0x4573b9(0x191)][_0x4573b9(0x1d5)](_0x454cf7[_0x4573b9(0x196)](0x10))[_0x4573b9(0x172)](_0x3c0048=>{const _0x51f84e=_0x4573b9,_0xadd4d3=new Set();_0x3c0048[_0x51f84e(0x175)](_0x1140cf=>{const _0x1deab7=_0x51f84e;switch(_0x1140cf[_0x1deab7(0x1d2)]){case'add':{const _0x1d4410=_0x1140cf['payload']['personId'];_0xadd4d3[_0x1deab7(0x179)](_0x1d4410);break;}}}),_0x5938c1(this[_0x51f84e(0x1ae)],_0xadd4d3);}));}['_init'](){const _0x357909=_0x542998;this['disposeWithMe'](this[_0x357909(0x1bf)][_0x357909(0x191)][_0x357909(0x172)](async _0x35ce5a=>{const _0xbc713a=_0x357909;var _0x2f3cc1,_0x26025d,_0x46d40f,_0x9b8d98;const _0x477d2d=(_0x2f3cc1=this['_threadCommentModel'][_0xbc713a(0x1b1)](_0x35ce5a[_0xbc713a(0x1dc)])[_0xbc713a(0x1c0)](_0x37067e=>_0x37067e[_0xbc713a(0x1c4)]===_0x35ce5a[_0xbc713a(0x1c4)]))==null?void 0x0:_0x2f3cc1[_0xbc713a(0x1be)];if(!_0x477d2d)return;const {unitId:_0x3b1f3a,subUnitId:_0x381d36}=_0x477d2d;switch(_0x35ce5a['user']&&this[_0xbc713a(0x18e)][_0xbc713a(0x19b)](_0x35ce5a[_0xbc713a(0x19c)]),_0x35ce5a[_0xbc713a(0x1d2)]){case _0x3b98c8[_0xbc713a(0x1d3)]:break;case _0x3b98c8['Reply']:{this[_0xbc713a(0x1db)][_0xbc713a(0x1b5)](_0x3b1f3a,_0x381d36,{'unitId':_0x3b1f3a,'subUnitId':_0x381d36,'ref':'','id':_0x35ce5a[_0xbc713a(0x174)],'dT':_0x265423(+_0x35ce5a[_0xbc713a(0x1d7)]),'threadId':_0x35ce5a[_0xbc713a(0x1c4)],'personId':(_0x46d40f=(_0x26025d=_0x35ce5a[_0xbc713a(0x19c)])==null?void 0x0:_0x26025d[_0xbc713a(0x1a8)])!=null?_0x46d40f:_0x35ce5a['userId'],'text':JSON[_0xbc713a(0x1b9)](_0x35ce5a[_0xbc713a(0x17a)]),'parentId':_0x477d2d['id']});break;}case _0x3b98c8['Delete']:{const _0x1a4e94=this[_0xbc713a(0x1db)][_0xbc713a(0x168)](_0x3b1f3a,_0x381d36,_0x35ce5a['replyId']);_0x1a4e94&&_0x1a4e94[_0xbc713a(0x187)]&&this[_0xbc713a(0x1db)]['deleteComment'](_0x3b1f3a,_0x381d36,_0x35ce5a[_0xbc713a(0x174)]);break;}case _0x3b98c8['Edit']:{this['_threadCommentModel'][_0xbc713a(0x178)](_0x3b1f3a,_0x381d36,{'commentId':_0x35ce5a[_0xbc713a(0x174)],'text':JSON[_0xbc713a(0x1b9)](_0x35ce5a[_0xbc713a(0x17a)])});break;}case _0x3b98c8[_0xbc713a(0x195)]:{const _0x40b1eb=(_0x9b8d98=this[_0xbc713a(0x1db)][_0xbc713a(0x1b1)](_0x35ce5a['unitId'])[_0xbc713a(0x1c0)](_0x3f9703=>_0x3f9703[_0xbc713a(0x1c4)]===_0x35ce5a['threadId']))==null?void 0x0:_0x9b8d98[_0xbc713a(0x1be)];_0x40b1eb&&this['_threadCommentModel'][_0xbc713a(0x1a3)](_0x3b1f3a,_0x381d36,_0x40b1eb['id'],_0x35ce5a['solved']===_0x45144[_0xbc713a(0x1e0)]);break;}}}));}};_0x4fddc2=_0x39d7c6([_0x23a466(0x0,_0x327e68['Inject'](_0x122ca6['CommentService'])),_0x23a466(0x1,_0x327e68['Inject'](_0x5ca066[_0x542998(0x165)])),_0x23a466(0x2,_0x327e68[_0x542998(0x183)](_0x327e68[_0x542998(0x1a0)])),_0x23a466(0x3,_0x327e68[_0x542998(0x183)](_0x327e68['Injector']))],_0x4fddc2);const _0x2131b9=_0x542998(0x1cb),_0x5ebf10={};var _0xc0c187=Object[_0x542998(0x16b)],_0x110c54=(_0xb09ccb,_0x2da39d,_0x1e180b,_0x2a1f16)=>{const _0x1336c9=_0x542998;for(var _0x334584=_0x2a1f16>0x1?void 0x0:_0x2a1f16?_0xc0c187(_0x2da39d,_0x1e180b):_0x2da39d,_0x2c710d=_0xb09ccb[_0x1336c9(0x17c)]-0x1,_0x284f93;_0x2c710d>=0x0;_0x2c710d--)(_0x284f93=_0xb09ccb[_0x2c710d])&&(_0x334584=_0x284f93(_0x334584)||_0x334584);return _0x334584;},_0x5cb78e=(_0x41ee6f,_0x4840b7)=>(_0xdc7dbd,_0x1597c5)=>_0x4840b7(_0xdc7dbd,_0x1597c5,_0x41ee6f);function _0xfaf8c5(_0x37d33d,_0x28d5cf){const _0x3dbfe3=_0x542998,_0x129fbe=_0x37d33d['replies'][0x0];return{..._0x28d5cf,'id':_0x129fbe[_0x3dbfe3(0x174)],'resolved':_0x37d33d[_0x3dbfe3(0x171)]===0x1,'dT':_0x265423(_0x129fbe[_0x3dbfe3(0x1d7)]),'personId':_0x129fbe['userId'],'threadId':_0x129fbe[_0x3dbfe3(0x1c4)]};}function _0x32399e(_0x448255,_0x4332d3,_0x12188e){const _0x1a657a=_0x542998;var _0x2035d5,_0x53cf7b;if(((_0x53cf7b=(_0x2035d5=_0x448255==null?void 0x0:_0x448255[_0x1a657a(0x1df)])==null?void 0x0:_0x2035d5[_0x1a657a(0x17c)])!=null?_0x53cf7b:0x0)>0x0){const _0x3217de=(_0x37bbaa,_0x306200)=>({'id':_0x37bbaa[_0x1a657a(0x174)],'threadId':_0x37bbaa[_0x1a657a(0x1c4)],'dT':_0x265423(_0x37bbaa[_0x1a657a(0x1d7)]),'personId':_0x37bbaa[_0x1a657a(0x1d4)],'resolved':_0x448255['solved']===_0x45144[_0x1a657a(0x1e0)],'unitId':_0x4332d3,'subUnitId':_0x12188e,'text':JSON[_0x1a657a(0x1b9)](_0x37bbaa[_0x1a657a(0x17a)]),'parentId':_0x306200}),_0x204038=_0x3217de(_0x448255['replies'][0x0]);return{..._0x204038,'children':_0x448255[_0x1a657a(0x1df)][_0x1a657a(0x1ad)](0x1)['map'](_0xa3c506=>_0x3217de(_0xa3c506,_0x204038['id']))};}return null;}let _0x2f1f5d=class{constructor(_0x2b2d86,_0x173476,_0x338d37,_0x22ce25){const _0x27787d=_0x542998;this[_0x27787d(0x163)]=_0x2b2d86,this[_0x27787d(0x18e)]=_0x173476,this[_0x27787d(0x19d)]=_0x338d37,this['_injector']=_0x22ce25;}async['addComment'](_0xe177fc){const _0x388a42=_0x542998;var _0xea8184,_0x1e3a35;const {parentId:_0x1af885,unitId:_0x25f6d3,text:_0x7b2c95,threadId:_0x46b19b}=_0xe177fc,_0x5c170b=(_0x1e3a35=(_0xea8184=_0x7b2c95[_0x388a42(0x16a)])==null?void 0x0:_0xea8184[_0x388a42(0x18a)](_0x5f07ca=>_0x5f07ca[_0x388a42(0x1de)]===_0x327e68['CustomRangeType']['COMMENT'])[_0x388a42(0x1b6)](_0x311eec=>_0x311eec[_0x388a42(0x161)]))!=null?_0x1e3a35:[],_0x560396=JSON[_0x388a42(0x19e)](_0x7b2c95),_0x1aea31=(await this[_0x388a42(0x19d)][_0x388a42(0x1af)](_0x25f6d3))[_0x388a42(0x188)]();if(_0x1af885){const _0x38e4ed={'memberId':_0x1aea31,'unitId':_0x25f6d3,'content':_0x560396,'mention':_0x5c170b,'threadId':_0x46b19b},_0xa3b14a=(await this[_0x388a42(0x163)]['post']('/universer-api/comment/unit/'+_0x25f6d3+'/reply',{'body':_0x38e4ed}))[_0x388a42(0x17d)][_0x388a42(0x1c2)];return{..._0xe177fc,'id':_0xa3b14a[_0x388a42(0x174)],'dT':_0x327e68[_0x388a42(0x1ca)](+_0xa3b14a[_0x388a42(0x1d7)])[_0x388a42(0x1d8)](_0x388a42(0x17e)),'personId':_0xa3b14a[_0x388a42(0x1d4)]};}else{const _0x288a07={'memberId':_0x1aea31,'unitId':_0x25f6d3,'content':_0x560396,'mention':_0x5c170b},_0x5b47ad=await this[_0x388a42(0x163)]['post'](_0x388a42(0x16d)+_0x25f6d3+_0x388a42(0x173),{'body':_0x288a07});return _0xfaf8c5(_0x5b47ad[_0x388a42(0x17d)]['comment'],_0xe177fc);}}async['updateComment'](_0x163eec){const _0x198991=_0x542998;var _0x4f0916,_0x139af0;const {text:_0xa3b9c6,unitId:_0xd43ec5}=_0x163eec,_0x1e0eda=(_0x139af0=(_0x4f0916=_0xa3b9c6[_0x198991(0x16a)])==null?void 0x0:_0x4f0916['filter'](_0x228b39=>_0x228b39[_0x198991(0x1de)]===_0x327e68['CustomRangeType']['COMMENT'])['map'](_0x3877ba=>_0x3877ba['rangeId']))!=null?_0x139af0:[],_0x482065=JSON[_0x198991(0x19e)](_0xa3b9c6),_0x5b990f=_0x163eec[_0x198991(0x1c4)],_0x3466c8=_0x163eec['id'],_0xff7332={'memberId':(await this[_0x198991(0x19d)][_0x198991(0x1af)](_0xd43ec5))['getMemberID'](),'unitId':_0xd43ec5,'threadId':_0x5b990f,'mention':_0x1e0eda,'content':_0x482065,'replyId':_0x3466c8},_0x1f696e=await this['_httpService']['post']('/universer-api/comment/unit/'+_0xd43ec5+'/edit',{'body':_0xff7332});return!_0x1f696e[_0x198991(0x17d)][_0x198991(0x1b7)]||_0x1f696e[_0x198991(0x17d)][_0x198991(0x1b7)][_0x198991(0x176)]===0x1;}async[_0x542998(0x1a3)](_0x52e0e0){const _0x4b4d37=_0x542998,{unitId:_0x5e2b21}=_0x52e0e0,_0x436ad6=_0x52e0e0['threadId'],_0x10c36f={'memberId':this[_0x4b4d37(0x18e)][_0x4b4d37(0x1b8)]()[_0x4b4d37(0x1a8)],'unitId':_0x5e2b21,'threadId':_0x436ad6,'solved':_0x52e0e0['resolved']?_0x45144[_0x4b4d37(0x1e0)]:_0x45144[_0x4b4d37(0x190)]},_0x2cf535=await this[_0x4b4d37(0x163)][_0x4b4d37(0x1a6)](_0x4b4d37(0x16d)+_0x5e2b21+_0x4b4d37(0x181),{'body':_0x10c36f});return!_0x2cf535[_0x4b4d37(0x17d)][_0x4b4d37(0x1b7)]||_0x2cf535[_0x4b4d37(0x17d)][_0x4b4d37(0x1b7)][_0x4b4d37(0x176)]===0x1;}async['deleteComment'](_0x113d09,_0x4c0177,_0x27828c,_0x192149){const _0x52003d=_0x542998,_0x37b9a3={'memberId':(await this[_0x52003d(0x19d)][_0x52003d(0x1af)](_0x113d09))['getMemberID'](),'threadId':_0x27828c,'replyId':_0x192149,'unitId':_0x113d09},_0x3ae68c=await this[_0x52003d(0x163)][_0x52003d(0x1a6)]('/universer-api/comment/unit/'+_0x113d09+'/delete',{'body':_0x37b9a3});return!_0x3ae68c['body'][_0x52003d(0x1b7)]||_0x3ae68c[_0x52003d(0x17d)]['error'][_0x52003d(0x176)]===0x1;}async[_0x542998(0x18d)](_0x5833e0,_0x26918c,_0x7e744a){const _0x1259a2=_0x542998,_0x46f268={'unitId':_0x5833e0,'threadId':_0x7e744a},_0x1b19f4=await this[_0x1259a2(0x163)][_0x1259a2(0x1a6)](_0x1259a2(0x16d)+_0x5833e0+_0x1259a2(0x1aa),{'body':_0x46f268}),_0xe4a7dd=_0x7e744a['map'](_0x173af6=>_0x32399e(_0x1b19f4[_0x1259a2(0x17d)]['comments'][_0x173af6],_0x5833e0,_0x26918c))[_0x1259a2(0x18a)](Boolean);return Object[_0x1259a2(0x18c)](_0x1b19f4['body']['users'])['forEach'](_0x41b001=>{const _0x52ec2e=_0x1259a2;this['_userService'][_0x52ec2e(0x19b)](_0x41b001);}),_0xe4a7dd;}[_0x542998(0x1ab)](_0x219377){const _0x4a839b=_0x542998;return{'id':_0x219377['id'],'threadId':_0x219377['threadId'],'ref':_0x219377[_0x4a839b(0x16f)]};}};_0x2f1f5d=_0x110c54([_0x5cb78e(0x0,_0x327e68[_0x542998(0x183)](_0x555e23[_0x542998(0x193)])),_0x5cb78e(0x1,_0x327e68['Inject'](_0x327e68['UserManagerService'])),_0x5cb78e(0x2,_0x327e68[_0x542998(0x183)](_0x122ca6[_0x542998(0x1d9)])),_0x5cb78e(0x3,_0x327e68[_0x542998(0x183)](_0x327e68[_0x542998(0x1a4)]))],_0x2f1f5d);var _0x4abc6c=Object[_0x542998(0x16b)],_0x1e343c=(_0xc55116,_0x374047,_0x178d8d,_0x5884bf)=>{const _0x5d0900=_0x542998;for(var _0xeddeb4=_0x5884bf>0x1?void 0x0:_0x5884bf?_0x4abc6c(_0x374047,_0x178d8d):_0x374047,_0x2a54b4=_0xc55116[_0x5d0900(0x17c)]-0x1,_0x498758;_0x2a54b4>=0x0;_0x2a54b4--)(_0x498758=_0xc55116[_0x2a54b4])&&(_0xeddeb4=_0x498758(_0xeddeb4)||_0xeddeb4);return _0xeddeb4;},_0x45cf08=(_0x1595f5,_0x13b866)=>(_0x6a0b3e,_0x1cf3e2)=>_0x13b866(_0x6a0b3e,_0x1cf3e2,_0x1595f5);let _0x1a21cd=class extends _0x327e68[_0x542998(0x19f)]{constructor(_0x9c1652,_0x4aa572){const _0x1770cb=_0x542998;super(),this['_threadCommentDataSourceService']=_0x9c1652,this[_0x1770cb(0x1cd)]=_0x4aa572,this['_initDataSource']();}[_0x542998(0x185)](){const _0x1c8dba=_0x542998;this[_0x1c8dba(0x1a9)][_0x1c8dba(0x170)]=this[_0x1c8dba(0x1cd)],this[_0x1c8dba(0x1a9)][_0x1c8dba(0x1d6)]=!0x1;}};_0x1a21cd=_0x1e343c([_0x45cf08(0x0,_0x5ca066[_0x542998(0x1c6)]),_0x45cf08(0x1,_0x327e68['Inject'](_0x2f1f5d))],_0x1a21cd);var _0x970ffe=Object[_0x542998(0x1cc)],_0x1babb7=Object[_0x542998(0x16b)],_0x5770d7=(_0x10f72d,_0x4f9fa8,_0x523104)=>_0x4f9fa8 in _0x10f72d?_0x970ffe(_0x10f72d,_0x4f9fa8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x523104}):_0x10f72d[_0x4f9fa8]=_0x523104,_0x15b045=(_0x5972ca,_0x1c82c3,_0x222997,_0x259707)=>{const _0x1e56b3=_0x542998;for(var _0xef5c35=_0x259707>0x1?void 0x0:_0x259707?_0x1babb7(_0x1c82c3,_0x222997):_0x1c82c3,_0x232e15=_0x5972ca[_0x1e56b3(0x17c)]-0x1,_0x510f0b;_0x232e15>=0x0;_0x232e15--)(_0x510f0b=_0x5972ca[_0x232e15])&&(_0xef5c35=_0x510f0b(_0xef5c35)||_0xef5c35);return _0xef5c35;},_0x30d85d=(_0x3239ee,_0x5d99c2)=>(_0x432cad,_0x54728a)=>_0x5d99c2(_0x432cad,_0x54728a,_0x3239ee),_0x80ba86=(_0x836921,_0x4d0245,_0x246af9)=>_0x5770d7(_0x836921,typeof _0x4d0245!='symbol'?_0x4d0245+'':_0x4d0245,_0x246af9);_0x1be192[_0x542998(0x16c)]=class extends _0x327e68[_0x542998(0x1c7)]{constructor(_0x76f47d=_0x5ebf10,_0x4aa71b,_0x6ce721){const _0x589d28=_0x542998;super(),this['_config']=_0x76f47d,this['_injector']=_0x4aa71b,this[_0x589d28(0x169)]=_0x6ce721;const {..._0x94503d}=_0x327e68[_0x589d28(0x1ce)]({},_0x5ebf10,this[_0x589d28(0x186)]);this[_0x589d28(0x169)][_0x589d28(0x164)](_0x2131b9,_0x94503d);}[_0x542998(0x1bd)](){[[_0x2f1f5d],[_0x1a21cd],[_0x4fddc2]]['forEach'](_0x395d3f=>{const _0x19b598=_0x296e;this[_0x19b598(0x1ae)][_0x19b598(0x179)](_0x395d3f);});}[_0x542998(0x1dd)](){const _0x16f704=_0x542998;this[_0x16f704(0x1ae)][_0x16f704(0x17f)](_0x1a21cd),this[_0x16f704(0x1ae)][_0x16f704(0x17f)](_0x4fddc2);}},_0x80ba86(_0x1be192[_0x542998(0x16c)],'pluginName',_0x5f15e8),_0x80ba86(_0x1be192[_0x542998(0x16c)],'type',_0x327e68[_0x542998(0x19a)][_0x542998(0x1c1)]),_0x1be192[_0x542998(0x16c)]=_0x15b045([_0x327e68['DependentOn'](_0x51d297[_0x542998(0x194)],_0x122ca6[_0x542998(0x17b)],_0x1662bf['UniverLicensePlugin']),_0x30d85d(0x1,_0x327e68[_0x542998(0x183)](_0x327e68[_0x542998(0x1a4)])),_0x30d85d(0x2,_0x327e68[_0x542998(0x1c3)])],_0x1be192[_0x542998(0x16c)]),Object[_0x542998(0x1cc)](_0x1be192,Symbol['toStringTag'],{'value':_0x542998(0x1b2)});}));
|
|
1
|
+
function _0x24b4(_0x2b6a4b,_0x5e4b9d){const _0x10a6bc=_0x10a6();return _0x24b4=function(_0x24b4b2,_0x24630c){_0x24b4b2=_0x24b4b2-0x134;let _0x5a2d2f=_0x10a6bc[_0x24b4b2];return _0x5a2d2f;},_0x24b4(_0x2b6a4b,_0x5e4b9d);}function _0x10a6(){const _0x462f24=['bufferTime','_userService','_threadCommentDataSourceService','Solved','HTTPService','thread-comment-data-source.config','rangeId','body','post','users','code','Solve','threadId','@univerjs/thread-comment-ui','3798VcfJRJ','1896861dHasZY','ref','length','unitId','@univerjs-pro/collaboration-client','UniverThreadCommentUi','Inject','2659488lTHkNK','requireSession','deleteComment','_sessionService','/add','listComments','replyId','UNRECOGNIZED','_threadCommentDataSource','_commentService','solved','format','COMMENT','filter','userID','replies','get','Delete','@univerjs/thread-comment','/universer-api/user/list','size','delete','disposeWithMe','rxjs','user','Plugin','dataSource','29930cqvnAO','content','dayjs','_threadCommentModel','toStringTag','symbol','7546HFdlIm','_injector','root','15758JfRRaU','UNIVER_UNKNOWN','getUnit','defineProperty','rangeType','Module','resolveComment','createTimestamp','error','add','pluginName','UniverCore','forEach','parse','IConfigService','_initUserSync','4Qklctz','_initDataSource','slice','type','UniverNetwork','exports','resolved','/universer-api/comment/unit/','addComment','/reply','onStarting','11522610CWmQoJ','Injector','YYYY/MM/DD\x20HH:mm','OpenOrReOpen','UniverThreadCommentDataSourcePlugin','Disposable','Add','values','783yICuXq','DependentOn','parentId','commentUpdate$','subscribe','getUser','map','/solved','_httpService','Unknown','saveCommentToSnapshot','Reply','updateComment','object','122nKfAUr','userId','onReady','setConfig','_configService','@univerjs/core','getOwnPropertyDescriptor','CollaborationSessionService','stringify','/list','UniverThreadCommentUIPlugin','find','syncUpdateMutationToColla','130805MIyXgX','_init','addUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','customRanges','reply','UniverProCollaborationClient','@univerjs/network','@univerjs-pro/license','CustomRangeType','UniverProLicense','UniverInstanceType','UniverThreadComment','payload','comment','Edit','_config','/edit'];_0x10a6=function(){return _0x462f24;};return _0x10a6();}(function(_0xb8913a,_0x4ecd7a){const _0x170b7d=_0x24b4,_0x5552d1=_0xb8913a();while(!![]){try{const _0x7a9989=parseInt(_0x170b7d(0x14b))/0x1*(parseInt(_0x170b7d(0x17c))/0x2)+-parseInt(_0x170b7d(0x1aa))/0x3+parseInt(_0x170b7d(0x15b))/0x4*(parseInt(_0x170b7d(0x189))/0x5)+parseInt(_0x170b7d(0x1a9))/0x6*(parseInt(_0x170b7d(0x148))/0x7)+parseInt(_0x170b7d(0x1b1))/0x8+parseInt(_0x170b7d(0x16e))/0x9*(parseInt(_0x170b7d(0x142))/0xa)+-parseInt(_0x170b7d(0x166))/0xb;if(_0x7a9989===_0x4ecd7a)break;else _0x5552d1['push'](_0x5552d1['shift']());}catch(_0x1807bd){_0x5552d1['push'](_0x5552d1['shift']());}}}(_0x10a6,0x8e493),function(_0x34a690,_0x152555){const _0x40cb59=_0x24b4;typeof exports==_0x40cb59(0x17b)&&typeof module<'u'?_0x152555(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['amd']?define([_0x40cb59(0x160),_0x40cb59(0x1ae),_0x40cb59(0x191),_0x40cb59(0x181),_0x40cb59(0x1a8),_0x40cb59(0x139),'rxjs',_0x40cb59(0x190)],_0x152555):(_0x34a690=typeof globalThis<'u'?globalThis:_0x34a690||self,_0x152555(_0x34a690['UniverProThreadCommentDatasource']={},_0x34a690[_0x40cb59(0x18f)],_0x34a690[_0x40cb59(0x193)],_0x34a690[_0x40cb59(0x156)],_0x34a690[_0x40cb59(0x1af)],_0x34a690[_0x40cb59(0x195)],_0x34a690[_0x40cb59(0x13e)],_0x34a690[_0x40cb59(0x15f)]));}(this,function(_0x53e571,_0x401b30,_0xb3d77d,_0x1c6bec,_0x327c4b,_0x5debe2,_0x598c0d,_0x572b8e){'use strict';const _0x48edbd=_0x24b4;const _0x1b7027=_0x48edbd(0x18c);var _0x4d9eb9=(_0x2a8945=>(_0x2a8945[_0x2a8945[_0x48edbd(0x169)]=0x0]=_0x48edbd(0x169),_0x2a8945[_0x2a8945[_0x48edbd(0x19e)]=0x1]=_0x48edbd(0x19e),_0x2a8945[_0x2a8945[_0x48edbd(0x1b8)]=-0x1]=_0x48edbd(0x1b8),_0x2a8945))(_0x4d9eb9||{}),_0x9e0423=(_0x274f47=>(_0x274f47[_0x274f47[_0x48edbd(0x177)]=0x0]=_0x48edbd(0x177),_0x274f47[_0x274f47[_0x48edbd(0x16c)]=0x1]=_0x48edbd(0x16c),_0x274f47[_0x274f47[_0x48edbd(0x179)]=0x2]=_0x48edbd(0x179),_0x274f47[_0x274f47[_0x48edbd(0x198)]=0x3]=_0x48edbd(0x198),_0x274f47[_0x274f47[_0x48edbd(0x138)]=0x4]=_0x48edbd(0x138),_0x274f47[_0x274f47[_0x48edbd(0x1a6)]=0x5]=_0x48edbd(0x1a6),_0x274f47[_0x274f47[_0x48edbd(0x1b8)]=-0x1]=_0x48edbd(0x1b8),_0x274f47))(_0x9e0423||{});const _0x2dd45a=_0x5c266d=>_0x1c6bec[_0x48edbd(0x144)](new Date(+_0x5c266d))[_0x48edbd(0x1bc)](_0x48edbd(0x168)),_0xe58838=async(_0xd75b17,_0x2f0343)=>{const _0x1206c7=_0x48edbd,_0x42428a=_0xd75b17[_0x1206c7(0x137)](_0x1c6bec['UserManagerService']),_0x1ce19f=_0xd75b17[_0x1206c7(0x137)](_0x572b8e[_0x1206c7(0x19f)]);_0x2f0343[_0x1206c7(0x157)](_0x14c449=>{const _0x463ce6=_0x1206c7;_0x42428a[_0x463ce6(0x173)](_0x14c449)&&_0x2f0343[_0x463ce6(0x13c)](_0x14c449);}),_0x2f0343[_0x1206c7(0x13b)]&&(await _0x1ce19f[_0x1206c7(0x137)](_0x1206c7(0x13a),{'params':{'userIDs':[..._0x2f0343]}}))['body']['users'][_0x1206c7(0x157)](_0x40f9a3=>{const _0x59a60a=_0x1206c7;_0x40f9a3&&_0x42428a[_0x59a60a(0x18b)](_0x40f9a3);});};var _0x20156=Object[_0x48edbd(0x182)],_0x593ffb=(_0x5b3841,_0x316566,_0x9bfdc4,_0x10da7a)=>{const _0x41943e=_0x48edbd;for(var _0x3b1a47=_0x10da7a>0x1?void 0x0:_0x10da7a?_0x20156(_0x316566,_0x9bfdc4):_0x316566,_0x423ca2=_0x5b3841[_0x41943e(0x1ac)]-0x1,_0x4cb85e;_0x423ca2>=0x0;_0x423ca2--)(_0x4cb85e=_0x5b3841[_0x423ca2])&&(_0x3b1a47=_0x4cb85e(_0x3b1a47)||_0x3b1a47);return _0x3b1a47;},_0x9824ed=(_0x572d02,_0x440e3f)=>(_0x2f5d0c,_0x7081dd)=>_0x440e3f(_0x2f5d0c,_0x7081dd,_0x572d02);let _0x5d5ea4=class extends _0x1c6bec[_0x48edbd(0x16b)]{constructor(_0x39ccf0,_0x52b4e1,_0x570f29,_0x1165c9){const _0x355c73=_0x48edbd;super(),this[_0x355c73(0x1ba)]=_0x39ccf0,this['_threadCommentModel']=_0x52b4e1,this[_0x355c73(0x19c)]=_0x570f29,this[_0x355c73(0x149)]=_0x1165c9,this[_0x355c73(0x18a)](),this['_initUserSync']();}[_0x48edbd(0x15a)](){const _0x3b3de3=_0x48edbd;this[_0x3b3de3(0x13d)](this['_threadCommentModel'][_0x3b3de3(0x171)]['pipe'](_0x598c0d[_0x3b3de3(0x19b)](0x10))['subscribe'](_0xfa8b1c=>{const _0x91c35a=_0x3b3de3,_0x1ccfef=new Set();_0xfa8b1c[_0x91c35a(0x157)](_0x50931a=>{const _0x575911=_0x91c35a;switch(_0x50931a[_0x575911(0x15e)]){case'add':{const _0x514a45=_0x50931a[_0x575911(0x196)]['personId'];_0x1ccfef['add'](_0x514a45);break;}}}),_0xe58838(this['_injector'],_0x1ccfef);}));}[_0x48edbd(0x18a)](){const _0x297839=_0x48edbd;this[_0x297839(0x13d)](this[_0x297839(0x1ba)][_0x297839(0x171)][_0x297839(0x172)](async _0x58e6d9=>{const _0x4c9b36=_0x297839;var _0x3dfe44,_0x3ba115,_0x4bb019,_0x3f1df6;const _0x293753=(_0x3dfe44=this[_0x4c9b36(0x145)]['getUnit'](_0x58e6d9[_0x4c9b36(0x1ad)])['find'](_0x428f59=>_0x428f59['threadId']===_0x58e6d9['threadId']))==null?void 0x0:_0x3dfe44['root'];if(!_0x293753)return;const {unitId:_0x1c57e0,subUnitId:_0x4286a3}=_0x293753;switch(_0x58e6d9[_0x4c9b36(0x13f)]&&this[_0x4c9b36(0x19c)][_0x4c9b36(0x18b)](_0x58e6d9['user']),_0x58e6d9['type']){case _0x9e0423[_0x4c9b36(0x16c)]:break;case _0x9e0423[_0x4c9b36(0x179)]:{this[_0x4c9b36(0x145)][_0x4c9b36(0x163)](_0x1c57e0,_0x4286a3,{'unitId':_0x1c57e0,'subUnitId':_0x4286a3,'ref':'','id':_0x58e6d9['replyId'],'dT':_0x2dd45a(+_0x58e6d9[_0x4c9b36(0x152)]),'threadId':_0x58e6d9[_0x4c9b36(0x1a7)],'personId':(_0x4bb019=(_0x3ba115=_0x58e6d9[_0x4c9b36(0x13f)])==null?void 0x0:_0x3ba115[_0x4c9b36(0x135)])!=null?_0x4bb019:_0x58e6d9[_0x4c9b36(0x17d)],'text':JSON[_0x4c9b36(0x158)](_0x58e6d9[_0x4c9b36(0x143)]),'parentId':_0x293753['id']});break;}case _0x9e0423[_0x4c9b36(0x138)]:{const _0x57bb72=this[_0x4c9b36(0x145)]['getComment'](_0x1c57e0,_0x4286a3,_0x58e6d9[_0x4c9b36(0x1b7)]);_0x57bb72&&_0x57bb72[_0x4c9b36(0x170)]&&this[_0x4c9b36(0x145)][_0x4c9b36(0x1b3)](_0x1c57e0,_0x4286a3,_0x58e6d9[_0x4c9b36(0x1b7)]);break;}case _0x9e0423[_0x4c9b36(0x198)]:{this[_0x4c9b36(0x145)]['updateComment'](_0x1c57e0,_0x4286a3,{'commentId':_0x58e6d9[_0x4c9b36(0x1b7)],'text':JSON[_0x4c9b36(0x158)](_0x58e6d9[_0x4c9b36(0x143)])});break;}case _0x9e0423[_0x4c9b36(0x1a6)]:{const _0x12fccd=(_0x3f1df6=this[_0x4c9b36(0x145)][_0x4c9b36(0x14d)](_0x58e6d9[_0x4c9b36(0x1ad)])[_0x4c9b36(0x187)](_0x3a515c=>_0x3a515c[_0x4c9b36(0x1a7)]===_0x58e6d9['threadId']))==null?void 0x0:_0x3f1df6[_0x4c9b36(0x14a)];_0x12fccd&&this['_threadCommentModel'][_0x4c9b36(0x151)](_0x1c57e0,_0x4286a3,_0x12fccd['id'],_0x58e6d9[_0x4c9b36(0x1bb)]===_0x4d9eb9[_0x4c9b36(0x19e)]);break;}}}));}};_0x5d5ea4=_0x593ffb([_0x9824ed(0x0,_0x1c6bec[_0x48edbd(0x1b0)](_0x401b30['CommentService'])),_0x9824ed(0x1,_0x1c6bec[_0x48edbd(0x1b0)](_0x5debe2['ThreadCommentModel'])),_0x9824ed(0x2,_0x1c6bec[_0x48edbd(0x1b0)](_0x1c6bec['UserManagerService'])),_0x9824ed(0x3,_0x1c6bec[_0x48edbd(0x1b0)](_0x1c6bec[_0x48edbd(0x167)]))],_0x5d5ea4);const _0x15a79e=_0x48edbd(0x1a0),_0x396b71={};var _0x496e67=Object[_0x48edbd(0x182)],_0x2570d9=(_0x1e84c4,_0x4af400,_0x1c1235,_0x5667e5)=>{const _0x5c9d0b=_0x48edbd;for(var _0x28461d=_0x5667e5>0x1?void 0x0:_0x5667e5?_0x496e67(_0x4af400,_0x1c1235):_0x4af400,_0x2b0fcc=_0x1e84c4[_0x5c9d0b(0x1ac)]-0x1,_0x3075d8;_0x2b0fcc>=0x0;_0x2b0fcc--)(_0x3075d8=_0x1e84c4[_0x2b0fcc])&&(_0x28461d=_0x3075d8(_0x28461d)||_0x28461d);return _0x28461d;},_0x5f3d3b=(_0x21eb55,_0x5e49a6)=>(_0x47b897,_0x21c76e)=>_0x5e49a6(_0x47b897,_0x21c76e,_0x21eb55);function _0x2bbeb7(_0x3c2cc5,_0x50b701){const _0x136baf=_0x48edbd,_0xc2527=_0x3c2cc5['replies'][0x0];return{..._0x50b701,'id':_0xc2527[_0x136baf(0x1b7)],'resolved':_0x3c2cc5[_0x136baf(0x1bb)]===0x1,'dT':_0x2dd45a(_0xc2527['createTimestamp']),'personId':_0xc2527[_0x136baf(0x17d)],'threadId':_0xc2527[_0x136baf(0x1a7)]};}function _0x39a026(_0x2dd4b9,_0x289993,_0x5f4e6f){const _0x46f1e1=_0x48edbd;var _0x363a9f,_0x1ebd39;if(((_0x1ebd39=(_0x363a9f=_0x2dd4b9==null?void 0x0:_0x2dd4b9[_0x46f1e1(0x136)])==null?void 0x0:_0x363a9f['length'])!=null?_0x1ebd39:0x0)>0x0){const _0xb92ff9=(_0x55a486,_0x22ce52)=>({'id':_0x55a486[_0x46f1e1(0x1b7)],'threadId':_0x55a486['threadId'],'dT':_0x2dd45a(_0x55a486['createTimestamp']),'personId':_0x55a486[_0x46f1e1(0x17d)],'resolved':_0x2dd4b9['solved']===_0x4d9eb9['Solved'],'unitId':_0x289993,'subUnitId':_0x5f4e6f,'text':JSON[_0x46f1e1(0x158)](_0x55a486[_0x46f1e1(0x143)]),'parentId':_0x22ce52}),_0x24ccfc=_0xb92ff9(_0x2dd4b9[_0x46f1e1(0x136)][0x0]);return{..._0x24ccfc,'children':_0x2dd4b9[_0x46f1e1(0x136)][_0x46f1e1(0x15d)](0x1)[_0x46f1e1(0x174)](_0x55ae61=>_0xb92ff9(_0x55ae61,_0x24ccfc['id']))};}return null;}let _0x50794f=class{constructor(_0x3b84cb,_0xcbaebf,_0x4824ed,_0x2b30a0){const _0x5b8f1f=_0x48edbd;this[_0x5b8f1f(0x176)]=_0x3b84cb,this[_0x5b8f1f(0x19c)]=_0xcbaebf,this[_0x5b8f1f(0x1b4)]=_0x4824ed,this[_0x5b8f1f(0x149)]=_0x2b30a0;}async[_0x48edbd(0x163)](_0x4976bd){const _0x1c032a=_0x48edbd;var _0xe3d719,_0x43bac8;const {parentId:_0x13c609,unitId:_0x5d1598,text:_0x4c9a17,threadId:_0x5ddfd3}=_0x4976bd,_0x3c3400=(_0x43bac8=(_0xe3d719=_0x4c9a17['customRanges'])==null?void 0x0:_0xe3d719[_0x1c032a(0x134)](_0x9acb5a=>_0x9acb5a[_0x1c032a(0x14f)]===_0x1c6bec[_0x1c032a(0x192)]['COMMENT'])[_0x1c032a(0x174)](_0x1c5429=>_0x1c5429['rangeId']))!=null?_0x43bac8:[],_0x25f2be=JSON[_0x1c032a(0x184)](_0x4c9a17),_0x305f50=(await this[_0x1c032a(0x1b4)][_0x1c032a(0x1b2)](_0x5d1598))['getMemberID']();if(_0x13c609){const _0x282895={'memberId':_0x305f50,'unitId':_0x5d1598,'content':_0x25f2be,'mention':_0x3c3400,'threadId':_0x5ddfd3},_0x2c039f=(await this['_httpService'][_0x1c032a(0x1a3)](_0x1c032a(0x162)+_0x5d1598+_0x1c032a(0x164),{'body':_0x282895}))[_0x1c032a(0x1a2)][_0x1c032a(0x18e)];return{..._0x4976bd,'id':_0x2c039f[_0x1c032a(0x1b7)],'dT':_0x1c6bec[_0x1c032a(0x144)](+_0x2c039f[_0x1c032a(0x152)])['format'](_0x1c032a(0x168)),'personId':_0x2c039f[_0x1c032a(0x17d)]};}else{const _0x4117fb={'memberId':_0x305f50,'unitId':_0x5d1598,'content':_0x25f2be,'mention':_0x3c3400},_0x59d68b=await this['_httpService'][_0x1c032a(0x1a3)]('/universer-api/comment/unit/'+_0x5d1598+_0x1c032a(0x1b5),{'body':_0x4117fb});return _0x2bbeb7(_0x59d68b['body'][_0x1c032a(0x197)],_0x4976bd);}}async[_0x48edbd(0x17a)](_0x14bdc2){const _0x205394=_0x48edbd;var _0x33ac74,_0x191b17;const {text:_0x1a5edd,unitId:_0xe56732}=_0x14bdc2,_0x1c2a8f=(_0x191b17=(_0x33ac74=_0x1a5edd[_0x205394(0x18d)])==null?void 0x0:_0x33ac74[_0x205394(0x134)](_0x2d6564=>_0x2d6564[_0x205394(0x14f)]===_0x1c6bec[_0x205394(0x192)][_0x205394(0x1bd)])[_0x205394(0x174)](_0x3c920a=>_0x3c920a[_0x205394(0x1a1)]))!=null?_0x191b17:[],_0x2f90ed=JSON[_0x205394(0x184)](_0x1a5edd),_0x84e2e5=_0x14bdc2[_0x205394(0x1a7)],_0x2a4630=_0x14bdc2['id'],_0x4174a8={'memberId':(await this[_0x205394(0x1b4)][_0x205394(0x1b2)](_0xe56732))['getMemberID'](),'unitId':_0xe56732,'threadId':_0x84e2e5,'mention':_0x1c2a8f,'content':_0x2f90ed,'replyId':_0x2a4630},_0x445de1=await this[_0x205394(0x176)][_0x205394(0x1a3)]('/universer-api/comment/unit/'+_0xe56732+_0x205394(0x19a),{'body':_0x4174a8});return!_0x445de1[_0x205394(0x1a2)][_0x205394(0x153)]||_0x445de1[_0x205394(0x1a2)][_0x205394(0x153)]['code']===0x1;}async[_0x48edbd(0x151)](_0x17c03d){const _0x1094eb=_0x48edbd,{unitId:_0x480281}=_0x17c03d,_0x1ad2c8=_0x17c03d[_0x1094eb(0x1a7)],_0x20261c={'memberId':this[_0x1094eb(0x19c)]['getCurrentUser']()[_0x1094eb(0x135)],'unitId':_0x480281,'threadId':_0x1ad2c8,'solved':_0x17c03d[_0x1094eb(0x161)]?_0x4d9eb9['Solved']:_0x4d9eb9[_0x1094eb(0x169)]},_0x1efc1e=await this[_0x1094eb(0x176)][_0x1094eb(0x1a3)]('/universer-api/comment/unit/'+_0x480281+_0x1094eb(0x175),{'body':_0x20261c});return!_0x1efc1e[_0x1094eb(0x1a2)][_0x1094eb(0x153)]||_0x1efc1e[_0x1094eb(0x1a2)][_0x1094eb(0x153)][_0x1094eb(0x1a5)]===0x1;}async[_0x48edbd(0x1b3)](_0x4a49b6,_0x46600f,_0x3ab38a,_0x12ea88){const _0x4dcae1=_0x48edbd,_0x45311e={'memberId':(await this[_0x4dcae1(0x1b4)]['requireSession'](_0x4a49b6))['getMemberID'](),'threadId':_0x3ab38a,'replyId':_0x12ea88,'unitId':_0x4a49b6},_0x16cb61=await this[_0x4dcae1(0x176)][_0x4dcae1(0x1a3)](_0x4dcae1(0x162)+_0x4a49b6+'/delete',{'body':_0x45311e});return!_0x16cb61['body'][_0x4dcae1(0x153)]||_0x16cb61[_0x4dcae1(0x1a2)][_0x4dcae1(0x153)][_0x4dcae1(0x1a5)]===0x1;}async[_0x48edbd(0x1b6)](_0x42af0b,_0x3ba8c3,_0x52331f){const _0x357372=_0x48edbd,_0x41ae21={'unitId':_0x42af0b,'threadId':_0x52331f},_0x1acc3f=await this[_0x357372(0x176)][_0x357372(0x1a3)](_0x357372(0x162)+_0x42af0b+_0x357372(0x185),{'body':_0x41ae21}),_0x58a8d5=_0x52331f[_0x357372(0x174)](_0x43b575=>_0x39a026(_0x1acc3f[_0x357372(0x1a2)]['comments'][_0x43b575],_0x42af0b,_0x3ba8c3))[_0x357372(0x134)](Boolean);return Object[_0x357372(0x16d)](_0x1acc3f[_0x357372(0x1a2)][_0x357372(0x1a4)])[_0x357372(0x157)](_0x2735df=>{const _0x8ce24e=_0x357372;this[_0x8ce24e(0x19c)][_0x8ce24e(0x18b)](_0x2735df);}),_0x58a8d5;}[_0x48edbd(0x178)](_0x31ba20){const _0x45932d=_0x48edbd;return{'id':_0x31ba20['id'],'threadId':_0x31ba20[_0x45932d(0x1a7)],'ref':_0x31ba20[_0x45932d(0x1ab)]};}};_0x50794f=_0x2570d9([_0x5f3d3b(0x0,_0x1c6bec['Inject'](_0x572b8e[_0x48edbd(0x19f)])),_0x5f3d3b(0x1,_0x1c6bec[_0x48edbd(0x1b0)](_0x1c6bec['UserManagerService'])),_0x5f3d3b(0x2,_0x1c6bec[_0x48edbd(0x1b0)](_0x401b30[_0x48edbd(0x183)])),_0x5f3d3b(0x3,_0x1c6bec[_0x48edbd(0x1b0)](_0x1c6bec[_0x48edbd(0x167)]))],_0x50794f);var _0x1cd794=Object['getOwnPropertyDescriptor'],_0x4dd0b0=(_0x557d55,_0x2ea922,_0x5ea4aa,_0x3a33d2)=>{for(var _0x34d279=_0x3a33d2>0x1?void 0x0:_0x3a33d2?_0x1cd794(_0x2ea922,_0x5ea4aa):_0x2ea922,_0x130504=_0x557d55['length']-0x1,_0x371bd6;_0x130504>=0x0;_0x130504--)(_0x371bd6=_0x557d55[_0x130504])&&(_0x34d279=_0x371bd6(_0x34d279)||_0x34d279);return _0x34d279;},_0xc46015=(_0x1fa438,_0x108b87)=>(_0x29808a,_0x8bbe1c)=>_0x108b87(_0x29808a,_0x8bbe1c,_0x1fa438);let _0x31b5c1=class extends _0x1c6bec[_0x48edbd(0x16b)]{constructor(_0x8117f9,_0x5efa2e){const _0x2c19b7=_0x48edbd;super(),this[_0x2c19b7(0x19d)]=_0x8117f9,this[_0x2c19b7(0x1b9)]=_0x5efa2e,this[_0x2c19b7(0x15c)]();}[_0x48edbd(0x15c)](){const _0x337366=_0x48edbd;this[_0x337366(0x19d)][_0x337366(0x141)]=this[_0x337366(0x1b9)],this[_0x337366(0x19d)][_0x337366(0x188)]=!0x1;}};_0x31b5c1=_0x4dd0b0([_0xc46015(0x0,_0x5debe2['IThreadCommentDataSourceService']),_0xc46015(0x1,_0x1c6bec[_0x48edbd(0x1b0)](_0x50794f))],_0x31b5c1);var _0x2c1ea7=Object[_0x48edbd(0x14e)],_0x32bdee=Object[_0x48edbd(0x182)],_0x411647=(_0x4c5f6d,_0xf3c9dd,_0x3db9d6)=>_0xf3c9dd in _0x4c5f6d?_0x2c1ea7(_0x4c5f6d,_0xf3c9dd,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3db9d6}):_0x4c5f6d[_0xf3c9dd]=_0x3db9d6,_0xf86eda=(_0x52aa34,_0x5ee20f,_0x269a98,_0x301860)=>{const _0x237fba=_0x48edbd;for(var _0xa41c3a=_0x301860>0x1?void 0x0:_0x301860?_0x32bdee(_0x5ee20f,_0x269a98):_0x5ee20f,_0x28a0cb=_0x52aa34[_0x237fba(0x1ac)]-0x1,_0x4c5ee8;_0x28a0cb>=0x0;_0x28a0cb--)(_0x4c5ee8=_0x52aa34[_0x28a0cb])&&(_0xa41c3a=_0x4c5ee8(_0xa41c3a)||_0xa41c3a);return _0xa41c3a;},_0x2b0fb6=(_0x1fe099,_0x2c85d8)=>(_0x1b3e01,_0xeb56f)=>_0x2c85d8(_0x1b3e01,_0xeb56f,_0x1fe099),_0x5b8817=(_0x44534f,_0x310f7b,_0x3f29fa)=>_0x411647(_0x44534f,typeof _0x310f7b!=_0x48edbd(0x147)?_0x310f7b+'':_0x310f7b,_0x3f29fa);_0x53e571[_0x48edbd(0x16a)]=class extends _0x1c6bec[_0x48edbd(0x140)]{constructor(_0x4533db=_0x396b71,_0x37528f,_0x5204c6){const _0x1c923c=_0x48edbd;super(),this['_config']=_0x4533db,this[_0x1c923c(0x149)]=_0x37528f,this[_0x1c923c(0x180)]=_0x5204c6;const {..._0x5a6240}=_0x1c6bec['merge']({},_0x396b71,this[_0x1c923c(0x199)]);this['_configService'][_0x1c923c(0x17f)](_0x15a79e,_0x5a6240);}[_0x48edbd(0x165)](){const _0x3ed0fb=_0x48edbd;[[_0x50794f],[_0x31b5c1],[_0x5d5ea4]][_0x3ed0fb(0x157)](_0x1d1ecb=>{const _0x382a4a=_0x3ed0fb;this[_0x382a4a(0x149)][_0x382a4a(0x154)](_0x1d1ecb);});}[_0x48edbd(0x17e)](){const _0x290913=_0x48edbd;this['_injector']['get'](_0x31b5c1),this[_0x290913(0x149)][_0x290913(0x137)](_0x5d5ea4);}},_0x5b8817(_0x53e571[_0x48edbd(0x16a)],_0x48edbd(0x155),_0x1b7027),_0x5b8817(_0x53e571[_0x48edbd(0x16a)],_0x48edbd(0x15e),_0x1c6bec[_0x48edbd(0x194)][_0x48edbd(0x14c)]),_0x53e571[_0x48edbd(0x16a)]=_0xf86eda([_0x1c6bec[_0x48edbd(0x16f)](_0x327c4b[_0x48edbd(0x186)],_0x401b30['UniverCollaborationClientPlugin'],_0xb3d77d['UniverLicensePlugin']),_0x2b0fb6(0x1,_0x1c6bec[_0x48edbd(0x1b0)](_0x1c6bec[_0x48edbd(0x167)])),_0x2b0fb6(0x2,_0x1c6bec[_0x48edbd(0x159)])],_0x53e571[_0x48edbd(0x16a)]),Object[_0x48edbd(0x14e)](_0x53e571,Symbol[_0x48edbd(0x146)],{'value':_0x48edbd(0x150)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.8.3-nightly.
|
|
3
|
+
"version": "0.8.3-nightly.202507031607",
|
|
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.8.3-nightly.
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs/core": "0.8.3-nightly.
|
|
51
|
-
"@univerjs-pro/license": "0.8.3-nightly.202507021607",
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.8.3-nightly.202507031607",
|
|
49
|
+
"@univerjs-pro/license": "0.8.3-nightly.202507031607",
|
|
50
|
+
"@univerjs/core": "0.8.3-nightly.202507031607",
|
|
52
51
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
53
|
-
"@univerjs/
|
|
54
|
-
"@univerjs/thread-comment": "0.8.3-nightly.
|
|
52
|
+
"@univerjs/network": "0.8.3-nightly.202507031607",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.8.3-nightly.202507031607",
|
|
54
|
+
"@univerjs/thread-comment": "0.8.3-nightly.202507031607"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|