@univerjs-pro/thread-comment-datasource 0.8.1-nightly.202506141606 → 0.8.1-nightly.202506151606

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 _0x34c9d3=_0x1012;(function(_0x42e8ea,_0x2f22a7){const _0xf7b0d=_0x1012,_0x300649=_0x42e8ea();while(!![]){try{const _0x38d2bb=parseInt(_0xf7b0d(0x225))/0x1+parseInt(_0xf7b0d(0x1de))/0x2*(parseInt(_0xf7b0d(0x1ea))/0x3)+-parseInt(_0xf7b0d(0x1da))/0x4*(parseInt(_0xf7b0d(0x20f))/0x5)+-parseInt(_0xf7b0d(0x208))/0x6*(-parseInt(_0xf7b0d(0x1fc))/0x7)+-parseInt(_0xf7b0d(0x214))/0x8+-parseInt(_0xf7b0d(0x1e1))/0x9*(parseInt(_0xf7b0d(0x1ec))/0xa)+parseInt(_0xf7b0d(0x1c1))/0xb;if(_0x38d2bb===_0x2f22a7)break;else _0x300649['push'](_0x300649['shift']());}catch(_0x51d758){_0x300649['push'](_0x300649['shift']());}}}(_0x289e,0xe45c8));Object[_0x34c9d3(0x1dc)](exports,Symbol['toStringTag'],{'value':_0x34c9d3(0x1b7)});const b=require(_0x34c9d3(0x228)),T=require(_0x34c9d3(0x1f4)),c=require('@univerjs/core'),j=require(_0x34c9d3(0x1bb)),M=require(_0x34c9d3(0x213)),w=require(_0x34c9d3(0x207)),P=require('@univerjs/network'),U=_0x34c9d3(0x1c8);function _0x1012(_0x1d639f,_0x3af2de){const _0x289e25=_0x289e();return _0x1012=function(_0x1012f8,_0x3da381){_0x1012f8=_0x1012f8-0x1b3;let _0x444c90=_0x289e25[_0x1012f8];return _0x444c90;},_0x1012(_0x1d639f,_0x3af2de);}var I=(_0x24083d=>(_0x24083d[_0x24083d[_0x34c9d3(0x1dd)]=0x0]=_0x34c9d3(0x1dd),_0x24083d[_0x24083d[_0x34c9d3(0x202)]=0x1]='Solved',_0x24083d[_0x24083d[_0x34c9d3(0x1f7)]=-0x1]=_0x34c9d3(0x1f7),_0x24083d))(I||{}),v=(_0x257672=>(_0x257672[_0x257672[_0x34c9d3(0x1c0)]=0x0]='Unknown',_0x257672[_0x257672[_0x34c9d3(0x20b)]=0x1]=_0x34c9d3(0x20b),_0x257672[_0x257672[_0x34c9d3(0x21a)]=0x2]=_0x34c9d3(0x21a),_0x257672[_0x257672[_0x34c9d3(0x1f9)]=0x3]=_0x34c9d3(0x1f9),_0x257672[_0x257672[_0x34c9d3(0x1ed)]=0x4]=_0x34c9d3(0x1ed),_0x257672[_0x257672[_0x34c9d3(0x1bf)]=0x5]='Solve',_0x257672[_0x257672[_0x34c9d3(0x1f7)]=-0x1]=_0x34c9d3(0x1f7),_0x257672))(v||{});const f=_0x252ac2=>c[_0x34c9d3(0x221)](new Date(+_0x252ac2))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x229240,_0x2181f6)=>{const _0x33a30b=_0x34c9d3,_0x206b83=_0x229240[_0x33a30b(0x1c7)](c[_0x33a30b(0x22c)]),_0x2100cb=_0x229240['get'](P[_0x33a30b(0x203)]);_0x2181f6[_0x33a30b(0x1ef)](_0x344aff=>{const _0x1c58e6=_0x33a30b;_0x206b83['getUser'](_0x344aff)&&_0x2181f6[_0x1c58e6(0x1c4)](_0x344aff);}),_0x2181f6['size']&&(await _0x2100cb[_0x33a30b(0x1c7)](_0x33a30b(0x1cc),{'params':{'userIDs':[..._0x2181f6]}}))[_0x33a30b(0x224)][_0x33a30b(0x1d1)][_0x33a30b(0x1ef)](_0x49dcec=>{const _0x5e1751=_0x33a30b;_0x49dcec&&_0x206b83[_0x5e1751(0x231)](_0x49dcec);});};var $=Object[_0x34c9d3(0x1c6)],E=(_0x4f253c,_0x3efce2,_0x13fd0c,_0x29d451)=>{const _0x5a2fae=_0x34c9d3;for(var _0xb88696=_0x29d451>0x1?void 0x0:_0x29d451?$(_0x3efce2,_0x13fd0c):_0x3efce2,_0xe82e3e=_0x4f253c[_0x5a2fae(0x212)]-0x1,_0x5a3bf4;_0xe82e3e>=0x0;_0xe82e3e--)(_0x5a3bf4=_0x4f253c[_0xe82e3e])&&(_0xb88696=_0x5a3bf4(_0xb88696)||_0xb88696);return _0xb88696;},S=(_0x3b80df,_0x4fa89f)=>(_0x4f93d,_0x3fa97c)=>_0x4fa89f(_0x4f93d,_0x3fa97c,_0x3b80df);let p=class extends c['Disposable']{constructor(_0x4d6931,_0x36f65e,_0xdffb34,_0x40ed09){const _0x661e9a=_0x34c9d3;super(),this[_0x661e9a(0x234)]=_0x4d6931,this['_threadCommentModel']=_0x36f65e,this[_0x661e9a(0x1f3)]=_0xdffb34,this[_0x661e9a(0x1b5)]=_0x40ed09,this['_init'](),this[_0x661e9a(0x1e3)]();}['_initUserSync'](){const _0x37a837=_0x34c9d3;this[_0x37a837(0x1e8)](this['_threadCommentModel'][_0x37a837(0x1ce)][_0x37a837(0x1d2)](w[_0x37a837(0x216)](0x10))[_0x37a837(0x22e)](_0x172899=>{const _0x44393b=_0x37a837,_0xf093f5=new Set();_0x172899['forEach'](_0x58d908=>{const _0x20cc59=_0x1012;switch(_0x58d908[_0x20cc59(0x1cf)]){case _0x20cc59(0x223):{const _0x3db0dc=_0x58d908['payload'][_0x20cc59(0x1d0)];_0xf093f5[_0x20cc59(0x223)](_0x3db0dc);break;}}}),R(this[_0x44393b(0x1b5)],_0xf093f5);}));}[_0x34c9d3(0x21f)](){const _0x58fba3=_0x34c9d3;this[_0x58fba3(0x1e8)](this[_0x58fba3(0x234)][_0x58fba3(0x1ce)][_0x58fba3(0x22e)](async _0x300010=>{const _0x115ed6=_0x58fba3;var _0x366762,_0x5f4cd2,_0x5e003e,_0x33685f;const _0x321e80=(_0x366762=this[_0x115ed6(0x1bc)]['getUnit'](_0x300010['unitId'])[_0x115ed6(0x21e)](_0x37d584=>_0x37d584[_0x115ed6(0x1fb)]===_0x300010['threadId']))==null?void 0x0:_0x366762[_0x115ed6(0x206)];if(!_0x321e80)return;const {unitId:_0x111fc5,subUnitId:_0x45849d}=_0x321e80;switch(_0x300010[_0x115ed6(0x1c2)]&&this['_userService'][_0x115ed6(0x231)](_0x300010[_0x115ed6(0x1c2)]),_0x300010[_0x115ed6(0x1cf)]){case v['Add']:break;case v[_0x115ed6(0x21a)]:{this[_0x115ed6(0x1bc)][_0x115ed6(0x210)](_0x111fc5,_0x45849d,{'unitId':_0x111fc5,'subUnitId':_0x45849d,'ref':'','id':_0x300010[_0x115ed6(0x205)],'dT':f(+_0x300010[_0x115ed6(0x1d7)]),'threadId':_0x300010[_0x115ed6(0x1fb)],'personId':(_0x5e003e=(_0x5f4cd2=_0x300010[_0x115ed6(0x1c2)])==null?void 0x0:_0x5f4cd2[_0x115ed6(0x20d)])!=null?_0x5e003e:_0x300010['userId'],'text':JSON[_0x115ed6(0x1e0)](_0x300010[_0x115ed6(0x1d5)]),'parentId':_0x321e80['id']});break;}case v[_0x115ed6(0x1ed)]:{const _0xcabfc3=this[_0x115ed6(0x1bc)][_0x115ed6(0x1b6)](_0x111fc5,_0x45849d,_0x300010[_0x115ed6(0x205)]);_0xcabfc3&&_0xcabfc3[_0x115ed6(0x1d6)]&&this['_threadCommentModel'][_0x115ed6(0x1eb)](_0x111fc5,_0x45849d,_0x300010[_0x115ed6(0x205)]);break;}case v[_0x115ed6(0x1f9)]:{this[_0x115ed6(0x1bc)]['updateComment'](_0x111fc5,_0x45849d,{'commentId':_0x300010[_0x115ed6(0x205)],'text':JSON['parse'](_0x300010[_0x115ed6(0x1d5)])});break;}case v[_0x115ed6(0x1bf)]:{const _0x175c6e=(_0x33685f=this[_0x115ed6(0x1bc)][_0x115ed6(0x1bd)](_0x300010[_0x115ed6(0x1db)])[_0x115ed6(0x21e)](_0x503e9f=>_0x503e9f[_0x115ed6(0x1fb)]===_0x300010[_0x115ed6(0x1fb)]))==null?void 0x0:_0x33685f[_0x115ed6(0x206)];_0x175c6e&&this[_0x115ed6(0x1bc)][_0x115ed6(0x1fe)](_0x111fc5,_0x45849d,_0x175c6e['id'],_0x300010['solved']===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x34c9d3(0x1e2)](b[_0x34c9d3(0x1d9)])),S(0x1,c[_0x34c9d3(0x1e2)](M[_0x34c9d3(0x1c3)])),S(0x2,c[_0x34c9d3(0x1e2)](c[_0x34c9d3(0x22c)])),S(0x3,c[_0x34c9d3(0x1e2)](c[_0x34c9d3(0x1df)]))],p);const q=_0x34c9d3(0x22a),D={};var A=Object[_0x34c9d3(0x1c6)],x=(_0x379452,_0x4e4f0f,_0x56743d,_0x4310ef)=>{const _0x1d4c7e=_0x34c9d3;for(var _0x369920=_0x4310ef>0x1?void 0x0:_0x4310ef?A(_0x4e4f0f,_0x56743d):_0x4e4f0f,_0x2ea787=_0x379452[_0x1d4c7e(0x212)]-0x1,_0x16b3f3;_0x2ea787>=0x0;_0x2ea787--)(_0x16b3f3=_0x379452[_0x2ea787])&&(_0x369920=_0x16b3f3(_0x369920)||_0x369920);return _0x369920;},_=(_0x553b3d,_0x3fcdd6)=>(_0x5dec22,_0x940576)=>_0x3fcdd6(_0x5dec22,_0x940576,_0x553b3d);function Y(_0x4f884a,_0xd0bd13){const _0x1e3f18=_0x34c9d3,_0x251c8c=_0x4f884a[_0x1e3f18(0x1cd)][0x0];return{..._0xd0bd13,'id':_0x251c8c[_0x1e3f18(0x205)],'resolved':_0x4f884a[_0x1e3f18(0x1ca)]===0x1,'dT':f(_0x251c8c[_0x1e3f18(0x1d7)]),'personId':_0x251c8c[_0x1e3f18(0x21c)],'threadId':_0x251c8c[_0x1e3f18(0x1fb)]};}function _0x289e(){const _0x183ea7=['syncUpdateMutationToColla','resolveComment','COMMENT','IThreadCommentDataSourceService','CollaborationSessionService','Solved','HTTPService','UniverLicensePlugin','replyId','root','rxjs','3951978lCvTRJ','comments','_httpService','Add','onReady','userID','filter','7435jNLGXW','addComment','ref','length','@univerjs/thread-comment','12523584IKJKQW','dataSource','bufferTime','CustomRangeType','UNIVER_UNKNOWN','onStarting','Reply','resolved','userId','/reply','find','_init','map','dayjs','/edit','add','body','1572119KkzitM','slice','pluginName','@univerjs-pro/collaboration-client','DependentOn','thread-comment-data-source.config','UniverCollaborationClientPlugin','UserManagerService','/add','subscribe','symbol','/delete','addUser','_sessionService','getCurrentUser','_commentService','/universer-api/comment/unit/','comment','format','_injector','getComment','Module','updateComment','merge','stringify','@univerjs/thread-comment-ui','_threadCommentModel','getUnit','requireSession','Solve','Unknown','16882547WPbRVz','user','ThreadCommentModel','delete','_initDataSource','getOwnPropertyDescriptor','get','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverThreadCommentDataSourcePlugin','solved','_config','/universer-api/user/list','replies','commentUpdate$','type','personId','users','pipe','listComments','getMemberID','content','parentId','createTimestamp','values','CommentService','3876dVvrWn','unitId','defineProperty','OpenOrReOpen','6TNFTnj','Injector','parse','54GQoBSI','Inject','_initUserSync','customRanges','IConfigService','rangeType','reply','disposeWithMe','/list','1774314TSQCgY','deleteComment','2663590CBGFFh','Delete','_configService','forEach','Disposable','rangeId','code','_userService','@univerjs-pro/license','_threadCommentDataSource','error','UNRECOGNIZED','post','Edit','_threadCommentDataSourceService','threadId','7mxJIIT'];_0x289e=function(){return _0x183ea7;};return _0x289e();}function G(_0x4aec79,_0x36a157,_0x487d2f){const _0x452633=_0x34c9d3;var _0x47edbe,_0x5de2f3;if(((_0x5de2f3=(_0x47edbe=_0x4aec79==null?void 0x0:_0x4aec79[_0x452633(0x1cd)])==null?void 0x0:_0x47edbe[_0x452633(0x212)])!=null?_0x5de2f3:0x0)>0x0){const _0x2cbc4a=(_0x1c056b,_0x2ff5d0)=>({'id':_0x1c056b[_0x452633(0x205)],'threadId':_0x1c056b[_0x452633(0x1fb)],'dT':f(_0x1c056b['createTimestamp']),'personId':_0x1c056b[_0x452633(0x21c)],'resolved':_0x4aec79[_0x452633(0x1ca)]===I[_0x452633(0x202)],'unitId':_0x36a157,'subUnitId':_0x487d2f,'text':JSON[_0x452633(0x1e0)](_0x1c056b[_0x452633(0x1d5)]),'parentId':_0x2ff5d0}),_0x2a35ab=_0x2cbc4a(_0x4aec79[_0x452633(0x1cd)][0x0]);return{..._0x2a35ab,'children':_0x4aec79[_0x452633(0x1cd)][_0x452633(0x226)](0x1)['map'](_0x2e8d71=>_0x2cbc4a(_0x2e8d71,_0x2a35ab['id']))};}return null;}let g=class{constructor(_0x367ebc,_0x1943da,_0x39cd4f,_0x39e7bf){const _0x171b70=_0x34c9d3;this['_httpService']=_0x367ebc,this[_0x171b70(0x1f3)]=_0x1943da,this[_0x171b70(0x232)]=_0x39cd4f,this['_injector']=_0x39e7bf;}async[_0x34c9d3(0x210)](_0x45915a){const _0x2fb839=_0x34c9d3;var _0x92bdc1,_0x535fb9;const {parentId:_0x34e78d,unitId:_0x77dbb1,text:_0x263a49,threadId:_0x47e800}=_0x45915a,_0x16ddb6=(_0x535fb9=(_0x92bdc1=_0x263a49[_0x2fb839(0x1e4)])==null?void 0x0:_0x92bdc1[_0x2fb839(0x20e)](_0x15e588=>_0x15e588[_0x2fb839(0x1e6)]===c[_0x2fb839(0x217)][_0x2fb839(0x1ff)])['map'](_0xf56af8=>_0xf56af8[_0x2fb839(0x1f1)]))!=null?_0x535fb9:[],_0xcf4396=JSON[_0x2fb839(0x1ba)](_0x263a49),_0x78f452=(await this[_0x2fb839(0x232)][_0x2fb839(0x1be)](_0x77dbb1))[_0x2fb839(0x1d4)]();if(_0x34e78d){const _0x3fbe93={'memberId':_0x78f452,'unitId':_0x77dbb1,'content':_0xcf4396,'mention':_0x16ddb6,'threadId':_0x47e800},_0x109fdb=(await this['_httpService'][_0x2fb839(0x1f8)](_0x2fb839(0x235)+_0x77dbb1+_0x2fb839(0x21d),{'body':_0x3fbe93}))[_0x2fb839(0x224)][_0x2fb839(0x1e7)];return{..._0x45915a,'id':_0x109fdb['replyId'],'dT':c['dayjs'](+_0x109fdb[_0x2fb839(0x1d7)])[_0x2fb839(0x1b4)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x109fdb[_0x2fb839(0x21c)]};}else{const _0x41d972={'memberId':_0x78f452,'unitId':_0x77dbb1,'content':_0xcf4396,'mention':_0x16ddb6},_0x29b9df=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x77dbb1+_0x2fb839(0x22d),{'body':_0x41d972});return Y(_0x29b9df[_0x2fb839(0x224)][_0x2fb839(0x1b3)],_0x45915a);}}async[_0x34c9d3(0x1b8)](_0x45e56d){const _0xb1b234=_0x34c9d3;var _0x16040b,_0x3df359;const {text:_0x11e502,unitId:_0x3d7f3a}=_0x45e56d,_0x4e7da5=(_0x3df359=(_0x16040b=_0x11e502['customRanges'])==null?void 0x0:_0x16040b['filter'](_0x1f759e=>_0x1f759e[_0xb1b234(0x1e6)]===c[_0xb1b234(0x217)]['COMMENT'])[_0xb1b234(0x220)](_0x520d0c=>_0x520d0c[_0xb1b234(0x1f1)]))!=null?_0x3df359:[],_0x2d9e12=JSON['stringify'](_0x11e502),_0x53f67d=_0x45e56d[_0xb1b234(0x1fb)],_0xfbb47=_0x45e56d['id'],_0x121de6={'memberId':(await this['_sessionService'][_0xb1b234(0x1be)](_0x3d7f3a))[_0xb1b234(0x1d4)](),'unitId':_0x3d7f3a,'threadId':_0x53f67d,'mention':_0x4e7da5,'content':_0x2d9e12,'replyId':_0xfbb47},_0x40ab00=await this['_httpService'][_0xb1b234(0x1f8)](_0xb1b234(0x235)+_0x3d7f3a+_0xb1b234(0x222),{'body':_0x121de6});return!_0x40ab00[_0xb1b234(0x224)]['error']||_0x40ab00[_0xb1b234(0x224)][_0xb1b234(0x1f6)][_0xb1b234(0x1f2)]===0x1;}async[_0x34c9d3(0x1fe)](_0x660ed4){const _0x3dc4d7=_0x34c9d3,{unitId:_0x4432a0}=_0x660ed4,_0x12cd23=_0x660ed4['threadId'],_0x3761e7={'memberId':this[_0x3dc4d7(0x1f3)][_0x3dc4d7(0x233)]()[_0x3dc4d7(0x20d)],'unitId':_0x4432a0,'threadId':_0x12cd23,'solved':_0x660ed4[_0x3dc4d7(0x21b)]?I['Solved']:I['OpenOrReOpen']},_0x11350e=await this[_0x3dc4d7(0x20a)][_0x3dc4d7(0x1f8)](_0x3dc4d7(0x235)+_0x4432a0+'/solved',{'body':_0x3761e7});return!_0x11350e['body'][_0x3dc4d7(0x1f6)]||_0x11350e[_0x3dc4d7(0x224)]['error']['code']===0x1;}async[_0x34c9d3(0x1eb)](_0x20fd5a,_0x3616c2,_0x43ea44,_0x1351b1){const _0x319a03=_0x34c9d3,_0x1695c9={'memberId':(await this[_0x319a03(0x232)][_0x319a03(0x1be)](_0x20fd5a))[_0x319a03(0x1d4)](),'threadId':_0x43ea44,'replyId':_0x1351b1,'unitId':_0x20fd5a},_0x125bcc=await this[_0x319a03(0x20a)]['post'](_0x319a03(0x235)+_0x20fd5a+_0x319a03(0x230),{'body':_0x1695c9});return!_0x125bcc[_0x319a03(0x224)][_0x319a03(0x1f6)]||_0x125bcc[_0x319a03(0x224)]['error']['code']===0x1;}async[_0x34c9d3(0x1d3)](_0x3e1300,_0x162693,_0x11f347){const _0x4073c6=_0x34c9d3,_0x592dbd={'unitId':_0x3e1300,'threadId':_0x11f347},_0x49e150=await this[_0x4073c6(0x20a)]['post'](_0x4073c6(0x235)+_0x3e1300+_0x4073c6(0x1e9),{'body':_0x592dbd}),_0x72ef08=_0x11f347['map'](_0x410c5b=>G(_0x49e150[_0x4073c6(0x224)][_0x4073c6(0x209)][_0x410c5b],_0x3e1300,_0x162693))[_0x4073c6(0x20e)](Boolean);return Object[_0x4073c6(0x1d8)](_0x49e150['body']['users'])['forEach'](_0x58cbd8=>{const _0x39f56a=_0x4073c6;this[_0x39f56a(0x1f3)]['addUser'](_0x58cbd8);}),_0x72ef08;}['saveCommentToSnapshot'](_0x36823c){const _0x166abc=_0x34c9d3;return{'id':_0x36823c['id'],'threadId':_0x36823c[_0x166abc(0x1fb)],'ref':_0x36823c[_0x166abc(0x211)]};}};g=x([_(0x0,c['Inject'](P[_0x34c9d3(0x203)])),_(0x1,c[_0x34c9d3(0x1e2)](c[_0x34c9d3(0x22c)])),_(0x2,c[_0x34c9d3(0x1e2)](b[_0x34c9d3(0x201)])),_(0x3,c[_0x34c9d3(0x1e2)](c[_0x34c9d3(0x1df)]))],g);var H=Object[_0x34c9d3(0x1c6)],J=(_0x14f027,_0x1e5ffa,_0x689dfc,_0x1dcdde)=>{const _0x3de6bd=_0x34c9d3;for(var _0x57b34d=_0x1dcdde>0x1?void 0x0:_0x1dcdde?H(_0x1e5ffa,_0x689dfc):_0x1e5ffa,_0x3b0168=_0x14f027[_0x3de6bd(0x212)]-0x1,_0x340d03;_0x3b0168>=0x0;_0x3b0168--)(_0x340d03=_0x14f027[_0x3b0168])&&(_0x57b34d=_0x340d03(_0x57b34d)||_0x57b34d);return _0x57b34d;},y=(_0x480305,_0x3dad4e)=>(_0x107c72,_0x6b88e0)=>_0x3dad4e(_0x107c72,_0x6b88e0,_0x480305);let C=class extends c[_0x34c9d3(0x1f0)]{constructor(_0x2b51d6,_0x2483fa){const _0x2ce469=_0x34c9d3;super(),this['_threadCommentDataSourceService']=_0x2b51d6,this[_0x2ce469(0x1f5)]=_0x2483fa,this[_0x2ce469(0x1c5)]();}[_0x34c9d3(0x1c5)](){const _0x1c7934=_0x34c9d3;this[_0x1c7934(0x1fa)][_0x1c7934(0x215)]=this[_0x1c7934(0x1f5)],this[_0x1c7934(0x1fa)][_0x1c7934(0x1fd)]=!0x1;}};C=J([y(0x0,M[_0x34c9d3(0x200)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x34c9d3(0x1dc)],L=Object[_0x34c9d3(0x1c6)],Z=(_0x196b8a,_0x4d0d8e,_0x1e1cfb)=>_0x4d0d8e in _0x196b8a?F(_0x196b8a,_0x4d0d8e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1e1cfb}):_0x196b8a[_0x4d0d8e]=_0x1e1cfb,W=(_0x56b858,_0x3a0fd3,_0xbf323e,_0x2a3c07)=>{const _0x441eed=_0x34c9d3;for(var _0x6b97ff=_0x2a3c07>0x1?void 0x0:_0x2a3c07?L(_0x3a0fd3,_0xbf323e):_0x3a0fd3,_0x3f21b0=_0x56b858[_0x441eed(0x212)]-0x1,_0x3a6c63;_0x3f21b0>=0x0;_0x3f21b0--)(_0x3a6c63=_0x56b858[_0x3f21b0])&&(_0x6b97ff=_0x3a6c63(_0x6b97ff)||_0x6b97ff);return _0x6b97ff;},O=(_0x5c6b74,_0x2233ec)=>(_0x513270,_0x402655)=>_0x2233ec(_0x513270,_0x402655,_0x5c6b74),N=(_0x4c9118,_0x4d7b7d,_0x1c5dc6)=>Z(_0x4c9118,typeof _0x4d7b7d!=_0x34c9d3(0x22f)?_0x4d7b7d+'':_0x4d7b7d,_0x1c5dc6);exports[_0x34c9d3(0x1c9)]=class extends c['Plugin']{constructor(_0x562ae3=D,_0x513023,_0x365f54){const _0x3ade65=_0x34c9d3;super(),this[_0x3ade65(0x1cb)]=_0x562ae3,this[_0x3ade65(0x1b5)]=_0x513023,this[_0x3ade65(0x1ee)]=_0x365f54;const {..._0xbea690}=c[_0x3ade65(0x1b9)]({},D,this['_config']);this[_0x3ade65(0x1ee)]['setConfig'](q,_0xbea690);}[_0x34c9d3(0x219)](){[[g],[C],[p]]['forEach'](_0x3ef8ca=>{const _0x25ab1a=_0x1012;this[_0x25ab1a(0x1b5)]['add'](_0x3ef8ca);});}[_0x34c9d3(0x20c)](){const _0x1ee295=_0x34c9d3;this['_injector'][_0x1ee295(0x1c7)](C),this[_0x1ee295(0x1b5)][_0x1ee295(0x1c7)](p);}},N(exports[_0x34c9d3(0x1c9)],_0x34c9d3(0x227),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x34c9d3(0x1cf),c['UniverInstanceType'][_0x34c9d3(0x218)]),exports[_0x34c9d3(0x1c9)]=W([c[_0x34c9d3(0x229)](j['UniverThreadCommentUIPlugin'],b[_0x34c9d3(0x22b)],T[_0x34c9d3(0x204)]),O(0x1,c[_0x34c9d3(0x1e2)](c[_0x34c9d3(0x1df)])),O(0x2,c[_0x34c9d3(0x1e5)])],exports[_0x34c9d3(0x1c9)]);
1
+ 'use strict';const _0x4273bd=_0x2cbf;(function(_0x29cc5b,_0x2f58a2){const _0x4d14dd=_0x2cbf,_0x2a8a56=_0x29cc5b();while(!![]){try{const _0x454db6=parseInt(_0x4d14dd(0x15a))/0x1+parseInt(_0x4d14dd(0x195))/0x2*(-parseInt(_0x4d14dd(0x14a))/0x3)+-parseInt(_0x4d14dd(0x172))/0x4+-parseInt(_0x4d14dd(0x13f))/0x5+-parseInt(_0x4d14dd(0x19c))/0x6*(-parseInt(_0x4d14dd(0x15e))/0x7)+parseInt(_0x4d14dd(0x17f))/0x8*(-parseInt(_0x4d14dd(0x148))/0x9)+parseInt(_0x4d14dd(0x143))/0xa*(parseInt(_0x4d14dd(0x197))/0xb);if(_0x454db6===_0x2f58a2)break;else _0x2a8a56['push'](_0x2a8a56['shift']());}catch(_0x5b8a91){_0x2a8a56['push'](_0x2a8a56['shift']());}}}(_0x17a9,0xee943));Object['defineProperty'](exports,Symbol[_0x4273bd(0x184)],{'value':_0x4273bd(0x160)});const b=require(_0x4273bd(0x17a)),T=require(_0x4273bd(0x1a0)),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require(_0x4273bd(0x193)),w=require('rxjs'),P=require(_0x4273bd(0x18b)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xa0d434=>(_0xa0d434[_0xa0d434[_0x4273bd(0x192)]=0x0]=_0x4273bd(0x192),_0xa0d434[_0xa0d434[_0x4273bd(0x1b9)]=0x1]=_0x4273bd(0x1b9),_0xa0d434[_0xa0d434[_0x4273bd(0x163)]=-0x1]=_0x4273bd(0x163),_0xa0d434))(I||{}),v=(_0x84d24e=>(_0x84d24e[_0x84d24e[_0x4273bd(0x173)]=0x0]=_0x4273bd(0x173),_0x84d24e[_0x84d24e[_0x4273bd(0x142)]=0x1]=_0x4273bd(0x142),_0x84d24e[_0x84d24e[_0x4273bd(0x1b4)]=0x2]=_0x4273bd(0x1b4),_0x84d24e[_0x84d24e[_0x4273bd(0x169)]=0x3]=_0x4273bd(0x169),_0x84d24e[_0x84d24e['Delete']=0x4]=_0x4273bd(0x151),_0x84d24e[_0x84d24e[_0x4273bd(0x13d)]=0x5]=_0x4273bd(0x13d),_0x84d24e[_0x84d24e[_0x4273bd(0x163)]=-0x1]=_0x4273bd(0x163),_0x84d24e))(v||{});function _0x17a9(){const _0x20b6cc=['CommentService','replies','OpenOrReOpen','@univerjs/thread-comment','threadId','2PXpWfn','/list','6167953iGjqGb','unitId','updateComment','/universer-api/comment/unit/','type','326958QOjHVX','thread-comment-data-source.config','size','CustomRangeType','@univerjs-pro/license','pluginName','add','post','listComments','content','length','UniverCollaborationClientPlugin','stringify','slice','_threadCommentModel','defineProperty','_threadCommentDataSource','format','addUser','/add','userID','UniverInstanceType','replyId','COMMENT','Reply','IThreadCommentDataSourceService','rangeId','delete','getOwnPropertyDescriptor','Solved','deleteComment','getComment','/reply','Solve','addComment','1633630IQHajo','user','customRanges','Add','20pTyODt','dataSource','Inject','reply','values','27eahPCu','merge','4257717NAMSyC','resolveComment','filter','UniverThreadCommentUIPlugin','_configService','Disposable','saveCommentToSnapshot','Delete','getMemberID','_initUserSync','parse','UserManagerService','onStarting','Injector','YYYY/MM/DD\x20HH:mm','root','1371983ZtqkGd','personId','_threadCommentDataSourceService','HTTPService','154tMbmhp','_injector','Module','userId','forEach','UNRECOGNIZED','map','/solved','_userService','comments','/edit','Edit','_sessionService','solved','find','bufferTime','_init','dayjs','setConfig','getUnit','3508600eoTWEO','Unknown','ref','body','createTimestamp','getUser','symbol','subscribe','@univerjs-pro/collaboration-client','disposeWithMe','_commentService','users','code','245176TtbPNs','commentUpdate$','_initDataSource','comment','/universer-api/user/list','toStringTag','/delete','requireSession','error','UniverThreadCommentDataSourcePlugin','getCurrentUser','pipe','@univerjs/network','onReady','_httpService','CollaborationSessionService','get'];_0x17a9=function(){return _0x20b6cc;};return _0x17a9();}function _0x2cbf(_0x287195,_0x38ddd4){const _0x17a997=_0x17a9();return _0x2cbf=function(_0x2cbfa2,_0x2aa9e7){_0x2cbfa2=_0x2cbfa2-0x13a;let _0x1fb4e6=_0x17a997[_0x2cbfa2];return _0x1fb4e6;},_0x2cbf(_0x287195,_0x38ddd4);}const f=_0x2b3911=>c[_0x4273bd(0x16f)](new Date(+_0x2b3911))[_0x4273bd(0x1ad)](_0x4273bd(0x158)),R=async(_0x230799,_0x4d9cba)=>{const _0x36fb89=_0x4273bd,_0x19ae31=_0x230799[_0x36fb89(0x18f)](c[_0x36fb89(0x155)]),_0x11fed7=_0x230799[_0x36fb89(0x18f)](P[_0x36fb89(0x15d)]);_0x4d9cba[_0x36fb89(0x162)](_0x47e4a2=>{const _0x2eac18=_0x36fb89;_0x19ae31[_0x2eac18(0x177)](_0x47e4a2)&&_0x4d9cba[_0x2eac18(0x1b7)](_0x47e4a2);}),_0x4d9cba[_0x36fb89(0x19e)]&&(await _0x11fed7[_0x36fb89(0x18f)](_0x36fb89(0x183),{'params':{'userIDs':[..._0x4d9cba]}}))[_0x36fb89(0x175)]['users']['forEach'](_0x2f5f93=>{const _0x3a38e1=_0x36fb89;_0x2f5f93&&_0x19ae31[_0x3a38e1(0x1ae)](_0x2f5f93);});};var $=Object[_0x4273bd(0x1b8)],E=(_0x4bf83a,_0x2a48c5,_0x42bc98,_0x2fc269)=>{const _0x3a769d=_0x4273bd;for(var _0xafc864=_0x2fc269>0x1?void 0x0:_0x2fc269?$(_0x2a48c5,_0x42bc98):_0x2a48c5,_0x57594f=_0x4bf83a[_0x3a769d(0x1a6)]-0x1,_0x541465;_0x57594f>=0x0;_0x57594f--)(_0x541465=_0x4bf83a[_0x57594f])&&(_0xafc864=_0x541465(_0xafc864)||_0xafc864);return _0xafc864;},S=(_0x44fc3f,_0x4852ba)=>(_0x19cdcf,_0x33ab5b)=>_0x4852ba(_0x19cdcf,_0x33ab5b,_0x44fc3f);let p=class extends c['Disposable']{constructor(_0x264886,_0x1061f3,_0x48eb89,_0x1df609){const _0x57795b=_0x4273bd;super(),this[_0x57795b(0x17c)]=_0x264886,this[_0x57795b(0x1aa)]=_0x1061f3,this['_userService']=_0x48eb89,this['_injector']=_0x1df609,this[_0x57795b(0x16e)](),this['_initUserSync']();}[_0x4273bd(0x153)](){const _0x2b11ca=_0x4273bd;this['disposeWithMe'](this[_0x2b11ca(0x1aa)][_0x2b11ca(0x180)][_0x2b11ca(0x18a)](w[_0x2b11ca(0x16d)](0x10))[_0x2b11ca(0x179)](_0x115cd3=>{const _0x35e97a=_0x2b11ca,_0x2a8831=new Set();_0x115cd3[_0x35e97a(0x162)](_0x532699=>{const _0x4e0ff6=_0x35e97a;switch(_0x532699[_0x4e0ff6(0x19b)]){case _0x4e0ff6(0x1a2):{const _0x44ffd3=_0x532699['payload'][_0x4e0ff6(0x15b)];_0x2a8831[_0x4e0ff6(0x1a2)](_0x44ffd3);break;}}}),R(this[_0x35e97a(0x15f)],_0x2a8831);}));}[_0x4273bd(0x16e)](){const _0xd0d3e1=_0x4273bd;this[_0xd0d3e1(0x17b)](this[_0xd0d3e1(0x17c)][_0xd0d3e1(0x180)][_0xd0d3e1(0x179)](async _0x19d04a=>{const _0x74aaba=_0xd0d3e1;var _0x1149c7,_0x3553ea,_0x1d705f,_0x5480a4;const _0x37be08=(_0x1149c7=this[_0x74aaba(0x1aa)][_0x74aaba(0x171)](_0x19d04a[_0x74aaba(0x198)])[_0x74aaba(0x16c)](_0x5d3c96=>_0x5d3c96[_0x74aaba(0x194)]===_0x19d04a[_0x74aaba(0x194)]))==null?void 0x0:_0x1149c7[_0x74aaba(0x159)];if(!_0x37be08)return;const {unitId:_0x1a8772,subUnitId:_0x18443a}=_0x37be08;switch(_0x19d04a[_0x74aaba(0x140)]&&this[_0x74aaba(0x166)][_0x74aaba(0x1ae)](_0x19d04a[_0x74aaba(0x140)]),_0x19d04a[_0x74aaba(0x19b)]){case v['Add']:break;case v[_0x74aaba(0x1b4)]:{this['_threadCommentModel'][_0x74aaba(0x13e)](_0x1a8772,_0x18443a,{'unitId':_0x1a8772,'subUnitId':_0x18443a,'ref':'','id':_0x19d04a[_0x74aaba(0x1b2)],'dT':f(+_0x19d04a['createTimestamp']),'threadId':_0x19d04a['threadId'],'personId':(_0x1d705f=(_0x3553ea=_0x19d04a[_0x74aaba(0x140)])==null?void 0x0:_0x3553ea[_0x74aaba(0x1b0)])!=null?_0x1d705f:_0x19d04a[_0x74aaba(0x161)],'text':JSON['parse'](_0x19d04a[_0x74aaba(0x1a5)]),'parentId':_0x37be08['id']});break;}case v[_0x74aaba(0x151)]:{const _0x3c6d6a=this['_threadCommentModel'][_0x74aaba(0x13b)](_0x1a8772,_0x18443a,_0x19d04a[_0x74aaba(0x1b2)]);_0x3c6d6a&&_0x3c6d6a['parentId']&&this[_0x74aaba(0x1aa)][_0x74aaba(0x13a)](_0x1a8772,_0x18443a,_0x19d04a[_0x74aaba(0x1b2)]);break;}case v[_0x74aaba(0x169)]:{this[_0x74aaba(0x1aa)][_0x74aaba(0x199)](_0x1a8772,_0x18443a,{'commentId':_0x19d04a[_0x74aaba(0x1b2)],'text':JSON[_0x74aaba(0x154)](_0x19d04a[_0x74aaba(0x1a5)])});break;}case v[_0x74aaba(0x13d)]:{const _0x479c2a=(_0x5480a4=this[_0x74aaba(0x1aa)][_0x74aaba(0x171)](_0x19d04a[_0x74aaba(0x198)])[_0x74aaba(0x16c)](_0x4bea40=>_0x4bea40[_0x74aaba(0x194)]===_0x19d04a['threadId']))==null?void 0x0:_0x5480a4[_0x74aaba(0x159)];_0x479c2a&&this[_0x74aaba(0x1aa)][_0x74aaba(0x14b)](_0x1a8772,_0x18443a,_0x479c2a['id'],_0x19d04a[_0x74aaba(0x16b)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x4273bd(0x145)](b[_0x4273bd(0x190)])),S(0x1,c['Inject'](M['ThreadCommentModel'])),S(0x2,c[_0x4273bd(0x145)](c[_0x4273bd(0x155)])),S(0x3,c[_0x4273bd(0x145)](c[_0x4273bd(0x157)]))],p);const q=_0x4273bd(0x19d),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x468ad3,_0x392c31,_0x274bea,_0x32493d)=>{const _0x2a0b14=_0x4273bd;for(var _0x6fe643=_0x32493d>0x1?void 0x0:_0x32493d?A(_0x392c31,_0x274bea):_0x392c31,_0x2eebe1=_0x468ad3[_0x2a0b14(0x1a6)]-0x1,_0x22217f;_0x2eebe1>=0x0;_0x2eebe1--)(_0x22217f=_0x468ad3[_0x2eebe1])&&(_0x6fe643=_0x22217f(_0x6fe643)||_0x6fe643);return _0x6fe643;},_=(_0x5a1818,_0x13defc)=>(_0x3ae528,_0xa1c54c)=>_0x13defc(_0x3ae528,_0xa1c54c,_0x5a1818);function Y(_0x5bc337,_0x5d4108){const _0x44a02f=_0x4273bd,_0xf1f264=_0x5bc337[_0x44a02f(0x191)][0x0];return{..._0x5d4108,'id':_0xf1f264[_0x44a02f(0x1b2)],'resolved':_0x5bc337['solved']===0x1,'dT':f(_0xf1f264[_0x44a02f(0x176)]),'personId':_0xf1f264[_0x44a02f(0x161)],'threadId':_0xf1f264[_0x44a02f(0x194)]};}function G(_0x23e508,_0xad24cd,_0x37a589){const _0x2b55ef=_0x4273bd;var _0x12cd8b,_0x17fead;if(((_0x17fead=(_0x12cd8b=_0x23e508==null?void 0x0:_0x23e508[_0x2b55ef(0x191)])==null?void 0x0:_0x12cd8b['length'])!=null?_0x17fead:0x0)>0x0){const _0x593c7a=(_0x58b718,_0x7d408b)=>({'id':_0x58b718[_0x2b55ef(0x1b2)],'threadId':_0x58b718['threadId'],'dT':f(_0x58b718[_0x2b55ef(0x176)]),'personId':_0x58b718[_0x2b55ef(0x161)],'resolved':_0x23e508[_0x2b55ef(0x16b)]===I[_0x2b55ef(0x1b9)],'unitId':_0xad24cd,'subUnitId':_0x37a589,'text':JSON[_0x2b55ef(0x154)](_0x58b718[_0x2b55ef(0x1a5)]),'parentId':_0x7d408b}),_0x8b9e48=_0x593c7a(_0x23e508[_0x2b55ef(0x191)][0x0]);return{..._0x8b9e48,'children':_0x23e508['replies'][_0x2b55ef(0x1a9)](0x1)[_0x2b55ef(0x164)](_0x284e00=>_0x593c7a(_0x284e00,_0x8b9e48['id']))};}return null;}let g=class{constructor(_0x2a456d,_0x249a61,_0x5771c6,_0x4e62c2){const _0x215154=_0x4273bd;this[_0x215154(0x18d)]=_0x2a456d,this[_0x215154(0x166)]=_0x249a61,this[_0x215154(0x16a)]=_0x5771c6,this[_0x215154(0x15f)]=_0x4e62c2;}async['addComment'](_0x2e8cef){const _0x26b1ec=_0x4273bd;var _0x577014,_0x3ee63c;const {parentId:_0x4f7f9f,unitId:_0x38c36c,text:_0x1c2e21,threadId:_0x57a25b}=_0x2e8cef,_0x1938fb=(_0x3ee63c=(_0x577014=_0x1c2e21[_0x26b1ec(0x141)])==null?void 0x0:_0x577014[_0x26b1ec(0x14c)](_0x15f923=>_0x15f923['rangeType']===c[_0x26b1ec(0x19f)][_0x26b1ec(0x1b3)])['map'](_0x1c65f4=>_0x1c65f4['rangeId']))!=null?_0x3ee63c:[],_0x224608=JSON[_0x26b1ec(0x1a8)](_0x1c2e21),_0x4d3e72=(await this[_0x26b1ec(0x16a)][_0x26b1ec(0x186)](_0x38c36c))[_0x26b1ec(0x152)]();if(_0x4f7f9f){const _0xdd3ea8={'memberId':_0x4d3e72,'unitId':_0x38c36c,'content':_0x224608,'mention':_0x1938fb,'threadId':_0x57a25b},_0x3126c3=(await this[_0x26b1ec(0x18d)]['post'](_0x26b1ec(0x19a)+_0x38c36c+_0x26b1ec(0x13c),{'body':_0xdd3ea8}))['body'][_0x26b1ec(0x146)];return{..._0x2e8cef,'id':_0x3126c3[_0x26b1ec(0x1b2)],'dT':c['dayjs'](+_0x3126c3[_0x26b1ec(0x176)])[_0x26b1ec(0x1ad)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3126c3[_0x26b1ec(0x161)]};}else{const _0x55b603={'memberId':_0x4d3e72,'unitId':_0x38c36c,'content':_0x224608,'mention':_0x1938fb},_0x51b327=await this[_0x26b1ec(0x18d)][_0x26b1ec(0x1a3)]('/universer-api/comment/unit/'+_0x38c36c+_0x26b1ec(0x1af),{'body':_0x55b603});return Y(_0x51b327[_0x26b1ec(0x175)][_0x26b1ec(0x182)],_0x2e8cef);}}async[_0x4273bd(0x199)](_0x403483){const _0x177b82=_0x4273bd;var _0x24e9ac,_0x45df38;const {text:_0x2a8d1b,unitId:_0x1ba52d}=_0x403483,_0x315fc7=(_0x45df38=(_0x24e9ac=_0x2a8d1b[_0x177b82(0x141)])==null?void 0x0:_0x24e9ac[_0x177b82(0x14c)](_0x2e710d=>_0x2e710d['rangeType']===c[_0x177b82(0x19f)][_0x177b82(0x1b3)])[_0x177b82(0x164)](_0x22c69e=>_0x22c69e[_0x177b82(0x1b6)]))!=null?_0x45df38:[],_0xfcff2c=JSON[_0x177b82(0x1a8)](_0x2a8d1b),_0x2bc939=_0x403483[_0x177b82(0x194)],_0x4f6e0a=_0x403483['id'],_0x10405={'memberId':(await this[_0x177b82(0x16a)][_0x177b82(0x186)](_0x1ba52d))[_0x177b82(0x152)](),'unitId':_0x1ba52d,'threadId':_0x2bc939,'mention':_0x315fc7,'content':_0xfcff2c,'replyId':_0x4f6e0a},_0x1f9903=await this[_0x177b82(0x18d)][_0x177b82(0x1a3)](_0x177b82(0x19a)+_0x1ba52d+_0x177b82(0x168),{'body':_0x10405});return!_0x1f9903['body'][_0x177b82(0x187)]||_0x1f9903['body'][_0x177b82(0x187)][_0x177b82(0x17e)]===0x1;}async[_0x4273bd(0x14b)](_0x1cbcf2){const _0x11715f=_0x4273bd,{unitId:_0x447ddd}=_0x1cbcf2,_0x3c7d41=_0x1cbcf2[_0x11715f(0x194)],_0x2fb78d={'memberId':this['_userService'][_0x11715f(0x189)]()[_0x11715f(0x1b0)],'unitId':_0x447ddd,'threadId':_0x3c7d41,'solved':_0x1cbcf2['resolved']?I[_0x11715f(0x1b9)]:I[_0x11715f(0x192)]},_0x29bae8=await this[_0x11715f(0x18d)][_0x11715f(0x1a3)](_0x11715f(0x19a)+_0x447ddd+_0x11715f(0x165),{'body':_0x2fb78d});return!_0x29bae8[_0x11715f(0x175)][_0x11715f(0x187)]||_0x29bae8[_0x11715f(0x175)][_0x11715f(0x187)][_0x11715f(0x17e)]===0x1;}async[_0x4273bd(0x13a)](_0x21cd4f,_0x4adb5f,_0x34f2e9,_0x10d016){const _0x52c0f4=_0x4273bd,_0xa677d1={'memberId':(await this[_0x52c0f4(0x16a)]['requireSession'](_0x21cd4f))[_0x52c0f4(0x152)](),'threadId':_0x34f2e9,'replyId':_0x10d016,'unitId':_0x21cd4f},_0x3a1c65=await this[_0x52c0f4(0x18d)]['post']('/universer-api/comment/unit/'+_0x21cd4f+_0x52c0f4(0x185),{'body':_0xa677d1});return!_0x3a1c65[_0x52c0f4(0x175)][_0x52c0f4(0x187)]||_0x3a1c65[_0x52c0f4(0x175)][_0x52c0f4(0x187)][_0x52c0f4(0x17e)]===0x1;}async[_0x4273bd(0x1a4)](_0x2d7023,_0x21a88f,_0x429aeb){const _0x15af0e=_0x4273bd,_0x222050={'unitId':_0x2d7023,'threadId':_0x429aeb},_0x58df2f=await this['_httpService']['post'](_0x15af0e(0x19a)+_0x2d7023+_0x15af0e(0x196),{'body':_0x222050}),_0x383f12=_0x429aeb[_0x15af0e(0x164)](_0x3940c8=>G(_0x58df2f[_0x15af0e(0x175)][_0x15af0e(0x167)][_0x3940c8],_0x2d7023,_0x21a88f))['filter'](Boolean);return Object[_0x15af0e(0x147)](_0x58df2f[_0x15af0e(0x175)][_0x15af0e(0x17d)])[_0x15af0e(0x162)](_0x17aa39=>{const _0xd50f0a=_0x15af0e;this[_0xd50f0a(0x166)][_0xd50f0a(0x1ae)](_0x17aa39);}),_0x383f12;}[_0x4273bd(0x150)](_0x5664a5){const _0x3976ce=_0x4273bd;return{'id':_0x5664a5['id'],'threadId':_0x5664a5[_0x3976ce(0x194)],'ref':_0x5664a5[_0x3976ce(0x174)]};}};g=x([_(0x0,c['Inject'](P[_0x4273bd(0x15d)])),_(0x1,c[_0x4273bd(0x145)](c[_0x4273bd(0x155)])),_(0x2,c[_0x4273bd(0x145)](b[_0x4273bd(0x18e)])),_(0x3,c[_0x4273bd(0x145)](c[_0x4273bd(0x157)]))],g);var H=Object[_0x4273bd(0x1b8)],J=(_0x2d4c5a,_0x1346f6,_0x59959c,_0x57c7c9)=>{const _0x386148=_0x4273bd;for(var _0x527f88=_0x57c7c9>0x1?void 0x0:_0x57c7c9?H(_0x1346f6,_0x59959c):_0x1346f6,_0x470177=_0x2d4c5a[_0x386148(0x1a6)]-0x1,_0x536093;_0x470177>=0x0;_0x470177--)(_0x536093=_0x2d4c5a[_0x470177])&&(_0x527f88=_0x536093(_0x527f88)||_0x527f88);return _0x527f88;},y=(_0x23f083,_0x118a7b)=>(_0x2a12dc,_0x23789f)=>_0x118a7b(_0x2a12dc,_0x23789f,_0x23f083);let C=class extends c[_0x4273bd(0x14f)]{constructor(_0x5cf0f7,_0x1ef115){const _0xa669b7=_0x4273bd;super(),this[_0xa669b7(0x15c)]=_0x5cf0f7,this[_0xa669b7(0x1ac)]=_0x1ef115,this[_0xa669b7(0x181)]();}[_0x4273bd(0x181)](){const _0x55a005=_0x4273bd;this['_threadCommentDataSourceService'][_0x55a005(0x144)]=this[_0x55a005(0x1ac)],this[_0x55a005(0x15c)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x4273bd(0x1b5)]),y(0x1,c[_0x4273bd(0x145)](g))],C);var F=Object[_0x4273bd(0x1ab)],L=Object['getOwnPropertyDescriptor'],Z=(_0x44b245,_0xf05778,_0x3f2f95)=>_0xf05778 in _0x44b245?F(_0x44b245,_0xf05778,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3f2f95}):_0x44b245[_0xf05778]=_0x3f2f95,W=(_0x3a2a48,_0x2e6c7d,_0x6224ae,_0x52ed1c)=>{const _0x51eb37=_0x4273bd;for(var _0x199fe1=_0x52ed1c>0x1?void 0x0:_0x52ed1c?L(_0x2e6c7d,_0x6224ae):_0x2e6c7d,_0x210c62=_0x3a2a48[_0x51eb37(0x1a6)]-0x1,_0x2fb75e;_0x210c62>=0x0;_0x210c62--)(_0x2fb75e=_0x3a2a48[_0x210c62])&&(_0x199fe1=_0x2fb75e(_0x199fe1)||_0x199fe1);return _0x199fe1;},O=(_0x32b971,_0x20afa0)=>(_0x27169c,_0x4ad8c9)=>_0x20afa0(_0x27169c,_0x4ad8c9,_0x32b971),N=(_0x2fed45,_0x39c880,_0x440ab7)=>Z(_0x2fed45,typeof _0x39c880!=_0x4273bd(0x178)?_0x39c880+'':_0x39c880,_0x440ab7);exports[_0x4273bd(0x188)]=class extends c['Plugin']{constructor(_0x1a8e45=D,_0x1bb74e,_0x40b548){const _0x44e55a=_0x4273bd;super(),this['_config']=_0x1a8e45,this[_0x44e55a(0x15f)]=_0x1bb74e,this[_0x44e55a(0x14e)]=_0x40b548;const {..._0x5688df}=c[_0x44e55a(0x149)]({},D,this['_config']);this['_configService'][_0x44e55a(0x170)](q,_0x5688df);}[_0x4273bd(0x156)](){const _0x535a00=_0x4273bd;[[g],[C],[p]][_0x535a00(0x162)](_0x32ec85=>{const _0x4a16b7=_0x535a00;this[_0x4a16b7(0x15f)]['add'](_0x32ec85);});}[_0x4273bd(0x18c)](){const _0x235d4d=_0x4273bd;this[_0x235d4d(0x15f)]['get'](C),this[_0x235d4d(0x15f)][_0x235d4d(0x18f)](p);}},N(exports[_0x4273bd(0x188)],_0x4273bd(0x1a1),U),N(exports[_0x4273bd(0x188)],_0x4273bd(0x19b),c[_0x4273bd(0x1b1)]['UNIVER_UNKNOWN']),exports[_0x4273bd(0x188)]=W([c['DependentOn'](j[_0x4273bd(0x14d)],b[_0x4273bd(0x1a7)],T['UniverLicensePlugin']),O(0x1,c[_0x4273bd(0x145)](c[_0x4273bd(0x157)])),O(0x2,c['IConfigService'])],exports[_0x4273bd(0x188)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x9cf832=_0x5690;(function(_0x1ab0f5,_0x582785){const _0x14f229=_0x5690,_0x571315=_0x1ab0f5();while(!![]){try{const _0x4a90d3=-parseInt(_0x14f229(0x106))/0x1*(-parseInt(_0x14f229(0xa3))/0x2)+parseInt(_0x14f229(0xe9))/0x3*(parseInt(_0x14f229(0xe2))/0x4)+-parseInt(_0x14f229(0xf1))/0x5*(parseInt(_0x14f229(0xb1))/0x6)+-parseInt(_0x14f229(0x102))/0x7*(parseInt(_0x14f229(0xc5))/0x8)+-parseInt(_0x14f229(0xc9))/0x9+-parseInt(_0x14f229(0xcb))/0xa+-parseInt(_0x14f229(0xb3))/0xb*(-parseInt(_0x14f229(0xd2))/0xc);if(_0x4a90d3===_0x582785)break;else _0x571315['push'](_0x571315['shift']());}catch(_0x2b9612){_0x571315['push'](_0x571315['shift']());}}}(_0x51a8,0x5c1fb));import{CommentService as _0x1803a,CollaborationSessionService as _0x1c6622,UniverCollaborationClientPlugin as _0x5befe3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x37b1f9}from'@univerjs-pro/license';import{dayjs as _0x33b739,UserManagerService as _0xe8fcb1,Inject as _0x2f174f,Injector as _0x27970a,Disposable as _0xd71482,CustomRangeType as _0xf31c67,UniverInstanceType as _0x2a1993,DependentOn as _0x215ab7,IConfigService as _0x1acffc,Plugin as _0x5527d6,merge as _0x42355d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1f6f25}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x23f12b,IThreadCommentDataSourceService as _0x412e5d}from'@univerjs/thread-comment';import{bufferTime as _0x5d7449}from'rxjs';import{HTTPService as _0x1a1c91}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0x5690(_0x35ec36,_0x3e9002){const _0x51a8f0=_0x51a8();return _0x5690=function(_0x569008,_0x5d4623){_0x569008=_0x569008-0x9f;let _0x40fe07=_0x51a8f0[_0x569008];return _0x40fe07;},_0x5690(_0x35ec36,_0x3e9002);}var I=(_0x53c897=>(_0x53c897[_0x53c897[_0x9cf832(0xf4)]=0x0]=_0x9cf832(0xf4),_0x53c897[_0x53c897[_0x9cf832(0xba)]=0x1]=_0x9cf832(0xba),_0x53c897[_0x53c897[_0x9cf832(0xff)]=-0x1]='UNRECOGNIZED',_0x53c897))(I||{}),v=(_0x292077=>(_0x292077[_0x292077[_0x9cf832(0xdd)]=0x0]=_0x9cf832(0xdd),_0x292077[_0x292077[_0x9cf832(0xfd)]=0x1]=_0x9cf832(0xfd),_0x292077[_0x292077[_0x9cf832(0xef)]=0x2]='Reply',_0x292077[_0x292077[_0x9cf832(0xc7)]=0x3]=_0x9cf832(0xc7),_0x292077[_0x292077['Delete']=0x4]=_0x9cf832(0xca),_0x292077[_0x292077[_0x9cf832(0xa0)]=0x5]=_0x9cf832(0xa0),_0x292077[_0x292077[_0x9cf832(0xff)]=-0x1]='UNRECOGNIZED',_0x292077))(v||{});const D=_0x16630a=>_0x33b739(new Date(+_0x16630a))[_0x9cf832(0xc3)](_0x9cf832(0xb6)),B=async(_0x3658d2,_0x5bff7d)=>{const _0xfc86d9=_0x9cf832,_0x533b58=_0x3658d2[_0xfc86d9(0xb9)](_0xe8fcb1),_0x5e7eb9=_0x3658d2['get'](_0x1a1c91);_0x5bff7d['forEach'](_0x4babe3=>{const _0x35c76d=_0xfc86d9;_0x533b58[_0x35c76d(0x100)](_0x4babe3)&&_0x5bff7d[_0x35c76d(0xae)](_0x4babe3);}),_0x5bff7d['size']&&(await _0x5e7eb9[_0xfc86d9(0xb9)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5bff7d]}}))[_0xfc86d9(0xd5)][_0xfc86d9(0xc6)]['forEach'](_0xbb79bb=>{const _0x37fc30=_0xfc86d9;_0xbb79bb&&_0x533b58[_0x37fc30(0xa4)](_0xbb79bb);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x369613,_0x5b7093,_0x1abaf1,_0x5328cc)=>{const _0x42748e=_0x9cf832;for(var _0x2c4c14=_0x5328cc>0x1?void 0x0:_0x5328cc?K(_0x5b7093,_0x1abaf1):_0x5b7093,_0x112d1e=_0x369613[_0x42748e(0xd1)]-0x1,_0x2f86d3;_0x112d1e>=0x0;_0x112d1e--)(_0x2f86d3=_0x369613[_0x112d1e])&&(_0x2c4c14=_0x2f86d3(_0x2c4c14)||_0x2c4c14);return _0x2c4c14;},p=(_0x44e692,_0x476b91)=>(_0x2a1a2f,_0x500e43)=>_0x476b91(_0x2a1a2f,_0x500e43,_0x44e692);let S=class extends _0xd71482{constructor(_0x42dc89,_0x459ac4,_0x499a45,_0x17175d){const _0x2a2f0e=_0x9cf832;super(),this[_0x2a2f0e(0xe6)]=_0x42dc89,this[_0x2a2f0e(0xe1)]=_0x459ac4,this['_userService']=_0x499a45,this[_0x2a2f0e(0xf5)]=_0x17175d,this[_0x2a2f0e(0x103)](),this[_0x2a2f0e(0xcf)]();}['_initUserSync'](){const _0x4d21d4=_0x9cf832;this[_0x4d21d4(0xea)](this['_threadCommentModel']['commentUpdate$'][_0x4d21d4(0xb5)](_0x5d7449(0x10))[_0x4d21d4(0xbd)](_0x3baf25=>{const _0x1e9cac=_0x4d21d4,_0x3a8832=new Set();_0x3baf25[_0x1e9cac(0xf7)](_0x288485=>{const _0x487d9b=_0x1e9cac;switch(_0x288485[_0x487d9b(0xd6)]){case _0x487d9b(0xee):{const _0x1c5945=_0x288485['payload'][_0x487d9b(0xeb)];_0x3a8832['add'](_0x1c5945);break;}}}),B(this['_injector'],_0x3a8832);}));}[_0x9cf832(0x103)](){const _0x2120eb=_0x9cf832;this[_0x2120eb(0xea)](this[_0x2120eb(0xe6)][_0x2120eb(0xe4)][_0x2120eb(0xbd)](async _0x36a911=>{const _0x32e7aa=_0x2120eb;var _0xfe6098,_0x3dca27,_0x1791e1,_0x205790;const _0x365e16=(_0xfe6098=this[_0x32e7aa(0xe1)][_0x32e7aa(0xad)](_0x36a911[_0x32e7aa(0xf9)])['find'](_0x35025b=>_0x35025b['threadId']===_0x36a911[_0x32e7aa(0xda)]))==null?void 0x0:_0xfe6098[_0x32e7aa(0xd4)];if(!_0x365e16)return;const {unitId:_0x1b19d4,subUnitId:_0x358367}=_0x365e16;switch(_0x36a911[_0x32e7aa(0xed)]&&this[_0x32e7aa(0xb2)][_0x32e7aa(0xa4)](_0x36a911['user']),_0x36a911[_0x32e7aa(0xd6)]){case v[_0x32e7aa(0xfd)]:break;case v[_0x32e7aa(0xef)]:{this[_0x32e7aa(0xe1)][_0x32e7aa(0xf3)](_0x1b19d4,_0x358367,{'unitId':_0x1b19d4,'subUnitId':_0x358367,'ref':'','id':_0x36a911[_0x32e7aa(0xfb)],'dT':D(+_0x36a911[_0x32e7aa(0xdf)]),'threadId':_0x36a911[_0x32e7aa(0xda)],'personId':(_0x1791e1=(_0x3dca27=_0x36a911[_0x32e7aa(0xed)])==null?void 0x0:_0x3dca27[_0x32e7aa(0xa6)])!=null?_0x1791e1:_0x36a911[_0x32e7aa(0x9f)],'text':JSON[_0x32e7aa(0xd9)](_0x36a911[_0x32e7aa(0xfc)]),'parentId':_0x365e16['id']});break;}case v[_0x32e7aa(0xca)]:{const _0x35fd2b=this[_0x32e7aa(0xe1)]['getComment'](_0x1b19d4,_0x358367,_0x36a911[_0x32e7aa(0xfb)]);_0x35fd2b&&_0x35fd2b[_0x32e7aa(0xd3)]&&this[_0x32e7aa(0xe1)]['deleteComment'](_0x1b19d4,_0x358367,_0x36a911['replyId']);break;}case v[_0x32e7aa(0xc7)]:{this[_0x32e7aa(0xe1)][_0x32e7aa(0xf0)](_0x1b19d4,_0x358367,{'commentId':_0x36a911[_0x32e7aa(0xfb)],'text':JSON[_0x32e7aa(0xd9)](_0x36a911['content'])});break;}case v[_0x32e7aa(0xa0)]:{const _0x4e6bf9=(_0x205790=this[_0x32e7aa(0xe1)]['getUnit'](_0x36a911[_0x32e7aa(0xf9)])[_0x32e7aa(0xe7)](_0x43fe88=>_0x43fe88['threadId']===_0x36a911[_0x32e7aa(0xda)]))==null?void 0x0:_0x205790['root'];_0x4e6bf9&&this[_0x32e7aa(0xe1)]['resolveComment'](_0x1b19d4,_0x358367,_0x4e6bf9['id'],_0x36a911[_0x32e7aa(0xce)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x2f174f(_0x1803a)),p(0x1,_0x2f174f(_0x23f12b)),p(0x2,_0x2f174f(_0xe8fcb1)),p(0x3,_0x2f174f(_0x27970a))],S);const z=_0x9cf832(0xbc),M={};var k=Object[_0x9cf832(0xa8)],Q=(_0x29fb58,_0x2df8e7,_0x19864c,_0x2eea02)=>{const _0x65470=_0x9cf832;for(var _0x390171=_0x2eea02>0x1?void 0x0:_0x2eea02?k(_0x2df8e7,_0x19864c):_0x2df8e7,_0x52fcbb=_0x29fb58[_0x65470(0xd1)]-0x1,_0x5c3641;_0x52fcbb>=0x0;_0x52fcbb--)(_0x5c3641=_0x29fb58[_0x52fcbb])&&(_0x390171=_0x5c3641(_0x390171)||_0x390171);return _0x390171;},_=(_0x14a6dd,_0x573134)=>(_0x1da04d,_0x502cb8)=>_0x573134(_0x1da04d,_0x502cb8,_0x14a6dd);function X(_0x5c6cbd,_0x2d4c44){const _0xd2abdb=_0x9cf832,_0x5a60e1=_0x5c6cbd[_0xd2abdb(0xbb)][0x0];return{..._0x2d4c44,'id':_0x5a60e1[_0xd2abdb(0xfb)],'resolved':_0x5c6cbd[_0xd2abdb(0xce)]===0x1,'dT':D(_0x5a60e1['createTimestamp']),'personId':_0x5a60e1['userId'],'threadId':_0x5a60e1[_0xd2abdb(0xda)]};}function ee(_0x57bf54,_0x17ef8e,_0x42ff45){const _0x2a3786=_0x9cf832;var _0x29f0e6,_0xbeaf73;if(((_0xbeaf73=(_0x29f0e6=_0x57bf54==null?void 0x0:_0x57bf54[_0x2a3786(0xbb)])==null?void 0x0:_0x29f0e6[_0x2a3786(0xd1)])!=null?_0xbeaf73:0x0)>0x0){const _0x456bb8=(_0x3e804f,_0x21a111)=>({'id':_0x3e804f[_0x2a3786(0xfb)],'threadId':_0x3e804f['threadId'],'dT':D(_0x3e804f[_0x2a3786(0xdf)]),'personId':_0x3e804f['userId'],'resolved':_0x57bf54['solved']===I['Solved'],'unitId':_0x17ef8e,'subUnitId':_0x42ff45,'text':JSON[_0x2a3786(0xd9)](_0x3e804f['content']),'parentId':_0x21a111}),_0x5e24d5=_0x456bb8(_0x57bf54['replies'][0x0]);return{..._0x5e24d5,'children':_0x57bf54[_0x2a3786(0xbb)]['slice'](0x1)[_0x2a3786(0xa7)](_0x5f395e=>_0x456bb8(_0x5f395e,_0x5e24d5['id']))};}return null;}let f=class{constructor(_0x17967e,_0x358e58,_0x53d44b,_0x427289){const _0x3da1d1=_0x9cf832;this[_0x3da1d1(0xb8)]=_0x17967e,this[_0x3da1d1(0xb2)]=_0x358e58,this[_0x3da1d1(0xd0)]=_0x53d44b,this[_0x3da1d1(0xf5)]=_0x427289;}async['addComment'](_0x2c1f76){const _0x26a539=_0x9cf832;var _0x1403b4,_0x105841;const {parentId:_0x69ee58,unitId:_0x48e4ec,text:_0x3b3c8e,threadId:_0x51104a}=_0x2c1f76,_0x216412=(_0x105841=(_0x1403b4=_0x3b3c8e['customRanges'])==null?void 0x0:_0x1403b4[_0x26a539(0xcc)](_0x1cb298=>_0x1cb298[_0x26a539(0xc1)]===_0xf31c67['COMMENT'])[_0x26a539(0xa7)](_0x2e69df=>_0x2e69df[_0x26a539(0xbf)]))!=null?_0x105841:[],_0x5b1ede=JSON['stringify'](_0x3b3c8e),_0x94f4d=(await this[_0x26a539(0xd0)][_0x26a539(0xcd)](_0x48e4ec))[_0x26a539(0xaf)]();if(_0x69ee58){const _0x37ca21={'memberId':_0x94f4d,'unitId':_0x48e4ec,'content':_0x5b1ede,'mention':_0x216412,'threadId':_0x51104a},_0x1bad8=(await this['_httpService'][_0x26a539(0xac)](_0x26a539(0x101)+_0x48e4ec+_0x26a539(0xfa),{'body':_0x37ca21}))['body'][_0x26a539(0xb7)];return{..._0x2c1f76,'id':_0x1bad8[_0x26a539(0xfb)],'dT':_0x33b739(+_0x1bad8[_0x26a539(0xdf)])['format'](_0x26a539(0xb6)),'personId':_0x1bad8['userId']};}else{const _0xa9085b={'memberId':_0x94f4d,'unitId':_0x48e4ec,'content':_0x5b1ede,'mention':_0x216412},_0x518383=await this[_0x26a539(0xb8)][_0x26a539(0xac)](_0x26a539(0x101)+_0x48e4ec+_0x26a539(0xbe),{'body':_0xa9085b});return X(_0x518383['body'][_0x26a539(0xdb)],_0x2c1f76);}}async['updateComment'](_0x1a2966){const _0x104744=_0x9cf832;var _0x82ebde,_0x16fa86;const {text:_0x2358d0,unitId:_0x2c9bbe}=_0x1a2966,_0x2bbcf7=(_0x16fa86=(_0x82ebde=_0x2358d0[_0x104744(0xa5)])==null?void 0x0:_0x82ebde['filter'](_0x57af91=>_0x57af91[_0x104744(0xc1)]===_0xf31c67[_0x104744(0xa1)])[_0x104744(0xa7)](_0x20f280=>_0x20f280[_0x104744(0xbf)]))!=null?_0x16fa86:[],_0x14bad6=JSON['stringify'](_0x2358d0),_0x34ec8e=_0x1a2966[_0x104744(0xda)],_0x25c00e=_0x1a2966['id'],_0xdd12bf={'memberId':(await this[_0x104744(0xd0)][_0x104744(0xcd)](_0x2c9bbe))[_0x104744(0xaf)](),'unitId':_0x2c9bbe,'threadId':_0x34ec8e,'mention':_0x2bbcf7,'content':_0x14bad6,'replyId':_0x25c00e},_0x2d1b1d=await this[_0x104744(0xb8)][_0x104744(0xac)](_0x104744(0x101)+_0x2c9bbe+_0x104744(0xdc),{'body':_0xdd12bf});return!_0x2d1b1d[_0x104744(0xd5)][_0x104744(0xa9)]||_0x2d1b1d[_0x104744(0xd5)]['error'][_0x104744(0xc8)]===0x1;}async[_0x9cf832(0xe8)](_0xee1eaa){const _0x18e094=_0x9cf832,{unitId:_0xd74435}=_0xee1eaa,_0x29742b=_0xee1eaa[_0x18e094(0xda)],_0x3af91c={'memberId':this['_userService'][_0x18e094(0xde)]()[_0x18e094(0xa6)],'unitId':_0xd74435,'threadId':_0x29742b,'solved':_0xee1eaa[_0x18e094(0xe5)]?I[_0x18e094(0xba)]:I[_0x18e094(0xf4)]},_0x29ae6b=await this[_0x18e094(0xb8)][_0x18e094(0xac)](_0x18e094(0x101)+_0xd74435+'/solved',{'body':_0x3af91c});return!_0x29ae6b[_0x18e094(0xd5)][_0x18e094(0xa9)]||_0x29ae6b['body'][_0x18e094(0xa9)][_0x18e094(0xc8)]===0x1;}async['deleteComment'](_0x5d1d4a,_0x1b598c,_0x2d84d4,_0x4bf9a7){const _0x4c53ff=_0x9cf832,_0x4e3af8={'memberId':(await this[_0x4c53ff(0xd0)][_0x4c53ff(0xcd)](_0x5d1d4a))['getMemberID'](),'threadId':_0x2d84d4,'replyId':_0x4bf9a7,'unitId':_0x5d1d4a},_0x1f13b9=await this[_0x4c53ff(0xb8)]['post'](_0x4c53ff(0x101)+_0x5d1d4a+_0x4c53ff(0xb4),{'body':_0x4e3af8});return!_0x1f13b9[_0x4c53ff(0xd5)][_0x4c53ff(0xa9)]||_0x1f13b9[_0x4c53ff(0xd5)][_0x4c53ff(0xa9)][_0x4c53ff(0xc8)]===0x1;}async['listComments'](_0x19d652,_0x5a6e43,_0x463926){const _0x171732=_0x9cf832,_0x209ef8={'unitId':_0x19d652,'threadId':_0x463926},_0x3a4225=await this[_0x171732(0xb8)][_0x171732(0xac)]('/universer-api/comment/unit/'+_0x19d652+_0x171732(0xe3),{'body':_0x209ef8}),_0x1efe12=_0x463926[_0x171732(0xa7)](_0x324576=>ee(_0x3a4225[_0x171732(0xd5)][_0x171732(0xb0)][_0x324576],_0x19d652,_0x5a6e43))[_0x171732(0xcc)](Boolean);return Object[_0x171732(0xc0)](_0x3a4225[_0x171732(0xd5)]['users'])[_0x171732(0xf7)](_0xaf8059=>{const _0x399552=_0x171732;this[_0x399552(0xb2)][_0x399552(0xa4)](_0xaf8059);}),_0x1efe12;}[_0x9cf832(0xf6)](_0x5b8d2b){const _0x312c0a=_0x9cf832;return{'id':_0x5b8d2b['id'],'threadId':_0x5b8d2b[_0x312c0a(0xda)],'ref':_0x5b8d2b[_0x312c0a(0x105)]};}};f=Q([_(0x0,_0x2f174f(_0x1a1c91)),_(0x1,_0x2f174f(_0xe8fcb1)),_(0x2,_0x2f174f(_0x1c6622)),_(0x3,_0x2f174f(_0x27970a))],f);var re=Object[_0x9cf832(0xa8)],te=(_0xf8ff33,_0x56c733,_0x79fe51,_0x13f505)=>{for(var _0x5b5691=_0x13f505>0x1?void 0x0:_0x13f505?re(_0x56c733,_0x79fe51):_0x56c733,_0x4ff544=_0xf8ff33['length']-0x1,_0x1cc6d4;_0x4ff544>=0x0;_0x4ff544--)(_0x1cc6d4=_0xf8ff33[_0x4ff544])&&(_0x5b5691=_0x1cc6d4(_0x5b5691)||_0x5b5691);return _0x5b5691;},N=(_0x353cc4,_0xc74858)=>(_0x42f8e1,_0x495577)=>_0xc74858(_0x42f8e1,_0x495577,_0x353cc4);let g=class extends _0xd71482{constructor(_0x552596,_0x20fb93){const _0x5b3343=_0x9cf832;super(),this['_threadCommentDataSourceService']=_0x552596,this[_0x5b3343(0xc2)]=_0x20fb93,this[_0x5b3343(0xf2)]();}['_initDataSource'](){const _0x1c2436=_0x9cf832;this[_0x1c2436(0xfe)][_0x1c2436(0xe0)]=this[_0x1c2436(0xc2)],this[_0x1c2436(0xfe)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x412e5d),N(0x1,_0x2f174f(f))],g);var se=Object[_0x9cf832(0xec)],oe=Object[_0x9cf832(0xa8)],ne=(_0x2246e4,_0x20db14,_0x94feec)=>_0x20db14 in _0x2246e4?se(_0x2246e4,_0x20db14,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x94feec}):_0x2246e4[_0x20db14]=_0x94feec,ie=(_0x46194e,_0x2fe6c9,_0x169a73,_0xee9fa5)=>{for(var _0x30d07a=_0xee9fa5>0x1?void 0x0:_0xee9fa5?oe(_0x2fe6c9,_0x169a73):_0x2fe6c9,_0x4c9e3a=_0x46194e['length']-0x1,_0x4dd80e;_0x4c9e3a>=0x0;_0x4c9e3a--)(_0x4dd80e=_0x46194e[_0x4c9e3a])&&(_0x30d07a=_0x4dd80e(_0x30d07a)||_0x30d07a);return _0x30d07a;},w=(_0x1e0a4d,_0x40efec)=>(_0x1506ef,_0x4755c0)=>_0x40efec(_0x1506ef,_0x4755c0,_0x1e0a4d),$=(_0x3ff6db,_0x3da789,_0x26215b)=>ne(_0x3ff6db,typeof _0x3da789!=_0x9cf832(0xd7)?_0x3da789+'':_0x3da789,_0x26215b);let b=class extends _0x5527d6{constructor(_0x5000b5=M,_0x23d008,_0x54bb8b){const _0x4d33e8=_0x9cf832;super(),this[_0x4d33e8(0xf8)]=_0x5000b5,this[_0x4d33e8(0xf5)]=_0x23d008,this[_0x4d33e8(0xd8)]=_0x54bb8b;const {..._0x43ad84}=_0x42355d({},M,this[_0x4d33e8(0xf8)]);this[_0x4d33e8(0xd8)][_0x4d33e8(0xc4)](z,_0x43ad84);}[_0x9cf832(0xab)](){const _0x3cd1a2=_0x9cf832;[[f],[g],[S]][_0x3cd1a2(0xf7)](_0xbc4b2a=>{const _0xb4cedd=_0x3cd1a2;this[_0xb4cedd(0xf5)][_0xb4cedd(0xee)](_0xbc4b2a);});}[_0x9cf832(0xa2)](){const _0xd54bb6=_0x9cf832;this[_0xd54bb6(0xf5)][_0xd54bb6(0xb9)](g),this[_0xd54bb6(0xf5)][_0xd54bb6(0xb9)](S);}};$(b,_0x9cf832(0xaa),W),$(b,_0x9cf832(0xd6),_0x2a1993[_0x9cf832(0x104)]),b=ie([_0x215ab7(_0x1f6f25,_0x5befe3,_0x37b1f9),w(0x1,_0x2f174f(_0x27970a)),w(0x2,_0x1acffc)],b);function _0x51a8(){const _0x1ae353=['code','4697037rcVAuM','Delete','7369950IYEWOv','filter','requireSession','solved','_initUserSync','_sessionService','length','1110084bLQrge','parentId','root','body','type','symbol','_configService','parse','threadId','comment','/edit','Unknown','getCurrentUser','createTimestamp','dataSource','_threadCommentModel','172jgjqPa','/list','commentUpdate$','resolved','_commentService','find','resolveComment','46923HLrEsy','disposeWithMe','personId','defineProperty','user','add','Reply','updateComment','582445vfuzjI','_initDataSource','addComment','OpenOrReOpen','_injector','saveCommentToSnapshot','forEach','_config','unitId','/reply','replyId','content','Add','_threadCommentDataSourceService','UNRECOGNIZED','getUser','/universer-api/comment/unit/','2681ihyEeK','_init','UNIVER_UNKNOWN','ref','2692hqiMlW','userId','Solve','COMMENT','onReady','136bGfjmw','addUser','customRanges','userID','map','getOwnPropertyDescriptor','error','pluginName','onStarting','post','getUnit','delete','getMemberID','comments','18PnThkn','_userService','198BKCTRC','/delete','pipe','YYYY/MM/DD\x20HH:mm','reply','_httpService','get','Solved','replies','thread-comment-data-source.config','subscribe','/add','rangeId','values','rangeType','_threadCommentDataSource','format','setConfig','11176XIWmaD','users','Edit'];_0x51a8=function(){return _0x1ae353;};return _0x51a8();}export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x1a9525=_0x281e;(function(_0x29b3a3,_0x2d8e36){const _0x292153=_0x281e,_0x500b2b=_0x29b3a3();while(!![]){try{const _0x4e0f9e=-parseInt(_0x292153(0x150))/0x1*(-parseInt(_0x292153(0x152))/0x2)+parseInt(_0x292153(0x186))/0x3*(parseInt(_0x292153(0x149))/0x4)+-parseInt(_0x292153(0x15b))/0x5*(parseInt(_0x292153(0x191))/0x6)+parseInt(_0x292153(0x192))/0x7+-parseInt(_0x292153(0x14c))/0x8*(-parseInt(_0x292153(0x154))/0x9)+-parseInt(_0x292153(0x16b))/0xa*(parseInt(_0x292153(0x165))/0xb)+parseInt(_0x292153(0x188))/0xc*(-parseInt(_0x292153(0x160))/0xd);if(_0x4e0f9e===_0x2d8e36)break;else _0x500b2b['push'](_0x500b2b['shift']());}catch(_0x57215d){_0x500b2b['push'](_0x500b2b['shift']());}}}(_0x5a97,0x32e0f));import{CommentService as _0x40c369,CollaborationSessionService as _0xb5f0f6,UniverCollaborationClientPlugin as _0x156a54}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x44c437}from'@univerjs-pro/license';import{dayjs as _0x8d8ae0,UserManagerService as _0x3744cb,Inject as _0x22e7e9,Injector as _0x5645be,Disposable as _0x52e380,CustomRangeType as _0x3fa89b,UniverInstanceType as _0x5c86df,DependentOn as _0x3c4a67,IConfigService as _0x23818b,Plugin as _0x14760f,merge as _0x3fdcf6}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5d7089}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x94249b,IThreadCommentDataSourceService as _0x14199e}from'@univerjs/thread-comment';import{bufferTime as _0x3dfed0}from'rxjs';function _0x281e(_0x5d54cf,_0x37828b){const _0x5a97c4=_0x5a97();return _0x281e=function(_0x281e15,_0xaeb5d7){_0x281e15=_0x281e15-0x13f;let _0x375546=_0x5a97c4[_0x281e15];return _0x375546;},_0x281e(_0x5d54cf,_0x37828b);}import{HTTPService as _0x207092}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2854b3=>(_0x2854b3[_0x2854b3[_0x1a9525(0x157)]=0x0]=_0x1a9525(0x157),_0x2854b3[_0x2854b3[_0x1a9525(0x184)]=0x1]=_0x1a9525(0x184),_0x2854b3[_0x2854b3['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2854b3))(I||{}),v=(_0xa6053e=>(_0xa6053e[_0xa6053e[_0x1a9525(0x198)]=0x0]=_0x1a9525(0x198),_0xa6053e[_0xa6053e[_0x1a9525(0x13f)]=0x1]='Add',_0xa6053e[_0xa6053e['Reply']=0x2]=_0x1a9525(0x143),_0xa6053e[_0xa6053e[_0x1a9525(0x159)]=0x3]=_0x1a9525(0x159),_0xa6053e[_0xa6053e[_0x1a9525(0x190)]=0x4]=_0x1a9525(0x190),_0xa6053e[_0xa6053e[_0x1a9525(0x18f)]=0x5]=_0x1a9525(0x18f),_0xa6053e[_0xa6053e[_0x1a9525(0x17f)]=-0x1]=_0x1a9525(0x17f),_0xa6053e))(v||{});const D=_0x2f9ac0=>_0x8d8ae0(new Date(+_0x2f9ac0))[_0x1a9525(0x187)](_0x1a9525(0x17a)),B=async(_0x466682,_0x4ba6fc)=>{const _0x43f220=_0x1a9525,_0x451675=_0x466682[_0x43f220(0x167)](_0x3744cb),_0x16c8b0=_0x466682['get'](_0x207092);_0x4ba6fc['forEach'](_0x295762=>{const _0x57bd28=_0x43f220;_0x451675[_0x57bd28(0x140)](_0x295762)&&_0x4ba6fc[_0x57bd28(0x15c)](_0x295762);}),_0x4ba6fc[_0x43f220(0x1a8)]&&(await _0x16c8b0[_0x43f220(0x167)](_0x43f220(0x166),{'params':{'userIDs':[..._0x4ba6fc]}}))[_0x43f220(0x144)][_0x43f220(0x155)][_0x43f220(0x14d)](_0x34e0ea=>{const _0x2c12a1=_0x43f220;_0x34e0ea&&_0x451675[_0x2c12a1(0x175)](_0x34e0ea);});};var K=Object[_0x1a9525(0x151)],V=(_0x41501a,_0x359580,_0x2a9c4b,_0x3a0312)=>{const _0x158f61=_0x1a9525;for(var _0x30e415=_0x3a0312>0x1?void 0x0:_0x3a0312?K(_0x359580,_0x2a9c4b):_0x359580,_0x292757=_0x41501a[_0x158f61(0x16f)]-0x1,_0x2adb6d;_0x292757>=0x0;_0x292757--)(_0x2adb6d=_0x41501a[_0x292757])&&(_0x30e415=_0x2adb6d(_0x30e415)||_0x30e415);return _0x30e415;},p=(_0x29f0e2,_0x1e5c94)=>(_0x54c32f,_0x591cff)=>_0x1e5c94(_0x54c32f,_0x591cff,_0x29f0e2);let S=class extends _0x52e380{constructor(_0x9ae7ac,_0x52ac7a,_0x1fd2f4,_0x1a70e8){const _0x15073c=_0x1a9525;super(),this[_0x15073c(0x18c)]=_0x9ae7ac,this[_0x15073c(0x19a)]=_0x52ac7a,this[_0x15073c(0x179)]=_0x1fd2f4,this['_injector']=_0x1a70e8,this[_0x15073c(0x1ab)](),this[_0x15073c(0x195)]();}['_initUserSync'](){const _0x43b798=_0x1a9525;this[_0x43b798(0x1a5)](this[_0x43b798(0x19a)][_0x43b798(0x145)][_0x43b798(0x19c)](_0x3dfed0(0x10))['subscribe'](_0x565d36=>{const _0x5414a9=_0x43b798,_0x873893=new Set();_0x565d36[_0x5414a9(0x14d)](_0x452d1d=>{const _0x3b75af=_0x5414a9;switch(_0x452d1d[_0x3b75af(0x1a2)]){case'add':{const _0x246373=_0x452d1d[_0x3b75af(0x161)][_0x3b75af(0x181)];_0x873893[_0x3b75af(0x156)](_0x246373);break;}}}),B(this[_0x5414a9(0x15f)],_0x873893);}));}[_0x1a9525(0x1ab)](){const _0x50dd4e=_0x1a9525;this[_0x50dd4e(0x1a5)](this[_0x50dd4e(0x18c)][_0x50dd4e(0x145)][_0x50dd4e(0x176)](async _0xdfa244=>{const _0x433fcc=_0x50dd4e;var _0x3cd55e,_0x24f8b8,_0x5480fc,_0x4487f4;const _0x383e74=(_0x3cd55e=this[_0x433fcc(0x19a)][_0x433fcc(0x1a6)](_0xdfa244[_0x433fcc(0x158)])[_0x433fcc(0x1a7)](_0x55b7a3=>_0x55b7a3[_0x433fcc(0x142)]===_0xdfa244[_0x433fcc(0x142)]))==null?void 0x0:_0x3cd55e['root'];if(!_0x383e74)return;const {unitId:_0x385c67,subUnitId:_0x55b27a}=_0x383e74;switch(_0xdfa244[_0x433fcc(0x1a4)]&&this[_0x433fcc(0x179)][_0x433fcc(0x175)](_0xdfa244['user']),_0xdfa244[_0x433fcc(0x1a2)]){case v[_0x433fcc(0x13f)]:break;case v[_0x433fcc(0x143)]:{this[_0x433fcc(0x19a)][_0x433fcc(0x15a)](_0x385c67,_0x55b27a,{'unitId':_0x385c67,'subUnitId':_0x55b27a,'ref':'','id':_0xdfa244[_0x433fcc(0x162)],'dT':D(+_0xdfa244[_0x433fcc(0x153)]),'threadId':_0xdfa244['threadId'],'personId':(_0x5480fc=(_0x24f8b8=_0xdfa244[_0x433fcc(0x1a4)])==null?void 0x0:_0x24f8b8['userID'])!=null?_0x5480fc:_0xdfa244['userId'],'text':JSON[_0x433fcc(0x14a)](_0xdfa244[_0x433fcc(0x17c)]),'parentId':_0x383e74['id']});break;}case v[_0x433fcc(0x190)]:{const _0x3644f6=this[_0x433fcc(0x19a)][_0x433fcc(0x168)](_0x385c67,_0x55b27a,_0xdfa244[_0x433fcc(0x162)]);_0x3644f6&&_0x3644f6[_0x433fcc(0x18a)]&&this[_0x433fcc(0x19a)][_0x433fcc(0x1a1)](_0x385c67,_0x55b27a,_0xdfa244[_0x433fcc(0x162)]);break;}case v[_0x433fcc(0x159)]:{this[_0x433fcc(0x19a)]['updateComment'](_0x385c67,_0x55b27a,{'commentId':_0xdfa244[_0x433fcc(0x162)],'text':JSON[_0x433fcc(0x14a)](_0xdfa244[_0x433fcc(0x17c)])});break;}case v[_0x433fcc(0x18f)]:{const _0x4edcd5=(_0x4487f4=this['_threadCommentModel'][_0x433fcc(0x1a6)](_0xdfa244[_0x433fcc(0x158)])[_0x433fcc(0x1a7)](_0x31b569=>_0x31b569[_0x433fcc(0x142)]===_0xdfa244[_0x433fcc(0x142)]))==null?void 0x0:_0x4487f4['root'];_0x4edcd5&&this[_0x433fcc(0x19a)][_0x433fcc(0x14f)](_0x385c67,_0x55b27a,_0x4edcd5['id'],_0xdfa244[_0x433fcc(0x14e)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x22e7e9(_0x40c369)),p(0x1,_0x22e7e9(_0x94249b)),p(0x2,_0x22e7e9(_0x3744cb)),p(0x3,_0x22e7e9(_0x5645be))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x1a9525(0x151)],Q=(_0x415310,_0x5a4bd2,_0xe1fd49,_0x4f86c3)=>{const _0x33407d=_0x1a9525;for(var _0x5830e7=_0x4f86c3>0x1?void 0x0:_0x4f86c3?k(_0x5a4bd2,_0xe1fd49):_0x5a4bd2,_0x99997b=_0x415310[_0x33407d(0x16f)]-0x1,_0x5038eb;_0x99997b>=0x0;_0x99997b--)(_0x5038eb=_0x415310[_0x99997b])&&(_0x5830e7=_0x5038eb(_0x5830e7)||_0x5830e7);return _0x5830e7;},_=(_0x56b842,_0x531499)=>(_0x41b231,_0x5b228e)=>_0x531499(_0x41b231,_0x5b228e,_0x56b842);function X(_0x1dc29f,_0x55b3e8){const _0x283aea=_0x1a9525,_0x5ba95d=_0x1dc29f[_0x283aea(0x178)][0x0];return{..._0x55b3e8,'id':_0x5ba95d[_0x283aea(0x162)],'resolved':_0x1dc29f[_0x283aea(0x14e)]===0x1,'dT':D(_0x5ba95d[_0x283aea(0x153)]),'personId':_0x5ba95d[_0x283aea(0x163)],'threadId':_0x5ba95d[_0x283aea(0x142)]};}function ee(_0xf45a16,_0x380eb4,_0x556894){const _0x1f9b87=_0x1a9525;var _0x463bb7,_0x5908a9;if(((_0x5908a9=(_0x463bb7=_0xf45a16==null?void 0x0:_0xf45a16[_0x1f9b87(0x178)])==null?void 0x0:_0x463bb7[_0x1f9b87(0x16f)])!=null?_0x5908a9:0x0)>0x0){const _0x1be153=(_0x2f8038,_0x2fe42e)=>({'id':_0x2f8038[_0x1f9b87(0x162)],'threadId':_0x2f8038['threadId'],'dT':D(_0x2f8038['createTimestamp']),'personId':_0x2f8038[_0x1f9b87(0x163)],'resolved':_0xf45a16[_0x1f9b87(0x14e)]===I[_0x1f9b87(0x184)],'unitId':_0x380eb4,'subUnitId':_0x556894,'text':JSON[_0x1f9b87(0x14a)](_0x2f8038[_0x1f9b87(0x17c)]),'parentId':_0x2fe42e}),_0x15a128=_0x1be153(_0xf45a16[_0x1f9b87(0x178)][0x0]);return{..._0x15a128,'children':_0xf45a16[_0x1f9b87(0x178)][_0x1f9b87(0x17b)](0x1)[_0x1f9b87(0x185)](_0xb4aa20=>_0x1be153(_0xb4aa20,_0x15a128['id']))};}return null;}let f=class{constructor(_0x170bb6,_0x36beb0,_0x28ed81,_0x41427a){const _0x5d54ec=_0x1a9525;this[_0x5d54ec(0x173)]=_0x170bb6,this[_0x5d54ec(0x179)]=_0x36beb0,this[_0x5d54ec(0x17e)]=_0x28ed81,this[_0x5d54ec(0x15f)]=_0x41427a;}async[_0x1a9525(0x15a)](_0x170fb8){const _0x5eb96b=_0x1a9525;var _0x4c0deb,_0x3bcdf4;const {parentId:_0x484456,unitId:_0x3df598,text:_0x38a5a8,threadId:_0x53931a}=_0x170fb8,_0x304d2e=(_0x3bcdf4=(_0x4c0deb=_0x38a5a8[_0x5eb96b(0x17d)])==null?void 0x0:_0x4c0deb[_0x5eb96b(0x15d)](_0x392cf3=>_0x392cf3[_0x5eb96b(0x19d)]===_0x3fa89b[_0x5eb96b(0x15e)])[_0x5eb96b(0x185)](_0x149650=>_0x149650[_0x5eb96b(0x19b)]))!=null?_0x3bcdf4:[],_0x37b017=JSON[_0x5eb96b(0x164)](_0x38a5a8),_0x3fe66f=(await this[_0x5eb96b(0x17e)]['requireSession'](_0x3df598))['getMemberID']();if(_0x484456){const _0x4da751={'memberId':_0x3fe66f,'unitId':_0x3df598,'content':_0x37b017,'mention':_0x304d2e,'threadId':_0x53931a},_0x8dc241=(await this[_0x5eb96b(0x173)][_0x5eb96b(0x19e)]('/universer-api/comment/unit/'+_0x3df598+_0x5eb96b(0x171),{'body':_0x4da751}))[_0x5eb96b(0x144)][_0x5eb96b(0x1a0)];return{..._0x170fb8,'id':_0x8dc241[_0x5eb96b(0x162)],'dT':_0x8d8ae0(+_0x8dc241['createTimestamp'])[_0x5eb96b(0x187)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x8dc241[_0x5eb96b(0x163)]};}else{const _0xd0b960={'memberId':_0x3fe66f,'unitId':_0x3df598,'content':_0x37b017,'mention':_0x304d2e},_0x5b586c=await this['_httpService'][_0x5eb96b(0x19e)]('/universer-api/comment/unit/'+_0x3df598+_0x5eb96b(0x147),{'body':_0xd0b960});return X(_0x5b586c['body'][_0x5eb96b(0x1a3)],_0x170fb8);}}async[_0x1a9525(0x18e)](_0x147bb9){const _0x16c9a1=_0x1a9525;var _0x2f7eca,_0xd942d6;const {text:_0x39bce1,unitId:_0x5c0973}=_0x147bb9,_0x1a0660=(_0xd942d6=(_0x2f7eca=_0x39bce1['customRanges'])==null?void 0x0:_0x2f7eca[_0x16c9a1(0x15d)](_0x43eff0=>_0x43eff0['rangeType']===_0x3fa89b[_0x16c9a1(0x15e)])[_0x16c9a1(0x185)](_0x2f20cb=>_0x2f20cb[_0x16c9a1(0x19b)]))!=null?_0xd942d6:[],_0x37828c=JSON['stringify'](_0x39bce1),_0x443d5e=_0x147bb9['threadId'],_0x4dd1d1=_0x147bb9['id'],_0x5c4fe1={'memberId':(await this['_sessionService'][_0x16c9a1(0x193)](_0x5c0973))[_0x16c9a1(0x183)](),'unitId':_0x5c0973,'threadId':_0x443d5e,'mention':_0x1a0660,'content':_0x37828c,'replyId':_0x4dd1d1},_0x49e4a8=await this[_0x16c9a1(0x173)][_0x16c9a1(0x19e)]('/universer-api/comment/unit/'+_0x5c0973+_0x16c9a1(0x194),{'body':_0x5c4fe1});return!_0x49e4a8[_0x16c9a1(0x144)]['error']||_0x49e4a8['body']['error'][_0x16c9a1(0x196)]===0x1;}async['resolveComment'](_0x223bdd){const _0x2d163a=_0x1a9525,{unitId:_0x659991}=_0x223bdd,_0x20c221=_0x223bdd[_0x2d163a(0x142)],_0x43ba23={'memberId':this['_userService'][_0x2d163a(0x1a9)]()[_0x2d163a(0x182)],'unitId':_0x659991,'threadId':_0x20c221,'solved':_0x223bdd[_0x2d163a(0x1aa)]?I[_0x2d163a(0x184)]:I[_0x2d163a(0x157)]},_0x3e663d=await this[_0x2d163a(0x173)][_0x2d163a(0x19e)](_0x2d163a(0x16a)+_0x659991+'/solved',{'body':_0x43ba23});return!_0x3e663d[_0x2d163a(0x144)]['error']||_0x3e663d['body']['error'][_0x2d163a(0x196)]===0x1;}async['deleteComment'](_0x31c426,_0x109a50,_0x5221d3,_0x54f231){const _0x1163cc=_0x1a9525,_0x4f28d4={'memberId':(await this[_0x1163cc(0x17e)][_0x1163cc(0x193)](_0x31c426))[_0x1163cc(0x183)](),'threadId':_0x5221d3,'replyId':_0x54f231,'unitId':_0x31c426},_0x4ec5f4=await this[_0x1163cc(0x173)][_0x1163cc(0x19e)]('/universer-api/comment/unit/'+_0x31c426+'/delete',{'body':_0x4f28d4});return!_0x4ec5f4[_0x1163cc(0x144)][_0x1163cc(0x16c)]||_0x4ec5f4['body'][_0x1163cc(0x16c)][_0x1163cc(0x196)]===0x1;}async[_0x1a9525(0x18b)](_0x2c8eb7,_0x15bdd5,_0x2516e5){const _0x3b03d9=_0x1a9525,_0x287236={'unitId':_0x2c8eb7,'threadId':_0x2516e5},_0x4d9369=await this[_0x3b03d9(0x173)]['post'](_0x3b03d9(0x16a)+_0x2c8eb7+_0x3b03d9(0x172),{'body':_0x287236}),_0x2a38fd=_0x2516e5[_0x3b03d9(0x185)](_0x22e9f5=>ee(_0x4d9369[_0x3b03d9(0x144)][_0x3b03d9(0x169)][_0x22e9f5],_0x2c8eb7,_0x15bdd5))[_0x3b03d9(0x15d)](Boolean);return Object[_0x3b03d9(0x174)](_0x4d9369[_0x3b03d9(0x144)]['users'])[_0x3b03d9(0x14d)](_0x23253f=>{const _0x472c18=_0x3b03d9;this[_0x472c18(0x179)][_0x472c18(0x175)](_0x23253f);}),_0x2a38fd;}[_0x1a9525(0x16d)](_0x25fdeb){const _0xfeeeb2=_0x1a9525;return{'id':_0x25fdeb['id'],'threadId':_0x25fdeb[_0xfeeeb2(0x142)],'ref':_0x25fdeb[_0xfeeeb2(0x141)]};}};f=Q([_(0x0,_0x22e7e9(_0x207092)),_(0x1,_0x22e7e9(_0x3744cb)),_(0x2,_0x22e7e9(_0xb5f0f6)),_(0x3,_0x22e7e9(_0x5645be))],f);var re=Object[_0x1a9525(0x151)],te=(_0x1b5106,_0x165841,_0x58a085,_0x1c1e4a)=>{const _0x289f95=_0x1a9525;for(var _0x59ce3c=_0x1c1e4a>0x1?void 0x0:_0x1c1e4a?re(_0x165841,_0x58a085):_0x165841,_0x26c42e=_0x1b5106[_0x289f95(0x16f)]-0x1,_0x3adca6;_0x26c42e>=0x0;_0x26c42e--)(_0x3adca6=_0x1b5106[_0x26c42e])&&(_0x59ce3c=_0x3adca6(_0x59ce3c)||_0x59ce3c);return _0x59ce3c;},N=(_0x44988c,_0x577d11)=>(_0x1886a8,_0x20115d)=>_0x577d11(_0x1886a8,_0x20115d,_0x44988c);let g=class extends _0x52e380{constructor(_0x44cee3,_0x1d1169){const _0x487315=_0x1a9525;super(),this['_threadCommentDataSourceService']=_0x44cee3,this[_0x487315(0x197)]=_0x1d1169,this[_0x487315(0x19f)]();}[_0x1a9525(0x19f)](){const _0x1c2763=_0x1a9525;this[_0x1c2763(0x148)]['dataSource']=this[_0x1c2763(0x197)],this[_0x1c2763(0x148)]['syncUpdateMutationToColla']=!0x1;}};function _0x5a97(){const _0x388fcc=['/reply','/list','_httpService','values','addUser','subscribe','onStarting','replies','_userService','YYYY/MM/DD\x20HH:mm','slice','content','customRanges','_sessionService','UNRECOGNIZED','onReady','personId','userID','getMemberID','Solved','map','30dqSJtM','format','12ZUlxxC','_configService','parentId','listComments','_commentService','defineProperty','updateComment','Solve','Delete','84594QkklsI','415359pfXLZg','requireSession','/edit','_initUserSync','code','_threadCommentDataSource','Unknown','UNIVER_UNKNOWN','_threadCommentModel','rangeId','pipe','rangeType','post','_initDataSource','reply','deleteComment','type','comment','user','disposeWithMe','getUnit','find','size','getCurrentUser','resolved','_init','Add','getUser','ref','threadId','Reply','body','commentUpdate$','pluginName','/add','_threadCommentDataSourceService','42848KIIVhZ','parse','symbol','93016LpNQPu','forEach','solved','resolveComment','3GLkCms','getOwnPropertyDescriptor','83724tyetAg','createTimestamp','198hsLCgw','users','add','OpenOrReOpen','unitId','Edit','addComment','5uJGKoi','delete','filter','COMMENT','_injector','1666262hyvytS','payload','replyId','userId','stringify','46145XMJNCM','/universer-api/user/list','get','getComment','comments','/universer-api/comment/unit/','470RkjJYY','error','saveCommentToSnapshot','_config','length','setConfig'];_0x5a97=function(){return _0x388fcc;};return _0x5a97();}g=te([N(0x0,_0x14199e),N(0x1,_0x22e7e9(f))],g);var se=Object[_0x1a9525(0x18d)],oe=Object[_0x1a9525(0x151)],ne=(_0xe30eee,_0x4ea96f,_0x59f59f)=>_0x4ea96f in _0xe30eee?se(_0xe30eee,_0x4ea96f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x59f59f}):_0xe30eee[_0x4ea96f]=_0x59f59f,ie=(_0x5bdcb7,_0x3ce996,_0x1266c5,_0x13d61c)=>{for(var _0x5507c9=_0x13d61c>0x1?void 0x0:_0x13d61c?oe(_0x3ce996,_0x1266c5):_0x3ce996,_0x5a7208=_0x5bdcb7['length']-0x1,_0x459d35;_0x5a7208>=0x0;_0x5a7208--)(_0x459d35=_0x5bdcb7[_0x5a7208])&&(_0x5507c9=_0x459d35(_0x5507c9)||_0x5507c9);return _0x5507c9;},w=(_0x55efcf,_0x5cd973)=>(_0x378872,_0x44783b)=>_0x5cd973(_0x378872,_0x44783b,_0x55efcf),$=(_0x1dc2ff,_0xee071e,_0x4524eb)=>ne(_0x1dc2ff,typeof _0xee071e!=_0x1a9525(0x14b)?_0xee071e+'':_0xee071e,_0x4524eb);let b=class extends _0x14760f{constructor(_0x686d3f=M,_0x3e7257,_0x4dc320){const _0x3714ad=_0x1a9525;super(),this[_0x3714ad(0x16e)]=_0x686d3f,this[_0x3714ad(0x15f)]=_0x3e7257,this[_0x3714ad(0x189)]=_0x4dc320;const {..._0x12bc84}=_0x3fdcf6({},M,this[_0x3714ad(0x16e)]);this[_0x3714ad(0x189)][_0x3714ad(0x170)](z,_0x12bc84);}[_0x1a9525(0x177)](){const _0x4828e3=_0x1a9525;[[f],[g],[S]][_0x4828e3(0x14d)](_0x5416d7=>{const _0x1f6d7b=_0x4828e3;this[_0x1f6d7b(0x15f)][_0x1f6d7b(0x156)](_0x5416d7);});}[_0x1a9525(0x180)](){const _0x60ccf5=_0x1a9525;this['_injector'][_0x60ccf5(0x167)](g),this[_0x60ccf5(0x15f)]['get'](S);}};$(b,_0x1a9525(0x146),W),$(b,_0x1a9525(0x1a2),_0x5c86df[_0x1a9525(0x199)]),b=ie([_0x3c4a67(_0x5d7089,_0x156a54,_0x44c437),w(0x1,_0x22e7e9(_0x5645be)),w(0x2,_0x23818b)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x9cf832=_0x5690;(function(_0x1ab0f5,_0x582785){const _0x14f229=_0x5690,_0x571315=_0x1ab0f5();while(!![]){try{const _0x4a90d3=-parseInt(_0x14f229(0x106))/0x1*(-parseInt(_0x14f229(0xa3))/0x2)+parseInt(_0x14f229(0xe9))/0x3*(parseInt(_0x14f229(0xe2))/0x4)+-parseInt(_0x14f229(0xf1))/0x5*(parseInt(_0x14f229(0xb1))/0x6)+-parseInt(_0x14f229(0x102))/0x7*(parseInt(_0x14f229(0xc5))/0x8)+-parseInt(_0x14f229(0xc9))/0x9+-parseInt(_0x14f229(0xcb))/0xa+-parseInt(_0x14f229(0xb3))/0xb*(-parseInt(_0x14f229(0xd2))/0xc);if(_0x4a90d3===_0x582785)break;else _0x571315['push'](_0x571315['shift']());}catch(_0x2b9612){_0x571315['push'](_0x571315['shift']());}}}(_0x51a8,0x5c1fb));import{CommentService as _0x1803a,CollaborationSessionService as _0x1c6622,UniverCollaborationClientPlugin as _0x5befe3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x37b1f9}from'@univerjs-pro/license';import{dayjs as _0x33b739,UserManagerService as _0xe8fcb1,Inject as _0x2f174f,Injector as _0x27970a,Disposable as _0xd71482,CustomRangeType as _0xf31c67,UniverInstanceType as _0x2a1993,DependentOn as _0x215ab7,IConfigService as _0x1acffc,Plugin as _0x5527d6,merge as _0x42355d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1f6f25}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x23f12b,IThreadCommentDataSourceService as _0x412e5d}from'@univerjs/thread-comment';import{bufferTime as _0x5d7449}from'rxjs';import{HTTPService as _0x1a1c91}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0x5690(_0x35ec36,_0x3e9002){const _0x51a8f0=_0x51a8();return _0x5690=function(_0x569008,_0x5d4623){_0x569008=_0x569008-0x9f;let _0x40fe07=_0x51a8f0[_0x569008];return _0x40fe07;},_0x5690(_0x35ec36,_0x3e9002);}var I=(_0x53c897=>(_0x53c897[_0x53c897[_0x9cf832(0xf4)]=0x0]=_0x9cf832(0xf4),_0x53c897[_0x53c897[_0x9cf832(0xba)]=0x1]=_0x9cf832(0xba),_0x53c897[_0x53c897[_0x9cf832(0xff)]=-0x1]='UNRECOGNIZED',_0x53c897))(I||{}),v=(_0x292077=>(_0x292077[_0x292077[_0x9cf832(0xdd)]=0x0]=_0x9cf832(0xdd),_0x292077[_0x292077[_0x9cf832(0xfd)]=0x1]=_0x9cf832(0xfd),_0x292077[_0x292077[_0x9cf832(0xef)]=0x2]='Reply',_0x292077[_0x292077[_0x9cf832(0xc7)]=0x3]=_0x9cf832(0xc7),_0x292077[_0x292077['Delete']=0x4]=_0x9cf832(0xca),_0x292077[_0x292077[_0x9cf832(0xa0)]=0x5]=_0x9cf832(0xa0),_0x292077[_0x292077[_0x9cf832(0xff)]=-0x1]='UNRECOGNIZED',_0x292077))(v||{});const D=_0x16630a=>_0x33b739(new Date(+_0x16630a))[_0x9cf832(0xc3)](_0x9cf832(0xb6)),B=async(_0x3658d2,_0x5bff7d)=>{const _0xfc86d9=_0x9cf832,_0x533b58=_0x3658d2[_0xfc86d9(0xb9)](_0xe8fcb1),_0x5e7eb9=_0x3658d2['get'](_0x1a1c91);_0x5bff7d['forEach'](_0x4babe3=>{const _0x35c76d=_0xfc86d9;_0x533b58[_0x35c76d(0x100)](_0x4babe3)&&_0x5bff7d[_0x35c76d(0xae)](_0x4babe3);}),_0x5bff7d['size']&&(await _0x5e7eb9[_0xfc86d9(0xb9)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5bff7d]}}))[_0xfc86d9(0xd5)][_0xfc86d9(0xc6)]['forEach'](_0xbb79bb=>{const _0x37fc30=_0xfc86d9;_0xbb79bb&&_0x533b58[_0x37fc30(0xa4)](_0xbb79bb);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x369613,_0x5b7093,_0x1abaf1,_0x5328cc)=>{const _0x42748e=_0x9cf832;for(var _0x2c4c14=_0x5328cc>0x1?void 0x0:_0x5328cc?K(_0x5b7093,_0x1abaf1):_0x5b7093,_0x112d1e=_0x369613[_0x42748e(0xd1)]-0x1,_0x2f86d3;_0x112d1e>=0x0;_0x112d1e--)(_0x2f86d3=_0x369613[_0x112d1e])&&(_0x2c4c14=_0x2f86d3(_0x2c4c14)||_0x2c4c14);return _0x2c4c14;},p=(_0x44e692,_0x476b91)=>(_0x2a1a2f,_0x500e43)=>_0x476b91(_0x2a1a2f,_0x500e43,_0x44e692);let S=class extends _0xd71482{constructor(_0x42dc89,_0x459ac4,_0x499a45,_0x17175d){const _0x2a2f0e=_0x9cf832;super(),this[_0x2a2f0e(0xe6)]=_0x42dc89,this[_0x2a2f0e(0xe1)]=_0x459ac4,this['_userService']=_0x499a45,this[_0x2a2f0e(0xf5)]=_0x17175d,this[_0x2a2f0e(0x103)](),this[_0x2a2f0e(0xcf)]();}['_initUserSync'](){const _0x4d21d4=_0x9cf832;this[_0x4d21d4(0xea)](this['_threadCommentModel']['commentUpdate$'][_0x4d21d4(0xb5)](_0x5d7449(0x10))[_0x4d21d4(0xbd)](_0x3baf25=>{const _0x1e9cac=_0x4d21d4,_0x3a8832=new Set();_0x3baf25[_0x1e9cac(0xf7)](_0x288485=>{const _0x487d9b=_0x1e9cac;switch(_0x288485[_0x487d9b(0xd6)]){case _0x487d9b(0xee):{const _0x1c5945=_0x288485['payload'][_0x487d9b(0xeb)];_0x3a8832['add'](_0x1c5945);break;}}}),B(this['_injector'],_0x3a8832);}));}[_0x9cf832(0x103)](){const _0x2120eb=_0x9cf832;this[_0x2120eb(0xea)](this[_0x2120eb(0xe6)][_0x2120eb(0xe4)][_0x2120eb(0xbd)](async _0x36a911=>{const _0x32e7aa=_0x2120eb;var _0xfe6098,_0x3dca27,_0x1791e1,_0x205790;const _0x365e16=(_0xfe6098=this[_0x32e7aa(0xe1)][_0x32e7aa(0xad)](_0x36a911[_0x32e7aa(0xf9)])['find'](_0x35025b=>_0x35025b['threadId']===_0x36a911[_0x32e7aa(0xda)]))==null?void 0x0:_0xfe6098[_0x32e7aa(0xd4)];if(!_0x365e16)return;const {unitId:_0x1b19d4,subUnitId:_0x358367}=_0x365e16;switch(_0x36a911[_0x32e7aa(0xed)]&&this[_0x32e7aa(0xb2)][_0x32e7aa(0xa4)](_0x36a911['user']),_0x36a911[_0x32e7aa(0xd6)]){case v[_0x32e7aa(0xfd)]:break;case v[_0x32e7aa(0xef)]:{this[_0x32e7aa(0xe1)][_0x32e7aa(0xf3)](_0x1b19d4,_0x358367,{'unitId':_0x1b19d4,'subUnitId':_0x358367,'ref':'','id':_0x36a911[_0x32e7aa(0xfb)],'dT':D(+_0x36a911[_0x32e7aa(0xdf)]),'threadId':_0x36a911[_0x32e7aa(0xda)],'personId':(_0x1791e1=(_0x3dca27=_0x36a911[_0x32e7aa(0xed)])==null?void 0x0:_0x3dca27[_0x32e7aa(0xa6)])!=null?_0x1791e1:_0x36a911[_0x32e7aa(0x9f)],'text':JSON[_0x32e7aa(0xd9)](_0x36a911[_0x32e7aa(0xfc)]),'parentId':_0x365e16['id']});break;}case v[_0x32e7aa(0xca)]:{const _0x35fd2b=this[_0x32e7aa(0xe1)]['getComment'](_0x1b19d4,_0x358367,_0x36a911[_0x32e7aa(0xfb)]);_0x35fd2b&&_0x35fd2b[_0x32e7aa(0xd3)]&&this[_0x32e7aa(0xe1)]['deleteComment'](_0x1b19d4,_0x358367,_0x36a911['replyId']);break;}case v[_0x32e7aa(0xc7)]:{this[_0x32e7aa(0xe1)][_0x32e7aa(0xf0)](_0x1b19d4,_0x358367,{'commentId':_0x36a911[_0x32e7aa(0xfb)],'text':JSON[_0x32e7aa(0xd9)](_0x36a911['content'])});break;}case v[_0x32e7aa(0xa0)]:{const _0x4e6bf9=(_0x205790=this[_0x32e7aa(0xe1)]['getUnit'](_0x36a911[_0x32e7aa(0xf9)])[_0x32e7aa(0xe7)](_0x43fe88=>_0x43fe88['threadId']===_0x36a911[_0x32e7aa(0xda)]))==null?void 0x0:_0x205790['root'];_0x4e6bf9&&this[_0x32e7aa(0xe1)]['resolveComment'](_0x1b19d4,_0x358367,_0x4e6bf9['id'],_0x36a911[_0x32e7aa(0xce)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x2f174f(_0x1803a)),p(0x1,_0x2f174f(_0x23f12b)),p(0x2,_0x2f174f(_0xe8fcb1)),p(0x3,_0x2f174f(_0x27970a))],S);const z=_0x9cf832(0xbc),M={};var k=Object[_0x9cf832(0xa8)],Q=(_0x29fb58,_0x2df8e7,_0x19864c,_0x2eea02)=>{const _0x65470=_0x9cf832;for(var _0x390171=_0x2eea02>0x1?void 0x0:_0x2eea02?k(_0x2df8e7,_0x19864c):_0x2df8e7,_0x52fcbb=_0x29fb58[_0x65470(0xd1)]-0x1,_0x5c3641;_0x52fcbb>=0x0;_0x52fcbb--)(_0x5c3641=_0x29fb58[_0x52fcbb])&&(_0x390171=_0x5c3641(_0x390171)||_0x390171);return _0x390171;},_=(_0x14a6dd,_0x573134)=>(_0x1da04d,_0x502cb8)=>_0x573134(_0x1da04d,_0x502cb8,_0x14a6dd);function X(_0x5c6cbd,_0x2d4c44){const _0xd2abdb=_0x9cf832,_0x5a60e1=_0x5c6cbd[_0xd2abdb(0xbb)][0x0];return{..._0x2d4c44,'id':_0x5a60e1[_0xd2abdb(0xfb)],'resolved':_0x5c6cbd[_0xd2abdb(0xce)]===0x1,'dT':D(_0x5a60e1['createTimestamp']),'personId':_0x5a60e1['userId'],'threadId':_0x5a60e1[_0xd2abdb(0xda)]};}function ee(_0x57bf54,_0x17ef8e,_0x42ff45){const _0x2a3786=_0x9cf832;var _0x29f0e6,_0xbeaf73;if(((_0xbeaf73=(_0x29f0e6=_0x57bf54==null?void 0x0:_0x57bf54[_0x2a3786(0xbb)])==null?void 0x0:_0x29f0e6[_0x2a3786(0xd1)])!=null?_0xbeaf73:0x0)>0x0){const _0x456bb8=(_0x3e804f,_0x21a111)=>({'id':_0x3e804f[_0x2a3786(0xfb)],'threadId':_0x3e804f['threadId'],'dT':D(_0x3e804f[_0x2a3786(0xdf)]),'personId':_0x3e804f['userId'],'resolved':_0x57bf54['solved']===I['Solved'],'unitId':_0x17ef8e,'subUnitId':_0x42ff45,'text':JSON[_0x2a3786(0xd9)](_0x3e804f['content']),'parentId':_0x21a111}),_0x5e24d5=_0x456bb8(_0x57bf54['replies'][0x0]);return{..._0x5e24d5,'children':_0x57bf54[_0x2a3786(0xbb)]['slice'](0x1)[_0x2a3786(0xa7)](_0x5f395e=>_0x456bb8(_0x5f395e,_0x5e24d5['id']))};}return null;}let f=class{constructor(_0x17967e,_0x358e58,_0x53d44b,_0x427289){const _0x3da1d1=_0x9cf832;this[_0x3da1d1(0xb8)]=_0x17967e,this[_0x3da1d1(0xb2)]=_0x358e58,this[_0x3da1d1(0xd0)]=_0x53d44b,this[_0x3da1d1(0xf5)]=_0x427289;}async['addComment'](_0x2c1f76){const _0x26a539=_0x9cf832;var _0x1403b4,_0x105841;const {parentId:_0x69ee58,unitId:_0x48e4ec,text:_0x3b3c8e,threadId:_0x51104a}=_0x2c1f76,_0x216412=(_0x105841=(_0x1403b4=_0x3b3c8e['customRanges'])==null?void 0x0:_0x1403b4[_0x26a539(0xcc)](_0x1cb298=>_0x1cb298[_0x26a539(0xc1)]===_0xf31c67['COMMENT'])[_0x26a539(0xa7)](_0x2e69df=>_0x2e69df[_0x26a539(0xbf)]))!=null?_0x105841:[],_0x5b1ede=JSON['stringify'](_0x3b3c8e),_0x94f4d=(await this[_0x26a539(0xd0)][_0x26a539(0xcd)](_0x48e4ec))[_0x26a539(0xaf)]();if(_0x69ee58){const _0x37ca21={'memberId':_0x94f4d,'unitId':_0x48e4ec,'content':_0x5b1ede,'mention':_0x216412,'threadId':_0x51104a},_0x1bad8=(await this['_httpService'][_0x26a539(0xac)](_0x26a539(0x101)+_0x48e4ec+_0x26a539(0xfa),{'body':_0x37ca21}))['body'][_0x26a539(0xb7)];return{..._0x2c1f76,'id':_0x1bad8[_0x26a539(0xfb)],'dT':_0x33b739(+_0x1bad8[_0x26a539(0xdf)])['format'](_0x26a539(0xb6)),'personId':_0x1bad8['userId']};}else{const _0xa9085b={'memberId':_0x94f4d,'unitId':_0x48e4ec,'content':_0x5b1ede,'mention':_0x216412},_0x518383=await this[_0x26a539(0xb8)][_0x26a539(0xac)](_0x26a539(0x101)+_0x48e4ec+_0x26a539(0xbe),{'body':_0xa9085b});return X(_0x518383['body'][_0x26a539(0xdb)],_0x2c1f76);}}async['updateComment'](_0x1a2966){const _0x104744=_0x9cf832;var _0x82ebde,_0x16fa86;const {text:_0x2358d0,unitId:_0x2c9bbe}=_0x1a2966,_0x2bbcf7=(_0x16fa86=(_0x82ebde=_0x2358d0[_0x104744(0xa5)])==null?void 0x0:_0x82ebde['filter'](_0x57af91=>_0x57af91[_0x104744(0xc1)]===_0xf31c67[_0x104744(0xa1)])[_0x104744(0xa7)](_0x20f280=>_0x20f280[_0x104744(0xbf)]))!=null?_0x16fa86:[],_0x14bad6=JSON['stringify'](_0x2358d0),_0x34ec8e=_0x1a2966[_0x104744(0xda)],_0x25c00e=_0x1a2966['id'],_0xdd12bf={'memberId':(await this[_0x104744(0xd0)][_0x104744(0xcd)](_0x2c9bbe))[_0x104744(0xaf)](),'unitId':_0x2c9bbe,'threadId':_0x34ec8e,'mention':_0x2bbcf7,'content':_0x14bad6,'replyId':_0x25c00e},_0x2d1b1d=await this[_0x104744(0xb8)][_0x104744(0xac)](_0x104744(0x101)+_0x2c9bbe+_0x104744(0xdc),{'body':_0xdd12bf});return!_0x2d1b1d[_0x104744(0xd5)][_0x104744(0xa9)]||_0x2d1b1d[_0x104744(0xd5)]['error'][_0x104744(0xc8)]===0x1;}async[_0x9cf832(0xe8)](_0xee1eaa){const _0x18e094=_0x9cf832,{unitId:_0xd74435}=_0xee1eaa,_0x29742b=_0xee1eaa[_0x18e094(0xda)],_0x3af91c={'memberId':this['_userService'][_0x18e094(0xde)]()[_0x18e094(0xa6)],'unitId':_0xd74435,'threadId':_0x29742b,'solved':_0xee1eaa[_0x18e094(0xe5)]?I[_0x18e094(0xba)]:I[_0x18e094(0xf4)]},_0x29ae6b=await this[_0x18e094(0xb8)][_0x18e094(0xac)](_0x18e094(0x101)+_0xd74435+'/solved',{'body':_0x3af91c});return!_0x29ae6b[_0x18e094(0xd5)][_0x18e094(0xa9)]||_0x29ae6b['body'][_0x18e094(0xa9)][_0x18e094(0xc8)]===0x1;}async['deleteComment'](_0x5d1d4a,_0x1b598c,_0x2d84d4,_0x4bf9a7){const _0x4c53ff=_0x9cf832,_0x4e3af8={'memberId':(await this[_0x4c53ff(0xd0)][_0x4c53ff(0xcd)](_0x5d1d4a))['getMemberID'](),'threadId':_0x2d84d4,'replyId':_0x4bf9a7,'unitId':_0x5d1d4a},_0x1f13b9=await this[_0x4c53ff(0xb8)]['post'](_0x4c53ff(0x101)+_0x5d1d4a+_0x4c53ff(0xb4),{'body':_0x4e3af8});return!_0x1f13b9[_0x4c53ff(0xd5)][_0x4c53ff(0xa9)]||_0x1f13b9[_0x4c53ff(0xd5)][_0x4c53ff(0xa9)][_0x4c53ff(0xc8)]===0x1;}async['listComments'](_0x19d652,_0x5a6e43,_0x463926){const _0x171732=_0x9cf832,_0x209ef8={'unitId':_0x19d652,'threadId':_0x463926},_0x3a4225=await this[_0x171732(0xb8)][_0x171732(0xac)]('/universer-api/comment/unit/'+_0x19d652+_0x171732(0xe3),{'body':_0x209ef8}),_0x1efe12=_0x463926[_0x171732(0xa7)](_0x324576=>ee(_0x3a4225[_0x171732(0xd5)][_0x171732(0xb0)][_0x324576],_0x19d652,_0x5a6e43))[_0x171732(0xcc)](Boolean);return Object[_0x171732(0xc0)](_0x3a4225[_0x171732(0xd5)]['users'])[_0x171732(0xf7)](_0xaf8059=>{const _0x399552=_0x171732;this[_0x399552(0xb2)][_0x399552(0xa4)](_0xaf8059);}),_0x1efe12;}[_0x9cf832(0xf6)](_0x5b8d2b){const _0x312c0a=_0x9cf832;return{'id':_0x5b8d2b['id'],'threadId':_0x5b8d2b[_0x312c0a(0xda)],'ref':_0x5b8d2b[_0x312c0a(0x105)]};}};f=Q([_(0x0,_0x2f174f(_0x1a1c91)),_(0x1,_0x2f174f(_0xe8fcb1)),_(0x2,_0x2f174f(_0x1c6622)),_(0x3,_0x2f174f(_0x27970a))],f);var re=Object[_0x9cf832(0xa8)],te=(_0xf8ff33,_0x56c733,_0x79fe51,_0x13f505)=>{for(var _0x5b5691=_0x13f505>0x1?void 0x0:_0x13f505?re(_0x56c733,_0x79fe51):_0x56c733,_0x4ff544=_0xf8ff33['length']-0x1,_0x1cc6d4;_0x4ff544>=0x0;_0x4ff544--)(_0x1cc6d4=_0xf8ff33[_0x4ff544])&&(_0x5b5691=_0x1cc6d4(_0x5b5691)||_0x5b5691);return _0x5b5691;},N=(_0x353cc4,_0xc74858)=>(_0x42f8e1,_0x495577)=>_0xc74858(_0x42f8e1,_0x495577,_0x353cc4);let g=class extends _0xd71482{constructor(_0x552596,_0x20fb93){const _0x5b3343=_0x9cf832;super(),this['_threadCommentDataSourceService']=_0x552596,this[_0x5b3343(0xc2)]=_0x20fb93,this[_0x5b3343(0xf2)]();}['_initDataSource'](){const _0x1c2436=_0x9cf832;this[_0x1c2436(0xfe)][_0x1c2436(0xe0)]=this[_0x1c2436(0xc2)],this[_0x1c2436(0xfe)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x412e5d),N(0x1,_0x2f174f(f))],g);var se=Object[_0x9cf832(0xec)],oe=Object[_0x9cf832(0xa8)],ne=(_0x2246e4,_0x20db14,_0x94feec)=>_0x20db14 in _0x2246e4?se(_0x2246e4,_0x20db14,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x94feec}):_0x2246e4[_0x20db14]=_0x94feec,ie=(_0x46194e,_0x2fe6c9,_0x169a73,_0xee9fa5)=>{for(var _0x30d07a=_0xee9fa5>0x1?void 0x0:_0xee9fa5?oe(_0x2fe6c9,_0x169a73):_0x2fe6c9,_0x4c9e3a=_0x46194e['length']-0x1,_0x4dd80e;_0x4c9e3a>=0x0;_0x4c9e3a--)(_0x4dd80e=_0x46194e[_0x4c9e3a])&&(_0x30d07a=_0x4dd80e(_0x30d07a)||_0x30d07a);return _0x30d07a;},w=(_0x1e0a4d,_0x40efec)=>(_0x1506ef,_0x4755c0)=>_0x40efec(_0x1506ef,_0x4755c0,_0x1e0a4d),$=(_0x3ff6db,_0x3da789,_0x26215b)=>ne(_0x3ff6db,typeof _0x3da789!=_0x9cf832(0xd7)?_0x3da789+'':_0x3da789,_0x26215b);let b=class extends _0x5527d6{constructor(_0x5000b5=M,_0x23d008,_0x54bb8b){const _0x4d33e8=_0x9cf832;super(),this[_0x4d33e8(0xf8)]=_0x5000b5,this[_0x4d33e8(0xf5)]=_0x23d008,this[_0x4d33e8(0xd8)]=_0x54bb8b;const {..._0x43ad84}=_0x42355d({},M,this[_0x4d33e8(0xf8)]);this[_0x4d33e8(0xd8)][_0x4d33e8(0xc4)](z,_0x43ad84);}[_0x9cf832(0xab)](){const _0x3cd1a2=_0x9cf832;[[f],[g],[S]][_0x3cd1a2(0xf7)](_0xbc4b2a=>{const _0xb4cedd=_0x3cd1a2;this[_0xb4cedd(0xf5)][_0xb4cedd(0xee)](_0xbc4b2a);});}[_0x9cf832(0xa2)](){const _0xd54bb6=_0x9cf832;this[_0xd54bb6(0xf5)][_0xd54bb6(0xb9)](g),this[_0xd54bb6(0xf5)][_0xd54bb6(0xb9)](S);}};$(b,_0x9cf832(0xaa),W),$(b,_0x9cf832(0xd6),_0x2a1993[_0x9cf832(0x104)]),b=ie([_0x215ab7(_0x1f6f25,_0x5befe3,_0x37b1f9),w(0x1,_0x2f174f(_0x27970a)),w(0x2,_0x1acffc)],b);function _0x51a8(){const _0x1ae353=['code','4697037rcVAuM','Delete','7369950IYEWOv','filter','requireSession','solved','_initUserSync','_sessionService','length','1110084bLQrge','parentId','root','body','type','symbol','_configService','parse','threadId','comment','/edit','Unknown','getCurrentUser','createTimestamp','dataSource','_threadCommentModel','172jgjqPa','/list','commentUpdate$','resolved','_commentService','find','resolveComment','46923HLrEsy','disposeWithMe','personId','defineProperty','user','add','Reply','updateComment','582445vfuzjI','_initDataSource','addComment','OpenOrReOpen','_injector','saveCommentToSnapshot','forEach','_config','unitId','/reply','replyId','content','Add','_threadCommentDataSourceService','UNRECOGNIZED','getUser','/universer-api/comment/unit/','2681ihyEeK','_init','UNIVER_UNKNOWN','ref','2692hqiMlW','userId','Solve','COMMENT','onReady','136bGfjmw','addUser','customRanges','userID','map','getOwnPropertyDescriptor','error','pluginName','onStarting','post','getUnit','delete','getMemberID','comments','18PnThkn','_userService','198BKCTRC','/delete','pipe','YYYY/MM/DD\x20HH:mm','reply','_httpService','get','Solved','replies','thread-comment-data-source.config','subscribe','/add','rangeId','values','rangeType','_threadCommentDataSource','format','setConfig','11176XIWmaD','users','Edit'];_0x51a8=function(){return _0x1ae353;};return _0x51a8();}export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x1a9525=_0x281e;(function(_0x29b3a3,_0x2d8e36){const _0x292153=_0x281e,_0x500b2b=_0x29b3a3();while(!![]){try{const _0x4e0f9e=-parseInt(_0x292153(0x150))/0x1*(-parseInt(_0x292153(0x152))/0x2)+parseInt(_0x292153(0x186))/0x3*(parseInt(_0x292153(0x149))/0x4)+-parseInt(_0x292153(0x15b))/0x5*(parseInt(_0x292153(0x191))/0x6)+parseInt(_0x292153(0x192))/0x7+-parseInt(_0x292153(0x14c))/0x8*(-parseInt(_0x292153(0x154))/0x9)+-parseInt(_0x292153(0x16b))/0xa*(parseInt(_0x292153(0x165))/0xb)+parseInt(_0x292153(0x188))/0xc*(-parseInt(_0x292153(0x160))/0xd);if(_0x4e0f9e===_0x2d8e36)break;else _0x500b2b['push'](_0x500b2b['shift']());}catch(_0x57215d){_0x500b2b['push'](_0x500b2b['shift']());}}}(_0x5a97,0x32e0f));import{CommentService as _0x40c369,CollaborationSessionService as _0xb5f0f6,UniverCollaborationClientPlugin as _0x156a54}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x44c437}from'@univerjs-pro/license';import{dayjs as _0x8d8ae0,UserManagerService as _0x3744cb,Inject as _0x22e7e9,Injector as _0x5645be,Disposable as _0x52e380,CustomRangeType as _0x3fa89b,UniverInstanceType as _0x5c86df,DependentOn as _0x3c4a67,IConfigService as _0x23818b,Plugin as _0x14760f,merge as _0x3fdcf6}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5d7089}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x94249b,IThreadCommentDataSourceService as _0x14199e}from'@univerjs/thread-comment';import{bufferTime as _0x3dfed0}from'rxjs';function _0x281e(_0x5d54cf,_0x37828b){const _0x5a97c4=_0x5a97();return _0x281e=function(_0x281e15,_0xaeb5d7){_0x281e15=_0x281e15-0x13f;let _0x375546=_0x5a97c4[_0x281e15];return _0x375546;},_0x281e(_0x5d54cf,_0x37828b);}import{HTTPService as _0x207092}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2854b3=>(_0x2854b3[_0x2854b3[_0x1a9525(0x157)]=0x0]=_0x1a9525(0x157),_0x2854b3[_0x2854b3[_0x1a9525(0x184)]=0x1]=_0x1a9525(0x184),_0x2854b3[_0x2854b3['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2854b3))(I||{}),v=(_0xa6053e=>(_0xa6053e[_0xa6053e[_0x1a9525(0x198)]=0x0]=_0x1a9525(0x198),_0xa6053e[_0xa6053e[_0x1a9525(0x13f)]=0x1]='Add',_0xa6053e[_0xa6053e['Reply']=0x2]=_0x1a9525(0x143),_0xa6053e[_0xa6053e[_0x1a9525(0x159)]=0x3]=_0x1a9525(0x159),_0xa6053e[_0xa6053e[_0x1a9525(0x190)]=0x4]=_0x1a9525(0x190),_0xa6053e[_0xa6053e[_0x1a9525(0x18f)]=0x5]=_0x1a9525(0x18f),_0xa6053e[_0xa6053e[_0x1a9525(0x17f)]=-0x1]=_0x1a9525(0x17f),_0xa6053e))(v||{});const D=_0x2f9ac0=>_0x8d8ae0(new Date(+_0x2f9ac0))[_0x1a9525(0x187)](_0x1a9525(0x17a)),B=async(_0x466682,_0x4ba6fc)=>{const _0x43f220=_0x1a9525,_0x451675=_0x466682[_0x43f220(0x167)](_0x3744cb),_0x16c8b0=_0x466682['get'](_0x207092);_0x4ba6fc['forEach'](_0x295762=>{const _0x57bd28=_0x43f220;_0x451675[_0x57bd28(0x140)](_0x295762)&&_0x4ba6fc[_0x57bd28(0x15c)](_0x295762);}),_0x4ba6fc[_0x43f220(0x1a8)]&&(await _0x16c8b0[_0x43f220(0x167)](_0x43f220(0x166),{'params':{'userIDs':[..._0x4ba6fc]}}))[_0x43f220(0x144)][_0x43f220(0x155)][_0x43f220(0x14d)](_0x34e0ea=>{const _0x2c12a1=_0x43f220;_0x34e0ea&&_0x451675[_0x2c12a1(0x175)](_0x34e0ea);});};var K=Object[_0x1a9525(0x151)],V=(_0x41501a,_0x359580,_0x2a9c4b,_0x3a0312)=>{const _0x158f61=_0x1a9525;for(var _0x30e415=_0x3a0312>0x1?void 0x0:_0x3a0312?K(_0x359580,_0x2a9c4b):_0x359580,_0x292757=_0x41501a[_0x158f61(0x16f)]-0x1,_0x2adb6d;_0x292757>=0x0;_0x292757--)(_0x2adb6d=_0x41501a[_0x292757])&&(_0x30e415=_0x2adb6d(_0x30e415)||_0x30e415);return _0x30e415;},p=(_0x29f0e2,_0x1e5c94)=>(_0x54c32f,_0x591cff)=>_0x1e5c94(_0x54c32f,_0x591cff,_0x29f0e2);let S=class extends _0x52e380{constructor(_0x9ae7ac,_0x52ac7a,_0x1fd2f4,_0x1a70e8){const _0x15073c=_0x1a9525;super(),this[_0x15073c(0x18c)]=_0x9ae7ac,this[_0x15073c(0x19a)]=_0x52ac7a,this[_0x15073c(0x179)]=_0x1fd2f4,this['_injector']=_0x1a70e8,this[_0x15073c(0x1ab)](),this[_0x15073c(0x195)]();}['_initUserSync'](){const _0x43b798=_0x1a9525;this[_0x43b798(0x1a5)](this[_0x43b798(0x19a)][_0x43b798(0x145)][_0x43b798(0x19c)](_0x3dfed0(0x10))['subscribe'](_0x565d36=>{const _0x5414a9=_0x43b798,_0x873893=new Set();_0x565d36[_0x5414a9(0x14d)](_0x452d1d=>{const _0x3b75af=_0x5414a9;switch(_0x452d1d[_0x3b75af(0x1a2)]){case'add':{const _0x246373=_0x452d1d[_0x3b75af(0x161)][_0x3b75af(0x181)];_0x873893[_0x3b75af(0x156)](_0x246373);break;}}}),B(this[_0x5414a9(0x15f)],_0x873893);}));}[_0x1a9525(0x1ab)](){const _0x50dd4e=_0x1a9525;this[_0x50dd4e(0x1a5)](this[_0x50dd4e(0x18c)][_0x50dd4e(0x145)][_0x50dd4e(0x176)](async _0xdfa244=>{const _0x433fcc=_0x50dd4e;var _0x3cd55e,_0x24f8b8,_0x5480fc,_0x4487f4;const _0x383e74=(_0x3cd55e=this[_0x433fcc(0x19a)][_0x433fcc(0x1a6)](_0xdfa244[_0x433fcc(0x158)])[_0x433fcc(0x1a7)](_0x55b7a3=>_0x55b7a3[_0x433fcc(0x142)]===_0xdfa244[_0x433fcc(0x142)]))==null?void 0x0:_0x3cd55e['root'];if(!_0x383e74)return;const {unitId:_0x385c67,subUnitId:_0x55b27a}=_0x383e74;switch(_0xdfa244[_0x433fcc(0x1a4)]&&this[_0x433fcc(0x179)][_0x433fcc(0x175)](_0xdfa244['user']),_0xdfa244[_0x433fcc(0x1a2)]){case v[_0x433fcc(0x13f)]:break;case v[_0x433fcc(0x143)]:{this[_0x433fcc(0x19a)][_0x433fcc(0x15a)](_0x385c67,_0x55b27a,{'unitId':_0x385c67,'subUnitId':_0x55b27a,'ref':'','id':_0xdfa244[_0x433fcc(0x162)],'dT':D(+_0xdfa244[_0x433fcc(0x153)]),'threadId':_0xdfa244['threadId'],'personId':(_0x5480fc=(_0x24f8b8=_0xdfa244[_0x433fcc(0x1a4)])==null?void 0x0:_0x24f8b8['userID'])!=null?_0x5480fc:_0xdfa244['userId'],'text':JSON[_0x433fcc(0x14a)](_0xdfa244[_0x433fcc(0x17c)]),'parentId':_0x383e74['id']});break;}case v[_0x433fcc(0x190)]:{const _0x3644f6=this[_0x433fcc(0x19a)][_0x433fcc(0x168)](_0x385c67,_0x55b27a,_0xdfa244[_0x433fcc(0x162)]);_0x3644f6&&_0x3644f6[_0x433fcc(0x18a)]&&this[_0x433fcc(0x19a)][_0x433fcc(0x1a1)](_0x385c67,_0x55b27a,_0xdfa244[_0x433fcc(0x162)]);break;}case v[_0x433fcc(0x159)]:{this[_0x433fcc(0x19a)]['updateComment'](_0x385c67,_0x55b27a,{'commentId':_0xdfa244[_0x433fcc(0x162)],'text':JSON[_0x433fcc(0x14a)](_0xdfa244[_0x433fcc(0x17c)])});break;}case v[_0x433fcc(0x18f)]:{const _0x4edcd5=(_0x4487f4=this['_threadCommentModel'][_0x433fcc(0x1a6)](_0xdfa244[_0x433fcc(0x158)])[_0x433fcc(0x1a7)](_0x31b569=>_0x31b569[_0x433fcc(0x142)]===_0xdfa244[_0x433fcc(0x142)]))==null?void 0x0:_0x4487f4['root'];_0x4edcd5&&this[_0x433fcc(0x19a)][_0x433fcc(0x14f)](_0x385c67,_0x55b27a,_0x4edcd5['id'],_0xdfa244[_0x433fcc(0x14e)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x22e7e9(_0x40c369)),p(0x1,_0x22e7e9(_0x94249b)),p(0x2,_0x22e7e9(_0x3744cb)),p(0x3,_0x22e7e9(_0x5645be))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x1a9525(0x151)],Q=(_0x415310,_0x5a4bd2,_0xe1fd49,_0x4f86c3)=>{const _0x33407d=_0x1a9525;for(var _0x5830e7=_0x4f86c3>0x1?void 0x0:_0x4f86c3?k(_0x5a4bd2,_0xe1fd49):_0x5a4bd2,_0x99997b=_0x415310[_0x33407d(0x16f)]-0x1,_0x5038eb;_0x99997b>=0x0;_0x99997b--)(_0x5038eb=_0x415310[_0x99997b])&&(_0x5830e7=_0x5038eb(_0x5830e7)||_0x5830e7);return _0x5830e7;},_=(_0x56b842,_0x531499)=>(_0x41b231,_0x5b228e)=>_0x531499(_0x41b231,_0x5b228e,_0x56b842);function X(_0x1dc29f,_0x55b3e8){const _0x283aea=_0x1a9525,_0x5ba95d=_0x1dc29f[_0x283aea(0x178)][0x0];return{..._0x55b3e8,'id':_0x5ba95d[_0x283aea(0x162)],'resolved':_0x1dc29f[_0x283aea(0x14e)]===0x1,'dT':D(_0x5ba95d[_0x283aea(0x153)]),'personId':_0x5ba95d[_0x283aea(0x163)],'threadId':_0x5ba95d[_0x283aea(0x142)]};}function ee(_0xf45a16,_0x380eb4,_0x556894){const _0x1f9b87=_0x1a9525;var _0x463bb7,_0x5908a9;if(((_0x5908a9=(_0x463bb7=_0xf45a16==null?void 0x0:_0xf45a16[_0x1f9b87(0x178)])==null?void 0x0:_0x463bb7[_0x1f9b87(0x16f)])!=null?_0x5908a9:0x0)>0x0){const _0x1be153=(_0x2f8038,_0x2fe42e)=>({'id':_0x2f8038[_0x1f9b87(0x162)],'threadId':_0x2f8038['threadId'],'dT':D(_0x2f8038['createTimestamp']),'personId':_0x2f8038[_0x1f9b87(0x163)],'resolved':_0xf45a16[_0x1f9b87(0x14e)]===I[_0x1f9b87(0x184)],'unitId':_0x380eb4,'subUnitId':_0x556894,'text':JSON[_0x1f9b87(0x14a)](_0x2f8038[_0x1f9b87(0x17c)]),'parentId':_0x2fe42e}),_0x15a128=_0x1be153(_0xf45a16[_0x1f9b87(0x178)][0x0]);return{..._0x15a128,'children':_0xf45a16[_0x1f9b87(0x178)][_0x1f9b87(0x17b)](0x1)[_0x1f9b87(0x185)](_0xb4aa20=>_0x1be153(_0xb4aa20,_0x15a128['id']))};}return null;}let f=class{constructor(_0x170bb6,_0x36beb0,_0x28ed81,_0x41427a){const _0x5d54ec=_0x1a9525;this[_0x5d54ec(0x173)]=_0x170bb6,this[_0x5d54ec(0x179)]=_0x36beb0,this[_0x5d54ec(0x17e)]=_0x28ed81,this[_0x5d54ec(0x15f)]=_0x41427a;}async[_0x1a9525(0x15a)](_0x170fb8){const _0x5eb96b=_0x1a9525;var _0x4c0deb,_0x3bcdf4;const {parentId:_0x484456,unitId:_0x3df598,text:_0x38a5a8,threadId:_0x53931a}=_0x170fb8,_0x304d2e=(_0x3bcdf4=(_0x4c0deb=_0x38a5a8[_0x5eb96b(0x17d)])==null?void 0x0:_0x4c0deb[_0x5eb96b(0x15d)](_0x392cf3=>_0x392cf3[_0x5eb96b(0x19d)]===_0x3fa89b[_0x5eb96b(0x15e)])[_0x5eb96b(0x185)](_0x149650=>_0x149650[_0x5eb96b(0x19b)]))!=null?_0x3bcdf4:[],_0x37b017=JSON[_0x5eb96b(0x164)](_0x38a5a8),_0x3fe66f=(await this[_0x5eb96b(0x17e)]['requireSession'](_0x3df598))['getMemberID']();if(_0x484456){const _0x4da751={'memberId':_0x3fe66f,'unitId':_0x3df598,'content':_0x37b017,'mention':_0x304d2e,'threadId':_0x53931a},_0x8dc241=(await this[_0x5eb96b(0x173)][_0x5eb96b(0x19e)]('/universer-api/comment/unit/'+_0x3df598+_0x5eb96b(0x171),{'body':_0x4da751}))[_0x5eb96b(0x144)][_0x5eb96b(0x1a0)];return{..._0x170fb8,'id':_0x8dc241[_0x5eb96b(0x162)],'dT':_0x8d8ae0(+_0x8dc241['createTimestamp'])[_0x5eb96b(0x187)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x8dc241[_0x5eb96b(0x163)]};}else{const _0xd0b960={'memberId':_0x3fe66f,'unitId':_0x3df598,'content':_0x37b017,'mention':_0x304d2e},_0x5b586c=await this['_httpService'][_0x5eb96b(0x19e)]('/universer-api/comment/unit/'+_0x3df598+_0x5eb96b(0x147),{'body':_0xd0b960});return X(_0x5b586c['body'][_0x5eb96b(0x1a3)],_0x170fb8);}}async[_0x1a9525(0x18e)](_0x147bb9){const _0x16c9a1=_0x1a9525;var _0x2f7eca,_0xd942d6;const {text:_0x39bce1,unitId:_0x5c0973}=_0x147bb9,_0x1a0660=(_0xd942d6=(_0x2f7eca=_0x39bce1['customRanges'])==null?void 0x0:_0x2f7eca[_0x16c9a1(0x15d)](_0x43eff0=>_0x43eff0['rangeType']===_0x3fa89b[_0x16c9a1(0x15e)])[_0x16c9a1(0x185)](_0x2f20cb=>_0x2f20cb[_0x16c9a1(0x19b)]))!=null?_0xd942d6:[],_0x37828c=JSON['stringify'](_0x39bce1),_0x443d5e=_0x147bb9['threadId'],_0x4dd1d1=_0x147bb9['id'],_0x5c4fe1={'memberId':(await this['_sessionService'][_0x16c9a1(0x193)](_0x5c0973))[_0x16c9a1(0x183)](),'unitId':_0x5c0973,'threadId':_0x443d5e,'mention':_0x1a0660,'content':_0x37828c,'replyId':_0x4dd1d1},_0x49e4a8=await this[_0x16c9a1(0x173)][_0x16c9a1(0x19e)]('/universer-api/comment/unit/'+_0x5c0973+_0x16c9a1(0x194),{'body':_0x5c4fe1});return!_0x49e4a8[_0x16c9a1(0x144)]['error']||_0x49e4a8['body']['error'][_0x16c9a1(0x196)]===0x1;}async['resolveComment'](_0x223bdd){const _0x2d163a=_0x1a9525,{unitId:_0x659991}=_0x223bdd,_0x20c221=_0x223bdd[_0x2d163a(0x142)],_0x43ba23={'memberId':this['_userService'][_0x2d163a(0x1a9)]()[_0x2d163a(0x182)],'unitId':_0x659991,'threadId':_0x20c221,'solved':_0x223bdd[_0x2d163a(0x1aa)]?I[_0x2d163a(0x184)]:I[_0x2d163a(0x157)]},_0x3e663d=await this[_0x2d163a(0x173)][_0x2d163a(0x19e)](_0x2d163a(0x16a)+_0x659991+'/solved',{'body':_0x43ba23});return!_0x3e663d[_0x2d163a(0x144)]['error']||_0x3e663d['body']['error'][_0x2d163a(0x196)]===0x1;}async['deleteComment'](_0x31c426,_0x109a50,_0x5221d3,_0x54f231){const _0x1163cc=_0x1a9525,_0x4f28d4={'memberId':(await this[_0x1163cc(0x17e)][_0x1163cc(0x193)](_0x31c426))[_0x1163cc(0x183)](),'threadId':_0x5221d3,'replyId':_0x54f231,'unitId':_0x31c426},_0x4ec5f4=await this[_0x1163cc(0x173)][_0x1163cc(0x19e)]('/universer-api/comment/unit/'+_0x31c426+'/delete',{'body':_0x4f28d4});return!_0x4ec5f4[_0x1163cc(0x144)][_0x1163cc(0x16c)]||_0x4ec5f4['body'][_0x1163cc(0x16c)][_0x1163cc(0x196)]===0x1;}async[_0x1a9525(0x18b)](_0x2c8eb7,_0x15bdd5,_0x2516e5){const _0x3b03d9=_0x1a9525,_0x287236={'unitId':_0x2c8eb7,'threadId':_0x2516e5},_0x4d9369=await this[_0x3b03d9(0x173)]['post'](_0x3b03d9(0x16a)+_0x2c8eb7+_0x3b03d9(0x172),{'body':_0x287236}),_0x2a38fd=_0x2516e5[_0x3b03d9(0x185)](_0x22e9f5=>ee(_0x4d9369[_0x3b03d9(0x144)][_0x3b03d9(0x169)][_0x22e9f5],_0x2c8eb7,_0x15bdd5))[_0x3b03d9(0x15d)](Boolean);return Object[_0x3b03d9(0x174)](_0x4d9369[_0x3b03d9(0x144)]['users'])[_0x3b03d9(0x14d)](_0x23253f=>{const _0x472c18=_0x3b03d9;this[_0x472c18(0x179)][_0x472c18(0x175)](_0x23253f);}),_0x2a38fd;}[_0x1a9525(0x16d)](_0x25fdeb){const _0xfeeeb2=_0x1a9525;return{'id':_0x25fdeb['id'],'threadId':_0x25fdeb[_0xfeeeb2(0x142)],'ref':_0x25fdeb[_0xfeeeb2(0x141)]};}};f=Q([_(0x0,_0x22e7e9(_0x207092)),_(0x1,_0x22e7e9(_0x3744cb)),_(0x2,_0x22e7e9(_0xb5f0f6)),_(0x3,_0x22e7e9(_0x5645be))],f);var re=Object[_0x1a9525(0x151)],te=(_0x1b5106,_0x165841,_0x58a085,_0x1c1e4a)=>{const _0x289f95=_0x1a9525;for(var _0x59ce3c=_0x1c1e4a>0x1?void 0x0:_0x1c1e4a?re(_0x165841,_0x58a085):_0x165841,_0x26c42e=_0x1b5106[_0x289f95(0x16f)]-0x1,_0x3adca6;_0x26c42e>=0x0;_0x26c42e--)(_0x3adca6=_0x1b5106[_0x26c42e])&&(_0x59ce3c=_0x3adca6(_0x59ce3c)||_0x59ce3c);return _0x59ce3c;},N=(_0x44988c,_0x577d11)=>(_0x1886a8,_0x20115d)=>_0x577d11(_0x1886a8,_0x20115d,_0x44988c);let g=class extends _0x52e380{constructor(_0x44cee3,_0x1d1169){const _0x487315=_0x1a9525;super(),this['_threadCommentDataSourceService']=_0x44cee3,this[_0x487315(0x197)]=_0x1d1169,this[_0x487315(0x19f)]();}[_0x1a9525(0x19f)](){const _0x1c2763=_0x1a9525;this[_0x1c2763(0x148)]['dataSource']=this[_0x1c2763(0x197)],this[_0x1c2763(0x148)]['syncUpdateMutationToColla']=!0x1;}};function _0x5a97(){const _0x388fcc=['/reply','/list','_httpService','values','addUser','subscribe','onStarting','replies','_userService','YYYY/MM/DD\x20HH:mm','slice','content','customRanges','_sessionService','UNRECOGNIZED','onReady','personId','userID','getMemberID','Solved','map','30dqSJtM','format','12ZUlxxC','_configService','parentId','listComments','_commentService','defineProperty','updateComment','Solve','Delete','84594QkklsI','415359pfXLZg','requireSession','/edit','_initUserSync','code','_threadCommentDataSource','Unknown','UNIVER_UNKNOWN','_threadCommentModel','rangeId','pipe','rangeType','post','_initDataSource','reply','deleteComment','type','comment','user','disposeWithMe','getUnit','find','size','getCurrentUser','resolved','_init','Add','getUser','ref','threadId','Reply','body','commentUpdate$','pluginName','/add','_threadCommentDataSourceService','42848KIIVhZ','parse','symbol','93016LpNQPu','forEach','solved','resolveComment','3GLkCms','getOwnPropertyDescriptor','83724tyetAg','createTimestamp','198hsLCgw','users','add','OpenOrReOpen','unitId','Edit','addComment','5uJGKoi','delete','filter','COMMENT','_injector','1666262hyvytS','payload','replyId','userId','stringify','46145XMJNCM','/universer-api/user/list','get','getComment','comments','/universer-api/comment/unit/','470RkjJYY','error','saveCommentToSnapshot','_config','length','setConfig'];_0x5a97=function(){return _0x388fcc;};return _0x5a97();}g=te([N(0x0,_0x14199e),N(0x1,_0x22e7e9(f))],g);var se=Object[_0x1a9525(0x18d)],oe=Object[_0x1a9525(0x151)],ne=(_0xe30eee,_0x4ea96f,_0x59f59f)=>_0x4ea96f in _0xe30eee?se(_0xe30eee,_0x4ea96f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x59f59f}):_0xe30eee[_0x4ea96f]=_0x59f59f,ie=(_0x5bdcb7,_0x3ce996,_0x1266c5,_0x13d61c)=>{for(var _0x5507c9=_0x13d61c>0x1?void 0x0:_0x13d61c?oe(_0x3ce996,_0x1266c5):_0x3ce996,_0x5a7208=_0x5bdcb7['length']-0x1,_0x459d35;_0x5a7208>=0x0;_0x5a7208--)(_0x459d35=_0x5bdcb7[_0x5a7208])&&(_0x5507c9=_0x459d35(_0x5507c9)||_0x5507c9);return _0x5507c9;},w=(_0x55efcf,_0x5cd973)=>(_0x378872,_0x44783b)=>_0x5cd973(_0x378872,_0x44783b,_0x55efcf),$=(_0x1dc2ff,_0xee071e,_0x4524eb)=>ne(_0x1dc2ff,typeof _0xee071e!=_0x1a9525(0x14b)?_0xee071e+'':_0xee071e,_0x4524eb);let b=class extends _0x14760f{constructor(_0x686d3f=M,_0x3e7257,_0x4dc320){const _0x3714ad=_0x1a9525;super(),this[_0x3714ad(0x16e)]=_0x686d3f,this[_0x3714ad(0x15f)]=_0x3e7257,this[_0x3714ad(0x189)]=_0x4dc320;const {..._0x12bc84}=_0x3fdcf6({},M,this[_0x3714ad(0x16e)]);this[_0x3714ad(0x189)][_0x3714ad(0x170)](z,_0x12bc84);}[_0x1a9525(0x177)](){const _0x4828e3=_0x1a9525;[[f],[g],[S]][_0x4828e3(0x14d)](_0x5416d7=>{const _0x1f6d7b=_0x4828e3;this[_0x1f6d7b(0x15f)][_0x1f6d7b(0x156)](_0x5416d7);});}[_0x1a9525(0x180)](){const _0x60ccf5=_0x1a9525;this['_injector'][_0x60ccf5(0x167)](g),this[_0x60ccf5(0x15f)]['get'](S);}};$(b,_0x1a9525(0x146),W),$(b,_0x1a9525(0x1a2),_0x5c86df[_0x1a9525(0x199)]),b=ie([_0x3c4a67(_0x5d7089,_0x156a54,_0x44c437),w(0x1,_0x22e7e9(_0x5645be)),w(0x2,_0x23818b)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x399842,_0x678b65){const _0x349275=_0x48db,_0xa9a1bb=_0x399842();while(!![]){try{const _0x39f9f7=-parseInt(_0x349275(0x16c))/0x1*(-parseInt(_0x349275(0x1b3))/0x2)+-parseInt(_0x349275(0x190))/0x3+-parseInt(_0x349275(0x19a))/0x4*(parseInt(_0x349275(0x1a9))/0x5)+parseInt(_0x349275(0x177))/0x6*(parseInt(_0x349275(0x15c))/0x7)+parseInt(_0x349275(0x18b))/0x8+parseInt(_0x349275(0x12d))/0x9+parseInt(_0x349275(0x141))/0xa*(-parseInt(_0x349275(0x1ad))/0xb);if(_0x39f9f7===_0x678b65)break;else _0xa9a1bb['push'](_0xa9a1bb['shift']());}catch(_0x3cf7b5){_0xa9a1bb['push'](_0xa9a1bb['shift']());}}}(_0x55dd,0x9bf2f),function(_0x54cc7a,_0x3ff013){const _0x552634=_0x48db;typeof exports==_0x552634(0x156)&&typeof module<'u'?_0x3ff013(exports,require(_0x552634(0x1a6)),require('@univerjs-pro/license'),require(_0x552634(0x185)),require(_0x552634(0x163)),require(_0x552634(0x133)),require(_0x552634(0x1ae)),require('@univerjs/network')):typeof define==_0x552634(0x158)&&define['amd']?define([_0x552634(0x1b9),_0x552634(0x1a6),_0x552634(0x140),'@univerjs/core','@univerjs/thread-comment-ui',_0x552634(0x133),_0x552634(0x1ae),_0x552634(0x169)],_0x3ff013):(_0x54cc7a=typeof globalThis<'u'?globalThis:_0x54cc7a||self,_0x3ff013(_0x54cc7a[_0x552634(0x155)]={},_0x54cc7a[_0x552634(0x18c)],_0x54cc7a[_0x552634(0x171)],_0x54cc7a[_0x552634(0x191)],_0x54cc7a[_0x552634(0x17e)],_0x54cc7a[_0x552634(0x166)],_0x54cc7a[_0x552634(0x1ae)],_0x54cc7a['UniverNetwork']));}(this,function(_0x2fd347,_0x23a190,_0x450f12,_0x31b5ed,_0x1cf185,_0x4be181,_0x5ea329,_0x1acb3){'use strict';const _0x3c1854=_0x48db;const _0x5f4667=_0x3c1854(0x152);var _0x58a685=(_0x2c42da=>(_0x2c42da[_0x2c42da[_0x3c1854(0x12b)]=0x0]=_0x3c1854(0x12b),_0x2c42da[_0x2c42da[_0x3c1854(0x170)]=0x1]=_0x3c1854(0x170),_0x2c42da[_0x2c42da[_0x3c1854(0x149)]=-0x1]=_0x3c1854(0x149),_0x2c42da))(_0x58a685||{}),_0x303ad1=(_0x125df2=>(_0x125df2[_0x125df2[_0x3c1854(0x159)]=0x0]='Unknown',_0x125df2[_0x125df2[_0x3c1854(0x1a7)]=0x1]='Add',_0x125df2[_0x125df2['Reply']=0x2]=_0x3c1854(0x1b7),_0x125df2[_0x125df2[_0x3c1854(0x178)]=0x3]=_0x3c1854(0x178),_0x125df2[_0x125df2[_0x3c1854(0x184)]=0x4]=_0x3c1854(0x184),_0x125df2[_0x125df2[_0x3c1854(0x196)]=0x5]=_0x3c1854(0x196),_0x125df2[_0x125df2[_0x3c1854(0x149)]=-0x1]=_0x3c1854(0x149),_0x125df2))(_0x303ad1||{});const _0x14753e=_0x1184d1=>_0x31b5ed[_0x3c1854(0x161)](new Date(+_0x1184d1))[_0x3c1854(0x18d)](_0x3c1854(0x13c)),_0x5472eb=async(_0x5db649,_0x303d49)=>{const _0x3a1594=_0x3c1854,_0x510118=_0x5db649[_0x3a1594(0x15a)](_0x31b5ed[_0x3a1594(0x135)]),_0x45836c=_0x5db649[_0x3a1594(0x15a)](_0x1acb3[_0x3a1594(0x15b)]);_0x303d49['forEach'](_0x569e18=>{const _0xa620f8=_0x3a1594;_0x510118[_0xa620f8(0x147)](_0x569e18)&&_0x303d49[_0xa620f8(0x19f)](_0x569e18);}),_0x303d49['size']&&(await _0x45836c[_0x3a1594(0x15a)](_0x3a1594(0x16b),{'params':{'userIDs':[..._0x303d49]}}))[_0x3a1594(0x197)][_0x3a1594(0x1b8)][_0x3a1594(0x16f)](_0x4d2760=>{_0x4d2760&&_0x510118['addUser'](_0x4d2760);});};var _0x343e00=Object[_0x3c1854(0x148)],_0x24381b=(_0x182179,_0x3d1fc8,_0x5b731f,_0x32286e)=>{const _0x36983b=_0x3c1854;for(var _0x9ba9b8=_0x32286e>0x1?void 0x0:_0x32286e?_0x343e00(_0x3d1fc8,_0x5b731f):_0x3d1fc8,_0x211770=_0x182179[_0x36983b(0x13a)]-0x1,_0x2a691c;_0x211770>=0x0;_0x211770--)(_0x2a691c=_0x182179[_0x211770])&&(_0x9ba9b8=_0x2a691c(_0x9ba9b8)||_0x9ba9b8);return _0x9ba9b8;},_0x2c86d3=(_0x2b85aa,_0x4e3fd2)=>(_0x424968,_0x337e1c)=>_0x4e3fd2(_0x424968,_0x337e1c,_0x2b85aa);let _0x39bcf5=class extends _0x31b5ed['Disposable']{constructor(_0x217376,_0x26996a,_0x46e95c,_0x8a353c){const _0x3510b0=_0x3c1854;super(),this[_0x3510b0(0x199)]=_0x217376,this[_0x3510b0(0x1b2)]=_0x26996a,this[_0x3510b0(0x168)]=_0x46e95c,this[_0x3510b0(0x189)]=_0x8a353c,this[_0x3510b0(0x130)](),this[_0x3510b0(0x145)]();}[_0x3c1854(0x145)](){const _0x425e60=_0x3c1854;this[_0x425e60(0x17d)](this[_0x425e60(0x1b2)][_0x425e60(0x176)][_0x425e60(0x18e)](_0x5ea329[_0x425e60(0x192)](0x10))[_0x425e60(0x1b1)](_0x3ef80a=>{const _0x42ab36=_0x425e60,_0x5eb31e=new Set();_0x3ef80a[_0x42ab36(0x16f)](_0x3b829e=>{const _0xdd7dd4=_0x42ab36;switch(_0x3b829e[_0xdd7dd4(0x134)]){case _0xdd7dd4(0x12e):{const _0x5f3ac8=_0x3b829e[_0xdd7dd4(0x17b)][_0xdd7dd4(0x14e)];_0x5eb31e[_0xdd7dd4(0x12e)](_0x5f3ac8);break;}}}),_0x5472eb(this[_0x42ab36(0x189)],_0x5eb31e);}));}[_0x3c1854(0x130)](){const _0x2e320a=_0x3c1854;this[_0x2e320a(0x17d)](this[_0x2e320a(0x199)][_0x2e320a(0x176)][_0x2e320a(0x1b1)](async _0x2fd2f7=>{const _0x4c60dd=_0x2e320a;var _0x2da656,_0x91ef1b,_0x247494,_0x5d2257;const _0x1608c6=(_0x2da656=this['_threadCommentModel'][_0x4c60dd(0x19d)](_0x2fd2f7[_0x4c60dd(0x17c)])['find'](_0x508dcf=>_0x508dcf['threadId']===_0x2fd2f7['threadId']))==null?void 0x0:_0x2da656[_0x4c60dd(0x146)];if(!_0x1608c6)return;const {unitId:_0xbe1311,subUnitId:_0x13b6c}=_0x1608c6;switch(_0x2fd2f7[_0x4c60dd(0x188)]&&this['_userService']['addUser'](_0x2fd2f7['user']),_0x2fd2f7[_0x4c60dd(0x134)]){case _0x303ad1[_0x4c60dd(0x1a7)]:break;case _0x303ad1[_0x4c60dd(0x1b7)]:{this[_0x4c60dd(0x1b2)][_0x4c60dd(0x16a)](_0xbe1311,_0x13b6c,{'unitId':_0xbe1311,'subUnitId':_0x13b6c,'ref':'','id':_0x2fd2f7[_0x4c60dd(0x162)],'dT':_0x14753e(+_0x2fd2f7[_0x4c60dd(0x19b)]),'threadId':_0x2fd2f7[_0x4c60dd(0x1a4)],'personId':(_0x247494=(_0x91ef1b=_0x2fd2f7['user'])==null?void 0x0:_0x91ef1b['userID'])!=null?_0x247494:_0x2fd2f7['userId'],'text':JSON[_0x4c60dd(0x15f)](_0x2fd2f7[_0x4c60dd(0x137)]),'parentId':_0x1608c6['id']});break;}case _0x303ad1[_0x4c60dd(0x184)]:{const _0x5530c9=this[_0x4c60dd(0x1b2)][_0x4c60dd(0x19c)](_0xbe1311,_0x13b6c,_0x2fd2f7['replyId']);_0x5530c9&&_0x5530c9[_0x4c60dd(0x160)]&&this[_0x4c60dd(0x1b2)][_0x4c60dd(0x1a0)](_0xbe1311,_0x13b6c,_0x2fd2f7[_0x4c60dd(0x162)]);break;}case _0x303ad1[_0x4c60dd(0x178)]:{this[_0x4c60dd(0x1b2)]['updateComment'](_0xbe1311,_0x13b6c,{'commentId':_0x2fd2f7[_0x4c60dd(0x162)],'text':JSON['parse'](_0x2fd2f7[_0x4c60dd(0x137)])});break;}case _0x303ad1[_0x4c60dd(0x196)]:{const _0x124bb7=(_0x5d2257=this[_0x4c60dd(0x1b2)][_0x4c60dd(0x19d)](_0x2fd2f7[_0x4c60dd(0x17c)])[_0x4c60dd(0x173)](_0x72b413=>_0x72b413['threadId']===_0x2fd2f7[_0x4c60dd(0x1a4)]))==null?void 0x0:_0x5d2257[_0x4c60dd(0x146)];_0x124bb7&&this[_0x4c60dd(0x1b2)]['resolveComment'](_0xbe1311,_0x13b6c,_0x124bb7['id'],_0x2fd2f7[_0x4c60dd(0x14b)]===_0x58a685[_0x4c60dd(0x170)]);break;}}}));}};_0x39bcf5=_0x24381b([_0x2c86d3(0x0,_0x31b5ed[_0x3c1854(0x12c)](_0x23a190[_0x3c1854(0x13f)])),_0x2c86d3(0x1,_0x31b5ed[_0x3c1854(0x12c)](_0x4be181[_0x3c1854(0x13b)])),_0x2c86d3(0x2,_0x31b5ed[_0x3c1854(0x12c)](_0x31b5ed['UserManagerService'])),_0x2c86d3(0x3,_0x31b5ed[_0x3c1854(0x12c)](_0x31b5ed['Injector']))],_0x39bcf5);const _0x4181c5=_0x3c1854(0x172),_0x1e063c={};var _0x4a23e3=Object[_0x3c1854(0x148)],_0x1d0e4b=(_0x81d9b5,_0x436413,_0x55ca19,_0x25fe95)=>{const _0x24bc8d=_0x3c1854;for(var _0x534a61=_0x25fe95>0x1?void 0x0:_0x25fe95?_0x4a23e3(_0x436413,_0x55ca19):_0x436413,_0x3a03a8=_0x81d9b5[_0x24bc8d(0x13a)]-0x1,_0x145c8a;_0x3a03a8>=0x0;_0x3a03a8--)(_0x145c8a=_0x81d9b5[_0x3a03a8])&&(_0x534a61=_0x145c8a(_0x534a61)||_0x534a61);return _0x534a61;},_0x26aded=(_0x2d7910,_0x5ae583)=>(_0x585d56,_0x5c12bc)=>_0x5ae583(_0x585d56,_0x5c12bc,_0x2d7910);function _0x438791(_0x59c7d3,_0x9897fc){const _0x2445f5=_0x3c1854,_0x3ef798=_0x59c7d3[_0x2445f5(0x139)][0x0];return{..._0x9897fc,'id':_0x3ef798[_0x2445f5(0x162)],'resolved':_0x59c7d3['solved']===0x1,'dT':_0x14753e(_0x3ef798[_0x2445f5(0x19b)]),'personId':_0x3ef798[_0x2445f5(0x186)],'threadId':_0x3ef798[_0x2445f5(0x1a4)]};}function _0x28440b(_0x4953c1,_0x5163f9,_0x3d8607){const _0x21476=_0x3c1854;var _0x1ac6e9,_0x4e6b60;if(((_0x4e6b60=(_0x1ac6e9=_0x4953c1==null?void 0x0:_0x4953c1['replies'])==null?void 0x0:_0x1ac6e9[_0x21476(0x13a)])!=null?_0x4e6b60:0x0)>0x0){const _0x50ad0b=(_0x4ea1ab,_0x474187)=>({'id':_0x4ea1ab[_0x21476(0x162)],'threadId':_0x4ea1ab['threadId'],'dT':_0x14753e(_0x4ea1ab[_0x21476(0x19b)]),'personId':_0x4ea1ab[_0x21476(0x186)],'resolved':_0x4953c1['solved']===_0x58a685[_0x21476(0x170)],'unitId':_0x5163f9,'subUnitId':_0x3d8607,'text':JSON[_0x21476(0x15f)](_0x4ea1ab[_0x21476(0x137)]),'parentId':_0x474187}),_0x5b06cd=_0x50ad0b(_0x4953c1[_0x21476(0x139)][0x0]);return{..._0x5b06cd,'children':_0x4953c1[_0x21476(0x139)][_0x21476(0x1a5)](0x1)[_0x21476(0x182)](_0x2bbb49=>_0x50ad0b(_0x2bbb49,_0x5b06cd['id']))};}return null;}let _0x35de67=class{constructor(_0x59b516,_0x499013,_0x4563ea,_0x25e3c9){const _0x47594e=_0x3c1854;this['_httpService']=_0x59b516,this[_0x47594e(0x168)]=_0x499013,this['_sessionService']=_0x4563ea,this[_0x47594e(0x189)]=_0x25e3c9;}async[_0x3c1854(0x16a)](_0x5c085e){const _0xa79f1a=_0x3c1854;var _0x2d64e8,_0x3f1da8;const {parentId:_0x1c2317,unitId:_0x2cdcdd,text:_0x5744b2,threadId:_0x149cab}=_0x5c085e,_0x3129f4=(_0x3f1da8=(_0x2d64e8=_0x5744b2[_0xa79f1a(0x175)])==null?void 0x0:_0x2d64e8[_0xa79f1a(0x15e)](_0x57aaaf=>_0x57aaaf['rangeType']===_0x31b5ed[_0xa79f1a(0x14f)]['COMMENT'])[_0xa79f1a(0x182)](_0x3f3b6d=>_0x3f3b6d[_0xa79f1a(0x19e)]))!=null?_0x3f1da8:[],_0x181d9c=JSON[_0xa79f1a(0x16e)](_0x5744b2),_0x27d9cf=(await this[_0xa79f1a(0x165)][_0xa79f1a(0x183)](_0x2cdcdd))[_0xa79f1a(0x142)]();if(_0x1c2317){const _0x453bc8={'memberId':_0x27d9cf,'unitId':_0x2cdcdd,'content':_0x181d9c,'mention':_0x3129f4,'threadId':_0x149cab},_0x3c5dc6=(await this['_httpService'][_0xa79f1a(0x14d)]('/universer-api/comment/unit/'+_0x2cdcdd+_0xa79f1a(0x14c),{'body':_0x453bc8}))[_0xa79f1a(0x197)][_0xa79f1a(0x1a2)];return{..._0x5c085e,'id':_0x3c5dc6[_0xa79f1a(0x162)],'dT':_0x31b5ed[_0xa79f1a(0x161)](+_0x3c5dc6[_0xa79f1a(0x19b)])[_0xa79f1a(0x18d)](_0xa79f1a(0x13c)),'personId':_0x3c5dc6[_0xa79f1a(0x186)]};}else{const _0x45a774={'memberId':_0x27d9cf,'unitId':_0x2cdcdd,'content':_0x181d9c,'mention':_0x3129f4},_0x229231=await this[_0xa79f1a(0x167)][_0xa79f1a(0x14d)](_0xa79f1a(0x154)+_0x2cdcdd+_0xa79f1a(0x1a3),{'body':_0x45a774});return _0x438791(_0x229231[_0xa79f1a(0x197)][_0xa79f1a(0x15d)],_0x5c085e);}}async['updateComment'](_0x48bd5b){const _0x3971bf=_0x3c1854;var _0x2d47a0,_0x182aa6;const {text:_0x3c6cbb,unitId:_0xfa845c}=_0x48bd5b,_0x416bc6=(_0x182aa6=(_0x2d47a0=_0x3c6cbb[_0x3971bf(0x175)])==null?void 0x0:_0x2d47a0['filter'](_0x8c26ca=>_0x8c26ca[_0x3971bf(0x198)]===_0x31b5ed[_0x3971bf(0x14f)][_0x3971bf(0x17a)])[_0x3971bf(0x182)](_0x198d9f=>_0x198d9f['rangeId']))!=null?_0x182aa6:[],_0x59d1b2=JSON[_0x3971bf(0x16e)](_0x3c6cbb),_0x283b84=_0x48bd5b['threadId'],_0x38e2a8=_0x48bd5b['id'],_0x2987b3={'memberId':(await this[_0x3971bf(0x165)][_0x3971bf(0x183)](_0xfa845c))[_0x3971bf(0x142)](),'unitId':_0xfa845c,'threadId':_0x283b84,'mention':_0x416bc6,'content':_0x59d1b2,'replyId':_0x38e2a8},_0x51bb2a=await this['_httpService']['post'](_0x3971bf(0x154)+_0xfa845c+_0x3971bf(0x1a1),{'body':_0x2987b3});return!_0x51bb2a[_0x3971bf(0x197)][_0x3971bf(0x13d)]||_0x51bb2a['body'][_0x3971bf(0x13d)][_0x3971bf(0x143)]===0x1;}async[_0x3c1854(0x138)](_0x3fd858){const _0x5c62ce=_0x3c1854,{unitId:_0x444221}=_0x3fd858,_0x1b51fd=_0x3fd858[_0x5c62ce(0x1a4)],_0x3a0f40={'memberId':this['_userService'][_0x5c62ce(0x151)]()[_0x5c62ce(0x1b5)],'unitId':_0x444221,'threadId':_0x1b51fd,'solved':_0x3fd858[_0x5c62ce(0x1af)]?_0x58a685[_0x5c62ce(0x170)]:_0x58a685[_0x5c62ce(0x12b)]},_0x5251bb=await this[_0x5c62ce(0x167)][_0x5c62ce(0x14d)](_0x5c62ce(0x154)+_0x444221+_0x5c62ce(0x136),{'body':_0x3a0f40});return!_0x5251bb[_0x5c62ce(0x197)][_0x5c62ce(0x13d)]||_0x5251bb[_0x5c62ce(0x197)][_0x5c62ce(0x13d)][_0x5c62ce(0x143)]===0x1;}async['deleteComment'](_0x187ca5,_0xd4397b,_0x427a5e,_0x2f2f44){const _0x1ae570=_0x3c1854,_0x47f304={'memberId':(await this[_0x1ae570(0x165)][_0x1ae570(0x183)](_0x187ca5))[_0x1ae570(0x142)](),'threadId':_0x427a5e,'replyId':_0x2f2f44,'unitId':_0x187ca5},_0x3320f6=await this[_0x1ae570(0x167)][_0x1ae570(0x14d)](_0x1ae570(0x154)+_0x187ca5+_0x1ae570(0x193),{'body':_0x47f304});return!_0x3320f6['body'][_0x1ae570(0x13d)]||_0x3320f6[_0x1ae570(0x197)][_0x1ae570(0x13d)][_0x1ae570(0x143)]===0x1;}async[_0x3c1854(0x194)](_0x544894,_0xa6d5b4,_0x174bdb){const _0x1d8e56=_0x3c1854,_0x1a45a0={'unitId':_0x544894,'threadId':_0x174bdb},_0x2fe925=await this[_0x1d8e56(0x167)][_0x1d8e56(0x14d)]('/universer-api/comment/unit/'+_0x544894+_0x1d8e56(0x180),{'body':_0x1a45a0}),_0x4aa752=_0x174bdb[_0x1d8e56(0x182)](_0x118adb=>_0x28440b(_0x2fe925['body'][_0x1d8e56(0x132)][_0x118adb],_0x544894,_0xa6d5b4))['filter'](Boolean);return Object[_0x1d8e56(0x150)](_0x2fe925['body'][_0x1d8e56(0x1b8)])['forEach'](_0x841bce=>{const _0x17d0ea=_0x1d8e56;this[_0x17d0ea(0x168)][_0x17d0ea(0x195)](_0x841bce);}),_0x4aa752;}[_0x3c1854(0x1ba)](_0xfacb39){const _0x21eee2=_0x3c1854;return{'id':_0xfacb39['id'],'threadId':_0xfacb39[_0x21eee2(0x1a4)],'ref':_0xfacb39[_0x21eee2(0x179)]};}};_0x35de67=_0x1d0e4b([_0x26aded(0x0,_0x31b5ed[_0x3c1854(0x12c)](_0x1acb3[_0x3c1854(0x15b)])),_0x26aded(0x1,_0x31b5ed[_0x3c1854(0x12c)](_0x31b5ed[_0x3c1854(0x135)])),_0x26aded(0x2,_0x31b5ed[_0x3c1854(0x12c)](_0x23a190[_0x3c1854(0x1aa)])),_0x26aded(0x3,_0x31b5ed[_0x3c1854(0x12c)](_0x31b5ed[_0x3c1854(0x13e)]))],_0x35de67);var _0x204296=Object['getOwnPropertyDescriptor'],_0x5ad891=(_0x184abf,_0x288700,_0x222bb5,_0x3752c7)=>{const _0x4d11cb=_0x3c1854;for(var _0x4af454=_0x3752c7>0x1?void 0x0:_0x3752c7?_0x204296(_0x288700,_0x222bb5):_0x288700,_0x59d982=_0x184abf[_0x4d11cb(0x13a)]-0x1,_0x299281;_0x59d982>=0x0;_0x59d982--)(_0x299281=_0x184abf[_0x59d982])&&(_0x4af454=_0x299281(_0x4af454)||_0x4af454);return _0x4af454;},_0x313e1f=(_0x239ec1,_0x1884e2)=>(_0x11f0f3,_0x51bd37)=>_0x1884e2(_0x11f0f3,_0x51bd37,_0x239ec1);let _0x422b03=class extends _0x31b5ed[_0x3c1854(0x1ac)]{constructor(_0x7365fb,_0x8b25f0){const _0x1e2450=_0x3c1854;super(),this[_0x1e2450(0x1a8)]=_0x7365fb,this['_threadCommentDataSource']=_0x8b25f0,this['_initDataSource']();}[_0x3c1854(0x1ab)](){const _0x281760=_0x3c1854;this[_0x281760(0x1a8)]['dataSource']=this[_0x281760(0x131)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x422b03=_0x5ad891([_0x313e1f(0x0,_0x4be181[_0x3c1854(0x16d)]),_0x313e1f(0x1,_0x31b5ed['Inject'](_0x35de67))],_0x422b03);var _0x55ed3c=Object[_0x3c1854(0x164)],_0x29e6ed=Object[_0x3c1854(0x148)],_0x3028c0=(_0x303be0,_0x4a2aa2,_0x1d6fd8)=>_0x4a2aa2 in _0x303be0?_0x55ed3c(_0x303be0,_0x4a2aa2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1d6fd8}):_0x303be0[_0x4a2aa2]=_0x1d6fd8,_0x42f70c=(_0x104b6f,_0x52cc55,_0x1db5b4,_0x367080)=>{const _0x2de97e=_0x3c1854;for(var _0x23cbc4=_0x367080>0x1?void 0x0:_0x367080?_0x29e6ed(_0x52cc55,_0x1db5b4):_0x52cc55,_0x19db4e=_0x104b6f[_0x2de97e(0x13a)]-0x1,_0x43f490;_0x19db4e>=0x0;_0x19db4e--)(_0x43f490=_0x104b6f[_0x19db4e])&&(_0x23cbc4=_0x43f490(_0x23cbc4)||_0x23cbc4);return _0x23cbc4;},_0x3a4ad8=(_0x10949e,_0x515292)=>(_0x5ae607,_0x1b5c44)=>_0x515292(_0x5ae607,_0x1b5c44,_0x10949e),_0xc8db96=(_0x175bb8,_0x3ce3ea,_0xcaa187)=>_0x3028c0(_0x175bb8,typeof _0x3ce3ea!='symbol'?_0x3ce3ea+'':_0x3ce3ea,_0xcaa187);_0x2fd347['UniverThreadCommentDataSourcePlugin']=class extends _0x31b5ed[_0x3c1854(0x14a)]{constructor(_0x10800c=_0x1e063c,_0x5a1b6a,_0x470a96){const _0x1ad798=_0x3c1854;super(),this[_0x1ad798(0x187)]=_0x10800c,this[_0x1ad798(0x189)]=_0x5a1b6a,this[_0x1ad798(0x1b4)]=_0x470a96;const {..._0xc96025}=_0x31b5ed['merge']({},_0x1e063c,this['_config']);this[_0x1ad798(0x1b4)]['setConfig'](_0x4181c5,_0xc96025);}[_0x3c1854(0x157)](){const _0x4a7814=_0x3c1854;[[_0x35de67],[_0x422b03],[_0x39bcf5]][_0x4a7814(0x16f)](_0x191175=>{const _0x24afe1=_0x4a7814;this['_injector'][_0x24afe1(0x12e)](_0x191175);});}[_0x3c1854(0x17f)](){const _0x1c9351=_0x3c1854;this['_injector'][_0x1c9351(0x15a)](_0x422b03),this[_0x1c9351(0x189)][_0x1c9351(0x15a)](_0x39bcf5);}},_0xc8db96(_0x2fd347[_0x3c1854(0x153)],_0x3c1854(0x18a),_0x5f4667),_0xc8db96(_0x2fd347[_0x3c1854(0x153)],_0x3c1854(0x134),_0x31b5ed['UniverInstanceType'][_0x3c1854(0x12f)]),_0x2fd347[_0x3c1854(0x153)]=_0x42f70c([_0x31b5ed[_0x3c1854(0x18f)](_0x1cf185[_0x3c1854(0x1b0)],_0x23a190[_0x3c1854(0x1b6)],_0x450f12['UniverLicensePlugin']),_0x3a4ad8(0x1,_0x31b5ed['Inject'](_0x31b5ed['Injector'])),_0x3a4ad8(0x2,_0x31b5ed[_0x3c1854(0x144)])],_0x2fd347['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x2fd347,Symbol[_0x3c1854(0x174)],{'value':_0x3c1854(0x181)});}));function _0x48db(_0x17f3c3,_0x456988){const _0x55dd9e=_0x55dd();return _0x48db=function(_0x48dbab,_0x2d901a){_0x48dbab=_0x48dbab-0x12b;let _0xf0f8e=_0x55dd9e[_0x48dbab];return _0xf0f8e;},_0x48db(_0x17f3c3,_0x456988);}function _0x55dd(){const _0x46068c=['_initUserSync','root','getUser','getOwnPropertyDescriptor','UNRECOGNIZED','Plugin','solved','/reply','post','personId','CustomRangeType','values','getCurrentUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverThreadCommentDataSourcePlugin','/universer-api/comment/unit/','UniverProThreadCommentDatasource','object','onStarting','function','Unknown','get','HTTPService','98QmqpLQ','comment','filter','parse','parentId','dayjs','replyId','@univerjs/thread-comment-ui','defineProperty','_sessionService','UniverThreadComment','_httpService','_userService','@univerjs/network','addComment','/universer-api/user/list','245842BVoOqQ','IThreadCommentDataSourceService','stringify','forEach','Solved','UniverProLicense','thread-comment-data-source.config','find','toStringTag','customRanges','commentUpdate$','447654EBWXiv','Edit','ref','COMMENT','payload','unitId','disposeWithMe','UniverThreadCommentUi','onReady','/list','Module','map','requireSession','Delete','@univerjs/core','userId','_config','user','_injector','pluginName','8585328ONQEHG','UniverProCollaborationClient','format','pipe','DependentOn','2297919bCMUqP','UniverCore','bufferTime','/delete','listComments','addUser','Solve','body','rangeType','_commentService','8OnKxTG','createTimestamp','getComment','getUnit','rangeId','delete','deleteComment','/edit','reply','/add','threadId','slice','@univerjs-pro/collaboration-client','Add','_threadCommentDataSourceService','896840EEHYdE','CollaborationSessionService','_initDataSource','Disposable','15464086qSCojv','rxjs','resolved','UniverThreadCommentUIPlugin','subscribe','_threadCommentModel','10SIUFNJ','_configService','userID','UniverCollaborationClientPlugin','Reply','users','exports','saveCommentToSnapshot','OpenOrReOpen','Inject','11054034qJBijR','add','UNIVER_UNKNOWN','_init','_threadCommentDataSource','comments','@univerjs/thread-comment','type','UserManagerService','/solved','content','resolveComment','replies','length','ThreadCommentModel','YYYY/MM/DD\x20HH:mm','error','Injector','CommentService','@univerjs-pro/license','20CzXvlc','getMemberID','code','IConfigService'];_0x55dd=function(){return _0x46068c;};return _0x55dd();}
1
+ function _0x4eca(_0x34fa58,_0xf5b468){const _0x11d81d=_0x11d8();return _0x4eca=function(_0x4eca21,_0x4b2832){_0x4eca21=_0x4eca21-0x7d;let _0x59270b=_0x11d81d[_0x4eca21];return _0x59270b;},_0x4eca(_0x34fa58,_0xf5b468);}function _0x11d8(){const _0x42e031=['/edit','/universer-api/user/list','_initUserSync','length','211073nhOHYa','ref','root','_threadCommentDataSourceService','pluginName','solved','_httpService','Delete','userId','stringify','resolveComment','2010584LOgIHc','3222486ndozNI','map','threadId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverCore','commentUpdate$','Inject','UserManagerService','@univerjs/network','Disposable','getUnit','UniverNetwork','comment','_initDataSource','_injector','merge','disposeWithMe','payload','exports','userID','OpenOrReOpen','size','toStringTag','defineProperty','filter','_configService','10eFlLHO','UniverLicensePlugin','get','values','replyId','2689785guTgGi','/reply','_commentService','Solved','Edit','rangeId','UniverProThreadCommentDatasource','/delete','content','_sessionService','@univerjs-pro/license','_threadCommentModel','UNIVER_UNKNOWN','rangeType','unitId','CommentService','forEach','UniverProCollaborationClient','error','format','onReady','@univerjs-pro/collaboration-client','subscribe','Module','Injector','UniverThreadCommentUi','Add','135492JNDXCi','UniverThreadCommentDataSourcePlugin','thread-comment-data-source.config','getOwnPropertyDescriptor','getUser','addComment','body','addUser','getMemberID','rxjs','6qWktUz','@univerjs/thread-comment','parentId','onStarting','dayjs','_init','Plugin','COMMENT','getComment','parse','users','UniverCollaborationClientPlugin','HTTPService','listComments','UNRECOGNIZED','requireSession','UniverProLicense','/universer-api/comment/unit/','_userService','syncUpdateMutationToColla','Reply','bufferTime','YYYY/MM/DD\x20HH:mm','createTimestamp','CustomRangeType','code','saveCommentToSnapshot','find','35nEfPjc','_config','1136241BnqeUl','updateComment','user','post','UniverInstanceType','ThreadCommentModel','symbol','amd','/list','add','IConfigService','1070996SFHObn','Unknown','UniverThreadComment','getCurrentUser','Solve','@univerjs/thread-comment-ui','type','@univerjs/core','deleteComment','replies','setConfig'];_0x11d8=function(){return _0x42e031;};return _0x11d8();}(function(_0x322a3a,_0x2aebe){const _0xe2f5d2=_0x4eca,_0x53b4d5=_0x322a3a();while(!![]){try{const _0x586fc4=parseInt(_0xe2f5d2(0x104))/0x1+-parseInt(_0xe2f5d2(0xf5))/0x2+-parseInt(_0xe2f5d2(0xea))/0x3+parseInt(_0xe2f5d2(0xc2))/0x4*(parseInt(_0xe2f5d2(0xe8))/0x5)+-parseInt(_0xe2f5d2(0xcc))/0x6*(-parseInt(_0xe2f5d2(0xa7))/0x7)+parseInt(_0xe2f5d2(0x87))/0x8+-parseInt(_0xe2f5d2(0x88))/0x9*(-parseInt(_0xe2f5d2(0xa2))/0xa);if(_0x586fc4===_0x2aebe)break;else _0x53b4d5['push'](_0x53b4d5['shift']());}catch(_0x47a6e1){_0x53b4d5['push'](_0x53b4d5['shift']());}}}(_0x11d8,0x80cd3),function(_0x593c7e,_0x522d16){const _0x461ab2=_0x4eca;typeof exports=='object'&&typeof module<'u'?_0x522d16(exports,require(_0x461ab2(0xbc)),require(_0x461ab2(0xb1)),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require(_0x461ab2(0xcd)),require(_0x461ab2(0xcb)),require(_0x461ab2(0x90))):typeof define=='function'&&define[_0x461ab2(0xf1)]?define([_0x461ab2(0x9a),_0x461ab2(0xbc),_0x461ab2(0xb1),_0x461ab2(0xfc),_0x461ab2(0xfa),_0x461ab2(0xcd),'rxjs',_0x461ab2(0x90)],_0x522d16):(_0x593c7e=typeof globalThis<'u'?globalThis:_0x593c7e||self,_0x522d16(_0x593c7e[_0x461ab2(0xad)]={},_0x593c7e[_0x461ab2(0xb8)],_0x593c7e[_0x461ab2(0xdc)],_0x593c7e[_0x461ab2(0x8c)],_0x593c7e[_0x461ab2(0xc0)],_0x593c7e[_0x461ab2(0xf7)],_0x593c7e['rxjs'],_0x593c7e[_0x461ab2(0x93)]));}(this,function(_0x1285c5,_0x42ac7c,_0x331109,_0xe19bdc,_0x3d9925,_0x48b03f,_0x1ca3a4,_0x240138){'use strict';const _0x3ecfc6=_0x4eca;const _0x4320c7=_0x3ecfc6(0x8b);var _0x3c6c6a=(_0x2ed066=>(_0x2ed066[_0x2ed066[_0x3ecfc6(0x9c)]=0x0]=_0x3ecfc6(0x9c),_0x2ed066[_0x2ed066[_0x3ecfc6(0xaa)]=0x1]=_0x3ecfc6(0xaa),_0x2ed066[_0x2ed066[_0x3ecfc6(0xda)]=-0x1]=_0x3ecfc6(0xda),_0x2ed066))(_0x3c6c6a||{}),_0x126599=(_0x3cd0f3=>(_0x3cd0f3[_0x3cd0f3[_0x3ecfc6(0xf6)]=0x0]=_0x3ecfc6(0xf6),_0x3cd0f3[_0x3cd0f3[_0x3ecfc6(0xc1)]=0x1]=_0x3ecfc6(0xc1),_0x3cd0f3[_0x3cd0f3[_0x3ecfc6(0xe0)]=0x2]=_0x3ecfc6(0xe0),_0x3cd0f3[_0x3cd0f3['Edit']=0x3]=_0x3ecfc6(0xab),_0x3cd0f3[_0x3cd0f3[_0x3ecfc6(0x83)]=0x4]='Delete',_0x3cd0f3[_0x3cd0f3[_0x3ecfc6(0xf9)]=0x5]='Solve',_0x3cd0f3[_0x3cd0f3[_0x3ecfc6(0xda)]=-0x1]=_0x3ecfc6(0xda),_0x3cd0f3))(_0x126599||{});const _0x41f94d=_0x7512e2=>_0xe19bdc['dayjs'](new Date(+_0x7512e2))['format'](_0x3ecfc6(0xe2)),_0x5b122b=async(_0x524e44,_0x5733ad)=>{const _0x1fb942=_0x3ecfc6,_0x5ed1a1=_0x524e44[_0x1fb942(0xa4)](_0xe19bdc[_0x1fb942(0x8f)]),_0x58f846=_0x524e44['get'](_0x240138['HTTPService']);_0x5733ad[_0x1fb942(0xb7)](_0x126365=>{const _0x4c9976=_0x1fb942;_0x5ed1a1[_0x4c9976(0xc6)](_0x126365)&&_0x5733ad['delete'](_0x126365);}),_0x5733ad[_0x1fb942(0x9d)]&&(await _0x58f846[_0x1fb942(0xa4)](_0x1fb942(0x101),{'params':{'userIDs':[..._0x5733ad]}}))['body'][_0x1fb942(0xd6)][_0x1fb942(0xb7)](_0xea531d=>{const _0x3bd979=_0x1fb942;_0xea531d&&_0x5ed1a1[_0x3bd979(0xc9)](_0xea531d);});};var _0x2900b6=Object[_0x3ecfc6(0xc5)],_0x2b0e65=(_0x377e4c,_0x2f400b,_0x1f36f7,_0x1f2127)=>{for(var _0x2a0466=_0x1f2127>0x1?void 0x0:_0x1f2127?_0x2900b6(_0x2f400b,_0x1f36f7):_0x2f400b,_0x204e3f=_0x377e4c['length']-0x1,_0x58ca82;_0x204e3f>=0x0;_0x204e3f--)(_0x58ca82=_0x377e4c[_0x204e3f])&&(_0x2a0466=_0x58ca82(_0x2a0466)||_0x2a0466);return _0x2a0466;},_0x462b4c=(_0x35fc37,_0x70c0ed)=>(_0x69be17,_0x274cab)=>_0x70c0ed(_0x69be17,_0x274cab,_0x35fc37);let _0x44cf48=class extends _0xe19bdc['Disposable']{constructor(_0x4ff232,_0x77b183,_0x55771b,_0x442f60){const _0x579fb6=_0x3ecfc6;super(),this[_0x579fb6(0xa9)]=_0x4ff232,this['_threadCommentModel']=_0x77b183,this[_0x579fb6(0xde)]=_0x55771b,this[_0x579fb6(0x96)]=_0x442f60,this[_0x579fb6(0xd1)](),this[_0x579fb6(0x102)]();}[_0x3ecfc6(0x102)](){const _0x562d30=_0x3ecfc6;this[_0x562d30(0x98)](this[_0x562d30(0xb2)][_0x562d30(0x8d)]['pipe'](_0x1ca3a4[_0x562d30(0xe1)](0x10))[_0x562d30(0xbd)](_0x4c1c2e=>{const _0x3990f5=_0x562d30,_0x19d5ae=new Set();_0x4c1c2e[_0x3990f5(0xb7)](_0x5e85eb=>{const _0x5dc5cd=_0x3990f5;switch(_0x5e85eb[_0x5dc5cd(0xfb)]){case _0x5dc5cd(0xf3):{const _0x34be63=_0x5e85eb[_0x5dc5cd(0x99)]['personId'];_0x19d5ae['add'](_0x34be63);break;}}}),_0x5b122b(this[_0x3990f5(0x96)],_0x19d5ae);}));}[_0x3ecfc6(0xd1)](){const _0x347b11=_0x3ecfc6;this[_0x347b11(0x98)](this[_0x347b11(0xa9)]['commentUpdate$'][_0x347b11(0xbd)](async _0x3b7b13=>{const _0x44593b=_0x347b11;var _0x92457e,_0x1bf9cd,_0x43f4cc,_0x16d269;const _0xbeed1b=(_0x92457e=this['_threadCommentModel']['getUnit'](_0x3b7b13['unitId'])[_0x44593b(0xe7)](_0x1d76fe=>_0x1d76fe[_0x44593b(0x8a)]===_0x3b7b13['threadId']))==null?void 0x0:_0x92457e[_0x44593b(0x7e)];if(!_0xbeed1b)return;const {unitId:_0x48733a,subUnitId:_0x4def0d}=_0xbeed1b;switch(_0x3b7b13[_0x44593b(0xec)]&&this[_0x44593b(0xde)][_0x44593b(0xc9)](_0x3b7b13[_0x44593b(0xec)]),_0x3b7b13[_0x44593b(0xfb)]){case _0x126599['Add']:break;case _0x126599[_0x44593b(0xe0)]:{this[_0x44593b(0xb2)][_0x44593b(0xc7)](_0x48733a,_0x4def0d,{'unitId':_0x48733a,'subUnitId':_0x4def0d,'ref':'','id':_0x3b7b13[_0x44593b(0xa6)],'dT':_0x41f94d(+_0x3b7b13[_0x44593b(0xe3)]),'threadId':_0x3b7b13[_0x44593b(0x8a)],'personId':(_0x43f4cc=(_0x1bf9cd=_0x3b7b13['user'])==null?void 0x0:_0x1bf9cd[_0x44593b(0x9b)])!=null?_0x43f4cc:_0x3b7b13[_0x44593b(0x84)],'text':JSON[_0x44593b(0xd5)](_0x3b7b13['content']),'parentId':_0xbeed1b['id']});break;}case _0x126599[_0x44593b(0x83)]:{const _0x365702=this[_0x44593b(0xb2)][_0x44593b(0xd4)](_0x48733a,_0x4def0d,_0x3b7b13[_0x44593b(0xa6)]);_0x365702&&_0x365702[_0x44593b(0xce)]&&this['_threadCommentModel']['deleteComment'](_0x48733a,_0x4def0d,_0x3b7b13[_0x44593b(0xa6)]);break;}case _0x126599[_0x44593b(0xab)]:{this[_0x44593b(0xb2)][_0x44593b(0xeb)](_0x48733a,_0x4def0d,{'commentId':_0x3b7b13[_0x44593b(0xa6)],'text':JSON[_0x44593b(0xd5)](_0x3b7b13[_0x44593b(0xaf)])});break;}case _0x126599['Solve']:{const _0x58317b=(_0x16d269=this['_threadCommentModel'][_0x44593b(0x92)](_0x3b7b13[_0x44593b(0xb5)])[_0x44593b(0xe7)](_0x4337a3=>_0x4337a3['threadId']===_0x3b7b13[_0x44593b(0x8a)]))==null?void 0x0:_0x16d269[_0x44593b(0x7e)];_0x58317b&&this[_0x44593b(0xb2)][_0x44593b(0x86)](_0x48733a,_0x4def0d,_0x58317b['id'],_0x3b7b13[_0x44593b(0x81)]===_0x3c6c6a[_0x44593b(0xaa)]);break;}}}));}};_0x44cf48=_0x2b0e65([_0x462b4c(0x0,_0xe19bdc[_0x3ecfc6(0x8e)](_0x42ac7c[_0x3ecfc6(0xb6)])),_0x462b4c(0x1,_0xe19bdc[_0x3ecfc6(0x8e)](_0x48b03f[_0x3ecfc6(0xef)])),_0x462b4c(0x2,_0xe19bdc[_0x3ecfc6(0x8e)](_0xe19bdc['UserManagerService'])),_0x462b4c(0x3,_0xe19bdc[_0x3ecfc6(0x8e)](_0xe19bdc['Injector']))],_0x44cf48);const _0x39cf89=_0x3ecfc6(0xc4),_0xa038f5={};var _0x2080b7=Object['getOwnPropertyDescriptor'],_0x590b87=(_0x5f4aa0,_0x283aa4,_0x23b549,_0x380cb1)=>{const _0x8c04a4=_0x3ecfc6;for(var _0x3d7915=_0x380cb1>0x1?void 0x0:_0x380cb1?_0x2080b7(_0x283aa4,_0x23b549):_0x283aa4,_0x2b64bd=_0x5f4aa0[_0x8c04a4(0x103)]-0x1,_0x516463;_0x2b64bd>=0x0;_0x2b64bd--)(_0x516463=_0x5f4aa0[_0x2b64bd])&&(_0x3d7915=_0x516463(_0x3d7915)||_0x3d7915);return _0x3d7915;},_0x38591f=(_0x2e4948,_0x55d888)=>(_0x38f5b0,_0x307ca2)=>_0x55d888(_0x38f5b0,_0x307ca2,_0x2e4948);function _0x51d544(_0x83065d,_0x2301e2){const _0x25467b=_0x3ecfc6,_0x2120b6=_0x83065d[_0x25467b(0xfe)][0x0];return{..._0x2301e2,'id':_0x2120b6[_0x25467b(0xa6)],'resolved':_0x83065d['solved']===0x1,'dT':_0x41f94d(_0x2120b6[_0x25467b(0xe3)]),'personId':_0x2120b6[_0x25467b(0x84)],'threadId':_0x2120b6[_0x25467b(0x8a)]};}function _0x3aebd2(_0x360c45,_0x454b6f,_0x7c9e9a){const _0x851f89=_0x3ecfc6;var _0x2ad367,_0x258762;if(((_0x258762=(_0x2ad367=_0x360c45==null?void 0x0:_0x360c45[_0x851f89(0xfe)])==null?void 0x0:_0x2ad367[_0x851f89(0x103)])!=null?_0x258762:0x0)>0x0){const _0x38826e=(_0x1ec1b2,_0x2d6a74)=>({'id':_0x1ec1b2[_0x851f89(0xa6)],'threadId':_0x1ec1b2[_0x851f89(0x8a)],'dT':_0x41f94d(_0x1ec1b2['createTimestamp']),'personId':_0x1ec1b2[_0x851f89(0x84)],'resolved':_0x360c45[_0x851f89(0x81)]===_0x3c6c6a[_0x851f89(0xaa)],'unitId':_0x454b6f,'subUnitId':_0x7c9e9a,'text':JSON[_0x851f89(0xd5)](_0x1ec1b2['content']),'parentId':_0x2d6a74}),_0x4778b1=_0x38826e(_0x360c45[_0x851f89(0xfe)][0x0]);return{..._0x4778b1,'children':_0x360c45['replies']['slice'](0x1)[_0x851f89(0x89)](_0x58b574=>_0x38826e(_0x58b574,_0x4778b1['id']))};}return null;}let _0x3e92a6=class{constructor(_0x54aa4e,_0x55f44d,_0x379886,_0xa101a6){const _0x3de947=_0x3ecfc6;this[_0x3de947(0x82)]=_0x54aa4e,this['_userService']=_0x55f44d,this[_0x3de947(0xb0)]=_0x379886,this[_0x3de947(0x96)]=_0xa101a6;}async[_0x3ecfc6(0xc7)](_0x52429a){const _0xd267e2=_0x3ecfc6;var _0x27b5d0,_0x16e07f;const {parentId:_0x259e7d,unitId:_0x5b087f,text:_0x5d24e6,threadId:_0xb20cf5}=_0x52429a,_0x228e3e=(_0x16e07f=(_0x27b5d0=_0x5d24e6['customRanges'])==null?void 0x0:_0x27b5d0[_0xd267e2(0xa0)](_0x3881ee=>_0x3881ee[_0xd267e2(0xb4)]===_0xe19bdc[_0xd267e2(0xe4)][_0xd267e2(0xd3)])[_0xd267e2(0x89)](_0x5a9a96=>_0x5a9a96[_0xd267e2(0xac)]))!=null?_0x16e07f:[],_0x1ce385=JSON[_0xd267e2(0x85)](_0x5d24e6),_0x24a185=(await this['_sessionService'][_0xd267e2(0xdb)](_0x5b087f))['getMemberID']();if(_0x259e7d){const _0x39ba1c={'memberId':_0x24a185,'unitId':_0x5b087f,'content':_0x1ce385,'mention':_0x228e3e,'threadId':_0xb20cf5},_0x2f32ae=(await this['_httpService'][_0xd267e2(0xed)](_0xd267e2(0xdd)+_0x5b087f+_0xd267e2(0xa8),{'body':_0x39ba1c}))[_0xd267e2(0xc8)]['reply'];return{..._0x52429a,'id':_0x2f32ae['replyId'],'dT':_0xe19bdc[_0xd267e2(0xd0)](+_0x2f32ae['createTimestamp'])[_0xd267e2(0xba)](_0xd267e2(0xe2)),'personId':_0x2f32ae['userId']};}else{const _0x532c3f={'memberId':_0x24a185,'unitId':_0x5b087f,'content':_0x1ce385,'mention':_0x228e3e},_0x4dda61=await this[_0xd267e2(0x82)][_0xd267e2(0xed)](_0xd267e2(0xdd)+_0x5b087f+'/add',{'body':_0x532c3f});return _0x51d544(_0x4dda61[_0xd267e2(0xc8)][_0xd267e2(0x94)],_0x52429a);}}async[_0x3ecfc6(0xeb)](_0x4f99c4){const _0x4234e9=_0x3ecfc6;var _0x2c7cc3,_0x4bb915;const {text:_0x40fe80,unitId:_0x3d8bd3}=_0x4f99c4,_0x316937=(_0x4bb915=(_0x2c7cc3=_0x40fe80['customRanges'])==null?void 0x0:_0x2c7cc3['filter'](_0x395933=>_0x395933[_0x4234e9(0xb4)]===_0xe19bdc['CustomRangeType'][_0x4234e9(0xd3)])['map'](_0x337fb8=>_0x337fb8[_0x4234e9(0xac)]))!=null?_0x4bb915:[],_0x3ef974=JSON[_0x4234e9(0x85)](_0x40fe80),_0x11b4d2=_0x4f99c4[_0x4234e9(0x8a)],_0x53f1bb=_0x4f99c4['id'],_0x5ee485={'memberId':(await this[_0x4234e9(0xb0)][_0x4234e9(0xdb)](_0x3d8bd3))[_0x4234e9(0xca)](),'unitId':_0x3d8bd3,'threadId':_0x11b4d2,'mention':_0x316937,'content':_0x3ef974,'replyId':_0x53f1bb},_0x1b4622=await this[_0x4234e9(0x82)][_0x4234e9(0xed)](_0x4234e9(0xdd)+_0x3d8bd3+_0x4234e9(0x100),{'body':_0x5ee485});return!_0x1b4622[_0x4234e9(0xc8)][_0x4234e9(0xb9)]||_0x1b4622['body'][_0x4234e9(0xb9)][_0x4234e9(0xe5)]===0x1;}async['resolveComment'](_0x24693a){const _0xb1945e=_0x3ecfc6,{unitId:_0x404101}=_0x24693a,_0x2e27ab=_0x24693a[_0xb1945e(0x8a)],_0x33ec05={'memberId':this[_0xb1945e(0xde)][_0xb1945e(0xf8)]()[_0xb1945e(0x9b)],'unitId':_0x404101,'threadId':_0x2e27ab,'solved':_0x24693a['resolved']?_0x3c6c6a[_0xb1945e(0xaa)]:_0x3c6c6a[_0xb1945e(0x9c)]},_0x8f5e84=await this[_0xb1945e(0x82)][_0xb1945e(0xed)](_0xb1945e(0xdd)+_0x404101+'/solved',{'body':_0x33ec05});return!_0x8f5e84[_0xb1945e(0xc8)][_0xb1945e(0xb9)]||_0x8f5e84[_0xb1945e(0xc8)]['error'][_0xb1945e(0xe5)]===0x1;}async[_0x3ecfc6(0xfd)](_0x1badd3,_0x49d44c,_0x4eca3d,_0x2a43e3){const _0x5e1dd8=_0x3ecfc6,_0x2fbf68={'memberId':(await this[_0x5e1dd8(0xb0)][_0x5e1dd8(0xdb)](_0x1badd3))['getMemberID'](),'threadId':_0x4eca3d,'replyId':_0x2a43e3,'unitId':_0x1badd3},_0x4c3cfe=await this[_0x5e1dd8(0x82)][_0x5e1dd8(0xed)](_0x5e1dd8(0xdd)+_0x1badd3+_0x5e1dd8(0xae),{'body':_0x2fbf68});return!_0x4c3cfe[_0x5e1dd8(0xc8)][_0x5e1dd8(0xb9)]||_0x4c3cfe[_0x5e1dd8(0xc8)][_0x5e1dd8(0xb9)][_0x5e1dd8(0xe5)]===0x1;}async[_0x3ecfc6(0xd9)](_0x3f424e,_0x197c6b,_0x3f5448){const _0x4d612b=_0x3ecfc6,_0x5612f8={'unitId':_0x3f424e,'threadId':_0x3f5448},_0x32c609=await this[_0x4d612b(0x82)][_0x4d612b(0xed)]('/universer-api/comment/unit/'+_0x3f424e+_0x4d612b(0xf2),{'body':_0x5612f8}),_0x20374=_0x3f5448[_0x4d612b(0x89)](_0x34d9ce=>_0x3aebd2(_0x32c609[_0x4d612b(0xc8)]['comments'][_0x34d9ce],_0x3f424e,_0x197c6b))[_0x4d612b(0xa0)](Boolean);return Object[_0x4d612b(0xa5)](_0x32c609[_0x4d612b(0xc8)][_0x4d612b(0xd6)])[_0x4d612b(0xb7)](_0x1f0b45=>{const _0x245e51=_0x4d612b;this[_0x245e51(0xde)][_0x245e51(0xc9)](_0x1f0b45);}),_0x20374;}[_0x3ecfc6(0xe6)](_0x7186b5){const _0x1c76c3=_0x3ecfc6;return{'id':_0x7186b5['id'],'threadId':_0x7186b5[_0x1c76c3(0x8a)],'ref':_0x7186b5[_0x1c76c3(0x7d)]};}};_0x3e92a6=_0x590b87([_0x38591f(0x0,_0xe19bdc['Inject'](_0x240138[_0x3ecfc6(0xd8)])),_0x38591f(0x1,_0xe19bdc[_0x3ecfc6(0x8e)](_0xe19bdc[_0x3ecfc6(0x8f)])),_0x38591f(0x2,_0xe19bdc['Inject'](_0x42ac7c['CollaborationSessionService'])),_0x38591f(0x3,_0xe19bdc[_0x3ecfc6(0x8e)](_0xe19bdc[_0x3ecfc6(0xbf)]))],_0x3e92a6);var _0x19a746=Object[_0x3ecfc6(0xc5)],_0x48d7d8=(_0x975b71,_0x57a3a7,_0x12500d,_0x500f91)=>{const _0x48a84e=_0x3ecfc6;for(var _0x231d6b=_0x500f91>0x1?void 0x0:_0x500f91?_0x19a746(_0x57a3a7,_0x12500d):_0x57a3a7,_0x3970f8=_0x975b71[_0x48a84e(0x103)]-0x1,_0x3f33ff;_0x3970f8>=0x0;_0x3970f8--)(_0x3f33ff=_0x975b71[_0x3970f8])&&(_0x231d6b=_0x3f33ff(_0x231d6b)||_0x231d6b);return _0x231d6b;},_0x2095e7=(_0x57a947,_0x34b9b6)=>(_0x29a9b5,_0x5b502b)=>_0x34b9b6(_0x29a9b5,_0x5b502b,_0x57a947);let _0x435457=class extends _0xe19bdc[_0x3ecfc6(0x91)]{constructor(_0x33c791,_0x5d37d9){const _0x22fd8b=_0x3ecfc6;super(),this[_0x22fd8b(0x7f)]=_0x33c791,this['_threadCommentDataSource']=_0x5d37d9,this[_0x22fd8b(0x95)]();}[_0x3ecfc6(0x95)](){const _0x3072ea=_0x3ecfc6;this[_0x3072ea(0x7f)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x3072ea(0xdf)]=!0x1;}};_0x435457=_0x48d7d8([_0x2095e7(0x0,_0x48b03f['IThreadCommentDataSourceService']),_0x2095e7(0x1,_0xe19bdc[_0x3ecfc6(0x8e)](_0x3e92a6))],_0x435457);var _0x1ebdb8=Object['defineProperty'],_0xa6bd07=Object['getOwnPropertyDescriptor'],_0x57c022=(_0x394866,_0x46f1e0,_0x8783bd)=>_0x46f1e0 in _0x394866?_0x1ebdb8(_0x394866,_0x46f1e0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x8783bd}):_0x394866[_0x46f1e0]=_0x8783bd,_0xf3f16d=(_0x2ecb46,_0x2f6e21,_0x595f90,_0x2b07f0)=>{for(var _0x4695af=_0x2b07f0>0x1?void 0x0:_0x2b07f0?_0xa6bd07(_0x2f6e21,_0x595f90):_0x2f6e21,_0xf4733c=_0x2ecb46['length']-0x1,_0x4c74e5;_0xf4733c>=0x0;_0xf4733c--)(_0x4c74e5=_0x2ecb46[_0xf4733c])&&(_0x4695af=_0x4c74e5(_0x4695af)||_0x4695af);return _0x4695af;},_0x20deea=(_0x232c8d,_0x3b32ce)=>(_0x241533,_0x2ca6fe)=>_0x3b32ce(_0x241533,_0x2ca6fe,_0x232c8d),_0x4307bc=(_0x3e8e35,_0x486fe0,_0x2011f8)=>_0x57c022(_0x3e8e35,typeof _0x486fe0!=_0x3ecfc6(0xf0)?_0x486fe0+'':_0x486fe0,_0x2011f8);_0x1285c5[_0x3ecfc6(0xc3)]=class extends _0xe19bdc[_0x3ecfc6(0xd2)]{constructor(_0x228de5=_0xa038f5,_0x3082b4,_0x84d2d7){const _0x3a3753=_0x3ecfc6;super(),this[_0x3a3753(0xe9)]=_0x228de5,this[_0x3a3753(0x96)]=_0x3082b4,this['_configService']=_0x84d2d7;const {..._0x4ba125}=_0xe19bdc[_0x3a3753(0x97)]({},_0xa038f5,this['_config']);this[_0x3a3753(0xa1)][_0x3a3753(0xff)](_0x39cf89,_0x4ba125);}[_0x3ecfc6(0xcf)](){const _0x23e4eb=_0x3ecfc6;[[_0x3e92a6],[_0x435457],[_0x44cf48]][_0x23e4eb(0xb7)](_0x2c1906=>{const _0x1db15c=_0x23e4eb;this[_0x1db15c(0x96)][_0x1db15c(0xf3)](_0x2c1906);});}[_0x3ecfc6(0xbb)](){const _0x44b80c=_0x3ecfc6;this['_injector'][_0x44b80c(0xa4)](_0x435457),this[_0x44b80c(0x96)][_0x44b80c(0xa4)](_0x44cf48);}},_0x4307bc(_0x1285c5[_0x3ecfc6(0xc3)],_0x3ecfc6(0x80),_0x4320c7),_0x4307bc(_0x1285c5[_0x3ecfc6(0xc3)],_0x3ecfc6(0xfb),_0xe19bdc[_0x3ecfc6(0xee)][_0x3ecfc6(0xb3)]),_0x1285c5[_0x3ecfc6(0xc3)]=_0xf3f16d([_0xe19bdc['DependentOn'](_0x3d9925['UniverThreadCommentUIPlugin'],_0x42ac7c[_0x3ecfc6(0xd7)],_0x331109[_0x3ecfc6(0xa3)]),_0x20deea(0x1,_0xe19bdc[_0x3ecfc6(0x8e)](_0xe19bdc[_0x3ecfc6(0xbf)])),_0x20deea(0x2,_0xe19bdc[_0x3ecfc6(0xf4)])],_0x1285c5['UniverThreadCommentDataSourcePlugin']),Object[_0x3ecfc6(0x9f)](_0x1285c5,Symbol[_0x3ecfc6(0x9e)],{'value':_0x3ecfc6(0xbe)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.8.1-nightly.202506141606",
3
+ "version": "0.8.1-nightly.202506151606",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.8.1-nightly.202506141606",
49
- "@univerjs-pro/license": "0.8.1-nightly.202506141606",
48
+ "@univerjs-pro/collaboration-client": "0.8.1-nightly.202506151606",
49
+ "@univerjs-pro/license": "0.8.1-nightly.202506151606",
50
+ "@univerjs/core": "0.8.1-nightly.202506151606",
51
+ "@univerjs/network": "0.8.1-nightly.202506151606",
50
52
  "@univerjs/protocol": "0.1.47-alpha.0",
51
- "@univerjs/network": "0.8.1-nightly.202506141606",
52
- "@univerjs/core": "0.8.1-nightly.202506141606",
53
- "@univerjs/thread-comment": "0.8.1-nightly.202506141606",
54
- "@univerjs/thread-comment-ui": "0.8.1-nightly.202506141606"
53
+ "@univerjs/thread-comment": "0.8.1-nightly.202506151606",
54
+ "@univerjs/thread-comment-ui": "0.8.1-nightly.202506151606"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",