@univerjs-pro/thread-comment-datasource 0.10.11 → 0.10.12-nightly.202510251119
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x2af2cb=_0x4d4d;(function(_0x28b6b7,_0x21e397){const _0x2edd68=_0x4d4d,_0x138ed5=_0x28b6b7();while(!![]){try{const _0x1ded68=parseInt(_0x2edd68(0xc2))/0x1*(parseInt(_0x2edd68(0x7c))/0x2)+parseInt(_0x2edd68(0xe0))/0x3*(-parseInt(_0x2edd68(0xbe))/0x4)+-parseInt(_0x2edd68(0xc9))/0x5*(-parseInt(_0x2edd68(0x7d))/0x6)+parseInt(_0x2edd68(0x79))/0x7*(parseInt(_0x2edd68(0xcc))/0x8)+parseInt(_0x2edd68(0x6c))/0x9*(parseInt(_0x2edd68(0x6d))/0xa)+parseInt(_0x2edd68(0xd4))/0xb+-parseInt(_0x2edd68(0xce))/0xc;if(_0x1ded68===_0x21e397)break;else _0x138ed5['push'](_0x138ed5['shift']());}catch(_0x31ee19){_0x138ed5['push'](_0x138ed5['shift']());}}}(_0x373b,0xe1646));function _0x373b(){const _0x260bc7=['_initUserSync','syncUpdateMutationToColla','content','UniverInstanceType','_sessionService','userId','requireSession','body','CustomRangeType','_threadCommentDataSource','comments','287vQJPYY','deleteComment','Edit','136sNGkHM','46338WiQTcJ','type','forEach','delete','_init','getUnit','UNRECOGNIZED','UniverThreadCommentUIPlugin','ref','saveCommentToSnapshot','root','values','YYYY/MM/DD\x20HH:mm','COMMENT','map','replies','pluginName','listComments','addComment','/reply','Unknown','bufferTime','Inject','UniverThreadCommentDataSourcePlugin','subscribe','dataSource','replyId','IThreadCommentDataSourceService','_initDataSource','payload','users','stringify','HTTPService','rangeId','createTimestamp','slice','UniverCollaborationClientPlugin','getMemberID','OpenOrReOpen','get','pipe','IConfigService','onReady','defineProperty','Delete','CommentService','commentUpdate$','Solve','disposeWithMe','user','DependentOn','code','post','Module','thread-comment-data-source.config','_config','addUser','error','/delete','_httpService','Add','/universer-api/comment/unit/','/universer-api/user/list','find','filter','5815328gVaXTC','UNIVER_UNKNOWN','threadId','getOwnPropertyDescriptor','18399fDyxtG','rangeType','getComment','_commentService','dayjs','Plugin','_userService','245lcCWpR','onStarting','setConfig','85336iInKFZ','Disposable','9592200MwwlRW','solved','symbol','parentId','format','ThreadCommentModel','5693094qvyKuD','/add','userID','length','Reply','getCurrentUser','_injector','_configService','_threadCommentModel','Injector','/edit','add','3wRmbZy','comment','getUser','UniverLicensePlugin','parse','UserManagerService','unitId','updateComment','_threadCommentDataSourceService','toStringTag','customRanges','Solved','reply','36XMCGRq','1479820uVimkK'];_0x373b=function(){return _0x260bc7;};return _0x373b();}Object[_0x2af2cb(0xa8)](exports,Symbol[_0x2af2cb(0x68)],{'value':_0x2af2cb(0xb2)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0x4d4d(_0x2d45af,_0x12f1d8){const _0x373b4c=_0x373b();return _0x4d4d=function(_0x4d4dce,_0x1fcf79){_0x4d4dce=_0x4d4dce-0x65;let _0xba2dad=_0x373b4c[_0x4d4dce];return _0xba2dad;},_0x4d4d(_0x2d45af,_0x12f1d8);}var I=(_0x24dc29=>(_0x24dc29[_0x24dc29[_0x2af2cb(0xa3)]=0x0]='OpenOrReOpen',_0x24dc29[_0x24dc29['Solved']=0x1]=_0x2af2cb(0x6a),_0x24dc29[_0x24dc29['UNRECOGNIZED']=-0x1]=_0x2af2cb(0x83),_0x24dc29))(I||{}),v=(_0xad705a=>(_0xad705a[_0xad705a[_0x2af2cb(0x91)]=0x0]=_0x2af2cb(0x91),_0xad705a[_0xad705a[_0x2af2cb(0xb9)]=0x1]=_0x2af2cb(0xb9),_0xad705a[_0xad705a[_0x2af2cb(0xd8)]=0x2]=_0x2af2cb(0xd8),_0xad705a[_0xad705a[_0x2af2cb(0x7b)]=0x3]='Edit',_0xad705a[_0xad705a[_0x2af2cb(0xa9)]=0x4]=_0x2af2cb(0xa9),_0xad705a[_0xad705a[_0x2af2cb(0xac)]=0x5]=_0x2af2cb(0xac),_0xad705a[_0xad705a[_0x2af2cb(0x83)]=-0x1]=_0x2af2cb(0x83),_0xad705a))(v||{});const f=_0x530927=>c['dayjs'](new Date(+_0x530927))[_0x2af2cb(0xd2)](_0x2af2cb(0x89)),R=async(_0x34e933,_0x223e8b)=>{const _0x3ae071=_0x2af2cb,_0x376b07=_0x34e933[_0x3ae071(0xa4)](c[_0x3ae071(0xe5)]),_0x47c40b=_0x34e933[_0x3ae071(0xa4)](P['HTTPService']);_0x223e8b['forEach'](_0x3f89f0=>{const _0x1ab2eb=_0x3ae071;_0x376b07[_0x1ab2eb(0xe2)](_0x3f89f0)&&_0x223e8b[_0x1ab2eb(0x80)](_0x3f89f0);}),_0x223e8b['size']&&(await _0x47c40b[_0x3ae071(0xa4)](_0x3ae071(0xbb),{'params':{'userIDs':[..._0x223e8b]}}))[_0x3ae071(0x75)]['users'][_0x3ae071(0x7f)](_0x2a7bed=>{const _0x1c15ba=_0x3ae071;_0x2a7bed&&_0x376b07[_0x1c15ba(0xb5)](_0x2a7bed);});};var $=Object[_0x2af2cb(0xc1)],E=(_0xb30ae4,_0x13fe40,_0x489945,_0xc7fb35)=>{const _0x54a16b=_0x2af2cb;for(var _0x5ed41a=_0xc7fb35>0x1?void 0x0:_0xc7fb35?$(_0x13fe40,_0x489945):_0x13fe40,_0x5672c0=_0xb30ae4[_0x54a16b(0xd7)]-0x1,_0x69e446;_0x5672c0>=0x0;_0x5672c0--)(_0x69e446=_0xb30ae4[_0x5672c0])&&(_0x5ed41a=_0x69e446(_0x5ed41a)||_0x5ed41a);return _0x5ed41a;},S=(_0xcfbbcf,_0x1d4cc4)=>(_0x1f824e,_0x7848c)=>_0x1d4cc4(_0x1f824e,_0x7848c,_0xcfbbcf);let _=class extends c[_0x2af2cb(0xcd)]{constructor(_0x370162,_0x1f5345,_0x3748f9,_0x14e189){const _0x1c2e75=_0x2af2cb;super(),this[_0x1c2e75(0xc5)]=_0x370162,this['_threadCommentModel']=_0x1f5345,this[_0x1c2e75(0xc8)]=_0x3748f9,this[_0x1c2e75(0xda)]=_0x14e189,this[_0x1c2e75(0x81)](),this['_initUserSync']();}[_0x2af2cb(0x6e)](){const _0x36a820=_0x2af2cb;this[_0x36a820(0xad)](this[_0x36a820(0xdc)][_0x36a820(0xab)][_0x36a820(0xa5)](j[_0x36a820(0x92)](0x10))[_0x36a820(0x95)](_0x4de095=>{const _0x535e52=_0x36a820,_0x3c8e06=new Set();_0x4de095[_0x535e52(0x7f)](_0x29112c=>{const _0x1e78d2=_0x535e52;switch(_0x29112c[_0x1e78d2(0x7e)]){case _0x1e78d2(0xdf):{const _0x154e62=_0x29112c[_0x1e78d2(0x9a)]['personId'];_0x3c8e06[_0x1e78d2(0xdf)](_0x154e62);break;}}}),R(this[_0x535e52(0xda)],_0x3c8e06);}));}[_0x2af2cb(0x81)](){const _0x3ed675=_0x2af2cb;this[_0x3ed675(0xad)](this[_0x3ed675(0xc5)]['commentUpdate$']['subscribe'](async _0x4a03ea=>{const _0x1e11eb=_0x3ed675;var _0x24bcdf,_0x4a9780,_0x31ec81,_0xb5cda7;const _0x3c68d2=(_0x24bcdf=this[_0x1e11eb(0xdc)][_0x1e11eb(0x82)](_0x4a03ea['unitId'])['find'](_0xb90487=>_0xb90487[_0x1e11eb(0xc0)]===_0x4a03ea[_0x1e11eb(0xc0)]))==null?void 0x0:_0x24bcdf[_0x1e11eb(0x87)];if(!_0x3c68d2)return;const {unitId:_0x6e0c22,subUnitId:_0x19ae3f}=_0x3c68d2;switch(_0x4a03ea[_0x1e11eb(0xae)]&&this[_0x1e11eb(0xc8)][_0x1e11eb(0xb5)](_0x4a03ea['user']),_0x4a03ea[_0x1e11eb(0x7e)]){case v[_0x1e11eb(0xb9)]:break;case v[_0x1e11eb(0xd8)]:{this[_0x1e11eb(0xdc)][_0x1e11eb(0x8f)](_0x6e0c22,_0x19ae3f,{'unitId':_0x6e0c22,'subUnitId':_0x19ae3f,'ref':'','id':_0x4a03ea[_0x1e11eb(0x97)],'dT':f(+_0x4a03ea[_0x1e11eb(0x9f)]),'threadId':_0x4a03ea[_0x1e11eb(0xc0)],'personId':(_0x31ec81=(_0x4a9780=_0x4a03ea[_0x1e11eb(0xae)])==null?void 0x0:_0x4a9780[_0x1e11eb(0xd6)])!=null?_0x31ec81:_0x4a03ea[_0x1e11eb(0x73)],'text':JSON['parse'](_0x4a03ea[_0x1e11eb(0x70)]),'parentId':_0x3c68d2['id']});break;}case v[_0x1e11eb(0xa9)]:{const _0x314460=this[_0x1e11eb(0xdc)][_0x1e11eb(0xc4)](_0x6e0c22,_0x19ae3f,_0x4a03ea[_0x1e11eb(0x97)]);_0x314460&&_0x314460[_0x1e11eb(0xd1)]&&this[_0x1e11eb(0xdc)][_0x1e11eb(0x7a)](_0x6e0c22,_0x19ae3f,_0x4a03ea[_0x1e11eb(0x97)]);break;}case v[_0x1e11eb(0x7b)]:{this[_0x1e11eb(0xdc)][_0x1e11eb(0x66)](_0x6e0c22,_0x19ae3f,{'commentId':_0x4a03ea['replyId'],'text':JSON[_0x1e11eb(0xe4)](_0x4a03ea[_0x1e11eb(0x70)])});break;}case v['Solve']:{const _0x4b6d04=(_0xb5cda7=this['_threadCommentModel']['getUnit'](_0x4a03ea[_0x1e11eb(0x65)])[_0x1e11eb(0xbc)](_0xcafd3e=>_0xcafd3e[_0x1e11eb(0xc0)]===_0x4a03ea[_0x1e11eb(0xc0)]))==null?void 0x0:_0xb5cda7['root'];_0x4b6d04&&this[_0x1e11eb(0xdc)]['resolveComment'](_0x6e0c22,_0x19ae3f,_0x4b6d04['id'],_0x4a03ea[_0x1e11eb(0xcf)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x2af2cb(0x93)](b[_0x2af2cb(0xaa)])),S(0x1,c['Inject'](M[_0x2af2cb(0xd3)])),S(0x2,c['Inject'](c[_0x2af2cb(0xe5)])),S(0x3,c[_0x2af2cb(0x93)](c[_0x2af2cb(0xdd)]))],_);const q=_0x2af2cb(0xb3),D={};var A=Object[_0x2af2cb(0xc1)],x=(_0x1547ea,_0x2ded7e,_0x3bf4e4,_0x480a83)=>{for(var _0x1a217d=_0x480a83>0x1?void 0x0:_0x480a83?A(_0x2ded7e,_0x3bf4e4):_0x2ded7e,_0x2acea2=_0x1547ea['length']-0x1,_0x3ca1ed;_0x2acea2>=0x0;_0x2acea2--)(_0x3ca1ed=_0x1547ea[_0x2acea2])&&(_0x1a217d=_0x3ca1ed(_0x1a217d)||_0x1a217d);return _0x1a217d;},C=(_0x365634,_0x5de135)=>(_0x8b8863,_0x42bd38)=>_0x5de135(_0x8b8863,_0x42bd38,_0x365634);function Y(_0xa13a82,_0x253f5d){const _0x5e1c62=_0x2af2cb,_0xe894a5=_0xa13a82[_0x5e1c62(0x8c)][0x0];return{..._0x253f5d,'id':_0xe894a5[_0x5e1c62(0x97)],'resolved':_0xa13a82[_0x5e1c62(0xcf)]===0x1,'dT':f(_0xe894a5[_0x5e1c62(0x9f)]),'personId':_0xe894a5[_0x5e1c62(0x73)],'threadId':_0xe894a5[_0x5e1c62(0xc0)]};}function G(_0x4a1310,_0x36ae32,_0xb30ac7){const _0x333640=_0x2af2cb;var _0x15176b,_0x3be48a;if(((_0x3be48a=(_0x15176b=_0x4a1310==null?void 0x0:_0x4a1310[_0x333640(0x8c)])==null?void 0x0:_0x15176b['length'])!=null?_0x3be48a:0x0)>0x0){const _0xdb899e=(_0x298b0d,_0x134033)=>({'id':_0x298b0d[_0x333640(0x97)],'threadId':_0x298b0d[_0x333640(0xc0)],'dT':f(_0x298b0d[_0x333640(0x9f)]),'personId':_0x298b0d['userId'],'resolved':_0x4a1310[_0x333640(0xcf)]===I[_0x333640(0x6a)],'unitId':_0x36ae32,'subUnitId':_0xb30ac7,'text':JSON['parse'](_0x298b0d[_0x333640(0x70)]),'parentId':_0x134033}),_0x215389=_0xdb899e(_0x4a1310['replies'][0x0]);return{..._0x215389,'children':_0x4a1310['replies'][_0x333640(0xa0)](0x1)[_0x333640(0x8b)](_0x2b369f=>_0xdb899e(_0x2b369f,_0x215389['id']))};}return null;}let p=class{constructor(_0x2db18b,_0x5c3bc5,_0x5363e7){const _0x1295f5=_0x2af2cb;this[_0x1295f5(0xb8)]=_0x2db18b,this[_0x1295f5(0xc8)]=_0x5c3bc5,this[_0x1295f5(0x72)]=_0x5363e7;}async[_0x2af2cb(0x8f)](_0x2d5954){const _0x248d9c=_0x2af2cb;var _0x1bd41e,_0x3a7df0;const {parentId:_0x44e4e,unitId:_0x472cc4,text:_0x55f6e5,threadId:_0x4131ff}=_0x2d5954,_0x209b89=(_0x3a7df0=(_0x1bd41e=_0x55f6e5[_0x248d9c(0x69)])==null?void 0x0:_0x1bd41e[_0x248d9c(0xbd)](_0x149e52=>_0x149e52[_0x248d9c(0xc3)]===c[_0x248d9c(0x76)]['COMMENT'])[_0x248d9c(0x8b)](_0x792034=>_0x792034[_0x248d9c(0x9e)]))!=null?_0x3a7df0:[],_0x1cf80b=JSON[_0x248d9c(0x9c)](_0x55f6e5),_0x427f4d=(await this['_sessionService'][_0x248d9c(0x74)](_0x472cc4))[_0x248d9c(0xa2)]();if(_0x44e4e){const _0x2207d0={'memberId':_0x427f4d,'unitId':_0x472cc4,'content':_0x1cf80b,'mention':_0x209b89,'threadId':_0x4131ff},_0x14c10a=(await this['_httpService'][_0x248d9c(0xb1)](_0x248d9c(0xba)+_0x472cc4+_0x248d9c(0x90),{'body':_0x2207d0}))[_0x248d9c(0x75)][_0x248d9c(0x6b)];return{..._0x2d5954,'id':_0x14c10a[_0x248d9c(0x97)],'dT':c[_0x248d9c(0xc6)](+_0x14c10a[_0x248d9c(0x9f)])['format'](_0x248d9c(0x89)),'personId':_0x14c10a[_0x248d9c(0x73)]};}else{const _0x2e705c={'memberId':_0x427f4d,'unitId':_0x472cc4,'content':_0x1cf80b,'mention':_0x209b89},_0x38d1bb=await this[_0x248d9c(0xb8)][_0x248d9c(0xb1)](_0x248d9c(0xba)+_0x472cc4+_0x248d9c(0xd5),{'body':_0x2e705c});return Y(_0x38d1bb[_0x248d9c(0x75)][_0x248d9c(0xe1)],_0x2d5954);}}async[_0x2af2cb(0x66)](_0x4594ec){const _0x1a6aac=_0x2af2cb;var _0x322277,_0x1fe758;const {text:_0x157697,unitId:_0xd57f61}=_0x4594ec,_0x46712c=(_0x1fe758=(_0x322277=_0x157697[_0x1a6aac(0x69)])==null?void 0x0:_0x322277['filter'](_0xf623e9=>_0xf623e9[_0x1a6aac(0xc3)]===c[_0x1a6aac(0x76)][_0x1a6aac(0x8a)])[_0x1a6aac(0x8b)](_0x50d378=>_0x50d378[_0x1a6aac(0x9e)]))!=null?_0x1fe758:[],_0x5d44d7=JSON[_0x1a6aac(0x9c)](_0x157697),_0x16400d=_0x4594ec[_0x1a6aac(0xc0)],_0x34ef37=_0x4594ec['id'],_0x3ad721={'memberId':(await this['_sessionService'][_0x1a6aac(0x74)](_0xd57f61))[_0x1a6aac(0xa2)](),'unitId':_0xd57f61,'threadId':_0x16400d,'mention':_0x46712c,'content':_0x5d44d7,'replyId':_0x34ef37},_0x8a23dc=await this[_0x1a6aac(0xb8)][_0x1a6aac(0xb1)](_0x1a6aac(0xba)+_0xd57f61+_0x1a6aac(0xde),{'body':_0x3ad721});return!_0x8a23dc[_0x1a6aac(0x75)]['error']||_0x8a23dc[_0x1a6aac(0x75)][_0x1a6aac(0xb6)][_0x1a6aac(0xb0)]===0x1;}async['resolveComment'](_0x3993ff){const _0x4cfb4a=_0x2af2cb,{unitId:_0x28fe13}=_0x3993ff,_0x566e51=_0x3993ff['threadId'],_0x4b8789={'memberId':this[_0x4cfb4a(0xc8)][_0x4cfb4a(0xd9)]()[_0x4cfb4a(0xd6)],'unitId':_0x28fe13,'threadId':_0x566e51,'solved':_0x3993ff['resolved']?I[_0x4cfb4a(0x6a)]:I['OpenOrReOpen']},_0x9c1f76=await this[_0x4cfb4a(0xb8)][_0x4cfb4a(0xb1)](_0x4cfb4a(0xba)+_0x28fe13+'/solved',{'body':_0x4b8789});return!_0x9c1f76[_0x4cfb4a(0x75)][_0x4cfb4a(0xb6)]||_0x9c1f76[_0x4cfb4a(0x75)][_0x4cfb4a(0xb6)][_0x4cfb4a(0xb0)]===0x1;}async[_0x2af2cb(0x7a)](_0x13d9b6,_0x1f6ff3,_0x56245c,_0xc14b38){const _0x4c49a3=_0x2af2cb,_0x551ef4={'memberId':(await this[_0x4c49a3(0x72)]['requireSession'](_0x13d9b6))[_0x4c49a3(0xa2)](),'threadId':_0x56245c,'replyId':_0xc14b38,'unitId':_0x13d9b6},_0x3960e1=await this['_httpService'][_0x4c49a3(0xb1)](_0x4c49a3(0xba)+_0x13d9b6+_0x4c49a3(0xb7),{'body':_0x551ef4});return!_0x3960e1['body'][_0x4c49a3(0xb6)]||_0x3960e1[_0x4c49a3(0x75)][_0x4c49a3(0xb6)][_0x4c49a3(0xb0)]===0x1;}async[_0x2af2cb(0x8e)](_0x2df7c6,_0x3f45b1,_0x1dd075){const _0x2478e8=_0x2af2cb,_0xf098c6={'unitId':_0x2df7c6,'threadId':_0x1dd075},_0x3122d7=await this['_httpService']['post'](_0x2478e8(0xba)+_0x2df7c6+'/list',{'body':_0xf098c6}),_0x203eb8=_0x1dd075[_0x2478e8(0x8b)](_0x3aa9ac=>G(_0x3122d7[_0x2478e8(0x75)][_0x2478e8(0x78)][_0x3aa9ac],_0x2df7c6,_0x3f45b1))[_0x2478e8(0xbd)](Boolean);return Object[_0x2478e8(0x88)](_0x3122d7[_0x2478e8(0x75)][_0x2478e8(0x9b)])[_0x2478e8(0x7f)](_0x2542d7=>{const _0x504467=_0x2478e8;this[_0x504467(0xc8)][_0x504467(0xb5)](_0x2542d7);}),_0x203eb8;}[_0x2af2cb(0x86)](_0x33b0b9){const _0x4c8227=_0x2af2cb;return{'id':_0x33b0b9['id'],'threadId':_0x33b0b9['threadId'],'ref':_0x33b0b9[_0x4c8227(0x85)]};}};p=x([C(0x0,c[_0x2af2cb(0x93)](P[_0x2af2cb(0x9d)])),C(0x1,c[_0x2af2cb(0x93)](c[_0x2af2cb(0xe5)])),C(0x2,c[_0x2af2cb(0x93)](b['CollaborationSessionService']))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x5e0eb1,_0x521e67,_0x235741,_0xabf621)=>{const _0x7af631=_0x2af2cb;for(var _0x21a853=_0xabf621>0x1?void 0x0:_0xabf621?H(_0x521e67,_0x235741):_0x521e67,_0x336ffc=_0x5e0eb1[_0x7af631(0xd7)]-0x1,_0x27763d;_0x336ffc>=0x0;_0x336ffc--)(_0x27763d=_0x5e0eb1[_0x336ffc])&&(_0x21a853=_0x27763d(_0x21a853)||_0x21a853);return _0x21a853;},y=(_0x28e798,_0xd29987)=>(_0x3f688c,_0x5e2c91)=>_0xd29987(_0x3f688c,_0x5e2c91,_0x28e798);let g=class extends c[_0x2af2cb(0xcd)]{constructor(_0x2045e6,_0x5bfe3a){const _0xd1e54=_0x2af2cb;super(),this['_threadCommentDataSourceService']=_0x2045e6,this[_0xd1e54(0x77)]=_0x5bfe3a,this[_0xd1e54(0x99)]();}[_0x2af2cb(0x99)](){const _0x423cc6=_0x2af2cb;this[_0x423cc6(0x67)][_0x423cc6(0x96)]=this[_0x423cc6(0x77)],this[_0x423cc6(0x67)][_0x423cc6(0x6f)]=!0x1;}};g=J([y(0x0,M[_0x2af2cb(0x98)]),y(0x1,c[_0x2af2cb(0x93)](p))],g);var F=Object[_0x2af2cb(0xa8)],L=Object[_0x2af2cb(0xc1)],Z=(_0x3b54f8,_0xcb4a7d,_0x36fc40)=>_0xcb4a7d in _0x3b54f8?F(_0x3b54f8,_0xcb4a7d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x36fc40}):_0x3b54f8[_0xcb4a7d]=_0x36fc40,W=(_0x696dee,_0x418c53,_0x43569b,_0x3ee1a3)=>{const _0x48df0a=_0x2af2cb;for(var _0x33cafe=_0x3ee1a3>0x1?void 0x0:_0x3ee1a3?L(_0x418c53,_0x43569b):_0x418c53,_0x3efc20=_0x696dee[_0x48df0a(0xd7)]-0x1,_0x42a611;_0x3efc20>=0x0;_0x3efc20--)(_0x42a611=_0x696dee[_0x3efc20])&&(_0x33cafe=_0x42a611(_0x33cafe)||_0x33cafe);return _0x33cafe;},O=(_0xb852a4,_0x27287a)=>(_0x502379,_0x52373f)=>_0x27287a(_0x502379,_0x52373f,_0xb852a4),N=(_0x5ca3df,_0x5b5277,_0x355ec0)=>Z(_0x5ca3df,typeof _0x5b5277!=_0x2af2cb(0xd0)?_0x5b5277+'':_0x5b5277,_0x355ec0);exports[_0x2af2cb(0x94)]=class extends c[_0x2af2cb(0xc7)]{constructor(_0x316c0c=D,_0x4e6a4e,_0x43c994){const _0x27e06b=_0x2af2cb;super(),this[_0x27e06b(0xb4)]=_0x316c0c,this[_0x27e06b(0xda)]=_0x4e6a4e,this[_0x27e06b(0xdb)]=_0x43c994;const {..._0x53c443}=c['merge']({},D,this[_0x27e06b(0xb4)]);this['_configService'][_0x27e06b(0xcb)](q,_0x53c443);}[_0x2af2cb(0xca)](){[[p],[g],[_]]['forEach'](_0x2cc35e=>{const _0xe29190=_0x4d4d;this[_0xe29190(0xda)][_0xe29190(0xdf)](_0x2cc35e);});}[_0x2af2cb(0xa7)](){const _0x513e26=_0x2af2cb;this[_0x513e26(0xda)]['get'](g),this['_injector'][_0x513e26(0xa4)](_);}},N(exports[_0x2af2cb(0x94)],_0x2af2cb(0x8d),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x2af2cb(0x7e),c[_0x2af2cb(0x71)][_0x2af2cb(0xbf)]),exports[_0x2af2cb(0x94)]=W([c[_0x2af2cb(0xaf)](w[_0x2af2cb(0x84)],b[_0x2af2cb(0xa1)],T[_0x2af2cb(0xe3)]),O(0x1,c[_0x2af2cb(0x93)](c[_0x2af2cb(0xdd)])),O(0x2,c[_0x2af2cb(0xa6)])],exports[_0x2af2cb(0x94)]);
|
|
1
|
+
'use strict';const _0x4a9a54=_0x13fa;(function(_0x2ef9e8,_0x4c4b0d){const _0x3ff78d=_0x13fa,_0x227fb1=_0x2ef9e8();while(!![]){try{const _0x1885a2=parseInt(_0x3ff78d(0x1d1))/0x1+-parseInt(_0x3ff78d(0x1f7))/0x2*(-parseInt(_0x3ff78d(0x208))/0x3)+parseInt(_0x3ff78d(0x202))/0x4*(parseInt(_0x3ff78d(0x1e4))/0x5)+-parseInt(_0x3ff78d(0x219))/0x6+parseInt(_0x3ff78d(0x209))/0x7+parseInt(_0x3ff78d(0x1e9))/0x8+-parseInt(_0x3ff78d(0x22e))/0x9;if(_0x1885a2===_0x4c4b0d)break;else _0x227fb1['push'](_0x227fb1['shift']());}catch(_0x273ef0){_0x227fb1['push'](_0x227fb1['shift']());}}}(_0x50ee,0x59a59));function _0x13fa(_0x1979b7,_0x1bfe10){const _0x50eef6=_0x50ee();return _0x13fa=function(_0x13faa9,_0x45481f){_0x13faa9=_0x13faa9-0x1c3;let _0x29d4e9=_0x50eef6[_0x13faa9];return _0x29d4e9;},_0x13fa(_0x1979b7,_0x1bfe10);}Object[_0x4a9a54(0x230)](exports,Symbol[_0x4a9a54(0x221)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x4a9a54(0x21e);var I=(_0x209ae6=>(_0x209ae6[_0x209ae6[_0x4a9a54(0x229)]=0x0]=_0x4a9a54(0x229),_0x209ae6[_0x209ae6[_0x4a9a54(0x222)]=0x1]=_0x4a9a54(0x222),_0x209ae6[_0x209ae6['UNRECOGNIZED']=-0x1]=_0x4a9a54(0x1f5),_0x209ae6))(I||{}),v=(_0x3643db=>(_0x3643db[_0x3643db[_0x4a9a54(0x1fa)]=0x0]=_0x4a9a54(0x1fa),_0x3643db[_0x3643db[_0x4a9a54(0x1f0)]=0x1]=_0x4a9a54(0x1f0),_0x3643db[_0x3643db['Reply']=0x2]=_0x4a9a54(0x238),_0x3643db[_0x3643db[_0x4a9a54(0x203)]=0x3]='Edit',_0x3643db[_0x3643db[_0x4a9a54(0x213)]=0x4]=_0x4a9a54(0x213),_0x3643db[_0x3643db[_0x4a9a54(0x1d5)]=0x5]=_0x4a9a54(0x1d5),_0x3643db[_0x3643db[_0x4a9a54(0x1f5)]=-0x1]='UNRECOGNIZED',_0x3643db))(v||{});const f=_0x5cb21b=>c[_0x4a9a54(0x1c8)](new Date(+_0x5cb21b))[_0x4a9a54(0x20a)](_0x4a9a54(0x223)),R=async(_0x45e7d3,_0x3c4498)=>{const _0x55fbd0=_0x4a9a54,_0x2686c5=_0x45e7d3['get'](c['UserManagerService']),_0x322d3c=_0x45e7d3[_0x55fbd0(0x218)](P[_0x55fbd0(0x1ed)]);_0x3c4498[_0x55fbd0(0x22c)](_0x1cef8a=>{const _0x3725b3=_0x55fbd0;_0x2686c5['getUser'](_0x1cef8a)&&_0x3c4498[_0x3725b3(0x215)](_0x1cef8a);}),_0x3c4498['size']&&(await _0x322d3c[_0x55fbd0(0x218)](_0x55fbd0(0x234),{'params':{'userIDs':[..._0x3c4498]}}))[_0x55fbd0(0x1da)]['users']['forEach'](_0xae2b1f=>{const _0x2c57ca=_0x55fbd0;_0xae2b1f&&_0x2686c5[_0x2c57ca(0x20e)](_0xae2b1f);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x512964,_0x39768f,_0x4dda2b,_0x2ad907)=>{for(var _0x5e44a8=_0x2ad907>0x1?void 0x0:_0x2ad907?$(_0x39768f,_0x4dda2b):_0x39768f,_0x220350=_0x512964['length']-0x1,_0x232a00;_0x220350>=0x0;_0x220350--)(_0x232a00=_0x512964[_0x220350])&&(_0x5e44a8=_0x232a00(_0x5e44a8)||_0x5e44a8);return _0x5e44a8;},S=(_0x1340de,_0x50b041)=>(_0x5a1cfa,_0x1391dc)=>_0x50b041(_0x5a1cfa,_0x1391dc,_0x1340de);let _=class extends c[_0x4a9a54(0x210)]{constructor(_0x399823,_0x2fe3e8,_0x241e4b,_0x2ca313){const _0x57f83e=_0x4a9a54;super(),this[_0x57f83e(0x1cf)]=_0x399823,this[_0x57f83e(0x1ee)]=_0x2fe3e8,this['_userService']=_0x241e4b,this[_0x57f83e(0x20f)]=_0x2ca313,this[_0x57f83e(0x1e0)](),this[_0x57f83e(0x1f1)]();}[_0x4a9a54(0x1f1)](){const _0x39e832=_0x4a9a54;this['disposeWithMe'](this[_0x39e832(0x1ee)][_0x39e832(0x1cb)][_0x39e832(0x1ce)](j[_0x39e832(0x1fd)](0x10))['subscribe'](_0xa1486=>{const _0xceccee=_0x39e832,_0x1a39d0=new Set();_0xa1486[_0xceccee(0x22c)](_0x51444d=>{const _0x30eef4=_0xceccee;switch(_0x51444d[_0x30eef4(0x22a)]){case _0x30eef4(0x20d):{const _0x390660=_0x51444d[_0x30eef4(0x231)]['personId'];_0x1a39d0['add'](_0x390660);break;}}}),R(this['_injector'],_0x1a39d0);}));}[_0x4a9a54(0x1e0)](){const _0x2077be=_0x4a9a54;this['disposeWithMe'](this['_commentService'][_0x2077be(0x1cb)][_0x2077be(0x22b)](async _0x51c4ea=>{const _0x2b76a2=_0x2077be;var _0x36d745,_0x52a7e4,_0x56dc98,_0x7e148e;const _0x3db83e=(_0x36d745=this['_threadCommentModel']['getUnit'](_0x51c4ea[_0x2b76a2(0x227)])['find'](_0x3a495f=>_0x3a495f['threadId']===_0x51c4ea[_0x2b76a2(0x21d)]))==null?void 0x0:_0x36d745[_0x2b76a2(0x1ea)];if(!_0x3db83e)return;const {unitId:_0xbfb9c8,subUnitId:_0x15acc3}=_0x3db83e;switch(_0x51c4ea[_0x2b76a2(0x1f4)]&&this['_userService']['addUser'](_0x51c4ea['user']),_0x51c4ea[_0x2b76a2(0x22a)]){case v[_0x2b76a2(0x1f0)]:break;case v[_0x2b76a2(0x238)]:{this['_threadCommentModel'][_0x2b76a2(0x1ec)](_0xbfb9c8,_0x15acc3,{'unitId':_0xbfb9c8,'subUnitId':_0x15acc3,'ref':'','id':_0x51c4ea[_0x2b76a2(0x217)],'dT':f(+_0x51c4ea['createTimestamp']),'threadId':_0x51c4ea[_0x2b76a2(0x21d)],'personId':(_0x56dc98=(_0x52a7e4=_0x51c4ea[_0x2b76a2(0x1f4)])==null?void 0x0:_0x52a7e4[_0x2b76a2(0x1d3)])!=null?_0x56dc98:_0x51c4ea[_0x2b76a2(0x1e3)],'text':JSON[_0x2b76a2(0x1de)](_0x51c4ea[_0x2b76a2(0x1df)]),'parentId':_0x3db83e['id']});break;}case v['Delete']:{const _0x3cf96e=this['_threadCommentModel'][_0x2b76a2(0x1d6)](_0xbfb9c8,_0x15acc3,_0x51c4ea[_0x2b76a2(0x217)]);_0x3cf96e&&_0x3cf96e['parentId']&&this[_0x2b76a2(0x1ee)][_0x2b76a2(0x205)](_0xbfb9c8,_0x15acc3,_0x51c4ea[_0x2b76a2(0x217)]);break;}case v[_0x2b76a2(0x203)]:{this['_threadCommentModel'][_0x2b76a2(0x224)](_0xbfb9c8,_0x15acc3,{'commentId':_0x51c4ea['replyId'],'text':JSON[_0x2b76a2(0x1de)](_0x51c4ea[_0x2b76a2(0x1df)])});break;}case v[_0x2b76a2(0x1d5)]:{const _0x5872c7=(_0x7e148e=this[_0x2b76a2(0x1ee)][_0x2b76a2(0x220)](_0x51c4ea[_0x2b76a2(0x227)])[_0x2b76a2(0x1cc)](_0x469073=>_0x469073[_0x2b76a2(0x21d)]===_0x51c4ea['threadId']))==null?void 0x0:_0x7e148e['root'];_0x5872c7&&this[_0x2b76a2(0x1ee)][_0x2b76a2(0x1c5)](_0xbfb9c8,_0x15acc3,_0x5872c7['id'],_0x51c4ea[_0x2b76a2(0x1fe)]===I[_0x2b76a2(0x222)]);break;}}}));}};_=E([S(0x0,c[_0x4a9a54(0x1e5)](b[_0x4a9a54(0x21a)])),S(0x1,c[_0x4a9a54(0x1e5)](M[_0x4a9a54(0x1db)])),S(0x2,c[_0x4a9a54(0x1e5)](c['UserManagerService'])),S(0x3,c[_0x4a9a54(0x1e5)](c['Injector']))],_);const q=_0x4a9a54(0x1c4),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x458437,_0x2d5ab9,_0x1b77bb,_0x285f72)=>{const _0x53b19f=_0x4a9a54;for(var _0x4d04db=_0x285f72>0x1?void 0x0:_0x285f72?A(_0x2d5ab9,_0x1b77bb):_0x2d5ab9,_0x2c4c56=_0x458437[_0x53b19f(0x1d0)]-0x1,_0x147d9d;_0x2c4c56>=0x0;_0x2c4c56--)(_0x147d9d=_0x458437[_0x2c4c56])&&(_0x4d04db=_0x147d9d(_0x4d04db)||_0x4d04db);return _0x4d04db;},C=(_0x243a2a,_0xc5e37f)=>(_0x40c329,_0x536dac)=>_0xc5e37f(_0x40c329,_0x536dac,_0x243a2a);function _0x50ee(){const _0x387671=['_httpService','13407831TDcWXD','_initDataSource','defineProperty','payload','_userService','UniverCollaborationClientPlugin','/universer-api/user/list','onStarting','UniverLicensePlugin','reply','Reply','getOwnPropertyDescriptor','thread-comment-data-source.config','resolveComment','createTimestamp','rangeType','dayjs','_threadCommentDataSourceService','UNIVER_UNKNOWN','commentUpdate$','find','post','pipe','_commentService','length','337508xwwCSq','CollaborationSessionService','userID','slice','Solve','getComment','Plugin','CustomRangeType','_threadCommentDataSource','body','ThreadCommentModel','UniverThreadCommentDataSourcePlugin','getMemberID','parse','content','_init','getCurrentUser','/universer-api/comment/unit/','userId','994030AflakW','Inject','symbol','_config','customRanges','3935592ZVYPzJ','root','merge','addComment','HTTPService','_threadCommentModel','/list','Add','_initUserSync','error','/delete','user','UNRECOGNIZED','code','414424KDLtug','stringify','UniverInstanceType','Unknown','UserManagerService','/reply','bufferTime','solved','Injector','DependentOn','users','12lSdKcU','Edit','COMMENT','deleteComment','map','rangeId','9KtMCnP','1610994efteAS','format','setConfig','_sessionService','add','addUser','_injector','Disposable','/add','filter','Delete','requireSession','delete','/solved','replyId','get','2524206wrbiUt','CommentService','_configService','replies','threadId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','IThreadCommentDataSourceService','getUnit','toStringTag','Solved','YYYY/MM/DD\x20HH:mm','updateComment','onReady','/edit','unitId','IConfigService','OpenOrReOpen','type','subscribe','forEach'];_0x50ee=function(){return _0x387671;};return _0x50ee();}function Y(_0x119537,_0x2633ad){const _0x540028=_0x4a9a54,_0x540492=_0x119537['replies'][0x0];return{..._0x2633ad,'id':_0x540492[_0x540028(0x217)],'resolved':_0x119537[_0x540028(0x1fe)]===0x1,'dT':f(_0x540492[_0x540028(0x1c6)]),'personId':_0x540492[_0x540028(0x1e3)],'threadId':_0x540492[_0x540028(0x21d)]};}function G(_0x10dbfd,_0x2474ef,_0xb63dbc){const _0x3146c2=_0x4a9a54;var _0x2107f0,_0xf2f680;if(((_0xf2f680=(_0x2107f0=_0x10dbfd==null?void 0x0:_0x10dbfd[_0x3146c2(0x21c)])==null?void 0x0:_0x2107f0['length'])!=null?_0xf2f680:0x0)>0x0){const _0xfed38=(_0x52d105,_0x5c5a4b)=>({'id':_0x52d105[_0x3146c2(0x217)],'threadId':_0x52d105[_0x3146c2(0x21d)],'dT':f(_0x52d105[_0x3146c2(0x1c6)]),'personId':_0x52d105[_0x3146c2(0x1e3)],'resolved':_0x10dbfd['solved']===I['Solved'],'unitId':_0x2474ef,'subUnitId':_0xb63dbc,'text':JSON[_0x3146c2(0x1de)](_0x52d105[_0x3146c2(0x1df)]),'parentId':_0x5c5a4b}),_0x43c64e=_0xfed38(_0x10dbfd['replies'][0x0]);return{..._0x43c64e,'children':_0x10dbfd[_0x3146c2(0x21c)][_0x3146c2(0x1d4)](0x1)[_0x3146c2(0x206)](_0x2dd548=>_0xfed38(_0x2dd548,_0x43c64e['id']))};}return null;}let p=class{constructor(_0x41b40e,_0x5ca185,_0x5d9f7d){const _0x2fb18a=_0x4a9a54;this['_httpService']=_0x41b40e,this[_0x2fb18a(0x232)]=_0x5ca185,this[_0x2fb18a(0x20c)]=_0x5d9f7d;}async['addComment'](_0x39d018){const _0x55c04a=_0x4a9a54;var _0xe38d7c,_0x2ac8fb;const {parentId:_0x2f18e1,unitId:_0x3a26d8,text:_0x5807a4,threadId:_0x83ea35}=_0x39d018,_0x30312e=(_0x2ac8fb=(_0xe38d7c=_0x5807a4[_0x55c04a(0x1e8)])==null?void 0x0:_0xe38d7c[_0x55c04a(0x212)](_0x55b3a4=>_0x55b3a4[_0x55c04a(0x1c7)]===c[_0x55c04a(0x1d8)]['COMMENT'])[_0x55c04a(0x206)](_0x10c8d4=>_0x10c8d4[_0x55c04a(0x207)]))!=null?_0x2ac8fb:[],_0x49ae4a=JSON['stringify'](_0x5807a4),_0x5b958c=(await this[_0x55c04a(0x20c)][_0x55c04a(0x214)](_0x3a26d8))[_0x55c04a(0x1dd)]();if(_0x2f18e1){const _0x6b099={'memberId':_0x5b958c,'unitId':_0x3a26d8,'content':_0x49ae4a,'mention':_0x30312e,'threadId':_0x83ea35},_0x57b828=(await this[_0x55c04a(0x22d)][_0x55c04a(0x1cd)](_0x55c04a(0x1e2)+_0x3a26d8+_0x55c04a(0x1fc),{'body':_0x6b099}))[_0x55c04a(0x1da)][_0x55c04a(0x237)];return{..._0x39d018,'id':_0x57b828[_0x55c04a(0x217)],'dT':c['dayjs'](+_0x57b828[_0x55c04a(0x1c6)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x57b828[_0x55c04a(0x1e3)]};}else{const _0x4e7abd={'memberId':_0x5b958c,'unitId':_0x3a26d8,'content':_0x49ae4a,'mention':_0x30312e},_0x4bcb32=await this['_httpService'][_0x55c04a(0x1cd)](_0x55c04a(0x1e2)+_0x3a26d8+_0x55c04a(0x211),{'body':_0x4e7abd});return Y(_0x4bcb32[_0x55c04a(0x1da)]['comment'],_0x39d018);}}async[_0x4a9a54(0x224)](_0x42a80a){const _0x3701f5=_0x4a9a54;var _0x379e35,_0x4491ff;const {text:_0xb8d727,unitId:_0x151d6e}=_0x42a80a,_0x210bb7=(_0x4491ff=(_0x379e35=_0xb8d727['customRanges'])==null?void 0x0:_0x379e35['filter'](_0x557661=>_0x557661[_0x3701f5(0x1c7)]===c[_0x3701f5(0x1d8)][_0x3701f5(0x204)])[_0x3701f5(0x206)](_0x168d25=>_0x168d25['rangeId']))!=null?_0x4491ff:[],_0x10f9a9=JSON[_0x3701f5(0x1f8)](_0xb8d727),_0x1ed447=_0x42a80a[_0x3701f5(0x21d)],_0x15b7f7=_0x42a80a['id'],_0x3a246c={'memberId':(await this[_0x3701f5(0x20c)]['requireSession'](_0x151d6e))[_0x3701f5(0x1dd)](),'unitId':_0x151d6e,'threadId':_0x1ed447,'mention':_0x210bb7,'content':_0x10f9a9,'replyId':_0x15b7f7},_0x21e4eb=await this['_httpService'][_0x3701f5(0x1cd)](_0x3701f5(0x1e2)+_0x151d6e+_0x3701f5(0x226),{'body':_0x3a246c});return!_0x21e4eb[_0x3701f5(0x1da)][_0x3701f5(0x1f2)]||_0x21e4eb[_0x3701f5(0x1da)][_0x3701f5(0x1f2)][_0x3701f5(0x1f6)]===0x1;}async[_0x4a9a54(0x1c5)](_0x5f3b3a){const _0x1ab9d3=_0x4a9a54,{unitId:_0x140cde}=_0x5f3b3a,_0x102b03=_0x5f3b3a[_0x1ab9d3(0x21d)],_0x2f72a0={'memberId':this[_0x1ab9d3(0x232)][_0x1ab9d3(0x1e1)]()[_0x1ab9d3(0x1d3)],'unitId':_0x140cde,'threadId':_0x102b03,'solved':_0x5f3b3a['resolved']?I[_0x1ab9d3(0x222)]:I[_0x1ab9d3(0x229)]},_0xb56488=await this[_0x1ab9d3(0x22d)][_0x1ab9d3(0x1cd)]('/universer-api/comment/unit/'+_0x140cde+_0x1ab9d3(0x216),{'body':_0x2f72a0});return!_0xb56488[_0x1ab9d3(0x1da)][_0x1ab9d3(0x1f2)]||_0xb56488[_0x1ab9d3(0x1da)][_0x1ab9d3(0x1f2)][_0x1ab9d3(0x1f6)]===0x1;}async[_0x4a9a54(0x205)](_0x149169,_0xc21a67,_0x549cad,_0xb546ec){const _0x237744=_0x4a9a54,_0x3238d3={'memberId':(await this[_0x237744(0x20c)][_0x237744(0x214)](_0x149169))[_0x237744(0x1dd)](),'threadId':_0x549cad,'replyId':_0xb546ec,'unitId':_0x149169},_0x34f99a=await this['_httpService'][_0x237744(0x1cd)](_0x237744(0x1e2)+_0x149169+_0x237744(0x1f3),{'body':_0x3238d3});return!_0x34f99a[_0x237744(0x1da)][_0x237744(0x1f2)]||_0x34f99a['body'][_0x237744(0x1f2)][_0x237744(0x1f6)]===0x1;}async['listComments'](_0xd6f766,_0x21ebf3,_0x36f9eb){const _0x12614b=_0x4a9a54,_0xfb54e9={'unitId':_0xd6f766,'threadId':_0x36f9eb},_0x2dbfe5=await this[_0x12614b(0x22d)][_0x12614b(0x1cd)](_0x12614b(0x1e2)+_0xd6f766+_0x12614b(0x1ef),{'body':_0xfb54e9}),_0x3509a1=_0x36f9eb['map'](_0x33d159=>G(_0x2dbfe5['body']['comments'][_0x33d159],_0xd6f766,_0x21ebf3))['filter'](Boolean);return Object['values'](_0x2dbfe5[_0x12614b(0x1da)][_0x12614b(0x201)])[_0x12614b(0x22c)](_0x1cce45=>{const _0x46e296=_0x12614b;this['_userService'][_0x46e296(0x20e)](_0x1cce45);}),_0x3509a1;}['saveCommentToSnapshot'](_0xdbd7f5){const _0x485de3=_0x4a9a54;return{'id':_0xdbd7f5['id'],'threadId':_0xdbd7f5[_0x485de3(0x21d)],'ref':_0xdbd7f5['ref']};}};p=x([C(0x0,c[_0x4a9a54(0x1e5)](P[_0x4a9a54(0x1ed)])),C(0x1,c[_0x4a9a54(0x1e5)](c[_0x4a9a54(0x1fb)])),C(0x2,c[_0x4a9a54(0x1e5)](b[_0x4a9a54(0x1d2)]))],p);var H=Object[_0x4a9a54(0x1c3)],J=(_0x4f6475,_0x53ac70,_0x3517cc,_0x59f18b)=>{const _0x1efdfd=_0x4a9a54;for(var _0x21c7d8=_0x59f18b>0x1?void 0x0:_0x59f18b?H(_0x53ac70,_0x3517cc):_0x53ac70,_0x53f276=_0x4f6475[_0x1efdfd(0x1d0)]-0x1,_0x742c0a;_0x53f276>=0x0;_0x53f276--)(_0x742c0a=_0x4f6475[_0x53f276])&&(_0x21c7d8=_0x742c0a(_0x21c7d8)||_0x21c7d8);return _0x21c7d8;},y=(_0x5e242c,_0x1172e2)=>(_0xc10c1a,_0x532831)=>_0x1172e2(_0xc10c1a,_0x532831,_0x5e242c);let g=class extends c['Disposable']{constructor(_0x615531,_0x202c40){const _0x13c480=_0x4a9a54;super(),this[_0x13c480(0x1c9)]=_0x615531,this[_0x13c480(0x1d9)]=_0x202c40,this[_0x13c480(0x22f)]();}['_initDataSource'](){const _0x57ee4c=_0x4a9a54;this[_0x57ee4c(0x1c9)]['dataSource']=this['_threadCommentDataSource'],this[_0x57ee4c(0x1c9)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x4a9a54(0x21f)]),y(0x1,c[_0x4a9a54(0x1e5)](p))],g);var F=Object[_0x4a9a54(0x230)],L=Object[_0x4a9a54(0x1c3)],Z=(_0x4378f1,_0x1ccd4f,_0x4733f6)=>_0x1ccd4f in _0x4378f1?F(_0x4378f1,_0x1ccd4f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4733f6}):_0x4378f1[_0x1ccd4f]=_0x4733f6,W=(_0x4a5808,_0x9ebb17,_0x29865c,_0x4c2b38)=>{const _0x259b31=_0x4a9a54;for(var _0x54b789=_0x4c2b38>0x1?void 0x0:_0x4c2b38?L(_0x9ebb17,_0x29865c):_0x9ebb17,_0x52bdc7=_0x4a5808[_0x259b31(0x1d0)]-0x1,_0x2329ce;_0x52bdc7>=0x0;_0x52bdc7--)(_0x2329ce=_0x4a5808[_0x52bdc7])&&(_0x54b789=_0x2329ce(_0x54b789)||_0x54b789);return _0x54b789;},O=(_0x501e49,_0x4910f7)=>(_0x4fdb9b,_0x52ab56)=>_0x4910f7(_0x4fdb9b,_0x52ab56,_0x501e49),N=(_0xbf693b,_0x297a25,_0x3a8107)=>Z(_0xbf693b,typeof _0x297a25!=_0x4a9a54(0x1e6)?_0x297a25+'':_0x297a25,_0x3a8107);exports[_0x4a9a54(0x1dc)]=class extends c[_0x4a9a54(0x1d7)]{constructor(_0x8084e6=D,_0x1a04dd,_0x18f468){const _0x4290b3=_0x4a9a54;super(),this[_0x4290b3(0x1e7)]=_0x8084e6,this['_injector']=_0x1a04dd,this[_0x4290b3(0x21b)]=_0x18f468;const {..._0x2ab8e0}=c[_0x4290b3(0x1eb)]({},D,this[_0x4290b3(0x1e7)]);this[_0x4290b3(0x21b)][_0x4290b3(0x20b)](q,_0x2ab8e0);}[_0x4a9a54(0x235)](){const _0x43aee7=_0x4a9a54;[[p],[g],[_]][_0x43aee7(0x22c)](_0x54839c=>{const _0x16a994=_0x43aee7;this['_injector'][_0x16a994(0x20d)](_0x54839c);});}[_0x4a9a54(0x225)](){const _0x1b761f=_0x4a9a54;this[_0x1b761f(0x20f)][_0x1b761f(0x218)](g),this[_0x1b761f(0x20f)][_0x1b761f(0x218)](_);}},N(exports[_0x4a9a54(0x1dc)],'pluginName',U),N(exports[_0x4a9a54(0x1dc)],_0x4a9a54(0x22a),c[_0x4a9a54(0x1f9)][_0x4a9a54(0x1ca)]),exports[_0x4a9a54(0x1dc)]=W([c[_0x4a9a54(0x200)](w['UniverThreadCommentUIPlugin'],b[_0x4a9a54(0x233)],T[_0x4a9a54(0x236)]),O(0x1,c[_0x4a9a54(0x1e5)](c[_0x4a9a54(0x1ff)])),O(0x2,c[_0x4a9a54(0x228)])],exports[_0x4a9a54(0x1dc)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x476a1b=_0x43cd;(function(_0x4222fc,_0x26ed53){const _0x2f89ae=_0x43cd,_0x4c033b=_0x4222fc();while(!![]){try{const _0x373e92=parseInt(_0x2f89ae(0x21c))/0x1+parseInt(_0x2f89ae(0x251))/0x2*(parseInt(_0x2f89ae(0x226))/0x3)+-parseInt(_0x2f89ae(0x207))/0x4+parseInt(_0x2f89ae(0x200))/0x5+-parseInt(_0x2f89ae(0x241))/0x6+parseInt(_0x2f89ae(0x1fe))/0x7*(-parseInt(_0x2f89ae(0x243))/0x8)+-parseInt(_0x2f89ae(0x1fb))/0x9*(parseInt(_0x2f89ae(0x234))/0xa);if(_0x373e92===_0x26ed53)break;else _0x4c033b['push'](_0x4c033b['shift']());}catch(_0x31b07a){_0x4c033b['push'](_0x4c033b['shift']());}}}(_0x5f43,0xd3675));import{CommentService as _0x11b671,CollaborationSessionService as _0x58eb6f,UniverCollaborationClientPlugin as _0x3d8f69}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x40423d}from'@univerjs-pro/license';import{dayjs as _0x208711,UserManagerService as _0x2ea414,Inject as _0x165b97,Injector as _0x4ed0dc,Disposable as _0x47fbcc,CustomRangeType as _0x44d05f,UniverInstanceType as _0x422e7a,DependentOn as _0x261282,IConfigService as _0x737bff,Plugin as _0x10cffd,merge as _0x58d02d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x55c100}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x52514f,IThreadCommentDataSourceService as _0x327b3d}from'@univerjs/thread-comment';import{bufferTime as _0x344c26}from'rxjs';import{HTTPService as _0x557a77}from'@univerjs/network';const W=_0x476a1b(0x249);var I=(_0x7c4799=>(_0x7c4799[_0x7c4799[_0x476a1b(0x239)]=0x0]=_0x476a1b(0x239),_0x7c4799[_0x7c4799['Solved']=0x1]=_0x476a1b(0x245),_0x7c4799[_0x7c4799['UNRECOGNIZED']=-0x1]=_0x476a1b(0x22a),_0x7c4799))(I||{}),v=(_0xdbbd5d=>(_0xdbbd5d[_0xdbbd5d['Unknown']=0x0]=_0x476a1b(0x244),_0xdbbd5d[_0xdbbd5d['Add']=0x1]=_0x476a1b(0x247),_0xdbbd5d[_0xdbbd5d[_0x476a1b(0x237)]=0x2]='Reply',_0xdbbd5d[_0xdbbd5d[_0x476a1b(0x23a)]=0x3]=_0x476a1b(0x23a),_0xdbbd5d[_0xdbbd5d[_0x476a1b(0x23b)]=0x4]=_0x476a1b(0x23b),_0xdbbd5d[_0xdbbd5d[_0x476a1b(0x246)]=0x5]=_0x476a1b(0x246),_0xdbbd5d[_0xdbbd5d[_0x476a1b(0x22a)]=-0x1]=_0x476a1b(0x22a),_0xdbbd5d))(v||{});function _0x43cd(_0x126487,_0x256421){const _0x5f4370=_0x5f43();return _0x43cd=function(_0x43cdb1,_0x2dee4d){_0x43cdb1=_0x43cdb1-0x1f3;let _0x58bd4c=_0x5f4370[_0x43cdb1];return _0x58bd4c;},_0x43cd(_0x126487,_0x256421);}const y=_0xb66826=>_0x208711(new Date(+_0xb66826))[_0x476a1b(0x229)](_0x476a1b(0x20e)),B=async(_0x54c072,_0x9de6fe)=>{const _0x25049a=_0x476a1b,_0x1570e8=_0x54c072[_0x25049a(0x24b)](_0x2ea414),_0x4590ae=_0x54c072[_0x25049a(0x24b)](_0x557a77);_0x9de6fe['forEach'](_0x37e26a=>{const _0x43a24a=_0x25049a;_0x1570e8['getUser'](_0x37e26a)&&_0x9de6fe[_0x43a24a(0x219)](_0x37e26a);}),_0x9de6fe[_0x25049a(0x1f8)]&&(await _0x4590ae[_0x25049a(0x24b)](_0x25049a(0x257),{'params':{'userIDs':[..._0x9de6fe]}}))['body']['users'][_0x25049a(0x23e)](_0x3bced1=>{const _0x3b3534=_0x25049a;_0x3bced1&&_0x1570e8[_0x3b3534(0x231)](_0x3bced1);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x254e66,_0x304897,_0x2f9a99,_0x45745f)=>{const _0x3ae03d=_0x476a1b;for(var _0x25af33=_0x45745f>0x1?void 0x0:_0x45745f?K(_0x304897,_0x2f9a99):_0x304897,_0x1ea8cf=_0x254e66[_0x3ae03d(0x206)]-0x1,_0x43d2b5;_0x1ea8cf>=0x0;_0x1ea8cf--)(_0x43d2b5=_0x254e66[_0x1ea8cf])&&(_0x25af33=_0x43d2b5(_0x25af33)||_0x25af33);return _0x25af33;},p=(_0x3d35f,_0x24212b)=>(_0x3e8ab7,_0x58ed5d)=>_0x24212b(_0x3e8ab7,_0x58ed5d,_0x3d35f);let _=class extends _0x47fbcc{constructor(_0x5caa19,_0x23056e,_0x5f1fc9,_0x51b319){const _0xc6c608=_0x476a1b;super(),this[_0xc6c608(0x236)]=_0x5caa19,this[_0xc6c608(0x225)]=_0x23056e,this[_0xc6c608(0x24f)]=_0x5f1fc9,this[_0xc6c608(0x254)]=_0x51b319,this[_0xc6c608(0x221)](),this[_0xc6c608(0x250)]();}[_0x476a1b(0x250)](){const _0x182ee2=_0x476a1b;this[_0x182ee2(0x20b)](this[_0x182ee2(0x225)][_0x182ee2(0x24c)][_0x182ee2(0x20f)](_0x344c26(0x10))['subscribe'](_0xf1d615=>{const _0x2ae33d=_0x182ee2,_0x4ae1e3=new Set();_0xf1d615[_0x2ae33d(0x23e)](_0x4751f0=>{const _0x455b58=_0x2ae33d;switch(_0x4751f0[_0x455b58(0x259)]){case _0x455b58(0x228):{const _0x56f990=_0x4751f0[_0x455b58(0x212)][_0x455b58(0x223)];_0x4ae1e3[_0x455b58(0x228)](_0x56f990);break;}}}),B(this[_0x2ae33d(0x254)],_0x4ae1e3);}));}[_0x476a1b(0x221)](){const _0x5ed1b4=_0x476a1b;this[_0x5ed1b4(0x20b)](this['_commentService'][_0x5ed1b4(0x24c)][_0x5ed1b4(0x205)](async _0x2b3025=>{const _0x162727=_0x5ed1b4;var _0x714e6b,_0x1f56f3,_0x29bec3,_0x360c8c;const _0x489cbd=(_0x714e6b=this[_0x162727(0x225)]['getUnit'](_0x2b3025['unitId'])[_0x162727(0x255)](_0x2005fc=>_0x2005fc['threadId']===_0x2b3025['threadId']))==null?void 0x0:_0x714e6b[_0x162727(0x22c)];if(!_0x489cbd)return;const {unitId:_0x45a816,subUnitId:_0x22ee80}=_0x489cbd;switch(_0x2b3025[_0x162727(0x248)]&&this[_0x162727(0x24f)][_0x162727(0x231)](_0x2b3025['user']),_0x2b3025[_0x162727(0x259)]){case v[_0x162727(0x247)]:break;case v['Reply']:{this['_threadCommentModel'][_0x162727(0x238)](_0x45a816,_0x22ee80,{'unitId':_0x45a816,'subUnitId':_0x22ee80,'ref':'','id':_0x2b3025[_0x162727(0x1fa)],'dT':y(+_0x2b3025[_0x162727(0x1fc)]),'threadId':_0x2b3025[_0x162727(0x201)],'personId':(_0x29bec3=(_0x1f56f3=_0x2b3025['user'])==null?void 0x0:_0x1f56f3['userID'])!=null?_0x29bec3:_0x2b3025[_0x162727(0x1ff)],'text':JSON['parse'](_0x2b3025[_0x162727(0x22e)]),'parentId':_0x489cbd['id']});break;}case v[_0x162727(0x23b)]:{const _0x67ed48=this[_0x162727(0x225)][_0x162727(0x1f5)](_0x45a816,_0x22ee80,_0x2b3025[_0x162727(0x1fa)]);_0x67ed48&&_0x67ed48[_0x162727(0x242)]&&this[_0x162727(0x225)]['deleteComment'](_0x45a816,_0x22ee80,_0x2b3025[_0x162727(0x1fa)]);break;}case v[_0x162727(0x23a)]:{this[_0x162727(0x225)][_0x162727(0x23c)](_0x45a816,_0x22ee80,{'commentId':_0x2b3025[_0x162727(0x1fa)],'text':JSON['parse'](_0x2b3025[_0x162727(0x22e)])});break;}case v[_0x162727(0x246)]:{const _0x2199ce=(_0x360c8c=this[_0x162727(0x225)][_0x162727(0x213)](_0x2b3025[_0x162727(0x214)])[_0x162727(0x255)](_0x32e44e=>_0x32e44e[_0x162727(0x201)]===_0x2b3025[_0x162727(0x201)]))==null?void 0x0:_0x360c8c[_0x162727(0x22c)];_0x2199ce&&this[_0x162727(0x225)][_0x162727(0x20a)](_0x45a816,_0x22ee80,_0x2199ce['id'],_0x2b3025[_0x162727(0x217)]===I[_0x162727(0x245)]);break;}}}));}};_=V([p(0x0,_0x165b97(_0x11b671)),p(0x1,_0x165b97(_0x52514f)),p(0x2,_0x165b97(_0x2ea414)),p(0x3,_0x165b97(_0x4ed0dc))],_);const z=_0x476a1b(0x222),O={};var k=Object[_0x476a1b(0x21d)],Q=(_0x27e30a,_0x22d9de,_0x38896b,_0x28118e)=>{const _0xe233f6=_0x476a1b;for(var _0x4d0c1c=_0x28118e>0x1?void 0x0:_0x28118e?k(_0x22d9de,_0x38896b):_0x22d9de,_0x218ddb=_0x27e30a[_0xe233f6(0x206)]-0x1,_0x1bba95;_0x218ddb>=0x0;_0x218ddb--)(_0x1bba95=_0x27e30a[_0x218ddb])&&(_0x4d0c1c=_0x1bba95(_0x4d0c1c)||_0x4d0c1c);return _0x4d0c1c;},b=(_0x57ae43,_0x13af1a)=>(_0x4455e1,_0x2ede60)=>_0x13af1a(_0x4455e1,_0x2ede60,_0x57ae43);function X(_0x37c467,_0x21d174){const _0x42ec6a=_0x476a1b,_0x1b4401=_0x37c467['replies'][0x0];return{..._0x21d174,'id':_0x1b4401['replyId'],'resolved':_0x37c467[_0x42ec6a(0x217)]===0x1,'dT':y(_0x1b4401['createTimestamp']),'personId':_0x1b4401[_0x42ec6a(0x1ff)],'threadId':_0x1b4401[_0x42ec6a(0x201)]};}function ee(_0x5030c9,_0x52a48b,_0x3fd34b){const _0x5a33df=_0x476a1b;var _0x618e71,_0x5787fb;if(((_0x5787fb=(_0x618e71=_0x5030c9==null?void 0x0:_0x5030c9[_0x5a33df(0x24a)])==null?void 0x0:_0x618e71['length'])!=null?_0x5787fb:0x0)>0x0){const _0x143a1e=(_0x105f0d,_0x16896f)=>({'id':_0x105f0d['replyId'],'threadId':_0x105f0d[_0x5a33df(0x201)],'dT':y(_0x105f0d['createTimestamp']),'personId':_0x105f0d['userId'],'resolved':_0x5030c9[_0x5a33df(0x217)]===I[_0x5a33df(0x245)],'unitId':_0x52a48b,'subUnitId':_0x3fd34b,'text':JSON[_0x5a33df(0x22d)](_0x105f0d[_0x5a33df(0x22e)]),'parentId':_0x16896f}),_0x3b1d10=_0x143a1e(_0x5030c9[_0x5a33df(0x24a)][0x0]);return{..._0x3b1d10,'children':_0x5030c9[_0x5a33df(0x24a)]['slice'](0x1)['map'](_0x3eb3f1=>_0x143a1e(_0x3eb3f1,_0x3b1d10['id']))};}return null;}let S=class{constructor(_0x2f10ca,_0x904666,_0x500434){const _0x4a363f=_0x476a1b;this[_0x4a363f(0x204)]=_0x2f10ca,this[_0x4a363f(0x24f)]=_0x904666,this[_0x4a363f(0x227)]=_0x500434;}async[_0x476a1b(0x238)](_0x4c3c53){const _0xc04b97=_0x476a1b;var _0x17e770,_0x1b8ec6;const {parentId:_0x4685a1,unitId:_0xfae419,text:_0x16f01b,threadId:_0x1b6758}=_0x4c3c53,_0x551f69=(_0x1b8ec6=(_0x17e770=_0x16f01b[_0xc04b97(0x1fd)])==null?void 0x0:_0x17e770[_0xc04b97(0x22b)](_0x132b33=>_0x132b33[_0xc04b97(0x23f)]===_0x44d05f['COMMENT'])['map'](_0xc05c53=>_0xc05c53['rangeId']))!=null?_0x1b8ec6:[],_0x28bf1a=JSON[_0xc04b97(0x209)](_0x16f01b),_0x9a3169=(await this[_0xc04b97(0x227)]['requireSession'](_0xfae419))['getMemberID']();if(_0x4685a1){const _0x1f6a55={'memberId':_0x9a3169,'unitId':_0xfae419,'content':_0x28bf1a,'mention':_0x551f69,'threadId':_0x1b6758},_0x41dd34=(await this['_httpService']['post']('/universer-api/comment/unit/'+_0xfae419+_0xc04b97(0x210),{'body':_0x1f6a55}))['body']['reply'];return{..._0x4c3c53,'id':_0x41dd34[_0xc04b97(0x1fa)],'dT':_0x208711(+_0x41dd34['createTimestamp'])[_0xc04b97(0x229)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x41dd34['userId']};}else{const _0x367fc1={'memberId':_0x9a3169,'unitId':_0xfae419,'content':_0x28bf1a,'mention':_0x551f69},_0x2f313c=await this['_httpService']['post'](_0xc04b97(0x252)+_0xfae419+_0xc04b97(0x224),{'body':_0x367fc1});return X(_0x2f313c[_0xc04b97(0x202)][_0xc04b97(0x24e)],_0x4c3c53);}}async[_0x476a1b(0x23c)](_0x489d09){const _0x3d6a2c=_0x476a1b;var _0x40b812,_0x8e1bc4;const {text:_0x129877,unitId:_0x6af38}=_0x489d09,_0x49d7f8=(_0x8e1bc4=(_0x40b812=_0x129877[_0x3d6a2c(0x1fd)])==null?void 0x0:_0x40b812[_0x3d6a2c(0x22b)](_0x540307=>_0x540307[_0x3d6a2c(0x23f)]===_0x44d05f[_0x3d6a2c(0x235)])['map'](_0x180248=>_0x180248[_0x3d6a2c(0x220)]))!=null?_0x8e1bc4:[],_0x28d97f=JSON[_0x3d6a2c(0x209)](_0x129877),_0x54ef58=_0x489d09[_0x3d6a2c(0x201)],_0x89cf8b=_0x489d09['id'],_0x4b977a={'memberId':(await this[_0x3d6a2c(0x227)][_0x3d6a2c(0x1f9)](_0x6af38))[_0x3d6a2c(0x230)](),'unitId':_0x6af38,'threadId':_0x54ef58,'mention':_0x49d7f8,'content':_0x28d97f,'replyId':_0x89cf8b},_0x11ba68=await this[_0x3d6a2c(0x204)]['post'](_0x3d6a2c(0x252)+_0x6af38+_0x3d6a2c(0x211),{'body':_0x4b977a});return!_0x11ba68['body']['error']||_0x11ba68['body'][_0x3d6a2c(0x20c)][_0x3d6a2c(0x233)]===0x1;}async['resolveComment'](_0x3e1679){const _0x4e1aa5=_0x476a1b,{unitId:_0x238c62}=_0x3e1679,_0x1d6f76=_0x3e1679[_0x4e1aa5(0x201)],_0xa0d44f={'memberId':this['_userService'][_0x4e1aa5(0x218)]()['userID'],'unitId':_0x238c62,'threadId':_0x1d6f76,'solved':_0x3e1679[_0x4e1aa5(0x20d)]?I[_0x4e1aa5(0x245)]:I['OpenOrReOpen']},_0x11b4b1=await this[_0x4e1aa5(0x204)]['post'](_0x4e1aa5(0x252)+_0x238c62+_0x4e1aa5(0x232),{'body':_0xa0d44f});return!_0x11b4b1[_0x4e1aa5(0x202)][_0x4e1aa5(0x20c)]||_0x11b4b1['body'][_0x4e1aa5(0x20c)][_0x4e1aa5(0x233)]===0x1;}async[_0x476a1b(0x215)](_0x5e7039,_0x331ed1,_0x39661c,_0x2cdac6){const _0x289b4a=_0x476a1b,_0x4d83f9={'memberId':(await this[_0x289b4a(0x227)][_0x289b4a(0x1f9)](_0x5e7039))[_0x289b4a(0x230)](),'threadId':_0x39661c,'replyId':_0x2cdac6,'unitId':_0x5e7039},_0xea74ae=await this['_httpService'][_0x289b4a(0x1f3)](_0x289b4a(0x252)+_0x5e7039+_0x289b4a(0x256),{'body':_0x4d83f9});return!_0xea74ae[_0x289b4a(0x202)]['error']||_0xea74ae[_0x289b4a(0x202)][_0x289b4a(0x20c)][_0x289b4a(0x233)]===0x1;}async['listComments'](_0x588fc8,_0x54df54,_0x505a16){const _0xf1ea2d=_0x476a1b,_0x4312f7={'unitId':_0x588fc8,'threadId':_0x505a16},_0x405240=await this[_0xf1ea2d(0x204)][_0xf1ea2d(0x1f3)](_0xf1ea2d(0x252)+_0x588fc8+_0xf1ea2d(0x1f7),{'body':_0x4312f7}),_0x56d04c=_0x505a16[_0xf1ea2d(0x1f4)](_0x1cb48d=>ee(_0x405240[_0xf1ea2d(0x202)]['comments'][_0x1cb48d],_0x588fc8,_0x54df54))[_0xf1ea2d(0x22b)](Boolean);return Object['values'](_0x405240[_0xf1ea2d(0x202)]['users'])[_0xf1ea2d(0x23e)](_0x55abf6=>{const _0x39fa3a=_0xf1ea2d;this['_userService'][_0x39fa3a(0x231)](_0x55abf6);}),_0x56d04c;}[_0x476a1b(0x21b)](_0xc48806){const _0xf48ef7=_0x476a1b;return{'id':_0xc48806['id'],'threadId':_0xc48806[_0xf48ef7(0x201)],'ref':_0xc48806[_0xf48ef7(0x1f6)]};}};S=Q([b(0x0,_0x165b97(_0x557a77)),b(0x1,_0x165b97(_0x2ea414)),b(0x2,_0x165b97(_0x58eb6f))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x811429,_0x138007,_0x335ec3,_0x3b1248)=>{const _0x322152=_0x476a1b;for(var _0x614e4d=_0x3b1248>0x1?void 0x0:_0x3b1248?re(_0x138007,_0x335ec3):_0x138007,_0xb87bb=_0x811429[_0x322152(0x206)]-0x1,_0x1bff44;_0xb87bb>=0x0;_0xb87bb--)(_0x1bff44=_0x811429[_0xb87bb])&&(_0x614e4d=_0x1bff44(_0x614e4d)||_0x614e4d);return _0x614e4d;},M=(_0x4abb7d,_0x2300a0)=>(_0x562620,_0x161fa5)=>_0x2300a0(_0x562620,_0x161fa5,_0x4abb7d);let f=class extends _0x47fbcc{constructor(_0xb6c66b,_0xd9bb63){const _0x1b1da3=_0x476a1b;super(),this[_0x1b1da3(0x21f)]=_0xb6c66b,this['_threadCommentDataSource']=_0xd9bb63,this[_0x1b1da3(0x24d)]();}[_0x476a1b(0x24d)](){const _0x28af48=_0x476a1b;this[_0x28af48(0x21f)][_0x28af48(0x208)]=this[_0x28af48(0x216)],this[_0x28af48(0x21f)][_0x28af48(0x258)]=!0x1;}};f=te([M(0x0,_0x327b3d),M(0x1,_0x165b97(S))],f);var se=Object[_0x476a1b(0x21e)],oe=Object[_0x476a1b(0x21d)],ne=(_0x3388c9,_0x265317,_0x5a2f8e)=>_0x265317 in _0x3388c9?se(_0x3388c9,_0x265317,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5a2f8e}):_0x3388c9[_0x265317]=_0x5a2f8e,ie=(_0x49c254,_0x577b0d,_0x1d005b,_0x57dde8)=>{const _0x2307f5=_0x476a1b;for(var _0x2e6b8c=_0x57dde8>0x1?void 0x0:_0x57dde8?oe(_0x577b0d,_0x1d005b):_0x577b0d,_0x4bfe42=_0x49c254[_0x2307f5(0x206)]-0x1,_0x275815;_0x4bfe42>=0x0;_0x4bfe42--)(_0x275815=_0x49c254[_0x4bfe42])&&(_0x2e6b8c=_0x275815(_0x2e6b8c)||_0x2e6b8c);return _0x2e6b8c;},N=(_0x2eee50,_0x38f2ec)=>(_0x30a3c0,_0x340de6)=>_0x38f2ec(_0x30a3c0,_0x340de6,_0x2eee50),$=(_0x7f4b63,_0x157e69,_0x2b8b41)=>ne(_0x7f4b63,typeof _0x157e69!=_0x476a1b(0x253)?_0x157e69+'':_0x157e69,_0x2b8b41);let g=class extends _0x10cffd{constructor(_0x294b6b=O,_0x10d6a1,_0xcd9b){const _0x524fc2=_0x476a1b;super(),this[_0x524fc2(0x203)]=_0x294b6b,this[_0x524fc2(0x254)]=_0x10d6a1,this[_0x524fc2(0x22f)]=_0xcd9b;const {..._0x1e0dd8}=_0x58d02d({},O,this[_0x524fc2(0x203)]);this[_0x524fc2(0x22f)][_0x524fc2(0x21a)](z,_0x1e0dd8);}[_0x476a1b(0x240)](){const _0x1da041=_0x476a1b;[[S],[f],[_]][_0x1da041(0x23e)](_0x21757c=>{const _0x1d24b2=_0x1da041;this['_injector'][_0x1d24b2(0x228)](_0x21757c);});}[_0x476a1b(0x23d)](){const _0x553afa=_0x476a1b;this['_injector'][_0x553afa(0x24b)](f),this['_injector'][_0x553afa(0x24b)](_);}};$(g,'pluginName',W),$(g,_0x476a1b(0x259),_0x422e7a['UNIVER_UNKNOWN']),g=ie([_0x261282(_0x55c100,_0x3d8f69,_0x40423d),N(0x1,_0x165b97(_0x4ed0dc)),N(0x2,_0x737bff)],g);function _0x5f43(){const _0x11481a=['resolveComment','disposeWithMe','error','resolved','YYYY/MM/DD\x20HH:mm','pipe','/reply','/edit','payload','getUnit','unitId','deleteComment','_threadCommentDataSource','solved','getCurrentUser','delete','setConfig','saveCommentToSnapshot','269017BumVUf','getOwnPropertyDescriptor','defineProperty','_threadCommentDataSourceService','rangeId','_init','thread-comment-data-source.config','personId','/add','_threadCommentModel','3lxkpxE','_sessionService','add','format','UNRECOGNIZED','filter','root','parse','content','_configService','getMemberID','addUser','/solved','code','17460PvxrQb','COMMENT','_commentService','Reply','addComment','OpenOrReOpen','Edit','Delete','updateComment','onReady','forEach','rangeType','onStarting','2363538qXzAMy','parentId','12856fgoOTt','Unknown','Solved','Solve','Add','user','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','replies','get','commentUpdate$','_initDataSource','comment','_userService','_initUserSync','3396854wHbLjC','/universer-api/comment/unit/','symbol','_injector','find','/delete','/universer-api/user/list','syncUpdateMutationToColla','type','post','map','getComment','ref','/list','size','requireSession','replyId','5355bVgwyJ','createTimestamp','customRanges','91DDGJVB','userId','8339480QpDUnO','threadId','body','_config','_httpService','subscribe','length','5262988xTOsYp','dataSource','stringify'];_0x5f43=function(){return _0x11481a;};return _0x5f43();}export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x25faa0=_0x30b4;(function(_0xa99cc1,_0x52040a){const _0x17ca33=_0x30b4,_0x4a215d=_0xa99cc1();while(!![]){try{const _0x59f580=parseInt(_0x17ca33(0x1e7))/0x1+-parseInt(_0x17ca33(0x202))/0x2*(parseInt(_0x17ca33(0x22f))/0x3)+parseInt(_0x17ca33(0x21c))/0x4*(parseInt(_0x17ca33(0x232))/0x5)+-parseInt(_0x17ca33(0x223))/0x6*(parseInt(_0x17ca33(0x248))/0x7)+parseInt(_0x17ca33(0x1ec))/0x8*(-parseInt(_0x17ca33(0x23e))/0x9)+-parseInt(_0x17ca33(0x20b))/0xa+parseInt(_0x17ca33(0x249))/0xb;if(_0x59f580===_0x52040a)break;else _0x4a215d['push'](_0x4a215d['shift']());}catch(_0x176779){_0x4a215d['push'](_0x4a215d['shift']());}}}(_0x34aa,0x9e461));import{CommentService as _0xa2ebfd,CollaborationSessionService as _0x6ebfb5,UniverCollaborationClientPlugin as _0x4d0826}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x6f90f6}from'@univerjs-pro/license';import{dayjs as _0x5f5b37,UserManagerService as _0x3f7db5,Inject as _0xc9741e,Injector as _0x54bd73,Disposable as _0x25aa90,CustomRangeType as _0x2b4870,UniverInstanceType as _0x4e65bc,DependentOn as _0x125195,IConfigService as _0x4521b1,Plugin as _0x542bcc,merge as _0x7d8ac9}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2d4016}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5a9473,IThreadCommentDataSourceService as _0x18a375}from'@univerjs/thread-comment';import{bufferTime as _0x5e308e}from'rxjs';function _0x30b4(_0x43136d,_0x4460d4){const _0x34aaeb=_0x34aa();return _0x30b4=function(_0x30b47b,_0x4ee0b0){_0x30b47b=_0x30b47b-0x1de;let _0x18f0ad=_0x34aaeb[_0x30b47b];return _0x18f0ad;},_0x30b4(_0x43136d,_0x4460d4);}import{HTTPService as _0x3bbb43}from'@univerjs/network';const W=_0x25faa0(0x235);var I=(_0x3b8563=>(_0x3b8563[_0x3b8563[_0x25faa0(0x1fd)]=0x0]='OpenOrReOpen',_0x3b8563[_0x3b8563['Solved']=0x1]='Solved',_0x3b8563[_0x3b8563[_0x25faa0(0x241)]=-0x1]=_0x25faa0(0x241),_0x3b8563))(I||{}),v=(_0x42e44f=>(_0x42e44f[_0x42e44f[_0x25faa0(0x227)]=0x0]=_0x25faa0(0x227),_0x42e44f[_0x42e44f['Add']=0x1]='Add',_0x42e44f[_0x42e44f[_0x25faa0(0x215)]=0x2]=_0x25faa0(0x215),_0x42e44f[_0x42e44f[_0x25faa0(0x216)]=0x3]=_0x25faa0(0x216),_0x42e44f[_0x42e44f['Delete']=0x4]=_0x25faa0(0x236),_0x42e44f[_0x42e44f[_0x25faa0(0x22e)]=0x5]=_0x25faa0(0x22e),_0x42e44f[_0x42e44f[_0x25faa0(0x241)]=-0x1]=_0x25faa0(0x241),_0x42e44f))(v||{});const y=_0x58a32e=>_0x5f5b37(new Date(+_0x58a32e))[_0x25faa0(0x1e0)](_0x25faa0(0x1ed)),B=async(_0x17e8ed,_0x4b6bc6)=>{const _0x4faf91=_0x25faa0,_0x25123a=_0x17e8ed[_0x4faf91(0x1f8)](_0x3f7db5),_0xe17c12=_0x17e8ed[_0x4faf91(0x1f8)](_0x3bbb43);_0x4b6bc6['forEach'](_0x33f45b=>{const _0x42367f=_0x4faf91;_0x25123a[_0x42367f(0x22c)](_0x33f45b)&&_0x4b6bc6[_0x42367f(0x1e5)](_0x33f45b);}),_0x4b6bc6['size']&&(await _0xe17c12['get'](_0x4faf91(0x237),{'params':{'userIDs':[..._0x4b6bc6]}}))['body'][_0x4faf91(0x1e6)][_0x4faf91(0x1e8)](_0xe32af3=>{_0xe32af3&&_0x25123a['addUser'](_0xe32af3);});};var K=Object[_0x25faa0(0x238)],V=(_0xe86f59,_0x4c6ffc,_0x2c840c,_0x1cf7d3)=>{const _0x321d21=_0x25faa0;for(var _0x294a54=_0x1cf7d3>0x1?void 0x0:_0x1cf7d3?K(_0x4c6ffc,_0x2c840c):_0x4c6ffc,_0x5ba2a1=_0xe86f59[_0x321d21(0x203)]-0x1,_0x5511db;_0x5ba2a1>=0x0;_0x5ba2a1--)(_0x5511db=_0xe86f59[_0x5ba2a1])&&(_0x294a54=_0x5511db(_0x294a54)||_0x294a54);return _0x294a54;},p=(_0x3e5f7e,_0x199364)=>(_0x3a7908,_0x2fbc3b)=>_0x199364(_0x3a7908,_0x2fbc3b,_0x3e5f7e);let _=class extends _0x25aa90{constructor(_0x3a14b5,_0x366f0a,_0x2ecc78,_0x5a5439){const _0x3d6cd7=_0x25faa0;super(),this[_0x3d6cd7(0x243)]=_0x3a14b5,this[_0x3d6cd7(0x20e)]=_0x366f0a,this['_userService']=_0x2ecc78,this[_0x3d6cd7(0x22a)]=_0x5a5439,this[_0x3d6cd7(0x1f6)](),this[_0x3d6cd7(0x1f3)]();}[_0x25faa0(0x1f3)](){const _0x4968e3=_0x25faa0;this[_0x4968e3(0x1fb)](this['_threadCommentModel'][_0x4968e3(0x1f2)][_0x4968e3(0x229)](_0x5e308e(0x10))['subscribe'](_0x2ec4b6=>{const _0x564076=_0x4968e3,_0x4bdbca=new Set();_0x2ec4b6[_0x564076(0x1e8)](_0x28b5ac=>{const _0x1320b0=_0x564076;switch(_0x28b5ac[_0x1320b0(0x22b)]){case _0x1320b0(0x23d):{const _0x3f7d51=_0x28b5ac[_0x1320b0(0x219)][_0x1320b0(0x23c)];_0x4bdbca[_0x1320b0(0x23d)](_0x3f7d51);break;}}}),B(this[_0x564076(0x22a)],_0x4bdbca);}));}[_0x25faa0(0x1f6)](){const _0x3be1d6=_0x25faa0;this['disposeWithMe'](this[_0x3be1d6(0x243)][_0x3be1d6(0x1f2)][_0x3be1d6(0x209)](async _0x33ac03=>{const _0x4ed2bc=_0x3be1d6;var _0x4706d3,_0x40a8e1,_0x51b853,_0x28f354;const _0x5ae392=(_0x4706d3=this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x231)](_0x33ac03[_0x4ed2bc(0x1e4)])[_0x4ed2bc(0x20d)](_0x13c896=>_0x13c896[_0x4ed2bc(0x245)]===_0x33ac03[_0x4ed2bc(0x245)]))==null?void 0x0:_0x4706d3[_0x4ed2bc(0x23b)];if(!_0x5ae392)return;const {unitId:_0x54b011,subUnitId:_0x20a96c}=_0x5ae392;switch(_0x33ac03[_0x4ed2bc(0x212)]&&this[_0x4ed2bc(0x225)]['addUser'](_0x33ac03['user']),_0x33ac03[_0x4ed2bc(0x22b)]){case v[_0x4ed2bc(0x246)]:break;case v[_0x4ed2bc(0x215)]:{this['_threadCommentModel']['addComment'](_0x54b011,_0x20a96c,{'unitId':_0x54b011,'subUnitId':_0x20a96c,'ref':'','id':_0x33ac03[_0x4ed2bc(0x21d)],'dT':y(+_0x33ac03['createTimestamp']),'threadId':_0x33ac03[_0x4ed2bc(0x245)],'personId':(_0x51b853=(_0x40a8e1=_0x33ac03[_0x4ed2bc(0x212)])==null?void 0x0:_0x40a8e1[_0x4ed2bc(0x1f0)])!=null?_0x51b853:_0x33ac03[_0x4ed2bc(0x1de)],'text':JSON['parse'](_0x33ac03['content']),'parentId':_0x5ae392['id']});break;}case v[_0x4ed2bc(0x236)]:{const _0x4f5fdb=this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x234)](_0x54b011,_0x20a96c,_0x33ac03['replyId']);_0x4f5fdb&&_0x4f5fdb[_0x4ed2bc(0x1fa)]&&this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x21e)](_0x54b011,_0x20a96c,_0x33ac03[_0x4ed2bc(0x21d)]);break;}case v['Edit']:{this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x210)](_0x54b011,_0x20a96c,{'commentId':_0x33ac03[_0x4ed2bc(0x21d)],'text':JSON[_0x4ed2bc(0x201)](_0x33ac03[_0x4ed2bc(0x230)])});break;}case v['Solve']:{const _0x40bb85=(_0x28f354=this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x231)](_0x33ac03[_0x4ed2bc(0x1e4)])[_0x4ed2bc(0x20d)](_0xf82527=>_0xf82527[_0x4ed2bc(0x245)]===_0x33ac03[_0x4ed2bc(0x245)]))==null?void 0x0:_0x28f354[_0x4ed2bc(0x23b)];_0x40bb85&&this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x213)](_0x54b011,_0x20a96c,_0x40bb85['id'],_0x33ac03['solved']===I[_0x4ed2bc(0x1f4)]);break;}}}));}};_=V([p(0x0,_0xc9741e(_0xa2ebfd)),p(0x1,_0xc9741e(_0x5a9473)),p(0x2,_0xc9741e(_0x3f7db5)),p(0x3,_0xc9741e(_0x54bd73))],_);const z=_0x25faa0(0x221),O={};var k=Object[_0x25faa0(0x238)],Q=(_0x50458b,_0x2cfa27,_0x165052,_0x2cb40f)=>{const _0x561009=_0x25faa0;for(var _0x1ebc4e=_0x2cb40f>0x1?void 0x0:_0x2cb40f?k(_0x2cfa27,_0x165052):_0x2cfa27,_0x1459c9=_0x50458b[_0x561009(0x203)]-0x1,_0x5e1865;_0x1459c9>=0x0;_0x1459c9--)(_0x5e1865=_0x50458b[_0x1459c9])&&(_0x1ebc4e=_0x5e1865(_0x1ebc4e)||_0x1ebc4e);return _0x1ebc4e;},b=(_0x8caf4f,_0x5dcebf)=>(_0x42d5bd,_0x135186)=>_0x5dcebf(_0x42d5bd,_0x135186,_0x8caf4f);function X(_0x1abb62,_0x242971){const _0x4cd15f=_0x25faa0,_0x159188=_0x1abb62[_0x4cd15f(0x208)][0x0];return{..._0x242971,'id':_0x159188[_0x4cd15f(0x21d)],'resolved':_0x1abb62[_0x4cd15f(0x1f7)]===0x1,'dT':y(_0x159188[_0x4cd15f(0x1f5)]),'personId':_0x159188[_0x4cd15f(0x1de)],'threadId':_0x159188[_0x4cd15f(0x245)]};}function ee(_0x9ab101,_0x20675e,_0x219a65){const _0xb1361e=_0x25faa0;var _0xda8d60,_0x1308cf;if(((_0x1308cf=(_0xda8d60=_0x9ab101==null?void 0x0:_0x9ab101[_0xb1361e(0x208)])==null?void 0x0:_0xda8d60['length'])!=null?_0x1308cf:0x0)>0x0){const _0x3d84ab=(_0x5e253c,_0x260acc)=>({'id':_0x5e253c[_0xb1361e(0x21d)],'threadId':_0x5e253c[_0xb1361e(0x245)],'dT':y(_0x5e253c['createTimestamp']),'personId':_0x5e253c['userId'],'resolved':_0x9ab101[_0xb1361e(0x1f7)]===I[_0xb1361e(0x1f4)],'unitId':_0x20675e,'subUnitId':_0x219a65,'text':JSON[_0xb1361e(0x201)](_0x5e253c[_0xb1361e(0x230)]),'parentId':_0x260acc}),_0x516cad=_0x3d84ab(_0x9ab101[_0xb1361e(0x208)][0x0]);return{..._0x516cad,'children':_0x9ab101[_0xb1361e(0x208)][_0xb1361e(0x1fe)](0x1)[_0xb1361e(0x204)](_0x19c60b=>_0x3d84ab(_0x19c60b,_0x516cad['id']))};}return null;}let S=class{constructor(_0x5163d6,_0x1c96ab,_0x54eac6){const _0x1a4021=_0x25faa0;this[_0x1a4021(0x220)]=_0x5163d6,this[_0x1a4021(0x225)]=_0x1c96ab,this['_sessionService']=_0x54eac6;}async[_0x25faa0(0x1df)](_0xb52cc5){const _0x5cbebd=_0x25faa0;var _0x2b7bf9,_0x3a4fa9;const {parentId:_0x2a52a4,unitId:_0x2a5aa8,text:_0x37759b,threadId:_0x3a0471}=_0xb52cc5,_0x2a485a=(_0x3a4fa9=(_0x2b7bf9=_0x37759b[_0x5cbebd(0x23f)])==null?void 0x0:_0x2b7bf9[_0x5cbebd(0x233)](_0x22af43=>_0x22af43[_0x5cbebd(0x1fc)]===_0x2b4870[_0x5cbebd(0x226)])[_0x5cbebd(0x204)](_0x67caea=>_0x67caea[_0x5cbebd(0x207)]))!=null?_0x3a4fa9:[],_0x462f99=JSON[_0x5cbebd(0x23a)](_0x37759b),_0x14b7c0=(await this[_0x5cbebd(0x200)][_0x5cbebd(0x1ea)](_0x2a5aa8))['getMemberID']();if(_0x2a52a4){const _0x5141e0={'memberId':_0x14b7c0,'unitId':_0x2a5aa8,'content':_0x462f99,'mention':_0x2a485a,'threadId':_0x3a0471},_0x3231c2=(await this[_0x5cbebd(0x220)][_0x5cbebd(0x1f9)](_0x5cbebd(0x20a)+_0x2a5aa8+_0x5cbebd(0x1ee),{'body':_0x5141e0}))[_0x5cbebd(0x247)][_0x5cbebd(0x217)];return{..._0xb52cc5,'id':_0x3231c2[_0x5cbebd(0x21d)],'dT':_0x5f5b37(+_0x3231c2['createTimestamp'])[_0x5cbebd(0x1e0)](_0x5cbebd(0x1ed)),'personId':_0x3231c2['userId']};}else{const _0x1d36f4={'memberId':_0x14b7c0,'unitId':_0x2a5aa8,'content':_0x462f99,'mention':_0x2a485a},_0x1b2cd8=await this[_0x5cbebd(0x220)][_0x5cbebd(0x1f9)](_0x5cbebd(0x20a)+_0x2a5aa8+'/add',{'body':_0x1d36f4});return X(_0x1b2cd8[_0x5cbebd(0x247)][_0x5cbebd(0x242)],_0xb52cc5);}}async[_0x25faa0(0x210)](_0x25c88c){const _0x2e7441=_0x25faa0;var _0x154a7a,_0x5d039e;const {text:_0x35c186,unitId:_0x2a417d}=_0x25c88c,_0x68aa8=(_0x5d039e=(_0x154a7a=_0x35c186[_0x2e7441(0x23f)])==null?void 0x0:_0x154a7a['filter'](_0x19a6bc=>_0x19a6bc[_0x2e7441(0x1fc)]===_0x2b4870[_0x2e7441(0x226)])['map'](_0x562c31=>_0x562c31[_0x2e7441(0x207)]))!=null?_0x5d039e:[],_0x566172=JSON[_0x2e7441(0x23a)](_0x35c186),_0x3651dd=_0x25c88c[_0x2e7441(0x245)],_0x2e4d32=_0x25c88c['id'],_0x3cf0f3={'memberId':(await this[_0x2e7441(0x200)]['requireSession'](_0x2a417d))[_0x2e7441(0x22d)](),'unitId':_0x2a417d,'threadId':_0x3651dd,'mention':_0x68aa8,'content':_0x566172,'replyId':_0x2e4d32},_0x25d94a=await this[_0x2e7441(0x220)][_0x2e7441(0x1f9)](_0x2e7441(0x20a)+_0x2a417d+_0x2e7441(0x1e1),{'body':_0x3cf0f3});return!_0x25d94a[_0x2e7441(0x247)]['error']||_0x25d94a['body'][_0x2e7441(0x1e2)][_0x2e7441(0x214)]===0x1;}async[_0x25faa0(0x213)](_0x2e00fb){const _0x4d500b=_0x25faa0,{unitId:_0xd4084a}=_0x2e00fb,_0x139da7=_0x2e00fb[_0x4d500b(0x245)],_0xf4632={'memberId':this[_0x4d500b(0x225)][_0x4d500b(0x1ef)]()[_0x4d500b(0x1f0)],'unitId':_0xd4084a,'threadId':_0x139da7,'solved':_0x2e00fb[_0x4d500b(0x224)]?I[_0x4d500b(0x1f4)]:I[_0x4d500b(0x1fd)]},_0x4bed30=await this['_httpService']['post']('/universer-api/comment/unit/'+_0xd4084a+_0x4d500b(0x21a),{'body':_0xf4632});return!_0x4bed30[_0x4d500b(0x247)][_0x4d500b(0x1e2)]||_0x4bed30[_0x4d500b(0x247)][_0x4d500b(0x1e2)]['code']===0x1;}async[_0x25faa0(0x21e)](_0x4657da,_0x5219b2,_0x3709a2,_0x91b25b){const _0x502ce2=_0x25faa0,_0x134b6d={'memberId':(await this[_0x502ce2(0x200)][_0x502ce2(0x1ea)](_0x4657da))[_0x502ce2(0x22d)](),'threadId':_0x3709a2,'replyId':_0x91b25b,'unitId':_0x4657da},_0x1404d8=await this[_0x502ce2(0x220)][_0x502ce2(0x1f9)](_0x502ce2(0x20a)+_0x4657da+_0x502ce2(0x239),{'body':_0x134b6d});return!_0x1404d8[_0x502ce2(0x247)][_0x502ce2(0x1e2)]||_0x1404d8[_0x502ce2(0x247)][_0x502ce2(0x1e2)]['code']===0x1;}async[_0x25faa0(0x206)](_0x24b97c,_0x2dc250,_0x242496){const _0x38b732=_0x25faa0,_0x41e338={'unitId':_0x24b97c,'threadId':_0x242496},_0x352d02=await this[_0x38b732(0x220)]['post'](_0x38b732(0x20a)+_0x24b97c+_0x38b732(0x211),{'body':_0x41e338}),_0x242e84=_0x242496[_0x38b732(0x204)](_0x564114=>ee(_0x352d02[_0x38b732(0x247)][_0x38b732(0x20f)][_0x564114],_0x24b97c,_0x2dc250))[_0x38b732(0x233)](Boolean);return Object[_0x38b732(0x222)](_0x352d02[_0x38b732(0x247)][_0x38b732(0x1e6)])[_0x38b732(0x1e8)](_0x1013da=>{const _0x136fe6=_0x38b732;this[_0x136fe6(0x225)]['addUser'](_0x1013da);}),_0x242e84;}[_0x25faa0(0x218)](_0x241013){const _0x474e19=_0x25faa0;return{'id':_0x241013['id'],'threadId':_0x241013['threadId'],'ref':_0x241013[_0x474e19(0x1f1)]};}};S=Q([b(0x0,_0xc9741e(_0x3bbb43)),b(0x1,_0xc9741e(_0x3f7db5)),b(0x2,_0xc9741e(_0x6ebfb5))],S);var re=Object[_0x25faa0(0x238)],te=(_0x35be7e,_0x5219d3,_0x59eb15,_0x552ca1)=>{const _0x14fbef=_0x25faa0;for(var _0x5a7101=_0x552ca1>0x1?void 0x0:_0x552ca1?re(_0x5219d3,_0x59eb15):_0x5219d3,_0x486000=_0x35be7e[_0x14fbef(0x203)]-0x1,_0x344a87;_0x486000>=0x0;_0x486000--)(_0x344a87=_0x35be7e[_0x486000])&&(_0x5a7101=_0x344a87(_0x5a7101)||_0x5a7101);return _0x5a7101;},M=(_0x49bb4f,_0x6e02e1)=>(_0x5e1e70,_0x5c86c0)=>_0x6e02e1(_0x5e1e70,_0x5c86c0,_0x49bb4f);let f=class extends _0x25aa90{constructor(_0x54fbfa,_0x5e24da){const _0x119e83=_0x25faa0;super(),this[_0x119e83(0x228)]=_0x54fbfa,this['_threadCommentDataSource']=_0x5e24da,this[_0x119e83(0x21f)]();}[_0x25faa0(0x21f)](){const _0x38512b=_0x25faa0;this[_0x38512b(0x228)][_0x38512b(0x240)]=this['_threadCommentDataSource'],this[_0x38512b(0x228)][_0x38512b(0x20c)]=!0x1;}};f=te([M(0x0,_0x18a375),M(0x1,_0xc9741e(S))],f);var se=Object[_0x25faa0(0x1eb)],oe=Object[_0x25faa0(0x238)],ne=(_0x2f075d,_0x407807,_0x5bdfad)=>_0x407807 in _0x2f075d?se(_0x2f075d,_0x407807,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5bdfad}):_0x2f075d[_0x407807]=_0x5bdfad,ie=(_0x5425e8,_0x43c3fc,_0x473feb,_0x289190)=>{for(var _0x21f9a4=_0x289190>0x1?void 0x0:_0x289190?oe(_0x43c3fc,_0x473feb):_0x43c3fc,_0x5caa96=_0x5425e8['length']-0x1,_0x2f59b6;_0x5caa96>=0x0;_0x5caa96--)(_0x2f59b6=_0x5425e8[_0x5caa96])&&(_0x21f9a4=_0x2f59b6(_0x21f9a4)||_0x21f9a4);return _0x21f9a4;},N=(_0x288a79,_0xea4ffc)=>(_0x1e91e2,_0x3d09ec)=>_0xea4ffc(_0x1e91e2,_0x3d09ec,_0x288a79),$=(_0x57b778,_0x3c5bce,_0x418876)=>ne(_0x57b778,typeof _0x3c5bce!=_0x25faa0(0x21b)?_0x3c5bce+'':_0x3c5bce,_0x418876);let g=class extends _0x542bcc{constructor(_0x7c60fc=O,_0x1077ab,_0x34158d){const _0x414784=_0x25faa0;super(),this['_config']=_0x7c60fc,this[_0x414784(0x22a)]=_0x1077ab,this[_0x414784(0x1e3)]=_0x34158d;const {..._0x5d39e9}=_0x7d8ac9({},O,this[_0x414784(0x244)]);this[_0x414784(0x1e3)][_0x414784(0x24a)](z,_0x5d39e9);}[_0x25faa0(0x205)](){[[S],[f],[_]]['forEach'](_0x4e1af1=>{this['_injector']['add'](_0x4e1af1);});}['onReady'](){const _0x4b9be4=_0x25faa0;this[_0x4b9be4(0x22a)]['get'](f),this[_0x4b9be4(0x22a)][_0x4b9be4(0x1f8)](_);}};$(g,_0x25faa0(0x1e9),W),$(g,'type',_0x4e65bc[_0x25faa0(0x1ff)]),g=ie([_0x125195(_0x2d4016,_0x4d0826,_0x6f90f6),N(0x1,_0xc9741e(_0x54bd73)),N(0x2,_0x4521b1)],g);function _0x34aa(){const _0x106170=['/universer-api/comment/unit/','10330120zRyNlM','syncUpdateMutationToColla','find','_threadCommentModel','comments','updateComment','/list','user','resolveComment','code','Reply','Edit','reply','saveCommentToSnapshot','payload','/solved','symbol','36FfdlLu','replyId','deleteComment','_initDataSource','_httpService','thread-comment-data-source.config','values','848622irycZg','resolved','_userService','COMMENT','Unknown','_threadCommentDataSourceService','pipe','_injector','type','getUser','getMemberID','Solve','241950cRwsKf','content','getUnit','234380oiXcum','filter','getComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Delete','/universer-api/user/list','getOwnPropertyDescriptor','/delete','stringify','root','personId','add','10771263tWvpGA','customRanges','dataSource','UNRECOGNIZED','comment','_commentService','_config','threadId','Add','body','7vUjGug','27992800iMJhhj','setConfig','userId','addComment','format','/edit','error','_configService','unitId','delete','users','778711NYDhET','forEach','pluginName','requireSession','defineProperty','8ZTkmMd','YYYY/MM/DD\x20HH:mm','/reply','getCurrentUser','userID','ref','commentUpdate$','_initUserSync','Solved','createTimestamp','_init','solved','get','post','parentId','disposeWithMe','rangeType','OpenOrReOpen','slice','UNIVER_UNKNOWN','_sessionService','parse','18dcFmTs','length','map','onStarting','listComments','rangeId','replies','subscribe'];_0x34aa=function(){return _0x106170;};return _0x34aa();}export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x476a1b=_0x43cd;(function(_0x4222fc,_0x26ed53){const _0x2f89ae=_0x43cd,_0x4c033b=_0x4222fc();while(!![]){try{const _0x373e92=parseInt(_0x2f89ae(0x21c))/0x1+parseInt(_0x2f89ae(0x251))/0x2*(parseInt(_0x2f89ae(0x226))/0x3)+-parseInt(_0x2f89ae(0x207))/0x4+parseInt(_0x2f89ae(0x200))/0x5+-parseInt(_0x2f89ae(0x241))/0x6+parseInt(_0x2f89ae(0x1fe))/0x7*(-parseInt(_0x2f89ae(0x243))/0x8)+-parseInt(_0x2f89ae(0x1fb))/0x9*(parseInt(_0x2f89ae(0x234))/0xa);if(_0x373e92===_0x26ed53)break;else _0x4c033b['push'](_0x4c033b['shift']());}catch(_0x31b07a){_0x4c033b['push'](_0x4c033b['shift']());}}}(_0x5f43,0xd3675));import{CommentService as _0x11b671,CollaborationSessionService as _0x58eb6f,UniverCollaborationClientPlugin as _0x3d8f69}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x40423d}from'@univerjs-pro/license';import{dayjs as _0x208711,UserManagerService as _0x2ea414,Inject as _0x165b97,Injector as _0x4ed0dc,Disposable as _0x47fbcc,CustomRangeType as _0x44d05f,UniverInstanceType as _0x422e7a,DependentOn as _0x261282,IConfigService as _0x737bff,Plugin as _0x10cffd,merge as _0x58d02d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x55c100}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x52514f,IThreadCommentDataSourceService as _0x327b3d}from'@univerjs/thread-comment';import{bufferTime as _0x344c26}from'rxjs';import{HTTPService as _0x557a77}from'@univerjs/network';const W=_0x476a1b(0x249);var I=(_0x7c4799=>(_0x7c4799[_0x7c4799[_0x476a1b(0x239)]=0x0]=_0x476a1b(0x239),_0x7c4799[_0x7c4799['Solved']=0x1]=_0x476a1b(0x245),_0x7c4799[_0x7c4799['UNRECOGNIZED']=-0x1]=_0x476a1b(0x22a),_0x7c4799))(I||{}),v=(_0xdbbd5d=>(_0xdbbd5d[_0xdbbd5d['Unknown']=0x0]=_0x476a1b(0x244),_0xdbbd5d[_0xdbbd5d['Add']=0x1]=_0x476a1b(0x247),_0xdbbd5d[_0xdbbd5d[_0x476a1b(0x237)]=0x2]='Reply',_0xdbbd5d[_0xdbbd5d[_0x476a1b(0x23a)]=0x3]=_0x476a1b(0x23a),_0xdbbd5d[_0xdbbd5d[_0x476a1b(0x23b)]=0x4]=_0x476a1b(0x23b),_0xdbbd5d[_0xdbbd5d[_0x476a1b(0x246)]=0x5]=_0x476a1b(0x246),_0xdbbd5d[_0xdbbd5d[_0x476a1b(0x22a)]=-0x1]=_0x476a1b(0x22a),_0xdbbd5d))(v||{});function _0x43cd(_0x126487,_0x256421){const _0x5f4370=_0x5f43();return _0x43cd=function(_0x43cdb1,_0x2dee4d){_0x43cdb1=_0x43cdb1-0x1f3;let _0x58bd4c=_0x5f4370[_0x43cdb1];return _0x58bd4c;},_0x43cd(_0x126487,_0x256421);}const y=_0xb66826=>_0x208711(new Date(+_0xb66826))[_0x476a1b(0x229)](_0x476a1b(0x20e)),B=async(_0x54c072,_0x9de6fe)=>{const _0x25049a=_0x476a1b,_0x1570e8=_0x54c072[_0x25049a(0x24b)](_0x2ea414),_0x4590ae=_0x54c072[_0x25049a(0x24b)](_0x557a77);_0x9de6fe['forEach'](_0x37e26a=>{const _0x43a24a=_0x25049a;_0x1570e8['getUser'](_0x37e26a)&&_0x9de6fe[_0x43a24a(0x219)](_0x37e26a);}),_0x9de6fe[_0x25049a(0x1f8)]&&(await _0x4590ae[_0x25049a(0x24b)](_0x25049a(0x257),{'params':{'userIDs':[..._0x9de6fe]}}))['body']['users'][_0x25049a(0x23e)](_0x3bced1=>{const _0x3b3534=_0x25049a;_0x3bced1&&_0x1570e8[_0x3b3534(0x231)](_0x3bced1);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x254e66,_0x304897,_0x2f9a99,_0x45745f)=>{const _0x3ae03d=_0x476a1b;for(var _0x25af33=_0x45745f>0x1?void 0x0:_0x45745f?K(_0x304897,_0x2f9a99):_0x304897,_0x1ea8cf=_0x254e66[_0x3ae03d(0x206)]-0x1,_0x43d2b5;_0x1ea8cf>=0x0;_0x1ea8cf--)(_0x43d2b5=_0x254e66[_0x1ea8cf])&&(_0x25af33=_0x43d2b5(_0x25af33)||_0x25af33);return _0x25af33;},p=(_0x3d35f,_0x24212b)=>(_0x3e8ab7,_0x58ed5d)=>_0x24212b(_0x3e8ab7,_0x58ed5d,_0x3d35f);let _=class extends _0x47fbcc{constructor(_0x5caa19,_0x23056e,_0x5f1fc9,_0x51b319){const _0xc6c608=_0x476a1b;super(),this[_0xc6c608(0x236)]=_0x5caa19,this[_0xc6c608(0x225)]=_0x23056e,this[_0xc6c608(0x24f)]=_0x5f1fc9,this[_0xc6c608(0x254)]=_0x51b319,this[_0xc6c608(0x221)](),this[_0xc6c608(0x250)]();}[_0x476a1b(0x250)](){const _0x182ee2=_0x476a1b;this[_0x182ee2(0x20b)](this[_0x182ee2(0x225)][_0x182ee2(0x24c)][_0x182ee2(0x20f)](_0x344c26(0x10))['subscribe'](_0xf1d615=>{const _0x2ae33d=_0x182ee2,_0x4ae1e3=new Set();_0xf1d615[_0x2ae33d(0x23e)](_0x4751f0=>{const _0x455b58=_0x2ae33d;switch(_0x4751f0[_0x455b58(0x259)]){case _0x455b58(0x228):{const _0x56f990=_0x4751f0[_0x455b58(0x212)][_0x455b58(0x223)];_0x4ae1e3[_0x455b58(0x228)](_0x56f990);break;}}}),B(this[_0x2ae33d(0x254)],_0x4ae1e3);}));}[_0x476a1b(0x221)](){const _0x5ed1b4=_0x476a1b;this[_0x5ed1b4(0x20b)](this['_commentService'][_0x5ed1b4(0x24c)][_0x5ed1b4(0x205)](async _0x2b3025=>{const _0x162727=_0x5ed1b4;var _0x714e6b,_0x1f56f3,_0x29bec3,_0x360c8c;const _0x489cbd=(_0x714e6b=this[_0x162727(0x225)]['getUnit'](_0x2b3025['unitId'])[_0x162727(0x255)](_0x2005fc=>_0x2005fc['threadId']===_0x2b3025['threadId']))==null?void 0x0:_0x714e6b[_0x162727(0x22c)];if(!_0x489cbd)return;const {unitId:_0x45a816,subUnitId:_0x22ee80}=_0x489cbd;switch(_0x2b3025[_0x162727(0x248)]&&this[_0x162727(0x24f)][_0x162727(0x231)](_0x2b3025['user']),_0x2b3025[_0x162727(0x259)]){case v[_0x162727(0x247)]:break;case v['Reply']:{this['_threadCommentModel'][_0x162727(0x238)](_0x45a816,_0x22ee80,{'unitId':_0x45a816,'subUnitId':_0x22ee80,'ref':'','id':_0x2b3025[_0x162727(0x1fa)],'dT':y(+_0x2b3025[_0x162727(0x1fc)]),'threadId':_0x2b3025[_0x162727(0x201)],'personId':(_0x29bec3=(_0x1f56f3=_0x2b3025['user'])==null?void 0x0:_0x1f56f3['userID'])!=null?_0x29bec3:_0x2b3025[_0x162727(0x1ff)],'text':JSON['parse'](_0x2b3025[_0x162727(0x22e)]),'parentId':_0x489cbd['id']});break;}case v[_0x162727(0x23b)]:{const _0x67ed48=this[_0x162727(0x225)][_0x162727(0x1f5)](_0x45a816,_0x22ee80,_0x2b3025[_0x162727(0x1fa)]);_0x67ed48&&_0x67ed48[_0x162727(0x242)]&&this[_0x162727(0x225)]['deleteComment'](_0x45a816,_0x22ee80,_0x2b3025[_0x162727(0x1fa)]);break;}case v[_0x162727(0x23a)]:{this[_0x162727(0x225)][_0x162727(0x23c)](_0x45a816,_0x22ee80,{'commentId':_0x2b3025[_0x162727(0x1fa)],'text':JSON['parse'](_0x2b3025[_0x162727(0x22e)])});break;}case v[_0x162727(0x246)]:{const _0x2199ce=(_0x360c8c=this[_0x162727(0x225)][_0x162727(0x213)](_0x2b3025[_0x162727(0x214)])[_0x162727(0x255)](_0x32e44e=>_0x32e44e[_0x162727(0x201)]===_0x2b3025[_0x162727(0x201)]))==null?void 0x0:_0x360c8c[_0x162727(0x22c)];_0x2199ce&&this[_0x162727(0x225)][_0x162727(0x20a)](_0x45a816,_0x22ee80,_0x2199ce['id'],_0x2b3025[_0x162727(0x217)]===I[_0x162727(0x245)]);break;}}}));}};_=V([p(0x0,_0x165b97(_0x11b671)),p(0x1,_0x165b97(_0x52514f)),p(0x2,_0x165b97(_0x2ea414)),p(0x3,_0x165b97(_0x4ed0dc))],_);const z=_0x476a1b(0x222),O={};var k=Object[_0x476a1b(0x21d)],Q=(_0x27e30a,_0x22d9de,_0x38896b,_0x28118e)=>{const _0xe233f6=_0x476a1b;for(var _0x4d0c1c=_0x28118e>0x1?void 0x0:_0x28118e?k(_0x22d9de,_0x38896b):_0x22d9de,_0x218ddb=_0x27e30a[_0xe233f6(0x206)]-0x1,_0x1bba95;_0x218ddb>=0x0;_0x218ddb--)(_0x1bba95=_0x27e30a[_0x218ddb])&&(_0x4d0c1c=_0x1bba95(_0x4d0c1c)||_0x4d0c1c);return _0x4d0c1c;},b=(_0x57ae43,_0x13af1a)=>(_0x4455e1,_0x2ede60)=>_0x13af1a(_0x4455e1,_0x2ede60,_0x57ae43);function X(_0x37c467,_0x21d174){const _0x42ec6a=_0x476a1b,_0x1b4401=_0x37c467['replies'][0x0];return{..._0x21d174,'id':_0x1b4401['replyId'],'resolved':_0x37c467[_0x42ec6a(0x217)]===0x1,'dT':y(_0x1b4401['createTimestamp']),'personId':_0x1b4401[_0x42ec6a(0x1ff)],'threadId':_0x1b4401[_0x42ec6a(0x201)]};}function ee(_0x5030c9,_0x52a48b,_0x3fd34b){const _0x5a33df=_0x476a1b;var _0x618e71,_0x5787fb;if(((_0x5787fb=(_0x618e71=_0x5030c9==null?void 0x0:_0x5030c9[_0x5a33df(0x24a)])==null?void 0x0:_0x618e71['length'])!=null?_0x5787fb:0x0)>0x0){const _0x143a1e=(_0x105f0d,_0x16896f)=>({'id':_0x105f0d['replyId'],'threadId':_0x105f0d[_0x5a33df(0x201)],'dT':y(_0x105f0d['createTimestamp']),'personId':_0x105f0d['userId'],'resolved':_0x5030c9[_0x5a33df(0x217)]===I[_0x5a33df(0x245)],'unitId':_0x52a48b,'subUnitId':_0x3fd34b,'text':JSON[_0x5a33df(0x22d)](_0x105f0d[_0x5a33df(0x22e)]),'parentId':_0x16896f}),_0x3b1d10=_0x143a1e(_0x5030c9[_0x5a33df(0x24a)][0x0]);return{..._0x3b1d10,'children':_0x5030c9[_0x5a33df(0x24a)]['slice'](0x1)['map'](_0x3eb3f1=>_0x143a1e(_0x3eb3f1,_0x3b1d10['id']))};}return null;}let S=class{constructor(_0x2f10ca,_0x904666,_0x500434){const _0x4a363f=_0x476a1b;this[_0x4a363f(0x204)]=_0x2f10ca,this[_0x4a363f(0x24f)]=_0x904666,this[_0x4a363f(0x227)]=_0x500434;}async[_0x476a1b(0x238)](_0x4c3c53){const _0xc04b97=_0x476a1b;var _0x17e770,_0x1b8ec6;const {parentId:_0x4685a1,unitId:_0xfae419,text:_0x16f01b,threadId:_0x1b6758}=_0x4c3c53,_0x551f69=(_0x1b8ec6=(_0x17e770=_0x16f01b[_0xc04b97(0x1fd)])==null?void 0x0:_0x17e770[_0xc04b97(0x22b)](_0x132b33=>_0x132b33[_0xc04b97(0x23f)]===_0x44d05f['COMMENT'])['map'](_0xc05c53=>_0xc05c53['rangeId']))!=null?_0x1b8ec6:[],_0x28bf1a=JSON[_0xc04b97(0x209)](_0x16f01b),_0x9a3169=(await this[_0xc04b97(0x227)]['requireSession'](_0xfae419))['getMemberID']();if(_0x4685a1){const _0x1f6a55={'memberId':_0x9a3169,'unitId':_0xfae419,'content':_0x28bf1a,'mention':_0x551f69,'threadId':_0x1b6758},_0x41dd34=(await this['_httpService']['post']('/universer-api/comment/unit/'+_0xfae419+_0xc04b97(0x210),{'body':_0x1f6a55}))['body']['reply'];return{..._0x4c3c53,'id':_0x41dd34[_0xc04b97(0x1fa)],'dT':_0x208711(+_0x41dd34['createTimestamp'])[_0xc04b97(0x229)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x41dd34['userId']};}else{const _0x367fc1={'memberId':_0x9a3169,'unitId':_0xfae419,'content':_0x28bf1a,'mention':_0x551f69},_0x2f313c=await this['_httpService']['post'](_0xc04b97(0x252)+_0xfae419+_0xc04b97(0x224),{'body':_0x367fc1});return X(_0x2f313c[_0xc04b97(0x202)][_0xc04b97(0x24e)],_0x4c3c53);}}async[_0x476a1b(0x23c)](_0x489d09){const _0x3d6a2c=_0x476a1b;var _0x40b812,_0x8e1bc4;const {text:_0x129877,unitId:_0x6af38}=_0x489d09,_0x49d7f8=(_0x8e1bc4=(_0x40b812=_0x129877[_0x3d6a2c(0x1fd)])==null?void 0x0:_0x40b812[_0x3d6a2c(0x22b)](_0x540307=>_0x540307[_0x3d6a2c(0x23f)]===_0x44d05f[_0x3d6a2c(0x235)])['map'](_0x180248=>_0x180248[_0x3d6a2c(0x220)]))!=null?_0x8e1bc4:[],_0x28d97f=JSON[_0x3d6a2c(0x209)](_0x129877),_0x54ef58=_0x489d09[_0x3d6a2c(0x201)],_0x89cf8b=_0x489d09['id'],_0x4b977a={'memberId':(await this[_0x3d6a2c(0x227)][_0x3d6a2c(0x1f9)](_0x6af38))[_0x3d6a2c(0x230)](),'unitId':_0x6af38,'threadId':_0x54ef58,'mention':_0x49d7f8,'content':_0x28d97f,'replyId':_0x89cf8b},_0x11ba68=await this[_0x3d6a2c(0x204)]['post'](_0x3d6a2c(0x252)+_0x6af38+_0x3d6a2c(0x211),{'body':_0x4b977a});return!_0x11ba68['body']['error']||_0x11ba68['body'][_0x3d6a2c(0x20c)][_0x3d6a2c(0x233)]===0x1;}async['resolveComment'](_0x3e1679){const _0x4e1aa5=_0x476a1b,{unitId:_0x238c62}=_0x3e1679,_0x1d6f76=_0x3e1679[_0x4e1aa5(0x201)],_0xa0d44f={'memberId':this['_userService'][_0x4e1aa5(0x218)]()['userID'],'unitId':_0x238c62,'threadId':_0x1d6f76,'solved':_0x3e1679[_0x4e1aa5(0x20d)]?I[_0x4e1aa5(0x245)]:I['OpenOrReOpen']},_0x11b4b1=await this[_0x4e1aa5(0x204)]['post'](_0x4e1aa5(0x252)+_0x238c62+_0x4e1aa5(0x232),{'body':_0xa0d44f});return!_0x11b4b1[_0x4e1aa5(0x202)][_0x4e1aa5(0x20c)]||_0x11b4b1['body'][_0x4e1aa5(0x20c)][_0x4e1aa5(0x233)]===0x1;}async[_0x476a1b(0x215)](_0x5e7039,_0x331ed1,_0x39661c,_0x2cdac6){const _0x289b4a=_0x476a1b,_0x4d83f9={'memberId':(await this[_0x289b4a(0x227)][_0x289b4a(0x1f9)](_0x5e7039))[_0x289b4a(0x230)](),'threadId':_0x39661c,'replyId':_0x2cdac6,'unitId':_0x5e7039},_0xea74ae=await this['_httpService'][_0x289b4a(0x1f3)](_0x289b4a(0x252)+_0x5e7039+_0x289b4a(0x256),{'body':_0x4d83f9});return!_0xea74ae[_0x289b4a(0x202)]['error']||_0xea74ae[_0x289b4a(0x202)][_0x289b4a(0x20c)][_0x289b4a(0x233)]===0x1;}async['listComments'](_0x588fc8,_0x54df54,_0x505a16){const _0xf1ea2d=_0x476a1b,_0x4312f7={'unitId':_0x588fc8,'threadId':_0x505a16},_0x405240=await this[_0xf1ea2d(0x204)][_0xf1ea2d(0x1f3)](_0xf1ea2d(0x252)+_0x588fc8+_0xf1ea2d(0x1f7),{'body':_0x4312f7}),_0x56d04c=_0x505a16[_0xf1ea2d(0x1f4)](_0x1cb48d=>ee(_0x405240[_0xf1ea2d(0x202)]['comments'][_0x1cb48d],_0x588fc8,_0x54df54))[_0xf1ea2d(0x22b)](Boolean);return Object['values'](_0x405240[_0xf1ea2d(0x202)]['users'])[_0xf1ea2d(0x23e)](_0x55abf6=>{const _0x39fa3a=_0xf1ea2d;this['_userService'][_0x39fa3a(0x231)](_0x55abf6);}),_0x56d04c;}[_0x476a1b(0x21b)](_0xc48806){const _0xf48ef7=_0x476a1b;return{'id':_0xc48806['id'],'threadId':_0xc48806[_0xf48ef7(0x201)],'ref':_0xc48806[_0xf48ef7(0x1f6)]};}};S=Q([b(0x0,_0x165b97(_0x557a77)),b(0x1,_0x165b97(_0x2ea414)),b(0x2,_0x165b97(_0x58eb6f))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x811429,_0x138007,_0x335ec3,_0x3b1248)=>{const _0x322152=_0x476a1b;for(var _0x614e4d=_0x3b1248>0x1?void 0x0:_0x3b1248?re(_0x138007,_0x335ec3):_0x138007,_0xb87bb=_0x811429[_0x322152(0x206)]-0x1,_0x1bff44;_0xb87bb>=0x0;_0xb87bb--)(_0x1bff44=_0x811429[_0xb87bb])&&(_0x614e4d=_0x1bff44(_0x614e4d)||_0x614e4d);return _0x614e4d;},M=(_0x4abb7d,_0x2300a0)=>(_0x562620,_0x161fa5)=>_0x2300a0(_0x562620,_0x161fa5,_0x4abb7d);let f=class extends _0x47fbcc{constructor(_0xb6c66b,_0xd9bb63){const _0x1b1da3=_0x476a1b;super(),this[_0x1b1da3(0x21f)]=_0xb6c66b,this['_threadCommentDataSource']=_0xd9bb63,this[_0x1b1da3(0x24d)]();}[_0x476a1b(0x24d)](){const _0x28af48=_0x476a1b;this[_0x28af48(0x21f)][_0x28af48(0x208)]=this[_0x28af48(0x216)],this[_0x28af48(0x21f)][_0x28af48(0x258)]=!0x1;}};f=te([M(0x0,_0x327b3d),M(0x1,_0x165b97(S))],f);var se=Object[_0x476a1b(0x21e)],oe=Object[_0x476a1b(0x21d)],ne=(_0x3388c9,_0x265317,_0x5a2f8e)=>_0x265317 in _0x3388c9?se(_0x3388c9,_0x265317,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5a2f8e}):_0x3388c9[_0x265317]=_0x5a2f8e,ie=(_0x49c254,_0x577b0d,_0x1d005b,_0x57dde8)=>{const _0x2307f5=_0x476a1b;for(var _0x2e6b8c=_0x57dde8>0x1?void 0x0:_0x57dde8?oe(_0x577b0d,_0x1d005b):_0x577b0d,_0x4bfe42=_0x49c254[_0x2307f5(0x206)]-0x1,_0x275815;_0x4bfe42>=0x0;_0x4bfe42--)(_0x275815=_0x49c254[_0x4bfe42])&&(_0x2e6b8c=_0x275815(_0x2e6b8c)||_0x2e6b8c);return _0x2e6b8c;},N=(_0x2eee50,_0x38f2ec)=>(_0x30a3c0,_0x340de6)=>_0x38f2ec(_0x30a3c0,_0x340de6,_0x2eee50),$=(_0x7f4b63,_0x157e69,_0x2b8b41)=>ne(_0x7f4b63,typeof _0x157e69!=_0x476a1b(0x253)?_0x157e69+'':_0x157e69,_0x2b8b41);let g=class extends _0x10cffd{constructor(_0x294b6b=O,_0x10d6a1,_0xcd9b){const _0x524fc2=_0x476a1b;super(),this[_0x524fc2(0x203)]=_0x294b6b,this[_0x524fc2(0x254)]=_0x10d6a1,this[_0x524fc2(0x22f)]=_0xcd9b;const {..._0x1e0dd8}=_0x58d02d({},O,this[_0x524fc2(0x203)]);this[_0x524fc2(0x22f)][_0x524fc2(0x21a)](z,_0x1e0dd8);}[_0x476a1b(0x240)](){const _0x1da041=_0x476a1b;[[S],[f],[_]][_0x1da041(0x23e)](_0x21757c=>{const _0x1d24b2=_0x1da041;this['_injector'][_0x1d24b2(0x228)](_0x21757c);});}[_0x476a1b(0x23d)](){const _0x553afa=_0x476a1b;this['_injector'][_0x553afa(0x24b)](f),this['_injector'][_0x553afa(0x24b)](_);}};$(g,'pluginName',W),$(g,_0x476a1b(0x259),_0x422e7a['UNIVER_UNKNOWN']),g=ie([_0x261282(_0x55c100,_0x3d8f69,_0x40423d),N(0x1,_0x165b97(_0x4ed0dc)),N(0x2,_0x737bff)],g);function _0x5f43(){const _0x11481a=['resolveComment','disposeWithMe','error','resolved','YYYY/MM/DD\x20HH:mm','pipe','/reply','/edit','payload','getUnit','unitId','deleteComment','_threadCommentDataSource','solved','getCurrentUser','delete','setConfig','saveCommentToSnapshot','269017BumVUf','getOwnPropertyDescriptor','defineProperty','_threadCommentDataSourceService','rangeId','_init','thread-comment-data-source.config','personId','/add','_threadCommentModel','3lxkpxE','_sessionService','add','format','UNRECOGNIZED','filter','root','parse','content','_configService','getMemberID','addUser','/solved','code','17460PvxrQb','COMMENT','_commentService','Reply','addComment','OpenOrReOpen','Edit','Delete','updateComment','onReady','forEach','rangeType','onStarting','2363538qXzAMy','parentId','12856fgoOTt','Unknown','Solved','Solve','Add','user','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','replies','get','commentUpdate$','_initDataSource','comment','_userService','_initUserSync','3396854wHbLjC','/universer-api/comment/unit/','symbol','_injector','find','/delete','/universer-api/user/list','syncUpdateMutationToColla','type','post','map','getComment','ref','/list','size','requireSession','replyId','5355bVgwyJ','createTimestamp','customRanges','91DDGJVB','userId','8339480QpDUnO','threadId','body','_config','_httpService','subscribe','length','5262988xTOsYp','dataSource','stringify'];_0x5f43=function(){return _0x11481a;};return _0x5f43();}export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x25faa0=_0x30b4;(function(_0xa99cc1,_0x52040a){const _0x17ca33=_0x30b4,_0x4a215d=_0xa99cc1();while(!![]){try{const _0x59f580=parseInt(_0x17ca33(0x1e7))/0x1+-parseInt(_0x17ca33(0x202))/0x2*(parseInt(_0x17ca33(0x22f))/0x3)+parseInt(_0x17ca33(0x21c))/0x4*(parseInt(_0x17ca33(0x232))/0x5)+-parseInt(_0x17ca33(0x223))/0x6*(parseInt(_0x17ca33(0x248))/0x7)+parseInt(_0x17ca33(0x1ec))/0x8*(-parseInt(_0x17ca33(0x23e))/0x9)+-parseInt(_0x17ca33(0x20b))/0xa+parseInt(_0x17ca33(0x249))/0xb;if(_0x59f580===_0x52040a)break;else _0x4a215d['push'](_0x4a215d['shift']());}catch(_0x176779){_0x4a215d['push'](_0x4a215d['shift']());}}}(_0x34aa,0x9e461));import{CommentService as _0xa2ebfd,CollaborationSessionService as _0x6ebfb5,UniverCollaborationClientPlugin as _0x4d0826}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x6f90f6}from'@univerjs-pro/license';import{dayjs as _0x5f5b37,UserManagerService as _0x3f7db5,Inject as _0xc9741e,Injector as _0x54bd73,Disposable as _0x25aa90,CustomRangeType as _0x2b4870,UniverInstanceType as _0x4e65bc,DependentOn as _0x125195,IConfigService as _0x4521b1,Plugin as _0x542bcc,merge as _0x7d8ac9}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2d4016}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5a9473,IThreadCommentDataSourceService as _0x18a375}from'@univerjs/thread-comment';import{bufferTime as _0x5e308e}from'rxjs';function _0x30b4(_0x43136d,_0x4460d4){const _0x34aaeb=_0x34aa();return _0x30b4=function(_0x30b47b,_0x4ee0b0){_0x30b47b=_0x30b47b-0x1de;let _0x18f0ad=_0x34aaeb[_0x30b47b];return _0x18f0ad;},_0x30b4(_0x43136d,_0x4460d4);}import{HTTPService as _0x3bbb43}from'@univerjs/network';const W=_0x25faa0(0x235);var I=(_0x3b8563=>(_0x3b8563[_0x3b8563[_0x25faa0(0x1fd)]=0x0]='OpenOrReOpen',_0x3b8563[_0x3b8563['Solved']=0x1]='Solved',_0x3b8563[_0x3b8563[_0x25faa0(0x241)]=-0x1]=_0x25faa0(0x241),_0x3b8563))(I||{}),v=(_0x42e44f=>(_0x42e44f[_0x42e44f[_0x25faa0(0x227)]=0x0]=_0x25faa0(0x227),_0x42e44f[_0x42e44f['Add']=0x1]='Add',_0x42e44f[_0x42e44f[_0x25faa0(0x215)]=0x2]=_0x25faa0(0x215),_0x42e44f[_0x42e44f[_0x25faa0(0x216)]=0x3]=_0x25faa0(0x216),_0x42e44f[_0x42e44f['Delete']=0x4]=_0x25faa0(0x236),_0x42e44f[_0x42e44f[_0x25faa0(0x22e)]=0x5]=_0x25faa0(0x22e),_0x42e44f[_0x42e44f[_0x25faa0(0x241)]=-0x1]=_0x25faa0(0x241),_0x42e44f))(v||{});const y=_0x58a32e=>_0x5f5b37(new Date(+_0x58a32e))[_0x25faa0(0x1e0)](_0x25faa0(0x1ed)),B=async(_0x17e8ed,_0x4b6bc6)=>{const _0x4faf91=_0x25faa0,_0x25123a=_0x17e8ed[_0x4faf91(0x1f8)](_0x3f7db5),_0xe17c12=_0x17e8ed[_0x4faf91(0x1f8)](_0x3bbb43);_0x4b6bc6['forEach'](_0x33f45b=>{const _0x42367f=_0x4faf91;_0x25123a[_0x42367f(0x22c)](_0x33f45b)&&_0x4b6bc6[_0x42367f(0x1e5)](_0x33f45b);}),_0x4b6bc6['size']&&(await _0xe17c12['get'](_0x4faf91(0x237),{'params':{'userIDs':[..._0x4b6bc6]}}))['body'][_0x4faf91(0x1e6)][_0x4faf91(0x1e8)](_0xe32af3=>{_0xe32af3&&_0x25123a['addUser'](_0xe32af3);});};var K=Object[_0x25faa0(0x238)],V=(_0xe86f59,_0x4c6ffc,_0x2c840c,_0x1cf7d3)=>{const _0x321d21=_0x25faa0;for(var _0x294a54=_0x1cf7d3>0x1?void 0x0:_0x1cf7d3?K(_0x4c6ffc,_0x2c840c):_0x4c6ffc,_0x5ba2a1=_0xe86f59[_0x321d21(0x203)]-0x1,_0x5511db;_0x5ba2a1>=0x0;_0x5ba2a1--)(_0x5511db=_0xe86f59[_0x5ba2a1])&&(_0x294a54=_0x5511db(_0x294a54)||_0x294a54);return _0x294a54;},p=(_0x3e5f7e,_0x199364)=>(_0x3a7908,_0x2fbc3b)=>_0x199364(_0x3a7908,_0x2fbc3b,_0x3e5f7e);let _=class extends _0x25aa90{constructor(_0x3a14b5,_0x366f0a,_0x2ecc78,_0x5a5439){const _0x3d6cd7=_0x25faa0;super(),this[_0x3d6cd7(0x243)]=_0x3a14b5,this[_0x3d6cd7(0x20e)]=_0x366f0a,this['_userService']=_0x2ecc78,this[_0x3d6cd7(0x22a)]=_0x5a5439,this[_0x3d6cd7(0x1f6)](),this[_0x3d6cd7(0x1f3)]();}[_0x25faa0(0x1f3)](){const _0x4968e3=_0x25faa0;this[_0x4968e3(0x1fb)](this['_threadCommentModel'][_0x4968e3(0x1f2)][_0x4968e3(0x229)](_0x5e308e(0x10))['subscribe'](_0x2ec4b6=>{const _0x564076=_0x4968e3,_0x4bdbca=new Set();_0x2ec4b6[_0x564076(0x1e8)](_0x28b5ac=>{const _0x1320b0=_0x564076;switch(_0x28b5ac[_0x1320b0(0x22b)]){case _0x1320b0(0x23d):{const _0x3f7d51=_0x28b5ac[_0x1320b0(0x219)][_0x1320b0(0x23c)];_0x4bdbca[_0x1320b0(0x23d)](_0x3f7d51);break;}}}),B(this[_0x564076(0x22a)],_0x4bdbca);}));}[_0x25faa0(0x1f6)](){const _0x3be1d6=_0x25faa0;this['disposeWithMe'](this[_0x3be1d6(0x243)][_0x3be1d6(0x1f2)][_0x3be1d6(0x209)](async _0x33ac03=>{const _0x4ed2bc=_0x3be1d6;var _0x4706d3,_0x40a8e1,_0x51b853,_0x28f354;const _0x5ae392=(_0x4706d3=this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x231)](_0x33ac03[_0x4ed2bc(0x1e4)])[_0x4ed2bc(0x20d)](_0x13c896=>_0x13c896[_0x4ed2bc(0x245)]===_0x33ac03[_0x4ed2bc(0x245)]))==null?void 0x0:_0x4706d3[_0x4ed2bc(0x23b)];if(!_0x5ae392)return;const {unitId:_0x54b011,subUnitId:_0x20a96c}=_0x5ae392;switch(_0x33ac03[_0x4ed2bc(0x212)]&&this[_0x4ed2bc(0x225)]['addUser'](_0x33ac03['user']),_0x33ac03[_0x4ed2bc(0x22b)]){case v[_0x4ed2bc(0x246)]:break;case v[_0x4ed2bc(0x215)]:{this['_threadCommentModel']['addComment'](_0x54b011,_0x20a96c,{'unitId':_0x54b011,'subUnitId':_0x20a96c,'ref':'','id':_0x33ac03[_0x4ed2bc(0x21d)],'dT':y(+_0x33ac03['createTimestamp']),'threadId':_0x33ac03[_0x4ed2bc(0x245)],'personId':(_0x51b853=(_0x40a8e1=_0x33ac03[_0x4ed2bc(0x212)])==null?void 0x0:_0x40a8e1[_0x4ed2bc(0x1f0)])!=null?_0x51b853:_0x33ac03[_0x4ed2bc(0x1de)],'text':JSON['parse'](_0x33ac03['content']),'parentId':_0x5ae392['id']});break;}case v[_0x4ed2bc(0x236)]:{const _0x4f5fdb=this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x234)](_0x54b011,_0x20a96c,_0x33ac03['replyId']);_0x4f5fdb&&_0x4f5fdb[_0x4ed2bc(0x1fa)]&&this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x21e)](_0x54b011,_0x20a96c,_0x33ac03[_0x4ed2bc(0x21d)]);break;}case v['Edit']:{this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x210)](_0x54b011,_0x20a96c,{'commentId':_0x33ac03[_0x4ed2bc(0x21d)],'text':JSON[_0x4ed2bc(0x201)](_0x33ac03[_0x4ed2bc(0x230)])});break;}case v['Solve']:{const _0x40bb85=(_0x28f354=this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x231)](_0x33ac03[_0x4ed2bc(0x1e4)])[_0x4ed2bc(0x20d)](_0xf82527=>_0xf82527[_0x4ed2bc(0x245)]===_0x33ac03[_0x4ed2bc(0x245)]))==null?void 0x0:_0x28f354[_0x4ed2bc(0x23b)];_0x40bb85&&this[_0x4ed2bc(0x20e)][_0x4ed2bc(0x213)](_0x54b011,_0x20a96c,_0x40bb85['id'],_0x33ac03['solved']===I[_0x4ed2bc(0x1f4)]);break;}}}));}};_=V([p(0x0,_0xc9741e(_0xa2ebfd)),p(0x1,_0xc9741e(_0x5a9473)),p(0x2,_0xc9741e(_0x3f7db5)),p(0x3,_0xc9741e(_0x54bd73))],_);const z=_0x25faa0(0x221),O={};var k=Object[_0x25faa0(0x238)],Q=(_0x50458b,_0x2cfa27,_0x165052,_0x2cb40f)=>{const _0x561009=_0x25faa0;for(var _0x1ebc4e=_0x2cb40f>0x1?void 0x0:_0x2cb40f?k(_0x2cfa27,_0x165052):_0x2cfa27,_0x1459c9=_0x50458b[_0x561009(0x203)]-0x1,_0x5e1865;_0x1459c9>=0x0;_0x1459c9--)(_0x5e1865=_0x50458b[_0x1459c9])&&(_0x1ebc4e=_0x5e1865(_0x1ebc4e)||_0x1ebc4e);return _0x1ebc4e;},b=(_0x8caf4f,_0x5dcebf)=>(_0x42d5bd,_0x135186)=>_0x5dcebf(_0x42d5bd,_0x135186,_0x8caf4f);function X(_0x1abb62,_0x242971){const _0x4cd15f=_0x25faa0,_0x159188=_0x1abb62[_0x4cd15f(0x208)][0x0];return{..._0x242971,'id':_0x159188[_0x4cd15f(0x21d)],'resolved':_0x1abb62[_0x4cd15f(0x1f7)]===0x1,'dT':y(_0x159188[_0x4cd15f(0x1f5)]),'personId':_0x159188[_0x4cd15f(0x1de)],'threadId':_0x159188[_0x4cd15f(0x245)]};}function ee(_0x9ab101,_0x20675e,_0x219a65){const _0xb1361e=_0x25faa0;var _0xda8d60,_0x1308cf;if(((_0x1308cf=(_0xda8d60=_0x9ab101==null?void 0x0:_0x9ab101[_0xb1361e(0x208)])==null?void 0x0:_0xda8d60['length'])!=null?_0x1308cf:0x0)>0x0){const _0x3d84ab=(_0x5e253c,_0x260acc)=>({'id':_0x5e253c[_0xb1361e(0x21d)],'threadId':_0x5e253c[_0xb1361e(0x245)],'dT':y(_0x5e253c['createTimestamp']),'personId':_0x5e253c['userId'],'resolved':_0x9ab101[_0xb1361e(0x1f7)]===I[_0xb1361e(0x1f4)],'unitId':_0x20675e,'subUnitId':_0x219a65,'text':JSON[_0xb1361e(0x201)](_0x5e253c[_0xb1361e(0x230)]),'parentId':_0x260acc}),_0x516cad=_0x3d84ab(_0x9ab101[_0xb1361e(0x208)][0x0]);return{..._0x516cad,'children':_0x9ab101[_0xb1361e(0x208)][_0xb1361e(0x1fe)](0x1)[_0xb1361e(0x204)](_0x19c60b=>_0x3d84ab(_0x19c60b,_0x516cad['id']))};}return null;}let S=class{constructor(_0x5163d6,_0x1c96ab,_0x54eac6){const _0x1a4021=_0x25faa0;this[_0x1a4021(0x220)]=_0x5163d6,this[_0x1a4021(0x225)]=_0x1c96ab,this['_sessionService']=_0x54eac6;}async[_0x25faa0(0x1df)](_0xb52cc5){const _0x5cbebd=_0x25faa0;var _0x2b7bf9,_0x3a4fa9;const {parentId:_0x2a52a4,unitId:_0x2a5aa8,text:_0x37759b,threadId:_0x3a0471}=_0xb52cc5,_0x2a485a=(_0x3a4fa9=(_0x2b7bf9=_0x37759b[_0x5cbebd(0x23f)])==null?void 0x0:_0x2b7bf9[_0x5cbebd(0x233)](_0x22af43=>_0x22af43[_0x5cbebd(0x1fc)]===_0x2b4870[_0x5cbebd(0x226)])[_0x5cbebd(0x204)](_0x67caea=>_0x67caea[_0x5cbebd(0x207)]))!=null?_0x3a4fa9:[],_0x462f99=JSON[_0x5cbebd(0x23a)](_0x37759b),_0x14b7c0=(await this[_0x5cbebd(0x200)][_0x5cbebd(0x1ea)](_0x2a5aa8))['getMemberID']();if(_0x2a52a4){const _0x5141e0={'memberId':_0x14b7c0,'unitId':_0x2a5aa8,'content':_0x462f99,'mention':_0x2a485a,'threadId':_0x3a0471},_0x3231c2=(await this[_0x5cbebd(0x220)][_0x5cbebd(0x1f9)](_0x5cbebd(0x20a)+_0x2a5aa8+_0x5cbebd(0x1ee),{'body':_0x5141e0}))[_0x5cbebd(0x247)][_0x5cbebd(0x217)];return{..._0xb52cc5,'id':_0x3231c2[_0x5cbebd(0x21d)],'dT':_0x5f5b37(+_0x3231c2['createTimestamp'])[_0x5cbebd(0x1e0)](_0x5cbebd(0x1ed)),'personId':_0x3231c2['userId']};}else{const _0x1d36f4={'memberId':_0x14b7c0,'unitId':_0x2a5aa8,'content':_0x462f99,'mention':_0x2a485a},_0x1b2cd8=await this[_0x5cbebd(0x220)][_0x5cbebd(0x1f9)](_0x5cbebd(0x20a)+_0x2a5aa8+'/add',{'body':_0x1d36f4});return X(_0x1b2cd8[_0x5cbebd(0x247)][_0x5cbebd(0x242)],_0xb52cc5);}}async[_0x25faa0(0x210)](_0x25c88c){const _0x2e7441=_0x25faa0;var _0x154a7a,_0x5d039e;const {text:_0x35c186,unitId:_0x2a417d}=_0x25c88c,_0x68aa8=(_0x5d039e=(_0x154a7a=_0x35c186[_0x2e7441(0x23f)])==null?void 0x0:_0x154a7a['filter'](_0x19a6bc=>_0x19a6bc[_0x2e7441(0x1fc)]===_0x2b4870[_0x2e7441(0x226)])['map'](_0x562c31=>_0x562c31[_0x2e7441(0x207)]))!=null?_0x5d039e:[],_0x566172=JSON[_0x2e7441(0x23a)](_0x35c186),_0x3651dd=_0x25c88c[_0x2e7441(0x245)],_0x2e4d32=_0x25c88c['id'],_0x3cf0f3={'memberId':(await this[_0x2e7441(0x200)]['requireSession'](_0x2a417d))[_0x2e7441(0x22d)](),'unitId':_0x2a417d,'threadId':_0x3651dd,'mention':_0x68aa8,'content':_0x566172,'replyId':_0x2e4d32},_0x25d94a=await this[_0x2e7441(0x220)][_0x2e7441(0x1f9)](_0x2e7441(0x20a)+_0x2a417d+_0x2e7441(0x1e1),{'body':_0x3cf0f3});return!_0x25d94a[_0x2e7441(0x247)]['error']||_0x25d94a['body'][_0x2e7441(0x1e2)][_0x2e7441(0x214)]===0x1;}async[_0x25faa0(0x213)](_0x2e00fb){const _0x4d500b=_0x25faa0,{unitId:_0xd4084a}=_0x2e00fb,_0x139da7=_0x2e00fb[_0x4d500b(0x245)],_0xf4632={'memberId':this[_0x4d500b(0x225)][_0x4d500b(0x1ef)]()[_0x4d500b(0x1f0)],'unitId':_0xd4084a,'threadId':_0x139da7,'solved':_0x2e00fb[_0x4d500b(0x224)]?I[_0x4d500b(0x1f4)]:I[_0x4d500b(0x1fd)]},_0x4bed30=await this['_httpService']['post']('/universer-api/comment/unit/'+_0xd4084a+_0x4d500b(0x21a),{'body':_0xf4632});return!_0x4bed30[_0x4d500b(0x247)][_0x4d500b(0x1e2)]||_0x4bed30[_0x4d500b(0x247)][_0x4d500b(0x1e2)]['code']===0x1;}async[_0x25faa0(0x21e)](_0x4657da,_0x5219b2,_0x3709a2,_0x91b25b){const _0x502ce2=_0x25faa0,_0x134b6d={'memberId':(await this[_0x502ce2(0x200)][_0x502ce2(0x1ea)](_0x4657da))[_0x502ce2(0x22d)](),'threadId':_0x3709a2,'replyId':_0x91b25b,'unitId':_0x4657da},_0x1404d8=await this[_0x502ce2(0x220)][_0x502ce2(0x1f9)](_0x502ce2(0x20a)+_0x4657da+_0x502ce2(0x239),{'body':_0x134b6d});return!_0x1404d8[_0x502ce2(0x247)][_0x502ce2(0x1e2)]||_0x1404d8[_0x502ce2(0x247)][_0x502ce2(0x1e2)]['code']===0x1;}async[_0x25faa0(0x206)](_0x24b97c,_0x2dc250,_0x242496){const _0x38b732=_0x25faa0,_0x41e338={'unitId':_0x24b97c,'threadId':_0x242496},_0x352d02=await this[_0x38b732(0x220)]['post'](_0x38b732(0x20a)+_0x24b97c+_0x38b732(0x211),{'body':_0x41e338}),_0x242e84=_0x242496[_0x38b732(0x204)](_0x564114=>ee(_0x352d02[_0x38b732(0x247)][_0x38b732(0x20f)][_0x564114],_0x24b97c,_0x2dc250))[_0x38b732(0x233)](Boolean);return Object[_0x38b732(0x222)](_0x352d02[_0x38b732(0x247)][_0x38b732(0x1e6)])[_0x38b732(0x1e8)](_0x1013da=>{const _0x136fe6=_0x38b732;this[_0x136fe6(0x225)]['addUser'](_0x1013da);}),_0x242e84;}[_0x25faa0(0x218)](_0x241013){const _0x474e19=_0x25faa0;return{'id':_0x241013['id'],'threadId':_0x241013['threadId'],'ref':_0x241013[_0x474e19(0x1f1)]};}};S=Q([b(0x0,_0xc9741e(_0x3bbb43)),b(0x1,_0xc9741e(_0x3f7db5)),b(0x2,_0xc9741e(_0x6ebfb5))],S);var re=Object[_0x25faa0(0x238)],te=(_0x35be7e,_0x5219d3,_0x59eb15,_0x552ca1)=>{const _0x14fbef=_0x25faa0;for(var _0x5a7101=_0x552ca1>0x1?void 0x0:_0x552ca1?re(_0x5219d3,_0x59eb15):_0x5219d3,_0x486000=_0x35be7e[_0x14fbef(0x203)]-0x1,_0x344a87;_0x486000>=0x0;_0x486000--)(_0x344a87=_0x35be7e[_0x486000])&&(_0x5a7101=_0x344a87(_0x5a7101)||_0x5a7101);return _0x5a7101;},M=(_0x49bb4f,_0x6e02e1)=>(_0x5e1e70,_0x5c86c0)=>_0x6e02e1(_0x5e1e70,_0x5c86c0,_0x49bb4f);let f=class extends _0x25aa90{constructor(_0x54fbfa,_0x5e24da){const _0x119e83=_0x25faa0;super(),this[_0x119e83(0x228)]=_0x54fbfa,this['_threadCommentDataSource']=_0x5e24da,this[_0x119e83(0x21f)]();}[_0x25faa0(0x21f)](){const _0x38512b=_0x25faa0;this[_0x38512b(0x228)][_0x38512b(0x240)]=this['_threadCommentDataSource'],this[_0x38512b(0x228)][_0x38512b(0x20c)]=!0x1;}};f=te([M(0x0,_0x18a375),M(0x1,_0xc9741e(S))],f);var se=Object[_0x25faa0(0x1eb)],oe=Object[_0x25faa0(0x238)],ne=(_0x2f075d,_0x407807,_0x5bdfad)=>_0x407807 in _0x2f075d?se(_0x2f075d,_0x407807,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5bdfad}):_0x2f075d[_0x407807]=_0x5bdfad,ie=(_0x5425e8,_0x43c3fc,_0x473feb,_0x289190)=>{for(var _0x21f9a4=_0x289190>0x1?void 0x0:_0x289190?oe(_0x43c3fc,_0x473feb):_0x43c3fc,_0x5caa96=_0x5425e8['length']-0x1,_0x2f59b6;_0x5caa96>=0x0;_0x5caa96--)(_0x2f59b6=_0x5425e8[_0x5caa96])&&(_0x21f9a4=_0x2f59b6(_0x21f9a4)||_0x21f9a4);return _0x21f9a4;},N=(_0x288a79,_0xea4ffc)=>(_0x1e91e2,_0x3d09ec)=>_0xea4ffc(_0x1e91e2,_0x3d09ec,_0x288a79),$=(_0x57b778,_0x3c5bce,_0x418876)=>ne(_0x57b778,typeof _0x3c5bce!=_0x25faa0(0x21b)?_0x3c5bce+'':_0x3c5bce,_0x418876);let g=class extends _0x542bcc{constructor(_0x7c60fc=O,_0x1077ab,_0x34158d){const _0x414784=_0x25faa0;super(),this['_config']=_0x7c60fc,this[_0x414784(0x22a)]=_0x1077ab,this[_0x414784(0x1e3)]=_0x34158d;const {..._0x5d39e9}=_0x7d8ac9({},O,this[_0x414784(0x244)]);this[_0x414784(0x1e3)][_0x414784(0x24a)](z,_0x5d39e9);}[_0x25faa0(0x205)](){[[S],[f],[_]]['forEach'](_0x4e1af1=>{this['_injector']['add'](_0x4e1af1);});}['onReady'](){const _0x4b9be4=_0x25faa0;this[_0x4b9be4(0x22a)]['get'](f),this[_0x4b9be4(0x22a)][_0x4b9be4(0x1f8)](_);}};$(g,_0x25faa0(0x1e9),W),$(g,'type',_0x4e65bc[_0x25faa0(0x1ff)]),g=ie([_0x125195(_0x2d4016,_0x4d0826,_0x6f90f6),N(0x1,_0xc9741e(_0x54bd73)),N(0x2,_0x4521b1)],g);function _0x34aa(){const _0x106170=['/universer-api/comment/unit/','10330120zRyNlM','syncUpdateMutationToColla','find','_threadCommentModel','comments','updateComment','/list','user','resolveComment','code','Reply','Edit','reply','saveCommentToSnapshot','payload','/solved','symbol','36FfdlLu','replyId','deleteComment','_initDataSource','_httpService','thread-comment-data-source.config','values','848622irycZg','resolved','_userService','COMMENT','Unknown','_threadCommentDataSourceService','pipe','_injector','type','getUser','getMemberID','Solve','241950cRwsKf','content','getUnit','234380oiXcum','filter','getComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Delete','/universer-api/user/list','getOwnPropertyDescriptor','/delete','stringify','root','personId','add','10771263tWvpGA','customRanges','dataSource','UNRECOGNIZED','comment','_commentService','_config','threadId','Add','body','7vUjGug','27992800iMJhhj','setConfig','userId','addComment','format','/edit','error','_configService','unitId','delete','users','778711NYDhET','forEach','pluginName','requireSession','defineProperty','8ZTkmMd','YYYY/MM/DD\x20HH:mm','/reply','getCurrentUser','userID','ref','commentUpdate$','_initUserSync','Solved','createTimestamp','_init','solved','get','post','parentId','disposeWithMe','rangeType','OpenOrReOpen','slice','UNIVER_UNKNOWN','_sessionService','parse','18dcFmTs','length','map','onStarting','listComments','rangeId','replies','subscribe'];_0x34aa=function(){return _0x106170;};return _0x34aa();}export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x3a0f(_0x309a20,_0x19910c){const _0x85ff63=_0x85ff();return _0x3a0f=function(_0x3a0f1e,_0x925d44){_0x3a0f1e=_0x3a0f1e-0x162;let _0x10bf77=_0x85ff63[_0x3a0f1e];return _0x10bf77;},_0x3a0f(_0x309a20,_0x19910c);}(function(_0x5683dc,_0x4e0fe2){const _0x529fb1=_0x3a0f,_0x3bbfd3=_0x5683dc();while(!![]){try{const _0x212325=parseInt(_0x529fb1(0x16a))/0x1+parseInt(_0x529fb1(0x1c5))/0x2*(parseInt(_0x529fb1(0x19c))/0x3)+-parseInt(_0x529fb1(0x1e2))/0x4*(-parseInt(_0x529fb1(0x1ab))/0x5)+parseInt(_0x529fb1(0x1e4))/0x6+parseInt(_0x529fb1(0x1b8))/0x7*(parseInt(_0x529fb1(0x1c9))/0x8)+-parseInt(_0x529fb1(0x16c))/0x9+-parseInt(_0x529fb1(0x1cd))/0xa*(parseInt(_0x529fb1(0x188))/0xb);if(_0x212325===_0x4e0fe2)break;else _0x3bbfd3['push'](_0x3bbfd3['shift']());}catch(_0x49a542){_0x3bbfd3['push'](_0x3bbfd3['shift']());}}}(_0x85ff,0xee9fa),function(_0x8d2928,_0x117dc0){const _0x3e6713=_0x3a0f;typeof exports=='object'&&typeof module<'u'?_0x117dc0(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x3e6713(0x1a5)&&define[_0x3e6713(0x17a)]?define([_0x3e6713(0x1e7),'@univerjs-pro/collaboration-client',_0x3e6713(0x1a1),_0x3e6713(0x185),_0x3e6713(0x162),'@univerjs/thread-comment','rxjs',_0x3e6713(0x172)],_0x117dc0):(_0x8d2928=typeof globalThis<'u'?globalThis:_0x8d2928||self,_0x117dc0(_0x8d2928[_0x3e6713(0x1e0)]={},_0x8d2928[_0x3e6713(0x1d5)],_0x8d2928[_0x3e6713(0x180)],_0x8d2928['UniverCore'],_0x8d2928[_0x3e6713(0x19b)],_0x8d2928[_0x3e6713(0x1d7)],_0x8d2928['rxjs'],_0x8d2928[_0x3e6713(0x1cc)]));}(this,function(_0x17e8f0,_0x286d66,_0x23ae9f,_0x25ff33,_0x11f977,_0x936f3a,_0x3e73aa,_0xf3812a){'use strict';const _0x3bff8e=_0x3a0f;const _0x3b64c1=_0x3bff8e(0x19e);var _0x39757d=(_0x157b04=>(_0x157b04[_0x157b04['OpenOrReOpen']=0x0]=_0x3bff8e(0x18f),_0x157b04[_0x157b04['Solved']=0x1]=_0x3bff8e(0x17b),_0x157b04[_0x157b04[_0x3bff8e(0x178)]=-0x1]='UNRECOGNIZED',_0x157b04))(_0x39757d||{}),_0x248049=(_0x46585e=>(_0x46585e[_0x46585e['Unknown']=0x0]=_0x3bff8e(0x1b2),_0x46585e[_0x46585e['Add']=0x1]='Add',_0x46585e[_0x46585e[_0x3bff8e(0x169)]=0x2]=_0x3bff8e(0x169),_0x46585e[_0x46585e[_0x3bff8e(0x177)]=0x3]='Edit',_0x46585e[_0x46585e[_0x3bff8e(0x1e6)]=0x4]=_0x3bff8e(0x1e6),_0x46585e[_0x46585e['Solve']=0x5]=_0x3bff8e(0x1c8),_0x46585e[_0x46585e[_0x3bff8e(0x178)]=-0x1]='UNRECOGNIZED',_0x46585e))(_0x248049||{});const _0xef3b39=_0x53c950=>_0x25ff33[_0x3bff8e(0x168)](new Date(+_0x53c950))['format']('YYYY/MM/DD\x20HH:mm'),_0x4683d6=async(_0x4c557e,_0x5edd65)=>{const _0x41b48f=_0x3bff8e,_0x2521f0=_0x4c557e[_0x41b48f(0x19f)](_0x25ff33[_0x41b48f(0x1e1)]),_0x350c4f=_0x4c557e[_0x41b48f(0x19f)](_0xf3812a['HTTPService']);_0x5edd65[_0x41b48f(0x18a)](_0x1ef54e=>{_0x2521f0['getUser'](_0x1ef54e)&&_0x5edd65['delete'](_0x1ef54e);}),_0x5edd65[_0x41b48f(0x1ad)]&&(await _0x350c4f['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x5edd65]}}))[_0x41b48f(0x183)][_0x41b48f(0x164)][_0x41b48f(0x18a)](_0x26ccf8=>{const _0x1f38a6=_0x41b48f;_0x26ccf8&&_0x2521f0[_0x1f38a6(0x1da)](_0x26ccf8);});};var _0x46ec29=Object[_0x3bff8e(0x186)],_0xa572f=(_0x4d4768,_0x22f0ed,_0xb0a922,_0x503fb8)=>{const _0x16dcfe=_0x3bff8e;for(var _0x382e54=_0x503fb8>0x1?void 0x0:_0x503fb8?_0x46ec29(_0x22f0ed,_0xb0a922):_0x22f0ed,_0x4b1e5d=_0x4d4768[_0x16dcfe(0x1d2)]-0x1,_0x1494b5;_0x4b1e5d>=0x0;_0x4b1e5d--)(_0x1494b5=_0x4d4768[_0x4b1e5d])&&(_0x382e54=_0x1494b5(_0x382e54)||_0x382e54);return _0x382e54;},_0x418f9f=(_0x58d390,_0x383aa9)=>(_0xef5da9,_0x68c10)=>_0x383aa9(_0xef5da9,_0x68c10,_0x58d390);let _0x22d02b=class extends _0x25ff33[_0x3bff8e(0x195)]{constructor(_0x244be4,_0x33f868,_0x360fee,_0x478dd7){const _0x13f76a=_0x3bff8e;super(),this[_0x13f76a(0x17d)]=_0x244be4,this['_threadCommentModel']=_0x33f868,this[_0x13f76a(0x194)]=_0x360fee,this[_0x13f76a(0x1d6)]=_0x478dd7,this[_0x13f76a(0x175)](),this[_0x13f76a(0x17c)]();}[_0x3bff8e(0x17c)](){const _0x58504d=_0x3bff8e;this['disposeWithMe'](this[_0x58504d(0x163)][_0x58504d(0x18e)][_0x58504d(0x196)](_0x3e73aa[_0x58504d(0x173)](0x10))[_0x58504d(0x1de)](_0x3de340=>{const _0xb69fa1=_0x58504d,_0x3607be=new Set();_0x3de340[_0xb69fa1(0x18a)](_0x35296d=>{const _0x55f87e=_0xb69fa1;switch(_0x35296d[_0x55f87e(0x165)]){case _0x55f87e(0x174):{const _0x39904b=_0x35296d[_0x55f87e(0x1a0)][_0x55f87e(0x171)];_0x3607be[_0x55f87e(0x174)](_0x39904b);break;}}}),_0x4683d6(this[_0xb69fa1(0x1d6)],_0x3607be);}));}[_0x3bff8e(0x175)](){const _0x5cbb7a=_0x3bff8e;this[_0x5cbb7a(0x1a6)](this['_commentService']['commentUpdate$']['subscribe'](async _0x4ebbbb=>{const _0x2e503d=_0x5cbb7a;var _0xebcd46,_0x3cb44f,_0x53de0c,_0x844fc4;const _0x2d7fa9=(_0xebcd46=this[_0x2e503d(0x163)][_0x2e503d(0x1c1)](_0x4ebbbb[_0x2e503d(0x1cb)])[_0x2e503d(0x1b9)](_0x196d64=>_0x196d64['threadId']===_0x4ebbbb[_0x2e503d(0x179)]))==null?void 0x0:_0xebcd46['root'];if(!_0x2d7fa9)return;const {unitId:_0x59d24a,subUnitId:_0x3c9611}=_0x2d7fa9;switch(_0x4ebbbb[_0x2e503d(0x16d)]&&this['_userService'][_0x2e503d(0x1da)](_0x4ebbbb[_0x2e503d(0x16d)]),_0x4ebbbb[_0x2e503d(0x165)]){case _0x248049[_0x2e503d(0x1ce)]:break;case _0x248049[_0x2e503d(0x169)]:{this['_threadCommentModel']['addComment'](_0x59d24a,_0x3c9611,{'unitId':_0x59d24a,'subUnitId':_0x3c9611,'ref':'','id':_0x4ebbbb[_0x2e503d(0x1a4)],'dT':_0xef3b39(+_0x4ebbbb[_0x2e503d(0x18b)]),'threadId':_0x4ebbbb[_0x2e503d(0x179)],'personId':(_0x53de0c=(_0x3cb44f=_0x4ebbbb[_0x2e503d(0x16d)])==null?void 0x0:_0x3cb44f[_0x2e503d(0x1db)])!=null?_0x53de0c:_0x4ebbbb[_0x2e503d(0x192)],'text':JSON[_0x2e503d(0x17e)](_0x4ebbbb[_0x2e503d(0x1c4)]),'parentId':_0x2d7fa9['id']});break;}case _0x248049[_0x2e503d(0x1e6)]:{const _0x43a556=this[_0x2e503d(0x163)][_0x2e503d(0x1c7)](_0x59d24a,_0x3c9611,_0x4ebbbb[_0x2e503d(0x1a4)]);_0x43a556&&_0x43a556[_0x2e503d(0x1df)]&&this[_0x2e503d(0x163)][_0x2e503d(0x198)](_0x59d24a,_0x3c9611,_0x4ebbbb[_0x2e503d(0x1a4)]);break;}case _0x248049[_0x2e503d(0x177)]:{this['_threadCommentModel'][_0x2e503d(0x191)](_0x59d24a,_0x3c9611,{'commentId':_0x4ebbbb[_0x2e503d(0x1a4)],'text':JSON[_0x2e503d(0x17e)](_0x4ebbbb[_0x2e503d(0x1c4)])});break;}case _0x248049[_0x2e503d(0x1c8)]:{const _0x55dffd=(_0x844fc4=this[_0x2e503d(0x163)][_0x2e503d(0x1c1)](_0x4ebbbb['unitId'])[_0x2e503d(0x1b9)](_0x4f7e06=>_0x4f7e06[_0x2e503d(0x179)]===_0x4ebbbb[_0x2e503d(0x179)]))==null?void 0x0:_0x844fc4[_0x2e503d(0x1b4)];_0x55dffd&&this[_0x2e503d(0x163)][_0x2e503d(0x1b0)](_0x59d24a,_0x3c9611,_0x55dffd['id'],_0x4ebbbb[_0x2e503d(0x1ca)]===_0x39757d['Solved']);break;}}}));}};_0x22d02b=_0xa572f([_0x418f9f(0x0,_0x25ff33[_0x3bff8e(0x1b7)](_0x286d66[_0x3bff8e(0x1a3)])),_0x418f9f(0x1,_0x25ff33[_0x3bff8e(0x1b7)](_0x936f3a[_0x3bff8e(0x170)])),_0x418f9f(0x2,_0x25ff33['Inject'](_0x25ff33[_0x3bff8e(0x1e1)])),_0x418f9f(0x3,_0x25ff33[_0x3bff8e(0x1b7)](_0x25ff33[_0x3bff8e(0x1a9)]))],_0x22d02b);const _0x33df3e=_0x3bff8e(0x166),_0x319eda={};var _0x17705a=Object['getOwnPropertyDescriptor'],_0x4191a8=(_0x3af56c,_0x1eb6d4,_0x499604,_0x23b26c)=>{const _0x13f7bd=_0x3bff8e;for(var _0x4b8217=_0x23b26c>0x1?void 0x0:_0x23b26c?_0x17705a(_0x1eb6d4,_0x499604):_0x1eb6d4,_0x1d47d3=_0x3af56c[_0x13f7bd(0x1d2)]-0x1,_0x4c80be;_0x1d47d3>=0x0;_0x1d47d3--)(_0x4c80be=_0x3af56c[_0x1d47d3])&&(_0x4b8217=_0x4c80be(_0x4b8217)||_0x4b8217);return _0x4b8217;},_0x545fe5=(_0x49fa4f,_0x487cce)=>(_0x4bfee2,_0x4985a9)=>_0x487cce(_0x4bfee2,_0x4985a9,_0x49fa4f);function _0xe91d1c(_0x1998c3,_0x5af9d7){const _0x54abcb=_0x3bff8e,_0x20792e=_0x1998c3['replies'][0x0];return{..._0x5af9d7,'id':_0x20792e['replyId'],'resolved':_0x1998c3[_0x54abcb(0x1ca)]===0x1,'dT':_0xef3b39(_0x20792e[_0x54abcb(0x18b)]),'personId':_0x20792e[_0x54abcb(0x192)],'threadId':_0x20792e[_0x54abcb(0x179)]};}function _0x3d4b5d(_0x288e12,_0x163007,_0x47236b){const _0x247b63=_0x3bff8e;var _0x4d5444,_0x5cd46e;if(((_0x5cd46e=(_0x4d5444=_0x288e12==null?void 0x0:_0x288e12[_0x247b63(0x182)])==null?void 0x0:_0x4d5444[_0x247b63(0x1d2)])!=null?_0x5cd46e:0x0)>0x0){const _0x11d331=(_0x1f9566,_0x3b1085)=>({'id':_0x1f9566['replyId'],'threadId':_0x1f9566[_0x247b63(0x179)],'dT':_0xef3b39(_0x1f9566['createTimestamp']),'personId':_0x1f9566[_0x247b63(0x192)],'resolved':_0x288e12[_0x247b63(0x1ca)]===_0x39757d[_0x247b63(0x17b)],'unitId':_0x163007,'subUnitId':_0x47236b,'text':JSON[_0x247b63(0x17e)](_0x1f9566[_0x247b63(0x1c4)]),'parentId':_0x3b1085}),_0xecbc2=_0x11d331(_0x288e12[_0x247b63(0x182)][0x0]);return{..._0xecbc2,'children':_0x288e12[_0x247b63(0x182)][_0x247b63(0x1ae)](0x1)[_0x247b63(0x199)](_0x45988c=>_0x11d331(_0x45988c,_0xecbc2['id']))};}return null;}let _0x40601a=class{constructor(_0x4408c1,_0x3d39d0,_0x1aa4da){const _0x1539e2=_0x3bff8e;this[_0x1539e2(0x1cf)]=_0x4408c1,this[_0x1539e2(0x194)]=_0x3d39d0,this[_0x1539e2(0x1c6)]=_0x1aa4da;}async[_0x3bff8e(0x1c0)](_0x3ab21f){const _0x55c936=_0x3bff8e;var _0xba04eb,_0x3b10d6;const {parentId:_0x4f7e14,unitId:_0x5c1c75,text:_0x43bd59,threadId:_0x2ff2cd}=_0x3ab21f,_0x25b09c=(_0x3b10d6=(_0xba04eb=_0x43bd59[_0x55c936(0x19d)])==null?void 0x0:_0xba04eb[_0x55c936(0x18d)](_0x28de4f=>_0x28de4f['rangeType']===_0x25ff33['CustomRangeType'][_0x55c936(0x1d0)])[_0x55c936(0x199)](_0x4e72df=>_0x4e72df['rangeId']))!=null?_0x3b10d6:[],_0x9e94bf=JSON['stringify'](_0x43bd59),_0x2aa5d6=(await this['_sessionService']['requireSession'](_0x5c1c75))[_0x55c936(0x1d4)]();if(_0x4f7e14){const _0x10fc58={'memberId':_0x2aa5d6,'unitId':_0x5c1c75,'content':_0x9e94bf,'mention':_0x25b09c,'threadId':_0x2ff2cd},_0x2961c4=(await this[_0x55c936(0x1cf)][_0x55c936(0x1e8)](_0x55c936(0x1d8)+_0x5c1c75+'/reply',{'body':_0x10fc58}))[_0x55c936(0x183)]['reply'];return{..._0x3ab21f,'id':_0x2961c4[_0x55c936(0x1a4)],'dT':_0x25ff33[_0x55c936(0x168)](+_0x2961c4[_0x55c936(0x18b)])[_0x55c936(0x1bc)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2961c4[_0x55c936(0x192)]};}else{const _0x546e29={'memberId':_0x2aa5d6,'unitId':_0x5c1c75,'content':_0x9e94bf,'mention':_0x25b09c},_0x22f382=await this['_httpService'][_0x55c936(0x1e8)](_0x55c936(0x1d8)+_0x5c1c75+'/add',{'body':_0x546e29});return _0xe91d1c(_0x22f382['body'][_0x55c936(0x184)],_0x3ab21f);}}async[_0x3bff8e(0x191)](_0x13bb15){const _0x42b4f1=_0x3bff8e;var _0x1f2fe7,_0x427ff0;const {text:_0x315ec8,unitId:_0x5f403b}=_0x13bb15,_0x117b96=(_0x427ff0=(_0x1f2fe7=_0x315ec8[_0x42b4f1(0x19d)])==null?void 0x0:_0x1f2fe7[_0x42b4f1(0x18d)](_0x48f29e=>_0x48f29e[_0x42b4f1(0x16f)]===_0x25ff33[_0x42b4f1(0x17f)][_0x42b4f1(0x1d0)])[_0x42b4f1(0x199)](_0x4c6d07=>_0x4c6d07[_0x42b4f1(0x1a2)]))!=null?_0x427ff0:[],_0x402ee9=JSON['stringify'](_0x315ec8),_0x229fc5=_0x13bb15[_0x42b4f1(0x179)],_0x1abf06=_0x13bb15['id'],_0x5894cd={'memberId':(await this[_0x42b4f1(0x1c6)][_0x42b4f1(0x1e9)](_0x5f403b))[_0x42b4f1(0x1d4)](),'unitId':_0x5f403b,'threadId':_0x229fc5,'mention':_0x117b96,'content':_0x402ee9,'replyId':_0x1abf06},_0x156d40=await this['_httpService'][_0x42b4f1(0x1e8)](_0x42b4f1(0x1d8)+_0x5f403b+_0x42b4f1(0x1aa),{'body':_0x5894cd});return!_0x156d40['body'][_0x42b4f1(0x19a)]||_0x156d40[_0x42b4f1(0x183)][_0x42b4f1(0x19a)][_0x42b4f1(0x1d9)]===0x1;}async[_0x3bff8e(0x1b0)](_0x3a9208){const _0x1b1900=_0x3bff8e,{unitId:_0x4af26d}=_0x3a9208,_0x118f0e=_0x3a9208[_0x1b1900(0x179)],_0x499828={'memberId':this[_0x1b1900(0x194)][_0x1b1900(0x16e)]()[_0x1b1900(0x1db)],'unitId':_0x4af26d,'threadId':_0x118f0e,'solved':_0x3a9208[_0x1b1900(0x1b3)]?_0x39757d[_0x1b1900(0x17b)]:_0x39757d[_0x1b1900(0x18f)]},_0x384a0e=await this['_httpService'][_0x1b1900(0x1e8)](_0x1b1900(0x1d8)+_0x4af26d+_0x1b1900(0x1c3),{'body':_0x499828});return!_0x384a0e[_0x1b1900(0x183)][_0x1b1900(0x19a)]||_0x384a0e[_0x1b1900(0x183)]['error'][_0x1b1900(0x1d9)]===0x1;}async[_0x3bff8e(0x198)](_0x1355f0,_0x42eaec,_0x5f5c3f,_0x3d512b){const _0x142969=_0x3bff8e,_0x5bcf13={'memberId':(await this['_sessionService'][_0x142969(0x1e9)](_0x1355f0))[_0x142969(0x1d4)](),'threadId':_0x5f5c3f,'replyId':_0x3d512b,'unitId':_0x1355f0},_0x4d07ab=await this['_httpService'][_0x142969(0x1e8)](_0x142969(0x1d8)+_0x1355f0+_0x142969(0x1bd),{'body':_0x5bcf13});return!_0x4d07ab[_0x142969(0x183)]['error']||_0x4d07ab['body']['error'][_0x142969(0x1d9)]===0x1;}async[_0x3bff8e(0x1e5)](_0x3f1e3a,_0xb368c0,_0x23c79e){const _0x6351dc=_0x3bff8e,_0x2e4a92={'unitId':_0x3f1e3a,'threadId':_0x23c79e},_0x301650=await this[_0x6351dc(0x1cf)][_0x6351dc(0x1e8)](_0x6351dc(0x1d8)+_0x3f1e3a+_0x6351dc(0x1ac),{'body':_0x2e4a92}),_0x4c320c=_0x23c79e['map'](_0x5aaf60=>_0x3d4b5d(_0x301650['body'][_0x6351dc(0x193)][_0x5aaf60],_0x3f1e3a,_0xb368c0))[_0x6351dc(0x18d)](Boolean);return Object[_0x6351dc(0x189)](_0x301650[_0x6351dc(0x183)][_0x6351dc(0x164)])['forEach'](_0x48b3cb=>{const _0x97098f=_0x6351dc;this['_userService'][_0x97098f(0x1da)](_0x48b3cb);}),_0x4c320c;}[_0x3bff8e(0x1bb)](_0x1752b0){const _0x3a4e09=_0x3bff8e;return{'id':_0x1752b0['id'],'threadId':_0x1752b0[_0x3a4e09(0x179)],'ref':_0x1752b0[_0x3a4e09(0x1dc)]};}};_0x40601a=_0x4191a8([_0x545fe5(0x0,_0x25ff33[_0x3bff8e(0x1b7)](_0xf3812a[_0x3bff8e(0x1a7)])),_0x545fe5(0x1,_0x25ff33[_0x3bff8e(0x1b7)](_0x25ff33['UserManagerService'])),_0x545fe5(0x2,_0x25ff33[_0x3bff8e(0x1b7)](_0x286d66[_0x3bff8e(0x1dd)]))],_0x40601a);var _0x47db5e=Object[_0x3bff8e(0x186)],_0x31b4f7=(_0x4f5b70,_0x372223,_0x4257fc,_0x4d3ca4)=>{const _0x4c779e=_0x3bff8e;for(var _0x597171=_0x4d3ca4>0x1?void 0x0:_0x4d3ca4?_0x47db5e(_0x372223,_0x4257fc):_0x372223,_0x87ce3f=_0x4f5b70[_0x4c779e(0x1d2)]-0x1,_0x32e13a;_0x87ce3f>=0x0;_0x87ce3f--)(_0x32e13a=_0x4f5b70[_0x87ce3f])&&(_0x597171=_0x32e13a(_0x597171)||_0x597171);return _0x597171;},_0x701b07=(_0x4d44fc,_0xd45966)=>(_0x1eb80a,_0xf72f1d)=>_0xd45966(_0x1eb80a,_0xf72f1d,_0x4d44fc);let _0x39019e=class extends _0x25ff33[_0x3bff8e(0x195)]{constructor(_0xfd7245,_0x10c6ee){const _0x521fd2=_0x3bff8e;super(),this[_0x521fd2(0x187)]=_0xfd7245,this[_0x521fd2(0x1bf)]=_0x10c6ee,this[_0x521fd2(0x1d3)]();}[_0x3bff8e(0x1d3)](){const _0x6f1d59=_0x3bff8e;this[_0x6f1d59(0x187)]['dataSource']=this[_0x6f1d59(0x1bf)],this[_0x6f1d59(0x187)]['syncUpdateMutationToColla']=!0x1;}};_0x39019e=_0x31b4f7([_0x701b07(0x0,_0x936f3a[_0x3bff8e(0x16b)]),_0x701b07(0x1,_0x25ff33[_0x3bff8e(0x1b7)](_0x40601a))],_0x39019e);var _0x3d3383=Object['defineProperty'],_0x2f3647=Object[_0x3bff8e(0x186)],_0x9c49ca=(_0xf895a,_0x4b206c,_0x5bb594)=>_0x4b206c in _0xf895a?_0x3d3383(_0xf895a,_0x4b206c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5bb594}):_0xf895a[_0x4b206c]=_0x5bb594,_0x180456=(_0x48b3ae,_0x2dc231,_0x14e531,_0x40b7bc)=>{for(var _0x199d68=_0x40b7bc>0x1?void 0x0:_0x40b7bc?_0x2f3647(_0x2dc231,_0x14e531):_0x2dc231,_0x436efc=_0x48b3ae['length']-0x1,_0x2a384e;_0x436efc>=0x0;_0x436efc--)(_0x2a384e=_0x48b3ae[_0x436efc])&&(_0x199d68=_0x2a384e(_0x199d68)||_0x199d68);return _0x199d68;},_0x2f2930=(_0x5cc5c3,_0x1a62d4)=>(_0xa3decd,_0x19d5e4)=>_0x1a62d4(_0xa3decd,_0x19d5e4,_0x5cc5c3),_0x541d22=(_0x43ac97,_0x545e88,_0x424fe1)=>_0x9c49ca(_0x43ac97,typeof _0x545e88!=_0x3bff8e(0x181)?_0x545e88+'':_0x545e88,_0x424fe1);_0x17e8f0['UniverThreadCommentDataSourcePlugin']=class extends _0x25ff33[_0x3bff8e(0x1a8)]{constructor(_0x29ecb3=_0x319eda,_0x450427,_0xef8859){const _0x20f407=_0x3bff8e;super(),this[_0x20f407(0x1b1)]=_0x29ecb3,this['_injector']=_0x450427,this[_0x20f407(0x176)]=_0xef8859;const {..._0x50e963}=_0x25ff33['merge']({},_0x319eda,this['_config']);this[_0x20f407(0x176)][_0x20f407(0x1c2)](_0x33df3e,_0x50e963);}[_0x3bff8e(0x1e3)](){const _0x55615f=_0x3bff8e;[[_0x40601a],[_0x39019e],[_0x22d02b]][_0x55615f(0x18a)](_0x294c11=>{const _0x34b3f3=_0x55615f;this[_0x34b3f3(0x1d6)][_0x34b3f3(0x174)](_0x294c11);});}[_0x3bff8e(0x1b6)](){const _0x18d338=_0x3bff8e;this[_0x18d338(0x1d6)][_0x18d338(0x19f)](_0x39019e),this[_0x18d338(0x1d6)][_0x18d338(0x19f)](_0x22d02b);}},_0x541d22(_0x17e8f0[_0x3bff8e(0x1d1)],_0x3bff8e(0x18c),_0x3b64c1),_0x541d22(_0x17e8f0[_0x3bff8e(0x1d1)],_0x3bff8e(0x165),_0x25ff33['UniverInstanceType'][_0x3bff8e(0x190)]),_0x17e8f0['UniverThreadCommentDataSourcePlugin']=_0x180456([_0x25ff33['DependentOn'](_0x11f977['UniverThreadCommentUIPlugin'],_0x286d66[_0x3bff8e(0x1ba)],_0x23ae9f[_0x3bff8e(0x1af)]),_0x2f2930(0x1,_0x25ff33[_0x3bff8e(0x1b7)](_0x25ff33[_0x3bff8e(0x1a9)])),_0x2f2930(0x2,_0x25ff33[_0x3bff8e(0x167)])],_0x17e8f0[_0x3bff8e(0x1d1)]),Object[_0x3bff8e(0x1b5)](_0x17e8f0,Symbol[_0x3bff8e(0x1be)],{'value':_0x3bff8e(0x197)});}));function _0x85ff(){const _0x22ca06=['Plugin','Injector','/edit','10910iRlTFC','/list','size','slice','UniverLicensePlugin','resolveComment','_config','Unknown','resolved','root','defineProperty','onReady','Inject','164773BVGhEi','find','UniverCollaborationClientPlugin','saveCommentToSnapshot','format','/delete','toStringTag','_threadCommentDataSource','addComment','getUnit','setConfig','/solved','content','19816CrRVnx','_sessionService','getComment','Solve','584dPOCJh','solved','unitId','UniverNetwork','10OjHueV','Add','_httpService','COMMENT','UniverThreadCommentDataSourcePlugin','length','_initDataSource','getMemberID','UniverProCollaborationClient','_injector','UniverThreadComment','/universer-api/comment/unit/','code','addUser','userID','ref','CollaborationSessionService','subscribe','parentId','UniverProThreadCommentDatasource','UserManagerService','240VUimqa','onStarting','7830924hhUChO','listComments','Delete','exports','post','requireSession','@univerjs/thread-comment-ui','_threadCommentModel','users','type','thread-comment-data-source.config','IConfigService','dayjs','Reply','544187uiFUNf','IThreadCommentDataSourceService','15380253ZMfKbC','user','getCurrentUser','rangeType','ThreadCommentModel','personId','@univerjs/network','bufferTime','add','_init','_configService','Edit','UNRECOGNIZED','threadId','amd','Solved','_initUserSync','_commentService','parse','CustomRangeType','UniverProLicense','symbol','replies','body','comment','@univerjs/core','getOwnPropertyDescriptor','_threadCommentDataSourceService','28246295VSVtTs','values','forEach','createTimestamp','pluginName','filter','commentUpdate$','OpenOrReOpen','UNIVER_UNKNOWN','updateComment','userId','comments','_userService','Disposable','pipe','Module','deleteComment','map','error','UniverThreadCommentUi','471jllqCq','customRanges','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','get','payload','@univerjs-pro/license','rangeId','CommentService','replyId','function','disposeWithMe','HTTPService'];_0x85ff=function(){return _0x22ca06;};return _0x85ff();}
|
|
1
|
+
function _0x96eb(_0x49654c,_0x43fa56){const _0x4bda23=_0x4bda();return _0x96eb=function(_0x96ebb8,_0xb274af){_0x96ebb8=_0x96ebb8-0xc4;let _0x32fbaa=_0x4bda23[_0x96ebb8];return _0x32fbaa;},_0x96eb(_0x49654c,_0x43fa56);}(function(_0x329836,_0x469880){const _0x39aa07=_0x96eb,_0x5b32ad=_0x329836();while(!![]){try{const _0x10e229=parseInt(_0x39aa07(0x147))/0x1*(-parseInt(_0x39aa07(0xde))/0x2)+parseInt(_0x39aa07(0x10d))/0x3*(-parseInt(_0x39aa07(0xfc))/0x4)+parseInt(_0x39aa07(0x149))/0x5*(parseInt(_0x39aa07(0x13d))/0x6)+parseInt(_0x39aa07(0x112))/0x7*(-parseInt(_0x39aa07(0xe4))/0x8)+parseInt(_0x39aa07(0x116))/0x9*(-parseInt(_0x39aa07(0x12e))/0xa)+parseInt(_0x39aa07(0x13c))/0xb*(parseInt(_0x39aa07(0xfd))/0xc)+parseInt(_0x39aa07(0x114))/0xd;if(_0x10e229===_0x469880)break;else _0x5b32ad['push'](_0x5b32ad['shift']());}catch(_0x455e17){_0x5b32ad['push'](_0x5b32ad['shift']());}}}(_0x4bda,0x80c0f),function(_0x183ca1,_0x5605ba){const _0x240a1e=_0x96eb;typeof exports==_0x240a1e(0xd3)&&typeof module<'u'?_0x5605ba(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x240a1e(0x109)]?define([_0x240a1e(0x148),_0x240a1e(0xcb),_0x240a1e(0x12a),'@univerjs/core',_0x240a1e(0x10b),_0x240a1e(0xe7),'rxjs',_0x240a1e(0xd4)],_0x5605ba):(_0x183ca1=typeof globalThis<'u'?globalThis:_0x183ca1||self,_0x5605ba(_0x183ca1[_0x240a1e(0x11a)]={},_0x183ca1[_0x240a1e(0xe1)],_0x183ca1[_0x240a1e(0x131)],_0x183ca1[_0x240a1e(0xf8)],_0x183ca1[_0x240a1e(0x10f)],_0x183ca1[_0x240a1e(0x12b)],_0x183ca1[_0x240a1e(0xe3)],_0x183ca1['UniverNetwork']));}(this,function(_0x43a127,_0x22aec6,_0x5392ce,_0x339162,_0xd7cca9,_0x4f90b6,_0x5b0053,_0x24ec67){'use strict';const _0x517094=_0x96eb;const _0x310541=_0x517094(0xd6);var _0x33b650=(_0x5eefde=>(_0x5eefde[_0x5eefde[_0x517094(0x106)]=0x0]=_0x517094(0x106),_0x5eefde[_0x5eefde['Solved']=0x1]=_0x517094(0xfa),_0x5eefde[_0x5eefde[_0x517094(0x123)]=-0x1]=_0x517094(0x123),_0x5eefde))(_0x33b650||{}),_0x1d3786=(_0x206741=>(_0x206741[_0x206741[_0x517094(0xf5)]=0x0]=_0x517094(0xf5),_0x206741[_0x206741[_0x517094(0xe2)]=0x1]='Add',_0x206741[_0x206741[_0x517094(0x108)]=0x2]=_0x517094(0x108),_0x206741[_0x206741[_0x517094(0x10c)]=0x3]='Edit',_0x206741[_0x206741[_0x517094(0x140)]=0x4]=_0x517094(0x140),_0x206741[_0x206741[_0x517094(0x137)]=0x5]=_0x517094(0x137),_0x206741[_0x206741[_0x517094(0x123)]=-0x1]=_0x517094(0x123),_0x206741))(_0x1d3786||{});const _0xb22aaa=_0x1ee189=>_0x339162[_0x517094(0xdd)](new Date(+_0x1ee189))[_0x517094(0xdb)](_0x517094(0x12f)),_0x305acc=async(_0x33d787,_0x3903d3)=>{const _0x2522cc=_0x517094,_0x53704a=_0x33d787[_0x2522cc(0x132)](_0x339162[_0x2522cc(0x113)]),_0x54e8ca=_0x33d787[_0x2522cc(0x132)](_0x24ec67[_0x2522cc(0xe8)]);_0x3903d3[_0x2522cc(0xd8)](_0x38e3f2=>{const _0x3a8c96=_0x2522cc;_0x53704a[_0x3a8c96(0x102)](_0x38e3f2)&&_0x3903d3[_0x3a8c96(0x115)](_0x38e3f2);}),_0x3903d3[_0x2522cc(0xf7)]&&(await _0x54e8ca['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x3903d3]}}))[_0x2522cc(0x144)][_0x2522cc(0x13a)][_0x2522cc(0xd8)](_0x4da101=>{const _0x2463a6=_0x2522cc;_0x4da101&&_0x53704a[_0x2463a6(0xf4)](_0x4da101);});};var _0x5f4cd3=Object[_0x517094(0xda)],_0x34ba7e=(_0x144819,_0x388a83,_0x2e758e,_0x1cee1e)=>{for(var _0x24bd5f=_0x1cee1e>0x1?void 0x0:_0x1cee1e?_0x5f4cd3(_0x388a83,_0x2e758e):_0x388a83,_0xd86d55=_0x144819['length']-0x1,_0x1d1cab;_0xd86d55>=0x0;_0xd86d55--)(_0x1d1cab=_0x144819[_0xd86d55])&&(_0x24bd5f=_0x1d1cab(_0x24bd5f)||_0x24bd5f);return _0x24bd5f;},_0x44b08a=(_0x386fca,_0x9015fd)=>(_0x270943,_0x3dd393)=>_0x9015fd(_0x270943,_0x3dd393,_0x386fca);let _0x1078ee=class extends _0x339162[_0x517094(0xf6)]{constructor(_0x16f25f,_0x44d592,_0x47eb77,_0x184e2c){const _0xdf17b9=_0x517094;super(),this[_0xdf17b9(0x145)]=_0x16f25f,this[_0xdf17b9(0x11e)]=_0x44d592,this['_userService']=_0x47eb77,this[_0xdf17b9(0xce)]=_0x184e2c,this[_0xdf17b9(0x110)](),this[_0xdf17b9(0x136)]();}['_initUserSync'](){const _0x456f7e=_0x517094;this['disposeWithMe'](this[_0x456f7e(0x11e)][_0x456f7e(0x107)][_0x456f7e(0x135)](_0x5b0053['bufferTime'](0x10))['subscribe'](_0x1185a2=>{const _0x57ec5c=_0x456f7e,_0x9af9b1=new Set();_0x1185a2[_0x57ec5c(0xd8)](_0x4684fd=>{const _0x2f93b7=_0x57ec5c;switch(_0x4684fd[_0x2f93b7(0x143)]){case _0x2f93b7(0x141):{const _0x1b17b8=_0x4684fd['payload'][_0x2f93b7(0xf2)];_0x9af9b1[_0x2f93b7(0x141)](_0x1b17b8);break;}}}),_0x305acc(this[_0x57ec5c(0xce)],_0x9af9b1);}));}[_0x517094(0x110)](){const _0x869240=_0x517094;this[_0x869240(0xcc)](this[_0x869240(0x145)][_0x869240(0x107)][_0x869240(0xf0)](async _0x53c024=>{const _0x311dcf=_0x869240;var _0x39861d,_0x1ebb01,_0x1a2185,_0x358fba;const _0x1f9a91=(_0x39861d=this['_threadCommentModel'][_0x311dcf(0xd0)](_0x53c024['unitId'])[_0x311dcf(0x129)](_0x40907d=>_0x40907d[_0x311dcf(0xe6)]===_0x53c024['threadId']))==null?void 0x0:_0x39861d[_0x311dcf(0xdf)];if(!_0x1f9a91)return;const {unitId:_0x330fc6,subUnitId:_0x106ecc}=_0x1f9a91;switch(_0x53c024[_0x311dcf(0xe5)]&&this[_0x311dcf(0x11f)]['addUser'](_0x53c024['user']),_0x53c024[_0x311dcf(0x143)]){case _0x1d3786[_0x311dcf(0xe2)]:break;case _0x1d3786[_0x311dcf(0x108)]:{this[_0x311dcf(0x11e)][_0x311dcf(0x111)](_0x330fc6,_0x106ecc,{'unitId':_0x330fc6,'subUnitId':_0x106ecc,'ref':'','id':_0x53c024[_0x311dcf(0xff)],'dT':_0xb22aaa(+_0x53c024[_0x311dcf(0xf1)]),'threadId':_0x53c024[_0x311dcf(0xe6)],'personId':(_0x1a2185=(_0x1ebb01=_0x53c024[_0x311dcf(0xe5)])==null?void 0x0:_0x1ebb01[_0x311dcf(0xc6)])!=null?_0x1a2185:_0x53c024[_0x311dcf(0x105)],'text':JSON['parse'](_0x53c024[_0x311dcf(0x127)]),'parentId':_0x1f9a91['id']});break;}case _0x1d3786[_0x311dcf(0x140)]:{const _0xbbce7d=this['_threadCommentModel'][_0x311dcf(0xca)](_0x330fc6,_0x106ecc,_0x53c024['replyId']);_0xbbce7d&&_0xbbce7d[_0x311dcf(0x120)]&&this[_0x311dcf(0x11e)][_0x311dcf(0x10e)](_0x330fc6,_0x106ecc,_0x53c024[_0x311dcf(0xff)]);break;}case _0x1d3786[_0x311dcf(0x10c)]:{this[_0x311dcf(0x11e)][_0x311dcf(0x14b)](_0x330fc6,_0x106ecc,{'commentId':_0x53c024['replyId'],'text':JSON[_0x311dcf(0x13e)](_0x53c024[_0x311dcf(0x127)])});break;}case _0x1d3786[_0x311dcf(0x137)]:{const _0x416ad9=(_0x358fba=this[_0x311dcf(0x11e)][_0x311dcf(0xd0)](_0x53c024[_0x311dcf(0x130)])['find'](_0x16eca5=>_0x16eca5[_0x311dcf(0xe6)]===_0x53c024['threadId']))==null?void 0x0:_0x358fba[_0x311dcf(0xdf)];_0x416ad9&&this['_threadCommentModel']['resolveComment'](_0x330fc6,_0x106ecc,_0x416ad9['id'],_0x53c024[_0x311dcf(0x124)]===_0x33b650[_0x311dcf(0xfa)]);break;}}}));}};_0x1078ee=_0x34ba7e([_0x44b08a(0x0,_0x339162['Inject'](_0x22aec6[_0x517094(0x118)])),_0x44b08a(0x1,_0x339162[_0x517094(0x122)](_0x4f90b6[_0x517094(0xc9)])),_0x44b08a(0x2,_0x339162['Inject'](_0x339162[_0x517094(0x113)])),_0x44b08a(0x3,_0x339162[_0x517094(0x122)](_0x339162[_0x517094(0x121)]))],_0x1078ee);const _0x449652=_0x517094(0x13b),_0xa6a9d5={};var _0x186994=Object[_0x517094(0xda)],_0x2c9fcc=(_0x3a0cd7,_0x2c4c34,_0x5d426f,_0x2b5891)=>{const _0x36edfa=_0x517094;for(var _0x4bae73=_0x2b5891>0x1?void 0x0:_0x2b5891?_0x186994(_0x2c4c34,_0x5d426f):_0x2c4c34,_0x56cb47=_0x3a0cd7[_0x36edfa(0x11b)]-0x1,_0x3cc40b;_0x56cb47>=0x0;_0x56cb47--)(_0x3cc40b=_0x3a0cd7[_0x56cb47])&&(_0x4bae73=_0x3cc40b(_0x4bae73)||_0x4bae73);return _0x4bae73;},_0x2a0068=(_0x36293a,_0x872fd3)=>(_0xc81ca2,_0x58559d)=>_0x872fd3(_0xc81ca2,_0x58559d,_0x36293a);function _0xabd89c(_0x369e81,_0x3c7c31){const _0x2bebd7=_0x517094,_0x2fbc8f=_0x369e81['replies'][0x0];return{..._0x3c7c31,'id':_0x2fbc8f[_0x2bebd7(0xff)],'resolved':_0x369e81['solved']===0x1,'dT':_0xb22aaa(_0x2fbc8f[_0x2bebd7(0xf1)]),'personId':_0x2fbc8f[_0x2bebd7(0x105)],'threadId':_0x2fbc8f[_0x2bebd7(0xe6)]};}function _0x4956a3(_0x444a04,_0x47895b,_0x559210){const _0x356a92=_0x517094;var _0x12b408,_0x5636dd;if(((_0x5636dd=(_0x12b408=_0x444a04==null?void 0x0:_0x444a04[_0x356a92(0x11c)])==null?void 0x0:_0x12b408['length'])!=null?_0x5636dd:0x0)>0x0){const _0x113f82=(_0x157ebe,_0x526280)=>({'id':_0x157ebe[_0x356a92(0xff)],'threadId':_0x157ebe[_0x356a92(0xe6)],'dT':_0xb22aaa(_0x157ebe['createTimestamp']),'personId':_0x157ebe[_0x356a92(0x105)],'resolved':_0x444a04[_0x356a92(0x124)]===_0x33b650[_0x356a92(0xfa)],'unitId':_0x47895b,'subUnitId':_0x559210,'text':JSON[_0x356a92(0x13e)](_0x157ebe[_0x356a92(0x127)]),'parentId':_0x526280}),_0x43c6af=_0x113f82(_0x444a04[_0x356a92(0x11c)][0x0]);return{..._0x43c6af,'children':_0x444a04[_0x356a92(0x11c)]['slice'](0x1)[_0x356a92(0xed)](_0x27bc5d=>_0x113f82(_0x27bc5d,_0x43c6af['id']))};}return null;}let _0x8da111=class{constructor(_0x11c497,_0x30b3ab,_0x749187){const _0x47fbdb=_0x517094;this[_0x47fbdb(0xee)]=_0x11c497,this[_0x47fbdb(0x11f)]=_0x30b3ab,this[_0x47fbdb(0xeb)]=_0x749187;}async[_0x517094(0x111)](_0x118937){const _0x1eeeb2=_0x517094;var _0x47524a,_0x4efc4c;const {parentId:_0x100520,unitId:_0x27d536,text:_0x1b1223,threadId:_0x5b18d5}=_0x118937,_0x2b2c25=(_0x4efc4c=(_0x47524a=_0x1b1223[_0x1eeeb2(0xd9)])==null?void 0x0:_0x47524a[_0x1eeeb2(0xfe)](_0x4cd704=>_0x4cd704[_0x1eeeb2(0xcf)]===_0x339162[_0x1eeeb2(0x103)][_0x1eeeb2(0x13f)])['map'](_0x380bde=>_0x380bde[_0x1eeeb2(0xe0)]))!=null?_0x4efc4c:[],_0x1a3548=JSON[_0x1eeeb2(0x12d)](_0x1b1223),_0x48c984=(await this[_0x1eeeb2(0xeb)][_0x1eeeb2(0x126)](_0x27d536))['getMemberID']();if(_0x100520){const _0x42786f={'memberId':_0x48c984,'unitId':_0x27d536,'content':_0x1a3548,'mention':_0x2b2c25,'threadId':_0x5b18d5},_0x362430=(await this['_httpService'][_0x1eeeb2(0xec)](_0x1eeeb2(0x134)+_0x27d536+'/reply',{'body':_0x42786f}))[_0x1eeeb2(0x144)][_0x1eeeb2(0xc8)];return{..._0x118937,'id':_0x362430[_0x1eeeb2(0xff)],'dT':_0x339162[_0x1eeeb2(0xdd)](+_0x362430['createTimestamp'])[_0x1eeeb2(0xdb)](_0x1eeeb2(0x12f)),'personId':_0x362430[_0x1eeeb2(0x105)]};}else{const _0x25f1b3={'memberId':_0x48c984,'unitId':_0x27d536,'content':_0x1a3548,'mention':_0x2b2c25},_0xfa56d3=await this[_0x1eeeb2(0xee)]['post'](_0x1eeeb2(0x134)+_0x27d536+_0x1eeeb2(0xea),{'body':_0x25f1b3});return _0xabd89c(_0xfa56d3[_0x1eeeb2(0x144)]['comment'],_0x118937);}}async[_0x517094(0x14b)](_0x20fc19){const _0x391b20=_0x517094;var _0x254f18,_0x4e238b;const {text:_0x2a8562,unitId:_0x1e2135}=_0x20fc19,_0x496aa5=(_0x4e238b=(_0x254f18=_0x2a8562[_0x391b20(0xd9)])==null?void 0x0:_0x254f18[_0x391b20(0xfe)](_0x19227a=>_0x19227a[_0x391b20(0xcf)]===_0x339162[_0x391b20(0x103)][_0x391b20(0x13f)])['map'](_0x328c88=>_0x328c88['rangeId']))!=null?_0x4e238b:[],_0x49945e=JSON[_0x391b20(0x12d)](_0x2a8562),_0x409af6=_0x20fc19[_0x391b20(0xe6)],_0x5dc326=_0x20fc19['id'],_0x51165b={'memberId':(await this[_0x391b20(0xeb)][_0x391b20(0x126)](_0x1e2135))[_0x391b20(0x117)](),'unitId':_0x1e2135,'threadId':_0x409af6,'mention':_0x496aa5,'content':_0x49945e,'replyId':_0x5dc326},_0x36edbb=await this[_0x391b20(0xee)]['post'](_0x391b20(0x134)+_0x1e2135+_0x391b20(0xd7),{'body':_0x51165b});return!_0x36edbb[_0x391b20(0x144)]['error']||_0x36edbb[_0x391b20(0x144)][_0x391b20(0xfb)][_0x391b20(0xdc)]===0x1;}async['resolveComment'](_0x3d9054){const _0x54ab83=_0x517094,{unitId:_0x470a18}=_0x3d9054,_0x273209=_0x3d9054[_0x54ab83(0xe6)],_0x2505d8={'memberId':this[_0x54ab83(0x11f)][_0x54ab83(0x104)]()['userID'],'unitId':_0x470a18,'threadId':_0x273209,'solved':_0x3d9054['resolved']?_0x33b650['Solved']:_0x33b650[_0x54ab83(0x106)]},_0x1ddbfb=await this[_0x54ab83(0xee)][_0x54ab83(0xec)](_0x54ab83(0x134)+_0x470a18+_0x54ab83(0xc4),{'body':_0x2505d8});return!_0x1ddbfb[_0x54ab83(0x144)]['error']||_0x1ddbfb[_0x54ab83(0x144)][_0x54ab83(0xfb)][_0x54ab83(0xdc)]===0x1;}async[_0x517094(0x10e)](_0x5c8d84,_0x620a9,_0x3d713a,_0x1125e0){const _0x3b8daf=_0x517094,_0xf63864={'memberId':(await this[_0x3b8daf(0xeb)][_0x3b8daf(0x126)](_0x5c8d84))[_0x3b8daf(0x117)](),'threadId':_0x3d713a,'replyId':_0x1125e0,'unitId':_0x5c8d84},_0x1bb998=await this[_0x3b8daf(0xee)]['post'](_0x3b8daf(0x134)+_0x5c8d84+_0x3b8daf(0x12c),{'body':_0xf63864});return!_0x1bb998[_0x3b8daf(0x144)][_0x3b8daf(0xfb)]||_0x1bb998[_0x3b8daf(0x144)][_0x3b8daf(0xfb)][_0x3b8daf(0xdc)]===0x1;}async[_0x517094(0x11d)](_0x5e4e6f,_0x418398,_0x2fdef4){const _0x264b77=_0x517094,_0x18b7a6={'unitId':_0x5e4e6f,'threadId':_0x2fdef4},_0x2a81dc=await this[_0x264b77(0xee)][_0x264b77(0xec)]('/universer-api/comment/unit/'+_0x5e4e6f+'/list',{'body':_0x18b7a6}),_0x2b3694=_0x2fdef4[_0x264b77(0xed)](_0xdc3439=>_0x4956a3(_0x2a81dc['body'][_0x264b77(0x133)][_0xdc3439],_0x5e4e6f,_0x418398))[_0x264b77(0xfe)](Boolean);return Object['values'](_0x2a81dc[_0x264b77(0x144)][_0x264b77(0x13a)])[_0x264b77(0xd8)](_0x43aeb1=>{const _0xa45aef=_0x264b77;this[_0xa45aef(0x11f)][_0xa45aef(0xf4)](_0x43aeb1);}),_0x2b3694;}[_0x517094(0x10a)](_0xdcd73d){const _0x228a61=_0x517094;return{'id':_0xdcd73d['id'],'threadId':_0xdcd73d[_0x228a61(0xe6)],'ref':_0xdcd73d[_0x228a61(0xef)]};}};_0x8da111=_0x2c9fcc([_0x2a0068(0x0,_0x339162['Inject'](_0x24ec67[_0x517094(0xe8)])),_0x2a0068(0x1,_0x339162[_0x517094(0x122)](_0x339162[_0x517094(0x113)])),_0x2a0068(0x2,_0x339162[_0x517094(0x122)](_0x22aec6[_0x517094(0x138)]))],_0x8da111);var _0x369d25=Object[_0x517094(0xda)],_0x28b8f2=(_0x2d1738,_0x56f711,_0x1fa7e8,_0x3a9c98)=>{const _0x6f51ea=_0x517094;for(var _0x127ffd=_0x3a9c98>0x1?void 0x0:_0x3a9c98?_0x369d25(_0x56f711,_0x1fa7e8):_0x56f711,_0x453438=_0x2d1738[_0x6f51ea(0x11b)]-0x1,_0x3a64de;_0x453438>=0x0;_0x453438--)(_0x3a64de=_0x2d1738[_0x453438])&&(_0x127ffd=_0x3a64de(_0x127ffd)||_0x127ffd);return _0x127ffd;},_0x5a26af=(_0x127f65,_0x45f51e)=>(_0x373f85,_0x3bed1f)=>_0x45f51e(_0x373f85,_0x3bed1f,_0x127f65);let _0x211922=class extends _0x339162[_0x517094(0xf6)]{constructor(_0x28b507,_0x133971){const _0x367a28=_0x517094;super(),this[_0x367a28(0x139)]=_0x28b507,this['_threadCommentDataSource']=_0x133971,this[_0x367a28(0xc5)]();}[_0x517094(0xc5)](){const _0x484cd9=_0x517094;this[_0x484cd9(0x139)]['dataSource']=this[_0x484cd9(0x101)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x211922=_0x28b8f2([_0x5a26af(0x0,_0x4f90b6['IThreadCommentDataSourceService']),_0x5a26af(0x1,_0x339162[_0x517094(0x122)](_0x8da111))],_0x211922);var _0x1bef80=Object['defineProperty'],_0x5b30ec=Object['getOwnPropertyDescriptor'],_0x2622ef=(_0x5b5cb2,_0x3376b7,_0x4ac799)=>_0x3376b7 in _0x5b5cb2?_0x1bef80(_0x5b5cb2,_0x3376b7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4ac799}):_0x5b5cb2[_0x3376b7]=_0x4ac799,_0x3af381=(_0x513f47,_0xb2b7dd,_0x4fca76,_0x25cb32)=>{const _0x5dcae9=_0x517094;for(var _0x15f4c8=_0x25cb32>0x1?void 0x0:_0x25cb32?_0x5b30ec(_0xb2b7dd,_0x4fca76):_0xb2b7dd,_0xc1ff84=_0x513f47[_0x5dcae9(0x11b)]-0x1,_0x1c9dfb;_0xc1ff84>=0x0;_0xc1ff84--)(_0x1c9dfb=_0x513f47[_0xc1ff84])&&(_0x15f4c8=_0x1c9dfb(_0x15f4c8)||_0x15f4c8);return _0x15f4c8;},_0x4a5cf2=(_0x3c0c7f,_0xb7ef32)=>(_0x4ad10e,_0x2373d0)=>_0xb7ef32(_0x4ad10e,_0x2373d0,_0x3c0c7f),_0x35a6b1=(_0x1a1397,_0x10f8d8,_0x411162)=>_0x2622ef(_0x1a1397,typeof _0x10f8d8!=_0x517094(0xd5)?_0x10f8d8+'':_0x10f8d8,_0x411162);_0x43a127[_0x517094(0xcd)]=class extends _0x339162[_0x517094(0x100)]{constructor(_0x379a80=_0xa6a9d5,_0x4446a7,_0x58dcc6){const _0x11a133=_0x517094;super(),this[_0x11a133(0x14a)]=_0x379a80,this[_0x11a133(0xce)]=_0x4446a7,this['_configService']=_0x58dcc6;const {..._0x44c93b}=_0x339162[_0x11a133(0xe9)]({},_0xa6a9d5,this[_0x11a133(0x14a)]);this[_0x11a133(0xd1)][_0x11a133(0xc7)](_0x449652,_0x44c93b);}[_0x517094(0xf9)](){const _0x576607=_0x517094;[[_0x8da111],[_0x211922],[_0x1078ee]][_0x576607(0xd8)](_0x15e631=>{const _0xb48e79=_0x576607;this['_injector'][_0xb48e79(0x141)](_0x15e631);});}[_0x517094(0xd2)](){const _0x2eaf53=_0x517094;this[_0x2eaf53(0xce)][_0x2eaf53(0x132)](_0x211922),this[_0x2eaf53(0xce)][_0x2eaf53(0x132)](_0x1078ee);}},_0x35a6b1(_0x43a127[_0x517094(0xcd)],'pluginName',_0x310541),_0x35a6b1(_0x43a127[_0x517094(0xcd)],'type',_0x339162['UniverInstanceType'][_0x517094(0x119)]),_0x43a127['UniverThreadCommentDataSourcePlugin']=_0x3af381([_0x339162['DependentOn'](_0xd7cca9['UniverThreadCommentUIPlugin'],_0x22aec6[_0x517094(0xf3)],_0x5392ce['UniverLicensePlugin']),_0x4a5cf2(0x1,_0x339162[_0x517094(0x122)](_0x339162['Injector'])),_0x4a5cf2(0x2,_0x339162[_0x517094(0x146)])],_0x43a127[_0x517094(0xcd)]),Object[_0x517094(0x128)](_0x43a127,Symbol[_0x517094(0x125)],{'value':_0x517094(0x142)});}));function _0x4bda(){const _0x104909=['ThreadCommentModel','getComment','@univerjs-pro/collaboration-client','disposeWithMe','UniverThreadCommentDataSourcePlugin','_injector','rangeType','getUnit','_configService','onReady','object','@univerjs/network','symbol','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/edit','forEach','customRanges','getOwnPropertyDescriptor','format','code','dayjs','1132790YnlePn','root','rangeId','UniverProCollaborationClient','Add','rxjs','292704jSOmWf','user','threadId','@univerjs/thread-comment','HTTPService','merge','/add','_sessionService','post','map','_httpService','ref','subscribe','createTimestamp','personId','UniverCollaborationClientPlugin','addUser','Unknown','Disposable','size','UniverCore','onStarting','Solved','error','60836wVCOne','9444aGLsks','filter','replyId','Plugin','_threadCommentDataSource','getUser','CustomRangeType','getCurrentUser','userId','OpenOrReOpen','commentUpdate$','Reply','amd','saveCommentToSnapshot','@univerjs/thread-comment-ui','Edit','99qcqKAU','deleteComment','UniverThreadCommentUi','_init','addComment','91ouzdnD','UserManagerService','16528304aqKzBD','delete','468bVMMTA','getMemberID','CommentService','UNIVER_UNKNOWN','UniverProThreadCommentDatasource','length','replies','listComments','_threadCommentModel','_userService','parentId','Injector','Inject','UNRECOGNIZED','solved','toStringTag','requireSession','content','defineProperty','find','@univerjs-pro/license','UniverThreadComment','/delete','stringify','49520zkBQgw','YYYY/MM/DD\x20HH:mm','unitId','UniverProLicense','get','comments','/universer-api/comment/unit/','pipe','_initUserSync','Solve','CollaborationSessionService','_threadCommentDataSourceService','users','thread-comment-data-source.config','2189dfbriu','6ilfpPg','parse','COMMENT','Delete','add','Module','type','body','_commentService','IConfigService','1GlVjzT','exports','4503970gRJlIR','_config','updateComment','/solved','_initDataSource','userID','setConfig','reply'];_0x4bda=function(){return _0x104909;};return _0x4bda();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.12-nightly.202510251119",
|
|
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.10.
|
|
49
|
-
"@univerjs-pro/license": "0.10.
|
|
50
|
-
"@univerjs/core": "0.10.
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.10.12-nightly.202510251119",
|
|
49
|
+
"@univerjs-pro/license": "0.10.12-nightly.202510251119",
|
|
50
|
+
"@univerjs/core": "0.10.12-nightly.202510251119",
|
|
51
51
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.10.
|
|
54
|
-
"@univerjs/
|
|
52
|
+
"@univerjs/thread-comment": "0.10.12-nightly.202510251119",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.10.12-nightly.202510251119",
|
|
54
|
+
"@univerjs/network": "0.10.12-nightly.202510251119"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.9.3",
|
|
59
59
|
"vite": "^7.1.10",
|
|
60
60
|
"vitest": "^3.2.4",
|
|
61
|
-
"@univerjs-infra/shared": "0.10.
|
|
61
|
+
"@univerjs-infra/shared": "0.10.12"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|