@univerjs-pro/thread-comment-datasource 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +11 -11
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x199a68=_0x162f;(function(_0x4deadf,_0x411b60){const _0x56c706=_0x162f,_0x2c862b=_0x4deadf();while(!![]){try{const _0x13bdc8=parseInt(_0x56c706(0x1dd))/0x1+parseInt(_0x56c706(0x223))/0x2*(-parseInt(_0x56c706(0x22b))/0x3)+-parseInt(_0x56c706(0x24d))/0x4*(parseInt(_0x56c706(0x1eb))/0x5)+-parseInt(_0x56c706(0x1e5))/0x6*(parseInt(_0x56c706(0x22c))/0x7)+parseInt(_0x56c706(0x235))/0x8+-parseInt(_0x56c706(0x1ec))/0x9*(parseInt(_0x56c706(0x230))/0xa)+-parseInt(_0x56c706(0x1f6))/0xb*(-parseInt(_0x56c706(0x207))/0xc);if(_0x13bdc8===_0x411b60)break;else _0x2c862b['push'](_0x2c862b['shift']());}catch(_0x1d4671){_0x2c862b['push'](_0x2c862b['shift']());}}}(_0x3037,0x862ce));Object[_0x199a68(0x237)](exports,Symbol[_0x199a68(0x249)],{'value':_0x199a68(0x205)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x199a68(0x21d)),c=require('@univerjs/core'),j=require(_0x199a68(0x218)),M=require(_0x199a68(0x1fe)),w=require(_0x199a68(0x1ed)),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x38114a=>(_0x38114a[_0x38114a[_0x199a68(0x1f3)]=0x0]='OpenOrReOpen',_0x38114a[_0x38114a[_0x199a68(0x1df)]=0x1]='Solved',_0x38114a[_0x38114a[_0x199a68(0x1f5)]=-0x1]=_0x199a68(0x1f5),_0x38114a))(I||{}),v=(_0x4dabf0=>(_0x4dabf0[_0x4dabf0['Unknown']=0x0]=_0x199a68(0x24f),_0x4dabf0[_0x4dabf0[_0x199a68(0x214)]=0x1]=_0x199a68(0x214),_0x4dabf0[_0x4dabf0[_0x199a68(0x23a)]=0x2]='Reply',_0x4dabf0[_0x4dabf0[_0x199a68(0x204)]=0x3]=_0x199a68(0x204),_0x4dabf0[_0x4dabf0['Delete']=0x4]='Delete',_0x4dabf0[_0x4dabf0[_0x199a68(0x206)]=0x5]=_0x199a68(0x206),_0x4dabf0[_0x4dabf0['UNRECOGNIZED']=-0x1]=_0x199a68(0x1f5),_0x4dabf0))(v||{});const f=_0x9688c0=>c['dayjs'](new Date(+_0x9688c0))[_0x199a68(0x215)](_0x199a68(0x239)),R=async(_0x317340,_0x2ec7fb)=>{const _0x293118=_0x199a68,_0x2f1342=_0x317340[_0x293118(0x23e)](c[_0x293118(0x242)]),_0x29c11=_0x317340[_0x293118(0x23e)](P['HTTPService']);_0x2ec7fb['forEach'](_0x1ccee4=>{const _0xb8c34f=_0x293118;_0x2f1342['getUser'](_0x1ccee4)&&_0x2ec7fb[_0xb8c34f(0x212)](_0x1ccee4);}),_0x2ec7fb[_0x293118(0x21e)]&&(await _0x29c11[_0x293118(0x23e)](_0x293118(0x24a),{'params':{'userIDs':[..._0x2ec7fb]}}))[_0x293118(0x202)][_0x293118(0x1d7)][_0x293118(0x228)](_0x453bfa=>{const _0x1c31e5=_0x293118;_0x453bfa&&_0x2f1342[_0x1c31e5(0x1db)](_0x453bfa);});};var $=Object[_0x199a68(0x20f)],E=(_0x385992,_0x16f738,_0x35db3a,_0x232d8a)=>{for(var _0x271c27=_0x232d8a>0x1?void 0x0:_0x232d8a?$(_0x16f738,_0x35db3a):_0x16f738,_0x230db9=_0x385992['length']-0x1,_0x2482d5;_0x230db9>=0x0;_0x230db9--)(_0x2482d5=_0x385992[_0x230db9])&&(_0x271c27=_0x2482d5(_0x271c27)||_0x271c27);return _0x271c27;},S=(_0x3a621e,_0xc31fd7)=>(_0x2a3232,_0x1bd4a2)=>_0xc31fd7(_0x2a3232,_0x1bd4a2,_0x3a621e);let p=class extends c[_0x199a68(0x244)]{constructor(_0x57ae5a,_0x574758,_0x45a4f7,_0x6ee4a8){const _0x576c56=_0x199a68;super(),this['_commentService']=_0x57ae5a,this['_threadCommentModel']=_0x574758,this[_0x576c56(0x220)]=_0x45a4f7,this['_injector']=_0x6ee4a8,this[_0x576c56(0x225)](),this['_initUserSync']();}[_0x199a68(0x211)](){const _0x4a13e1=_0x199a68;this[_0x4a13e1(0x1e9)](this['_threadCommentModel']['commentUpdate$'][_0x4a13e1(0x210)](w[_0x4a13e1(0x1ef)](0x10))['subscribe'](_0x5d3cb2=>{const _0x57dd0f=_0x4a13e1,_0x417dc5=new Set();_0x5d3cb2[_0x57dd0f(0x228)](_0x2a9257=>{const _0x2433fc=_0x57dd0f;switch(_0x2a9257[_0x2433fc(0x1de)]){case _0x2433fc(0x1f8):{const _0x4598c8=_0x2a9257[_0x2433fc(0x1e4)][_0x2433fc(0x1dc)];_0x417dc5[_0x2433fc(0x1f8)](_0x4598c8);break;}}}),R(this[_0x57dd0f(0x22d)],_0x417dc5);}));}[_0x199a68(0x225)](){const _0x3762b0=_0x199a68;this['disposeWithMe'](this[_0x3762b0(0x221)]['commentUpdate$']['subscribe'](async _0xb192b4=>{const _0xbd7ddd=_0x3762b0;var _0x400397,_0x53f904,_0x2d6460,_0xff31a3;const _0x1fe9ac=(_0x400397=this[_0xbd7ddd(0x20b)][_0xbd7ddd(0x201)](_0xb192b4[_0xbd7ddd(0x24b)])[_0xbd7ddd(0x234)](_0x33f655=>_0x33f655['threadId']===_0xb192b4[_0xbd7ddd(0x1fa)]))==null?void 0x0:_0x400397['root'];if(!_0x1fe9ac)return;const {unitId:_0x2803d8,subUnitId:_0x2ad1a8}=_0x1fe9ac;switch(_0xb192b4[_0xbd7ddd(0x1da)]&&this[_0xbd7ddd(0x220)][_0xbd7ddd(0x1db)](_0xb192b4[_0xbd7ddd(0x1da)]),_0xb192b4[_0xbd7ddd(0x1de)]){case v[_0xbd7ddd(0x214)]:break;case v[_0xbd7ddd(0x23a)]:{this[_0xbd7ddd(0x20b)][_0xbd7ddd(0x1d9)](_0x2803d8,_0x2ad1a8,{'unitId':_0x2803d8,'subUnitId':_0x2ad1a8,'ref':'','id':_0xb192b4['replyId'],'dT':f(+_0xb192b4[_0xbd7ddd(0x247)]),'threadId':_0xb192b4[_0xbd7ddd(0x1fa)],'personId':(_0x2d6460=(_0x53f904=_0xb192b4[_0xbd7ddd(0x1da)])==null?void 0x0:_0x53f904['userID'])!=null?_0x2d6460:_0xb192b4[_0xbd7ddd(0x1f0)],'text':JSON[_0xbd7ddd(0x22f)](_0xb192b4[_0xbd7ddd(0x1e8)]),'parentId':_0x1fe9ac['id']});break;}case v[_0xbd7ddd(0x1ff)]:{const _0x15b90a=this[_0xbd7ddd(0x20b)][_0xbd7ddd(0x219)](_0x2803d8,_0x2ad1a8,_0xb192b4[_0xbd7ddd(0x1e3)]);_0x15b90a&&_0x15b90a[_0xbd7ddd(0x241)]&&this[_0xbd7ddd(0x20b)][_0xbd7ddd(0x21c)](_0x2803d8,_0x2ad1a8,_0xb192b4[_0xbd7ddd(0x1e3)]);break;}case v[_0xbd7ddd(0x204)]:{this['_threadCommentModel']['updateComment'](_0x2803d8,_0x2ad1a8,{'commentId':_0xb192b4[_0xbd7ddd(0x1e3)],'text':JSON[_0xbd7ddd(0x22f)](_0xb192b4[_0xbd7ddd(0x1e8)])});break;}case v[_0xbd7ddd(0x206)]:{const _0x23a306=(_0xff31a3=this[_0xbd7ddd(0x20b)][_0xbd7ddd(0x201)](_0xb192b4[_0xbd7ddd(0x24b)])['find'](_0x91b28d=>_0x91b28d[_0xbd7ddd(0x1fa)]===_0xb192b4[_0xbd7ddd(0x1fa)]))==null?void 0x0:_0xff31a3[_0xbd7ddd(0x20d)];_0x23a306&&this[_0xbd7ddd(0x20b)]['resolveComment'](_0x2803d8,_0x2ad1a8,_0x23a306['id'],_0xb192b4[_0xbd7ddd(0x216)]===I[_0xbd7ddd(0x1df)]);break;}}}));}};function _0x162f(_0x45271f,_0x38b8e8){const _0x30378e=_0x3037();return _0x162f=function(_0x162f0d,_0x1e2450){_0x162f0d=_0x162f0d-0x1d5;let _0x3b831d=_0x30378e[_0x162f0d];return _0x3b831d;},_0x162f(_0x45271f,_0x38b8e8);}p=E([S(0x0,c[_0x199a68(0x20c)](b['CommentService'])),S(0x1,c[_0x199a68(0x20c)](M[_0x199a68(0x231)])),S(0x2,c[_0x199a68(0x20c)](c[_0x199a68(0x242)])),S(0x3,c['Inject'](c['Injector']))],p);const q=_0x199a68(0x1e7),D={};var A=Object[_0x199a68(0x20f)],x=(_0xfc4044,_0x353194,_0x3ea2a7,_0x186996)=>{const _0x365c22=_0x199a68;for(var _0x66a31=_0x186996>0x1?void 0x0:_0x186996?A(_0x353194,_0x3ea2a7):_0x353194,_0x2747b1=_0xfc4044[_0x365c22(0x243)]-0x1,_0x2b4f54;_0x2747b1>=0x0;_0x2747b1--)(_0x2b4f54=_0xfc4044[_0x2747b1])&&(_0x66a31=_0x2b4f54(_0x66a31)||_0x66a31);return _0x66a31;},_=(_0x40c201,_0x431078)=>(_0x1ac641,_0x345d2b)=>_0x431078(_0x1ac641,_0x345d2b,_0x40c201);function Y(_0x141b1c,_0x5f4c4e){const _0x17bb06=_0x199a68,_0x52962d=_0x141b1c[_0x17bb06(0x24c)][0x0];return{..._0x5f4c4e,'id':_0x52962d[_0x17bb06(0x1e3)],'resolved':_0x141b1c[_0x17bb06(0x216)]===0x1,'dT':f(_0x52962d[_0x17bb06(0x247)]),'personId':_0x52962d[_0x17bb06(0x1f0)],'threadId':_0x52962d[_0x17bb06(0x1fa)]};}function G(_0x5de724,_0x53ed62,_0x4714c4){const _0x286c49=_0x199a68;var _0x193be4,_0x253530;if(((_0x253530=(_0x193be4=_0x5de724==null?void 0x0:_0x5de724[_0x286c49(0x24c)])==null?void 0x0:_0x193be4[_0x286c49(0x243)])!=null?_0x253530:0x0)>0x0){const _0x42b015=(_0xc127b6,_0x383f82)=>({'id':_0xc127b6[_0x286c49(0x1e3)],'threadId':_0xc127b6['threadId'],'dT':f(_0xc127b6[_0x286c49(0x247)]),'personId':_0xc127b6['userId'],'resolved':_0x5de724[_0x286c49(0x216)]===I[_0x286c49(0x1df)],'unitId':_0x53ed62,'subUnitId':_0x4714c4,'text':JSON[_0x286c49(0x22f)](_0xc127b6[_0x286c49(0x1e8)]),'parentId':_0x383f82}),_0x28f1cb=_0x42b015(_0x5de724['replies'][0x0]);return{..._0x28f1cb,'children':_0x5de724[_0x286c49(0x24c)][_0x286c49(0x21b)](0x1)['map'](_0x57bd9f=>_0x42b015(_0x57bd9f,_0x28f1cb['id']))};}return null;}let g=class{constructor(_0x369e6c,_0x2b56f4,_0x17f50b,_0x43e09c){const _0x490d41=_0x199a68;this[_0x490d41(0x1d5)]=_0x369e6c,this[_0x490d41(0x220)]=_0x2b56f4,this[_0x490d41(0x1f1)]=_0x17f50b,this[_0x490d41(0x22d)]=_0x43e09c;}async[_0x199a68(0x1d9)](_0x2a1aa7){const _0x55111e=_0x199a68;var _0x43092b,_0xa29dd6;const {parentId:_0x36a49d,unitId:_0x357f02,text:_0x59beb0,threadId:_0x531d5b}=_0x2a1aa7,_0xabdd05=(_0xa29dd6=(_0x43092b=_0x59beb0[_0x55111e(0x23f)])==null?void 0x0:_0x43092b[_0x55111e(0x22a)](_0x42f1ef=>_0x42f1ef['rangeType']===c[_0x55111e(0x23b)][_0x55111e(0x203)])[_0x55111e(0x217)](_0x324c68=>_0x324c68['rangeId']))!=null?_0xa29dd6:[],_0x15a199=JSON['stringify'](_0x59beb0),_0x230cf8=(await this[_0x55111e(0x1f1)][_0x55111e(0x1fb)](_0x357f02))['getMemberID']();if(_0x36a49d){const _0x33e860={'memberId':_0x230cf8,'unitId':_0x357f02,'content':_0x15a199,'mention':_0xabdd05,'threadId':_0x531d5b},_0x15b901=(await this[_0x55111e(0x1d5)][_0x55111e(0x208)]('/universer-api/comment/unit/'+_0x357f02+'/reply',{'body':_0x33e860}))[_0x55111e(0x202)]['reply'];return{..._0x2a1aa7,'id':_0x15b901[_0x55111e(0x1e3)],'dT':c['dayjs'](+_0x15b901[_0x55111e(0x247)])[_0x55111e(0x215)](_0x55111e(0x239)),'personId':_0x15b901[_0x55111e(0x1f0)]};}else{const _0x2b340c={'memberId':_0x230cf8,'unitId':_0x357f02,'content':_0x15a199,'mention':_0xabdd05},_0x49d1a7=await this['_httpService'][_0x55111e(0x208)](_0x55111e(0x23d)+_0x357f02+_0x55111e(0x21f),{'body':_0x2b340c});return Y(_0x49d1a7['body'][_0x55111e(0x238)],_0x2a1aa7);}}async[_0x199a68(0x1f7)](_0x4446b6){const _0x485ea6=_0x199a68;var _0x412044,_0x399877;const {text:_0x27cfa2,unitId:_0x5b3f56}=_0x4446b6,_0x26ce39=(_0x399877=(_0x412044=_0x27cfa2[_0x485ea6(0x23f)])==null?void 0x0:_0x412044['filter'](_0x225a7e=>_0x225a7e[_0x485ea6(0x21a)]===c[_0x485ea6(0x23b)][_0x485ea6(0x203)])[_0x485ea6(0x217)](_0x4dd8ab=>_0x4dd8ab[_0x485ea6(0x248)]))!=null?_0x399877:[],_0xf62382=JSON['stringify'](_0x27cfa2),_0x2d5019=_0x4446b6['threadId'],_0x1d433b=_0x4446b6['id'],_0x6a64c1={'memberId':(await this[_0x485ea6(0x1f1)]['requireSession'](_0x5b3f56))[_0x485ea6(0x1d6)](),'unitId':_0x5b3f56,'threadId':_0x2d5019,'mention':_0x26ce39,'content':_0xf62382,'replyId':_0x1d433b},_0x295b6b=await this['_httpService'][_0x485ea6(0x208)](_0x485ea6(0x23d)+_0x5b3f56+_0x485ea6(0x229),{'body':_0x6a64c1});return!_0x295b6b[_0x485ea6(0x202)][_0x485ea6(0x200)]||_0x295b6b[_0x485ea6(0x202)][_0x485ea6(0x200)][_0x485ea6(0x1ea)]===0x1;}async[_0x199a68(0x224)](_0x4db5f8){const _0x195958=_0x199a68,{unitId:_0x20093a}=_0x4db5f8,_0x240038=_0x4db5f8[_0x195958(0x1fa)],_0x362d05={'memberId':this[_0x195958(0x220)][_0x195958(0x232)]()['userID'],'unitId':_0x20093a,'threadId':_0x240038,'solved':_0x4db5f8[_0x195958(0x233)]?I[_0x195958(0x1df)]:I[_0x195958(0x1f3)]},_0x29cac0=await this[_0x195958(0x1d5)][_0x195958(0x208)](_0x195958(0x23d)+_0x20093a+_0x195958(0x20e),{'body':_0x362d05});return!_0x29cac0[_0x195958(0x202)][_0x195958(0x200)]||_0x29cac0[_0x195958(0x202)][_0x195958(0x200)]['code']===0x1;}async[_0x199a68(0x21c)](_0x1823ab,_0x26d5b9,_0x2f1c5f,_0x172fdd){const _0x149c93=_0x199a68,_0x8482c3={'memberId':(await this['_sessionService'][_0x149c93(0x1fb)](_0x1823ab))[_0x149c93(0x1d6)](),'threadId':_0x2f1c5f,'replyId':_0x172fdd,'unitId':_0x1823ab},_0x54a4cf=await this[_0x149c93(0x1d5)][_0x149c93(0x208)]('/universer-api/comment/unit/'+_0x1823ab+_0x149c93(0x1fd),{'body':_0x8482c3});return!_0x54a4cf[_0x149c93(0x202)][_0x149c93(0x200)]||_0x54a4cf[_0x149c93(0x202)][_0x149c93(0x200)][_0x149c93(0x1ea)]===0x1;}async[_0x199a68(0x1e6)](_0x19eb17,_0x56137b,_0x2022ef){const _0x38753a=_0x199a68,_0xaef30={'unitId':_0x19eb17,'threadId':_0x2022ef},_0x1f3eca=await this[_0x38753a(0x1d5)][_0x38753a(0x208)](_0x38753a(0x23d)+_0x19eb17+'/list',{'body':_0xaef30}),_0x1666ee=_0x2022ef['map'](_0x23b4f3=>G(_0x1f3eca[_0x38753a(0x202)][_0x38753a(0x226)][_0x23b4f3],_0x19eb17,_0x56137b))['filter'](Boolean);return Object[_0x38753a(0x1f9)](_0x1f3eca[_0x38753a(0x202)][_0x38753a(0x1d7)])[_0x38753a(0x228)](_0x4bc4b4=>{const _0xd9ad2c=_0x38753a;this[_0xd9ad2c(0x220)][_0xd9ad2c(0x1db)](_0x4bc4b4);}),_0x1666ee;}[_0x199a68(0x222)](_0x1b149f){const _0xb8a5f0=_0x199a68;return{'id':_0x1b149f['id'],'threadId':_0x1b149f['threadId'],'ref':_0x1b149f[_0xb8a5f0(0x213)]};}};g=x([_(0x0,c['Inject'](P[_0x199a68(0x246)])),_(0x1,c[_0x199a68(0x20c)](c[_0x199a68(0x242)])),_(0x2,c[_0x199a68(0x20c)](b['CollaborationSessionService'])),_(0x3,c[_0x199a68(0x20c)](c['Injector']))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x492512,_0x40d0a2,_0x4afc10,_0x5518f4)=>{const _0x327e00=_0x199a68;for(var _0x7b0044=_0x5518f4>0x1?void 0x0:_0x5518f4?H(_0x40d0a2,_0x4afc10):_0x40d0a2,_0x3740aa=_0x492512[_0x327e00(0x243)]-0x1,_0x556ab8;_0x3740aa>=0x0;_0x3740aa--)(_0x556ab8=_0x492512[_0x3740aa])&&(_0x7b0044=_0x556ab8(_0x7b0044)||_0x7b0044);return _0x7b0044;},y=(_0x484312,_0x474330)=>(_0x5d2f5d,_0x3df9e3)=>_0x474330(_0x5d2f5d,_0x3df9e3,_0x484312);let C=class extends c[_0x199a68(0x244)]{constructor(_0x388a6d,_0x5bdcf4){const _0x366666=_0x199a68;super(),this[_0x366666(0x1f4)]=_0x388a6d,this[_0x366666(0x1e0)]=_0x5bdcf4,this[_0x366666(0x1e2)]();}['_initDataSource'](){const _0x745df9=_0x199a68;this[_0x745df9(0x1f4)][_0x745df9(0x209)]=this[_0x745df9(0x1e0)],this[_0x745df9(0x1f4)][_0x745df9(0x1ee)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x199a68(0x20c)](g))],C);var F=Object[_0x199a68(0x237)],L=Object[_0x199a68(0x20f)],Z=(_0x560dc6,_0x22e096,_0x2f2a19)=>_0x22e096 in _0x560dc6?F(_0x560dc6,_0x22e096,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2f2a19}):_0x560dc6[_0x22e096]=_0x2f2a19,W=(_0x50cbd1,_0x12de9e,_0x54290b,_0x15ae4a)=>{const _0x186b58=_0x199a68;for(var _0x330e50=_0x15ae4a>0x1?void 0x0:_0x15ae4a?L(_0x12de9e,_0x54290b):_0x12de9e,_0x5aa541=_0x50cbd1[_0x186b58(0x243)]-0x1,_0x3b7c30;_0x5aa541>=0x0;_0x5aa541--)(_0x3b7c30=_0x50cbd1[_0x5aa541])&&(_0x330e50=_0x3b7c30(_0x330e50)||_0x330e50);return _0x330e50;},O=(_0x9e0d2a,_0x43e5d3)=>(_0x5ed6ba,_0x2c9964)=>_0x43e5d3(_0x5ed6ba,_0x2c9964,_0x9e0d2a),N=(_0x3d9fb4,_0x532835,_0x4b9022)=>Z(_0x3d9fb4,typeof _0x532835!=_0x199a68(0x1fc)?_0x532835+'':_0x532835,_0x4b9022);function _0x3037(){const _0x2e707d=['UNIVER_UNKNOWN','HTTPService','createTimestamp','rangeId','toStringTag','/universer-api/user/list','unitId','replies','4EIvqEZ','_configService','Unknown','_httpService','getMemberID','users','UniverInstanceType','addComment','user','addUser','personId','827389FRxNEc','type','Solved','_threadCommentDataSource','_config','_initDataSource','replyId','payload','175614dFfZBY','listComments','thread-comment-data-source.config','content','disposeWithMe','code','591235tXiAPY','3717NxKlIX','rxjs','syncUpdateMutationToColla','bufferTime','userId','_sessionService','pluginName','OpenOrReOpen','_threadCommentDataSourceService','UNRECOGNIZED','22aHlVbD','updateComment','add','values','threadId','requireSession','symbol','/delete','@univerjs/thread-comment','Delete','error','getUnit','body','COMMENT','Edit','Module','Solve','1125924OcMqPZ','post','dataSource','UniverThreadCommentDataSourcePlugin','_threadCommentModel','Inject','root','/solved','getOwnPropertyDescriptor','pipe','_initUserSync','delete','ref','Add','format','solved','map','@univerjs/thread-comment-ui','getComment','rangeType','slice','deleteComment','@univerjs-pro/license','size','/add','_userService','_commentService','saveCommentToSnapshot','343692fOGWuk','resolveComment','_init','comments','Injector','forEach','/edit','filter','6OHBkEN','224kqvyIG','_injector','UniverLicensePlugin','parse','70asDXVR','ThreadCommentModel','getCurrentUser','resolved','find','7487816iqfExW','onStarting','defineProperty','comment','YYYY/MM/DD\x20HH:mm','Reply','CustomRangeType','UniverCollaborationClientPlugin','/universer-api/comment/unit/','get','customRanges','UniverThreadCommentUIPlugin','parentId','UserManagerService','length','Disposable'];_0x3037=function(){return _0x2e707d;};return _0x3037();}exports[_0x199a68(0x20a)]=class extends c['Plugin']{constructor(_0x828df0=D,_0xe7708b,_0x3fc30e){const _0x279c17=_0x199a68;super(),this[_0x279c17(0x1e1)]=_0x828df0,this[_0x279c17(0x22d)]=_0xe7708b,this[_0x279c17(0x24e)]=_0x3fc30e;const {..._0xbf41e6}=c['merge']({},D,this[_0x279c17(0x1e1)]);this[_0x279c17(0x24e)]['setConfig'](q,_0xbf41e6);}[_0x199a68(0x236)](){const _0x262e2e=_0x199a68;[[g],[C],[p]][_0x262e2e(0x228)](_0x117fe7=>{const _0x3d8d18=_0x262e2e;this[_0x3d8d18(0x22d)][_0x3d8d18(0x1f8)](_0x117fe7);});}['onReady'](){const _0x4d4c0e=_0x199a68;this[_0x4d4c0e(0x22d)]['get'](C),this[_0x4d4c0e(0x22d)][_0x4d4c0e(0x23e)](p);}},N(exports[_0x199a68(0x20a)],_0x199a68(0x1f2),U),N(exports[_0x199a68(0x20a)],'type',c[_0x199a68(0x1d8)][_0x199a68(0x245)]),exports[_0x199a68(0x20a)]=W([c['DependentOn'](j[_0x199a68(0x240)],b[_0x199a68(0x23c)],T[_0x199a68(0x22e)]),O(0x1,c['Inject'](c[_0x199a68(0x227)])),O(0x2,c['IConfigService'])],exports[_0x199a68(0x20a)]);
|
|
1
|
+
'use strict';const _0x153259=_0x573a;function _0x3da2(){const _0x44ccc2=['7EpsGwa','requireSession','_commentService','IConfigService','createTimestamp','map','solved','onStarting','DependentOn','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','15286792FaZMVe','user','Solve','CustomRangeType','getUnit','getComment','/reply','onReady','find','deleteComment','Disposable','rangeType','personId','add','userID','Module','_httpService','@univerjs/thread-comment','addUser','4ivYFez','736516RtegBk','52160339VTCdOA','body','3673645UEmfQE','/list','rxjs','@univerjs/core','UNRECOGNIZED','thread-comment-data-source.config','IThreadCommentDataSourceService','UNIVER_UNKNOWN','customRanges','10LFkNxg','/solved','subscribe','getMemberID','_config','format','listComments','getCurrentUser','resolveComment','_configService','Injector','userId','COMMENT','/universer-api/comment/unit/','type','ThreadCommentModel','_initDataSource','threadId','pluginName','replies','post','getOwnPropertyDescriptor','UniverCollaborationClientPlugin','ref','_threadCommentDataSourceService','dayjs','/edit','code','forEach','UniverThreadCommentDataSourcePlugin','Solved','_threadCommentModel','360966FlGtzm','saveCommentToSnapshot','syncUpdateMutationToColla','/universer-api/user/list','UniverLicensePlugin','Edit','_init','replyId','UserManagerService','error','getUser','bufferTime','Delete','1120958cOlwYp','parse','@univerjs-pro/license','Add','unitId','updateComment','filter','@univerjs-pro/collaboration-client','_sessionService','users','HTTPService','values','14113107RWVsql','rangeId','@univerjs/thread-comment-ui','disposeWithMe','UniverThreadCommentUIPlugin','commentUpdate$','_injector','reply','stringify','get','parentId','delete','YYYY/MM/DD\x20HH:mm','Inject','resolved','dataSource','pipe','CollaborationSessionService','_threadCommentDataSource','6qMRKty','Unknown','Reply','addComment','defineProperty','content','@univerjs/network','payload','_userService','comments','length'];_0x3da2=function(){return _0x44ccc2;};return _0x3da2();}(function(_0x40f8a2,_0x2e68c1){const _0x217744=_0x573a,_0x2411c4=_0x40f8a2();while(!![]){try{const _0x5ab198=-parseInt(_0x217744(0x103))/0x1+parseInt(_0x217744(0x13c))/0x2*(parseInt(_0x217744(0xda))/0x3)+-parseInt(_0x217744(0x102))/0x4*(parseInt(_0x217744(0x106))/0x5)+parseInt(_0x217744(0x12f))/0x6*(parseInt(_0x217744(0xe5))/0x7)+-parseInt(_0x217744(0xef))/0x8+-parseInt(_0x217744(0xc7))/0x9*(parseInt(_0x217744(0x10f))/0xa)+parseInt(_0x217744(0x104))/0xb;if(_0x5ab198===_0x2e68c1)break;else _0x2411c4['push'](_0x2411c4['shift']());}catch(_0x349f55){_0x2411c4['push'](_0x2411c4['shift']());}}}(_0x3da2,0xed7cf));Object[_0x153259(0xde)](exports,Symbol['toStringTag'],{'value':_0x153259(0xfe)});const b=require(_0x153259(0x143)),T=require(_0x153259(0x13e)),c=require(_0x153259(0x109)),j=require(_0x153259(0xc9)),M=require(_0x153259(0x100)),w=require(_0x153259(0x108)),P=require(_0x153259(0xe0)),U=_0x153259(0xee);var I=(_0xc58103=>(_0xc58103[_0xc58103['OpenOrReOpen']=0x0]='OpenOrReOpen',_0xc58103[_0xc58103[_0x153259(0x12d)]=0x1]=_0x153259(0x12d),_0xc58103[_0xc58103['UNRECOGNIZED']=-0x1]=_0x153259(0x10a),_0xc58103))(I||{}),v=(_0x12db65=>(_0x12db65[_0x12db65[_0x153259(0xdb)]=0x0]='Unknown',_0x12db65[_0x12db65['Add']=0x1]=_0x153259(0x13f),_0x12db65[_0x12db65[_0x153259(0xdc)]=0x2]=_0x153259(0xdc),_0x12db65[_0x12db65[_0x153259(0x134)]=0x3]='Edit',_0x12db65[_0x12db65['Delete']=0x4]=_0x153259(0x13b),_0x12db65[_0x12db65[_0x153259(0xf1)]=0x5]='Solve',_0x12db65[_0x12db65[_0x153259(0x10a)]=-0x1]='UNRECOGNIZED',_0x12db65))(v||{});const f=_0x496775=>c['dayjs'](new Date(+_0x496775))[_0x153259(0x114)](_0x153259(0xd3)),R=async(_0xe2191b,_0x57da1e)=>{const _0x2f21e8=_0x153259,_0x2f2065=_0xe2191b['get'](c[_0x2f21e8(0x137)]),_0x37ebab=_0xe2191b['get'](P['HTTPService']);_0x57da1e[_0x2f21e8(0x12b)](_0x26f019=>{const _0x3c2ca4=_0x2f21e8;_0x2f2065[_0x3c2ca4(0x139)](_0x26f019)&&_0x57da1e[_0x3c2ca4(0xd2)](_0x26f019);}),_0x57da1e['size']&&(await _0x37ebab[_0x2f21e8(0xd0)](_0x2f21e8(0x132),{'params':{'userIDs':[..._0x57da1e]}}))[_0x2f21e8(0x105)][_0x2f21e8(0xc4)][_0x2f21e8(0x12b)](_0x123790=>{const _0x2044e7=_0x2f21e8;_0x123790&&_0x2f2065[_0x2044e7(0x101)](_0x123790);});};function _0x573a(_0x44e0f2,_0x6365d8){const _0x3da262=_0x3da2();return _0x573a=function(_0x573a6a,_0x4f6b19){_0x573a6a=_0x573a6a-0xc4;let _0x183c49=_0x3da262[_0x573a6a];return _0x183c49;},_0x573a(_0x44e0f2,_0x6365d8);}var $=Object[_0x153259(0x124)],E=(_0x4e378e,_0x283f08,_0x2239f1,_0x26a02c)=>{for(var _0x242bcc=_0x26a02c>0x1?void 0x0:_0x26a02c?$(_0x283f08,_0x2239f1):_0x283f08,_0x993af4=_0x4e378e['length']-0x1,_0x2b943f;_0x993af4>=0x0;_0x993af4--)(_0x2b943f=_0x4e378e[_0x993af4])&&(_0x242bcc=_0x2b943f(_0x242bcc)||_0x242bcc);return _0x242bcc;},S=(_0x4a0562,_0x4d1423)=>(_0xb07afb,_0x4ba6f6)=>_0x4d1423(_0xb07afb,_0x4ba6f6,_0x4a0562);let p=class extends c[_0x153259(0xf9)]{constructor(_0x31123a,_0x229bb5,_0xab1c50,_0x389c06){const _0x2a2c92=_0x153259;super(),this[_0x2a2c92(0xe7)]=_0x31123a,this['_threadCommentModel']=_0x229bb5,this['_userService']=_0xab1c50,this['_injector']=_0x389c06,this[_0x2a2c92(0x135)](),this['_initUserSync']();}['_initUserSync'](){const _0x4a63ce=_0x153259;this[_0x4a63ce(0xca)](this[_0x4a63ce(0x12e)][_0x4a63ce(0xcc)][_0x4a63ce(0xd7)](w[_0x4a63ce(0x13a)](0x10))[_0x4a63ce(0x111)](_0x30cf12=>{const _0x5d2f7b=new Set();_0x30cf12['forEach'](_0x444ed1=>{const _0x1fb518=_0x573a;switch(_0x444ed1[_0x1fb518(0x11d)]){case _0x1fb518(0xfc):{const _0xf7c9a4=_0x444ed1[_0x1fb518(0xe1)][_0x1fb518(0xfb)];_0x5d2f7b[_0x1fb518(0xfc)](_0xf7c9a4);break;}}}),R(this['_injector'],_0x5d2f7b);}));}[_0x153259(0x135)](){const _0x165a2c=_0x153259;this['disposeWithMe'](this['_commentService'][_0x165a2c(0xcc)][_0x165a2c(0x111)](async _0x6b053c=>{const _0xb6cb6f=_0x165a2c;var _0x5b4a1f,_0x5f21b9,_0x5775e1,_0x389025;const _0x331fff=(_0x5b4a1f=this[_0xb6cb6f(0x12e)]['getUnit'](_0x6b053c[_0xb6cb6f(0x140)])[_0xb6cb6f(0xf7)](_0x267d2b=>_0x267d2b['threadId']===_0x6b053c['threadId']))==null?void 0x0:_0x5b4a1f['root'];if(!_0x331fff)return;const {unitId:_0x34244c,subUnitId:_0x2bcce8}=_0x331fff;switch(_0x6b053c[_0xb6cb6f(0xf0)]&&this[_0xb6cb6f(0xe2)][_0xb6cb6f(0x101)](_0x6b053c['user']),_0x6b053c[_0xb6cb6f(0x11d)]){case v[_0xb6cb6f(0x13f)]:break;case v[_0xb6cb6f(0xdc)]:{this[_0xb6cb6f(0x12e)][_0xb6cb6f(0xdd)](_0x34244c,_0x2bcce8,{'unitId':_0x34244c,'subUnitId':_0x2bcce8,'ref':'','id':_0x6b053c['replyId'],'dT':f(+_0x6b053c[_0xb6cb6f(0xe9)]),'threadId':_0x6b053c['threadId'],'personId':(_0x5775e1=(_0x5f21b9=_0x6b053c['user'])==null?void 0x0:_0x5f21b9[_0xb6cb6f(0xfd)])!=null?_0x5775e1:_0x6b053c[_0xb6cb6f(0x11a)],'text':JSON[_0xb6cb6f(0x13d)](_0x6b053c[_0xb6cb6f(0xdf)]),'parentId':_0x331fff['id']});break;}case v[_0xb6cb6f(0x13b)]:{const _0x12079d=this[_0xb6cb6f(0x12e)][_0xb6cb6f(0xf4)](_0x34244c,_0x2bcce8,_0x6b053c[_0xb6cb6f(0x136)]);_0x12079d&&_0x12079d[_0xb6cb6f(0xd1)]&&this[_0xb6cb6f(0x12e)][_0xb6cb6f(0xf8)](_0x34244c,_0x2bcce8,_0x6b053c[_0xb6cb6f(0x136)]);break;}case v['Edit']:{this[_0xb6cb6f(0x12e)][_0xb6cb6f(0x141)](_0x34244c,_0x2bcce8,{'commentId':_0x6b053c['replyId'],'text':JSON['parse'](_0x6b053c[_0xb6cb6f(0xdf)])});break;}case v[_0xb6cb6f(0xf1)]:{const _0x35b3b2=(_0x389025=this[_0xb6cb6f(0x12e)][_0xb6cb6f(0xf3)](_0x6b053c['unitId'])[_0xb6cb6f(0xf7)](_0x49868a=>_0x49868a[_0xb6cb6f(0x120)]===_0x6b053c[_0xb6cb6f(0x120)]))==null?void 0x0:_0x389025['root'];_0x35b3b2&&this[_0xb6cb6f(0x12e)][_0xb6cb6f(0x117)](_0x34244c,_0x2bcce8,_0x35b3b2['id'],_0x6b053c[_0xb6cb6f(0xeb)]===I[_0xb6cb6f(0x12d)]);break;}}}));}};p=E([S(0x0,c[_0x153259(0xd4)](b['CommentService'])),S(0x1,c['Inject'](M[_0x153259(0x11e)])),S(0x2,c[_0x153259(0xd4)](c[_0x153259(0x137)])),S(0x3,c[_0x153259(0xd4)](c[_0x153259(0x119)]))],p);const q=_0x153259(0x10b),D={};var A=Object[_0x153259(0x124)],x=(_0x5e3839,_0x3bb5ad,_0x424a57,_0x2e5258)=>{const _0x45c3e7=_0x153259;for(var _0x5f5c14=_0x2e5258>0x1?void 0x0:_0x2e5258?A(_0x3bb5ad,_0x424a57):_0x3bb5ad,_0x734136=_0x5e3839[_0x45c3e7(0xe4)]-0x1,_0x1dede9;_0x734136>=0x0;_0x734136--)(_0x1dede9=_0x5e3839[_0x734136])&&(_0x5f5c14=_0x1dede9(_0x5f5c14)||_0x5f5c14);return _0x5f5c14;},_=(_0x55bb87,_0xdabfb3)=>(_0x44693e,_0x31902b)=>_0xdabfb3(_0x44693e,_0x31902b,_0x55bb87);function Y(_0x3e9307,_0xedbab9){const _0x49bde7=_0x153259,_0x12e711=_0x3e9307['replies'][0x0];return{..._0xedbab9,'id':_0x12e711[_0x49bde7(0x136)],'resolved':_0x3e9307[_0x49bde7(0xeb)]===0x1,'dT':f(_0x12e711[_0x49bde7(0xe9)]),'personId':_0x12e711[_0x49bde7(0x11a)],'threadId':_0x12e711[_0x49bde7(0x120)]};}function G(_0x4ab868,_0x460ece,_0x25e337){const _0x475db0=_0x153259;var _0x5bf14f,_0x4a8ace;if(((_0x4a8ace=(_0x5bf14f=_0x4ab868==null?void 0x0:_0x4ab868[_0x475db0(0x122)])==null?void 0x0:_0x5bf14f['length'])!=null?_0x4a8ace:0x0)>0x0){const _0x25a209=(_0x1ec2d8,_0x24ab34)=>({'id':_0x1ec2d8['replyId'],'threadId':_0x1ec2d8['threadId'],'dT':f(_0x1ec2d8['createTimestamp']),'personId':_0x1ec2d8[_0x475db0(0x11a)],'resolved':_0x4ab868['solved']===I[_0x475db0(0x12d)],'unitId':_0x460ece,'subUnitId':_0x25e337,'text':JSON['parse'](_0x1ec2d8['content']),'parentId':_0x24ab34}),_0xec3a50=_0x25a209(_0x4ab868[_0x475db0(0x122)][0x0]);return{..._0xec3a50,'children':_0x4ab868[_0x475db0(0x122)]['slice'](0x1)[_0x475db0(0xea)](_0x3b68e1=>_0x25a209(_0x3b68e1,_0xec3a50['id']))};}return null;}let g=class{constructor(_0x440ffb,_0x3e275d,_0x5d7b98,_0x43c70d){const _0x31d4cf=_0x153259;this[_0x31d4cf(0xff)]=_0x440ffb,this[_0x31d4cf(0xe2)]=_0x3e275d,this['_sessionService']=_0x5d7b98,this[_0x31d4cf(0xcd)]=_0x43c70d;}async[_0x153259(0xdd)](_0x4fed14){const _0x124be3=_0x153259;var _0x56c865,_0x346e6b;const {parentId:_0x5e1d33,unitId:_0x5585e0,text:_0x2191db,threadId:_0x126ce6}=_0x4fed14,_0x3a07d6=(_0x346e6b=(_0x56c865=_0x2191db[_0x124be3(0x10e)])==null?void 0x0:_0x56c865['filter'](_0x19b519=>_0x19b519[_0x124be3(0xfa)]===c[_0x124be3(0xf2)][_0x124be3(0x11b)])[_0x124be3(0xea)](_0x4dbdb8=>_0x4dbdb8[_0x124be3(0xc8)]))!=null?_0x346e6b:[],_0x7594e=JSON[_0x124be3(0xcf)](_0x2191db),_0x5a8fb6=(await this[_0x124be3(0x144)]['requireSession'](_0x5585e0))[_0x124be3(0x112)]();if(_0x5e1d33){const _0x56948b={'memberId':_0x5a8fb6,'unitId':_0x5585e0,'content':_0x7594e,'mention':_0x3a07d6,'threadId':_0x126ce6},_0x353fa9=(await this[_0x124be3(0xff)][_0x124be3(0x123)](_0x124be3(0x11c)+_0x5585e0+_0x124be3(0xf5),{'body':_0x56948b}))[_0x124be3(0x105)][_0x124be3(0xce)];return{..._0x4fed14,'id':_0x353fa9[_0x124be3(0x136)],'dT':c[_0x124be3(0x128)](+_0x353fa9['createTimestamp'])[_0x124be3(0x114)](_0x124be3(0xd3)),'personId':_0x353fa9['userId']};}else{const _0x557eea={'memberId':_0x5a8fb6,'unitId':_0x5585e0,'content':_0x7594e,'mention':_0x3a07d6},_0x53bcdb=await this[_0x124be3(0xff)][_0x124be3(0x123)](_0x124be3(0x11c)+_0x5585e0+'/add',{'body':_0x557eea});return Y(_0x53bcdb[_0x124be3(0x105)]['comment'],_0x4fed14);}}async['updateComment'](_0x5d82a7){const _0xb2b8ab=_0x153259;var _0x1c8d88,_0x4309a6;const {text:_0x1dc847,unitId:_0x21457f}=_0x5d82a7,_0x1acaa3=(_0x4309a6=(_0x1c8d88=_0x1dc847['customRanges'])==null?void 0x0:_0x1c8d88[_0xb2b8ab(0x142)](_0x14d690=>_0x14d690[_0xb2b8ab(0xfa)]===c[_0xb2b8ab(0xf2)]['COMMENT'])['map'](_0x46b2c0=>_0x46b2c0['rangeId']))!=null?_0x4309a6:[],_0x277819=JSON[_0xb2b8ab(0xcf)](_0x1dc847),_0x1a0acf=_0x5d82a7['threadId'],_0x6576f9=_0x5d82a7['id'],_0x35ee97={'memberId':(await this[_0xb2b8ab(0x144)][_0xb2b8ab(0xe6)](_0x21457f))[_0xb2b8ab(0x112)](),'unitId':_0x21457f,'threadId':_0x1a0acf,'mention':_0x1acaa3,'content':_0x277819,'replyId':_0x6576f9},_0x111da2=await this[_0xb2b8ab(0xff)][_0xb2b8ab(0x123)](_0xb2b8ab(0x11c)+_0x21457f+_0xb2b8ab(0x129),{'body':_0x35ee97});return!_0x111da2['body'][_0xb2b8ab(0x138)]||_0x111da2[_0xb2b8ab(0x105)]['error'][_0xb2b8ab(0x12a)]===0x1;}async[_0x153259(0x117)](_0x218fe7){const _0x406fdf=_0x153259,{unitId:_0x39bc9a}=_0x218fe7,_0x8b869=_0x218fe7['threadId'],_0x588471={'memberId':this['_userService'][_0x406fdf(0x116)]()[_0x406fdf(0xfd)],'unitId':_0x39bc9a,'threadId':_0x8b869,'solved':_0x218fe7[_0x406fdf(0xd5)]?I['Solved']:I['OpenOrReOpen']},_0xb6d735=await this[_0x406fdf(0xff)]['post'](_0x406fdf(0x11c)+_0x39bc9a+_0x406fdf(0x110),{'body':_0x588471});return!_0xb6d735['body'][_0x406fdf(0x138)]||_0xb6d735[_0x406fdf(0x105)][_0x406fdf(0x138)][_0x406fdf(0x12a)]===0x1;}async[_0x153259(0xf8)](_0x3c228f,_0x40bf2e,_0x5910ea,_0x2a4cce){const _0x12f587=_0x153259,_0x21b617={'memberId':(await this[_0x12f587(0x144)][_0x12f587(0xe6)](_0x3c228f))[_0x12f587(0x112)](),'threadId':_0x5910ea,'replyId':_0x2a4cce,'unitId':_0x3c228f},_0x35df84=await this[_0x12f587(0xff)][_0x12f587(0x123)](_0x12f587(0x11c)+_0x3c228f+'/delete',{'body':_0x21b617});return!_0x35df84[_0x12f587(0x105)][_0x12f587(0x138)]||_0x35df84[_0x12f587(0x105)]['error'][_0x12f587(0x12a)]===0x1;}async[_0x153259(0x115)](_0xca1bf,_0x4ecb50,_0x4bd003){const _0x5eff24=_0x153259,_0x3b52d5={'unitId':_0xca1bf,'threadId':_0x4bd003},_0x274ab1=await this[_0x5eff24(0xff)][_0x5eff24(0x123)]('/universer-api/comment/unit/'+_0xca1bf+_0x5eff24(0x107),{'body':_0x3b52d5}),_0x2e2e54=_0x4bd003[_0x5eff24(0xea)](_0x1b3152=>G(_0x274ab1[_0x5eff24(0x105)][_0x5eff24(0xe3)][_0x1b3152],_0xca1bf,_0x4ecb50))[_0x5eff24(0x142)](Boolean);return Object[_0x5eff24(0xc6)](_0x274ab1[_0x5eff24(0x105)][_0x5eff24(0xc4)])['forEach'](_0x2b2cd9=>{const _0x181769=_0x5eff24;this[_0x181769(0xe2)][_0x181769(0x101)](_0x2b2cd9);}),_0x2e2e54;}[_0x153259(0x130)](_0x473926){const _0x42d1c8=_0x153259;return{'id':_0x473926['id'],'threadId':_0x473926[_0x42d1c8(0x120)],'ref':_0x473926[_0x42d1c8(0x126)]};}};g=x([_(0x0,c[_0x153259(0xd4)](P[_0x153259(0xc5)])),_(0x1,c[_0x153259(0xd4)](c['UserManagerService'])),_(0x2,c['Inject'](b[_0x153259(0xd8)])),_(0x3,c[_0x153259(0xd4)](c[_0x153259(0x119)]))],g);var H=Object[_0x153259(0x124)],J=(_0x233908,_0x5d0202,_0x5767e7,_0x663d9c)=>{const _0x29f15c=_0x153259;for(var _0x11404b=_0x663d9c>0x1?void 0x0:_0x663d9c?H(_0x5d0202,_0x5767e7):_0x5d0202,_0x26967b=_0x233908[_0x29f15c(0xe4)]-0x1,_0x18f775;_0x26967b>=0x0;_0x26967b--)(_0x18f775=_0x233908[_0x26967b])&&(_0x11404b=_0x18f775(_0x11404b)||_0x11404b);return _0x11404b;},y=(_0x1f41d7,_0x11eafc)=>(_0x3223e9,_0x31c36e)=>_0x11eafc(_0x3223e9,_0x31c36e,_0x1f41d7);let C=class extends c['Disposable']{constructor(_0x45604b,_0x32b273){const _0x1e4233=_0x153259;super(),this[_0x1e4233(0x127)]=_0x45604b,this[_0x1e4233(0xd9)]=_0x32b273,this['_initDataSource']();}[_0x153259(0x11f)](){const _0x5f0ca0=_0x153259;this[_0x5f0ca0(0x127)][_0x5f0ca0(0xd6)]=this[_0x5f0ca0(0xd9)],this[_0x5f0ca0(0x127)][_0x5f0ca0(0x131)]=!0x1;}};C=J([y(0x0,M[_0x153259(0x10c)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x153259(0xde)],L=Object[_0x153259(0x124)],Z=(_0x3ce056,_0x2aaf54,_0xe60ec)=>_0x2aaf54 in _0x3ce056?F(_0x3ce056,_0x2aaf54,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xe60ec}):_0x3ce056[_0x2aaf54]=_0xe60ec,W=(_0x3fe632,_0x45ce44,_0x323244,_0x4899ce)=>{const _0x41bca7=_0x153259;for(var _0x3996cb=_0x4899ce>0x1?void 0x0:_0x4899ce?L(_0x45ce44,_0x323244):_0x45ce44,_0x196e16=_0x3fe632[_0x41bca7(0xe4)]-0x1,_0x314d6c;_0x196e16>=0x0;_0x196e16--)(_0x314d6c=_0x3fe632[_0x196e16])&&(_0x3996cb=_0x314d6c(_0x3996cb)||_0x3996cb);return _0x3996cb;},O=(_0x1b9a58,_0x1535cb)=>(_0x22aa72,_0x55641d)=>_0x1535cb(_0x22aa72,_0x55641d,_0x1b9a58),N=(_0x3a739a,_0x53c538,_0x581cd1)=>Z(_0x3a739a,typeof _0x53c538!='symbol'?_0x53c538+'':_0x53c538,_0x581cd1);exports[_0x153259(0x12c)]=class extends c['Plugin']{constructor(_0xd1394e=D,_0x121799,_0xcdb078){const _0xda47da=_0x153259;super(),this['_config']=_0xd1394e,this[_0xda47da(0xcd)]=_0x121799,this['_configService']=_0xcdb078;const {..._0x4b9835}=c['merge']({},D,this[_0xda47da(0x113)]);this[_0xda47da(0x118)]['setConfig'](q,_0x4b9835);}[_0x153259(0xec)](){const _0x23d7eb=_0x153259;[[g],[C],[p]][_0x23d7eb(0x12b)](_0x512246=>{const _0x41d877=_0x23d7eb;this[_0x41d877(0xcd)][_0x41d877(0xfc)](_0x512246);});}[_0x153259(0xf6)](){const _0x29fa3c=_0x153259;this[_0x29fa3c(0xcd)][_0x29fa3c(0xd0)](C),this[_0x29fa3c(0xcd)]['get'](p);}},N(exports[_0x153259(0x12c)],_0x153259(0x121),U),N(exports[_0x153259(0x12c)],'type',c['UniverInstanceType'][_0x153259(0x10d)]),exports[_0x153259(0x12c)]=W([c[_0x153259(0xed)](j[_0x153259(0xcb)],b[_0x153259(0x125)],T[_0x153259(0x133)]),O(0x1,c[_0x153259(0xd4)](c[_0x153259(0x119)])),O(0x2,c[_0x153259(0xe8)])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4e06ef=_0x3080;(function(_0x38c186,_0x3d8d72){const _0x30d6f2=_0x3080,_0x187865=_0x38c186();while(!![]){try{const _0x14b94e=parseInt(_0x30d6f2(0x195))/0x1*(parseInt(_0x30d6f2(0x178))/0x2)+parseInt(_0x30d6f2(0x173))/0x3+-parseInt(_0x30d6f2(0x158))/0x4*(parseInt(_0x30d6f2(0x166))/0x5)+-parseInt(_0x30d6f2(0x199))/0x6+parseInt(_0x30d6f2(0x16e))/0x7+-parseInt(_0x30d6f2(0x16a))/0x8+-parseInt(_0x30d6f2(0x15a))/0x9*(-parseInt(_0x30d6f2(0x137))/0xa);if(_0x14b94e===_0x3d8d72)break;else _0x187865['push'](_0x187865['shift']());}catch(_0x225bef){_0x187865['push'](_0x187865['shift']());}}}(_0x5993,0x45107));import{CommentService as _0x31cd0a,CollaborationSessionService as _0x4c4e6e,UniverCollaborationClientPlugin as _0x571e91}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4d5765}from'@univerjs-pro/license';import{dayjs as _0x456f15,UserManagerService as _0x34b56b,Inject as _0x542cd4,Injector as _0x2e2c1d,Disposable as _0x252bc6,CustomRangeType as _0x390935,UniverInstanceType as _0x10dc0a,DependentOn as _0x3a69bd,IConfigService as _0x29ffb3,Plugin as _0xc29b4f,merge as _0x1882a1}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x492f5e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4d7437,IThreadCommentDataSourceService as _0x207718}from'@univerjs/thread-comment';import{bufferTime as _0x5bfb61}from'rxjs';import{HTTPService as _0x54f72f}from'@univerjs/network';const W=_0x4e06ef(0x198);var I=(_0x2604c1=>(_0x2604c1[_0x2604c1['OpenOrReOpen']=0x0]=_0x4e06ef(0x184),_0x2604c1[_0x2604c1[_0x4e06ef(0x15d)]=0x1]=_0x4e06ef(0x15d),_0x2604c1[_0x2604c1[_0x4e06ef(0x159)]=-0x1]=_0x4e06ef(0x159),_0x2604c1))(I||{}),v=(_0x52f08c=>(_0x52f08c[_0x52f08c['Unknown']=0x0]=_0x4e06ef(0x194),_0x52f08c[_0x52f08c['Add']=0x1]=_0x4e06ef(0x18f),_0x52f08c[_0x52f08c['Reply']=0x2]='Reply',_0x52f08c[_0x52f08c['Edit']=0x3]=_0x4e06ef(0x197),_0x52f08c[_0x52f08c[_0x4e06ef(0x181)]=0x4]='Delete',_0x52f08c[_0x52f08c['Solve']=0x5]=_0x4e06ef(0x177),_0x52f08c[_0x52f08c[_0x4e06ef(0x159)]=-0x1]=_0x4e06ef(0x159),_0x52f08c))(v||{});const D=_0x24124d=>_0x456f15(new Date(+_0x24124d))[_0x4e06ef(0x172)](_0x4e06ef(0x154)),B=async(_0x58e51e,_0x377f08)=>{const _0x5eebaa=_0x4e06ef,_0x23abfb=_0x58e51e[_0x5eebaa(0x189)](_0x34b56b),_0xca5f99=_0x58e51e[_0x5eebaa(0x189)](_0x54f72f);_0x377f08[_0x5eebaa(0x176)](_0x5edb8f=>{const _0x21c574=_0x5eebaa;_0x23abfb[_0x21c574(0x141)](_0x5edb8f)&&_0x377f08[_0x21c574(0x163)](_0x5edb8f);}),_0x377f08[_0x5eebaa(0x188)]&&(await _0xca5f99[_0x5eebaa(0x189)](_0x5eebaa(0x167),{'params':{'userIDs':[..._0x377f08]}}))[_0x5eebaa(0x14f)][_0x5eebaa(0x146)][_0x5eebaa(0x176)](_0x284d42=>{const _0x4d9ba7=_0x5eebaa;_0x284d42&&_0x23abfb[_0x4d9ba7(0x14e)](_0x284d42);});};var K=Object[_0x4e06ef(0x180)],V=(_0x593c82,_0x5ed532,_0x221dbd,_0x14d6a5)=>{for(var _0x104e18=_0x14d6a5>0x1?void 0x0:_0x14d6a5?K(_0x5ed532,_0x221dbd):_0x5ed532,_0x22a379=_0x593c82['length']-0x1,_0x1d6b82;_0x22a379>=0x0;_0x22a379--)(_0x1d6b82=_0x593c82[_0x22a379])&&(_0x104e18=_0x1d6b82(_0x104e18)||_0x104e18);return _0x104e18;},p=(_0x516ece,_0xc82d23)=>(_0x2499bf,_0x35e1be)=>_0xc82d23(_0x2499bf,_0x35e1be,_0x516ece);let S=class extends _0x252bc6{constructor(_0x574e30,_0x2b8db0,_0x38e2fa,_0x142d00){const _0x250219=_0x4e06ef;super(),this[_0x250219(0x151)]=_0x574e30,this[_0x250219(0x183)]=_0x2b8db0,this['_userService']=_0x38e2fa,this[_0x250219(0x160)]=_0x142d00,this[_0x250219(0x15b)](),this['_initUserSync']();}['_initUserSync'](){const _0x1d0fa2=_0x4e06ef;this[_0x1d0fa2(0x17e)](this[_0x1d0fa2(0x183)][_0x1d0fa2(0x16c)][_0x1d0fa2(0x174)](_0x5bfb61(0x10))['subscribe'](_0x17bbd6=>{const _0x2e4acb=_0x1d0fa2,_0x331ce6=new Set();_0x17bbd6[_0x2e4acb(0x176)](_0x1911a8=>{const _0x348a1f=_0x2e4acb;switch(_0x1911a8['type']){case _0x348a1f(0x139):{const _0x59ddff=_0x1911a8['payload']['personId'];_0x331ce6[_0x348a1f(0x139)](_0x59ddff);break;}}}),B(this[_0x2e4acb(0x160)],_0x331ce6);}));}[_0x4e06ef(0x15b)](){const _0xc3a05b=_0x4e06ef;this[_0xc3a05b(0x17e)](this[_0xc3a05b(0x151)][_0xc3a05b(0x16c)][_0xc3a05b(0x18d)](async _0x5d8cba=>{const _0x26f47a=_0xc3a05b;var _0x49d98e,_0x75f1d8,_0x462858,_0x4b33bc;const _0x19300f=(_0x49d98e=this['_threadCommentModel'][_0x26f47a(0x16b)](_0x5d8cba[_0x26f47a(0x16d)])['find'](_0x3baa28=>_0x3baa28[_0x26f47a(0x152)]===_0x5d8cba[_0x26f47a(0x152)]))==null?void 0x0:_0x49d98e[_0x26f47a(0x185)];if(!_0x19300f)return;const {unitId:_0xbefc51,subUnitId:_0x3c9237}=_0x19300f;switch(_0x5d8cba['user']&&this[_0x26f47a(0x136)][_0x26f47a(0x14e)](_0x5d8cba[_0x26f47a(0x175)]),_0x5d8cba['type']){case v[_0x26f47a(0x18f)]:break;case v[_0x26f47a(0x140)]:{this['_threadCommentModel'][_0x26f47a(0x13f)](_0xbefc51,_0x3c9237,{'unitId':_0xbefc51,'subUnitId':_0x3c9237,'ref':'','id':_0x5d8cba[_0x26f47a(0x161)],'dT':D(+_0x5d8cba[_0x26f47a(0x17b)]),'threadId':_0x5d8cba['threadId'],'personId':(_0x462858=(_0x75f1d8=_0x5d8cba[_0x26f47a(0x175)])==null?void 0x0:_0x75f1d8['userID'])!=null?_0x462858:_0x5d8cba[_0x26f47a(0x147)],'text':JSON[_0x26f47a(0x157)](_0x5d8cba['content']),'parentId':_0x19300f['id']});break;}case v[_0x26f47a(0x181)]:{const _0x3c5fc6=this[_0x26f47a(0x183)][_0x26f47a(0x13a)](_0xbefc51,_0x3c9237,_0x5d8cba['replyId']);_0x3c5fc6&&_0x3c5fc6['parentId']&&this[_0x26f47a(0x183)][_0x26f47a(0x192)](_0xbefc51,_0x3c9237,_0x5d8cba[_0x26f47a(0x161)]);break;}case v[_0x26f47a(0x197)]:{this[_0x26f47a(0x183)][_0x26f47a(0x13d)](_0xbefc51,_0x3c9237,{'commentId':_0x5d8cba[_0x26f47a(0x161)],'text':JSON[_0x26f47a(0x157)](_0x5d8cba[_0x26f47a(0x171)])});break;}case v[_0x26f47a(0x177)]:{const _0x2d2504=(_0x4b33bc=this[_0x26f47a(0x183)][_0x26f47a(0x16b)](_0x5d8cba[_0x26f47a(0x16d)])['find'](_0x42b609=>_0x42b609[_0x26f47a(0x152)]===_0x5d8cba[_0x26f47a(0x152)]))==null?void 0x0:_0x4b33bc[_0x26f47a(0x185)];_0x2d2504&&this[_0x26f47a(0x183)][_0x26f47a(0x162)](_0xbefc51,_0x3c9237,_0x2d2504['id'],_0x5d8cba['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x542cd4(_0x31cd0a)),p(0x1,_0x542cd4(_0x4d7437)),p(0x2,_0x542cd4(_0x34b56b)),p(0x3,_0x542cd4(_0x2e2c1d))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x4e06ef(0x180)],Q=(_0x48d3c6,_0x50f2c6,_0x506657,_0x38f068)=>{const _0x40b2f2=_0x4e06ef;for(var _0x43b3fe=_0x38f068>0x1?void 0x0:_0x38f068?k(_0x50f2c6,_0x506657):_0x50f2c6,_0x4716a6=_0x48d3c6[_0x40b2f2(0x18a)]-0x1,_0xb5bcd3;_0x4716a6>=0x0;_0x4716a6--)(_0xb5bcd3=_0x48d3c6[_0x4716a6])&&(_0x43b3fe=_0xb5bcd3(_0x43b3fe)||_0x43b3fe);return _0x43b3fe;},_=(_0x5269a4,_0x33061b)=>(_0x5ef270,_0x2842a0)=>_0x33061b(_0x5ef270,_0x2842a0,_0x5269a4);function X(_0x2b2449,_0x468ed0){const _0x56463a=_0x4e06ef,_0x104cc3=_0x2b2449[_0x56463a(0x187)][0x0];return{..._0x468ed0,'id':_0x104cc3[_0x56463a(0x161)],'resolved':_0x2b2449['solved']===0x1,'dT':D(_0x104cc3[_0x56463a(0x17b)]),'personId':_0x104cc3[_0x56463a(0x147)],'threadId':_0x104cc3['threadId']};}function ee(_0xe4d8cb,_0x31115c,_0x4a9a5c){const _0x346ab3=_0x4e06ef;var _0x5429a7,_0x15c925;if(((_0x15c925=(_0x5429a7=_0xe4d8cb==null?void 0x0:_0xe4d8cb['replies'])==null?void 0x0:_0x5429a7[_0x346ab3(0x18a)])!=null?_0x15c925:0x0)>0x0){const _0x2666f4=(_0x43007e,_0x4a87c1)=>({'id':_0x43007e['replyId'],'threadId':_0x43007e[_0x346ab3(0x152)],'dT':D(_0x43007e[_0x346ab3(0x17b)]),'personId':_0x43007e[_0x346ab3(0x147)],'resolved':_0xe4d8cb[_0x346ab3(0x186)]===I['Solved'],'unitId':_0x31115c,'subUnitId':_0x4a9a5c,'text':JSON[_0x346ab3(0x157)](_0x43007e[_0x346ab3(0x171)]),'parentId':_0x4a87c1}),_0x2dd370=_0x2666f4(_0xe4d8cb[_0x346ab3(0x187)][0x0]);return{..._0x2dd370,'children':_0xe4d8cb[_0x346ab3(0x187)][_0x346ab3(0x17a)](0x1)[_0x346ab3(0x143)](_0x56b2eb=>_0x2666f4(_0x56b2eb,_0x2dd370['id']))};}return null;}let f=class{constructor(_0x11edcd,_0x2caa32,_0x16728a,_0x186f6c){const _0x216f42=_0x4e06ef;this[_0x216f42(0x18c)]=_0x11edcd,this[_0x216f42(0x136)]=_0x2caa32,this[_0x216f42(0x193)]=_0x16728a,this[_0x216f42(0x160)]=_0x186f6c;}async[_0x4e06ef(0x13f)](_0x4dfb4b){const _0x5dcd0c=_0x4e06ef;var _0x4036d3,_0xa697b9;const {parentId:_0x2e493f,unitId:_0x5b5d97,text:_0x58908b,threadId:_0x4f7e76}=_0x4dfb4b,_0xd3e3cf=(_0xa697b9=(_0x4036d3=_0x58908b[_0x5dcd0c(0x18b)])==null?void 0x0:_0x4036d3[_0x5dcd0c(0x179)](_0x59e3f5=>_0x59e3f5[_0x5dcd0c(0x153)]===_0x390935[_0x5dcd0c(0x170)])[_0x5dcd0c(0x143)](_0x115ee0=>_0x115ee0['rangeId']))!=null?_0xa697b9:[],_0x2ac442=JSON['stringify'](_0x58908b),_0x597e32=(await this[_0x5dcd0c(0x193)][_0x5dcd0c(0x148)](_0x5b5d97))[_0x5dcd0c(0x145)]();if(_0x2e493f){const _0x5431a8={'memberId':_0x597e32,'unitId':_0x5b5d97,'content':_0x2ac442,'mention':_0xd3e3cf,'threadId':_0x4f7e76},_0x26a7da=(await this[_0x5dcd0c(0x18c)][_0x5dcd0c(0x15c)]('/universer-api/comment/unit/'+_0x5b5d97+'/reply',{'body':_0x5431a8}))[_0x5dcd0c(0x14f)][_0x5dcd0c(0x14b)];return{..._0x4dfb4b,'id':_0x26a7da[_0x5dcd0c(0x161)],'dT':_0x456f15(+_0x26a7da[_0x5dcd0c(0x17b)])['format'](_0x5dcd0c(0x154)),'personId':_0x26a7da[_0x5dcd0c(0x147)]};}else{const _0x37e1ac={'memberId':_0x597e32,'unitId':_0x5b5d97,'content':_0x2ac442,'mention':_0xd3e3cf},_0x5dac03=await this[_0x5dcd0c(0x18c)][_0x5dcd0c(0x15c)](_0x5dcd0c(0x17d)+_0x5b5d97+_0x5dcd0c(0x13e),{'body':_0x37e1ac});return X(_0x5dac03['body']['comment'],_0x4dfb4b);}}async['updateComment'](_0x40df76){const _0x3384dd=_0x4e06ef;var _0x1c40d6,_0x2ebbfa;const {text:_0x4e0b68,unitId:_0x3650b3}=_0x40df76,_0x24f922=(_0x2ebbfa=(_0x1c40d6=_0x4e0b68[_0x3384dd(0x18b)])==null?void 0x0:_0x1c40d6['filter'](_0x3dc1c9=>_0x3dc1c9[_0x3384dd(0x153)]===_0x390935['COMMENT'])[_0x3384dd(0x143)](_0x270c4b=>_0x270c4b[_0x3384dd(0x17c)]))!=null?_0x2ebbfa:[],_0x7eb67f=JSON[_0x3384dd(0x13b)](_0x4e0b68),_0x4725ec=_0x40df76[_0x3384dd(0x152)],_0x19265a=_0x40df76['id'],_0x4ace34={'memberId':(await this[_0x3384dd(0x193)][_0x3384dd(0x148)](_0x3650b3))[_0x3384dd(0x145)](),'unitId':_0x3650b3,'threadId':_0x4725ec,'mention':_0x24f922,'content':_0x7eb67f,'replyId':_0x19265a},_0x146f8e=await this[_0x3384dd(0x18c)][_0x3384dd(0x15c)](_0x3384dd(0x17d)+_0x3650b3+_0x3384dd(0x144),{'body':_0x4ace34});return!_0x146f8e[_0x3384dd(0x14f)]['error']||_0x146f8e[_0x3384dd(0x14f)][_0x3384dd(0x155)][_0x3384dd(0x15e)]===0x1;}async[_0x4e06ef(0x162)](_0x415bb8){const _0x126233=_0x4e06ef,{unitId:_0x628bb1}=_0x415bb8,_0x5caff8=_0x415bb8[_0x126233(0x152)],_0x2836e7={'memberId':this[_0x126233(0x136)][_0x126233(0x168)]()[_0x126233(0x196)],'unitId':_0x628bb1,'threadId':_0x5caff8,'solved':_0x415bb8[_0x126233(0x17f)]?I[_0x126233(0x15d)]:I[_0x126233(0x184)]},_0x74857d=await this['_httpService'][_0x126233(0x15c)](_0x126233(0x17d)+_0x628bb1+_0x126233(0x182),{'body':_0x2836e7});return!_0x74857d[_0x126233(0x14f)]['error']||_0x74857d[_0x126233(0x14f)][_0x126233(0x155)][_0x126233(0x15e)]===0x1;}async[_0x4e06ef(0x192)](_0x467a2a,_0x570cb3,_0x322a66,_0x267f73){const _0x22a226=_0x4e06ef,_0x5dbdec={'memberId':(await this[_0x22a226(0x193)][_0x22a226(0x148)](_0x467a2a))['getMemberID'](),'threadId':_0x322a66,'replyId':_0x267f73,'unitId':_0x467a2a},_0x55bf8b=await this[_0x22a226(0x18c)][_0x22a226(0x15c)](_0x22a226(0x17d)+_0x467a2a+_0x22a226(0x14c),{'body':_0x5dbdec});return!_0x55bf8b['body'][_0x22a226(0x155)]||_0x55bf8b['body'][_0x22a226(0x155)]['code']===0x1;}async[_0x4e06ef(0x138)](_0x1e5329,_0x43b76e,_0x232072){const _0x2b5378=_0x4e06ef,_0x47f7b6={'unitId':_0x1e5329,'threadId':_0x232072},_0x508e8b=await this[_0x2b5378(0x18c)]['post'](_0x2b5378(0x17d)+_0x1e5329+'/list',{'body':_0x47f7b6}),_0x434ae9=_0x232072[_0x2b5378(0x143)](_0x5057b5=>ee(_0x508e8b[_0x2b5378(0x14f)][_0x2b5378(0x191)][_0x5057b5],_0x1e5329,_0x43b76e))['filter'](Boolean);return Object[_0x2b5378(0x142)](_0x508e8b[_0x2b5378(0x14f)]['users'])[_0x2b5378(0x176)](_0x55951a=>{const _0x4f03df=_0x2b5378;this['_userService'][_0x4f03df(0x14e)](_0x55951a);}),_0x434ae9;}[_0x4e06ef(0x150)](_0x4bc862){const _0x26ea4f=_0x4e06ef;return{'id':_0x4bc862['id'],'threadId':_0x4bc862[_0x26ea4f(0x152)],'ref':_0x4bc862[_0x26ea4f(0x165)]};}};function _0x5993(){const _0x1e1a5e=['onReady','comments','deleteComment','_sessionService','Unknown','88106iVctpm','userID','Edit','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','693816IwmNRk','_userService','90680Jwztwd','listComments','add','getComment','stringify','defineProperty','updateComment','/add','addComment','Reply','getUser','values','map','/edit','getMemberID','users','userId','requireSession','symbol','_initDataSource','reply','/delete','_threadCommentDataSource','addUser','body','saveCommentToSnapshot','_commentService','threadId','rangeType','YYYY/MM/DD\x20HH:mm','error','dataSource','parse','4TIKfaB','UNRECOGNIZED','162glzIXj','_init','post','Solved','code','_threadCommentDataSourceService','_injector','replyId','resolveComment','delete','_config','ref','1448170XAzpEz','/universer-api/user/list','getCurrentUser','UNIVER_UNKNOWN','463760MYLhxK','getUnit','commentUpdate$','unitId','2066134hMUIew','_configService','COMMENT','content','format','334587NfBPdd','pipe','user','forEach','Solve','4XQcaOW','filter','slice','createTimestamp','rangeId','/universer-api/comment/unit/','disposeWithMe','resolved','getOwnPropertyDescriptor','Delete','/solved','_threadCommentModel','OpenOrReOpen','root','solved','replies','size','get','length','customRanges','_httpService','subscribe','setConfig','Add'];_0x5993=function(){return _0x1e1a5e;};return _0x5993();}f=Q([_(0x0,_0x542cd4(_0x54f72f)),_(0x1,_0x542cd4(_0x34b56b)),_(0x2,_0x542cd4(_0x4c4e6e)),_(0x3,_0x542cd4(_0x2e2c1d))],f);var re=Object[_0x4e06ef(0x180)],te=(_0x3a7e28,_0xcfd556,_0x462bb2,_0x501513)=>{for(var _0x3b0da8=_0x501513>0x1?void 0x0:_0x501513?re(_0xcfd556,_0x462bb2):_0xcfd556,_0x4342d5=_0x3a7e28['length']-0x1,_0x30df20;_0x4342d5>=0x0;_0x4342d5--)(_0x30df20=_0x3a7e28[_0x4342d5])&&(_0x3b0da8=_0x30df20(_0x3b0da8)||_0x3b0da8);return _0x3b0da8;},N=(_0x5b05fd,_0x4aca87)=>(_0xd6bb5,_0x3751a0)=>_0x4aca87(_0xd6bb5,_0x3751a0,_0x5b05fd);let g=class extends _0x252bc6{constructor(_0x1923aa,_0x5a563d){const _0x1c7321=_0x4e06ef;super(),this['_threadCommentDataSourceService']=_0x1923aa,this[_0x1c7321(0x14d)]=_0x5a563d,this['_initDataSource']();}[_0x4e06ef(0x14a)](){const _0x56304b=_0x4e06ef;this[_0x56304b(0x15f)][_0x56304b(0x156)]=this[_0x56304b(0x14d)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x207718),N(0x1,_0x542cd4(f))],g);var se=Object[_0x4e06ef(0x13c)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x4d17a9,_0x4e6bfa,_0x5e4b57)=>_0x4e6bfa in _0x4d17a9?se(_0x4d17a9,_0x4e6bfa,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5e4b57}):_0x4d17a9[_0x4e6bfa]=_0x5e4b57,ie=(_0x1cfa35,_0x31ce85,_0x10b909,_0x20b8c6)=>{const _0x5d8e16=_0x4e06ef;for(var _0xfa93f2=_0x20b8c6>0x1?void 0x0:_0x20b8c6?oe(_0x31ce85,_0x10b909):_0x31ce85,_0x4e3e0c=_0x1cfa35[_0x5d8e16(0x18a)]-0x1,_0x42d89e;_0x4e3e0c>=0x0;_0x4e3e0c--)(_0x42d89e=_0x1cfa35[_0x4e3e0c])&&(_0xfa93f2=_0x42d89e(_0xfa93f2)||_0xfa93f2);return _0xfa93f2;},w=(_0x309a91,_0x56a48d)=>(_0x30c142,_0x483b79)=>_0x56a48d(_0x30c142,_0x483b79,_0x309a91),$=(_0x1e5eb3,_0x752b63,_0x466d34)=>ne(_0x1e5eb3,typeof _0x752b63!=_0x4e06ef(0x149)?_0x752b63+'':_0x752b63,_0x466d34);let b=class extends _0xc29b4f{constructor(_0x423dbd=M,_0x416525,_0x5a50ae){const _0x59797e=_0x4e06ef;super(),this[_0x59797e(0x164)]=_0x423dbd,this[_0x59797e(0x160)]=_0x416525,this[_0x59797e(0x16f)]=_0x5a50ae;const {..._0x4c380d}=_0x1882a1({},M,this[_0x59797e(0x164)]);this[_0x59797e(0x16f)][_0x59797e(0x18e)](z,_0x4c380d);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x340c23=>{const _0x39d369=_0x3080;this[_0x39d369(0x160)]['add'](_0x340c23);});}[_0x4e06ef(0x190)](){const _0x16de0c=_0x4e06ef;this[_0x16de0c(0x160)]['get'](g),this['_injector'][_0x16de0c(0x189)](S);}};$(b,'pluginName',W),$(b,'type',_0x10dc0a[_0x4e06ef(0x169)]),b=ie([_0x3a69bd(_0x492f5e,_0x571e91,_0x4d5765),w(0x1,_0x542cd4(_0x2e2c1d)),w(0x2,_0x29ffb3)],b);function _0x3080(_0x3050e0,_0x2c1261){const _0x5993f7=_0x5993();return _0x3080=function(_0x30808d,_0x179306){_0x30808d=_0x30808d-0x136;let _0x1f1ffb=_0x5993f7[_0x30808d];return _0x1f1ffb;},_0x3080(_0x3050e0,_0x2c1261);}export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3f576e=_0x2bba;(function(_0x8fc6b8,_0x31236a){const _0x4e00a6=_0x2bba,_0x2260fc=_0x8fc6b8();while(!![]){try{const _0x2134fb=-parseInt(_0x4e00a6(0x165))/0x1+-parseInt(_0x4e00a6(0x17b))/0x2+-parseInt(_0x4e00a6(0x186))/0x3*(-parseInt(_0x4e00a6(0x160))/0x4)+parseInt(_0x4e00a6(0x157))/0x5+-parseInt(_0x4e00a6(0x13b))/0x6*(-parseInt(_0x4e00a6(0x188))/0x7)+-parseInt(_0x4e00a6(0x137))/0x8+-parseInt(_0x4e00a6(0x13d))/0x9*(-parseInt(_0x4e00a6(0x19a))/0xa);if(_0x2134fb===_0x31236a)break;else _0x2260fc['push'](_0x2260fc['shift']());}catch(_0x3928ea){_0x2260fc['push'](_0x2260fc['shift']());}}}(_0x1891,0x771ec));import{CommentService as _0x5e1c55,CollaborationSessionService as _0x204e5c,UniverCollaborationClientPlugin as _0x5c2273}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x135297}from'@univerjs-pro/license';import{dayjs as _0x2a150e,UserManagerService as _0x2a30d4,Inject as _0x592b52,Injector as _0x4a76a3,Disposable as _0x9723fb,CustomRangeType as _0xae705a,UniverInstanceType as _0x42e5e1,DependentOn as _0x1b0624,IConfigService as _0x1b40d4,Plugin as _0x583448,merge as _0x3c6b71}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x7d5c51}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x13689c,IThreadCommentDataSourceService as _0x3137f2}from'@univerjs/thread-comment';import{bufferTime as _0x5c3244}from'rxjs';import{HTTPService as _0x588dab}from'@univerjs/network';const W=_0x3f576e(0x18b);var I=(_0x17370e=>(_0x17370e[_0x17370e['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x17370e[_0x17370e[_0x3f576e(0x154)]=0x1]=_0x3f576e(0x154),_0x17370e[_0x17370e[_0x3f576e(0x16e)]=-0x1]=_0x3f576e(0x16e),_0x17370e))(I||{}),v=(_0x571eb8=>(_0x571eb8[_0x571eb8[_0x3f576e(0x187)]=0x0]=_0x3f576e(0x187),_0x571eb8[_0x571eb8['Add']=0x1]=_0x3f576e(0x138),_0x571eb8[_0x571eb8[_0x3f576e(0x164)]=0x2]=_0x3f576e(0x164),_0x571eb8[_0x571eb8[_0x3f576e(0x17d)]=0x3]='Edit',_0x571eb8[_0x571eb8[_0x3f576e(0x18e)]=0x4]=_0x3f576e(0x18e),_0x571eb8[_0x571eb8['Solve']=0x5]=_0x3f576e(0x18a),_0x571eb8[_0x571eb8['UNRECOGNIZED']=-0x1]=_0x3f576e(0x16e),_0x571eb8))(v||{});const D=_0x20d79b=>_0x2a150e(new Date(+_0x20d79b))[_0x3f576e(0x197)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x398d7b,_0x4f34e1)=>{const _0x284fc5=_0x3f576e,_0xa22078=_0x398d7b[_0x284fc5(0x18d)](_0x2a30d4),_0x46095f=_0x398d7b['get'](_0x588dab);_0x4f34e1[_0x284fc5(0x182)](_0x3d6165=>{const _0x5caf99=_0x284fc5;_0xa22078[_0x5caf99(0x169)](_0x3d6165)&&_0x4f34e1[_0x5caf99(0x13f)](_0x3d6165);}),_0x4f34e1[_0x284fc5(0x189)]&&(await _0x46095f[_0x284fc5(0x18d)](_0x284fc5(0x155),{'params':{'userIDs':[..._0x4f34e1]}}))['body'][_0x284fc5(0x13a)][_0x284fc5(0x182)](_0x3fa92c=>{const _0xf5a411=_0x284fc5;_0x3fa92c&&_0xa22078[_0xf5a411(0x172)](_0x3fa92c);});};function _0x1891(){const _0x3330e0=['onReady','parse','addUser','_configService','filter','_initUserSync','_commentService','resolveComment','rangeType','/solved','dataSource','1125664EIijNR','getUnit','Edit','thread-comment-data-source.config','_config','customRanges','parentId','forEach','values','_threadCommentDataSourceService','body','447Wxkvyq','Unknown','14Wmbwta','size','Solve','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','deleteComment','get','Delete','createTimestamp','user','commentUpdate$','symbol','/delete','listComments','root','error','format','_init','requireSession','615670SavEmg','getMemberID','/add','unitId','/list','5087032COvAAV','Add','personId','users','114330VolXZP','_threadCommentModel','117LZjAlx','_sessionService','delete','getOwnPropertyDescriptor','COMMENT','OpenOrReOpen','find','length','_threadCommentDataSource','content','disposeWithMe','saveCommentToSnapshot','/universer-api/comment/unit/','code','reply','post','_httpService','comments','add','onStarting','slice','_injector','threadId','Solved','/universer-api/user/list','comment','279975kGAILP','replies','rangeId','subscribe','solved','userID','/reply','_initDataSource','defineProperty','24864eelevK','map','type','replyId','Reply','134033YklwcN','UNIVER_UNKNOWN','updateComment','syncUpdateMutationToColla','getUser','userId','addComment','_userService','setConfig','UNRECOGNIZED','stringify'];_0x1891=function(){return _0x3330e0;};return _0x1891();}var K=Object[_0x3f576e(0x140)],V=(_0x4d70c4,_0x307f50,_0x4de368,_0x5f176a)=>{const _0x17aaca=_0x3f576e;for(var _0x1ef6c3=_0x5f176a>0x1?void 0x0:_0x5f176a?K(_0x307f50,_0x4de368):_0x307f50,_0x9719ed=_0x4d70c4[_0x17aaca(0x144)]-0x1,_0x3a2416;_0x9719ed>=0x0;_0x9719ed--)(_0x3a2416=_0x4d70c4[_0x9719ed])&&(_0x1ef6c3=_0x3a2416(_0x1ef6c3)||_0x1ef6c3);return _0x1ef6c3;},p=(_0x29ae7a,_0x45ce74)=>(_0x538d1c,_0x3f0d04)=>_0x45ce74(_0x538d1c,_0x3f0d04,_0x29ae7a);let S=class extends _0x9723fb{constructor(_0x23c811,_0x24c69a,_0x30f5fa,_0x356520){const _0xcfb457=_0x3f576e;super(),this[_0xcfb457(0x176)]=_0x23c811,this['_threadCommentModel']=_0x24c69a,this[_0xcfb457(0x16c)]=_0x30f5fa,this['_injector']=_0x356520,this[_0xcfb457(0x198)](),this[_0xcfb457(0x175)]();}['_initUserSync'](){const _0x484262=_0x3f576e;this[_0x484262(0x147)](this['_threadCommentModel'][_0x484262(0x191)]['pipe'](_0x5c3244(0x10))[_0x484262(0x15a)](_0x193d1d=>{const _0x49ed96=_0x484262,_0x2ccb6e=new Set();_0x193d1d['forEach'](_0x2ec015=>{const _0x5c761c=_0x2bba;switch(_0x2ec015['type']){case _0x5c761c(0x14f):{const _0x3ffbe6=_0x2ec015['payload'][_0x5c761c(0x139)];_0x2ccb6e['add'](_0x3ffbe6);break;}}}),B(this[_0x49ed96(0x152)],_0x2ccb6e);}));}[_0x3f576e(0x198)](){const _0x2b2210=_0x3f576e;this[_0x2b2210(0x147)](this[_0x2b2210(0x176)][_0x2b2210(0x191)][_0x2b2210(0x15a)](async _0x8fd85c=>{const _0x46ec60=_0x2b2210;var _0x24292a,_0x457c6a,_0x237f77,_0x1df3fd;const _0x19ebfc=(_0x24292a=this['_threadCommentModel'][_0x46ec60(0x17c)](_0x8fd85c[_0x46ec60(0x19d)])[_0x46ec60(0x143)](_0x222b6c=>_0x222b6c[_0x46ec60(0x153)]===_0x8fd85c[_0x46ec60(0x153)]))==null?void 0x0:_0x24292a['root'];if(!_0x19ebfc)return;const {unitId:_0x589714,subUnitId:_0xae0290}=_0x19ebfc;switch(_0x8fd85c[_0x46ec60(0x190)]&&this[_0x46ec60(0x16c)][_0x46ec60(0x172)](_0x8fd85c[_0x46ec60(0x190)]),_0x8fd85c[_0x46ec60(0x162)]){case v[_0x46ec60(0x138)]:break;case v[_0x46ec60(0x164)]:{this[_0x46ec60(0x13c)][_0x46ec60(0x16b)](_0x589714,_0xae0290,{'unitId':_0x589714,'subUnitId':_0xae0290,'ref':'','id':_0x8fd85c[_0x46ec60(0x163)],'dT':D(+_0x8fd85c[_0x46ec60(0x18f)]),'threadId':_0x8fd85c[_0x46ec60(0x153)],'personId':(_0x237f77=(_0x457c6a=_0x8fd85c[_0x46ec60(0x190)])==null?void 0x0:_0x457c6a[_0x46ec60(0x15c)])!=null?_0x237f77:_0x8fd85c['userId'],'text':JSON[_0x46ec60(0x171)](_0x8fd85c[_0x46ec60(0x146)]),'parentId':_0x19ebfc['id']});break;}case v[_0x46ec60(0x18e)]:{const _0x433285=this['_threadCommentModel']['getComment'](_0x589714,_0xae0290,_0x8fd85c[_0x46ec60(0x163)]);_0x433285&&_0x433285[_0x46ec60(0x181)]&&this[_0x46ec60(0x13c)][_0x46ec60(0x18c)](_0x589714,_0xae0290,_0x8fd85c[_0x46ec60(0x163)]);break;}case v[_0x46ec60(0x17d)]:{this[_0x46ec60(0x13c)][_0x46ec60(0x167)](_0x589714,_0xae0290,{'commentId':_0x8fd85c[_0x46ec60(0x163)],'text':JSON[_0x46ec60(0x171)](_0x8fd85c[_0x46ec60(0x146)])});break;}case v[_0x46ec60(0x18a)]:{const _0x37f24b=(_0x1df3fd=this[_0x46ec60(0x13c)][_0x46ec60(0x17c)](_0x8fd85c[_0x46ec60(0x19d)])[_0x46ec60(0x143)](_0x141efb=>_0x141efb[_0x46ec60(0x153)]===_0x8fd85c['threadId']))==null?void 0x0:_0x1df3fd[_0x46ec60(0x195)];_0x37f24b&&this[_0x46ec60(0x13c)][_0x46ec60(0x177)](_0x589714,_0xae0290,_0x37f24b['id'],_0x8fd85c['solved']===I[_0x46ec60(0x154)]);break;}}}));}};function _0x2bba(_0x4be3f1,_0x4021db){const _0x18913b=_0x1891();return _0x2bba=function(_0x2bbaf1,_0x818b6f){_0x2bbaf1=_0x2bbaf1-0x136;let _0x25ef84=_0x18913b[_0x2bbaf1];return _0x25ef84;},_0x2bba(_0x4be3f1,_0x4021db);}S=V([p(0x0,_0x592b52(_0x5e1c55)),p(0x1,_0x592b52(_0x13689c)),p(0x2,_0x592b52(_0x2a30d4)),p(0x3,_0x592b52(_0x4a76a3))],S);const z=_0x3f576e(0x17e),M={};var k=Object[_0x3f576e(0x140)],Q=(_0x106f82,_0x276829,_0x173cb9,_0x5a0b33)=>{const _0x4333d1=_0x3f576e;for(var _0x2b1f1b=_0x5a0b33>0x1?void 0x0:_0x5a0b33?k(_0x276829,_0x173cb9):_0x276829,_0x17edec=_0x106f82[_0x4333d1(0x144)]-0x1,_0x442e5d;_0x17edec>=0x0;_0x17edec--)(_0x442e5d=_0x106f82[_0x17edec])&&(_0x2b1f1b=_0x442e5d(_0x2b1f1b)||_0x2b1f1b);return _0x2b1f1b;},_=(_0xb7ebd4,_0x19d7e0)=>(_0x40ca97,_0x3f8652)=>_0x19d7e0(_0x40ca97,_0x3f8652,_0xb7ebd4);function X(_0x429ef0,_0x5db180){const _0x5def07=_0x3f576e,_0x288292=_0x429ef0['replies'][0x0];return{..._0x5db180,'id':_0x288292['replyId'],'resolved':_0x429ef0[_0x5def07(0x15b)]===0x1,'dT':D(_0x288292[_0x5def07(0x18f)]),'personId':_0x288292['userId'],'threadId':_0x288292[_0x5def07(0x153)]};}function ee(_0x5ce140,_0x5993bc,_0x2513d4){const _0x530b77=_0x3f576e;var _0xdaf972,_0x18c2e1;if(((_0x18c2e1=(_0xdaf972=_0x5ce140==null?void 0x0:_0x5ce140[_0x530b77(0x158)])==null?void 0x0:_0xdaf972[_0x530b77(0x144)])!=null?_0x18c2e1:0x0)>0x0){const _0x38e37f=(_0x15fb0e,_0x588788)=>({'id':_0x15fb0e[_0x530b77(0x163)],'threadId':_0x15fb0e[_0x530b77(0x153)],'dT':D(_0x15fb0e[_0x530b77(0x18f)]),'personId':_0x15fb0e[_0x530b77(0x16a)],'resolved':_0x5ce140['solved']===I[_0x530b77(0x154)],'unitId':_0x5993bc,'subUnitId':_0x2513d4,'text':JSON[_0x530b77(0x171)](_0x15fb0e[_0x530b77(0x146)]),'parentId':_0x588788}),_0x24c196=_0x38e37f(_0x5ce140['replies'][0x0]);return{..._0x24c196,'children':_0x5ce140[_0x530b77(0x158)][_0x530b77(0x151)](0x1)[_0x530b77(0x161)](_0x11e028=>_0x38e37f(_0x11e028,_0x24c196['id']))};}return null;}let f=class{constructor(_0x7bd1fc,_0x42294b,_0x344372,_0x18f904){const _0x54b862=_0x3f576e;this['_httpService']=_0x7bd1fc,this[_0x54b862(0x16c)]=_0x42294b,this[_0x54b862(0x13e)]=_0x344372,this[_0x54b862(0x152)]=_0x18f904;}async[_0x3f576e(0x16b)](_0x2d8607){const _0x15fea3=_0x3f576e;var _0x471769,_0x21cd34;const {parentId:_0x3bf006,unitId:_0x49d3b7,text:_0x5ec571,threadId:_0x565c34}=_0x2d8607,_0x20705b=(_0x21cd34=(_0x471769=_0x5ec571[_0x15fea3(0x180)])==null?void 0x0:_0x471769['filter'](_0x279921=>_0x279921[_0x15fea3(0x178)]===_0xae705a['COMMENT'])[_0x15fea3(0x161)](_0x122d4d=>_0x122d4d['rangeId']))!=null?_0x21cd34:[],_0x45e22b=JSON[_0x15fea3(0x16f)](_0x5ec571),_0x525742=(await this[_0x15fea3(0x13e)][_0x15fea3(0x199)](_0x49d3b7))['getMemberID']();if(_0x3bf006){const _0x3f7c49={'memberId':_0x525742,'unitId':_0x49d3b7,'content':_0x45e22b,'mention':_0x20705b,'threadId':_0x565c34},_0x197977=(await this[_0x15fea3(0x14d)][_0x15fea3(0x14c)](_0x15fea3(0x149)+_0x49d3b7+_0x15fea3(0x15d),{'body':_0x3f7c49}))[_0x15fea3(0x185)][_0x15fea3(0x14b)];return{..._0x2d8607,'id':_0x197977[_0x15fea3(0x163)],'dT':_0x2a150e(+_0x197977[_0x15fea3(0x18f)])[_0x15fea3(0x197)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x197977['userId']};}else{const _0x19388e={'memberId':_0x525742,'unitId':_0x49d3b7,'content':_0x45e22b,'mention':_0x20705b},_0xdb4060=await this[_0x15fea3(0x14d)][_0x15fea3(0x14c)]('/universer-api/comment/unit/'+_0x49d3b7+_0x15fea3(0x19c),{'body':_0x19388e});return X(_0xdb4060[_0x15fea3(0x185)][_0x15fea3(0x156)],_0x2d8607);}}async[_0x3f576e(0x167)](_0x1eba1f){const _0x1d2a88=_0x3f576e;var _0x33369e,_0x3eabe6;const {text:_0x1cdf30,unitId:_0x4297a7}=_0x1eba1f,_0x5e524b=(_0x3eabe6=(_0x33369e=_0x1cdf30[_0x1d2a88(0x180)])==null?void 0x0:_0x33369e[_0x1d2a88(0x174)](_0xa5e4ad=>_0xa5e4ad[_0x1d2a88(0x178)]===_0xae705a[_0x1d2a88(0x141)])[_0x1d2a88(0x161)](_0xe5249e=>_0xe5249e[_0x1d2a88(0x159)]))!=null?_0x3eabe6:[],_0x30faef=JSON['stringify'](_0x1cdf30),_0x5d3e4e=_0x1eba1f[_0x1d2a88(0x153)],_0x50bd77=_0x1eba1f['id'],_0x178f21={'memberId':(await this['_sessionService'][_0x1d2a88(0x199)](_0x4297a7))[_0x1d2a88(0x19b)](),'unitId':_0x4297a7,'threadId':_0x5d3e4e,'mention':_0x5e524b,'content':_0x30faef,'replyId':_0x50bd77},_0xc400a8=await this[_0x1d2a88(0x14d)]['post']('/universer-api/comment/unit/'+_0x4297a7+'/edit',{'body':_0x178f21});return!_0xc400a8[_0x1d2a88(0x185)][_0x1d2a88(0x196)]||_0xc400a8[_0x1d2a88(0x185)][_0x1d2a88(0x196)][_0x1d2a88(0x14a)]===0x1;}async['resolveComment'](_0xae1d7d){const _0x329dac=_0x3f576e,{unitId:_0x99bc9f}=_0xae1d7d,_0xc1e4ea=_0xae1d7d[_0x329dac(0x153)],_0x5eea92={'memberId':this[_0x329dac(0x16c)]['getCurrentUser']()[_0x329dac(0x15c)],'unitId':_0x99bc9f,'threadId':_0xc1e4ea,'solved':_0xae1d7d['resolved']?I['Solved']:I[_0x329dac(0x142)]},_0x21eb3d=await this['_httpService'][_0x329dac(0x14c)]('/universer-api/comment/unit/'+_0x99bc9f+_0x329dac(0x179),{'body':_0x5eea92});return!_0x21eb3d[_0x329dac(0x185)][_0x329dac(0x196)]||_0x21eb3d[_0x329dac(0x185)]['error'][_0x329dac(0x14a)]===0x1;}async[_0x3f576e(0x18c)](_0x3a844e,_0x4973ea,_0x421bcb,_0x293cbd){const _0x17e78e=_0x3f576e,_0x406cb9={'memberId':(await this[_0x17e78e(0x13e)][_0x17e78e(0x199)](_0x3a844e))[_0x17e78e(0x19b)](),'threadId':_0x421bcb,'replyId':_0x293cbd,'unitId':_0x3a844e},_0x397c5e=await this[_0x17e78e(0x14d)][_0x17e78e(0x14c)]('/universer-api/comment/unit/'+_0x3a844e+_0x17e78e(0x193),{'body':_0x406cb9});return!_0x397c5e[_0x17e78e(0x185)]['error']||_0x397c5e[_0x17e78e(0x185)][_0x17e78e(0x196)][_0x17e78e(0x14a)]===0x1;}async[_0x3f576e(0x194)](_0x3bae5a,_0x5abb49,_0x3d6be4){const _0x1d5948=_0x3f576e,_0x19ac59={'unitId':_0x3bae5a,'threadId':_0x3d6be4},_0x3b2215=await this['_httpService']['post'](_0x1d5948(0x149)+_0x3bae5a+_0x1d5948(0x136),{'body':_0x19ac59}),_0x3efb55=_0x3d6be4[_0x1d5948(0x161)](_0x350303=>ee(_0x3b2215['body'][_0x1d5948(0x14e)][_0x350303],_0x3bae5a,_0x5abb49))[_0x1d5948(0x174)](Boolean);return Object[_0x1d5948(0x183)](_0x3b2215[_0x1d5948(0x185)][_0x1d5948(0x13a)])[_0x1d5948(0x182)](_0x56fa3d=>{const _0x2e4ca0=_0x1d5948;this['_userService'][_0x2e4ca0(0x172)](_0x56fa3d);}),_0x3efb55;}[_0x3f576e(0x148)](_0x443126){const _0x3a481f=_0x3f576e;return{'id':_0x443126['id'],'threadId':_0x443126[_0x3a481f(0x153)],'ref':_0x443126['ref']};}};f=Q([_(0x0,_0x592b52(_0x588dab)),_(0x1,_0x592b52(_0x2a30d4)),_(0x2,_0x592b52(_0x204e5c)),_(0x3,_0x592b52(_0x4a76a3))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x384ff3,_0x54b0ce,_0x4bf32d,_0x43f53f)=>{const _0x3dcc9b=_0x3f576e;for(var _0x321d61=_0x43f53f>0x1?void 0x0:_0x43f53f?re(_0x54b0ce,_0x4bf32d):_0x54b0ce,_0x432c53=_0x384ff3[_0x3dcc9b(0x144)]-0x1,_0x5b245a;_0x432c53>=0x0;_0x432c53--)(_0x5b245a=_0x384ff3[_0x432c53])&&(_0x321d61=_0x5b245a(_0x321d61)||_0x321d61);return _0x321d61;},N=(_0xd78bfe,_0x90ae10)=>(_0x4b9510,_0x1bfcf6)=>_0x90ae10(_0x4b9510,_0x1bfcf6,_0xd78bfe);let g=class extends _0x9723fb{constructor(_0x4453c2,_0x5515e2){const _0x31406b=_0x3f576e;super(),this[_0x31406b(0x184)]=_0x4453c2,this['_threadCommentDataSource']=_0x5515e2,this[_0x31406b(0x15e)]();}[_0x3f576e(0x15e)](){const _0x1ac0a3=_0x3f576e;this[_0x1ac0a3(0x184)][_0x1ac0a3(0x17a)]=this[_0x1ac0a3(0x145)],this[_0x1ac0a3(0x184)][_0x1ac0a3(0x168)]=!0x1;}};g=te([N(0x0,_0x3137f2),N(0x1,_0x592b52(f))],g);var se=Object[_0x3f576e(0x15f)],oe=Object[_0x3f576e(0x140)],ne=(_0x18455d,_0x22fae1,_0x1ddba7)=>_0x22fae1 in _0x18455d?se(_0x18455d,_0x22fae1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1ddba7}):_0x18455d[_0x22fae1]=_0x1ddba7,ie=(_0x41f713,_0x286c02,_0x2bcd9f,_0x4c9485)=>{for(var _0x5227ac=_0x4c9485>0x1?void 0x0:_0x4c9485?oe(_0x286c02,_0x2bcd9f):_0x286c02,_0x3187da=_0x41f713['length']-0x1,_0x4c2fe8;_0x3187da>=0x0;_0x3187da--)(_0x4c2fe8=_0x41f713[_0x3187da])&&(_0x5227ac=_0x4c2fe8(_0x5227ac)||_0x5227ac);return _0x5227ac;},w=(_0x38c06f,_0x4a69fd)=>(_0x1107dd,_0x1f449c)=>_0x4a69fd(_0x1107dd,_0x1f449c,_0x38c06f),$=(_0x2f1d3b,_0x2512aa,_0x4bfa68)=>ne(_0x2f1d3b,typeof _0x2512aa!=_0x3f576e(0x192)?_0x2512aa+'':_0x2512aa,_0x4bfa68);let b=class extends _0x583448{constructor(_0x20d472=M,_0x13c453,_0x58f12e){const _0x306b7e=_0x3f576e;super(),this[_0x306b7e(0x17f)]=_0x20d472,this[_0x306b7e(0x152)]=_0x13c453,this['_configService']=_0x58f12e;const {..._0x448c87}=_0x3c6b71({},M,this[_0x306b7e(0x17f)]);this[_0x306b7e(0x173)][_0x306b7e(0x16d)](z,_0x448c87);}[_0x3f576e(0x150)](){const _0x444a63=_0x3f576e;[[f],[g],[S]][_0x444a63(0x182)](_0x18b1a1=>{const _0x3c7aee=_0x444a63;this[_0x3c7aee(0x152)][_0x3c7aee(0x14f)](_0x18b1a1);});}[_0x3f576e(0x170)](){const _0x5e908e=_0x3f576e;this[_0x5e908e(0x152)][_0x5e908e(0x18d)](g),this[_0x5e908e(0x152)][_0x5e908e(0x18d)](S);}};$(b,'pluginName',W),$(b,_0x3f576e(0x162),_0x42e5e1[_0x3f576e(0x166)]),b=ie([_0x1b0624(_0x7d5c51,_0x5c2273,_0x135297),w(0x1,_0x592b52(_0x4a76a3)),w(0x2,_0x1b40d4)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x27ff(_0x4dfe48,_0x31d53d){const _0x2e9f78=_0x2e9f();return _0x27ff=function(_0x27ff56,_0x58a3b4){_0x27ff56=_0x27ff56-0x109;let _0xd5b26f=_0x2e9f78[_0x27ff56];return _0xd5b26f;},_0x27ff(_0x4dfe48,_0x31d53d);}function _0x2e9f(){const _0x513c76=['filter','exports','pipe','find','getUser','UNIVER_UNKNOWN','root','/list','UniverProCollaborationClient','UniverInstanceType','639736KzZkli','2449426gIjNPa','UserManagerService','2114380JecsXX','_initUserSync','CustomRangeType','OpenOrReOpen','UniverCollaborationClientPlugin','merge','YYYY/MM/DD\x20HH:mm','commentUpdate$','post','Injector','solved','subscribe','forEach','Unknown','_httpService','4728618ZmDgDM','3309345LutOOR','get','disposeWithMe','COMMENT','_injector','pluginName','symbol','Reply','getOwnPropertyDescriptor','error','UniverProThreadCommentDatasource','@univerjs/network','threadId','_config','replyId','24IKUCZr','listComments','onStarting','slice','body','Delete','thread-comment-data-source.config','1287IIBqAi','IThreadCommentDataSourceService','_threadCommentDataSource','CollaborationSessionService','addUser','/add','format','_userService','resolved','payload','rxjs','replies','Solved','_commentService','/universer-api/comment/unit/','HTTPService','Edit','UniverThreadComment','stringify','comments','length','6BJqasE','getCurrentUser','_configService','user','_threadCommentDataSourceService','/solved','customRanges','dataSource','resolveComment','UniverCore','updateComment','add','saveCommentToSnapshot','type','CommentService','unitId','parse','content','object','Plugin','userId','@univerjs-pro/collaboration-client','UniverThreadCommentDataSourcePlugin','Solve','UNRECOGNIZED','size','getUnit','_sessionService','@univerjs/core','createTimestamp','@univerjs/thread-comment-ui','/edit','Add','deleteComment','reply','Inject','UniverThreadCommentUIPlugin','setConfig','DependentOn','parentId','defineProperty','bufferTime','UniverLicensePlugin','_threadCommentModel','@univerjs/thread-comment','4268460ZMQgpt','1uwMCgq','_init','rangeId','UniverProLicense','dayjs','_initDataSource','UniverThreadCommentUi','map','172170FuuzVr','users','@univerjs-pro/license','IConfigService','requireSession','personId','rangeType','code'];_0x2e9f=function(){return _0x513c76;};return _0x2e9f();}(function(_0x20baaa,_0x5679f6){const _0x508fee=_0x27ff,_0x4b3d17=_0x20baaa();while(!![]){try{const _0x2a7bf1=-parseInt(_0x508fee(0x13c))/0x1*(-parseInt(_0x508fee(0x159))/0x2)+-parseInt(_0x508fee(0x13b))/0x3+parseInt(_0x508fee(0x156))/0x4+-parseInt(_0x508fee(0x169))/0x5*(-parseInt(_0x508fee(0x10e))/0x6)+-parseInt(_0x508fee(0x157))/0x7*(parseInt(_0x508fee(0x178))/0x8)+-parseInt(_0x508fee(0x168))/0x9+parseInt(_0x508fee(0x144))/0xa*(parseInt(_0x508fee(0x17f))/0xb);if(_0x2a7bf1===_0x5679f6)break;else _0x4b3d17['push'](_0x4b3d17['shift']());}catch(_0x48fccc){_0x4b3d17['push'](_0x4b3d17['shift']());}}}(_0x2e9f,0xda9ae),function(_0x192ba9,_0x423917){const _0x433cfa=_0x27ff;typeof exports==_0x433cfa(0x120)&&typeof module<'u'?_0x423917(exports,require('@univerjs-pro/collaboration-client'),require(_0x433cfa(0x146)),require(_0x433cfa(0x12a)),require(_0x433cfa(0x12c)),require(_0x433cfa(0x13a)),require(_0x433cfa(0x189)),require(_0x433cfa(0x174))):typeof define=='function'&&define['amd']?define([_0x433cfa(0x14d),_0x433cfa(0x123),_0x433cfa(0x146),_0x433cfa(0x12a),_0x433cfa(0x12c),_0x433cfa(0x13a),_0x433cfa(0x189),_0x433cfa(0x174)],_0x423917):(_0x192ba9=typeof globalThis<'u'?globalThis:_0x192ba9||self,_0x423917(_0x192ba9[_0x433cfa(0x173)]={},_0x192ba9[_0x433cfa(0x154)],_0x192ba9[_0x433cfa(0x13f)],_0x192ba9[_0x433cfa(0x117)],_0x192ba9[_0x433cfa(0x142)],_0x192ba9[_0x433cfa(0x10a)],_0x192ba9[_0x433cfa(0x189)],_0x192ba9['UniverNetwork']));}(this,function(_0x208d67,_0x512cec,_0x116b22,_0x4c72af,_0x768b18,_0x1da53d,_0x171811,_0x1534ea){'use strict';const _0x1847fc=_0x27ff;const _0x525e6e='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x442e7b=(_0x309b36=>(_0x309b36[_0x309b36['OpenOrReOpen']=0x0]=_0x1847fc(0x15c),_0x309b36[_0x309b36[_0x1847fc(0x18b)]=0x1]=_0x1847fc(0x18b),_0x309b36[_0x309b36[_0x1847fc(0x126)]=-0x1]=_0x1847fc(0x126),_0x309b36))(_0x442e7b||{}),_0x8d4419=(_0x19a131=>(_0x19a131[_0x19a131['Unknown']=0x0]=_0x1847fc(0x166),_0x19a131[_0x19a131[_0x1847fc(0x12e)]=0x1]=_0x1847fc(0x12e),_0x19a131[_0x19a131['Reply']=0x2]=_0x1847fc(0x170),_0x19a131[_0x19a131[_0x1847fc(0x109)]=0x3]=_0x1847fc(0x109),_0x19a131[_0x19a131[_0x1847fc(0x17d)]=0x4]=_0x1847fc(0x17d),_0x19a131[_0x19a131[_0x1847fc(0x125)]=0x5]='Solve',_0x19a131[_0x19a131['UNRECOGNIZED']=-0x1]=_0x1847fc(0x126),_0x19a131))(_0x8d4419||{});const _0x3fe7c4=_0x5a6b86=>_0x4c72af[_0x1847fc(0x140)](new Date(+_0x5a6b86))[_0x1847fc(0x185)](_0x1847fc(0x15f)),_0x5012ad=async(_0x519b0c,_0x2b7a90)=>{const _0x280702=_0x1847fc,_0x20e807=_0x519b0c[_0x280702(0x16a)](_0x4c72af[_0x280702(0x158)]),_0x1c1e35=_0x519b0c[_0x280702(0x16a)](_0x1534ea[_0x280702(0x18e)]);_0x2b7a90[_0x280702(0x165)](_0x2e83bb=>{const _0x5e1001=_0x280702;_0x20e807[_0x5e1001(0x150)](_0x2e83bb)&&_0x2b7a90['delete'](_0x2e83bb);}),_0x2b7a90[_0x280702(0x127)]&&(await _0x1c1e35['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x2b7a90]}}))[_0x280702(0x17c)]['users'][_0x280702(0x165)](_0x5e0642=>{const _0x4eb072=_0x280702;_0x5e0642&&_0x20e807[_0x4eb072(0x183)](_0x5e0642);});};var _0x3b6f91=Object[_0x1847fc(0x171)],_0x485b33=(_0x2832a3,_0x7d805d,_0x2bbc86,_0x4a2bcc)=>{const _0xcc8695=_0x1847fc;for(var _0x2a7e37=_0x4a2bcc>0x1?void 0x0:_0x4a2bcc?_0x3b6f91(_0x7d805d,_0x2bbc86):_0x7d805d,_0x189b23=_0x2832a3[_0xcc8695(0x10d)]-0x1,_0x647ee6;_0x189b23>=0x0;_0x189b23--)(_0x647ee6=_0x2832a3[_0x189b23])&&(_0x2a7e37=_0x647ee6(_0x2a7e37)||_0x2a7e37);return _0x2a7e37;},_0x40db28=(_0x241529,_0x5b79a4)=>(_0x1ad0bd,_0x5598a2)=>_0x5b79a4(_0x1ad0bd,_0x5598a2,_0x241529);let _0x150d3a=class extends _0x4c72af['Disposable']{constructor(_0x4bc159,_0x580ee1,_0x18e4db,_0xd109ec){const _0x2cd573=_0x1847fc;super(),this[_0x2cd573(0x18c)]=_0x4bc159,this[_0x2cd573(0x139)]=_0x580ee1,this[_0x2cd573(0x186)]=_0x18e4db,this[_0x2cd573(0x16d)]=_0xd109ec,this['_init'](),this['_initUserSync']();}[_0x1847fc(0x15a)](){const _0x6fb474=_0x1847fc;this['disposeWithMe'](this[_0x6fb474(0x139)][_0x6fb474(0x160)][_0x6fb474(0x14e)](_0x171811[_0x6fb474(0x137)](0x10))[_0x6fb474(0x164)](_0x16cd8a=>{const _0x1119f=new Set();_0x16cd8a['forEach'](_0x8fbfa0=>{const _0x257f4a=_0x27ff;switch(_0x8fbfa0[_0x257f4a(0x11b)]){case _0x257f4a(0x119):{const _0x3fd3e2=_0x8fbfa0[_0x257f4a(0x188)][_0x257f4a(0x149)];_0x1119f[_0x257f4a(0x119)](_0x3fd3e2);break;}}}),_0x5012ad(this['_injector'],_0x1119f);}));}[_0x1847fc(0x13d)](){const _0x5981a5=_0x1847fc;this[_0x5981a5(0x16b)](this[_0x5981a5(0x18c)]['commentUpdate$'][_0x5981a5(0x164)](async _0x52e5eb=>{const _0x153d6d=_0x5981a5;var _0x1e361b,_0x18b5a9,_0xd478b3,_0x52d0df;const _0x1e343c=(_0x1e361b=this['_threadCommentModel'][_0x153d6d(0x128)](_0x52e5eb[_0x153d6d(0x11d)])[_0x153d6d(0x14f)](_0x4669ae=>_0x4669ae[_0x153d6d(0x175)]===_0x52e5eb[_0x153d6d(0x175)]))==null?void 0x0:_0x1e361b[_0x153d6d(0x152)];if(!_0x1e343c)return;const {unitId:_0xfefdb2,subUnitId:_0xb4c6c4}=_0x1e343c;switch(_0x52e5eb[_0x153d6d(0x111)]&&this[_0x153d6d(0x186)][_0x153d6d(0x183)](_0x52e5eb[_0x153d6d(0x111)]),_0x52e5eb[_0x153d6d(0x11b)]){case _0x8d4419[_0x153d6d(0x12e)]:break;case _0x8d4419['Reply']:{this['_threadCommentModel']['addComment'](_0xfefdb2,_0xb4c6c4,{'unitId':_0xfefdb2,'subUnitId':_0xb4c6c4,'ref':'','id':_0x52e5eb['replyId'],'dT':_0x3fe7c4(+_0x52e5eb['createTimestamp']),'threadId':_0x52e5eb[_0x153d6d(0x175)],'personId':(_0xd478b3=(_0x18b5a9=_0x52e5eb[_0x153d6d(0x111)])==null?void 0x0:_0x18b5a9['userID'])!=null?_0xd478b3:_0x52e5eb['userId'],'text':JSON[_0x153d6d(0x11e)](_0x52e5eb['content']),'parentId':_0x1e343c['id']});break;}case _0x8d4419[_0x153d6d(0x17d)]:{const _0x58e3f6=this[_0x153d6d(0x139)]['getComment'](_0xfefdb2,_0xb4c6c4,_0x52e5eb[_0x153d6d(0x177)]);_0x58e3f6&&_0x58e3f6[_0x153d6d(0x135)]&&this[_0x153d6d(0x139)][_0x153d6d(0x12f)](_0xfefdb2,_0xb4c6c4,_0x52e5eb['replyId']);break;}case _0x8d4419[_0x153d6d(0x109)]:{this[_0x153d6d(0x139)][_0x153d6d(0x118)](_0xfefdb2,_0xb4c6c4,{'commentId':_0x52e5eb['replyId'],'text':JSON['parse'](_0x52e5eb['content'])});break;}case _0x8d4419[_0x153d6d(0x125)]:{const _0x10046c=(_0x52d0df=this[_0x153d6d(0x139)][_0x153d6d(0x128)](_0x52e5eb[_0x153d6d(0x11d)])[_0x153d6d(0x14f)](_0x5f3e51=>_0x5f3e51[_0x153d6d(0x175)]===_0x52e5eb[_0x153d6d(0x175)]))==null?void 0x0:_0x52d0df[_0x153d6d(0x152)];_0x10046c&&this[_0x153d6d(0x139)][_0x153d6d(0x116)](_0xfefdb2,_0xb4c6c4,_0x10046c['id'],_0x52e5eb[_0x153d6d(0x163)]===_0x442e7b[_0x153d6d(0x18b)]);break;}}}));}};_0x150d3a=_0x485b33([_0x40db28(0x0,_0x4c72af[_0x1847fc(0x131)](_0x512cec[_0x1847fc(0x11c)])),_0x40db28(0x1,_0x4c72af['Inject'](_0x1da53d['ThreadCommentModel'])),_0x40db28(0x2,_0x4c72af[_0x1847fc(0x131)](_0x4c72af['UserManagerService'])),_0x40db28(0x3,_0x4c72af['Inject'](_0x4c72af['Injector']))],_0x150d3a);const _0xeb771a=_0x1847fc(0x17e),_0x4ee598={};var _0x1598f5=Object[_0x1847fc(0x171)],_0x34b079=(_0x4e172c,_0x4579e8,_0x955d68,_0x3c7aa3)=>{for(var _0x50bab4=_0x3c7aa3>0x1?void 0x0:_0x3c7aa3?_0x1598f5(_0x4579e8,_0x955d68):_0x4579e8,_0x2e2e05=_0x4e172c['length']-0x1,_0x48a193;_0x2e2e05>=0x0;_0x2e2e05--)(_0x48a193=_0x4e172c[_0x2e2e05])&&(_0x50bab4=_0x48a193(_0x50bab4)||_0x50bab4);return _0x50bab4;},_0x14c14a=(_0x448ed0,_0x5b65a3)=>(_0x5e8eba,_0x41c721)=>_0x5b65a3(_0x5e8eba,_0x41c721,_0x448ed0);function _0x1aedfb(_0x25cd98,_0x4e7acc){const _0x4aff2c=_0x1847fc,_0x4061a8=_0x25cd98[_0x4aff2c(0x18a)][0x0];return{..._0x4e7acc,'id':_0x4061a8['replyId'],'resolved':_0x25cd98[_0x4aff2c(0x163)]===0x1,'dT':_0x3fe7c4(_0x4061a8[_0x4aff2c(0x12b)]),'personId':_0x4061a8['userId'],'threadId':_0x4061a8[_0x4aff2c(0x175)]};}function _0x51f13b(_0x55d49b,_0x1194cd,_0xac9dc2){const _0x491143=_0x1847fc;var _0x43d7b7,_0x5b470d;if(((_0x5b470d=(_0x43d7b7=_0x55d49b==null?void 0x0:_0x55d49b['replies'])==null?void 0x0:_0x43d7b7[_0x491143(0x10d)])!=null?_0x5b470d:0x0)>0x0){const _0xde3788=(_0x52395d,_0x13f96c)=>({'id':_0x52395d[_0x491143(0x177)],'threadId':_0x52395d[_0x491143(0x175)],'dT':_0x3fe7c4(_0x52395d[_0x491143(0x12b)]),'personId':_0x52395d[_0x491143(0x122)],'resolved':_0x55d49b[_0x491143(0x163)]===_0x442e7b['Solved'],'unitId':_0x1194cd,'subUnitId':_0xac9dc2,'text':JSON[_0x491143(0x11e)](_0x52395d[_0x491143(0x11f)]),'parentId':_0x13f96c}),_0x54480a=_0xde3788(_0x55d49b['replies'][0x0]);return{..._0x54480a,'children':_0x55d49b[_0x491143(0x18a)][_0x491143(0x17b)](0x1)[_0x491143(0x143)](_0x3086f7=>_0xde3788(_0x3086f7,_0x54480a['id']))};}return null;}let _0x5e6757=class{constructor(_0x4734a5,_0x162c80,_0x6927c8,_0x4de540){const _0x54296f=_0x1847fc;this[_0x54296f(0x167)]=_0x4734a5,this['_userService']=_0x162c80,this[_0x54296f(0x129)]=_0x6927c8,this[_0x54296f(0x16d)]=_0x4de540;}async['addComment'](_0x48e582){const _0x24e0b7=_0x1847fc;var _0x2140ee,_0x4a0ad8;const {parentId:_0x588d02,unitId:_0x36ac04,text:_0x4d5a89,threadId:_0x468e85}=_0x48e582,_0x2b9b64=(_0x4a0ad8=(_0x2140ee=_0x4d5a89[_0x24e0b7(0x114)])==null?void 0x0:_0x2140ee[_0x24e0b7(0x14c)](_0x4146a7=>_0x4146a7[_0x24e0b7(0x14a)]===_0x4c72af[_0x24e0b7(0x15b)][_0x24e0b7(0x16c)])[_0x24e0b7(0x143)](_0x531b89=>_0x531b89['rangeId']))!=null?_0x4a0ad8:[],_0x286861=JSON[_0x24e0b7(0x10b)](_0x4d5a89),_0x50906d=(await this['_sessionService'][_0x24e0b7(0x148)](_0x36ac04))['getMemberID']();if(_0x588d02){const _0x215eeb={'memberId':_0x50906d,'unitId':_0x36ac04,'content':_0x286861,'mention':_0x2b9b64,'threadId':_0x468e85},_0x5f022d=(await this[_0x24e0b7(0x167)]['post'](_0x24e0b7(0x18d)+_0x36ac04+'/reply',{'body':_0x215eeb}))[_0x24e0b7(0x17c)][_0x24e0b7(0x130)];return{..._0x48e582,'id':_0x5f022d[_0x24e0b7(0x177)],'dT':_0x4c72af[_0x24e0b7(0x140)](+_0x5f022d[_0x24e0b7(0x12b)])[_0x24e0b7(0x185)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5f022d[_0x24e0b7(0x122)]};}else{const _0xd2162b={'memberId':_0x50906d,'unitId':_0x36ac04,'content':_0x286861,'mention':_0x2b9b64},_0xe338d7=await this[_0x24e0b7(0x167)]['post'](_0x24e0b7(0x18d)+_0x36ac04+_0x24e0b7(0x184),{'body':_0xd2162b});return _0x1aedfb(_0xe338d7['body']['comment'],_0x48e582);}}async[_0x1847fc(0x118)](_0xb17a4b){const _0x5d79ee=_0x1847fc;var _0xb16066,_0x246569;const {text:_0x58c22b,unitId:_0x246060}=_0xb17a4b,_0x58f202=(_0x246569=(_0xb16066=_0x58c22b[_0x5d79ee(0x114)])==null?void 0x0:_0xb16066[_0x5d79ee(0x14c)](_0x3fcd8c=>_0x3fcd8c[_0x5d79ee(0x14a)]===_0x4c72af[_0x5d79ee(0x15b)][_0x5d79ee(0x16c)])[_0x5d79ee(0x143)](_0x31b472=>_0x31b472[_0x5d79ee(0x13e)]))!=null?_0x246569:[],_0x86f1f6=JSON[_0x5d79ee(0x10b)](_0x58c22b),_0x5db0e8=_0xb17a4b[_0x5d79ee(0x175)],_0x453faa=_0xb17a4b['id'],_0x505abd={'memberId':(await this[_0x5d79ee(0x129)][_0x5d79ee(0x148)](_0x246060))['getMemberID'](),'unitId':_0x246060,'threadId':_0x5db0e8,'mention':_0x58f202,'content':_0x86f1f6,'replyId':_0x453faa},_0x2e3f16=await this[_0x5d79ee(0x167)][_0x5d79ee(0x161)](_0x5d79ee(0x18d)+_0x246060+_0x5d79ee(0x12d),{'body':_0x505abd});return!_0x2e3f16[_0x5d79ee(0x17c)][_0x5d79ee(0x172)]||_0x2e3f16['body'][_0x5d79ee(0x172)][_0x5d79ee(0x14b)]===0x1;}async['resolveComment'](_0x1ace60){const _0x121e64=_0x1847fc,{unitId:_0x96c17d}=_0x1ace60,_0xbf2954=_0x1ace60[_0x121e64(0x175)],_0x588132={'memberId':this[_0x121e64(0x186)][_0x121e64(0x10f)]()['userID'],'unitId':_0x96c17d,'threadId':_0xbf2954,'solved':_0x1ace60[_0x121e64(0x187)]?_0x442e7b[_0x121e64(0x18b)]:_0x442e7b[_0x121e64(0x15c)]},_0x51535e=await this[_0x121e64(0x167)]['post'](_0x121e64(0x18d)+_0x96c17d+_0x121e64(0x113),{'body':_0x588132});return!_0x51535e['body'][_0x121e64(0x172)]||_0x51535e[_0x121e64(0x17c)]['error'][_0x121e64(0x14b)]===0x1;}async[_0x1847fc(0x12f)](_0x531563,_0x55c173,_0x4a20bc,_0x47d909){const _0x148889=_0x1847fc,_0x290f45={'memberId':(await this[_0x148889(0x129)][_0x148889(0x148)](_0x531563))['getMemberID'](),'threadId':_0x4a20bc,'replyId':_0x47d909,'unitId':_0x531563},_0x2c0457=await this[_0x148889(0x167)][_0x148889(0x161)](_0x148889(0x18d)+_0x531563+'/delete',{'body':_0x290f45});return!_0x2c0457[_0x148889(0x17c)][_0x148889(0x172)]||_0x2c0457[_0x148889(0x17c)]['error'][_0x148889(0x14b)]===0x1;}async[_0x1847fc(0x179)](_0x392ae5,_0x5b95cb,_0x4ee0e9){const _0x5e9868=_0x1847fc,_0x156c04={'unitId':_0x392ae5,'threadId':_0x4ee0e9},_0xbcef20=await this[_0x5e9868(0x167)][_0x5e9868(0x161)](_0x5e9868(0x18d)+_0x392ae5+_0x5e9868(0x153),{'body':_0x156c04}),_0x3be057=_0x4ee0e9[_0x5e9868(0x143)](_0x3eb41a=>_0x51f13b(_0xbcef20[_0x5e9868(0x17c)][_0x5e9868(0x10c)][_0x3eb41a],_0x392ae5,_0x5b95cb))[_0x5e9868(0x14c)](Boolean);return Object['values'](_0xbcef20['body'][_0x5e9868(0x145)])[_0x5e9868(0x165)](_0x2e36c1=>{const _0x2ce171=_0x5e9868;this[_0x2ce171(0x186)]['addUser'](_0x2e36c1);}),_0x3be057;}[_0x1847fc(0x11a)](_0x429c56){const _0x8f0400=_0x1847fc;return{'id':_0x429c56['id'],'threadId':_0x429c56[_0x8f0400(0x175)],'ref':_0x429c56['ref']};}};_0x5e6757=_0x34b079([_0x14c14a(0x0,_0x4c72af[_0x1847fc(0x131)](_0x1534ea[_0x1847fc(0x18e)])),_0x14c14a(0x1,_0x4c72af['Inject'](_0x4c72af['UserManagerService'])),_0x14c14a(0x2,_0x4c72af[_0x1847fc(0x131)](_0x512cec[_0x1847fc(0x182)])),_0x14c14a(0x3,_0x4c72af[_0x1847fc(0x131)](_0x4c72af[_0x1847fc(0x162)]))],_0x5e6757);var _0x30e7a7=Object[_0x1847fc(0x171)],_0x36aed0=(_0x3175c5,_0x376bb3,_0x396726,_0x5e173c)=>{const _0x2588d8=_0x1847fc;for(var _0x8e0f73=_0x5e173c>0x1?void 0x0:_0x5e173c?_0x30e7a7(_0x376bb3,_0x396726):_0x376bb3,_0x3bf99b=_0x3175c5[_0x2588d8(0x10d)]-0x1,_0x1d7301;_0x3bf99b>=0x0;_0x3bf99b--)(_0x1d7301=_0x3175c5[_0x3bf99b])&&(_0x8e0f73=_0x1d7301(_0x8e0f73)||_0x8e0f73);return _0x8e0f73;},_0x51356c=(_0x497ee7,_0x1ec94b)=>(_0x4eb1ba,_0x143a98)=>_0x1ec94b(_0x4eb1ba,_0x143a98,_0x497ee7);let _0x52b74f=class extends _0x4c72af['Disposable']{constructor(_0x41a224,_0x23f86f){const _0x4c7efd=_0x1847fc;super(),this[_0x4c7efd(0x112)]=_0x41a224,this['_threadCommentDataSource']=_0x23f86f,this[_0x4c7efd(0x141)]();}['_initDataSource'](){const _0x4f5ea4=_0x1847fc;this[_0x4f5ea4(0x112)][_0x4f5ea4(0x115)]=this[_0x4f5ea4(0x181)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x52b74f=_0x36aed0([_0x51356c(0x0,_0x1da53d[_0x1847fc(0x180)]),_0x51356c(0x1,_0x4c72af[_0x1847fc(0x131)](_0x5e6757))],_0x52b74f);var _0x4ffa55=Object[_0x1847fc(0x136)],_0x51772b=Object[_0x1847fc(0x171)],_0x55355c=(_0x406e9c,_0x14ff2d,_0x413086)=>_0x14ff2d in _0x406e9c?_0x4ffa55(_0x406e9c,_0x14ff2d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x413086}):_0x406e9c[_0x14ff2d]=_0x413086,_0x55e57c=(_0x5a83fe,_0x466c18,_0x4a5ffc,_0x324fd3)=>{const _0x37d09c=_0x1847fc;for(var _0x39a988=_0x324fd3>0x1?void 0x0:_0x324fd3?_0x51772b(_0x466c18,_0x4a5ffc):_0x466c18,_0x103492=_0x5a83fe[_0x37d09c(0x10d)]-0x1,_0x139fa8;_0x103492>=0x0;_0x103492--)(_0x139fa8=_0x5a83fe[_0x103492])&&(_0x39a988=_0x139fa8(_0x39a988)||_0x39a988);return _0x39a988;},_0x327c18=(_0x27f42d,_0x5d3d83)=>(_0x4c4f8a,_0x37f684)=>_0x5d3d83(_0x4c4f8a,_0x37f684,_0x27f42d),_0xb69d95=(_0x2e8198,_0x5ee923,_0x24e38b)=>_0x55355c(_0x2e8198,typeof _0x5ee923!=_0x1847fc(0x16f)?_0x5ee923+'':_0x5ee923,_0x24e38b);_0x208d67['UniverThreadCommentDataSourcePlugin']=class extends _0x4c72af[_0x1847fc(0x121)]{constructor(_0x1b7c58=_0x4ee598,_0xac8e65,_0x1714bc){const _0x26c048=_0x1847fc;super(),this[_0x26c048(0x176)]=_0x1b7c58,this[_0x26c048(0x16d)]=_0xac8e65,this[_0x26c048(0x110)]=_0x1714bc;const {..._0x2f1e7a}=_0x4c72af[_0x26c048(0x15e)]({},_0x4ee598,this[_0x26c048(0x176)]);this['_configService'][_0x26c048(0x133)](_0xeb771a,_0x2f1e7a);}[_0x1847fc(0x17a)](){const _0xf2d03=_0x1847fc;[[_0x5e6757],[_0x52b74f],[_0x150d3a]][_0xf2d03(0x165)](_0x1f30b7=>{this['_injector']['add'](_0x1f30b7);});}['onReady'](){const _0x339513=_0x1847fc;this[_0x339513(0x16d)]['get'](_0x52b74f),this['_injector']['get'](_0x150d3a);}},_0xb69d95(_0x208d67[_0x1847fc(0x124)],_0x1847fc(0x16e),_0x525e6e),_0xb69d95(_0x208d67[_0x1847fc(0x124)],'type',_0x4c72af[_0x1847fc(0x155)][_0x1847fc(0x151)]),_0x208d67['UniverThreadCommentDataSourcePlugin']=_0x55e57c([_0x4c72af[_0x1847fc(0x134)](_0x768b18[_0x1847fc(0x132)],_0x512cec[_0x1847fc(0x15d)],_0x116b22[_0x1847fc(0x138)]),_0x327c18(0x1,_0x4c72af[_0x1847fc(0x131)](_0x4c72af[_0x1847fc(0x162)])),_0x327c18(0x2,_0x4c72af[_0x1847fc(0x147)])],_0x208d67[_0x1847fc(0x124)]),Object[_0x1847fc(0x136)](_0x208d67,Symbol['toStringTag'],{'value':'Module'});}));
|
|
1
|
+
(function(_0xb520d2,_0xd688d9){const _0x24b211=_0x1f47,_0x291b0c=_0xb520d2();while(!![]){try{const _0x54edaa=-parseInt(_0x24b211(0x1b2))/0x1*(parseInt(_0x24b211(0x1da))/0x2)+-parseInt(_0x24b211(0x177))/0x3*(parseInt(_0x24b211(0x1a7))/0x4)+parseInt(_0x24b211(0x170))/0x5*(parseInt(_0x24b211(0x1a9))/0x6)+parseInt(_0x24b211(0x17c))/0x7*(-parseInt(_0x24b211(0x188))/0x8)+parseInt(_0x24b211(0x185))/0x9*(parseInt(_0x24b211(0x1d6))/0xa)+parseInt(_0x24b211(0x17a))/0xb+-parseInt(_0x24b211(0x1cc))/0xc*(-parseInt(_0x24b211(0x190))/0xd);if(_0x54edaa===_0xd688d9)break;else _0x291b0c['push'](_0x291b0c['shift']());}catch(_0x34bf3e){_0x291b0c['push'](_0x291b0c['shift']());}}}(_0x4a3b,0x3fec0),function(_0x33de4d,_0x340c14){const _0x11a207=_0x1f47;typeof exports==_0x11a207(0x168)&&typeof module<'u'?_0x340c14(exports,require(_0x11a207(0x175)),require(_0x11a207(0x1c8)),require('@univerjs/core'),require(_0x11a207(0x1ba)),require('@univerjs/thread-comment'),require(_0x11a207(0x193)),require(_0x11a207(0x1aa))):typeof define=='function'&&define[_0x11a207(0x1c2)]?define([_0x11a207(0x197),_0x11a207(0x175),'@univerjs-pro/license',_0x11a207(0x195),'@univerjs/thread-comment-ui','@univerjs/thread-comment','rxjs',_0x11a207(0x1aa)],_0x340c14):(_0x33de4d=typeof globalThis<'u'?globalThis:_0x33de4d||self,_0x340c14(_0x33de4d['UniverProThreadCommentDatasource']={},_0x33de4d[_0x11a207(0x1c4)],_0x33de4d['UniverProLicense'],_0x33de4d['UniverCore'],_0x33de4d[_0x11a207(0x167)],_0x33de4d['UniverThreadComment'],_0x33de4d[_0x11a207(0x193)],_0x33de4d['UniverNetwork']));}(this,function(_0x2f5869,_0x1964b2,_0x2356c0,_0x4ecff4,_0x392893,_0x223cf2,_0x170bcb,_0x5071d1){'use strict';const _0x1565f7=_0x1f47;const _0x577ec7=_0x1565f7(0x16c);var _0x4bf784=(_0x4a8aa0=>(_0x4a8aa0[_0x4a8aa0['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x4a8aa0[_0x4a8aa0[_0x1565f7(0x1d9)]=0x1]=_0x1565f7(0x1d9),_0x4a8aa0[_0x4a8aa0[_0x1565f7(0x1ad)]=-0x1]=_0x1565f7(0x1ad),_0x4a8aa0))(_0x4bf784||{}),_0x532eb8=(_0x58e9f6=>(_0x58e9f6[_0x58e9f6[_0x1565f7(0x1e9)]=0x0]=_0x1565f7(0x1e9),_0x58e9f6[_0x58e9f6['Add']=0x1]=_0x1565f7(0x1d5),_0x58e9f6[_0x58e9f6[_0x1565f7(0x19b)]=0x2]=_0x1565f7(0x19b),_0x58e9f6[_0x58e9f6[_0x1565f7(0x16b)]=0x3]=_0x1565f7(0x16b),_0x58e9f6[_0x58e9f6[_0x1565f7(0x182)]=0x4]='Delete',_0x58e9f6[_0x58e9f6[_0x1565f7(0x1cb)]=0x5]=_0x1565f7(0x1cb),_0x58e9f6[_0x58e9f6['UNRECOGNIZED']=-0x1]=_0x1565f7(0x1ad),_0x58e9f6))(_0x532eb8||{});const _0x7c2e05=_0x3285ae=>_0x4ecff4['dayjs'](new Date(+_0x3285ae))[_0x1565f7(0x17f)](_0x1565f7(0x1ec)),_0x5d1307=async(_0x398a5d,_0x5f2bb7)=>{const _0x1c00b9=_0x1565f7,_0x365795=_0x398a5d[_0x1c00b9(0x163)](_0x4ecff4[_0x1c00b9(0x173)]),_0x4c42dd=_0x398a5d[_0x1c00b9(0x163)](_0x5071d1[_0x1c00b9(0x1a0)]);_0x5f2bb7[_0x1c00b9(0x1bd)](_0x1a39d3=>{const _0x17c5f0=_0x1c00b9;_0x365795[_0x17c5f0(0x199)](_0x1a39d3)&&_0x5f2bb7[_0x17c5f0(0x1c6)](_0x1a39d3);}),_0x5f2bb7[_0x1c00b9(0x166)]&&(await _0x4c42dd[_0x1c00b9(0x163)](_0x1c00b9(0x1e5),{'params':{'userIDs':[..._0x5f2bb7]}}))[_0x1c00b9(0x1d4)][_0x1c00b9(0x1c5)][_0x1c00b9(0x1bd)](_0x533de4=>{_0x533de4&&_0x365795['addUser'](_0x533de4);});};var _0x1f3567=Object['getOwnPropertyDescriptor'],_0x48368a=(_0x1af139,_0x5216b2,_0x47a5ea,_0x3e747a)=>{for(var _0x321e93=_0x3e747a>0x1?void 0x0:_0x3e747a?_0x1f3567(_0x5216b2,_0x47a5ea):_0x5216b2,_0x3576c2=_0x1af139['length']-0x1,_0x4b43ce;_0x3576c2>=0x0;_0x3576c2--)(_0x4b43ce=_0x1af139[_0x3576c2])&&(_0x321e93=_0x4b43ce(_0x321e93)||_0x321e93);return _0x321e93;},_0x2d7630=(_0x426114,_0x577956)=>(_0x411ae3,_0x13ef2d)=>_0x577956(_0x411ae3,_0x13ef2d,_0x426114);let _0x22d035=class extends _0x4ecff4[_0x1565f7(0x1bc)]{constructor(_0x21e631,_0x5c46da,_0x1e17cf,_0x5ef412){const _0x5dfd2f=_0x1565f7;super(),this[_0x5dfd2f(0x1eb)]=_0x21e631,this[_0x5dfd2f(0x1ce)]=_0x5c46da,this[_0x5dfd2f(0x1ab)]=_0x1e17cf,this[_0x5dfd2f(0x19a)]=_0x5ef412,this[_0x5dfd2f(0x178)](),this[_0x5dfd2f(0x1b3)]();}[_0x1565f7(0x1b3)](){const _0x3d296a=_0x1565f7;this[_0x3d296a(0x189)](this['_threadCommentModel'][_0x3d296a(0x184)][_0x3d296a(0x1db)](_0x170bcb[_0x3d296a(0x1ae)](0x10))[_0x3d296a(0x1b5)](_0x1a4497=>{const _0x58ee65=_0x3d296a,_0x2a7346=new Set();_0x1a4497[_0x58ee65(0x1bd)](_0x149438=>{const _0x1cb2a3=_0x58ee65;switch(_0x149438['type']){case'add':{const _0x1861e5=_0x149438[_0x1cb2a3(0x18e)][_0x1cb2a3(0x186)];_0x2a7346[_0x1cb2a3(0x169)](_0x1861e5);break;}}}),_0x5d1307(this[_0x58ee65(0x19a)],_0x2a7346);}));}['_init'](){const _0x32e36b=_0x1565f7;this[_0x32e36b(0x189)](this['_commentService'][_0x32e36b(0x184)][_0x32e36b(0x1b5)](async _0x1b5d9a=>{const _0x30e761=_0x32e36b;var _0x1c0ea2,_0x1f50c0,_0x1840d3,_0x45e24c;const _0x5e0d2d=(_0x1c0ea2=this[_0x30e761(0x1ce)]['getUnit'](_0x1b5d9a[_0x30e761(0x183)])[_0x30e761(0x1ca)](_0x436048=>_0x436048[_0x30e761(0x1a3)]===_0x1b5d9a[_0x30e761(0x1a3)]))==null?void 0x0:_0x1c0ea2[_0x30e761(0x18c)];if(!_0x5e0d2d)return;const {unitId:_0x4a36f7,subUnitId:_0x4c66fd}=_0x5e0d2d;switch(_0x1b5d9a[_0x30e761(0x19e)]&&this[_0x30e761(0x1ab)]['addUser'](_0x1b5d9a[_0x30e761(0x19e)]),_0x1b5d9a[_0x30e761(0x1c3)]){case _0x532eb8[_0x30e761(0x1d5)]:break;case _0x532eb8[_0x30e761(0x19b)]:{this[_0x30e761(0x1ce)][_0x30e761(0x198)](_0x4a36f7,_0x4c66fd,{'unitId':_0x4a36f7,'subUnitId':_0x4c66fd,'ref':'','id':_0x1b5d9a[_0x30e761(0x1bb)],'dT':_0x7c2e05(+_0x1b5d9a[_0x30e761(0x1ac)]),'threadId':_0x1b5d9a[_0x30e761(0x1a3)],'personId':(_0x1840d3=(_0x1f50c0=_0x1b5d9a[_0x30e761(0x19e)])==null?void 0x0:_0x1f50c0[_0x30e761(0x1bf)])!=null?_0x1840d3:_0x1b5d9a[_0x30e761(0x16d)],'text':JSON['parse'](_0x1b5d9a['content']),'parentId':_0x5e0d2d['id']});break;}case _0x532eb8[_0x30e761(0x182)]:{const _0x4507d1=this[_0x30e761(0x1ce)][_0x30e761(0x164)](_0x4a36f7,_0x4c66fd,_0x1b5d9a['replyId']);_0x4507d1&&_0x4507d1[_0x30e761(0x187)]&&this[_0x30e761(0x1ce)][_0x30e761(0x1d0)](_0x4a36f7,_0x4c66fd,_0x1b5d9a[_0x30e761(0x1bb)]);break;}case _0x532eb8['Edit']:{this[_0x30e761(0x1ce)][_0x30e761(0x17d)](_0x4a36f7,_0x4c66fd,{'commentId':_0x1b5d9a[_0x30e761(0x1bb)],'text':JSON['parse'](_0x1b5d9a['content'])});break;}case _0x532eb8[_0x30e761(0x1cb)]:{const _0x54c31e=(_0x45e24c=this[_0x30e761(0x1ce)]['getUnit'](_0x1b5d9a['unitId'])[_0x30e761(0x1ca)](_0x5ec8a2=>_0x5ec8a2[_0x30e761(0x1a3)]===_0x1b5d9a[_0x30e761(0x1a3)]))==null?void 0x0:_0x45e24c[_0x30e761(0x18c)];_0x54c31e&&this['_threadCommentModel'][_0x30e761(0x194)](_0x4a36f7,_0x4c66fd,_0x54c31e['id'],_0x1b5d9a[_0x30e761(0x18a)]===_0x4bf784['Solved']);break;}}}));}};_0x22d035=_0x48368a([_0x2d7630(0x0,_0x4ecff4[_0x1565f7(0x17e)](_0x1964b2['CommentService'])),_0x2d7630(0x1,_0x4ecff4[_0x1565f7(0x17e)](_0x223cf2[_0x1565f7(0x165)])),_0x2d7630(0x2,_0x4ecff4['Inject'](_0x4ecff4['UserManagerService'])),_0x2d7630(0x3,_0x4ecff4[_0x1565f7(0x17e)](_0x4ecff4['Injector']))],_0x22d035);const _0x36e886='thread-comment-data-source.config',_0x2e8f12={};var _0x847824=Object[_0x1565f7(0x1b8)],_0x3a377e=(_0x1dcf84,_0x32971d,_0x1d3118,_0x328b5b)=>{const _0x4eb1cb=_0x1565f7;for(var _0x12bbdb=_0x328b5b>0x1?void 0x0:_0x328b5b?_0x847824(_0x32971d,_0x1d3118):_0x32971d,_0x50aa27=_0x1dcf84[_0x4eb1cb(0x176)]-0x1,_0x5a64eb;_0x50aa27>=0x0;_0x50aa27--)(_0x5a64eb=_0x1dcf84[_0x50aa27])&&(_0x12bbdb=_0x5a64eb(_0x12bbdb)||_0x12bbdb);return _0x12bbdb;},_0x2bdfc5=(_0x2d17e0,_0x11b3d0)=>(_0x3595a3,_0x2a1778)=>_0x11b3d0(_0x3595a3,_0x2a1778,_0x2d17e0);function _0x36cda4(_0x2f63ae,_0x2d2c32){const _0x5aa780=_0x1565f7,_0x2ea3e6=_0x2f63ae['replies'][0x0];return{..._0x2d2c32,'id':_0x2ea3e6[_0x5aa780(0x1bb)],'resolved':_0x2f63ae[_0x5aa780(0x18a)]===0x1,'dT':_0x7c2e05(_0x2ea3e6['createTimestamp']),'personId':_0x2ea3e6[_0x5aa780(0x16d)],'threadId':_0x2ea3e6[_0x5aa780(0x1a3)]};}function _0x2b555f(_0x3af6c7,_0x5a744a,_0x564665){const _0xf15fcd=_0x1565f7;var _0x417bcd,_0x51cbaa;if(((_0x51cbaa=(_0x417bcd=_0x3af6c7==null?void 0x0:_0x3af6c7[_0xf15fcd(0x174)])==null?void 0x0:_0x417bcd[_0xf15fcd(0x176)])!=null?_0x51cbaa:0x0)>0x0){const _0x263106=(_0x43f653,_0x45b493)=>({'id':_0x43f653['replyId'],'threadId':_0x43f653[_0xf15fcd(0x1a3)],'dT':_0x7c2e05(_0x43f653['createTimestamp']),'personId':_0x43f653[_0xf15fcd(0x16d)],'resolved':_0x3af6c7[_0xf15fcd(0x18a)]===_0x4bf784[_0xf15fcd(0x1d9)],'unitId':_0x5a744a,'subUnitId':_0x564665,'text':JSON[_0xf15fcd(0x1dc)](_0x43f653[_0xf15fcd(0x16a)]),'parentId':_0x45b493}),_0x4b2a26=_0x263106(_0x3af6c7[_0xf15fcd(0x174)][0x0]);return{..._0x4b2a26,'children':_0x3af6c7[_0xf15fcd(0x174)][_0xf15fcd(0x1a8)](0x1)['map'](_0x50b9ce=>_0x263106(_0x50b9ce,_0x4b2a26['id']))};}return null;}let _0x3123b7=class{constructor(_0x2bfba8,_0x48b265,_0x28989c,_0x140840){const _0x19fbe8=_0x1565f7;this[_0x19fbe8(0x1b6)]=_0x2bfba8,this[_0x19fbe8(0x1ab)]=_0x48b265,this[_0x19fbe8(0x16e)]=_0x28989c,this[_0x19fbe8(0x19a)]=_0x140840;}async[_0x1565f7(0x198)](_0x4d53ea){const _0xecf319=_0x1565f7;var _0x1893c7,_0x557973;const {parentId:_0x38ece6,unitId:_0x2127c1,text:_0x547914,threadId:_0x286b80}=_0x4d53ea,_0x18cf56=(_0x557973=(_0x1893c7=_0x547914['customRanges'])==null?void 0x0:_0x1893c7[_0xecf319(0x1cf)](_0x45cc02=>_0x45cc02['rangeType']===_0x4ecff4[_0xecf319(0x16f)][_0xecf319(0x18f)])['map'](_0x4f6253=>_0x4f6253[_0xecf319(0x1a6)]))!=null?_0x557973:[],_0x4f4f7d=JSON[_0xecf319(0x181)](_0x547914),_0x23326d=(await this['_sessionService'][_0xecf319(0x192)](_0x2127c1))['getMemberID']();if(_0x38ece6){const _0x193e40={'memberId':_0x23326d,'unitId':_0x2127c1,'content':_0x4f4f7d,'mention':_0x18cf56,'threadId':_0x286b80},_0x5b2552=(await this[_0xecf319(0x1b6)]['post'](_0xecf319(0x1e1)+_0x2127c1+_0xecf319(0x161),{'body':_0x193e40}))[_0xecf319(0x1d4)][_0xecf319(0x162)];return{..._0x4d53ea,'id':_0x5b2552[_0xecf319(0x1bb)],'dT':_0x4ecff4[_0xecf319(0x1c0)](+_0x5b2552[_0xecf319(0x1ac)])['format'](_0xecf319(0x1ec)),'personId':_0x5b2552[_0xecf319(0x16d)]};}else{const _0x27f0b5={'memberId':_0x23326d,'unitId':_0x2127c1,'content':_0x4f4f7d,'mention':_0x18cf56},_0xf1aab9=await this[_0xecf319(0x1b6)][_0xecf319(0x1d8)]('/universer-api/comment/unit/'+_0x2127c1+_0xecf319(0x19f),{'body':_0x27f0b5});return _0x36cda4(_0xf1aab9['body'][_0xecf319(0x1a2)],_0x4d53ea);}}async[_0x1565f7(0x17d)](_0x55519f){const _0x401c59=_0x1565f7;var _0x3f4e93,_0x43225f;const {text:_0x3d87b6,unitId:_0x530de5}=_0x55519f,_0x470201=(_0x43225f=(_0x3f4e93=_0x3d87b6[_0x401c59(0x179)])==null?void 0x0:_0x3f4e93[_0x401c59(0x1cf)](_0x27f9ba=>_0x27f9ba[_0x401c59(0x1e8)]===_0x4ecff4['CustomRangeType'][_0x401c59(0x18f)])[_0x401c59(0x18d)](_0x3236fa=>_0x3236fa[_0x401c59(0x1a6)]))!=null?_0x43225f:[],_0xced78=JSON[_0x401c59(0x181)](_0x3d87b6),_0x4001ff=_0x55519f[_0x401c59(0x1a3)],_0x392105=_0x55519f['id'],_0xc61612={'memberId':(await this['_sessionService']['requireSession'](_0x530de5))[_0x401c59(0x19c)](),'unitId':_0x530de5,'threadId':_0x4001ff,'mention':_0x470201,'content':_0xced78,'replyId':_0x392105},_0x5b1fd5=await this[_0x401c59(0x1b6)][_0x401c59(0x1d8)]('/universer-api/comment/unit/'+_0x530de5+_0x401c59(0x171),{'body':_0xc61612});return!_0x5b1fd5[_0x401c59(0x1d4)][_0x401c59(0x1a5)]||_0x5b1fd5[_0x401c59(0x1d4)]['error'][_0x401c59(0x180)]===0x1;}async['resolveComment'](_0xebf8e){const _0x4ed956=_0x1565f7,{unitId:_0x2a93f6}=_0xebf8e,_0x11ec66=_0xebf8e['threadId'],_0xc3cb5c={'memberId':this[_0x4ed956(0x1ab)][_0x4ed956(0x191)]()[_0x4ed956(0x1bf)],'unitId':_0x2a93f6,'threadId':_0x11ec66,'solved':_0xebf8e[_0x4ed956(0x1b7)]?_0x4bf784['Solved']:_0x4bf784[_0x4ed956(0x18b)]},_0x470aa9=await this[_0x4ed956(0x1b6)][_0x4ed956(0x1d8)](_0x4ed956(0x1e1)+_0x2a93f6+_0x4ed956(0x1e7),{'body':_0xc3cb5c});return!_0x470aa9[_0x4ed956(0x1d4)]['error']||_0x470aa9[_0x4ed956(0x1d4)][_0x4ed956(0x1a5)][_0x4ed956(0x180)]===0x1;}async['deleteComment'](_0x10db93,_0x2b6a62,_0x3c5b18,_0x4e58c5){const _0x570acb=_0x1565f7,_0x2bb34b={'memberId':(await this[_0x570acb(0x16e)][_0x570acb(0x192)](_0x10db93))[_0x570acb(0x19c)](),'threadId':_0x3c5b18,'replyId':_0x4e58c5,'unitId':_0x10db93},_0x3c0787=await this[_0x570acb(0x1b6)][_0x570acb(0x1d8)]('/universer-api/comment/unit/'+_0x10db93+_0x570acb(0x1b4),{'body':_0x2bb34b});return!_0x3c0787[_0x570acb(0x1d4)][_0x570acb(0x1a5)]||_0x3c0787[_0x570acb(0x1d4)]['error'][_0x570acb(0x180)]===0x1;}async[_0x1565f7(0x1d7)](_0x3e0893,_0xdfafd7,_0x3eaf12){const _0xf17b9a=_0x1565f7,_0x54cff3={'unitId':_0x3e0893,'threadId':_0x3eaf12},_0x1249c2=await this[_0xf17b9a(0x1b6)][_0xf17b9a(0x1d8)](_0xf17b9a(0x1e1)+_0x3e0893+_0xf17b9a(0x1e2),{'body':_0x54cff3}),_0x5c0a0e=_0x3eaf12['map'](_0x2606c2=>_0x2b555f(_0x1249c2[_0xf17b9a(0x1d4)]['comments'][_0x2606c2],_0x3e0893,_0xdfafd7))['filter'](Boolean);return Object['values'](_0x1249c2[_0xf17b9a(0x1d4)]['users'])[_0xf17b9a(0x1bd)](_0x5ded80=>{const _0x4b874b=_0xf17b9a;this[_0x4b874b(0x1ab)][_0x4b874b(0x1df)](_0x5ded80);}),_0x5c0a0e;}['saveCommentToSnapshot'](_0x1a5074){const _0x58e8a4=_0x1565f7;return{'id':_0x1a5074['id'],'threadId':_0x1a5074[_0x58e8a4(0x1a3)],'ref':_0x1a5074[_0x58e8a4(0x1e3)]};}};_0x3123b7=_0x3a377e([_0x2bdfc5(0x0,_0x4ecff4[_0x1565f7(0x17e)](_0x5071d1['HTTPService'])),_0x2bdfc5(0x1,_0x4ecff4[_0x1565f7(0x17e)](_0x4ecff4['UserManagerService'])),_0x2bdfc5(0x2,_0x4ecff4['Inject'](_0x1964b2[_0x1565f7(0x1dd)])),_0x2bdfc5(0x3,_0x4ecff4[_0x1565f7(0x17e)](_0x4ecff4[_0x1565f7(0x1d1)]))],_0x3123b7);var _0x34817e=Object[_0x1565f7(0x1b8)],_0x5219a3=(_0x29bbc5,_0x357171,_0x5ca252,_0x54c407)=>{const _0x34047=_0x1565f7;for(var _0xb7a9de=_0x54c407>0x1?void 0x0:_0x54c407?_0x34817e(_0x357171,_0x5ca252):_0x357171,_0x4fcfcb=_0x29bbc5[_0x34047(0x176)]-0x1,_0x4d4e19;_0x4fcfcb>=0x0;_0x4fcfcb--)(_0x4d4e19=_0x29bbc5[_0x4fcfcb])&&(_0xb7a9de=_0x4d4e19(_0xb7a9de)||_0xb7a9de);return _0xb7a9de;},_0x16a223=(_0x183c3d,_0x40b296)=>(_0x5da1f7,_0x561c0f)=>_0x40b296(_0x5da1f7,_0x561c0f,_0x183c3d);let _0x28da2a=class extends _0x4ecff4[_0x1565f7(0x1bc)]{constructor(_0x36a8c7,_0x19cdd8){const _0x5cc775=_0x1565f7;super(),this[_0x5cc775(0x1a1)]=_0x36a8c7,this[_0x5cc775(0x1c9)]=_0x19cdd8,this['_initDataSource']();}[_0x1565f7(0x1c1)](){const _0x469df5=_0x1565f7;this[_0x469df5(0x1a1)][_0x469df5(0x1a4)]=this[_0x469df5(0x1c9)],this['_threadCommentDataSourceService'][_0x469df5(0x1d2)]=!0x1;}};_0x28da2a=_0x5219a3([_0x16a223(0x0,_0x223cf2['IThreadCommentDataSourceService']),_0x16a223(0x1,_0x4ecff4[_0x1565f7(0x17e)](_0x3123b7))],_0x28da2a);var _0x2c5d99=Object[_0x1565f7(0x172)],_0x14fd11=Object['getOwnPropertyDescriptor'],_0x27ea05=(_0x463728,_0x1e7ebd,_0x1a7353)=>_0x1e7ebd in _0x463728?_0x2c5d99(_0x463728,_0x1e7ebd,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1a7353}):_0x463728[_0x1e7ebd]=_0x1a7353,_0x1ba6b4=(_0x5d9495,_0x3e726a,_0x101750,_0x5e31fa)=>{const _0x4cfcfd=_0x1565f7;for(var _0x4bfdb9=_0x5e31fa>0x1?void 0x0:_0x5e31fa?_0x14fd11(_0x3e726a,_0x101750):_0x3e726a,_0x3e5982=_0x5d9495[_0x4cfcfd(0x176)]-0x1,_0x21298f;_0x3e5982>=0x0;_0x3e5982--)(_0x21298f=_0x5d9495[_0x3e5982])&&(_0x4bfdb9=_0x21298f(_0x4bfdb9)||_0x4bfdb9);return _0x4bfdb9;},_0x4a63be=(_0x3c6f76,_0x379ad4)=>(_0x40640a,_0x14700c)=>_0x379ad4(_0x40640a,_0x14700c,_0x3c6f76),_0x8efde3=(_0x41e6df,_0x5e84e4,_0x51f6be)=>_0x27ea05(_0x41e6df,typeof _0x5e84e4!=_0x1565f7(0x1b1)?_0x5e84e4+'':_0x5e84e4,_0x51f6be);_0x2f5869['UniverThreadCommentDataSourcePlugin']=class extends _0x4ecff4[_0x1565f7(0x1cd)]{constructor(_0x4281af=_0x2e8f12,_0x460c90,_0x50dba1){const _0x2b02c6=_0x1565f7;super(),this[_0x2b02c6(0x1ea)]=_0x4281af,this[_0x2b02c6(0x19a)]=_0x460c90,this[_0x2b02c6(0x1d3)]=_0x50dba1;const {..._0x1377bc}=_0x4ecff4[_0x2b02c6(0x17b)]({},_0x2e8f12,this[_0x2b02c6(0x1ea)]);this[_0x2b02c6(0x1d3)]['setConfig'](_0x36e886,_0x1377bc);}[_0x1565f7(0x1c7)](){[[_0x3123b7],[_0x28da2a],[_0x22d035]]['forEach'](_0x53e0b9=>{const _0x3a885f=_0x1f47;this[_0x3a885f(0x19a)][_0x3a885f(0x169)](_0x53e0b9);});}['onReady'](){const _0x154628=_0x1565f7;this[_0x154628(0x19a)][_0x154628(0x163)](_0x28da2a),this[_0x154628(0x19a)][_0x154628(0x163)](_0x22d035);}},_0x8efde3(_0x2f5869[_0x1565f7(0x1b0)],'pluginName',_0x577ec7),_0x8efde3(_0x2f5869[_0x1565f7(0x1b0)],'type',_0x4ecff4[_0x1565f7(0x196)][_0x1565f7(0x1b9)]),_0x2f5869[_0x1565f7(0x1b0)]=_0x1ba6b4([_0x4ecff4[_0x1565f7(0x1af)](_0x392893[_0x1565f7(0x1de)],_0x1964b2[_0x1565f7(0x1e6)],_0x2356c0[_0x1565f7(0x1e4)]),_0x4a63be(0x1,_0x4ecff4[_0x1565f7(0x17e)](_0x4ecff4[_0x1565f7(0x1d1)])),_0x4a63be(0x2,_0x4ecff4[_0x1565f7(0x1e0)])],_0x2f5869[_0x1565f7(0x1b0)]),Object['defineProperty'](_0x2f5869,Symbol[_0x1565f7(0x19d)],{'value':_0x1565f7(0x1be)});}));function _0x1f47(_0x20a5a5,_0x2a1ee2){const _0x4a3bf6=_0x4a3b();return _0x1f47=function(_0x1f473d,_0x335606){_0x1f473d=_0x1f473d-0x161;let _0x4fa57a=_0x4a3bf6[_0x1f473d];return _0x4fa57a;},_0x1f47(_0x20a5a5,_0x2a1ee2);}function _0x4a3b(){const _0x3f0f7f=['users','delete','onStarting','@univerjs-pro/license','_threadCommentDataSource','find','Solve','60vnaIMm','Plugin','_threadCommentModel','filter','deleteComment','Injector','syncUpdateMutationToColla','_configService','body','Add','10sPPmUr','listComments','post','Solved','58274FOUwXn','pipe','parse','CollaborationSessionService','UniverThreadCommentUIPlugin','addUser','IConfigService','/universer-api/comment/unit/','/list','ref','UniverLicensePlugin','/universer-api/user/list','UniverCollaborationClientPlugin','/solved','rangeType','Unknown','_config','_commentService','YYYY/MM/DD\x20HH:mm','/reply','reply','get','getComment','ThreadCommentModel','size','UniverThreadCommentUi','object','add','content','Edit','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','userId','_sessionService','CustomRangeType','2395bXnbuJ','/edit','defineProperty','UserManagerService','replies','@univerjs-pro/collaboration-client','length','434640osFCnB','_init','customRanges','4707549yxvdIp','merge','6251iudBiM','updateComment','Inject','format','code','stringify','Delete','unitId','commentUpdate$','1824777DFXsQw','personId','parentId','1912zGYjYY','disposeWithMe','solved','OpenOrReOpen','root','map','payload','COMMENT','1073293SDIWGE','getCurrentUser','requireSession','rxjs','resolveComment','@univerjs/core','UniverInstanceType','exports','addComment','getUser','_injector','Reply','getMemberID','toStringTag','user','/add','HTTPService','_threadCommentDataSourceService','comment','threadId','dataSource','error','rangeId','8LUoDsI','slice','1986NZSfrq','@univerjs/network','_userService','createTimestamp','UNRECOGNIZED','bufferTime','DependentOn','UniverThreadCommentDataSourcePlugin','symbol','15AHhEXM','_initUserSync','/delete','subscribe','_httpService','resolved','getOwnPropertyDescriptor','UNIVER_UNKNOWN','@univerjs/thread-comment-ui','replyId','Disposable','forEach','Module','userID','dayjs','_initDataSource','amd','type','UniverProCollaborationClient'];_0x4a3b=function(){return _0x3f0f7f;};return _0x4a3b();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.6.
|
|
49
|
-
"@univerjs/core": "0.6.
|
|
50
|
-
"@univerjs
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment": "0.6.
|
|
54
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.6.1",
|
|
49
|
+
"@univerjs/core": "0.6.1",
|
|
50
|
+
"@univerjs/network": "0.6.1",
|
|
51
|
+
"@univerjs-pro/license": "0.6.1",
|
|
52
|
+
"@univerjs/thread-comment": "0.6.1",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.6.1",
|
|
54
|
+
"@univerjs/protocol": "0.1.44-alpha.3"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|
|
58
58
|
"typescript": "^5.7.3",
|
|
59
|
-
"vite": "^6.1.
|
|
60
|
-
"vitest": "^3.0.
|
|
61
|
-
"@univerjs-infra/shared": "0.6.
|
|
59
|
+
"vite": "^6.1.1",
|
|
60
|
+
"vitest": "^3.0.6",
|
|
61
|
+
"@univerjs-infra/shared": "0.6.1"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|