@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202505211607 → 0.7.0-nightly.202505221607

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';const _0x185786=_0x1c77;(function(_0x27c8b4,_0x392682){const _0x55c993=_0x1c77,_0x5f3700=_0x27c8b4();while(!![]){try{const _0x2223c6=parseInt(_0x55c993(0x114))/0x1+parseInt(_0x55c993(0xd1))/0x2+-parseInt(_0x55c993(0x113))/0x3+parseInt(_0x55c993(0x101))/0x4*(parseInt(_0x55c993(0x10e))/0x5)+parseInt(_0x55c993(0xd9))/0x6+parseInt(_0x55c993(0xeb))/0x7*(parseInt(_0x55c993(0xd0))/0x8)+-parseInt(_0x55c993(0xac))/0x9;if(_0x2223c6===_0x392682)break;else _0x5f3700['push'](_0x5f3700['shift']());}catch(_0x9aac6f){_0x5f3700['push'](_0x5f3700['shift']());}}}(_0x3afe,0x82ecd));Object['defineProperty'](exports,Symbol[_0x185786(0xe3)],{'value':_0x185786(0x123)});const b=require(_0x185786(0xb0)),T=require(_0x185786(0xe0)),c=require(_0x185786(0xd2)),j=require(_0x185786(0xc4)),M=require(_0x185786(0xfc)),w=require(_0x185786(0x116)),P=require(_0x185786(0x105)),U=_0x185786(0xcb);var I=(_0x37e24f=>(_0x37e24f[_0x37e24f['OpenOrReOpen']=0x0]=_0x185786(0x12c),_0x37e24f[_0x37e24f[_0x185786(0x10c)]=0x1]=_0x185786(0x10c),_0x37e24f[_0x37e24f['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x37e24f))(I||{}),v=(_0x2f387c=>(_0x2f387c[_0x2f387c[_0x185786(0xec)]=0x0]=_0x185786(0xec),_0x2f387c[_0x2f387c[_0x185786(0xbb)]=0x1]=_0x185786(0xbb),_0x2f387c[_0x2f387c[_0x185786(0x11d)]=0x2]=_0x185786(0x11d),_0x2f387c[_0x2f387c[_0x185786(0x110)]=0x3]='Edit',_0x2f387c[_0x2f387c[_0x185786(0xf2)]=0x4]=_0x185786(0xf2),_0x2f387c[_0x2f387c[_0x185786(0x12d)]=0x5]=_0x185786(0x12d),_0x2f387c[_0x2f387c['UNRECOGNIZED']=-0x1]=_0x185786(0xbe),_0x2f387c))(v||{});const f=_0x3a99ea=>c['dayjs'](new Date(+_0x3a99ea))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x584867,_0x3d4029)=>{const _0x35927c=_0x185786,_0x5e4a48=_0x584867[_0x35927c(0xb5)](c['UserManagerService']),_0x4d14b0=_0x584867['get'](P[_0x35927c(0xdc)]);_0x3d4029[_0x35927c(0xc6)](_0x1c7400=>{_0x5e4a48['getUser'](_0x1c7400)&&_0x3d4029['delete'](_0x1c7400);}),_0x3d4029[_0x35927c(0xcf)]&&(await _0x4d14b0[_0x35927c(0xb5)](_0x35927c(0xfa),{'params':{'userIDs':[..._0x3d4029]}}))[_0x35927c(0xb9)][_0x35927c(0x121)][_0x35927c(0xc6)](_0xbc121c=>{_0xbc121c&&_0x5e4a48['addUser'](_0xbc121c);});};var $=Object[_0x185786(0x12a)],E=(_0x9c796c,_0x150f39,_0x4935bf,_0x53204e)=>{const _0x4d5cb2=_0x185786;for(var _0xcd5b09=_0x53204e>0x1?void 0x0:_0x53204e?$(_0x150f39,_0x4935bf):_0x150f39,_0x51b3f5=_0x9c796c[_0x4d5cb2(0xff)]-0x1,_0x144258;_0x51b3f5>=0x0;_0x51b3f5--)(_0x144258=_0x9c796c[_0x51b3f5])&&(_0xcd5b09=_0x144258(_0xcd5b09)||_0xcd5b09);return _0xcd5b09;},S=(_0x4b2d86,_0x3485d1)=>(_0x2cc7fa,_0x500f44)=>_0x3485d1(_0x2cc7fa,_0x500f44,_0x4b2d86);function _0x1c77(_0xfb790d,_0x2babe0){const _0x3afe44=_0x3afe();return _0x1c77=function(_0x1c77bc,_0x52ea33){_0x1c77bc=_0x1c77bc-0xac;let _0x4e1e9b=_0x3afe44[_0x1c77bc];return _0x4e1e9b;},_0x1c77(_0xfb790d,_0x2babe0);}let p=class extends c[_0x185786(0xd8)]{constructor(_0x2eb56e,_0x378665,_0x16636a,_0x3e114e){const _0x3e3a0e=_0x185786;super(),this[_0x3e3a0e(0xf3)]=_0x2eb56e,this['_threadCommentModel']=_0x378665,this[_0x3e3a0e(0xe7)]=_0x16636a,this[_0x3e3a0e(0x103)]=_0x3e114e,this[_0x3e3a0e(0xea)](),this['_initUserSync']();}[_0x185786(0xfd)](){const _0x5e1c12=_0x185786;this[_0x5e1c12(0xda)](this[_0x5e1c12(0xd3)]['commentUpdate$'][_0x5e1c12(0xf5)](w['bufferTime'](0x10))['subscribe'](_0xa04470=>{const _0x594855=_0x5e1c12,_0x4bcb44=new Set();_0xa04470[_0x594855(0xc6)](_0x4d966e=>{const _0x3c1338=_0x594855;switch(_0x4d966e['type']){case'add':{const _0x17a271=_0x4d966e[_0x3c1338(0x10f)][_0x3c1338(0xef)];_0x4bcb44[_0x3c1338(0xf6)](_0x17a271);break;}}}),R(this['_injector'],_0x4bcb44);}));}[_0x185786(0xea)](){const _0x68a622=_0x185786;this['disposeWithMe'](this[_0x68a622(0xf3)][_0x68a622(0x118)]['subscribe'](async _0x312f24=>{const _0x121103=_0x68a622;var _0xc1617d,_0x1b7407,_0x19d429,_0x4e3f19;const _0x22760d=(_0xc1617d=this[_0x121103(0xd3)][_0x121103(0x10b)](_0x312f24[_0x121103(0x129)])['find'](_0x2376f8=>_0x2376f8[_0x121103(0x107)]===_0x312f24[_0x121103(0x107)]))==null?void 0x0:_0xc1617d['root'];if(!_0x22760d)return;const {unitId:_0x33aaa6,subUnitId:_0x4185a0}=_0x22760d;switch(_0x312f24['user']&&this['_userService'][_0x121103(0xce)](_0x312f24[_0x121103(0x11e)]),_0x312f24[_0x121103(0xb7)]){case v[_0x121103(0xbb)]:break;case v[_0x121103(0x11d)]:{this['_threadCommentModel']['addComment'](_0x33aaa6,_0x4185a0,{'unitId':_0x33aaa6,'subUnitId':_0x4185a0,'ref':'','id':_0x312f24[_0x121103(0xad)],'dT':f(+_0x312f24[_0x121103(0x115)]),'threadId':_0x312f24[_0x121103(0x107)],'personId':(_0x19d429=(_0x1b7407=_0x312f24['user'])==null?void 0x0:_0x1b7407['userID'])!=null?_0x19d429:_0x312f24[_0x121103(0xd6)],'text':JSON[_0x121103(0x127)](_0x312f24[_0x121103(0xed)]),'parentId':_0x22760d['id']});break;}case v['Delete']:{const _0x384cd7=this[_0x121103(0xd3)][_0x121103(0xc0)](_0x33aaa6,_0x4185a0,_0x312f24[_0x121103(0xad)]);_0x384cd7&&_0x384cd7[_0x121103(0xe1)]&&this[_0x121103(0xd3)][_0x121103(0x100)](_0x33aaa6,_0x4185a0,_0x312f24[_0x121103(0xad)]);break;}case v['Edit']:{this[_0x121103(0xd3)][_0x121103(0xc1)](_0x33aaa6,_0x4185a0,{'commentId':_0x312f24[_0x121103(0xad)],'text':JSON[_0x121103(0x127)](_0x312f24[_0x121103(0xed)])});break;}case v['Solve']:{const _0x2706f7=(_0x4e3f19=this[_0x121103(0xd3)]['getUnit'](_0x312f24[_0x121103(0x129)])[_0x121103(0xe6)](_0x447ff5=>_0x447ff5['threadId']===_0x312f24[_0x121103(0x107)]))==null?void 0x0:_0x4e3f19['root'];_0x2706f7&&this['_threadCommentModel'][_0x121103(0xfe)](_0x33aaa6,_0x4185a0,_0x2706f7['id'],_0x312f24[_0x121103(0x11a)]===I[_0x121103(0x10c)]);break;}}}));}};p=E([S(0x0,c[_0x185786(0xdd)](b[_0x185786(0xb1)])),S(0x1,c[_0x185786(0xdd)](M[_0x185786(0xc5)])),S(0x2,c[_0x185786(0xdd)](c[_0x185786(0x112)])),S(0x3,c[_0x185786(0xdd)](c[_0x185786(0x126)]))],p);const q=_0x185786(0xca),D={};var A=Object[_0x185786(0x12a)],x=(_0x5c4228,_0x5f109a,_0x35ec06,_0xc8e052)=>{const _0xf5d67=_0x185786;for(var _0x126837=_0xc8e052>0x1?void 0x0:_0xc8e052?A(_0x5f109a,_0x35ec06):_0x5f109a,_0x594ded=_0x5c4228[_0xf5d67(0xff)]-0x1,_0x69e28;_0x594ded>=0x0;_0x594ded--)(_0x69e28=_0x5c4228[_0x594ded])&&(_0x126837=_0x69e28(_0x126837)||_0x126837);return _0x126837;},_=(_0x3029aa,_0x52ca05)=>(_0x5c8d48,_0x118768)=>_0x52ca05(_0x5c8d48,_0x118768,_0x3029aa);function _0x3afe(){const _0x17030d=['/reply','@univerjs-pro/collaboration-client','CommentService','stringify','/list','slice','get','onStarting','type','dayjs','body','/delete','Add','_httpService','post','UNRECOGNIZED','/edit','getComment','updateComment','syncUpdateMutationToColla','getCurrentUser','@univerjs/thread-comment-ui','ThreadCommentModel','forEach','IConfigService','/add','comment','thread-comment-data-source.config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','pluginName','_configService','addUser','size','8xMGSoS','285488vqhNQd','@univerjs/core','_threadCommentModel','rangeType','userID','userId','map','Disposable','5097318wTVYTU','disposeWithMe','UniverCollaborationClientPlugin','HTTPService','Inject','_threadCommentDataSource','replies','@univerjs-pro/license','parentId','saveCommentToSnapshot','toStringTag','symbol','defineProperty','find','_userService','COMMENT','UniverThreadCommentDataSourcePlugin','_init','6316506uqIqwG','Unknown','content','CustomRangeType','personId','_threadCommentDataSourceService','values','Delete','_commentService','comments','pipe','add','IThreadCommentDataSourceService','ref','Plugin','/universer-api/user/list','/solved','@univerjs/thread-comment','_initUserSync','resolveComment','length','deleteComment','3521508obMvSr','format','_injector','requireSession','@univerjs/network','UniverThreadCommentUIPlugin','threadId','_config','error','filter','getUnit','Solved','getMemberID','5KKkRjd','payload','Edit','/universer-api/comment/unit/','UserManagerService','719355OliJbJ','884757ebfrWd','createTimestamp','rxjs','rangeId','commentUpdate$','CollaborationSessionService','solved','_initDataSource','merge','Reply','user','UniverInstanceType','code','users','dataSource','Module','UNIVER_UNKNOWN','reply','Injector','parse','resolved','unitId','getOwnPropertyDescriptor','customRanges','OpenOrReOpen','Solve','onReady','25953615qvdIYH','replyId','_sessionService'];_0x3afe=function(){return _0x17030d;};return _0x3afe();}function Y(_0x1ffe22,_0xbb6780){const _0xe6e119=_0x185786,_0x46f0f5=_0x1ffe22[_0xe6e119(0xdf)][0x0];return{..._0xbb6780,'id':_0x46f0f5[_0xe6e119(0xad)],'resolved':_0x1ffe22[_0xe6e119(0x11a)]===0x1,'dT':f(_0x46f0f5[_0xe6e119(0x115)]),'personId':_0x46f0f5[_0xe6e119(0xd6)],'threadId':_0x46f0f5['threadId']};}function G(_0x1f9836,_0x591e3c,_0x43d34c){const _0x441b80=_0x185786;var _0x4d6abd,_0x6722f7;if(((_0x6722f7=(_0x4d6abd=_0x1f9836==null?void 0x0:_0x1f9836[_0x441b80(0xdf)])==null?void 0x0:_0x4d6abd[_0x441b80(0xff)])!=null?_0x6722f7:0x0)>0x0){const _0x45659b=(_0x566a0c,_0x1b9a65)=>({'id':_0x566a0c[_0x441b80(0xad)],'threadId':_0x566a0c['threadId'],'dT':f(_0x566a0c['createTimestamp']),'personId':_0x566a0c['userId'],'resolved':_0x1f9836[_0x441b80(0x11a)]===I[_0x441b80(0x10c)],'unitId':_0x591e3c,'subUnitId':_0x43d34c,'text':JSON['parse'](_0x566a0c[_0x441b80(0xed)]),'parentId':_0x1b9a65}),_0x72d5cf=_0x45659b(_0x1f9836[_0x441b80(0xdf)][0x0]);return{..._0x72d5cf,'children':_0x1f9836[_0x441b80(0xdf)][_0x441b80(0xb4)](0x1)[_0x441b80(0xd7)](_0x22ea2c=>_0x45659b(_0x22ea2c,_0x72d5cf['id']))};}return null;}let g=class{constructor(_0x4db15f,_0x31f34b,_0x3440b9,_0x3dc173){const _0x197854=_0x185786;this[_0x197854(0xbc)]=_0x4db15f,this[_0x197854(0xe7)]=_0x31f34b,this[_0x197854(0xae)]=_0x3440b9,this['_injector']=_0x3dc173;}async['addComment'](_0x52229f){const _0x546c0c=_0x185786;var _0x10fd12,_0x81e976;const {parentId:_0x5eae72,unitId:_0x4b1123,text:_0xa54ff3,threadId:_0x2d80ab}=_0x52229f,_0x396dde=(_0x81e976=(_0x10fd12=_0xa54ff3['customRanges'])==null?void 0x0:_0x10fd12[_0x546c0c(0x10a)](_0x267e62=>_0x267e62[_0x546c0c(0xd4)]===c[_0x546c0c(0xee)][_0x546c0c(0xe8)])[_0x546c0c(0xd7)](_0x593f3a=>_0x593f3a[_0x546c0c(0x117)]))!=null?_0x81e976:[],_0x39933b=JSON['stringify'](_0xa54ff3),_0x260c3a=(await this[_0x546c0c(0xae)][_0x546c0c(0x104)](_0x4b1123))['getMemberID']();if(_0x5eae72){const _0x472ebb={'memberId':_0x260c3a,'unitId':_0x4b1123,'content':_0x39933b,'mention':_0x396dde,'threadId':_0x2d80ab},_0x2b5e42=(await this[_0x546c0c(0xbc)]['post']('/universer-api/comment/unit/'+_0x4b1123+_0x546c0c(0xaf),{'body':_0x472ebb}))[_0x546c0c(0xb9)][_0x546c0c(0x125)];return{..._0x52229f,'id':_0x2b5e42[_0x546c0c(0xad)],'dT':c[_0x546c0c(0xb8)](+_0x2b5e42['createTimestamp'])[_0x546c0c(0x102)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2b5e42[_0x546c0c(0xd6)]};}else{const _0x1d7305={'memberId':_0x260c3a,'unitId':_0x4b1123,'content':_0x39933b,'mention':_0x396dde},_0x3c5fc8=await this[_0x546c0c(0xbc)][_0x546c0c(0xbd)](_0x546c0c(0x111)+_0x4b1123+_0x546c0c(0xc8),{'body':_0x1d7305});return Y(_0x3c5fc8[_0x546c0c(0xb9)][_0x546c0c(0xc9)],_0x52229f);}}async[_0x185786(0xc1)](_0x16bd59){const _0xa75b52=_0x185786;var _0x512d3a,_0x27bf80;const {text:_0x36a576,unitId:_0x478e55}=_0x16bd59,_0x5023df=(_0x27bf80=(_0x512d3a=_0x36a576[_0xa75b52(0x12b)])==null?void 0x0:_0x512d3a[_0xa75b52(0x10a)](_0x4503ab=>_0x4503ab['rangeType']===c[_0xa75b52(0xee)][_0xa75b52(0xe8)])[_0xa75b52(0xd7)](_0x22b577=>_0x22b577[_0xa75b52(0x117)]))!=null?_0x27bf80:[],_0x4dcd4f=JSON[_0xa75b52(0xb2)](_0x36a576),_0x52faa3=_0x16bd59['threadId'],_0x59ab91=_0x16bd59['id'],_0x43d6ae={'memberId':(await this[_0xa75b52(0xae)][_0xa75b52(0x104)](_0x478e55))[_0xa75b52(0x10d)](),'unitId':_0x478e55,'threadId':_0x52faa3,'mention':_0x5023df,'content':_0x4dcd4f,'replyId':_0x59ab91},_0x28b2db=await this['_httpService']['post'](_0xa75b52(0x111)+_0x478e55+_0xa75b52(0xbf),{'body':_0x43d6ae});return!_0x28b2db[_0xa75b52(0xb9)][_0xa75b52(0x109)]||_0x28b2db[_0xa75b52(0xb9)][_0xa75b52(0x109)]['code']===0x1;}async['resolveComment'](_0x2c7cf1){const _0xacd1bc=_0x185786,{unitId:_0x7e08dd}=_0x2c7cf1,_0x357319=_0x2c7cf1[_0xacd1bc(0x107)],_0x20bd56={'memberId':this[_0xacd1bc(0xe7)][_0xacd1bc(0xc3)]()[_0xacd1bc(0xd5)],'unitId':_0x7e08dd,'threadId':_0x357319,'solved':_0x2c7cf1[_0xacd1bc(0x128)]?I[_0xacd1bc(0x10c)]:I['OpenOrReOpen']},_0xca8b95=await this[_0xacd1bc(0xbc)][_0xacd1bc(0xbd)](_0xacd1bc(0x111)+_0x7e08dd+_0xacd1bc(0xfb),{'body':_0x20bd56});return!_0xca8b95[_0xacd1bc(0xb9)][_0xacd1bc(0x109)]||_0xca8b95[_0xacd1bc(0xb9)][_0xacd1bc(0x109)][_0xacd1bc(0x120)]===0x1;}async[_0x185786(0x100)](_0x317eab,_0x110563,_0xa31a82,_0x51400a){const _0x53bc83=_0x185786,_0xec5825={'memberId':(await this[_0x53bc83(0xae)][_0x53bc83(0x104)](_0x317eab))['getMemberID'](),'threadId':_0xa31a82,'replyId':_0x51400a,'unitId':_0x317eab},_0x9f7624=await this[_0x53bc83(0xbc)]['post'](_0x53bc83(0x111)+_0x317eab+_0x53bc83(0xba),{'body':_0xec5825});return!_0x9f7624[_0x53bc83(0xb9)]['error']||_0x9f7624[_0x53bc83(0xb9)][_0x53bc83(0x109)][_0x53bc83(0x120)]===0x1;}async['listComments'](_0x243c17,_0xc0d3b0,_0x4efd11){const _0x4527e2=_0x185786,_0x1b8bf5={'unitId':_0x243c17,'threadId':_0x4efd11},_0x361fa7=await this[_0x4527e2(0xbc)][_0x4527e2(0xbd)]('/universer-api/comment/unit/'+_0x243c17+_0x4527e2(0xb3),{'body':_0x1b8bf5}),_0x4e0b60=_0x4efd11['map'](_0x575056=>G(_0x361fa7[_0x4527e2(0xb9)][_0x4527e2(0xf4)][_0x575056],_0x243c17,_0xc0d3b0))[_0x4527e2(0x10a)](Boolean);return Object[_0x4527e2(0xf1)](_0x361fa7[_0x4527e2(0xb9)]['users'])['forEach'](_0x1668e8=>{const _0xf03c31=_0x4527e2;this[_0xf03c31(0xe7)][_0xf03c31(0xce)](_0x1668e8);}),_0x4e0b60;}[_0x185786(0xe2)](_0x3b0d02){const _0x1f4b6b=_0x185786;return{'id':_0x3b0d02['id'],'threadId':_0x3b0d02['threadId'],'ref':_0x3b0d02[_0x1f4b6b(0xf8)]};}};g=x([_(0x0,c['Inject'](P[_0x185786(0xdc)])),_(0x1,c[_0x185786(0xdd)](c[_0x185786(0x112)])),_(0x2,c[_0x185786(0xdd)](b[_0x185786(0x119)])),_(0x3,c[_0x185786(0xdd)](c['Injector']))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x100c43,_0x1c172e,_0x4d597e,_0x4b0188)=>{const _0xe3101b=_0x185786;for(var _0x544d26=_0x4b0188>0x1?void 0x0:_0x4b0188?H(_0x1c172e,_0x4d597e):_0x1c172e,_0x181491=_0x100c43[_0xe3101b(0xff)]-0x1,_0x1d43fe;_0x181491>=0x0;_0x181491--)(_0x1d43fe=_0x100c43[_0x181491])&&(_0x544d26=_0x1d43fe(_0x544d26)||_0x544d26);return _0x544d26;},y=(_0x165c04,_0x484c92)=>(_0x23a7bb,_0x4ac9b8)=>_0x484c92(_0x23a7bb,_0x4ac9b8,_0x165c04);let C=class extends c['Disposable']{constructor(_0xb4762b,_0x25c0be){const _0x258a88=_0x185786;super(),this[_0x258a88(0xf0)]=_0xb4762b,this['_threadCommentDataSource']=_0x25c0be,this[_0x258a88(0x11b)]();}[_0x185786(0x11b)](){const _0x9d2e1a=_0x185786;this[_0x9d2e1a(0xf0)][_0x9d2e1a(0x122)]=this[_0x9d2e1a(0xde)],this[_0x9d2e1a(0xf0)][_0x9d2e1a(0xc2)]=!0x1;}};C=J([y(0x0,M[_0x185786(0xf7)]),y(0x1,c[_0x185786(0xdd)](g))],C);var F=Object[_0x185786(0xe5)],L=Object[_0x185786(0x12a)],Z=(_0x248bba,_0x4cfbc7,_0x402f5c)=>_0x4cfbc7 in _0x248bba?F(_0x248bba,_0x4cfbc7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x402f5c}):_0x248bba[_0x4cfbc7]=_0x402f5c,W=(_0x41bd41,_0x7b9e90,_0x3ef81d,_0x5c0dd5)=>{for(var _0x430abb=_0x5c0dd5>0x1?void 0x0:_0x5c0dd5?L(_0x7b9e90,_0x3ef81d):_0x7b9e90,_0x550e5d=_0x41bd41['length']-0x1,_0x18b57b;_0x550e5d>=0x0;_0x550e5d--)(_0x18b57b=_0x41bd41[_0x550e5d])&&(_0x430abb=_0x18b57b(_0x430abb)||_0x430abb);return _0x430abb;},O=(_0x13ea8e,_0x3f42df)=>(_0x4bcd0a,_0xd4e31c)=>_0x3f42df(_0x4bcd0a,_0xd4e31c,_0x13ea8e),N=(_0xa00126,_0xc0353c,_0x2f0a5c)=>Z(_0xa00126,typeof _0xc0353c!=_0x185786(0xe4)?_0xc0353c+'':_0xc0353c,_0x2f0a5c);exports[_0x185786(0xe9)]=class extends c[_0x185786(0xf9)]{constructor(_0x33cdf4=D,_0x4462f2,_0x2f3ceb){const _0x4a6351=_0x185786;super(),this[_0x4a6351(0x108)]=_0x33cdf4,this[_0x4a6351(0x103)]=_0x4462f2,this[_0x4a6351(0xcd)]=_0x2f3ceb;const {..._0x4e1e5c}=c[_0x4a6351(0x11c)]({},D,this['_config']);this[_0x4a6351(0xcd)]['setConfig'](q,_0x4e1e5c);}[_0x185786(0xb6)](){const _0x27523c=_0x185786;[[g],[C],[p]][_0x27523c(0xc6)](_0x47885b=>{const _0x2f712a=_0x27523c;this[_0x2f712a(0x103)][_0x2f712a(0xf6)](_0x47885b);});}[_0x185786(0x12e)](){const _0x3fbf0a=_0x185786;this['_injector'][_0x3fbf0a(0xb5)](C),this[_0x3fbf0a(0x103)][_0x3fbf0a(0xb5)](p);}},N(exports[_0x185786(0xe9)],_0x185786(0xcc),U),N(exports[_0x185786(0xe9)],_0x185786(0xb7),c[_0x185786(0x11f)][_0x185786(0x124)]),exports[_0x185786(0xe9)]=W([c['DependentOn'](j[_0x185786(0x106)],b[_0x185786(0xdb)],T['UniverLicensePlugin']),O(0x1,c[_0x185786(0xdd)](c[_0x185786(0x126)])),O(0x2,c[_0x185786(0xc7)])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0x29ba3e=_0x42d2;(function(_0x5d45a6,_0x8cc893){const _0x2c1263=_0x42d2,_0x3c8d93=_0x5d45a6();while(!![]){try{const _0x424b78=-parseInt(_0x2c1263(0x175))/0x1*(-parseInt(_0x2c1263(0x193))/0x2)+-parseInt(_0x2c1263(0x18e))/0x3+parseInt(_0x2c1263(0x176))/0x4+parseInt(_0x2c1263(0x172))/0x5+-parseInt(_0x2c1263(0x1c9))/0x6*(-parseInt(_0x2c1263(0x181))/0x7)+parseInt(_0x2c1263(0x1b6))/0x8+-parseInt(_0x2c1263(0x16e))/0x9*(parseInt(_0x2c1263(0x185))/0xa);if(_0x424b78===_0x8cc893)break;else _0x3c8d93['push'](_0x3c8d93['shift']());}catch(_0x5e1c76){_0x3c8d93['push'](_0x3c8d93['shift']());}}}(_0x8817,0x82d21));Object[_0x29ba3e(0x163)](exports,Symbol[_0x29ba3e(0x1ac)],{'value':'Module'});const b=require(_0x29ba3e(0x1b1)),T=require(_0x29ba3e(0x190)),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require(_0x29ba3e(0x15c)),U=_0x29ba3e(0x18d);var I=(_0x52631b=>(_0x52631b[_0x52631b[_0x29ba3e(0x1be)]=0x0]='OpenOrReOpen',_0x52631b[_0x52631b[_0x29ba3e(0x1b4)]=0x1]='Solved',_0x52631b[_0x52631b[_0x29ba3e(0x1a2)]=-0x1]=_0x29ba3e(0x1a2),_0x52631b))(I||{}),v=(_0x5c064d=>(_0x5c064d[_0x5c064d[_0x29ba3e(0x1bb)]=0x0]=_0x29ba3e(0x1bb),_0x5c064d[_0x5c064d[_0x29ba3e(0x18a)]=0x1]='Add',_0x5c064d[_0x5c064d[_0x29ba3e(0x1a8)]=0x2]=_0x29ba3e(0x1a8),_0x5c064d[_0x5c064d[_0x29ba3e(0x160)]=0x3]='Edit',_0x5c064d[_0x5c064d[_0x29ba3e(0x189)]=0x4]=_0x29ba3e(0x189),_0x5c064d[_0x5c064d[_0x29ba3e(0x18c)]=0x5]=_0x29ba3e(0x18c),_0x5c064d[_0x5c064d[_0x29ba3e(0x1a2)]=-0x1]='UNRECOGNIZED',_0x5c064d))(v||{});const f=_0x45bef4=>c[_0x29ba3e(0x15f)](new Date(+_0x45bef4))[_0x29ba3e(0x1ab)](_0x29ba3e(0x156)),R=async(_0x3ffed0,_0x205ba9)=>{const _0x11c995=_0x29ba3e,_0x381057=_0x3ffed0[_0x11c995(0x199)](c['UserManagerService']),_0x3a6d7c=_0x3ffed0[_0x11c995(0x199)](P[_0x11c995(0x184)]);_0x205ba9['forEach'](_0x5bc10b=>{const _0x2301c9=_0x11c995;_0x381057[_0x2301c9(0x168)](_0x5bc10b)&&_0x205ba9['delete'](_0x5bc10b);}),_0x205ba9[_0x11c995(0x170)]&&(await _0x3a6d7c['get'](_0x11c995(0x1a5),{'params':{'userIDs':[..._0x205ba9]}}))['body'][_0x11c995(0x16c)][_0x11c995(0x1c7)](_0x2ae752=>{_0x2ae752&&_0x381057['addUser'](_0x2ae752);});};var $=Object[_0x29ba3e(0x1b7)],E=(_0x2e2ab,_0x78d144,_0x16e023,_0x568d1a)=>{const _0x26e969=_0x29ba3e;for(var _0x1a63ff=_0x568d1a>0x1?void 0x0:_0x568d1a?$(_0x78d144,_0x16e023):_0x78d144,_0x4b529b=_0x2e2ab[_0x26e969(0x174)]-0x1,_0x8ec4d5;_0x4b529b>=0x0;_0x4b529b--)(_0x8ec4d5=_0x2e2ab[_0x4b529b])&&(_0x1a63ff=_0x8ec4d5(_0x1a63ff)||_0x1a63ff);return _0x1a63ff;},S=(_0x3400d1,_0x313575)=>(_0x315a61,_0x151635)=>_0x313575(_0x315a61,_0x151635,_0x3400d1);let p=class extends c[_0x29ba3e(0x198)]{constructor(_0x18ee51,_0x4c5f64,_0x4517d1,_0x4632dd){const _0x23e5a1=_0x29ba3e;super(),this[_0x23e5a1(0x159)]=_0x18ee51,this['_threadCommentModel']=_0x4c5f64,this[_0x23e5a1(0x1b3)]=_0x4517d1,this[_0x23e5a1(0x16f)]=_0x4632dd,this[_0x23e5a1(0x165)](),this['_initUserSync']();}['_initUserSync'](){const _0x5dfcaa=_0x29ba3e;this[_0x5dfcaa(0x1c4)](this[_0x5dfcaa(0x1c6)]['commentUpdate$'][_0x5dfcaa(0x191)](w['bufferTime'](0x10))[_0x5dfcaa(0x1b0)](_0x587042=>{const _0x1e65b8=_0x5dfcaa,_0x499d3c=new Set();_0x587042[_0x1e65b8(0x1c7)](_0x22bfa0=>{const _0x4f1faf=_0x1e65b8;switch(_0x22bfa0[_0x4f1faf(0x19a)]){case _0x4f1faf(0x19f):{const _0x1de6ca=_0x22bfa0[_0x4f1faf(0x173)]['personId'];_0x499d3c[_0x4f1faf(0x19f)](_0x1de6ca);break;}}}),R(this['_injector'],_0x499d3c);}));}[_0x29ba3e(0x165)](){const _0x367f1c=_0x29ba3e;this['disposeWithMe'](this[_0x367f1c(0x159)][_0x367f1c(0x153)][_0x367f1c(0x1b0)](async _0x287429=>{const _0x599086=_0x367f1c;var _0x3c687d,_0x5eb102,_0x26c427,_0x4ba7c4;const _0x2e51ec=(_0x3c687d=this['_threadCommentModel']['getUnit'](_0x287429[_0x599086(0x179)])[_0x599086(0x19c)](_0xb737ec=>_0xb737ec[_0x599086(0x1a6)]===_0x287429[_0x599086(0x1a6)]))==null?void 0x0:_0x3c687d['root'];if(!_0x2e51ec)return;const {unitId:_0x136fb5,subUnitId:_0x40e679}=_0x2e51ec;switch(_0x287429[_0x599086(0x167)]&&this[_0x599086(0x1b3)][_0x599086(0x1b9)](_0x287429[_0x599086(0x167)]),_0x287429[_0x599086(0x19a)]){case v['Add']:break;case v['Reply']:{this[_0x599086(0x1c6)][_0x599086(0x17b)](_0x136fb5,_0x40e679,{'unitId':_0x136fb5,'subUnitId':_0x40e679,'ref':'','id':_0x287429['replyId'],'dT':f(+_0x287429['createTimestamp']),'threadId':_0x287429[_0x599086(0x1a6)],'personId':(_0x26c427=(_0x5eb102=_0x287429[_0x599086(0x167)])==null?void 0x0:_0x5eb102[_0x599086(0x187)])!=null?_0x26c427:_0x287429[_0x599086(0x197)],'text':JSON['parse'](_0x287429[_0x599086(0x1a9)]),'parentId':_0x2e51ec['id']});break;}case v[_0x599086(0x189)]:{const _0xa24e4e=this['_threadCommentModel']['getComment'](_0x136fb5,_0x40e679,_0x287429[_0x599086(0x1ba)]);_0xa24e4e&&_0xa24e4e[_0x599086(0x157)]&&this[_0x599086(0x1c6)][_0x599086(0x195)](_0x136fb5,_0x40e679,_0x287429['replyId']);break;}case v[_0x599086(0x160)]:{this[_0x599086(0x1c6)][_0x599086(0x18b)](_0x136fb5,_0x40e679,{'commentId':_0x287429[_0x599086(0x1ba)],'text':JSON['parse'](_0x287429[_0x599086(0x1a9)])});break;}case v[_0x599086(0x18c)]:{const _0x28d01f=(_0x4ba7c4=this[_0x599086(0x1c6)][_0x599086(0x1bc)](_0x287429[_0x599086(0x179)])['find'](_0x101927=>_0x101927['threadId']===_0x287429[_0x599086(0x1a6)]))==null?void 0x0:_0x4ba7c4[_0x599086(0x1bd)];_0x28d01f&&this[_0x599086(0x1c6)][_0x599086(0x166)](_0x136fb5,_0x40e679,_0x28d01f['id'],_0x287429[_0x599086(0x17e)]===I[_0x599086(0x1b4)]);break;}}}));}};p=E([S(0x0,c[_0x29ba3e(0x1ad)](b['CommentService'])),S(0x1,c[_0x29ba3e(0x1ad)](M[_0x29ba3e(0x16b)])),S(0x2,c['Inject'](c[_0x29ba3e(0x194)])),S(0x3,c[_0x29ba3e(0x1ad)](c[_0x29ba3e(0x1b2)]))],p);const q=_0x29ba3e(0x158),D={};var A=Object[_0x29ba3e(0x1b7)],x=(_0x527584,_0x4cd8ba,_0x5cb583,_0x109986)=>{const _0x4f9734=_0x29ba3e;for(var _0x31ddce=_0x109986>0x1?void 0x0:_0x109986?A(_0x4cd8ba,_0x5cb583):_0x4cd8ba,_0xbc1539=_0x527584[_0x4f9734(0x174)]-0x1,_0x192794;_0xbc1539>=0x0;_0xbc1539--)(_0x192794=_0x527584[_0xbc1539])&&(_0x31ddce=_0x192794(_0x31ddce)||_0x31ddce);return _0x31ddce;},_=(_0x37100c,_0x46f863)=>(_0x3820d2,_0x115cac)=>_0x46f863(_0x3820d2,_0x115cac,_0x37100c);function Y(_0x4b13e7,_0x559fd4){const _0x4a0711=_0x29ba3e,_0x5f43bc=_0x4b13e7[_0x4a0711(0x188)][0x0];return{..._0x559fd4,'id':_0x5f43bc[_0x4a0711(0x1ba)],'resolved':_0x4b13e7[_0x4a0711(0x17e)]===0x1,'dT':f(_0x5f43bc[_0x4a0711(0x1a3)]),'personId':_0x5f43bc[_0x4a0711(0x197)],'threadId':_0x5f43bc['threadId']};}function _0x42d2(_0x51c127,_0xe29ca6){const _0x881725=_0x8817();return _0x42d2=function(_0x42d236,_0x111f92){_0x42d236=_0x42d236-0x153;let _0x2865af=_0x881725[_0x42d236];return _0x2865af;},_0x42d2(_0x51c127,_0xe29ca6);}function G(_0x5f2fba,_0x2e0ea,_0x3922d2){const _0x149fee=_0x29ba3e;var _0x4a2923,_0x35e003;if(((_0x35e003=(_0x4a2923=_0x5f2fba==null?void 0x0:_0x5f2fba[_0x149fee(0x188)])==null?void 0x0:_0x4a2923[_0x149fee(0x174)])!=null?_0x35e003:0x0)>0x0){const _0x515348=(_0x3d7c57,_0x20cb50)=>({'id':_0x3d7c57[_0x149fee(0x1ba)],'threadId':_0x3d7c57[_0x149fee(0x1a6)],'dT':f(_0x3d7c57['createTimestamp']),'personId':_0x3d7c57[_0x149fee(0x197)],'resolved':_0x5f2fba['solved']===I[_0x149fee(0x1b4)],'unitId':_0x2e0ea,'subUnitId':_0x3922d2,'text':JSON[_0x149fee(0x1ae)](_0x3d7c57[_0x149fee(0x1a9)]),'parentId':_0x20cb50}),_0x56ec88=_0x515348(_0x5f2fba[_0x149fee(0x188)][0x0]);return{..._0x56ec88,'children':_0x5f2fba[_0x149fee(0x188)]['slice'](0x1)['map'](_0xbf0aa4=>_0x515348(_0xbf0aa4,_0x56ec88['id']))};}return null;}let g=class{constructor(_0x5b1acf,_0x4d9ea7,_0x407894,_0x3b77b7){const _0x29b49f=_0x29ba3e;this[_0x29b49f(0x1a7)]=_0x5b1acf,this[_0x29b49f(0x1b3)]=_0x4d9ea7,this[_0x29b49f(0x15a)]=_0x407894,this[_0x29b49f(0x16f)]=_0x3b77b7;}async[_0x29ba3e(0x17b)](_0x22c0b1){const _0x37af6d=_0x29ba3e;var _0x3391f4,_0x3110f0;const {parentId:_0x38d3b6,unitId:_0x1e3dbb,text:_0x22f85f,threadId:_0xcc623c}=_0x22c0b1,_0x4b70b8=(_0x3110f0=(_0x3391f4=_0x22f85f['customRanges'])==null?void 0x0:_0x3391f4[_0x37af6d(0x19b)](_0x453b89=>_0x453b89[_0x37af6d(0x15b)]===c[_0x37af6d(0x19d)][_0x37af6d(0x1c8)])['map'](_0x159e80=>_0x159e80[_0x37af6d(0x196)]))!=null?_0x3110f0:[],_0xc50bb8=JSON['stringify'](_0x22f85f),_0x59a5ac=(await this[_0x37af6d(0x15a)]['requireSession'](_0x1e3dbb))[_0x37af6d(0x16a)]();if(_0x38d3b6){const _0x1ecaad={'memberId':_0x59a5ac,'unitId':_0x1e3dbb,'content':_0xc50bb8,'mention':_0x4b70b8,'threadId':_0xcc623c},_0x57a297=(await this[_0x37af6d(0x1a7)]['post']('/universer-api/comment/unit/'+_0x1e3dbb+'/reply',{'body':_0x1ecaad}))[_0x37af6d(0x1a0)]['reply'];return{..._0x22c0b1,'id':_0x57a297['replyId'],'dT':c[_0x37af6d(0x15f)](+_0x57a297[_0x37af6d(0x1a3)])[_0x37af6d(0x1ab)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x57a297['userId']};}else{const _0xda3c93={'memberId':_0x59a5ac,'unitId':_0x1e3dbb,'content':_0xc50bb8,'mention':_0x4b70b8},_0x3e2684=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x1e3dbb+_0x37af6d(0x178),{'body':_0xda3c93});return Y(_0x3e2684[_0x37af6d(0x1a0)][_0x37af6d(0x180)],_0x22c0b1);}}async['updateComment'](_0x1fb8ce){const _0x46289b=_0x29ba3e;var _0x4cbd7b,_0x5492fb;const {text:_0x49c924,unitId:_0x3bc5db}=_0x1fb8ce,_0x1a885d=(_0x5492fb=(_0x4cbd7b=_0x49c924['customRanges'])==null?void 0x0:_0x4cbd7b[_0x46289b(0x19b)](_0x536682=>_0x536682[_0x46289b(0x15b)]===c['CustomRangeType'][_0x46289b(0x1c8)])[_0x46289b(0x192)](_0x35affc=>_0x35affc[_0x46289b(0x196)]))!=null?_0x5492fb:[],_0x34edbe=JSON[_0x46289b(0x16d)](_0x49c924),_0xa6c5ba=_0x1fb8ce[_0x46289b(0x1a6)],_0x231ae8=_0x1fb8ce['id'],_0x138f09={'memberId':(await this[_0x46289b(0x15a)]['requireSession'](_0x3bc5db))[_0x46289b(0x16a)](),'unitId':_0x3bc5db,'threadId':_0xa6c5ba,'mention':_0x1a885d,'content':_0x34edbe,'replyId':_0x231ae8},_0x30dd91=await this[_0x46289b(0x1a7)][_0x46289b(0x17f)]('/universer-api/comment/unit/'+_0x3bc5db+_0x46289b(0x161),{'body':_0x138f09});return!_0x30dd91[_0x46289b(0x1a0)]['error']||_0x30dd91[_0x46289b(0x1a0)]['error']['code']===0x1;}async[_0x29ba3e(0x166)](_0x268390){const _0x4c2cc8=_0x29ba3e,{unitId:_0x50aee9}=_0x268390,_0x34580d=_0x268390[_0x4c2cc8(0x1a6)],_0x1e420c={'memberId':this['_userService']['getCurrentUser']()[_0x4c2cc8(0x187)],'unitId':_0x50aee9,'threadId':_0x34580d,'solved':_0x268390[_0x4c2cc8(0x1b8)]?I[_0x4c2cc8(0x1b4)]:I[_0x4c2cc8(0x1be)]},_0xab983=await this[_0x4c2cc8(0x1a7)][_0x4c2cc8(0x17f)](_0x4c2cc8(0x15e)+_0x50aee9+_0x4c2cc8(0x154),{'body':_0x1e420c});return!_0xab983[_0x4c2cc8(0x1a0)]['error']||_0xab983[_0x4c2cc8(0x1a0)]['error']['code']===0x1;}async[_0x29ba3e(0x195)](_0x338e58,_0x1b8299,_0x244d52,_0x340385){const _0x3d3794=_0x29ba3e,_0x3e8244={'memberId':(await this[_0x3d3794(0x15a)][_0x3d3794(0x183)](_0x338e58))[_0x3d3794(0x16a)](),'threadId':_0x244d52,'replyId':_0x340385,'unitId':_0x338e58},_0x926209=await this[_0x3d3794(0x1a7)][_0x3d3794(0x17f)]('/universer-api/comment/unit/'+_0x338e58+_0x3d3794(0x186),{'body':_0x3e8244});return!_0x926209[_0x3d3794(0x1a0)][_0x3d3794(0x1af)]||_0x926209['body'][_0x3d3794(0x1af)][_0x3d3794(0x1c1)]===0x1;}async[_0x29ba3e(0x17d)](_0x2abea5,_0x10e06e,_0x5216d4){const _0x3b600c=_0x29ba3e,_0x157346={'unitId':_0x2abea5,'threadId':_0x5216d4},_0x141444=await this[_0x3b600c(0x1a7)]['post'](_0x3b600c(0x15e)+_0x2abea5+_0x3b600c(0x1c0),{'body':_0x157346}),_0x5b0e5d=_0x5216d4[_0x3b600c(0x192)](_0x1503be=>G(_0x141444[_0x3b600c(0x1a0)][_0x3b600c(0x18f)][_0x1503be],_0x2abea5,_0x10e06e))[_0x3b600c(0x19b)](Boolean);return Object['values'](_0x141444[_0x3b600c(0x1a0)][_0x3b600c(0x16c)])[_0x3b600c(0x1c7)](_0x3b5b56=>{const _0x511c95=_0x3b600c;this[_0x511c95(0x1b3)][_0x511c95(0x1b9)](_0x3b5b56);}),_0x5b0e5d;}[_0x29ba3e(0x19e)](_0x47e4ce){const _0x5ba665=_0x29ba3e;return{'id':_0x47e4ce['id'],'threadId':_0x47e4ce[_0x5ba665(0x1a6)],'ref':_0x47e4ce[_0x5ba665(0x15d)]};}};g=x([_(0x0,c[_0x29ba3e(0x1ad)](P[_0x29ba3e(0x184)])),_(0x1,c[_0x29ba3e(0x1ad)](c['UserManagerService'])),_(0x2,c['Inject'](b[_0x29ba3e(0x1bf)])),_(0x3,c[_0x29ba3e(0x1ad)](c[_0x29ba3e(0x1b2)]))],g);var H=Object[_0x29ba3e(0x1b7)],J=(_0x56d558,_0x432744,_0x3578f0,_0x397593)=>{const _0x3b2071=_0x29ba3e;for(var _0x38c00e=_0x397593>0x1?void 0x0:_0x397593?H(_0x432744,_0x3578f0):_0x432744,_0x28340d=_0x56d558[_0x3b2071(0x174)]-0x1,_0x37b19f;_0x28340d>=0x0;_0x28340d--)(_0x37b19f=_0x56d558[_0x28340d])&&(_0x38c00e=_0x37b19f(_0x38c00e)||_0x38c00e);return _0x38c00e;},y=(_0x1b439a,_0x23a21b)=>(_0x175ee7,_0x2b492f)=>_0x23a21b(_0x175ee7,_0x2b492f,_0x1b439a);let C=class extends c[_0x29ba3e(0x198)]{constructor(_0x44d03b,_0x1211a8){const _0xb1f8fe=_0x29ba3e;super(),this[_0xb1f8fe(0x162)]=_0x44d03b,this['_threadCommentDataSource']=_0x1211a8,this[_0xb1f8fe(0x164)]();}[_0x29ba3e(0x164)](){const _0x5274ba=_0x29ba3e;this[_0x5274ba(0x162)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x5274ba(0x155)]=!0x1;}};function _0x8817(){const _0x1cdb8f=['stringify','15669QvepVh','_injector','size','_configService','4843100SmhNeW','payload','length','6OLXrZG','1511332iOrfQb','_config','/add','unitId','UniverThreadCommentDataSourcePlugin','addComment','pluginName','listComments','solved','post','comment','2908997tvCAHe','UniverInstanceType','requireSession','HTTPService','10690QZuzYO','/delete','userID','replies','Delete','Add','updateComment','Solve','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','792288YHcSzi','comments','@univerjs-pro/license','pipe','map','135444nBLfKj','UserManagerService','deleteComment','rangeId','userId','Disposable','get','type','filter','find','CustomRangeType','saveCommentToSnapshot','add','body','UniverCollaborationClientPlugin','UNRECOGNIZED','createTimestamp','DependentOn','/universer-api/user/list','threadId','_httpService','Reply','content','onReady','format','toStringTag','Inject','parse','error','subscribe','@univerjs-pro/collaboration-client','Injector','_userService','Solved','setConfig','3941680chATMC','getOwnPropertyDescriptor','resolved','addUser','replyId','Unknown','getUnit','root','OpenOrReOpen','CollaborationSessionService','/list','code','UNIVER_UNKNOWN','onStarting','disposeWithMe','UniverThreadCommentUIPlugin','_threadCommentModel','forEach','COMMENT','6RxzXyX','commentUpdate$','/solved','syncUpdateMutationToColla','YYYY/MM/DD\x20HH:mm','parentId','thread-comment-data-source.config','_commentService','_sessionService','rangeType','@univerjs/network','ref','/universer-api/comment/unit/','dayjs','Edit','/edit','_threadCommentDataSourceService','defineProperty','_initDataSource','_init','resolveComment','user','getUser','Plugin','getMemberID','ThreadCommentModel','users'];_0x8817=function(){return _0x1cdb8f;};return _0x8817();}C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x29ba3e(0x1ad)](g))],C);var F=Object[_0x29ba3e(0x163)],L=Object[_0x29ba3e(0x1b7)],Z=(_0x1cea6a,_0x4d17ba,_0x1ef833)=>_0x4d17ba in _0x1cea6a?F(_0x1cea6a,_0x4d17ba,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1ef833}):_0x1cea6a[_0x4d17ba]=_0x1ef833,W=(_0xb01c79,_0x43434f,_0x5b4263,_0x242243)=>{const _0x4ec4b0=_0x29ba3e;for(var _0x35e6d0=_0x242243>0x1?void 0x0:_0x242243?L(_0x43434f,_0x5b4263):_0x43434f,_0x509ddc=_0xb01c79[_0x4ec4b0(0x174)]-0x1,_0x110e25;_0x509ddc>=0x0;_0x509ddc--)(_0x110e25=_0xb01c79[_0x509ddc])&&(_0x35e6d0=_0x110e25(_0x35e6d0)||_0x35e6d0);return _0x35e6d0;},O=(_0x3b9d12,_0x4856d6)=>(_0x39deb1,_0x1dc8c7)=>_0x4856d6(_0x39deb1,_0x1dc8c7,_0x3b9d12),N=(_0x4ae883,_0x2b2c66,_0x2c6642)=>Z(_0x4ae883,typeof _0x2b2c66!='symbol'?_0x2b2c66+'':_0x2b2c66,_0x2c6642);exports[_0x29ba3e(0x17a)]=class extends c[_0x29ba3e(0x169)]{constructor(_0x48f3e3=D,_0x10944d,_0xa8d975){const _0x19c68e=_0x29ba3e;super(),this[_0x19c68e(0x177)]=_0x48f3e3,this[_0x19c68e(0x16f)]=_0x10944d,this[_0x19c68e(0x171)]=_0xa8d975;const {..._0x1fe772}=c['merge']({},D,this['_config']);this[_0x19c68e(0x171)][_0x19c68e(0x1b5)](q,_0x1fe772);}[_0x29ba3e(0x1c3)](){const _0x29c652=_0x29ba3e;[[g],[C],[p]][_0x29c652(0x1c7)](_0x39bd34=>{const _0x19515c=_0x29c652;this[_0x19515c(0x16f)][_0x19515c(0x19f)](_0x39bd34);});}[_0x29ba3e(0x1aa)](){const _0x8b9e61=_0x29ba3e;this['_injector'][_0x8b9e61(0x199)](C),this['_injector'][_0x8b9e61(0x199)](p);}},N(exports[_0x29ba3e(0x17a)],_0x29ba3e(0x17c),U),N(exports[_0x29ba3e(0x17a)],_0x29ba3e(0x19a),c[_0x29ba3e(0x182)][_0x29ba3e(0x1c2)]),exports[_0x29ba3e(0x17a)]=W([c[_0x29ba3e(0x1a4)](j[_0x29ba3e(0x1c5)],b[_0x29ba3e(0x1a1)],T['UniverLicensePlugin']),O(0x1,c[_0x29ba3e(0x1ad)](c['Injector'])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x42d6c8=_0x349d;(function(_0x3183ad,_0x136b00){const _0x110aed=_0x349d,_0x59da92=_0x3183ad();while(!![]){try{const _0x328e0b=-parseInt(_0x110aed(0x9a))/0x1*(parseInt(_0x110aed(0xe6))/0x2)+-parseInt(_0x110aed(0xc9))/0x3+parseInt(_0x110aed(0xbc))/0x4*(-parseInt(_0x110aed(0xdc))/0x5)+-parseInt(_0x110aed(0x98))/0x6*(parseInt(_0x110aed(0xd9))/0x7)+-parseInt(_0x110aed(0xd2))/0x8+parseInt(_0x110aed(0xbe))/0x9+-parseInt(_0x110aed(0xeb))/0xa*(-parseInt(_0x110aed(0xa8))/0xb);if(_0x328e0b===_0x136b00)break;else _0x59da92['push'](_0x59da92['shift']());}catch(_0x1b4338){_0x59da92['push'](_0x59da92['shift']());}}}(_0x4366,0xea804));import{CommentService as _0x533446,CollaborationSessionService as _0x251384,UniverCollaborationClientPlugin as _0x46ec77}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4f39a6}from'@univerjs-pro/license';import{dayjs as _0xfb9cd8,UserManagerService as _0x7fb736,Inject as _0x472303,Injector as _0x467098,Disposable as _0x526737,CustomRangeType as _0x2675b6,UniverInstanceType as _0x226e69,DependentOn as _0x3e7234,IConfigService as _0x566806,Plugin as _0x5837c0,merge as _0x1d5c2a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x47d75a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3f067b,IThreadCommentDataSourceService as _0x3b16b7}from'@univerjs/thread-comment';import{bufferTime as _0xe62590}from'rxjs';import{HTTPService as _0x4e8dcc}from'@univerjs/network';const W=_0x42d6c8(0xa4);var I=(_0x239ba0=>(_0x239ba0[_0x239ba0[_0x42d6c8(0xc0)]=0x0]=_0x42d6c8(0xc0),_0x239ba0[_0x239ba0['Solved']=0x1]=_0x42d6c8(0xc6),_0x239ba0[_0x239ba0['UNRECOGNIZED']=-0x1]=_0x42d6c8(0xac),_0x239ba0))(I||{}),v=(_0x4915e5=>(_0x4915e5[_0x4915e5[_0x42d6c8(0xd8)]=0x0]='Unknown',_0x4915e5[_0x4915e5['Add']=0x1]=_0x42d6c8(0x8b),_0x4915e5[_0x4915e5[_0x42d6c8(0x90)]=0x2]=_0x42d6c8(0x90),_0x4915e5[_0x4915e5[_0x42d6c8(0xc7)]=0x3]='Edit',_0x4915e5[_0x4915e5['Delete']=0x4]=_0x42d6c8(0xbb),_0x4915e5[_0x4915e5['Solve']=0x5]=_0x42d6c8(0xd6),_0x4915e5[_0x4915e5[_0x42d6c8(0xac)]=-0x1]=_0x42d6c8(0xac),_0x4915e5))(v||{});const D=_0x41e408=>_0xfb9cd8(new Date(+_0x41e408))[_0x42d6c8(0x8f)](_0x42d6c8(0xc5)),B=async(_0x263d31,_0x2171fd)=>{const _0x5b35df=_0x42d6c8,_0x576e04=_0x263d31['get'](_0x7fb736),_0x346964=_0x263d31[_0x5b35df(0xb8)](_0x4e8dcc);_0x2171fd[_0x5b35df(0xee)](_0x2f3815=>{const _0x31c53a=_0x5b35df;_0x576e04[_0x31c53a(0xe3)](_0x2f3815)&&_0x2171fd[_0x31c53a(0xab)](_0x2f3815);}),_0x2171fd['size']&&(await _0x346964[_0x5b35df(0xb8)](_0x5b35df(0xba),{'params':{'userIDs':[..._0x2171fd]}}))[_0x5b35df(0xd4)][_0x5b35df(0xe5)]['forEach'](_0x2789e4=>{_0x2789e4&&_0x576e04['addUser'](_0x2789e4);});};var K=Object[_0x42d6c8(0xe8)],V=(_0xf1da94,_0x19022d,_0x56b4c0,_0x128ade)=>{for(var _0x469081=_0x128ade>0x1?void 0x0:_0x128ade?K(_0x19022d,_0x56b4c0):_0x19022d,_0x214c63=_0xf1da94['length']-0x1,_0x547c4b;_0x214c63>=0x0;_0x214c63--)(_0x547c4b=_0xf1da94[_0x214c63])&&(_0x469081=_0x547c4b(_0x469081)||_0x469081);return _0x469081;},p=(_0x1e1f8b,_0x38f5c7)=>(_0x32e4d6,_0x125888)=>_0x38f5c7(_0x32e4d6,_0x125888,_0x1e1f8b);function _0x349d(_0x5da02b,_0x358b03){const _0x4366a2=_0x4366();return _0x349d=function(_0x349dcc,_0x290545){_0x349dcc=_0x349dcc-0x88;let _0x1c618e=_0x4366a2[_0x349dcc];return _0x1c618e;},_0x349d(_0x5da02b,_0x358b03);}let S=class extends _0x526737{constructor(_0xf2189a,_0x5e08d8,_0x5e723a,_0x34b380){const _0x1414fa=_0x42d6c8;super(),this[_0x1414fa(0xc1)]=_0xf2189a,this[_0x1414fa(0xe0)]=_0x5e08d8,this[_0x1414fa(0xde)]=_0x5e723a,this[_0x1414fa(0x89)]=_0x34b380,this[_0x1414fa(0xe4)](),this['_initUserSync']();}['_initUserSync'](){const _0x4ddede=_0x42d6c8;this['disposeWithMe'](this[_0x4ddede(0xe0)][_0x4ddede(0xd7)][_0x4ddede(0xaa)](_0xe62590(0x10))[_0x4ddede(0xec)](_0x55ed07=>{const _0x3ea18e=_0x4ddede,_0x16ad70=new Set();_0x55ed07[_0x3ea18e(0xee)](_0x51f4de=>{const _0x2eeca3=_0x3ea18e;switch(_0x51f4de[_0x2eeca3(0x91)]){case'add':{const _0x2ec707=_0x51f4de['payload'][_0x2eeca3(0x94)];_0x16ad70['add'](_0x2ec707);break;}}}),B(this[_0x3ea18e(0x89)],_0x16ad70);}));}[_0x42d6c8(0xe4)](){const _0x1337a8=_0x42d6c8;this[_0x1337a8(0xb3)](this[_0x1337a8(0xc1)]['commentUpdate$']['subscribe'](async _0x5ae4e5=>{const _0x40ad59=_0x1337a8;var _0x2648fb,_0x335a3e,_0x67ad07,_0x115db0;const _0x11e167=(_0x2648fb=this['_threadCommentModel']['getUnit'](_0x5ae4e5[_0x40ad59(0xc8)])[_0x40ad59(0xb4)](_0x1b3e96=>_0x1b3e96[_0x40ad59(0x99)]===_0x5ae4e5[_0x40ad59(0x99)]))==null?void 0x0:_0x2648fb[_0x40ad59(0x9f)];if(!_0x11e167)return;const {unitId:_0x1c68d1,subUnitId:_0x4894c3}=_0x11e167;switch(_0x5ae4e5[_0x40ad59(0xed)]&&this[_0x40ad59(0xde)]['addUser'](_0x5ae4e5[_0x40ad59(0xed)]),_0x5ae4e5[_0x40ad59(0x91)]){case v[_0x40ad59(0x8b)]:break;case v['Reply']:{this[_0x40ad59(0xe0)]['addComment'](_0x1c68d1,_0x4894c3,{'unitId':_0x1c68d1,'subUnitId':_0x4894c3,'ref':'','id':_0x5ae4e5[_0x40ad59(0xa6)],'dT':D(+_0x5ae4e5[_0x40ad59(0x8c)]),'threadId':_0x5ae4e5[_0x40ad59(0x99)],'personId':(_0x67ad07=(_0x335a3e=_0x5ae4e5[_0x40ad59(0xed)])==null?void 0x0:_0x335a3e['userID'])!=null?_0x67ad07:_0x5ae4e5[_0x40ad59(0xc4)],'text':JSON[_0x40ad59(0xa3)](_0x5ae4e5[_0x40ad59(0x95)]),'parentId':_0x11e167['id']});break;}case v['Delete']:{const _0x2c50e7=this[_0x40ad59(0xe0)][_0x40ad59(0xbd)](_0x1c68d1,_0x4894c3,_0x5ae4e5[_0x40ad59(0xa6)]);_0x2c50e7&&_0x2c50e7[_0x40ad59(0xca)]&&this[_0x40ad59(0xe0)][_0x40ad59(0xc2)](_0x1c68d1,_0x4894c3,_0x5ae4e5[_0x40ad59(0xa6)]);break;}case v[_0x40ad59(0xc7)]:{this[_0x40ad59(0xe0)][_0x40ad59(0xd5)](_0x1c68d1,_0x4894c3,{'commentId':_0x5ae4e5['replyId'],'text':JSON['parse'](_0x5ae4e5[_0x40ad59(0x95)])});break;}case v[_0x40ad59(0xd6)]:{const _0x4e32aa=(_0x115db0=this['_threadCommentModel'][_0x40ad59(0xae)](_0x5ae4e5[_0x40ad59(0xc8)])['find'](_0x525d31=>_0x525d31[_0x40ad59(0x99)]===_0x5ae4e5['threadId']))==null?void 0x0:_0x115db0[_0x40ad59(0x9f)];_0x4e32aa&&this[_0x40ad59(0xe0)][_0x40ad59(0xd0)](_0x1c68d1,_0x4894c3,_0x4e32aa['id'],_0x5ae4e5[_0x40ad59(0xaf)]===I[_0x40ad59(0xc6)]);break;}}}));}};S=V([p(0x0,_0x472303(_0x533446)),p(0x1,_0x472303(_0x3f067b)),p(0x2,_0x472303(_0x7fb736)),p(0x3,_0x472303(_0x467098))],S);const z=_0x42d6c8(0xe2),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x3d3472,_0x1a28d1,_0x4c068d,_0x3f4e3c)=>{for(var _0xab116b=_0x3f4e3c>0x1?void 0x0:_0x3f4e3c?k(_0x1a28d1,_0x4c068d):_0x1a28d1,_0x4573f6=_0x3d3472['length']-0x1,_0x59d157;_0x4573f6>=0x0;_0x4573f6--)(_0x59d157=_0x3d3472[_0x4573f6])&&(_0xab116b=_0x59d157(_0xab116b)||_0xab116b);return _0xab116b;},_=(_0x38d7ed,_0x14ea5d)=>(_0x58010f,_0x3efd9d)=>_0x14ea5d(_0x58010f,_0x3efd9d,_0x38d7ed);function X(_0x48c492,_0x4476ac){const _0x2269ca=_0x42d6c8,_0x485343=_0x48c492[_0x2269ca(0xb7)][0x0];return{..._0x4476ac,'id':_0x485343[_0x2269ca(0xa6)],'resolved':_0x48c492[_0x2269ca(0xaf)]===0x1,'dT':D(_0x485343['createTimestamp']),'personId':_0x485343[_0x2269ca(0xc4)],'threadId':_0x485343[_0x2269ca(0x99)]};}function ee(_0x486ad4,_0x4fbd3c,_0x4980df){const _0x2d2d59=_0x42d6c8;var _0x4978a8,_0x1d97cf;if(((_0x1d97cf=(_0x4978a8=_0x486ad4==null?void 0x0:_0x486ad4[_0x2d2d59(0xb7)])==null?void 0x0:_0x4978a8[_0x2d2d59(0xb0)])!=null?_0x1d97cf:0x0)>0x0){const _0xc4beaf=(_0x49dd0e,_0x860956)=>({'id':_0x49dd0e[_0x2d2d59(0xa6)],'threadId':_0x49dd0e[_0x2d2d59(0x99)],'dT':D(_0x49dd0e[_0x2d2d59(0x8c)]),'personId':_0x49dd0e[_0x2d2d59(0xc4)],'resolved':_0x486ad4[_0x2d2d59(0xaf)]===I[_0x2d2d59(0xc6)],'unitId':_0x4fbd3c,'subUnitId':_0x4980df,'text':JSON[_0x2d2d59(0xa3)](_0x49dd0e[_0x2d2d59(0x95)]),'parentId':_0x860956}),_0x374c5d=_0xc4beaf(_0x486ad4[_0x2d2d59(0xb7)][0x0]);return{..._0x374c5d,'children':_0x486ad4[_0x2d2d59(0xb7)][_0x2d2d59(0x96)](0x1)[_0x2d2d59(0xdd)](_0x5e5e5e=>_0xc4beaf(_0x5e5e5e,_0x374c5d['id']))};}return null;}let f=class{constructor(_0x3337,_0x4aec0e,_0x481023,_0x2c33b){const _0x11cb65=_0x42d6c8;this[_0x11cb65(0xb2)]=_0x3337,this[_0x11cb65(0xde)]=_0x4aec0e,this['_sessionService']=_0x481023,this['_injector']=_0x2c33b;}async[_0x42d6c8(0xa1)](_0x444fc8){const _0x43bdf0=_0x42d6c8;var _0x3aa470,_0x52cdbd;const {parentId:_0x32a98c,unitId:_0xd95eab,text:_0x3ccacb,threadId:_0x2d4701}=_0x444fc8,_0x5ce452=(_0x52cdbd=(_0x3aa470=_0x3ccacb['customRanges'])==null?void 0x0:_0x3aa470[_0x43bdf0(0xe1)](_0x118f0c=>_0x118f0c[_0x43bdf0(0x88)]===_0x2675b6[_0x43bdf0(0xb6)])[_0x43bdf0(0xdd)](_0x150134=>_0x150134[_0x43bdf0(0xb1)]))!=null?_0x52cdbd:[],_0x2f9f12=JSON['stringify'](_0x3ccacb),_0x41497a=(await this[_0x43bdf0(0xa0)][_0x43bdf0(0xe7)](_0xd95eab))[_0x43bdf0(0xbf)]();if(_0x32a98c){const _0x2fec15={'memberId':_0x41497a,'unitId':_0xd95eab,'content':_0x2f9f12,'mention':_0x5ce452,'threadId':_0x2d4701},_0x225829=(await this[_0x43bdf0(0xb2)]['post'](_0x43bdf0(0xea)+_0xd95eab+_0x43bdf0(0x92),{'body':_0x2fec15}))[_0x43bdf0(0xd4)]['reply'];return{..._0x444fc8,'id':_0x225829[_0x43bdf0(0xa6)],'dT':_0xfb9cd8(+_0x225829['createTimestamp'])[_0x43bdf0(0x8f)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x225829[_0x43bdf0(0xc4)]};}else{const _0x1f40ec={'memberId':_0x41497a,'unitId':_0xd95eab,'content':_0x2f9f12,'mention':_0x5ce452},_0x5046af=await this[_0x43bdf0(0xb2)][_0x43bdf0(0xce)](_0x43bdf0(0xea)+_0xd95eab+_0x43bdf0(0xcb),{'body':_0x1f40ec});return X(_0x5046af[_0x43bdf0(0xd4)][_0x43bdf0(0xd3)],_0x444fc8);}}async[_0x42d6c8(0xd5)](_0x1ba6d9){const _0xbdac0c=_0x42d6c8;var _0xd379c3,_0x334512;const {text:_0x16deed,unitId:_0x57a241}=_0x1ba6d9,_0x26c9cc=(_0x334512=(_0xd379c3=_0x16deed[_0xbdac0c(0x8a)])==null?void 0x0:_0xd379c3[_0xbdac0c(0xe1)](_0x2b92ac=>_0x2b92ac[_0xbdac0c(0x88)]===_0x2675b6[_0xbdac0c(0xb6)])[_0xbdac0c(0xdd)](_0x1cfd1c=>_0x1cfd1c['rangeId']))!=null?_0x334512:[],_0x84e5ec=JSON['stringify'](_0x16deed),_0x6ce363=_0x1ba6d9[_0xbdac0c(0x99)],_0x57c443=_0x1ba6d9['id'],_0x2f52ae={'memberId':(await this[_0xbdac0c(0xa0)]['requireSession'](_0x57a241))['getMemberID'](),'unitId':_0x57a241,'threadId':_0x6ce363,'mention':_0x26c9cc,'content':_0x84e5ec,'replyId':_0x57c443},_0x4c7335=await this[_0xbdac0c(0xb2)][_0xbdac0c(0xce)](_0xbdac0c(0xea)+_0x57a241+_0xbdac0c(0x8e),{'body':_0x2f52ae});return!_0x4c7335['body'][_0xbdac0c(0xcf)]||_0x4c7335[_0xbdac0c(0xd4)][_0xbdac0c(0xcf)]['code']===0x1;}async[_0x42d6c8(0xd0)](_0x503796){const _0x45d7a1=_0x42d6c8,{unitId:_0x4a0ea9}=_0x503796,_0x59c36f=_0x503796['threadId'],_0x1226bd={'memberId':this[_0x45d7a1(0xde)]['getCurrentUser']()[_0x45d7a1(0xcc)],'unitId':_0x4a0ea9,'threadId':_0x59c36f,'solved':_0x503796['resolved']?I[_0x45d7a1(0xc6)]:I[_0x45d7a1(0xc0)]},_0x122c57=await this[_0x45d7a1(0xb2)][_0x45d7a1(0xce)](_0x45d7a1(0xea)+_0x4a0ea9+_0x45d7a1(0xa5),{'body':_0x1226bd});return!_0x122c57[_0x45d7a1(0xd4)][_0x45d7a1(0xcf)]||_0x122c57['body']['error'][_0x45d7a1(0xdf)]===0x1;}async[_0x42d6c8(0xc2)](_0x4f84b,_0x7943a4,_0x519afe,_0xad7b98){const _0x47fddd=_0x42d6c8,_0x524c3d={'memberId':(await this[_0x47fddd(0xa0)][_0x47fddd(0xe7)](_0x4f84b))[_0x47fddd(0xbf)](),'threadId':_0x519afe,'replyId':_0xad7b98,'unitId':_0x4f84b},_0x27506d=await this['_httpService'][_0x47fddd(0xce)](_0x47fddd(0xea)+_0x4f84b+'/delete',{'body':_0x524c3d});return!_0x27506d[_0x47fddd(0xd4)][_0x47fddd(0xcf)]||_0x27506d['body'][_0x47fddd(0xcf)][_0x47fddd(0xdf)]===0x1;}async['listComments'](_0x17f9eb,_0x1dcda1,_0x56ba25){const _0x2f806e=_0x42d6c8,_0x59dd51={'unitId':_0x17f9eb,'threadId':_0x56ba25},_0x1065be=await this[_0x2f806e(0xb2)][_0x2f806e(0xce)](_0x2f806e(0xea)+_0x17f9eb+_0x2f806e(0xef),{'body':_0x59dd51}),_0x4a082f=_0x56ba25[_0x2f806e(0xdd)](_0x1a51db=>ee(_0x1065be[_0x2f806e(0xd4)][_0x2f806e(0xa7)][_0x1a51db],_0x17f9eb,_0x1dcda1))['filter'](Boolean);return Object[_0x2f806e(0x9b)](_0x1065be['body'][_0x2f806e(0xe5)])[_0x2f806e(0xee)](_0x4da87d=>{const _0x119d42=_0x2f806e;this[_0x119d42(0xde)][_0x119d42(0x97)](_0x4da87d);}),_0x4a082f;}[_0x42d6c8(0xb9)](_0x200390){const _0x3284ff=_0x42d6c8;return{'id':_0x200390['id'],'threadId':_0x200390['threadId'],'ref':_0x200390[_0x3284ff(0xcd)]};}};f=Q([_(0x0,_0x472303(_0x4e8dcc)),_(0x1,_0x472303(_0x7fb736)),_(0x2,_0x472303(_0x251384)),_(0x3,_0x472303(_0x467098))],f);var re=Object[_0x42d6c8(0xe8)],te=(_0x111186,_0x1b9f6f,_0xac75f1,_0x178135)=>{const _0x48d77d=_0x42d6c8;for(var _0x4286ed=_0x178135>0x1?void 0x0:_0x178135?re(_0x1b9f6f,_0xac75f1):_0x1b9f6f,_0x204af2=_0x111186[_0x48d77d(0xb0)]-0x1,_0x59ece1;_0x204af2>=0x0;_0x204af2--)(_0x59ece1=_0x111186[_0x204af2])&&(_0x4286ed=_0x59ece1(_0x4286ed)||_0x4286ed);return _0x4286ed;},N=(_0x5d9210,_0x4eaad4)=>(_0x51a7ce,_0x3d2b17)=>_0x4eaad4(_0x51a7ce,_0x3d2b17,_0x5d9210);let g=class extends _0x526737{constructor(_0x319975,_0x2ac535){const _0x513020=_0x42d6c8;super(),this[_0x513020(0x9e)]=_0x319975,this['_threadCommentDataSource']=_0x2ac535,this['_initDataSource']();}[_0x42d6c8(0xc3)](){const _0x3d2882=_0x42d6c8;this[_0x3d2882(0x9e)][_0x3d2882(0x93)]=this[_0x3d2882(0x9d)],this[_0x3d2882(0x9e)][_0x3d2882(0x9c)]=!0x1;}};g=te([N(0x0,_0x3b16b7),N(0x1,_0x472303(f))],g);var se=Object[_0x42d6c8(0xa9)],oe=Object[_0x42d6c8(0xe8)],ne=(_0x39326c,_0xb65e20,_0x2c5ee5)=>_0xb65e20 in _0x39326c?se(_0x39326c,_0xb65e20,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2c5ee5}):_0x39326c[_0xb65e20]=_0x2c5ee5,ie=(_0x493334,_0x92e46,_0x3e7e74,_0x3779cc)=>{for(var _0x58097b=_0x3779cc>0x1?void 0x0:_0x3779cc?oe(_0x92e46,_0x3e7e74):_0x92e46,_0x3aafc8=_0x493334['length']-0x1,_0x4d0bf8;_0x3aafc8>=0x0;_0x3aafc8--)(_0x4d0bf8=_0x493334[_0x3aafc8])&&(_0x58097b=_0x4d0bf8(_0x58097b)||_0x58097b);return _0x58097b;},w=(_0x11bac2,_0x195d4d)=>(_0x89604c,_0x3e03a4)=>_0x195d4d(_0x89604c,_0x3e03a4,_0x11bac2),$=(_0x59a620,_0x1643aa,_0x524809)=>ne(_0x59a620,typeof _0x1643aa!=_0x42d6c8(0xa2)?_0x1643aa+'':_0x1643aa,_0x524809);let b=class extends _0x5837c0{constructor(_0x18da39=M,_0x44a702,_0x1f3594){const _0x41a741=_0x42d6c8;super(),this[_0x41a741(0xda)]=_0x18da39,this[_0x41a741(0x89)]=_0x44a702,this[_0x41a741(0xd1)]=_0x1f3594;const {..._0xe4006}=_0x1d5c2a({},M,this['_config']);this[_0x41a741(0xd1)][_0x41a741(0xdb)](z,_0xe4006);}[_0x42d6c8(0xe9)](){[[f],[g],[S]]['forEach'](_0x5cd5a8=>{const _0x189612=_0x349d;this[_0x189612(0x89)][_0x189612(0xad)](_0x5cd5a8);});}[_0x42d6c8(0xb5)](){const _0xe7f9bf=_0x42d6c8;this[_0xe7f9bf(0x89)][_0xe7f9bf(0xb8)](g),this[_0xe7f9bf(0x89)][_0xe7f9bf(0xb8)](S);}};$(b,_0x42d6c8(0x8d),W),$(b,_0x42d6c8(0x91),_0x226e69['UNIVER_UNKNOWN']),b=ie([_0x3e7234(_0x47d75a,_0x46ec77,_0x4f39a6),w(0x1,_0x472303(_0x467098)),w(0x2,_0x566806)],b);export{b as UniverThreadCommentDataSourcePlugin};function _0x4366(){const _0x55655b=['_sessionService','addComment','symbol','parse','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/solved','replyId','comments','50739788tJgUgC','defineProperty','pipe','delete','UNRECOGNIZED','add','getUnit','solved','length','rangeId','_httpService','disposeWithMe','find','onReady','COMMENT','replies','get','saveCommentToSnapshot','/universer-api/user/list','Delete','68WtfpJQ','getComment','10141848KSqjaa','getMemberID','OpenOrReOpen','_commentService','deleteComment','_initDataSource','userId','YYYY/MM/DD\x20HH:mm','Solved','Edit','unitId','4504848YetFXz','parentId','/add','userID','ref','post','error','resolveComment','_configService','9037016ezhWRi','comment','body','updateComment','Solve','commentUpdate$','Unknown','28ZXRtBF','_config','setConfig','324395cfznjS','map','_userService','code','_threadCommentModel','filter','thread-comment-data-source.config','getUser','_init','users','613642ZUVrVr','requireSession','getOwnPropertyDescriptor','onStarting','/universer-api/comment/unit/','10Kraduv','subscribe','user','forEach','/list','rangeType','_injector','customRanges','Add','createTimestamp','pluginName','/edit','format','Reply','type','/reply','dataSource','personId','content','slice','addUser','646854FbaCyG','threadId','2TgaCSm','values','syncUpdateMutationToColla','_threadCommentDataSource','_threadCommentDataSourceService','root'];_0x4366=function(){return _0x55655b;};return _0x4366();}
1
+ const _0x3b930f=_0x1ed9;(function(_0x5a3fab,_0x3ade56){const _0x3ea66c=_0x1ed9,_0x3ef367=_0x5a3fab();while(!![]){try{const _0xcdaca2=-parseInt(_0x3ea66c(0x129))/0x1+-parseInt(_0x3ea66c(0xfd))/0x2+parseInt(_0x3ea66c(0x12a))/0x3*(-parseInt(_0x3ea66c(0x127))/0x4)+parseInt(_0x3ea66c(0x107))/0x5*(-parseInt(_0x3ea66c(0xf5))/0x6)+parseInt(_0x3ea66c(0x112))/0x7+parseInt(_0x3ea66c(0x13c))/0x8+parseInt(_0x3ea66c(0x11a))/0x9;if(_0xcdaca2===_0x3ade56)break;else _0x3ef367['push'](_0x3ef367['shift']());}catch(_0x52b464){_0x3ef367['push'](_0x3ef367['shift']());}}}(_0x11e5,0x80c64));import{CommentService as _0x414f8e,CollaborationSessionService as _0xaef2a2,UniverCollaborationClientPlugin as _0x3bdf52}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x176e92}from'@univerjs-pro/license';import{dayjs as _0x3c880e,UserManagerService as _0x3fb608,Inject as _0x437bc6,Injector as _0x15a572,Disposable as _0x3ff554,CustomRangeType as _0x391546,UniverInstanceType as _0x2b9512,DependentOn as _0x4931c0,IConfigService as _0x3f3f83,Plugin as _0x346ee2,merge as _0x4332ff}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x281989}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x421bc8,IThreadCommentDataSourceService as _0x46dea4}from'@univerjs/thread-comment';import{bufferTime as _0xc510e8}from'rxjs';import{HTTPService as _0xe8b063}from'@univerjs/network';const W=_0x3b930f(0x111);var I=(_0x2aab50=>(_0x2aab50[_0x2aab50[_0x3b930f(0x120)]=0x0]=_0x3b930f(0x120),_0x2aab50[_0x2aab50['Solved']=0x1]=_0x3b930f(0x135),_0x2aab50[_0x2aab50[_0x3b930f(0xf0)]=-0x1]='UNRECOGNIZED',_0x2aab50))(I||{}),v=(_0x48069c=>(_0x48069c[_0x48069c[_0x3b930f(0x11c)]=0x0]='Unknown',_0x48069c[_0x48069c['Add']=0x1]='Add',_0x48069c[_0x48069c['Reply']=0x2]=_0x3b930f(0xf6),_0x48069c[_0x48069c[_0x3b930f(0xee)]=0x3]=_0x3b930f(0xee),_0x48069c[_0x48069c['Delete']=0x4]=_0x3b930f(0x130),_0x48069c[_0x48069c[_0x3b930f(0x10c)]=0x5]='Solve',_0x48069c[_0x48069c[_0x3b930f(0xf0)]=-0x1]=_0x3b930f(0xf0),_0x48069c))(v||{});function _0x11e5(){const _0x23d012=['Solved','replies','saveCommentToSnapshot','post','length','getMemberID','reply','1293144wrbHDR','rangeType','UNIVER_UNKNOWN','deleteComment','getCurrentUser','/solved','/universer-api/comment/unit/','user','listComments','/add','disposeWithMe','_initUserSync','addUser','body','error','userID','Edit','get','UNRECOGNIZED','/edit','slice','getUnit','subscribe','2086662cQtWvm','Reply','personId','solved','rangeId','_httpService','content','_sessionService','893016zUjMuY','unitId','resolved','stringify','find','filter','onReady','addComment','delete','parentId','5LWJdqV','code','type','pluginName','replyId','Solve','comment','_configService','/reply','Add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','3443958lBpuAH','YYYY/MM/DD\x20HH:mm','resolveComment','pipe','userId','_threadCommentModel','_initDataSource','COMMENT','11855880LKIHvu','requireSession','Unknown','/universer-api/user/list','users','_injector','OpenOrReOpen','_init','getOwnPropertyDescriptor','add','map','updateComment','_threadCommentDataSource','64TfgAtO','createTimestamp','301180sMAWPu','65256vORMem','forEach','onStarting','_commentService','defineProperty','customRanges','Delete','_threadCommentDataSourceService','threadId','_userService','root'];_0x11e5=function(){return _0x23d012;};return _0x11e5();}const D=_0x271d0a=>_0x3c880e(new Date(+_0x271d0a))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x1ab571,_0x2b3a92)=>{const _0xb3ffa9=_0x3b930f,_0xa0a89a=_0x1ab571['get'](_0x3fb608),_0x3d3b8d=_0x1ab571[_0xb3ffa9(0xef)](_0xe8b063);_0x2b3a92[_0xb3ffa9(0x12b)](_0x58b7f8=>{const _0x48c244=_0xb3ffa9;_0xa0a89a['getUser'](_0x58b7f8)&&_0x2b3a92[_0x48c244(0x105)](_0x58b7f8);}),_0x2b3a92['size']&&(await _0x3d3b8d['get'](_0xb3ffa9(0x11d),{'params':{'userIDs':[..._0x2b3a92]}}))[_0xb3ffa9(0xeb)][_0xb3ffa9(0x11e)][_0xb3ffa9(0x12b)](_0x54ed3e=>{const _0x34de63=_0xb3ffa9;_0x54ed3e&&_0xa0a89a[_0x34de63(0x148)](_0x54ed3e);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x15fdc0,_0x4ea8f0,_0x1958bd,_0x54f7ce)=>{const _0x1bf965=_0x3b930f;for(var _0x498005=_0x54f7ce>0x1?void 0x0:_0x54f7ce?K(_0x4ea8f0,_0x1958bd):_0x4ea8f0,_0x4e55d5=_0x15fdc0[_0x1bf965(0x139)]-0x1,_0x112a0b;_0x4e55d5>=0x0;_0x4e55d5--)(_0x112a0b=_0x15fdc0[_0x4e55d5])&&(_0x498005=_0x112a0b(_0x498005)||_0x498005);return _0x498005;},p=(_0x5391a2,_0x241a9f)=>(_0x2e1745,_0x243d99)=>_0x241a9f(_0x2e1745,_0x243d99,_0x5391a2);let S=class extends _0x3ff554{constructor(_0x1b5939,_0x2a573e,_0x1f82b5,_0x68359b){const _0x5a55f0=_0x3b930f;super(),this[_0x5a55f0(0x12d)]=_0x1b5939,this['_threadCommentModel']=_0x2a573e,this[_0x5a55f0(0x133)]=_0x1f82b5,this[_0x5a55f0(0x11f)]=_0x68359b,this[_0x5a55f0(0x121)](),this[_0x5a55f0(0x147)]();}[_0x3b930f(0x147)](){const _0x374dc8=_0x3b930f;this[_0x374dc8(0x146)](this['_threadCommentModel']['commentUpdate$'][_0x374dc8(0x115)](_0xc510e8(0x10))[_0x374dc8(0xf4)](_0x4661ba=>{const _0x12238c=new Set();_0x4661ba['forEach'](_0x46014a=>{const _0x2af8bb=_0x1ed9;switch(_0x46014a[_0x2af8bb(0x109)]){case _0x2af8bb(0x123):{const _0x1e6a99=_0x46014a['payload'][_0x2af8bb(0xf7)];_0x12238c[_0x2af8bb(0x123)](_0x1e6a99);break;}}}),B(this['_injector'],_0x12238c);}));}[_0x3b930f(0x121)](){const _0x1f8fc6=_0x3b930f;this[_0x1f8fc6(0x146)](this[_0x1f8fc6(0x12d)]['commentUpdate$']['subscribe'](async _0x459ee9=>{const _0x1c309e=_0x1f8fc6;var _0x4afa11,_0x259f0b,_0x1318cb,_0xebc42;const _0x476976=(_0x4afa11=this['_threadCommentModel'][_0x1c309e(0xf3)](_0x459ee9[_0x1c309e(0xfe)])[_0x1c309e(0x101)](_0x3266a5=>_0x3266a5[_0x1c309e(0x132)]===_0x459ee9[_0x1c309e(0x132)]))==null?void 0x0:_0x4afa11[_0x1c309e(0x134)];if(!_0x476976)return;const {unitId:_0x479142,subUnitId:_0x334bcd}=_0x476976;switch(_0x459ee9['user']&&this[_0x1c309e(0x133)][_0x1c309e(0x148)](_0x459ee9[_0x1c309e(0x143)]),_0x459ee9[_0x1c309e(0x109)]){case v[_0x1c309e(0x110)]:break;case v[_0x1c309e(0xf6)]:{this[_0x1c309e(0x117)][_0x1c309e(0x104)](_0x479142,_0x334bcd,{'unitId':_0x479142,'subUnitId':_0x334bcd,'ref':'','id':_0x459ee9[_0x1c309e(0x10b)],'dT':D(+_0x459ee9[_0x1c309e(0x128)]),'threadId':_0x459ee9[_0x1c309e(0x132)],'personId':(_0x1318cb=(_0x259f0b=_0x459ee9['user'])==null?void 0x0:_0x259f0b[_0x1c309e(0xed)])!=null?_0x1318cb:_0x459ee9[_0x1c309e(0x116)],'text':JSON['parse'](_0x459ee9[_0x1c309e(0xfb)]),'parentId':_0x476976['id']});break;}case v[_0x1c309e(0x130)]:{const _0x341547=this[_0x1c309e(0x117)]['getComment'](_0x479142,_0x334bcd,_0x459ee9[_0x1c309e(0x10b)]);_0x341547&&_0x341547[_0x1c309e(0x106)]&&this[_0x1c309e(0x117)][_0x1c309e(0x13f)](_0x479142,_0x334bcd,_0x459ee9[_0x1c309e(0x10b)]);break;}case v['Edit']:{this[_0x1c309e(0x117)][_0x1c309e(0x125)](_0x479142,_0x334bcd,{'commentId':_0x459ee9[_0x1c309e(0x10b)],'text':JSON['parse'](_0x459ee9[_0x1c309e(0xfb)])});break;}case v[_0x1c309e(0x10c)]:{const _0x60e75f=(_0xebc42=this[_0x1c309e(0x117)]['getUnit'](_0x459ee9[_0x1c309e(0xfe)])['find'](_0x485c6a=>_0x485c6a['threadId']===_0x459ee9[_0x1c309e(0x132)]))==null?void 0x0:_0xebc42[_0x1c309e(0x134)];_0x60e75f&&this[_0x1c309e(0x117)][_0x1c309e(0x114)](_0x479142,_0x334bcd,_0x60e75f['id'],_0x459ee9[_0x1c309e(0xf8)]===I[_0x1c309e(0x135)]);break;}}}));}};S=V([p(0x0,_0x437bc6(_0x414f8e)),p(0x1,_0x437bc6(_0x421bc8)),p(0x2,_0x437bc6(_0x3fb608)),p(0x3,_0x437bc6(_0x15a572))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x3b930f(0x122)],Q=(_0x6f8fec,_0x204480,_0x4e9b83,_0xa425ec)=>{const _0x449e11=_0x3b930f;for(var _0x15eed5=_0xa425ec>0x1?void 0x0:_0xa425ec?k(_0x204480,_0x4e9b83):_0x204480,_0x20bae6=_0x6f8fec[_0x449e11(0x139)]-0x1,_0x551f65;_0x20bae6>=0x0;_0x20bae6--)(_0x551f65=_0x6f8fec[_0x20bae6])&&(_0x15eed5=_0x551f65(_0x15eed5)||_0x15eed5);return _0x15eed5;},_=(_0x29e1e2,_0x2f89ef)=>(_0x6ef2d8,_0x460e8d)=>_0x2f89ef(_0x6ef2d8,_0x460e8d,_0x29e1e2);function X(_0x593227,_0x565992){const _0x5a77f5=_0x3b930f,_0x67525=_0x593227[_0x5a77f5(0x136)][0x0];return{..._0x565992,'id':_0x67525[_0x5a77f5(0x10b)],'resolved':_0x593227[_0x5a77f5(0xf8)]===0x1,'dT':D(_0x67525['createTimestamp']),'personId':_0x67525[_0x5a77f5(0x116)],'threadId':_0x67525['threadId']};}function ee(_0x52b7e2,_0x2b5c4a,_0x418d3c){const _0x103567=_0x3b930f;var _0xa98da6,_0x491cde;if(((_0x491cde=(_0xa98da6=_0x52b7e2==null?void 0x0:_0x52b7e2['replies'])==null?void 0x0:_0xa98da6['length'])!=null?_0x491cde:0x0)>0x0){const _0x27e079=(_0x2e6e6d,_0x27e73d)=>({'id':_0x2e6e6d[_0x103567(0x10b)],'threadId':_0x2e6e6d[_0x103567(0x132)],'dT':D(_0x2e6e6d[_0x103567(0x128)]),'personId':_0x2e6e6d[_0x103567(0x116)],'resolved':_0x52b7e2[_0x103567(0xf8)]===I['Solved'],'unitId':_0x2b5c4a,'subUnitId':_0x418d3c,'text':JSON['parse'](_0x2e6e6d[_0x103567(0xfb)]),'parentId':_0x27e73d}),_0xada8ed=_0x27e079(_0x52b7e2['replies'][0x0]);return{..._0xada8ed,'children':_0x52b7e2[_0x103567(0x136)][_0x103567(0xf2)](0x1)[_0x103567(0x124)](_0x57233f=>_0x27e079(_0x57233f,_0xada8ed['id']))};}return null;}let f=class{constructor(_0x430bdc,_0x31ce5e,_0x49fbcc,_0x8fe9b4){const _0x695651=_0x3b930f;this[_0x695651(0xfa)]=_0x430bdc,this[_0x695651(0x133)]=_0x31ce5e,this[_0x695651(0xfc)]=_0x49fbcc,this[_0x695651(0x11f)]=_0x8fe9b4;}async[_0x3b930f(0x104)](_0x2449da){const _0x5a0cd8=_0x3b930f;var _0x2f3643,_0x458f4d;const {parentId:_0x4d7db2,unitId:_0x457d04,text:_0x1b2ce0,threadId:_0x236616}=_0x2449da,_0x34619f=(_0x458f4d=(_0x2f3643=_0x1b2ce0[_0x5a0cd8(0x12f)])==null?void 0x0:_0x2f3643[_0x5a0cd8(0x102)](_0x232130=>_0x232130['rangeType']===_0x391546[_0x5a0cd8(0x119)])['map'](_0x1f0213=>_0x1f0213[_0x5a0cd8(0xf9)]))!=null?_0x458f4d:[],_0x172a16=JSON[_0x5a0cd8(0x100)](_0x1b2ce0),_0x38930d=(await this[_0x5a0cd8(0xfc)][_0x5a0cd8(0x11b)](_0x457d04))[_0x5a0cd8(0x13a)]();if(_0x4d7db2){const _0x4ff271={'memberId':_0x38930d,'unitId':_0x457d04,'content':_0x172a16,'mention':_0x34619f,'threadId':_0x236616},_0x484b55=(await this['_httpService']['post'](_0x5a0cd8(0x142)+_0x457d04+_0x5a0cd8(0x10f),{'body':_0x4ff271}))[_0x5a0cd8(0xeb)][_0x5a0cd8(0x13b)];return{..._0x2449da,'id':_0x484b55['replyId'],'dT':_0x3c880e(+_0x484b55[_0x5a0cd8(0x128)])['format'](_0x5a0cd8(0x113)),'personId':_0x484b55[_0x5a0cd8(0x116)]};}else{const _0x4e242f={'memberId':_0x38930d,'unitId':_0x457d04,'content':_0x172a16,'mention':_0x34619f},_0x369710=await this[_0x5a0cd8(0xfa)]['post']('/universer-api/comment/unit/'+_0x457d04+_0x5a0cd8(0x145),{'body':_0x4e242f});return X(_0x369710[_0x5a0cd8(0xeb)][_0x5a0cd8(0x10d)],_0x2449da);}}async[_0x3b930f(0x125)](_0x157618){const _0x5a8437=_0x3b930f;var _0x1bf790,_0x52192e;const {text:_0x140c1e,unitId:_0x47360c}=_0x157618,_0x591a64=(_0x52192e=(_0x1bf790=_0x140c1e[_0x5a8437(0x12f)])==null?void 0x0:_0x1bf790['filter'](_0x40f8ce=>_0x40f8ce[_0x5a8437(0x13d)]===_0x391546[_0x5a8437(0x119)])['map'](_0x50b84f=>_0x50b84f[_0x5a8437(0xf9)]))!=null?_0x52192e:[],_0x2c4b35=JSON[_0x5a8437(0x100)](_0x140c1e),_0x40dd89=_0x157618[_0x5a8437(0x132)],_0x4c9327=_0x157618['id'],_0x26001c={'memberId':(await this['_sessionService'][_0x5a8437(0x11b)](_0x47360c))[_0x5a8437(0x13a)](),'unitId':_0x47360c,'threadId':_0x40dd89,'mention':_0x591a64,'content':_0x2c4b35,'replyId':_0x4c9327},_0x28bd79=await this[_0x5a8437(0xfa)][_0x5a8437(0x138)](_0x5a8437(0x142)+_0x47360c+_0x5a8437(0xf1),{'body':_0x26001c});return!_0x28bd79['body'][_0x5a8437(0xec)]||_0x28bd79[_0x5a8437(0xeb)][_0x5a8437(0xec)][_0x5a8437(0x108)]===0x1;}async[_0x3b930f(0x114)](_0x5da6b9){const _0x154749=_0x3b930f,{unitId:_0x367c9c}=_0x5da6b9,_0x3d552d=_0x5da6b9[_0x154749(0x132)],_0x5a4581={'memberId':this[_0x154749(0x133)][_0x154749(0x140)]()[_0x154749(0xed)],'unitId':_0x367c9c,'threadId':_0x3d552d,'solved':_0x5da6b9[_0x154749(0xff)]?I[_0x154749(0x135)]:I['OpenOrReOpen']},_0x42d576=await this[_0x154749(0xfa)][_0x154749(0x138)](_0x154749(0x142)+_0x367c9c+_0x154749(0x141),{'body':_0x5a4581});return!_0x42d576[_0x154749(0xeb)]['error']||_0x42d576['body']['error'][_0x154749(0x108)]===0x1;}async[_0x3b930f(0x13f)](_0x1f798a,_0x2acf35,_0x39c7b0,_0x55400d){const _0x5c70bf=_0x3b930f,_0x236d2f={'memberId':(await this[_0x5c70bf(0xfc)][_0x5c70bf(0x11b)](_0x1f798a))[_0x5c70bf(0x13a)](),'threadId':_0x39c7b0,'replyId':_0x55400d,'unitId':_0x1f798a},_0x49c651=await this['_httpService'][_0x5c70bf(0x138)]('/universer-api/comment/unit/'+_0x1f798a+'/delete',{'body':_0x236d2f});return!_0x49c651['body'][_0x5c70bf(0xec)]||_0x49c651[_0x5c70bf(0xeb)][_0x5c70bf(0xec)]['code']===0x1;}async[_0x3b930f(0x144)](_0xc37af0,_0x5c4f68,_0x4d5c74){const _0x2a4cdd=_0x3b930f,_0x5e8b7c={'unitId':_0xc37af0,'threadId':_0x4d5c74},_0x4caa36=await this[_0x2a4cdd(0xfa)][_0x2a4cdd(0x138)](_0x2a4cdd(0x142)+_0xc37af0+'/list',{'body':_0x5e8b7c}),_0x5c8961=_0x4d5c74['map'](_0x2a4e6e=>ee(_0x4caa36[_0x2a4cdd(0xeb)]['comments'][_0x2a4e6e],_0xc37af0,_0x5c4f68))[_0x2a4cdd(0x102)](Boolean);return Object['values'](_0x4caa36['body'][_0x2a4cdd(0x11e)])[_0x2a4cdd(0x12b)](_0x2c6de4=>{const _0x31e655=_0x2a4cdd;this[_0x31e655(0x133)][_0x31e655(0x148)](_0x2c6de4);}),_0x5c8961;}[_0x3b930f(0x137)](_0x389478){const _0x380898=_0x3b930f;return{'id':_0x389478['id'],'threadId':_0x389478[_0x380898(0x132)],'ref':_0x389478['ref']};}};f=Q([_(0x0,_0x437bc6(_0xe8b063)),_(0x1,_0x437bc6(_0x3fb608)),_(0x2,_0x437bc6(_0xaef2a2)),_(0x3,_0x437bc6(_0x15a572))],f);function _0x1ed9(_0x1306fd,_0x3ec92a){const _0x11e519=_0x11e5();return _0x1ed9=function(_0x1ed926,_0x1066b1){_0x1ed926=_0x1ed926-0xeb;let _0x4d5ad7=_0x11e519[_0x1ed926];return _0x4d5ad7;},_0x1ed9(_0x1306fd,_0x3ec92a);}var re=Object['getOwnPropertyDescriptor'],te=(_0xaea167,_0x1ba864,_0x936e0b,_0xdc0046)=>{const _0x17eb2e=_0x3b930f;for(var _0x42a239=_0xdc0046>0x1?void 0x0:_0xdc0046?re(_0x1ba864,_0x936e0b):_0x1ba864,_0x5e366d=_0xaea167[_0x17eb2e(0x139)]-0x1,_0xb2cbce;_0x5e366d>=0x0;_0x5e366d--)(_0xb2cbce=_0xaea167[_0x5e366d])&&(_0x42a239=_0xb2cbce(_0x42a239)||_0x42a239);return _0x42a239;},N=(_0x51b8ae,_0x4cce0f)=>(_0x9a728d,_0x101f9e)=>_0x4cce0f(_0x9a728d,_0x101f9e,_0x51b8ae);let g=class extends _0x3ff554{constructor(_0x37c57d,_0x1c5598){const _0x9f3955=_0x3b930f;super(),this[_0x9f3955(0x131)]=_0x37c57d,this[_0x9f3955(0x126)]=_0x1c5598,this[_0x9f3955(0x118)]();}['_initDataSource'](){const _0x3ecae6=_0x3b930f;this[_0x3ecae6(0x131)]['dataSource']=this[_0x3ecae6(0x126)],this[_0x3ecae6(0x131)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x46dea4),N(0x1,_0x437bc6(f))],g);var se=Object[_0x3b930f(0x12e)],oe=Object[_0x3b930f(0x122)],ne=(_0x43f9e7,_0x36949b,_0x4d2ef5)=>_0x36949b in _0x43f9e7?se(_0x43f9e7,_0x36949b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4d2ef5}):_0x43f9e7[_0x36949b]=_0x4d2ef5,ie=(_0x274387,_0x4e6235,_0x1ffd47,_0x4c2d8e)=>{for(var _0x823a41=_0x4c2d8e>0x1?void 0x0:_0x4c2d8e?oe(_0x4e6235,_0x1ffd47):_0x4e6235,_0x51024=_0x274387['length']-0x1,_0xfb48ea;_0x51024>=0x0;_0x51024--)(_0xfb48ea=_0x274387[_0x51024])&&(_0x823a41=_0xfb48ea(_0x823a41)||_0x823a41);return _0x823a41;},w=(_0x7a87d0,_0x31e103)=>(_0x4e80aa,_0x5215fe)=>_0x31e103(_0x4e80aa,_0x5215fe,_0x7a87d0),$=(_0x1beb94,_0xb556b,_0x410d98)=>ne(_0x1beb94,typeof _0xb556b!='symbol'?_0xb556b+'':_0xb556b,_0x410d98);let b=class extends _0x346ee2{constructor(_0x5d9882=M,_0x4c0805,_0x539a8f){const _0xa6b322=_0x3b930f;super(),this['_config']=_0x5d9882,this['_injector']=_0x4c0805,this[_0xa6b322(0x10e)]=_0x539a8f;const {..._0x415b8d}=_0x4332ff({},M,this['_config']);this[_0xa6b322(0x10e)]['setConfig'](z,_0x415b8d);}[_0x3b930f(0x12c)](){const _0x3985a0=_0x3b930f;[[f],[g],[S]][_0x3985a0(0x12b)](_0x5a57c0=>{const _0x330dc7=_0x3985a0;this[_0x330dc7(0x11f)]['add'](_0x5a57c0);});}[_0x3b930f(0x103)](){const _0x208e6d=_0x3b930f;this['_injector'][_0x208e6d(0xef)](g),this['_injector'][_0x208e6d(0xef)](S);}};$(b,_0x3b930f(0x10a),W),$(b,_0x3b930f(0x109),_0x2b9512[_0x3b930f(0x13e)]),b=ie([_0x4931c0(_0x281989,_0x3bdf52,_0x176e92),w(0x1,_0x437bc6(_0x15a572)),w(0x2,_0x3f3f83)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x42d6c8=_0x349d;(function(_0x3183ad,_0x136b00){const _0x110aed=_0x349d,_0x59da92=_0x3183ad();while(!![]){try{const _0x328e0b=-parseInt(_0x110aed(0x9a))/0x1*(parseInt(_0x110aed(0xe6))/0x2)+-parseInt(_0x110aed(0xc9))/0x3+parseInt(_0x110aed(0xbc))/0x4*(-parseInt(_0x110aed(0xdc))/0x5)+-parseInt(_0x110aed(0x98))/0x6*(parseInt(_0x110aed(0xd9))/0x7)+-parseInt(_0x110aed(0xd2))/0x8+parseInt(_0x110aed(0xbe))/0x9+-parseInt(_0x110aed(0xeb))/0xa*(-parseInt(_0x110aed(0xa8))/0xb);if(_0x328e0b===_0x136b00)break;else _0x59da92['push'](_0x59da92['shift']());}catch(_0x1b4338){_0x59da92['push'](_0x59da92['shift']());}}}(_0x4366,0xea804));import{CommentService as _0x533446,CollaborationSessionService as _0x251384,UniverCollaborationClientPlugin as _0x46ec77}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4f39a6}from'@univerjs-pro/license';import{dayjs as _0xfb9cd8,UserManagerService as _0x7fb736,Inject as _0x472303,Injector as _0x467098,Disposable as _0x526737,CustomRangeType as _0x2675b6,UniverInstanceType as _0x226e69,DependentOn as _0x3e7234,IConfigService as _0x566806,Plugin as _0x5837c0,merge as _0x1d5c2a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x47d75a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3f067b,IThreadCommentDataSourceService as _0x3b16b7}from'@univerjs/thread-comment';import{bufferTime as _0xe62590}from'rxjs';import{HTTPService as _0x4e8dcc}from'@univerjs/network';const W=_0x42d6c8(0xa4);var I=(_0x239ba0=>(_0x239ba0[_0x239ba0[_0x42d6c8(0xc0)]=0x0]=_0x42d6c8(0xc0),_0x239ba0[_0x239ba0['Solved']=0x1]=_0x42d6c8(0xc6),_0x239ba0[_0x239ba0['UNRECOGNIZED']=-0x1]=_0x42d6c8(0xac),_0x239ba0))(I||{}),v=(_0x4915e5=>(_0x4915e5[_0x4915e5[_0x42d6c8(0xd8)]=0x0]='Unknown',_0x4915e5[_0x4915e5['Add']=0x1]=_0x42d6c8(0x8b),_0x4915e5[_0x4915e5[_0x42d6c8(0x90)]=0x2]=_0x42d6c8(0x90),_0x4915e5[_0x4915e5[_0x42d6c8(0xc7)]=0x3]='Edit',_0x4915e5[_0x4915e5['Delete']=0x4]=_0x42d6c8(0xbb),_0x4915e5[_0x4915e5['Solve']=0x5]=_0x42d6c8(0xd6),_0x4915e5[_0x4915e5[_0x42d6c8(0xac)]=-0x1]=_0x42d6c8(0xac),_0x4915e5))(v||{});const D=_0x41e408=>_0xfb9cd8(new Date(+_0x41e408))[_0x42d6c8(0x8f)](_0x42d6c8(0xc5)),B=async(_0x263d31,_0x2171fd)=>{const _0x5b35df=_0x42d6c8,_0x576e04=_0x263d31['get'](_0x7fb736),_0x346964=_0x263d31[_0x5b35df(0xb8)](_0x4e8dcc);_0x2171fd[_0x5b35df(0xee)](_0x2f3815=>{const _0x31c53a=_0x5b35df;_0x576e04[_0x31c53a(0xe3)](_0x2f3815)&&_0x2171fd[_0x31c53a(0xab)](_0x2f3815);}),_0x2171fd['size']&&(await _0x346964[_0x5b35df(0xb8)](_0x5b35df(0xba),{'params':{'userIDs':[..._0x2171fd]}}))[_0x5b35df(0xd4)][_0x5b35df(0xe5)]['forEach'](_0x2789e4=>{_0x2789e4&&_0x576e04['addUser'](_0x2789e4);});};var K=Object[_0x42d6c8(0xe8)],V=(_0xf1da94,_0x19022d,_0x56b4c0,_0x128ade)=>{for(var _0x469081=_0x128ade>0x1?void 0x0:_0x128ade?K(_0x19022d,_0x56b4c0):_0x19022d,_0x214c63=_0xf1da94['length']-0x1,_0x547c4b;_0x214c63>=0x0;_0x214c63--)(_0x547c4b=_0xf1da94[_0x214c63])&&(_0x469081=_0x547c4b(_0x469081)||_0x469081);return _0x469081;},p=(_0x1e1f8b,_0x38f5c7)=>(_0x32e4d6,_0x125888)=>_0x38f5c7(_0x32e4d6,_0x125888,_0x1e1f8b);function _0x349d(_0x5da02b,_0x358b03){const _0x4366a2=_0x4366();return _0x349d=function(_0x349dcc,_0x290545){_0x349dcc=_0x349dcc-0x88;let _0x1c618e=_0x4366a2[_0x349dcc];return _0x1c618e;},_0x349d(_0x5da02b,_0x358b03);}let S=class extends _0x526737{constructor(_0xf2189a,_0x5e08d8,_0x5e723a,_0x34b380){const _0x1414fa=_0x42d6c8;super(),this[_0x1414fa(0xc1)]=_0xf2189a,this[_0x1414fa(0xe0)]=_0x5e08d8,this[_0x1414fa(0xde)]=_0x5e723a,this[_0x1414fa(0x89)]=_0x34b380,this[_0x1414fa(0xe4)](),this['_initUserSync']();}['_initUserSync'](){const _0x4ddede=_0x42d6c8;this['disposeWithMe'](this[_0x4ddede(0xe0)][_0x4ddede(0xd7)][_0x4ddede(0xaa)](_0xe62590(0x10))[_0x4ddede(0xec)](_0x55ed07=>{const _0x3ea18e=_0x4ddede,_0x16ad70=new Set();_0x55ed07[_0x3ea18e(0xee)](_0x51f4de=>{const _0x2eeca3=_0x3ea18e;switch(_0x51f4de[_0x2eeca3(0x91)]){case'add':{const _0x2ec707=_0x51f4de['payload'][_0x2eeca3(0x94)];_0x16ad70['add'](_0x2ec707);break;}}}),B(this[_0x3ea18e(0x89)],_0x16ad70);}));}[_0x42d6c8(0xe4)](){const _0x1337a8=_0x42d6c8;this[_0x1337a8(0xb3)](this[_0x1337a8(0xc1)]['commentUpdate$']['subscribe'](async _0x5ae4e5=>{const _0x40ad59=_0x1337a8;var _0x2648fb,_0x335a3e,_0x67ad07,_0x115db0;const _0x11e167=(_0x2648fb=this['_threadCommentModel']['getUnit'](_0x5ae4e5[_0x40ad59(0xc8)])[_0x40ad59(0xb4)](_0x1b3e96=>_0x1b3e96[_0x40ad59(0x99)]===_0x5ae4e5[_0x40ad59(0x99)]))==null?void 0x0:_0x2648fb[_0x40ad59(0x9f)];if(!_0x11e167)return;const {unitId:_0x1c68d1,subUnitId:_0x4894c3}=_0x11e167;switch(_0x5ae4e5[_0x40ad59(0xed)]&&this[_0x40ad59(0xde)]['addUser'](_0x5ae4e5[_0x40ad59(0xed)]),_0x5ae4e5[_0x40ad59(0x91)]){case v[_0x40ad59(0x8b)]:break;case v['Reply']:{this[_0x40ad59(0xe0)]['addComment'](_0x1c68d1,_0x4894c3,{'unitId':_0x1c68d1,'subUnitId':_0x4894c3,'ref':'','id':_0x5ae4e5[_0x40ad59(0xa6)],'dT':D(+_0x5ae4e5[_0x40ad59(0x8c)]),'threadId':_0x5ae4e5[_0x40ad59(0x99)],'personId':(_0x67ad07=(_0x335a3e=_0x5ae4e5[_0x40ad59(0xed)])==null?void 0x0:_0x335a3e['userID'])!=null?_0x67ad07:_0x5ae4e5[_0x40ad59(0xc4)],'text':JSON[_0x40ad59(0xa3)](_0x5ae4e5[_0x40ad59(0x95)]),'parentId':_0x11e167['id']});break;}case v['Delete']:{const _0x2c50e7=this[_0x40ad59(0xe0)][_0x40ad59(0xbd)](_0x1c68d1,_0x4894c3,_0x5ae4e5[_0x40ad59(0xa6)]);_0x2c50e7&&_0x2c50e7[_0x40ad59(0xca)]&&this[_0x40ad59(0xe0)][_0x40ad59(0xc2)](_0x1c68d1,_0x4894c3,_0x5ae4e5[_0x40ad59(0xa6)]);break;}case v[_0x40ad59(0xc7)]:{this[_0x40ad59(0xe0)][_0x40ad59(0xd5)](_0x1c68d1,_0x4894c3,{'commentId':_0x5ae4e5['replyId'],'text':JSON['parse'](_0x5ae4e5[_0x40ad59(0x95)])});break;}case v[_0x40ad59(0xd6)]:{const _0x4e32aa=(_0x115db0=this['_threadCommentModel'][_0x40ad59(0xae)](_0x5ae4e5[_0x40ad59(0xc8)])['find'](_0x525d31=>_0x525d31[_0x40ad59(0x99)]===_0x5ae4e5['threadId']))==null?void 0x0:_0x115db0[_0x40ad59(0x9f)];_0x4e32aa&&this[_0x40ad59(0xe0)][_0x40ad59(0xd0)](_0x1c68d1,_0x4894c3,_0x4e32aa['id'],_0x5ae4e5[_0x40ad59(0xaf)]===I[_0x40ad59(0xc6)]);break;}}}));}};S=V([p(0x0,_0x472303(_0x533446)),p(0x1,_0x472303(_0x3f067b)),p(0x2,_0x472303(_0x7fb736)),p(0x3,_0x472303(_0x467098))],S);const z=_0x42d6c8(0xe2),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x3d3472,_0x1a28d1,_0x4c068d,_0x3f4e3c)=>{for(var _0xab116b=_0x3f4e3c>0x1?void 0x0:_0x3f4e3c?k(_0x1a28d1,_0x4c068d):_0x1a28d1,_0x4573f6=_0x3d3472['length']-0x1,_0x59d157;_0x4573f6>=0x0;_0x4573f6--)(_0x59d157=_0x3d3472[_0x4573f6])&&(_0xab116b=_0x59d157(_0xab116b)||_0xab116b);return _0xab116b;},_=(_0x38d7ed,_0x14ea5d)=>(_0x58010f,_0x3efd9d)=>_0x14ea5d(_0x58010f,_0x3efd9d,_0x38d7ed);function X(_0x48c492,_0x4476ac){const _0x2269ca=_0x42d6c8,_0x485343=_0x48c492[_0x2269ca(0xb7)][0x0];return{..._0x4476ac,'id':_0x485343[_0x2269ca(0xa6)],'resolved':_0x48c492[_0x2269ca(0xaf)]===0x1,'dT':D(_0x485343['createTimestamp']),'personId':_0x485343[_0x2269ca(0xc4)],'threadId':_0x485343[_0x2269ca(0x99)]};}function ee(_0x486ad4,_0x4fbd3c,_0x4980df){const _0x2d2d59=_0x42d6c8;var _0x4978a8,_0x1d97cf;if(((_0x1d97cf=(_0x4978a8=_0x486ad4==null?void 0x0:_0x486ad4[_0x2d2d59(0xb7)])==null?void 0x0:_0x4978a8[_0x2d2d59(0xb0)])!=null?_0x1d97cf:0x0)>0x0){const _0xc4beaf=(_0x49dd0e,_0x860956)=>({'id':_0x49dd0e[_0x2d2d59(0xa6)],'threadId':_0x49dd0e[_0x2d2d59(0x99)],'dT':D(_0x49dd0e[_0x2d2d59(0x8c)]),'personId':_0x49dd0e[_0x2d2d59(0xc4)],'resolved':_0x486ad4[_0x2d2d59(0xaf)]===I[_0x2d2d59(0xc6)],'unitId':_0x4fbd3c,'subUnitId':_0x4980df,'text':JSON[_0x2d2d59(0xa3)](_0x49dd0e[_0x2d2d59(0x95)]),'parentId':_0x860956}),_0x374c5d=_0xc4beaf(_0x486ad4[_0x2d2d59(0xb7)][0x0]);return{..._0x374c5d,'children':_0x486ad4[_0x2d2d59(0xb7)][_0x2d2d59(0x96)](0x1)[_0x2d2d59(0xdd)](_0x5e5e5e=>_0xc4beaf(_0x5e5e5e,_0x374c5d['id']))};}return null;}let f=class{constructor(_0x3337,_0x4aec0e,_0x481023,_0x2c33b){const _0x11cb65=_0x42d6c8;this[_0x11cb65(0xb2)]=_0x3337,this[_0x11cb65(0xde)]=_0x4aec0e,this['_sessionService']=_0x481023,this['_injector']=_0x2c33b;}async[_0x42d6c8(0xa1)](_0x444fc8){const _0x43bdf0=_0x42d6c8;var _0x3aa470,_0x52cdbd;const {parentId:_0x32a98c,unitId:_0xd95eab,text:_0x3ccacb,threadId:_0x2d4701}=_0x444fc8,_0x5ce452=(_0x52cdbd=(_0x3aa470=_0x3ccacb['customRanges'])==null?void 0x0:_0x3aa470[_0x43bdf0(0xe1)](_0x118f0c=>_0x118f0c[_0x43bdf0(0x88)]===_0x2675b6[_0x43bdf0(0xb6)])[_0x43bdf0(0xdd)](_0x150134=>_0x150134[_0x43bdf0(0xb1)]))!=null?_0x52cdbd:[],_0x2f9f12=JSON['stringify'](_0x3ccacb),_0x41497a=(await this[_0x43bdf0(0xa0)][_0x43bdf0(0xe7)](_0xd95eab))[_0x43bdf0(0xbf)]();if(_0x32a98c){const _0x2fec15={'memberId':_0x41497a,'unitId':_0xd95eab,'content':_0x2f9f12,'mention':_0x5ce452,'threadId':_0x2d4701},_0x225829=(await this[_0x43bdf0(0xb2)]['post'](_0x43bdf0(0xea)+_0xd95eab+_0x43bdf0(0x92),{'body':_0x2fec15}))[_0x43bdf0(0xd4)]['reply'];return{..._0x444fc8,'id':_0x225829[_0x43bdf0(0xa6)],'dT':_0xfb9cd8(+_0x225829['createTimestamp'])[_0x43bdf0(0x8f)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x225829[_0x43bdf0(0xc4)]};}else{const _0x1f40ec={'memberId':_0x41497a,'unitId':_0xd95eab,'content':_0x2f9f12,'mention':_0x5ce452},_0x5046af=await this[_0x43bdf0(0xb2)][_0x43bdf0(0xce)](_0x43bdf0(0xea)+_0xd95eab+_0x43bdf0(0xcb),{'body':_0x1f40ec});return X(_0x5046af[_0x43bdf0(0xd4)][_0x43bdf0(0xd3)],_0x444fc8);}}async[_0x42d6c8(0xd5)](_0x1ba6d9){const _0xbdac0c=_0x42d6c8;var _0xd379c3,_0x334512;const {text:_0x16deed,unitId:_0x57a241}=_0x1ba6d9,_0x26c9cc=(_0x334512=(_0xd379c3=_0x16deed[_0xbdac0c(0x8a)])==null?void 0x0:_0xd379c3[_0xbdac0c(0xe1)](_0x2b92ac=>_0x2b92ac[_0xbdac0c(0x88)]===_0x2675b6[_0xbdac0c(0xb6)])[_0xbdac0c(0xdd)](_0x1cfd1c=>_0x1cfd1c['rangeId']))!=null?_0x334512:[],_0x84e5ec=JSON['stringify'](_0x16deed),_0x6ce363=_0x1ba6d9[_0xbdac0c(0x99)],_0x57c443=_0x1ba6d9['id'],_0x2f52ae={'memberId':(await this[_0xbdac0c(0xa0)]['requireSession'](_0x57a241))['getMemberID'](),'unitId':_0x57a241,'threadId':_0x6ce363,'mention':_0x26c9cc,'content':_0x84e5ec,'replyId':_0x57c443},_0x4c7335=await this[_0xbdac0c(0xb2)][_0xbdac0c(0xce)](_0xbdac0c(0xea)+_0x57a241+_0xbdac0c(0x8e),{'body':_0x2f52ae});return!_0x4c7335['body'][_0xbdac0c(0xcf)]||_0x4c7335[_0xbdac0c(0xd4)][_0xbdac0c(0xcf)]['code']===0x1;}async[_0x42d6c8(0xd0)](_0x503796){const _0x45d7a1=_0x42d6c8,{unitId:_0x4a0ea9}=_0x503796,_0x59c36f=_0x503796['threadId'],_0x1226bd={'memberId':this[_0x45d7a1(0xde)]['getCurrentUser']()[_0x45d7a1(0xcc)],'unitId':_0x4a0ea9,'threadId':_0x59c36f,'solved':_0x503796['resolved']?I[_0x45d7a1(0xc6)]:I[_0x45d7a1(0xc0)]},_0x122c57=await this[_0x45d7a1(0xb2)][_0x45d7a1(0xce)](_0x45d7a1(0xea)+_0x4a0ea9+_0x45d7a1(0xa5),{'body':_0x1226bd});return!_0x122c57[_0x45d7a1(0xd4)][_0x45d7a1(0xcf)]||_0x122c57['body']['error'][_0x45d7a1(0xdf)]===0x1;}async[_0x42d6c8(0xc2)](_0x4f84b,_0x7943a4,_0x519afe,_0xad7b98){const _0x47fddd=_0x42d6c8,_0x524c3d={'memberId':(await this[_0x47fddd(0xa0)][_0x47fddd(0xe7)](_0x4f84b))[_0x47fddd(0xbf)](),'threadId':_0x519afe,'replyId':_0xad7b98,'unitId':_0x4f84b},_0x27506d=await this['_httpService'][_0x47fddd(0xce)](_0x47fddd(0xea)+_0x4f84b+'/delete',{'body':_0x524c3d});return!_0x27506d[_0x47fddd(0xd4)][_0x47fddd(0xcf)]||_0x27506d['body'][_0x47fddd(0xcf)][_0x47fddd(0xdf)]===0x1;}async['listComments'](_0x17f9eb,_0x1dcda1,_0x56ba25){const _0x2f806e=_0x42d6c8,_0x59dd51={'unitId':_0x17f9eb,'threadId':_0x56ba25},_0x1065be=await this[_0x2f806e(0xb2)][_0x2f806e(0xce)](_0x2f806e(0xea)+_0x17f9eb+_0x2f806e(0xef),{'body':_0x59dd51}),_0x4a082f=_0x56ba25[_0x2f806e(0xdd)](_0x1a51db=>ee(_0x1065be[_0x2f806e(0xd4)][_0x2f806e(0xa7)][_0x1a51db],_0x17f9eb,_0x1dcda1))['filter'](Boolean);return Object[_0x2f806e(0x9b)](_0x1065be['body'][_0x2f806e(0xe5)])[_0x2f806e(0xee)](_0x4da87d=>{const _0x119d42=_0x2f806e;this[_0x119d42(0xde)][_0x119d42(0x97)](_0x4da87d);}),_0x4a082f;}[_0x42d6c8(0xb9)](_0x200390){const _0x3284ff=_0x42d6c8;return{'id':_0x200390['id'],'threadId':_0x200390['threadId'],'ref':_0x200390[_0x3284ff(0xcd)]};}};f=Q([_(0x0,_0x472303(_0x4e8dcc)),_(0x1,_0x472303(_0x7fb736)),_(0x2,_0x472303(_0x251384)),_(0x3,_0x472303(_0x467098))],f);var re=Object[_0x42d6c8(0xe8)],te=(_0x111186,_0x1b9f6f,_0xac75f1,_0x178135)=>{const _0x48d77d=_0x42d6c8;for(var _0x4286ed=_0x178135>0x1?void 0x0:_0x178135?re(_0x1b9f6f,_0xac75f1):_0x1b9f6f,_0x204af2=_0x111186[_0x48d77d(0xb0)]-0x1,_0x59ece1;_0x204af2>=0x0;_0x204af2--)(_0x59ece1=_0x111186[_0x204af2])&&(_0x4286ed=_0x59ece1(_0x4286ed)||_0x4286ed);return _0x4286ed;},N=(_0x5d9210,_0x4eaad4)=>(_0x51a7ce,_0x3d2b17)=>_0x4eaad4(_0x51a7ce,_0x3d2b17,_0x5d9210);let g=class extends _0x526737{constructor(_0x319975,_0x2ac535){const _0x513020=_0x42d6c8;super(),this[_0x513020(0x9e)]=_0x319975,this['_threadCommentDataSource']=_0x2ac535,this['_initDataSource']();}[_0x42d6c8(0xc3)](){const _0x3d2882=_0x42d6c8;this[_0x3d2882(0x9e)][_0x3d2882(0x93)]=this[_0x3d2882(0x9d)],this[_0x3d2882(0x9e)][_0x3d2882(0x9c)]=!0x1;}};g=te([N(0x0,_0x3b16b7),N(0x1,_0x472303(f))],g);var se=Object[_0x42d6c8(0xa9)],oe=Object[_0x42d6c8(0xe8)],ne=(_0x39326c,_0xb65e20,_0x2c5ee5)=>_0xb65e20 in _0x39326c?se(_0x39326c,_0xb65e20,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2c5ee5}):_0x39326c[_0xb65e20]=_0x2c5ee5,ie=(_0x493334,_0x92e46,_0x3e7e74,_0x3779cc)=>{for(var _0x58097b=_0x3779cc>0x1?void 0x0:_0x3779cc?oe(_0x92e46,_0x3e7e74):_0x92e46,_0x3aafc8=_0x493334['length']-0x1,_0x4d0bf8;_0x3aafc8>=0x0;_0x3aafc8--)(_0x4d0bf8=_0x493334[_0x3aafc8])&&(_0x58097b=_0x4d0bf8(_0x58097b)||_0x58097b);return _0x58097b;},w=(_0x11bac2,_0x195d4d)=>(_0x89604c,_0x3e03a4)=>_0x195d4d(_0x89604c,_0x3e03a4,_0x11bac2),$=(_0x59a620,_0x1643aa,_0x524809)=>ne(_0x59a620,typeof _0x1643aa!=_0x42d6c8(0xa2)?_0x1643aa+'':_0x1643aa,_0x524809);let b=class extends _0x5837c0{constructor(_0x18da39=M,_0x44a702,_0x1f3594){const _0x41a741=_0x42d6c8;super(),this[_0x41a741(0xda)]=_0x18da39,this[_0x41a741(0x89)]=_0x44a702,this[_0x41a741(0xd1)]=_0x1f3594;const {..._0xe4006}=_0x1d5c2a({},M,this['_config']);this[_0x41a741(0xd1)][_0x41a741(0xdb)](z,_0xe4006);}[_0x42d6c8(0xe9)](){[[f],[g],[S]]['forEach'](_0x5cd5a8=>{const _0x189612=_0x349d;this[_0x189612(0x89)][_0x189612(0xad)](_0x5cd5a8);});}[_0x42d6c8(0xb5)](){const _0xe7f9bf=_0x42d6c8;this[_0xe7f9bf(0x89)][_0xe7f9bf(0xb8)](g),this[_0xe7f9bf(0x89)][_0xe7f9bf(0xb8)](S);}};$(b,_0x42d6c8(0x8d),W),$(b,_0x42d6c8(0x91),_0x226e69['UNIVER_UNKNOWN']),b=ie([_0x3e7234(_0x47d75a,_0x46ec77,_0x4f39a6),w(0x1,_0x472303(_0x467098)),w(0x2,_0x566806)],b);export{b as UniverThreadCommentDataSourcePlugin};function _0x4366(){const _0x55655b=['_sessionService','addComment','symbol','parse','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/solved','replyId','comments','50739788tJgUgC','defineProperty','pipe','delete','UNRECOGNIZED','add','getUnit','solved','length','rangeId','_httpService','disposeWithMe','find','onReady','COMMENT','replies','get','saveCommentToSnapshot','/universer-api/user/list','Delete','68WtfpJQ','getComment','10141848KSqjaa','getMemberID','OpenOrReOpen','_commentService','deleteComment','_initDataSource','userId','YYYY/MM/DD\x20HH:mm','Solved','Edit','unitId','4504848YetFXz','parentId','/add','userID','ref','post','error','resolveComment','_configService','9037016ezhWRi','comment','body','updateComment','Solve','commentUpdate$','Unknown','28ZXRtBF','_config','setConfig','324395cfznjS','map','_userService','code','_threadCommentModel','filter','thread-comment-data-source.config','getUser','_init','users','613642ZUVrVr','requireSession','getOwnPropertyDescriptor','onStarting','/universer-api/comment/unit/','10Kraduv','subscribe','user','forEach','/list','rangeType','_injector','customRanges','Add','createTimestamp','pluginName','/edit','format','Reply','type','/reply','dataSource','personId','content','slice','addUser','646854FbaCyG','threadId','2TgaCSm','values','syncUpdateMutationToColla','_threadCommentDataSource','_threadCommentDataSourceService','root'];_0x4366=function(){return _0x55655b;};return _0x4366();}
1
+ const _0x3b930f=_0x1ed9;(function(_0x5a3fab,_0x3ade56){const _0x3ea66c=_0x1ed9,_0x3ef367=_0x5a3fab();while(!![]){try{const _0xcdaca2=-parseInt(_0x3ea66c(0x129))/0x1+-parseInt(_0x3ea66c(0xfd))/0x2+parseInt(_0x3ea66c(0x12a))/0x3*(-parseInt(_0x3ea66c(0x127))/0x4)+parseInt(_0x3ea66c(0x107))/0x5*(-parseInt(_0x3ea66c(0xf5))/0x6)+parseInt(_0x3ea66c(0x112))/0x7+parseInt(_0x3ea66c(0x13c))/0x8+parseInt(_0x3ea66c(0x11a))/0x9;if(_0xcdaca2===_0x3ade56)break;else _0x3ef367['push'](_0x3ef367['shift']());}catch(_0x52b464){_0x3ef367['push'](_0x3ef367['shift']());}}}(_0x11e5,0x80c64));import{CommentService as _0x414f8e,CollaborationSessionService as _0xaef2a2,UniverCollaborationClientPlugin as _0x3bdf52}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x176e92}from'@univerjs-pro/license';import{dayjs as _0x3c880e,UserManagerService as _0x3fb608,Inject as _0x437bc6,Injector as _0x15a572,Disposable as _0x3ff554,CustomRangeType as _0x391546,UniverInstanceType as _0x2b9512,DependentOn as _0x4931c0,IConfigService as _0x3f3f83,Plugin as _0x346ee2,merge as _0x4332ff}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x281989}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x421bc8,IThreadCommentDataSourceService as _0x46dea4}from'@univerjs/thread-comment';import{bufferTime as _0xc510e8}from'rxjs';import{HTTPService as _0xe8b063}from'@univerjs/network';const W=_0x3b930f(0x111);var I=(_0x2aab50=>(_0x2aab50[_0x2aab50[_0x3b930f(0x120)]=0x0]=_0x3b930f(0x120),_0x2aab50[_0x2aab50['Solved']=0x1]=_0x3b930f(0x135),_0x2aab50[_0x2aab50[_0x3b930f(0xf0)]=-0x1]='UNRECOGNIZED',_0x2aab50))(I||{}),v=(_0x48069c=>(_0x48069c[_0x48069c[_0x3b930f(0x11c)]=0x0]='Unknown',_0x48069c[_0x48069c['Add']=0x1]='Add',_0x48069c[_0x48069c['Reply']=0x2]=_0x3b930f(0xf6),_0x48069c[_0x48069c[_0x3b930f(0xee)]=0x3]=_0x3b930f(0xee),_0x48069c[_0x48069c['Delete']=0x4]=_0x3b930f(0x130),_0x48069c[_0x48069c[_0x3b930f(0x10c)]=0x5]='Solve',_0x48069c[_0x48069c[_0x3b930f(0xf0)]=-0x1]=_0x3b930f(0xf0),_0x48069c))(v||{});function _0x11e5(){const _0x23d012=['Solved','replies','saveCommentToSnapshot','post','length','getMemberID','reply','1293144wrbHDR','rangeType','UNIVER_UNKNOWN','deleteComment','getCurrentUser','/solved','/universer-api/comment/unit/','user','listComments','/add','disposeWithMe','_initUserSync','addUser','body','error','userID','Edit','get','UNRECOGNIZED','/edit','slice','getUnit','subscribe','2086662cQtWvm','Reply','personId','solved','rangeId','_httpService','content','_sessionService','893016zUjMuY','unitId','resolved','stringify','find','filter','onReady','addComment','delete','parentId','5LWJdqV','code','type','pluginName','replyId','Solve','comment','_configService','/reply','Add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','3443958lBpuAH','YYYY/MM/DD\x20HH:mm','resolveComment','pipe','userId','_threadCommentModel','_initDataSource','COMMENT','11855880LKIHvu','requireSession','Unknown','/universer-api/user/list','users','_injector','OpenOrReOpen','_init','getOwnPropertyDescriptor','add','map','updateComment','_threadCommentDataSource','64TfgAtO','createTimestamp','301180sMAWPu','65256vORMem','forEach','onStarting','_commentService','defineProperty','customRanges','Delete','_threadCommentDataSourceService','threadId','_userService','root'];_0x11e5=function(){return _0x23d012;};return _0x11e5();}const D=_0x271d0a=>_0x3c880e(new Date(+_0x271d0a))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x1ab571,_0x2b3a92)=>{const _0xb3ffa9=_0x3b930f,_0xa0a89a=_0x1ab571['get'](_0x3fb608),_0x3d3b8d=_0x1ab571[_0xb3ffa9(0xef)](_0xe8b063);_0x2b3a92[_0xb3ffa9(0x12b)](_0x58b7f8=>{const _0x48c244=_0xb3ffa9;_0xa0a89a['getUser'](_0x58b7f8)&&_0x2b3a92[_0x48c244(0x105)](_0x58b7f8);}),_0x2b3a92['size']&&(await _0x3d3b8d['get'](_0xb3ffa9(0x11d),{'params':{'userIDs':[..._0x2b3a92]}}))[_0xb3ffa9(0xeb)][_0xb3ffa9(0x11e)][_0xb3ffa9(0x12b)](_0x54ed3e=>{const _0x34de63=_0xb3ffa9;_0x54ed3e&&_0xa0a89a[_0x34de63(0x148)](_0x54ed3e);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x15fdc0,_0x4ea8f0,_0x1958bd,_0x54f7ce)=>{const _0x1bf965=_0x3b930f;for(var _0x498005=_0x54f7ce>0x1?void 0x0:_0x54f7ce?K(_0x4ea8f0,_0x1958bd):_0x4ea8f0,_0x4e55d5=_0x15fdc0[_0x1bf965(0x139)]-0x1,_0x112a0b;_0x4e55d5>=0x0;_0x4e55d5--)(_0x112a0b=_0x15fdc0[_0x4e55d5])&&(_0x498005=_0x112a0b(_0x498005)||_0x498005);return _0x498005;},p=(_0x5391a2,_0x241a9f)=>(_0x2e1745,_0x243d99)=>_0x241a9f(_0x2e1745,_0x243d99,_0x5391a2);let S=class extends _0x3ff554{constructor(_0x1b5939,_0x2a573e,_0x1f82b5,_0x68359b){const _0x5a55f0=_0x3b930f;super(),this[_0x5a55f0(0x12d)]=_0x1b5939,this['_threadCommentModel']=_0x2a573e,this[_0x5a55f0(0x133)]=_0x1f82b5,this[_0x5a55f0(0x11f)]=_0x68359b,this[_0x5a55f0(0x121)](),this[_0x5a55f0(0x147)]();}[_0x3b930f(0x147)](){const _0x374dc8=_0x3b930f;this[_0x374dc8(0x146)](this['_threadCommentModel']['commentUpdate$'][_0x374dc8(0x115)](_0xc510e8(0x10))[_0x374dc8(0xf4)](_0x4661ba=>{const _0x12238c=new Set();_0x4661ba['forEach'](_0x46014a=>{const _0x2af8bb=_0x1ed9;switch(_0x46014a[_0x2af8bb(0x109)]){case _0x2af8bb(0x123):{const _0x1e6a99=_0x46014a['payload'][_0x2af8bb(0xf7)];_0x12238c[_0x2af8bb(0x123)](_0x1e6a99);break;}}}),B(this['_injector'],_0x12238c);}));}[_0x3b930f(0x121)](){const _0x1f8fc6=_0x3b930f;this[_0x1f8fc6(0x146)](this[_0x1f8fc6(0x12d)]['commentUpdate$']['subscribe'](async _0x459ee9=>{const _0x1c309e=_0x1f8fc6;var _0x4afa11,_0x259f0b,_0x1318cb,_0xebc42;const _0x476976=(_0x4afa11=this['_threadCommentModel'][_0x1c309e(0xf3)](_0x459ee9[_0x1c309e(0xfe)])[_0x1c309e(0x101)](_0x3266a5=>_0x3266a5[_0x1c309e(0x132)]===_0x459ee9[_0x1c309e(0x132)]))==null?void 0x0:_0x4afa11[_0x1c309e(0x134)];if(!_0x476976)return;const {unitId:_0x479142,subUnitId:_0x334bcd}=_0x476976;switch(_0x459ee9['user']&&this[_0x1c309e(0x133)][_0x1c309e(0x148)](_0x459ee9[_0x1c309e(0x143)]),_0x459ee9[_0x1c309e(0x109)]){case v[_0x1c309e(0x110)]:break;case v[_0x1c309e(0xf6)]:{this[_0x1c309e(0x117)][_0x1c309e(0x104)](_0x479142,_0x334bcd,{'unitId':_0x479142,'subUnitId':_0x334bcd,'ref':'','id':_0x459ee9[_0x1c309e(0x10b)],'dT':D(+_0x459ee9[_0x1c309e(0x128)]),'threadId':_0x459ee9[_0x1c309e(0x132)],'personId':(_0x1318cb=(_0x259f0b=_0x459ee9['user'])==null?void 0x0:_0x259f0b[_0x1c309e(0xed)])!=null?_0x1318cb:_0x459ee9[_0x1c309e(0x116)],'text':JSON['parse'](_0x459ee9[_0x1c309e(0xfb)]),'parentId':_0x476976['id']});break;}case v[_0x1c309e(0x130)]:{const _0x341547=this[_0x1c309e(0x117)]['getComment'](_0x479142,_0x334bcd,_0x459ee9[_0x1c309e(0x10b)]);_0x341547&&_0x341547[_0x1c309e(0x106)]&&this[_0x1c309e(0x117)][_0x1c309e(0x13f)](_0x479142,_0x334bcd,_0x459ee9[_0x1c309e(0x10b)]);break;}case v['Edit']:{this[_0x1c309e(0x117)][_0x1c309e(0x125)](_0x479142,_0x334bcd,{'commentId':_0x459ee9[_0x1c309e(0x10b)],'text':JSON['parse'](_0x459ee9[_0x1c309e(0xfb)])});break;}case v[_0x1c309e(0x10c)]:{const _0x60e75f=(_0xebc42=this[_0x1c309e(0x117)]['getUnit'](_0x459ee9[_0x1c309e(0xfe)])['find'](_0x485c6a=>_0x485c6a['threadId']===_0x459ee9[_0x1c309e(0x132)]))==null?void 0x0:_0xebc42[_0x1c309e(0x134)];_0x60e75f&&this[_0x1c309e(0x117)][_0x1c309e(0x114)](_0x479142,_0x334bcd,_0x60e75f['id'],_0x459ee9[_0x1c309e(0xf8)]===I[_0x1c309e(0x135)]);break;}}}));}};S=V([p(0x0,_0x437bc6(_0x414f8e)),p(0x1,_0x437bc6(_0x421bc8)),p(0x2,_0x437bc6(_0x3fb608)),p(0x3,_0x437bc6(_0x15a572))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x3b930f(0x122)],Q=(_0x6f8fec,_0x204480,_0x4e9b83,_0xa425ec)=>{const _0x449e11=_0x3b930f;for(var _0x15eed5=_0xa425ec>0x1?void 0x0:_0xa425ec?k(_0x204480,_0x4e9b83):_0x204480,_0x20bae6=_0x6f8fec[_0x449e11(0x139)]-0x1,_0x551f65;_0x20bae6>=0x0;_0x20bae6--)(_0x551f65=_0x6f8fec[_0x20bae6])&&(_0x15eed5=_0x551f65(_0x15eed5)||_0x15eed5);return _0x15eed5;},_=(_0x29e1e2,_0x2f89ef)=>(_0x6ef2d8,_0x460e8d)=>_0x2f89ef(_0x6ef2d8,_0x460e8d,_0x29e1e2);function X(_0x593227,_0x565992){const _0x5a77f5=_0x3b930f,_0x67525=_0x593227[_0x5a77f5(0x136)][0x0];return{..._0x565992,'id':_0x67525[_0x5a77f5(0x10b)],'resolved':_0x593227[_0x5a77f5(0xf8)]===0x1,'dT':D(_0x67525['createTimestamp']),'personId':_0x67525[_0x5a77f5(0x116)],'threadId':_0x67525['threadId']};}function ee(_0x52b7e2,_0x2b5c4a,_0x418d3c){const _0x103567=_0x3b930f;var _0xa98da6,_0x491cde;if(((_0x491cde=(_0xa98da6=_0x52b7e2==null?void 0x0:_0x52b7e2['replies'])==null?void 0x0:_0xa98da6['length'])!=null?_0x491cde:0x0)>0x0){const _0x27e079=(_0x2e6e6d,_0x27e73d)=>({'id':_0x2e6e6d[_0x103567(0x10b)],'threadId':_0x2e6e6d[_0x103567(0x132)],'dT':D(_0x2e6e6d[_0x103567(0x128)]),'personId':_0x2e6e6d[_0x103567(0x116)],'resolved':_0x52b7e2[_0x103567(0xf8)]===I['Solved'],'unitId':_0x2b5c4a,'subUnitId':_0x418d3c,'text':JSON['parse'](_0x2e6e6d[_0x103567(0xfb)]),'parentId':_0x27e73d}),_0xada8ed=_0x27e079(_0x52b7e2['replies'][0x0]);return{..._0xada8ed,'children':_0x52b7e2[_0x103567(0x136)][_0x103567(0xf2)](0x1)[_0x103567(0x124)](_0x57233f=>_0x27e079(_0x57233f,_0xada8ed['id']))};}return null;}let f=class{constructor(_0x430bdc,_0x31ce5e,_0x49fbcc,_0x8fe9b4){const _0x695651=_0x3b930f;this[_0x695651(0xfa)]=_0x430bdc,this[_0x695651(0x133)]=_0x31ce5e,this[_0x695651(0xfc)]=_0x49fbcc,this[_0x695651(0x11f)]=_0x8fe9b4;}async[_0x3b930f(0x104)](_0x2449da){const _0x5a0cd8=_0x3b930f;var _0x2f3643,_0x458f4d;const {parentId:_0x4d7db2,unitId:_0x457d04,text:_0x1b2ce0,threadId:_0x236616}=_0x2449da,_0x34619f=(_0x458f4d=(_0x2f3643=_0x1b2ce0[_0x5a0cd8(0x12f)])==null?void 0x0:_0x2f3643[_0x5a0cd8(0x102)](_0x232130=>_0x232130['rangeType']===_0x391546[_0x5a0cd8(0x119)])['map'](_0x1f0213=>_0x1f0213[_0x5a0cd8(0xf9)]))!=null?_0x458f4d:[],_0x172a16=JSON[_0x5a0cd8(0x100)](_0x1b2ce0),_0x38930d=(await this[_0x5a0cd8(0xfc)][_0x5a0cd8(0x11b)](_0x457d04))[_0x5a0cd8(0x13a)]();if(_0x4d7db2){const _0x4ff271={'memberId':_0x38930d,'unitId':_0x457d04,'content':_0x172a16,'mention':_0x34619f,'threadId':_0x236616},_0x484b55=(await this['_httpService']['post'](_0x5a0cd8(0x142)+_0x457d04+_0x5a0cd8(0x10f),{'body':_0x4ff271}))[_0x5a0cd8(0xeb)][_0x5a0cd8(0x13b)];return{..._0x2449da,'id':_0x484b55['replyId'],'dT':_0x3c880e(+_0x484b55[_0x5a0cd8(0x128)])['format'](_0x5a0cd8(0x113)),'personId':_0x484b55[_0x5a0cd8(0x116)]};}else{const _0x4e242f={'memberId':_0x38930d,'unitId':_0x457d04,'content':_0x172a16,'mention':_0x34619f},_0x369710=await this[_0x5a0cd8(0xfa)]['post']('/universer-api/comment/unit/'+_0x457d04+_0x5a0cd8(0x145),{'body':_0x4e242f});return X(_0x369710[_0x5a0cd8(0xeb)][_0x5a0cd8(0x10d)],_0x2449da);}}async[_0x3b930f(0x125)](_0x157618){const _0x5a8437=_0x3b930f;var _0x1bf790,_0x52192e;const {text:_0x140c1e,unitId:_0x47360c}=_0x157618,_0x591a64=(_0x52192e=(_0x1bf790=_0x140c1e[_0x5a8437(0x12f)])==null?void 0x0:_0x1bf790['filter'](_0x40f8ce=>_0x40f8ce[_0x5a8437(0x13d)]===_0x391546[_0x5a8437(0x119)])['map'](_0x50b84f=>_0x50b84f[_0x5a8437(0xf9)]))!=null?_0x52192e:[],_0x2c4b35=JSON[_0x5a8437(0x100)](_0x140c1e),_0x40dd89=_0x157618[_0x5a8437(0x132)],_0x4c9327=_0x157618['id'],_0x26001c={'memberId':(await this['_sessionService'][_0x5a8437(0x11b)](_0x47360c))[_0x5a8437(0x13a)](),'unitId':_0x47360c,'threadId':_0x40dd89,'mention':_0x591a64,'content':_0x2c4b35,'replyId':_0x4c9327},_0x28bd79=await this[_0x5a8437(0xfa)][_0x5a8437(0x138)](_0x5a8437(0x142)+_0x47360c+_0x5a8437(0xf1),{'body':_0x26001c});return!_0x28bd79['body'][_0x5a8437(0xec)]||_0x28bd79[_0x5a8437(0xeb)][_0x5a8437(0xec)][_0x5a8437(0x108)]===0x1;}async[_0x3b930f(0x114)](_0x5da6b9){const _0x154749=_0x3b930f,{unitId:_0x367c9c}=_0x5da6b9,_0x3d552d=_0x5da6b9[_0x154749(0x132)],_0x5a4581={'memberId':this[_0x154749(0x133)][_0x154749(0x140)]()[_0x154749(0xed)],'unitId':_0x367c9c,'threadId':_0x3d552d,'solved':_0x5da6b9[_0x154749(0xff)]?I[_0x154749(0x135)]:I['OpenOrReOpen']},_0x42d576=await this[_0x154749(0xfa)][_0x154749(0x138)](_0x154749(0x142)+_0x367c9c+_0x154749(0x141),{'body':_0x5a4581});return!_0x42d576[_0x154749(0xeb)]['error']||_0x42d576['body']['error'][_0x154749(0x108)]===0x1;}async[_0x3b930f(0x13f)](_0x1f798a,_0x2acf35,_0x39c7b0,_0x55400d){const _0x5c70bf=_0x3b930f,_0x236d2f={'memberId':(await this[_0x5c70bf(0xfc)][_0x5c70bf(0x11b)](_0x1f798a))[_0x5c70bf(0x13a)](),'threadId':_0x39c7b0,'replyId':_0x55400d,'unitId':_0x1f798a},_0x49c651=await this['_httpService'][_0x5c70bf(0x138)]('/universer-api/comment/unit/'+_0x1f798a+'/delete',{'body':_0x236d2f});return!_0x49c651['body'][_0x5c70bf(0xec)]||_0x49c651[_0x5c70bf(0xeb)][_0x5c70bf(0xec)]['code']===0x1;}async[_0x3b930f(0x144)](_0xc37af0,_0x5c4f68,_0x4d5c74){const _0x2a4cdd=_0x3b930f,_0x5e8b7c={'unitId':_0xc37af0,'threadId':_0x4d5c74},_0x4caa36=await this[_0x2a4cdd(0xfa)][_0x2a4cdd(0x138)](_0x2a4cdd(0x142)+_0xc37af0+'/list',{'body':_0x5e8b7c}),_0x5c8961=_0x4d5c74['map'](_0x2a4e6e=>ee(_0x4caa36[_0x2a4cdd(0xeb)]['comments'][_0x2a4e6e],_0xc37af0,_0x5c4f68))[_0x2a4cdd(0x102)](Boolean);return Object['values'](_0x4caa36['body'][_0x2a4cdd(0x11e)])[_0x2a4cdd(0x12b)](_0x2c6de4=>{const _0x31e655=_0x2a4cdd;this[_0x31e655(0x133)][_0x31e655(0x148)](_0x2c6de4);}),_0x5c8961;}[_0x3b930f(0x137)](_0x389478){const _0x380898=_0x3b930f;return{'id':_0x389478['id'],'threadId':_0x389478[_0x380898(0x132)],'ref':_0x389478['ref']};}};f=Q([_(0x0,_0x437bc6(_0xe8b063)),_(0x1,_0x437bc6(_0x3fb608)),_(0x2,_0x437bc6(_0xaef2a2)),_(0x3,_0x437bc6(_0x15a572))],f);function _0x1ed9(_0x1306fd,_0x3ec92a){const _0x11e519=_0x11e5();return _0x1ed9=function(_0x1ed926,_0x1066b1){_0x1ed926=_0x1ed926-0xeb;let _0x4d5ad7=_0x11e519[_0x1ed926];return _0x4d5ad7;},_0x1ed9(_0x1306fd,_0x3ec92a);}var re=Object['getOwnPropertyDescriptor'],te=(_0xaea167,_0x1ba864,_0x936e0b,_0xdc0046)=>{const _0x17eb2e=_0x3b930f;for(var _0x42a239=_0xdc0046>0x1?void 0x0:_0xdc0046?re(_0x1ba864,_0x936e0b):_0x1ba864,_0x5e366d=_0xaea167[_0x17eb2e(0x139)]-0x1,_0xb2cbce;_0x5e366d>=0x0;_0x5e366d--)(_0xb2cbce=_0xaea167[_0x5e366d])&&(_0x42a239=_0xb2cbce(_0x42a239)||_0x42a239);return _0x42a239;},N=(_0x51b8ae,_0x4cce0f)=>(_0x9a728d,_0x101f9e)=>_0x4cce0f(_0x9a728d,_0x101f9e,_0x51b8ae);let g=class extends _0x3ff554{constructor(_0x37c57d,_0x1c5598){const _0x9f3955=_0x3b930f;super(),this[_0x9f3955(0x131)]=_0x37c57d,this[_0x9f3955(0x126)]=_0x1c5598,this[_0x9f3955(0x118)]();}['_initDataSource'](){const _0x3ecae6=_0x3b930f;this[_0x3ecae6(0x131)]['dataSource']=this[_0x3ecae6(0x126)],this[_0x3ecae6(0x131)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x46dea4),N(0x1,_0x437bc6(f))],g);var se=Object[_0x3b930f(0x12e)],oe=Object[_0x3b930f(0x122)],ne=(_0x43f9e7,_0x36949b,_0x4d2ef5)=>_0x36949b in _0x43f9e7?se(_0x43f9e7,_0x36949b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4d2ef5}):_0x43f9e7[_0x36949b]=_0x4d2ef5,ie=(_0x274387,_0x4e6235,_0x1ffd47,_0x4c2d8e)=>{for(var _0x823a41=_0x4c2d8e>0x1?void 0x0:_0x4c2d8e?oe(_0x4e6235,_0x1ffd47):_0x4e6235,_0x51024=_0x274387['length']-0x1,_0xfb48ea;_0x51024>=0x0;_0x51024--)(_0xfb48ea=_0x274387[_0x51024])&&(_0x823a41=_0xfb48ea(_0x823a41)||_0x823a41);return _0x823a41;},w=(_0x7a87d0,_0x31e103)=>(_0x4e80aa,_0x5215fe)=>_0x31e103(_0x4e80aa,_0x5215fe,_0x7a87d0),$=(_0x1beb94,_0xb556b,_0x410d98)=>ne(_0x1beb94,typeof _0xb556b!='symbol'?_0xb556b+'':_0xb556b,_0x410d98);let b=class extends _0x346ee2{constructor(_0x5d9882=M,_0x4c0805,_0x539a8f){const _0xa6b322=_0x3b930f;super(),this['_config']=_0x5d9882,this['_injector']=_0x4c0805,this[_0xa6b322(0x10e)]=_0x539a8f;const {..._0x415b8d}=_0x4332ff({},M,this['_config']);this[_0xa6b322(0x10e)]['setConfig'](z,_0x415b8d);}[_0x3b930f(0x12c)](){const _0x3985a0=_0x3b930f;[[f],[g],[S]][_0x3985a0(0x12b)](_0x5a57c0=>{const _0x330dc7=_0x3985a0;this[_0x330dc7(0x11f)]['add'](_0x5a57c0);});}[_0x3b930f(0x103)](){const _0x208e6d=_0x3b930f;this['_injector'][_0x208e6d(0xef)](g),this['_injector'][_0x208e6d(0xef)](S);}};$(b,_0x3b930f(0x10a),W),$(b,_0x3b930f(0x109),_0x2b9512[_0x3b930f(0x13e)]),b=ie([_0x4931c0(_0x281989,_0x3bdf52,_0x176e92),w(0x1,_0x437bc6(_0x15a572)),w(0x2,_0x3f3f83)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0xbc9ace,_0x59654f){const _0x4430bb=_0x53a2,_0x50b143=_0xbc9ace();while(!![]){try{const _0x2484ca=-parseInt(_0x4430bb(0x193))/0x1+parseInt(_0x4430bb(0x196))/0x2*(-parseInt(_0x4430bb(0x1dd))/0x3)+-parseInt(_0x4430bb(0x15d))/0x4*(parseInt(_0x4430bb(0x1c8))/0x5)+-parseInt(_0x4430bb(0x1c0))/0x6+parseInt(_0x4430bb(0x1a8))/0x7+-parseInt(_0x4430bb(0x15c))/0x8*(parseInt(_0x4430bb(0x189))/0x9)+-parseInt(_0x4430bb(0x1cf))/0xa*(-parseInt(_0x4430bb(0x19f))/0xb);if(_0x2484ca===_0x59654f)break;else _0x50b143['push'](_0x50b143['shift']());}catch(_0x37d8b6){_0x50b143['push'](_0x50b143['shift']());}}}(_0x5ee8,0x28fd4),function(_0xd6837a,_0x303bb6){const _0xc12799=_0x53a2;typeof exports==_0xc12799(0x1a7)&&typeof module<'u'?_0x303bb6(exports,require(_0xc12799(0x18c)),require(_0xc12799(0x186)),require(_0xc12799(0x1c4)),require(_0xc12799(0x19b)),require(_0xc12799(0x165)),require(_0xc12799(0x194)),require(_0xc12799(0x1d8))):typeof define==_0xc12799(0x180)&&define[_0xc12799(0x1b5)]?define(['exports',_0xc12799(0x18c),_0xc12799(0x186),'@univerjs/core',_0xc12799(0x19b),_0xc12799(0x165),_0xc12799(0x194),_0xc12799(0x1d8)],_0x303bb6):(_0xd6837a=typeof globalThis<'u'?globalThis:_0xd6837a||self,_0x303bb6(_0xd6837a[_0xc12799(0x1d3)]={},_0xd6837a[_0xc12799(0x1d4)],_0xd6837a[_0xc12799(0x1d9)],_0xd6837a[_0xc12799(0x18e)],_0xd6837a[_0xc12799(0x184)],_0xd6837a['UniverThreadComment'],_0xd6837a['rxjs'],_0xd6837a[_0xc12799(0x1cd)]));}(this,function(_0x119cd,_0x1c9d44,_0x26e160,_0x22bc10,_0x2b9c93,_0x522633,_0x2c56bb,_0x47762c){'use strict';const _0x2ac89c=_0x53a2;const _0xefad9f='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x7216f1=(_0x305c72=>(_0x305c72[_0x305c72[_0x2ac89c(0x1a9)]=0x0]='OpenOrReOpen',_0x305c72[_0x305c72['Solved']=0x1]=_0x2ac89c(0x170),_0x305c72[_0x305c72[_0x2ac89c(0x17f)]=-0x1]=_0x2ac89c(0x17f),_0x305c72))(_0x7216f1||{}),_0x10e4cc=(_0x22cc3b=>(_0x22cc3b[_0x22cc3b['Unknown']=0x0]=_0x2ac89c(0x166),_0x22cc3b[_0x22cc3b[_0x2ac89c(0x1d1)]=0x1]=_0x2ac89c(0x1d1),_0x22cc3b[_0x22cc3b[_0x2ac89c(0x1a1)]=0x2]=_0x2ac89c(0x1a1),_0x22cc3b[_0x22cc3b[_0x2ac89c(0x16d)]=0x3]=_0x2ac89c(0x16d),_0x22cc3b[_0x22cc3b[_0x2ac89c(0x1c2)]=0x4]=_0x2ac89c(0x1c2),_0x22cc3b[_0x22cc3b['Solve']=0x5]=_0x2ac89c(0x1e3),_0x22cc3b[_0x22cc3b[_0x2ac89c(0x17f)]=-0x1]=_0x2ac89c(0x17f),_0x22cc3b))(_0x10e4cc||{});const _0x329f0e=_0x503192=>_0x22bc10[_0x2ac89c(0x1a4)](new Date(+_0x503192))['format']('YYYY/MM/DD\x20HH:mm'),_0x17df73=async(_0x34f15a,_0x1a1f2d)=>{const _0x4c9c01=_0x2ac89c,_0x16cf19=_0x34f15a[_0x4c9c01(0x1e6)](_0x22bc10[_0x4c9c01(0x1ba)]),_0x4b941c=_0x34f15a[_0x4c9c01(0x1e6)](_0x47762c[_0x4c9c01(0x1bd)]);_0x1a1f2d[_0x4c9c01(0x16a)](_0xb2c468=>{const _0x16c3eb=_0x4c9c01;_0x16cf19[_0x16c3eb(0x1a2)](_0xb2c468)&&_0x1a1f2d[_0x16c3eb(0x1ae)](_0xb2c468);}),_0x1a1f2d[_0x4c9c01(0x173)]&&(await _0x4b941c[_0x4c9c01(0x1e6)](_0x4c9c01(0x195),{'params':{'userIDs':[..._0x1a1f2d]}}))[_0x4c9c01(0x16f)][_0x4c9c01(0x1b8)]['forEach'](_0x405239=>{const _0x5e9089=_0x4c9c01;_0x405239&&_0x16cf19[_0x5e9089(0x16b)](_0x405239);});};var _0x553fa0=Object['getOwnPropertyDescriptor'],_0x12dfd8=(_0x1c00c6,_0x196577,_0x229988,_0x57d025)=>{const _0x4b268c=_0x2ac89c;for(var _0x2b8433=_0x57d025>0x1?void 0x0:_0x57d025?_0x553fa0(_0x196577,_0x229988):_0x196577,_0x171350=_0x1c00c6[_0x4b268c(0x17b)]-0x1,_0x45134b;_0x171350>=0x0;_0x171350--)(_0x45134b=_0x1c00c6[_0x171350])&&(_0x2b8433=_0x45134b(_0x2b8433)||_0x2b8433);return _0x2b8433;},_0x221deb=(_0x5ad2d7,_0x3c4bbe)=>(_0x2e2390,_0xc470f0)=>_0x3c4bbe(_0x2e2390,_0xc470f0,_0x5ad2d7);let _0x2e7d24=class extends _0x22bc10[_0x2ac89c(0x199)]{constructor(_0x311a7d,_0x472dcd,_0x20fcc8,_0x237c4b){const _0x15bc81=_0x2ac89c;super(),this[_0x15bc81(0x163)]=_0x311a7d,this[_0x15bc81(0x1e0)]=_0x472dcd,this['_userService']=_0x20fcc8,this[_0x15bc81(0x17e)]=_0x237c4b,this[_0x15bc81(0x1d0)](),this[_0x15bc81(0x1d7)]();}[_0x2ac89c(0x1d7)](){const _0x43e4e1=_0x2ac89c;this[_0x43e4e1(0x191)](this[_0x43e4e1(0x1e0)][_0x43e4e1(0x1a6)][_0x43e4e1(0x16e)](_0x2c56bb[_0x43e4e1(0x1dc)](0x10))[_0x43e4e1(0x178)](_0x5bc030=>{const _0x512cbd=_0x43e4e1,_0xab15ce=new Set();_0x5bc030['forEach'](_0x27d0ab=>{const _0x3696c0=_0x53a2;switch(_0x27d0ab[_0x3696c0(0x1af)]){case _0x3696c0(0x17d):{const _0x63cc3d=_0x27d0ab[_0x3696c0(0x1a0)]['personId'];_0xab15ce[_0x3696c0(0x17d)](_0x63cc3d);break;}}}),_0x17df73(this[_0x512cbd(0x17e)],_0xab15ce);}));}[_0x2ac89c(0x1d0)](){const _0x3f8752=_0x2ac89c;this[_0x3f8752(0x191)](this[_0x3f8752(0x163)][_0x3f8752(0x1a6)]['subscribe'](async _0x15c185=>{const _0x2c8005=_0x3f8752;var _0x1df7eb,_0x43c42d,_0x4d9dd9,_0x104393;const _0x227ffa=(_0x1df7eb=this['_threadCommentModel'][_0x2c8005(0x177)](_0x15c185[_0x2c8005(0x1e4)])['find'](_0x4b3201=>_0x4b3201[_0x2c8005(0x1bc)]===_0x15c185[_0x2c8005(0x1bc)]))==null?void 0x0:_0x1df7eb[_0x2c8005(0x1c7)];if(!_0x227ffa)return;const {unitId:_0x446a5e,subUnitId:_0x2ceb91}=_0x227ffa;switch(_0x15c185[_0x2c8005(0x197)]&&this[_0x2c8005(0x15a)]['addUser'](_0x15c185['user']),_0x15c185[_0x2c8005(0x1af)]){case _0x10e4cc['Add']:break;case _0x10e4cc[_0x2c8005(0x1a1)]:{this[_0x2c8005(0x1e0)][_0x2c8005(0x16c)](_0x446a5e,_0x2ceb91,{'unitId':_0x446a5e,'subUnitId':_0x2ceb91,'ref':'','id':_0x15c185[_0x2c8005(0x1b3)],'dT':_0x329f0e(+_0x15c185[_0x2c8005(0x1be)]),'threadId':_0x15c185['threadId'],'personId':(_0x4d9dd9=(_0x43c42d=_0x15c185[_0x2c8005(0x197)])==null?void 0x0:_0x43c42d[_0x2c8005(0x19c)])!=null?_0x4d9dd9:_0x15c185['userId'],'text':JSON[_0x2c8005(0x18a)](_0x15c185[_0x2c8005(0x1b0)]),'parentId':_0x227ffa['id']});break;}case _0x10e4cc[_0x2c8005(0x1c2)]:{const _0x3c268c=this[_0x2c8005(0x1e0)]['getComment'](_0x446a5e,_0x2ceb91,_0x15c185[_0x2c8005(0x1b3)]);_0x3c268c&&_0x3c268c['parentId']&&this[_0x2c8005(0x1e0)][_0x2c8005(0x1ab)](_0x446a5e,_0x2ceb91,_0x15c185['replyId']);break;}case _0x10e4cc[_0x2c8005(0x16d)]:{this[_0x2c8005(0x1e0)]['updateComment'](_0x446a5e,_0x2ceb91,{'commentId':_0x15c185[_0x2c8005(0x1b3)],'text':JSON[_0x2c8005(0x18a)](_0x15c185[_0x2c8005(0x1b0)])});break;}case _0x10e4cc['Solve']:{const _0x25eb02=(_0x104393=this[_0x2c8005(0x1e0)][_0x2c8005(0x177)](_0x15c185[_0x2c8005(0x1e4)])[_0x2c8005(0x1d5)](_0x11dfc3=>_0x11dfc3[_0x2c8005(0x1bc)]===_0x15c185[_0x2c8005(0x1bc)]))==null?void 0x0:_0x104393['root'];_0x25eb02&&this['_threadCommentModel'][_0x2c8005(0x1d2)](_0x446a5e,_0x2ceb91,_0x25eb02['id'],_0x15c185[_0x2c8005(0x1a3)]===_0x7216f1[_0x2c8005(0x170)]);break;}}}));}};_0x2e7d24=_0x12dfd8([_0x221deb(0x0,_0x22bc10[_0x2ac89c(0x1ca)](_0x1c9d44[_0x2ac89c(0x188)])),_0x221deb(0x1,_0x22bc10[_0x2ac89c(0x1ca)](_0x522633[_0x2ac89c(0x185)])),_0x221deb(0x2,_0x22bc10[_0x2ac89c(0x1ca)](_0x22bc10[_0x2ac89c(0x1ba)])),_0x221deb(0x3,_0x22bc10[_0x2ac89c(0x1ca)](_0x22bc10['Injector']))],_0x2e7d24);const _0x27cf8b=_0x2ac89c(0x1df),_0x57e0c5={};var _0x285faf=Object['getOwnPropertyDescriptor'],_0x30cbf0=(_0x182f17,_0x3d04d9,_0x10936d,_0x53de07)=>{for(var _0x442f47=_0x53de07>0x1?void 0x0:_0x53de07?_0x285faf(_0x3d04d9,_0x10936d):_0x3d04d9,_0x25d875=_0x182f17['length']-0x1,_0x347d7c;_0x25d875>=0x0;_0x25d875--)(_0x347d7c=_0x182f17[_0x25d875])&&(_0x442f47=_0x347d7c(_0x442f47)||_0x442f47);return _0x442f47;},_0x28632d=(_0xfe7c63,_0xb6a217)=>(_0x21d33c,_0x184ffa)=>_0xb6a217(_0x21d33c,_0x184ffa,_0xfe7c63);function _0x2b952c(_0x3c53c4,_0x416770){const _0x2e60f8=_0x2ac89c,_0x2777f6=_0x3c53c4[_0x2e60f8(0x1c3)][0x0];return{..._0x416770,'id':_0x2777f6[_0x2e60f8(0x1b3)],'resolved':_0x3c53c4[_0x2e60f8(0x1a3)]===0x1,'dT':_0x329f0e(_0x2777f6['createTimestamp']),'personId':_0x2777f6[_0x2e60f8(0x168)],'threadId':_0x2777f6[_0x2e60f8(0x1bc)]};}function _0x4e2790(_0x29d0f6,_0x486f7a,_0x433bd4){const _0x1536bc=_0x2ac89c;var _0x5a2e10,_0x4104f2;if(((_0x4104f2=(_0x5a2e10=_0x29d0f6==null?void 0x0:_0x29d0f6['replies'])==null?void 0x0:_0x5a2e10[_0x1536bc(0x17b)])!=null?_0x4104f2:0x0)>0x0){const _0xdf1725=(_0x2f75e9,_0x24caf9)=>({'id':_0x2f75e9[_0x1536bc(0x1b3)],'threadId':_0x2f75e9[_0x1536bc(0x1bc)],'dT':_0x329f0e(_0x2f75e9['createTimestamp']),'personId':_0x2f75e9[_0x1536bc(0x168)],'resolved':_0x29d0f6[_0x1536bc(0x1a3)]===_0x7216f1[_0x1536bc(0x170)],'unitId':_0x486f7a,'subUnitId':_0x433bd4,'text':JSON[_0x1536bc(0x18a)](_0x2f75e9[_0x1536bc(0x1b0)]),'parentId':_0x24caf9}),_0x23eacc=_0xdf1725(_0x29d0f6[_0x1536bc(0x1c3)][0x0]);return{..._0x23eacc,'children':_0x29d0f6[_0x1536bc(0x1c3)][_0x1536bc(0x1b6)](0x1)[_0x1536bc(0x1b4)](_0x2b5fbc=>_0xdf1725(_0x2b5fbc,_0x23eacc['id']))};}return null;}let _0x4eb718=class{constructor(_0x318cfe,_0x1093e7,_0x45fcdc,_0x1d9478){const _0x57a2c9=_0x2ac89c;this['_httpService']=_0x318cfe,this[_0x57a2c9(0x15a)]=_0x1093e7,this[_0x57a2c9(0x162)]=_0x45fcdc,this[_0x57a2c9(0x17e)]=_0x1d9478;}async['addComment'](_0x302838){const _0x575ca3=_0x2ac89c;var _0x595f4b,_0x17956f;const {parentId:_0x4b8ea2,unitId:_0x52414e,text:_0x1b6c87,threadId:_0x1f2216}=_0x302838,_0x45391f=(_0x17956f=(_0x595f4b=_0x1b6c87['customRanges'])==null?void 0x0:_0x595f4b[_0x575ca3(0x1da)](_0x561ac3=>_0x561ac3[_0x575ca3(0x1d6)]===_0x22bc10[_0x575ca3(0x15e)][_0x575ca3(0x183)])[_0x575ca3(0x1b4)](_0xf6c65a=>_0xf6c65a['rangeId']))!=null?_0x17956f:[],_0x5acff1=JSON[_0x575ca3(0x181)](_0x1b6c87),_0x1d2a34=(await this['_sessionService'][_0x575ca3(0x175)](_0x52414e))[_0x575ca3(0x171)]();if(_0x4b8ea2){const _0x1e0f98={'memberId':_0x1d2a34,'unitId':_0x52414e,'content':_0x5acff1,'mention':_0x45391f,'threadId':_0x1f2216},_0x372708=(await this[_0x575ca3(0x174)]['post'](_0x575ca3(0x190)+_0x52414e+_0x575ca3(0x18b),{'body':_0x1e0f98}))['body'][_0x575ca3(0x161)];return{..._0x302838,'id':_0x372708[_0x575ca3(0x1b3)],'dT':_0x22bc10[_0x575ca3(0x1a4)](+_0x372708['createTimestamp'])[_0x575ca3(0x1c1)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x372708['userId']};}else{const _0x36f190={'memberId':_0x1d2a34,'unitId':_0x52414e,'content':_0x5acff1,'mention':_0x45391f},_0xe8d54e=await this[_0x575ca3(0x174)][_0x575ca3(0x1db)](_0x575ca3(0x190)+_0x52414e+_0x575ca3(0x164),{'body':_0x36f190});return _0x2b952c(_0xe8d54e[_0x575ca3(0x16f)][_0x575ca3(0x192)],_0x302838);}}async[_0x2ac89c(0x17c)](_0x4b31c9){const _0xfc0691=_0x2ac89c;var _0x258e90,_0x3ad81c;const {text:_0x2499ec,unitId:_0x5060ba}=_0x4b31c9,_0x380373=(_0x3ad81c=(_0x258e90=_0x2499ec[_0xfc0691(0x176)])==null?void 0x0:_0x258e90[_0xfc0691(0x1da)](_0x5e8f38=>_0x5e8f38[_0xfc0691(0x1d6)]===_0x22bc10[_0xfc0691(0x15e)][_0xfc0691(0x183)])['map'](_0x3d35cc=>_0x3d35cc[_0xfc0691(0x1ce)]))!=null?_0x3ad81c:[],_0xdf55dc=JSON[_0xfc0691(0x181)](_0x2499ec),_0x4b88c0=_0x4b31c9[_0xfc0691(0x1bc)],_0x317e5a=_0x4b31c9['id'],_0x241e10={'memberId':(await this[_0xfc0691(0x162)][_0xfc0691(0x175)](_0x5060ba))[_0xfc0691(0x171)](),'unitId':_0x5060ba,'threadId':_0x4b88c0,'mention':_0x380373,'content':_0xdf55dc,'replyId':_0x317e5a},_0x49b69e=await this[_0xfc0691(0x174)]['post'](_0xfc0691(0x190)+_0x5060ba+'/edit',{'body':_0x241e10});return!_0x49b69e['body'][_0xfc0691(0x198)]||_0x49b69e[_0xfc0691(0x16f)][_0xfc0691(0x198)][_0xfc0691(0x172)]===0x1;}async['resolveComment'](_0x3008d0){const _0x29cfb2=_0x2ac89c,{unitId:_0x5c4a28}=_0x3008d0,_0x48126f=_0x3008d0[_0x29cfb2(0x1bc)],_0x521b95={'memberId':this[_0x29cfb2(0x15a)][_0x29cfb2(0x19e)]()[_0x29cfb2(0x19c)],'unitId':_0x5c4a28,'threadId':_0x48126f,'solved':_0x3008d0[_0x29cfb2(0x1de)]?_0x7216f1[_0x29cfb2(0x170)]:_0x7216f1['OpenOrReOpen']},_0xd0f469=await this['_httpService'][_0x29cfb2(0x1db)](_0x29cfb2(0x190)+_0x5c4a28+_0x29cfb2(0x18d),{'body':_0x521b95});return!_0xd0f469[_0x29cfb2(0x16f)][_0x29cfb2(0x198)]||_0xd0f469['body'][_0x29cfb2(0x198)][_0x29cfb2(0x172)]===0x1;}async[_0x2ac89c(0x1ab)](_0x5563fb,_0x2cf49d,_0x81031d,_0x36490d){const _0x5b7f6c=_0x2ac89c,_0xb0823d={'memberId':(await this[_0x5b7f6c(0x162)][_0x5b7f6c(0x175)](_0x5563fb))[_0x5b7f6c(0x171)](),'threadId':_0x81031d,'replyId':_0x36490d,'unitId':_0x5563fb},_0x21c743=await this[_0x5b7f6c(0x174)][_0x5b7f6c(0x1db)](_0x5b7f6c(0x190)+_0x5563fb+_0x5b7f6c(0x1e1),{'body':_0xb0823d});return!_0x21c743[_0x5b7f6c(0x16f)][_0x5b7f6c(0x198)]||_0x21c743[_0x5b7f6c(0x16f)]['error'][_0x5b7f6c(0x172)]===0x1;}async[_0x2ac89c(0x1b7)](_0x373ab6,_0x36645d,_0x5ae688){const _0x2c7107=_0x2ac89c,_0x5e5686={'unitId':_0x373ab6,'threadId':_0x5ae688},_0x2c53ed=await this[_0x2c7107(0x174)][_0x2c7107(0x1db)](_0x2c7107(0x190)+_0x373ab6+_0x2c7107(0x167),{'body':_0x5e5686}),_0x4e7d84=_0x5ae688['map'](_0xad4be9=>_0x4e2790(_0x2c53ed[_0x2c7107(0x16f)][_0x2c7107(0x1bb)][_0xad4be9],_0x373ab6,_0x36645d))[_0x2c7107(0x1da)](Boolean);return Object[_0x2c7107(0x15b)](_0x2c53ed[_0x2c7107(0x16f)]['users'])[_0x2c7107(0x16a)](_0x22e82f=>{const _0x3dab79=_0x2c7107;this['_userService'][_0x3dab79(0x16b)](_0x22e82f);}),_0x4e7d84;}['saveCommentToSnapshot'](_0x1c3a6e){const _0xbefa0e=_0x2ac89c;return{'id':_0x1c3a6e['id'],'threadId':_0x1c3a6e[_0xbefa0e(0x1bc)],'ref':_0x1c3a6e[_0xbefa0e(0x19a)]};}};_0x4eb718=_0x30cbf0([_0x28632d(0x0,_0x22bc10[_0x2ac89c(0x1ca)](_0x47762c[_0x2ac89c(0x1bd)])),_0x28632d(0x1,_0x22bc10[_0x2ac89c(0x1ca)](_0x22bc10['UserManagerService'])),_0x28632d(0x2,_0x22bc10['Inject'](_0x1c9d44[_0x2ac89c(0x15f)])),_0x28632d(0x3,_0x22bc10['Inject'](_0x22bc10[_0x2ac89c(0x1c6)]))],_0x4eb718);var _0xa5c050=Object[_0x2ac89c(0x19d)],_0x2528bd=(_0x10be38,_0x1ca7e5,_0x231d2b,_0x2d2f33)=>{const _0x3b261c=_0x2ac89c;for(var _0x24c0f7=_0x2d2f33>0x1?void 0x0:_0x2d2f33?_0xa5c050(_0x1ca7e5,_0x231d2b):_0x1ca7e5,_0x33eacd=_0x10be38[_0x3b261c(0x17b)]-0x1,_0x4acb74;_0x33eacd>=0x0;_0x33eacd--)(_0x4acb74=_0x10be38[_0x33eacd])&&(_0x24c0f7=_0x4acb74(_0x24c0f7)||_0x24c0f7);return _0x24c0f7;},_0x11091c=(_0x511ae4,_0x30e77a)=>(_0x2b92e8,_0x57f83b)=>_0x30e77a(_0x2b92e8,_0x57f83b,_0x511ae4);let _0x3949fd=class extends _0x22bc10[_0x2ac89c(0x199)]{constructor(_0x2d5fe5,_0x442721){const _0x16a3a4=_0x2ac89c;super(),this[_0x16a3a4(0x1b9)]=_0x2d5fe5,this[_0x16a3a4(0x1ac)]=_0x442721,this[_0x16a3a4(0x187)]();}['_initDataSource'](){const _0x7f4153=_0x2ac89c;this[_0x7f4153(0x1b9)]['dataSource']=this[_0x7f4153(0x1ac)],this['_threadCommentDataSourceService'][_0x7f4153(0x1e5)]=!0x1;}};_0x3949fd=_0x2528bd([_0x11091c(0x0,_0x522633[_0x2ac89c(0x1c5)]),_0x11091c(0x1,_0x22bc10[_0x2ac89c(0x1ca)](_0x4eb718))],_0x3949fd);var _0x427079=Object['defineProperty'],_0x35a9d5=Object[_0x2ac89c(0x19d)],_0x2ac524=(_0x1749a3,_0x37b8fd,_0x190818)=>_0x37b8fd in _0x1749a3?_0x427079(_0x1749a3,_0x37b8fd,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x190818}):_0x1749a3[_0x37b8fd]=_0x190818,_0x26e169=(_0x1b1f70,_0x42edec,_0x4fd740,_0xf857df)=>{const _0x1ae82e=_0x2ac89c;for(var _0x3788bb=_0xf857df>0x1?void 0x0:_0xf857df?_0x35a9d5(_0x42edec,_0x4fd740):_0x42edec,_0x3a83f7=_0x1b1f70[_0x1ae82e(0x17b)]-0x1,_0x5414b2;_0x3a83f7>=0x0;_0x3a83f7--)(_0x5414b2=_0x1b1f70[_0x3a83f7])&&(_0x3788bb=_0x5414b2(_0x3788bb)||_0x3788bb);return _0x3788bb;},_0x93084=(_0x3b3ef6,_0x55f1e3)=>(_0x1a1c0a,_0x3b5ae6)=>_0x55f1e3(_0x1a1c0a,_0x3b5ae6,_0x3b3ef6),_0x18d367=(_0x495334,_0x2f52a7,_0x5a0bee)=>_0x2ac524(_0x495334,typeof _0x2f52a7!='symbol'?_0x2f52a7+'':_0x2f52a7,_0x5a0bee);_0x119cd[_0x2ac89c(0x1c9)]=class extends _0x22bc10[_0x2ac89c(0x18f)]{constructor(_0x712575=_0x57e0c5,_0x1c7ebc,_0x3d717c){const _0x3e9fe1=_0x2ac89c;super(),this[_0x3e9fe1(0x1a5)]=_0x712575,this['_injector']=_0x1c7ebc,this[_0x3e9fe1(0x1b2)]=_0x3d717c;const {..._0x2a9f52}=_0x22bc10[_0x3e9fe1(0x179)]({},_0x57e0c5,this['_config']);this[_0x3e9fe1(0x1b2)][_0x3e9fe1(0x1cc)](_0x27cf8b,_0x2a9f52);}[_0x2ac89c(0x1bf)](){const _0x2acf87=_0x2ac89c;[[_0x4eb718],[_0x3949fd],[_0x2e7d24]][_0x2acf87(0x16a)](_0x3234c5=>{const _0x757e14=_0x2acf87;this[_0x757e14(0x17e)][_0x757e14(0x17d)](_0x3234c5);});}[_0x2ac89c(0x160)](){const _0x3c8b09=_0x2ac89c;this[_0x3c8b09(0x17e)][_0x3c8b09(0x1e6)](_0x3949fd),this[_0x3c8b09(0x17e)][_0x3c8b09(0x1e6)](_0x2e7d24);}},_0x18d367(_0x119cd['UniverThreadCommentDataSourcePlugin'],_0x2ac89c(0x17a),_0xefad9f),_0x18d367(_0x119cd[_0x2ac89c(0x1c9)],_0x2ac89c(0x1af),_0x22bc10['UniverInstanceType']['UNIVER_UNKNOWN']),_0x119cd[_0x2ac89c(0x1c9)]=_0x26e169([_0x22bc10['DependentOn'](_0x2b9c93[_0x2ac89c(0x1b1)],_0x1c9d44[_0x2ac89c(0x1cb)],_0x26e160[_0x2ac89c(0x1aa)]),_0x93084(0x1,_0x22bc10['Inject'](_0x22bc10[_0x2ac89c(0x1c6)])),_0x93084(0x2,_0x22bc10[_0x2ac89c(0x1ad)])],_0x119cd['UniverThreadCommentDataSourcePlugin']),Object[_0x2ac89c(0x1e2)](_0x119cd,Symbol[_0x2ac89c(0x169)],{'value':_0x2ac89c(0x182)});}));function _0x53a2(_0x493a5a,_0x48f8f0){const _0x5ee83a=_0x5ee8();return _0x53a2=function(_0x53a27b,_0x532bc0){_0x53a27b=_0x53a27b-0x15a;let _0x19042b=_0x5ee83a[_0x53a27b];return _0x19042b;},_0x53a2(_0x493a5a,_0x48f8f0);}function _0x5ee8(){const _0x26e983=['Module','COMMENT','UniverThreadCommentUi','ThreadCommentModel','@univerjs-pro/license','_initDataSource','CommentService','81XlApmr','parse','/reply','@univerjs-pro/collaboration-client','/solved','UniverCore','Plugin','/universer-api/comment/unit/','disposeWithMe','comment','298197xOvyKV','rxjs','/universer-api/user/list','14EexEMB','user','error','Disposable','ref','@univerjs/thread-comment-ui','userID','getOwnPropertyDescriptor','getCurrentUser','671baRUKN','payload','Reply','getUser','solved','dayjs','_config','commentUpdate$','object','902216YoKFht','OpenOrReOpen','UniverLicensePlugin','deleteComment','_threadCommentDataSource','IConfigService','delete','type','content','UniverThreadCommentUIPlugin','_configService','replyId','map','amd','slice','listComments','users','_threadCommentDataSourceService','UserManagerService','comments','threadId','HTTPService','createTimestamp','onStarting','1001556YltUVo','format','Delete','replies','@univerjs/core','IThreadCommentDataSourceService','Injector','root','15YZuRzI','UniverThreadCommentDataSourcePlugin','Inject','UniverCollaborationClientPlugin','setConfig','UniverNetwork','rangeId','203160gOaKeU','_init','Add','resolveComment','UniverProThreadCommentDatasource','UniverProCollaborationClient','find','rangeType','_initUserSync','@univerjs/network','UniverProLicense','filter','post','bufferTime','94398pPCiTZ','resolved','thread-comment-data-source.config','_threadCommentModel','/delete','defineProperty','Solve','unitId','syncUpdateMutationToColla','get','_userService','values','276872qaNzsE','271208KTqxtj','CustomRangeType','CollaborationSessionService','onReady','reply','_sessionService','_commentService','/add','@univerjs/thread-comment','Unknown','/list','userId','toStringTag','forEach','addUser','addComment','Edit','pipe','body','Solved','getMemberID','code','size','_httpService','requireSession','customRanges','getUnit','subscribe','merge','pluginName','length','updateComment','add','_injector','UNRECOGNIZED','function','stringify'];_0x5ee8=function(){return _0x26e983;};return _0x5ee8();}
1
+ function _0x4398(_0x461641,_0x467d6e){const _0x47e643=_0x47e6();return _0x4398=function(_0x439832,_0x5bb3a7){_0x439832=_0x439832-0x173;let _0x9c74f1=_0x47e643[_0x439832];return _0x9c74f1;},_0x4398(_0x461641,_0x467d6e);}(function(_0x20d3d8,_0x5292c9){const _0x34ae38=_0x4398,_0x3b1fa0=_0x20d3d8();while(!![]){try{const _0x19e5dd=-parseInt(_0x34ae38(0x180))/0x1+-parseInt(_0x34ae38(0x185))/0x2*(-parseInt(_0x34ae38(0x1d1))/0x3)+-parseInt(_0x34ae38(0x18a))/0x4+-parseInt(_0x34ae38(0x188))/0x5*(parseInt(_0x34ae38(0x1b7))/0x6)+-parseInt(_0x34ae38(0x1eb))/0x7*(parseInt(_0x34ae38(0x1e3))/0x8)+-parseInt(_0x34ae38(0x1c7))/0x9+-parseInt(_0x34ae38(0x1ad))/0xa*(-parseInt(_0x34ae38(0x1c5))/0xb);if(_0x19e5dd===_0x5292c9)break;else _0x3b1fa0['push'](_0x3b1fa0['shift']());}catch(_0x34472b){_0x3b1fa0['push'](_0x3b1fa0['shift']());}}}(_0x47e6,0x2a2f1),function(_0xfd4b7b,_0x834232){const _0x269ed4=_0x4398;typeof exports==_0x269ed4(0x17a)&&typeof module<'u'?_0x834232(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require(_0x269ed4(0x1bc)),require(_0x269ed4(0x18d)),require(_0x269ed4(0x1cb)),require(_0x269ed4(0x1a0)),require('@univerjs/network')):typeof define==_0x269ed4(0x1c2)&&define[_0x269ed4(0x1ca)]?define([_0x269ed4(0x1b8),'@univerjs-pro/collaboration-client',_0x269ed4(0x1ce),_0x269ed4(0x1bc),_0x269ed4(0x18d),_0x269ed4(0x1cb),'rxjs',_0x269ed4(0x1d5)],_0x834232):(_0xfd4b7b=typeof globalThis<'u'?globalThis:_0xfd4b7b||self,_0x834232(_0xfd4b7b['UniverProThreadCommentDatasource']={},_0xfd4b7b['UniverProCollaborationClient'],_0xfd4b7b[_0x269ed4(0x1d4)],_0xfd4b7b[_0x269ed4(0x1ea)],_0xfd4b7b['UniverThreadCommentUi'],_0xfd4b7b[_0x269ed4(0x1a6)],_0xfd4b7b[_0x269ed4(0x1a0)],_0xfd4b7b[_0x269ed4(0x1f3)]));}(this,function(_0x11ecc3,_0x5d20d9,_0x11ab02,_0x3c648d,_0x20cd00,_0x3b1059,_0xd85e6f,_0x48603c){'use strict';const _0x3f0ee5=_0x4398;const _0x29c887=_0x3f0ee5(0x191);var _0x8e7e8b=(_0x7fdf33=>(_0x7fdf33[_0x7fdf33[_0x3f0ee5(0x184)]=0x0]=_0x3f0ee5(0x184),_0x7fdf33[_0x7fdf33['Solved']=0x1]=_0x3f0ee5(0x1d7),_0x7fdf33[_0x7fdf33[_0x3f0ee5(0x1e1)]=-0x1]=_0x3f0ee5(0x1e1),_0x7fdf33))(_0x8e7e8b||{}),_0x7af052=(_0x1b5562=>(_0x1b5562[_0x1b5562['Unknown']=0x0]=_0x3f0ee5(0x1d6),_0x1b5562[_0x1b5562[_0x3f0ee5(0x1e8)]=0x1]=_0x3f0ee5(0x1e8),_0x1b5562[_0x1b5562[_0x3f0ee5(0x1f2)]=0x2]=_0x3f0ee5(0x1f2),_0x1b5562[_0x1b5562[_0x3f0ee5(0x1cd)]=0x3]=_0x3f0ee5(0x1cd),_0x1b5562[_0x1b5562[_0x3f0ee5(0x1c9)]=0x4]=_0x3f0ee5(0x1c9),_0x1b5562[_0x1b5562[_0x3f0ee5(0x189)]=0x5]=_0x3f0ee5(0x189),_0x1b5562[_0x1b5562[_0x3f0ee5(0x1e1)]=-0x1]='UNRECOGNIZED',_0x1b5562))(_0x7af052||{});const _0x2a4927=_0x35fe8e=>_0x3c648d[_0x3f0ee5(0x19a)](new Date(+_0x35fe8e))['format']('YYYY/MM/DD\x20HH:mm'),_0x4a1b1f=async(_0x142d99,_0x3d0266)=>{const _0x4cbb8d=_0x3f0ee5,_0x91f4bb=_0x142d99['get'](_0x3c648d[_0x4cbb8d(0x19b)]),_0x2424fc=_0x142d99[_0x4cbb8d(0x1bf)](_0x48603c[_0x4cbb8d(0x1b4)]);_0x3d0266[_0x4cbb8d(0x1ab)](_0x1cc6a6=>{const _0x510e8a=_0x4cbb8d;_0x91f4bb[_0x510e8a(0x177)](_0x1cc6a6)&&_0x3d0266[_0x510e8a(0x1a1)](_0x1cc6a6);}),_0x3d0266['size']&&(await _0x2424fc[_0x4cbb8d(0x1bf)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3d0266]}}))[_0x4cbb8d(0x1d3)]['users'][_0x4cbb8d(0x1ab)](_0x249f94=>{const _0x2edff5=_0x4cbb8d;_0x249f94&&_0x91f4bb[_0x2edff5(0x18b)](_0x249f94);});};var _0x53e6be=Object[_0x3f0ee5(0x1f8)],_0x26083b=(_0x3ecb63,_0x11377e,_0x116f94,_0x2eed99)=>{const _0x4bcd19=_0x3f0ee5;for(var _0x2f7a34=_0x2eed99>0x1?void 0x0:_0x2eed99?_0x53e6be(_0x11377e,_0x116f94):_0x11377e,_0x12b210=_0x3ecb63[_0x4bcd19(0x199)]-0x1,_0x4276e0;_0x12b210>=0x0;_0x12b210--)(_0x4276e0=_0x3ecb63[_0x12b210])&&(_0x2f7a34=_0x4276e0(_0x2f7a34)||_0x2f7a34);return _0x2f7a34;},_0x4ffaf4=(_0x3cfbed,_0x1842ae)=>(_0x107fbb,_0x11981e)=>_0x1842ae(_0x107fbb,_0x11981e,_0x3cfbed);let _0xe4df36=class extends _0x3c648d[_0x3f0ee5(0x1db)]{constructor(_0x36d134,_0x1f7351,_0x591a2b,_0x2fb144){const _0x52c7e0=_0x3f0ee5;super(),this[_0x52c7e0(0x1aa)]=_0x36d134,this[_0x52c7e0(0x1f0)]=_0x1f7351,this[_0x52c7e0(0x1ee)]=_0x591a2b,this[_0x52c7e0(0x1d2)]=_0x2fb144,this['_init'](),this[_0x52c7e0(0x1af)]();}['_initUserSync'](){const _0x423b42=_0x3f0ee5;this[_0x423b42(0x1e7)](this[_0x423b42(0x1f0)][_0x423b42(0x179)][_0x423b42(0x183)](_0xd85e6f[_0x423b42(0x1dc)](0x10))[_0x423b42(0x19f)](_0x746cf8=>{const _0x43efdc=new Set();_0x746cf8['forEach'](_0x2bc85d=>{const _0x12b575=_0x4398;switch(_0x2bc85d[_0x12b575(0x187)]){case _0x12b575(0x176):{const _0x33cd34=_0x2bc85d['payload'][_0x12b575(0x19c)];_0x43efdc[_0x12b575(0x176)](_0x33cd34);break;}}}),_0x4a1b1f(this['_injector'],_0x43efdc);}));}[_0x3f0ee5(0x1f4)](){const _0x51a79c=_0x3f0ee5;this['disposeWithMe'](this[_0x51a79c(0x1aa)][_0x51a79c(0x179)][_0x51a79c(0x19f)](async _0x39f27e=>{const _0x5ee7f3=_0x51a79c;var _0x154b1b,_0x230e6b,_0x3397ac,_0x37082b;const _0x29bfc5=(_0x154b1b=this[_0x5ee7f3(0x1f0)][_0x5ee7f3(0x1b3)](_0x39f27e[_0x5ee7f3(0x197)])[_0x5ee7f3(0x181)](_0x517ee7=>_0x517ee7[_0x5ee7f3(0x1c1)]===_0x39f27e[_0x5ee7f3(0x1c1)]))==null?void 0x0:_0x154b1b[_0x5ee7f3(0x1ba)];if(!_0x29bfc5)return;const {unitId:_0x4e1cdc,subUnitId:_0x556f1c}=_0x29bfc5;switch(_0x39f27e[_0x5ee7f3(0x186)]&&this[_0x5ee7f3(0x1ee)][_0x5ee7f3(0x18b)](_0x39f27e[_0x5ee7f3(0x186)]),_0x39f27e[_0x5ee7f3(0x187)]){case _0x7af052[_0x5ee7f3(0x1e8)]:break;case _0x7af052[_0x5ee7f3(0x1f2)]:{this['_threadCommentModel']['addComment'](_0x4e1cdc,_0x556f1c,{'unitId':_0x4e1cdc,'subUnitId':_0x556f1c,'ref':'','id':_0x39f27e[_0x5ee7f3(0x1bd)],'dT':_0x2a4927(+_0x39f27e['createTimestamp']),'threadId':_0x39f27e[_0x5ee7f3(0x1c1)],'personId':(_0x3397ac=(_0x230e6b=_0x39f27e[_0x5ee7f3(0x186)])==null?void 0x0:_0x230e6b[_0x5ee7f3(0x1c3)])!=null?_0x3397ac:_0x39f27e[_0x5ee7f3(0x1d9)],'text':JSON[_0x5ee7f3(0x17e)](_0x39f27e[_0x5ee7f3(0x1a2)]),'parentId':_0x29bfc5['id']});break;}case _0x7af052['Delete']:{const _0x368463=this[_0x5ee7f3(0x1f0)][_0x5ee7f3(0x1ac)](_0x4e1cdc,_0x556f1c,_0x39f27e[_0x5ee7f3(0x1bd)]);_0x368463&&_0x368463[_0x5ee7f3(0x1ef)]&&this['_threadCommentModel'][_0x5ee7f3(0x1a7)](_0x4e1cdc,_0x556f1c,_0x39f27e[_0x5ee7f3(0x1bd)]);break;}case _0x7af052[_0x5ee7f3(0x1cd)]:{this[_0x5ee7f3(0x1f0)][_0x5ee7f3(0x17c)](_0x4e1cdc,_0x556f1c,{'commentId':_0x39f27e[_0x5ee7f3(0x1bd)],'text':JSON['parse'](_0x39f27e[_0x5ee7f3(0x1a2)])});break;}case _0x7af052[_0x5ee7f3(0x189)]:{const _0x29719b=(_0x37082b=this['_threadCommentModel'][_0x5ee7f3(0x1b3)](_0x39f27e[_0x5ee7f3(0x197)])[_0x5ee7f3(0x181)](_0x2a1dee=>_0x2a1dee[_0x5ee7f3(0x1c1)]===_0x39f27e[_0x5ee7f3(0x1c1)]))==null?void 0x0:_0x37082b[_0x5ee7f3(0x1ba)];_0x29719b&&this['_threadCommentModel'][_0x5ee7f3(0x1a9)](_0x4e1cdc,_0x556f1c,_0x29719b['id'],_0x39f27e[_0x5ee7f3(0x1e9)]===_0x8e7e8b[_0x5ee7f3(0x1d7)]);break;}}}));}};_0xe4df36=_0x26083b([_0x4ffaf4(0x0,_0x3c648d[_0x3f0ee5(0x1c0)](_0x5d20d9[_0x3f0ee5(0x1e2)])),_0x4ffaf4(0x1,_0x3c648d['Inject'](_0x3b1059['ThreadCommentModel'])),_0x4ffaf4(0x2,_0x3c648d[_0x3f0ee5(0x1c0)](_0x3c648d[_0x3f0ee5(0x19b)])),_0x4ffaf4(0x3,_0x3c648d['Inject'](_0x3c648d[_0x3f0ee5(0x1de)]))],_0xe4df36);const _0x3a876c=_0x3f0ee5(0x1e5),_0x1e4835={};var _0x20a5a8=Object['getOwnPropertyDescriptor'],_0x4f199e=(_0x1115d3,_0x406fc6,_0x62fb81,_0x19bf26)=>{for(var _0x3c981b=_0x19bf26>0x1?void 0x0:_0x19bf26?_0x20a5a8(_0x406fc6,_0x62fb81):_0x406fc6,_0x1ccb63=_0x1115d3['length']-0x1,_0x4d8b7f;_0x1ccb63>=0x0;_0x1ccb63--)(_0x4d8b7f=_0x1115d3[_0x1ccb63])&&(_0x3c981b=_0x4d8b7f(_0x3c981b)||_0x3c981b);return _0x3c981b;},_0x346b08=(_0x9ac741,_0x1997cb)=>(_0x5cc502,_0x10277c)=>_0x1997cb(_0x5cc502,_0x10277c,_0x9ac741);function _0x115485(_0x4dc836,_0x1d2a90){const _0x2755c8=_0x3f0ee5,_0x294372=_0x4dc836[_0x2755c8(0x17b)][0x0];return{..._0x1d2a90,'id':_0x294372[_0x2755c8(0x1bd)],'resolved':_0x4dc836[_0x2755c8(0x1e9)]===0x1,'dT':_0x2a4927(_0x294372[_0x2755c8(0x1c4)]),'personId':_0x294372[_0x2755c8(0x1d9)],'threadId':_0x294372[_0x2755c8(0x1c1)]};}function _0x532479(_0x188679,_0x16d735,_0xfbdf15){const _0x258c42=_0x3f0ee5;var _0x2b2a02,_0x508eb0;if(((_0x508eb0=(_0x2b2a02=_0x188679==null?void 0x0:_0x188679[_0x258c42(0x17b)])==null?void 0x0:_0x2b2a02[_0x258c42(0x199)])!=null?_0x508eb0:0x0)>0x0){const _0x1aed6b=(_0x9bbad3,_0x27e5c5)=>({'id':_0x9bbad3[_0x258c42(0x1bd)],'threadId':_0x9bbad3[_0x258c42(0x1c1)],'dT':_0x2a4927(_0x9bbad3[_0x258c42(0x1c4)]),'personId':_0x9bbad3[_0x258c42(0x1d9)],'resolved':_0x188679[_0x258c42(0x1e9)]===_0x8e7e8b[_0x258c42(0x1d7)],'unitId':_0x16d735,'subUnitId':_0xfbdf15,'text':JSON[_0x258c42(0x17e)](_0x9bbad3[_0x258c42(0x1a2)]),'parentId':_0x27e5c5}),_0x4f61a4=_0x1aed6b(_0x188679['replies'][0x0]);return{..._0x4f61a4,'children':_0x188679[_0x258c42(0x17b)][_0x258c42(0x1b6)](0x1)[_0x258c42(0x19e)](_0x243efa=>_0x1aed6b(_0x243efa,_0x4f61a4['id']))};}return null;}let _0x474c81=class{constructor(_0x30773b,_0x55b807,_0xdd47ff,_0x23fd3e){const _0x7c1530=_0x3f0ee5;this[_0x7c1530(0x1f5)]=_0x30773b,this[_0x7c1530(0x1ee)]=_0x55b807,this['_sessionService']=_0xdd47ff,this[_0x7c1530(0x1d2)]=_0x23fd3e;}async[_0x3f0ee5(0x1e0)](_0x2397f4){const _0x26a1e6=_0x3f0ee5;var _0x391b24,_0x5371db;const {parentId:_0x444621,unitId:_0xa1e839,text:_0x2eefdf,threadId:_0x32b298}=_0x2397f4,_0x4f9d41=(_0x5371db=(_0x391b24=_0x2eefdf['customRanges'])==null?void 0x0:_0x391b24[_0x26a1e6(0x182)](_0x1da5b7=>_0x1da5b7[_0x26a1e6(0x1b1)]===_0x3c648d[_0x26a1e6(0x1e6)][_0x26a1e6(0x1f7)])[_0x26a1e6(0x19e)](_0xf6d126=>_0xf6d126['rangeId']))!=null?_0x5371db:[],_0x2a765e=JSON['stringify'](_0x2eefdf),_0x4dd0d3=(await this[_0x26a1e6(0x1ed)][_0x26a1e6(0x1a4)](_0xa1e839))['getMemberID']();if(_0x444621){const _0x1b194d={'memberId':_0x4dd0d3,'unitId':_0xa1e839,'content':_0x2a765e,'mention':_0x4f9d41,'threadId':_0x32b298},_0x2f80fd=(await this[_0x26a1e6(0x1f5)][_0x26a1e6(0x193)]('/universer-api/comment/unit/'+_0xa1e839+_0x26a1e6(0x18c),{'body':_0x1b194d}))['body']['reply'];return{..._0x2397f4,'id':_0x2f80fd[_0x26a1e6(0x1bd)],'dT':_0x3c648d[_0x26a1e6(0x19a)](+_0x2f80fd[_0x26a1e6(0x1c4)])['format'](_0x26a1e6(0x1be)),'personId':_0x2f80fd[_0x26a1e6(0x1d9)]};}else{const _0x33b255={'memberId':_0x4dd0d3,'unitId':_0xa1e839,'content':_0x2a765e,'mention':_0x4f9d41},_0x400ff1=await this[_0x26a1e6(0x1f5)][_0x26a1e6(0x193)](_0x26a1e6(0x1da)+_0xa1e839+'/add',{'body':_0x33b255});return _0x115485(_0x400ff1['body'][_0x26a1e6(0x1d8)],_0x2397f4);}}async[_0x3f0ee5(0x17c)](_0x14700b){const _0x59762f=_0x3f0ee5;var _0x1b9466,_0xc7f378;const {text:_0x1041b5,unitId:_0x55907b}=_0x14700b,_0x5c9b21=(_0xc7f378=(_0x1b9466=_0x1041b5['customRanges'])==null?void 0x0:_0x1b9466['filter'](_0x393031=>_0x393031['rangeType']===_0x3c648d[_0x59762f(0x1e6)][_0x59762f(0x1f7)])[_0x59762f(0x19e)](_0x1eabaa=>_0x1eabaa[_0x59762f(0x1df)]))!=null?_0xc7f378:[],_0x2364dc=JSON[_0x59762f(0x1a3)](_0x1041b5),_0x579876=_0x14700b[_0x59762f(0x1c1)],_0x2481e8=_0x14700b['id'],_0x2b4bac={'memberId':(await this[_0x59762f(0x1ed)][_0x59762f(0x1a4)](_0x55907b))['getMemberID'](),'unitId':_0x55907b,'threadId':_0x579876,'mention':_0x5c9b21,'content':_0x2364dc,'replyId':_0x2481e8},_0x50fa94=await this[_0x59762f(0x1f5)]['post'](_0x59762f(0x1da)+_0x55907b+'/edit',{'body':_0x2b4bac});return!_0x50fa94[_0x59762f(0x1d3)][_0x59762f(0x17d)]||_0x50fa94[_0x59762f(0x1d3)]['error'][_0x59762f(0x196)]===0x1;}async['resolveComment'](_0x1cf1cd){const _0x8dad33=_0x3f0ee5,{unitId:_0x259342}=_0x1cf1cd,_0x442187=_0x1cf1cd[_0x8dad33(0x1c1)],_0x250538={'memberId':this['_userService'][_0x8dad33(0x1cf)]()['userID'],'unitId':_0x259342,'threadId':_0x442187,'solved':_0x1cf1cd[_0x8dad33(0x18f)]?_0x8e7e8b[_0x8dad33(0x1d7)]:_0x8e7e8b[_0x8dad33(0x184)]},_0x35c96a=await this[_0x8dad33(0x1f5)]['post'](_0x8dad33(0x1da)+_0x259342+'/solved',{'body':_0x250538});return!_0x35c96a[_0x8dad33(0x1d3)][_0x8dad33(0x17d)]||_0x35c96a['body'][_0x8dad33(0x17d)][_0x8dad33(0x196)]===0x1;}async[_0x3f0ee5(0x1a7)](_0x20431c,_0x2baf60,_0x88c2c,_0x2e3f6b){const _0x32fbd7=_0x3f0ee5,_0x53d7a9={'memberId':(await this[_0x32fbd7(0x1ed)][_0x32fbd7(0x1a4)](_0x20431c))[_0x32fbd7(0x1e4)](),'threadId':_0x88c2c,'replyId':_0x2e3f6b,'unitId':_0x20431c},_0x44e8b2=await this[_0x32fbd7(0x1f5)][_0x32fbd7(0x193)]('/universer-api/comment/unit/'+_0x20431c+_0x32fbd7(0x1ae),{'body':_0x53d7a9});return!_0x44e8b2[_0x32fbd7(0x1d3)]['error']||_0x44e8b2[_0x32fbd7(0x1d3)][_0x32fbd7(0x17d)]['code']===0x1;}async[_0x3f0ee5(0x1c6)](_0x4af09a,_0x3b9d05,_0x5afc38){const _0x267a51=_0x3f0ee5,_0x3996ed={'unitId':_0x4af09a,'threadId':_0x5afc38},_0x50f02b=await this[_0x267a51(0x1f5)][_0x267a51(0x193)](_0x267a51(0x1da)+_0x4af09a+_0x267a51(0x19d),{'body':_0x3996ed}),_0x37a4e4=_0x5afc38[_0x267a51(0x19e)](_0x4cf015=>_0x532479(_0x50f02b['body'][_0x267a51(0x1d0)][_0x4cf015],_0x4af09a,_0x3b9d05))[_0x267a51(0x182)](Boolean);return Object[_0x267a51(0x17f)](_0x50f02b[_0x267a51(0x1d3)][_0x267a51(0x1a8)])['forEach'](_0x151181=>{const _0x56a2c7=_0x267a51;this[_0x56a2c7(0x1ee)]['addUser'](_0x151181);}),_0x37a4e4;}[_0x3f0ee5(0x1c8)](_0x1e00a9){const _0x7e38fa=_0x3f0ee5;return{'id':_0x1e00a9['id'],'threadId':_0x1e00a9['threadId'],'ref':_0x1e00a9[_0x7e38fa(0x1b2)]};}};_0x474c81=_0x4f199e([_0x346b08(0x0,_0x3c648d[_0x3f0ee5(0x1c0)](_0x48603c[_0x3f0ee5(0x1b4)])),_0x346b08(0x1,_0x3c648d['Inject'](_0x3c648d[_0x3f0ee5(0x19b)])),_0x346b08(0x2,_0x3c648d['Inject'](_0x5d20d9[_0x3f0ee5(0x1ec)])),_0x346b08(0x3,_0x3c648d['Inject'](_0x3c648d['Injector']))],_0x474c81);var _0x252caa=Object[_0x3f0ee5(0x1f8)],_0x3c1b13=(_0x4db7a4,_0x26b578,_0x14d82b,_0x923c9d)=>{const _0x4c60ed=_0x3f0ee5;for(var _0x4ead20=_0x923c9d>0x1?void 0x0:_0x923c9d?_0x252caa(_0x26b578,_0x14d82b):_0x26b578,_0x3c33d6=_0x4db7a4[_0x4c60ed(0x199)]-0x1,_0x35134f;_0x3c33d6>=0x0;_0x3c33d6--)(_0x35134f=_0x4db7a4[_0x3c33d6])&&(_0x4ead20=_0x35134f(_0x4ead20)||_0x4ead20);return _0x4ead20;},_0x5089b5=(_0x593b97,_0x178217)=>(_0x47a566,_0x51bf38)=>_0x178217(_0x47a566,_0x51bf38,_0x593b97);let _0xd69d66=class extends _0x3c648d[_0x3f0ee5(0x1db)]{constructor(_0x483156,_0x52bda5){const _0x3200e7=_0x3f0ee5;super(),this[_0x3200e7(0x174)]=_0x483156,this['_threadCommentDataSource']=_0x52bda5,this[_0x3200e7(0x1dd)]();}[_0x3f0ee5(0x1dd)](){const _0x708a65=_0x3f0ee5;this['_threadCommentDataSourceService'][_0x708a65(0x190)]=this[_0x708a65(0x175)],this[_0x708a65(0x174)][_0x708a65(0x194)]=!0x1;}};_0xd69d66=_0x3c1b13([_0x5089b5(0x0,_0x3b1059[_0x3f0ee5(0x1bb)]),_0x5089b5(0x1,_0x3c648d[_0x3f0ee5(0x1c0)](_0x474c81))],_0xd69d66);var _0x212fd9=Object[_0x3f0ee5(0x1b0)],_0x1034f4=Object['getOwnPropertyDescriptor'],_0x168ad9=(_0x389b70,_0x164419,_0xb43a44)=>_0x164419 in _0x389b70?_0x212fd9(_0x389b70,_0x164419,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xb43a44}):_0x389b70[_0x164419]=_0xb43a44,_0x542e7c=(_0x4377a4,_0x1bb03a,_0x2be553,_0x2b124c)=>{for(var _0x1bbc95=_0x2b124c>0x1?void 0x0:_0x2b124c?_0x1034f4(_0x1bb03a,_0x2be553):_0x1bb03a,_0x5c2fab=_0x4377a4['length']-0x1,_0x218a73;_0x5c2fab>=0x0;_0x5c2fab--)(_0x218a73=_0x4377a4[_0x5c2fab])&&(_0x1bbc95=_0x218a73(_0x1bbc95)||_0x1bbc95);return _0x1bbc95;},_0x57ee6b=(_0x4c0563,_0x10a7a2)=>(_0x595f52,_0x107929)=>_0x10a7a2(_0x595f52,_0x107929,_0x4c0563),_0x507446=(_0x996b54,_0x2e29fa,_0x2c5fff)=>_0x168ad9(_0x996b54,typeof _0x2e29fa!=_0x3f0ee5(0x1cc)?_0x2e29fa+'':_0x2e29fa,_0x2c5fff);_0x11ecc3[_0x3f0ee5(0x18e)]=class extends _0x3c648d['Plugin']{constructor(_0x1ae307=_0x1e4835,_0xbdb220,_0x43550a){const _0x11341=_0x3f0ee5;super(),this[_0x11341(0x1a5)]=_0x1ae307,this['_injector']=_0xbdb220,this['_configService']=_0x43550a;const {..._0xf4be42}=_0x3c648d[_0x11341(0x198)]({},_0x1e4835,this['_config']);this['_configService']['setConfig'](_0x3a876c,_0xf4be42);}[_0x3f0ee5(0x1f1)](){const _0x334300=_0x3f0ee5;[[_0x474c81],[_0xd69d66],[_0xe4df36]][_0x334300(0x1ab)](_0x5464b8=>{const _0x57f151=_0x334300;this[_0x57f151(0x1d2)]['add'](_0x5464b8);});}[_0x3f0ee5(0x1b5)](){const _0x15a2d3=_0x3f0ee5;this[_0x15a2d3(0x1d2)][_0x15a2d3(0x1bf)](_0xd69d66),this[_0x15a2d3(0x1d2)][_0x15a2d3(0x1bf)](_0xe4df36);}},_0x507446(_0x11ecc3[_0x3f0ee5(0x18e)],_0x3f0ee5(0x1b9),_0x29c887),_0x507446(_0x11ecc3[_0x3f0ee5(0x18e)],_0x3f0ee5(0x187),_0x3c648d[_0x3f0ee5(0x173)]['UNIVER_UNKNOWN']),_0x11ecc3['UniverThreadCommentDataSourcePlugin']=_0x542e7c([_0x3c648d[_0x3f0ee5(0x1f6)](_0x20cd00['UniverThreadCommentUIPlugin'],_0x5d20d9[_0x3f0ee5(0x178)],_0x11ab02[_0x3f0ee5(0x192)]),_0x57ee6b(0x1,_0x3c648d['Inject'](_0x3c648d['Injector'])),_0x57ee6b(0x2,_0x3c648d['IConfigService'])],_0x11ecc3[_0x3f0ee5(0x18e)]),Object[_0x3f0ee5(0x1b0)](_0x11ecc3,Symbol[_0x3f0ee5(0x195)],{'value':'Module'});}));function _0x47e6(){const _0x654b07=['onStarting','Reply','UniverNetwork','_init','_httpService','DependentOn','COMMENT','getOwnPropertyDescriptor','UniverInstanceType','_threadCommentDataSourceService','_threadCommentDataSource','add','getUser','UniverCollaborationClientPlugin','commentUpdate$','object','replies','updateComment','error','parse','values','235704ZrvHJl','find','filter','pipe','OpenOrReOpen','525810SnWKhA','user','type','64810YvrpQv','Solve','621744oQxwKT','addUser','/reply','@univerjs/thread-comment-ui','UniverThreadCommentDataSourcePlugin','resolved','dataSource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverLicensePlugin','post','syncUpdateMutationToColla','toStringTag','code','unitId','merge','length','dayjs','UserManagerService','personId','/list','map','subscribe','rxjs','delete','content','stringify','requireSession','_config','UniverThreadComment','deleteComment','users','resolveComment','_commentService','forEach','getComment','10yJXpld','/delete','_initUserSync','defineProperty','rangeType','ref','getUnit','HTTPService','onReady','slice','6Wyrbiq','exports','pluginName','root','IThreadCommentDataSourceService','@univerjs/core','replyId','YYYY/MM/DD\x20HH:mm','get','Inject','threadId','function','userID','createTimestamp','9977198WSAziX','listComments','3000780DgpskA','saveCommentToSnapshot','Delete','amd','@univerjs/thread-comment','symbol','Edit','@univerjs-pro/license','getCurrentUser','comments','3XwUWBE','_injector','body','UniverProLicense','@univerjs/network','Unknown','Solved','comment','userId','/universer-api/comment/unit/','Disposable','bufferTime','_initDataSource','Injector','rangeId','addComment','UNRECOGNIZED','CommentService','9272qjAZVp','getMemberID','thread-comment-data-source.config','CustomRangeType','disposeWithMe','Add','solved','UniverCore','1568wKsHLq','CollaborationSessionService','_sessionService','_userService','parentId','_threadCommentModel'];_0x47e6=function(){return _0x654b07;};return _0x47e6();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.7.0-nightly.202505211607",
3
+ "version": "0.7.0-nightly.202505221607",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,19 +45,19 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.7.0-nightly.202505211607",
49
- "@univerjs-pro/license": "0.7.0-nightly.202505211607",
50
- "@univerjs/network": "0.7.0-nightly.202505211607",
48
+ "@univerjs-pro/collaboration-client": "0.7.0-nightly.202505221607",
49
+ "@univerjs/core": "0.7.0-nightly.202505221607",
50
+ "@univerjs/network": "0.7.0-nightly.202505221607",
51
51
  "@univerjs/protocol": "0.1.46-alpha.3",
52
- "@univerjs/core": "0.7.0-nightly.202505211607",
53
- "@univerjs/thread-comment": "0.7.0-nightly.202505211607",
54
- "@univerjs/thread-comment-ui": "0.7.0-nightly.202505211607"
52
+ "@univerjs-pro/license": "0.7.0-nightly.202505221607",
53
+ "@univerjs/thread-comment": "0.7.0-nightly.202505221607",
54
+ "@univerjs/thread-comment-ui": "0.7.0-nightly.202505221607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.8.3",
59
59
  "vite": "^6.3.5",
60
- "vitest": "^3.1.3",
60
+ "vitest": "^3.1.4",
61
61
  "@univerjs-infra/shared": "0.7.0"
62
62
  },
63
63
  "scripts": {