@univerjs-pro/thread-comment-datasource 0.5.0 → 0.5.1-nightly.202412011605

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 CHANGED
@@ -1 +1 @@
1
- 'use strict';function _0x1464(){const _0x2cb1c7=['getUnit','map','comments','reply','Reply','onStarting','4949988gCvTiW','solved','_threadCommentDataSourceService','21wXGnmi','Add','defineProperty','@univerjs/thread-comment-ui','forEach','rangeId','Delete','19507365FfVDTd','IThreadCommentDataSourceService','toStringTag','parentId','parse','resolveComment','commentUpdate$','rxjs','error','subscribe','3477054mSpElA','requireSession','setConfig','UserManagerService','userID','listComments','stringify','COMMENT','addComment','type','1136627akMqFk','replyId','add','thread-comment-data-source.config','get','UNIVER_UNKNOWN','ThreadCommentModel','OpenOrReOpen','payload','updateComment','code','bufferTime','CustomRangeType','1534830rUlgqs','UNRECOGNIZED','_httpService','user','post','syncUpdateMutationToColla','_userService','threadId','DependentOn','customRanges','YYYY/MM/DD\x20HH:mm','length','find','CollaborationSessionService','_threadCommentModel','_sessionService','pipe','9252500UuSUvl','@univerjs-pro/collaboration-client','Inject','body','_initDataSource','@univerjs/core','_commentService','content','root','UniverInstanceType','getComment','symbol','getUser','comment','onReady','pluginName','Edit','rangeType','_threadCommentDataSource','format','ref','UniverThreadCommentUIPlugin','deleteComment','IConfigService','createTimestamp','UniverLicensePlugin','getCurrentUser','unitId','4mzBLYV','@univerjs-pro/license','_configService','UniverCollaborationClientPlugin','addUser','Solve','dayjs','getOwnPropertyDescriptor','Plugin','filter','dataSource','disposeWithMe','/universer-api/user/list','/edit','userId','UniverThreadCommentDataSourcePlugin','Unknown','replies','/universer-api/comment/unit/','_injector','size','Disposable','HTTPService','9398232PmaIAf','CommentService','getMemberID','saveCommentToSnapshot','Injector','Solved','slice'];_0x1464=function(){return _0x2cb1c7;};return _0x1464();}const _0x2aaf21=_0x45de;(function(_0x543183,_0x43f38d){const _0x52ce00=_0x45de,_0x472536=_0x543183();while(!![]){try{const _0x1e9cbb=parseInt(_0x52ce00(0xe4))/0x1+-parseInt(_0x52ce00(0xda))/0x2+parseInt(_0x52ce00(0xc6))/0x3+-parseInt(_0x52ce00(0x11e))/0x4*(parseInt(_0x52ce00(0x102))/0x5)+-parseInt(_0x52ce00(0xf1))/0x6*(-parseInt(_0x52ce00(0xc9))/0x7)+-parseInt(_0x52ce00(0x135))/0x8+parseInt(_0x52ce00(0xd0))/0x9;if(_0x1e9cbb===_0x43f38d)break;else _0x472536['push'](_0x472536['shift']());}catch(_0x3e7035){_0x472536['push'](_0x472536['shift']());}}}(_0x1464,0xe9d15));Object['defineProperty'](exports,Symbol[_0x2aaf21(0xd2)],{'value':'Module'});const c=require(_0x2aaf21(0x107)),N=require(_0x2aaf21(0xcc)),C=require(_0x2aaf21(0x103)),w=require(_0x2aaf21(0x11f)),O=require('@univerjs/thread-comment'),T=require(_0x2aaf21(0xd7)),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x543250=>(_0x543250[_0x543250[_0x2aaf21(0xeb)]=0x0]=_0x2aaf21(0xeb),_0x543250[_0x543250['Solved']=0x1]=_0x2aaf21(0x13a),_0x543250[_0x543250[_0x2aaf21(0xf2)]=-0x1]=_0x2aaf21(0xf2),_0x543250))(I||{}),v=(_0x5d896f=>(_0x5d896f[_0x5d896f[_0x2aaf21(0x12e)]=0x0]=_0x2aaf21(0x12e),_0x5d896f[_0x5d896f[_0x2aaf21(0xca)]=0x1]=_0x2aaf21(0xca),_0x5d896f[_0x5d896f['Reply']=0x2]=_0x2aaf21(0xc4),_0x5d896f[_0x5d896f['Edit']=0x3]=_0x2aaf21(0x112),_0x5d896f[_0x5d896f['Delete']=0x4]=_0x2aaf21(0xcf),_0x5d896f[_0x5d896f[_0x2aaf21(0x123)]=0x5]=_0x2aaf21(0x123),_0x5d896f[_0x5d896f[_0x2aaf21(0xf2)]=-0x1]=_0x2aaf21(0xf2),_0x5d896f))(v||{});const g=_0x333b9e=>c[_0x2aaf21(0x124)](new Date(+_0x333b9e))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x5c6936,_0x132866)=>{const _0x5a4335=_0x2aaf21,_0x1900db=_0x5c6936[_0x5a4335(0xe8)](c['UserManagerService']),_0x5705fc=_0x5c6936[_0x5a4335(0xe8)](P[_0x5a4335(0x134)]);_0x132866[_0x5a4335(0xcd)](_0x5b6456=>{const _0x404592=_0x5a4335;_0x1900db[_0x404592(0x10e)](_0x5b6456)&&_0x132866['delete'](_0x5b6456);}),_0x132866[_0x5a4335(0x132)]&&(await _0x5705fc[_0x5a4335(0xe8)](_0x5a4335(0x12a),{'params':{'userIDs':[..._0x132866]}}))[_0x5a4335(0x105)]['users'][_0x5a4335(0xcd)](_0x2d4e66=>{const _0x52add7=_0x5a4335;_0x2d4e66&&_0x1900db[_0x52add7(0x122)](_0x2d4e66);});};var $=Object[_0x2aaf21(0xcb)],E=Object[_0x2aaf21(0x125)],q=(_0x15fd4b,_0x55d0b0,_0x257b81,_0x1c125c)=>{const _0x1bdf9b=_0x2aaf21;for(var _0x26a7e8=_0x1c125c>0x1?void 0x0:_0x1c125c?E(_0x55d0b0,_0x257b81):_0x55d0b0,_0x109785=_0x15fd4b[_0x1bdf9b(0xfc)]-0x1,_0x24f8fa;_0x109785>=0x0;_0x109785--)(_0x24f8fa=_0x15fd4b[_0x109785])&&(_0x26a7e8=(_0x1c125c?_0x24f8fa(_0x55d0b0,_0x257b81,_0x26a7e8):_0x24f8fa(_0x26a7e8))||_0x26a7e8);return _0x1c125c&&_0x26a7e8&&$(_0x55d0b0,_0x257b81,_0x26a7e8),_0x26a7e8;},_=(_0xc77987,_0x1c210c)=>(_0x17a256,_0x308c66)=>_0x1c210c(_0x17a256,_0x308c66,_0xc77987);let S=class extends c[_0x2aaf21(0x133)]{constructor(_0x479838,_0x462649,_0x2243a5,_0x579ba2){const _0x68073c=_0x2aaf21;super(),this[_0x68073c(0x108)]=_0x479838,this[_0x68073c(0xff)]=_0x462649,this['_userService']=_0x2243a5,this[_0x68073c(0x131)]=_0x579ba2,this['_init'](),this['_initUserSync']();}['_initUserSync'](){const _0x56dbb0=_0x2aaf21;this[_0x56dbb0(0x129)](this[_0x56dbb0(0xff)][_0x56dbb0(0xd6)][_0x56dbb0(0x101)](T[_0x56dbb0(0xef)](0x10))[_0x56dbb0(0xd9)](_0xf45fcf=>{const _0xb0d7e5=_0x56dbb0,_0x22a707=new Set();_0xf45fcf[_0xb0d7e5(0xcd)](_0x36106b=>{const _0x558095=_0xb0d7e5;switch(_0x36106b['type']){case _0x558095(0xe6):{const _0x587259=_0x36106b[_0x558095(0xec)]['personId'];_0x22a707[_0x558095(0xe6)](_0x587259);break;}}}),R(this[_0xb0d7e5(0x131)],_0x22a707);}));}['_init'](){const _0x5413a6=_0x2aaf21;this[_0x5413a6(0x129)](this[_0x5413a6(0x108)][_0x5413a6(0xd6)][_0x5413a6(0xd9)](async _0x2ca63d=>{const _0x11c51=_0x5413a6;var _0x5f216a,_0x4b94e1,_0x178073,_0x32682e;const _0x1ab752=(_0x5f216a=this[_0x11c51(0xff)][_0x11c51(0xc0)](_0x2ca63d[_0x11c51(0x11d)])[_0x11c51(0xfd)](_0x14ac6c=>_0x14ac6c['threadId']===_0x2ca63d['threadId']))==null?void 0x0:_0x5f216a[_0x11c51(0x10a)];if(!_0x1ab752)return;const {unitId:_0x3e8e17,subUnitId:_0x3ab1a}=_0x1ab752;switch(_0x2ca63d[_0x11c51(0xf4)]&&this[_0x11c51(0xf7)]['addUser'](_0x2ca63d['user']),_0x2ca63d[_0x11c51(0xe3)]){case v[_0x11c51(0xca)]:break;case v[_0x11c51(0xc4)]:{this[_0x11c51(0xff)][_0x11c51(0xe2)](_0x3e8e17,_0x3ab1a,{'unitId':_0x3e8e17,'subUnitId':_0x3ab1a,'ref':'','id':_0x2ca63d[_0x11c51(0xe5)],'dT':g(+_0x2ca63d[_0x11c51(0x11a)]),'threadId':_0x2ca63d[_0x11c51(0xf8)],'personId':(_0x178073=(_0x4b94e1=_0x2ca63d[_0x11c51(0xf4)])==null?void 0x0:_0x4b94e1[_0x11c51(0xde)])!=null?_0x178073:_0x2ca63d[_0x11c51(0x12c)],'text':JSON[_0x11c51(0xd4)](_0x2ca63d[_0x11c51(0x109)]),'parentId':_0x1ab752['id']});break;}case v[_0x11c51(0xcf)]:{const _0x441da5=this[_0x11c51(0xff)][_0x11c51(0x10c)](_0x3e8e17,_0x3ab1a,_0x2ca63d[_0x11c51(0xe5)]);_0x441da5&&_0x441da5[_0x11c51(0xd3)]&&this['_threadCommentModel'][_0x11c51(0x118)](_0x3e8e17,_0x3ab1a,_0x2ca63d[_0x11c51(0xe5)]);break;}case v[_0x11c51(0x112)]:{this[_0x11c51(0xff)][_0x11c51(0xed)](_0x3e8e17,_0x3ab1a,{'commentId':_0x2ca63d[_0x11c51(0xe5)],'text':JSON[_0x11c51(0xd4)](_0x2ca63d['content'])});break;}case v[_0x11c51(0x123)]:{const _0x21e52e=(_0x32682e=this['_threadCommentModel'][_0x11c51(0xc0)](_0x2ca63d[_0x11c51(0x11d)])[_0x11c51(0xfd)](_0x44aaa1=>_0x44aaa1[_0x11c51(0xf8)]===_0x2ca63d[_0x11c51(0xf8)]))==null?void 0x0:_0x32682e[_0x11c51(0x10a)];_0x21e52e&&this['_threadCommentModel']['resolveComment'](_0x3e8e17,_0x3ab1a,_0x21e52e['id'],_0x2ca63d[_0x11c51(0xc7)]===I['Solved']);break;}}}));}};S=q([_(0x0,c[_0x2aaf21(0x104)](C[_0x2aaf21(0x136)])),_(0x1,c['Inject'](O[_0x2aaf21(0xea)])),_(0x2,c['Inject'](c['UserManagerService'])),_(0x3,c[_0x2aaf21(0x104)](c[_0x2aaf21(0x139)]))],S);const x=_0x2aaf21(0xe7),Y={};var G=Object[_0x2aaf21(0xcb)],A=Object[_0x2aaf21(0x125)],H=(_0xcb7baf,_0x1c5f31,_0x4041a7,_0x5847ef)=>{const _0x171e66=_0x2aaf21;for(var _0x4e2e53=_0x5847ef>0x1?void 0x0:_0x5847ef?A(_0x1c5f31,_0x4041a7):_0x1c5f31,_0x1389ea=_0xcb7baf[_0x171e66(0xfc)]-0x1,_0x15344c;_0x1389ea>=0x0;_0x1389ea--)(_0x15344c=_0xcb7baf[_0x1389ea])&&(_0x4e2e53=(_0x5847ef?_0x15344c(_0x1c5f31,_0x4041a7,_0x4e2e53):_0x15344c(_0x4e2e53))||_0x4e2e53);return _0x5847ef&&_0x4e2e53&&G(_0x1c5f31,_0x4041a7,_0x4e2e53),_0x4e2e53;},p=(_0x3477bc,_0xdd5c7d)=>(_0x26a822,_0x22c5db)=>_0xdd5c7d(_0x26a822,_0x22c5db,_0x3477bc);function J(_0x2bc8f6,_0x39e9f6){const _0x4a885e=_0x2aaf21,_0x4e1c4f=_0x2bc8f6[_0x4a885e(0x12f)][0x0];return{..._0x39e9f6,'id':_0x4e1c4f[_0x4a885e(0xe5)],'resolved':_0x2bc8f6[_0x4a885e(0xc7)]===0x1,'dT':g(_0x4e1c4f[_0x4a885e(0x11a)]),'personId':_0x4e1c4f[_0x4a885e(0x12c)],'threadId':_0x4e1c4f[_0x4a885e(0xf8)]};}function F(_0x19b5d3,_0x748a77,_0x5287c0){const _0x5800fe=_0x2aaf21;var _0xcba103,_0xb3f785;if(((_0xb3f785=(_0xcba103=_0x19b5d3==null?void 0x0:_0x19b5d3[_0x5800fe(0x12f)])==null?void 0x0:_0xcba103['length'])!=null?_0xb3f785:0x0)>0x0){const _0x1c0190=(_0x3910c8,_0x5c0334)=>({'id':_0x3910c8[_0x5800fe(0xe5)],'threadId':_0x3910c8['threadId'],'dT':g(_0x3910c8[_0x5800fe(0x11a)]),'personId':_0x3910c8['userId'],'resolved':_0x19b5d3['solved']===I[_0x5800fe(0x13a)],'unitId':_0x748a77,'subUnitId':_0x5287c0,'text':JSON[_0x5800fe(0xd4)](_0x3910c8[_0x5800fe(0x109)]),'parentId':_0x5c0334}),_0x45961b=_0x1c0190(_0x19b5d3[_0x5800fe(0x12f)][0x0]);return{..._0x45961b,'children':_0x19b5d3[_0x5800fe(0x12f)][_0x5800fe(0xbf)](0x1)[_0x5800fe(0xc1)](_0x2b0be0=>_0x1c0190(_0x2b0be0,_0x45961b['id']))};}return null;}function _0x45de(_0x5f354a,_0x548d39){const _0x14640a=_0x1464();return _0x45de=function(_0x45ded5,_0x4d10bd){_0x45ded5=_0x45ded5-0xbf;let _0x4d5553=_0x14640a[_0x45ded5];return _0x4d5553;},_0x45de(_0x5f354a,_0x548d39);}let f=class{constructor(_0x2fcd7b,_0x24e365,_0x5f08c3,_0x547d77){const _0x1b382b=_0x2aaf21;this[_0x1b382b(0xf3)]=_0x2fcd7b,this[_0x1b382b(0xf7)]=_0x24e365,this[_0x1b382b(0x100)]=_0x5f08c3,this[_0x1b382b(0x131)]=_0x547d77;}async[_0x2aaf21(0xe2)](_0x2d47e5){const _0x701568=_0x2aaf21;var _0x1b1fab,_0x368893;const {parentId:_0x43af33,unitId:_0x21d43e,text:_0x45af80,threadId:_0x524be0}=_0x2d47e5,_0x39ee30=(_0x368893=(_0x1b1fab=_0x45af80['customRanges'])==null?void 0x0:_0x1b1fab[_0x701568(0x127)](_0x4de4d2=>_0x4de4d2[_0x701568(0x113)]===c['CustomRangeType'][_0x701568(0xe1)])['map'](_0x2eac49=>_0x2eac49[_0x701568(0xce)]))!=null?_0x368893:[],_0x28e758=JSON['stringify'](_0x45af80),_0x21ac10=(await this[_0x701568(0x100)][_0x701568(0xdb)](_0x21d43e))[_0x701568(0x137)]();if(_0x43af33){const _0x1dd48a={'memberId':_0x21ac10,'unitId':_0x21d43e,'content':_0x28e758,'mention':_0x39ee30,'threadId':_0x524be0},_0x1501fa=(await this[_0x701568(0xf3)][_0x701568(0xf5)](_0x701568(0x130)+_0x21d43e+'/reply',{'body':_0x1dd48a}))[_0x701568(0x105)][_0x701568(0xc3)];return{..._0x2d47e5,'id':_0x1501fa[_0x701568(0xe5)],'dT':c[_0x701568(0x124)](+_0x1501fa['createTimestamp'])[_0x701568(0x115)](_0x701568(0xfb)),'personId':_0x1501fa[_0x701568(0x12c)]};}else{const _0x1ce89a={'memberId':_0x21ac10,'unitId':_0x21d43e,'content':_0x28e758,'mention':_0x39ee30},_0x5cd543=await this[_0x701568(0xf3)]['post'](_0x701568(0x130)+_0x21d43e+'/add',{'body':_0x1ce89a});return J(_0x5cd543['body'][_0x701568(0x10f)],_0x2d47e5);}}async[_0x2aaf21(0xed)](_0x1b40ee){const _0x1b1aee=_0x2aaf21;var _0x196110,_0x3b39ae;const {text:_0x34c3e2,unitId:_0x5e8313}=_0x1b40ee,_0x3e6146=(_0x3b39ae=(_0x196110=_0x34c3e2[_0x1b1aee(0xfa)])==null?void 0x0:_0x196110[_0x1b1aee(0x127)](_0x5a4a71=>_0x5a4a71[_0x1b1aee(0x113)]===c[_0x1b1aee(0xf0)][_0x1b1aee(0xe1)])[_0x1b1aee(0xc1)](_0x3868bb=>_0x3868bb[_0x1b1aee(0xce)]))!=null?_0x3b39ae:[],_0x12142f=JSON[_0x1b1aee(0xe0)](_0x34c3e2),_0x1179ba=_0x1b40ee[_0x1b1aee(0xf8)],_0x406507=_0x1b40ee['id'],_0x4e2809={'memberId':(await this[_0x1b1aee(0x100)][_0x1b1aee(0xdb)](_0x5e8313))[_0x1b1aee(0x137)](),'unitId':_0x5e8313,'threadId':_0x1179ba,'mention':_0x3e6146,'content':_0x12142f,'replyId':_0x406507},_0x26ab58=await this[_0x1b1aee(0xf3)][_0x1b1aee(0xf5)](_0x1b1aee(0x130)+_0x5e8313+_0x1b1aee(0x12b),{'body':_0x4e2809});return!_0x26ab58[_0x1b1aee(0x105)][_0x1b1aee(0xd8)]||_0x26ab58[_0x1b1aee(0x105)][_0x1b1aee(0xd8)][_0x1b1aee(0xee)]===0x1;}async[_0x2aaf21(0xd5)](_0x132dfc){const _0x131d17=_0x2aaf21,{unitId:_0x54fe58}=_0x132dfc,_0x96d95b=_0x132dfc[_0x131d17(0xf8)],_0x4851eb={'memberId':this[_0x131d17(0xf7)][_0x131d17(0x11c)]()[_0x131d17(0xde)],'unitId':_0x54fe58,'threadId':_0x96d95b,'solved':_0x132dfc['resolved']?I[_0x131d17(0x13a)]:I[_0x131d17(0xeb)]},_0x413ec8=await this[_0x131d17(0xf3)][_0x131d17(0xf5)]('/universer-api/comment/unit/'+_0x54fe58+'/solved',{'body':_0x4851eb});return!_0x413ec8[_0x131d17(0x105)]['error']||_0x413ec8[_0x131d17(0x105)][_0x131d17(0xd8)][_0x131d17(0xee)]===0x1;}async[_0x2aaf21(0x118)](_0x114841,_0x46fafe,_0x3a4c94,_0x4af5a9){const _0x4a4a6e=_0x2aaf21,_0x1c611d={'memberId':(await this[_0x4a4a6e(0x100)][_0x4a4a6e(0xdb)](_0x114841))[_0x4a4a6e(0x137)](),'threadId':_0x3a4c94,'replyId':_0x4af5a9,'unitId':_0x114841},_0x1ed2d4=await this[_0x4a4a6e(0xf3)][_0x4a4a6e(0xf5)](_0x4a4a6e(0x130)+_0x114841+'/delete',{'body':_0x1c611d});return!_0x1ed2d4[_0x4a4a6e(0x105)][_0x4a4a6e(0xd8)]||_0x1ed2d4[_0x4a4a6e(0x105)][_0x4a4a6e(0xd8)][_0x4a4a6e(0xee)]===0x1;}async[_0x2aaf21(0xdf)](_0x59ff05,_0x46549f,_0x3e68a6){const _0x33057b=_0x2aaf21,_0x42e87d={'unitId':_0x59ff05,'threadId':_0x3e68a6},_0x5c4323=await this[_0x33057b(0xf3)][_0x33057b(0xf5)](_0x33057b(0x130)+_0x59ff05+'/list',{'body':_0x42e87d}),_0x4a4778=_0x3e68a6[_0x33057b(0xc1)](_0x174cef=>F(_0x5c4323[_0x33057b(0x105)][_0x33057b(0xc2)][_0x174cef],_0x59ff05,_0x46549f))['filter'](Boolean);return Object['values'](_0x5c4323[_0x33057b(0x105)]['users'])['forEach'](_0x41cd90=>{this['_userService']['addUser'](_0x41cd90);}),_0x4a4778;}[_0x2aaf21(0x138)](_0x29ae08){const _0x43035d=_0x2aaf21;return{'id':_0x29ae08['id'],'threadId':_0x29ae08[_0x43035d(0xf8)],'ref':_0x29ae08[_0x43035d(0x116)]};}};f=H([p(0x0,c['Inject'](P[_0x2aaf21(0x134)])),p(0x1,c[_0x2aaf21(0x104)](c[_0x2aaf21(0xdd)])),p(0x2,c['Inject'](C[_0x2aaf21(0xfe)])),p(0x3,c['Inject'](c[_0x2aaf21(0x139)]))],f);var L=Object['defineProperty'],Z=Object[_0x2aaf21(0x125)],W=(_0x403f1d,_0x5c3a90,_0x4c17d7,_0xcd529d)=>{const _0x1c0205=_0x2aaf21;for(var _0x28fc11=_0xcd529d>0x1?void 0x0:_0xcd529d?Z(_0x5c3a90,_0x4c17d7):_0x5c3a90,_0x4abb50=_0x403f1d[_0x1c0205(0xfc)]-0x1,_0x46e8c6;_0x4abb50>=0x0;_0x4abb50--)(_0x46e8c6=_0x403f1d[_0x4abb50])&&(_0x28fc11=(_0xcd529d?_0x46e8c6(_0x5c3a90,_0x4c17d7,_0x28fc11):_0x46e8c6(_0x28fc11))||_0x28fc11);return _0xcd529d&&_0x28fc11&&L(_0x5c3a90,_0x4c17d7,_0x28fc11),_0x28fc11;},D=(_0x497f9a,_0x59b189)=>(_0x500d8d,_0x1db363)=>_0x59b189(_0x500d8d,_0x1db363,_0x497f9a);let b=class extends c['Disposable']{constructor(_0x35637c,_0x21478e){const _0x4ad4f3=_0x2aaf21;super(),this[_0x4ad4f3(0xc8)]=_0x35637c,this[_0x4ad4f3(0x114)]=_0x21478e,this[_0x4ad4f3(0x106)]();}[_0x2aaf21(0x106)](){const _0x46e0fa=_0x2aaf21;this[_0x46e0fa(0xc8)][_0x46e0fa(0x128)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x46e0fa(0xf6)]=!0x1;}};b=W([D(0x0,O[_0x2aaf21(0xd1)]),D(0x1,c['Inject'](f))],b);var j=Object[_0x2aaf21(0xcb)],B=Object[_0x2aaf21(0x125)],K=(_0x447f66,_0x3823a2,_0x14c5bc)=>_0x3823a2 in _0x447f66?j(_0x447f66,_0x3823a2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x14c5bc}):_0x447f66[_0x3823a2]=_0x14c5bc,V=(_0x1cdaa1,_0x3c1062,_0x6344d4,_0xe543b7)=>{for(var _0x20d03d=_0xe543b7>0x1?void 0x0:_0xe543b7?B(_0x3c1062,_0x6344d4):_0x3c1062,_0x59d948=_0x1cdaa1['length']-0x1,_0x33a43a;_0x59d948>=0x0;_0x59d948--)(_0x33a43a=_0x1cdaa1[_0x59d948])&&(_0x20d03d=(_0xe543b7?_0x33a43a(_0x3c1062,_0x6344d4,_0x20d03d):_0x33a43a(_0x20d03d))||_0x20d03d);return _0xe543b7&&_0x20d03d&&j(_0x3c1062,_0x6344d4,_0x20d03d),_0x20d03d;},y=(_0x27a32c,_0x45cc4a)=>(_0x3d62e3,_0x17b5e5)=>_0x45cc4a(_0x3d62e3,_0x17b5e5,_0x27a32c),M=(_0xe6d0,_0x481c0f,_0xc66a94)=>K(_0xe6d0,typeof _0x481c0f!=_0x2aaf21(0x10d)?_0x481c0f+'':_0x481c0f,_0xc66a94);exports[_0x2aaf21(0x12d)]=class extends c[_0x2aaf21(0x126)]{constructor(_0x664a05=Y,_0x5c103d,_0x4cf13a){const _0x588c2d=_0x2aaf21;super(),this['_config']=_0x664a05,this[_0x588c2d(0x131)]=_0x5c103d,this['_configService']=_0x4cf13a;const {..._0x13ccb6}=this['_config'];this[_0x588c2d(0x120)][_0x588c2d(0xdc)](x,_0x13ccb6);}[_0x2aaf21(0xc5)](){const _0xd5adc=_0x2aaf21;[[f],[b],[S]][_0xd5adc(0xcd)](_0x51406c=>{const _0x54d825=_0xd5adc;this['_injector'][_0x54d825(0xe6)](_0x51406c);});}[_0x2aaf21(0x110)](){const _0x32a8e6=_0x2aaf21;this[_0x32a8e6(0x131)]['get'](b),this['_injector'][_0x32a8e6(0xe8)](S);}},M(exports[_0x2aaf21(0x12d)],_0x2aaf21(0x111),U),M(exports[_0x2aaf21(0x12d)],_0x2aaf21(0xe3),c[_0x2aaf21(0x10b)][_0x2aaf21(0xe9)]),exports['UniverThreadCommentDataSourcePlugin']=V([c[_0x2aaf21(0xf9)](N[_0x2aaf21(0x117)],C[_0x2aaf21(0x121)],w[_0x2aaf21(0x11b)]),y(0x1,c[_0x2aaf21(0x104)](c[_0x2aaf21(0x139)])),y(0x2,c[_0x2aaf21(0x119)])],exports[_0x2aaf21(0x12d)]);
1
+ 'use strict';const _0x142074=_0x331e;(function(_0x16f8b8,_0x3a434b){const _0x23cc9e=_0x331e,_0x315833=_0x16f8b8();while(!![]){try{const _0x1759b1=parseInt(_0x23cc9e(0x23e))/0x1+-parseInt(_0x23cc9e(0x245))/0x2+-parseInt(_0x23cc9e(0x20e))/0x3*(-parseInt(_0x23cc9e(0x1fe))/0x4)+-parseInt(_0x23cc9e(0x1e8))/0x5+-parseInt(_0x23cc9e(0x235))/0x6*(parseInt(_0x23cc9e(0x1e3))/0x7)+parseInt(_0x23cc9e(0x250))/0x8*(parseInt(_0x23cc9e(0x22f))/0x9)+parseInt(_0x23cc9e(0x21c))/0xa;if(_0x1759b1===_0x3a434b)break;else _0x315833['push'](_0x315833['shift']());}catch(_0x51b109){_0x315833['push'](_0x315833['shift']());}}}(_0x2c87,0x687d3));function _0x331e(_0x44d500,_0x485df5){const _0x2c8747=_0x2c87();return _0x331e=function(_0x331e91,_0x4414a3){_0x331e91=_0x331e91-0x1dc;let _0x4ec813=_0x2c8747[_0x331e91];return _0x4ec813;},_0x331e(_0x44d500,_0x485df5);}Object[_0x142074(0x254)](exports,Symbol[_0x142074(0x248)],{'value':_0x142074(0x255)});const C=require(_0x142074(0x1ff)),N=require(_0x142074(0x258)),c=require(_0x142074(0x230)),T=require(_0x142074(0x221)),y=require(_0x142074(0x1e1)),w=require(_0x142074(0x1fb)),P=require(_0x142074(0x22a)),U=_0x142074(0x234);var I=(_0xb5931c=>(_0xb5931c[_0xb5931c[_0x142074(0x233)]=0x0]=_0x142074(0x233),_0xb5931c[_0xb5931c[_0x142074(0x229)]=0x1]=_0x142074(0x229),_0xb5931c[_0xb5931c[_0x142074(0x21b)]=-0x1]='UNRECOGNIZED',_0xb5931c))(I||{}),v=(_0x57ad39=>(_0x57ad39[_0x57ad39['Unknown']=0x0]='Unknown',_0x57ad39[_0x57ad39['Add']=0x1]=_0x142074(0x216),_0x57ad39[_0x57ad39[_0x142074(0x219)]=0x2]=_0x142074(0x219),_0x57ad39[_0x57ad39['Edit']=0x3]=_0x142074(0x24f),_0x57ad39[_0x57ad39[_0x142074(0x23a)]=0x4]=_0x142074(0x23a),_0x57ad39[_0x57ad39['Solve']=0x5]='Solve',_0x57ad39[_0x57ad39[_0x142074(0x21b)]=-0x1]=_0x142074(0x21b),_0x57ad39))(v||{});const g=_0x11a0d7=>c[_0x142074(0x215)](new Date(+_0x11a0d7))['format'](_0x142074(0x1e2)),R=async(_0x2b0976,_0x1f5879)=>{const _0x2eddd3=_0x142074,_0x42dec4=_0x2b0976[_0x2eddd3(0x1df)](c['UserManagerService']),_0x4f8f47=_0x2b0976[_0x2eddd3(0x1df)](P[_0x2eddd3(0x1fc)]);_0x1f5879['forEach'](_0x6faebd=>{const _0x108fc2=_0x2eddd3;_0x42dec4['getUser'](_0x6faebd)&&_0x1f5879[_0x108fc2(0x1f0)](_0x6faebd);}),_0x1f5879[_0x2eddd3(0x212)]&&(await _0x4f8f47['get'](_0x2eddd3(0x1ef),{'params':{'userIDs':[..._0x1f5879]}}))[_0x2eddd3(0x24a)][_0x2eddd3(0x205)][_0x2eddd3(0x24c)](_0x5f127b=>{const _0xc7b032=_0x2eddd3;_0x5f127b&&_0x42dec4[_0xc7b032(0x242)](_0x5f127b);});};var $=Object['defineProperty'],E=Object[_0x142074(0x206)],q=(_0xd262da,_0x3c1453,_0x1aa798,_0xf6ec6d)=>{const _0x296acd=_0x142074;for(var _0xc9d98b=_0xf6ec6d>0x1?void 0x0:_0xf6ec6d?E(_0x3c1453,_0x1aa798):_0x3c1453,_0x5a8e9d=_0xd262da[_0x296acd(0x239)]-0x1,_0x407def;_0x5a8e9d>=0x0;_0x5a8e9d--)(_0x407def=_0xd262da[_0x5a8e9d])&&(_0xc9d98b=(_0xf6ec6d?_0x407def(_0x3c1453,_0x1aa798,_0xc9d98b):_0x407def(_0xc9d98b))||_0xc9d98b);return _0xf6ec6d&&_0xc9d98b&&$(_0x3c1453,_0x1aa798,_0xc9d98b),_0xc9d98b;},_=(_0x36a4f2,_0x4d9179)=>(_0x10a23f,_0x2fba9f)=>_0x4d9179(_0x10a23f,_0x2fba9f,_0x36a4f2);let S=class extends c[_0x142074(0x20f)]{constructor(_0x1dc036,_0x42c457,_0x30646f,_0x17612b){const _0x4ba5bc=_0x142074;super(),this['_commentService']=_0x1dc036,this[_0x4ba5bc(0x231)]=_0x42c457,this[_0x4ba5bc(0x21d)]=_0x30646f,this[_0x4ba5bc(0x1e7)]=_0x17612b,this['_init'](),this[_0x4ba5bc(0x207)]();}['_initUserSync'](){const _0x4089d6=_0x142074;this[_0x4089d6(0x1ea)](this[_0x4089d6(0x231)][_0x4089d6(0x22b)][_0x4089d6(0x256)](w['bufferTime'](0x10))[_0x4089d6(0x20a)](_0x2366d1=>{const _0x5710fe=_0x4089d6,_0x421f01=new Set();_0x2366d1['forEach'](_0x4fc43c=>{const _0x5754aa=_0x331e;switch(_0x4fc43c[_0x5754aa(0x21a)]){case _0x5754aa(0x1dd):{const _0x8100f=_0x4fc43c[_0x5754aa(0x246)][_0x5754aa(0x1e9)];_0x421f01[_0x5754aa(0x1dd)](_0x8100f);break;}}}),R(this[_0x5710fe(0x1e7)],_0x421f01);}));}[_0x142074(0x227)](){const _0x5a0161=_0x142074;this[_0x5a0161(0x1ea)](this[_0x5a0161(0x1dc)][_0x5a0161(0x22b)][_0x5a0161(0x20a)](async _0x4945ef=>{const _0x43898d=_0x5a0161;var _0x4cc546,_0x4f0a63,_0x140b5a,_0xfbac42;const _0x455eb6=(_0x4cc546=this[_0x43898d(0x231)][_0x43898d(0x220)](_0x4945ef['unitId'])[_0x43898d(0x1e5)](_0x19ace9=>_0x19ace9[_0x43898d(0x1f3)]===_0x4945ef[_0x43898d(0x1f3)]))==null?void 0x0:_0x4cc546['root'];if(!_0x455eb6)return;const {unitId:_0x22c673,subUnitId:_0x3d883b}=_0x455eb6;switch(_0x4945ef['user']&&this[_0x43898d(0x21d)][_0x43898d(0x242)](_0x4945ef['user']),_0x4945ef[_0x43898d(0x21a)]){case v[_0x43898d(0x216)]:break;case v['Reply']:{this[_0x43898d(0x231)][_0x43898d(0x232)](_0x22c673,_0x3d883b,{'unitId':_0x22c673,'subUnitId':_0x3d883b,'ref':'','id':_0x4945ef[_0x43898d(0x241)],'dT':g(+_0x4945ef['createTimestamp']),'threadId':_0x4945ef['threadId'],'personId':(_0x140b5a=(_0x4f0a63=_0x4945ef[_0x43898d(0x20b)])==null?void 0x0:_0x4f0a63[_0x43898d(0x243)])!=null?_0x140b5a:_0x4945ef['userId'],'text':JSON[_0x43898d(0x236)](_0x4945ef[_0x43898d(0x211)]),'parentId':_0x455eb6['id']});break;}case v[_0x43898d(0x23a)]:{const _0x45c0f0=this[_0x43898d(0x231)]['getComment'](_0x22c673,_0x3d883b,_0x4945ef['replyId']);_0x45c0f0&&_0x45c0f0[_0x43898d(0x222)]&&this['_threadCommentModel']['deleteComment'](_0x22c673,_0x3d883b,_0x4945ef['replyId']);break;}case v[_0x43898d(0x24f)]:{this[_0x43898d(0x231)][_0x43898d(0x21e)](_0x22c673,_0x3d883b,{'commentId':_0x4945ef['replyId'],'text':JSON[_0x43898d(0x236)](_0x4945ef[_0x43898d(0x211)])});break;}case v['Solve']:{const _0x3f0890=(_0xfbac42=this[_0x43898d(0x231)][_0x43898d(0x220)](_0x4945ef[_0x43898d(0x21f)])[_0x43898d(0x1e5)](_0x142f24=>_0x142f24['threadId']===_0x4945ef[_0x43898d(0x1f3)]))==null?void 0x0:_0xfbac42[_0x43898d(0x1ec)];_0x3f0890&&this[_0x43898d(0x231)][_0x43898d(0x228)](_0x22c673,_0x3d883b,_0x3f0890['id'],_0x4945ef[_0x43898d(0x244)]===I[_0x43898d(0x229)]);break;}}}));}};S=q([_(0x0,c[_0x142074(0x1eb)](C[_0x142074(0x225)])),_(0x1,c['Inject'](y[_0x142074(0x226)])),_(0x2,c[_0x142074(0x1eb)](c['UserManagerService'])),_(0x3,c[_0x142074(0x1eb)](c[_0x142074(0x214)]))],S);const A=_0x142074(0x24b),x={};var Y=Object[_0x142074(0x254)],G=Object[_0x142074(0x206)],H=(_0x201d8b,_0x49d456,_0x459676,_0x3a8a7f)=>{for(var _0x3a3138=_0x3a8a7f>0x1?void 0x0:_0x3a8a7f?G(_0x49d456,_0x459676):_0x49d456,_0x102d7b=_0x201d8b['length']-0x1,_0x21ee26;_0x102d7b>=0x0;_0x102d7b--)(_0x21ee26=_0x201d8b[_0x102d7b])&&(_0x3a3138=(_0x3a8a7f?_0x21ee26(_0x49d456,_0x459676,_0x3a3138):_0x21ee26(_0x3a3138))||_0x3a3138);return _0x3a8a7f&&_0x3a3138&&Y(_0x49d456,_0x459676,_0x3a3138),_0x3a3138;},p=(_0x280024,_0x3e65c2)=>(_0x4dcaa4,_0x1d5c22)=>_0x3e65c2(_0x4dcaa4,_0x1d5c22,_0x280024);function J(_0x7b2a1d,_0x4d077b){const _0x302922=_0x142074,_0x293263=_0x7b2a1d['replies'][0x0];return{..._0x4d077b,'id':_0x293263[_0x302922(0x241)],'resolved':_0x7b2a1d[_0x302922(0x244)]===0x1,'dT':g(_0x293263[_0x302922(0x1f2)]),'personId':_0x293263['userId'],'threadId':_0x293263[_0x302922(0x1f3)]};}function F(_0x4ee184,_0x1c4e5e,_0x5722a5){const _0x1ba50f=_0x142074;var _0x467765,_0x55f307;if(((_0x55f307=(_0x467765=_0x4ee184==null?void 0x0:_0x4ee184['replies'])==null?void 0x0:_0x467765[_0x1ba50f(0x239)])!=null?_0x55f307:0x0)>0x0){const _0x1cfad4=(_0xe7f466,_0x2d0642)=>({'id':_0xe7f466[_0x1ba50f(0x241)],'threadId':_0xe7f466[_0x1ba50f(0x1f3)],'dT':g(_0xe7f466[_0x1ba50f(0x1f2)]),'personId':_0xe7f466[_0x1ba50f(0x1f6)],'resolved':_0x4ee184[_0x1ba50f(0x244)]===I[_0x1ba50f(0x229)],'unitId':_0x1c4e5e,'subUnitId':_0x5722a5,'text':JSON[_0x1ba50f(0x236)](_0xe7f466[_0x1ba50f(0x211)]),'parentId':_0x2d0642}),_0x46078a=_0x1cfad4(_0x4ee184['replies'][0x0]);return{..._0x46078a,'children':_0x4ee184[_0x1ba50f(0x1de)]['slice'](0x1)[_0x1ba50f(0x201)](_0x1cd825=>_0x1cfad4(_0x1cd825,_0x46078a['id']))};}return null;}let f=class{constructor(_0x5ee464,_0x39f13f,_0x3ad888,_0xeaae3d){const _0x4e3161=_0x142074;this[_0x4e3161(0x252)]=_0x5ee464,this['_userService']=_0x39f13f,this[_0x4e3161(0x218)]=_0x3ad888,this[_0x4e3161(0x1e7)]=_0xeaae3d;}async[_0x142074(0x232)](_0x4a3f04){const _0x52b8db=_0x142074;var _0x35da03,_0x1e8197;const {parentId:_0x545f9c,unitId:_0x2e0eee,text:_0x239e0e,threadId:_0x5abf91}=_0x4a3f04,_0x582fe7=(_0x1e8197=(_0x35da03=_0x239e0e[_0x52b8db(0x23b)])==null?void 0x0:_0x35da03[_0x52b8db(0x210)](_0x1df3c2=>_0x1df3c2[_0x52b8db(0x204)]===c['CustomRangeType'][_0x52b8db(0x24d)])[_0x52b8db(0x201)](_0x4cd5c8=>_0x4cd5c8[_0x52b8db(0x1e4)]))!=null?_0x1e8197:[],_0x20e8d9=JSON['stringify'](_0x239e0e),_0x7ee05=(await this[_0x52b8db(0x218)][_0x52b8db(0x238)](_0x2e0eee))[_0x52b8db(0x1ee)]();if(_0x545f9c){const _0x4324c2={'memberId':_0x7ee05,'unitId':_0x2e0eee,'content':_0x20e8d9,'mention':_0x582fe7,'threadId':_0x5abf91},_0x1ff4d8=(await this[_0x52b8db(0x252)][_0x52b8db(0x224)](_0x52b8db(0x251)+_0x2e0eee+_0x52b8db(0x1f4),{'body':_0x4324c2}))[_0x52b8db(0x24a)][_0x52b8db(0x23f)];return{..._0x4a3f04,'id':_0x1ff4d8[_0x52b8db(0x241)],'dT':c[_0x52b8db(0x215)](+_0x1ff4d8[_0x52b8db(0x1f2)])[_0x52b8db(0x1f7)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1ff4d8[_0x52b8db(0x1f6)]};}else{const _0xaaddfd={'memberId':_0x7ee05,'unitId':_0x2e0eee,'content':_0x20e8d9,'mention':_0x582fe7},_0x3cd923=await this[_0x52b8db(0x252)]['post'](_0x52b8db(0x251)+_0x2e0eee+_0x52b8db(0x1f5),{'body':_0xaaddfd});return J(_0x3cd923['body']['comment'],_0x4a3f04);}}async[_0x142074(0x21e)](_0x4ab59d){const _0xc66b65=_0x142074;var _0x43b890,_0x387fa4;const {text:_0x440ea3,unitId:_0x431329}=_0x4ab59d,_0x36a7da=(_0x387fa4=(_0x43b890=_0x440ea3[_0xc66b65(0x23b)])==null?void 0x0:_0x43b890['filter'](_0x2e3d59=>_0x2e3d59[_0xc66b65(0x204)]===c[_0xc66b65(0x1f9)][_0xc66b65(0x24d)])['map'](_0x3b84ee=>_0x3b84ee['rangeId']))!=null?_0x387fa4:[],_0x10c01e=JSON[_0xc66b65(0x1fd)](_0x440ea3),_0x31769b=_0x4ab59d[_0xc66b65(0x1f3)],_0xf7ae34=_0x4ab59d['id'],_0x30adc5={'memberId':(await this['_sessionService']['requireSession'](_0x431329))['getMemberID'](),'unitId':_0x431329,'threadId':_0x31769b,'mention':_0x36a7da,'content':_0x10c01e,'replyId':_0xf7ae34},_0x5835a5=await this[_0xc66b65(0x252)][_0xc66b65(0x224)](_0xc66b65(0x251)+_0x431329+'/edit',{'body':_0x30adc5});return!_0x5835a5[_0xc66b65(0x24a)][_0xc66b65(0x23d)]||_0x5835a5[_0xc66b65(0x24a)][_0xc66b65(0x23d)]['code']===0x1;}async[_0x142074(0x228)](_0x3795d7){const _0x4c0407=_0x142074,{unitId:_0x4730bf}=_0x3795d7,_0x7b9f3c=_0x3795d7[_0x4c0407(0x1f3)],_0xa53609={'memberId':this['_userService'][_0x4c0407(0x20d)]()['userID'],'unitId':_0x4730bf,'threadId':_0x7b9f3c,'solved':_0x3795d7[_0x4c0407(0x249)]?I[_0x4c0407(0x229)]:I[_0x4c0407(0x233)]},_0x3ac5d8=await this['_httpService'][_0x4c0407(0x224)]('/universer-api/comment/unit/'+_0x4730bf+_0x4c0407(0x237),{'body':_0xa53609});return!_0x3ac5d8['body'][_0x4c0407(0x23d)]||_0x3ac5d8[_0x4c0407(0x24a)][_0x4c0407(0x23d)]['code']===0x1;}async[_0x142074(0x1e6)](_0x5b028d,_0x120125,_0x425273,_0x2834e0){const _0x215637=_0x142074,_0x41ae95={'memberId':(await this[_0x215637(0x218)]['requireSession'](_0x5b028d))[_0x215637(0x1ee)](),'threadId':_0x425273,'replyId':_0x2834e0,'unitId':_0x5b028d},_0x2a9b77=await this[_0x215637(0x252)][_0x215637(0x224)](_0x215637(0x251)+_0x5b028d+_0x215637(0x1fa),{'body':_0x41ae95});return!_0x2a9b77[_0x215637(0x24a)]['error']||_0x2a9b77[_0x215637(0x24a)][_0x215637(0x23d)]['code']===0x1;}async[_0x142074(0x208)](_0x31c740,_0x2bfa86,_0x3b547c){const _0x51af47=_0x142074,_0x2eed3f={'unitId':_0x31c740,'threadId':_0x3b547c},_0x17ece7=await this[_0x51af47(0x252)][_0x51af47(0x224)]('/universer-api/comment/unit/'+_0x31c740+_0x51af47(0x203),{'body':_0x2eed3f}),_0x48763a=_0x3b547c[_0x51af47(0x201)](_0x2e01f0=>F(_0x17ece7['body'][_0x51af47(0x1ed)][_0x2e01f0],_0x31c740,_0x2bfa86))[_0x51af47(0x210)](Boolean);return Object[_0x51af47(0x22d)](_0x17ece7['body'][_0x51af47(0x205)])[_0x51af47(0x24c)](_0x5bc93b=>{const _0x48a5cf=_0x51af47;this[_0x48a5cf(0x21d)][_0x48a5cf(0x242)](_0x5bc93b);}),_0x48763a;}['saveCommentToSnapshot'](_0x2cdb4f){const _0x5c4436=_0x142074;return{'id':_0x2cdb4f['id'],'threadId':_0x2cdb4f['threadId'],'ref':_0x2cdb4f[_0x5c4436(0x22e)]};}};f=H([p(0x0,c[_0x142074(0x1eb)](P[_0x142074(0x1fc)])),p(0x1,c[_0x142074(0x1eb)](c['UserManagerService'])),p(0x2,c[_0x142074(0x1eb)](C['CollaborationSessionService'])),p(0x3,c['Inject'](c[_0x142074(0x214)]))],f);function _0x2c87(){const _0x43fdc2=['1164196oqlhFh','@univerjs-pro/collaboration-client','syncUpdateMutationToColla','map','_threadCommentDataSourceService','/list','rangeType','users','getOwnPropertyDescriptor','_initUserSync','listComments','_configService','subscribe','user','UniverInstanceType','getCurrentUser','3BuQZfi','Disposable','filter','content','size','onReady','Injector','dayjs','Add','Plugin','_sessionService','Reply','type','UNRECOGNIZED','10915650HTOCrK','_userService','updateComment','unitId','getUnit','@univerjs/thread-comment-ui','parentId','UniverThreadCommentDataSourcePlugin','post','CommentService','ThreadCommentModel','_init','resolveComment','Solved','@univerjs/network','commentUpdate$','pluginName','values','ref','1991529Wmtopk','@univerjs/core','_threadCommentModel','addComment','OpenOrReOpen','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','1362nIwuFi','parse','/solved','requireSession','length','Delete','customRanges','setConfig','error','501887xoqMkZ','reply','IThreadCommentDataSourceService','replyId','addUser','userID','solved','1028954lEJWll','payload','_initDataSource','toStringTag','resolved','body','thread-comment-data-source.config','forEach','COMMENT','symbol','Edit','8AtOLGG','/universer-api/comment/unit/','_httpService','DependentOn','defineProperty','Module','pipe','IConfigService','@univerjs-pro/license','onStarting','_commentService','add','replies','get','UNIVER_UNKNOWN','@univerjs/thread-comment','YYYY/MM/DD\x20HH:mm','14077udQuYG','rangeId','find','deleteComment','_injector','3534105jtrPGd','personId','disposeWithMe','Inject','root','comments','getMemberID','/universer-api/user/list','delete','UniverLicensePlugin','createTimestamp','threadId','/reply','/add','userId','format','_threadCommentDataSource','CustomRangeType','/delete','rxjs','HTTPService','stringify'];_0x2c87=function(){return _0x43fdc2;};return _0x2c87();}var L=Object[_0x142074(0x254)],Z=Object[_0x142074(0x206)],W=(_0x3c3ad5,_0x182c45,_0x29a074,_0x55933b)=>{const _0x9daf98=_0x142074;for(var _0x51ff49=_0x55933b>0x1?void 0x0:_0x55933b?Z(_0x182c45,_0x29a074):_0x182c45,_0x2be322=_0x3c3ad5[_0x9daf98(0x239)]-0x1,_0x2a07d4;_0x2be322>=0x0;_0x2be322--)(_0x2a07d4=_0x3c3ad5[_0x2be322])&&(_0x51ff49=(_0x55933b?_0x2a07d4(_0x182c45,_0x29a074,_0x51ff49):_0x2a07d4(_0x51ff49))||_0x51ff49);return _0x55933b&&_0x51ff49&&L(_0x182c45,_0x29a074,_0x51ff49),_0x51ff49;},D=(_0x5308b1,_0x18aed4)=>(_0x55ca41,_0x44a13f)=>_0x18aed4(_0x55ca41,_0x44a13f,_0x5308b1);let b=class extends c['Disposable']{constructor(_0x4d7e57,_0x5e6a47){const _0x5002ef=_0x142074;super(),this[_0x5002ef(0x202)]=_0x4d7e57,this[_0x5002ef(0x1f8)]=_0x5e6a47,this[_0x5002ef(0x247)]();}[_0x142074(0x247)](){const _0x1adca7=_0x142074;this[_0x1adca7(0x202)]['dataSource']=this[_0x1adca7(0x1f8)],this[_0x1adca7(0x202)][_0x1adca7(0x200)]=!0x1;}};b=W([D(0x0,y[_0x142074(0x240)]),D(0x1,c[_0x142074(0x1eb)](f))],b);var M=Object[_0x142074(0x254)],B=Object['getOwnPropertyDescriptor'],K=(_0x11e8a0,_0x22534c,_0x127a79)=>_0x22534c in _0x11e8a0?M(_0x11e8a0,_0x22534c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x127a79}):_0x11e8a0[_0x22534c]=_0x127a79,V=(_0x346959,_0x36f77a,_0x54bc61,_0x5a04af)=>{const _0x4cc157=_0x142074;for(var _0x71c688=_0x5a04af>0x1?void 0x0:_0x5a04af?B(_0x36f77a,_0x54bc61):_0x36f77a,_0x1e4d4a=_0x346959[_0x4cc157(0x239)]-0x1,_0x10471d;_0x1e4d4a>=0x0;_0x1e4d4a--)(_0x10471d=_0x346959[_0x1e4d4a])&&(_0x71c688=(_0x5a04af?_0x10471d(_0x36f77a,_0x54bc61,_0x71c688):_0x10471d(_0x71c688))||_0x71c688);return _0x5a04af&&_0x71c688&&M(_0x36f77a,_0x54bc61,_0x71c688),_0x71c688;},O=(_0x1dc90b,_0x176b72)=>(_0xa41102,_0x90cd16)=>_0x176b72(_0xa41102,_0x90cd16,_0x1dc90b),j=(_0x311341,_0x5d17bb,_0xe2c8d9)=>K(_0x311341,typeof _0x5d17bb!=_0x142074(0x24e)?_0x5d17bb+'':_0x5d17bb,_0xe2c8d9);exports[_0x142074(0x223)]=class extends c[_0x142074(0x217)]{constructor(_0x5a3d6d=x,_0xd5769b,_0x3035ec){const _0x55ddcf=_0x142074;super(),this['_config']=_0x5a3d6d,this[_0x55ddcf(0x1e7)]=_0xd5769b,this[_0x55ddcf(0x209)]=_0x3035ec;const {..._0x2f8cb8}=this['_config'];this[_0x55ddcf(0x209)][_0x55ddcf(0x23c)](A,_0x2f8cb8);}[_0x142074(0x259)](){const _0x3517ec=_0x142074;[[f],[b],[S]][_0x3517ec(0x24c)](_0x28c867=>{const _0x9145f=_0x3517ec;this[_0x9145f(0x1e7)][_0x9145f(0x1dd)](_0x28c867);});}[_0x142074(0x213)](){const _0x7f59bc=_0x142074;this[_0x7f59bc(0x1e7)][_0x7f59bc(0x1df)](b),this[_0x7f59bc(0x1e7)][_0x7f59bc(0x1df)](S);}},j(exports[_0x142074(0x223)],_0x142074(0x22c),U),j(exports[_0x142074(0x223)],_0x142074(0x21a),c[_0x142074(0x20c)][_0x142074(0x1e0)]),exports[_0x142074(0x223)]=V([c[_0x142074(0x253)](T['UniverThreadCommentUIPlugin'],C['UniverCollaborationClientPlugin'],N[_0x142074(0x1f1)]),O(0x1,c['Inject'](c[_0x142074(0x214)])),O(0x2,c[_0x142074(0x257)])],exports[_0x142074(0x223)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x1773c6=_0x281f;(function(_0x58f8e9,_0x5680e4){const _0x406c10=_0x281f,_0x7fd4ca=_0x58f8e9();while(!![]){try{const _0x825308=-parseInt(_0x406c10(0xd4))/0x1*(parseInt(_0x406c10(0x98))/0x2)+-parseInt(_0x406c10(0xc2))/0x3*(-parseInt(_0x406c10(0xba))/0x4)+-parseInt(_0x406c10(0xd0))/0x5*(parseInt(_0x406c10(0xaa))/0x6)+-parseInt(_0x406c10(0x99))/0x7+-parseInt(_0x406c10(0x84))/0x8*(parseInt(_0x406c10(0xbb))/0x9)+-parseInt(_0x406c10(0xdb))/0xa+parseInt(_0x406c10(0xa4))/0xb;if(_0x825308===_0x5680e4)break;else _0x7fd4ca['push'](_0x7fd4ca['shift']());}catch(_0x33b7e7){_0x7fd4ca['push'](_0x7fd4ca['shift']());}}}(_0x574e,0xeca7b));function _0x281f(_0x51af1c,_0x5851f8){const _0x574e0e=_0x574e();return _0x281f=function(_0x281fad,_0x3d1ba9){_0x281fad=_0x281fad-0x7e;let _0x321970=_0x574e0e[_0x281fad];return _0x321970;},_0x281f(_0x51af1c,_0x5851f8);}function _0x574e(){const _0x3f65a2=['comment','_threadCommentDataSourceService','_initUserSync','rangeType','YYYY/MM/DD\x20HH:mm','16OYQDzW','_commentService','parse','defineProperty','Solve','Add','createTimestamp','onReady','get','addUser','body','Delete','filter','values','userID','add','stringify','personId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','length','1910210BDKzEM','8559929TTLoOm','/list','disposeWithMe','COMMENT','content','OpenOrReOpen','UNIVER_UNKNOWN','_injector','error','unitId','getCurrentUser','58295061Yyebpq','post','/universer-api/comment/unit/','user','slice','/universer-api/user/list','642jrMXRu','pluginName','Solved','comments','code','threadId','deleteComment','updateComment','getComment','symbol','_threadCommentModel','Unknown','root','_config','type','_userService','3620rbFQsL','6160662qSSoUK','find','userId','commentUpdate$','replyId','getMemberID','/delete','3594NHVKcB','replies','forEach','addComment','setConfig','subscribe','solved','Edit','ref','_httpService','_initDataSource','UNRECOGNIZED','/add','_init','83060DlJork','_threadCommentDataSource','/reply','_configService','1MIEbyR','format','getUnit','delete','map','requireSession','payload','899300EpteYo','resolveComment','_sessionService','getOwnPropertyDescriptor','customRanges','syncUpdateMutationToColla','Reply'];_0x574e=function(){return _0x3f65a2;};return _0x574e();}import{dayjs as _0x35e34f,UserManagerService as _0x32fe65,Inject as _0x4fb662,Injector as _0x1610eb,Disposable as _0x287e07,CustomRangeType as _0x21eb6e,UniverInstanceType as _0x3dbd0b,DependentOn as _0x567446,Plugin as _0x16aa87,IConfigService as _0x2ef31e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3c3da1}from'@univerjs/thread-comment-ui';import{CommentService as _0x2a1652,CollaborationSessionService as _0x56aa16,UniverCollaborationClientPlugin as _0xfee743}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x24df1b}from'@univerjs-pro/license';import{ThreadCommentModel as _0xbc47cb,IThreadCommentDataSourceService as _0x1b3270}from'@univerjs/thread-comment';import{bufferTime as _0x211233}from'rxjs';import{HTTPService as _0x101fc8}from'@univerjs/network';const q=_0x1773c6(0x96);var v=(_0x50fa97=>(_0x50fa97[_0x50fa97['OpenOrReOpen']=0x0]=_0x1773c6(0x9e),_0x50fa97[_0x50fa97[_0x1773c6(0xac)]=0x1]=_0x1773c6(0xac),_0x50fa97[_0x50fa97[_0x1773c6(0xcd)]=-0x1]=_0x1773c6(0xcd),_0x50fa97))(v||{}),p=(_0x2a06fc=>(_0x2a06fc[_0x2a06fc[_0x1773c6(0xb5)]=0x0]=_0x1773c6(0xb5),_0x2a06fc[_0x2a06fc[_0x1773c6(0x89)]=0x1]='Add',_0x2a06fc[_0x2a06fc[_0x1773c6(0x7e)]=0x2]=_0x1773c6(0x7e),_0x2a06fc[_0x2a06fc['Edit']=0x3]=_0x1773c6(0xc9),_0x2a06fc[_0x2a06fc['Delete']=0x4]=_0x1773c6(0x8f),_0x2a06fc[_0x2a06fc[_0x1773c6(0x88)]=0x5]=_0x1773c6(0x88),_0x2a06fc[_0x2a06fc['UNRECOGNIZED']=-0x1]=_0x1773c6(0xcd),_0x2a06fc))(p||{});const O=_0x59336a=>_0x35e34f(new Date(+_0x59336a))[_0x1773c6(0xd5)](_0x1773c6(0x83)),W=async(_0x4baa1f,_0x258113)=>{const _0x29b34b=_0x1773c6,_0x55cbf1=_0x4baa1f[_0x29b34b(0x8c)](_0x32fe65),_0x5c153d=_0x4baa1f[_0x29b34b(0x8c)](_0x101fc8);_0x258113[_0x29b34b(0xc4)](_0x28f295=>{const _0x5522e9=_0x29b34b;_0x55cbf1['getUser'](_0x28f295)&&_0x258113[_0x5522e9(0xd7)](_0x28f295);}),_0x258113['size']&&(await _0x5c153d[_0x29b34b(0x8c)](_0x29b34b(0xa9),{'params':{'userIDs':[..._0x258113]}}))[_0x29b34b(0x8e)]['users'][_0x29b34b(0xc4)](_0x1ae268=>{const _0x30f16e=_0x29b34b;_0x1ae268&&_0x55cbf1[_0x30f16e(0x8d)](_0x1ae268);});};var B=Object['defineProperty'],K=Object[_0x1773c6(0xde)],V=(_0x475661,_0xe8e263,_0x2e46ab,_0x4bab11)=>{const _0x239dcd=_0x1773c6;for(var _0x5ce5b6=_0x4bab11>0x1?void 0x0:_0x4bab11?K(_0xe8e263,_0x2e46ab):_0xe8e263,_0x40d3e1=_0x475661[_0x239dcd(0x97)]-0x1,_0x99ab51;_0x40d3e1>=0x0;_0x40d3e1--)(_0x99ab51=_0x475661[_0x40d3e1])&&(_0x5ce5b6=(_0x4bab11?_0x99ab51(_0xe8e263,_0x2e46ab,_0x5ce5b6):_0x99ab51(_0x5ce5b6))||_0x5ce5b6);return _0x4bab11&&_0x5ce5b6&&B(_0xe8e263,_0x2e46ab,_0x5ce5b6),_0x5ce5b6;},_=(_0xc83bc5,_0x254815)=>(_0x10e6ae,_0x591db0)=>_0x254815(_0x10e6ae,_0x591db0,_0xc83bc5);let f=class extends _0x287e07{constructor(_0x2b73c0,_0x550912,_0x2e49c4,_0x4099b8){const _0x2323a4=_0x1773c6;super(),this[_0x2323a4(0x85)]=_0x2b73c0,this[_0x2323a4(0xb4)]=_0x550912,this['_userService']=_0x2e49c4,this[_0x2323a4(0xa0)]=_0x4099b8,this[_0x2323a4(0xcf)](),this[_0x2323a4(0x81)]();}[_0x1773c6(0x81)](){const _0x1b0212=_0x1773c6;this[_0x1b0212(0x9b)](this[_0x1b0212(0xb4)][_0x1b0212(0xbe)]['pipe'](_0x211233(0x10))[_0x1b0212(0xc7)](_0x4faabb=>{const _0x4aca5d=_0x1b0212,_0x4c340e=new Set();_0x4faabb[_0x4aca5d(0xc4)](_0x463699=>{const _0x22e3d7=_0x4aca5d;switch(_0x463699[_0x22e3d7(0xb8)]){case _0x22e3d7(0x93):{const _0x441e0d=_0x463699[_0x22e3d7(0xda)][_0x22e3d7(0x95)];_0x4c340e[_0x22e3d7(0x93)](_0x441e0d);break;}}}),W(this[_0x4aca5d(0xa0)],_0x4c340e);}));}[_0x1773c6(0xcf)](){const _0x464e79=_0x1773c6;this[_0x464e79(0x9b)](this[_0x464e79(0x85)][_0x464e79(0xbe)]['subscribe'](async _0x2489b5=>{const _0x1d44a3=_0x464e79;var _0x37bb0d,_0x5d8732,_0x1952c3,_0x3ce7c6;const _0x3d6756=(_0x37bb0d=this[_0x1d44a3(0xb4)][_0x1d44a3(0xd6)](_0x2489b5[_0x1d44a3(0xa2)])[_0x1d44a3(0xbc)](_0x5067fb=>_0x5067fb['threadId']===_0x2489b5[_0x1d44a3(0xaf)]))==null?void 0x0:_0x37bb0d[_0x1d44a3(0xb6)];if(!_0x3d6756)return;const {unitId:_0x5c8818,subUnitId:_0x391083}=_0x3d6756;switch(_0x2489b5[_0x1d44a3(0xa7)]&&this[_0x1d44a3(0xb9)][_0x1d44a3(0x8d)](_0x2489b5['user']),_0x2489b5[_0x1d44a3(0xb8)]){case p[_0x1d44a3(0x89)]:break;case p[_0x1d44a3(0x7e)]:{this[_0x1d44a3(0xb4)][_0x1d44a3(0xc5)](_0x5c8818,_0x391083,{'unitId':_0x5c8818,'subUnitId':_0x391083,'ref':'','id':_0x2489b5[_0x1d44a3(0xbf)],'dT':O(+_0x2489b5[_0x1d44a3(0x8a)]),'threadId':_0x2489b5['threadId'],'personId':(_0x1952c3=(_0x5d8732=_0x2489b5[_0x1d44a3(0xa7)])==null?void 0x0:_0x5d8732[_0x1d44a3(0x92)])!=null?_0x1952c3:_0x2489b5['userId'],'text':JSON['parse'](_0x2489b5['content']),'parentId':_0x3d6756['id']});break;}case p[_0x1d44a3(0x8f)]:{const _0x1edfce=this[_0x1d44a3(0xb4)][_0x1d44a3(0xb2)](_0x5c8818,_0x391083,_0x2489b5['replyId']);_0x1edfce&&_0x1edfce['parentId']&&this['_threadCommentModel'][_0x1d44a3(0xb0)](_0x5c8818,_0x391083,_0x2489b5[_0x1d44a3(0xbf)]);break;}case p[_0x1d44a3(0xc9)]:{this[_0x1d44a3(0xb4)][_0x1d44a3(0xb1)](_0x5c8818,_0x391083,{'commentId':_0x2489b5[_0x1d44a3(0xbf)],'text':JSON[_0x1d44a3(0x86)](_0x2489b5[_0x1d44a3(0x9d)])});break;}case p[_0x1d44a3(0x88)]:{const _0x12dc0e=(_0x3ce7c6=this[_0x1d44a3(0xb4)][_0x1d44a3(0xd6)](_0x2489b5[_0x1d44a3(0xa2)])[_0x1d44a3(0xbc)](_0x556fac=>_0x556fac[_0x1d44a3(0xaf)]===_0x2489b5[_0x1d44a3(0xaf)]))==null?void 0x0:_0x3ce7c6[_0x1d44a3(0xb6)];_0x12dc0e&&this['_threadCommentModel'][_0x1d44a3(0xdc)](_0x5c8818,_0x391083,_0x12dc0e['id'],_0x2489b5[_0x1d44a3(0xc8)]===v[_0x1d44a3(0xac)]);break;}}}));}};f=V([_(0x0,_0x4fb662(_0x2a1652)),_(0x1,_0x4fb662(_0xbc47cb)),_(0x2,_0x4fb662(_0x32fe65)),_(0x3,_0x4fb662(_0x1610eb))],f);const z='thread-comment-data-source.config',Q={};var X=Object[_0x1773c6(0x87)],k=Object[_0x1773c6(0xde)],ee=(_0x4aad35,_0x48bc07,_0x7fed21,_0x2a3165)=>{const _0x1b1aaa=_0x1773c6;for(var _0x404531=_0x2a3165>0x1?void 0x0:_0x2a3165?k(_0x48bc07,_0x7fed21):_0x48bc07,_0x587a01=_0x4aad35[_0x1b1aaa(0x97)]-0x1,_0x3128a3;_0x587a01>=0x0;_0x587a01--)(_0x3128a3=_0x4aad35[_0x587a01])&&(_0x404531=(_0x2a3165?_0x3128a3(_0x48bc07,_0x7fed21,_0x404531):_0x3128a3(_0x404531))||_0x404531);return _0x2a3165&&_0x404531&&X(_0x48bc07,_0x7fed21,_0x404531),_0x404531;},I=(_0x3eb460,_0x2187d1)=>(_0x309cfc,_0x245329)=>_0x2187d1(_0x309cfc,_0x245329,_0x3eb460);function re(_0x1da483,_0x2abb0c){const _0x13aa0e=_0x1773c6,_0x51adc1=_0x1da483[_0x13aa0e(0xc3)][0x0];return{..._0x2abb0c,'id':_0x51adc1[_0x13aa0e(0xbf)],'resolved':_0x1da483['solved']===0x1,'dT':O(_0x51adc1[_0x13aa0e(0x8a)]),'personId':_0x51adc1['userId'],'threadId':_0x51adc1['threadId']};}function te(_0x55a05a,_0x3d8df1,_0x193f9f){const _0x2e9d85=_0x1773c6;var _0x692e3c,_0x28477a;if(((_0x28477a=(_0x692e3c=_0x55a05a==null?void 0x0:_0x55a05a[_0x2e9d85(0xc3)])==null?void 0x0:_0x692e3c[_0x2e9d85(0x97)])!=null?_0x28477a:0x0)>0x0){const _0x3627ea=(_0x33ce47,_0x11266c)=>({'id':_0x33ce47[_0x2e9d85(0xbf)],'threadId':_0x33ce47['threadId'],'dT':O(_0x33ce47[_0x2e9d85(0x8a)]),'personId':_0x33ce47['userId'],'resolved':_0x55a05a[_0x2e9d85(0xc8)]===v[_0x2e9d85(0xac)],'unitId':_0x3d8df1,'subUnitId':_0x193f9f,'text':JSON[_0x2e9d85(0x86)](_0x33ce47[_0x2e9d85(0x9d)]),'parentId':_0x11266c}),_0xade2a5=_0x3627ea(_0x55a05a['replies'][0x0]);return{..._0xade2a5,'children':_0x55a05a['replies'][_0x2e9d85(0xa8)](0x1)['map'](_0x56f89a=>_0x3627ea(_0x56f89a,_0xade2a5['id']))};}return null;}let S=class{constructor(_0x3872d9,_0x548909,_0x3dae29,_0x3afdc5){const _0x5413d4=_0x1773c6;this[_0x5413d4(0xcb)]=_0x3872d9,this[_0x5413d4(0xb9)]=_0x548909,this[_0x5413d4(0xdd)]=_0x3dae29,this['_injector']=_0x3afdc5;}async[_0x1773c6(0xc5)](_0x4126ed){const _0x2e8cef=_0x1773c6;var _0x1f77ef,_0x35cd0a;const {parentId:_0x5b0c48,unitId:_0x5bec86,text:_0x9851c1,threadId:_0x8115fa}=_0x4126ed,_0x2c41c7=(_0x35cd0a=(_0x1f77ef=_0x9851c1['customRanges'])==null?void 0x0:_0x1f77ef[_0x2e8cef(0x90)](_0x5f0e99=>_0x5f0e99[_0x2e8cef(0x82)]===_0x21eb6e[_0x2e8cef(0x9c)])[_0x2e8cef(0xd8)](_0x55eb91=>_0x55eb91['rangeId']))!=null?_0x35cd0a:[],_0x4111dc=JSON[_0x2e8cef(0x94)](_0x9851c1),_0x4b8ac0=(await this['_sessionService'][_0x2e8cef(0xd9)](_0x5bec86))[_0x2e8cef(0xc0)]();if(_0x5b0c48){const _0x218cc5={'memberId':_0x4b8ac0,'unitId':_0x5bec86,'content':_0x4111dc,'mention':_0x2c41c7,'threadId':_0x8115fa},_0x253165=(await this[_0x2e8cef(0xcb)]['post'](_0x2e8cef(0xa6)+_0x5bec86+_0x2e8cef(0xd2),{'body':_0x218cc5}))['body']['reply'];return{..._0x4126ed,'id':_0x253165['replyId'],'dT':_0x35e34f(+_0x253165[_0x2e8cef(0x8a)])[_0x2e8cef(0xd5)](_0x2e8cef(0x83)),'personId':_0x253165[_0x2e8cef(0xbd)]};}else{const _0x5014c3={'memberId':_0x4b8ac0,'unitId':_0x5bec86,'content':_0x4111dc,'mention':_0x2c41c7},_0xc341c8=await this['_httpService']['post'](_0x2e8cef(0xa6)+_0x5bec86+_0x2e8cef(0xce),{'body':_0x5014c3});return re(_0xc341c8[_0x2e8cef(0x8e)][_0x2e8cef(0x7f)],_0x4126ed);}}async[_0x1773c6(0xb1)](_0x18f71e){const _0x472f3b=_0x1773c6;var _0x2e8ae3,_0x3aaa97;const {text:_0x4005be,unitId:_0x2dd6ba}=_0x18f71e,_0x300af3=(_0x3aaa97=(_0x2e8ae3=_0x4005be[_0x472f3b(0xdf)])==null?void 0x0:_0x2e8ae3[_0x472f3b(0x90)](_0x2f0455=>_0x2f0455['rangeType']===_0x21eb6e[_0x472f3b(0x9c)])[_0x472f3b(0xd8)](_0x18d81b=>_0x18d81b['rangeId']))!=null?_0x3aaa97:[],_0x1ec748=JSON[_0x472f3b(0x94)](_0x4005be),_0x47ee66=_0x18f71e[_0x472f3b(0xaf)],_0x3ddc34=_0x18f71e['id'],_0xcf3162={'memberId':(await this['_sessionService'][_0x472f3b(0xd9)](_0x2dd6ba))[_0x472f3b(0xc0)](),'unitId':_0x2dd6ba,'threadId':_0x47ee66,'mention':_0x300af3,'content':_0x1ec748,'replyId':_0x3ddc34},_0x1c338e=await this[_0x472f3b(0xcb)]['post']('/universer-api/comment/unit/'+_0x2dd6ba+'/edit',{'body':_0xcf3162});return!_0x1c338e[_0x472f3b(0x8e)]['error']||_0x1c338e['body'][_0x472f3b(0xa1)][_0x472f3b(0xae)]===0x1;}async[_0x1773c6(0xdc)](_0x2b0160){const _0x4c06b0=_0x1773c6,{unitId:_0x50415d}=_0x2b0160,_0x4c8661=_0x2b0160['threadId'],_0x1aa44d={'memberId':this[_0x4c06b0(0xb9)][_0x4c06b0(0xa3)]()['userID'],'unitId':_0x50415d,'threadId':_0x4c8661,'solved':_0x2b0160['resolved']?v[_0x4c06b0(0xac)]:v['OpenOrReOpen']},_0x4170e6=await this[_0x4c06b0(0xcb)][_0x4c06b0(0xa5)](_0x4c06b0(0xa6)+_0x50415d+'/solved',{'body':_0x1aa44d});return!_0x4170e6[_0x4c06b0(0x8e)][_0x4c06b0(0xa1)]||_0x4170e6[_0x4c06b0(0x8e)][_0x4c06b0(0xa1)][_0x4c06b0(0xae)]===0x1;}async[_0x1773c6(0xb0)](_0x294e23,_0x10e793,_0x2b2a3e,_0x34907a){const _0x56e9f8=_0x1773c6,_0x9d0bc3={'memberId':(await this[_0x56e9f8(0xdd)]['requireSession'](_0x294e23))[_0x56e9f8(0xc0)](),'threadId':_0x2b2a3e,'replyId':_0x34907a,'unitId':_0x294e23},_0x24516f=await this[_0x56e9f8(0xcb)]['post'](_0x56e9f8(0xa6)+_0x294e23+_0x56e9f8(0xc1),{'body':_0x9d0bc3});return!_0x24516f[_0x56e9f8(0x8e)][_0x56e9f8(0xa1)]||_0x24516f[_0x56e9f8(0x8e)][_0x56e9f8(0xa1)][_0x56e9f8(0xae)]===0x1;}async['listComments'](_0x54038e,_0x3bf014,_0x1ac4d2){const _0x41a758=_0x1773c6,_0xcf096a={'unitId':_0x54038e,'threadId':_0x1ac4d2},_0xd7e060=await this[_0x41a758(0xcb)]['post']('/universer-api/comment/unit/'+_0x54038e+_0x41a758(0x9a),{'body':_0xcf096a}),_0x5e663d=_0x1ac4d2[_0x41a758(0xd8)](_0x3e6561=>te(_0xd7e060['body'][_0x41a758(0xad)][_0x3e6561],_0x54038e,_0x3bf014))[_0x41a758(0x90)](Boolean);return Object[_0x41a758(0x91)](_0xd7e060[_0x41a758(0x8e)]['users'])[_0x41a758(0xc4)](_0x449c2c=>{const _0x54902c=_0x41a758;this[_0x54902c(0xb9)][_0x54902c(0x8d)](_0x449c2c);}),_0x5e663d;}['saveCommentToSnapshot'](_0x4933e7){const _0x4fcc04=_0x1773c6;return{'id':_0x4933e7['id'],'threadId':_0x4933e7['threadId'],'ref':_0x4933e7[_0x4fcc04(0xca)]};}};S=ee([I(0x0,_0x4fb662(_0x101fc8)),I(0x1,_0x4fb662(_0x32fe65)),I(0x2,_0x4fb662(_0x56aa16)),I(0x3,_0x4fb662(_0x1610eb))],S);var se=Object[_0x1773c6(0x87)],oe=Object[_0x1773c6(0xde)],ne=(_0x1493e7,_0xc623e2,_0xef248,_0x20e488)=>{const _0x73c65c=_0x1773c6;for(var _0x2c6afa=_0x20e488>0x1?void 0x0:_0x20e488?oe(_0xc623e2,_0xef248):_0xc623e2,_0x50af9d=_0x1493e7[_0x73c65c(0x97)]-0x1,_0x6e95a9;_0x50af9d>=0x0;_0x50af9d--)(_0x6e95a9=_0x1493e7[_0x50af9d])&&(_0x2c6afa=(_0x20e488?_0x6e95a9(_0xc623e2,_0xef248,_0x2c6afa):_0x6e95a9(_0x2c6afa))||_0x2c6afa);return _0x20e488&&_0x2c6afa&&se(_0xc623e2,_0xef248,_0x2c6afa),_0x2c6afa;},P=(_0x2d2a76,_0x995db7)=>(_0x21f5a8,_0x5e7871)=>_0x995db7(_0x21f5a8,_0x5e7871,_0x2d2a76);let b=class extends _0x287e07{constructor(_0x22507f,_0x4238f9){const _0x2ecd91=_0x1773c6;super(),this[_0x2ecd91(0x80)]=_0x22507f,this[_0x2ecd91(0xd1)]=_0x4238f9,this[_0x2ecd91(0xcc)]();}[_0x1773c6(0xcc)](){const _0x540a6d=_0x1773c6;this[_0x540a6d(0x80)]['dataSource']=this[_0x540a6d(0xd1)],this[_0x540a6d(0x80)][_0x540a6d(0xe0)]=!0x1;}};b=ne([P(0x0,_0x1b3270),P(0x1,_0x4fb662(S))],b);var R=Object[_0x1773c6(0x87)],ie=Object[_0x1773c6(0xde)],ce=(_0x4f8484,_0x3937f4,_0x446f7a)=>_0x3937f4 in _0x4f8484?R(_0x4f8484,_0x3937f4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x446f7a}):_0x4f8484[_0x3937f4]=_0x446f7a,ae=(_0x51d8d2,_0x4feca5,_0x1049e6,_0x5c6834)=>{const _0xb66ee4=_0x1773c6;for(var _0x17224a=_0x5c6834>0x1?void 0x0:_0x5c6834?ie(_0x4feca5,_0x1049e6):_0x4feca5,_0x4fe9f6=_0x51d8d2[_0xb66ee4(0x97)]-0x1,_0xdb52de;_0x4fe9f6>=0x0;_0x4fe9f6--)(_0xdb52de=_0x51d8d2[_0x4fe9f6])&&(_0x17224a=(_0x5c6834?_0xdb52de(_0x4feca5,_0x1049e6,_0x17224a):_0xdb52de(_0x17224a))||_0x17224a);return _0x5c6834&&_0x17224a&&R(_0x4feca5,_0x1049e6,_0x17224a),_0x17224a;},M=(_0x2c0697,_0x3856c4)=>(_0x35a339,_0x1f4c76)=>_0x3856c4(_0x35a339,_0x1f4c76,_0x2c0697),j=(_0x55eb62,_0x17b9cd,_0x4993b9)=>ce(_0x55eb62,typeof _0x17b9cd!=_0x1773c6(0xb3)?_0x17b9cd+'':_0x17b9cd,_0x4993b9);let C=class extends _0x16aa87{constructor(_0x2a1a92=Q,_0x21a339,_0x15ded9){const _0x27b699=_0x1773c6;super(),this[_0x27b699(0xb7)]=_0x2a1a92,this[_0x27b699(0xa0)]=_0x21a339,this[_0x27b699(0xd3)]=_0x15ded9;const {..._0x1b9c1e}=this[_0x27b699(0xb7)];this[_0x27b699(0xd3)][_0x27b699(0xc6)](z,_0x1b9c1e);}['onStarting'](){[[S],[b],[f]]['forEach'](_0x6debfe=>{const _0x3a7c88=_0x281f;this['_injector'][_0x3a7c88(0x93)](_0x6debfe);});}[_0x1773c6(0x8b)](){const _0x50887e=_0x1773c6;this['_injector'][_0x50887e(0x8c)](b),this[_0x50887e(0xa0)][_0x50887e(0x8c)](f);}};j(C,_0x1773c6(0xab),q),j(C,'type',_0x3dbd0b[_0x1773c6(0x9f)]),C=ae([_0x567446(_0x3c3da1,_0xfee743,_0x24df1b),M(0x1,_0x4fb662(_0x1610eb)),M(0x2,_0x2ef31e)],C);export{C as UniverThreadCommentDataSourcePlugin};
1
+ const _0x5498c1=_0x4299;(function(_0x117059,_0x327680){const _0x20b7cc=_0x4299,_0xefebcf=_0x117059();while(!![]){try{const _0x3fc0a3=parseInt(_0x20b7cc(0xe2))/0x1*(parseInt(_0x20b7cc(0xee))/0x2)+parseInt(_0x20b7cc(0x138))/0x3+-parseInt(_0x20b7cc(0x109))/0x4*(parseInt(_0x20b7cc(0xe7))/0x5)+parseInt(_0x20b7cc(0xe5))/0x6*(parseInt(_0x20b7cc(0x128))/0x7)+-parseInt(_0x20b7cc(0xf8))/0x8*(-parseInt(_0x20b7cc(0x11e))/0x9)+-parseInt(_0x20b7cc(0xdb))/0xa+parseInt(_0x20b7cc(0xe9))/0xb;if(_0x3fc0a3===_0x327680)break;else _0xefebcf['push'](_0xefebcf['shift']());}catch(_0x499101){_0xefebcf['push'](_0xefebcf['shift']());}}}(_0x4e5d,0xcada3));import{CommentService as _0x1a38f9,CollaborationSessionService as _0x484bcc,UniverCollaborationClientPlugin as _0x4c7081}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x53f452}from'@univerjs-pro/license';import{dayjs as _0x56039a,UserManagerService as _0x274583,Inject as _0x49c7bc,Injector as _0x5d860c,Disposable as _0x42e387,CustomRangeType as _0xc9d142,UniverInstanceType as _0x349554,DependentOn as _0x1bfd10,Plugin as _0x47ec05,IConfigService as _0x173a8b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x41fc9d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x55ed41,IThreadCommentDataSourceService as _0x5d7e27}from'@univerjs/thread-comment';import{bufferTime as _0x53f4cc}from'rxjs';import{HTTPService as _0x5d1a16}from'@univerjs/network';const q=_0x5498c1(0x106);var v=(_0x4d73ea=>(_0x4d73ea[_0x4d73ea['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x4d73ea[_0x4d73ea[_0x5498c1(0xe4)]=0x1]=_0x5498c1(0xe4),_0x4d73ea[_0x4d73ea[_0x5498c1(0x11f)]=-0x1]=_0x5498c1(0x11f),_0x4d73ea))(v||{}),p=(_0x1d150c=>(_0x1d150c[_0x1d150c[_0x5498c1(0xeb)]=0x0]=_0x5498c1(0xeb),_0x1d150c[_0x1d150c[_0x5498c1(0xf6)]=0x1]=_0x5498c1(0xf6),_0x1d150c[_0x1d150c[_0x5498c1(0x132)]=0x2]=_0x5498c1(0x132),_0x1d150c[_0x1d150c[_0x5498c1(0x110)]=0x3]=_0x5498c1(0x110),_0x1d150c[_0x1d150c['Delete']=0x4]=_0x5498c1(0x137),_0x1d150c[_0x1d150c[_0x5498c1(0xdf)]=0x5]=_0x5498c1(0xdf),_0x1d150c[_0x1d150c['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x1d150c))(p||{});const g=_0x2ec519=>_0x56039a(new Date(+_0x2ec519))[_0x5498c1(0xf9)]('YYYY/MM/DD\x20HH:mm'),W=async(_0x25f0a0,_0x2c3b41)=>{const _0x424da6=_0x5498c1,_0x5164bb=_0x25f0a0[_0x424da6(0x11d)](_0x274583),_0xf8e31f=_0x25f0a0[_0x424da6(0x11d)](_0x5d1a16);_0x2c3b41[_0x424da6(0xe8)](_0x2e9d5c=>{const _0x3d0a7c=_0x424da6;_0x5164bb['getUser'](_0x2e9d5c)&&_0x2c3b41[_0x3d0a7c(0xff)](_0x2e9d5c);}),_0x2c3b41['size']&&(await _0xf8e31f[_0x424da6(0x11d)](_0x424da6(0x113),{'params':{'userIDs':[..._0x2c3b41]}}))[_0x424da6(0x108)]['users'][_0x424da6(0xe8)](_0x46f793=>{const _0x3ad69d=_0x424da6;_0x46f793&&_0x5164bb[_0x3ad69d(0x125)](_0x46f793);});};var B=Object['defineProperty'],K=Object[_0x5498c1(0x12f)],V=(_0x47b5ce,_0xd69af1,_0xe9c00d,_0x2445dd)=>{const _0x5a1e46=_0x5498c1;for(var _0x30fb4b=_0x2445dd>0x1?void 0x0:_0x2445dd?K(_0xd69af1,_0xe9c00d):_0xd69af1,_0x89c3a3=_0x47b5ce[_0x5a1e46(0xf0)]-0x1,_0x46aac9;_0x89c3a3>=0x0;_0x89c3a3--)(_0x46aac9=_0x47b5ce[_0x89c3a3])&&(_0x30fb4b=(_0x2445dd?_0x46aac9(_0xd69af1,_0xe9c00d,_0x30fb4b):_0x46aac9(_0x30fb4b))||_0x30fb4b);return _0x2445dd&&_0x30fb4b&&B(_0xd69af1,_0xe9c00d,_0x30fb4b),_0x30fb4b;},_=(_0x553a1d,_0x186bc4)=>(_0x7640b8,_0x3971c9)=>_0x186bc4(_0x7640b8,_0x3971c9,_0x553a1d);let f=class extends _0x42e387{constructor(_0x5787c7,_0x3a729f,_0x17f8b6,_0x5dca79){const _0x5c277c=_0x5498c1;super(),this[_0x5c277c(0x11a)]=_0x5787c7,this[_0x5c277c(0x114)]=_0x3a729f,this['_userService']=_0x17f8b6,this[_0x5c277c(0x103)]=_0x5dca79,this[_0x5c277c(0xfb)](),this['_initUserSync']();}[_0x5498c1(0x131)](){const _0xc81f7d=_0x5498c1;this[_0xc81f7d(0x10e)](this[_0xc81f7d(0x114)][_0xc81f7d(0x10a)][_0xc81f7d(0x10d)](_0x53f4cc(0x10))[_0xc81f7d(0xe6)](_0x16710a=>{const _0x2aa939=new Set();_0x16710a['forEach'](_0xa5db31=>{const _0x427196=_0x4299;switch(_0xa5db31[_0x427196(0xdd)]){case'add':{const _0x40ee0d=_0xa5db31['payload'][_0x427196(0x127)];_0x2aa939['add'](_0x40ee0d);break;}}}),W(this['_injector'],_0x2aa939);}));}[_0x5498c1(0xfb)](){const _0x50c2a9=_0x5498c1;this['disposeWithMe'](this['_commentService'][_0x50c2a9(0x10a)][_0x50c2a9(0xe6)](async _0xa9da1b=>{const _0x2f032d=_0x50c2a9;var _0x1fa6c6,_0x186a47,_0x218f4e,_0x1a5c98;const _0xd787af=(_0x1fa6c6=this[_0x2f032d(0x114)][_0x2f032d(0xf4)](_0xa9da1b[_0x2f032d(0x11b)])['find'](_0x235344=>_0x235344[_0x2f032d(0x134)]===_0xa9da1b[_0x2f032d(0x134)]))==null?void 0x0:_0x1fa6c6[_0x2f032d(0x119)];if(!_0xd787af)return;const {unitId:_0x2272cd,subUnitId:_0x935cff}=_0xd787af;switch(_0xa9da1b[_0x2f032d(0x107)]&&this[_0x2f032d(0xda)][_0x2f032d(0x125)](_0xa9da1b[_0x2f032d(0x107)]),_0xa9da1b[_0x2f032d(0xdd)]){case p['Add']:break;case p['Reply']:{this[_0x2f032d(0x114)][_0x2f032d(0x121)](_0x2272cd,_0x935cff,{'unitId':_0x2272cd,'subUnitId':_0x935cff,'ref':'','id':_0xa9da1b[_0x2f032d(0xfc)],'dT':g(+_0xa9da1b[_0x2f032d(0xef)]),'threadId':_0xa9da1b[_0x2f032d(0x134)],'personId':(_0x218f4e=(_0x186a47=_0xa9da1b[_0x2f032d(0x107)])==null?void 0x0:_0x186a47[_0x2f032d(0x12c)])!=null?_0x218f4e:_0xa9da1b['userId'],'text':JSON[_0x2f032d(0xe1)](_0xa9da1b[_0x2f032d(0x122)]),'parentId':_0xd787af['id']});break;}case p['Delete']:{const _0x28a8bb=this['_threadCommentModel'][_0x2f032d(0x100)](_0x2272cd,_0x935cff,_0xa9da1b[_0x2f032d(0xfc)]);_0x28a8bb&&_0x28a8bb[_0x2f032d(0x139)]&&this['_threadCommentModel']['deleteComment'](_0x2272cd,_0x935cff,_0xa9da1b[_0x2f032d(0xfc)]);break;}case p[_0x2f032d(0x110)]:{this[_0x2f032d(0x114)]['updateComment'](_0x2272cd,_0x935cff,{'commentId':_0xa9da1b[_0x2f032d(0xfc)],'text':JSON[_0x2f032d(0xe1)](_0xa9da1b[_0x2f032d(0x122)])});break;}case p[_0x2f032d(0xdf)]:{const _0x2a8050=(_0x1a5c98=this[_0x2f032d(0x114)][_0x2f032d(0xf4)](_0xa9da1b[_0x2f032d(0x11b)])[_0x2f032d(0x116)](_0xf3c5a9=>_0xf3c5a9[_0x2f032d(0x134)]===_0xa9da1b['threadId']))==null?void 0x0:_0x1a5c98[_0x2f032d(0x119)];_0x2a8050&&this[_0x2f032d(0x114)][_0x2f032d(0x130)](_0x2272cd,_0x935cff,_0x2a8050['id'],_0xa9da1b[_0x2f032d(0x101)]===v[_0x2f032d(0xe4)]);break;}}}));}};f=V([_(0x0,_0x49c7bc(_0x1a38f9)),_(0x1,_0x49c7bc(_0x55ed41)),_(0x2,_0x49c7bc(_0x274583)),_(0x3,_0x49c7bc(_0x5d860c))],f);function _0x4299(_0x3e4368,_0x47cb68){const _0x4e5d34=_0x4e5d();return _0x4299=function(_0x4299d6,_0x26d29d){_0x4299d6=_0x4299d6-0xd6;let _0x3ebdc3=_0x4e5d34[_0x4299d6];return _0x3ebdc3;},_0x4299(_0x3e4368,_0x47cb68);}const z=_0x5498c1(0x112),Q={};var X=Object[_0x5498c1(0xfe)],k=Object['getOwnPropertyDescriptor'],ee=(_0x1e74e5,_0x2d5a7d,_0x4dae23,_0x2b4b25)=>{for(var _0x82c20f=_0x2b4b25>0x1?void 0x0:_0x2b4b25?k(_0x2d5a7d,_0x4dae23):_0x2d5a7d,_0x1124ee=_0x1e74e5['length']-0x1,_0x273398;_0x1124ee>=0x0;_0x1124ee--)(_0x273398=_0x1e74e5[_0x1124ee])&&(_0x82c20f=(_0x2b4b25?_0x273398(_0x2d5a7d,_0x4dae23,_0x82c20f):_0x273398(_0x82c20f))||_0x82c20f);return _0x2b4b25&&_0x82c20f&&X(_0x2d5a7d,_0x4dae23,_0x82c20f),_0x82c20f;},I=(_0x46b6b5,_0x10ddaf)=>(_0x5d6585,_0x3c3464)=>_0x10ddaf(_0x5d6585,_0x3c3464,_0x46b6b5);function re(_0xf0e3ae,_0x1eb88f){const _0x421ec8=_0x5498c1,_0x3ae175=_0xf0e3ae[_0x421ec8(0x13b)][0x0];return{..._0x1eb88f,'id':_0x3ae175[_0x421ec8(0xfc)],'resolved':_0xf0e3ae[_0x421ec8(0x101)]===0x1,'dT':g(_0x3ae175[_0x421ec8(0xef)]),'personId':_0x3ae175[_0x421ec8(0xd8)],'threadId':_0x3ae175[_0x421ec8(0x134)]};}function te(_0x3bca13,_0x219cef,_0x152f66){const _0x1d5d0e=_0x5498c1;var _0x2df965,_0x293822;if(((_0x293822=(_0x2df965=_0x3bca13==null?void 0x0:_0x3bca13['replies'])==null?void 0x0:_0x2df965[_0x1d5d0e(0xf0)])!=null?_0x293822:0x0)>0x0){const _0x276658=(_0x375b03,_0x368d08)=>({'id':_0x375b03['replyId'],'threadId':_0x375b03[_0x1d5d0e(0x134)],'dT':g(_0x375b03[_0x1d5d0e(0xef)]),'personId':_0x375b03[_0x1d5d0e(0xd8)],'resolved':_0x3bca13[_0x1d5d0e(0x101)]===v[_0x1d5d0e(0xe4)],'unitId':_0x219cef,'subUnitId':_0x152f66,'text':JSON[_0x1d5d0e(0xe1)](_0x375b03[_0x1d5d0e(0x122)]),'parentId':_0x368d08}),_0x47ae22=_0x276658(_0x3bca13['replies'][0x0]);return{..._0x47ae22,'children':_0x3bca13[_0x1d5d0e(0x13b)][_0x1d5d0e(0x129)](0x1)[_0x1d5d0e(0xfd)](_0xb9e4ae=>_0x276658(_0xb9e4ae,_0x47ae22['id']))};}return null;}let S=class{constructor(_0x4eb637,_0x3f272d,_0x1c46a2,_0x1723ef){const _0xf25dfd=_0x5498c1;this[_0xf25dfd(0x120)]=_0x4eb637,this[_0xf25dfd(0xda)]=_0x3f272d,this[_0xf25dfd(0x136)]=_0x1c46a2,this[_0xf25dfd(0x103)]=_0x1723ef;}async[_0x5498c1(0x121)](_0x240a1f){const _0xec791c=_0x5498c1;var _0x1d34de,_0x1b0ebe;const {parentId:_0x113846,unitId:_0x4236b9,text:_0x2a22bd,threadId:_0x1caf77}=_0x240a1f,_0x436e5e=(_0x1b0ebe=(_0x1d34de=_0x2a22bd['customRanges'])==null?void 0x0:_0x1d34de[_0xec791c(0xe3)](_0xbc0d21=>_0xbc0d21[_0xec791c(0x13a)]===_0xc9d142['COMMENT'])[_0xec791c(0xfd)](_0x29f2a3=>_0x29f2a3[_0xec791c(0xd6)]))!=null?_0x1b0ebe:[],_0xded253=JSON[_0xec791c(0x123)](_0x2a22bd),_0x27d78e=(await this[_0xec791c(0x136)][_0xec791c(0x102)](_0x4236b9))['getMemberID']();if(_0x113846){const _0x223461={'memberId':_0x27d78e,'unitId':_0x4236b9,'content':_0xded253,'mention':_0x436e5e,'threadId':_0x1caf77},_0x1b6a3b=(await this[_0xec791c(0x120)]['post']('/universer-api/comment/unit/'+_0x4236b9+_0xec791c(0x111),{'body':_0x223461}))[_0xec791c(0x108)][_0xec791c(0x10b)];return{..._0x240a1f,'id':_0x1b6a3b[_0xec791c(0xfc)],'dT':_0x56039a(+_0x1b6a3b[_0xec791c(0xef)])[_0xec791c(0xf9)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1b6a3b[_0xec791c(0xd8)]};}else{const _0x1d2f18={'memberId':_0x27d78e,'unitId':_0x4236b9,'content':_0xded253,'mention':_0x436e5e},_0xeb95d3=await this[_0xec791c(0x120)][_0xec791c(0xe0)](_0xec791c(0xd9)+_0x4236b9+_0xec791c(0x124),{'body':_0x1d2f18});return re(_0xeb95d3[_0xec791c(0x108)][_0xec791c(0xde)],_0x240a1f);}}async[_0x5498c1(0x11c)](_0x4b245f){const _0x264076=_0x5498c1;var _0xe61fa9,_0x42e046;const {text:_0x272cf3,unitId:_0x53f416}=_0x4b245f,_0x2c658c=(_0x42e046=(_0xe61fa9=_0x272cf3[_0x264076(0xed)])==null?void 0x0:_0xe61fa9[_0x264076(0xe3)](_0x2d6a70=>_0x2d6a70[_0x264076(0x13a)]===_0xc9d142[_0x264076(0x105)])[_0x264076(0xfd)](_0x48a88d=>_0x48a88d['rangeId']))!=null?_0x42e046:[],_0x5a935e=JSON['stringify'](_0x272cf3),_0x432808=_0x4b245f['threadId'],_0x330395=_0x4b245f['id'],_0x18709c={'memberId':(await this[_0x264076(0x136)][_0x264076(0x102)](_0x53f416))['getMemberID'](),'unitId':_0x53f416,'threadId':_0x432808,'mention':_0x2c658c,'content':_0x5a935e,'replyId':_0x330395},_0x321a15=await this[_0x264076(0x120)][_0x264076(0xe0)](_0x264076(0xd9)+_0x53f416+_0x264076(0xf3),{'body':_0x18709c});return!_0x321a15['body'][_0x264076(0x12b)]||_0x321a15[_0x264076(0x108)]['error'][_0x264076(0x133)]===0x1;}async[_0x5498c1(0x130)](_0x17f822){const _0x43cbd1=_0x5498c1,{unitId:_0x2d3f41}=_0x17f822,_0x5949cd=_0x17f822[_0x43cbd1(0x134)],_0x22645b={'memberId':this[_0x43cbd1(0xda)][_0x43cbd1(0x10f)]()[_0x43cbd1(0x12c)],'unitId':_0x2d3f41,'threadId':_0x5949cd,'solved':_0x17f822[_0x43cbd1(0xec)]?v[_0x43cbd1(0xe4)]:v['OpenOrReOpen']},_0x3f5052=await this[_0x43cbd1(0x120)]['post']('/universer-api/comment/unit/'+_0x2d3f41+_0x43cbd1(0x12a),{'body':_0x22645b});return!_0x3f5052[_0x43cbd1(0x108)][_0x43cbd1(0x12b)]||_0x3f5052['body'][_0x43cbd1(0x12b)][_0x43cbd1(0x133)]===0x1;}async[_0x5498c1(0x10c)](_0x573729,_0x3bfad7,_0x396664,_0x36071d){const _0x593ce5=_0x5498c1,_0x29cc3a={'memberId':(await this[_0x593ce5(0x136)][_0x593ce5(0x102)](_0x573729))[_0x593ce5(0xf2)](),'threadId':_0x396664,'replyId':_0x36071d,'unitId':_0x573729},_0x4185cd=await this['_httpService']['post'](_0x593ce5(0xd9)+_0x573729+'/delete',{'body':_0x29cc3a});return!_0x4185cd['body'][_0x593ce5(0x12b)]||_0x4185cd[_0x593ce5(0x108)]['error'][_0x593ce5(0x133)]===0x1;}async['listComments'](_0x592aa7,_0x186137,_0x3e1a9e){const _0x3fce3e=_0x5498c1,_0x486f84={'unitId':_0x592aa7,'threadId':_0x3e1a9e},_0xa3aac1=await this[_0x3fce3e(0x120)][_0x3fce3e(0xe0)](_0x3fce3e(0xd9)+_0x592aa7+_0x3fce3e(0xdc),{'body':_0x486f84}),_0x59fad1=_0x3e1a9e[_0x3fce3e(0xfd)](_0x5d5088=>te(_0xa3aac1[_0x3fce3e(0x108)][_0x3fce3e(0xea)][_0x5d5088],_0x592aa7,_0x186137))[_0x3fce3e(0xe3)](Boolean);return Object[_0x3fce3e(0xf5)](_0xa3aac1['body']['users'])[_0x3fce3e(0xe8)](_0x54bedd=>{const _0x4092c1=_0x3fce3e;this[_0x4092c1(0xda)]['addUser'](_0x54bedd);}),_0x59fad1;}[_0x5498c1(0xfa)](_0x21b53c){const _0x4e845e=_0x5498c1;return{'id':_0x21b53c['id'],'threadId':_0x21b53c['threadId'],'ref':_0x21b53c[_0x4e845e(0x12d)]};}};S=ee([I(0x0,_0x49c7bc(_0x5d1a16)),I(0x1,_0x49c7bc(_0x274583)),I(0x2,_0x49c7bc(_0x484bcc)),I(0x3,_0x49c7bc(_0x5d860c))],S);var se=Object[_0x5498c1(0xfe)],oe=Object[_0x5498c1(0x12f)],ne=(_0x58de18,_0x504392,_0x45cee5,_0x3cdf99)=>{const _0x8c5308=_0x5498c1;for(var _0x1d4331=_0x3cdf99>0x1?void 0x0:_0x3cdf99?oe(_0x504392,_0x45cee5):_0x504392,_0x3ef998=_0x58de18[_0x8c5308(0xf0)]-0x1,_0x5329c0;_0x3ef998>=0x0;_0x3ef998--)(_0x5329c0=_0x58de18[_0x3ef998])&&(_0x1d4331=(_0x3cdf99?_0x5329c0(_0x504392,_0x45cee5,_0x1d4331):_0x5329c0(_0x1d4331))||_0x1d4331);return _0x3cdf99&&_0x1d4331&&se(_0x504392,_0x45cee5,_0x1d4331),_0x1d4331;},P=(_0x1ef29d,_0x550b55)=>(_0x28a657,_0x428e95)=>_0x550b55(_0x28a657,_0x428e95,_0x1ef29d);let b=class extends _0x42e387{constructor(_0x1c0ec4,_0x4cfb3e){const _0x382318=_0x5498c1;super(),this[_0x382318(0x126)]=_0x1c0ec4,this['_threadCommentDataSource']=_0x4cfb3e,this[_0x382318(0x118)]();}['_initDataSource'](){const _0x2b90e3=_0x5498c1;this[_0x2b90e3(0x126)]['dataSource']=this['_threadCommentDataSource'],this[_0x2b90e3(0x126)][_0x2b90e3(0x12e)]=!0x1;}};b=ne([P(0x0,_0x5d7e27),P(0x1,_0x49c7bc(S))],b);var T=Object[_0x5498c1(0xfe)],ie=Object[_0x5498c1(0x12f)],ce=(_0x3b097e,_0x5a8bc8,_0x578979)=>_0x5a8bc8 in _0x3b097e?T(_0x3b097e,_0x5a8bc8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x578979}):_0x3b097e[_0x5a8bc8]=_0x578979,ae=(_0x594486,_0x56d65c,_0x351ac5,_0x392e2f)=>{const _0x4368fa=_0x5498c1;for(var _0x3c6c0a=_0x392e2f>0x1?void 0x0:_0x392e2f?ie(_0x56d65c,_0x351ac5):_0x56d65c,_0x227839=_0x594486[_0x4368fa(0xf0)]-0x1,_0x21b7f9;_0x227839>=0x0;_0x227839--)(_0x21b7f9=_0x594486[_0x227839])&&(_0x3c6c0a=(_0x392e2f?_0x21b7f9(_0x56d65c,_0x351ac5,_0x3c6c0a):_0x21b7f9(_0x3c6c0a))||_0x3c6c0a);return _0x392e2f&&_0x3c6c0a&&T(_0x56d65c,_0x351ac5,_0x3c6c0a),_0x3c6c0a;},M=(_0x3a2bd4,_0x27af36)=>(_0x22d6d5,_0x505025)=>_0x27af36(_0x22d6d5,_0x505025,_0x3a2bd4),$=(_0x5820f5,_0x36f41c,_0x2d7e35)=>ce(_0x5820f5,typeof _0x36f41c!=_0x5498c1(0xd7)?_0x36f41c+'':_0x36f41c,_0x2d7e35);function _0x4e5d(){const _0x2df967=['getCurrentUser','Edit','/reply','thread-comment-data-source.config','/universer-api/user/list','_threadCommentModel','_configService','find','onReady','_initDataSource','root','_commentService','unitId','updateComment','get','11763AJNMAm','UNRECOGNIZED','_httpService','addComment','content','stringify','/add','addUser','_threadCommentDataSourceService','personId','3632069xqWrPn','slice','/solved','error','userID','ref','syncUpdateMutationToColla','getOwnPropertyDescriptor','resolveComment','_initUserSync','Reply','code','threadId','onStarting','_sessionService','Delete','76782BKPeGX','parentId','rangeType','replies','rangeId','symbol','userId','/universer-api/comment/unit/','_userService','12431110bYFkjk','/list','type','comment','Solve','post','parse','11QFSqIj','filter','Solved','6CDhcXa','subscribe','7255lgEKaL','forEach','15413057CNywrY','comments','Unknown','resolved','customRanges','103414lxkKiJ','createTimestamp','length','add','getMemberID','/edit','getUnit','values','Add','pluginName','2784xcyzTY','format','saveCommentToSnapshot','_init','replyId','map','defineProperty','delete','getComment','solved','requireSession','_injector','UNIVER_UNKNOWN','COMMENT','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','user','body','2468MGPeMe','commentUpdate$','reply','deleteComment','pipe','disposeWithMe'];_0x4e5d=function(){return _0x2df967;};return _0x4e5d();}let C=class extends _0x47ec05{constructor(_0x575438=Q,_0x5f1ad0,_0x1d7bf8){const _0x4dcb98=_0x5498c1;super(),this['_config']=_0x575438,this[_0x4dcb98(0x103)]=_0x5f1ad0,this[_0x4dcb98(0x115)]=_0x1d7bf8;const {..._0x32b508}=this['_config'];this[_0x4dcb98(0x115)]['setConfig'](z,_0x32b508);}[_0x5498c1(0x135)](){const _0x4214bc=_0x5498c1;[[S],[b],[f]][_0x4214bc(0xe8)](_0x40dfba=>{const _0x5c3a89=_0x4214bc;this[_0x5c3a89(0x103)][_0x5c3a89(0xf1)](_0x40dfba);});}[_0x5498c1(0x117)](){const _0x53f8ab=_0x5498c1;this[_0x53f8ab(0x103)][_0x53f8ab(0x11d)](b),this[_0x53f8ab(0x103)]['get'](f);}};$(C,_0x5498c1(0xf7),q),$(C,'type',_0x349554[_0x5498c1(0x104)]),C=ae([_0x1bfd10(_0x41fc9d,_0x4c7081,_0x53f452),M(0x1,_0x49c7bc(_0x5d860c)),M(0x2,_0x173a8b)],C);export{C as UniverThreadCommentDataSourcePlugin};
@@ -1,4 +1,4 @@
1
- export declare const PLUGIN_CONFIG_KEY = "thread-comment-data-source.config";
1
+ export declare const THREAD_COMMENT_DATA_SOURCE_PLUGIN_CONFIG_KEY = "thread-comment-data-source.config";
2
2
  export declare const configSymbol: unique symbol;
3
3
  export interface IUniverThreadCommentDataSourceConfig {
4
4
  }
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x7d39(){const _0x3de109=['error','876wUumos','add','/solved','_userService','post','_threadCommentDataSourceService','rangeId','solved','UniverProCollaborationClient','_init','8HlcAUt','personId','stringify','length','4791vjeJOZ','rxjs','parse','size','19070IyPlUE','getMemberID','symbol','amd','@univerjs/network','find','@univerjs/core','resolveComment','_initUserSync','CustomRangeType','_threadCommentDataSource','UserManagerService','exports','HTTPService','defineProperty','/universer-api/user/list','values','code','CollaborationSessionService','Edit','OpenOrReOpen','object','/list','11547nzSoYl','Solve','ThreadCommentModel','parentId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','28554sXyLLa','requireSession','UniverProThreadCommentDatasource','@univerjs-pro/collaboration-client','Solved','addComment','replies','format','type','Plugin','UNRECOGNIZED','IThreadCommentDataSourceService','Add','/reply','_initDataSource','rangeType','502968DNUTip','slice','getUnit','_sessionService','get','syncUpdateMutationToColla','user','CommentService','_config','1149323mJkcSN','root','delete','Inject','UniverThreadCommentUIPlugin','threadId','getComment','map','setConfig','COMMENT','1073196HWXdsE','createTimestamp','@univerjs/thread-comment','UniverThreadComment','UniverCore','UniverProLicense','disposeWithMe','reply','addUser','UniverThreadCommentDataSourcePlugin','getUser','_threadCommentModel','getOwnPropertyDescriptor','onStarting','userID','Unknown','dataSource','content','users','/edit','YYYY/MM/DD\x20HH:mm','@univerjs/thread-comment-ui','UniverCollaborationClientPlugin','comments','body','_injector','onReady','_httpService','deleteComment','unitId','filter','UniverNetwork','forEach','userId','@univerjs-pro/license','dayjs','Delete','Injector','3114975QnSaiX','customRanges','/universer-api/comment/unit/','comment','Reply','updateComment','replyId','UniverLicensePlugin','pluginName','listComments','saveCommentToSnapshot','/add','subscribe','/delete','Disposable'];_0x7d39=function(){return _0x3de109;};return _0x7d39();}function _0x44c8(_0x2351ea,_0x48dcd2){const _0x7d3908=_0x7d39();return _0x44c8=function(_0x44c8a9,_0x2a1126){_0x44c8a9=_0x44c8a9-0xb9;let _0x3c93ef=_0x7d3908[_0x44c8a9];return _0x3c93ef;},_0x44c8(_0x2351ea,_0x48dcd2);}(function(_0x469347,_0x357ec6){const _0xf65cc=_0x44c8,_0x3cd131=_0x469347();while(!![]){try{const _0x3fdb83=-parseInt(_0xf65cc(0xd0))/0x1+-parseInt(_0xf65cc(0xf3))/0x2+parseInt(_0xf65cc(0x137))/0x3*(-parseInt(_0xf65cc(0x129))/0x4)+-parseInt(_0xf65cc(0x119))/0x5+-parseInt(_0xf65cc(0xe0))/0x6+parseInt(_0xf65cc(0xe9))/0x7*(-parseInt(_0xf65cc(0x133))/0x8)+parseInt(_0xf65cc(0xcb))/0x9*(parseInt(_0xf65cc(0x13b))/0xa);if(_0x3fdb83===_0x357ec6)break;else _0x3cd131['push'](_0x3cd131['shift']());}catch(_0x4ff261){_0x3cd131['push'](_0x3cd131['shift']());}}}(_0x7d39,0xa1526),function(_0x4a2b8a,_0x32b02c){const _0x441ad2=_0x44c8;typeof exports==_0x441ad2(0xc9)&&typeof module<'u'?_0x32b02c(exports,require('@univerjs/core'),require(_0x441ad2(0x108)),require(_0x441ad2(0xd3)),require(_0x441ad2(0x115)),require('@univerjs/thread-comment'),require(_0x441ad2(0x138)),require(_0x441ad2(0x13f))):typeof define=='function'&&define[_0x441ad2(0x13e)]?define([_0x441ad2(0xc0),_0x441ad2(0xba),'@univerjs/thread-comment-ui',_0x441ad2(0xd3),_0x441ad2(0x115),_0x441ad2(0xf5),_0x441ad2(0x138),'@univerjs/network'],_0x32b02c):(_0x4a2b8a=typeof globalThis<'u'?globalThis:_0x4a2b8a||self,_0x32b02c(_0x4a2b8a[_0x441ad2(0xd2)]={},_0x4a2b8a[_0x441ad2(0xf7)],_0x4a2b8a['UniverThreadCommentUi'],_0x4a2b8a[_0x441ad2(0x131)],_0x4a2b8a[_0x441ad2(0xf8)],_0x4a2b8a[_0x441ad2(0xf6)],_0x4a2b8a[_0x441ad2(0x138)],_0x4a2b8a[_0x441ad2(0x112)]));}(this,function(_0x192ce3,_0xf4f67d,_0x254044,_0x27eb00,_0x535dd6,_0x32d206,_0x56bc4f,_0x331a66){'use strict';const _0x5aeff8=_0x44c8;const _0xc1db27=_0x5aeff8(0xcf);var _0x5c92fb=(_0x392d9f=>(_0x392d9f[_0x392d9f[_0x5aeff8(0xc8)]=0x0]=_0x5aeff8(0xc8),_0x392d9f[_0x392d9f[_0x5aeff8(0xd4)]=0x1]=_0x5aeff8(0xd4),_0x392d9f[_0x392d9f['UNRECOGNIZED']=-0x1]=_0x5aeff8(0xda),_0x392d9f))(_0x5c92fb||{}),_0x476594=(_0x5eb5bb=>(_0x5eb5bb[_0x5eb5bb['Unknown']=0x0]=_0x5aeff8(0x102),_0x5eb5bb[_0x5eb5bb[_0x5aeff8(0xdc)]=0x1]='Add',_0x5eb5bb[_0x5eb5bb[_0x5aeff8(0x11d)]=0x2]=_0x5aeff8(0x11d),_0x5eb5bb[_0x5eb5bb['Edit']=0x3]=_0x5aeff8(0xc7),_0x5eb5bb[_0x5eb5bb[_0x5aeff8(0x117)]=0x4]=_0x5aeff8(0x117),_0x5eb5bb[_0x5eb5bb[_0x5aeff8(0xcc)]=0x5]=_0x5aeff8(0xcc),_0x5eb5bb[_0x5eb5bb[_0x5aeff8(0xda)]=-0x1]=_0x5aeff8(0xda),_0x5eb5bb))(_0x476594||{});const _0x576504=_0x4e6f03=>_0xf4f67d[_0x5aeff8(0x116)](new Date(+_0x4e6f03))[_0x5aeff8(0xd7)](_0x5aeff8(0x107)),_0x195dbc=async(_0x56bfeb,_0x9fde91)=>{const _0x17345d=_0x5aeff8,_0x51f734=_0x56bfeb[_0x17345d(0xe4)](_0xf4f67d[_0x17345d(0xbf)]),_0x4cf4b9=_0x56bfeb['get'](_0x331a66[_0x17345d(0xc1)]);_0x9fde91[_0x17345d(0x113)](_0x5214a9=>{const _0x3b9143=_0x17345d;_0x51f734[_0x3b9143(0xfd)](_0x5214a9)&&_0x9fde91[_0x3b9143(0xeb)](_0x5214a9);}),_0x9fde91[_0x17345d(0x13a)]&&(await _0x4cf4b9[_0x17345d(0xe4)](_0x17345d(0xc3),{'params':{'userIDs':[..._0x9fde91]}}))[_0x17345d(0x10b)][_0x17345d(0x105)][_0x17345d(0x113)](_0x92e85f=>{const _0x19139a=_0x17345d;_0x92e85f&&_0x51f734[_0x19139a(0xfb)](_0x92e85f);});};var _0x1184be=Object[_0x5aeff8(0xc2)],_0x32a0a7=Object[_0x5aeff8(0xff)],_0x208816=(_0x15a9b0,_0x5092c5,_0x129ab5,_0x375558)=>{const _0x2a541f=_0x5aeff8;for(var _0x5bbbbc=_0x375558>0x1?void 0x0:_0x375558?_0x32a0a7(_0x5092c5,_0x129ab5):_0x5092c5,_0x43397d=_0x15a9b0[_0x2a541f(0x136)]-0x1,_0x534181;_0x43397d>=0x0;_0x43397d--)(_0x534181=_0x15a9b0[_0x43397d])&&(_0x5bbbbc=(_0x375558?_0x534181(_0x5092c5,_0x129ab5,_0x5bbbbc):_0x534181(_0x5bbbbc))||_0x5bbbbc);return _0x375558&&_0x5bbbbc&&_0x1184be(_0x5092c5,_0x129ab5,_0x5bbbbc),_0x5bbbbc;},_0x4029b5=(_0x30defd,_0x198a32)=>(_0x1bc6ae,_0x535ae6)=>_0x198a32(_0x1bc6ae,_0x535ae6,_0x30defd);let _0x45c1c8=class extends _0xf4f67d[_0x5aeff8(0x127)]{constructor(_0x3860f8,_0x242088,_0x42b8d5,_0x43bb00){const _0x3a7274=_0x5aeff8;super(),this['_commentService']=_0x3860f8,this[_0x3a7274(0xfe)]=_0x242088,this[_0x3a7274(0x12c)]=_0x42b8d5,this[_0x3a7274(0x10c)]=_0x43bb00,this[_0x3a7274(0x132)](),this['_initUserSync']();}[_0x5aeff8(0xbc)](){const _0x2e19e1=_0x5aeff8;this[_0x2e19e1(0xf9)](this[_0x2e19e1(0xfe)]['commentUpdate$']['pipe'](_0x56bc4f['bufferTime'](0x10))['subscribe'](_0x7b6b81=>{const _0x4f0ebe=_0x2e19e1,_0x27f3d6=new Set();_0x7b6b81[_0x4f0ebe(0x113)](_0x4cba9f=>{const _0x5baec4=_0x4f0ebe;switch(_0x4cba9f[_0x5baec4(0xd8)]){case _0x5baec4(0x12a):{const _0x18b431=_0x4cba9f['payload'][_0x5baec4(0x134)];_0x27f3d6['add'](_0x18b431);break;}}}),_0x195dbc(this[_0x4f0ebe(0x10c)],_0x27f3d6);}));}[_0x5aeff8(0x132)](){const _0x57441f=_0x5aeff8;this[_0x57441f(0xf9)](this['_commentService']['commentUpdate$'][_0x57441f(0x125)](async _0x167e96=>{const _0x205f91=_0x57441f;var _0x3ade61,_0x53f6d8,_0x2569d3,_0x203555;const _0x28656a=(_0x3ade61=this[_0x205f91(0xfe)][_0x205f91(0xe2)](_0x167e96[_0x205f91(0x110)])[_0x205f91(0xb9)](_0x1a2a63=>_0x1a2a63['threadId']===_0x167e96[_0x205f91(0xee)]))==null?void 0x0:_0x3ade61['root'];if(!_0x28656a)return;const {unitId:_0x97bc10,subUnitId:_0x50f39c}=_0x28656a;switch(_0x167e96['user']&&this[_0x205f91(0x12c)][_0x205f91(0xfb)](_0x167e96[_0x205f91(0xe6)]),_0x167e96[_0x205f91(0xd8)]){case _0x476594[_0x205f91(0xdc)]:break;case _0x476594[_0x205f91(0x11d)]:{this[_0x205f91(0xfe)][_0x205f91(0xd5)](_0x97bc10,_0x50f39c,{'unitId':_0x97bc10,'subUnitId':_0x50f39c,'ref':'','id':_0x167e96[_0x205f91(0x11f)],'dT':_0x576504(+_0x167e96['createTimestamp']),'threadId':_0x167e96[_0x205f91(0xee)],'personId':(_0x2569d3=(_0x53f6d8=_0x167e96[_0x205f91(0xe6)])==null?void 0x0:_0x53f6d8['userID'])!=null?_0x2569d3:_0x167e96[_0x205f91(0x114)],'text':JSON['parse'](_0x167e96[_0x205f91(0x104)]),'parentId':_0x28656a['id']});break;}case _0x476594[_0x205f91(0x117)]:{const _0x4d1351=this[_0x205f91(0xfe)][_0x205f91(0xef)](_0x97bc10,_0x50f39c,_0x167e96['replyId']);_0x4d1351&&_0x4d1351[_0x205f91(0xce)]&&this[_0x205f91(0xfe)][_0x205f91(0x10f)](_0x97bc10,_0x50f39c,_0x167e96['replyId']);break;}case _0x476594['Edit']:{this['_threadCommentModel'][_0x205f91(0x11e)](_0x97bc10,_0x50f39c,{'commentId':_0x167e96[_0x205f91(0x11f)],'text':JSON[_0x205f91(0x139)](_0x167e96[_0x205f91(0x104)])});break;}case _0x476594[_0x205f91(0xcc)]:{const _0x1f72c9=(_0x203555=this[_0x205f91(0xfe)]['getUnit'](_0x167e96['unitId'])[_0x205f91(0xb9)](_0x172ab7=>_0x172ab7[_0x205f91(0xee)]===_0x167e96[_0x205f91(0xee)]))==null?void 0x0:_0x203555[_0x205f91(0xea)];_0x1f72c9&&this[_0x205f91(0xfe)][_0x205f91(0xbb)](_0x97bc10,_0x50f39c,_0x1f72c9['id'],_0x167e96['solved']===_0x5c92fb['Solved']);break;}}}));}};_0x45c1c8=_0x208816([_0x4029b5(0x0,_0xf4f67d[_0x5aeff8(0xec)](_0x27eb00[_0x5aeff8(0xe7)])),_0x4029b5(0x1,_0xf4f67d[_0x5aeff8(0xec)](_0x32d206[_0x5aeff8(0xcd)])),_0x4029b5(0x2,_0xf4f67d[_0x5aeff8(0xec)](_0xf4f67d['UserManagerService'])),_0x4029b5(0x3,_0xf4f67d[_0x5aeff8(0xec)](_0xf4f67d[_0x5aeff8(0x118)]))],_0x45c1c8);const _0x2e3a69='thread-comment-data-source.config',_0x35b116={};var _0x3d1511=Object[_0x5aeff8(0xc2)],_0xb4946d=Object['getOwnPropertyDescriptor'],_0x2aa8e8=(_0x40c2fe,_0x1b28d3,_0x37b6b5,_0x553b9d)=>{const _0x726920=_0x5aeff8;for(var _0x6bbf1d=_0x553b9d>0x1?void 0x0:_0x553b9d?_0xb4946d(_0x1b28d3,_0x37b6b5):_0x1b28d3,_0x316ceb=_0x40c2fe[_0x726920(0x136)]-0x1,_0x3931ce;_0x316ceb>=0x0;_0x316ceb--)(_0x3931ce=_0x40c2fe[_0x316ceb])&&(_0x6bbf1d=(_0x553b9d?_0x3931ce(_0x1b28d3,_0x37b6b5,_0x6bbf1d):_0x3931ce(_0x6bbf1d))||_0x6bbf1d);return _0x553b9d&&_0x6bbf1d&&_0x3d1511(_0x1b28d3,_0x37b6b5,_0x6bbf1d),_0x6bbf1d;},_0x396cd8=(_0x3f5471,_0x359e90)=>(_0x5b7a46,_0x163760)=>_0x359e90(_0x5b7a46,_0x163760,_0x3f5471);function _0x44a8ec(_0x44cf7c,_0x1abb54){const _0x255a0f=_0x5aeff8,_0x177c31=_0x44cf7c['replies'][0x0];return{..._0x1abb54,'id':_0x177c31['replyId'],'resolved':_0x44cf7c[_0x255a0f(0x130)]===0x1,'dT':_0x576504(_0x177c31[_0x255a0f(0xf4)]),'personId':_0x177c31['userId'],'threadId':_0x177c31[_0x255a0f(0xee)]};}function _0x1e4d72(_0x3e86a7,_0x50eee2,_0x45a3ef){const _0x15b4f0=_0x5aeff8;var _0x2ece5a,_0x72e5eb;if(((_0x72e5eb=(_0x2ece5a=_0x3e86a7==null?void 0x0:_0x3e86a7[_0x15b4f0(0xd6)])==null?void 0x0:_0x2ece5a['length'])!=null?_0x72e5eb:0x0)>0x0){const _0xa8bed=(_0x27e631,_0x43faf6)=>({'id':_0x27e631[_0x15b4f0(0x11f)],'threadId':_0x27e631[_0x15b4f0(0xee)],'dT':_0x576504(_0x27e631[_0x15b4f0(0xf4)]),'personId':_0x27e631[_0x15b4f0(0x114)],'resolved':_0x3e86a7[_0x15b4f0(0x130)]===_0x5c92fb[_0x15b4f0(0xd4)],'unitId':_0x50eee2,'subUnitId':_0x45a3ef,'text':JSON['parse'](_0x27e631[_0x15b4f0(0x104)]),'parentId':_0x43faf6}),_0x4be7f8=_0xa8bed(_0x3e86a7[_0x15b4f0(0xd6)][0x0]);return{..._0x4be7f8,'children':_0x3e86a7['replies'][_0x15b4f0(0xe1)](0x1)[_0x15b4f0(0xf0)](_0x456ace=>_0xa8bed(_0x456ace,_0x4be7f8['id']))};}return null;}let _0x5e5b96=class{constructor(_0x12ac92,_0x2546db,_0x412f3f,_0xa95d71){const _0x2fc1c9=_0x5aeff8;this[_0x2fc1c9(0x10e)]=_0x12ac92,this[_0x2fc1c9(0x12c)]=_0x2546db,this[_0x2fc1c9(0xe3)]=_0x412f3f,this[_0x2fc1c9(0x10c)]=_0xa95d71;}async[_0x5aeff8(0xd5)](_0x5d7d43){const _0x374c82=_0x5aeff8;var _0x65ccc5,_0x10df3c;const {parentId:_0x5eceb5,unitId:_0x36d314,text:_0x46ddd5,threadId:_0x37110b}=_0x5d7d43,_0x4886fb=(_0x10df3c=(_0x65ccc5=_0x46ddd5['customRanges'])==null?void 0x0:_0x65ccc5[_0x374c82(0x111)](_0x2a396e=>_0x2a396e[_0x374c82(0xdf)]===_0xf4f67d[_0x374c82(0xbd)][_0x374c82(0xf2)])['map'](_0x33f5d8=>_0x33f5d8[_0x374c82(0x12f)]))!=null?_0x10df3c:[],_0x19ada9=JSON['stringify'](_0x46ddd5),_0x39bc5e=(await this['_sessionService'][_0x374c82(0xd1)](_0x36d314))[_0x374c82(0x13c)]();if(_0x5eceb5){const _0x53c62a={'memberId':_0x39bc5e,'unitId':_0x36d314,'content':_0x19ada9,'mention':_0x4886fb,'threadId':_0x37110b},_0x52b75c=(await this['_httpService'][_0x374c82(0x12d)](_0x374c82(0x11b)+_0x36d314+_0x374c82(0xdd),{'body':_0x53c62a}))[_0x374c82(0x10b)][_0x374c82(0xfa)];return{..._0x5d7d43,'id':_0x52b75c[_0x374c82(0x11f)],'dT':_0xf4f67d['dayjs'](+_0x52b75c['createTimestamp'])[_0x374c82(0xd7)](_0x374c82(0x107)),'personId':_0x52b75c[_0x374c82(0x114)]};}else{const _0x3cb3bf={'memberId':_0x39bc5e,'unitId':_0x36d314,'content':_0x19ada9,'mention':_0x4886fb},_0x3a29f1=await this[_0x374c82(0x10e)][_0x374c82(0x12d)](_0x374c82(0x11b)+_0x36d314+_0x374c82(0x124),{'body':_0x3cb3bf});return _0x44a8ec(_0x3a29f1['body'][_0x374c82(0x11c)],_0x5d7d43);}}async[_0x5aeff8(0x11e)](_0x220c0d){const _0x2e2794=_0x5aeff8;var _0x3293c9,_0x1e8292;const {text:_0x4219e3,unitId:_0x5db17f}=_0x220c0d,_0x3044dc=(_0x1e8292=(_0x3293c9=_0x4219e3[_0x2e2794(0x11a)])==null?void 0x0:_0x3293c9['filter'](_0x377bf8=>_0x377bf8[_0x2e2794(0xdf)]===_0xf4f67d[_0x2e2794(0xbd)][_0x2e2794(0xf2)])[_0x2e2794(0xf0)](_0x81ea29=>_0x81ea29[_0x2e2794(0x12f)]))!=null?_0x1e8292:[],_0x65e11e=JSON[_0x2e2794(0x135)](_0x4219e3),_0x2b10b4=_0x220c0d['threadId'],_0x2b7fd7=_0x220c0d['id'],_0x1aa1f7={'memberId':(await this[_0x2e2794(0xe3)][_0x2e2794(0xd1)](_0x5db17f))[_0x2e2794(0x13c)](),'unitId':_0x5db17f,'threadId':_0x2b10b4,'mention':_0x3044dc,'content':_0x65e11e,'replyId':_0x2b7fd7},_0x1332f0=await this['_httpService'][_0x2e2794(0x12d)](_0x2e2794(0x11b)+_0x5db17f+_0x2e2794(0x106),{'body':_0x1aa1f7});return!_0x1332f0[_0x2e2794(0x10b)][_0x2e2794(0x128)]||_0x1332f0[_0x2e2794(0x10b)][_0x2e2794(0x128)][_0x2e2794(0xc5)]===0x1;}async[_0x5aeff8(0xbb)](_0xf9240d){const _0x35567f=_0x5aeff8,{unitId:_0x3689d8}=_0xf9240d,_0x415203=_0xf9240d[_0x35567f(0xee)],_0x4f6684={'memberId':this[_0x35567f(0x12c)]['getCurrentUser']()[_0x35567f(0x101)],'unitId':_0x3689d8,'threadId':_0x415203,'solved':_0xf9240d['resolved']?_0x5c92fb['Solved']:_0x5c92fb[_0x35567f(0xc8)]},_0x448be4=await this['_httpService']['post'](_0x35567f(0x11b)+_0x3689d8+_0x35567f(0x12b),{'body':_0x4f6684});return!_0x448be4[_0x35567f(0x10b)]['error']||_0x448be4[_0x35567f(0x10b)][_0x35567f(0x128)][_0x35567f(0xc5)]===0x1;}async[_0x5aeff8(0x10f)](_0x18c585,_0x2e5701,_0x342a78,_0x2849bd){const _0x123e3a=_0x5aeff8,_0x8f5aaa={'memberId':(await this[_0x123e3a(0xe3)][_0x123e3a(0xd1)](_0x18c585))[_0x123e3a(0x13c)](),'threadId':_0x342a78,'replyId':_0x2849bd,'unitId':_0x18c585},_0x28415f=await this[_0x123e3a(0x10e)][_0x123e3a(0x12d)](_0x123e3a(0x11b)+_0x18c585+_0x123e3a(0x126),{'body':_0x8f5aaa});return!_0x28415f[_0x123e3a(0x10b)][_0x123e3a(0x128)]||_0x28415f[_0x123e3a(0x10b)][_0x123e3a(0x128)]['code']===0x1;}async[_0x5aeff8(0x122)](_0x1db0c1,_0x4a3ff9,_0x206779){const _0x23a3d4=_0x5aeff8,_0x8cb771={'unitId':_0x1db0c1,'threadId':_0x206779},_0x181848=await this[_0x23a3d4(0x10e)][_0x23a3d4(0x12d)](_0x23a3d4(0x11b)+_0x1db0c1+_0x23a3d4(0xca),{'body':_0x8cb771}),_0x78646=_0x206779[_0x23a3d4(0xf0)](_0x3b2ace=>_0x1e4d72(_0x181848[_0x23a3d4(0x10b)][_0x23a3d4(0x10a)][_0x3b2ace],_0x1db0c1,_0x4a3ff9))[_0x23a3d4(0x111)](Boolean);return Object[_0x23a3d4(0xc4)](_0x181848[_0x23a3d4(0x10b)][_0x23a3d4(0x105)])[_0x23a3d4(0x113)](_0x5a5f4e=>{const _0x3394df=_0x23a3d4;this[_0x3394df(0x12c)][_0x3394df(0xfb)](_0x5a5f4e);}),_0x78646;}[_0x5aeff8(0x123)](_0x343f64){const _0x37bf03=_0x5aeff8;return{'id':_0x343f64['id'],'threadId':_0x343f64[_0x37bf03(0xee)],'ref':_0x343f64['ref']};}};_0x5e5b96=_0x2aa8e8([_0x396cd8(0x0,_0xf4f67d[_0x5aeff8(0xec)](_0x331a66[_0x5aeff8(0xc1)])),_0x396cd8(0x1,_0xf4f67d['Inject'](_0xf4f67d[_0x5aeff8(0xbf)])),_0x396cd8(0x2,_0xf4f67d[_0x5aeff8(0xec)](_0x27eb00[_0x5aeff8(0xc6)])),_0x396cd8(0x3,_0xf4f67d[_0x5aeff8(0xec)](_0xf4f67d[_0x5aeff8(0x118)]))],_0x5e5b96);var _0x1d13b9=Object[_0x5aeff8(0xc2)],_0x4ec1c8=Object[_0x5aeff8(0xff)],_0x5ec1e5=(_0x534ece,_0x30c4e0,_0x19d36e,_0x242597)=>{const _0x3a4742=_0x5aeff8;for(var _0x4e8c1a=_0x242597>0x1?void 0x0:_0x242597?_0x4ec1c8(_0x30c4e0,_0x19d36e):_0x30c4e0,_0x335cbe=_0x534ece[_0x3a4742(0x136)]-0x1,_0x4f6600;_0x335cbe>=0x0;_0x335cbe--)(_0x4f6600=_0x534ece[_0x335cbe])&&(_0x4e8c1a=(_0x242597?_0x4f6600(_0x30c4e0,_0x19d36e,_0x4e8c1a):_0x4f6600(_0x4e8c1a))||_0x4e8c1a);return _0x242597&&_0x4e8c1a&&_0x1d13b9(_0x30c4e0,_0x19d36e,_0x4e8c1a),_0x4e8c1a;},_0x38ecf5=(_0x493c9b,_0x192352)=>(_0x3e47b8,_0x148520)=>_0x192352(_0x3e47b8,_0x148520,_0x493c9b);let _0x33813d=class extends _0xf4f67d[_0x5aeff8(0x127)]{constructor(_0x404762,_0x5e6d38){const _0x7e4413=_0x5aeff8;super(),this[_0x7e4413(0x12e)]=_0x404762,this[_0x7e4413(0xbe)]=_0x5e6d38,this['_initDataSource']();}[_0x5aeff8(0xde)](){const _0x25b94d=_0x5aeff8;this[_0x25b94d(0x12e)][_0x25b94d(0x103)]=this[_0x25b94d(0xbe)],this[_0x25b94d(0x12e)][_0x25b94d(0xe5)]=!0x1;}};_0x33813d=_0x5ec1e5([_0x38ecf5(0x0,_0x32d206[_0x5aeff8(0xdb)]),_0x38ecf5(0x1,_0xf4f67d[_0x5aeff8(0xec)](_0x5e5b96))],_0x33813d);var _0x17c322=Object[_0x5aeff8(0xc2)],_0x20e5e8=Object[_0x5aeff8(0xff)],_0x43558e=(_0x3f2daa,_0x5ea24d,_0x1d1aa1)=>_0x5ea24d in _0x3f2daa?_0x17c322(_0x3f2daa,_0x5ea24d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1d1aa1}):_0x3f2daa[_0x5ea24d]=_0x1d1aa1,_0x2926bb=(_0x5cceb2,_0x420987,_0x1e6aab,_0x5464b9)=>{const _0x3edca0=_0x5aeff8;for(var _0x1da13a=_0x5464b9>0x1?void 0x0:_0x5464b9?_0x20e5e8(_0x420987,_0x1e6aab):_0x420987,_0x522934=_0x5cceb2[_0x3edca0(0x136)]-0x1,_0x19d42b;_0x522934>=0x0;_0x522934--)(_0x19d42b=_0x5cceb2[_0x522934])&&(_0x1da13a=(_0x5464b9?_0x19d42b(_0x420987,_0x1e6aab,_0x1da13a):_0x19d42b(_0x1da13a))||_0x1da13a);return _0x5464b9&&_0x1da13a&&_0x17c322(_0x420987,_0x1e6aab,_0x1da13a),_0x1da13a;},_0x58c35d=(_0x3d3f99,_0x1a3eb3)=>(_0x5298d4,_0x114857)=>_0x1a3eb3(_0x5298d4,_0x114857,_0x3d3f99),_0x11b0bb=(_0x200955,_0x46be30,_0x23348c)=>_0x43558e(_0x200955,typeof _0x46be30!=_0x5aeff8(0x13d)?_0x46be30+'':_0x46be30,_0x23348c);_0x192ce3[_0x5aeff8(0xfc)]=class extends _0xf4f67d[_0x5aeff8(0xd9)]{constructor(_0x2553ef=_0x35b116,_0x1dd615,_0x155c76){const _0x14c0e0=_0x5aeff8;super(),this['_config']=_0x2553ef,this[_0x14c0e0(0x10c)]=_0x1dd615,this['_configService']=_0x155c76;const {..._0xe04405}=this[_0x14c0e0(0xe8)];this['_configService'][_0x14c0e0(0xf1)](_0x2e3a69,_0xe04405);}[_0x5aeff8(0x100)](){const _0x4f2e66=_0x5aeff8;[[_0x5e5b96],[_0x33813d],[_0x45c1c8]][_0x4f2e66(0x113)](_0x2519ed=>{this['_injector']['add'](_0x2519ed);});}[_0x5aeff8(0x10d)](){const _0x12bf43=_0x5aeff8;this[_0x12bf43(0x10c)][_0x12bf43(0xe4)](_0x33813d),this[_0x12bf43(0x10c)]['get'](_0x45c1c8);}},_0x11b0bb(_0x192ce3[_0x5aeff8(0xfc)],_0x5aeff8(0x121),_0xc1db27),_0x11b0bb(_0x192ce3[_0x5aeff8(0xfc)],'type',_0xf4f67d['UniverInstanceType']['UNIVER_UNKNOWN']),_0x192ce3[_0x5aeff8(0xfc)]=_0x2926bb([_0xf4f67d['DependentOn'](_0x254044[_0x5aeff8(0xed)],_0x27eb00[_0x5aeff8(0x109)],_0x535dd6[_0x5aeff8(0x120)]),_0x58c35d(0x1,_0xf4f67d[_0x5aeff8(0xec)](_0xf4f67d[_0x5aeff8(0x118)])),_0x58c35d(0x2,_0xf4f67d['IConfigService'])],_0x192ce3[_0x5aeff8(0xfc)]),Object['defineProperty'](_0x192ce3,Symbol['toStringTag'],{'value':'Module'});}));
1
+ function _0x4823(_0x49b263,_0x6a64a3){const _0x3509f6=_0x3509();return _0x4823=function(_0x48233a,_0x2ec41f){_0x48233a=_0x48233a-0x95;let _0x86a3c0=_0x3509f6[_0x48233a];return _0x86a3c0;},_0x4823(_0x49b263,_0x6a64a3);}(function(_0x4b0f9f,_0x33d9da){const _0x5db975=_0x4823,_0x1f3629=_0x4b0f9f();while(!![]){try{const _0x4ba8a7=-parseInt(_0x5db975(0x105))/0x1+parseInt(_0x5db975(0xeb))/0x2*(-parseInt(_0x5db975(0x101))/0x3)+-parseInt(_0x5db975(0xaa))/0x4*(parseInt(_0x5db975(0xc9))/0x5)+parseInt(_0x5db975(0xde))/0x6+-parseInt(_0x5db975(0xcb))/0x7+-parseInt(_0x5db975(0xa3))/0x8+parseInt(_0x5db975(0xda))/0x9*(parseInt(_0x5db975(0xf9))/0xa);if(_0x4ba8a7===_0x33d9da)break;else _0x1f3629['push'](_0x1f3629['shift']());}catch(_0xd47a91){_0x1f3629['push'](_0x1f3629['shift']());}}}(_0x3509,0x368b3),function(_0x44875c,_0x4971e2){const _0x1dc060=_0x4823;typeof exports==_0x1dc060(0xf7)&&typeof module<'u'?_0x4971e2(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require(_0x1dc060(0xe2)),require(_0x1dc060(0x111)),require(_0x1dc060(0x10e)),require('rxjs'),require(_0x1dc060(0xdc))):typeof define==_0x1dc060(0x100)&&define[_0x1dc060(0xb9)]?define([_0x1dc060(0x102),_0x1dc060(0x10a),_0x1dc060(0xb6),_0x1dc060(0xe2),_0x1dc060(0x111),_0x1dc060(0x10e),_0x1dc060(0xe5),_0x1dc060(0xdc)],_0x4971e2):(_0x44875c=typeof globalThis<'u'?globalThis:_0x44875c||self,_0x4971e2(_0x44875c[_0x1dc060(0x9d)]={},_0x44875c['UniverProCollaborationClient'],_0x44875c[_0x1dc060(0xcf)],_0x44875c[_0x1dc060(0xa5)],_0x44875c[_0x1dc060(0x113)],_0x44875c['UniverThreadComment'],_0x44875c['rxjs'],_0x44875c[_0x1dc060(0xf4)]));}(this,function(_0xde41e2,_0x43b5b2,_0x38fe50,_0x54ea84,_0xd49683,_0x41244e,_0x5429a3,_0x1922e7){'use strict';const _0x4c6411=_0x4823;const _0x255023='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x3cbb46=(_0x393b31=>(_0x393b31[_0x393b31['OpenOrReOpen']=0x0]=_0x4c6411(0xa4),_0x393b31[_0x393b31[_0x4c6411(0xfa)]=0x1]='Solved',_0x393b31[_0x393b31[_0x4c6411(0x98)]=-0x1]=_0x4c6411(0x98),_0x393b31))(_0x3cbb46||{}),_0x1a524b=(_0x3fdc18=>(_0x3fdc18[_0x3fdc18[_0x4c6411(0xbd)]=0x0]=_0x4c6411(0xbd),_0x3fdc18[_0x3fdc18['Add']=0x1]=_0x4c6411(0x110),_0x3fdc18[_0x3fdc18[_0x4c6411(0xd3)]=0x2]=_0x4c6411(0xd3),_0x3fdc18[_0x3fdc18[_0x4c6411(0x115)]=0x3]=_0x4c6411(0x115),_0x3fdc18[_0x3fdc18[_0x4c6411(0xe0)]=0x4]=_0x4c6411(0xe0),_0x3fdc18[_0x3fdc18[_0x4c6411(0xf6)]=0x5]=_0x4c6411(0xf6),_0x3fdc18[_0x3fdc18[_0x4c6411(0x98)]=-0x1]=_0x4c6411(0x98),_0x3fdc18))(_0x1a524b||{});const _0x2e459d=_0x4a8be0=>_0x54ea84[_0x4c6411(0xa6)](new Date(+_0x4a8be0))[_0x4c6411(0xdb)](_0x4c6411(0xdd)),_0x15d7ce=async(_0x2b3a31,_0x143f44)=>{const _0x2fbb10=_0x4c6411,_0x53a121=_0x2b3a31[_0x2fbb10(0xb0)](_0x54ea84[_0x2fbb10(0x9a)]),_0x31eeba=_0x2b3a31['get'](_0x1922e7[_0x2fbb10(0x107)]);_0x143f44[_0x2fbb10(0xc2)](_0x46f2e0=>{const _0x59f07d=_0x2fbb10;_0x53a121[_0x59f07d(0x108)](_0x46f2e0)&&_0x143f44['delete'](_0x46f2e0);}),_0x143f44[_0x2fbb10(0xd4)]&&(await _0x31eeba[_0x2fbb10(0xb0)]('/universer-api/user/list',{'params':{'userIDs':[..._0x143f44]}}))[_0x2fbb10(0xe8)][_0x2fbb10(0xf8)][_0x2fbb10(0xc2)](_0x19d422=>{const _0x4e1251=_0x2fbb10;_0x19d422&&_0x53a121[_0x4e1251(0x9c)](_0x19d422);});};var _0x38c893=Object[_0x4c6411(0xfe)],_0x2148c8=Object[_0x4c6411(0xbc)],_0xda2291=(_0x5050a0,_0x381b95,_0x1f60a8,_0x1572b2)=>{const _0x13054e=_0x4c6411;for(var _0x3d3fe7=_0x1572b2>0x1?void 0x0:_0x1572b2?_0x2148c8(_0x381b95,_0x1f60a8):_0x381b95,_0x50f0c1=_0x5050a0[_0x13054e(0xe7)]-0x1,_0x2b391c;_0x50f0c1>=0x0;_0x50f0c1--)(_0x2b391c=_0x5050a0[_0x50f0c1])&&(_0x3d3fe7=(_0x1572b2?_0x2b391c(_0x381b95,_0x1f60a8,_0x3d3fe7):_0x2b391c(_0x3d3fe7))||_0x3d3fe7);return _0x1572b2&&_0x3d3fe7&&_0x38c893(_0x381b95,_0x1f60a8,_0x3d3fe7),_0x3d3fe7;},_0x12c4b2=(_0x81a651,_0x38a44a)=>(_0x3846b7,_0x3dc1bd)=>_0x38a44a(_0x3846b7,_0x3dc1bd,_0x81a651);let _0x2819c1=class extends _0x54ea84[_0x4c6411(0xe3)]{constructor(_0x1557f7,_0x53a243,_0x1dc828,_0x2815e0){const _0x29f6ed=_0x4c6411;super(),this['_commentService']=_0x1557f7,this[_0x29f6ed(0xb5)]=_0x53a243,this[_0x29f6ed(0x112)]=_0x1dc828,this[_0x29f6ed(0xf0)]=_0x2815e0,this[_0x29f6ed(0xc1)](),this['_initUserSync']();}[_0x4c6411(0xd5)](){const _0x3199c8=_0x4c6411;this['disposeWithMe'](this[_0x3199c8(0xb5)]['commentUpdate$'][_0x3199c8(0xce)](_0x5429a3['bufferTime'](0x10))[_0x3199c8(0xfb)](_0x1e399c=>{const _0x5945ea=_0x3199c8,_0x280572=new Set();_0x1e399c[_0x5945ea(0xc2)](_0x378f35=>{const _0x44b764=_0x5945ea;switch(_0x378f35[_0x44b764(0xef)]){case _0x44b764(0x9b):{const _0x375e8a=_0x378f35['payload'][_0x44b764(0x104)];_0x280572['add'](_0x375e8a);break;}}}),_0x15d7ce(this[_0x5945ea(0xf0)],_0x280572);}));}[_0x4c6411(0xc1)](){const _0x21dea1=_0x4c6411;this[_0x21dea1(0x109)](this[_0x21dea1(0xa0)]['commentUpdate$']['subscribe'](async _0x409da7=>{const _0x461e2e=_0x21dea1;var _0x3754f6,_0x59a55f,_0xbd15d2,_0x49ad82;const _0x46c214=(_0x3754f6=this[_0x461e2e(0xb5)]['getUnit'](_0x409da7[_0x461e2e(0xc6)])['find'](_0x109e13=>_0x109e13[_0x461e2e(0xdf)]===_0x409da7[_0x461e2e(0xdf)]))==null?void 0x0:_0x3754f6[_0x461e2e(0x103)];if(!_0x46c214)return;const {unitId:_0x26a30c,subUnitId:_0x3850b6}=_0x46c214;switch(_0x409da7[_0x461e2e(0xc3)]&&this[_0x461e2e(0x112)][_0x461e2e(0x9c)](_0x409da7[_0x461e2e(0xc3)]),_0x409da7[_0x461e2e(0xef)]){case _0x1a524b['Add']:break;case _0x1a524b['Reply']:{this[_0x461e2e(0xb5)][_0x461e2e(0x99)](_0x26a30c,_0x3850b6,{'unitId':_0x26a30c,'subUnitId':_0x3850b6,'ref':'','id':_0x409da7[_0x461e2e(0x106)],'dT':_0x2e459d(+_0x409da7[_0x461e2e(0x9f)]),'threadId':_0x409da7[_0x461e2e(0xdf)],'personId':(_0xbd15d2=(_0x59a55f=_0x409da7[_0x461e2e(0xc3)])==null?void 0x0:_0x59a55f[_0x461e2e(0x10b)])!=null?_0xbd15d2:_0x409da7[_0x461e2e(0xf2)],'text':JSON[_0x461e2e(0xea)](_0x409da7[_0x461e2e(0xff)]),'parentId':_0x46c214['id']});break;}case _0x1a524b[_0x461e2e(0xe0)]:{const _0xb78278=this[_0x461e2e(0xb5)]['getComment'](_0x26a30c,_0x3850b6,_0x409da7[_0x461e2e(0x106)]);_0xb78278&&_0xb78278[_0x461e2e(0xfc)]&&this['_threadCommentModel']['deleteComment'](_0x26a30c,_0x3850b6,_0x409da7[_0x461e2e(0x106)]);break;}case _0x1a524b[_0x461e2e(0x115)]:{this['_threadCommentModel']['updateComment'](_0x26a30c,_0x3850b6,{'commentId':_0x409da7[_0x461e2e(0x106)],'text':JSON[_0x461e2e(0xea)](_0x409da7['content'])});break;}case _0x1a524b[_0x461e2e(0xf6)]:{const _0x51075f=(_0x49ad82=this[_0x461e2e(0xb5)]['getUnit'](_0x409da7[_0x461e2e(0xc6)])[_0x461e2e(0xed)](_0x1bf183=>_0x1bf183['threadId']===_0x409da7[_0x461e2e(0xdf)]))==null?void 0x0:_0x49ad82['root'];_0x51075f&&this[_0x461e2e(0xb5)][_0x461e2e(0xbb)](_0x26a30c,_0x3850b6,_0x51075f['id'],_0x409da7[_0x461e2e(0xc7)]===_0x3cbb46[_0x461e2e(0xfa)]);break;}}}));}};_0x2819c1=_0xda2291([_0x12c4b2(0x0,_0x54ea84[_0x4c6411(0xd6)](_0x43b5b2[_0x4c6411(0xf5)])),_0x12c4b2(0x1,_0x54ea84[_0x4c6411(0xd6)](_0x41244e[_0x4c6411(0xb8)])),_0x12c4b2(0x2,_0x54ea84[_0x4c6411(0xd6)](_0x54ea84[_0x4c6411(0x9a)])),_0x12c4b2(0x3,_0x54ea84[_0x4c6411(0xd6)](_0x54ea84['Injector']))],_0x2819c1);const _0x3cb62b=_0x4c6411(0x96),_0x1b0e70={};var _0x1a729a=Object['defineProperty'],_0x24245c=Object[_0x4c6411(0xbc)],_0x3ad7f9=(_0x3945c0,_0x25d24d,_0x40ddf1,_0x3b4ab7)=>{const _0x2caaa8=_0x4c6411;for(var _0x5a787e=_0x3b4ab7>0x1?void 0x0:_0x3b4ab7?_0x24245c(_0x25d24d,_0x40ddf1):_0x25d24d,_0x1b8153=_0x3945c0[_0x2caaa8(0xe7)]-0x1,_0x38a57b;_0x1b8153>=0x0;_0x1b8153--)(_0x38a57b=_0x3945c0[_0x1b8153])&&(_0x5a787e=(_0x3b4ab7?_0x38a57b(_0x25d24d,_0x40ddf1,_0x5a787e):_0x38a57b(_0x5a787e))||_0x5a787e);return _0x3b4ab7&&_0x5a787e&&_0x1a729a(_0x25d24d,_0x40ddf1,_0x5a787e),_0x5a787e;},_0x3e9d43=(_0x212a1d,_0x20281d)=>(_0x26a3f0,_0x49e2b6)=>_0x20281d(_0x26a3f0,_0x49e2b6,_0x212a1d);function _0x5b220d(_0x5d3406,_0x58453b){const _0x51f6b7=_0x4c6411,_0x49118c=_0x5d3406[_0x51f6b7(0xd8)][0x0];return{..._0x58453b,'id':_0x49118c['replyId'],'resolved':_0x5d3406['solved']===0x1,'dT':_0x2e459d(_0x49118c[_0x51f6b7(0x9f)]),'personId':_0x49118c[_0x51f6b7(0xf2)],'threadId':_0x49118c[_0x51f6b7(0xdf)]};}function _0x13f964(_0x108903,_0x236edb,_0x1ea617){const _0x5328a8=_0x4c6411;var _0x1c5c4f,_0x247265;if(((_0x247265=(_0x1c5c4f=_0x108903==null?void 0x0:_0x108903[_0x5328a8(0xd8)])==null?void 0x0:_0x1c5c4f[_0x5328a8(0xe7)])!=null?_0x247265:0x0)>0x0){const _0x5c957b=(_0x1cf0ae,_0x19d219)=>({'id':_0x1cf0ae[_0x5328a8(0x106)],'threadId':_0x1cf0ae['threadId'],'dT':_0x2e459d(_0x1cf0ae[_0x5328a8(0x9f)]),'personId':_0x1cf0ae['userId'],'resolved':_0x108903['solved']===_0x3cbb46[_0x5328a8(0xfa)],'unitId':_0x236edb,'subUnitId':_0x1ea617,'text':JSON[_0x5328a8(0xea)](_0x1cf0ae['content']),'parentId':_0x19d219}),_0x32b217=_0x5c957b(_0x108903[_0x5328a8(0xd8)][0x0]);return{..._0x32b217,'children':_0x108903[_0x5328a8(0xd8)][_0x5328a8(0x95)](0x1)[_0x5328a8(0xad)](_0x3214ca=>_0x5c957b(_0x3214ca,_0x32b217['id']))};}return null;}let _0xc24cd2=class{constructor(_0x30ab85,_0x23e658,_0x407601,_0x575e24){const _0x5249dd=_0x4c6411;this[_0x5249dd(0xfd)]=_0x30ab85,this[_0x5249dd(0x112)]=_0x23e658,this[_0x5249dd(0xa7)]=_0x407601,this[_0x5249dd(0xf0)]=_0x575e24;}async[_0x4c6411(0x99)](_0x2dbb18){const _0x52dd20=_0x4c6411;var _0x3f052a,_0x4594aa;const {parentId:_0x20778c,unitId:_0x4b320c,text:_0x54038d,threadId:_0x5f0a30}=_0x2dbb18,_0x2c8734=(_0x4594aa=(_0x3f052a=_0x54038d[_0x52dd20(0xba)])==null?void 0x0:_0x3f052a[_0x52dd20(0xa9)](_0x496795=>_0x496795[_0x52dd20(0xb7)]===_0x54ea84[_0x52dd20(0x114)][_0x52dd20(0xd2)])['map'](_0x55e066=>_0x55e066[_0x52dd20(0xe1)]))!=null?_0x4594aa:[],_0x2ba3c4=JSON[_0x52dd20(0xb4)](_0x54038d),_0x18bf36=(await this[_0x52dd20(0xa7)][_0x52dd20(0x10d)](_0x4b320c))['getMemberID']();if(_0x20778c){const _0x3324d0={'memberId':_0x18bf36,'unitId':_0x4b320c,'content':_0x2ba3c4,'mention':_0x2c8734,'threadId':_0x5f0a30},_0x17b12d=(await this[_0x52dd20(0xfd)]['post']('/universer-api/comment/unit/'+_0x4b320c+_0x52dd20(0xf3),{'body':_0x3324d0}))[_0x52dd20(0xe8)][_0x52dd20(0xbf)];return{..._0x2dbb18,'id':_0x17b12d[_0x52dd20(0x106)],'dT':_0x54ea84['dayjs'](+_0x17b12d[_0x52dd20(0x9f)])[_0x52dd20(0xdb)](_0x52dd20(0xdd)),'personId':_0x17b12d['userId']};}else{const _0xb48de2={'memberId':_0x18bf36,'unitId':_0x4b320c,'content':_0x2ba3c4,'mention':_0x2c8734},_0x15c975=await this[_0x52dd20(0xfd)][_0x52dd20(0xaf)](_0x52dd20(0xab)+_0x4b320c+_0x52dd20(0xd1),{'body':_0xb48de2});return _0x5b220d(_0x15c975['body'][_0x52dd20(0xd7)],_0x2dbb18);}}async[_0x4c6411(0x97)](_0x5b11a9){const _0x5ebf90=_0x4c6411;var _0x284654,_0x19d25c;const {text:_0x5e5123,unitId:_0x4f94e4}=_0x5b11a9,_0x16b415=(_0x19d25c=(_0x284654=_0x5e5123['customRanges'])==null?void 0x0:_0x284654['filter'](_0x2a703c=>_0x2a703c[_0x5ebf90(0xb7)]===_0x54ea84['CustomRangeType'][_0x5ebf90(0xd2)])[_0x5ebf90(0xad)](_0x10caa7=>_0x10caa7[_0x5ebf90(0xe1)]))!=null?_0x19d25c:[],_0x7c5394=JSON[_0x5ebf90(0xb4)](_0x5e5123),_0x5c6ad1=_0x5b11a9[_0x5ebf90(0xdf)],_0x1e3397=_0x5b11a9['id'],_0x432a17={'memberId':(await this[_0x5ebf90(0xa7)][_0x5ebf90(0x10d)](_0x4f94e4))[_0x5ebf90(0xd9)](),'unitId':_0x4f94e4,'threadId':_0x5c6ad1,'mention':_0x16b415,'content':_0x7c5394,'replyId':_0x1e3397},_0x5e8968=await this['_httpService'][_0x5ebf90(0xaf)]('/universer-api/comment/unit/'+_0x4f94e4+_0x5ebf90(0xe6),{'body':_0x432a17});return!_0x5e8968[_0x5ebf90(0xe8)][_0x5ebf90(0xb3)]||_0x5e8968[_0x5ebf90(0xe8)][_0x5ebf90(0xb3)][_0x5ebf90(0xa8)]===0x1;}async['resolveComment'](_0x48169b){const _0x163e0b=_0x4c6411,{unitId:_0x1e1ee9}=_0x48169b,_0x5cb801=_0x48169b[_0x163e0b(0xdf)],_0x5d325f={'memberId':this[_0x163e0b(0x112)]['getCurrentUser']()[_0x163e0b(0x10b)],'unitId':_0x1e1ee9,'threadId':_0x5cb801,'solved':_0x48169b[_0x163e0b(0xc4)]?_0x3cbb46['Solved']:_0x3cbb46[_0x163e0b(0xa4)]},_0x2c4462=await this[_0x163e0b(0xfd)]['post'](_0x163e0b(0xab)+_0x1e1ee9+'/solved',{'body':_0x5d325f});return!_0x2c4462[_0x163e0b(0xe8)][_0x163e0b(0xb3)]||_0x2c4462[_0x163e0b(0xe8)][_0x163e0b(0xb3)][_0x163e0b(0xa8)]===0x1;}async[_0x4c6411(0xee)](_0x1a403c,_0x25e57b,_0x5f0be8,_0x176dac){const _0x5b2dc4=_0x4c6411,_0xc9d66b={'memberId':(await this[_0x5b2dc4(0xa7)][_0x5b2dc4(0x10d)](_0x1a403c))[_0x5b2dc4(0xd9)](),'threadId':_0x5f0be8,'replyId':_0x176dac,'unitId':_0x1a403c},_0x194f6c=await this[_0x5b2dc4(0xfd)]['post'](_0x5b2dc4(0xab)+_0x1a403c+_0x5b2dc4(0xae),{'body':_0xc9d66b});return!_0x194f6c[_0x5b2dc4(0xe8)][_0x5b2dc4(0xb3)]||_0x194f6c['body'][_0x5b2dc4(0xb3)]['code']===0x1;}async[_0x4c6411(0xe9)](_0x17b375,_0x3b526f,_0x2ef479){const _0x41241e=_0x4c6411,_0x3f1d01={'unitId':_0x17b375,'threadId':_0x2ef479},_0x239780=await this[_0x41241e(0xfd)][_0x41241e(0xaf)](_0x41241e(0xab)+_0x17b375+'/list',{'body':_0x3f1d01}),_0x55e09c=_0x2ef479[_0x41241e(0xad)](_0x14682c=>_0x13f964(_0x239780[_0x41241e(0xe8)][_0x41241e(0xa1)][_0x14682c],_0x17b375,_0x3b526f))[_0x41241e(0xa9)](Boolean);return Object['values'](_0x239780[_0x41241e(0xe8)][_0x41241e(0xf8)])[_0x41241e(0xc2)](_0x408b23=>{const _0x47f370=_0x41241e;this[_0x47f370(0x112)][_0x47f370(0x9c)](_0x408b23);}),_0x55e09c;}[_0x4c6411(0xcc)](_0x2bf736){const _0x2a4185=_0x4c6411;return{'id':_0x2bf736['id'],'threadId':_0x2bf736[_0x2a4185(0xdf)],'ref':_0x2bf736[_0x2a4185(0xf1)]};}};_0xc24cd2=_0x3ad7f9([_0x3e9d43(0x0,_0x54ea84[_0x4c6411(0xd6)](_0x1922e7[_0x4c6411(0x107)])),_0x3e9d43(0x1,_0x54ea84[_0x4c6411(0xd6)](_0x54ea84['UserManagerService'])),_0x3e9d43(0x2,_0x54ea84[_0x4c6411(0xd6)](_0x43b5b2['CollaborationSessionService'])),_0x3e9d43(0x3,_0x54ea84[_0x4c6411(0xd6)](_0x54ea84['Injector']))],_0xc24cd2);var _0x3baf8f=Object[_0x4c6411(0xfe)],_0x50b201=Object[_0x4c6411(0xbc)],_0x57af0c=(_0x38593b,_0x140745,_0x28c39c,_0x4f98c2)=>{const _0x4dcb3d=_0x4c6411;for(var _0x289db8=_0x4f98c2>0x1?void 0x0:_0x4f98c2?_0x50b201(_0x140745,_0x28c39c):_0x140745,_0x1a03c6=_0x38593b[_0x4dcb3d(0xe7)]-0x1,_0x73e6b7;_0x1a03c6>=0x0;_0x1a03c6--)(_0x73e6b7=_0x38593b[_0x1a03c6])&&(_0x289db8=(_0x4f98c2?_0x73e6b7(_0x140745,_0x28c39c,_0x289db8):_0x73e6b7(_0x289db8))||_0x289db8);return _0x4f98c2&&_0x289db8&&_0x3baf8f(_0x140745,_0x28c39c,_0x289db8),_0x289db8;},_0x2ea5d8=(_0x39c57a,_0x217720)=>(_0x4ca3cb,_0x5e03ae)=>_0x217720(_0x4ca3cb,_0x5e03ae,_0x39c57a);let _0x57a803=class extends _0x54ea84[_0x4c6411(0xe3)]{constructor(_0xcbbf3d,_0x1edde3){const _0x4232ba=_0x4c6411;super(),this[_0x4232ba(0x10c)]=_0xcbbf3d,this[_0x4232ba(0xb2)]=_0x1edde3,this[_0x4232ba(0xb1)]();}['_initDataSource'](){const _0x5492a9=_0x4c6411;this[_0x5492a9(0x10c)][_0x5492a9(0xa2)]=this[_0x5492a9(0xb2)],this[_0x5492a9(0x10c)]['syncUpdateMutationToColla']=!0x1;}};_0x57a803=_0x57af0c([_0x2ea5d8(0x0,_0x41244e['IThreadCommentDataSourceService']),_0x2ea5d8(0x1,_0x54ea84[_0x4c6411(0xd6)](_0xc24cd2))],_0x57a803);var _0x365654=Object[_0x4c6411(0xfe)],_0x4c0e54=Object[_0x4c6411(0xbc)],_0x3935e2=(_0x1b1426,_0x11fa9c,_0x55993b)=>_0x11fa9c in _0x1b1426?_0x365654(_0x1b1426,_0x11fa9c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x55993b}):_0x1b1426[_0x11fa9c]=_0x55993b,_0x59a5f8=(_0x7f7692,_0x56e6a3,_0x2d56e3,_0x4d70d2)=>{const _0x24ce9b=_0x4c6411;for(var _0x49b4be=_0x4d70d2>0x1?void 0x0:_0x4d70d2?_0x4c0e54(_0x56e6a3,_0x2d56e3):_0x56e6a3,_0x3eb05c=_0x7f7692[_0x24ce9b(0xe7)]-0x1,_0x4d0bcd;_0x3eb05c>=0x0;_0x3eb05c--)(_0x4d0bcd=_0x7f7692[_0x3eb05c])&&(_0x49b4be=(_0x4d70d2?_0x4d0bcd(_0x56e6a3,_0x2d56e3,_0x49b4be):_0x4d0bcd(_0x49b4be))||_0x49b4be);return _0x4d70d2&&_0x49b4be&&_0x365654(_0x56e6a3,_0x2d56e3,_0x49b4be),_0x49b4be;},_0x20f1e4=(_0xc6c883,_0x3f569b)=>(_0x161ac6,_0x2c55d7)=>_0x3f569b(_0x161ac6,_0x2c55d7,_0xc6c883),_0x3c35ea=(_0x4fbf83,_0x35f180,_0x272090)=>_0x3935e2(_0x4fbf83,typeof _0x35f180!=_0x4c6411(0x9e)?_0x35f180+'':_0x35f180,_0x272090);_0xde41e2[_0x4c6411(0xec)]=class extends _0x54ea84['Plugin']{constructor(_0x577b49=_0x1b0e70,_0x1a7a3a,_0x3e6efe){const _0x25ad56=_0x4c6411;super(),this[_0x25ad56(0xc8)]=_0x577b49,this[_0x25ad56(0xf0)]=_0x1a7a3a,this['_configService']=_0x3e6efe;const {..._0x4a9c32}=this[_0x25ad56(0xc8)];this[_0x25ad56(0xe4)]['setConfig'](_0x3cb62b,_0x4a9c32);}[_0x4c6411(0xc0)](){[[_0xc24cd2],[_0x57a803],[_0x2819c1]]['forEach'](_0xa01b24=>{const _0x1b08c1=_0x4823;this[_0x1b08c1(0xf0)]['add'](_0xa01b24);});}[_0x4c6411(0xcd)](){const _0x252d3b=_0x4c6411;this['_injector'][_0x252d3b(0xb0)](_0x57a803),this[_0x252d3b(0xf0)]['get'](_0x2819c1);}},_0x3c35ea(_0xde41e2[_0x4c6411(0xec)],'pluginName',_0x255023),_0x3c35ea(_0xde41e2[_0x4c6411(0xec)],_0x4c6411(0xef),_0x54ea84[_0x4c6411(0xca)][_0x4c6411(0xbe)]),_0xde41e2[_0x4c6411(0xec)]=_0x59a5f8([_0x54ea84[_0x4c6411(0xac)](_0xd49683[_0x4c6411(0xc5)],_0x43b5b2['UniverCollaborationClientPlugin'],_0x38fe50[_0x4c6411(0xd0)]),_0x20f1e4(0x1,_0x54ea84[_0x4c6411(0xd6)](_0x54ea84['Injector'])),_0x20f1e4(0x2,_0x54ea84['IConfigService'])],_0xde41e2[_0x4c6411(0xec)]),Object[_0x4c6411(0xfe)](_0xde41e2,Symbol[_0x4c6411(0x10f)],{'value':'Module'});}));function _0x3509(){const _0x3af52f=['reply','onStarting','_init','forEach','user','resolved','UniverThreadCommentUIPlugin','unitId','solved','_config','5Pupmjw','UniverInstanceType','453572jqwEZe','saveCommentToSnapshot','onReady','pipe','UniverProLicense','UniverLicensePlugin','/add','COMMENT','Reply','size','_initUserSync','Inject','comment','replies','getMemberID','54tNupoU','format','@univerjs/network','YYYY/MM/DD\x20HH:mm','1681212eEgCNq','threadId','Delete','rangeId','@univerjs/core','Disposable','_configService','rxjs','/edit','length','body','listComments','parse','1506bmbTjh','UniverThreadCommentDataSourcePlugin','find','deleteComment','type','_injector','ref','userId','/reply','UniverNetwork','CommentService','Solve','object','users','2098300VmKaGb','Solved','subscribe','parentId','_httpService','defineProperty','content','function','1113jtODZI','exports','root','personId','431055HEorUx','replyId','HTTPService','getUser','disposeWithMe','@univerjs-pro/collaboration-client','userID','_threadCommentDataSourceService','requireSession','@univerjs/thread-comment','toStringTag','Add','@univerjs/thread-comment-ui','_userService','UniverThreadCommentUi','CustomRangeType','Edit','slice','thread-comment-data-source.config','updateComment','UNRECOGNIZED','addComment','UserManagerService','add','addUser','UniverProThreadCommentDatasource','symbol','createTimestamp','_commentService','comments','dataSource','2871288qqpVyI','OpenOrReOpen','UniverCore','dayjs','_sessionService','code','filter','726584VqDmIF','/universer-api/comment/unit/','DependentOn','map','/delete','post','get','_initDataSource','_threadCommentDataSource','error','stringify','_threadCommentModel','@univerjs-pro/license','rangeType','ThreadCommentModel','amd','customRanges','resolveComment','getOwnPropertyDescriptor','Unknown','UNIVER_UNKNOWN'];_0x3509=function(){return _0x3af52f;};return _0x3509();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.5.0",
3
+ "version": "0.5.1-nightly.202412011605",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.5.0",
49
- "@univerjs-pro/license": "0.5.0",
50
- "@univerjs/core": "0.5.0",
51
- "@univerjs/network": "0.5.0",
52
- "@univerjs/protocol": "0.1.39-alpha.45",
53
- "@univerjs/thread-comment": "0.5.0",
54
- "@univerjs/thread-comment-ui": "0.5.0"
48
+ "@univerjs-pro/collaboration-client": "0.5.1-nightly.202412011605",
49
+ "@univerjs/core": "0.5.1-nightly.202412011605",
50
+ "@univerjs/network": "0.5.1-nightly.202412011605",
51
+ "@univerjs/protocol": "0.1.39",
52
+ "@univerjs-pro/license": "0.5.1-nightly.202412011605",
53
+ "@univerjs/thread-comment-ui": "0.5.1-nightly.202412011605",
54
+ "@univerjs/thread-comment": "0.5.1-nightly.202412011605"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",
58
- "typescript": "^5.6.3",
59
- "vite": "^5.4.11",
60
- "vitest": "^2.1.5",
61
- "@univerjs-infra/shared": "0.5.0"
58
+ "typescript": "^5.7.2",
59
+ "vite": "^6.0.0",
60
+ "vitest": "^2.1.6",
61
+ "@univerjs-infra/shared": "0.5.1"
62
62
  },
63
63
  "space": {
64
64
  ".": {