@univerjs-pro/thread-comment-datasource 0.9.3-nightly.202507250819 → 0.9.4-nightly.202507290713

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';function _0x6213(){const _0x239b3d=['resolved','getMemberID','slice','339621BwzGdV','commentUpdate$','1406850WmbGTT','_sessionService','getOwnPropertyDescriptor','/reply','map','getUnit','1797816oAPyba','format','/universer-api/user/list','OpenOrReOpen','/list','defineProperty','rangeId','_initUserSync','onReady','payload','Inject','getCurrentUser','subscribe','type','userID','pluginName','pipe','addComment','bufferTime','replies','303108pezlaa','UniverThreadCommentDataSourcePlugin','/add','7554eGSZKh','user','length','Add','unitId','createTimestamp','_commentService','comments','content','/solved','UniverThreadCommentUIPlugin','_init','body','UniverLicensePlugin','stringify','add','989019TrtANV','_userService','_threadCommentDataSource','error','getUser','solved','/delete','thread-comment-data-source.config','CustomRangeType','IThreadCommentDataSourceService','Module','CollaborationSessionService','Solved','addUser','onStarting','HTTPService','_httpService','requireSession','customRanges','reply','resolveComment','_threadCommentModel','2241yMuAfz','find','Injector','_configService','listComments','replyId','ref','UniverInstanceType','UserManagerService','disposeWithMe','code','UNIVER_UNKNOWN','_config','YYYY/MM/DD\x20HH:mm','DependentOn','COMMENT','get','410lIJfdx','rangeType','/universer-api/comment/unit/','filter','Reply','users','post','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Solve','threadId','parse','Delete','dayjs','UniverCollaborationClientPlugin','size','Edit','deleteComment','Plugin','_threadCommentDataSourceService','UNRECOGNIZED','IConfigService','/edit','toStringTag','comment','userId','forEach','root','_initDataSource','symbol','_injector','dataSource','1127dImVsE'];_0x6213=function(){return _0x239b3d;};return _0x6213();}const _0x350e0a=_0x3deb;(function(_0x4b30a9,_0x3d23d5){const _0x23b2d6=_0x3deb,_0x212bf5=_0x4b30a9();while(!![]){try{const _0x229cad=-parseInt(_0x23b2d6(0x222))/0x1+parseInt(_0x23b2d6(0x1ff))/0x2*(-parseInt(_0x23b2d6(0x1ee))/0x3)+parseInt(_0x23b2d6(0x1c5))/0x4+parseInt(_0x23b2d6(0x224))/0x5+-parseInt(_0x23b2d6(0x1c8))/0x6*(-parseInt(_0x23b2d6(0x21e))/0x7)+parseInt(_0x23b2d6(0x1b1))/0x8+-parseInt(_0x23b2d6(0x1d8))/0x9;if(_0x229cad===_0x3d23d5)break;else _0x212bf5['push'](_0x212bf5['shift']());}catch(_0x1be531){_0x212bf5['push'](_0x212bf5['shift']());}}}(_0x6213,0x2c6a6));Object[_0x350e0a(0x1b6)](exports,Symbol[_0x350e0a(0x215)],{'value':_0x350e0a(0x1e2)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x350e0a(0x206);var I=(_0xa8d8d8=>(_0xa8d8d8[_0xa8d8d8[_0x350e0a(0x1b4)]=0x0]='OpenOrReOpen',_0xa8d8d8[_0xa8d8d8[_0x350e0a(0x1e4)]=0x1]=_0x350e0a(0x1e4),_0xa8d8d8[_0xa8d8d8[_0x350e0a(0x212)]=-0x1]=_0x350e0a(0x212),_0xa8d8d8))(I||{}),v=(_0x5e5dc6=>(_0x5e5dc6[_0x5e5dc6['Unknown']=0x0]='Unknown',_0x5e5dc6[_0x5e5dc6['Add']=0x1]=_0x350e0a(0x1cb),_0x5e5dc6[_0x5e5dc6[_0x350e0a(0x203)]=0x2]=_0x350e0a(0x203),_0x5e5dc6[_0x5e5dc6[_0x350e0a(0x20e)]=0x3]=_0x350e0a(0x20e),_0x5e5dc6[_0x5e5dc6[_0x350e0a(0x20a)]=0x4]='Delete',_0x5e5dc6[_0x5e5dc6['Solve']=0x5]=_0x350e0a(0x207),_0x5e5dc6[_0x5e5dc6[_0x350e0a(0x212)]=-0x1]=_0x350e0a(0x212),_0x5e5dc6))(v||{});const f=_0x32b45e=>c[_0x350e0a(0x20b)](new Date(+_0x32b45e))[_0x350e0a(0x1b2)](_0x350e0a(0x1fb)),R=async(_0x9a20fc,_0x3613b9)=>{const _0x26c842=_0x350e0a,_0x437748=_0x9a20fc[_0x26c842(0x1fe)](c[_0x26c842(0x1f6)]),_0x161646=_0x9a20fc[_0x26c842(0x1fe)](P[_0x26c842(0x1e7)]);_0x3613b9['forEach'](_0x405735=>{const _0x579405=_0x26c842;_0x437748[_0x579405(0x1dc)](_0x405735)&&_0x3613b9['delete'](_0x405735);}),_0x3613b9[_0x26c842(0x20d)]&&(await _0x161646[_0x26c842(0x1fe)](_0x26c842(0x1b3),{'params':{'userIDs':[..._0x3613b9]}}))[_0x26c842(0x1d4)]['users'][_0x26c842(0x218)](_0x2793ab=>{const _0x567c3a=_0x26c842;_0x2793ab&&_0x437748[_0x567c3a(0x1e5)](_0x2793ab);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x681a24,_0x23d092,_0x363cdb,_0x4fc3d2)=>{for(var _0x1ab2e6=_0x4fc3d2>0x1?void 0x0:_0x4fc3d2?$(_0x23d092,_0x363cdb):_0x23d092,_0x20020e=_0x681a24['length']-0x1,_0xc98a0f;_0x20020e>=0x0;_0x20020e--)(_0xc98a0f=_0x681a24[_0x20020e])&&(_0x1ab2e6=_0xc98a0f(_0x1ab2e6)||_0x1ab2e6);return _0x1ab2e6;},S=(_0x15cf1a,_0x3378bd)=>(_0xfe9d1d,_0x235d0b)=>_0x3378bd(_0xfe9d1d,_0x235d0b,_0x15cf1a);let p=class extends c['Disposable']{constructor(_0x50bb3c,_0x244169,_0xfce9ee,_0x3e8a18){const _0x5887da=_0x350e0a;super(),this['_commentService']=_0x50bb3c,this[_0x5887da(0x1ed)]=_0x244169,this[_0x5887da(0x1d9)]=_0xfce9ee,this['_injector']=_0x3e8a18,this['_init'](),this[_0x5887da(0x1b8)]();}[_0x350e0a(0x1b8)](){const _0x369e84=_0x350e0a;this[_0x369e84(0x1f7)](this[_0x369e84(0x1ed)][_0x369e84(0x223)][_0x369e84(0x1c1)](w[_0x369e84(0x1c3)](0x10))[_0x369e84(0x1bd)](_0x59af6a=>{const _0x3004cf=_0x369e84,_0x40f844=new Set();_0x59af6a['forEach'](_0x27bc4d=>{const _0xab37b2=_0x3deb;switch(_0x27bc4d[_0xab37b2(0x1be)]){case _0xab37b2(0x1d7):{const _0x29c351=_0x27bc4d[_0xab37b2(0x1ba)]['personId'];_0x40f844['add'](_0x29c351);break;}}}),R(this[_0x3004cf(0x21c)],_0x40f844);}));}[_0x350e0a(0x1d3)](){const _0x4737fc=_0x350e0a;this[_0x4737fc(0x1f7)](this[_0x4737fc(0x1ce)][_0x4737fc(0x223)][_0x4737fc(0x1bd)](async _0xb149cf=>{const _0x3cdc34=_0x4737fc;var _0x542f7c,_0x552d7c,_0x2ece01,_0x257214;const _0x271b15=(_0x542f7c=this['_threadCommentModel'][_0x3cdc34(0x1b0)](_0xb149cf[_0x3cdc34(0x1cc)])[_0x3cdc34(0x1ef)](_0x220dbd=>_0x220dbd[_0x3cdc34(0x208)]===_0xb149cf[_0x3cdc34(0x208)]))==null?void 0x0:_0x542f7c['root'];if(!_0x271b15)return;const {unitId:_0x37e57a,subUnitId:_0x269dcc}=_0x271b15;switch(_0xb149cf[_0x3cdc34(0x1c9)]&&this[_0x3cdc34(0x1d9)][_0x3cdc34(0x1e5)](_0xb149cf[_0x3cdc34(0x1c9)]),_0xb149cf[_0x3cdc34(0x1be)]){case v[_0x3cdc34(0x1cb)]:break;case v[_0x3cdc34(0x203)]:{this[_0x3cdc34(0x1ed)][_0x3cdc34(0x1c2)](_0x37e57a,_0x269dcc,{'unitId':_0x37e57a,'subUnitId':_0x269dcc,'ref':'','id':_0xb149cf[_0x3cdc34(0x1f3)],'dT':f(+_0xb149cf[_0x3cdc34(0x1cd)]),'threadId':_0xb149cf[_0x3cdc34(0x208)],'personId':(_0x2ece01=(_0x552d7c=_0xb149cf[_0x3cdc34(0x1c9)])==null?void 0x0:_0x552d7c[_0x3cdc34(0x1bf)])!=null?_0x2ece01:_0xb149cf[_0x3cdc34(0x217)],'text':JSON[_0x3cdc34(0x209)](_0xb149cf['content']),'parentId':_0x271b15['id']});break;}case v['Delete']:{const _0x16f2fd=this[_0x3cdc34(0x1ed)]['getComment'](_0x37e57a,_0x269dcc,_0xb149cf[_0x3cdc34(0x1f3)]);_0x16f2fd&&_0x16f2fd['parentId']&&this[_0x3cdc34(0x1ed)][_0x3cdc34(0x20f)](_0x37e57a,_0x269dcc,_0xb149cf[_0x3cdc34(0x1f3)]);break;}case v['Edit']:{this[_0x3cdc34(0x1ed)]['updateComment'](_0x37e57a,_0x269dcc,{'commentId':_0xb149cf[_0x3cdc34(0x1f3)],'text':JSON['parse'](_0xb149cf[_0x3cdc34(0x1d0)])});break;}case v[_0x3cdc34(0x207)]:{const _0x304c71=(_0x257214=this[_0x3cdc34(0x1ed)][_0x3cdc34(0x1b0)](_0xb149cf[_0x3cdc34(0x1cc)])[_0x3cdc34(0x1ef)](_0x3210b3=>_0x3210b3[_0x3cdc34(0x208)]===_0xb149cf[_0x3cdc34(0x208)]))==null?void 0x0:_0x257214[_0x3cdc34(0x219)];_0x304c71&&this[_0x3cdc34(0x1ed)][_0x3cdc34(0x1ec)](_0x37e57a,_0x269dcc,_0x304c71['id'],_0xb149cf[_0x3cdc34(0x1dd)]===I[_0x3cdc34(0x1e4)]);break;}}}));}};p=E([S(0x0,c[_0x350e0a(0x1bb)](b['CommentService'])),S(0x1,c[_0x350e0a(0x1bb)](M['ThreadCommentModel'])),S(0x2,c[_0x350e0a(0x1bb)](c[_0x350e0a(0x1f6)])),S(0x3,c[_0x350e0a(0x1bb)](c[_0x350e0a(0x1f0)]))],p);const q=_0x350e0a(0x1df),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x3dd700,_0x10d10e,_0x33da3b,_0x2bec58)=>{const _0xa30039=_0x350e0a;for(var _0x2d8707=_0x2bec58>0x1?void 0x0:_0x2bec58?A(_0x10d10e,_0x33da3b):_0x10d10e,_0x73fc5b=_0x3dd700[_0xa30039(0x1ca)]-0x1,_0x1caba2;_0x73fc5b>=0x0;_0x73fc5b--)(_0x1caba2=_0x3dd700[_0x73fc5b])&&(_0x2d8707=_0x1caba2(_0x2d8707)||_0x2d8707);return _0x2d8707;},_=(_0x304452,_0x465f87)=>(_0xb2e25,_0x30f876)=>_0x465f87(_0xb2e25,_0x30f876,_0x304452);function Y(_0x477f7b,_0x56b6e8){const _0x765c5c=_0x350e0a,_0x1e2f11=_0x477f7b[_0x765c5c(0x1c4)][0x0];return{..._0x56b6e8,'id':_0x1e2f11['replyId'],'resolved':_0x477f7b[_0x765c5c(0x1dd)]===0x1,'dT':f(_0x1e2f11[_0x765c5c(0x1cd)]),'personId':_0x1e2f11[_0x765c5c(0x217)],'threadId':_0x1e2f11[_0x765c5c(0x208)]};}function G(_0x4c2874,_0x150fb7,_0x1768b6){const _0x328228=_0x350e0a;var _0x18d347,_0x1898be;if(((_0x1898be=(_0x18d347=_0x4c2874==null?void 0x0:_0x4c2874['replies'])==null?void 0x0:_0x18d347[_0x328228(0x1ca)])!=null?_0x1898be:0x0)>0x0){const _0x20f120=(_0x21c704,_0x1b7b00)=>({'id':_0x21c704[_0x328228(0x1f3)],'threadId':_0x21c704[_0x328228(0x208)],'dT':f(_0x21c704[_0x328228(0x1cd)]),'personId':_0x21c704['userId'],'resolved':_0x4c2874[_0x328228(0x1dd)]===I[_0x328228(0x1e4)],'unitId':_0x150fb7,'subUnitId':_0x1768b6,'text':JSON[_0x328228(0x209)](_0x21c704[_0x328228(0x1d0)]),'parentId':_0x1b7b00}),_0x17fc1d=_0x20f120(_0x4c2874[_0x328228(0x1c4)][0x0]);return{..._0x17fc1d,'children':_0x4c2874[_0x328228(0x1c4)][_0x328228(0x221)](0x1)[_0x328228(0x1af)](_0x5633b3=>_0x20f120(_0x5633b3,_0x17fc1d['id']))};}return null;}let g=class{constructor(_0x5cf275,_0x316786,_0x5a8d44,_0xe622c4){const _0x32d98f=_0x350e0a;this[_0x32d98f(0x1e8)]=_0x5cf275,this[_0x32d98f(0x1d9)]=_0x316786,this[_0x32d98f(0x225)]=_0x5a8d44,this[_0x32d98f(0x21c)]=_0xe622c4;}async[_0x350e0a(0x1c2)](_0x8084cf){const _0x3a7e32=_0x350e0a;var _0x3bb030,_0x5ce36f;const {parentId:_0x1f43d7,unitId:_0x3face3,text:_0x3db784,threadId:_0x548423}=_0x8084cf,_0x2d009f=(_0x5ce36f=(_0x3bb030=_0x3db784[_0x3a7e32(0x1ea)])==null?void 0x0:_0x3bb030[_0x3a7e32(0x202)](_0xd929a1=>_0xd929a1['rangeType']===c[_0x3a7e32(0x1e0)][_0x3a7e32(0x1fd)])[_0x3a7e32(0x1af)](_0x54203c=>_0x54203c['rangeId']))!=null?_0x5ce36f:[],_0x9cd30c=JSON[_0x3a7e32(0x1d6)](_0x3db784),_0x7cf503=(await this[_0x3a7e32(0x225)][_0x3a7e32(0x1e9)](_0x3face3))[_0x3a7e32(0x220)]();if(_0x1f43d7){const _0x8c12a0={'memberId':_0x7cf503,'unitId':_0x3face3,'content':_0x9cd30c,'mention':_0x2d009f,'threadId':_0x548423},_0x1d71b9=(await this[_0x3a7e32(0x1e8)][_0x3a7e32(0x205)](_0x3a7e32(0x201)+_0x3face3+_0x3a7e32(0x1ae),{'body':_0x8c12a0}))[_0x3a7e32(0x1d4)][_0x3a7e32(0x1eb)];return{..._0x8084cf,'id':_0x1d71b9[_0x3a7e32(0x1f3)],'dT':c['dayjs'](+_0x1d71b9[_0x3a7e32(0x1cd)])[_0x3a7e32(0x1b2)](_0x3a7e32(0x1fb)),'personId':_0x1d71b9[_0x3a7e32(0x217)]};}else{const _0x5c6d58={'memberId':_0x7cf503,'unitId':_0x3face3,'content':_0x9cd30c,'mention':_0x2d009f},_0x49e4d4=await this[_0x3a7e32(0x1e8)][_0x3a7e32(0x205)]('/universer-api/comment/unit/'+_0x3face3+_0x3a7e32(0x1c7),{'body':_0x5c6d58});return Y(_0x49e4d4[_0x3a7e32(0x1d4)][_0x3a7e32(0x216)],_0x8084cf);}}async['updateComment'](_0x36e78d){const _0x16e338=_0x350e0a;var _0x3f540a,_0x36120d;const {text:_0x52c3d2,unitId:_0x46ecbd}=_0x36e78d,_0x7ea661=(_0x36120d=(_0x3f540a=_0x52c3d2[_0x16e338(0x1ea)])==null?void 0x0:_0x3f540a[_0x16e338(0x202)](_0x416680=>_0x416680[_0x16e338(0x200)]===c[_0x16e338(0x1e0)][_0x16e338(0x1fd)])[_0x16e338(0x1af)](_0x3a5473=>_0x3a5473[_0x16e338(0x1b7)]))!=null?_0x36120d:[],_0x178d30=JSON[_0x16e338(0x1d6)](_0x52c3d2),_0xb3d528=_0x36e78d[_0x16e338(0x208)],_0x14c1a4=_0x36e78d['id'],_0x5162a6={'memberId':(await this[_0x16e338(0x225)]['requireSession'](_0x46ecbd))['getMemberID'](),'unitId':_0x46ecbd,'threadId':_0xb3d528,'mention':_0x7ea661,'content':_0x178d30,'replyId':_0x14c1a4},_0x2c0737=await this[_0x16e338(0x1e8)]['post'](_0x16e338(0x201)+_0x46ecbd+_0x16e338(0x214),{'body':_0x5162a6});return!_0x2c0737[_0x16e338(0x1d4)]['error']||_0x2c0737[_0x16e338(0x1d4)][_0x16e338(0x1db)][_0x16e338(0x1f8)]===0x1;}async[_0x350e0a(0x1ec)](_0xddecd6){const _0xa85d16=_0x350e0a,{unitId:_0x5da228}=_0xddecd6,_0x11ccf8=_0xddecd6[_0xa85d16(0x208)],_0x80bc7f={'memberId':this[_0xa85d16(0x1d9)][_0xa85d16(0x1bc)]()[_0xa85d16(0x1bf)],'unitId':_0x5da228,'threadId':_0x11ccf8,'solved':_0xddecd6[_0xa85d16(0x21f)]?I['Solved']:I[_0xa85d16(0x1b4)]},_0x2d2501=await this[_0xa85d16(0x1e8)][_0xa85d16(0x205)](_0xa85d16(0x201)+_0x5da228+_0xa85d16(0x1d1),{'body':_0x80bc7f});return!_0x2d2501['body'][_0xa85d16(0x1db)]||_0x2d2501['body'][_0xa85d16(0x1db)]['code']===0x1;}async['deleteComment'](_0x3b07ae,_0xbb72b9,_0x4a5942,_0x69de27){const _0x4f7985=_0x350e0a,_0x5b2266={'memberId':(await this[_0x4f7985(0x225)][_0x4f7985(0x1e9)](_0x3b07ae))['getMemberID'](),'threadId':_0x4a5942,'replyId':_0x69de27,'unitId':_0x3b07ae},_0xe19a53=await this['_httpService']['post'](_0x4f7985(0x201)+_0x3b07ae+_0x4f7985(0x1de),{'body':_0x5b2266});return!_0xe19a53[_0x4f7985(0x1d4)][_0x4f7985(0x1db)]||_0xe19a53[_0x4f7985(0x1d4)]['error']['code']===0x1;}async[_0x350e0a(0x1f2)](_0x4345a6,_0x14a293,_0x2c7ceb){const _0x392680=_0x350e0a,_0x3fe90d={'unitId':_0x4345a6,'threadId':_0x2c7ceb},_0x270c0c=await this['_httpService'][_0x392680(0x205)](_0x392680(0x201)+_0x4345a6+_0x392680(0x1b5),{'body':_0x3fe90d}),_0xd55bc5=_0x2c7ceb[_0x392680(0x1af)](_0x3c6aaf=>G(_0x270c0c[_0x392680(0x1d4)][_0x392680(0x1cf)][_0x3c6aaf],_0x4345a6,_0x14a293))[_0x392680(0x202)](Boolean);return Object['values'](_0x270c0c['body'][_0x392680(0x204)])[_0x392680(0x218)](_0x5de9df=>{const _0x24a4e9=_0x392680;this[_0x24a4e9(0x1d9)]['addUser'](_0x5de9df);}),_0xd55bc5;}['saveCommentToSnapshot'](_0x483c68){const _0xc7afee=_0x350e0a;return{'id':_0x483c68['id'],'threadId':_0x483c68[_0xc7afee(0x208)],'ref':_0x483c68[_0xc7afee(0x1f4)]};}};g=x([_(0x0,c[_0x350e0a(0x1bb)](P[_0x350e0a(0x1e7)])),_(0x1,c[_0x350e0a(0x1bb)](c[_0x350e0a(0x1f6)])),_(0x2,c['Inject'](b[_0x350e0a(0x1e3)])),_(0x3,c[_0x350e0a(0x1bb)](c['Injector']))],g);var H=Object[_0x350e0a(0x1ad)],J=(_0x3422f2,_0x188eef,_0x4958c4,_0x4b62a2)=>{const _0x84b886=_0x350e0a;for(var _0x32b621=_0x4b62a2>0x1?void 0x0:_0x4b62a2?H(_0x188eef,_0x4958c4):_0x188eef,_0x1c1c26=_0x3422f2[_0x84b886(0x1ca)]-0x1,_0xa3768c;_0x1c1c26>=0x0;_0x1c1c26--)(_0xa3768c=_0x3422f2[_0x1c1c26])&&(_0x32b621=_0xa3768c(_0x32b621)||_0x32b621);return _0x32b621;},y=(_0x5b4ca4,_0x11a451)=>(_0x15551d,_0x360f6c)=>_0x11a451(_0x15551d,_0x360f6c,_0x5b4ca4);let C=class extends c['Disposable']{constructor(_0x4891a1,_0x4798d0){const _0x30f266=_0x350e0a;super(),this[_0x30f266(0x211)]=_0x4891a1,this[_0x30f266(0x1da)]=_0x4798d0,this[_0x30f266(0x21a)]();}[_0x350e0a(0x21a)](){const _0x3f46d0=_0x350e0a;this[_0x3f46d0(0x211)][_0x3f46d0(0x21d)]=this[_0x3f46d0(0x1da)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x350e0a(0x1e1)]),y(0x1,c['Inject'](g))],C);function _0x3deb(_0x380944,_0x3d39c5){const _0x621387=_0x6213();return _0x3deb=function(_0x3debbd,_0x4fe00f){_0x3debbd=_0x3debbd-0x1ad;let _0x57266b=_0x621387[_0x3debbd];return _0x57266b;},_0x3deb(_0x380944,_0x3d39c5);}var F=Object[_0x350e0a(0x1b6)],L=Object[_0x350e0a(0x1ad)],Z=(_0x5078f7,_0x210dfb,_0xc6f117)=>_0x210dfb in _0x5078f7?F(_0x5078f7,_0x210dfb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xc6f117}):_0x5078f7[_0x210dfb]=_0xc6f117,W=(_0x38217b,_0x7e1625,_0x570f83,_0x3cd66c)=>{const _0x247942=_0x350e0a;for(var _0x26249f=_0x3cd66c>0x1?void 0x0:_0x3cd66c?L(_0x7e1625,_0x570f83):_0x7e1625,_0x5e20a1=_0x38217b[_0x247942(0x1ca)]-0x1,_0x14032f;_0x5e20a1>=0x0;_0x5e20a1--)(_0x14032f=_0x38217b[_0x5e20a1])&&(_0x26249f=_0x14032f(_0x26249f)||_0x26249f);return _0x26249f;},O=(_0xea6060,_0xfc08f2)=>(_0x578d89,_0x1a0cce)=>_0xfc08f2(_0x578d89,_0x1a0cce,_0xea6060),N=(_0x318db4,_0x3e8fcd,_0x1204d1)=>Z(_0x318db4,typeof _0x3e8fcd!=_0x350e0a(0x21b)?_0x3e8fcd+'':_0x3e8fcd,_0x1204d1);exports[_0x350e0a(0x1c6)]=class extends c[_0x350e0a(0x210)]{constructor(_0x2ec87d=D,_0x16a19d,_0x193816){const _0x2de292=_0x350e0a;super(),this[_0x2de292(0x1fa)]=_0x2ec87d,this[_0x2de292(0x21c)]=_0x16a19d,this[_0x2de292(0x1f1)]=_0x193816;const {..._0x28e782}=c['merge']({},D,this[_0x2de292(0x1fa)]);this[_0x2de292(0x1f1)]['setConfig'](q,_0x28e782);}[_0x350e0a(0x1e6)](){const _0x461aac=_0x350e0a;[[g],[C],[p]][_0x461aac(0x218)](_0x1cf5b8=>{const _0x491e1a=_0x461aac;this['_injector'][_0x491e1a(0x1d7)](_0x1cf5b8);});}[_0x350e0a(0x1b9)](){const _0x566094=_0x350e0a;this['_injector'][_0x566094(0x1fe)](C),this[_0x566094(0x21c)][_0x566094(0x1fe)](p);}},N(exports[_0x350e0a(0x1c6)],_0x350e0a(0x1c0),U),N(exports[_0x350e0a(0x1c6)],'type',c[_0x350e0a(0x1f5)][_0x350e0a(0x1f9)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x350e0a(0x1fc)](j[_0x350e0a(0x1d2)],b[_0x350e0a(0x20c)],T[_0x350e0a(0x1d5)]),O(0x1,c['Inject'](c[_0x350e0a(0x1f0)])),O(0x2,c[_0x350e0a(0x213)])],exports[_0x350e0a(0x1c6)]);
1
+ 'use strict';const _0x3d5420=_0x111b;(function(_0x47ef3e,_0x7169b8){const _0x35746f=_0x111b,_0x3b7652=_0x47ef3e();while(!![]){try{const _0xd147e3=parseInt(_0x35746f(0x11f))/0x1+-parseInt(_0x35746f(0x158))/0x2*(parseInt(_0x35746f(0x12f))/0x3)+-parseInt(_0x35746f(0x130))/0x4+parseInt(_0x35746f(0x140))/0x5+-parseInt(_0x35746f(0x14d))/0x6*(parseInt(_0x35746f(0x154))/0x7)+parseInt(_0x35746f(0x132))/0x8+parseInt(_0x35746f(0x15d))/0x9*(-parseInt(_0x35746f(0x18b))/0xa);if(_0xd147e3===_0x7169b8)break;else _0x3b7652['push'](_0x3b7652['shift']());}catch(_0x277980){_0x3b7652['push'](_0x3b7652['shift']());}}}(_0x5b97,0xb6eaf));Object[_0x3d5420(0x174)](exports,Symbol['toStringTag'],{'value':_0x3d5420(0x126)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x3d5420(0x11e);var I=(_0x10bb0d=>(_0x10bb0d[_0x10bb0d[_0x3d5420(0x15f)]=0x0]='OpenOrReOpen',_0x10bb0d[_0x10bb0d[_0x3d5420(0x16e)]=0x1]=_0x3d5420(0x16e),_0x10bb0d[_0x10bb0d[_0x3d5420(0x114)]=-0x1]=_0x3d5420(0x114),_0x10bb0d))(I||{}),v=(_0x3613b9=>(_0x3613b9[_0x3613b9['Unknown']=0x0]=_0x3d5420(0x14b),_0x3613b9[_0x3613b9[_0x3d5420(0x16c)]=0x1]=_0x3d5420(0x16c),_0x3613b9[_0x3613b9[_0x3d5420(0x157)]=0x2]=_0x3d5420(0x157),_0x3613b9[_0x3613b9[_0x3d5420(0x167)]=0x3]=_0x3d5420(0x167),_0x3613b9[_0x3613b9[_0x3d5420(0x115)]=0x4]=_0x3d5420(0x115),_0x3613b9[_0x3613b9[_0x3d5420(0x11d)]=0x5]=_0x3d5420(0x11d),_0x3613b9[_0x3613b9['UNRECOGNIZED']=-0x1]=_0x3d5420(0x114),_0x3613b9))(v||{});const f=_0x38d48d=>c[_0x3d5420(0x15c)](new Date(+_0x38d48d))[_0x3d5420(0x128)](_0x3d5420(0x151)),R=async(_0x252d82,_0x3ff60d)=>{const _0x276264=_0x3d5420,_0x8daabf=_0x252d82[_0x276264(0x147)](c['UserManagerService']),_0x4217a3=_0x252d82[_0x276264(0x147)](P[_0x276264(0x17b)]);_0x3ff60d['forEach'](_0x347531=>{const _0x4d54da=_0x276264;_0x8daabf[_0x4d54da(0x16d)](_0x347531)&&_0x3ff60d[_0x4d54da(0x117)](_0x347531);}),_0x3ff60d[_0x276264(0x155)]&&(await _0x4217a3[_0x276264(0x147)](_0x276264(0x135),{'params':{'userIDs':[..._0x3ff60d]}}))['body'][_0x276264(0x13f)]['forEach'](_0x1c10ba=>{const _0x1fe7c6=_0x276264;_0x1c10ba&&_0x8daabf[_0x1fe7c6(0x133)](_0x1c10ba);});};var $=Object[_0x3d5420(0x12d)],E=(_0x3080c0,_0x564317,_0x237dda,_0x37c94a)=>{for(var _0x3595f3=_0x37c94a>0x1?void 0x0:_0x37c94a?$(_0x564317,_0x237dda):_0x564317,_0x3da47d=_0x3080c0['length']-0x1,_0x46efd4;_0x3da47d>=0x0;_0x3da47d--)(_0x46efd4=_0x3080c0[_0x3da47d])&&(_0x3595f3=_0x46efd4(_0x3595f3)||_0x3595f3);return _0x3595f3;},S=(_0x7f7f9,_0xd328a9)=>(_0x6aae2b,_0x234823)=>_0xd328a9(_0x6aae2b,_0x234823,_0x7f7f9);let _=class extends c[_0x3d5420(0x119)]{constructor(_0x4d4330,_0x11bbee,_0x44d3d5,_0x1447f2){const _0x4f5a49=_0x3d5420;super(),this[_0x4f5a49(0x185)]=_0x4d4330,this['_threadCommentModel']=_0x11bbee,this[_0x4f5a49(0x15e)]=_0x44d3d5,this['_injector']=_0x1447f2,this['_init'](),this[_0x4f5a49(0x17c)]();}[_0x3d5420(0x17c)](){const _0x490ed6=_0x3d5420;this[_0x490ed6(0x16b)](this[_0x490ed6(0x163)][_0x490ed6(0x14f)][_0x490ed6(0x188)](j[_0x490ed6(0x18e)](0x10))[_0x490ed6(0x11b)](_0x29d482=>{const _0xe730ad=_0x490ed6,_0xec92b8=new Set();_0x29d482[_0xe730ad(0x16f)](_0x339095=>{const _0x27fffc=_0xe730ad;switch(_0x339095[_0x27fffc(0x172)]){case _0x27fffc(0x170):{const _0x535d26=_0x339095[_0x27fffc(0x13a)][_0x27fffc(0x12e)];_0xec92b8[_0x27fffc(0x170)](_0x535d26);break;}}}),R(this[_0xe730ad(0x173)],_0xec92b8);}));}[_0x3d5420(0x148)](){const _0xe32a3e=_0x3d5420;this['disposeWithMe'](this['_commentService']['commentUpdate$'][_0xe32a3e(0x11b)](async _0x56f45a=>{const _0x166176=_0xe32a3e;var _0x4ea2e5,_0x1e4a83,_0x591494,_0xa1f3bc;const _0x535cd5=(_0x4ea2e5=this[_0x166176(0x163)][_0x166176(0x125)](_0x56f45a['unitId'])[_0x166176(0x17d)](_0x8f9436=>_0x8f9436['threadId']===_0x56f45a[_0x166176(0x120)]))==null?void 0x0:_0x4ea2e5[_0x166176(0x12c)];if(!_0x535cd5)return;const {unitId:_0x52b4fc,subUnitId:_0x80ade3}=_0x535cd5;switch(_0x56f45a[_0x166176(0x187)]&&this['_userService'][_0x166176(0x133)](_0x56f45a['user']),_0x56f45a[_0x166176(0x172)]){case v[_0x166176(0x16c)]:break;case v[_0x166176(0x157)]:{this['_threadCommentModel'][_0x166176(0x181)](_0x52b4fc,_0x80ade3,{'unitId':_0x52b4fc,'subUnitId':_0x80ade3,'ref':'','id':_0x56f45a[_0x166176(0x153)],'dT':f(+_0x56f45a[_0x166176(0x116)]),'threadId':_0x56f45a[_0x166176(0x120)],'personId':(_0x591494=(_0x1e4a83=_0x56f45a[_0x166176(0x187)])==null?void 0x0:_0x1e4a83[_0x166176(0x12a)])!=null?_0x591494:_0x56f45a[_0x166176(0x129)],'text':JSON['parse'](_0x56f45a[_0x166176(0x12b)]),'parentId':_0x535cd5['id']});break;}case v[_0x166176(0x115)]:{const _0x5d2f64=this['_threadCommentModel'][_0x166176(0x166)](_0x52b4fc,_0x80ade3,_0x56f45a[_0x166176(0x153)]);_0x5d2f64&&_0x5d2f64[_0x166176(0x180)]&&this[_0x166176(0x163)]['deleteComment'](_0x52b4fc,_0x80ade3,_0x56f45a[_0x166176(0x153)]);break;}case v[_0x166176(0x167)]:{this[_0x166176(0x163)][_0x166176(0x144)](_0x52b4fc,_0x80ade3,{'commentId':_0x56f45a['replyId'],'text':JSON[_0x166176(0x145)](_0x56f45a[_0x166176(0x12b)])});break;}case v['Solve']:{const _0x266662=(_0xa1f3bc=this[_0x166176(0x163)][_0x166176(0x125)](_0x56f45a['unitId'])[_0x166176(0x17d)](_0x312b1a=>_0x312b1a[_0x166176(0x120)]===_0x56f45a[_0x166176(0x120)]))==null?void 0x0:_0xa1f3bc[_0x166176(0x12c)];_0x266662&&this[_0x166176(0x163)]['resolveComment'](_0x52b4fc,_0x80ade3,_0x266662['id'],_0x56f45a['solved']===I[_0x166176(0x16e)]);break;}}}));}};_=E([S(0x0,c[_0x3d5420(0x189)](b[_0x3d5420(0x11a)])),S(0x1,c[_0x3d5420(0x189)](M[_0x3d5420(0x136)])),S(0x2,c[_0x3d5420(0x189)](c[_0x3d5420(0x118)])),S(0x3,c[_0x3d5420(0x189)](c[_0x3d5420(0x156)]))],_);const q='thread-comment-data-source.config',D={};function _0x111b(_0x2cb04b,_0x4de542){const _0x5b9799=_0x5b97();return _0x111b=function(_0x111b3f,_0x319a2c){_0x111b3f=_0x111b3f-0x114;let _0x5e7ea7=_0x5b9799[_0x111b3f];return _0x5e7ea7;},_0x111b(_0x2cb04b,_0x4de542);}var A=Object[_0x3d5420(0x12d)],x=(_0x37423f,_0x5de3aa,_0x1f2626,_0x112685)=>{for(var _0x3931b7=_0x112685>0x1?void 0x0:_0x112685?A(_0x5de3aa,_0x1f2626):_0x5de3aa,_0x2dbf90=_0x37423f['length']-0x1,_0x1176c4;_0x2dbf90>=0x0;_0x2dbf90--)(_0x1176c4=_0x37423f[_0x2dbf90])&&(_0x3931b7=_0x1176c4(_0x3931b7)||_0x3931b7);return _0x3931b7;},C=(_0x5ba353,_0x20a97e)=>(_0x45df47,_0x1151de)=>_0x20a97e(_0x45df47,_0x1151de,_0x5ba353);function Y(_0xe1b44b,_0x1fdaa9){const _0x56063d=_0x3d5420,_0x572e62=_0xe1b44b[_0x56063d(0x164)][0x0];return{..._0x1fdaa9,'id':_0x572e62[_0x56063d(0x153)],'resolved':_0xe1b44b[_0x56063d(0x162)]===0x1,'dT':f(_0x572e62[_0x56063d(0x116)]),'personId':_0x572e62['userId'],'threadId':_0x572e62[_0x56063d(0x120)]};}function G(_0x11d03f,_0x2973fa,_0x40005a){const _0x468b15=_0x3d5420;var _0x27d04a,_0x4bbf40;if(((_0x4bbf40=(_0x27d04a=_0x11d03f==null?void 0x0:_0x11d03f['replies'])==null?void 0x0:_0x27d04a['length'])!=null?_0x4bbf40:0x0)>0x0){const _0x492f04=(_0x3e8ab8,_0x5f32bc)=>({'id':_0x3e8ab8['replyId'],'threadId':_0x3e8ab8[_0x468b15(0x120)],'dT':f(_0x3e8ab8['createTimestamp']),'personId':_0x3e8ab8[_0x468b15(0x129)],'resolved':_0x11d03f[_0x468b15(0x162)]===I[_0x468b15(0x16e)],'unitId':_0x2973fa,'subUnitId':_0x40005a,'text':JSON['parse'](_0x3e8ab8[_0x468b15(0x12b)]),'parentId':_0x5f32bc}),_0x26cd75=_0x492f04(_0x11d03f[_0x468b15(0x164)][0x0]);return{..._0x26cd75,'children':_0x11d03f[_0x468b15(0x164)][_0x468b15(0x17a)](0x1)['map'](_0x5b9931=>_0x492f04(_0x5b9931,_0x26cd75['id']))};}return null;}let p=class{constructor(_0x2db495,_0x1a1751,_0x2143e1){const _0x45a894=_0x3d5420;this[_0x45a894(0x15b)]=_0x2db495,this[_0x45a894(0x15e)]=_0x1a1751,this['_sessionService']=_0x2143e1;}async[_0x3d5420(0x181)](_0x22bc61){const _0x10951d=_0x3d5420;var _0x3a9614,_0x27bc44;const {parentId:_0x1497c1,unitId:_0x3776c9,text:_0x2026c9,threadId:_0x306b82}=_0x22bc61,_0x421e12=(_0x27bc44=(_0x3a9614=_0x2026c9[_0x10951d(0x14a)])==null?void 0x0:_0x3a9614[_0x10951d(0x14c)](_0x4a94ca=>_0x4a94ca['rangeType']===c[_0x10951d(0x150)]['COMMENT'])[_0x10951d(0x143)](_0x35c187=>_0x35c187[_0x10951d(0x165)]))!=null?_0x27bc44:[],_0x4a14c5=JSON[_0x10951d(0x17e)](_0x2026c9),_0x2f7f34=(await this['_sessionService'][_0x10951d(0x16a)](_0x3776c9))[_0x10951d(0x123)]();if(_0x1497c1){const _0xca0c9={'memberId':_0x2f7f34,'unitId':_0x3776c9,'content':_0x4a14c5,'mention':_0x421e12,'threadId':_0x306b82},_0x1fcd37=(await this[_0x10951d(0x15b)]['post']('/universer-api/comment/unit/'+_0x3776c9+'/reply',{'body':_0xca0c9}))['body'][_0x10951d(0x146)];return{..._0x22bc61,'id':_0x1fcd37['replyId'],'dT':c['dayjs'](+_0x1fcd37['createTimestamp'])[_0x10951d(0x128)](_0x10951d(0x151)),'personId':_0x1fcd37[_0x10951d(0x129)]};}else{const _0x598400={'memberId':_0x2f7f34,'unitId':_0x3776c9,'content':_0x4a14c5,'mention':_0x421e12},_0x5ec4da=await this[_0x10951d(0x15b)][_0x10951d(0x184)](_0x10951d(0x11c)+_0x3776c9+_0x10951d(0x134),{'body':_0x598400});return Y(_0x5ec4da[_0x10951d(0x183)]['comment'],_0x22bc61);}}async[_0x3d5420(0x144)](_0x1e0ccf){const _0x1d2a42=_0x3d5420;var _0x45c5c4,_0xdf7e0a;const {text:_0x1b2bc9,unitId:_0x117372}=_0x1e0ccf,_0x1e8e6b=(_0xdf7e0a=(_0x45c5c4=_0x1b2bc9['customRanges'])==null?void 0x0:_0x45c5c4[_0x1d2a42(0x14c)](_0x207fcd=>_0x207fcd['rangeType']===c[_0x1d2a42(0x150)][_0x1d2a42(0x139)])['map'](_0x518a0b=>_0x518a0b['rangeId']))!=null?_0xdf7e0a:[],_0x3548c8=JSON[_0x1d2a42(0x17e)](_0x1b2bc9),_0x364066=_0x1e0ccf[_0x1d2a42(0x120)],_0x31348b=_0x1e0ccf['id'],_0x2d715c={'memberId':(await this['_sessionService'][_0x1d2a42(0x16a)](_0x117372))['getMemberID'](),'unitId':_0x117372,'threadId':_0x364066,'mention':_0x1e8e6b,'content':_0x3548c8,'replyId':_0x31348b},_0xdfd0f=await this[_0x1d2a42(0x15b)]['post'](_0x1d2a42(0x11c)+_0x117372+_0x1d2a42(0x138),{'body':_0x2d715c});return!_0xdfd0f[_0x1d2a42(0x183)]['error']||_0xdfd0f[_0x1d2a42(0x183)]['error'][_0x1d2a42(0x177)]===0x1;}async[_0x3d5420(0x152)](_0x108d1b){const _0x198d37=_0x3d5420,{unitId:_0x45524e}=_0x108d1b,_0xa5e1cb=_0x108d1b['threadId'],_0x23d978={'memberId':this['_userService'][_0x198d37(0x13d)]()[_0x198d37(0x12a)],'unitId':_0x45524e,'threadId':_0xa5e1cb,'solved':_0x108d1b[_0x198d37(0x137)]?I[_0x198d37(0x16e)]:I[_0x198d37(0x15f)]},_0x206c67=await this[_0x198d37(0x15b)][_0x198d37(0x184)](_0x198d37(0x11c)+_0x45524e+'/solved',{'body':_0x23d978});return!_0x206c67[_0x198d37(0x183)][_0x198d37(0x176)]||_0x206c67['body'][_0x198d37(0x176)][_0x198d37(0x177)]===0x1;}async[_0x3d5420(0x122)](_0x3e82e8,_0x55cc50,_0x3e48e5,_0x159d25){const _0x1f7a9f=_0x3d5420,_0x2a09e7={'memberId':(await this[_0x1f7a9f(0x13c)][_0x1f7a9f(0x16a)](_0x3e82e8))['getMemberID'](),'threadId':_0x3e48e5,'replyId':_0x159d25,'unitId':_0x3e82e8},_0x5c3004=await this['_httpService'][_0x1f7a9f(0x184)](_0x1f7a9f(0x11c)+_0x3e82e8+_0x1f7a9f(0x171),{'body':_0x2a09e7});return!_0x5c3004[_0x1f7a9f(0x183)]['error']||_0x5c3004['body'][_0x1f7a9f(0x176)][_0x1f7a9f(0x177)]===0x1;}async['listComments'](_0x59017d,_0x363926,_0x2f620d){const _0x9dbd03=_0x3d5420,_0x4d4433={'unitId':_0x59017d,'threadId':_0x2f620d},_0xf51dfa=await this[_0x9dbd03(0x15b)][_0x9dbd03(0x184)](_0x9dbd03(0x11c)+_0x59017d+'/list',{'body':_0x4d4433}),_0x1c2f20=_0x2f620d[_0x9dbd03(0x143)](_0xb0acac=>G(_0xf51dfa['body'][_0x9dbd03(0x159)][_0xb0acac],_0x59017d,_0x363926))[_0x9dbd03(0x14c)](Boolean);return Object[_0x9dbd03(0x18a)](_0xf51dfa[_0x9dbd03(0x183)]['users'])[_0x9dbd03(0x16f)](_0x391a52=>{const _0x482b37=_0x9dbd03;this[_0x482b37(0x15e)][_0x482b37(0x133)](_0x391a52);}),_0x1c2f20;}[_0x3d5420(0x182)](_0x4034bd){const _0x3f8ed7=_0x3d5420;return{'id':_0x4034bd['id'],'threadId':_0x4034bd[_0x3f8ed7(0x120)],'ref':_0x4034bd[_0x3f8ed7(0x18d)]};}};p=x([C(0x0,c[_0x3d5420(0x189)](P[_0x3d5420(0x17b)])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c[_0x3d5420(0x189)](b[_0x3d5420(0x124)]))],p);function _0x5b97(){const _0x2a75c7=['defineProperty','dataSource','error','code','setConfig','symbol','slice','HTTPService','_initUserSync','find','stringify','UniverThreadCommentUIPlugin','parentId','addComment','saveCommentToSnapshot','body','post','_commentService','UniverThreadCommentDataSourcePlugin','user','pipe','Inject','values','7607870qqXnXS','DependentOn','ref','bufferTime','UNRECOGNIZED','Delete','createTimestamp','delete','UserManagerService','Disposable','CommentService','subscribe','/universer-api/comment/unit/','Solve','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','1495449cKzGxF','threadId','onStarting','deleteComment','getMemberID','CollaborationSessionService','getUnit','Module','_threadCommentDataSourceService','format','userId','userID','content','root','getOwnPropertyDescriptor','personId','93pHbixn','874136qQJDHf','_initDataSource','5885936NczQTa','addUser','/add','/universer-api/user/list','ThreadCommentModel','resolved','/edit','COMMENT','payload','UniverCollaborationClientPlugin','_sessionService','getCurrentUser','length','users','1231385mNqjxX','UNIVER_UNKNOWN','Plugin','map','updateComment','parse','reply','get','_init','IConfigService','customRanges','Unknown','filter','312VGxLQt','_configService','commentUpdate$','CustomRangeType','YYYY/MM/DD\x20HH:mm','resolveComment','replyId','70469JyFtbm','size','Injector','Reply','14544hYCvdP','comments','_threadCommentDataSource','_httpService','dayjs','9HABcIN','_userService','OpenOrReOpen','merge','IThreadCommentDataSourceService','solved','_threadCommentModel','replies','rangeId','getComment','Edit','_config','UniverLicensePlugin','requireSession','disposeWithMe','Add','getUser','Solved','forEach','add','/delete','type','_injector'];_0x5b97=function(){return _0x2a75c7;};return _0x5b97();}var H=Object[_0x3d5420(0x12d)],J=(_0x582e0f,_0xa948f7,_0x295ede,_0x1386a0)=>{for(var _0x2eebdb=_0x1386a0>0x1?void 0x0:_0x1386a0?H(_0xa948f7,_0x295ede):_0xa948f7,_0x2218e7=_0x582e0f['length']-0x1,_0x40197c;_0x2218e7>=0x0;_0x2218e7--)(_0x40197c=_0x582e0f[_0x2218e7])&&(_0x2eebdb=_0x40197c(_0x2eebdb)||_0x2eebdb);return _0x2eebdb;},y=(_0xc9a477,_0x5d5d6d)=>(_0x568657,_0x349cbe)=>_0x5d5d6d(_0x568657,_0x349cbe,_0xc9a477);let g=class extends c['Disposable']{constructor(_0x20e23d,_0x5c5f5b){const _0x3aebb5=_0x3d5420;super(),this['_threadCommentDataSourceService']=_0x20e23d,this[_0x3aebb5(0x15a)]=_0x5c5f5b,this[_0x3aebb5(0x131)]();}[_0x3d5420(0x131)](){const _0x36e922=_0x3d5420;this[_0x36e922(0x127)][_0x36e922(0x175)]=this['_threadCommentDataSource'],this[_0x36e922(0x127)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x3d5420(0x161)]),y(0x1,c[_0x3d5420(0x189)](p))],g);var F=Object[_0x3d5420(0x174)],L=Object[_0x3d5420(0x12d)],Z=(_0x1f6c78,_0x598816,_0x28f9b9)=>_0x598816 in _0x1f6c78?F(_0x1f6c78,_0x598816,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x28f9b9}):_0x1f6c78[_0x598816]=_0x28f9b9,W=(_0x1f50bd,_0x5973c0,_0x2102b1,_0xfab39e)=>{const _0x40db28=_0x3d5420;for(var _0x196e98=_0xfab39e>0x1?void 0x0:_0xfab39e?L(_0x5973c0,_0x2102b1):_0x5973c0,_0x1d23f9=_0x1f50bd[_0x40db28(0x13e)]-0x1,_0x349765;_0x1d23f9>=0x0;_0x1d23f9--)(_0x349765=_0x1f50bd[_0x1d23f9])&&(_0x196e98=_0x349765(_0x196e98)||_0x196e98);return _0x196e98;},O=(_0x253211,_0x5ade0f)=>(_0x9a0c24,_0x5d282d)=>_0x5ade0f(_0x9a0c24,_0x5d282d,_0x253211),N=(_0x2a9012,_0x444af2,_0x3cbba1)=>Z(_0x2a9012,typeof _0x444af2!=_0x3d5420(0x179)?_0x444af2+'':_0x444af2,_0x3cbba1);exports[_0x3d5420(0x186)]=class extends c[_0x3d5420(0x142)]{constructor(_0x1fdf59=D,_0x138cca,_0x4f8a82){const _0x37ddaa=_0x3d5420;super(),this[_0x37ddaa(0x168)]=_0x1fdf59,this[_0x37ddaa(0x173)]=_0x138cca,this['_configService']=_0x4f8a82;const {..._0x57938e}=c[_0x37ddaa(0x160)]({},D,this[_0x37ddaa(0x168)]);this[_0x37ddaa(0x14e)][_0x37ddaa(0x178)](q,_0x57938e);}[_0x3d5420(0x121)](){const _0x4a09c5=_0x3d5420;[[p],[g],[_]][_0x4a09c5(0x16f)](_0x8270ae=>{this['_injector']['add'](_0x8270ae);});}['onReady'](){const _0x4b3960=_0x3d5420;this['_injector'][_0x4b3960(0x147)](g),this[_0x4b3960(0x173)][_0x4b3960(0x147)](_);}},N(exports[_0x3d5420(0x186)],'pluginName',U),N(exports[_0x3d5420(0x186)],_0x3d5420(0x172),c['UniverInstanceType'][_0x3d5420(0x141)]),exports[_0x3d5420(0x186)]=W([c[_0x3d5420(0x18c)](w[_0x3d5420(0x17f)],b[_0x3d5420(0x13b)],T[_0x3d5420(0x169)]),O(0x1,c['Inject'](c[_0x3d5420(0x156)])),O(0x2,c[_0x3d5420(0x149)])],exports[_0x3d5420(0x186)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x58fd22=_0x16ea;(function(_0x1b16e0,_0xb8f6c6){const _0xd61e42=_0x16ea,_0x38b61d=_0x1b16e0();while(!![]){try{const _0x453853=parseInt(_0xd61e42(0x15d))/0x1+-parseInt(_0xd61e42(0x1b1))/0x2*(parseInt(_0xd61e42(0x18b))/0x3)+parseInt(_0xd61e42(0x19e))/0x4*(parseInt(_0xd61e42(0x1b4))/0x5)+-parseInt(_0xd61e42(0x192))/0x6+-parseInt(_0xd61e42(0x179))/0x7*(-parseInt(_0xd61e42(0x195))/0x8)+parseInt(_0xd61e42(0x181))/0x9+parseInt(_0xd61e42(0x155))/0xa*(-parseInt(_0xd61e42(0x1a3))/0xb);if(_0x453853===_0xb8f6c6)break;else _0x38b61d['push'](_0x38b61d['shift']());}catch(_0x49645a){_0x38b61d['push'](_0x38b61d['shift']());}}}(_0xad37,0x6639a));import{CommentService as _0x5fbae9,CollaborationSessionService as _0x326a1a,UniverCollaborationClientPlugin as _0x37bf58}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x273301}from'@univerjs-pro/license';import{dayjs as _0x173349,UserManagerService as _0x2fbd9e,Inject as _0x4562eb,Injector as _0x585bfd,Disposable as _0x2a378a,CustomRangeType as _0x2eb19a,UniverInstanceType as _0x25802b,DependentOn as _0x501549,IConfigService as _0x2316e1,Plugin as _0x19daed,merge as _0x5457dd}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2240b0}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3f581d,IThreadCommentDataSourceService as _0x2dd5cd}from'@univerjs/thread-comment';import{bufferTime as _0x58c650}from'rxjs';import{HTTPService as _0x13a52b}from'@univerjs/network';const W=_0x58fd22(0x1ae);var I=(_0xe3eb80=>(_0xe3eb80[_0xe3eb80['OpenOrReOpen']=0x0]=_0x58fd22(0x19c),_0xe3eb80[_0xe3eb80[_0x58fd22(0x190)]=0x1]='Solved',_0xe3eb80[_0xe3eb80[_0x58fd22(0x183)]=-0x1]=_0x58fd22(0x183),_0xe3eb80))(I||{}),v=(_0x5930d8=>(_0x5930d8[_0x5930d8['Unknown']=0x0]='Unknown',_0x5930d8[_0x5930d8[_0x58fd22(0x19d)]=0x1]=_0x58fd22(0x19d),_0x5930d8[_0x5930d8['Reply']=0x2]='Reply',_0x5930d8[_0x5930d8[_0x58fd22(0x184)]=0x3]=_0x58fd22(0x184),_0x5930d8[_0x5930d8[_0x58fd22(0x16f)]=0x4]=_0x58fd22(0x16f),_0x5930d8[_0x5930d8[_0x58fd22(0x164)]=0x5]=_0x58fd22(0x164),_0x5930d8[_0x5930d8['UNRECOGNIZED']=-0x1]=_0x58fd22(0x183),_0x5930d8))(v||{});const D=_0x27e30b=>_0x173349(new Date(+_0x27e30b))[_0x58fd22(0x17e)](_0x58fd22(0x168)),B=async(_0x3ddb92,_0x191148)=>{const _0x821bb6=_0x58fd22,_0x326825=_0x3ddb92[_0x821bb6(0x1aa)](_0x2fbd9e),_0xb2a280=_0x3ddb92[_0x821bb6(0x1aa)](_0x13a52b);_0x191148[_0x821bb6(0x1b9)](_0x275beb=>{const _0x161776=_0x821bb6;_0x326825[_0x161776(0x18e)](_0x275beb)&&_0x191148['delete'](_0x275beb);}),_0x191148[_0x821bb6(0x176)]&&(await _0xb2a280[_0x821bb6(0x1aa)]('/universer-api/user/list',{'params':{'userIDs':[..._0x191148]}}))[_0x821bb6(0x16c)][_0x821bb6(0x19a)]['forEach'](_0x2b9ba0=>{_0x2b9ba0&&_0x326825['addUser'](_0x2b9ba0);});};var K=Object[_0x58fd22(0x1b6)],V=(_0x395dd9,_0x22196b,_0x23b540,_0x147bc5)=>{const _0x1211f9=_0x58fd22;for(var _0x13a604=_0x147bc5>0x1?void 0x0:_0x147bc5?K(_0x22196b,_0x23b540):_0x22196b,_0x385a50=_0x395dd9[_0x1211f9(0x17f)]-0x1,_0x294ad9;_0x385a50>=0x0;_0x385a50--)(_0x294ad9=_0x395dd9[_0x385a50])&&(_0x13a604=_0x294ad9(_0x13a604)||_0x13a604);return _0x13a604;},p=(_0x6e4e42,_0x567722)=>(_0x30f72f,_0x2a5ccb)=>_0x567722(_0x30f72f,_0x2a5ccb,_0x6e4e42);function _0xad37(){const _0x3cf088=['getUnit','1465155NIttkb','userId','UNRECOGNIZED','Edit','_commentService','map','_sessionService','find','pluginName','syncUpdateMutationToColla','1302nkDuMJ','parse','rangeType','getUser','addUser','Solved','/reply','2264154MKdtSe','/delete','saveCommentToSnapshot','89936eeprXG','subscribe','resolved','ref','error','users','updateComment','OpenOrReOpen','Add','8WhpeoO','thread-comment-data-source.config','deleteComment','onReady','requireSession','7953QWiczd','addComment','getMemberID','stringify','replies','content','UNIVER_UNKNOWN','get','pipe','onStarting','_config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','personId','replyId','966jCUVNH','_injector','filter','876790sVtOKK','Reply','getOwnPropertyDescriptor','_threadCommentDataSourceService','root','forEach','commentUpdate$','5190EuNQwj','/universer-api/comment/unit/','solved','userID','defineProperty','getComment','slice','setConfig','552645psvpyk','payload','/add','threadId','_httpService','parentId','createTimestamp','Solve','_userService','post','_initDataSource','YYYY/MM/DD\x20HH:mm','_init','add','customRanges','body','rangeId','resolveComment','Delete','COMMENT','/list','values','disposeWithMe','_threadCommentDataSource','type','size','code','comment','196lahryy','user','_threadCommentModel','/edit','listComments','format','length'];_0xad37=function(){return _0x3cf088;};return _0xad37();}let S=class extends _0x2a378a{constructor(_0x15698d,_0x15ba86,_0x456fd6,_0x4b26e2){const _0x26811e=_0x58fd22;super(),this[_0x26811e(0x185)]=_0x15698d,this[_0x26811e(0x17b)]=_0x15ba86,this[_0x26811e(0x165)]=_0x456fd6,this[_0x26811e(0x1b2)]=_0x4b26e2,this[_0x26811e(0x169)](),this['_initUserSync']();}['_initUserSync'](){const _0x1f7f45=_0x58fd22;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$'][_0x1f7f45(0x1ab)](_0x58c650(0x10))[_0x1f7f45(0x196)](_0x1b5190=>{const _0x9dbeee=_0x1f7f45,_0x330851=new Set();_0x1b5190[_0x9dbeee(0x1b9)](_0x1a86cf=>{const _0x569a5e=_0x9dbeee;switch(_0x1a86cf[_0x569a5e(0x175)]){case _0x569a5e(0x16a):{const _0x515c50=_0x1a86cf[_0x569a5e(0x15e)][_0x569a5e(0x1af)];_0x330851[_0x569a5e(0x16a)](_0x515c50);break;}}}),B(this['_injector'],_0x330851);}));}[_0x58fd22(0x169)](){const _0x2c052b=_0x58fd22;this[_0x2c052b(0x173)](this[_0x2c052b(0x185)][_0x2c052b(0x1ba)][_0x2c052b(0x196)](async _0x3bb92b=>{const _0x19bb49=_0x2c052b;var _0x12f6f6,_0x29b2c7,_0x3b3d2b,_0x3d4cca;const _0x3b3149=(_0x12f6f6=this[_0x19bb49(0x17b)]['getUnit'](_0x3bb92b['unitId'])[_0x19bb49(0x188)](_0x57d144=>_0x57d144[_0x19bb49(0x160)]===_0x3bb92b[_0x19bb49(0x160)]))==null?void 0x0:_0x12f6f6[_0x19bb49(0x1b8)];if(!_0x3b3149)return;const {unitId:_0x5b4b9a,subUnitId:_0xc4bc6a}=_0x3b3149;switch(_0x3bb92b['user']&&this['_userService'][_0x19bb49(0x18f)](_0x3bb92b['user']),_0x3bb92b[_0x19bb49(0x175)]){case v[_0x19bb49(0x19d)]:break;case v[_0x19bb49(0x1b5)]:{this[_0x19bb49(0x17b)][_0x19bb49(0x1a4)](_0x5b4b9a,_0xc4bc6a,{'unitId':_0x5b4b9a,'subUnitId':_0xc4bc6a,'ref':'','id':_0x3bb92b['replyId'],'dT':D(+_0x3bb92b[_0x19bb49(0x163)]),'threadId':_0x3bb92b[_0x19bb49(0x160)],'personId':(_0x3b3d2b=(_0x29b2c7=_0x3bb92b[_0x19bb49(0x17a)])==null?void 0x0:_0x29b2c7[_0x19bb49(0x158)])!=null?_0x3b3d2b:_0x3bb92b[_0x19bb49(0x182)],'text':JSON['parse'](_0x3bb92b[_0x19bb49(0x1a8)]),'parentId':_0x3b3149['id']});break;}case v['Delete']:{const _0x26b5d=this[_0x19bb49(0x17b)][_0x19bb49(0x15a)](_0x5b4b9a,_0xc4bc6a,_0x3bb92b[_0x19bb49(0x1b0)]);_0x26b5d&&_0x26b5d[_0x19bb49(0x162)]&&this['_threadCommentModel'][_0x19bb49(0x1a0)](_0x5b4b9a,_0xc4bc6a,_0x3bb92b['replyId']);break;}case v[_0x19bb49(0x184)]:{this[_0x19bb49(0x17b)][_0x19bb49(0x19b)](_0x5b4b9a,_0xc4bc6a,{'commentId':_0x3bb92b[_0x19bb49(0x1b0)],'text':JSON['parse'](_0x3bb92b[_0x19bb49(0x1a8)])});break;}case v['Solve']:{const _0x508438=(_0x3d4cca=this[_0x19bb49(0x17b)][_0x19bb49(0x180)](_0x3bb92b['unitId'])[_0x19bb49(0x188)](_0x663629=>_0x663629[_0x19bb49(0x160)]===_0x3bb92b[_0x19bb49(0x160)]))==null?void 0x0:_0x3d4cca['root'];_0x508438&&this[_0x19bb49(0x17b)][_0x19bb49(0x16e)](_0x5b4b9a,_0xc4bc6a,_0x508438['id'],_0x3bb92b[_0x19bb49(0x157)]===I[_0x19bb49(0x190)]);break;}}}));}};S=V([p(0x0,_0x4562eb(_0x5fbae9)),p(0x1,_0x4562eb(_0x3f581d)),p(0x2,_0x4562eb(_0x2fbd9e)),p(0x3,_0x4562eb(_0x585bfd))],S);const z=_0x58fd22(0x19f),M={};var k=Object[_0x58fd22(0x1b6)],Q=(_0x394dd7,_0x15f782,_0xcb43c9,_0x44157b)=>{const _0x597b23=_0x58fd22;for(var _0xf577bf=_0x44157b>0x1?void 0x0:_0x44157b?k(_0x15f782,_0xcb43c9):_0x15f782,_0x48d22c=_0x394dd7[_0x597b23(0x17f)]-0x1,_0x4c57fd;_0x48d22c>=0x0;_0x48d22c--)(_0x4c57fd=_0x394dd7[_0x48d22c])&&(_0xf577bf=_0x4c57fd(_0xf577bf)||_0xf577bf);return _0xf577bf;},_=(_0x40bd62,_0x56d04f)=>(_0x37b067,_0x28c342)=>_0x56d04f(_0x37b067,_0x28c342,_0x40bd62);function X(_0x2a90ab,_0x435890){const _0x52f859=_0x58fd22,_0x3402b7=_0x2a90ab['replies'][0x0];return{..._0x435890,'id':_0x3402b7[_0x52f859(0x1b0)],'resolved':_0x2a90ab[_0x52f859(0x157)]===0x1,'dT':D(_0x3402b7[_0x52f859(0x163)]),'personId':_0x3402b7[_0x52f859(0x182)],'threadId':_0x3402b7[_0x52f859(0x160)]};}function _0x16ea(_0x1dc657,_0x4995e3){const _0xad373f=_0xad37();return _0x16ea=function(_0x16ea38,_0x59514a){_0x16ea38=_0x16ea38-0x155;let _0x9f5d87=_0xad373f[_0x16ea38];return _0x9f5d87;},_0x16ea(_0x1dc657,_0x4995e3);}function ee(_0x1b8a43,_0x4962bb,_0x246040){const _0x458f0c=_0x58fd22;var _0x15b54e,_0x41b9c8;if(((_0x41b9c8=(_0x15b54e=_0x1b8a43==null?void 0x0:_0x1b8a43[_0x458f0c(0x1a7)])==null?void 0x0:_0x15b54e[_0x458f0c(0x17f)])!=null?_0x41b9c8:0x0)>0x0){const _0x3828d5=(_0x329919,_0x2ac365)=>({'id':_0x329919['replyId'],'threadId':_0x329919[_0x458f0c(0x160)],'dT':D(_0x329919[_0x458f0c(0x163)]),'personId':_0x329919['userId'],'resolved':_0x1b8a43[_0x458f0c(0x157)]===I[_0x458f0c(0x190)],'unitId':_0x4962bb,'subUnitId':_0x246040,'text':JSON[_0x458f0c(0x18c)](_0x329919[_0x458f0c(0x1a8)]),'parentId':_0x2ac365}),_0x5d9f87=_0x3828d5(_0x1b8a43[_0x458f0c(0x1a7)][0x0]);return{..._0x5d9f87,'children':_0x1b8a43[_0x458f0c(0x1a7)][_0x458f0c(0x15b)](0x1)[_0x458f0c(0x186)](_0x42d326=>_0x3828d5(_0x42d326,_0x5d9f87['id']))};}return null;}let f=class{constructor(_0x461529,_0x1cc612,_0x415457,_0x5dfa83){const _0x13a573=_0x58fd22;this['_httpService']=_0x461529,this[_0x13a573(0x165)]=_0x1cc612,this[_0x13a573(0x187)]=_0x415457,this['_injector']=_0x5dfa83;}async[_0x58fd22(0x1a4)](_0x41b4c6){const _0x496db8=_0x58fd22;var _0x394191,_0x8577f3;const {parentId:_0x235add,unitId:_0x2b2774,text:_0xfb5b0d,threadId:_0x24dd57}=_0x41b4c6,_0x5d69bc=(_0x8577f3=(_0x394191=_0xfb5b0d[_0x496db8(0x16b)])==null?void 0x0:_0x394191[_0x496db8(0x1b3)](_0x4eb990=>_0x4eb990[_0x496db8(0x18d)]===_0x2eb19a['COMMENT'])[_0x496db8(0x186)](_0x350f07=>_0x350f07[_0x496db8(0x16d)]))!=null?_0x8577f3:[],_0x10665a=JSON[_0x496db8(0x1a6)](_0xfb5b0d),_0x192f7f=(await this[_0x496db8(0x187)][_0x496db8(0x1a2)](_0x2b2774))['getMemberID']();if(_0x235add){const _0x31d8b5={'memberId':_0x192f7f,'unitId':_0x2b2774,'content':_0x10665a,'mention':_0x5d69bc,'threadId':_0x24dd57},_0x3111eb=(await this['_httpService'][_0x496db8(0x166)](_0x496db8(0x156)+_0x2b2774+_0x496db8(0x191),{'body':_0x31d8b5}))[_0x496db8(0x16c)]['reply'];return{..._0x41b4c6,'id':_0x3111eb[_0x496db8(0x1b0)],'dT':_0x173349(+_0x3111eb[_0x496db8(0x163)])[_0x496db8(0x17e)](_0x496db8(0x168)),'personId':_0x3111eb[_0x496db8(0x182)]};}else{const _0x36945d={'memberId':_0x192f7f,'unitId':_0x2b2774,'content':_0x10665a,'mention':_0x5d69bc},_0x20f370=await this['_httpService'][_0x496db8(0x166)](_0x496db8(0x156)+_0x2b2774+_0x496db8(0x15f),{'body':_0x36945d});return X(_0x20f370['body'][_0x496db8(0x178)],_0x41b4c6);}}async[_0x58fd22(0x19b)](_0x4230f0){const _0x29c86e=_0x58fd22;var _0x3f9a5a,_0xfb19a8;const {text:_0x16cbb3,unitId:_0x3a1001}=_0x4230f0,_0x1cbe7e=(_0xfb19a8=(_0x3f9a5a=_0x16cbb3[_0x29c86e(0x16b)])==null?void 0x0:_0x3f9a5a[_0x29c86e(0x1b3)](_0x11cd3b=>_0x11cd3b[_0x29c86e(0x18d)]===_0x2eb19a[_0x29c86e(0x170)])['map'](_0xbae054=>_0xbae054[_0x29c86e(0x16d)]))!=null?_0xfb19a8:[],_0x38e607=JSON[_0x29c86e(0x1a6)](_0x16cbb3),_0x9fdeaf=_0x4230f0[_0x29c86e(0x160)],_0x9a4aa7=_0x4230f0['id'],_0x3a087b={'memberId':(await this[_0x29c86e(0x187)]['requireSession'](_0x3a1001))[_0x29c86e(0x1a5)](),'unitId':_0x3a1001,'threadId':_0x9fdeaf,'mention':_0x1cbe7e,'content':_0x38e607,'replyId':_0x9a4aa7},_0x406b30=await this['_httpService'][_0x29c86e(0x166)]('/universer-api/comment/unit/'+_0x3a1001+_0x29c86e(0x17c),{'body':_0x3a087b});return!_0x406b30[_0x29c86e(0x16c)]['error']||_0x406b30[_0x29c86e(0x16c)][_0x29c86e(0x199)][_0x29c86e(0x177)]===0x1;}async[_0x58fd22(0x16e)](_0x1420b1){const _0x4efe60=_0x58fd22,{unitId:_0x3c7a60}=_0x1420b1,_0x16c72f=_0x1420b1[_0x4efe60(0x160)],_0x4206ed={'memberId':this['_userService']['getCurrentUser']()[_0x4efe60(0x158)],'unitId':_0x3c7a60,'threadId':_0x16c72f,'solved':_0x1420b1[_0x4efe60(0x197)]?I['Solved']:I[_0x4efe60(0x19c)]},_0x3702df=await this[_0x4efe60(0x161)][_0x4efe60(0x166)](_0x4efe60(0x156)+_0x3c7a60+'/solved',{'body':_0x4206ed});return!_0x3702df['body'][_0x4efe60(0x199)]||_0x3702df['body'][_0x4efe60(0x199)][_0x4efe60(0x177)]===0x1;}async['deleteComment'](_0x5a00ca,_0x3d6913,_0x2c5c78,_0x1b2209){const _0x4f5521=_0x58fd22,_0x2b0042={'memberId':(await this[_0x4f5521(0x187)][_0x4f5521(0x1a2)](_0x5a00ca))[_0x4f5521(0x1a5)](),'threadId':_0x2c5c78,'replyId':_0x1b2209,'unitId':_0x5a00ca},_0x56b6ab=await this[_0x4f5521(0x161)][_0x4f5521(0x166)](_0x4f5521(0x156)+_0x5a00ca+_0x4f5521(0x193),{'body':_0x2b0042});return!_0x56b6ab[_0x4f5521(0x16c)][_0x4f5521(0x199)]||_0x56b6ab[_0x4f5521(0x16c)]['error'][_0x4f5521(0x177)]===0x1;}async[_0x58fd22(0x17d)](_0x463ab3,_0x5a9bfd,_0x2c3185){const _0x2f9829=_0x58fd22,_0x5305d6={'unitId':_0x463ab3,'threadId':_0x2c3185},_0x2ea6fc=await this[_0x2f9829(0x161)][_0x2f9829(0x166)]('/universer-api/comment/unit/'+_0x463ab3+_0x2f9829(0x171),{'body':_0x5305d6}),_0x218675=_0x2c3185[_0x2f9829(0x186)](_0x25085c=>ee(_0x2ea6fc[_0x2f9829(0x16c)]['comments'][_0x25085c],_0x463ab3,_0x5a9bfd))[_0x2f9829(0x1b3)](Boolean);return Object[_0x2f9829(0x172)](_0x2ea6fc['body']['users'])[_0x2f9829(0x1b9)](_0x202a2e=>{const _0x41626c=_0x2f9829;this[_0x41626c(0x165)][_0x41626c(0x18f)](_0x202a2e);}),_0x218675;}[_0x58fd22(0x194)](_0x3c1d50){const _0x49e362=_0x58fd22;return{'id':_0x3c1d50['id'],'threadId':_0x3c1d50['threadId'],'ref':_0x3c1d50[_0x49e362(0x198)]};}};f=Q([_(0x0,_0x4562eb(_0x13a52b)),_(0x1,_0x4562eb(_0x2fbd9e)),_(0x2,_0x4562eb(_0x326a1a)),_(0x3,_0x4562eb(_0x585bfd))],f);var re=Object[_0x58fd22(0x1b6)],te=(_0x3e8d81,_0xdfad50,_0x32bccc,_0x507499)=>{const _0x207b61=_0x58fd22;for(var _0x3da565=_0x507499>0x1?void 0x0:_0x507499?re(_0xdfad50,_0x32bccc):_0xdfad50,_0x5b7280=_0x3e8d81[_0x207b61(0x17f)]-0x1,_0x6ef0ac;_0x5b7280>=0x0;_0x5b7280--)(_0x6ef0ac=_0x3e8d81[_0x5b7280])&&(_0x3da565=_0x6ef0ac(_0x3da565)||_0x3da565);return _0x3da565;},N=(_0xa46f4,_0x219765)=>(_0x10a144,_0x2d5b4d)=>_0x219765(_0x10a144,_0x2d5b4d,_0xa46f4);let g=class extends _0x2a378a{constructor(_0x599a52,_0x106610){const _0x410e0c=_0x58fd22;super(),this[_0x410e0c(0x1b7)]=_0x599a52,this[_0x410e0c(0x174)]=_0x106610,this['_initDataSource']();}[_0x58fd22(0x167)](){const _0x48f6ce=_0x58fd22;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x48f6ce(0x1b7)][_0x48f6ce(0x18a)]=!0x1;}};g=te([N(0x0,_0x2dd5cd),N(0x1,_0x4562eb(f))],g);var se=Object[_0x58fd22(0x159)],oe=Object[_0x58fd22(0x1b6)],ne=(_0x280a66,_0x59f894,_0x165366)=>_0x59f894 in _0x280a66?se(_0x280a66,_0x59f894,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x165366}):_0x280a66[_0x59f894]=_0x165366,ie=(_0x5df299,_0x231500,_0x32e302,_0x1cafd8)=>{const _0x1a777d=_0x58fd22;for(var _0x105164=_0x1cafd8>0x1?void 0x0:_0x1cafd8?oe(_0x231500,_0x32e302):_0x231500,_0x4a26ed=_0x5df299[_0x1a777d(0x17f)]-0x1,_0x2f3dbe;_0x4a26ed>=0x0;_0x4a26ed--)(_0x2f3dbe=_0x5df299[_0x4a26ed])&&(_0x105164=_0x2f3dbe(_0x105164)||_0x105164);return _0x105164;},w=(_0x299ef1,_0x6d2661)=>(_0x56f68c,_0x27bc63)=>_0x6d2661(_0x56f68c,_0x27bc63,_0x299ef1),$=(_0x1d591a,_0x5bc19b,_0x2f71d2)=>ne(_0x1d591a,typeof _0x5bc19b!='symbol'?_0x5bc19b+'':_0x5bc19b,_0x2f71d2);let b=class extends _0x19daed{constructor(_0xe6a8b8=M,_0x18f36c,_0x3e7e45){const _0x2d75db=_0x58fd22;super(),this[_0x2d75db(0x1ad)]=_0xe6a8b8,this[_0x2d75db(0x1b2)]=_0x18f36c,this['_configService']=_0x3e7e45;const {..._0x5a6823}=_0x5457dd({},M,this['_config']);this['_configService'][_0x2d75db(0x15c)](z,_0x5a6823);}[_0x58fd22(0x1ac)](){const _0x80950b=_0x58fd22;[[f],[g],[S]][_0x80950b(0x1b9)](_0x4416ce=>{const _0x36f6a5=_0x80950b;this['_injector'][_0x36f6a5(0x16a)](_0x4416ce);});}[_0x58fd22(0x1a1)](){const _0x57db93=_0x58fd22;this[_0x57db93(0x1b2)][_0x57db93(0x1aa)](g),this[_0x57db93(0x1b2)][_0x57db93(0x1aa)](S);}};$(b,_0x58fd22(0x189),W),$(b,_0x58fd22(0x175),_0x25802b[_0x58fd22(0x1a9)]),b=ie([_0x501549(_0x2240b0,_0x37bf58,_0x273301),w(0x1,_0x4562eb(_0x585bfd)),w(0x2,_0x2316e1)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x3ccefd=_0x31d0;(function(_0x5ebe59,_0x22eb5f){const _0x31856b=_0x31d0,_0x130a96=_0x5ebe59();while(!![]){try{const _0x103ec5=parseInt(_0x31856b(0x149))/0x1+parseInt(_0x31856b(0x114))/0x2+parseInt(_0x31856b(0x14a))/0x3*(-parseInt(_0x31856b(0x126))/0x4)+-parseInt(_0x31856b(0x102))/0x5+parseInt(_0x31856b(0xf4))/0x6+-parseInt(_0x31856b(0xf9))/0x7*(parseInt(_0x31856b(0x145))/0x8)+parseInt(_0x31856b(0xff))/0x9;if(_0x103ec5===_0x22eb5f)break;else _0x130a96['push'](_0x130a96['shift']());}catch(_0x548ed6){_0x130a96['push'](_0x130a96['shift']());}}}(_0x3b75,0x88f40));import{CommentService as _0x11f515,CollaborationSessionService as _0x52cf24,UniverCollaborationClientPlugin as _0x12ae43}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x38eead}from'@univerjs-pro/license';import{dayjs as _0x4e68e8,UserManagerService as _0x4d85ee,Inject as _0x5c1e64,Injector as _0x31e86f,Disposable as _0x2cd795,CustomRangeType as _0x4ac1a8,UniverInstanceType as _0x5f0730,DependentOn as _0x7f6732,IConfigService as _0x405fde,Plugin as _0x1c4223,merge as _0x1a1877}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xe87a7f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x37ae10,IThreadCommentDataSourceService as _0x241c59}from'@univerjs/thread-comment';import{bufferTime as _0x56fda4}from'rxjs';import{HTTPService as _0x2cb4a2}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2abd50=>(_0x2abd50[_0x2abd50['OpenOrReOpen']=0x0]=_0x3ccefd(0x113),_0x2abd50[_0x2abd50[_0x3ccefd(0x118)]=0x1]=_0x3ccefd(0x118),_0x2abd50[_0x2abd50['UNRECOGNIZED']=-0x1]=_0x3ccefd(0x143),_0x2abd50))(I||{}),v=(_0x107047=>(_0x107047[_0x107047[_0x3ccefd(0x12a)]=0x0]=_0x3ccefd(0x12a),_0x107047[_0x107047[_0x3ccefd(0xf7)]=0x1]=_0x3ccefd(0xf7),_0x107047[_0x107047['Reply']=0x2]=_0x3ccefd(0x125),_0x107047[_0x107047[_0x3ccefd(0x112)]=0x3]='Edit',_0x107047[_0x107047[_0x3ccefd(0x110)]=0x4]=_0x3ccefd(0x110),_0x107047[_0x107047[_0x3ccefd(0x121)]=0x5]=_0x3ccefd(0x121),_0x107047[_0x107047['UNRECOGNIZED']=-0x1]=_0x3ccefd(0x143),_0x107047))(v||{});const y=_0x2866e2=>_0x4e68e8(new Date(+_0x2866e2))[_0x3ccefd(0xfe)](_0x3ccefd(0x14c)),B=async(_0x374df5,_0x5aa73e)=>{const _0x569b22=_0x3ccefd,_0x5ab53f=_0x374df5[_0x569b22(0x107)](_0x4d85ee),_0x25f72d=_0x374df5[_0x569b22(0x107)](_0x2cb4a2);_0x5aa73e['forEach'](_0x204518=>{const _0x573f43=_0x569b22;_0x5ab53f['getUser'](_0x204518)&&_0x5aa73e[_0x573f43(0x139)](_0x204518);}),_0x5aa73e[_0x569b22(0x12e)]&&(await _0x25f72d[_0x569b22(0x107)](_0x569b22(0xef),{'params':{'userIDs':[..._0x5aa73e]}}))[_0x569b22(0x127)]['users'][_0x569b22(0x10e)](_0x6955af=>{const _0x192893=_0x569b22;_0x6955af&&_0x5ab53f[_0x192893(0x10c)](_0x6955af);});};var K=Object[_0x3ccefd(0x12d)],V=(_0x7fa101,_0x57a0ef,_0x152c37,_0x13fac5)=>{const _0x1013b6=_0x3ccefd;for(var _0x3dac30=_0x13fac5>0x1?void 0x0:_0x13fac5?K(_0x57a0ef,_0x152c37):_0x57a0ef,_0x4553b8=_0x7fa101[_0x1013b6(0x148)]-0x1,_0x5d89b6;_0x4553b8>=0x0;_0x4553b8--)(_0x5d89b6=_0x7fa101[_0x4553b8])&&(_0x3dac30=_0x5d89b6(_0x3dac30)||_0x3dac30);return _0x3dac30;},p=(_0x1ba73e,_0x3b9ac2)=>(_0x57402e,_0x5109e4)=>_0x3b9ac2(_0x57402e,_0x5109e4,_0x1ba73e);function _0x31d0(_0x210e77,_0x483dd1){const _0x3b758=_0x3b75();return _0x31d0=function(_0x31d025,_0x45120c){_0x31d025=_0x31d025-0xec;let _0x3bb48e=_0x3b758[_0x31d025];return _0x3bb48e;},_0x31d0(_0x210e77,_0x483dd1);}let _=class extends _0x2cd795{constructor(_0x274955,_0x4fb634,_0x5b6808,_0x765ab2){const _0x1049da=_0x3ccefd;super(),this['_commentService']=_0x274955,this['_threadCommentModel']=_0x4fb634,this[_0x1049da(0x14d)]=_0x5b6808,this[_0x1049da(0x144)]=_0x765ab2,this[_0x1049da(0x103)](),this[_0x1049da(0x124)]();}[_0x3ccefd(0x124)](){const _0x5d0790=_0x3ccefd;this[_0x5d0790(0x11e)](this[_0x5d0790(0xee)][_0x5d0790(0x12f)]['pipe'](_0x56fda4(0x10))[_0x5d0790(0x122)](_0xae9b10=>{const _0x2751eb=_0x5d0790,_0x35c84b=new Set();_0xae9b10[_0x2751eb(0x10e)](_0x33dcae=>{const _0x17442d=_0x2751eb;switch(_0x33dcae[_0x17442d(0xec)]){case'add':{const _0x20347d=_0x33dcae[_0x17442d(0x132)]['personId'];_0x35c84b[_0x17442d(0x13a)](_0x20347d);break;}}}),B(this[_0x2751eb(0x144)],_0x35c84b);}));}[_0x3ccefd(0x103)](){const _0x281a8a=_0x3ccefd;this['disposeWithMe'](this[_0x281a8a(0x11c)]['commentUpdate$'][_0x281a8a(0x122)](async _0x2f2ffc=>{const _0x3df794=_0x281a8a;var _0x264cdc,_0x38a36f,_0x33f983,_0x3893b5;const _0x178381=(_0x264cdc=this[_0x3df794(0xee)][_0x3df794(0xf2)](_0x2f2ffc[_0x3df794(0x136)])[_0x3df794(0x12c)](_0x4a0aa=>_0x4a0aa[_0x3df794(0xf5)]===_0x2f2ffc[_0x3df794(0xf5)]))==null?void 0x0:_0x264cdc[_0x3df794(0x133)];if(!_0x178381)return;const {unitId:_0x218998,subUnitId:_0x41ceef}=_0x178381;switch(_0x2f2ffc[_0x3df794(0x14f)]&&this['_userService'][_0x3df794(0x10c)](_0x2f2ffc['user']),_0x2f2ffc[_0x3df794(0xec)]){case v[_0x3df794(0xf7)]:break;case v['Reply']:{this[_0x3df794(0xee)][_0x3df794(0x146)](_0x218998,_0x41ceef,{'unitId':_0x218998,'subUnitId':_0x41ceef,'ref':'','id':_0x2f2ffc[_0x3df794(0x137)],'dT':y(+_0x2f2ffc['createTimestamp']),'threadId':_0x2f2ffc[_0x3df794(0xf5)],'personId':(_0x33f983=(_0x38a36f=_0x2f2ffc['user'])==null?void 0x0:_0x38a36f[_0x3df794(0x117)])!=null?_0x33f983:_0x2f2ffc[_0x3df794(0x150)],'text':JSON[_0x3df794(0x13d)](_0x2f2ffc[_0x3df794(0x130)]),'parentId':_0x178381['id']});break;}case v[_0x3df794(0x110)]:{const _0x305619=this['_threadCommentModel']['getComment'](_0x218998,_0x41ceef,_0x2f2ffc[_0x3df794(0x137)]);_0x305619&&_0x305619[_0x3df794(0x123)]&&this[_0x3df794(0xee)][_0x3df794(0x128)](_0x218998,_0x41ceef,_0x2f2ffc['replyId']);break;}case v[_0x3df794(0x112)]:{this[_0x3df794(0xee)][_0x3df794(0x111)](_0x218998,_0x41ceef,{'commentId':_0x2f2ffc[_0x3df794(0x137)],'text':JSON['parse'](_0x2f2ffc[_0x3df794(0x130)])});break;}case v[_0x3df794(0x121)]:{const _0x24a089=(_0x3893b5=this['_threadCommentModel'][_0x3df794(0xf2)](_0x2f2ffc[_0x3df794(0x136)])[_0x3df794(0x12c)](_0xd45349=>_0xd45349['threadId']===_0x2f2ffc[_0x3df794(0xf5)]))==null?void 0x0:_0x3893b5['root'];_0x24a089&&this[_0x3df794(0xee)][_0x3df794(0x151)](_0x218998,_0x41ceef,_0x24a089['id'],_0x2f2ffc[_0x3df794(0x142)]===I[_0x3df794(0x118)]);break;}}}));}};_=V([p(0x0,_0x5c1e64(_0x11f515)),p(0x1,_0x5c1e64(_0x37ae10)),p(0x2,_0x5c1e64(_0x4d85ee)),p(0x3,_0x5c1e64(_0x31e86f))],_);const z=_0x3ccefd(0xed),O={};var k=Object[_0x3ccefd(0x12d)],Q=(_0x49c27c,_0xf52f21,_0x2afed6,_0x5c1fb0)=>{for(var _0x585dc9=_0x5c1fb0>0x1?void 0x0:_0x5c1fb0?k(_0xf52f21,_0x2afed6):_0xf52f21,_0x46f74e=_0x49c27c['length']-0x1,_0x51b0d3;_0x46f74e>=0x0;_0x46f74e--)(_0x51b0d3=_0x49c27c[_0x46f74e])&&(_0x585dc9=_0x51b0d3(_0x585dc9)||_0x585dc9);return _0x585dc9;},b=(_0x9467c4,_0x594426)=>(_0x26ff81,_0x17203d)=>_0x594426(_0x26ff81,_0x17203d,_0x9467c4);function _0x3b75(){const _0x1b25a9=['length','678751IzuesV','102wVuUhu','resolved','YYYY/MM/DD\x20HH:mm','_userService','values','user','userId','resolveComment','_threadCommentDataSource','type','thread-comment-data-source.config','_threadCommentModel','/universer-api/user/list','map','rangeType','getUnit','post','2221356YdmSXd','threadId','listComments','Add','error','21TVhohE','/universer-api/comment/unit/','ref','getMemberID','/delete','format','6148818sDMiDc','defineProperty','comment','3131365cEGDqf','_init','/reply','/list','users','get','syncUpdateMutationToColla','filter','saveCommentToSnapshot','comments','addUser','COMMENT','forEach','pluginName','Delete','updateComment','Edit','OpenOrReOpen','1152250SHIiiw','/solved','stringify','userID','Solved','_configService','setConfig','rangeId','_commentService','requireSession','disposeWithMe','createTimestamp','_sessionService','Solve','subscribe','parentId','_initUserSync','Reply','14548PIgJpc','body','deleteComment','customRanges','Unknown','UNIVER_UNKNOWN','find','getOwnPropertyDescriptor','size','commentUpdate$','content','dataSource','payload','root','reply','_httpService','unitId','replyId','getCurrentUser','delete','add','/edit','_config','parse','code','replies','_initDataSource','onReady','solved','UNRECOGNIZED','_injector','2659768TAqmiq','addComment','_threadCommentDataSourceService'];_0x3b75=function(){return _0x1b25a9;};return _0x3b75();}function X(_0x14c934,_0x51d512){const _0x406020=_0x3ccefd,_0x2827b6=_0x14c934[_0x406020(0x13f)][0x0];return{..._0x51d512,'id':_0x2827b6[_0x406020(0x137)],'resolved':_0x14c934[_0x406020(0x142)]===0x1,'dT':y(_0x2827b6[_0x406020(0x11f)]),'personId':_0x2827b6['userId'],'threadId':_0x2827b6['threadId']};}function ee(_0x2953fb,_0x523705,_0x18edb4){const _0x1c238d=_0x3ccefd;var _0x5d0a99,_0x3c7187;if(((_0x3c7187=(_0x5d0a99=_0x2953fb==null?void 0x0:_0x2953fb['replies'])==null?void 0x0:_0x5d0a99[_0x1c238d(0x148)])!=null?_0x3c7187:0x0)>0x0){const _0x3fae91=(_0x1cf9bd,_0x986a53)=>({'id':_0x1cf9bd[_0x1c238d(0x137)],'threadId':_0x1cf9bd[_0x1c238d(0xf5)],'dT':y(_0x1cf9bd['createTimestamp']),'personId':_0x1cf9bd[_0x1c238d(0x150)],'resolved':_0x2953fb[_0x1c238d(0x142)]===I['Solved'],'unitId':_0x523705,'subUnitId':_0x18edb4,'text':JSON[_0x1c238d(0x13d)](_0x1cf9bd['content']),'parentId':_0x986a53}),_0x2fdaae=_0x3fae91(_0x2953fb[_0x1c238d(0x13f)][0x0]);return{..._0x2fdaae,'children':_0x2953fb[_0x1c238d(0x13f)]['slice'](0x1)[_0x1c238d(0xf0)](_0x12fd77=>_0x3fae91(_0x12fd77,_0x2fdaae['id']))};}return null;}let S=class{constructor(_0x1083dc,_0x10f3ca,_0x5105fe){const _0x565799=_0x3ccefd;this[_0x565799(0x135)]=_0x1083dc,this[_0x565799(0x14d)]=_0x10f3ca,this[_0x565799(0x120)]=_0x5105fe;}async[_0x3ccefd(0x146)](_0x45f7d0){const _0x3b146d=_0x3ccefd;var _0x41eebf,_0xc142d4;const {parentId:_0x922980,unitId:_0x1d672d,text:_0x655913,threadId:_0x1b6aaa}=_0x45f7d0,_0x391e4f=(_0xc142d4=(_0x41eebf=_0x655913[_0x3b146d(0x129)])==null?void 0x0:_0x41eebf[_0x3b146d(0x109)](_0xd5e750=>_0xd5e750[_0x3b146d(0xf1)]===_0x4ac1a8[_0x3b146d(0x10d)])[_0x3b146d(0xf0)](_0xab0eeb=>_0xab0eeb[_0x3b146d(0x11b)]))!=null?_0xc142d4:[],_0x2faa26=JSON['stringify'](_0x655913),_0x56fe15=(await this[_0x3b146d(0x120)][_0x3b146d(0x11d)](_0x1d672d))[_0x3b146d(0xfc)]();if(_0x922980){const _0x536167={'memberId':_0x56fe15,'unitId':_0x1d672d,'content':_0x2faa26,'mention':_0x391e4f,'threadId':_0x1b6aaa},_0x597694=(await this[_0x3b146d(0x135)][_0x3b146d(0xf3)](_0x3b146d(0xfa)+_0x1d672d+_0x3b146d(0x104),{'body':_0x536167}))[_0x3b146d(0x127)][_0x3b146d(0x134)];return{..._0x45f7d0,'id':_0x597694[_0x3b146d(0x137)],'dT':_0x4e68e8(+_0x597694['createTimestamp'])[_0x3b146d(0xfe)](_0x3b146d(0x14c)),'personId':_0x597694[_0x3b146d(0x150)]};}else{const _0x255ac0={'memberId':_0x56fe15,'unitId':_0x1d672d,'content':_0x2faa26,'mention':_0x391e4f},_0x398d9a=await this[_0x3b146d(0x135)]['post'](_0x3b146d(0xfa)+_0x1d672d+'/add',{'body':_0x255ac0});return X(_0x398d9a[_0x3b146d(0x127)][_0x3b146d(0x101)],_0x45f7d0);}}async[_0x3ccefd(0x111)](_0x20e337){const _0x107189=_0x3ccefd;var _0x312e0e,_0x54be81;const {text:_0x49954d,unitId:_0x407518}=_0x20e337,_0x19a98a=(_0x54be81=(_0x312e0e=_0x49954d[_0x107189(0x129)])==null?void 0x0:_0x312e0e[_0x107189(0x109)](_0x1b6015=>_0x1b6015[_0x107189(0xf1)]===_0x4ac1a8[_0x107189(0x10d)])[_0x107189(0xf0)](_0x2ea468=>_0x2ea468[_0x107189(0x11b)]))!=null?_0x54be81:[],_0x11459d=JSON[_0x107189(0x116)](_0x49954d),_0x334776=_0x20e337[_0x107189(0xf5)],_0x529bd2=_0x20e337['id'],_0x365a24={'memberId':(await this['_sessionService'][_0x107189(0x11d)](_0x407518))[_0x107189(0xfc)](),'unitId':_0x407518,'threadId':_0x334776,'mention':_0x19a98a,'content':_0x11459d,'replyId':_0x529bd2},_0x54e038=await this[_0x107189(0x135)][_0x107189(0xf3)](_0x107189(0xfa)+_0x407518+_0x107189(0x13b),{'body':_0x365a24});return!_0x54e038[_0x107189(0x127)][_0x107189(0xf8)]||_0x54e038[_0x107189(0x127)][_0x107189(0xf8)]['code']===0x1;}async['resolveComment'](_0x1c4381){const _0x1220ca=_0x3ccefd,{unitId:_0x5879ab}=_0x1c4381,_0x1683be=_0x1c4381['threadId'],_0xbc7437={'memberId':this[_0x1220ca(0x14d)][_0x1220ca(0x138)]()[_0x1220ca(0x117)],'unitId':_0x5879ab,'threadId':_0x1683be,'solved':_0x1c4381[_0x1220ca(0x14b)]?I['Solved']:I[_0x1220ca(0x113)]},_0x330228=await this[_0x1220ca(0x135)][_0x1220ca(0xf3)](_0x1220ca(0xfa)+_0x5879ab+_0x1220ca(0x115),{'body':_0xbc7437});return!_0x330228[_0x1220ca(0x127)][_0x1220ca(0xf8)]||_0x330228[_0x1220ca(0x127)]['error'][_0x1220ca(0x13e)]===0x1;}async[_0x3ccefd(0x128)](_0x4f3cda,_0x150a81,_0x45fdd2,_0xa1883b){const _0xbc72d4=_0x3ccefd,_0x384011={'memberId':(await this[_0xbc72d4(0x120)][_0xbc72d4(0x11d)](_0x4f3cda))[_0xbc72d4(0xfc)](),'threadId':_0x45fdd2,'replyId':_0xa1883b,'unitId':_0x4f3cda},_0x126a78=await this[_0xbc72d4(0x135)][_0xbc72d4(0xf3)](_0xbc72d4(0xfa)+_0x4f3cda+_0xbc72d4(0xfd),{'body':_0x384011});return!_0x126a78['body'][_0xbc72d4(0xf8)]||_0x126a78[_0xbc72d4(0x127)][_0xbc72d4(0xf8)][_0xbc72d4(0x13e)]===0x1;}async[_0x3ccefd(0xf6)](_0x4796a9,_0x29db,_0x4969ca){const _0x1dfeec=_0x3ccefd,_0x4c9f8b={'unitId':_0x4796a9,'threadId':_0x4969ca},_0x267ad7=await this[_0x1dfeec(0x135)][_0x1dfeec(0xf3)](_0x1dfeec(0xfa)+_0x4796a9+_0x1dfeec(0x105),{'body':_0x4c9f8b}),_0x553820=_0x4969ca[_0x1dfeec(0xf0)](_0x126f65=>ee(_0x267ad7[_0x1dfeec(0x127)][_0x1dfeec(0x10b)][_0x126f65],_0x4796a9,_0x29db))[_0x1dfeec(0x109)](Boolean);return Object[_0x1dfeec(0x14e)](_0x267ad7[_0x1dfeec(0x127)][_0x1dfeec(0x106)])['forEach'](_0x5d6cf1=>{const _0x3bedd0=_0x1dfeec;this[_0x3bedd0(0x14d)][_0x3bedd0(0x10c)](_0x5d6cf1);}),_0x553820;}[_0x3ccefd(0x10a)](_0x4d5477){const _0x532a03=_0x3ccefd;return{'id':_0x4d5477['id'],'threadId':_0x4d5477[_0x532a03(0xf5)],'ref':_0x4d5477[_0x532a03(0xfb)]};}};S=Q([b(0x0,_0x5c1e64(_0x2cb4a2)),b(0x1,_0x5c1e64(_0x4d85ee)),b(0x2,_0x5c1e64(_0x52cf24))],S);var re=Object[_0x3ccefd(0x12d)],te=(_0x16735f,_0xd526ed,_0x107b61,_0x41fae0)=>{const _0x47c169=_0x3ccefd;for(var _0x456b28=_0x41fae0>0x1?void 0x0:_0x41fae0?re(_0xd526ed,_0x107b61):_0xd526ed,_0x5d4811=_0x16735f[_0x47c169(0x148)]-0x1,_0x8bdefb;_0x5d4811>=0x0;_0x5d4811--)(_0x8bdefb=_0x16735f[_0x5d4811])&&(_0x456b28=_0x8bdefb(_0x456b28)||_0x456b28);return _0x456b28;},M=(_0x181509,_0x3220d4)=>(_0x316aa5,_0x398c1c)=>_0x3220d4(_0x316aa5,_0x398c1c,_0x181509);let f=class extends _0x2cd795{constructor(_0x1d0bd3,_0x176758){const _0x146518=_0x3ccefd;super(),this['_threadCommentDataSourceService']=_0x1d0bd3,this[_0x146518(0x152)]=_0x176758,this[_0x146518(0x140)]();}[_0x3ccefd(0x140)](){const _0x19c71c=_0x3ccefd;this[_0x19c71c(0x147)][_0x19c71c(0x131)]=this[_0x19c71c(0x152)],this[_0x19c71c(0x147)][_0x19c71c(0x108)]=!0x1;}};f=te([M(0x0,_0x241c59),M(0x1,_0x5c1e64(S))],f);var se=Object[_0x3ccefd(0x100)],oe=Object[_0x3ccefd(0x12d)],ne=(_0x3fe621,_0x36983a,_0x49134e)=>_0x36983a in _0x3fe621?se(_0x3fe621,_0x36983a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x49134e}):_0x3fe621[_0x36983a]=_0x49134e,ie=(_0xb59861,_0x18b867,_0x30e764,_0x3d61e1)=>{const _0x26fb94=_0x3ccefd;for(var _0x3d2bf8=_0x3d61e1>0x1?void 0x0:_0x3d61e1?oe(_0x18b867,_0x30e764):_0x18b867,_0x38debd=_0xb59861[_0x26fb94(0x148)]-0x1,_0x32db52;_0x38debd>=0x0;_0x38debd--)(_0x32db52=_0xb59861[_0x38debd])&&(_0x3d2bf8=_0x32db52(_0x3d2bf8)||_0x3d2bf8);return _0x3d2bf8;},N=(_0x3d8e0f,_0x8ff587)=>(_0x174dd2,_0x14e34d)=>_0x8ff587(_0x174dd2,_0x14e34d,_0x3d8e0f),$=(_0x48c3f9,_0x1ed7a5,_0x3a4819)=>ne(_0x48c3f9,typeof _0x1ed7a5!='symbol'?_0x1ed7a5+'':_0x1ed7a5,_0x3a4819);let g=class extends _0x1c4223{constructor(_0x2de67e=O,_0x445e94,_0xa998df){const _0x22417c=_0x3ccefd;super(),this[_0x22417c(0x13c)]=_0x2de67e,this['_injector']=_0x445e94,this['_configService']=_0xa998df;const {..._0x5c02f3}=_0x1a1877({},O,this[_0x22417c(0x13c)]);this[_0x22417c(0x119)][_0x22417c(0x11a)](z,_0x5c02f3);}['onStarting'](){const _0x1aaef6=_0x3ccefd;[[S],[f],[_]][_0x1aaef6(0x10e)](_0x25a859=>{const _0x3215da=_0x1aaef6;this[_0x3215da(0x144)][_0x3215da(0x13a)](_0x25a859);});}[_0x3ccefd(0x141)](){const _0x226725=_0x3ccefd;this[_0x226725(0x144)][_0x226725(0x107)](f),this['_injector'][_0x226725(0x107)](_);}};$(g,_0x3ccefd(0x10f),W),$(g,_0x3ccefd(0xec),_0x5f0730[_0x3ccefd(0x12b)]),g=ie([_0x7f6732(_0xe87a7f,_0x12ae43,_0x38eead),N(0x1,_0x5c1e64(_0x31e86f)),N(0x2,_0x405fde)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x58fd22=_0x16ea;(function(_0x1b16e0,_0xb8f6c6){const _0xd61e42=_0x16ea,_0x38b61d=_0x1b16e0();while(!![]){try{const _0x453853=parseInt(_0xd61e42(0x15d))/0x1+-parseInt(_0xd61e42(0x1b1))/0x2*(parseInt(_0xd61e42(0x18b))/0x3)+parseInt(_0xd61e42(0x19e))/0x4*(parseInt(_0xd61e42(0x1b4))/0x5)+-parseInt(_0xd61e42(0x192))/0x6+-parseInt(_0xd61e42(0x179))/0x7*(-parseInt(_0xd61e42(0x195))/0x8)+parseInt(_0xd61e42(0x181))/0x9+parseInt(_0xd61e42(0x155))/0xa*(-parseInt(_0xd61e42(0x1a3))/0xb);if(_0x453853===_0xb8f6c6)break;else _0x38b61d['push'](_0x38b61d['shift']());}catch(_0x49645a){_0x38b61d['push'](_0x38b61d['shift']());}}}(_0xad37,0x6639a));import{CommentService as _0x5fbae9,CollaborationSessionService as _0x326a1a,UniverCollaborationClientPlugin as _0x37bf58}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x273301}from'@univerjs-pro/license';import{dayjs as _0x173349,UserManagerService as _0x2fbd9e,Inject as _0x4562eb,Injector as _0x585bfd,Disposable as _0x2a378a,CustomRangeType as _0x2eb19a,UniverInstanceType as _0x25802b,DependentOn as _0x501549,IConfigService as _0x2316e1,Plugin as _0x19daed,merge as _0x5457dd}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2240b0}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3f581d,IThreadCommentDataSourceService as _0x2dd5cd}from'@univerjs/thread-comment';import{bufferTime as _0x58c650}from'rxjs';import{HTTPService as _0x13a52b}from'@univerjs/network';const W=_0x58fd22(0x1ae);var I=(_0xe3eb80=>(_0xe3eb80[_0xe3eb80['OpenOrReOpen']=0x0]=_0x58fd22(0x19c),_0xe3eb80[_0xe3eb80[_0x58fd22(0x190)]=0x1]='Solved',_0xe3eb80[_0xe3eb80[_0x58fd22(0x183)]=-0x1]=_0x58fd22(0x183),_0xe3eb80))(I||{}),v=(_0x5930d8=>(_0x5930d8[_0x5930d8['Unknown']=0x0]='Unknown',_0x5930d8[_0x5930d8[_0x58fd22(0x19d)]=0x1]=_0x58fd22(0x19d),_0x5930d8[_0x5930d8['Reply']=0x2]='Reply',_0x5930d8[_0x5930d8[_0x58fd22(0x184)]=0x3]=_0x58fd22(0x184),_0x5930d8[_0x5930d8[_0x58fd22(0x16f)]=0x4]=_0x58fd22(0x16f),_0x5930d8[_0x5930d8[_0x58fd22(0x164)]=0x5]=_0x58fd22(0x164),_0x5930d8[_0x5930d8['UNRECOGNIZED']=-0x1]=_0x58fd22(0x183),_0x5930d8))(v||{});const D=_0x27e30b=>_0x173349(new Date(+_0x27e30b))[_0x58fd22(0x17e)](_0x58fd22(0x168)),B=async(_0x3ddb92,_0x191148)=>{const _0x821bb6=_0x58fd22,_0x326825=_0x3ddb92[_0x821bb6(0x1aa)](_0x2fbd9e),_0xb2a280=_0x3ddb92[_0x821bb6(0x1aa)](_0x13a52b);_0x191148[_0x821bb6(0x1b9)](_0x275beb=>{const _0x161776=_0x821bb6;_0x326825[_0x161776(0x18e)](_0x275beb)&&_0x191148['delete'](_0x275beb);}),_0x191148[_0x821bb6(0x176)]&&(await _0xb2a280[_0x821bb6(0x1aa)]('/universer-api/user/list',{'params':{'userIDs':[..._0x191148]}}))[_0x821bb6(0x16c)][_0x821bb6(0x19a)]['forEach'](_0x2b9ba0=>{_0x2b9ba0&&_0x326825['addUser'](_0x2b9ba0);});};var K=Object[_0x58fd22(0x1b6)],V=(_0x395dd9,_0x22196b,_0x23b540,_0x147bc5)=>{const _0x1211f9=_0x58fd22;for(var _0x13a604=_0x147bc5>0x1?void 0x0:_0x147bc5?K(_0x22196b,_0x23b540):_0x22196b,_0x385a50=_0x395dd9[_0x1211f9(0x17f)]-0x1,_0x294ad9;_0x385a50>=0x0;_0x385a50--)(_0x294ad9=_0x395dd9[_0x385a50])&&(_0x13a604=_0x294ad9(_0x13a604)||_0x13a604);return _0x13a604;},p=(_0x6e4e42,_0x567722)=>(_0x30f72f,_0x2a5ccb)=>_0x567722(_0x30f72f,_0x2a5ccb,_0x6e4e42);function _0xad37(){const _0x3cf088=['getUnit','1465155NIttkb','userId','UNRECOGNIZED','Edit','_commentService','map','_sessionService','find','pluginName','syncUpdateMutationToColla','1302nkDuMJ','parse','rangeType','getUser','addUser','Solved','/reply','2264154MKdtSe','/delete','saveCommentToSnapshot','89936eeprXG','subscribe','resolved','ref','error','users','updateComment','OpenOrReOpen','Add','8WhpeoO','thread-comment-data-source.config','deleteComment','onReady','requireSession','7953QWiczd','addComment','getMemberID','stringify','replies','content','UNIVER_UNKNOWN','get','pipe','onStarting','_config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','personId','replyId','966jCUVNH','_injector','filter','876790sVtOKK','Reply','getOwnPropertyDescriptor','_threadCommentDataSourceService','root','forEach','commentUpdate$','5190EuNQwj','/universer-api/comment/unit/','solved','userID','defineProperty','getComment','slice','setConfig','552645psvpyk','payload','/add','threadId','_httpService','parentId','createTimestamp','Solve','_userService','post','_initDataSource','YYYY/MM/DD\x20HH:mm','_init','add','customRanges','body','rangeId','resolveComment','Delete','COMMENT','/list','values','disposeWithMe','_threadCommentDataSource','type','size','code','comment','196lahryy','user','_threadCommentModel','/edit','listComments','format','length'];_0xad37=function(){return _0x3cf088;};return _0xad37();}let S=class extends _0x2a378a{constructor(_0x15698d,_0x15ba86,_0x456fd6,_0x4b26e2){const _0x26811e=_0x58fd22;super(),this[_0x26811e(0x185)]=_0x15698d,this[_0x26811e(0x17b)]=_0x15ba86,this[_0x26811e(0x165)]=_0x456fd6,this[_0x26811e(0x1b2)]=_0x4b26e2,this[_0x26811e(0x169)](),this['_initUserSync']();}['_initUserSync'](){const _0x1f7f45=_0x58fd22;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$'][_0x1f7f45(0x1ab)](_0x58c650(0x10))[_0x1f7f45(0x196)](_0x1b5190=>{const _0x9dbeee=_0x1f7f45,_0x330851=new Set();_0x1b5190[_0x9dbeee(0x1b9)](_0x1a86cf=>{const _0x569a5e=_0x9dbeee;switch(_0x1a86cf[_0x569a5e(0x175)]){case _0x569a5e(0x16a):{const _0x515c50=_0x1a86cf[_0x569a5e(0x15e)][_0x569a5e(0x1af)];_0x330851[_0x569a5e(0x16a)](_0x515c50);break;}}}),B(this['_injector'],_0x330851);}));}[_0x58fd22(0x169)](){const _0x2c052b=_0x58fd22;this[_0x2c052b(0x173)](this[_0x2c052b(0x185)][_0x2c052b(0x1ba)][_0x2c052b(0x196)](async _0x3bb92b=>{const _0x19bb49=_0x2c052b;var _0x12f6f6,_0x29b2c7,_0x3b3d2b,_0x3d4cca;const _0x3b3149=(_0x12f6f6=this[_0x19bb49(0x17b)]['getUnit'](_0x3bb92b['unitId'])[_0x19bb49(0x188)](_0x57d144=>_0x57d144[_0x19bb49(0x160)]===_0x3bb92b[_0x19bb49(0x160)]))==null?void 0x0:_0x12f6f6[_0x19bb49(0x1b8)];if(!_0x3b3149)return;const {unitId:_0x5b4b9a,subUnitId:_0xc4bc6a}=_0x3b3149;switch(_0x3bb92b['user']&&this['_userService'][_0x19bb49(0x18f)](_0x3bb92b['user']),_0x3bb92b[_0x19bb49(0x175)]){case v[_0x19bb49(0x19d)]:break;case v[_0x19bb49(0x1b5)]:{this[_0x19bb49(0x17b)][_0x19bb49(0x1a4)](_0x5b4b9a,_0xc4bc6a,{'unitId':_0x5b4b9a,'subUnitId':_0xc4bc6a,'ref':'','id':_0x3bb92b['replyId'],'dT':D(+_0x3bb92b[_0x19bb49(0x163)]),'threadId':_0x3bb92b[_0x19bb49(0x160)],'personId':(_0x3b3d2b=(_0x29b2c7=_0x3bb92b[_0x19bb49(0x17a)])==null?void 0x0:_0x29b2c7[_0x19bb49(0x158)])!=null?_0x3b3d2b:_0x3bb92b[_0x19bb49(0x182)],'text':JSON['parse'](_0x3bb92b[_0x19bb49(0x1a8)]),'parentId':_0x3b3149['id']});break;}case v['Delete']:{const _0x26b5d=this[_0x19bb49(0x17b)][_0x19bb49(0x15a)](_0x5b4b9a,_0xc4bc6a,_0x3bb92b[_0x19bb49(0x1b0)]);_0x26b5d&&_0x26b5d[_0x19bb49(0x162)]&&this['_threadCommentModel'][_0x19bb49(0x1a0)](_0x5b4b9a,_0xc4bc6a,_0x3bb92b['replyId']);break;}case v[_0x19bb49(0x184)]:{this[_0x19bb49(0x17b)][_0x19bb49(0x19b)](_0x5b4b9a,_0xc4bc6a,{'commentId':_0x3bb92b[_0x19bb49(0x1b0)],'text':JSON['parse'](_0x3bb92b[_0x19bb49(0x1a8)])});break;}case v['Solve']:{const _0x508438=(_0x3d4cca=this[_0x19bb49(0x17b)][_0x19bb49(0x180)](_0x3bb92b['unitId'])[_0x19bb49(0x188)](_0x663629=>_0x663629[_0x19bb49(0x160)]===_0x3bb92b[_0x19bb49(0x160)]))==null?void 0x0:_0x3d4cca['root'];_0x508438&&this[_0x19bb49(0x17b)][_0x19bb49(0x16e)](_0x5b4b9a,_0xc4bc6a,_0x508438['id'],_0x3bb92b[_0x19bb49(0x157)]===I[_0x19bb49(0x190)]);break;}}}));}};S=V([p(0x0,_0x4562eb(_0x5fbae9)),p(0x1,_0x4562eb(_0x3f581d)),p(0x2,_0x4562eb(_0x2fbd9e)),p(0x3,_0x4562eb(_0x585bfd))],S);const z=_0x58fd22(0x19f),M={};var k=Object[_0x58fd22(0x1b6)],Q=(_0x394dd7,_0x15f782,_0xcb43c9,_0x44157b)=>{const _0x597b23=_0x58fd22;for(var _0xf577bf=_0x44157b>0x1?void 0x0:_0x44157b?k(_0x15f782,_0xcb43c9):_0x15f782,_0x48d22c=_0x394dd7[_0x597b23(0x17f)]-0x1,_0x4c57fd;_0x48d22c>=0x0;_0x48d22c--)(_0x4c57fd=_0x394dd7[_0x48d22c])&&(_0xf577bf=_0x4c57fd(_0xf577bf)||_0xf577bf);return _0xf577bf;},_=(_0x40bd62,_0x56d04f)=>(_0x37b067,_0x28c342)=>_0x56d04f(_0x37b067,_0x28c342,_0x40bd62);function X(_0x2a90ab,_0x435890){const _0x52f859=_0x58fd22,_0x3402b7=_0x2a90ab['replies'][0x0];return{..._0x435890,'id':_0x3402b7[_0x52f859(0x1b0)],'resolved':_0x2a90ab[_0x52f859(0x157)]===0x1,'dT':D(_0x3402b7[_0x52f859(0x163)]),'personId':_0x3402b7[_0x52f859(0x182)],'threadId':_0x3402b7[_0x52f859(0x160)]};}function _0x16ea(_0x1dc657,_0x4995e3){const _0xad373f=_0xad37();return _0x16ea=function(_0x16ea38,_0x59514a){_0x16ea38=_0x16ea38-0x155;let _0x9f5d87=_0xad373f[_0x16ea38];return _0x9f5d87;},_0x16ea(_0x1dc657,_0x4995e3);}function ee(_0x1b8a43,_0x4962bb,_0x246040){const _0x458f0c=_0x58fd22;var _0x15b54e,_0x41b9c8;if(((_0x41b9c8=(_0x15b54e=_0x1b8a43==null?void 0x0:_0x1b8a43[_0x458f0c(0x1a7)])==null?void 0x0:_0x15b54e[_0x458f0c(0x17f)])!=null?_0x41b9c8:0x0)>0x0){const _0x3828d5=(_0x329919,_0x2ac365)=>({'id':_0x329919['replyId'],'threadId':_0x329919[_0x458f0c(0x160)],'dT':D(_0x329919[_0x458f0c(0x163)]),'personId':_0x329919['userId'],'resolved':_0x1b8a43[_0x458f0c(0x157)]===I[_0x458f0c(0x190)],'unitId':_0x4962bb,'subUnitId':_0x246040,'text':JSON[_0x458f0c(0x18c)](_0x329919[_0x458f0c(0x1a8)]),'parentId':_0x2ac365}),_0x5d9f87=_0x3828d5(_0x1b8a43[_0x458f0c(0x1a7)][0x0]);return{..._0x5d9f87,'children':_0x1b8a43[_0x458f0c(0x1a7)][_0x458f0c(0x15b)](0x1)[_0x458f0c(0x186)](_0x42d326=>_0x3828d5(_0x42d326,_0x5d9f87['id']))};}return null;}let f=class{constructor(_0x461529,_0x1cc612,_0x415457,_0x5dfa83){const _0x13a573=_0x58fd22;this['_httpService']=_0x461529,this[_0x13a573(0x165)]=_0x1cc612,this[_0x13a573(0x187)]=_0x415457,this['_injector']=_0x5dfa83;}async[_0x58fd22(0x1a4)](_0x41b4c6){const _0x496db8=_0x58fd22;var _0x394191,_0x8577f3;const {parentId:_0x235add,unitId:_0x2b2774,text:_0xfb5b0d,threadId:_0x24dd57}=_0x41b4c6,_0x5d69bc=(_0x8577f3=(_0x394191=_0xfb5b0d[_0x496db8(0x16b)])==null?void 0x0:_0x394191[_0x496db8(0x1b3)](_0x4eb990=>_0x4eb990[_0x496db8(0x18d)]===_0x2eb19a['COMMENT'])[_0x496db8(0x186)](_0x350f07=>_0x350f07[_0x496db8(0x16d)]))!=null?_0x8577f3:[],_0x10665a=JSON[_0x496db8(0x1a6)](_0xfb5b0d),_0x192f7f=(await this[_0x496db8(0x187)][_0x496db8(0x1a2)](_0x2b2774))['getMemberID']();if(_0x235add){const _0x31d8b5={'memberId':_0x192f7f,'unitId':_0x2b2774,'content':_0x10665a,'mention':_0x5d69bc,'threadId':_0x24dd57},_0x3111eb=(await this['_httpService'][_0x496db8(0x166)](_0x496db8(0x156)+_0x2b2774+_0x496db8(0x191),{'body':_0x31d8b5}))[_0x496db8(0x16c)]['reply'];return{..._0x41b4c6,'id':_0x3111eb[_0x496db8(0x1b0)],'dT':_0x173349(+_0x3111eb[_0x496db8(0x163)])[_0x496db8(0x17e)](_0x496db8(0x168)),'personId':_0x3111eb[_0x496db8(0x182)]};}else{const _0x36945d={'memberId':_0x192f7f,'unitId':_0x2b2774,'content':_0x10665a,'mention':_0x5d69bc},_0x20f370=await this['_httpService'][_0x496db8(0x166)](_0x496db8(0x156)+_0x2b2774+_0x496db8(0x15f),{'body':_0x36945d});return X(_0x20f370['body'][_0x496db8(0x178)],_0x41b4c6);}}async[_0x58fd22(0x19b)](_0x4230f0){const _0x29c86e=_0x58fd22;var _0x3f9a5a,_0xfb19a8;const {text:_0x16cbb3,unitId:_0x3a1001}=_0x4230f0,_0x1cbe7e=(_0xfb19a8=(_0x3f9a5a=_0x16cbb3[_0x29c86e(0x16b)])==null?void 0x0:_0x3f9a5a[_0x29c86e(0x1b3)](_0x11cd3b=>_0x11cd3b[_0x29c86e(0x18d)]===_0x2eb19a[_0x29c86e(0x170)])['map'](_0xbae054=>_0xbae054[_0x29c86e(0x16d)]))!=null?_0xfb19a8:[],_0x38e607=JSON[_0x29c86e(0x1a6)](_0x16cbb3),_0x9fdeaf=_0x4230f0[_0x29c86e(0x160)],_0x9a4aa7=_0x4230f0['id'],_0x3a087b={'memberId':(await this[_0x29c86e(0x187)]['requireSession'](_0x3a1001))[_0x29c86e(0x1a5)](),'unitId':_0x3a1001,'threadId':_0x9fdeaf,'mention':_0x1cbe7e,'content':_0x38e607,'replyId':_0x9a4aa7},_0x406b30=await this['_httpService'][_0x29c86e(0x166)]('/universer-api/comment/unit/'+_0x3a1001+_0x29c86e(0x17c),{'body':_0x3a087b});return!_0x406b30[_0x29c86e(0x16c)]['error']||_0x406b30[_0x29c86e(0x16c)][_0x29c86e(0x199)][_0x29c86e(0x177)]===0x1;}async[_0x58fd22(0x16e)](_0x1420b1){const _0x4efe60=_0x58fd22,{unitId:_0x3c7a60}=_0x1420b1,_0x16c72f=_0x1420b1[_0x4efe60(0x160)],_0x4206ed={'memberId':this['_userService']['getCurrentUser']()[_0x4efe60(0x158)],'unitId':_0x3c7a60,'threadId':_0x16c72f,'solved':_0x1420b1[_0x4efe60(0x197)]?I['Solved']:I[_0x4efe60(0x19c)]},_0x3702df=await this[_0x4efe60(0x161)][_0x4efe60(0x166)](_0x4efe60(0x156)+_0x3c7a60+'/solved',{'body':_0x4206ed});return!_0x3702df['body'][_0x4efe60(0x199)]||_0x3702df['body'][_0x4efe60(0x199)][_0x4efe60(0x177)]===0x1;}async['deleteComment'](_0x5a00ca,_0x3d6913,_0x2c5c78,_0x1b2209){const _0x4f5521=_0x58fd22,_0x2b0042={'memberId':(await this[_0x4f5521(0x187)][_0x4f5521(0x1a2)](_0x5a00ca))[_0x4f5521(0x1a5)](),'threadId':_0x2c5c78,'replyId':_0x1b2209,'unitId':_0x5a00ca},_0x56b6ab=await this[_0x4f5521(0x161)][_0x4f5521(0x166)](_0x4f5521(0x156)+_0x5a00ca+_0x4f5521(0x193),{'body':_0x2b0042});return!_0x56b6ab[_0x4f5521(0x16c)][_0x4f5521(0x199)]||_0x56b6ab[_0x4f5521(0x16c)]['error'][_0x4f5521(0x177)]===0x1;}async[_0x58fd22(0x17d)](_0x463ab3,_0x5a9bfd,_0x2c3185){const _0x2f9829=_0x58fd22,_0x5305d6={'unitId':_0x463ab3,'threadId':_0x2c3185},_0x2ea6fc=await this[_0x2f9829(0x161)][_0x2f9829(0x166)]('/universer-api/comment/unit/'+_0x463ab3+_0x2f9829(0x171),{'body':_0x5305d6}),_0x218675=_0x2c3185[_0x2f9829(0x186)](_0x25085c=>ee(_0x2ea6fc[_0x2f9829(0x16c)]['comments'][_0x25085c],_0x463ab3,_0x5a9bfd))[_0x2f9829(0x1b3)](Boolean);return Object[_0x2f9829(0x172)](_0x2ea6fc['body']['users'])[_0x2f9829(0x1b9)](_0x202a2e=>{const _0x41626c=_0x2f9829;this[_0x41626c(0x165)][_0x41626c(0x18f)](_0x202a2e);}),_0x218675;}[_0x58fd22(0x194)](_0x3c1d50){const _0x49e362=_0x58fd22;return{'id':_0x3c1d50['id'],'threadId':_0x3c1d50['threadId'],'ref':_0x3c1d50[_0x49e362(0x198)]};}};f=Q([_(0x0,_0x4562eb(_0x13a52b)),_(0x1,_0x4562eb(_0x2fbd9e)),_(0x2,_0x4562eb(_0x326a1a)),_(0x3,_0x4562eb(_0x585bfd))],f);var re=Object[_0x58fd22(0x1b6)],te=(_0x3e8d81,_0xdfad50,_0x32bccc,_0x507499)=>{const _0x207b61=_0x58fd22;for(var _0x3da565=_0x507499>0x1?void 0x0:_0x507499?re(_0xdfad50,_0x32bccc):_0xdfad50,_0x5b7280=_0x3e8d81[_0x207b61(0x17f)]-0x1,_0x6ef0ac;_0x5b7280>=0x0;_0x5b7280--)(_0x6ef0ac=_0x3e8d81[_0x5b7280])&&(_0x3da565=_0x6ef0ac(_0x3da565)||_0x3da565);return _0x3da565;},N=(_0xa46f4,_0x219765)=>(_0x10a144,_0x2d5b4d)=>_0x219765(_0x10a144,_0x2d5b4d,_0xa46f4);let g=class extends _0x2a378a{constructor(_0x599a52,_0x106610){const _0x410e0c=_0x58fd22;super(),this[_0x410e0c(0x1b7)]=_0x599a52,this[_0x410e0c(0x174)]=_0x106610,this['_initDataSource']();}[_0x58fd22(0x167)](){const _0x48f6ce=_0x58fd22;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x48f6ce(0x1b7)][_0x48f6ce(0x18a)]=!0x1;}};g=te([N(0x0,_0x2dd5cd),N(0x1,_0x4562eb(f))],g);var se=Object[_0x58fd22(0x159)],oe=Object[_0x58fd22(0x1b6)],ne=(_0x280a66,_0x59f894,_0x165366)=>_0x59f894 in _0x280a66?se(_0x280a66,_0x59f894,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x165366}):_0x280a66[_0x59f894]=_0x165366,ie=(_0x5df299,_0x231500,_0x32e302,_0x1cafd8)=>{const _0x1a777d=_0x58fd22;for(var _0x105164=_0x1cafd8>0x1?void 0x0:_0x1cafd8?oe(_0x231500,_0x32e302):_0x231500,_0x4a26ed=_0x5df299[_0x1a777d(0x17f)]-0x1,_0x2f3dbe;_0x4a26ed>=0x0;_0x4a26ed--)(_0x2f3dbe=_0x5df299[_0x4a26ed])&&(_0x105164=_0x2f3dbe(_0x105164)||_0x105164);return _0x105164;},w=(_0x299ef1,_0x6d2661)=>(_0x56f68c,_0x27bc63)=>_0x6d2661(_0x56f68c,_0x27bc63,_0x299ef1),$=(_0x1d591a,_0x5bc19b,_0x2f71d2)=>ne(_0x1d591a,typeof _0x5bc19b!='symbol'?_0x5bc19b+'':_0x5bc19b,_0x2f71d2);let b=class extends _0x19daed{constructor(_0xe6a8b8=M,_0x18f36c,_0x3e7e45){const _0x2d75db=_0x58fd22;super(),this[_0x2d75db(0x1ad)]=_0xe6a8b8,this[_0x2d75db(0x1b2)]=_0x18f36c,this['_configService']=_0x3e7e45;const {..._0x5a6823}=_0x5457dd({},M,this['_config']);this['_configService'][_0x2d75db(0x15c)](z,_0x5a6823);}[_0x58fd22(0x1ac)](){const _0x80950b=_0x58fd22;[[f],[g],[S]][_0x80950b(0x1b9)](_0x4416ce=>{const _0x36f6a5=_0x80950b;this['_injector'][_0x36f6a5(0x16a)](_0x4416ce);});}[_0x58fd22(0x1a1)](){const _0x57db93=_0x58fd22;this[_0x57db93(0x1b2)][_0x57db93(0x1aa)](g),this[_0x57db93(0x1b2)][_0x57db93(0x1aa)](S);}};$(b,_0x58fd22(0x189),W),$(b,_0x58fd22(0x175),_0x25802b[_0x58fd22(0x1a9)]),b=ie([_0x501549(_0x2240b0,_0x37bf58,_0x273301),w(0x1,_0x4562eb(_0x585bfd)),w(0x2,_0x2316e1)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x3ccefd=_0x31d0;(function(_0x5ebe59,_0x22eb5f){const _0x31856b=_0x31d0,_0x130a96=_0x5ebe59();while(!![]){try{const _0x103ec5=parseInt(_0x31856b(0x149))/0x1+parseInt(_0x31856b(0x114))/0x2+parseInt(_0x31856b(0x14a))/0x3*(-parseInt(_0x31856b(0x126))/0x4)+-parseInt(_0x31856b(0x102))/0x5+parseInt(_0x31856b(0xf4))/0x6+-parseInt(_0x31856b(0xf9))/0x7*(parseInt(_0x31856b(0x145))/0x8)+parseInt(_0x31856b(0xff))/0x9;if(_0x103ec5===_0x22eb5f)break;else _0x130a96['push'](_0x130a96['shift']());}catch(_0x548ed6){_0x130a96['push'](_0x130a96['shift']());}}}(_0x3b75,0x88f40));import{CommentService as _0x11f515,CollaborationSessionService as _0x52cf24,UniverCollaborationClientPlugin as _0x12ae43}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x38eead}from'@univerjs-pro/license';import{dayjs as _0x4e68e8,UserManagerService as _0x4d85ee,Inject as _0x5c1e64,Injector as _0x31e86f,Disposable as _0x2cd795,CustomRangeType as _0x4ac1a8,UniverInstanceType as _0x5f0730,DependentOn as _0x7f6732,IConfigService as _0x405fde,Plugin as _0x1c4223,merge as _0x1a1877}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xe87a7f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x37ae10,IThreadCommentDataSourceService as _0x241c59}from'@univerjs/thread-comment';import{bufferTime as _0x56fda4}from'rxjs';import{HTTPService as _0x2cb4a2}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2abd50=>(_0x2abd50[_0x2abd50['OpenOrReOpen']=0x0]=_0x3ccefd(0x113),_0x2abd50[_0x2abd50[_0x3ccefd(0x118)]=0x1]=_0x3ccefd(0x118),_0x2abd50[_0x2abd50['UNRECOGNIZED']=-0x1]=_0x3ccefd(0x143),_0x2abd50))(I||{}),v=(_0x107047=>(_0x107047[_0x107047[_0x3ccefd(0x12a)]=0x0]=_0x3ccefd(0x12a),_0x107047[_0x107047[_0x3ccefd(0xf7)]=0x1]=_0x3ccefd(0xf7),_0x107047[_0x107047['Reply']=0x2]=_0x3ccefd(0x125),_0x107047[_0x107047[_0x3ccefd(0x112)]=0x3]='Edit',_0x107047[_0x107047[_0x3ccefd(0x110)]=0x4]=_0x3ccefd(0x110),_0x107047[_0x107047[_0x3ccefd(0x121)]=0x5]=_0x3ccefd(0x121),_0x107047[_0x107047['UNRECOGNIZED']=-0x1]=_0x3ccefd(0x143),_0x107047))(v||{});const y=_0x2866e2=>_0x4e68e8(new Date(+_0x2866e2))[_0x3ccefd(0xfe)](_0x3ccefd(0x14c)),B=async(_0x374df5,_0x5aa73e)=>{const _0x569b22=_0x3ccefd,_0x5ab53f=_0x374df5[_0x569b22(0x107)](_0x4d85ee),_0x25f72d=_0x374df5[_0x569b22(0x107)](_0x2cb4a2);_0x5aa73e['forEach'](_0x204518=>{const _0x573f43=_0x569b22;_0x5ab53f['getUser'](_0x204518)&&_0x5aa73e[_0x573f43(0x139)](_0x204518);}),_0x5aa73e[_0x569b22(0x12e)]&&(await _0x25f72d[_0x569b22(0x107)](_0x569b22(0xef),{'params':{'userIDs':[..._0x5aa73e]}}))[_0x569b22(0x127)]['users'][_0x569b22(0x10e)](_0x6955af=>{const _0x192893=_0x569b22;_0x6955af&&_0x5ab53f[_0x192893(0x10c)](_0x6955af);});};var K=Object[_0x3ccefd(0x12d)],V=(_0x7fa101,_0x57a0ef,_0x152c37,_0x13fac5)=>{const _0x1013b6=_0x3ccefd;for(var _0x3dac30=_0x13fac5>0x1?void 0x0:_0x13fac5?K(_0x57a0ef,_0x152c37):_0x57a0ef,_0x4553b8=_0x7fa101[_0x1013b6(0x148)]-0x1,_0x5d89b6;_0x4553b8>=0x0;_0x4553b8--)(_0x5d89b6=_0x7fa101[_0x4553b8])&&(_0x3dac30=_0x5d89b6(_0x3dac30)||_0x3dac30);return _0x3dac30;},p=(_0x1ba73e,_0x3b9ac2)=>(_0x57402e,_0x5109e4)=>_0x3b9ac2(_0x57402e,_0x5109e4,_0x1ba73e);function _0x31d0(_0x210e77,_0x483dd1){const _0x3b758=_0x3b75();return _0x31d0=function(_0x31d025,_0x45120c){_0x31d025=_0x31d025-0xec;let _0x3bb48e=_0x3b758[_0x31d025];return _0x3bb48e;},_0x31d0(_0x210e77,_0x483dd1);}let _=class extends _0x2cd795{constructor(_0x274955,_0x4fb634,_0x5b6808,_0x765ab2){const _0x1049da=_0x3ccefd;super(),this['_commentService']=_0x274955,this['_threadCommentModel']=_0x4fb634,this[_0x1049da(0x14d)]=_0x5b6808,this[_0x1049da(0x144)]=_0x765ab2,this[_0x1049da(0x103)](),this[_0x1049da(0x124)]();}[_0x3ccefd(0x124)](){const _0x5d0790=_0x3ccefd;this[_0x5d0790(0x11e)](this[_0x5d0790(0xee)][_0x5d0790(0x12f)]['pipe'](_0x56fda4(0x10))[_0x5d0790(0x122)](_0xae9b10=>{const _0x2751eb=_0x5d0790,_0x35c84b=new Set();_0xae9b10[_0x2751eb(0x10e)](_0x33dcae=>{const _0x17442d=_0x2751eb;switch(_0x33dcae[_0x17442d(0xec)]){case'add':{const _0x20347d=_0x33dcae[_0x17442d(0x132)]['personId'];_0x35c84b[_0x17442d(0x13a)](_0x20347d);break;}}}),B(this[_0x2751eb(0x144)],_0x35c84b);}));}[_0x3ccefd(0x103)](){const _0x281a8a=_0x3ccefd;this['disposeWithMe'](this[_0x281a8a(0x11c)]['commentUpdate$'][_0x281a8a(0x122)](async _0x2f2ffc=>{const _0x3df794=_0x281a8a;var _0x264cdc,_0x38a36f,_0x33f983,_0x3893b5;const _0x178381=(_0x264cdc=this[_0x3df794(0xee)][_0x3df794(0xf2)](_0x2f2ffc[_0x3df794(0x136)])[_0x3df794(0x12c)](_0x4a0aa=>_0x4a0aa[_0x3df794(0xf5)]===_0x2f2ffc[_0x3df794(0xf5)]))==null?void 0x0:_0x264cdc[_0x3df794(0x133)];if(!_0x178381)return;const {unitId:_0x218998,subUnitId:_0x41ceef}=_0x178381;switch(_0x2f2ffc[_0x3df794(0x14f)]&&this['_userService'][_0x3df794(0x10c)](_0x2f2ffc['user']),_0x2f2ffc[_0x3df794(0xec)]){case v[_0x3df794(0xf7)]:break;case v['Reply']:{this[_0x3df794(0xee)][_0x3df794(0x146)](_0x218998,_0x41ceef,{'unitId':_0x218998,'subUnitId':_0x41ceef,'ref':'','id':_0x2f2ffc[_0x3df794(0x137)],'dT':y(+_0x2f2ffc['createTimestamp']),'threadId':_0x2f2ffc[_0x3df794(0xf5)],'personId':(_0x33f983=(_0x38a36f=_0x2f2ffc['user'])==null?void 0x0:_0x38a36f[_0x3df794(0x117)])!=null?_0x33f983:_0x2f2ffc[_0x3df794(0x150)],'text':JSON[_0x3df794(0x13d)](_0x2f2ffc[_0x3df794(0x130)]),'parentId':_0x178381['id']});break;}case v[_0x3df794(0x110)]:{const _0x305619=this['_threadCommentModel']['getComment'](_0x218998,_0x41ceef,_0x2f2ffc[_0x3df794(0x137)]);_0x305619&&_0x305619[_0x3df794(0x123)]&&this[_0x3df794(0xee)][_0x3df794(0x128)](_0x218998,_0x41ceef,_0x2f2ffc['replyId']);break;}case v[_0x3df794(0x112)]:{this[_0x3df794(0xee)][_0x3df794(0x111)](_0x218998,_0x41ceef,{'commentId':_0x2f2ffc[_0x3df794(0x137)],'text':JSON['parse'](_0x2f2ffc[_0x3df794(0x130)])});break;}case v[_0x3df794(0x121)]:{const _0x24a089=(_0x3893b5=this['_threadCommentModel'][_0x3df794(0xf2)](_0x2f2ffc[_0x3df794(0x136)])[_0x3df794(0x12c)](_0xd45349=>_0xd45349['threadId']===_0x2f2ffc[_0x3df794(0xf5)]))==null?void 0x0:_0x3893b5['root'];_0x24a089&&this[_0x3df794(0xee)][_0x3df794(0x151)](_0x218998,_0x41ceef,_0x24a089['id'],_0x2f2ffc[_0x3df794(0x142)]===I[_0x3df794(0x118)]);break;}}}));}};_=V([p(0x0,_0x5c1e64(_0x11f515)),p(0x1,_0x5c1e64(_0x37ae10)),p(0x2,_0x5c1e64(_0x4d85ee)),p(0x3,_0x5c1e64(_0x31e86f))],_);const z=_0x3ccefd(0xed),O={};var k=Object[_0x3ccefd(0x12d)],Q=(_0x49c27c,_0xf52f21,_0x2afed6,_0x5c1fb0)=>{for(var _0x585dc9=_0x5c1fb0>0x1?void 0x0:_0x5c1fb0?k(_0xf52f21,_0x2afed6):_0xf52f21,_0x46f74e=_0x49c27c['length']-0x1,_0x51b0d3;_0x46f74e>=0x0;_0x46f74e--)(_0x51b0d3=_0x49c27c[_0x46f74e])&&(_0x585dc9=_0x51b0d3(_0x585dc9)||_0x585dc9);return _0x585dc9;},b=(_0x9467c4,_0x594426)=>(_0x26ff81,_0x17203d)=>_0x594426(_0x26ff81,_0x17203d,_0x9467c4);function _0x3b75(){const _0x1b25a9=['length','678751IzuesV','102wVuUhu','resolved','YYYY/MM/DD\x20HH:mm','_userService','values','user','userId','resolveComment','_threadCommentDataSource','type','thread-comment-data-source.config','_threadCommentModel','/universer-api/user/list','map','rangeType','getUnit','post','2221356YdmSXd','threadId','listComments','Add','error','21TVhohE','/universer-api/comment/unit/','ref','getMemberID','/delete','format','6148818sDMiDc','defineProperty','comment','3131365cEGDqf','_init','/reply','/list','users','get','syncUpdateMutationToColla','filter','saveCommentToSnapshot','comments','addUser','COMMENT','forEach','pluginName','Delete','updateComment','Edit','OpenOrReOpen','1152250SHIiiw','/solved','stringify','userID','Solved','_configService','setConfig','rangeId','_commentService','requireSession','disposeWithMe','createTimestamp','_sessionService','Solve','subscribe','parentId','_initUserSync','Reply','14548PIgJpc','body','deleteComment','customRanges','Unknown','UNIVER_UNKNOWN','find','getOwnPropertyDescriptor','size','commentUpdate$','content','dataSource','payload','root','reply','_httpService','unitId','replyId','getCurrentUser','delete','add','/edit','_config','parse','code','replies','_initDataSource','onReady','solved','UNRECOGNIZED','_injector','2659768TAqmiq','addComment','_threadCommentDataSourceService'];_0x3b75=function(){return _0x1b25a9;};return _0x3b75();}function X(_0x14c934,_0x51d512){const _0x406020=_0x3ccefd,_0x2827b6=_0x14c934[_0x406020(0x13f)][0x0];return{..._0x51d512,'id':_0x2827b6[_0x406020(0x137)],'resolved':_0x14c934[_0x406020(0x142)]===0x1,'dT':y(_0x2827b6[_0x406020(0x11f)]),'personId':_0x2827b6['userId'],'threadId':_0x2827b6['threadId']};}function ee(_0x2953fb,_0x523705,_0x18edb4){const _0x1c238d=_0x3ccefd;var _0x5d0a99,_0x3c7187;if(((_0x3c7187=(_0x5d0a99=_0x2953fb==null?void 0x0:_0x2953fb['replies'])==null?void 0x0:_0x5d0a99[_0x1c238d(0x148)])!=null?_0x3c7187:0x0)>0x0){const _0x3fae91=(_0x1cf9bd,_0x986a53)=>({'id':_0x1cf9bd[_0x1c238d(0x137)],'threadId':_0x1cf9bd[_0x1c238d(0xf5)],'dT':y(_0x1cf9bd['createTimestamp']),'personId':_0x1cf9bd[_0x1c238d(0x150)],'resolved':_0x2953fb[_0x1c238d(0x142)]===I['Solved'],'unitId':_0x523705,'subUnitId':_0x18edb4,'text':JSON[_0x1c238d(0x13d)](_0x1cf9bd['content']),'parentId':_0x986a53}),_0x2fdaae=_0x3fae91(_0x2953fb[_0x1c238d(0x13f)][0x0]);return{..._0x2fdaae,'children':_0x2953fb[_0x1c238d(0x13f)]['slice'](0x1)[_0x1c238d(0xf0)](_0x12fd77=>_0x3fae91(_0x12fd77,_0x2fdaae['id']))};}return null;}let S=class{constructor(_0x1083dc,_0x10f3ca,_0x5105fe){const _0x565799=_0x3ccefd;this[_0x565799(0x135)]=_0x1083dc,this[_0x565799(0x14d)]=_0x10f3ca,this[_0x565799(0x120)]=_0x5105fe;}async[_0x3ccefd(0x146)](_0x45f7d0){const _0x3b146d=_0x3ccefd;var _0x41eebf,_0xc142d4;const {parentId:_0x922980,unitId:_0x1d672d,text:_0x655913,threadId:_0x1b6aaa}=_0x45f7d0,_0x391e4f=(_0xc142d4=(_0x41eebf=_0x655913[_0x3b146d(0x129)])==null?void 0x0:_0x41eebf[_0x3b146d(0x109)](_0xd5e750=>_0xd5e750[_0x3b146d(0xf1)]===_0x4ac1a8[_0x3b146d(0x10d)])[_0x3b146d(0xf0)](_0xab0eeb=>_0xab0eeb[_0x3b146d(0x11b)]))!=null?_0xc142d4:[],_0x2faa26=JSON['stringify'](_0x655913),_0x56fe15=(await this[_0x3b146d(0x120)][_0x3b146d(0x11d)](_0x1d672d))[_0x3b146d(0xfc)]();if(_0x922980){const _0x536167={'memberId':_0x56fe15,'unitId':_0x1d672d,'content':_0x2faa26,'mention':_0x391e4f,'threadId':_0x1b6aaa},_0x597694=(await this[_0x3b146d(0x135)][_0x3b146d(0xf3)](_0x3b146d(0xfa)+_0x1d672d+_0x3b146d(0x104),{'body':_0x536167}))[_0x3b146d(0x127)][_0x3b146d(0x134)];return{..._0x45f7d0,'id':_0x597694[_0x3b146d(0x137)],'dT':_0x4e68e8(+_0x597694['createTimestamp'])[_0x3b146d(0xfe)](_0x3b146d(0x14c)),'personId':_0x597694[_0x3b146d(0x150)]};}else{const _0x255ac0={'memberId':_0x56fe15,'unitId':_0x1d672d,'content':_0x2faa26,'mention':_0x391e4f},_0x398d9a=await this[_0x3b146d(0x135)]['post'](_0x3b146d(0xfa)+_0x1d672d+'/add',{'body':_0x255ac0});return X(_0x398d9a[_0x3b146d(0x127)][_0x3b146d(0x101)],_0x45f7d0);}}async[_0x3ccefd(0x111)](_0x20e337){const _0x107189=_0x3ccefd;var _0x312e0e,_0x54be81;const {text:_0x49954d,unitId:_0x407518}=_0x20e337,_0x19a98a=(_0x54be81=(_0x312e0e=_0x49954d[_0x107189(0x129)])==null?void 0x0:_0x312e0e[_0x107189(0x109)](_0x1b6015=>_0x1b6015[_0x107189(0xf1)]===_0x4ac1a8[_0x107189(0x10d)])[_0x107189(0xf0)](_0x2ea468=>_0x2ea468[_0x107189(0x11b)]))!=null?_0x54be81:[],_0x11459d=JSON[_0x107189(0x116)](_0x49954d),_0x334776=_0x20e337[_0x107189(0xf5)],_0x529bd2=_0x20e337['id'],_0x365a24={'memberId':(await this['_sessionService'][_0x107189(0x11d)](_0x407518))[_0x107189(0xfc)](),'unitId':_0x407518,'threadId':_0x334776,'mention':_0x19a98a,'content':_0x11459d,'replyId':_0x529bd2},_0x54e038=await this[_0x107189(0x135)][_0x107189(0xf3)](_0x107189(0xfa)+_0x407518+_0x107189(0x13b),{'body':_0x365a24});return!_0x54e038[_0x107189(0x127)][_0x107189(0xf8)]||_0x54e038[_0x107189(0x127)][_0x107189(0xf8)]['code']===0x1;}async['resolveComment'](_0x1c4381){const _0x1220ca=_0x3ccefd,{unitId:_0x5879ab}=_0x1c4381,_0x1683be=_0x1c4381['threadId'],_0xbc7437={'memberId':this[_0x1220ca(0x14d)][_0x1220ca(0x138)]()[_0x1220ca(0x117)],'unitId':_0x5879ab,'threadId':_0x1683be,'solved':_0x1c4381[_0x1220ca(0x14b)]?I['Solved']:I[_0x1220ca(0x113)]},_0x330228=await this[_0x1220ca(0x135)][_0x1220ca(0xf3)](_0x1220ca(0xfa)+_0x5879ab+_0x1220ca(0x115),{'body':_0xbc7437});return!_0x330228[_0x1220ca(0x127)][_0x1220ca(0xf8)]||_0x330228[_0x1220ca(0x127)]['error'][_0x1220ca(0x13e)]===0x1;}async[_0x3ccefd(0x128)](_0x4f3cda,_0x150a81,_0x45fdd2,_0xa1883b){const _0xbc72d4=_0x3ccefd,_0x384011={'memberId':(await this[_0xbc72d4(0x120)][_0xbc72d4(0x11d)](_0x4f3cda))[_0xbc72d4(0xfc)](),'threadId':_0x45fdd2,'replyId':_0xa1883b,'unitId':_0x4f3cda},_0x126a78=await this[_0xbc72d4(0x135)][_0xbc72d4(0xf3)](_0xbc72d4(0xfa)+_0x4f3cda+_0xbc72d4(0xfd),{'body':_0x384011});return!_0x126a78['body'][_0xbc72d4(0xf8)]||_0x126a78[_0xbc72d4(0x127)][_0xbc72d4(0xf8)][_0xbc72d4(0x13e)]===0x1;}async[_0x3ccefd(0xf6)](_0x4796a9,_0x29db,_0x4969ca){const _0x1dfeec=_0x3ccefd,_0x4c9f8b={'unitId':_0x4796a9,'threadId':_0x4969ca},_0x267ad7=await this[_0x1dfeec(0x135)][_0x1dfeec(0xf3)](_0x1dfeec(0xfa)+_0x4796a9+_0x1dfeec(0x105),{'body':_0x4c9f8b}),_0x553820=_0x4969ca[_0x1dfeec(0xf0)](_0x126f65=>ee(_0x267ad7[_0x1dfeec(0x127)][_0x1dfeec(0x10b)][_0x126f65],_0x4796a9,_0x29db))[_0x1dfeec(0x109)](Boolean);return Object[_0x1dfeec(0x14e)](_0x267ad7[_0x1dfeec(0x127)][_0x1dfeec(0x106)])['forEach'](_0x5d6cf1=>{const _0x3bedd0=_0x1dfeec;this[_0x3bedd0(0x14d)][_0x3bedd0(0x10c)](_0x5d6cf1);}),_0x553820;}[_0x3ccefd(0x10a)](_0x4d5477){const _0x532a03=_0x3ccefd;return{'id':_0x4d5477['id'],'threadId':_0x4d5477[_0x532a03(0xf5)],'ref':_0x4d5477[_0x532a03(0xfb)]};}};S=Q([b(0x0,_0x5c1e64(_0x2cb4a2)),b(0x1,_0x5c1e64(_0x4d85ee)),b(0x2,_0x5c1e64(_0x52cf24))],S);var re=Object[_0x3ccefd(0x12d)],te=(_0x16735f,_0xd526ed,_0x107b61,_0x41fae0)=>{const _0x47c169=_0x3ccefd;for(var _0x456b28=_0x41fae0>0x1?void 0x0:_0x41fae0?re(_0xd526ed,_0x107b61):_0xd526ed,_0x5d4811=_0x16735f[_0x47c169(0x148)]-0x1,_0x8bdefb;_0x5d4811>=0x0;_0x5d4811--)(_0x8bdefb=_0x16735f[_0x5d4811])&&(_0x456b28=_0x8bdefb(_0x456b28)||_0x456b28);return _0x456b28;},M=(_0x181509,_0x3220d4)=>(_0x316aa5,_0x398c1c)=>_0x3220d4(_0x316aa5,_0x398c1c,_0x181509);let f=class extends _0x2cd795{constructor(_0x1d0bd3,_0x176758){const _0x146518=_0x3ccefd;super(),this['_threadCommentDataSourceService']=_0x1d0bd3,this[_0x146518(0x152)]=_0x176758,this[_0x146518(0x140)]();}[_0x3ccefd(0x140)](){const _0x19c71c=_0x3ccefd;this[_0x19c71c(0x147)][_0x19c71c(0x131)]=this[_0x19c71c(0x152)],this[_0x19c71c(0x147)][_0x19c71c(0x108)]=!0x1;}};f=te([M(0x0,_0x241c59),M(0x1,_0x5c1e64(S))],f);var se=Object[_0x3ccefd(0x100)],oe=Object[_0x3ccefd(0x12d)],ne=(_0x3fe621,_0x36983a,_0x49134e)=>_0x36983a in _0x3fe621?se(_0x3fe621,_0x36983a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x49134e}):_0x3fe621[_0x36983a]=_0x49134e,ie=(_0xb59861,_0x18b867,_0x30e764,_0x3d61e1)=>{const _0x26fb94=_0x3ccefd;for(var _0x3d2bf8=_0x3d61e1>0x1?void 0x0:_0x3d61e1?oe(_0x18b867,_0x30e764):_0x18b867,_0x38debd=_0xb59861[_0x26fb94(0x148)]-0x1,_0x32db52;_0x38debd>=0x0;_0x38debd--)(_0x32db52=_0xb59861[_0x38debd])&&(_0x3d2bf8=_0x32db52(_0x3d2bf8)||_0x3d2bf8);return _0x3d2bf8;},N=(_0x3d8e0f,_0x8ff587)=>(_0x174dd2,_0x14e34d)=>_0x8ff587(_0x174dd2,_0x14e34d,_0x3d8e0f),$=(_0x48c3f9,_0x1ed7a5,_0x3a4819)=>ne(_0x48c3f9,typeof _0x1ed7a5!='symbol'?_0x1ed7a5+'':_0x1ed7a5,_0x3a4819);let g=class extends _0x1c4223{constructor(_0x2de67e=O,_0x445e94,_0xa998df){const _0x22417c=_0x3ccefd;super(),this[_0x22417c(0x13c)]=_0x2de67e,this['_injector']=_0x445e94,this['_configService']=_0xa998df;const {..._0x5c02f3}=_0x1a1877({},O,this[_0x22417c(0x13c)]);this[_0x22417c(0x119)][_0x22417c(0x11a)](z,_0x5c02f3);}['onStarting'](){const _0x1aaef6=_0x3ccefd;[[S],[f],[_]][_0x1aaef6(0x10e)](_0x25a859=>{const _0x3215da=_0x1aaef6;this[_0x3215da(0x144)][_0x3215da(0x13a)](_0x25a859);});}[_0x3ccefd(0x141)](){const _0x226725=_0x3ccefd;this[_0x226725(0x144)][_0x226725(0x107)](f),this['_injector'][_0x226725(0x107)](_);}};$(g,_0x3ccefd(0x10f),W),$(g,_0x3ccefd(0xec),_0x5f0730[_0x3ccefd(0x12b)]),g=ie([_0x7f6732(_0xe87a7f,_0x12ae43,_0x38eead),N(0x1,_0x5c1e64(_0x31e86f)),N(0x2,_0x405fde)],g);export{g as UniverThreadCommentDataSourcePlugin};
@@ -1,13 +1,12 @@
1
1
  import { IBaseComment, IThreadComment, IThreadCommentDataSource } from '@univerjs/thread-comment';
