@univerjs-pro/thread-comment-datasource 0.9.4-nightly.202507290713 → 0.9.4-nightly.202507290757
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x3d5420=_0x111b;(function(_0x47ef3e,_0x7169b8){const _0x35746f=_0x111b,_0x3b7652=_0x47ef3e();while(!![]){try{const _0xd147e3=parseInt(_0x35746f(0x11f))/0x1+-parseInt(_0x35746f(0x158))/0x2*(parseInt(_0x35746f(0x12f))/0x3)+-parseInt(_0x35746f(0x130))/0x4+parseInt(_0x35746f(0x140))/0x5+-parseInt(_0x35746f(0x14d))/0x6*(parseInt(_0x35746f(0x154))/0x7)+parseInt(_0x35746f(0x132))/0x8+parseInt(_0x35746f(0x15d))/0x9*(-parseInt(_0x35746f(0x18b))/0xa);if(_0xd147e3===_0x7169b8)break;else _0x3b7652['push'](_0x3b7652['shift']());}catch(_0x277980){_0x3b7652['push'](_0x3b7652['shift']());}}}(_0x5b97,0xb6eaf));Object[_0x3d5420(0x174)](exports,Symbol['toStringTag'],{'value':_0x3d5420(0x126)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x3d5420(0x11e);var I=(_0x10bb0d=>(_0x10bb0d[_0x10bb0d[_0x3d5420(0x15f)]=0x0]='OpenOrReOpen',_0x10bb0d[_0x10bb0d[_0x3d5420(0x16e)]=0x1]=_0x3d5420(0x16e),_0x10bb0d[_0x10bb0d[_0x3d5420(0x114)]=-0x1]=_0x3d5420(0x114),_0x10bb0d))(I||{}),v=(_0x3613b9=>(_0x3613b9[_0x3613b9['Unknown']=0x0]=_0x3d5420(0x14b),_0x3613b9[_0x3613b9[_0x3d5420(0x16c)]=0x1]=_0x3d5420(0x16c),_0x3613b9[_0x3613b9[_0x3d5420(0x157)]=0x2]=_0x3d5420(0x157),_0x3613b9[_0x3613b9[_0x3d5420(0x167)]=0x3]=_0x3d5420(0x167),_0x3613b9[_0x3613b9[_0x3d5420(0x115)]=0x4]=_0x3d5420(0x115),_0x3613b9[_0x3613b9[_0x3d5420(0x11d)]=0x5]=_0x3d5420(0x11d),_0x3613b9[_0x3613b9['UNRECOGNIZED']=-0x1]=_0x3d5420(0x114),_0x3613b9))(v||{});const f=_0x38d48d=>c[_0x3d5420(0x15c)](new Date(+_0x38d48d))[_0x3d5420(0x128)](_0x3d5420(0x151)),R=async(_0x252d82,_0x3ff60d)=>{const _0x276264=_0x3d5420,_0x8daabf=_0x252d82[_0x276264(0x147)](c['UserManagerService']),_0x4217a3=_0x252d82[_0x276264(0x147)](P[_0x276264(0x17b)]);_0x3ff60d['forEach'](_0x347531=>{const _0x4d54da=_0x276264;_0x8daabf[_0x4d54da(0x16d)](_0x347531)&&_0x3ff60d[_0x4d54da(0x117)](_0x347531);}),_0x3ff60d[_0x276264(0x155)]&&(await _0x4217a3[_0x276264(0x147)](_0x276264(0x135),{'params':{'userIDs':[..._0x3ff60d]}}))['body'][_0x276264(0x13f)]['forEach'](_0x1c10ba=>{const _0x1fe7c6=_0x276264;_0x1c10ba&&_0x8daabf[_0x1fe7c6(0x133)](_0x1c10ba);});};var $=Object[_0x3d5420(0x12d)],E=(_0x3080c0,_0x564317,_0x237dda,_0x37c94a)=>{for(var _0x3595f3=_0x37c94a>0x1?void 0x0:_0x37c94a?$(_0x564317,_0x237dda):_0x564317,_0x3da47d=_0x3080c0['length']-0x1,_0x46efd4;_0x3da47d>=0x0;_0x3da47d--)(_0x46efd4=_0x3080c0[_0x3da47d])&&(_0x3595f3=_0x46efd4(_0x3595f3)||_0x3595f3);return _0x3595f3;},S=(_0x7f7f9,_0xd328a9)=>(_0x6aae2b,_0x234823)=>_0xd328a9(_0x6aae2b,_0x234823,_0x7f7f9);let _=class extends c[_0x3d5420(0x119)]{constructor(_0x4d4330,_0x11bbee,_0x44d3d5,_0x1447f2){const _0x4f5a49=_0x3d5420;super(),this[_0x4f5a49(0x185)]=_0x4d4330,this['_threadCommentModel']=_0x11bbee,this[_0x4f5a49(0x15e)]=_0x44d3d5,this['_injector']=_0x1447f2,this['_init'](),this[_0x4f5a49(0x17c)]();}[_0x3d5420(0x17c)](){const _0x490ed6=_0x3d5420;this[_0x490ed6(0x16b)](this[_0x490ed6(0x163)][_0x490ed6(0x14f)][_0x490ed6(0x188)](j[_0x490ed6(0x18e)](0x10))[_0x490ed6(0x11b)](_0x29d482=>{const _0xe730ad=_0x490ed6,_0xec92b8=new Set();_0x29d482[_0xe730ad(0x16f)](_0x339095=>{const _0x27fffc=_0xe730ad;switch(_0x339095[_0x27fffc(0x172)]){case _0x27fffc(0x170):{const _0x535d26=_0x339095[_0x27fffc(0x13a)][_0x27fffc(0x12e)];_0xec92b8[_0x27fffc(0x170)](_0x535d26);break;}}}),R(this[_0xe730ad(0x173)],_0xec92b8);}));}[_0x3d5420(0x148)](){const _0xe32a3e=_0x3d5420;this['disposeWithMe'](this['_commentService']['commentUpdate$'][_0xe32a3e(0x11b)](async _0x56f45a=>{const _0x166176=_0xe32a3e;var _0x4ea2e5,_0x1e4a83,_0x591494,_0xa1f3bc;const _0x535cd5=(_0x4ea2e5=this[_0x166176(0x163)][_0x166176(0x125)](_0x56f45a['unitId'])[_0x166176(0x17d)](_0x8f9436=>_0x8f9436['threadId']===_0x56f45a[_0x166176(0x120)]))==null?void 0x0:_0x4ea2e5[_0x166176(0x12c)];if(!_0x535cd5)return;const {unitId:_0x52b4fc,subUnitId:_0x80ade3}=_0x535cd5;switch(_0x56f45a[_0x166176(0x187)]&&this['_userService'][_0x166176(0x133)](_0x56f45a['user']),_0x56f45a[_0x166176(0x172)]){case v[_0x166176(0x16c)]:break;case v[_0x166176(0x157)]:{this['_threadCommentModel'][_0x166176(0x181)](_0x52b4fc,_0x80ade3,{'unitId':_0x52b4fc,'subUnitId':_0x80ade3,'ref':'','id':_0x56f45a[_0x166176(0x153)],'dT':f(+_0x56f45a[_0x166176(0x116)]),'threadId':_0x56f45a[_0x166176(0x120)],'personId':(_0x591494=(_0x1e4a83=_0x56f45a[_0x166176(0x187)])==null?void 0x0:_0x1e4a83[_0x166176(0x12a)])!=null?_0x591494:_0x56f45a[_0x166176(0x129)],'text':JSON['parse'](_0x56f45a[_0x166176(0x12b)]),'parentId':_0x535cd5['id']});break;}case v[_0x166176(0x115)]:{const _0x5d2f64=this['_threadCommentModel'][_0x166176(0x166)](_0x52b4fc,_0x80ade3,_0x56f45a[_0x166176(0x153)]);_0x5d2f64&&_0x5d2f64[_0x166176(0x180)]&&this[_0x166176(0x163)]['deleteComment'](_0x52b4fc,_0x80ade3,_0x56f45a[_0x166176(0x153)]);break;}case v[_0x166176(0x167)]:{this[_0x166176(0x163)][_0x166176(0x144)](_0x52b4fc,_0x80ade3,{'commentId':_0x56f45a['replyId'],'text':JSON[_0x166176(0x145)](_0x56f45a[_0x166176(0x12b)])});break;}case v['Solve']:{const _0x266662=(_0xa1f3bc=this[_0x166176(0x163)][_0x166176(0x125)](_0x56f45a['unitId'])[_0x166176(0x17d)](_0x312b1a=>_0x312b1a[_0x166176(0x120)]===_0x56f45a[_0x166176(0x120)]))==null?void 0x0:_0xa1f3bc[_0x166176(0x12c)];_0x266662&&this[_0x166176(0x163)]['resolveComment'](_0x52b4fc,_0x80ade3,_0x266662['id'],_0x56f45a['solved']===I[_0x166176(0x16e)]);break;}}}));}};_=E([S(0x0,c[_0x3d5420(0x189)](b[_0x3d5420(0x11a)])),S(0x1,c[_0x3d5420(0x189)](M[_0x3d5420(0x136)])),S(0x2,c[_0x3d5420(0x189)](c[_0x3d5420(0x118)])),S(0x3,c[_0x3d5420(0x189)](c[_0x3d5420(0x156)]))],_);const q='thread-comment-data-source.config',D={};function _0x111b(_0x2cb04b,_0x4de542){const _0x5b9799=_0x5b97();return _0x111b=function(_0x111b3f,_0x319a2c){_0x111b3f=_0x111b3f-0x114;let _0x5e7ea7=_0x5b9799[_0x111b3f];return _0x5e7ea7;},_0x111b(_0x2cb04b,_0x4de542);}var A=Object[_0x3d5420(0x12d)],x=(_0x37423f,_0x5de3aa,_0x1f2626,_0x112685)=>{for(var _0x3931b7=_0x112685>0x1?void 0x0:_0x112685?A(_0x5de3aa,_0x1f2626):_0x5de3aa,_0x2dbf90=_0x37423f['length']-0x1,_0x1176c4;_0x2dbf90>=0x0;_0x2dbf90--)(_0x1176c4=_0x37423f[_0x2dbf90])&&(_0x3931b7=_0x1176c4(_0x3931b7)||_0x3931b7);return _0x3931b7;},C=(_0x5ba353,_0x20a97e)=>(_0x45df47,_0x1151de)=>_0x20a97e(_0x45df47,_0x1151de,_0x5ba353);function Y(_0xe1b44b,_0x1fdaa9){const _0x56063d=_0x3d5420,_0x572e62=_0xe1b44b[_0x56063d(0x164)][0x0];return{..._0x1fdaa9,'id':_0x572e62[_0x56063d(0x153)],'resolved':_0xe1b44b[_0x56063d(0x162)]===0x1,'dT':f(_0x572e62[_0x56063d(0x116)]),'personId':_0x572e62['userId'],'threadId':_0x572e62[_0x56063d(0x120)]};}function G(_0x11d03f,_0x2973fa,_0x40005a){const _0x468b15=_0x3d5420;var _0x27d04a,_0x4bbf40;if(((_0x4bbf40=(_0x27d04a=_0x11d03f==null?void 0x0:_0x11d03f['replies'])==null?void 0x0:_0x27d04a['length'])!=null?_0x4bbf40:0x0)>0x0){const _0x492f04=(_0x3e8ab8,_0x5f32bc)=>({'id':_0x3e8ab8['replyId'],'threadId':_0x3e8ab8[_0x468b15(0x120)],'dT':f(_0x3e8ab8['createTimestamp']),'personId':_0x3e8ab8[_0x468b15(0x129)],'resolved':_0x11d03f[_0x468b15(0x162)]===I[_0x468b15(0x16e)],'unitId':_0x2973fa,'subUnitId':_0x40005a,'text':JSON['parse'](_0x3e8ab8[_0x468b15(0x12b)]),'parentId':_0x5f32bc}),_0x26cd75=_0x492f04(_0x11d03f[_0x468b15(0x164)][0x0]);return{..._0x26cd75,'children':_0x11d03f[_0x468b15(0x164)][_0x468b15(0x17a)](0x1)['map'](_0x5b9931=>_0x492f04(_0x5b9931,_0x26cd75['id']))};}return null;}let p=class{constructor(_0x2db495,_0x1a1751,_0x2143e1){const _0x45a894=_0x3d5420;this[_0x45a894(0x15b)]=_0x2db495,this[_0x45a894(0x15e)]=_0x1a1751,this['_sessionService']=_0x2143e1;}async[_0x3d5420(0x181)](_0x22bc61){const _0x10951d=_0x3d5420;var _0x3a9614,_0x27bc44;const {parentId:_0x1497c1,unitId:_0x3776c9,text:_0x2026c9,threadId:_0x306b82}=_0x22bc61,_0x421e12=(_0x27bc44=(_0x3a9614=_0x2026c9[_0x10951d(0x14a)])==null?void 0x0:_0x3a9614[_0x10951d(0x14c)](_0x4a94ca=>_0x4a94ca['rangeType']===c[_0x10951d(0x150)]['COMMENT'])[_0x10951d(0x143)](_0x35c187=>_0x35c187[_0x10951d(0x165)]))!=null?_0x27bc44:[],_0x4a14c5=JSON[_0x10951d(0x17e)](_0x2026c9),_0x2f7f34=(await this['_sessionService'][_0x10951d(0x16a)](_0x3776c9))[_0x10951d(0x123)]();if(_0x1497c1){const _0xca0c9={'memberId':_0x2f7f34,'unitId':_0x3776c9,'content':_0x4a14c5,'mention':_0x421e12,'threadId':_0x306b82},_0x1fcd37=(await this[_0x10951d(0x15b)]['post']('/universer-api/comment/unit/'+_0x3776c9+'/reply',{'body':_0xca0c9}))['body'][_0x10951d(0x146)];return{..._0x22bc61,'id':_0x1fcd37['replyId'],'dT':c['dayjs'](+_0x1fcd37['createTimestamp'])[_0x10951d(0x128)](_0x10951d(0x151)),'personId':_0x1fcd37[_0x10951d(0x129)]};}else{const _0x598400={'memberId':_0x2f7f34,'unitId':_0x3776c9,'content':_0x4a14c5,'mention':_0x421e12},_0x5ec4da=await this[_0x10951d(0x15b)][_0x10951d(0x184)](_0x10951d(0x11c)+_0x3776c9+_0x10951d(0x134),{'body':_0x598400});return Y(_0x5ec4da[_0x10951d(0x183)]['comment'],_0x22bc61);}}async[_0x3d5420(0x144)](_0x1e0ccf){const _0x1d2a42=_0x3d5420;var _0x45c5c4,_0xdf7e0a;const {text:_0x1b2bc9,unitId:_0x117372}=_0x1e0ccf,_0x1e8e6b=(_0xdf7e0a=(_0x45c5c4=_0x1b2bc9['customRanges'])==null?void 0x0:_0x45c5c4[_0x1d2a42(0x14c)](_0x207fcd=>_0x207fcd['rangeType']===c[_0x1d2a42(0x150)][_0x1d2a42(0x139)])['map'](_0x518a0b=>_0x518a0b['rangeId']))!=null?_0xdf7e0a:[],_0x3548c8=JSON[_0x1d2a42(0x17e)](_0x1b2bc9),_0x364066=_0x1e0ccf[_0x1d2a42(0x120)],_0x31348b=_0x1e0ccf['id'],_0x2d715c={'memberId':(await this['_sessionService'][_0x1d2a42(0x16a)](_0x117372))['getMemberID'](),'unitId':_0x117372,'threadId':_0x364066,'mention':_0x1e8e6b,'content':_0x3548c8,'replyId':_0x31348b},_0xdfd0f=await this[_0x1d2a42(0x15b)]['post'](_0x1d2a42(0x11c)+_0x117372+_0x1d2a42(0x138),{'body':_0x2d715c});return!_0xdfd0f[_0x1d2a42(0x183)]['error']||_0xdfd0f[_0x1d2a42(0x183)]['error'][_0x1d2a42(0x177)]===0x1;}async[_0x3d5420(0x152)](_0x108d1b){const _0x198d37=_0x3d5420,{unitId:_0x45524e}=_0x108d1b,_0xa5e1cb=_0x108d1b['threadId'],_0x23d978={'memberId':this['_userService'][_0x198d37(0x13d)]()[_0x198d37(0x12a)],'unitId':_0x45524e,'threadId':_0xa5e1cb,'solved':_0x108d1b[_0x198d37(0x137)]?I[_0x198d37(0x16e)]:I[_0x198d37(0x15f)]},_0x206c67=await this[_0x198d37(0x15b)][_0x198d37(0x184)](_0x198d37(0x11c)+_0x45524e+'/solved',{'body':_0x23d978});return!_0x206c67[_0x198d37(0x183)][_0x198d37(0x176)]||_0x206c67['body'][_0x198d37(0x176)][_0x198d37(0x177)]===0x1;}async[_0x3d5420(0x122)](_0x3e82e8,_0x55cc50,_0x3e48e5,_0x159d25){const _0x1f7a9f=_0x3d5420,_0x2a09e7={'memberId':(await this[_0x1f7a9f(0x13c)][_0x1f7a9f(0x16a)](_0x3e82e8))['getMemberID'](),'threadId':_0x3e48e5,'replyId':_0x159d25,'unitId':_0x3e82e8},_0x5c3004=await this['_httpService'][_0x1f7a9f(0x184)](_0x1f7a9f(0x11c)+_0x3e82e8+_0x1f7a9f(0x171),{'body':_0x2a09e7});return!_0x5c3004[_0x1f7a9f(0x183)]['error']||_0x5c3004['body'][_0x1f7a9f(0x176)][_0x1f7a9f(0x177)]===0x1;}async['listComments'](_0x59017d,_0x363926,_0x2f620d){const _0x9dbd03=_0x3d5420,_0x4d4433={'unitId':_0x59017d,'threadId':_0x2f620d},_0xf51dfa=await this[_0x9dbd03(0x15b)][_0x9dbd03(0x184)](_0x9dbd03(0x11c)+_0x59017d+'/list',{'body':_0x4d4433}),_0x1c2f20=_0x2f620d[_0x9dbd03(0x143)](_0xb0acac=>G(_0xf51dfa['body'][_0x9dbd03(0x159)][_0xb0acac],_0x59017d,_0x363926))[_0x9dbd03(0x14c)](Boolean);return Object[_0x9dbd03(0x18a)](_0xf51dfa[_0x9dbd03(0x183)]['users'])[_0x9dbd03(0x16f)](_0x391a52=>{const _0x482b37=_0x9dbd03;this[_0x482b37(0x15e)][_0x482b37(0x133)](_0x391a52);}),_0x1c2f20;}[_0x3d5420(0x182)](_0x4034bd){const _0x3f8ed7=_0x3d5420;return{'id':_0x4034bd['id'],'threadId':_0x4034bd[_0x3f8ed7(0x120)],'ref':_0x4034bd[_0x3f8ed7(0x18d)]};}};p=x([C(0x0,c[_0x3d5420(0x189)](P[_0x3d5420(0x17b)])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c[_0x3d5420(0x189)](b[_0x3d5420(0x124)]))],p);function _0x5b97(){const _0x2a75c7=['defineProperty','dataSource','error','code','setConfig','symbol','slice','HTTPService','_initUserSync','find','stringify','UniverThreadCommentUIPlugin','parentId','addComment','saveCommentToSnapshot','body','post','_commentService','UniverThreadCommentDataSourcePlugin','user','pipe','Inject','values','7607870qqXnXS','DependentOn','ref','bufferTime','UNRECOGNIZED','Delete','createTimestamp','delete','UserManagerService','Disposable','CommentService','subscribe','/universer-api/comment/unit/','Solve','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','1495449cKzGxF','threadId','onStarting','deleteComment','getMemberID','CollaborationSessionService','getUnit','Module','_threadCommentDataSourceService','format','userId','userID','content','root','getOwnPropertyDescriptor','personId','93pHbixn','874136qQJDHf','_initDataSource','5885936NczQTa','addUser','/add','/universer-api/user/list','ThreadCommentModel','resolved','/edit','COMMENT','payload','UniverCollaborationClientPlugin','_sessionService','getCurrentUser','length','users','1231385mNqjxX','UNIVER_UNKNOWN','Plugin','map','updateComment','parse','reply','get','_init','IConfigService','customRanges','Unknown','filter','312VGxLQt','_configService','commentUpdate$','CustomRangeType','YYYY/MM/DD\x20HH:mm','resolveComment','replyId','70469JyFtbm','size','Injector','Reply','14544hYCvdP','comments','_threadCommentDataSource','_httpService','dayjs','9HABcIN','_userService','OpenOrReOpen','merge','IThreadCommentDataSourceService','solved','_threadCommentModel','replies','rangeId','getComment','Edit','_config','UniverLicensePlugin','requireSession','disposeWithMe','Add','getUser','Solved','forEach','add','/delete','type','_injector'];_0x5b97=function(){return _0x2a75c7;};return _0x5b97();}var H=Object[_0x3d5420(0x12d)],J=(_0x582e0f,_0xa948f7,_0x295ede,_0x1386a0)=>{for(var _0x2eebdb=_0x1386a0>0x1?void 0x0:_0x1386a0?H(_0xa948f7,_0x295ede):_0xa948f7,_0x2218e7=_0x582e0f['length']-0x1,_0x40197c;_0x2218e7>=0x0;_0x2218e7--)(_0x40197c=_0x582e0f[_0x2218e7])&&(_0x2eebdb=_0x40197c(_0x2eebdb)||_0x2eebdb);return _0x2eebdb;},y=(_0xc9a477,_0x5d5d6d)=>(_0x568657,_0x349cbe)=>_0x5d5d6d(_0x568657,_0x349cbe,_0xc9a477);let g=class extends c['Disposable']{constructor(_0x20e23d,_0x5c5f5b){const _0x3aebb5=_0x3d5420;super(),this['_threadCommentDataSourceService']=_0x20e23d,this[_0x3aebb5(0x15a)]=_0x5c5f5b,this[_0x3aebb5(0x131)]();}[_0x3d5420(0x131)](){const _0x36e922=_0x3d5420;this[_0x36e922(0x127)][_0x36e922(0x175)]=this['_threadCommentDataSource'],this[_0x36e922(0x127)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x3d5420(0x161)]),y(0x1,c[_0x3d5420(0x189)](p))],g);var F=Object[_0x3d5420(0x174)],L=Object[_0x3d5420(0x12d)],Z=(_0x1f6c78,_0x598816,_0x28f9b9)=>_0x598816 in _0x1f6c78?F(_0x1f6c78,_0x598816,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x28f9b9}):_0x1f6c78[_0x598816]=_0x28f9b9,W=(_0x1f50bd,_0x5973c0,_0x2102b1,_0xfab39e)=>{const _0x40db28=_0x3d5420;for(var _0x196e98=_0xfab39e>0x1?void 0x0:_0xfab39e?L(_0x5973c0,_0x2102b1):_0x5973c0,_0x1d23f9=_0x1f50bd[_0x40db28(0x13e)]-0x1,_0x349765;_0x1d23f9>=0x0;_0x1d23f9--)(_0x349765=_0x1f50bd[_0x1d23f9])&&(_0x196e98=_0x349765(_0x196e98)||_0x196e98);return _0x196e98;},O=(_0x253211,_0x5ade0f)=>(_0x9a0c24,_0x5d282d)=>_0x5ade0f(_0x9a0c24,_0x5d282d,_0x253211),N=(_0x2a9012,_0x444af2,_0x3cbba1)=>Z(_0x2a9012,typeof _0x444af2!=_0x3d5420(0x179)?_0x444af2+'':_0x444af2,_0x3cbba1);exports[_0x3d5420(0x186)]=class extends c[_0x3d5420(0x142)]{constructor(_0x1fdf59=D,_0x138cca,_0x4f8a82){const _0x37ddaa=_0x3d5420;super(),this[_0x37ddaa(0x168)]=_0x1fdf59,this[_0x37ddaa(0x173)]=_0x138cca,this['_configService']=_0x4f8a82;const {..._0x57938e}=c[_0x37ddaa(0x160)]({},D,this[_0x37ddaa(0x168)]);this[_0x37ddaa(0x14e)][_0x37ddaa(0x178)](q,_0x57938e);}[_0x3d5420(0x121)](){const _0x4a09c5=_0x3d5420;[[p],[g],[_]][_0x4a09c5(0x16f)](_0x8270ae=>{this['_injector']['add'](_0x8270ae);});}['onReady'](){const _0x4b3960=_0x3d5420;this['_injector'][_0x4b3960(0x147)](g),this[_0x4b3960(0x173)][_0x4b3960(0x147)](_);}},N(exports[_0x3d5420(0x186)],'pluginName',U),N(exports[_0x3d5420(0x186)],_0x3d5420(0x172),c['UniverInstanceType'][_0x3d5420(0x141)]),exports[_0x3d5420(0x186)]=W([c[_0x3d5420(0x18c)](w[_0x3d5420(0x17f)],b[_0x3d5420(0x13b)],T[_0x3d5420(0x169)]),O(0x1,c['Inject'](c[_0x3d5420(0x156)])),O(0x2,c[_0x3d5420(0x149)])],exports[_0x3d5420(0x186)]);
|
|
1
|
+
'use strict';const _0x46ea9f=_0x52c6;(function(_0x3f87ae,_0x4889e0){const _0x57fd15=_0x52c6,_0x27c6d8=_0x3f87ae();while(!![]){try{const _0x21d126=parseInt(_0x57fd15(0x1ee))/0x1+-parseInt(_0x57fd15(0x1c3))/0x2*(-parseInt(_0x57fd15(0x19e))/0x3)+parseInt(_0x57fd15(0x1e0))/0x4*(parseInt(_0x57fd15(0x1a3))/0x5)+-parseInt(_0x57fd15(0x19d))/0x6*(parseInt(_0x57fd15(0x1ba))/0x7)+parseInt(_0x57fd15(0x1d7))/0x8+-parseInt(_0x57fd15(0x1b7))/0x9*(parseInt(_0x57fd15(0x1ec))/0xa)+-parseInt(_0x57fd15(0x1b3))/0xb;if(_0x21d126===_0x4889e0)break;else _0x27c6d8['push'](_0x27c6d8['shift']());}catch(_0x20f4f6){_0x27c6d8['push'](_0x27c6d8['shift']());}}}(_0x14f8,0x78396));Object[_0x46ea9f(0x1d0)](exports,Symbol['toStringTag'],{'value':_0x46ea9f(0x1ca)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x46ea9f(0x1af);var I=(_0x5eabe6=>(_0x5eabe6[_0x5eabe6[_0x46ea9f(0x1b1)]=0x0]=_0x46ea9f(0x1b1),_0x5eabe6[_0x5eabe6[_0x46ea9f(0x1f2)]=0x1]=_0x46ea9f(0x1f2),_0x5eabe6[_0x5eabe6['UNRECOGNIZED']=-0x1]=_0x46ea9f(0x1d2),_0x5eabe6))(I||{}),v=(_0x358b55=>(_0x358b55[_0x358b55['Unknown']=0x0]=_0x46ea9f(0x1bb),_0x358b55[_0x358b55[_0x46ea9f(0x1cc)]=0x1]=_0x46ea9f(0x1cc),_0x358b55[_0x358b55['Reply']=0x2]=_0x46ea9f(0x1f5),_0x358b55[_0x358b55[_0x46ea9f(0x1c6)]=0x3]=_0x46ea9f(0x1c6),_0x358b55[_0x358b55[_0x46ea9f(0x1db)]=0x4]='Delete',_0x358b55[_0x358b55[_0x46ea9f(0x1f8)]=0x5]=_0x46ea9f(0x1f8),_0x358b55[_0x358b55['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x358b55))(v||{});const f=_0x46d4e0=>c['dayjs'](new Date(+_0x46d4e0))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x9c74c,_0x3b9fa9)=>{const _0xc88ff2=_0x46ea9f,_0x4980ce=_0x9c74c['get'](c['UserManagerService']),_0x5452cc=_0x9c74c[_0xc88ff2(0x1bd)](P[_0xc88ff2(0x195)]);_0x3b9fa9['forEach'](_0x364c44=>{const _0x2f9839=_0xc88ff2;_0x4980ce[_0x2f9839(0x1a5)](_0x364c44)&&_0x3b9fa9[_0x2f9839(0x1b0)](_0x364c44);}),_0x3b9fa9[_0xc88ff2(0x1eb)]&&(await _0x5452cc[_0xc88ff2(0x1bd)](_0xc88ff2(0x1c5),{'params':{'userIDs':[..._0x3b9fa9]}}))[_0xc88ff2(0x189)][_0xc88ff2(0x185)][_0xc88ff2(0x1f0)](_0x51b101=>{const _0x5e52bd=_0xc88ff2;_0x51b101&&_0x4980ce[_0x5e52bd(0x1aa)](_0x51b101);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x29e8d8,_0x21665f,_0x2d7b0c,_0x582420)=>{const _0x93c9c0=_0x46ea9f;for(var _0x5f3dc8=_0x582420>0x1?void 0x0:_0x582420?$(_0x21665f,_0x2d7b0c):_0x21665f,_0x120084=_0x29e8d8[_0x93c9c0(0x1e5)]-0x1,_0x2d96f8;_0x120084>=0x0;_0x120084--)(_0x2d96f8=_0x29e8d8[_0x120084])&&(_0x5f3dc8=_0x2d96f8(_0x5f3dc8)||_0x5f3dc8);return _0x5f3dc8;},S=(_0x571aab,_0x55a032)=>(_0x23327d,_0xd95672)=>_0x55a032(_0x23327d,_0xd95672,_0x571aab);function _0x52c6(_0x37df04,_0x17983d){const _0x14f834=_0x14f8();return _0x52c6=function(_0x52c6d0,_0x2ef85f){_0x52c6d0=_0x52c6d0-0x184;let _0x2a2d9f=_0x14f834[_0x52c6d0];return _0x2a2d9f;},_0x52c6(_0x37df04,_0x17983d);}let _=class extends c[_0x46ea9f(0x1ce)]{constructor(_0x1a7384,_0x548dea,_0x52d99d,_0x49935b){const _0x1534e9=_0x46ea9f;super(),this[_0x1534e9(0x188)]=_0x1a7384,this[_0x1534e9(0x1e1)]=_0x548dea,this[_0x1534e9(0x198)]=_0x52d99d,this[_0x1534e9(0x1b2)]=_0x49935b,this['_init'](),this[_0x1534e9(0x1ac)]();}['_initUserSync'](){const _0x4af199=_0x46ea9f;this[_0x4af199(0x1d9)](this[_0x4af199(0x1e1)][_0x4af199(0x18b)][_0x4af199(0x1e7)](j[_0x4af199(0x187)](0x10))[_0x4af199(0x1d5)](_0x39f82e=>{const _0x4a45e4=_0x4af199,_0x5129fd=new Set();_0x39f82e[_0x4a45e4(0x1f0)](_0x325c17=>{const _0x148609=_0x4a45e4;switch(_0x325c17[_0x148609(0x1cf)]){case _0x148609(0x1b4):{const _0x4f4e60=_0x325c17[_0x148609(0x1d4)][_0x148609(0x19b)];_0x5129fd['add'](_0x4f4e60);break;}}}),R(this[_0x4a45e4(0x1b2)],_0x5129fd);}));}[_0x46ea9f(0x1a9)](){const _0x5e6ec8=_0x46ea9f;this[_0x5e6ec8(0x1d9)](this[_0x5e6ec8(0x188)][_0x5e6ec8(0x18b)][_0x5e6ec8(0x1d5)](async _0x2ff537=>{const _0x24567d=_0x5e6ec8;var _0xb3e1b7,_0xa7c448,_0x17e164,_0x1410b8;const _0x5d600d=(_0xb3e1b7=this[_0x24567d(0x1e1)][_0x24567d(0x19f)](_0x2ff537['unitId'])[_0x24567d(0x1c0)](_0x4c3149=>_0x4c3149['threadId']===_0x2ff537[_0x24567d(0x1d1)]))==null?void 0x0:_0xb3e1b7['root'];if(!_0x5d600d)return;const {unitId:_0x35cf0,subUnitId:_0x42b804}=_0x5d600d;switch(_0x2ff537['user']&&this[_0x24567d(0x198)][_0x24567d(0x1aa)](_0x2ff537['user']),_0x2ff537['type']){case v[_0x24567d(0x1cc)]:break;case v[_0x24567d(0x1f5)]:{this[_0x24567d(0x1e1)][_0x24567d(0x1a0)](_0x35cf0,_0x42b804,{'unitId':_0x35cf0,'subUnitId':_0x42b804,'ref':'','id':_0x2ff537['replyId'],'dT':f(+_0x2ff537[_0x24567d(0x1c1)]),'threadId':_0x2ff537['threadId'],'personId':(_0x17e164=(_0xa7c448=_0x2ff537['user'])==null?void 0x0:_0xa7c448[_0x24567d(0x1a2)])!=null?_0x17e164:_0x2ff537[_0x24567d(0x1f4)],'text':JSON[_0x24567d(0x199)](_0x2ff537['content']),'parentId':_0x5d600d['id']});break;}case v['Delete']:{const _0x35245c=this[_0x24567d(0x1e1)]['getComment'](_0x35cf0,_0x42b804,_0x2ff537[_0x24567d(0x1ed)]);_0x35245c&&_0x35245c[_0x24567d(0x193)]&&this[_0x24567d(0x1e1)]['deleteComment'](_0x35cf0,_0x42b804,_0x2ff537['replyId']);break;}case v[_0x24567d(0x1c6)]:{this[_0x24567d(0x1e1)]['updateComment'](_0x35cf0,_0x42b804,{'commentId':_0x2ff537['replyId'],'text':JSON['parse'](_0x2ff537[_0x24567d(0x18a)])});break;}case v[_0x24567d(0x1f8)]:{const _0x3d193d=(_0x1410b8=this[_0x24567d(0x1e1)][_0x24567d(0x19f)](_0x2ff537[_0x24567d(0x1df)])[_0x24567d(0x1c0)](_0x1323f1=>_0x1323f1['threadId']===_0x2ff537[_0x24567d(0x1d1)]))==null?void 0x0:_0x1410b8[_0x24567d(0x1d3)];_0x3d193d&&this[_0x24567d(0x1e1)][_0x24567d(0x1a6)](_0x35cf0,_0x42b804,_0x3d193d['id'],_0x2ff537['solved']===I[_0x24567d(0x1f2)]);break;}}}));}};_=E([S(0x0,c['Inject'](b[_0x46ea9f(0x1b6)])),S(0x1,c[_0x46ea9f(0x192)](M[_0x46ea9f(0x1a4)])),S(0x2,c['Inject'](c[_0x46ea9f(0x1c4)])),S(0x3,c[_0x46ea9f(0x192)](c[_0x46ea9f(0x184)]))],_);const q=_0x46ea9f(0x1dc),D={};var A=Object[_0x46ea9f(0x1bc)],x=(_0x3d1b94,_0x4e0e81,_0x13ecbd,_0x27c93d)=>{const _0x1af105=_0x46ea9f;for(var _0x1664c0=_0x27c93d>0x1?void 0x0:_0x27c93d?A(_0x4e0e81,_0x13ecbd):_0x4e0e81,_0x3be72f=_0x3d1b94[_0x1af105(0x1e5)]-0x1,_0x5c67e4;_0x3be72f>=0x0;_0x3be72f--)(_0x5c67e4=_0x3d1b94[_0x3be72f])&&(_0x1664c0=_0x5c67e4(_0x1664c0)||_0x1664c0);return _0x1664c0;},C=(_0x2c6b04,_0x43dd2a)=>(_0x176b12,_0x2b0a83)=>_0x43dd2a(_0x176b12,_0x2b0a83,_0x2c6b04);function Y(_0x149563,_0x194167){const _0x1b7e46=_0x46ea9f,_0x4bf5aa=_0x149563['replies'][0x0];return{..._0x194167,'id':_0x4bf5aa['replyId'],'resolved':_0x149563[_0x1b7e46(0x1bf)]===0x1,'dT':f(_0x4bf5aa[_0x1b7e46(0x1c1)]),'personId':_0x4bf5aa[_0x1b7e46(0x1f4)],'threadId':_0x4bf5aa['threadId']};}function G(_0x837d8b,_0x4e394f,_0x3eadcc){const _0x18a17c=_0x46ea9f;var _0x5979a0,_0x583e68;if(((_0x583e68=(_0x5979a0=_0x837d8b==null?void 0x0:_0x837d8b[_0x18a17c(0x1e2)])==null?void 0x0:_0x5979a0[_0x18a17c(0x1e5)])!=null?_0x583e68:0x0)>0x0){const _0x1c46ab=(_0xcf3c47,_0x2a86e8)=>({'id':_0xcf3c47[_0x18a17c(0x1ed)],'threadId':_0xcf3c47[_0x18a17c(0x1d1)],'dT':f(_0xcf3c47[_0x18a17c(0x1c1)]),'personId':_0xcf3c47[_0x18a17c(0x1f4)],'resolved':_0x837d8b[_0x18a17c(0x1bf)]===I[_0x18a17c(0x1f2)],'unitId':_0x4e394f,'subUnitId':_0x3eadcc,'text':JSON[_0x18a17c(0x199)](_0xcf3c47['content']),'parentId':_0x2a86e8}),_0x3f8302=_0x1c46ab(_0x837d8b['replies'][0x0]);return{..._0x3f8302,'children':_0x837d8b[_0x18a17c(0x1e2)]['slice'](0x1)[_0x18a17c(0x1f6)](_0x34caf1=>_0x1c46ab(_0x34caf1,_0x3f8302['id']))};}return null;}function _0x14f8(){const _0x5e9249=['length','YYYY/MM/DD\x20HH:mm','pipe','filter','UniverThreadCommentDataSourcePlugin','saveCommentToSnapshot','size','58980yBpZnl','replyId','541011MqpnJZ','format','forEach','onStarting','Solved','_config','userId','Reply','map','/list','Solve','customRanges','UniverInstanceType','Injector','users','_sessionService','bufferTime','_commentService','body','content','commentUpdate$','_threadCommentDataSourceService','_threadCommentDataSource','pluginName','post','getCurrentUser','/add','Inject','parentId','getMemberID','HTTPService','error','_initDataSource','_userService','parse','_httpService','personId','stringify','15834nmNDIl','3WWvbaw','getUnit','addComment','UniverLicensePlugin','userID','5OTPCkm','ThreadCommentModel','getUser','resolveComment','_configService','dataSource','_init','addUser','/universer-api/comment/unit/','_initUserSync','requireSession','setConfig','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','delete','OpenOrReOpen','_injector','6149209GxLtGT','add','code','CommentService','333HgGULN','UniverThreadCommentUIPlugin','symbol','2135jHutRc','Unknown','getOwnPropertyDescriptor','get','onReady','solved','find','createTimestamp','UniverCollaborationClientPlugin','1087342qSiWfK','UserManagerService','/universer-api/user/list','Edit','dayjs','CustomRangeType','comments','Module','comment','Add','merge','Disposable','type','defineProperty','threadId','UNRECOGNIZED','root','payload','subscribe','/solved','4779160QGJEYG','values','disposeWithMe','rangeId','Delete','thread-comment-data-source.config','updateComment','COMMENT','unitId','1570004ipUpYY','_threadCommentModel','replies','rangeType','Plugin'];_0x14f8=function(){return _0x5e9249;};return _0x14f8();}let p=class{constructor(_0x4fd72f,_0x28463e,_0x452359){const _0x376717=_0x46ea9f;this[_0x376717(0x19a)]=_0x4fd72f,this['_userService']=_0x28463e,this[_0x376717(0x186)]=_0x452359;}async['addComment'](_0x36041f){const _0x33944e=_0x46ea9f;var _0x2037c6,_0x21ca2e;const {parentId:_0x29b7c3,unitId:_0x3d6210,text:_0x591fe6,threadId:_0x4816b2}=_0x36041f,_0x34ade7=(_0x21ca2e=(_0x2037c6=_0x591fe6['customRanges'])==null?void 0x0:_0x2037c6['filter'](_0x2bd5e8=>_0x2bd5e8[_0x33944e(0x1e3)]===c[_0x33944e(0x1c8)]['COMMENT'])[_0x33944e(0x1f6)](_0x1743db=>_0x1743db[_0x33944e(0x1da)]))!=null?_0x21ca2e:[],_0x48727b=JSON['stringify'](_0x591fe6),_0x2c8b57=(await this[_0x33944e(0x186)][_0x33944e(0x1ad)](_0x3d6210))[_0x33944e(0x194)]();if(_0x29b7c3){const _0x25f177={'memberId':_0x2c8b57,'unitId':_0x3d6210,'content':_0x48727b,'mention':_0x34ade7,'threadId':_0x4816b2},_0x231572=(await this[_0x33944e(0x19a)]['post']('/universer-api/comment/unit/'+_0x3d6210+'/reply',{'body':_0x25f177}))[_0x33944e(0x189)]['reply'];return{..._0x36041f,'id':_0x231572['replyId'],'dT':c[_0x33944e(0x1c7)](+_0x231572['createTimestamp'])[_0x33944e(0x1ef)](_0x33944e(0x1e6)),'personId':_0x231572[_0x33944e(0x1f4)]};}else{const _0x908660={'memberId':_0x2c8b57,'unitId':_0x3d6210,'content':_0x48727b,'mention':_0x34ade7},_0x58b3c3=await this[_0x33944e(0x19a)][_0x33944e(0x18f)](_0x33944e(0x1ab)+_0x3d6210+_0x33944e(0x191),{'body':_0x908660});return Y(_0x58b3c3[_0x33944e(0x189)][_0x33944e(0x1cb)],_0x36041f);}}async[_0x46ea9f(0x1dd)](_0x2317c1){const _0x4c5eb7=_0x46ea9f;var _0x590a8b,_0x52622b;const {text:_0x2c90b7,unitId:_0x57e752}=_0x2317c1,_0x3b4419=(_0x52622b=(_0x590a8b=_0x2c90b7[_0x4c5eb7(0x1f9)])==null?void 0x0:_0x590a8b[_0x4c5eb7(0x1e8)](_0x4ed0c2=>_0x4ed0c2['rangeType']===c[_0x4c5eb7(0x1c8)][_0x4c5eb7(0x1de)])[_0x4c5eb7(0x1f6)](_0x348c56=>_0x348c56[_0x4c5eb7(0x1da)]))!=null?_0x52622b:[],_0x569795=JSON[_0x4c5eb7(0x19c)](_0x2c90b7),_0xb3cbb5=_0x2317c1[_0x4c5eb7(0x1d1)],_0x41724f=_0x2317c1['id'],_0x436fcf={'memberId':(await this[_0x4c5eb7(0x186)]['requireSession'](_0x57e752))[_0x4c5eb7(0x194)](),'unitId':_0x57e752,'threadId':_0xb3cbb5,'mention':_0x3b4419,'content':_0x569795,'replyId':_0x41724f},_0x5e43a7=await this[_0x4c5eb7(0x19a)][_0x4c5eb7(0x18f)]('/universer-api/comment/unit/'+_0x57e752+'/edit',{'body':_0x436fcf});return!_0x5e43a7['body']['error']||_0x5e43a7[_0x4c5eb7(0x189)][_0x4c5eb7(0x196)][_0x4c5eb7(0x1b5)]===0x1;}async['resolveComment'](_0x3f5350){const _0x15172f=_0x46ea9f,{unitId:_0x2b3ba3}=_0x3f5350,_0x3d7d1e=_0x3f5350[_0x15172f(0x1d1)],_0x21057a={'memberId':this[_0x15172f(0x198)][_0x15172f(0x190)]()[_0x15172f(0x1a2)],'unitId':_0x2b3ba3,'threadId':_0x3d7d1e,'solved':_0x3f5350['resolved']?I[_0x15172f(0x1f2)]:I['OpenOrReOpen']},_0x5e7ec5=await this['_httpService']['post'](_0x15172f(0x1ab)+_0x2b3ba3+_0x15172f(0x1d6),{'body':_0x21057a});return!_0x5e7ec5[_0x15172f(0x189)][_0x15172f(0x196)]||_0x5e7ec5[_0x15172f(0x189)]['error']['code']===0x1;}async['deleteComment'](_0x594d61,_0x38e5c3,_0x34dbe5,_0x4fcadc){const _0x524e6a=_0x46ea9f,_0x52a4a1={'memberId':(await this['_sessionService']['requireSession'](_0x594d61))['getMemberID'](),'threadId':_0x34dbe5,'replyId':_0x4fcadc,'unitId':_0x594d61},_0x2b752a=await this[_0x524e6a(0x19a)][_0x524e6a(0x18f)](_0x524e6a(0x1ab)+_0x594d61+'/delete',{'body':_0x52a4a1});return!_0x2b752a['body'][_0x524e6a(0x196)]||_0x2b752a[_0x524e6a(0x189)]['error']['code']===0x1;}async['listComments'](_0x1ec326,_0x4c8df0,_0x2f4dd3){const _0x569201=_0x46ea9f,_0x403c3c={'unitId':_0x1ec326,'threadId':_0x2f4dd3},_0x264067=await this[_0x569201(0x19a)][_0x569201(0x18f)]('/universer-api/comment/unit/'+_0x1ec326+_0x569201(0x1f7),{'body':_0x403c3c}),_0x2745be=_0x2f4dd3[_0x569201(0x1f6)](_0x283461=>G(_0x264067[_0x569201(0x189)][_0x569201(0x1c9)][_0x283461],_0x1ec326,_0x4c8df0))[_0x569201(0x1e8)](Boolean);return Object[_0x569201(0x1d8)](_0x264067[_0x569201(0x189)]['users'])['forEach'](_0x18e2e4=>{const _0x48b0cd=_0x569201;this[_0x48b0cd(0x198)][_0x48b0cd(0x1aa)](_0x18e2e4);}),_0x2745be;}[_0x46ea9f(0x1ea)](_0x40cd8e){const _0x3c223f=_0x46ea9f;return{'id':_0x40cd8e['id'],'threadId':_0x40cd8e[_0x3c223f(0x1d1)],'ref':_0x40cd8e['ref']};}};p=x([C(0x0,c['Inject'](P[_0x46ea9f(0x195)])),C(0x1,c['Inject'](c[_0x46ea9f(0x1c4)])),C(0x2,c['Inject'](b['CollaborationSessionService']))],p);var H=Object[_0x46ea9f(0x1bc)],J=(_0x25d567,_0x1a11ff,_0x16d2f9,_0x1f877a)=>{const _0x367753=_0x46ea9f;for(var _0x5198ec=_0x1f877a>0x1?void 0x0:_0x1f877a?H(_0x1a11ff,_0x16d2f9):_0x1a11ff,_0x3359dd=_0x25d567[_0x367753(0x1e5)]-0x1,_0x245c79;_0x3359dd>=0x0;_0x3359dd--)(_0x245c79=_0x25d567[_0x3359dd])&&(_0x5198ec=_0x245c79(_0x5198ec)||_0x5198ec);return _0x5198ec;},y=(_0x8b87f6,_0x3d108d)=>(_0x112a7f,_0x1b1849)=>_0x3d108d(_0x112a7f,_0x1b1849,_0x8b87f6);let g=class extends c[_0x46ea9f(0x1ce)]{constructor(_0x1d69fd,_0x26c073){const _0x533c26=_0x46ea9f;super(),this[_0x533c26(0x18c)]=_0x1d69fd,this[_0x533c26(0x18d)]=_0x26c073,this[_0x533c26(0x197)]();}[_0x46ea9f(0x197)](){const _0x538122=_0x46ea9f;this['_threadCommentDataSourceService'][_0x538122(0x1a8)]=this['_threadCommentDataSource'],this[_0x538122(0x18c)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x46ea9f(0x192)](p))],g);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x102305,_0x28cc25,_0x5e0209)=>_0x28cc25 in _0x102305?F(_0x102305,_0x28cc25,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5e0209}):_0x102305[_0x28cc25]=_0x5e0209,W=(_0x70e7f7,_0x45f96d,_0x3765ed,_0x4991c1)=>{for(var _0x1bde35=_0x4991c1>0x1?void 0x0:_0x4991c1?L(_0x45f96d,_0x3765ed):_0x45f96d,_0x82f9cb=_0x70e7f7['length']-0x1,_0x2ef1eb;_0x82f9cb>=0x0;_0x82f9cb--)(_0x2ef1eb=_0x70e7f7[_0x82f9cb])&&(_0x1bde35=_0x2ef1eb(_0x1bde35)||_0x1bde35);return _0x1bde35;},O=(_0xe86a82,_0x241ba7)=>(_0x21dc17,_0xa91f42)=>_0x241ba7(_0x21dc17,_0xa91f42,_0xe86a82),N=(_0x3f4983,_0x358a5e,_0x319a39)=>Z(_0x3f4983,typeof _0x358a5e!=_0x46ea9f(0x1b9)?_0x358a5e+'':_0x358a5e,_0x319a39);exports[_0x46ea9f(0x1e9)]=class extends c[_0x46ea9f(0x1e4)]{constructor(_0x38bcfc=D,_0x592bd7,_0x566e31){const _0x32288a=_0x46ea9f;super(),this[_0x32288a(0x1f3)]=_0x38bcfc,this[_0x32288a(0x1b2)]=_0x592bd7,this[_0x32288a(0x1a7)]=_0x566e31;const {..._0x1d04a9}=c[_0x32288a(0x1cd)]({},D,this['_config']);this[_0x32288a(0x1a7)][_0x32288a(0x1ae)](q,_0x1d04a9);}[_0x46ea9f(0x1f1)](){[[p],[g],[_]]['forEach'](_0x242fbb=>{const _0x435dfc=_0x52c6;this['_injector'][_0x435dfc(0x1b4)](_0x242fbb);});}[_0x46ea9f(0x1be)](){const _0x534ced=_0x46ea9f;this[_0x534ced(0x1b2)]['get'](g),this[_0x534ced(0x1b2)]['get'](_);}},N(exports[_0x46ea9f(0x1e9)],_0x46ea9f(0x18e),U),N(exports[_0x46ea9f(0x1e9)],_0x46ea9f(0x1cf),c[_0x46ea9f(0x1fa)]['UNIVER_UNKNOWN']),exports[_0x46ea9f(0x1e9)]=W([c['DependentOn'](w[_0x46ea9f(0x1b8)],b[_0x46ea9f(0x1c2)],T[_0x46ea9f(0x1a1)]),O(0x1,c[_0x46ea9f(0x192)](c[_0x46ea9f(0x184)])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3ccefd=_0x31d0;(function(_0x5ebe59,_0x22eb5f){const _0x31856b=_0x31d0,_0x130a96=_0x5ebe59();while(!![]){try{const _0x103ec5=parseInt(_0x31856b(0x149))/0x1+parseInt(_0x31856b(0x114))/0x2+parseInt(_0x31856b(0x14a))/0x3*(-parseInt(_0x31856b(0x126))/0x4)+-parseInt(_0x31856b(0x102))/0x5+parseInt(_0x31856b(0xf4))/0x6+-parseInt(_0x31856b(0xf9))/0x7*(parseInt(_0x31856b(0x145))/0x8)+parseInt(_0x31856b(0xff))/0x9;if(_0x103ec5===_0x22eb5f)break;else _0x130a96['push'](_0x130a96['shift']());}catch(_0x548ed6){_0x130a96['push'](_0x130a96['shift']());}}}(_0x3b75,0x88f40));import{CommentService as _0x11f515,CollaborationSessionService as _0x52cf24,UniverCollaborationClientPlugin as _0x12ae43}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x38eead}from'@univerjs-pro/license';import{dayjs as _0x4e68e8,UserManagerService as _0x4d85ee,Inject as _0x5c1e64,Injector as _0x31e86f,Disposable as _0x2cd795,CustomRangeType as _0x4ac1a8,UniverInstanceType as _0x5f0730,DependentOn as _0x7f6732,IConfigService as _0x405fde,Plugin as _0x1c4223,merge as _0x1a1877}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xe87a7f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x37ae10,IThreadCommentDataSourceService as _0x241c59}from'@univerjs/thread-comment';import{bufferTime as _0x56fda4}from'rxjs';import{HTTPService as _0x2cb4a2}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2abd50=>(_0x2abd50[_0x2abd50['OpenOrReOpen']=0x0]=_0x3ccefd(0x113),_0x2abd50[_0x2abd50[_0x3ccefd(0x118)]=0x1]=_0x3ccefd(0x118),_0x2abd50[_0x2abd50['UNRECOGNIZED']=-0x1]=_0x3ccefd(0x143),_0x2abd50))(I||{}),v=(_0x107047=>(_0x107047[_0x107047[_0x3ccefd(0x12a)]=0x0]=_0x3ccefd(0x12a),_0x107047[_0x107047[_0x3ccefd(0xf7)]=0x1]=_0x3ccefd(0xf7),_0x107047[_0x107047['Reply']=0x2]=_0x3ccefd(0x125),_0x107047[_0x107047[_0x3ccefd(0x112)]=0x3]='Edit',_0x107047[_0x107047[_0x3ccefd(0x110)]=0x4]=_0x3ccefd(0x110),_0x107047[_0x107047[_0x3ccefd(0x121)]=0x5]=_0x3ccefd(0x121),_0x107047[_0x107047['UNRECOGNIZED']=-0x1]=_0x3ccefd(0x143),_0x107047))(v||{});const y=_0x2866e2=>_0x4e68e8(new Date(+_0x2866e2))[_0x3ccefd(0xfe)](_0x3ccefd(0x14c)),B=async(_0x374df5,_0x5aa73e)=>{const _0x569b22=_0x3ccefd,_0x5ab53f=_0x374df5[_0x569b22(0x107)](_0x4d85ee),_0x25f72d=_0x374df5[_0x569b22(0x107)](_0x2cb4a2);_0x5aa73e['forEach'](_0x204518=>{const _0x573f43=_0x569b22;_0x5ab53f['getUser'](_0x204518)&&_0x5aa73e[_0x573f43(0x139)](_0x204518);}),_0x5aa73e[_0x569b22(0x12e)]&&(await _0x25f72d[_0x569b22(0x107)](_0x569b22(0xef),{'params':{'userIDs':[..._0x5aa73e]}}))[_0x569b22(0x127)]['users'][_0x569b22(0x10e)](_0x6955af=>{const _0x192893=_0x569b22;_0x6955af&&_0x5ab53f[_0x192893(0x10c)](_0x6955af);});};var K=Object[_0x3ccefd(0x12d)],V=(_0x7fa101,_0x57a0ef,_0x152c37,_0x13fac5)=>{const _0x1013b6=_0x3ccefd;for(var _0x3dac30=_0x13fac5>0x1?void 0x0:_0x13fac5?K(_0x57a0ef,_0x152c37):_0x57a0ef,_0x4553b8=_0x7fa101[_0x1013b6(0x148)]-0x1,_0x5d89b6;_0x4553b8>=0x0;_0x4553b8--)(_0x5d89b6=_0x7fa101[_0x4553b8])&&(_0x3dac30=_0x5d89b6(_0x3dac30)||_0x3dac30);return _0x3dac30;},p=(_0x1ba73e,_0x3b9ac2)=>(_0x57402e,_0x5109e4)=>_0x3b9ac2(_0x57402e,_0x5109e4,_0x1ba73e);function _0x31d0(_0x210e77,_0x483dd1){const _0x3b758=_0x3b75();return _0x31d0=function(_0x31d025,_0x45120c){_0x31d025=_0x31d025-0xec;let _0x3bb48e=_0x3b758[_0x31d025];return _0x3bb48e;},_0x31d0(_0x210e77,_0x483dd1);}let _=class extends _0x2cd795{constructor(_0x274955,_0x4fb634,_0x5b6808,_0x765ab2){const _0x1049da=_0x3ccefd;super(),this['_commentService']=_0x274955,this['_threadCommentModel']=_0x4fb634,this[_0x1049da(0x14d)]=_0x5b6808,this[_0x1049da(0x144)]=_0x765ab2,this[_0x1049da(0x103)](),this[_0x1049da(0x124)]();}[_0x3ccefd(0x124)](){const _0x5d0790=_0x3ccefd;this[_0x5d0790(0x11e)](this[_0x5d0790(0xee)][_0x5d0790(0x12f)]['pipe'](_0x56fda4(0x10))[_0x5d0790(0x122)](_0xae9b10=>{const _0x2751eb=_0x5d0790,_0x35c84b=new Set();_0xae9b10[_0x2751eb(0x10e)](_0x33dcae=>{const _0x17442d=_0x2751eb;switch(_0x33dcae[_0x17442d(0xec)]){case'add':{const _0x20347d=_0x33dcae[_0x17442d(0x132)]['personId'];_0x35c84b[_0x17442d(0x13a)](_0x20347d);break;}}}),B(this[_0x2751eb(0x144)],_0x35c84b);}));}[_0x3ccefd(0x103)](){const _0x281a8a=_0x3ccefd;this['disposeWithMe'](this[_0x281a8a(0x11c)]['commentUpdate$'][_0x281a8a(0x122)](async _0x2f2ffc=>{const _0x3df794=_0x281a8a;var _0x264cdc,_0x38a36f,_0x33f983,_0x3893b5;const _0x178381=(_0x264cdc=this[_0x3df794(0xee)][_0x3df794(0xf2)](_0x2f2ffc[_0x3df794(0x136)])[_0x3df794(0x12c)](_0x4a0aa=>_0x4a0aa[_0x3df794(0xf5)]===_0x2f2ffc[_0x3df794(0xf5)]))==null?void 0x0:_0x264cdc[_0x3df794(0x133)];if(!_0x178381)return;const {unitId:_0x218998,subUnitId:_0x41ceef}=_0x178381;switch(_0x2f2ffc[_0x3df794(0x14f)]&&this['_userService'][_0x3df794(0x10c)](_0x2f2ffc['user']),_0x2f2ffc[_0x3df794(0xec)]){case v[_0x3df794(0xf7)]:break;case v['Reply']:{this[_0x3df794(0xee)][_0x3df794(0x146)](_0x218998,_0x41ceef,{'unitId':_0x218998,'subUnitId':_0x41ceef,'ref':'','id':_0x2f2ffc[_0x3df794(0x137)],'dT':y(+_0x2f2ffc['createTimestamp']),'threadId':_0x2f2ffc[_0x3df794(0xf5)],'personId':(_0x33f983=(_0x38a36f=_0x2f2ffc['user'])==null?void 0x0:_0x38a36f[_0x3df794(0x117)])!=null?_0x33f983:_0x2f2ffc[_0x3df794(0x150)],'text':JSON[_0x3df794(0x13d)](_0x2f2ffc[_0x3df794(0x130)]),'parentId':_0x178381['id']});break;}case v[_0x3df794(0x110)]:{const _0x305619=this['_threadCommentModel']['getComment'](_0x218998,_0x41ceef,_0x2f2ffc[_0x3df794(0x137)]);_0x305619&&_0x305619[_0x3df794(0x123)]&&this[_0x3df794(0xee)][_0x3df794(0x128)](_0x218998,_0x41ceef,_0x2f2ffc['replyId']);break;}case v[_0x3df794(0x112)]:{this[_0x3df794(0xee)][_0x3df794(0x111)](_0x218998,_0x41ceef,{'commentId':_0x2f2ffc[_0x3df794(0x137)],'text':JSON['parse'](_0x2f2ffc[_0x3df794(0x130)])});break;}case v[_0x3df794(0x121)]:{const _0x24a089=(_0x3893b5=this['_threadCommentModel'][_0x3df794(0xf2)](_0x2f2ffc[_0x3df794(0x136)])[_0x3df794(0x12c)](_0xd45349=>_0xd45349['threadId']===_0x2f2ffc[_0x3df794(0xf5)]))==null?void 0x0:_0x3893b5['root'];_0x24a089&&this[_0x3df794(0xee)][_0x3df794(0x151)](_0x218998,_0x41ceef,_0x24a089['id'],_0x2f2ffc[_0x3df794(0x142)]===I[_0x3df794(0x118)]);break;}}}));}};_=V([p(0x0,_0x5c1e64(_0x11f515)),p(0x1,_0x5c1e64(_0x37ae10)),p(0x2,_0x5c1e64(_0x4d85ee)),p(0x3,_0x5c1e64(_0x31e86f))],_);const z=_0x3ccefd(0xed),O={};var k=Object[_0x3ccefd(0x12d)],Q=(_0x49c27c,_0xf52f21,_0x2afed6,_0x5c1fb0)=>{for(var _0x585dc9=_0x5c1fb0>0x1?void 0x0:_0x5c1fb0?k(_0xf52f21,_0x2afed6):_0xf52f21,_0x46f74e=_0x49c27c['length']-0x1,_0x51b0d3;_0x46f74e>=0x0;_0x46f74e--)(_0x51b0d3=_0x49c27c[_0x46f74e])&&(_0x585dc9=_0x51b0d3(_0x585dc9)||_0x585dc9);return _0x585dc9;},b=(_0x9467c4,_0x594426)=>(_0x26ff81,_0x17203d)=>_0x594426(_0x26ff81,_0x17203d,_0x9467c4);function _0x3b75(){const _0x1b25a9=['length','678751IzuesV','102wVuUhu','resolved','YYYY/MM/DD\x20HH:mm','_userService','values','user','userId','resolveComment','_threadCommentDataSource','type','thread-comment-data-source.config','_threadCommentModel','/universer-api/user/list','map','rangeType','getUnit','post','2221356YdmSXd','threadId','listComments','Add','error','21TVhohE','/universer-api/comment/unit/','ref','getMemberID','/delete','format','6148818sDMiDc','defineProperty','comment','3131365cEGDqf','_init','/reply','/list','users','get','syncUpdateMutationToColla','filter','saveCommentToSnapshot','comments','addUser','COMMENT','forEach','pluginName','Delete','updateComment','Edit','OpenOrReOpen','1152250SHIiiw','/solved','stringify','userID','Solved','_configService','setConfig','rangeId','_commentService','requireSession','disposeWithMe','createTimestamp','_sessionService','Solve','subscribe','parentId','_initUserSync','Reply','14548PIgJpc','body','deleteComment','customRanges','Unknown','UNIVER_UNKNOWN','find','getOwnPropertyDescriptor','size','commentUpdate$','content','dataSource','payload','root','reply','_httpService','unitId','replyId','getCurrentUser','delete','add','/edit','_config','parse','code','replies','_initDataSource','onReady','solved','UNRECOGNIZED','_injector','2659768TAqmiq','addComment','_threadCommentDataSourceService'];_0x3b75=function(){return _0x1b25a9;};return _0x3b75();}function X(_0x14c934,_0x51d512){const _0x406020=_0x3ccefd,_0x2827b6=_0x14c934[_0x406020(0x13f)][0x0];return{..._0x51d512,'id':_0x2827b6[_0x406020(0x137)],'resolved':_0x14c934[_0x406020(0x142)]===0x1,'dT':y(_0x2827b6[_0x406020(0x11f)]),'personId':_0x2827b6['userId'],'threadId':_0x2827b6['threadId']};}function ee(_0x2953fb,_0x523705,_0x18edb4){const _0x1c238d=_0x3ccefd;var _0x5d0a99,_0x3c7187;if(((_0x3c7187=(_0x5d0a99=_0x2953fb==null?void 0x0:_0x2953fb['replies'])==null?void 0x0:_0x5d0a99[_0x1c238d(0x148)])!=null?_0x3c7187:0x0)>0x0){const _0x3fae91=(_0x1cf9bd,_0x986a53)=>({'id':_0x1cf9bd[_0x1c238d(0x137)],'threadId':_0x1cf9bd[_0x1c238d(0xf5)],'dT':y(_0x1cf9bd['createTimestamp']),'personId':_0x1cf9bd[_0x1c238d(0x150)],'resolved':_0x2953fb[_0x1c238d(0x142)]===I['Solved'],'unitId':_0x523705,'subUnitId':_0x18edb4,'text':JSON[_0x1c238d(0x13d)](_0x1cf9bd['content']),'parentId':_0x986a53}),_0x2fdaae=_0x3fae91(_0x2953fb[_0x1c238d(0x13f)][0x0]);return{..._0x2fdaae,'children':_0x2953fb[_0x1c238d(0x13f)]['slice'](0x1)[_0x1c238d(0xf0)](_0x12fd77=>_0x3fae91(_0x12fd77,_0x2fdaae['id']))};}return null;}let S=class{constructor(_0x1083dc,_0x10f3ca,_0x5105fe){const _0x565799=_0x3ccefd;this[_0x565799(0x135)]=_0x1083dc,this[_0x565799(0x14d)]=_0x10f3ca,this[_0x565799(0x120)]=_0x5105fe;}async[_0x3ccefd(0x146)](_0x45f7d0){const _0x3b146d=_0x3ccefd;var _0x41eebf,_0xc142d4;const {parentId:_0x922980,unitId:_0x1d672d,text:_0x655913,threadId:_0x1b6aaa}=_0x45f7d0,_0x391e4f=(_0xc142d4=(_0x41eebf=_0x655913[_0x3b146d(0x129)])==null?void 0x0:_0x41eebf[_0x3b146d(0x109)](_0xd5e750=>_0xd5e750[_0x3b146d(0xf1)]===_0x4ac1a8[_0x3b146d(0x10d)])[_0x3b146d(0xf0)](_0xab0eeb=>_0xab0eeb[_0x3b146d(0x11b)]))!=null?_0xc142d4:[],_0x2faa26=JSON['stringify'](_0x655913),_0x56fe15=(await this[_0x3b146d(0x120)][_0x3b146d(0x11d)](_0x1d672d))[_0x3b146d(0xfc)]();if(_0x922980){const _0x536167={'memberId':_0x56fe15,'unitId':_0x1d672d,'content':_0x2faa26,'mention':_0x391e4f,'threadId':_0x1b6aaa},_0x597694=(await this[_0x3b146d(0x135)][_0x3b146d(0xf3)](_0x3b146d(0xfa)+_0x1d672d+_0x3b146d(0x104),{'body':_0x536167}))[_0x3b146d(0x127)][_0x3b146d(0x134)];return{..._0x45f7d0,'id':_0x597694[_0x3b146d(0x137)],'dT':_0x4e68e8(+_0x597694['createTimestamp'])[_0x3b146d(0xfe)](_0x3b146d(0x14c)),'personId':_0x597694[_0x3b146d(0x150)]};}else{const _0x255ac0={'memberId':_0x56fe15,'unitId':_0x1d672d,'content':_0x2faa26,'mention':_0x391e4f},_0x398d9a=await this[_0x3b146d(0x135)]['post'](_0x3b146d(0xfa)+_0x1d672d+'/add',{'body':_0x255ac0});return X(_0x398d9a[_0x3b146d(0x127)][_0x3b146d(0x101)],_0x45f7d0);}}async[_0x3ccefd(0x111)](_0x20e337){const _0x107189=_0x3ccefd;var _0x312e0e,_0x54be81;const {text:_0x49954d,unitId:_0x407518}=_0x20e337,_0x19a98a=(_0x54be81=(_0x312e0e=_0x49954d[_0x107189(0x129)])==null?void 0x0:_0x312e0e[_0x107189(0x109)](_0x1b6015=>_0x1b6015[_0x107189(0xf1)]===_0x4ac1a8[_0x107189(0x10d)])[_0x107189(0xf0)](_0x2ea468=>_0x2ea468[_0x107189(0x11b)]))!=null?_0x54be81:[],_0x11459d=JSON[_0x107189(0x116)](_0x49954d),_0x334776=_0x20e337[_0x107189(0xf5)],_0x529bd2=_0x20e337['id'],_0x365a24={'memberId':(await this['_sessionService'][_0x107189(0x11d)](_0x407518))[_0x107189(0xfc)](),'unitId':_0x407518,'threadId':_0x334776,'mention':_0x19a98a,'content':_0x11459d,'replyId':_0x529bd2},_0x54e038=await this[_0x107189(0x135)][_0x107189(0xf3)](_0x107189(0xfa)+_0x407518+_0x107189(0x13b),{'body':_0x365a24});return!_0x54e038[_0x107189(0x127)][_0x107189(0xf8)]||_0x54e038[_0x107189(0x127)][_0x107189(0xf8)]['code']===0x1;}async['resolveComment'](_0x1c4381){const _0x1220ca=_0x3ccefd,{unitId:_0x5879ab}=_0x1c4381,_0x1683be=_0x1c4381['threadId'],_0xbc7437={'memberId':this[_0x1220ca(0x14d)][_0x1220ca(0x138)]()[_0x1220ca(0x117)],'unitId':_0x5879ab,'threadId':_0x1683be,'solved':_0x1c4381[_0x1220ca(0x14b)]?I['Solved']:I[_0x1220ca(0x113)]},_0x330228=await this[_0x1220ca(0x135)][_0x1220ca(0xf3)](_0x1220ca(0xfa)+_0x5879ab+_0x1220ca(0x115),{'body':_0xbc7437});return!_0x330228[_0x1220ca(0x127)][_0x1220ca(0xf8)]||_0x330228[_0x1220ca(0x127)]['error'][_0x1220ca(0x13e)]===0x1;}async[_0x3ccefd(0x128)](_0x4f3cda,_0x150a81,_0x45fdd2,_0xa1883b){const _0xbc72d4=_0x3ccefd,_0x384011={'memberId':(await this[_0xbc72d4(0x120)][_0xbc72d4(0x11d)](_0x4f3cda))[_0xbc72d4(0xfc)](),'threadId':_0x45fdd2,'replyId':_0xa1883b,'unitId':_0x4f3cda},_0x126a78=await this[_0xbc72d4(0x135)][_0xbc72d4(0xf3)](_0xbc72d4(0xfa)+_0x4f3cda+_0xbc72d4(0xfd),{'body':_0x384011});return!_0x126a78['body'][_0xbc72d4(0xf8)]||_0x126a78[_0xbc72d4(0x127)][_0xbc72d4(0xf8)][_0xbc72d4(0x13e)]===0x1;}async[_0x3ccefd(0xf6)](_0x4796a9,_0x29db,_0x4969ca){const _0x1dfeec=_0x3ccefd,_0x4c9f8b={'unitId':_0x4796a9,'threadId':_0x4969ca},_0x267ad7=await this[_0x1dfeec(0x135)][_0x1dfeec(0xf3)](_0x1dfeec(0xfa)+_0x4796a9+_0x1dfeec(0x105),{'body':_0x4c9f8b}),_0x553820=_0x4969ca[_0x1dfeec(0xf0)](_0x126f65=>ee(_0x267ad7[_0x1dfeec(0x127)][_0x1dfeec(0x10b)][_0x126f65],_0x4796a9,_0x29db))[_0x1dfeec(0x109)](Boolean);return Object[_0x1dfeec(0x14e)](_0x267ad7[_0x1dfeec(0x127)][_0x1dfeec(0x106)])['forEach'](_0x5d6cf1=>{const _0x3bedd0=_0x1dfeec;this[_0x3bedd0(0x14d)][_0x3bedd0(0x10c)](_0x5d6cf1);}),_0x553820;}[_0x3ccefd(0x10a)](_0x4d5477){const _0x532a03=_0x3ccefd;return{'id':_0x4d5477['id'],'threadId':_0x4d5477[_0x532a03(0xf5)],'ref':_0x4d5477[_0x532a03(0xfb)]};}};S=Q([b(0x0,_0x5c1e64(_0x2cb4a2)),b(0x1,_0x5c1e64(_0x4d85ee)),b(0x2,_0x5c1e64(_0x52cf24))],S);var re=Object[_0x3ccefd(0x12d)],te=(_0x16735f,_0xd526ed,_0x107b61,_0x41fae0)=>{const _0x47c169=_0x3ccefd;for(var _0x456b28=_0x41fae0>0x1?void 0x0:_0x41fae0?re(_0xd526ed,_0x107b61):_0xd526ed,_0x5d4811=_0x16735f[_0x47c169(0x148)]-0x1,_0x8bdefb;_0x5d4811>=0x0;_0x5d4811--)(_0x8bdefb=_0x16735f[_0x5d4811])&&(_0x456b28=_0x8bdefb(_0x456b28)||_0x456b28);return _0x456b28;},M=(_0x181509,_0x3220d4)=>(_0x316aa5,_0x398c1c)=>_0x3220d4(_0x316aa5,_0x398c1c,_0x181509);let f=class extends _0x2cd795{constructor(_0x1d0bd3,_0x176758){const _0x146518=_0x3ccefd;super(),this['_threadCommentDataSourceService']=_0x1d0bd3,this[_0x146518(0x152)]=_0x176758,this[_0x146518(0x140)]();}[_0x3ccefd(0x140)](){const _0x19c71c=_0x3ccefd;this[_0x19c71c(0x147)][_0x19c71c(0x131)]=this[_0x19c71c(0x152)],this[_0x19c71c(0x147)][_0x19c71c(0x108)]=!0x1;}};f=te([M(0x0,_0x241c59),M(0x1,_0x5c1e64(S))],f);var se=Object[_0x3ccefd(0x100)],oe=Object[_0x3ccefd(0x12d)],ne=(_0x3fe621,_0x36983a,_0x49134e)=>_0x36983a in _0x3fe621?se(_0x3fe621,_0x36983a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x49134e}):_0x3fe621[_0x36983a]=_0x49134e,ie=(_0xb59861,_0x18b867,_0x30e764,_0x3d61e1)=>{const _0x26fb94=_0x3ccefd;for(var _0x3d2bf8=_0x3d61e1>0x1?void 0x0:_0x3d61e1?oe(_0x18b867,_0x30e764):_0x18b867,_0x38debd=_0xb59861[_0x26fb94(0x148)]-0x1,_0x32db52;_0x38debd>=0x0;_0x38debd--)(_0x32db52=_0xb59861[_0x38debd])&&(_0x3d2bf8=_0x32db52(_0x3d2bf8)||_0x3d2bf8);return _0x3d2bf8;},N=(_0x3d8e0f,_0x8ff587)=>(_0x174dd2,_0x14e34d)=>_0x8ff587(_0x174dd2,_0x14e34d,_0x3d8e0f),$=(_0x48c3f9,_0x1ed7a5,_0x3a4819)=>ne(_0x48c3f9,typeof _0x1ed7a5!='symbol'?_0x1ed7a5+'':_0x1ed7a5,_0x3a4819);let g=class extends _0x1c4223{constructor(_0x2de67e=O,_0x445e94,_0xa998df){const _0x22417c=_0x3ccefd;super(),this[_0x22417c(0x13c)]=_0x2de67e,this['_injector']=_0x445e94,this['_configService']=_0xa998df;const {..._0x5c02f3}=_0x1a1877({},O,this[_0x22417c(0x13c)]);this[_0x22417c(0x119)][_0x22417c(0x11a)](z,_0x5c02f3);}['onStarting'](){const _0x1aaef6=_0x3ccefd;[[S],[f],[_]][_0x1aaef6(0x10e)](_0x25a859=>{const _0x3215da=_0x1aaef6;this[_0x3215da(0x144)][_0x3215da(0x13a)](_0x25a859);});}[_0x3ccefd(0x141)](){const _0x226725=_0x3ccefd;this[_0x226725(0x144)][_0x226725(0x107)](f),this['_injector'][_0x226725(0x107)](_);}};$(g,_0x3ccefd(0x10f),W),$(g,_0x3ccefd(0xec),_0x5f0730[_0x3ccefd(0x12b)]),g=ie([_0x7f6732(_0xe87a7f,_0x12ae43,_0x38eead),N(0x1,_0x5c1e64(_0x31e86f)),N(0x2,_0x405fde)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
function _0x243a(_0x50dc7e,_0x2ffada){const _0x290111=_0x2901();return _0x243a=function(_0x243a27,_0x4c55b7){_0x243a27=_0x243a27-0xe6;let _0x4305bb=_0x290111[_0x243a27];return _0x4305bb;},_0x243a(_0x50dc7e,_0x2ffada);}const _0x956842=_0x243a;(function(_0x5079eb,_0x1c2770){const _0x137e76=_0x243a,_0x23b293=_0x5079eb();while(!![]){try{const _0x55df3c=parseInt(_0x137e76(0x13a))/0x1*(parseInt(_0x137e76(0xec))/0x2)+parseInt(_0x137e76(0x132))/0x3*(parseInt(_0x137e76(0x11e))/0x4)+-parseInt(_0x137e76(0xea))/0x5+parseInt(_0x137e76(0x11f))/0x6*(parseInt(_0x137e76(0xf2))/0x7)+-parseInt(_0x137e76(0x14e))/0x8*(-parseInt(_0x137e76(0x118))/0x9)+parseInt(_0x137e76(0x10b))/0xa*(parseInt(_0x137e76(0xfa))/0xb)+parseInt(_0x137e76(0x125))/0xc*(-parseInt(_0x137e76(0x12d))/0xd);if(_0x55df3c===_0x1c2770)break;else _0x23b293['push'](_0x23b293['shift']());}catch(_0x5a687d){_0x23b293['push'](_0x23b293['shift']());}}}(_0x2901,0x9f485));import{CommentService as _0x403a4b,CollaborationSessionService as _0x5904f9,UniverCollaborationClientPlugin as _0x3802b1}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x17a341}from'@univerjs-pro/license';import{dayjs as _0x3e920d,UserManagerService as _0x55f5e7,Inject as _0x388faa,Injector as _0x469aaf,Disposable as _0x3fbff2,CustomRangeType as _0x558957,UniverInstanceType as _0x16ec5a,DependentOn as _0x23d00e,IConfigService as _0x1759fb,Plugin as _0x16d0b0,merge as _0x32f0bd}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4b75f2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x411c90,IThreadCommentDataSourceService as _0x2efa6a}from'@univerjs/thread-comment';import{bufferTime as _0x2e0e87}from'rxjs';import{HTTPService as _0x59a722}from'@univerjs/network';const W=_0x956842(0xe6);var I=(_0x530b6e=>(_0x530b6e[_0x530b6e[_0x956842(0x11c)]=0x0]=_0x956842(0x11c),_0x530b6e[_0x530b6e[_0x956842(0x11d)]=0x1]=_0x956842(0x11d),_0x530b6e[_0x530b6e[_0x956842(0x110)]=-0x1]='UNRECOGNIZED',_0x530b6e))(I||{}),v=(_0x1ec410=>(_0x1ec410[_0x1ec410[_0x956842(0xef)]=0x0]=_0x956842(0xef),_0x1ec410[_0x1ec410[_0x956842(0x127)]=0x1]='Add',_0x1ec410[_0x1ec410[_0x956842(0x142)]=0x2]='Reply',_0x1ec410[_0x1ec410[_0x956842(0x116)]=0x3]=_0x956842(0x116),_0x1ec410[_0x1ec410['Delete']=0x4]=_0x956842(0x105),_0x1ec410[_0x1ec410['Solve']=0x5]='Solve',_0x1ec410[_0x1ec410['UNRECOGNIZED']=-0x1]=_0x956842(0x110),_0x1ec410))(v||{});const y=_0x1ed2c=>_0x3e920d(new Date(+_0x1ed2c))['format'](_0x956842(0x146)),B=async(_0x427779,_0x3dc734)=>{const _0xba1855=_0x956842,_0x4c81d4=_0x427779['get'](_0x55f5e7),_0x4da8b4=_0x427779[_0xba1855(0x104)](_0x59a722);_0x3dc734[_0xba1855(0xf9)](_0x2f6e96=>{const _0x5db7fb=_0xba1855;_0x4c81d4[_0x5db7fb(0xfb)](_0x2f6e96)&&_0x3dc734[_0x5db7fb(0x12b)](_0x2f6e96);}),_0x3dc734[_0xba1855(0x139)]&&(await _0x4da8b4[_0xba1855(0x104)](_0xba1855(0x13e),{'params':{'userIDs':[..._0x3dc734]}}))[_0xba1855(0xe7)][_0xba1855(0x114)][_0xba1855(0xf9)](_0x28eb97=>{const _0x87b5d7=_0xba1855;_0x28eb97&&_0x4c81d4[_0x87b5d7(0xee)](_0x28eb97);});};function _0x2901(){const _0x48b080=['623718QKajwB','_httpService','rangeId','thread-comment-data-source.config','OpenOrReOpen','Solved','4btnRLq','415542oIynic','replyId','onStarting','customRanges','symbol','_initUserSync','57768WKSNZD','threadId','Add','syncUpdateMutationToColla','_threadCommentDataSourceService','COMMENT','delete','_sessionService','923HtBIIo','_config','Solve','listComments','/delete','885480piMWoC','_userService','disposeWithMe','post','type','pipe','_commentService','size','11mlWGhU','values','resolveComment','content','/universer-api/user/list','getUnit','/solved','error','Reply','UNIVER_UNKNOWN','addComment','/edit','YYYY/MM/DD\x20HH:mm','updateComment','deleteComment','format','_threadCommentModel','solved','parentId','payload','80ZsIGZc','createTimestamp','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','body','onReady','map','2331295mWHlbM','userID','47198vgyGVD','getOwnPropertyDescriptor','addUser','Unknown','_initDataSource','find','7piVRtL','_threadCommentDataSource','replies','defineProperty','add','stringify','requireSession','forEach','44KTHrcO','getUser','commentUpdate$','comment','code','parse','personId','subscribe','length','root','get','Delete','user','ref','userId','filter','getMemberID','358620MbbeEp','_configService','unitId','_injector','_init','UNRECOGNIZED','getCurrentUser','comments','getComment','users','/universer-api/comment/unit/','Edit','pluginName'];_0x2901=function(){return _0x48b080;};return _0x2901();}var K=Object[_0x956842(0xed)],V=(_0x39eb99,_0x109956,_0x307906,_0x333a6d)=>{for(var _0x4973ff=_0x333a6d>0x1?void 0x0:_0x333a6d?K(_0x109956,_0x307906):_0x109956,_0x2052a6=_0x39eb99['length']-0x1,_0x2f23c5;_0x2052a6>=0x0;_0x2052a6--)(_0x2f23c5=_0x39eb99[_0x2052a6])&&(_0x4973ff=_0x2f23c5(_0x4973ff)||_0x4973ff);return _0x4973ff;},p=(_0xa5c78e,_0x2ed838)=>(_0x2019fc,_0xef746d)=>_0x2ed838(_0x2019fc,_0xef746d,_0xa5c78e);let _=class extends _0x3fbff2{constructor(_0x5d3458,_0x1875b5,_0x4dddbb,_0x240d49){const _0x1a3d24=_0x956842;super(),this[_0x1a3d24(0x138)]=_0x5d3458,this['_threadCommentModel']=_0x1875b5,this[_0x1a3d24(0x133)]=_0x4dddbb,this['_injector']=_0x240d49,this[_0x1a3d24(0x10f)](),this[_0x1a3d24(0x124)]();}[_0x956842(0x124)](){const _0x4662b4=_0x956842;this[_0x4662b4(0x134)](this['_threadCommentModel']['commentUpdate$'][_0x4662b4(0x137)](_0x2e0e87(0x10))[_0x4662b4(0x101)](_0x52e62c=>{const _0xcffc11=_0x4662b4,_0x2d98cf=new Set();_0x52e62c[_0xcffc11(0xf9)](_0x262d99=>{const _0x4e8b2f=_0xcffc11;switch(_0x262d99[_0x4e8b2f(0x136)]){case _0x4e8b2f(0xf6):{const _0x3bd4a8=_0x262d99[_0x4e8b2f(0x14d)][_0x4e8b2f(0x100)];_0x2d98cf['add'](_0x3bd4a8);break;}}}),B(this['_injector'],_0x2d98cf);}));}['_init'](){const _0x35069c=_0x956842;this[_0x35069c(0x134)](this['_commentService'][_0x35069c(0xfc)][_0x35069c(0x101)](async _0x941f38=>{const _0xe8fb09=_0x35069c;var _0x40e9d0,_0x4794c5,_0x21d1a5,_0x3d2411;const _0x222bc8=(_0x40e9d0=this[_0xe8fb09(0x14a)][_0xe8fb09(0x13f)](_0x941f38[_0xe8fb09(0x10d)])[_0xe8fb09(0xf1)](_0x72d09=>_0x72d09[_0xe8fb09(0x126)]===_0x941f38['threadId']))==null?void 0x0:_0x40e9d0[_0xe8fb09(0x103)];if(!_0x222bc8)return;const {unitId:_0xdc874d,subUnitId:_0xe4fe24}=_0x222bc8;switch(_0x941f38[_0xe8fb09(0x106)]&&this['_userService'][_0xe8fb09(0xee)](_0x941f38['user']),_0x941f38[_0xe8fb09(0x136)]){case v['Add']:break;case v['Reply']:{this[_0xe8fb09(0x14a)][_0xe8fb09(0x144)](_0xdc874d,_0xe4fe24,{'unitId':_0xdc874d,'subUnitId':_0xe4fe24,'ref':'','id':_0x941f38['replyId'],'dT':y(+_0x941f38[_0xe8fb09(0x14f)]),'threadId':_0x941f38['threadId'],'personId':(_0x21d1a5=(_0x4794c5=_0x941f38[_0xe8fb09(0x106)])==null?void 0x0:_0x4794c5[_0xe8fb09(0xeb)])!=null?_0x21d1a5:_0x941f38[_0xe8fb09(0x108)],'text':JSON[_0xe8fb09(0xff)](_0x941f38[_0xe8fb09(0x13d)]),'parentId':_0x222bc8['id']});break;}case v[_0xe8fb09(0x105)]:{const _0x4f27dc=this[_0xe8fb09(0x14a)][_0xe8fb09(0x113)](_0xdc874d,_0xe4fe24,_0x941f38[_0xe8fb09(0x120)]);_0x4f27dc&&_0x4f27dc[_0xe8fb09(0x14c)]&&this[_0xe8fb09(0x14a)][_0xe8fb09(0x148)](_0xdc874d,_0xe4fe24,_0x941f38['replyId']);break;}case v[_0xe8fb09(0x116)]:{this[_0xe8fb09(0x14a)][_0xe8fb09(0x147)](_0xdc874d,_0xe4fe24,{'commentId':_0x941f38[_0xe8fb09(0x120)],'text':JSON[_0xe8fb09(0xff)](_0x941f38['content'])});break;}case v[_0xe8fb09(0x12f)]:{const _0x23a64f=(_0x3d2411=this[_0xe8fb09(0x14a)]['getUnit'](_0x941f38['unitId'])['find'](_0x52ecb5=>_0x52ecb5[_0xe8fb09(0x126)]===_0x941f38[_0xe8fb09(0x126)]))==null?void 0x0:_0x3d2411['root'];_0x23a64f&&this[_0xe8fb09(0x14a)][_0xe8fb09(0x13c)](_0xdc874d,_0xe4fe24,_0x23a64f['id'],_0x941f38[_0xe8fb09(0x14b)]===I[_0xe8fb09(0x11d)]);break;}}}));}};_=V([p(0x0,_0x388faa(_0x403a4b)),p(0x1,_0x388faa(_0x411c90)),p(0x2,_0x388faa(_0x55f5e7)),p(0x3,_0x388faa(_0x469aaf))],_);const z=_0x956842(0x11b),O={};var k=Object[_0x956842(0xed)],Q=(_0x302ede,_0x3d65f6,_0x8f7c97,_0x51c1e0)=>{for(var _0xf13b86=_0x51c1e0>0x1?void 0x0:_0x51c1e0?k(_0x3d65f6,_0x8f7c97):_0x3d65f6,_0x1c01c6=_0x302ede['length']-0x1,_0x5a5ce4;_0x1c01c6>=0x0;_0x1c01c6--)(_0x5a5ce4=_0x302ede[_0x1c01c6])&&(_0xf13b86=_0x5a5ce4(_0xf13b86)||_0xf13b86);return _0xf13b86;},b=(_0x1ef184,_0x4c3b75)=>(_0x347115,_0x3f53b4)=>_0x4c3b75(_0x347115,_0x3f53b4,_0x1ef184);function X(_0x4c380b,_0x59cce5){const _0x2ae662=_0x956842,_0x13d7a8=_0x4c380b[_0x2ae662(0xf4)][0x0];return{..._0x59cce5,'id':_0x13d7a8[_0x2ae662(0x120)],'resolved':_0x4c380b[_0x2ae662(0x14b)]===0x1,'dT':y(_0x13d7a8['createTimestamp']),'personId':_0x13d7a8[_0x2ae662(0x108)],'threadId':_0x13d7a8['threadId']};}function ee(_0x57b8dd,_0x336cd5,_0x3ad42c){const _0xaa05fa=_0x956842;var _0x4b699c,_0x1621c5;if(((_0x1621c5=(_0x4b699c=_0x57b8dd==null?void 0x0:_0x57b8dd['replies'])==null?void 0x0:_0x4b699c[_0xaa05fa(0x102)])!=null?_0x1621c5:0x0)>0x0){const _0x258ccc=(_0x3ee5ac,_0x1e6995)=>({'id':_0x3ee5ac[_0xaa05fa(0x120)],'threadId':_0x3ee5ac['threadId'],'dT':y(_0x3ee5ac[_0xaa05fa(0x14f)]),'personId':_0x3ee5ac[_0xaa05fa(0x108)],'resolved':_0x57b8dd[_0xaa05fa(0x14b)]===I[_0xaa05fa(0x11d)],'unitId':_0x336cd5,'subUnitId':_0x3ad42c,'text':JSON[_0xaa05fa(0xff)](_0x3ee5ac[_0xaa05fa(0x13d)]),'parentId':_0x1e6995}),_0xc7b3eb=_0x258ccc(_0x57b8dd['replies'][0x0]);return{..._0xc7b3eb,'children':_0x57b8dd[_0xaa05fa(0xf4)]['slice'](0x1)[_0xaa05fa(0xe9)](_0x4dcd08=>_0x258ccc(_0x4dcd08,_0xc7b3eb['id']))};}return null;}let S=class{constructor(_0x124ede,_0x2637eb,_0x20918a){const _0x6518f3=_0x956842;this['_httpService']=_0x124ede,this[_0x6518f3(0x133)]=_0x2637eb,this[_0x6518f3(0x12c)]=_0x20918a;}async[_0x956842(0x144)](_0x31fd1c){const _0x3f9f13=_0x956842;var _0x204986,_0xca1818;const {parentId:_0x1c2f71,unitId:_0x1b9b5c,text:_0x2c7406,threadId:_0x4752ef}=_0x31fd1c,_0x275b9c=(_0xca1818=(_0x204986=_0x2c7406[_0x3f9f13(0x122)])==null?void 0x0:_0x204986[_0x3f9f13(0x109)](_0x55cfd8=>_0x55cfd8['rangeType']===_0x558957[_0x3f9f13(0x12a)])[_0x3f9f13(0xe9)](_0x227f18=>_0x227f18['rangeId']))!=null?_0xca1818:[],_0xf87d93=JSON[_0x3f9f13(0xf7)](_0x2c7406),_0x41b0f3=(await this[_0x3f9f13(0x12c)][_0x3f9f13(0xf8)](_0x1b9b5c))['getMemberID']();if(_0x1c2f71){const _0x334645={'memberId':_0x41b0f3,'unitId':_0x1b9b5c,'content':_0xf87d93,'mention':_0x275b9c,'threadId':_0x4752ef},_0x4b45fa=(await this[_0x3f9f13(0x119)]['post']('/universer-api/comment/unit/'+_0x1b9b5c+'/reply',{'body':_0x334645}))[_0x3f9f13(0xe7)]['reply'];return{..._0x31fd1c,'id':_0x4b45fa[_0x3f9f13(0x120)],'dT':_0x3e920d(+_0x4b45fa[_0x3f9f13(0x14f)])[_0x3f9f13(0x149)](_0x3f9f13(0x146)),'personId':_0x4b45fa['userId']};}else{const _0x1c8531={'memberId':_0x41b0f3,'unitId':_0x1b9b5c,'content':_0xf87d93,'mention':_0x275b9c},_0x53880d=await this[_0x3f9f13(0x119)][_0x3f9f13(0x135)]('/universer-api/comment/unit/'+_0x1b9b5c+'/add',{'body':_0x1c8531});return X(_0x53880d[_0x3f9f13(0xe7)][_0x3f9f13(0xfd)],_0x31fd1c);}}async[_0x956842(0x147)](_0x4a18c5){const _0x42f38f=_0x956842;var _0x26e246,_0x1a8df5;const {text:_0x56ecca,unitId:_0xf0e616}=_0x4a18c5,_0x4ec138=(_0x1a8df5=(_0x26e246=_0x56ecca[_0x42f38f(0x122)])==null?void 0x0:_0x26e246[_0x42f38f(0x109)](_0x5b3388=>_0x5b3388['rangeType']===_0x558957['COMMENT'])['map'](_0x345545=>_0x345545[_0x42f38f(0x11a)]))!=null?_0x1a8df5:[],_0x345d78=JSON[_0x42f38f(0xf7)](_0x56ecca),_0x55c176=_0x4a18c5['threadId'],_0x5ab3b5=_0x4a18c5['id'],_0x113690={'memberId':(await this[_0x42f38f(0x12c)]['requireSession'](_0xf0e616))[_0x42f38f(0x10a)](),'unitId':_0xf0e616,'threadId':_0x55c176,'mention':_0x4ec138,'content':_0x345d78,'replyId':_0x5ab3b5},_0x549625=await this[_0x42f38f(0x119)][_0x42f38f(0x135)](_0x42f38f(0x115)+_0xf0e616+_0x42f38f(0x145),{'body':_0x113690});return!_0x549625[_0x42f38f(0xe7)][_0x42f38f(0x141)]||_0x549625[_0x42f38f(0xe7)][_0x42f38f(0x141)][_0x42f38f(0xfe)]===0x1;}async[_0x956842(0x13c)](_0x385737){const _0x324e5c=_0x956842,{unitId:_0x2b620f}=_0x385737,_0x13b3b4=_0x385737[_0x324e5c(0x126)],_0x5b351c={'memberId':this[_0x324e5c(0x133)][_0x324e5c(0x111)]()[_0x324e5c(0xeb)],'unitId':_0x2b620f,'threadId':_0x13b3b4,'solved':_0x385737['resolved']?I[_0x324e5c(0x11d)]:I['OpenOrReOpen']},_0x1f4c16=await this[_0x324e5c(0x119)][_0x324e5c(0x135)]('/universer-api/comment/unit/'+_0x2b620f+_0x324e5c(0x140),{'body':_0x5b351c});return!_0x1f4c16[_0x324e5c(0xe7)]['error']||_0x1f4c16[_0x324e5c(0xe7)][_0x324e5c(0x141)][_0x324e5c(0xfe)]===0x1;}async['deleteComment'](_0x4270ad,_0x29fd95,_0xaad581,_0x3d79cd){const _0x44ff0e=_0x956842,_0x3a0cd0={'memberId':(await this[_0x44ff0e(0x12c)][_0x44ff0e(0xf8)](_0x4270ad))['getMemberID'](),'threadId':_0xaad581,'replyId':_0x3d79cd,'unitId':_0x4270ad},_0x395fd6=await this[_0x44ff0e(0x119)][_0x44ff0e(0x135)](_0x44ff0e(0x115)+_0x4270ad+_0x44ff0e(0x131),{'body':_0x3a0cd0});return!_0x395fd6[_0x44ff0e(0xe7)][_0x44ff0e(0x141)]||_0x395fd6[_0x44ff0e(0xe7)][_0x44ff0e(0x141)]['code']===0x1;}async[_0x956842(0x130)](_0x5498c0,_0x5eb2b6,_0x2d5c00){const _0x28e2d9=_0x956842,_0x1137ab={'unitId':_0x5498c0,'threadId':_0x2d5c00},_0xf1d849=await this['_httpService']['post'](_0x28e2d9(0x115)+_0x5498c0+'/list',{'body':_0x1137ab}),_0x24fac9=_0x2d5c00[_0x28e2d9(0xe9)](_0x264b43=>ee(_0xf1d849['body'][_0x28e2d9(0x112)][_0x264b43],_0x5498c0,_0x5eb2b6))['filter'](Boolean);return Object[_0x28e2d9(0x13b)](_0xf1d849[_0x28e2d9(0xe7)][_0x28e2d9(0x114)])['forEach'](_0x5c7149=>{const _0x59a7a7=_0x28e2d9;this['_userService'][_0x59a7a7(0xee)](_0x5c7149);}),_0x24fac9;}['saveCommentToSnapshot'](_0x44f4d7){const _0x4d650c=_0x956842;return{'id':_0x44f4d7['id'],'threadId':_0x44f4d7[_0x4d650c(0x126)],'ref':_0x44f4d7[_0x4d650c(0x107)]};}};S=Q([b(0x0,_0x388faa(_0x59a722)),b(0x1,_0x388faa(_0x55f5e7)),b(0x2,_0x388faa(_0x5904f9))],S);var re=Object[_0x956842(0xed)],te=(_0x28e891,_0x1eecb4,_0x18e04b,_0x4ba75d)=>{const _0x204eb6=_0x956842;for(var _0x1e4226=_0x4ba75d>0x1?void 0x0:_0x4ba75d?re(_0x1eecb4,_0x18e04b):_0x1eecb4,_0x53c6eb=_0x28e891[_0x204eb6(0x102)]-0x1,_0xf586cd;_0x53c6eb>=0x0;_0x53c6eb--)(_0xf586cd=_0x28e891[_0x53c6eb])&&(_0x1e4226=_0xf586cd(_0x1e4226)||_0x1e4226);return _0x1e4226;},M=(_0x313d98,_0x5b8d07)=>(_0x3b1760,_0x2ef73a)=>_0x5b8d07(_0x3b1760,_0x2ef73a,_0x313d98);let f=class extends _0x3fbff2{constructor(_0x229eca,_0x4e2365){const _0x50bb22=_0x956842;super(),this['_threadCommentDataSourceService']=_0x229eca,this[_0x50bb22(0xf3)]=_0x4e2365,this[_0x50bb22(0xf0)]();}[_0x956842(0xf0)](){const _0x1e648b=_0x956842;this[_0x1e648b(0x129)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x1e648b(0x128)]=!0x1;}};f=te([M(0x0,_0x2efa6a),M(0x1,_0x388faa(S))],f);var se=Object[_0x956842(0xf5)],oe=Object[_0x956842(0xed)],ne=(_0x247e7d,_0x4462e6,_0x394e7e)=>_0x4462e6 in _0x247e7d?se(_0x247e7d,_0x4462e6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x394e7e}):_0x247e7d[_0x4462e6]=_0x394e7e,ie=(_0x314c32,_0x17d4cc,_0x5828f0,_0x37f6de)=>{const _0x385a6a=_0x956842;for(var _0x357c99=_0x37f6de>0x1?void 0x0:_0x37f6de?oe(_0x17d4cc,_0x5828f0):_0x17d4cc,_0x195918=_0x314c32[_0x385a6a(0x102)]-0x1,_0x3d119f;_0x195918>=0x0;_0x195918--)(_0x3d119f=_0x314c32[_0x195918])&&(_0x357c99=_0x3d119f(_0x357c99)||_0x357c99);return _0x357c99;},N=(_0x4dfbab,_0x436cf6)=>(_0xacb57,_0x24b764)=>_0x436cf6(_0xacb57,_0x24b764,_0x4dfbab),$=(_0x37a608,_0x4fe0b5,_0xda5cba)=>ne(_0x37a608,typeof _0x4fe0b5!=_0x956842(0x123)?_0x4fe0b5+'':_0x4fe0b5,_0xda5cba);let g=class extends _0x16d0b0{constructor(_0x56a7ed=O,_0x15a610,_0x572da2){const _0x2ff10a=_0x956842;super(),this[_0x2ff10a(0x12e)]=_0x56a7ed,this[_0x2ff10a(0x10e)]=_0x15a610,this[_0x2ff10a(0x10c)]=_0x572da2;const {..._0x496091}=_0x32f0bd({},O,this[_0x2ff10a(0x12e)]);this[_0x2ff10a(0x10c)]['setConfig'](z,_0x496091);}[_0x956842(0x121)](){[[S],[f],[_]]['forEach'](_0x5b2cfd=>{const _0x18cbe0=_0x243a;this[_0x18cbe0(0x10e)][_0x18cbe0(0xf6)](_0x5b2cfd);});}[_0x956842(0xe8)](){const _0x1a50d7=_0x956842;this['_injector']['get'](f),this[_0x1a50d7(0x10e)][_0x1a50d7(0x104)](_);}};$(g,_0x956842(0x117),W),$(g,_0x956842(0x136),_0x16ec5a[_0x956842(0x143)]),g=ie([_0x23d00e(_0x4b75f2,_0x3802b1,_0x17a341),N(0x1,_0x388faa(_0x469aaf)),N(0x2,_0x1759fb)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3ccefd=_0x31d0;(function(_0x5ebe59,_0x22eb5f){const _0x31856b=_0x31d0,_0x130a96=_0x5ebe59();while(!![]){try{const _0x103ec5=parseInt(_0x31856b(0x149))/0x1+parseInt(_0x31856b(0x114))/0x2+parseInt(_0x31856b(0x14a))/0x3*(-parseInt(_0x31856b(0x126))/0x4)+-parseInt(_0x31856b(0x102))/0x5+parseInt(_0x31856b(0xf4))/0x6+-parseInt(_0x31856b(0xf9))/0x7*(parseInt(_0x31856b(0x145))/0x8)+parseInt(_0x31856b(0xff))/0x9;if(_0x103ec5===_0x22eb5f)break;else _0x130a96['push'](_0x130a96['shift']());}catch(_0x548ed6){_0x130a96['push'](_0x130a96['shift']());}}}(_0x3b75,0x88f40));import{CommentService as _0x11f515,CollaborationSessionService as _0x52cf24,UniverCollaborationClientPlugin as _0x12ae43}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x38eead}from'@univerjs-pro/license';import{dayjs as _0x4e68e8,UserManagerService as _0x4d85ee,Inject as _0x5c1e64,Injector as _0x31e86f,Disposable as _0x2cd795,CustomRangeType as _0x4ac1a8,UniverInstanceType as _0x5f0730,DependentOn as _0x7f6732,IConfigService as _0x405fde,Plugin as _0x1c4223,merge as _0x1a1877}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xe87a7f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x37ae10,IThreadCommentDataSourceService as _0x241c59}from'@univerjs/thread-comment';import{bufferTime as _0x56fda4}from'rxjs';import{HTTPService as _0x2cb4a2}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2abd50=>(_0x2abd50[_0x2abd50['OpenOrReOpen']=0x0]=_0x3ccefd(0x113),_0x2abd50[_0x2abd50[_0x3ccefd(0x118)]=0x1]=_0x3ccefd(0x118),_0x2abd50[_0x2abd50['UNRECOGNIZED']=-0x1]=_0x3ccefd(0x143),_0x2abd50))(I||{}),v=(_0x107047=>(_0x107047[_0x107047[_0x3ccefd(0x12a)]=0x0]=_0x3ccefd(0x12a),_0x107047[_0x107047[_0x3ccefd(0xf7)]=0x1]=_0x3ccefd(0xf7),_0x107047[_0x107047['Reply']=0x2]=_0x3ccefd(0x125),_0x107047[_0x107047[_0x3ccefd(0x112)]=0x3]='Edit',_0x107047[_0x107047[_0x3ccefd(0x110)]=0x4]=_0x3ccefd(0x110),_0x107047[_0x107047[_0x3ccefd(0x121)]=0x5]=_0x3ccefd(0x121),_0x107047[_0x107047['UNRECOGNIZED']=-0x1]=_0x3ccefd(0x143),_0x107047))(v||{});const y=_0x2866e2=>_0x4e68e8(new Date(+_0x2866e2))[_0x3ccefd(0xfe)](_0x3ccefd(0x14c)),B=async(_0x374df5,_0x5aa73e)=>{const _0x569b22=_0x3ccefd,_0x5ab53f=_0x374df5[_0x569b22(0x107)](_0x4d85ee),_0x25f72d=_0x374df5[_0x569b22(0x107)](_0x2cb4a2);_0x5aa73e['forEach'](_0x204518=>{const _0x573f43=_0x569b22;_0x5ab53f['getUser'](_0x204518)&&_0x5aa73e[_0x573f43(0x139)](_0x204518);}),_0x5aa73e[_0x569b22(0x12e)]&&(await _0x25f72d[_0x569b22(0x107)](_0x569b22(0xef),{'params':{'userIDs':[..._0x5aa73e]}}))[_0x569b22(0x127)]['users'][_0x569b22(0x10e)](_0x6955af=>{const _0x192893=_0x569b22;_0x6955af&&_0x5ab53f[_0x192893(0x10c)](_0x6955af);});};var K=Object[_0x3ccefd(0x12d)],V=(_0x7fa101,_0x57a0ef,_0x152c37,_0x13fac5)=>{const _0x1013b6=_0x3ccefd;for(var _0x3dac30=_0x13fac5>0x1?void 0x0:_0x13fac5?K(_0x57a0ef,_0x152c37):_0x57a0ef,_0x4553b8=_0x7fa101[_0x1013b6(0x148)]-0x1,_0x5d89b6;_0x4553b8>=0x0;_0x4553b8--)(_0x5d89b6=_0x7fa101[_0x4553b8])&&(_0x3dac30=_0x5d89b6(_0x3dac30)||_0x3dac30);return _0x3dac30;},p=(_0x1ba73e,_0x3b9ac2)=>(_0x57402e,_0x5109e4)=>_0x3b9ac2(_0x57402e,_0x5109e4,_0x1ba73e);function _0x31d0(_0x210e77,_0x483dd1){const _0x3b758=_0x3b75();return _0x31d0=function(_0x31d025,_0x45120c){_0x31d025=_0x31d025-0xec;let _0x3bb48e=_0x3b758[_0x31d025];return _0x3bb48e;},_0x31d0(_0x210e77,_0x483dd1);}let _=class extends _0x2cd795{constructor(_0x274955,_0x4fb634,_0x5b6808,_0x765ab2){const _0x1049da=_0x3ccefd;super(),this['_commentService']=_0x274955,this['_threadCommentModel']=_0x4fb634,this[_0x1049da(0x14d)]=_0x5b6808,this[_0x1049da(0x144)]=_0x765ab2,this[_0x1049da(0x103)](),this[_0x1049da(0x124)]();}[_0x3ccefd(0x124)](){const _0x5d0790=_0x3ccefd;this[_0x5d0790(0x11e)](this[_0x5d0790(0xee)][_0x5d0790(0x12f)]['pipe'](_0x56fda4(0x10))[_0x5d0790(0x122)](_0xae9b10=>{const _0x2751eb=_0x5d0790,_0x35c84b=new Set();_0xae9b10[_0x2751eb(0x10e)](_0x33dcae=>{const _0x17442d=_0x2751eb;switch(_0x33dcae[_0x17442d(0xec)]){case'add':{const _0x20347d=_0x33dcae[_0x17442d(0x132)]['personId'];_0x35c84b[_0x17442d(0x13a)](_0x20347d);break;}}}),B(this[_0x2751eb(0x144)],_0x35c84b);}));}[_0x3ccefd(0x103)](){const _0x281a8a=_0x3ccefd;this['disposeWithMe'](this[_0x281a8a(0x11c)]['commentUpdate$'][_0x281a8a(0x122)](async _0x2f2ffc=>{const _0x3df794=_0x281a8a;var _0x264cdc,_0x38a36f,_0x33f983,_0x3893b5;const _0x178381=(_0x264cdc=this[_0x3df794(0xee)][_0x3df794(0xf2)](_0x2f2ffc[_0x3df794(0x136)])[_0x3df794(0x12c)](_0x4a0aa=>_0x4a0aa[_0x3df794(0xf5)]===_0x2f2ffc[_0x3df794(0xf5)]))==null?void 0x0:_0x264cdc[_0x3df794(0x133)];if(!_0x178381)return;const {unitId:_0x218998,subUnitId:_0x41ceef}=_0x178381;switch(_0x2f2ffc[_0x3df794(0x14f)]&&this['_userService'][_0x3df794(0x10c)](_0x2f2ffc['user']),_0x2f2ffc[_0x3df794(0xec)]){case v[_0x3df794(0xf7)]:break;case v['Reply']:{this[_0x3df794(0xee)][_0x3df794(0x146)](_0x218998,_0x41ceef,{'unitId':_0x218998,'subUnitId':_0x41ceef,'ref':'','id':_0x2f2ffc[_0x3df794(0x137)],'dT':y(+_0x2f2ffc['createTimestamp']),'threadId':_0x2f2ffc[_0x3df794(0xf5)],'personId':(_0x33f983=(_0x38a36f=_0x2f2ffc['user'])==null?void 0x0:_0x38a36f[_0x3df794(0x117)])!=null?_0x33f983:_0x2f2ffc[_0x3df794(0x150)],'text':JSON[_0x3df794(0x13d)](_0x2f2ffc[_0x3df794(0x130)]),'parentId':_0x178381['id']});break;}case v[_0x3df794(0x110)]:{const _0x305619=this['_threadCommentModel']['getComment'](_0x218998,_0x41ceef,_0x2f2ffc[_0x3df794(0x137)]);_0x305619&&_0x305619[_0x3df794(0x123)]&&this[_0x3df794(0xee)][_0x3df794(0x128)](_0x218998,_0x41ceef,_0x2f2ffc['replyId']);break;}case v[_0x3df794(0x112)]:{this[_0x3df794(0xee)][_0x3df794(0x111)](_0x218998,_0x41ceef,{'commentId':_0x2f2ffc[_0x3df794(0x137)],'text':JSON['parse'](_0x2f2ffc[_0x3df794(0x130)])});break;}case v[_0x3df794(0x121)]:{const _0x24a089=(_0x3893b5=this['_threadCommentModel'][_0x3df794(0xf2)](_0x2f2ffc[_0x3df794(0x136)])[_0x3df794(0x12c)](_0xd45349=>_0xd45349['threadId']===_0x2f2ffc[_0x3df794(0xf5)]))==null?void 0x0:_0x3893b5['root'];_0x24a089&&this[_0x3df794(0xee)][_0x3df794(0x151)](_0x218998,_0x41ceef,_0x24a089['id'],_0x2f2ffc[_0x3df794(0x142)]===I[_0x3df794(0x118)]);break;}}}));}};_=V([p(0x0,_0x5c1e64(_0x11f515)),p(0x1,_0x5c1e64(_0x37ae10)),p(0x2,_0x5c1e64(_0x4d85ee)),p(0x3,_0x5c1e64(_0x31e86f))],_);const z=_0x3ccefd(0xed),O={};var k=Object[_0x3ccefd(0x12d)],Q=(_0x49c27c,_0xf52f21,_0x2afed6,_0x5c1fb0)=>{for(var _0x585dc9=_0x5c1fb0>0x1?void 0x0:_0x5c1fb0?k(_0xf52f21,_0x2afed6):_0xf52f21,_0x46f74e=_0x49c27c['length']-0x1,_0x51b0d3;_0x46f74e>=0x0;_0x46f74e--)(_0x51b0d3=_0x49c27c[_0x46f74e])&&(_0x585dc9=_0x51b0d3(_0x585dc9)||_0x585dc9);return _0x585dc9;},b=(_0x9467c4,_0x594426)=>(_0x26ff81,_0x17203d)=>_0x594426(_0x26ff81,_0x17203d,_0x9467c4);function _0x3b75(){const _0x1b25a9=['length','678751IzuesV','102wVuUhu','resolved','YYYY/MM/DD\x20HH:mm','_userService','values','user','userId','resolveComment','_threadCommentDataSource','type','thread-comment-data-source.config','_threadCommentModel','/universer-api/user/list','map','rangeType','getUnit','post','2221356YdmSXd','threadId','listComments','Add','error','21TVhohE','/universer-api/comment/unit/','ref','getMemberID','/delete','format','6148818sDMiDc','defineProperty','comment','3131365cEGDqf','_init','/reply','/list','users','get','syncUpdateMutationToColla','filter','saveCommentToSnapshot','comments','addUser','COMMENT','forEach','pluginName','Delete','updateComment','Edit','OpenOrReOpen','1152250SHIiiw','/solved','stringify','userID','Solved','_configService','setConfig','rangeId','_commentService','requireSession','disposeWithMe','createTimestamp','_sessionService','Solve','subscribe','parentId','_initUserSync','Reply','14548PIgJpc','body','deleteComment','customRanges','Unknown','UNIVER_UNKNOWN','find','getOwnPropertyDescriptor','size','commentUpdate$','content','dataSource','payload','root','reply','_httpService','unitId','replyId','getCurrentUser','delete','add','/edit','_config','parse','code','replies','_initDataSource','onReady','solved','UNRECOGNIZED','_injector','2659768TAqmiq','addComment','_threadCommentDataSourceService'];_0x3b75=function(){return _0x1b25a9;};return _0x3b75();}function X(_0x14c934,_0x51d512){const _0x406020=_0x3ccefd,_0x2827b6=_0x14c934[_0x406020(0x13f)][0x0];return{..._0x51d512,'id':_0x2827b6[_0x406020(0x137)],'resolved':_0x14c934[_0x406020(0x142)]===0x1,'dT':y(_0x2827b6[_0x406020(0x11f)]),'personId':_0x2827b6['userId'],'threadId':_0x2827b6['threadId']};}function ee(_0x2953fb,_0x523705,_0x18edb4){const _0x1c238d=_0x3ccefd;var _0x5d0a99,_0x3c7187;if(((_0x3c7187=(_0x5d0a99=_0x2953fb==null?void 0x0:_0x2953fb['replies'])==null?void 0x0:_0x5d0a99[_0x1c238d(0x148)])!=null?_0x3c7187:0x0)>0x0){const _0x3fae91=(_0x1cf9bd,_0x986a53)=>({'id':_0x1cf9bd[_0x1c238d(0x137)],'threadId':_0x1cf9bd[_0x1c238d(0xf5)],'dT':y(_0x1cf9bd['createTimestamp']),'personId':_0x1cf9bd[_0x1c238d(0x150)],'resolved':_0x2953fb[_0x1c238d(0x142)]===I['Solved'],'unitId':_0x523705,'subUnitId':_0x18edb4,'text':JSON[_0x1c238d(0x13d)](_0x1cf9bd['content']),'parentId':_0x986a53}),_0x2fdaae=_0x3fae91(_0x2953fb[_0x1c238d(0x13f)][0x0]);return{..._0x2fdaae,'children':_0x2953fb[_0x1c238d(0x13f)]['slice'](0x1)[_0x1c238d(0xf0)](_0x12fd77=>_0x3fae91(_0x12fd77,_0x2fdaae['id']))};}return null;}let S=class{constructor(_0x1083dc,_0x10f3ca,_0x5105fe){const _0x565799=_0x3ccefd;this[_0x565799(0x135)]=_0x1083dc,this[_0x565799(0x14d)]=_0x10f3ca,this[_0x565799(0x120)]=_0x5105fe;}async[_0x3ccefd(0x146)](_0x45f7d0){const _0x3b146d=_0x3ccefd;var _0x41eebf,_0xc142d4;const {parentId:_0x922980,unitId:_0x1d672d,text:_0x655913,threadId:_0x1b6aaa}=_0x45f7d0,_0x391e4f=(_0xc142d4=(_0x41eebf=_0x655913[_0x3b146d(0x129)])==null?void 0x0:_0x41eebf[_0x3b146d(0x109)](_0xd5e750=>_0xd5e750[_0x3b146d(0xf1)]===_0x4ac1a8[_0x3b146d(0x10d)])[_0x3b146d(0xf0)](_0xab0eeb=>_0xab0eeb[_0x3b146d(0x11b)]))!=null?_0xc142d4:[],_0x2faa26=JSON['stringify'](_0x655913),_0x56fe15=(await this[_0x3b146d(0x120)][_0x3b146d(0x11d)](_0x1d672d))[_0x3b146d(0xfc)]();if(_0x922980){const _0x536167={'memberId':_0x56fe15,'unitId':_0x1d672d,'content':_0x2faa26,'mention':_0x391e4f,'threadId':_0x1b6aaa},_0x597694=(await this[_0x3b146d(0x135)][_0x3b146d(0xf3)](_0x3b146d(0xfa)+_0x1d672d+_0x3b146d(0x104),{'body':_0x536167}))[_0x3b146d(0x127)][_0x3b146d(0x134)];return{..._0x45f7d0,'id':_0x597694[_0x3b146d(0x137)],'dT':_0x4e68e8(+_0x597694['createTimestamp'])[_0x3b146d(0xfe)](_0x3b146d(0x14c)),'personId':_0x597694[_0x3b146d(0x150)]};}else{const _0x255ac0={'memberId':_0x56fe15,'unitId':_0x1d672d,'content':_0x2faa26,'mention':_0x391e4f},_0x398d9a=await this[_0x3b146d(0x135)]['post'](_0x3b146d(0xfa)+_0x1d672d+'/add',{'body':_0x255ac0});return X(_0x398d9a[_0x3b146d(0x127)][_0x3b146d(0x101)],_0x45f7d0);}}async[_0x3ccefd(0x111)](_0x20e337){const _0x107189=_0x3ccefd;var _0x312e0e,_0x54be81;const {text:_0x49954d,unitId:_0x407518}=_0x20e337,_0x19a98a=(_0x54be81=(_0x312e0e=_0x49954d[_0x107189(0x129)])==null?void 0x0:_0x312e0e[_0x107189(0x109)](_0x1b6015=>_0x1b6015[_0x107189(0xf1)]===_0x4ac1a8[_0x107189(0x10d)])[_0x107189(0xf0)](_0x2ea468=>_0x2ea468[_0x107189(0x11b)]))!=null?_0x54be81:[],_0x11459d=JSON[_0x107189(0x116)](_0x49954d),_0x334776=_0x20e337[_0x107189(0xf5)],_0x529bd2=_0x20e337['id'],_0x365a24={'memberId':(await this['_sessionService'][_0x107189(0x11d)](_0x407518))[_0x107189(0xfc)](),'unitId':_0x407518,'threadId':_0x334776,'mention':_0x19a98a,'content':_0x11459d,'replyId':_0x529bd2},_0x54e038=await this[_0x107189(0x135)][_0x107189(0xf3)](_0x107189(0xfa)+_0x407518+_0x107189(0x13b),{'body':_0x365a24});return!_0x54e038[_0x107189(0x127)][_0x107189(0xf8)]||_0x54e038[_0x107189(0x127)][_0x107189(0xf8)]['code']===0x1;}async['resolveComment'](_0x1c4381){const _0x1220ca=_0x3ccefd,{unitId:_0x5879ab}=_0x1c4381,_0x1683be=_0x1c4381['threadId'],_0xbc7437={'memberId':this[_0x1220ca(0x14d)][_0x1220ca(0x138)]()[_0x1220ca(0x117)],'unitId':_0x5879ab,'threadId':_0x1683be,'solved':_0x1c4381[_0x1220ca(0x14b)]?I['Solved']:I[_0x1220ca(0x113)]},_0x330228=await this[_0x1220ca(0x135)][_0x1220ca(0xf3)](_0x1220ca(0xfa)+_0x5879ab+_0x1220ca(0x115),{'body':_0xbc7437});return!_0x330228[_0x1220ca(0x127)][_0x1220ca(0xf8)]||_0x330228[_0x1220ca(0x127)]['error'][_0x1220ca(0x13e)]===0x1;}async[_0x3ccefd(0x128)](_0x4f3cda,_0x150a81,_0x45fdd2,_0xa1883b){const _0xbc72d4=_0x3ccefd,_0x384011={'memberId':(await this[_0xbc72d4(0x120)][_0xbc72d4(0x11d)](_0x4f3cda))[_0xbc72d4(0xfc)](),'threadId':_0x45fdd2,'replyId':_0xa1883b,'unitId':_0x4f3cda},_0x126a78=await this[_0xbc72d4(0x135)][_0xbc72d4(0xf3)](_0xbc72d4(0xfa)+_0x4f3cda+_0xbc72d4(0xfd),{'body':_0x384011});return!_0x126a78['body'][_0xbc72d4(0xf8)]||_0x126a78[_0xbc72d4(0x127)][_0xbc72d4(0xf8)][_0xbc72d4(0x13e)]===0x1;}async[_0x3ccefd(0xf6)](_0x4796a9,_0x29db,_0x4969ca){const _0x1dfeec=_0x3ccefd,_0x4c9f8b={'unitId':_0x4796a9,'threadId':_0x4969ca},_0x267ad7=await this[_0x1dfeec(0x135)][_0x1dfeec(0xf3)](_0x1dfeec(0xfa)+_0x4796a9+_0x1dfeec(0x105),{'body':_0x4c9f8b}),_0x553820=_0x4969ca[_0x1dfeec(0xf0)](_0x126f65=>ee(_0x267ad7[_0x1dfeec(0x127)][_0x1dfeec(0x10b)][_0x126f65],_0x4796a9,_0x29db))[_0x1dfeec(0x109)](Boolean);return Object[_0x1dfeec(0x14e)](_0x267ad7[_0x1dfeec(0x127)][_0x1dfeec(0x106)])['forEach'](_0x5d6cf1=>{const _0x3bedd0=_0x1dfeec;this[_0x3bedd0(0x14d)][_0x3bedd0(0x10c)](_0x5d6cf1);}),_0x553820;}[_0x3ccefd(0x10a)](_0x4d5477){const _0x532a03=_0x3ccefd;return{'id':_0x4d5477['id'],'threadId':_0x4d5477[_0x532a03(0xf5)],'ref':_0x4d5477[_0x532a03(0xfb)]};}};S=Q([b(0x0,_0x5c1e64(_0x2cb4a2)),b(0x1,_0x5c1e64(_0x4d85ee)),b(0x2,_0x5c1e64(_0x52cf24))],S);var re=Object[_0x3ccefd(0x12d)],te=(_0x16735f,_0xd526ed,_0x107b61,_0x41fae0)=>{const _0x47c169=_0x3ccefd;for(var _0x456b28=_0x41fae0>0x1?void 0x0:_0x41fae0?re(_0xd526ed,_0x107b61):_0xd526ed,_0x5d4811=_0x16735f[_0x47c169(0x148)]-0x1,_0x8bdefb;_0x5d4811>=0x0;_0x5d4811--)(_0x8bdefb=_0x16735f[_0x5d4811])&&(_0x456b28=_0x8bdefb(_0x456b28)||_0x456b28);return _0x456b28;},M=(_0x181509,_0x3220d4)=>(_0x316aa5,_0x398c1c)=>_0x3220d4(_0x316aa5,_0x398c1c,_0x181509);let f=class extends _0x2cd795{constructor(_0x1d0bd3,_0x176758){const _0x146518=_0x3ccefd;super(),this['_threadCommentDataSourceService']=_0x1d0bd3,this[_0x146518(0x152)]=_0x176758,this[_0x146518(0x140)]();}[_0x3ccefd(0x140)](){const _0x19c71c=_0x3ccefd;this[_0x19c71c(0x147)][_0x19c71c(0x131)]=this[_0x19c71c(0x152)],this[_0x19c71c(0x147)][_0x19c71c(0x108)]=!0x1;}};f=te([M(0x0,_0x241c59),M(0x1,_0x5c1e64(S))],f);var se=Object[_0x3ccefd(0x100)],oe=Object[_0x3ccefd(0x12d)],ne=(_0x3fe621,_0x36983a,_0x49134e)=>_0x36983a in _0x3fe621?se(_0x3fe621,_0x36983a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x49134e}):_0x3fe621[_0x36983a]=_0x49134e,ie=(_0xb59861,_0x18b867,_0x30e764,_0x3d61e1)=>{const _0x26fb94=_0x3ccefd;for(var _0x3d2bf8=_0x3d61e1>0x1?void 0x0:_0x3d61e1?oe(_0x18b867,_0x30e764):_0x18b867,_0x38debd=_0xb59861[_0x26fb94(0x148)]-0x1,_0x32db52;_0x38debd>=0x0;_0x38debd--)(_0x32db52=_0xb59861[_0x38debd])&&(_0x3d2bf8=_0x32db52(_0x3d2bf8)||_0x3d2bf8);return _0x3d2bf8;},N=(_0x3d8e0f,_0x8ff587)=>(_0x174dd2,_0x14e34d)=>_0x8ff587(_0x174dd2,_0x14e34d,_0x3d8e0f),$=(_0x48c3f9,_0x1ed7a5,_0x3a4819)=>ne(_0x48c3f9,typeof _0x1ed7a5!='symbol'?_0x1ed7a5+'':_0x1ed7a5,_0x3a4819);let g=class extends _0x1c4223{constructor(_0x2de67e=O,_0x445e94,_0xa998df){const _0x22417c=_0x3ccefd;super(),this[_0x22417c(0x13c)]=_0x2de67e,this['_injector']=_0x445e94,this['_configService']=_0xa998df;const {..._0x5c02f3}=_0x1a1877({},O,this[_0x22417c(0x13c)]);this[_0x22417c(0x119)][_0x22417c(0x11a)](z,_0x5c02f3);}['onStarting'](){const _0x1aaef6=_0x3ccefd;[[S],[f],[_]][_0x1aaef6(0x10e)](_0x25a859=>{const _0x3215da=_0x1aaef6;this[_0x3215da(0x144)][_0x3215da(0x13a)](_0x25a859);});}[_0x3ccefd(0x141)](){const _0x226725=_0x3ccefd;this[_0x226725(0x144)][_0x226725(0x107)](f),this['_injector'][_0x226725(0x107)](_);}};$(g,_0x3ccefd(0x10f),W),$(g,_0x3ccefd(0xec),_0x5f0730[_0x3ccefd(0x12b)]),g=ie([_0x7f6732(_0xe87a7f,_0x12ae43,_0x38eead),N(0x1,_0x5c1e64(_0x31e86f)),N(0x2,_0x405fde)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
function _0x243a(_0x50dc7e,_0x2ffada){const _0x290111=_0x2901();return _0x243a=function(_0x243a27,_0x4c55b7){_0x243a27=_0x243a27-0xe6;let _0x4305bb=_0x290111[_0x243a27];return _0x4305bb;},_0x243a(_0x50dc7e,_0x2ffada);}const _0x956842=_0x243a;(function(_0x5079eb,_0x1c2770){const _0x137e76=_0x243a,_0x23b293=_0x5079eb();while(!![]){try{const _0x55df3c=parseInt(_0x137e76(0x13a))/0x1*(parseInt(_0x137e76(0xec))/0x2)+parseInt(_0x137e76(0x132))/0x3*(parseInt(_0x137e76(0x11e))/0x4)+-parseInt(_0x137e76(0xea))/0x5+parseInt(_0x137e76(0x11f))/0x6*(parseInt(_0x137e76(0xf2))/0x7)+-parseInt(_0x137e76(0x14e))/0x8*(-parseInt(_0x137e76(0x118))/0x9)+parseInt(_0x137e76(0x10b))/0xa*(parseInt(_0x137e76(0xfa))/0xb)+parseInt(_0x137e76(0x125))/0xc*(-parseInt(_0x137e76(0x12d))/0xd);if(_0x55df3c===_0x1c2770)break;else _0x23b293['push'](_0x23b293['shift']());}catch(_0x5a687d){_0x23b293['push'](_0x23b293['shift']());}}}(_0x2901,0x9f485));import{CommentService as _0x403a4b,CollaborationSessionService as _0x5904f9,UniverCollaborationClientPlugin as _0x3802b1}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x17a341}from'@univerjs-pro/license';import{dayjs as _0x3e920d,UserManagerService as _0x55f5e7,Inject as _0x388faa,Injector as _0x469aaf,Disposable as _0x3fbff2,CustomRangeType as _0x558957,UniverInstanceType as _0x16ec5a,DependentOn as _0x23d00e,IConfigService as _0x1759fb,Plugin as _0x16d0b0,merge as _0x32f0bd}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4b75f2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x411c90,IThreadCommentDataSourceService as _0x2efa6a}from'@univerjs/thread-comment';import{bufferTime as _0x2e0e87}from'rxjs';import{HTTPService as _0x59a722}from'@univerjs/network';const W=_0x956842(0xe6);var I=(_0x530b6e=>(_0x530b6e[_0x530b6e[_0x956842(0x11c)]=0x0]=_0x956842(0x11c),_0x530b6e[_0x530b6e[_0x956842(0x11d)]=0x1]=_0x956842(0x11d),_0x530b6e[_0x530b6e[_0x956842(0x110)]=-0x1]='UNRECOGNIZED',_0x530b6e))(I||{}),v=(_0x1ec410=>(_0x1ec410[_0x1ec410[_0x956842(0xef)]=0x0]=_0x956842(0xef),_0x1ec410[_0x1ec410[_0x956842(0x127)]=0x1]='Add',_0x1ec410[_0x1ec410[_0x956842(0x142)]=0x2]='Reply',_0x1ec410[_0x1ec410[_0x956842(0x116)]=0x3]=_0x956842(0x116),_0x1ec410[_0x1ec410['Delete']=0x4]=_0x956842(0x105),_0x1ec410[_0x1ec410['Solve']=0x5]='Solve',_0x1ec410[_0x1ec410['UNRECOGNIZED']=-0x1]=_0x956842(0x110),_0x1ec410))(v||{});const y=_0x1ed2c=>_0x3e920d(new Date(+_0x1ed2c))['format'](_0x956842(0x146)),B=async(_0x427779,_0x3dc734)=>{const _0xba1855=_0x956842,_0x4c81d4=_0x427779['get'](_0x55f5e7),_0x4da8b4=_0x427779[_0xba1855(0x104)](_0x59a722);_0x3dc734[_0xba1855(0xf9)](_0x2f6e96=>{const _0x5db7fb=_0xba1855;_0x4c81d4[_0x5db7fb(0xfb)](_0x2f6e96)&&_0x3dc734[_0x5db7fb(0x12b)](_0x2f6e96);}),_0x3dc734[_0xba1855(0x139)]&&(await _0x4da8b4[_0xba1855(0x104)](_0xba1855(0x13e),{'params':{'userIDs':[..._0x3dc734]}}))[_0xba1855(0xe7)][_0xba1855(0x114)][_0xba1855(0xf9)](_0x28eb97=>{const _0x87b5d7=_0xba1855;_0x28eb97&&_0x4c81d4[_0x87b5d7(0xee)](_0x28eb97);});};function _0x2901(){const _0x48b080=['623718QKajwB','_httpService','rangeId','thread-comment-data-source.config','OpenOrReOpen','Solved','4btnRLq','415542oIynic','replyId','onStarting','customRanges','symbol','_initUserSync','57768WKSNZD','threadId','Add','syncUpdateMutationToColla','_threadCommentDataSourceService','COMMENT','delete','_sessionService','923HtBIIo','_config','Solve','listComments','/delete','885480piMWoC','_userService','disposeWithMe','post','type','pipe','_commentService','size','11mlWGhU','values','resolveComment','content','/universer-api/user/list','getUnit','/solved','error','Reply','UNIVER_UNKNOWN','addComment','/edit','YYYY/MM/DD\x20HH:mm','updateComment','deleteComment','format','_threadCommentModel','solved','parentId','payload','80ZsIGZc','createTimestamp','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','body','onReady','map','2331295mWHlbM','userID','47198vgyGVD','getOwnPropertyDescriptor','addUser','Unknown','_initDataSource','find','7piVRtL','_threadCommentDataSource','replies','defineProperty','add','stringify','requireSession','forEach','44KTHrcO','getUser','commentUpdate$','comment','code','parse','personId','subscribe','length','root','get','Delete','user','ref','userId','filter','getMemberID','358620MbbeEp','_configService','unitId','_injector','_init','UNRECOGNIZED','getCurrentUser','comments','getComment','users','/universer-api/comment/unit/','Edit','pluginName'];_0x2901=function(){return _0x48b080;};return _0x2901();}var K=Object[_0x956842(0xed)],V=(_0x39eb99,_0x109956,_0x307906,_0x333a6d)=>{for(var _0x4973ff=_0x333a6d>0x1?void 0x0:_0x333a6d?K(_0x109956,_0x307906):_0x109956,_0x2052a6=_0x39eb99['length']-0x1,_0x2f23c5;_0x2052a6>=0x0;_0x2052a6--)(_0x2f23c5=_0x39eb99[_0x2052a6])&&(_0x4973ff=_0x2f23c5(_0x4973ff)||_0x4973ff);return _0x4973ff;},p=(_0xa5c78e,_0x2ed838)=>(_0x2019fc,_0xef746d)=>_0x2ed838(_0x2019fc,_0xef746d,_0xa5c78e);let _=class extends _0x3fbff2{constructor(_0x5d3458,_0x1875b5,_0x4dddbb,_0x240d49){const _0x1a3d24=_0x956842;super(),this[_0x1a3d24(0x138)]=_0x5d3458,this['_threadCommentModel']=_0x1875b5,this[_0x1a3d24(0x133)]=_0x4dddbb,this['_injector']=_0x240d49,this[_0x1a3d24(0x10f)](),this[_0x1a3d24(0x124)]();}[_0x956842(0x124)](){const _0x4662b4=_0x956842;this[_0x4662b4(0x134)](this['_threadCommentModel']['commentUpdate$'][_0x4662b4(0x137)](_0x2e0e87(0x10))[_0x4662b4(0x101)](_0x52e62c=>{const _0xcffc11=_0x4662b4,_0x2d98cf=new Set();_0x52e62c[_0xcffc11(0xf9)](_0x262d99=>{const _0x4e8b2f=_0xcffc11;switch(_0x262d99[_0x4e8b2f(0x136)]){case _0x4e8b2f(0xf6):{const _0x3bd4a8=_0x262d99[_0x4e8b2f(0x14d)][_0x4e8b2f(0x100)];_0x2d98cf['add'](_0x3bd4a8);break;}}}),B(this['_injector'],_0x2d98cf);}));}['_init'](){const _0x35069c=_0x956842;this[_0x35069c(0x134)](this['_commentService'][_0x35069c(0xfc)][_0x35069c(0x101)](async _0x941f38=>{const _0xe8fb09=_0x35069c;var _0x40e9d0,_0x4794c5,_0x21d1a5,_0x3d2411;const _0x222bc8=(_0x40e9d0=this[_0xe8fb09(0x14a)][_0xe8fb09(0x13f)](_0x941f38[_0xe8fb09(0x10d)])[_0xe8fb09(0xf1)](_0x72d09=>_0x72d09[_0xe8fb09(0x126)]===_0x941f38['threadId']))==null?void 0x0:_0x40e9d0[_0xe8fb09(0x103)];if(!_0x222bc8)return;const {unitId:_0xdc874d,subUnitId:_0xe4fe24}=_0x222bc8;switch(_0x941f38[_0xe8fb09(0x106)]&&this['_userService'][_0xe8fb09(0xee)](_0x941f38['user']),_0x941f38[_0xe8fb09(0x136)]){case v['Add']:break;case v['Reply']:{this[_0xe8fb09(0x14a)][_0xe8fb09(0x144)](_0xdc874d,_0xe4fe24,{'unitId':_0xdc874d,'subUnitId':_0xe4fe24,'ref':'','id':_0x941f38['replyId'],'dT':y(+_0x941f38[_0xe8fb09(0x14f)]),'threadId':_0x941f38['threadId'],'personId':(_0x21d1a5=(_0x4794c5=_0x941f38[_0xe8fb09(0x106)])==null?void 0x0:_0x4794c5[_0xe8fb09(0xeb)])!=null?_0x21d1a5:_0x941f38[_0xe8fb09(0x108)],'text':JSON[_0xe8fb09(0xff)](_0x941f38[_0xe8fb09(0x13d)]),'parentId':_0x222bc8['id']});break;}case v[_0xe8fb09(0x105)]:{const _0x4f27dc=this[_0xe8fb09(0x14a)][_0xe8fb09(0x113)](_0xdc874d,_0xe4fe24,_0x941f38[_0xe8fb09(0x120)]);_0x4f27dc&&_0x4f27dc[_0xe8fb09(0x14c)]&&this[_0xe8fb09(0x14a)][_0xe8fb09(0x148)](_0xdc874d,_0xe4fe24,_0x941f38['replyId']);break;}case v[_0xe8fb09(0x116)]:{this[_0xe8fb09(0x14a)][_0xe8fb09(0x147)](_0xdc874d,_0xe4fe24,{'commentId':_0x941f38[_0xe8fb09(0x120)],'text':JSON[_0xe8fb09(0xff)](_0x941f38['content'])});break;}case v[_0xe8fb09(0x12f)]:{const _0x23a64f=(_0x3d2411=this[_0xe8fb09(0x14a)]['getUnit'](_0x941f38['unitId'])['find'](_0x52ecb5=>_0x52ecb5[_0xe8fb09(0x126)]===_0x941f38[_0xe8fb09(0x126)]))==null?void 0x0:_0x3d2411['root'];_0x23a64f&&this[_0xe8fb09(0x14a)][_0xe8fb09(0x13c)](_0xdc874d,_0xe4fe24,_0x23a64f['id'],_0x941f38[_0xe8fb09(0x14b)]===I[_0xe8fb09(0x11d)]);break;}}}));}};_=V([p(0x0,_0x388faa(_0x403a4b)),p(0x1,_0x388faa(_0x411c90)),p(0x2,_0x388faa(_0x55f5e7)),p(0x3,_0x388faa(_0x469aaf))],_);const z=_0x956842(0x11b),O={};var k=Object[_0x956842(0xed)],Q=(_0x302ede,_0x3d65f6,_0x8f7c97,_0x51c1e0)=>{for(var _0xf13b86=_0x51c1e0>0x1?void 0x0:_0x51c1e0?k(_0x3d65f6,_0x8f7c97):_0x3d65f6,_0x1c01c6=_0x302ede['length']-0x1,_0x5a5ce4;_0x1c01c6>=0x0;_0x1c01c6--)(_0x5a5ce4=_0x302ede[_0x1c01c6])&&(_0xf13b86=_0x5a5ce4(_0xf13b86)||_0xf13b86);return _0xf13b86;},b=(_0x1ef184,_0x4c3b75)=>(_0x347115,_0x3f53b4)=>_0x4c3b75(_0x347115,_0x3f53b4,_0x1ef184);function X(_0x4c380b,_0x59cce5){const _0x2ae662=_0x956842,_0x13d7a8=_0x4c380b[_0x2ae662(0xf4)][0x0];return{..._0x59cce5,'id':_0x13d7a8[_0x2ae662(0x120)],'resolved':_0x4c380b[_0x2ae662(0x14b)]===0x1,'dT':y(_0x13d7a8['createTimestamp']),'personId':_0x13d7a8[_0x2ae662(0x108)],'threadId':_0x13d7a8['threadId']};}function ee(_0x57b8dd,_0x336cd5,_0x3ad42c){const _0xaa05fa=_0x956842;var _0x4b699c,_0x1621c5;if(((_0x1621c5=(_0x4b699c=_0x57b8dd==null?void 0x0:_0x57b8dd['replies'])==null?void 0x0:_0x4b699c[_0xaa05fa(0x102)])!=null?_0x1621c5:0x0)>0x0){const _0x258ccc=(_0x3ee5ac,_0x1e6995)=>({'id':_0x3ee5ac[_0xaa05fa(0x120)],'threadId':_0x3ee5ac['threadId'],'dT':y(_0x3ee5ac[_0xaa05fa(0x14f)]),'personId':_0x3ee5ac[_0xaa05fa(0x108)],'resolved':_0x57b8dd[_0xaa05fa(0x14b)]===I[_0xaa05fa(0x11d)],'unitId':_0x336cd5,'subUnitId':_0x3ad42c,'text':JSON[_0xaa05fa(0xff)](_0x3ee5ac[_0xaa05fa(0x13d)]),'parentId':_0x1e6995}),_0xc7b3eb=_0x258ccc(_0x57b8dd['replies'][0x0]);return{..._0xc7b3eb,'children':_0x57b8dd[_0xaa05fa(0xf4)]['slice'](0x1)[_0xaa05fa(0xe9)](_0x4dcd08=>_0x258ccc(_0x4dcd08,_0xc7b3eb['id']))};}return null;}let S=class{constructor(_0x124ede,_0x2637eb,_0x20918a){const _0x6518f3=_0x956842;this['_httpService']=_0x124ede,this[_0x6518f3(0x133)]=_0x2637eb,this[_0x6518f3(0x12c)]=_0x20918a;}async[_0x956842(0x144)](_0x31fd1c){const _0x3f9f13=_0x956842;var _0x204986,_0xca1818;const {parentId:_0x1c2f71,unitId:_0x1b9b5c,text:_0x2c7406,threadId:_0x4752ef}=_0x31fd1c,_0x275b9c=(_0xca1818=(_0x204986=_0x2c7406[_0x3f9f13(0x122)])==null?void 0x0:_0x204986[_0x3f9f13(0x109)](_0x55cfd8=>_0x55cfd8['rangeType']===_0x558957[_0x3f9f13(0x12a)])[_0x3f9f13(0xe9)](_0x227f18=>_0x227f18['rangeId']))!=null?_0xca1818:[],_0xf87d93=JSON[_0x3f9f13(0xf7)](_0x2c7406),_0x41b0f3=(await this[_0x3f9f13(0x12c)][_0x3f9f13(0xf8)](_0x1b9b5c))['getMemberID']();if(_0x1c2f71){const _0x334645={'memberId':_0x41b0f3,'unitId':_0x1b9b5c,'content':_0xf87d93,'mention':_0x275b9c,'threadId':_0x4752ef},_0x4b45fa=(await this[_0x3f9f13(0x119)]['post']('/universer-api/comment/unit/'+_0x1b9b5c+'/reply',{'body':_0x334645}))[_0x3f9f13(0xe7)]['reply'];return{..._0x31fd1c,'id':_0x4b45fa[_0x3f9f13(0x120)],'dT':_0x3e920d(+_0x4b45fa[_0x3f9f13(0x14f)])[_0x3f9f13(0x149)](_0x3f9f13(0x146)),'personId':_0x4b45fa['userId']};}else{const _0x1c8531={'memberId':_0x41b0f3,'unitId':_0x1b9b5c,'content':_0xf87d93,'mention':_0x275b9c},_0x53880d=await this[_0x3f9f13(0x119)][_0x3f9f13(0x135)]('/universer-api/comment/unit/'+_0x1b9b5c+'/add',{'body':_0x1c8531});return X(_0x53880d[_0x3f9f13(0xe7)][_0x3f9f13(0xfd)],_0x31fd1c);}}async[_0x956842(0x147)](_0x4a18c5){const _0x42f38f=_0x956842;var _0x26e246,_0x1a8df5;const {text:_0x56ecca,unitId:_0xf0e616}=_0x4a18c5,_0x4ec138=(_0x1a8df5=(_0x26e246=_0x56ecca[_0x42f38f(0x122)])==null?void 0x0:_0x26e246[_0x42f38f(0x109)](_0x5b3388=>_0x5b3388['rangeType']===_0x558957['COMMENT'])['map'](_0x345545=>_0x345545[_0x42f38f(0x11a)]))!=null?_0x1a8df5:[],_0x345d78=JSON[_0x42f38f(0xf7)](_0x56ecca),_0x55c176=_0x4a18c5['threadId'],_0x5ab3b5=_0x4a18c5['id'],_0x113690={'memberId':(await this[_0x42f38f(0x12c)]['requireSession'](_0xf0e616))[_0x42f38f(0x10a)](),'unitId':_0xf0e616,'threadId':_0x55c176,'mention':_0x4ec138,'content':_0x345d78,'replyId':_0x5ab3b5},_0x549625=await this[_0x42f38f(0x119)][_0x42f38f(0x135)](_0x42f38f(0x115)+_0xf0e616+_0x42f38f(0x145),{'body':_0x113690});return!_0x549625[_0x42f38f(0xe7)][_0x42f38f(0x141)]||_0x549625[_0x42f38f(0xe7)][_0x42f38f(0x141)][_0x42f38f(0xfe)]===0x1;}async[_0x956842(0x13c)](_0x385737){const _0x324e5c=_0x956842,{unitId:_0x2b620f}=_0x385737,_0x13b3b4=_0x385737[_0x324e5c(0x126)],_0x5b351c={'memberId':this[_0x324e5c(0x133)][_0x324e5c(0x111)]()[_0x324e5c(0xeb)],'unitId':_0x2b620f,'threadId':_0x13b3b4,'solved':_0x385737['resolved']?I[_0x324e5c(0x11d)]:I['OpenOrReOpen']},_0x1f4c16=await this[_0x324e5c(0x119)][_0x324e5c(0x135)]('/universer-api/comment/unit/'+_0x2b620f+_0x324e5c(0x140),{'body':_0x5b351c});return!_0x1f4c16[_0x324e5c(0xe7)]['error']||_0x1f4c16[_0x324e5c(0xe7)][_0x324e5c(0x141)][_0x324e5c(0xfe)]===0x1;}async['deleteComment'](_0x4270ad,_0x29fd95,_0xaad581,_0x3d79cd){const _0x44ff0e=_0x956842,_0x3a0cd0={'memberId':(await this[_0x44ff0e(0x12c)][_0x44ff0e(0xf8)](_0x4270ad))['getMemberID'](),'threadId':_0xaad581,'replyId':_0x3d79cd,'unitId':_0x4270ad},_0x395fd6=await this[_0x44ff0e(0x119)][_0x44ff0e(0x135)](_0x44ff0e(0x115)+_0x4270ad+_0x44ff0e(0x131),{'body':_0x3a0cd0});return!_0x395fd6[_0x44ff0e(0xe7)][_0x44ff0e(0x141)]||_0x395fd6[_0x44ff0e(0xe7)][_0x44ff0e(0x141)]['code']===0x1;}async[_0x956842(0x130)](_0x5498c0,_0x5eb2b6,_0x2d5c00){const _0x28e2d9=_0x956842,_0x1137ab={'unitId':_0x5498c0,'threadId':_0x2d5c00},_0xf1d849=await this['_httpService']['post'](_0x28e2d9(0x115)+_0x5498c0+'/list',{'body':_0x1137ab}),_0x24fac9=_0x2d5c00[_0x28e2d9(0xe9)](_0x264b43=>ee(_0xf1d849['body'][_0x28e2d9(0x112)][_0x264b43],_0x5498c0,_0x5eb2b6))['filter'](Boolean);return Object[_0x28e2d9(0x13b)](_0xf1d849[_0x28e2d9(0xe7)][_0x28e2d9(0x114)])['forEach'](_0x5c7149=>{const _0x59a7a7=_0x28e2d9;this['_userService'][_0x59a7a7(0xee)](_0x5c7149);}),_0x24fac9;}['saveCommentToSnapshot'](_0x44f4d7){const _0x4d650c=_0x956842;return{'id':_0x44f4d7['id'],'threadId':_0x44f4d7[_0x4d650c(0x126)],'ref':_0x44f4d7[_0x4d650c(0x107)]};}};S=Q([b(0x0,_0x388faa(_0x59a722)),b(0x1,_0x388faa(_0x55f5e7)),b(0x2,_0x388faa(_0x5904f9))],S);var re=Object[_0x956842(0xed)],te=(_0x28e891,_0x1eecb4,_0x18e04b,_0x4ba75d)=>{const _0x204eb6=_0x956842;for(var _0x1e4226=_0x4ba75d>0x1?void 0x0:_0x4ba75d?re(_0x1eecb4,_0x18e04b):_0x1eecb4,_0x53c6eb=_0x28e891[_0x204eb6(0x102)]-0x1,_0xf586cd;_0x53c6eb>=0x0;_0x53c6eb--)(_0xf586cd=_0x28e891[_0x53c6eb])&&(_0x1e4226=_0xf586cd(_0x1e4226)||_0x1e4226);return _0x1e4226;},M=(_0x313d98,_0x5b8d07)=>(_0x3b1760,_0x2ef73a)=>_0x5b8d07(_0x3b1760,_0x2ef73a,_0x313d98);let f=class extends _0x3fbff2{constructor(_0x229eca,_0x4e2365){const _0x50bb22=_0x956842;super(),this['_threadCommentDataSourceService']=_0x229eca,this[_0x50bb22(0xf3)]=_0x4e2365,this[_0x50bb22(0xf0)]();}[_0x956842(0xf0)](){const _0x1e648b=_0x956842;this[_0x1e648b(0x129)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x1e648b(0x128)]=!0x1;}};f=te([M(0x0,_0x2efa6a),M(0x1,_0x388faa(S))],f);var se=Object[_0x956842(0xf5)],oe=Object[_0x956842(0xed)],ne=(_0x247e7d,_0x4462e6,_0x394e7e)=>_0x4462e6 in _0x247e7d?se(_0x247e7d,_0x4462e6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x394e7e}):_0x247e7d[_0x4462e6]=_0x394e7e,ie=(_0x314c32,_0x17d4cc,_0x5828f0,_0x37f6de)=>{const _0x385a6a=_0x956842;for(var _0x357c99=_0x37f6de>0x1?void 0x0:_0x37f6de?oe(_0x17d4cc,_0x5828f0):_0x17d4cc,_0x195918=_0x314c32[_0x385a6a(0x102)]-0x1,_0x3d119f;_0x195918>=0x0;_0x195918--)(_0x3d119f=_0x314c32[_0x195918])&&(_0x357c99=_0x3d119f(_0x357c99)||_0x357c99);return _0x357c99;},N=(_0x4dfbab,_0x436cf6)=>(_0xacb57,_0x24b764)=>_0x436cf6(_0xacb57,_0x24b764,_0x4dfbab),$=(_0x37a608,_0x4fe0b5,_0xda5cba)=>ne(_0x37a608,typeof _0x4fe0b5!=_0x956842(0x123)?_0x4fe0b5+'':_0x4fe0b5,_0xda5cba);let g=class extends _0x16d0b0{constructor(_0x56a7ed=O,_0x15a610,_0x572da2){const _0x2ff10a=_0x956842;super(),this[_0x2ff10a(0x12e)]=_0x56a7ed,this[_0x2ff10a(0x10e)]=_0x15a610,this[_0x2ff10a(0x10c)]=_0x572da2;const {..._0x496091}=_0x32f0bd({},O,this[_0x2ff10a(0x12e)]);this[_0x2ff10a(0x10c)]['setConfig'](z,_0x496091);}[_0x956842(0x121)](){[[S],[f],[_]]['forEach'](_0x5b2cfd=>{const _0x18cbe0=_0x243a;this[_0x18cbe0(0x10e)][_0x18cbe0(0xf6)](_0x5b2cfd);});}[_0x956842(0xe8)](){const _0x1a50d7=_0x956842;this['_injector']['get'](f),this[_0x1a50d7(0x10e)][_0x1a50d7(0x104)](_);}};$(g,_0x956842(0x117),W),$(g,_0x956842(0x136),_0x16ec5a[_0x956842(0x143)]),g=ie([_0x23d00e(_0x4b75f2,_0x3802b1,_0x17a341),N(0x1,_0x388faa(_0x469aaf)),N(0x2,_0x1759fb)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x18cd(){const _0x29ed4d=['content','syncUpdateMutationToColla','error','body','/solved','resolveComment','_threadCommentModel','dayjs','createTimestamp','DependentOn','UNRECOGNIZED','UniverLicensePlugin','_initUserSync','UserManagerService','size','_injector','UniverInstanceType','customRanges','requireSession','getComment','rxjs','@univerjs/core','commentUpdate$','format','reply','139517swleBo','getUser','1432192BkFRJd','_initDataSource','disposeWithMe','type','_commentService','replies','updateComment','payload','UniverThreadCommentDataSourcePlugin','dataSource','thread-comment-data-source.config','UniverProCollaborationClient','getUnit','getMemberID','@univerjs/network','setConfig','userId','code','Unknown','Solve','getOwnPropertyDescriptor','_httpService','/universer-api/user/list','resolved','filter','/add','_configService','pipe','UniverProThreadCommentDatasource','Edit','YYYY/MM/DD\x20HH:mm','_sessionService','get','UNIVER_UNKNOWN','Inject','rangeId','onReady','map','4080213hMDUKk','UniverProLicense','subscribe','IConfigService','length','1415110Unngbj','replyId','stringify','COMMENT','user','ThreadCommentModel','find','/delete','Injector','comments','values','Reply','addUser','IThreadCommentDataSourceService','addComment','comment','saveCommentToSnapshot','Solved','Delete','/universer-api/comment/unit/','parse','Disposable','UniverThreadComment','defineProperty','userID','_init','@univerjs/thread-comment','/reply','onStarting','solved','post','personId','/edit','pluginName','@univerjs-pro/license','Module','add','amd','UniverThreadCommentUIPlugin','3306414KJhkqm','317500wzoKqb','rangeType','_threadCommentDataSourceService','_userService','/list','Add','UniverThreadCommentUi','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','CustomRangeType','root','OpenOrReOpen','3849064uCHQGh','UniverCore','merge','@univerjs-pro/collaboration-client','delete','unitId','_config','users','slice','5QnJwen','CollaborationSessionService','threadId','HTTPService','getCurrentUser','Plugin'];_0x18cd=function(){return _0x29ed4d;};return _0x18cd();}function _0x21bd(_0x19f3be,_0x3d6957){const _0x18cda1=_0x18cd();return _0x21bd=function(_0x21bdc9,_0x50edc7){_0x21bdc9=_0x21bdc9-0x1ee;let _0x359c03=_0x18cda1[_0x21bdc9];return _0x359c03;},_0x21bd(_0x19f3be,_0x3d6957);}(function(_0x40ee5b,_0x1f970e){const _0xf6bea9=_0x21bd,_0x6e6f9=_0x40ee5b();while(!![]){try{const _0x321b40=parseInt(_0xf6bea9(0x264))/0x1+parseInt(_0xf6bea9(0x239))/0x2+-parseInt(_0xf6bea9(0x25f))/0x3+-parseInt(_0xf6bea9(0x204))/0x4+parseInt(_0xf6bea9(0x218))/0x5*(parseInt(_0xf6bea9(0x203))/0x6)+-parseInt(_0xf6bea9(0x237))/0x7+-parseInt(_0xf6bea9(0x20f))/0x8;if(_0x321b40===_0x1f970e)break;else _0x6e6f9['push'](_0x6e6f9['shift']());}catch(_0x5f2dc2){_0x6e6f9['push'](_0x6e6f9['shift']());}}}(_0x18cd,0xb5185),function(_0x2815f9,_0x424347){const _0x5d0b6a=_0x21bd;typeof exports=='object'&&typeof module<'u'?_0x424347(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x5d0b6a(0x201)]?define(['exports',_0x5d0b6a(0x212),_0x5d0b6a(0x1fe),_0x5d0b6a(0x233),'@univerjs/thread-comment-ui',_0x5d0b6a(0x1f6),'rxjs',_0x5d0b6a(0x247)],_0x424347):(_0x2815f9=typeof globalThis<'u'?globalThis:_0x2815f9||self,_0x424347(_0x2815f9[_0x5d0b6a(0x255)]={},_0x2815f9[_0x5d0b6a(0x244)],_0x2815f9[_0x5d0b6a(0x260)],_0x2815f9[_0x5d0b6a(0x210)],_0x2815f9[_0x5d0b6a(0x20a)],_0x2815f9[_0x5d0b6a(0x1f2)],_0x2815f9[_0x5d0b6a(0x232)],_0x2815f9['UniverNetwork']));}(this,function(_0x27515b,_0x52cb44,_0x994417,_0x2f449e,_0x4c01bf,_0xeaa709,_0x1cef5f,_0xdb3e66){'use strict';const _0x2a1f0a=_0x21bd;const _0x3fa4ba=_0x2a1f0a(0x20b);var _0x365e4e=(_0x5e2645=>(_0x5e2645[_0x5e2645[_0x2a1f0a(0x20e)]=0x0]=_0x2a1f0a(0x20e),_0x5e2645[_0x5e2645[_0x2a1f0a(0x275)]=0x1]=_0x2a1f0a(0x275),_0x5e2645[_0x5e2645[_0x2a1f0a(0x228)]=-0x1]=_0x2a1f0a(0x228),_0x5e2645))(_0x365e4e||{}),_0xafc27a=(_0xa9a600=>(_0xa9a600[_0xa9a600[_0x2a1f0a(0x24b)]=0x0]=_0x2a1f0a(0x24b),_0xa9a600[_0xa9a600[_0x2a1f0a(0x209)]=0x1]=_0x2a1f0a(0x209),_0xa9a600[_0xa9a600[_0x2a1f0a(0x26f)]=0x2]=_0x2a1f0a(0x26f),_0xa9a600[_0xa9a600['Edit']=0x3]=_0x2a1f0a(0x256),_0xa9a600[_0xa9a600['Delete']=0x4]='Delete',_0xa9a600[_0xa9a600[_0x2a1f0a(0x24c)]=0x5]=_0x2a1f0a(0x24c),_0xa9a600[_0xa9a600[_0x2a1f0a(0x228)]=-0x1]='UNRECOGNIZED',_0xa9a600))(_0xafc27a||{});const _0x49676d=_0x1cc192=>_0x2f449e[_0x2a1f0a(0x225)](new Date(+_0x1cc192))[_0x2a1f0a(0x235)](_0x2a1f0a(0x257)),_0x1e1fdc=async(_0x30434b,_0x3691db)=>{const _0x315e4f=_0x2a1f0a,_0x3f40be=_0x30434b['get'](_0x2f449e[_0x315e4f(0x22b)]),_0x5efc67=_0x30434b[_0x315e4f(0x259)](_0xdb3e66['HTTPService']);_0x3691db['forEach'](_0x4ba4ed=>{const _0x55138f=_0x315e4f;_0x3f40be[_0x55138f(0x238)](_0x4ba4ed)&&_0x3691db[_0x55138f(0x213)](_0x4ba4ed);}),_0x3691db[_0x315e4f(0x22c)]&&(await _0x5efc67[_0x315e4f(0x259)](_0x315e4f(0x24f),{'params':{'userIDs':[..._0x3691db]}}))[_0x315e4f(0x221)][_0x315e4f(0x216)]['forEach'](_0x1753ed=>{const _0x370b03=_0x315e4f;_0x1753ed&&_0x3f40be[_0x370b03(0x270)](_0x1753ed);});};var _0x1a245e=Object['getOwnPropertyDescriptor'],_0x466507=(_0xb15a4,_0x220c24,_0x505d3a,_0x2c5990)=>{const _0x40c0b4=_0x2a1f0a;for(var _0x16d92d=_0x2c5990>0x1?void 0x0:_0x2c5990?_0x1a245e(_0x220c24,_0x505d3a):_0x220c24,_0x302937=_0xb15a4[_0x40c0b4(0x263)]-0x1,_0x1a5339;_0x302937>=0x0;_0x302937--)(_0x1a5339=_0xb15a4[_0x302937])&&(_0x16d92d=_0x1a5339(_0x16d92d)||_0x16d92d);return _0x16d92d;},_0x2e3d12=(_0x4ca03e,_0x2d4a88)=>(_0x3aa91c,_0x11339f)=>_0x2d4a88(_0x3aa91c,_0x11339f,_0x4ca03e);let _0x5a1ff1=class extends _0x2f449e[_0x2a1f0a(0x1f1)]{constructor(_0x3aa9eb,_0x152794,_0x5bdd04,_0x5ebe0a){const _0x5a7fa9=_0x2a1f0a;super(),this[_0x5a7fa9(0x23d)]=_0x3aa9eb,this[_0x5a7fa9(0x224)]=_0x152794,this[_0x5a7fa9(0x207)]=_0x5bdd04,this[_0x5a7fa9(0x22d)]=_0x5ebe0a,this[_0x5a7fa9(0x1f5)](),this[_0x5a7fa9(0x22a)]();}[_0x2a1f0a(0x22a)](){const _0x6cd00b=_0x2a1f0a;this[_0x6cd00b(0x23b)](this[_0x6cd00b(0x224)][_0x6cd00b(0x234)][_0x6cd00b(0x254)](_0x1cef5f['bufferTime'](0x10))[_0x6cd00b(0x261)](_0x520fac=>{const _0x5ef5a1=_0x6cd00b,_0x4f6a9d=new Set();_0x520fac['forEach'](_0x2e4636=>{const _0x22dd45=_0x21bd;switch(_0x2e4636[_0x22dd45(0x23c)]){case _0x22dd45(0x200):{const _0x36ac42=_0x2e4636[_0x22dd45(0x240)][_0x22dd45(0x1fb)];_0x4f6a9d[_0x22dd45(0x200)](_0x36ac42);break;}}}),_0x1e1fdc(this[_0x5ef5a1(0x22d)],_0x4f6a9d);}));}[_0x2a1f0a(0x1f5)](){const _0x5698d4=_0x2a1f0a;this[_0x5698d4(0x23b)](this[_0x5698d4(0x23d)][_0x5698d4(0x234)]['subscribe'](async _0x54be78=>{const _0x32bf65=_0x5698d4;var _0x582849,_0x3f8879,_0x564ef1,_0x5449a4;const _0x4596d2=(_0x582849=this[_0x32bf65(0x224)][_0x32bf65(0x245)](_0x54be78[_0x32bf65(0x214)])['find'](_0x413f60=>_0x413f60[_0x32bf65(0x21a)]===_0x54be78[_0x32bf65(0x21a)]))==null?void 0x0:_0x582849[_0x32bf65(0x20d)];if(!_0x4596d2)return;const {unitId:_0x1e3187,subUnitId:_0x3f96cb}=_0x4596d2;switch(_0x54be78['user']&&this['_userService'][_0x32bf65(0x270)](_0x54be78['user']),_0x54be78[_0x32bf65(0x23c)]){case _0xafc27a[_0x32bf65(0x209)]:break;case _0xafc27a['Reply']:{this[_0x32bf65(0x224)][_0x32bf65(0x272)](_0x1e3187,_0x3f96cb,{'unitId':_0x1e3187,'subUnitId':_0x3f96cb,'ref':'','id':_0x54be78[_0x32bf65(0x265)],'dT':_0x49676d(+_0x54be78['createTimestamp']),'threadId':_0x54be78[_0x32bf65(0x21a)],'personId':(_0x564ef1=(_0x3f8879=_0x54be78[_0x32bf65(0x268)])==null?void 0x0:_0x3f8879['userID'])!=null?_0x564ef1:_0x54be78[_0x32bf65(0x249)],'text':JSON[_0x32bf65(0x1f0)](_0x54be78['content']),'parentId':_0x4596d2['id']});break;}case _0xafc27a[_0x32bf65(0x1ee)]:{const _0xafd251=this[_0x32bf65(0x224)][_0x32bf65(0x231)](_0x1e3187,_0x3f96cb,_0x54be78[_0x32bf65(0x265)]);_0xafd251&&_0xafd251['parentId']&&this[_0x32bf65(0x224)]['deleteComment'](_0x1e3187,_0x3f96cb,_0x54be78[_0x32bf65(0x265)]);break;}case _0xafc27a[_0x32bf65(0x256)]:{this[_0x32bf65(0x224)]['updateComment'](_0x1e3187,_0x3f96cb,{'commentId':_0x54be78[_0x32bf65(0x265)],'text':JSON[_0x32bf65(0x1f0)](_0x54be78[_0x32bf65(0x21e)])});break;}case _0xafc27a[_0x32bf65(0x24c)]:{const _0x4203f4=(_0x5449a4=this['_threadCommentModel'][_0x32bf65(0x245)](_0x54be78[_0x32bf65(0x214)])[_0x32bf65(0x26a)](_0x29d03b=>_0x29d03b[_0x32bf65(0x21a)]===_0x54be78['threadId']))==null?void 0x0:_0x5449a4[_0x32bf65(0x20d)];_0x4203f4&&this[_0x32bf65(0x224)][_0x32bf65(0x223)](_0x1e3187,_0x3f96cb,_0x4203f4['id'],_0x54be78[_0x32bf65(0x1f9)]===_0x365e4e[_0x32bf65(0x275)]);break;}}}));}};_0x5a1ff1=_0x466507([_0x2e3d12(0x0,_0x2f449e[_0x2a1f0a(0x25b)](_0x52cb44['CommentService'])),_0x2e3d12(0x1,_0x2f449e[_0x2a1f0a(0x25b)](_0xeaa709[_0x2a1f0a(0x269)])),_0x2e3d12(0x2,_0x2f449e[_0x2a1f0a(0x25b)](_0x2f449e[_0x2a1f0a(0x22b)])),_0x2e3d12(0x3,_0x2f449e[_0x2a1f0a(0x25b)](_0x2f449e[_0x2a1f0a(0x26c)]))],_0x5a1ff1);const _0x130cb8=_0x2a1f0a(0x243),_0x3e0813={};var _0x4b2d51=Object[_0x2a1f0a(0x24d)],_0x3a023b=(_0x2f54bd,_0x34dc13,_0x26f52c,_0x29e742)=>{const _0x271c1c=_0x2a1f0a;for(var _0x520512=_0x29e742>0x1?void 0x0:_0x29e742?_0x4b2d51(_0x34dc13,_0x26f52c):_0x34dc13,_0x43dba7=_0x2f54bd[_0x271c1c(0x263)]-0x1,_0x3453f2;_0x43dba7>=0x0;_0x43dba7--)(_0x3453f2=_0x2f54bd[_0x43dba7])&&(_0x520512=_0x3453f2(_0x520512)||_0x520512);return _0x520512;},_0xf9f6f1=(_0x15d460,_0x48fe94)=>(_0x590267,_0x4b7f00)=>_0x48fe94(_0x590267,_0x4b7f00,_0x15d460);function _0xac99f6(_0x12b9a7,_0x5e27c2){const _0x4651e1=_0x2a1f0a,_0x416b3c=_0x12b9a7[_0x4651e1(0x23e)][0x0];return{..._0x5e27c2,'id':_0x416b3c['replyId'],'resolved':_0x12b9a7[_0x4651e1(0x1f9)]===0x1,'dT':_0x49676d(_0x416b3c[_0x4651e1(0x226)]),'personId':_0x416b3c[_0x4651e1(0x249)],'threadId':_0x416b3c[_0x4651e1(0x21a)]};}function _0x464fed(_0x11b343,_0x59542f,_0x1d9f8f){const _0x2f3f28=_0x2a1f0a;var _0x15f4d3,_0x549280;if(((_0x549280=(_0x15f4d3=_0x11b343==null?void 0x0:_0x11b343[_0x2f3f28(0x23e)])==null?void 0x0:_0x15f4d3[_0x2f3f28(0x263)])!=null?_0x549280:0x0)>0x0){const _0x41e44c=(_0x28f6b9,_0x32029b)=>({'id':_0x28f6b9['replyId'],'threadId':_0x28f6b9[_0x2f3f28(0x21a)],'dT':_0x49676d(_0x28f6b9[_0x2f3f28(0x226)]),'personId':_0x28f6b9[_0x2f3f28(0x249)],'resolved':_0x11b343[_0x2f3f28(0x1f9)]===_0x365e4e[_0x2f3f28(0x275)],'unitId':_0x59542f,'subUnitId':_0x1d9f8f,'text':JSON[_0x2f3f28(0x1f0)](_0x28f6b9['content']),'parentId':_0x32029b}),_0x1067e6=_0x41e44c(_0x11b343[_0x2f3f28(0x23e)][0x0]);return{..._0x1067e6,'children':_0x11b343[_0x2f3f28(0x23e)][_0x2f3f28(0x217)](0x1)[_0x2f3f28(0x25e)](_0x165b5c=>_0x41e44c(_0x165b5c,_0x1067e6['id']))};}return null;}let _0x4908a6=class{constructor(_0x7011ad,_0x457677,_0x16198f){const _0x3c2695=_0x2a1f0a;this[_0x3c2695(0x24e)]=_0x7011ad,this[_0x3c2695(0x207)]=_0x457677,this[_0x3c2695(0x258)]=_0x16198f;}async[_0x2a1f0a(0x272)](_0x533311){const _0x54d2e9=_0x2a1f0a;var _0x12a1c8,_0x4b2aab;const {parentId:_0x58c4b,unitId:_0xc1f2e7,text:_0x50e023,threadId:_0x5d628d}=_0x533311,_0x216e72=(_0x4b2aab=(_0x12a1c8=_0x50e023[_0x54d2e9(0x22f)])==null?void 0x0:_0x12a1c8[_0x54d2e9(0x251)](_0x166d4f=>_0x166d4f['rangeType']===_0x2f449e[_0x54d2e9(0x20c)][_0x54d2e9(0x267)])[_0x54d2e9(0x25e)](_0x2ef3d6=>_0x2ef3d6[_0x54d2e9(0x25c)]))!=null?_0x4b2aab:[],_0xec6452=JSON[_0x54d2e9(0x266)](_0x50e023),_0x2cb12d=(await this[_0x54d2e9(0x258)][_0x54d2e9(0x230)](_0xc1f2e7))['getMemberID']();if(_0x58c4b){const _0x104a4a={'memberId':_0x2cb12d,'unitId':_0xc1f2e7,'content':_0xec6452,'mention':_0x216e72,'threadId':_0x5d628d},_0x23c721=(await this['_httpService'][_0x54d2e9(0x1fa)](_0x54d2e9(0x1ef)+_0xc1f2e7+_0x54d2e9(0x1f7),{'body':_0x104a4a}))[_0x54d2e9(0x221)][_0x54d2e9(0x236)];return{..._0x533311,'id':_0x23c721[_0x54d2e9(0x265)],'dT':_0x2f449e[_0x54d2e9(0x225)](+_0x23c721[_0x54d2e9(0x226)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x23c721[_0x54d2e9(0x249)]};}else{const _0x461de2={'memberId':_0x2cb12d,'unitId':_0xc1f2e7,'content':_0xec6452,'mention':_0x216e72},_0x7670f=await this[_0x54d2e9(0x24e)]['post']('/universer-api/comment/unit/'+_0xc1f2e7+_0x54d2e9(0x252),{'body':_0x461de2});return _0xac99f6(_0x7670f[_0x54d2e9(0x221)][_0x54d2e9(0x273)],_0x533311);}}async[_0x2a1f0a(0x23f)](_0x5069c4){const _0x14c96f=_0x2a1f0a;var _0x272ddb,_0x37c6b5;const {text:_0x3488c9,unitId:_0x1ed827}=_0x5069c4,_0x59d158=(_0x37c6b5=(_0x272ddb=_0x3488c9[_0x14c96f(0x22f)])==null?void 0x0:_0x272ddb['filter'](_0x41528b=>_0x41528b[_0x14c96f(0x205)]===_0x2f449e[_0x14c96f(0x20c)][_0x14c96f(0x267)])['map'](_0x37b03e=>_0x37b03e[_0x14c96f(0x25c)]))!=null?_0x37c6b5:[],_0x159bdc=JSON[_0x14c96f(0x266)](_0x3488c9),_0x1dc6ff=_0x5069c4[_0x14c96f(0x21a)],_0x30b668=_0x5069c4['id'],_0x3df81b={'memberId':(await this['_sessionService']['requireSession'](_0x1ed827))[_0x14c96f(0x246)](),'unitId':_0x1ed827,'threadId':_0x1dc6ff,'mention':_0x59d158,'content':_0x159bdc,'replyId':_0x30b668},_0x3ddfa6=await this[_0x14c96f(0x24e)][_0x14c96f(0x1fa)](_0x14c96f(0x1ef)+_0x1ed827+_0x14c96f(0x1fc),{'body':_0x3df81b});return!_0x3ddfa6[_0x14c96f(0x221)][_0x14c96f(0x220)]||_0x3ddfa6[_0x14c96f(0x221)][_0x14c96f(0x220)]['code']===0x1;}async['resolveComment'](_0x1c13e0){const _0x5bc950=_0x2a1f0a,{unitId:_0x463c95}=_0x1c13e0,_0x392c86=_0x1c13e0[_0x5bc950(0x21a)],_0x5550de={'memberId':this[_0x5bc950(0x207)][_0x5bc950(0x21c)]()[_0x5bc950(0x1f4)],'unitId':_0x463c95,'threadId':_0x392c86,'solved':_0x1c13e0[_0x5bc950(0x250)]?_0x365e4e[_0x5bc950(0x275)]:_0x365e4e[_0x5bc950(0x20e)]},_0x2f11bc=await this[_0x5bc950(0x24e)][_0x5bc950(0x1fa)]('/universer-api/comment/unit/'+_0x463c95+_0x5bc950(0x222),{'body':_0x5550de});return!_0x2f11bc[_0x5bc950(0x221)][_0x5bc950(0x220)]||_0x2f11bc[_0x5bc950(0x221)][_0x5bc950(0x220)][_0x5bc950(0x24a)]===0x1;}async['deleteComment'](_0x47fb6e,_0x482798,_0x365873,_0x1ad033){const _0x41e14c=_0x2a1f0a,_0x14f13b={'memberId':(await this['_sessionService'][_0x41e14c(0x230)](_0x47fb6e))['getMemberID'](),'threadId':_0x365873,'replyId':_0x1ad033,'unitId':_0x47fb6e},_0x1b882b=await this[_0x41e14c(0x24e)][_0x41e14c(0x1fa)](_0x41e14c(0x1ef)+_0x47fb6e+_0x41e14c(0x26b),{'body':_0x14f13b});return!_0x1b882b['body']['error']||_0x1b882b['body']['error'][_0x41e14c(0x24a)]===0x1;}async['listComments'](_0x24226d,_0x252860,_0x4226aa){const _0x3dc007=_0x2a1f0a,_0x4ff5ab={'unitId':_0x24226d,'threadId':_0x4226aa},_0x50d308=await this[_0x3dc007(0x24e)][_0x3dc007(0x1fa)]('/universer-api/comment/unit/'+_0x24226d+_0x3dc007(0x208),{'body':_0x4ff5ab}),_0x4fe9ed=_0x4226aa['map'](_0x3d3a15=>_0x464fed(_0x50d308['body'][_0x3dc007(0x26d)][_0x3d3a15],_0x24226d,_0x252860))[_0x3dc007(0x251)](Boolean);return Object[_0x3dc007(0x26e)](_0x50d308['body'][_0x3dc007(0x216)])['forEach'](_0x2bcc96=>{const _0x182266=_0x3dc007;this[_0x182266(0x207)][_0x182266(0x270)](_0x2bcc96);}),_0x4fe9ed;}[_0x2a1f0a(0x274)](_0x22a6cd){const _0x2b7e0b=_0x2a1f0a;return{'id':_0x22a6cd['id'],'threadId':_0x22a6cd[_0x2b7e0b(0x21a)],'ref':_0x22a6cd['ref']};}};_0x4908a6=_0x3a023b([_0xf9f6f1(0x0,_0x2f449e[_0x2a1f0a(0x25b)](_0xdb3e66[_0x2a1f0a(0x21b)])),_0xf9f6f1(0x1,_0x2f449e[_0x2a1f0a(0x25b)](_0x2f449e[_0x2a1f0a(0x22b)])),_0xf9f6f1(0x2,_0x2f449e[_0x2a1f0a(0x25b)](_0x52cb44[_0x2a1f0a(0x219)]))],_0x4908a6);var _0x100e17=Object['getOwnPropertyDescriptor'],_0x4e5a0a=(_0x1ccba6,_0x467d0f,_0x5771f4,_0x2b2249)=>{const _0x13d0e4=_0x2a1f0a;for(var _0x171cd2=_0x2b2249>0x1?void 0x0:_0x2b2249?_0x100e17(_0x467d0f,_0x5771f4):_0x467d0f,_0x3753ac=_0x1ccba6[_0x13d0e4(0x263)]-0x1,_0x5899eb;_0x3753ac>=0x0;_0x3753ac--)(_0x5899eb=_0x1ccba6[_0x3753ac])&&(_0x171cd2=_0x5899eb(_0x171cd2)||_0x171cd2);return _0x171cd2;},_0x39eb33=(_0x36b5e5,_0xf83182)=>(_0xdd770,_0x19cc7d)=>_0xf83182(_0xdd770,_0x19cc7d,_0x36b5e5);let _0x1c935f=class extends _0x2f449e[_0x2a1f0a(0x1f1)]{constructor(_0x155142,_0x29f31d){const _0x44d033=_0x2a1f0a;super(),this[_0x44d033(0x206)]=_0x155142,this['_threadCommentDataSource']=_0x29f31d,this['_initDataSource']();}[_0x2a1f0a(0x23a)](){const _0x184c3b=_0x2a1f0a;this[_0x184c3b(0x206)][_0x184c3b(0x242)]=this['_threadCommentDataSource'],this[_0x184c3b(0x206)][_0x184c3b(0x21f)]=!0x1;}};_0x1c935f=_0x4e5a0a([_0x39eb33(0x0,_0xeaa709[_0x2a1f0a(0x271)]),_0x39eb33(0x1,_0x2f449e[_0x2a1f0a(0x25b)](_0x4908a6))],_0x1c935f);var _0x19103d=Object[_0x2a1f0a(0x1f3)],_0x303029=Object[_0x2a1f0a(0x24d)],_0x1371d1=(_0x4c744d,_0x177277,_0x549094)=>_0x177277 in _0x4c744d?_0x19103d(_0x4c744d,_0x177277,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x549094}):_0x4c744d[_0x177277]=_0x549094,_0x5f5b5b=(_0x328712,_0x1841c8,_0x5694cb,_0x27c115)=>{const _0x3d22f9=_0x2a1f0a;for(var _0x2a3a3c=_0x27c115>0x1?void 0x0:_0x27c115?_0x303029(_0x1841c8,_0x5694cb):_0x1841c8,_0x2a6807=_0x328712[_0x3d22f9(0x263)]-0x1,_0x2f952f;_0x2a6807>=0x0;_0x2a6807--)(_0x2f952f=_0x328712[_0x2a6807])&&(_0x2a3a3c=_0x2f952f(_0x2a3a3c)||_0x2a3a3c);return _0x2a3a3c;},_0x1946cc=(_0x34e0ab,_0x2a775a)=>(_0x214b05,_0x26af21)=>_0x2a775a(_0x214b05,_0x26af21,_0x34e0ab),_0x4a6d5d=(_0x6b57a4,_0x6890c,_0x413b37)=>_0x1371d1(_0x6b57a4,typeof _0x6890c!='symbol'?_0x6890c+'':_0x6890c,_0x413b37);_0x27515b['UniverThreadCommentDataSourcePlugin']=class extends _0x2f449e[_0x2a1f0a(0x21d)]{constructor(_0x59eb5c=_0x3e0813,_0x5b9acd,_0x680156){const _0x224e34=_0x2a1f0a;super(),this[_0x224e34(0x215)]=_0x59eb5c,this[_0x224e34(0x22d)]=_0x5b9acd,this[_0x224e34(0x253)]=_0x680156;const {..._0x33998a}=_0x2f449e[_0x224e34(0x211)]({},_0x3e0813,this[_0x224e34(0x215)]);this[_0x224e34(0x253)][_0x224e34(0x248)](_0x130cb8,_0x33998a);}[_0x2a1f0a(0x1f8)](){[[_0x4908a6],[_0x1c935f],[_0x5a1ff1]]['forEach'](_0x2eddb3=>{const _0x2b9224=_0x21bd;this[_0x2b9224(0x22d)][_0x2b9224(0x200)](_0x2eddb3);});}[_0x2a1f0a(0x25d)](){const _0x536bf1=_0x2a1f0a;this[_0x536bf1(0x22d)][_0x536bf1(0x259)](_0x1c935f),this[_0x536bf1(0x22d)]['get'](_0x5a1ff1);}},_0x4a6d5d(_0x27515b['UniverThreadCommentDataSourcePlugin'],_0x2a1f0a(0x1fd),_0x3fa4ba),_0x4a6d5d(_0x27515b[_0x2a1f0a(0x241)],_0x2a1f0a(0x23c),_0x2f449e[_0x2a1f0a(0x22e)][_0x2a1f0a(0x25a)]),_0x27515b[_0x2a1f0a(0x241)]=_0x5f5b5b([_0x2f449e[_0x2a1f0a(0x227)](_0x4c01bf[_0x2a1f0a(0x202)],_0x52cb44['UniverCollaborationClientPlugin'],_0x994417[_0x2a1f0a(0x229)]),_0x1946cc(0x1,_0x2f449e[_0x2a1f0a(0x25b)](_0x2f449e[_0x2a1f0a(0x26c)])),_0x1946cc(0x2,_0x2f449e[_0x2a1f0a(0x262)])],_0x27515b['UniverThreadCommentDataSourcePlugin']),Object[_0x2a1f0a(0x1f3)](_0x27515b,Symbol['toStringTag'],{'value':_0x2a1f0a(0x1ff)});}));
|
|
1
|
+
(function(_0x39cc1a,_0x45617c){const _0x5c8131=_0x462d,_0x4b4f3f=_0x39cc1a();while(!![]){try{const _0x5c6f71=parseInt(_0x5c8131(0x165))/0x1*(-parseInt(_0x5c8131(0x173))/0x2)+parseInt(_0x5c8131(0x196))/0x3+-parseInt(_0x5c8131(0x1e5))/0x4*(parseInt(_0x5c8131(0x1a3))/0x5)+parseInt(_0x5c8131(0x1da))/0x6+parseInt(_0x5c8131(0x17f))/0x7*(-parseInt(_0x5c8131(0x1d0))/0x8)+-parseInt(_0x5c8131(0x1c5))/0x9+parseInt(_0x5c8131(0x198))/0xa;if(_0x5c6f71===_0x45617c)break;else _0x4b4f3f['push'](_0x4b4f3f['shift']());}catch(_0x5c3571){_0x4b4f3f['push'](_0x4b4f3f['shift']());}}}(_0x39f1,0x6043a),function(_0x5a1200,_0x105947){const _0x51106f=_0x462d;typeof exports=='object'&&typeof module<'u'?_0x105947(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x51106f(0x1c3)&&define[_0x51106f(0x19e)]?define([_0x51106f(0x1ac),_0x51106f(0x188),'@univerjs-pro/license',_0x51106f(0x1cb),_0x51106f(0x1c4),_0x51106f(0x1bd),_0x51106f(0x16e),_0x51106f(0x1b8)],_0x105947):(_0x5a1200=typeof globalThis<'u'?globalThis:_0x5a1200||self,_0x105947(_0x5a1200[_0x51106f(0x18e)]={},_0x5a1200[_0x51106f(0x1b5)],_0x5a1200['UniverProLicense'],_0x5a1200[_0x51106f(0x19d)],_0x5a1200[_0x51106f(0x1e2)],_0x5a1200[_0x51106f(0x17b)],_0x5a1200['rxjs'],_0x5a1200[_0x51106f(0x192)]));}(this,function(_0x9ebc8f,_0x4fd8e6,_0xab9414,_0x5be78c,_0x5edfa9,_0x571e47,_0x555bb1,_0x266f01){'use strict';const _0x41b6fe=_0x462d;const _0xf917b9='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x43500a=(_0x341cbc=>(_0x341cbc[_0x341cbc[_0x41b6fe(0x183)]=0x0]='OpenOrReOpen',_0x341cbc[_0x341cbc[_0x41b6fe(0x1ec)]=0x1]=_0x41b6fe(0x1ec),_0x341cbc[_0x341cbc[_0x41b6fe(0x1d4)]=-0x1]=_0x41b6fe(0x1d4),_0x341cbc))(_0x43500a||{}),_0x71578d=(_0x506646=>(_0x506646[_0x506646[_0x41b6fe(0x1a8)]=0x0]='Unknown',_0x506646[_0x506646[_0x41b6fe(0x1d9)]=0x1]=_0x41b6fe(0x1d9),_0x506646[_0x506646[_0x41b6fe(0x187)]=0x2]='Reply',_0x506646[_0x506646[_0x41b6fe(0x1e6)]=0x3]='Edit',_0x506646[_0x506646['Delete']=0x4]='Delete',_0x506646[_0x506646['Solve']=0x5]=_0x41b6fe(0x1d8),_0x506646[_0x506646[_0x41b6fe(0x1d4)]=-0x1]='UNRECOGNIZED',_0x506646))(_0x71578d||{});const _0x225ec6=_0x55d7ff=>_0x5be78c['dayjs'](new Date(+_0x55d7ff))[_0x41b6fe(0x16a)](_0x41b6fe(0x194)),_0x48a595=async(_0x1d2451,_0x3e6838)=>{const _0x5eafc9=_0x41b6fe,_0x370d50=_0x1d2451[_0x5eafc9(0x1b1)](_0x5be78c[_0x5eafc9(0x17d)]),_0x4bab78=_0x1d2451[_0x5eafc9(0x1b1)](_0x266f01[_0x5eafc9(0x1a1)]);_0x3e6838[_0x5eafc9(0x1c7)](_0x81645a=>{const _0x41e0e8=_0x5eafc9;_0x370d50[_0x41e0e8(0x1cf)](_0x81645a)&&_0x3e6838[_0x41e0e8(0x176)](_0x81645a);}),_0x3e6838[_0x5eafc9(0x19b)]&&(await _0x4bab78[_0x5eafc9(0x1b1)](_0x5eafc9(0x1e4),{'params':{'userIDs':[..._0x3e6838]}}))[_0x5eafc9(0x1b3)]['users'][_0x5eafc9(0x1c7)](_0x48907e=>{const _0x33545c=_0x5eafc9;_0x48907e&&_0x370d50[_0x33545c(0x1d2)](_0x48907e);});};var _0x50a793=Object[_0x41b6fe(0x193)],_0x5e342e=(_0x313618,_0x5c1f43,_0x1d38e3,_0x8ae266)=>{const _0x5cf8dc=_0x41b6fe;for(var _0x340ef2=_0x8ae266>0x1?void 0x0:_0x8ae266?_0x50a793(_0x5c1f43,_0x1d38e3):_0x5c1f43,_0x4714b3=_0x313618[_0x5cf8dc(0x1a0)]-0x1,_0x5e4677;_0x4714b3>=0x0;_0x4714b3--)(_0x5e4677=_0x313618[_0x4714b3])&&(_0x340ef2=_0x5e4677(_0x340ef2)||_0x340ef2);return _0x340ef2;},_0x436241=(_0x3cb9d3,_0xd50054)=>(_0x360105,_0x5defc7)=>_0xd50054(_0x360105,_0x5defc7,_0x3cb9d3);let _0x4b488f=class extends _0x5be78c['Disposable']{constructor(_0x4e442d,_0x4b0c5f,_0x464b54,_0x380f47){const _0x16627f=_0x41b6fe;super(),this[_0x16627f(0x1b0)]=_0x4e442d,this[_0x16627f(0x1db)]=_0x4b0c5f,this[_0x16627f(0x1eb)]=_0x464b54,this[_0x16627f(0x1df)]=_0x380f47,this[_0x16627f(0x1ad)](),this[_0x16627f(0x175)]();}[_0x41b6fe(0x175)](){const _0x4fe006=_0x41b6fe;this[_0x4fe006(0x1a7)](this[_0x4fe006(0x1db)][_0x4fe006(0x1dc)]['pipe'](_0x555bb1[_0x4fe006(0x182)](0x10))['subscribe'](_0x393da0=>{const _0x883710=_0x4fe006,_0x57d579=new Set();_0x393da0[_0x883710(0x1c7)](_0x287115=>{const _0x2d528d=_0x883710;switch(_0x287115[_0x2d528d(0x1b4)]){case'add':{const _0x36fec3=_0x287115[_0x2d528d(0x195)][_0x2d528d(0x1ea)];_0x57d579[_0x2d528d(0x1d5)](_0x36fec3);break;}}}),_0x48a595(this['_injector'],_0x57d579);}));}[_0x41b6fe(0x1ad)](){const _0x3e7747=_0x41b6fe;this[_0x3e7747(0x1a7)](this[_0x3e7747(0x1b0)][_0x3e7747(0x1dc)]['subscribe'](async _0x1feac6=>{const _0x6cc4c=_0x3e7747;var _0x2ac56a,_0x588d49,_0x5cb461,_0x58be09;const _0xed0d54=(_0x2ac56a=this[_0x6cc4c(0x1db)][_0x6cc4c(0x184)](_0x1feac6[_0x6cc4c(0x1a2)])[_0x6cc4c(0x1e7)](_0x41db1e=>_0x41db1e[_0x6cc4c(0x18a)]===_0x1feac6[_0x6cc4c(0x18a)]))==null?void 0x0:_0x2ac56a[_0x6cc4c(0x16b)];if(!_0xed0d54)return;const {unitId:_0x3fdd82,subUnitId:_0x5883ab}=_0xed0d54;switch(_0x1feac6[_0x6cc4c(0x17a)]&&this[_0x6cc4c(0x1eb)][_0x6cc4c(0x1d2)](_0x1feac6['user']),_0x1feac6['type']){case _0x71578d['Add']:break;case _0x71578d[_0x6cc4c(0x187)]:{this[_0x6cc4c(0x1db)][_0x6cc4c(0x166)](_0x3fdd82,_0x5883ab,{'unitId':_0x3fdd82,'subUnitId':_0x5883ab,'ref':'','id':_0x1feac6['replyId'],'dT':_0x225ec6(+_0x1feac6[_0x6cc4c(0x18b)]),'threadId':_0x1feac6['threadId'],'personId':(_0x5cb461=(_0x588d49=_0x1feac6[_0x6cc4c(0x17a)])==null?void 0x0:_0x588d49[_0x6cc4c(0x197)])!=null?_0x5cb461:_0x1feac6[_0x6cc4c(0x1c8)],'text':JSON[_0x6cc4c(0x16c)](_0x1feac6[_0x6cc4c(0x171)]),'parentId':_0xed0d54['id']});break;}case _0x71578d[_0x6cc4c(0x177)]:{const _0x4dd7e4=this['_threadCommentModel'][_0x6cc4c(0x1b9)](_0x3fdd82,_0x5883ab,_0x1feac6[_0x6cc4c(0x1cd)]);_0x4dd7e4&&_0x4dd7e4[_0x6cc4c(0x189)]&&this[_0x6cc4c(0x1db)]['deleteComment'](_0x3fdd82,_0x5883ab,_0x1feac6[_0x6cc4c(0x1cd)]);break;}case _0x71578d['Edit']:{this[_0x6cc4c(0x1db)][_0x6cc4c(0x17c)](_0x3fdd82,_0x5883ab,{'commentId':_0x1feac6[_0x6cc4c(0x1cd)],'text':JSON[_0x6cc4c(0x16c)](_0x1feac6[_0x6cc4c(0x171)])});break;}case _0x71578d[_0x6cc4c(0x1d8)]:{const _0x42fd89=(_0x58be09=this[_0x6cc4c(0x1db)]['getUnit'](_0x1feac6['unitId'])['find'](_0xd31639=>_0xd31639[_0x6cc4c(0x18a)]===_0x1feac6[_0x6cc4c(0x18a)]))==null?void 0x0:_0x58be09[_0x6cc4c(0x16b)];_0x42fd89&&this['_threadCommentModel'][_0x6cc4c(0x16d)](_0x3fdd82,_0x5883ab,_0x42fd89['id'],_0x1feac6[_0x6cc4c(0x1e1)]===_0x43500a[_0x6cc4c(0x1ec)]);break;}}}));}};_0x4b488f=_0x5e342e([_0x436241(0x0,_0x5be78c[_0x41b6fe(0x170)](_0x4fd8e6['CommentService'])),_0x436241(0x1,_0x5be78c['Inject'](_0x571e47[_0x41b6fe(0x1d1)])),_0x436241(0x2,_0x5be78c[_0x41b6fe(0x170)](_0x5be78c[_0x41b6fe(0x17d)])),_0x436241(0x3,_0x5be78c[_0x41b6fe(0x170)](_0x5be78c[_0x41b6fe(0x169)]))],_0x4b488f);const _0x4e0bc2='thread-comment-data-source.config',_0xdef13d={};var _0x24732e=Object[_0x41b6fe(0x193)],_0x44a202=(_0xb9cd7a,_0x491af4,_0x2caf8e,_0x4b212f)=>{const _0x3ea1ce=_0x41b6fe;for(var _0x197a31=_0x4b212f>0x1?void 0x0:_0x4b212f?_0x24732e(_0x491af4,_0x2caf8e):_0x491af4,_0x55a111=_0xb9cd7a[_0x3ea1ce(0x1a0)]-0x1,_0x30c9a3;_0x55a111>=0x0;_0x55a111--)(_0x30c9a3=_0xb9cd7a[_0x55a111])&&(_0x197a31=_0x30c9a3(_0x197a31)||_0x197a31);return _0x197a31;},_0x4612ba=(_0x418da1,_0x584b47)=>(_0x29615a,_0x204619)=>_0x584b47(_0x29615a,_0x204619,_0x418da1);function _0x4a7584(_0x3ec253,_0x3ed5ea){const _0x50180e=_0x41b6fe,_0x13d49f=_0x3ec253[_0x50180e(0x167)][0x0];return{..._0x3ed5ea,'id':_0x13d49f[_0x50180e(0x1cd)],'resolved':_0x3ec253['solved']===0x1,'dT':_0x225ec6(_0x13d49f[_0x50180e(0x18b)]),'personId':_0x13d49f[_0x50180e(0x1c8)],'threadId':_0x13d49f['threadId']};}function _0x4c6026(_0x5deef6,_0x4451f4,_0x568b51){const _0x2e7211=_0x41b6fe;var _0x3c89fe,_0x49aeef;if(((_0x49aeef=(_0x3c89fe=_0x5deef6==null?void 0x0:_0x5deef6[_0x2e7211(0x167)])==null?void 0x0:_0x3c89fe[_0x2e7211(0x1a0)])!=null?_0x49aeef:0x0)>0x0){const _0x3e7a41=(_0x1bf6d9,_0x5d9694)=>({'id':_0x1bf6d9['replyId'],'threadId':_0x1bf6d9[_0x2e7211(0x18a)],'dT':_0x225ec6(_0x1bf6d9[_0x2e7211(0x18b)]),'personId':_0x1bf6d9['userId'],'resolved':_0x5deef6['solved']===_0x43500a[_0x2e7211(0x1ec)],'unitId':_0x4451f4,'subUnitId':_0x568b51,'text':JSON[_0x2e7211(0x16c)](_0x1bf6d9[_0x2e7211(0x171)]),'parentId':_0x5d9694}),_0x4d8ff2=_0x3e7a41(_0x5deef6[_0x2e7211(0x167)][0x0]);return{..._0x4d8ff2,'children':_0x5deef6[_0x2e7211(0x167)][_0x2e7211(0x181)](0x1)[_0x2e7211(0x191)](_0x16b312=>_0x3e7a41(_0x16b312,_0x4d8ff2['id']))};}return null;}let _0x44ed28=class{constructor(_0x300bb5,_0x5813da,_0x5801c1){const _0xfaedc0=_0x41b6fe;this[_0xfaedc0(0x18c)]=_0x300bb5,this['_userService']=_0x5813da,this[_0xfaedc0(0x1d6)]=_0x5801c1;}async[_0x41b6fe(0x166)](_0xefa031){const _0xd93711=_0x41b6fe;var _0x163902,_0x5ba9f7;const {parentId:_0x178b9b,unitId:_0x51aebf,text:_0x4d7967,threadId:_0x2f817d}=_0xefa031,_0x299439=(_0x5ba9f7=(_0x163902=_0x4d7967[_0xd93711(0x1be)])==null?void 0x0:_0x163902[_0xd93711(0x19f)](_0x45fe3f=>_0x45fe3f[_0xd93711(0x1ca)]===_0x5be78c[_0xd93711(0x1de)][_0xd93711(0x1e9)])[_0xd93711(0x191)](_0x567828=>_0x567828[_0xd93711(0x178)]))!=null?_0x5ba9f7:[],_0x39ade9=JSON[_0xd93711(0x1ba)](_0x4d7967),_0xff666e=(await this['_sessionService'][_0xd93711(0x180)](_0x51aebf))[_0xd93711(0x1b6)]();if(_0x178b9b){const _0x116259={'memberId':_0xff666e,'unitId':_0x51aebf,'content':_0x39ade9,'mention':_0x299439,'threadId':_0x2f817d},_0x87291f=(await this[_0xd93711(0x18c)]['post'](_0xd93711(0x190)+_0x51aebf+_0xd93711(0x19a),{'body':_0x116259}))[_0xd93711(0x1b3)][_0xd93711(0x1ae)];return{..._0xefa031,'id':_0x87291f[_0xd93711(0x1cd)],'dT':_0x5be78c[_0xd93711(0x1e8)](+_0x87291f[_0xd93711(0x18b)])[_0xd93711(0x16a)](_0xd93711(0x194)),'personId':_0x87291f[_0xd93711(0x1c8)]};}else{const _0x5af5fa={'memberId':_0xff666e,'unitId':_0x51aebf,'content':_0x39ade9,'mention':_0x299439},_0xb485da=await this[_0xd93711(0x18c)]['post']('/universer-api/comment/unit/'+_0x51aebf+_0xd93711(0x1d7),{'body':_0x5af5fa});return _0x4a7584(_0xb485da[_0xd93711(0x1b3)][_0xd93711(0x1c9)],_0xefa031);}}async[_0x41b6fe(0x17c)](_0x4708db){const _0xbc8f44=_0x41b6fe;var _0x2478c1,_0x196910;const {text:_0x26064d,unitId:_0x36940d}=_0x4708db,_0x5d2f05=(_0x196910=(_0x2478c1=_0x26064d[_0xbc8f44(0x1be)])==null?void 0x0:_0x2478c1['filter'](_0x534966=>_0x534966[_0xbc8f44(0x1ca)]===_0x5be78c[_0xbc8f44(0x1de)][_0xbc8f44(0x1e9)])['map'](_0x4983ba=>_0x4983ba[_0xbc8f44(0x178)]))!=null?_0x196910:[],_0x5d64eb=JSON['stringify'](_0x26064d),_0x143052=_0x4708db[_0xbc8f44(0x18a)],_0x3b15f9=_0x4708db['id'],_0x9ea0da={'memberId':(await this[_0xbc8f44(0x1d6)]['requireSession'](_0x36940d))[_0xbc8f44(0x1b6)](),'unitId':_0x36940d,'threadId':_0x143052,'mention':_0x5d2f05,'content':_0x5d64eb,'replyId':_0x3b15f9},_0x5619f2=await this['_httpService'][_0xbc8f44(0x17e)](_0xbc8f44(0x190)+_0x36940d+_0xbc8f44(0x199),{'body':_0x9ea0da});return!_0x5619f2[_0xbc8f44(0x1b3)][_0xbc8f44(0x185)]||_0x5619f2[_0xbc8f44(0x1b3)][_0xbc8f44(0x185)][_0xbc8f44(0x1a9)]===0x1;}async[_0x41b6fe(0x16d)](_0x3abb84){const _0x5208b0=_0x41b6fe,{unitId:_0x191d8a}=_0x3abb84,_0x543f70=_0x3abb84['threadId'],_0x3f1fcd={'memberId':this[_0x5208b0(0x1eb)]['getCurrentUser']()[_0x5208b0(0x197)],'unitId':_0x191d8a,'threadId':_0x543f70,'solved':_0x3abb84[_0x5208b0(0x1ce)]?_0x43500a['Solved']:_0x43500a[_0x5208b0(0x183)]},_0x2674ba=await this[_0x5208b0(0x18c)][_0x5208b0(0x17e)]('/universer-api/comment/unit/'+_0x191d8a+_0x5208b0(0x186),{'body':_0x3f1fcd});return!_0x2674ba['body'][_0x5208b0(0x185)]||_0x2674ba['body'][_0x5208b0(0x185)]['code']===0x1;}async[_0x41b6fe(0x1a5)](_0x38546d,_0x5ba380,_0x17b163,_0xec12db){const _0x1178df=_0x41b6fe,_0x54fc96={'memberId':(await this[_0x1178df(0x1d6)][_0x1178df(0x180)](_0x38546d))[_0x1178df(0x1b6)](),'threadId':_0x17b163,'replyId':_0xec12db,'unitId':_0x38546d},_0x2fc559=await this[_0x1178df(0x18c)][_0x1178df(0x17e)](_0x1178df(0x190)+_0x38546d+_0x1178df(0x168),{'body':_0x54fc96});return!_0x2fc559[_0x1178df(0x1b3)]['error']||_0x2fc559[_0x1178df(0x1b3)][_0x1178df(0x185)][_0x1178df(0x1a9)]===0x1;}async['listComments'](_0x300352,_0x2bb518,_0x564c48){const _0xf5c193=_0x41b6fe,_0x516a11={'unitId':_0x300352,'threadId':_0x564c48},_0x2b506c=await this[_0xf5c193(0x18c)][_0xf5c193(0x17e)](_0xf5c193(0x190)+_0x300352+_0xf5c193(0x1b2),{'body':_0x516a11}),_0x12f94c=_0x564c48['map'](_0x43b469=>_0x4c6026(_0x2b506c[_0xf5c193(0x1b3)]['comments'][_0x43b469],_0x300352,_0x2bb518))[_0xf5c193(0x19f)](Boolean);return Object[_0xf5c193(0x1cc)](_0x2b506c[_0xf5c193(0x1b3)][_0xf5c193(0x1b7)])[_0xf5c193(0x1c7)](_0x19f253=>{const _0x4055a7=_0xf5c193;this[_0x4055a7(0x1eb)]['addUser'](_0x19f253);}),_0x12f94c;}[_0x41b6fe(0x1af)](_0x42679c){const _0x148556=_0x41b6fe;return{'id':_0x42679c['id'],'threadId':_0x42679c[_0x148556(0x18a)],'ref':_0x42679c['ref']};}};_0x44ed28=_0x44a202([_0x4612ba(0x0,_0x5be78c[_0x41b6fe(0x170)](_0x266f01['HTTPService'])),_0x4612ba(0x1,_0x5be78c[_0x41b6fe(0x170)](_0x5be78c[_0x41b6fe(0x17d)])),_0x4612ba(0x2,_0x5be78c['Inject'](_0x4fd8e6[_0x41b6fe(0x1ab)]))],_0x44ed28);var _0x52a247=Object['getOwnPropertyDescriptor'],_0xfe3176=(_0x4eaac4,_0x5efdd9,_0x1af157,_0x2e01e7)=>{const _0x5ed3df=_0x41b6fe;for(var _0x517d59=_0x2e01e7>0x1?void 0x0:_0x2e01e7?_0x52a247(_0x5efdd9,_0x1af157):_0x5efdd9,_0x58c101=_0x4eaac4[_0x5ed3df(0x1a0)]-0x1,_0x430452;_0x58c101>=0x0;_0x58c101--)(_0x430452=_0x4eaac4[_0x58c101])&&(_0x517d59=_0x430452(_0x517d59)||_0x517d59);return _0x517d59;},_0x56dc7d=(_0x5c1b49,_0x5fc2da)=>(_0x5955b4,_0x103e6a)=>_0x5fc2da(_0x5955b4,_0x103e6a,_0x5c1b49);let _0x246e4e=class extends _0x5be78c[_0x41b6fe(0x19c)]{constructor(_0xfe1792,_0x5d5187){const _0xcfb4fe=_0x41b6fe;super(),this[_0xcfb4fe(0x1bf)]=_0xfe1792,this[_0xcfb4fe(0x1a4)]=_0x5d5187,this[_0xcfb4fe(0x1aa)]();}['_initDataSource'](){const _0x3e4c50=_0x41b6fe;this[_0x3e4c50(0x1bf)]['dataSource']=this['_threadCommentDataSource'],this[_0x3e4c50(0x1bf)][_0x3e4c50(0x1e3)]=!0x1;}};_0x246e4e=_0xfe3176([_0x56dc7d(0x0,_0x571e47[_0x41b6fe(0x16f)]),_0x56dc7d(0x1,_0x5be78c[_0x41b6fe(0x170)](_0x44ed28))],_0x246e4e);var _0x58cfbf=Object[_0x41b6fe(0x1dd)],_0x13444f=Object[_0x41b6fe(0x193)],_0x49bdba=(_0xb7f334,_0x506a36,_0x21a4b4)=>_0x506a36 in _0xb7f334?_0x58cfbf(_0xb7f334,_0x506a36,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x21a4b4}):_0xb7f334[_0x506a36]=_0x21a4b4,_0x4c452d=(_0x3f42a2,_0x5229f3,_0x6ef864,_0x50cb9d)=>{const _0x177f64=_0x41b6fe;for(var _0x2abffa=_0x50cb9d>0x1?void 0x0:_0x50cb9d?_0x13444f(_0x5229f3,_0x6ef864):_0x5229f3,_0x36dff3=_0x3f42a2[_0x177f64(0x1a0)]-0x1,_0x1383c5;_0x36dff3>=0x0;_0x36dff3--)(_0x1383c5=_0x3f42a2[_0x36dff3])&&(_0x2abffa=_0x1383c5(_0x2abffa)||_0x2abffa);return _0x2abffa;},_0x4580d1=(_0x7a3fcb,_0x48e29b)=>(_0x43928a,_0x14070f)=>_0x48e29b(_0x43928a,_0x14070f,_0x7a3fcb),_0x3430a1=(_0x19197b,_0x4d4072,_0x499049)=>_0x49bdba(_0x19197b,typeof _0x4d4072!=_0x41b6fe(0x1c6)?_0x4d4072+'':_0x4d4072,_0x499049);_0x9ebc8f[_0x41b6fe(0x179)]=class extends _0x5be78c[_0x41b6fe(0x1c1)]{constructor(_0x5b946d=_0xdef13d,_0x3a612d,_0x3c3ee8){const _0xf7211c=_0x41b6fe;super(),this[_0xf7211c(0x1bb)]=_0x5b946d,this[_0xf7211c(0x1df)]=_0x3a612d,this[_0xf7211c(0x1c0)]=_0x3c3ee8;const {..._0xef50e2}=_0x5be78c[_0xf7211c(0x1e0)]({},_0xdef13d,this['_config']);this['_configService'][_0xf7211c(0x18f)](_0x4e0bc2,_0xef50e2);}[_0x41b6fe(0x1a6)](){[[_0x44ed28],[_0x246e4e],[_0x4b488f]]['forEach'](_0x7f0fe1=>{const _0x2085c8=_0x462d;this[_0x2085c8(0x1df)][_0x2085c8(0x1d5)](_0x7f0fe1);});}[_0x41b6fe(0x1bc)](){const _0x42adb1=_0x41b6fe;this[_0x42adb1(0x1df)][_0x42adb1(0x1b1)](_0x246e4e),this[_0x42adb1(0x1df)]['get'](_0x4b488f);}},_0x3430a1(_0x9ebc8f[_0x41b6fe(0x179)],'pluginName',_0xf917b9),_0x3430a1(_0x9ebc8f[_0x41b6fe(0x179)],_0x41b6fe(0x1b4),_0x5be78c[_0x41b6fe(0x1d3)]['UNIVER_UNKNOWN']),_0x9ebc8f['UniverThreadCommentDataSourcePlugin']=_0x4c452d([_0x5be78c[_0x41b6fe(0x1ed)](_0x5edfa9[_0x41b6fe(0x18d)],_0x4fd8e6['UniverCollaborationClientPlugin'],_0xab9414[_0x41b6fe(0x1c2)]),_0x4580d1(0x1,_0x5be78c['Inject'](_0x5be78c['Injector'])),_0x4580d1(0x2,_0x5be78c[_0x41b6fe(0x172)])],_0x9ebc8f[_0x41b6fe(0x179)]),Object[_0x41b6fe(0x1dd)](_0x9ebc8f,Symbol[_0x41b6fe(0x174)],{'value':'Module'});}));function _0x462d(_0x42352c,_0x27a22f){const _0x39f160=_0x39f1();return _0x462d=function(_0x462d1c,_0x2dae7b){_0x462d1c=_0x462d1c-0x165;let _0x197b95=_0x39f160[_0x462d1c];return _0x197b95;},_0x462d(_0x42352c,_0x27a22f);}function _0x39f1(){const _0x178986=['UniverThreadCommentUIPlugin','UniverProThreadCommentDatasource','setConfig','/universer-api/comment/unit/','map','UniverNetwork','getOwnPropertyDescriptor','YYYY/MM/DD\x20HH:mm','payload','2129073hNjRKk','userID','7685040hojojq','/edit','/reply','size','Disposable','UniverCore','amd','filter','length','HTTPService','unitId','5VMkRFi','_threadCommentDataSource','deleteComment','onStarting','disposeWithMe','Unknown','code','_initDataSource','CollaborationSessionService','exports','_init','reply','saveCommentToSnapshot','_commentService','get','/list','body','type','UniverProCollaborationClient','getMemberID','users','@univerjs/network','getComment','stringify','_config','onReady','@univerjs/thread-comment','customRanges','_threadCommentDataSourceService','_configService','Plugin','UniverLicensePlugin','function','@univerjs/thread-comment-ui','2236122xHhELI','symbol','forEach','userId','comment','rangeType','@univerjs/core','values','replyId','resolved','getUser','1768072gSaDsi','ThreadCommentModel','addUser','UniverInstanceType','UNRECOGNIZED','add','_sessionService','/add','Solve','Add','2174286qwKRZk','_threadCommentModel','commentUpdate$','defineProperty','CustomRangeType','_injector','merge','solved','UniverThreadCommentUi','syncUpdateMutationToColla','/universer-api/user/list','1335988IEHKwB','Edit','find','dayjs','COMMENT','personId','_userService','Solved','DependentOn','58rfvCcM','addComment','replies','/delete','Injector','format','root','parse','resolveComment','rxjs','IThreadCommentDataSourceService','Inject','content','IConfigService','22166lUKgIl','toStringTag','_initUserSync','delete','Delete','rangeId','UniverThreadCommentDataSourcePlugin','user','UniverThreadComment','updateComment','UserManagerService','post','7tzzpCP','requireSession','slice','bufferTime','OpenOrReOpen','getUnit','error','/solved','Reply','@univerjs-pro/collaboration-client','parentId','threadId','createTimestamp','_httpService'];_0x39f1=function(){return _0x178986;};return _0x39f1();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.9.4-nightly.
|
|
3
|
+
"version": "0.9.4-nightly.202507290757",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/
|
|
49
|
-
"@univerjs
|
|
50
|
-
"@univerjs/core": "0.9.4-nightly.
|
|
51
|
-
"@univerjs/network": "0.9.4-nightly.202507290713",
|
|
48
|
+
"@univerjs-pro/license": "0.9.4-nightly.202507290757",
|
|
49
|
+
"@univerjs/network": "0.9.4-nightly.202507290757",
|
|
50
|
+
"@univerjs/core": "0.9.4-nightly.202507290757",
|
|
52
51
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
53
|
-
"@univerjs/thread-comment": "0.9.4-nightly.
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.9.4-nightly.
|
|
52
|
+
"@univerjs/thread-comment": "0.9.4-nightly.202507290757",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.9.4-nightly.202507290757",
|
|
54
|
+
"@univerjs-pro/collaboration-client": "0.9.4-nightly.202507290757"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|