2
2
  import { CollaborationSessionService } from '@univerjs-pro/collaboration-client';
3
- import { Injector, UserManagerService } from '@univerjs/core';
3
+ import { UserManagerService } from '@univerjs/core';
4
4
  import { HTTPService } from '@univerjs/network';
5
5
  export declare class ThreadCommentServerDataSource implements IThreadCommentDataSource {
6
6
  private readonly _httpService;
7
7
  private readonly _userService;
8
8
  private readonly _sessionService;
9
- private _injector;
10
- constructor(_httpService: HTTPService, _userService: UserManagerService, _sessionService: CollaborationSessionService, _injector: Injector);
9
+ constructor(_httpService: HTTPService, _userService: UserManagerService, _sessionService: CollaborationSessionService);
11
10
  addComment(comment: IThreadComment): Promise<IThreadComment>;
12
11
  updateComment(comment: IThreadComment): Promise<boolean>;
13
12
  resolveComment(comment: IThreadComment): Promise<boolean>;
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x29e1fc,_0x45c552){const _0x4105bd=_0x28b1,_0x12b092=_0x29e1fc();while(!![]){try{const _0x5a2298=parseInt(_0x4105bd(0xff))/0x1+parseInt(_0x4105bd(0xd8))/0x2*(parseInt(_0x4105bd(0xcd))/0x3)+-parseInt(_0x4105bd(0x113))/0x4+-parseInt(_0x4105bd(0x120))/0x5+-parseInt(_0x4105bd(0x11e))/0x6*(parseInt(_0x4105bd(0x115))/0x7)+-parseInt(_0x4105bd(0x133))/0x8*(parseInt(_0x4105bd(0xcc))/0x9)+-parseInt(_0x4105bd(0xfd))/0xa*(-parseInt(_0x4105bd(0xfb))/0xb);if(_0x5a2298===_0x45c552)break;else _0x12b092['push'](_0x12b092['shift']());}catch(_0x996dca){_0x12b092['push'](_0x12b092['shift']());}}}(_0x1f1a,0xa5276),function(_0x250a0b,_0x1b83f3){const _0x2bd7a1=_0x28b1;typeof exports==_0x2bd7a1(0xf2)&&typeof module<'u'?_0x1b83f3(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==_0x2bd7a1(0xd2)&&define[_0x2bd7a1(0x134)]?define([_0x2bd7a1(0x125),_0x2bd7a1(0xdf),_0x2bd7a1(0xee),_0x2bd7a1(0x13c),'@univerjs/thread-comment-ui',_0x2bd7a1(0xeb),_0x2bd7a1(0xd6),_0x2bd7a1(0xd9)],_0x1b83f3):(_0x250a0b=typeof globalThis<'u'?globalThis:_0x250a0b||self,_0x1b83f3(_0x250a0b[_0x2bd7a1(0x12e)]={},_0x250a0b[_0x2bd7a1(0xc2)],_0x250a0b[_0x2bd7a1(0xe6)],_0x250a0b[_0x2bd7a1(0xbd)],_0x250a0b[_0x2bd7a1(0xfe)],_0x250a0b[_0x2bd7a1(0x128)],_0x250a0b[_0x2bd7a1(0xd6)],_0x250a0b[_0x2bd7a1(0xe4)]));}(this,function(_0x2a52e4,_0x1522df,_0x225c7e,_0x420862,_0x179658,_0x337128,_0x4b5f23,_0xbc6973){'use strict';const _0x5310d2=_0x28b1;const _0x1bcd07='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x17afe3=(_0x1a4f29=>(_0x1a4f29[_0x1a4f29[_0x5310d2(0xf3)]=0x0]=_0x5310d2(0xf3),_0x1a4f29[_0x1a4f29[_0x5310d2(0x13d)]=0x1]=_0x5310d2(0x13d),_0x1a4f29[_0x1a4f29['UNRECOGNIZED']=-0x1]=_0x5310d2(0x129),_0x1a4f29))(_0x17afe3||{}),_0x317030=(_0x899f80=>(_0x899f80[_0x899f80['Unknown']=0x0]=_0x5310d2(0x10e),_0x899f80[_0x899f80[_0x5310d2(0xe2)]=0x1]=_0x5310d2(0xe2),_0x899f80[_0x899f80['Reply']=0x2]=_0x5310d2(0xca),_0x899f80[_0x899f80[_0x5310d2(0xf5)]=0x3]='Edit',_0x899f80[_0x899f80[_0x5310d2(0x121)]=0x4]=_0x5310d2(0x121),_0x899f80[_0x899f80[_0x5310d2(0x100)]=0x5]=_0x5310d2(0x100),_0x899f80[_0x899f80[_0x5310d2(0x129)]=-0x1]=_0x5310d2(0x129),_0x899f80))(_0x317030||{});const _0x4a67e9=_0x34a369=>_0x420862[_0x5310d2(0xea)](new Date(+_0x34a369))[_0x5310d2(0xc9)](_0x5310d2(0x10b)),_0x22a23e=async(_0x2cd59a,_0x100be8)=>{const _0x5a8982=_0x5310d2,_0x26cbae=_0x2cd59a['get'](_0x420862[_0x5a8982(0xf1)]),_0x466cc4=_0x2cd59a[_0x5a8982(0x143)](_0xbc6973['HTTPService']);_0x100be8[_0x5a8982(0x114)](_0x4474aa=>{const _0x4bbd3f=_0x5a8982;_0x26cbae[_0x4bbd3f(0x137)](_0x4474aa)&&_0x100be8[_0x4bbd3f(0x124)](_0x4474aa);}),_0x100be8[_0x5a8982(0x11a)]&&(await _0x466cc4[_0x5a8982(0x143)](_0x5a8982(0x12a),{'params':{'userIDs':[..._0x100be8]}}))[_0x5a8982(0xdd)][_0x5a8982(0x11b)]['forEach'](_0x334034=>{_0x334034&&_0x26cbae['addUser'](_0x334034);});};var _0x27a6bb=Object['getOwnPropertyDescriptor'],_0x51d98b=(_0x2a185a,_0x5ebee9,_0x16ccd5,_0x2124b7)=>{const _0x312674=_0x5310d2;for(var _0x1bdb87=_0x2124b7>0x1?void 0x0:_0x2124b7?_0x27a6bb(_0x5ebee9,_0x16ccd5):_0x5ebee9,_0x28bd5a=_0x2a185a[_0x312674(0x10c)]-0x1,_0x29cb20;_0x28bd5a>=0x0;_0x28bd5a--)(_0x29cb20=_0x2a185a[_0x28bd5a])&&(_0x1bdb87=_0x29cb20(_0x1bdb87)||_0x1bdb87);return _0x1bdb87;},_0x326893=(_0x4e1350,_0x16c273)=>(_0x9c1966,_0x4c4f76)=>_0x16c273(_0x9c1966,_0x4c4f76,_0x4e1350);let _0x516b24=class extends _0x420862[_0x5310d2(0xc4)]{constructor(_0x491696,_0x86bbaa,_0x2a7814,_0x263c20){const _0x919d8b=_0x5310d2;super(),this[_0x919d8b(0xd5)]=_0x491696,this[_0x919d8b(0xec)]=_0x86bbaa,this['_userService']=_0x2a7814,this[_0x919d8b(0x136)]=_0x263c20,this[_0x919d8b(0xfc)](),this['_initUserSync']();}['_initUserSync'](){const _0x2490b4=_0x5310d2;this['disposeWithMe'](this[_0x2490b4(0xec)][_0x2490b4(0x13a)]['pipe'](_0x4b5f23[_0x2490b4(0xe7)](0x10))[_0x2490b4(0x126)](_0x1e95f4=>{const _0x320ac5=_0x2490b4,_0x3cccde=new Set();_0x1e95f4[_0x320ac5(0x114)](_0x156b84=>{const _0x373e01=_0x320ac5;switch(_0x156b84[_0x373e01(0x138)]){case _0x373e01(0xc1):{const _0x25a847=_0x156b84[_0x373e01(0x10a)][_0x373e01(0x13f)];_0x3cccde[_0x373e01(0xc1)](_0x25a847);break;}}}),_0x22a23e(this[_0x320ac5(0x136)],_0x3cccde);}));}[_0x5310d2(0xfc)](){const _0x5a024a=_0x5310d2;this['disposeWithMe'](this[_0x5a024a(0xd5)][_0x5a024a(0x13a)]['subscribe'](async _0x118272=>{const _0x52c431=_0x5a024a;var _0x8121c,_0x3399fb,_0x158c6b,_0x454772;const _0x3a7c3e=(_0x8121c=this[_0x52c431(0xec)][_0x52c431(0x130)](_0x118272[_0x52c431(0xe9)])[_0x52c431(0x127)](_0x106d3c=>_0x106d3c[_0x52c431(0x103)]===_0x118272[_0x52c431(0x103)]))==null?void 0x0:_0x8121c['root'];if(!_0x3a7c3e)return;const {unitId:_0x46b953,subUnitId:_0x408bde}=_0x3a7c3e;switch(_0x118272[_0x52c431(0x106)]&&this['_userService'][_0x52c431(0x11f)](_0x118272[_0x52c431(0x106)]),_0x118272['type']){case _0x317030[_0x52c431(0xe2)]:break;case _0x317030[_0x52c431(0xca)]:{this[_0x52c431(0xec)][_0x52c431(0xed)](_0x46b953,_0x408bde,{'unitId':_0x46b953,'subUnitId':_0x408bde,'ref':'','id':_0x118272['replyId'],'dT':_0x4a67e9(+_0x118272[_0x52c431(0x101)]),'threadId':_0x118272[_0x52c431(0x103)],'personId':(_0x158c6b=(_0x3399fb=_0x118272[_0x52c431(0x106)])==null?void 0x0:_0x3399fb[_0x52c431(0xbe)])!=null?_0x158c6b:_0x118272[_0x52c431(0x102)],'text':JSON['parse'](_0x118272[_0x52c431(0xf7)]),'parentId':_0x3a7c3e['id']});break;}case _0x317030[_0x52c431(0x121)]:{const _0x47a64c=this[_0x52c431(0xec)]['getComment'](_0x46b953,_0x408bde,_0x118272[_0x52c431(0x104)]);_0x47a64c&&_0x47a64c[_0x52c431(0x141)]&&this['_threadCommentModel'][_0x52c431(0xc5)](_0x46b953,_0x408bde,_0x118272['replyId']);break;}case _0x317030[_0x52c431(0xf5)]:{this[_0x52c431(0xec)][_0x52c431(0x11d)](_0x46b953,_0x408bde,{'commentId':_0x118272[_0x52c431(0x104)],'text':JSON[_0x52c431(0x12b)](_0x118272[_0x52c431(0xf7)])});break;}case _0x317030[_0x52c431(0x100)]:{const _0x55e200=(_0x454772=this['_threadCommentModel'][_0x52c431(0x130)](_0x118272[_0x52c431(0xe9)])[_0x52c431(0x127)](_0x4a2c87=>_0x4a2c87[_0x52c431(0x103)]===_0x118272[_0x52c431(0x103)]))==null?void 0x0:_0x454772[_0x52c431(0xf8)];_0x55e200&&this['_threadCommentModel'][_0x52c431(0x122)](_0x46b953,_0x408bde,_0x55e200['id'],_0x118272[_0x52c431(0x10d)]===_0x17afe3[_0x52c431(0x13d)]);break;}}}));}};_0x516b24=_0x51d98b([_0x326893(0x0,_0x420862[_0x5310d2(0x144)](_0x1522df[_0x5310d2(0x110)])),_0x326893(0x1,_0x420862['Inject'](_0x337128[_0x5310d2(0xf4)])),_0x326893(0x2,_0x420862[_0x5310d2(0x144)](_0x420862[_0x5310d2(0xf1)])),_0x326893(0x3,_0x420862[_0x5310d2(0x144)](_0x420862[_0x5310d2(0x131)]))],_0x516b24);const _0x1de666=_0x5310d2(0xdc),_0x3be7fa={};var _0x36a0da=Object[_0x5310d2(0x116)],_0x4a0e71=(_0x4764ba,_0x25e2fe,_0xb1018c,_0x76364a)=>{const _0xb4ce10=_0x5310d2;for(var _0x41217c=_0x76364a>0x1?void 0x0:_0x76364a?_0x36a0da(_0x25e2fe,_0xb1018c):_0x25e2fe,_0x8897ea=_0x4764ba[_0xb4ce10(0x10c)]-0x1,_0x1f13d9;_0x8897ea>=0x0;_0x8897ea--)(_0x1f13d9=_0x4764ba[_0x8897ea])&&(_0x41217c=_0x1f13d9(_0x41217c)||_0x41217c);return _0x41217c;},_0x4af0a1=(_0x244873,_0x533c77)=>(_0x493194,_0x3df72a)=>_0x533c77(_0x493194,_0x3df72a,_0x244873);function _0x3e7798(_0x16b0cf,_0x14126d){const _0x41aea2=_0x5310d2,_0x5c0729=_0x16b0cf[_0x41aea2(0x140)][0x0];return{..._0x14126d,'id':_0x5c0729[_0x41aea2(0x104)],'resolved':_0x16b0cf[_0x41aea2(0x10d)]===0x1,'dT':_0x4a67e9(_0x5c0729[_0x41aea2(0x101)]),'personId':_0x5c0729['userId'],'threadId':_0x5c0729[_0x41aea2(0x103)]};}function _0x11d5e1(_0x5d7298,_0x1ca270,_0x121fd2){const _0x362350=_0x5310d2;var _0x59489a,_0x2fc933;if(((_0x2fc933=(_0x59489a=_0x5d7298==null?void 0x0:_0x5d7298[_0x362350(0x140)])==null?void 0x0:_0x59489a['length'])!=null?_0x2fc933:0x0)>0x0){const _0x165dfa=(_0xf4c0ce,_0xdb94f8)=>({'id':_0xf4c0ce['replyId'],'threadId':_0xf4c0ce[_0x362350(0x103)],'dT':_0x4a67e9(_0xf4c0ce[_0x362350(0x101)]),'personId':_0xf4c0ce[_0x362350(0x102)],'resolved':_0x5d7298[_0x362350(0x10d)]===_0x17afe3[_0x362350(0x13d)],'unitId':_0x1ca270,'subUnitId':_0x121fd2,'text':JSON[_0x362350(0x12b)](_0xf4c0ce['content']),'parentId':_0xdb94f8}),_0x55f483=_0x165dfa(_0x5d7298[_0x362350(0x140)][0x0]);return{..._0x55f483,'children':_0x5d7298['replies'][_0x362350(0xbc)](0x1)['map'](_0x337350=>_0x165dfa(_0x337350,_0x55f483['id']))};}return null;}let _0x45da3a=class{constructor(_0x201c45,_0x4f0ae9,_0x6a61d5,_0x1a4d7b){const _0x591889=_0x5310d2;this[_0x591889(0xe3)]=_0x201c45,this[_0x591889(0xf9)]=_0x4f0ae9,this[_0x591889(0xfa)]=_0x6a61d5,this[_0x591889(0x136)]=_0x1a4d7b;}async['addComment'](_0x31e614){const _0x86443b=_0x5310d2;var _0x787a83,_0x387fe4;const {parentId:_0x4efba5,unitId:_0x41d9f0,text:_0x55132d,threadId:_0x151086}=_0x31e614,_0x1cf330=(_0x387fe4=(_0x787a83=_0x55132d[_0x86443b(0xd0)])==null?void 0x0:_0x787a83[_0x86443b(0xbb)](_0x5339f1=>_0x5339f1[_0x86443b(0x118)]===_0x420862[_0x86443b(0xbf)][_0x86443b(0xce)])[_0x86443b(0xcf)](_0x43dd0c=>_0x43dd0c[_0x86443b(0x111)]))!=null?_0x387fe4:[],_0x4f7c50=JSON[_0x86443b(0xe5)](_0x55132d),_0x2dec5e=(await this[_0x86443b(0xfa)][_0x86443b(0x142)](_0x41d9f0))[_0x86443b(0xd3)]();if(_0x4efba5){const _0x68892e={'memberId':_0x2dec5e,'unitId':_0x41d9f0,'content':_0x4f7c50,'mention':_0x1cf330,'threadId':_0x151086},_0x2decd3=(await this[_0x86443b(0xe3)][_0x86443b(0x139)](_0x86443b(0x109)+_0x41d9f0+_0x86443b(0x11c),{'body':_0x68892e}))[_0x86443b(0xdd)]['reply'];return{..._0x31e614,'id':_0x2decd3[_0x86443b(0x104)],'dT':_0x420862[_0x86443b(0xea)](+_0x2decd3[_0x86443b(0x101)])['format'](_0x86443b(0x10b)),'personId':_0x2decd3[_0x86443b(0x102)]};}else{const _0x5838fc={'memberId':_0x2dec5e,'unitId':_0x41d9f0,'content':_0x4f7c50,'mention':_0x1cf330},_0x231540=await this['_httpService'][_0x86443b(0x139)]('/universer-api/comment/unit/'+_0x41d9f0+_0x86443b(0x107),{'body':_0x5838fc});return _0x3e7798(_0x231540['body'][_0x86443b(0xc3)],_0x31e614);}}async[_0x5310d2(0x11d)](_0xfc1e5c){const _0x52ed5e=_0x5310d2;var _0x4e5a17,_0x1fe12e;const {text:_0x405523,unitId:_0x4ed17a}=_0xfc1e5c,_0x530572=(_0x1fe12e=(_0x4e5a17=_0x405523[_0x52ed5e(0xd0)])==null?void 0x0:_0x4e5a17['filter'](_0x371e26=>_0x371e26[_0x52ed5e(0x118)]===_0x420862[_0x52ed5e(0xbf)][_0x52ed5e(0xce)])[_0x52ed5e(0xcf)](_0x4eed1b=>_0x4eed1b[_0x52ed5e(0x111)]))!=null?_0x1fe12e:[],_0xc870a8=JSON['stringify'](_0x405523),_0x116774=_0xfc1e5c[_0x52ed5e(0x103)],_0x596ed7=_0xfc1e5c['id'],_0x372de8={'memberId':(await this['_sessionService'][_0x52ed5e(0x142)](_0x4ed17a))[_0x52ed5e(0xd3)](),'unitId':_0x4ed17a,'threadId':_0x116774,'mention':_0x530572,'content':_0xc870a8,'replyId':_0x596ed7},_0x393e9c=await this[_0x52ed5e(0xe3)][_0x52ed5e(0x139)](_0x52ed5e(0x109)+_0x4ed17a+_0x52ed5e(0x108),{'body':_0x372de8});return!_0x393e9c[_0x52ed5e(0xdd)][_0x52ed5e(0xf6)]||_0x393e9c[_0x52ed5e(0xdd)][_0x52ed5e(0xf6)][_0x52ed5e(0xe0)]===0x1;}async[_0x5310d2(0x122)](_0x5692e3){const _0x232853=_0x5310d2,{unitId:_0x1c1b66}=_0x5692e3,_0xbe9f18=_0x5692e3['threadId'],_0x522f11={'memberId':this[_0x232853(0xf9)][_0x232853(0xda)]()[_0x232853(0xbe)],'unitId':_0x1c1b66,'threadId':_0xbe9f18,'solved':_0x5692e3[_0x232853(0x145)]?_0x17afe3[_0x232853(0x13d)]:_0x17afe3[_0x232853(0xf3)]},_0x13f582=await this[_0x232853(0xe3)][_0x232853(0x139)](_0x232853(0x109)+_0x1c1b66+_0x232853(0x13e),{'body':_0x522f11});return!_0x13f582[_0x232853(0xdd)][_0x232853(0xf6)]||_0x13f582['body'][_0x232853(0xf6)][_0x232853(0xe0)]===0x1;}async[_0x5310d2(0xc5)](_0x56bace,_0x4f58d0,_0x1bd3e1,_0x14fa72){const _0x512b61=_0x5310d2,_0x1696a6={'memberId':(await this['_sessionService'][_0x512b61(0x142)](_0x56bace))[_0x512b61(0xd3)](),'threadId':_0x1bd3e1,'replyId':_0x14fa72,'unitId':_0x56bace},_0x40509d=await this[_0x512b61(0xe3)]['post'](_0x512b61(0x109)+_0x56bace+_0x512b61(0xd7),{'body':_0x1696a6});return!_0x40509d['body'][_0x512b61(0xf6)]||_0x40509d[_0x512b61(0xdd)]['error'][_0x512b61(0xe0)]===0x1;}async[_0x5310d2(0xe8)](_0x10e401,_0x5ec516,_0x7764e6){const _0x1b21dc=_0x5310d2,_0x29f989={'unitId':_0x10e401,'threadId':_0x7764e6},_0x30b384=await this[_0x1b21dc(0xe3)][_0x1b21dc(0x139)](_0x1b21dc(0x109)+_0x10e401+_0x1b21dc(0x105),{'body':_0x29f989}),_0xb3fa02=_0x7764e6[_0x1b21dc(0xcf)](_0x24ce3d=>_0x11d5e1(_0x30b384[_0x1b21dc(0xdd)][_0x1b21dc(0xd1)][_0x24ce3d],_0x10e401,_0x5ec516))['filter'](Boolean);return Object['values'](_0x30b384[_0x1b21dc(0xdd)][_0x1b21dc(0x11b)])[_0x1b21dc(0x114)](_0x786440=>{const _0x58e976=_0x1b21dc;this[_0x58e976(0xf9)][_0x58e976(0x11f)](_0x786440);}),_0xb3fa02;}['saveCommentToSnapshot'](_0x55e199){const _0x175a26=_0x5310d2;return{'id':_0x55e199['id'],'threadId':_0x55e199[_0x175a26(0x103)],'ref':_0x55e199[_0x175a26(0xc8)]};}};_0x45da3a=_0x4a0e71([_0x4af0a1(0x0,_0x420862[_0x5310d2(0x144)](_0xbc6973['HTTPService'])),_0x4af0a1(0x1,_0x420862[_0x5310d2(0x144)](_0x420862['UserManagerService'])),_0x4af0a1(0x2,_0x420862[_0x5310d2(0x144)](_0x1522df['CollaborationSessionService'])),_0x4af0a1(0x3,_0x420862[_0x5310d2(0x144)](_0x420862[_0x5310d2(0x131)]))],_0x45da3a);var _0x539f15=Object[_0x5310d2(0x116)],_0x4e2cc8=(_0x4a6f47,_0x48f692,_0x192dc0,_0x1f83b2)=>{const _0x2b2b8b=_0x5310d2;for(var _0x42eb7c=_0x1f83b2>0x1?void 0x0:_0x1f83b2?_0x539f15(_0x48f692,_0x192dc0):_0x48f692,_0x186c19=_0x4a6f47[_0x2b2b8b(0x10c)]-0x1,_0x1f10dd;_0x186c19>=0x0;_0x186c19--)(_0x1f10dd=_0x4a6f47[_0x186c19])&&(_0x42eb7c=_0x1f10dd(_0x42eb7c)||_0x42eb7c);return _0x42eb7c;},_0x4ee8ea=(_0x31b129,_0x5251a5)=>(_0x377a4c,_0x436a38)=>_0x5251a5(_0x377a4c,_0x436a38,_0x31b129);let _0x178f52=class extends _0x420862[_0x5310d2(0xc4)]{constructor(_0x365a1e,_0x3a5335){const _0x47e6ff=_0x5310d2;super(),this[_0x47e6ff(0xc7)]=_0x365a1e,this['_threadCommentDataSource']=_0x3a5335,this['_initDataSource']();}[_0x5310d2(0x132)](){const _0x2ccb11=_0x5310d2;this[_0x2ccb11(0xc7)][_0x2ccb11(0xc0)]=this[_0x2ccb11(0x12f)],this[_0x2ccb11(0xc7)][_0x2ccb11(0xc6)]=!0x1;}};_0x178f52=_0x4e2cc8([_0x4ee8ea(0x0,_0x337128[_0x5310d2(0xde)]),_0x4ee8ea(0x1,_0x420862[_0x5310d2(0x144)](_0x45da3a))],_0x178f52);var _0x114938=Object[_0x5310d2(0x112)],_0x4e5376=Object[_0x5310d2(0x116)],_0x144dc7=(_0x517628,_0x1c05c8,_0x5c8295)=>_0x1c05c8 in _0x517628?_0x114938(_0x517628,_0x1c05c8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5c8295}):_0x517628[_0x1c05c8]=_0x5c8295,_0x23b69a=(_0x1e9cbb,_0x3fc3f4,_0x232b68,_0x1abf4f)=>{const _0x37c575=_0x5310d2;for(var _0x37937b=_0x1abf4f>0x1?void 0x0:_0x1abf4f?_0x4e5376(_0x3fc3f4,_0x232b68):_0x3fc3f4,_0xf37a26=_0x1e9cbb[_0x37c575(0x10c)]-0x1,_0x1a6935;_0xf37a26>=0x0;_0xf37a26--)(_0x1a6935=_0x1e9cbb[_0xf37a26])&&(_0x37937b=_0x1a6935(_0x37937b)||_0x37937b);return _0x37937b;},_0x33f302=(_0x58e78e,_0x161646)=>(_0x30832e,_0xab70de)=>_0x161646(_0x30832e,_0xab70de,_0x58e78e),_0x1f0fa0=(_0x2ba609,_0xf1e61d,_0x2426f4)=>_0x144dc7(_0x2ba609,typeof _0xf1e61d!=_0x5310d2(0x12d)?_0xf1e61d+'':_0xf1e61d,_0x2426f4);_0x2a52e4[_0x5310d2(0x119)]=class extends _0x420862[_0x5310d2(0xcb)]{constructor(_0x329bd6=_0x3be7fa,_0x4a6b9a,_0x5c4e16){const _0x62f0ea=_0x5310d2;super(),this[_0x62f0ea(0xef)]=_0x329bd6,this[_0x62f0ea(0x136)]=_0x4a6b9a,this[_0x62f0ea(0x123)]=_0x5c4e16;const {..._0x20f9a5}=_0x420862[_0x62f0ea(0xf0)]({},_0x3be7fa,this[_0x62f0ea(0xef)]);this['_configService']['setConfig'](_0x1de666,_0x20f9a5);}[_0x5310d2(0x117)](){const _0x321d6e=_0x5310d2;[[_0x45da3a],[_0x178f52],[_0x516b24]][_0x321d6e(0x114)](_0x129291=>{const _0x237c4f=_0x321d6e;this[_0x237c4f(0x136)]['add'](_0x129291);});}[_0x5310d2(0xba)](){const _0x2e2132=_0x5310d2;this['_injector']['get'](_0x178f52),this['_injector'][_0x2e2132(0x143)](_0x516b24);}},_0x1f0fa0(_0x2a52e4['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x1bcd07),_0x1f0fa0(_0x2a52e4[_0x5310d2(0x119)],_0x5310d2(0x138),_0x420862[_0x5310d2(0xd4)][_0x5310d2(0x13b)]),_0x2a52e4[_0x5310d2(0x119)]=_0x23b69a([_0x420862[_0x5310d2(0x12c)](_0x179658[_0x5310d2(0x10f)],_0x1522df[_0x5310d2(0x135)],_0x225c7e[_0x5310d2(0xe1)]),_0x33f302(0x1,_0x420862['Inject'](_0x420862['Injector'])),_0x33f302(0x2,_0x420862['IConfigService'])],_0x2a52e4[_0x5310d2(0x119)]),Object[_0x5310d2(0x112)](_0x2a52e4,Symbol['toStringTag'],{'value':_0x5310d2(0xdb)});}));function _0x28b1(_0x4066a3,_0x13c5dc){const _0x1f1ae7=_0x1f1a();return _0x28b1=function(_0x28b190,_0x3e47e5){_0x28b190=_0x28b190-0xba;let _0x582217=_0x1f1ae7[_0x28b190];return _0x582217;},_0x28b1(_0x4066a3,_0x13c5dc);}function _0x1f1a(){const _0x3537b7=['deleteComment','syncUpdateMutationToColla','_threadCommentDataSourceService','ref','format','Reply','Plugin','716598aFcUEc','57SriLNR','COMMENT','map','customRanges','comments','function','getMemberID','UniverInstanceType','_commentService','rxjs','/delete','41872vROaDt','@univerjs/network','getCurrentUser','Module','thread-comment-data-source.config','body','IThreadCommentDataSourceService','@univerjs-pro/collaboration-client','code','UniverLicensePlugin','Add','_httpService','UniverNetwork','stringify','UniverProLicense','bufferTime','listComments','unitId','dayjs','@univerjs/thread-comment','_threadCommentModel','addComment','@univerjs-pro/license','_config','merge','UserManagerService','object','OpenOrReOpen','ThreadCommentModel','Edit','error','content','root','_userService','_sessionService','20473079luRMfj','_init','10qpHSCU','UniverThreadCommentUi','201908icuUTs','Solve','createTimestamp','userId','threadId','replyId','/list','user','/add','/edit','/universer-api/comment/unit/','payload','YYYY/MM/DD\x20HH:mm','length','solved','Unknown','UniverThreadCommentUIPlugin','CommentService','rangeId','defineProperty','1726980MdvKwi','forEach','161VCSwmo','getOwnPropertyDescriptor','onStarting','rangeType','UniverThreadCommentDataSourcePlugin','size','users','/reply','updateComment','61482OmtqFV','addUser','3992485WCaKaK','Delete','resolveComment','_configService','delete','exports','subscribe','find','UniverThreadComment','UNRECOGNIZED','/universer-api/user/list','parse','DependentOn','symbol','UniverProThreadCommentDatasource','_threadCommentDataSource','getUnit','Injector','_initDataSource','32dnfAuB','amd','UniverCollaborationClientPlugin','_injector','getUser','type','post','commentUpdate$','UNIVER_UNKNOWN','@univerjs/core','Solved','/solved','personId','replies','parentId','requireSession','get','Inject','resolved','onReady','filter','slice','UniverCore','userID','CustomRangeType','dataSource','add','UniverProCollaborationClient','comment','Disposable'];_0x1f1a=function(){return _0x3537b7;};return _0x1f1a();}
1
+ function _0x18cd(){const _0x29ed4d=['content','syncUpdateMutationToColla','error','body','/solved','resolveComment','_threadCommentModel','dayjs','createTimestamp','DependentOn','UNRECOGNIZED','UniverLicensePlugin','_initUserSync','UserManagerService','size','_injector','UniverInstanceType','customRanges','requireSession','getComment','rxjs','@univerjs/core','commentUpdate$','format','reply','139517swleBo','getUser','1432192BkFRJd','_initDataSource','disposeWithMe','type','_commentService','replies','updateComment','payload','UniverThreadCommentDataSourcePlugin','dataSource','thread-comment-data-source.config','UniverProCollaborationClient','getUnit','getMemberID','@univerjs/network','setConfig','userId','code','Unknown','Solve','getOwnPropertyDescriptor','_httpService','/universer-api/user/list','resolved','filter','/add','_configService','pipe','UniverProThreadCommentDatasource','Edit','YYYY/MM/DD\x20HH:mm','_sessionService','get','UNIVER_UNKNOWN','Inject','rangeId','onReady','map','4080213hMDUKk','UniverProLicense','subscribe','IConfigService','length','1415110Unngbj','replyId','stringify','COMMENT','user','ThreadCommentModel','find','/delete','Injector','comments','values','Reply','addUser','IThreadCommentDataSourceService','addComment','comment','saveCommentToSnapshot','Solved','Delete','/universer-api/comment/unit/','parse','Disposable','UniverThreadComment','defineProperty','userID','_init','@univerjs/thread-comment','/reply','onStarting','solved','post','personId','/edit','pluginName','@univerjs-pro/license','Module','add','amd','UniverThreadCommentUIPlugin','3306414KJhkqm','317500wzoKqb','rangeType','_threadCommentDataSourceService','_userService','/list','Add','UniverThreadCommentUi','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','CustomRangeType','root','OpenOrReOpen','3849064uCHQGh','UniverCore','merge','@univerjs-pro/collaboration-client','delete','unitId','_config','users','slice','5QnJwen','CollaborationSessionService','threadId','HTTPService','getCurrentUser','Plugin'];_0x18cd=function(){return _0x29ed4d;};return _0x18cd();}function _0x21bd(_0x19f3be,_0x3d6957){const _0x18cda1=_0x18cd();return _0x21bd=function(_0x21bdc9,_0x50edc7){_0x21bdc9=_0x21bdc9-0x1ee;let _0x359c03=_0x18cda1[_0x21bdc9];return _0x359c03;},_0x21bd(_0x19f3be,_0x3d6957);}(function(_0x40ee5b,_0x1f970e){const _0xf6bea9=_0x21bd,_0x6e6f9=_0x40ee5b();while(!![]){try{const _0x321b40=parseInt(_0xf6bea9(0x264))/0x1+parseInt(_0xf6bea9(0x239))/0x2+-parseInt(_0xf6bea9(0x25f))/0x3+-parseInt(_0xf6bea9(0x204))/0x4+parseInt(_0xf6bea9(0x218))/0x5*(parseInt(_0xf6bea9(0x203))/0x6)+-parseInt(_0xf6bea9(0x237))/0x7+-parseInt(_0xf6bea9(0x20f))/0x8;if(_0x321b40===_0x1f970e)break;else _0x6e6f9['push'](_0x6e6f9['shift']());}catch(_0x5f2dc2){_0x6e6f9['push'](_0x6e6f9['shift']());}}}(_0x18cd,0xb5185),function(_0x2815f9,_0x424347){const _0x5d0b6a=_0x21bd;typeof exports=='object'&&typeof module<'u'?_0x424347(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x5d0b6a(0x201)]?define(['exports',_0x5d0b6a(0x212),_0x5d0b6a(0x1fe),_0x5d0b6a(0x233),'@univerjs/thread-comment-ui',_0x5d0b6a(0x1f6),'rxjs',_0x5d0b6a(0x247)],_0x424347):(_0x2815f9=typeof globalThis<'u'?globalThis:_0x2815f9||self,_0x424347(_0x2815f9[_0x5d0b6a(0x255)]={},_0x2815f9[_0x5d0b6a(0x244)],_0x2815f9[_0x5d0b6a(0x260)],_0x2815f9[_0x5d0b6a(0x210)],_0x2815f9[_0x5d0b6a(0x20a)],_0x2815f9[_0x5d0b6a(0x1f2)],_0x2815f9[_0x5d0b6a(0x232)],_0x2815f9['UniverNetwork']));}(this,function(_0x27515b,_0x52cb44,_0x994417,_0x2f449e,_0x4c01bf,_0xeaa709,_0x1cef5f,_0xdb3e66){'use strict';const _0x2a1f0a=_0x21bd;const _0x3fa4ba=_0x2a1f0a(0x20b);var _0x365e4e=(_0x5e2645=>(_0x5e2645[_0x5e2645[_0x2a1f0a(0x20e)]=0x0]=_0x2a1f0a(0x20e),_0x5e2645[_0x5e2645[_0x2a1f0a(0x275)]=0x1]=_0x2a1f0a(0x275),_0x5e2645[_0x5e2645[_0x2a1f0a(0x228)]=-0x1]=_0x2a1f0a(0x228),_0x5e2645))(_0x365e4e||{}),_0xafc27a=(_0xa9a600=>(_0xa9a600[_0xa9a600[_0x2a1f0a(0x24b)]=0x0]=_0x2a1f0a(0x24b),_0xa9a600[_0xa9a600[_0x2a1f0a(0x209)]=0x1]=_0x2a1f0a(0x209),_0xa9a600[_0xa9a600[_0x2a1f0a(0x26f)]=0x2]=_0x2a1f0a(0x26f),_0xa9a600[_0xa9a600['Edit']=0x3]=_0x2a1f0a(0x256),_0xa9a600[_0xa9a600['Delete']=0x4]='Delete',_0xa9a600[_0xa9a600[_0x2a1f0a(0x24c)]=0x5]=_0x2a1f0a(0x24c),_0xa9a600[_0xa9a600[_0x2a1f0a(0x228)]=-0x1]='UNRECOGNIZED',_0xa9a600))(_0xafc27a||{});const _0x49676d=_0x1cc192=>_0x2f449e[_0x2a1f0a(0x225)](new Date(+_0x1cc192))[_0x2a1f0a(0x235)](_0x2a1f0a(0x257)),_0x1e1fdc=async(_0x30434b,_0x3691db)=>{const _0x315e4f=_0x2a1f0a,_0x3f40be=_0x30434b['get'](_0x2f449e[_0x315e4f(0x22b)]),_0x5efc67=_0x30434b[_0x315e4f(0x259)](_0xdb3e66['HTTPService']);_0x3691db['forEach'](_0x4ba4ed=>{const _0x55138f=_0x315e4f;_0x3f40be[_0x55138f(0x238)](_0x4ba4ed)&&_0x3691db[_0x55138f(0x213)](_0x4ba4ed);}),_0x3691db[_0x315e4f(0x22c)]&&(await _0x5efc67[_0x315e4f(0x259)](_0x315e4f(0x24f),{'params':{'userIDs':[..._0x3691db]}}))[_0x315e4f(0x221)][_0x315e4f(0x216)]['forEach'](_0x1753ed=>{const _0x370b03=_0x315e4f;_0x1753ed&&_0x3f40be[_0x370b03(0x270)](_0x1753ed);});};var _0x1a245e=Object['getOwnPropertyDescriptor'],_0x466507=(_0xb15a4,_0x220c24,_0x505d3a,_0x2c5990)=>{const _0x40c0b4=_0x2a1f0a;for(var _0x16d92d=_0x2c5990>0x1?void 0x0:_0x2c5990?_0x1a245e(_0x220c24,_0x505d3a):_0x220c24,_0x302937=_0xb15a4[_0x40c0b4(0x263)]-0x1,_0x1a5339;_0x302937>=0x0;_0x302937--)(_0x1a5339=_0xb15a4[_0x302937])&&(_0x16d92d=_0x1a5339(_0x16d92d)||_0x16d92d);return _0x16d92d;},_0x2e3d12=(_0x4ca03e,_0x2d4a88)=>(_0x3aa91c,_0x11339f)=>_0x2d4a88(_0x3aa91c,_0x11339f,_0x4ca03e);let _0x5a1ff1=class extends _0x2f449e[_0x2a1f0a(0x1f1)]{constructor(_0x3aa9eb,_0x152794,_0x5bdd04,_0x5ebe0a){const _0x5a7fa9=_0x2a1f0a;super(),this[_0x5a7fa9(0x23d)]=_0x3aa9eb,this[_0x5a7fa9(0x224)]=_0x152794,this[_0x5a7fa9(0x207)]=_0x5bdd04,this[_0x5a7fa9(0x22d)]=_0x5ebe0a,this[_0x5a7fa9(0x1f5)](),this[_0x5a7fa9(0x22a)]();}[_0x2a1f0a(0x22a)](){const _0x6cd00b=_0x2a1f0a;this[_0x6cd00b(0x23b)](this[_0x6cd00b(0x224)][_0x6cd00b(0x234)][_0x6cd00b(0x254)](_0x1cef5f['bufferTime'](0x10))[_0x6cd00b(0x261)](_0x520fac=>{const _0x5ef5a1=_0x6cd00b,_0x4f6a9d=new Set();_0x520fac['forEach'](_0x2e4636=>{const _0x22dd45=_0x21bd;switch(_0x2e4636[_0x22dd45(0x23c)]){case _0x22dd45(0x200):{const _0x36ac42=_0x2e4636[_0x22dd45(0x240)][_0x22dd45(0x1fb)];_0x4f6a9d[_0x22dd45(0x200)](_0x36ac42);break;}}}),_0x1e1fdc(this[_0x5ef5a1(0x22d)],_0x4f6a9d);}));}[_0x2a1f0a(0x1f5)](){const _0x5698d4=_0x2a1f0a;this[_0x5698d4(0x23b)](this[_0x5698d4(0x23d)][_0x5698d4(0x234)]['subscribe'](async _0x54be78=>{const _0x32bf65=_0x5698d4;var _0x582849,_0x3f8879,_0x564ef1,_0x5449a4;const _0x4596d2=(_0x582849=this[_0x32bf65(0x224)][_0x32bf65(0x245)](_0x54be78[_0x32bf65(0x214)])['find'](_0x413f60=>_0x413f60[_0x32bf65(0x21a)]===_0x54be78[_0x32bf65(0x21a)]))==null?void 0x0:_0x582849[_0x32bf65(0x20d)];if(!_0x4596d2)return;const {unitId:_0x1e3187,subUnitId:_0x3f96cb}=_0x4596d2;switch(_0x54be78['user']&&this['_userService'][_0x32bf65(0x270)](_0x54be78['user']),_0x54be78[_0x32bf65(0x23c)]){case _0xafc27a[_0x32bf65(0x209)]:break;case _0xafc27a['Reply']:{this[_0x32bf65(0x224)][_0x32bf65(0x272)](_0x1e3187,_0x3f96cb,{'unitId':_0x1e3187,'subUnitId':_0x3f96cb,'ref':'','id':_0x54be78[_0x32bf65(0x265)],'dT':_0x49676d(+_0x54be78['createTimestamp']),'threadId':_0x54be78[_0x32bf65(0x21a)],'personId':(_0x564ef1=(_0x3f8879=_0x54be78[_0x32bf65(0x268)])==null?void 0x0:_0x3f8879['userID'])!=null?_0x564ef1:_0x54be78[_0x32bf65(0x249)],'text':JSON[_0x32bf65(0x1f0)](_0x54be78['content']),'parentId':_0x4596d2['id']});break;}case _0xafc27a[_0x32bf65(0x1ee)]:{const _0xafd251=this[_0x32bf65(0x224)][_0x32bf65(0x231)](_0x1e3187,_0x3f96cb,_0x54be78[_0x32bf65(0x265)]);_0xafd251&&_0xafd251['parentId']&&this[_0x32bf65(0x224)]['deleteComment'](_0x1e3187,_0x3f96cb,_0x54be78[_0x32bf65(0x265)]);break;}case _0xafc27a[_0x32bf65(0x256)]:{this[_0x32bf65(0x224)]['updateComment'](_0x1e3187,_0x3f96cb,{'commentId':_0x54be78[_0x32bf65(0x265)],'text':JSON[_0x32bf65(0x1f0)](_0x54be78[_0x32bf65(0x21e)])});break;}case _0xafc27a[_0x32bf65(0x24c)]:{const _0x4203f4=(_0x5449a4=this['_threadCommentModel'][_0x32bf65(0x245)](_0x54be78[_0x32bf65(0x214)])[_0x32bf65(0x26a)](_0x29d03b=>_0x29d03b[_0x32bf65(0x21a)]===_0x54be78['threadId']))==null?void 0x0:_0x5449a4[_0x32bf65(0x20d)];_0x4203f4&&this[_0x32bf65(0x224)][_0x32bf65(0x223)](_0x1e3187,_0x3f96cb,_0x4203f4['id'],_0x54be78[_0x32bf65(0x1f9)]===_0x365e4e[_0x32bf65(0x275)]);break;}}}));}};_0x5a1ff1=_0x466507([_0x2e3d12(0x0,_0x2f449e[_0x2a1f0a(0x25b)](_0x52cb44['CommentService'])),_0x2e3d12(0x1,_0x2f449e[_0x2a1f0a(0x25b)](_0xeaa709[_0x2a1f0a(0x269)])),_0x2e3d12(0x2,_0x2f449e[_0x2a1f0a(0x25b)](_0x2f449e[_0x2a1f0a(0x22b)])),_0x2e3d12(0x3,_0x2f449e[_0x2a1f0a(0x25b)](_0x2f449e[_0x2a1f0a(0x26c)]))],_0x5a1ff1);const _0x130cb8=_0x2a1f0a(0x243),_0x3e0813={};var _0x4b2d51=Object[_0x2a1f0a(0x24d)],_0x3a023b=(_0x2f54bd,_0x34dc13,_0x26f52c,_0x29e742)=>{const _0x271c1c=_0x2a1f0a;for(var _0x520512=_0x29e742>0x1?void 0x0:_0x29e742?_0x4b2d51(_0x34dc13,_0x26f52c):_0x34dc13,_0x43dba7=_0x2f54bd[_0x271c1c(0x263)]-0x1,_0x3453f2;_0x43dba7>=0x0;_0x43dba7--)(_0x3453f2=_0x2f54bd[_0x43dba7])&&(_0x520512=_0x3453f2(_0x520512)||_0x520512);return _0x520512;},_0xf9f6f1=(_0x15d460,_0x48fe94)=>(_0x590267,_0x4b7f00)=>_0x48fe94(_0x590267,_0x4b7f00,_0x15d460);function _0xac99f6(_0x12b9a7,_0x5e27c2){const _0x4651e1=_0x2a1f0a,_0x416b3c=_0x12b9a7[_0x4651e1(0x23e)][0x0];return{..._0x5e27c2,'id':_0x416b3c['replyId'],'resolved':_0x12b9a7[_0x4651e1(0x1f9)]===0x1,'dT':_0x49676d(_0x416b3c[_0x4651e1(0x226)]),'personId':_0x416b3c[_0x4651e1(0x249)],'threadId':_0x416b3c[_0x4651e1(0x21a)]};}function _0x464fed(_0x11b343,_0x59542f,_0x1d9f8f){const _0x2f3f28=_0x2a1f0a;var _0x15f4d3,_0x549280;if(((_0x549280=(_0x15f4d3=_0x11b343==null?void 0x0:_0x11b343[_0x2f3f28(0x23e)])==null?void 0x0:_0x15f4d3[_0x2f3f28(0x263)])!=null?_0x549280:0x0)>0x0){const _0x41e44c=(_0x28f6b9,_0x32029b)=>({'id':_0x28f6b9['replyId'],'threadId':_0x28f6b9[_0x2f3f28(0x21a)],'dT':_0x49676d(_0x28f6b9[_0x2f3f28(0x226)]),'personId':_0x28f6b9[_0x2f3f28(0x249)],'resolved':_0x11b343[_0x2f3f28(0x1f9)]===_0x365e4e[_0x2f3f28(0x275)],'unitId':_0x59542f,'subUnitId':_0x1d9f8f,'text':JSON[_0x2f3f28(0x1f0)](_0x28f6b9['content']),'parentId':_0x32029b}),_0x1067e6=_0x41e44c(_0x11b343[_0x2f3f28(0x23e)][0x0]);return{..._0x1067e6,'children':_0x11b343[_0x2f3f28(0x23e)][_0x2f3f28(0x217)](0x1)[_0x2f3f28(0x25e)](_0x165b5c=>_0x41e44c(_0x165b5c,_0x1067e6['id']))};}return null;}let _0x4908a6=class{constructor(_0x7011ad,_0x457677,_0x16198f){const _0x3c2695=_0x2a1f0a;this[_0x3c2695(0x24e)]=_0x7011ad,this[_0x3c2695(0x207)]=_0x457677,this[_0x3c2695(0x258)]=_0x16198f;}async[_0x2a1f0a(0x272)](_0x533311){const _0x54d2e9=_0x2a1f0a;var _0x12a1c8,_0x4b2aab;const {parentId:_0x58c4b,unitId:_0xc1f2e7,text:_0x50e023,threadId:_0x5d628d}=_0x533311,_0x216e72=(_0x4b2aab=(_0x12a1c8=_0x50e023[_0x54d2e9(0x22f)])==null?void 0x0:_0x12a1c8[_0x54d2e9(0x251)](_0x166d4f=>_0x166d4f['rangeType']===_0x2f449e[_0x54d2e9(0x20c)][_0x54d2e9(0x267)])[_0x54d2e9(0x25e)](_0x2ef3d6=>_0x2ef3d6[_0x54d2e9(0x25c)]))!=null?_0x4b2aab:[],_0xec6452=JSON[_0x54d2e9(0x266)](_0x50e023),_0x2cb12d=(await this[_0x54d2e9(0x258)][_0x54d2e9(0x230)](_0xc1f2e7))['getMemberID']();if(_0x58c4b){const _0x104a4a={'memberId':_0x2cb12d,'unitId':_0xc1f2e7,'content':_0xec6452,'mention':_0x216e72,'threadId':_0x5d628d},_0x23c721=(await this['_httpService'][_0x54d2e9(0x1fa)](_0x54d2e9(0x1ef)+_0xc1f2e7+_0x54d2e9(0x1f7),{'body':_0x104a4a}))[_0x54d2e9(0x221)][_0x54d2e9(0x236)];return{..._0x533311,'id':_0x23c721[_0x54d2e9(0x265)],'dT':_0x2f449e[_0x54d2e9(0x225)](+_0x23c721[_0x54d2e9(0x226)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x23c721[_0x54d2e9(0x249)]};}else{const _0x461de2={'memberId':_0x2cb12d,'unitId':_0xc1f2e7,'content':_0xec6452,'mention':_0x216e72},_0x7670f=await this[_0x54d2e9(0x24e)]['post']('/universer-api/comment/unit/'+_0xc1f2e7+_0x54d2e9(0x252),{'body':_0x461de2});return _0xac99f6(_0x7670f[_0x54d2e9(0x221)][_0x54d2e9(0x273)],_0x533311);}}async[_0x2a1f0a(0x23f)](_0x5069c4){const _0x14c96f=_0x2a1f0a;var _0x272ddb,_0x37c6b5;const {text:_0x3488c9,unitId:_0x1ed827}=_0x5069c4,_0x59d158=(_0x37c6b5=(_0x272ddb=_0x3488c9[_0x14c96f(0x22f)])==null?void 0x0:_0x272ddb['filter'](_0x41528b=>_0x41528b[_0x14c96f(0x205)]===_0x2f449e[_0x14c96f(0x20c)][_0x14c96f(0x267)])['map'](_0x37b03e=>_0x37b03e[_0x14c96f(0x25c)]))!=null?_0x37c6b5:[],_0x159bdc=JSON[_0x14c96f(0x266)](_0x3488c9),_0x1dc6ff=_0x5069c4[_0x14c96f(0x21a)],_0x30b668=_0x5069c4['id'],_0x3df81b={'memberId':(await this['_sessionService']['requireSession'](_0x1ed827))[_0x14c96f(0x246)](),'unitId':_0x1ed827,'threadId':_0x1dc6ff,'mention':_0x59d158,'content':_0x159bdc,'replyId':_0x30b668},_0x3ddfa6=await this[_0x14c96f(0x24e)][_0x14c96f(0x1fa)](_0x14c96f(0x1ef)+_0x1ed827+_0x14c96f(0x1fc),{'body':_0x3df81b});return!_0x3ddfa6[_0x14c96f(0x221)][_0x14c96f(0x220)]||_0x3ddfa6[_0x14c96f(0x221)][_0x14c96f(0x220)]['code']===0x1;}async['resolveComment'](_0x1c13e0){const _0x5bc950=_0x2a1f0a,{unitId:_0x463c95}=_0x1c13e0,_0x392c86=_0x1c13e0[_0x5bc950(0x21a)],_0x5550de={'memberId':this[_0x5bc950(0x207)][_0x5bc950(0x21c)]()[_0x5bc950(0x1f4)],'unitId':_0x463c95,'threadId':_0x392c86,'solved':_0x1c13e0[_0x5bc950(0x250)]?_0x365e4e[_0x5bc950(0x275)]:_0x365e4e[_0x5bc950(0x20e)]},_0x2f11bc=await this[_0x5bc950(0x24e)][_0x5bc950(0x1fa)]('/universer-api/comment/unit/'+_0x463c95+_0x5bc950(0x222),{'body':_0x5550de});return!_0x2f11bc[_0x5bc950(0x221)][_0x5bc950(0x220)]||_0x2f11bc[_0x5bc950(0x221)][_0x5bc950(0x220)][_0x5bc950(0x24a)]===0x1;}async['deleteComment'](_0x47fb6e,_0x482798,_0x365873,_0x1ad033){const _0x41e14c=_0x2a1f0a,_0x14f13b={'memberId':(await this['_sessionService'][_0x41e14c(0x230)](_0x47fb6e))['getMemberID'](),'threadId':_0x365873,'replyId':_0x1ad033,'unitId':_0x47fb6e},_0x1b882b=await this[_0x41e14c(0x24e)][_0x41e14c(0x1fa)](_0x41e14c(0x1ef)+_0x47fb6e+_0x41e14c(0x26b),{'body':_0x14f13b});return!_0x1b882b['body']['error']||_0x1b882b['body']['error'][_0x41e14c(0x24a)]===0x1;}async['listComments'](_0x24226d,_0x252860,_0x4226aa){const _0x3dc007=_0x2a1f0a,_0x4ff5ab={'unitId':_0x24226d,'threadId':_0x4226aa},_0x50d308=await this[_0x3dc007(0x24e)][_0x3dc007(0x1fa)]('/universer-api/comment/unit/'+_0x24226d+_0x3dc007(0x208),{'body':_0x4ff5ab}),_0x4fe9ed=_0x4226aa['map'](_0x3d3a15=>_0x464fed(_0x50d308['body'][_0x3dc007(0x26d)][_0x3d3a15],_0x24226d,_0x252860))[_0x3dc007(0x251)](Boolean);return Object[_0x3dc007(0x26e)](_0x50d308['body'][_0x3dc007(0x216)])['forEach'](_0x2bcc96=>{const _0x182266=_0x3dc007;this[_0x182266(0x207)][_0x182266(0x270)](_0x2bcc96);}),_0x4fe9ed;}[_0x2a1f0a(0x274)](_0x22a6cd){const _0x2b7e0b=_0x2a1f0a;return{'id':_0x22a6cd['id'],'threadId':_0x22a6cd[_0x2b7e0b(0x21a)],'ref':_0x22a6cd['ref']};}};_0x4908a6=_0x3a023b([_0xf9f6f1(0x0,_0x2f449e[_0x2a1f0a(0x25b)](_0xdb3e66[_0x2a1f0a(0x21b)])),_0xf9f6f1(0x1,_0x2f449e[_0x2a1f0a(0x25b)](_0x2f449e[_0x2a1f0a(0x22b)])),_0xf9f6f1(0x2,_0x2f449e[_0x2a1f0a(0x25b)](_0x52cb44[_0x2a1f0a(0x219)]))],_0x4908a6);var _0x100e17=Object['getOwnPropertyDescriptor'],_0x4e5a0a=(_0x1ccba6,_0x467d0f,_0x5771f4,_0x2b2249)=>{const _0x13d0e4=_0x2a1f0a;for(var _0x171cd2=_0x2b2249>0x1?void 0x0:_0x2b2249?_0x100e17(_0x467d0f,_0x5771f4):_0x467d0f,_0x3753ac=_0x1ccba6[_0x13d0e4(0x263)]-0x1,_0x5899eb;_0x3753ac>=0x0;_0x3753ac--)(_0x5899eb=_0x1ccba6[_0x3753ac])&&(_0x171cd2=_0x5899eb(_0x171cd2)||_0x171cd2);return _0x171cd2;},_0x39eb33=(_0x36b5e5,_0xf83182)=>(_0xdd770,_0x19cc7d)=>_0xf83182(_0xdd770,_0x19cc7d,_0x36b5e5);let _0x1c935f=class extends _0x2f449e[_0x2a1f0a(0x1f1)]{constructor(_0x155142,_0x29f31d){const _0x44d033=_0x2a1f0a;super(),this[_0x44d033(0x206)]=_0x155142,this['_threadCommentDataSource']=_0x29f31d,this['_initDataSource']();}[_0x2a1f0a(0x23a)](){const _0x184c3b=_0x2a1f0a;this[_0x184c3b(0x206)][_0x184c3b(0x242)]=this['_threadCommentDataSource'],this[_0x184c3b(0x206)][_0x184c3b(0x21f)]=!0x1;}};_0x1c935f=_0x4e5a0a([_0x39eb33(0x0,_0xeaa709[_0x2a1f0a(0x271)]),_0x39eb33(0x1,_0x2f449e[_0x2a1f0a(0x25b)](_0x4908a6))],_0x1c935f);var _0x19103d=Object[_0x2a1f0a(0x1f3)],_0x303029=Object[_0x2a1f0a(0x24d)],_0x1371d1=(_0x4c744d,_0x177277,_0x549094)=>_0x177277 in _0x4c744d?_0x19103d(_0x4c744d,_0x177277,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x549094}):_0x4c744d[_0x177277]=_0x549094,_0x5f5b5b=(_0x328712,_0x1841c8,_0x5694cb,_0x27c115)=>{const _0x3d22f9=_0x2a1f0a;for(var _0x2a3a3c=_0x27c115>0x1?void 0x0:_0x27c115?_0x303029(_0x1841c8,_0x5694cb):_0x1841c8,_0x2a6807=_0x328712[_0x3d22f9(0x263)]-0x1,_0x2f952f;_0x2a6807>=0x0;_0x2a6807--)(_0x2f952f=_0x328712[_0x2a6807])&&(_0x2a3a3c=_0x2f952f(_0x2a3a3c)||_0x2a3a3c);return _0x2a3a3c;},_0x1946cc=(_0x34e0ab,_0x2a775a)=>(_0x214b05,_0x26af21)=>_0x2a775a(_0x214b05,_0x26af21,_0x34e0ab),_0x4a6d5d=(_0x6b57a4,_0x6890c,_0x413b37)=>_0x1371d1(_0x6b57a4,typeof _0x6890c!='symbol'?_0x6890c+'':_0x6890c,_0x413b37);_0x27515b['UniverThreadCommentDataSourcePlugin']=class extends _0x2f449e[_0x2a1f0a(0x21d)]{constructor(_0x59eb5c=_0x3e0813,_0x5b9acd,_0x680156){const _0x224e34=_0x2a1f0a;super(),this[_0x224e34(0x215)]=_0x59eb5c,this[_0x224e34(0x22d)]=_0x5b9acd,this[_0x224e34(0x253)]=_0x680156;const {..._0x33998a}=_0x2f449e[_0x224e34(0x211)]({},_0x3e0813,this[_0x224e34(0x215)]);this[_0x224e34(0x253)][_0x224e34(0x248)](_0x130cb8,_0x33998a);}[_0x2a1f0a(0x1f8)](){[[_0x4908a6],[_0x1c935f],[_0x5a1ff1]]['forEach'](_0x2eddb3=>{const _0x2b9224=_0x21bd;this[_0x2b9224(0x22d)][_0x2b9224(0x200)](_0x2eddb3);});}[_0x2a1f0a(0x25d)](){const _0x536bf1=_0x2a1f0a;this[_0x536bf1(0x22d)][_0x536bf1(0x259)](_0x1c935f),this[_0x536bf1(0x22d)]['get'](_0x5a1ff1);}},_0x4a6d5d(_0x27515b['UniverThreadCommentDataSourcePlugin'],_0x2a1f0a(0x1fd),_0x3fa4ba),_0x4a6d5d(_0x27515b[_0x2a1f0a(0x241)],_0x2a1f0a(0x23c),_0x2f449e[_0x2a1f0a(0x22e)][_0x2a1f0a(0x25a)]),_0x27515b[_0x2a1f0a(0x241)]=_0x5f5b5b([_0x2f449e[_0x2a1f0a(0x227)](_0x4c01bf[_0x2a1f0a(0x202)],_0x52cb44['UniverCollaborationClientPlugin'],_0x994417[_0x2a1f0a(0x229)]),_0x1946cc(0x1,_0x2f449e[_0x2a1f0a(0x25b)](_0x2f449e[_0x2a1f0a(0x26c)])),_0x1946cc(0x2,_0x2f449e[_0x2a1f0a(0x262)])],_0x27515b['UniverThreadCommentDataSourcePlugin']),Object[_0x2a1f0a(0x1f3)](_0x27515b,Symbol['toStringTag'],{'value':_0x2a1f0a(0x1ff)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.9.3-nightly.202507250819",
3
+ "version": "0.9.4-nightly.202507290713",
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.9.3-nightly.202507250819",
49
- "@univerjs-pro/license": "0.9.3-nightly.202507250819",
50
- "@univerjs/core": "0.9.3-nightly.202507250819",
48
+ "@univerjs-pro/collaboration-client": "0.9.4-nightly.202507290713",
49
+ "@univerjs-pro/license": "0.9.4-nightly.202507290713",
50
+ "@univerjs/core": "0.9.4-nightly.202507290713",
51
+ "@univerjs/network": "0.9.4-nightly.202507290713",
51
52
  "@univerjs/protocol": "0.1.47-alpha.0",
52
- "@univerjs/thread-comment": "0.9.3-nightly.202507250819",
53
- "@univerjs/network": "0.9.3-nightly.202507250819",
54
- "@univerjs/thread-comment-ui": "0.9.3-nightly.202507250819"
53
+ "@univerjs/thread-comment": "0.9.4-nightly.202507290713",
54
+ "@univerjs/thread-comment-ui": "0.9.4-nightly.202507290713"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.8.3",
59
- "vite": "^7.0.5",
59
+ "vite": "^7.0.6",
60
60
  "vitest": "^3.2.4",
61
- "@univerjs-infra/shared": "0.9.3"
61
+ "@univerjs-infra/shared": "0.9.4"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",