@univerjs-pro/thread-comment-datasource 0.6.10 → 0.7.0-nightly.202504291607

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 _0xde316f=_0x5290;(function(_0xaf6147,_0x166a50){const _0x343a2d=_0x5290,_0x3b0139=_0xaf6147();while(!![]){try{const _0x46e85b=parseInt(_0x343a2d(0x18f))/0x1*(-parseInt(_0x343a2d(0x1e3))/0x2)+-parseInt(_0x343a2d(0x1c7))/0x3+parseInt(_0x343a2d(0x17c))/0x4*(-parseInt(_0x343a2d(0x176))/0x5)+-parseInt(_0x343a2d(0x172))/0x6+parseInt(_0x343a2d(0x1d1))/0x7+parseInt(_0x343a2d(0x1a7))/0x8+-parseInt(_0x343a2d(0x194))/0x9*(-parseInt(_0x343a2d(0x1b8))/0xa);if(_0x46e85b===_0x166a50)break;else _0x3b0139['push'](_0x3b0139['shift']());}catch(_0x32775c){_0x3b0139['push'](_0x3b0139['shift']());}}}(_0x410f,0xdac7a));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0xde316f(0x1bb)});function _0x5290(_0x2e06ce,_0x4a6633){const _0x410fc7=_0x410f();return _0x5290=function(_0x5290a0,_0x18a6ae){_0x5290a0=_0x5290a0-0x167;let _0x4c4e96=_0x410fc7[_0x5290a0];return _0x4c4e96;},_0x5290(_0x2e06ce,_0x4a6633);}const b=require(_0xde316f(0x1c2)),T=require(_0xde316f(0x1a1)),c=require(_0xde316f(0x1c0)),j=require(_0xde316f(0x17f)),M=require(_0xde316f(0x193)),w=require(_0xde316f(0x17d)),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2568a4=>(_0x2568a4[_0x2568a4[_0xde316f(0x187)]=0x0]='OpenOrReOpen',_0x2568a4[_0x2568a4[_0xde316f(0x19f)]=0x1]=_0xde316f(0x19f),_0x2568a4[_0x2568a4['UNRECOGNIZED']=-0x1]=_0xde316f(0x1bd),_0x2568a4))(I||{}),v=(_0x355172=>(_0x355172[_0x355172[_0xde316f(0x1aa)]=0x0]=_0xde316f(0x1aa),_0x355172[_0x355172[_0xde316f(0x1ba)]=0x1]=_0xde316f(0x1ba),_0x355172[_0x355172[_0xde316f(0x19a)]=0x2]=_0xde316f(0x19a),_0x355172[_0x355172['Edit']=0x3]=_0xde316f(0x197),_0x355172[_0x355172['Delete']=0x4]=_0xde316f(0x19b),_0x355172[_0x355172[_0xde316f(0x1da)]=0x5]=_0xde316f(0x1da),_0x355172[_0x355172[_0xde316f(0x1bd)]=-0x1]=_0xde316f(0x1bd),_0x355172))(v||{});const f=_0x3f57e8=>c[_0xde316f(0x181)](new Date(+_0x3f57e8))[_0xde316f(0x1ae)](_0xde316f(0x1b3)),R=async(_0x25258e,_0x2fbd4b)=>{const _0x2c04c3=_0xde316f,_0x58097c=_0x25258e['get'](c['UserManagerService']),_0xc6685=_0x25258e['get'](P[_0x2c04c3(0x16f)]);_0x2fbd4b[_0x2c04c3(0x1b5)](_0x134724=>{const _0x1c63a0=_0x2c04c3;_0x58097c[_0x1c63a0(0x1a8)](_0x134724)&&_0x2fbd4b[_0x1c63a0(0x16c)](_0x134724);}),_0x2fbd4b['size']&&(await _0xc6685['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x2fbd4b]}}))[_0x2c04c3(0x1d5)][_0x2c04c3(0x189)][_0x2c04c3(0x1b5)](_0xa10e98=>{const _0x23fc62=_0x2c04c3;_0xa10e98&&_0x58097c[_0x23fc62(0x199)](_0xa10e98);});};var $=Object[_0xde316f(0x1b4)],E=(_0x24d354,_0x455baa,_0x39fa30,_0x51ab3d)=>{const _0x1aa530=_0xde316f;for(var _0x30846e=_0x51ab3d>0x1?void 0x0:_0x51ab3d?$(_0x455baa,_0x39fa30):_0x455baa,_0x12d78d=_0x24d354[_0x1aa530(0x1b2)]-0x1,_0x16451b;_0x12d78d>=0x0;_0x12d78d--)(_0x16451b=_0x24d354[_0x12d78d])&&(_0x30846e=_0x16451b(_0x30846e)||_0x30846e);return _0x30846e;},S=(_0x578e34,_0x5217fe)=>(_0x20d65b,_0x15c1cd)=>_0x5217fe(_0x20d65b,_0x15c1cd,_0x578e34);let p=class extends c[_0xde316f(0x1e2)]{constructor(_0x4169af,_0x4497a4,_0x27ac2c,_0x37bc99){const _0x429c4b=_0xde316f;super(),this[_0x429c4b(0x1cc)]=_0x4169af,this[_0x429c4b(0x1bc)]=_0x4497a4,this[_0x429c4b(0x1ad)]=_0x27ac2c,this[_0x429c4b(0x16b)]=_0x37bc99,this[_0x429c4b(0x186)](),this[_0x429c4b(0x1ab)]();}[_0xde316f(0x1ab)](){const _0x3e8c3d=_0xde316f;this['disposeWithMe'](this[_0x3e8c3d(0x1bc)][_0x3e8c3d(0x1ce)]['pipe'](w[_0x3e8c3d(0x1a6)](0x10))[_0x3e8c3d(0x1de)](_0x53688f=>{const _0x5147ca=_0x3e8c3d,_0x5e25e3=new Set();_0x53688f[_0x5147ca(0x1b5)](_0x162ebd=>{const _0x4dac46=_0x5147ca;switch(_0x162ebd[_0x4dac46(0x1a4)]){case _0x4dac46(0x18b):{const _0x175bd0=_0x162ebd[_0x4dac46(0x1c8)][_0x4dac46(0x1cf)];_0x5e25e3['add'](_0x175bd0);break;}}}),R(this[_0x5147ca(0x16b)],_0x5e25e3);}));}['_init'](){const _0x202675=_0xde316f;this[_0x202675(0x178)](this[_0x202675(0x1cc)][_0x202675(0x1ce)][_0x202675(0x1de)](async _0xd9793a=>{const _0x330c27=_0x202675;var _0x448ac1,_0x557cd8,_0x1111b9,_0x4b77cc;const _0x5d4be0=(_0x448ac1=this['_threadCommentModel'][_0x330c27(0x1d7)](_0xd9793a[_0x330c27(0x188)])[_0x330c27(0x1a0)](_0x52b982=>_0x52b982['threadId']===_0xd9793a[_0x330c27(0x17a)]))==null?void 0x0:_0x448ac1[_0x330c27(0x195)];if(!_0x5d4be0)return;const {unitId:_0x526f4b,subUnitId:_0x22b6f7}=_0x5d4be0;switch(_0xd9793a[_0x330c27(0x19c)]&&this['_userService'][_0x330c27(0x199)](_0xd9793a[_0x330c27(0x19c)]),_0xd9793a[_0x330c27(0x1a4)]){case v[_0x330c27(0x1ba)]:break;case v[_0x330c27(0x19a)]:{this[_0x330c27(0x1bc)][_0x330c27(0x1d8)](_0x526f4b,_0x22b6f7,{'unitId':_0x526f4b,'subUnitId':_0x22b6f7,'ref':'','id':_0xd9793a[_0x330c27(0x17e)],'dT':f(+_0xd9793a['createTimestamp']),'threadId':_0xd9793a['threadId'],'personId':(_0x1111b9=(_0x557cd8=_0xd9793a[_0x330c27(0x19c)])==null?void 0x0:_0x557cd8['userID'])!=null?_0x1111b9:_0xd9793a[_0x330c27(0x190)],'text':JSON[_0x330c27(0x192)](_0xd9793a[_0x330c27(0x177)]),'parentId':_0x5d4be0['id']});break;}case v[_0x330c27(0x19b)]:{const _0x5ded7c=this[_0x330c27(0x1bc)][_0x330c27(0x1df)](_0x526f4b,_0x22b6f7,_0xd9793a[_0x330c27(0x17e)]);_0x5ded7c&&_0x5ded7c[_0x330c27(0x1d9)]&&this[_0x330c27(0x1bc)][_0x330c27(0x1b7)](_0x526f4b,_0x22b6f7,_0xd9793a['replyId']);break;}case v[_0x330c27(0x197)]:{this[_0x330c27(0x1bc)]['updateComment'](_0x526f4b,_0x22b6f7,{'commentId':_0xd9793a[_0x330c27(0x17e)],'text':JSON[_0x330c27(0x192)](_0xd9793a[_0x330c27(0x177)])});break;}case v[_0x330c27(0x1da)]:{const _0x12d47b=(_0x4b77cc=this[_0x330c27(0x1bc)][_0x330c27(0x1d7)](_0xd9793a['unitId'])[_0x330c27(0x1a0)](_0x3f3a71=>_0x3f3a71[_0x330c27(0x17a)]===_0xd9793a[_0x330c27(0x17a)]))==null?void 0x0:_0x4b77cc[_0x330c27(0x195)];_0x12d47b&&this['_threadCommentModel'][_0x330c27(0x16a)](_0x526f4b,_0x22b6f7,_0x12d47b['id'],_0xd9793a[_0x330c27(0x1c1)]===I[_0x330c27(0x19f)]);break;}}}));}};p=E([S(0x0,c[_0xde316f(0x19e)](b[_0xde316f(0x1d2)])),S(0x1,c[_0xde316f(0x19e)](M[_0xde316f(0x18c)])),S(0x2,c[_0xde316f(0x19e)](c[_0xde316f(0x1b6)])),S(0x3,c['Inject'](c[_0xde316f(0x18d)]))],p);const q=_0xde316f(0x1bf),D={};var A=Object[_0xde316f(0x1b4)],x=(_0x391fe3,_0x53f4b6,_0x2a74ab,_0x2bb01e)=>{for(var _0xc4b0f5=_0x2bb01e>0x1?void 0x0:_0x2bb01e?A(_0x53f4b6,_0x2a74ab):_0x53f4b6,_0x4abde7=_0x391fe3['length']-0x1,_0x568c64;_0x4abde7>=0x0;_0x4abde7--)(_0x568c64=_0x391fe3[_0x4abde7])&&(_0xc4b0f5=_0x568c64(_0xc4b0f5)||_0xc4b0f5);return _0xc4b0f5;},_=(_0x65e0e8,_0xb6ef6d)=>(_0x61c3cd,_0xaa7578)=>_0xb6ef6d(_0x61c3cd,_0xaa7578,_0x65e0e8);function Y(_0x3a0252,_0x357dd1){const _0x34f256=_0xde316f,_0x6d7533=_0x3a0252[_0x34f256(0x16d)][0x0];return{..._0x357dd1,'id':_0x6d7533[_0x34f256(0x17e)],'resolved':_0x3a0252[_0x34f256(0x1c1)]===0x1,'dT':f(_0x6d7533[_0x34f256(0x185)]),'personId':_0x6d7533[_0x34f256(0x190)],'threadId':_0x6d7533['threadId']};}function G(_0x4118b0,_0x24c94d,_0xcdf136){const _0x1a6687=_0xde316f;var _0x52f740,_0x4f67fd;if(((_0x4f67fd=(_0x52f740=_0x4118b0==null?void 0x0:_0x4118b0['replies'])==null?void 0x0:_0x52f740[_0x1a6687(0x1b2)])!=null?_0x4f67fd:0x0)>0x0){const _0x1191b9=(_0x4a772f,_0x3326ba)=>({'id':_0x4a772f['replyId'],'threadId':_0x4a772f[_0x1a6687(0x17a)],'dT':f(_0x4a772f[_0x1a6687(0x185)]),'personId':_0x4a772f[_0x1a6687(0x190)],'resolved':_0x4118b0[_0x1a6687(0x1c1)]===I[_0x1a6687(0x19f)],'unitId':_0x24c94d,'subUnitId':_0xcdf136,'text':JSON[_0x1a6687(0x192)](_0x4a772f[_0x1a6687(0x177)]),'parentId':_0x3326ba}),_0x289c15=_0x1191b9(_0x4118b0[_0x1a6687(0x16d)][0x0]);return{..._0x289c15,'children':_0x4118b0[_0x1a6687(0x16d)][_0x1a6687(0x191)](0x1)[_0x1a6687(0x1d3)](_0x2bfc3d=>_0x1191b9(_0x2bfc3d,_0x289c15['id']))};}return null;}let g=class{constructor(_0x4d54eb,_0x3dd988,_0x51e695,_0x5ecfd5){const _0x2de7c6=_0xde316f;this[_0x2de7c6(0x1a9)]=_0x4d54eb,this['_userService']=_0x3dd988,this[_0x2de7c6(0x1dd)]=_0x51e695,this[_0x2de7c6(0x16b)]=_0x5ecfd5;}async[_0xde316f(0x1d8)](_0x3cc9e7){const _0xc20415=_0xde316f;var _0x59a19f,_0x132fe4;const {parentId:_0x96624b,unitId:_0x4bc561,text:_0x3ac050,threadId:_0x20de5b}=_0x3cc9e7,_0x2132ba=(_0x132fe4=(_0x59a19f=_0x3ac050['customRanges'])==null?void 0x0:_0x59a19f[_0xc20415(0x182)](_0x1f7403=>_0x1f7403['rangeType']===c[_0xc20415(0x196)][_0xc20415(0x18e)])[_0xc20415(0x1d3)](_0x5075d1=>_0x5075d1[_0xc20415(0x1e0)]))!=null?_0x132fe4:[],_0x5ccc59=JSON[_0xc20415(0x19d)](_0x3ac050),_0x2a4215=(await this[_0xc20415(0x1dd)][_0xc20415(0x1c6)](_0x4bc561))[_0xc20415(0x1b9)]();if(_0x96624b){const _0xd10539={'memberId':_0x2a4215,'unitId':_0x4bc561,'content':_0x5ccc59,'mention':_0x2132ba,'threadId':_0x20de5b},_0x182146=(await this[_0xc20415(0x1a9)]['post'](_0xc20415(0x1be)+_0x4bc561+_0xc20415(0x170),{'body':_0xd10539}))[_0xc20415(0x1d5)]['reply'];return{..._0x3cc9e7,'id':_0x182146[_0xc20415(0x17e)],'dT':c[_0xc20415(0x181)](+_0x182146[_0xc20415(0x185)])['format'](_0xc20415(0x1b3)),'personId':_0x182146['userId']};}else{const _0x53dad9={'memberId':_0x2a4215,'unitId':_0x4bc561,'content':_0x5ccc59,'mention':_0x2132ba},_0x354ad4=await this[_0xc20415(0x1a9)]['post'](_0xc20415(0x1be)+_0x4bc561+_0xc20415(0x169),{'body':_0x53dad9});return Y(_0x354ad4[_0xc20415(0x1d5)][_0xc20415(0x1ca)],_0x3cc9e7);}}async[_0xde316f(0x1c4)](_0x414551){const _0x11c908=_0xde316f;var _0x5348e2,_0x42441c;const {text:_0x1e8864,unitId:_0x4d37de}=_0x414551,_0x4d949a=(_0x42441c=(_0x5348e2=_0x1e8864[_0x11c908(0x1dc)])==null?void 0x0:_0x5348e2[_0x11c908(0x182)](_0x133779=>_0x133779[_0x11c908(0x1b1)]===c[_0x11c908(0x196)][_0x11c908(0x18e)])[_0x11c908(0x1d3)](_0x59f0be=>_0x59f0be[_0x11c908(0x1e0)]))!=null?_0x42441c:[],_0x26f83a=JSON[_0x11c908(0x19d)](_0x1e8864),_0xa0acbc=_0x414551[_0x11c908(0x17a)],_0x34ac79=_0x414551['id'],_0x174e5e={'memberId':(await this[_0x11c908(0x1dd)][_0x11c908(0x1c6)](_0x4d37de))[_0x11c908(0x1b9)](),'unitId':_0x4d37de,'threadId':_0xa0acbc,'mention':_0x4d949a,'content':_0x26f83a,'replyId':_0x34ac79},_0x4d5245=await this[_0x11c908(0x1a9)][_0x11c908(0x1a2)]('/universer-api/comment/unit/'+_0x4d37de+'/edit',{'body':_0x174e5e});return!_0x4d5245[_0x11c908(0x1d5)][_0x11c908(0x18a)]||_0x4d5245[_0x11c908(0x1d5)][_0x11c908(0x18a)][_0x11c908(0x171)]===0x1;}async[_0xde316f(0x16a)](_0x47c11c){const _0x25d4ed=_0xde316f,{unitId:_0x48de68}=_0x47c11c,_0x9fde56=_0x47c11c['threadId'],_0x1ce075={'memberId':this['_userService'][_0x25d4ed(0x1d6)]()['userID'],'unitId':_0x48de68,'threadId':_0x9fde56,'solved':_0x47c11c['resolved']?I[_0x25d4ed(0x19f)]:I['OpenOrReOpen']},_0x45472c=await this[_0x25d4ed(0x1a9)][_0x25d4ed(0x1a2)](_0x25d4ed(0x1be)+_0x48de68+_0x25d4ed(0x184),{'body':_0x1ce075});return!_0x45472c[_0x25d4ed(0x1d5)][_0x25d4ed(0x18a)]||_0x45472c[_0x25d4ed(0x1d5)][_0x25d4ed(0x18a)][_0x25d4ed(0x171)]===0x1;}async['deleteComment'](_0x3b8353,_0x2d2e72,_0x19fc43,_0x5c6b43){const _0x6f6e4c=_0xde316f,_0x4287a7={'memberId':(await this[_0x6f6e4c(0x1dd)]['requireSession'](_0x3b8353))[_0x6f6e4c(0x1b9)](),'threadId':_0x19fc43,'replyId':_0x5c6b43,'unitId':_0x3b8353},_0x311dc6=await this['_httpService'][_0x6f6e4c(0x1a2)](_0x6f6e4c(0x1be)+_0x3b8353+_0x6f6e4c(0x167),{'body':_0x4287a7});return!_0x311dc6[_0x6f6e4c(0x1d5)][_0x6f6e4c(0x18a)]||_0x311dc6[_0x6f6e4c(0x1d5)][_0x6f6e4c(0x18a)][_0x6f6e4c(0x171)]===0x1;}async[_0xde316f(0x17b)](_0xdd9d06,_0x8b3d6a,_0x15bade){const _0x2e8c18=_0xde316f,_0x5b7aa1={'unitId':_0xdd9d06,'threadId':_0x15bade},_0x5681c9=await this['_httpService'][_0x2e8c18(0x1a2)](_0x2e8c18(0x1be)+_0xdd9d06+'/list',{'body':_0x5b7aa1}),_0x3bafae=_0x15bade[_0x2e8c18(0x1d3)](_0x28ca65=>G(_0x5681c9['body'][_0x2e8c18(0x174)][_0x28ca65],_0xdd9d06,_0x8b3d6a))[_0x2e8c18(0x182)](Boolean);return Object[_0x2e8c18(0x1db)](_0x5681c9[_0x2e8c18(0x1d5)][_0x2e8c18(0x189)])['forEach'](_0x476edd=>{const _0x377347=_0x2e8c18;this[_0x377347(0x1ad)]['addUser'](_0x476edd);}),_0x3bafae;}[_0xde316f(0x1ac)](_0x16f041){const _0x26cd82=_0xde316f;return{'id':_0x16f041['id'],'threadId':_0x16f041[_0x26cd82(0x17a)],'ref':_0x16f041[_0x26cd82(0x1af)]};}};function _0x410f(){const _0x360197=['post','onStarting','type','UniverThreadCommentUIPlugin','bufferTime','12318952oILeJr','getUser','_httpService','Unknown','_initUserSync','saveCommentToSnapshot','_userService','format','ref','_config','rangeType','length','YYYY/MM/DD\x20HH:mm','getOwnPropertyDescriptor','forEach','UserManagerService','deleteComment','70cUBFjh','getMemberID','Add','Module','_threadCommentModel','UNRECOGNIZED','/universer-api/comment/unit/','thread-comment-data-source.config','@univerjs/core','solved','@univerjs-pro/collaboration-client','defineProperty','updateComment','get','requireSession','5016474yxHZGQ','payload','IThreadCommentDataSourceService','comment','_threadCommentDataSource','_commentService','UniverThreadCommentDataSourcePlugin','commentUpdate$','personId','onReady','9919420bUNqkY','CommentService','map','_initDataSource','body','getCurrentUser','getUnit','addComment','parentId','Solve','values','customRanges','_sessionService','subscribe','getComment','rangeId','syncUpdateMutationToColla','Disposable','124qABTVL','/delete','dataSource','/add','resolveComment','_injector','delete','replies','UniverInstanceType','HTTPService','/reply','code','2139666rYSGBS','UniverLicensePlugin','comments','UNIVER_UNKNOWN','20DTfzIs','content','disposeWithMe','DependentOn','threadId','listComments','763264JRZBZL','rxjs','replyId','@univerjs/thread-comment-ui','setConfig','dayjs','filter','symbol','/solved','createTimestamp','_init','OpenOrReOpen','unitId','users','error','add','ThreadCommentModel','Injector','COMMENT','7636AykMvN','userId','slice','parse','@univerjs/thread-comment','1548846viSAnw','root','CustomRangeType','Edit','_configService','addUser','Reply','Delete','user','stringify','Inject','Solved','find','@univerjs-pro/license'];_0x410f=function(){return _0x360197;};return _0x410f();}g=x([_(0x0,c[_0xde316f(0x19e)](P[_0xde316f(0x16f)])),_(0x1,c[_0xde316f(0x19e)](c[_0xde316f(0x1b6)])),_(0x2,c[_0xde316f(0x19e)](b['CollaborationSessionService'])),_(0x3,c['Inject'](c[_0xde316f(0x18d)]))],g);var H=Object[_0xde316f(0x1b4)],J=(_0x1b704b,_0x15fd41,_0x5ef9d0,_0x4e6c8d)=>{const _0x18f829=_0xde316f;for(var _0x92354b=_0x4e6c8d>0x1?void 0x0:_0x4e6c8d?H(_0x15fd41,_0x5ef9d0):_0x15fd41,_0xe48a5d=_0x1b704b[_0x18f829(0x1b2)]-0x1,_0x274e4c;_0xe48a5d>=0x0;_0xe48a5d--)(_0x274e4c=_0x1b704b[_0xe48a5d])&&(_0x92354b=_0x274e4c(_0x92354b)||_0x92354b);return _0x92354b;},y=(_0x21240e,_0x10c486)=>(_0x9a0ec5,_0x41455a)=>_0x10c486(_0x9a0ec5,_0x41455a,_0x21240e);let C=class extends c[_0xde316f(0x1e2)]{constructor(_0x4f3260,_0x52efe0){const _0x13c558=_0xde316f;super(),this['_threadCommentDataSourceService']=_0x4f3260,this[_0x13c558(0x1cb)]=_0x52efe0,this[_0x13c558(0x1d4)]();}[_0xde316f(0x1d4)](){const _0x599c6e=_0xde316f;this['_threadCommentDataSourceService'][_0x599c6e(0x168)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x599c6e(0x1e1)]=!0x1;}};C=J([y(0x0,M[_0xde316f(0x1c9)]),y(0x1,c[_0xde316f(0x19e)](g))],C);var F=Object[_0xde316f(0x1c3)],L=Object[_0xde316f(0x1b4)],Z=(_0x45a7c7,_0x1601a5,_0x541237)=>_0x1601a5 in _0x45a7c7?F(_0x45a7c7,_0x1601a5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x541237}):_0x45a7c7[_0x1601a5]=_0x541237,W=(_0x4125b2,_0x4363d2,_0x54e831,_0xbe72e5)=>{const _0x1e5963=_0xde316f;for(var _0x2ba762=_0xbe72e5>0x1?void 0x0:_0xbe72e5?L(_0x4363d2,_0x54e831):_0x4363d2,_0x1511eb=_0x4125b2[_0x1e5963(0x1b2)]-0x1,_0x2a3291;_0x1511eb>=0x0;_0x1511eb--)(_0x2a3291=_0x4125b2[_0x1511eb])&&(_0x2ba762=_0x2a3291(_0x2ba762)||_0x2ba762);return _0x2ba762;},O=(_0x31bdf3,_0x47473d)=>(_0x5ba526,_0x579a37)=>_0x47473d(_0x5ba526,_0x579a37,_0x31bdf3),N=(_0x51b2cc,_0x9a1bd9,_0x3f9bdf)=>Z(_0x51b2cc,typeof _0x9a1bd9!=_0xde316f(0x183)?_0x9a1bd9+'':_0x9a1bd9,_0x3f9bdf);exports['UniverThreadCommentDataSourcePlugin']=class extends c['Plugin']{constructor(_0x2f4ef1=D,_0x5b16cf,_0x4271d9){const _0x57290d=_0xde316f;super(),this[_0x57290d(0x1b0)]=_0x2f4ef1,this[_0x57290d(0x16b)]=_0x5b16cf,this[_0x57290d(0x198)]=_0x4271d9;const {..._0x85ad8f}=c['merge']({},D,this[_0x57290d(0x1b0)]);this[_0x57290d(0x198)][_0x57290d(0x180)](q,_0x85ad8f);}[_0xde316f(0x1a3)](){[[g],[C],[p]]['forEach'](_0x3d30d8=>{const _0x378af1=_0x5290;this[_0x378af1(0x16b)][_0x378af1(0x18b)](_0x3d30d8);});}[_0xde316f(0x1d0)](){const _0x18688e=_0xde316f;this[_0x18688e(0x16b)][_0x18688e(0x1c5)](C),this['_injector'][_0x18688e(0x1c5)](p);}},N(exports[_0xde316f(0x1cd)],'pluginName',U),N(exports[_0xde316f(0x1cd)],_0xde316f(0x1a4),c[_0xde316f(0x16e)][_0xde316f(0x175)]),exports[_0xde316f(0x1cd)]=W([c[_0xde316f(0x179)](j[_0xde316f(0x1a5)],b['UniverCollaborationClientPlugin'],T[_0xde316f(0x173)]),O(0x1,c[_0xde316f(0x19e)](c[_0xde316f(0x18d)])),O(0x2,c['IConfigService'])],exports[_0xde316f(0x1cd)]);
1
+ 'use strict';function _0x4fd9(){const _0x58879f=['Solved','post','add','Disposable','_httpService','pipe','YYYY/MM/DD\x20HH:mm','_commentService','map','defineProperty','deleteComment','delete','UniverInstanceType','_initUserSync','content','length','OpenOrReOpen','values','119RPzlpH','_sessionService','rangeId','getUnit','type','solved','personId','_threadCommentDataSourceService','size','_threadCommentModel','bufferTime','format','body','find','@univerjs-pro/license','_configService','syncUpdateMutationToColla','forEach','setConfig','toStringTag','unitId','getMemberID','onStarting','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_injector','userId','createTimestamp','UniverLicensePlugin','Plugin','UNIVER_UNKNOWN','UniverCollaborationClientPlugin','@univerjs/network','/solved','Reply','get','rangeType','310632naOuRh','UniverThreadCommentDataSourcePlugin','UserManagerService','/delete','comment','Edit','payload','getOwnPropertyDescriptor','Injector','CollaborationSessionService','ThreadCommentModel','user','@univerjs-pro/collaboration-client','DependentOn','root','stringify','237516wLguuy','HTTPService','IConfigService','disposeWithMe','rxjs','396988nEeYhO','_userService','UniverThreadCommentUIPlugin','dayjs','replyId','slice','_config','users','getComment','201132jwuakp','/edit','updateComment','error','CustomRangeType','COMMENT','CommentService','/universer-api/comment/unit/','/universer-api/user/list','Unknown','ref','reply','addUser','Delete','1664260Nhxsii','@univerjs/thread-comment','@univerjs/core','resolveComment','280DitZkK','Add','filter','replies','3LymGvI','requireSession','parse','pluginName','subscribe','UNRECOGNIZED','Inject','Solve','listComments','thread-comment-data-source.config','userID','_initDataSource','325720QiyiUW','getCurrentUser','getUser','threadId','2967350Spjkcc','commentUpdate$','code'];_0x4fd9=function(){return _0x58879f;};return _0x4fd9();}const _0x10b130=_0x58aa;(function(_0x1ba2a3,_0x2a1beb){const _0x1829f0=_0x58aa,_0x5ecf5b=_0x1ba2a3();while(!![]){try{const _0x41b4f6=-parseInt(_0x1829f0(0x9a))/0x1+-parseInt(_0x1829f0(0xb1))/0x2+-parseInt(_0x1829f0(0xb9))/0x3*(-parseInt(_0x1829f0(0x95))/0x4)+parseInt(_0x1829f0(0xc9))/0x5+-parseInt(_0x1829f0(0x85))/0x6*(-parseInt(_0x1829f0(0xde))/0x7)+-parseInt(_0x1829f0(0xc5))/0x8+parseInt(_0x1829f0(0xa3))/0x9*(parseInt(_0x1829f0(0xb5))/0xa);if(_0x41b4f6===_0x2a1beb)break;else _0x5ecf5b['push'](_0x5ecf5b['shift']());}catch(_0x13bb1b){_0x5ecf5b['push'](_0x5ecf5b['shift']());}}}(_0x4fd9,0xd9034));Object[_0x10b130(0xd5)](exports,Symbol[_0x10b130(0x74)],{'value':'Module'});const b=require(_0x10b130(0x91)),T=require(_0x10b130(0xec)),c=require(_0x10b130(0xb3)),j=require('@univerjs/thread-comment-ui'),M=require(_0x10b130(0xb2)),w=require(_0x10b130(0x99)),P=require(_0x10b130(0x80)),U=_0x10b130(0x78);var I=(_0x47575e=>(_0x47575e[_0x47575e[_0x10b130(0xdc)]=0x0]=_0x10b130(0xdc),_0x47575e[_0x47575e['Solved']=0x1]=_0x10b130(0xcc),_0x47575e[_0x47575e[_0x10b130(0xbe)]=-0x1]=_0x10b130(0xbe),_0x47575e))(I||{}),v=(_0x2ecda8=>(_0x2ecda8[_0x2ecda8[_0x10b130(0xac)]=0x0]=_0x10b130(0xac),_0x2ecda8[_0x2ecda8[_0x10b130(0xb6)]=0x1]=_0x10b130(0xb6),_0x2ecda8[_0x2ecda8[_0x10b130(0x82)]=0x2]=_0x10b130(0x82),_0x2ecda8[_0x2ecda8[_0x10b130(0x8a)]=0x3]=_0x10b130(0x8a),_0x2ecda8[_0x2ecda8['Delete']=0x4]=_0x10b130(0xb0),_0x2ecda8[_0x2ecda8[_0x10b130(0xc0)]=0x5]=_0x10b130(0xc0),_0x2ecda8[_0x2ecda8[_0x10b130(0xbe)]=-0x1]=_0x10b130(0xbe),_0x2ecda8))(v||{});const f=_0x658ae4=>c[_0x10b130(0x9d)](new Date(+_0x658ae4))[_0x10b130(0xe9)](_0x10b130(0xd2)),R=async(_0x3f07c3,_0x1df1f5)=>{const _0x5f52e2=_0x10b130,_0x1f09da=_0x3f07c3[_0x5f52e2(0x83)](c['UserManagerService']),_0x596254=_0x3f07c3[_0x5f52e2(0x83)](P['HTTPService']);_0x1df1f5[_0x5f52e2(0xef)](_0x5b7f5d=>{const _0x4a4a6e=_0x5f52e2;_0x1f09da[_0x4a4a6e(0xc7)](_0x5b7f5d)&&_0x1df1f5[_0x4a4a6e(0xd7)](_0x5b7f5d);}),_0x1df1f5[_0x5f52e2(0xe6)]&&(await _0x596254['get'](_0x5f52e2(0xab),{'params':{'userIDs':[..._0x1df1f5]}}))[_0x5f52e2(0xea)][_0x5f52e2(0xa1)][_0x5f52e2(0xef)](_0xf84f34=>{const _0x535f64=_0x5f52e2;_0xf84f34&&_0x1f09da[_0x535f64(0xaf)](_0xf84f34);});};function _0x58aa(_0x265a73,_0x39b447){const _0x4fd9a4=_0x4fd9();return _0x58aa=function(_0x58aae5,_0x301b7e){_0x58aae5=_0x58aae5-0x74;let _0x5f0b9b=_0x4fd9a4[_0x58aae5];return _0x5f0b9b;},_0x58aa(_0x265a73,_0x39b447);}var $=Object[_0x10b130(0x8c)],E=(_0x534c07,_0x22ef74,_0x2e4119,_0x41c02d)=>{const _0x44408a=_0x10b130;for(var _0x257e40=_0x41c02d>0x1?void 0x0:_0x41c02d?$(_0x22ef74,_0x2e4119):_0x22ef74,_0x4cc885=_0x534c07[_0x44408a(0xdb)]-0x1,_0x424cfc;_0x4cc885>=0x0;_0x4cc885--)(_0x424cfc=_0x534c07[_0x4cc885])&&(_0x257e40=_0x424cfc(_0x257e40)||_0x257e40);return _0x257e40;},S=(_0x3aef5d,_0x3afdd7)=>(_0x329fdd,_0x503744)=>_0x3afdd7(_0x329fdd,_0x503744,_0x3aef5d);let p=class extends c[_0x10b130(0xcf)]{constructor(_0x37086c,_0x30a34a,_0x28ef05,_0xfbbc9f){const _0x34e736=_0x10b130;super(),this['_commentService']=_0x37086c,this['_threadCommentModel']=_0x30a34a,this[_0x34e736(0x9b)]=_0x28ef05,this[_0x34e736(0x79)]=_0xfbbc9f,this['_init'](),this[_0x34e736(0xd9)]();}[_0x10b130(0xd9)](){const _0x2cc82c=_0x10b130;this[_0x2cc82c(0x98)](this['_threadCommentModel'][_0x2cc82c(0xca)][_0x2cc82c(0xd1)](w[_0x2cc82c(0xe8)](0x10))[_0x2cc82c(0xbd)](_0x135a60=>{const _0xfe5af3=_0x2cc82c,_0x2e6c31=new Set();_0x135a60[_0xfe5af3(0xef)](_0x115674=>{const _0x156831=_0xfe5af3;switch(_0x115674[_0x156831(0xe2)]){case _0x156831(0xce):{const _0x2ac142=_0x115674[_0x156831(0x8b)][_0x156831(0xe4)];_0x2e6c31['add'](_0x2ac142);break;}}}),R(this[_0xfe5af3(0x79)],_0x2e6c31);}));}['_init'](){const _0x35ad73=_0x10b130;this[_0x35ad73(0x98)](this[_0x35ad73(0xd3)][_0x35ad73(0xca)][_0x35ad73(0xbd)](async _0x58fc5c=>{const _0x1d6f85=_0x35ad73;var _0x4e2d0e,_0x26db5c,_0x3bba4d,_0x5025f1;const _0x250b25=(_0x4e2d0e=this[_0x1d6f85(0xe7)][_0x1d6f85(0xe1)](_0x58fc5c[_0x1d6f85(0x75)])[_0x1d6f85(0xeb)](_0x534fc4=>_0x534fc4['threadId']===_0x58fc5c[_0x1d6f85(0xc8)]))==null?void 0x0:_0x4e2d0e[_0x1d6f85(0x93)];if(!_0x250b25)return;const {unitId:_0x537dfd,subUnitId:_0x299d83}=_0x250b25;switch(_0x58fc5c[_0x1d6f85(0x90)]&&this['_userService'][_0x1d6f85(0xaf)](_0x58fc5c[_0x1d6f85(0x90)]),_0x58fc5c[_0x1d6f85(0xe2)]){case v[_0x1d6f85(0xb6)]:break;case v[_0x1d6f85(0x82)]:{this['_threadCommentModel']['addComment'](_0x537dfd,_0x299d83,{'unitId':_0x537dfd,'subUnitId':_0x299d83,'ref':'','id':_0x58fc5c[_0x1d6f85(0x9e)],'dT':f(+_0x58fc5c[_0x1d6f85(0x7b)]),'threadId':_0x58fc5c[_0x1d6f85(0xc8)],'personId':(_0x3bba4d=(_0x26db5c=_0x58fc5c[_0x1d6f85(0x90)])==null?void 0x0:_0x26db5c[_0x1d6f85(0xc3)])!=null?_0x3bba4d:_0x58fc5c['userId'],'text':JSON['parse'](_0x58fc5c[_0x1d6f85(0xda)]),'parentId':_0x250b25['id']});break;}case v['Delete']:{const _0x2561a5=this[_0x1d6f85(0xe7)][_0x1d6f85(0xa2)](_0x537dfd,_0x299d83,_0x58fc5c['replyId']);_0x2561a5&&_0x2561a5['parentId']&&this['_threadCommentModel'][_0x1d6f85(0xd6)](_0x537dfd,_0x299d83,_0x58fc5c['replyId']);break;}case v[_0x1d6f85(0x8a)]:{this[_0x1d6f85(0xe7)][_0x1d6f85(0xa5)](_0x537dfd,_0x299d83,{'commentId':_0x58fc5c[_0x1d6f85(0x9e)],'text':JSON['parse'](_0x58fc5c['content'])});break;}case v[_0x1d6f85(0xc0)]:{const _0x22bb67=(_0x5025f1=this['_threadCommentModel']['getUnit'](_0x58fc5c['unitId'])[_0x1d6f85(0xeb)](_0x11ee9=>_0x11ee9[_0x1d6f85(0xc8)]===_0x58fc5c['threadId']))==null?void 0x0:_0x5025f1[_0x1d6f85(0x93)];_0x22bb67&&this[_0x1d6f85(0xe7)][_0x1d6f85(0xb4)](_0x537dfd,_0x299d83,_0x22bb67['id'],_0x58fc5c[_0x1d6f85(0xe3)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x10b130(0xbf)](b[_0x10b130(0xa9)])),S(0x1,c[_0x10b130(0xbf)](M[_0x10b130(0x8f)])),S(0x2,c[_0x10b130(0xbf)](c[_0x10b130(0x87)])),S(0x3,c[_0x10b130(0xbf)](c[_0x10b130(0x8d)]))],p);const q=_0x10b130(0xc2),D={};var A=Object[_0x10b130(0x8c)],x=(_0x519b5a,_0x3b7abe,_0x10f75e,_0x1f7319)=>{for(var _0x4b614b=_0x1f7319>0x1?void 0x0:_0x1f7319?A(_0x3b7abe,_0x10f75e):_0x3b7abe,_0x5bad20=_0x519b5a['length']-0x1,_0x58c76d;_0x5bad20>=0x0;_0x5bad20--)(_0x58c76d=_0x519b5a[_0x5bad20])&&(_0x4b614b=_0x58c76d(_0x4b614b)||_0x4b614b);return _0x4b614b;},_=(_0x1efa33,_0x4f725d)=>(_0x70cfea,_0x11949a)=>_0x4f725d(_0x70cfea,_0x11949a,_0x1efa33);function Y(_0x182771,_0x367d8b){const _0x45f929=_0x10b130,_0x34d1e7=_0x182771[_0x45f929(0xb8)][0x0];return{..._0x367d8b,'id':_0x34d1e7['replyId'],'resolved':_0x182771[_0x45f929(0xe3)]===0x1,'dT':f(_0x34d1e7[_0x45f929(0x7b)]),'personId':_0x34d1e7[_0x45f929(0x7a)],'threadId':_0x34d1e7[_0x45f929(0xc8)]};}function G(_0x409390,_0x1161a3,_0x3a4a33){const _0x24c030=_0x10b130;var _0x9b5e6f,_0x3d5be1;if(((_0x3d5be1=(_0x9b5e6f=_0x409390==null?void 0x0:_0x409390[_0x24c030(0xb8)])==null?void 0x0:_0x9b5e6f[_0x24c030(0xdb)])!=null?_0x3d5be1:0x0)>0x0){const _0x109d0c=(_0x2dde5c,_0x27bdc4)=>({'id':_0x2dde5c[_0x24c030(0x9e)],'threadId':_0x2dde5c[_0x24c030(0xc8)],'dT':f(_0x2dde5c[_0x24c030(0x7b)]),'personId':_0x2dde5c[_0x24c030(0x7a)],'resolved':_0x409390[_0x24c030(0xe3)]===I[_0x24c030(0xcc)],'unitId':_0x1161a3,'subUnitId':_0x3a4a33,'text':JSON[_0x24c030(0xbb)](_0x2dde5c['content']),'parentId':_0x27bdc4}),_0x42de49=_0x109d0c(_0x409390[_0x24c030(0xb8)][0x0]);return{..._0x42de49,'children':_0x409390[_0x24c030(0xb8)][_0x24c030(0x9f)](0x1)[_0x24c030(0xd4)](_0x25ca08=>_0x109d0c(_0x25ca08,_0x42de49['id']))};}return null;}let g=class{constructor(_0x4b7ee7,_0x1051ec,_0x5a32a9,_0xb50a43){const _0x3728cf=_0x10b130;this['_httpService']=_0x4b7ee7,this[_0x3728cf(0x9b)]=_0x1051ec,this['_sessionService']=_0x5a32a9,this['_injector']=_0xb50a43;}async['addComment'](_0x367175){const _0x5eabb5=_0x10b130;var _0x208ef4,_0x3c8a5a;const {parentId:_0x232636,unitId:_0x3f1518,text:_0x200763,threadId:_0x1a7cab}=_0x367175,_0x1f127d=(_0x3c8a5a=(_0x208ef4=_0x200763['customRanges'])==null?void 0x0:_0x208ef4[_0x5eabb5(0xb7)](_0x26d6b8=>_0x26d6b8['rangeType']===c[_0x5eabb5(0xa7)][_0x5eabb5(0xa8)])[_0x5eabb5(0xd4)](_0x1974d6=>_0x1974d6[_0x5eabb5(0xe0)]))!=null?_0x3c8a5a:[],_0x855977=JSON[_0x5eabb5(0x94)](_0x200763),_0x44cb51=(await this[_0x5eabb5(0xdf)][_0x5eabb5(0xba)](_0x3f1518))[_0x5eabb5(0x76)]();if(_0x232636){const _0x5771ed={'memberId':_0x44cb51,'unitId':_0x3f1518,'content':_0x855977,'mention':_0x1f127d,'threadId':_0x1a7cab},_0x1d2399=(await this[_0x5eabb5(0xd0)][_0x5eabb5(0xcd)](_0x5eabb5(0xaa)+_0x3f1518+'/reply',{'body':_0x5771ed}))[_0x5eabb5(0xea)][_0x5eabb5(0xae)];return{..._0x367175,'id':_0x1d2399['replyId'],'dT':c[_0x5eabb5(0x9d)](+_0x1d2399['createTimestamp'])[_0x5eabb5(0xe9)](_0x5eabb5(0xd2)),'personId':_0x1d2399[_0x5eabb5(0x7a)]};}else{const _0x4be223={'memberId':_0x44cb51,'unitId':_0x3f1518,'content':_0x855977,'mention':_0x1f127d},_0x2c8ead=await this[_0x5eabb5(0xd0)][_0x5eabb5(0xcd)](_0x5eabb5(0xaa)+_0x3f1518+'/add',{'body':_0x4be223});return Y(_0x2c8ead[_0x5eabb5(0xea)][_0x5eabb5(0x89)],_0x367175);}}async['updateComment'](_0x26e151){const _0x2a1349=_0x10b130;var _0x5c29b3,_0x245137;const {text:_0x4e7600,unitId:_0x503a38}=_0x26e151,_0x49c7fb=(_0x245137=(_0x5c29b3=_0x4e7600['customRanges'])==null?void 0x0:_0x5c29b3[_0x2a1349(0xb7)](_0x56066a=>_0x56066a[_0x2a1349(0x84)]===c[_0x2a1349(0xa7)][_0x2a1349(0xa8)])['map'](_0x1252ba=>_0x1252ba[_0x2a1349(0xe0)]))!=null?_0x245137:[],_0x1be882=JSON[_0x2a1349(0x94)](_0x4e7600),_0x51961c=_0x26e151['threadId'],_0x36bdcc=_0x26e151['id'],_0x3b534d={'memberId':(await this[_0x2a1349(0xdf)]['requireSession'](_0x503a38))['getMemberID'](),'unitId':_0x503a38,'threadId':_0x51961c,'mention':_0x49c7fb,'content':_0x1be882,'replyId':_0x36bdcc},_0x4a2393=await this[_0x2a1349(0xd0)][_0x2a1349(0xcd)]('/universer-api/comment/unit/'+_0x503a38+_0x2a1349(0xa4),{'body':_0x3b534d});return!_0x4a2393[_0x2a1349(0xea)][_0x2a1349(0xa6)]||_0x4a2393['body'][_0x2a1349(0xa6)][_0x2a1349(0xcb)]===0x1;}async[_0x10b130(0xb4)](_0x56fd15){const _0x53e6b4=_0x10b130,{unitId:_0x77dd7f}=_0x56fd15,_0x3e72fc=_0x56fd15['threadId'],_0x2d3277={'memberId':this[_0x53e6b4(0x9b)][_0x53e6b4(0xc6)]()[_0x53e6b4(0xc3)],'unitId':_0x77dd7f,'threadId':_0x3e72fc,'solved':_0x56fd15['resolved']?I[_0x53e6b4(0xcc)]:I[_0x53e6b4(0xdc)]},_0x5a9c6d=await this['_httpService'][_0x53e6b4(0xcd)](_0x53e6b4(0xaa)+_0x77dd7f+_0x53e6b4(0x81),{'body':_0x2d3277});return!_0x5a9c6d[_0x53e6b4(0xea)]['error']||_0x5a9c6d[_0x53e6b4(0xea)][_0x53e6b4(0xa6)][_0x53e6b4(0xcb)]===0x1;}async[_0x10b130(0xd6)](_0xd001b1,_0x231afc,_0x4652ba,_0x3a07b3){const _0xe570b6=_0x10b130,_0x1b3170={'memberId':(await this['_sessionService'][_0xe570b6(0xba)](_0xd001b1))['getMemberID'](),'threadId':_0x4652ba,'replyId':_0x3a07b3,'unitId':_0xd001b1},_0xf13846=await this['_httpService']['post'](_0xe570b6(0xaa)+_0xd001b1+_0xe570b6(0x88),{'body':_0x1b3170});return!_0xf13846[_0xe570b6(0xea)][_0xe570b6(0xa6)]||_0xf13846[_0xe570b6(0xea)][_0xe570b6(0xa6)][_0xe570b6(0xcb)]===0x1;}async[_0x10b130(0xc1)](_0x717263,_0x2ccb06,_0x208ca9){const _0x2ef74d=_0x10b130,_0x5176c7={'unitId':_0x717263,'threadId':_0x208ca9},_0x56b8be=await this[_0x2ef74d(0xd0)][_0x2ef74d(0xcd)]('/universer-api/comment/unit/'+_0x717263+'/list',{'body':_0x5176c7}),_0x4f0f35=_0x208ca9[_0x2ef74d(0xd4)](_0x4fe541=>G(_0x56b8be['body']['comments'][_0x4fe541],_0x717263,_0x2ccb06))[_0x2ef74d(0xb7)](Boolean);return Object[_0x2ef74d(0xdd)](_0x56b8be['body'][_0x2ef74d(0xa1)])[_0x2ef74d(0xef)](_0x4871b5=>{const _0x4928d1=_0x2ef74d;this[_0x4928d1(0x9b)][_0x4928d1(0xaf)](_0x4871b5);}),_0x4f0f35;}['saveCommentToSnapshot'](_0x5ddf70){const _0x3ae560=_0x10b130;return{'id':_0x5ddf70['id'],'threadId':_0x5ddf70['threadId'],'ref':_0x5ddf70[_0x3ae560(0xad)]};}};g=x([_(0x0,c[_0x10b130(0xbf)](P[_0x10b130(0x96)])),_(0x1,c[_0x10b130(0xbf)](c[_0x10b130(0x87)])),_(0x2,c[_0x10b130(0xbf)](b[_0x10b130(0x8e)])),_(0x3,c['Inject'](c[_0x10b130(0x8d)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x4b16fe,_0x39c80c,_0x449f64,_0x23d5f9)=>{const _0x47cdc4=_0x10b130;for(var _0x54723e=_0x23d5f9>0x1?void 0x0:_0x23d5f9?H(_0x39c80c,_0x449f64):_0x39c80c,_0x9f9d8c=_0x4b16fe[_0x47cdc4(0xdb)]-0x1,_0x337dd8;_0x9f9d8c>=0x0;_0x9f9d8c--)(_0x337dd8=_0x4b16fe[_0x9f9d8c])&&(_0x54723e=_0x337dd8(_0x54723e)||_0x54723e);return _0x54723e;},y=(_0x1c5ec4,_0x5683ca)=>(_0x407bc0,_0x559865)=>_0x5683ca(_0x407bc0,_0x559865,_0x1c5ec4);let C=class extends c[_0x10b130(0xcf)]{constructor(_0x22da11,_0x5f1382){const _0x2888f3=_0x10b130;super(),this[_0x2888f3(0xe5)]=_0x22da11,this['_threadCommentDataSource']=_0x5f1382,this[_0x2888f3(0xc4)]();}[_0x10b130(0xc4)](){const _0x2666e3=_0x10b130;this[_0x2666e3(0xe5)]['dataSource']=this['_threadCommentDataSource'],this[_0x2666e3(0xe5)][_0x2666e3(0xee)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](g))],C);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x5e8a97,_0x39381b,_0x11196b)=>_0x39381b in _0x5e8a97?F(_0x5e8a97,_0x39381b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x11196b}):_0x5e8a97[_0x39381b]=_0x11196b,W=(_0x45d107,_0xe2d280,_0x5c3fc5,_0x49ed4b)=>{const _0x1fe187=_0x10b130;for(var _0x3a4e5d=_0x49ed4b>0x1?void 0x0:_0x49ed4b?L(_0xe2d280,_0x5c3fc5):_0xe2d280,_0x2c266a=_0x45d107[_0x1fe187(0xdb)]-0x1,_0x78c81;_0x2c266a>=0x0;_0x2c266a--)(_0x78c81=_0x45d107[_0x2c266a])&&(_0x3a4e5d=_0x78c81(_0x3a4e5d)||_0x3a4e5d);return _0x3a4e5d;},O=(_0x40c47d,_0x5cca60)=>(_0xeb84c2,_0x3db740)=>_0x5cca60(_0xeb84c2,_0x3db740,_0x40c47d),N=(_0x3c544b,_0x387f5b,_0x2066e5)=>Z(_0x3c544b,typeof _0x387f5b!='symbol'?_0x387f5b+'':_0x387f5b,_0x2066e5);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x10b130(0x7d)]{constructor(_0x2fbe53=D,_0x1f23af,_0x18c81d){const _0x1a8b87=_0x10b130;super(),this[_0x1a8b87(0xa0)]=_0x2fbe53,this['_injector']=_0x1f23af,this[_0x1a8b87(0xed)]=_0x18c81d;const {..._0x491d03}=c['merge']({},D,this['_config']);this[_0x1a8b87(0xed)][_0x1a8b87(0xf0)](q,_0x491d03);}[_0x10b130(0x77)](){const _0x342c80=_0x10b130;[[g],[C],[p]][_0x342c80(0xef)](_0x2c1180=>{const _0x2551d4=_0x342c80;this['_injector'][_0x2551d4(0xce)](_0x2c1180);});}['onReady'](){const _0x5cf8b4=_0x10b130;this['_injector'][_0x5cf8b4(0x83)](C),this[_0x5cf8b4(0x79)][_0x5cf8b4(0x83)](p);}},N(exports[_0x10b130(0x86)],_0x10b130(0xbc),U),N(exports[_0x10b130(0x86)],_0x10b130(0xe2),c[_0x10b130(0xd8)][_0x10b130(0x7e)]),exports[_0x10b130(0x86)]=W([c[_0x10b130(0x92)](j[_0x10b130(0x9c)],b[_0x10b130(0x7f)],T[_0x10b130(0x7c)]),O(0x1,c['Inject'](c[_0x10b130(0x8d)])),O(0x2,c[_0x10b130(0x97)])],exports[_0x10b130(0x86)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x2db34b=_0xa939;(function(_0x8f2a5,_0x11f41f){const _0x46c229=_0xa939,_0x26a478=_0x8f2a5();while(!![]){try{const _0x4846b8=-parseInt(_0x46c229(0x1db))/0x1*(parseInt(_0x46c229(0x1dd))/0x2)+-parseInt(_0x46c229(0x1a2))/0x3+-parseInt(_0x46c229(0x196))/0x4+-parseInt(_0x46c229(0x1cc))/0x5+-parseInt(_0x46c229(0x1c6))/0x6+parseInt(_0x46c229(0x1ee))/0x7+parseInt(_0x46c229(0x1cb))/0x8;if(_0x4846b8===_0x11f41f)break;else _0x26a478['push'](_0x26a478['shift']());}catch(_0x452914){_0x26a478['push'](_0x26a478['shift']());}}}(_0x1535,0x2f021));import{CommentService as _0x518e23,CollaborationSessionService as _0x25437f,UniverCollaborationClientPlugin as _0x498854}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5bfe90}from'@univerjs-pro/license';import{dayjs as _0x4cfdfe,UserManagerService as _0xd09db,Inject as _0x5c8dc2,Injector as _0x555bce,Disposable as _0x209d22,CustomRangeType as _0x4a9146,UniverInstanceType as _0x4bf91a,DependentOn as _0x5f5485,IConfigService as _0x91542d,Plugin as _0x47c1c6,merge as _0x20b3b4}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x356d5f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x54939c,IThreadCommentDataSourceService as _0x3546ec}from'@univerjs/thread-comment';import{bufferTime as _0x3db8b5}from'rxjs';import{HTTPService as _0x9577a3}from'@univerjs/network';const W=_0x2db34b(0x1e8);var I=(_0x140958=>(_0x140958[_0x140958[_0x2db34b(0x1ad)]=0x0]=_0x2db34b(0x1ad),_0x140958[_0x140958['Solved']=0x1]='Solved',_0x140958[_0x140958[_0x2db34b(0x1e0)]=-0x1]=_0x2db34b(0x1e0),_0x140958))(I||{}),v=(_0x249edc=>(_0x249edc[_0x249edc[_0x2db34b(0x199)]=0x0]=_0x2db34b(0x199),_0x249edc[_0x249edc[_0x2db34b(0x1b8)]=0x1]='Add',_0x249edc[_0x249edc[_0x2db34b(0x1b4)]=0x2]=_0x2db34b(0x1b4),_0x249edc[_0x249edc[_0x2db34b(0x1e7)]=0x3]=_0x2db34b(0x1e7),_0x249edc[_0x249edc['Delete']=0x4]=_0x2db34b(0x1a7),_0x249edc[_0x249edc[_0x2db34b(0x1cf)]=0x5]='Solve',_0x249edc[_0x249edc['UNRECOGNIZED']=-0x1]=_0x2db34b(0x1e0),_0x249edc))(v||{});const D=_0x2745e3=>_0x4cfdfe(new Date(+_0x2745e3))[_0x2db34b(0x1aa)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x256ec9,_0xb841ce)=>{const _0x267fa5=_0x2db34b,_0x426e2f=_0x256ec9[_0x267fa5(0x1dc)](_0xd09db),_0x325a63=_0x256ec9['get'](_0x9577a3);_0xb841ce['forEach'](_0x5e6cd2=>{const _0x49571b=_0x267fa5;_0x426e2f[_0x49571b(0x1f6)](_0x5e6cd2)&&_0xb841ce[_0x49571b(0x1ef)](_0x5e6cd2);}),_0xb841ce[_0x267fa5(0x1df)]&&(await _0x325a63[_0x267fa5(0x1dc)](_0x267fa5(0x1d9),{'params':{'userIDs':[..._0xb841ce]}}))[_0x267fa5(0x1d2)][_0x267fa5(0x1a9)][_0x267fa5(0x1bb)](_0x463179=>{_0x463179&&_0x426e2f['addUser'](_0x463179);});};var K=Object[_0x2db34b(0x1f2)],V=(_0x1d2dd7,_0x93bb7e,_0x58492d,_0x47e7b3)=>{const _0x3bff70=_0x2db34b;for(var _0x49c219=_0x47e7b3>0x1?void 0x0:_0x47e7b3?K(_0x93bb7e,_0x58492d):_0x93bb7e,_0x2d1296=_0x1d2dd7[_0x3bff70(0x1f7)]-0x1,_0x1f9586;_0x2d1296>=0x0;_0x2d1296--)(_0x1f9586=_0x1d2dd7[_0x2d1296])&&(_0x49c219=_0x1f9586(_0x49c219)||_0x49c219);return _0x49c219;},p=(_0x3531c5,_0x38a4f8)=>(_0x5c6ea6,_0x124d6d)=>_0x38a4f8(_0x5c6ea6,_0x124d6d,_0x3531c5);function _0x1535(){const _0x534a3b=['listComments','7085632GlEhar','1499825TlKWbd','rangeId','_userService','Solve','_injector','defineProperty','body','find','values','createTimestamp','filter','onStarting','comments','/universer-api/user/list','replyId','140915RGdQlX','get','4XIOJHI','_initUserSync','size','UNRECOGNIZED','saveCommentToSnapshot','symbol','post','type','resolveComment','code','Edit','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','syncUpdateMutationToColla','_configService','ref','dataSource','addUser','1929025FlcjKI','delete','YYYY/MM/DD\x20HH:mm','parse','getOwnPropertyDescriptor','user','/edit','solved','getUser','length','updateComment','customRanges','thread-comment-data-source.config','/solved','_threadCommentDataSource','137028PJoWEq','pluginName','stringify','Unknown','COMMENT','disposeWithMe','unitId','replies','_init','Solved','root','/delete','601755PVCpup','personId','_commentService','_threadCommentDataSourceService','_config','Delete','onReady','users','format','addComment','_sessionService','OpenOrReOpen','commentUpdate$','_httpService','/universer-api/comment/unit/','content','getUnit','add','Reply','comment','parentId','userId','Add','threadId','_initDataSource','forEach','setConfig','slice','error','userID','getComment','getMemberID','deleteComment','map','reply','_threadCommentModel','912582qKzGGT','subscribe','getCurrentUser','requireSession'];_0x1535=function(){return _0x534a3b;};return _0x1535();}let S=class extends _0x209d22{constructor(_0x2ccf85,_0x23cdd5,_0x102600,_0xe3c5b3){const _0x16f0a2=_0x2db34b;super(),this[_0x16f0a2(0x1a4)]=_0x2ccf85,this['_threadCommentModel']=_0x23cdd5,this[_0x16f0a2(0x1ce)]=_0x102600,this[_0x16f0a2(0x1d0)]=_0xe3c5b3,this[_0x16f0a2(0x19e)](),this[_0x16f0a2(0x1de)]();}[_0x2db34b(0x1de)](){const _0x1490e2=_0x2db34b;this[_0x1490e2(0x19b)](this['_threadCommentModel'][_0x1490e2(0x1ae)]['pipe'](_0x3db8b5(0x10))[_0x1490e2(0x1c7)](_0x521090=>{const _0x3d2f8a=_0x1490e2,_0x3d5ae9=new Set();_0x521090[_0x3d2f8a(0x1bb)](_0x3b7597=>{const _0x18666a=_0x3d2f8a;switch(_0x3b7597[_0x18666a(0x1e4)]){case _0x18666a(0x1b3):{const _0x2bb14e=_0x3b7597['payload'][_0x18666a(0x1a3)];_0x3d5ae9[_0x18666a(0x1b3)](_0x2bb14e);break;}}}),B(this[_0x3d2f8a(0x1d0)],_0x3d5ae9);}));}['_init'](){const _0x415a45=_0x2db34b;this[_0x415a45(0x19b)](this[_0x415a45(0x1a4)][_0x415a45(0x1ae)][_0x415a45(0x1c7)](async _0x155b3f=>{const _0x16e2c5=_0x415a45;var _0x298ef1,_0x3ecb30,_0x11765a,_0x5bba12;const _0x5bb1d0=(_0x298ef1=this[_0x16e2c5(0x1c5)][_0x16e2c5(0x1b2)](_0x155b3f[_0x16e2c5(0x19c)])[_0x16e2c5(0x1d3)](_0x42b700=>_0x42b700['threadId']===_0x155b3f[_0x16e2c5(0x1b9)]))==null?void 0x0:_0x298ef1[_0x16e2c5(0x1a0)];if(!_0x5bb1d0)return;const {unitId:_0x1afcf1,subUnitId:_0x2c758b}=_0x5bb1d0;switch(_0x155b3f['user']&&this[_0x16e2c5(0x1ce)][_0x16e2c5(0x1ed)](_0x155b3f[_0x16e2c5(0x1f3)]),_0x155b3f['type']){case v[_0x16e2c5(0x1b8)]:break;case v['Reply']:{this['_threadCommentModel']['addComment'](_0x1afcf1,_0x2c758b,{'unitId':_0x1afcf1,'subUnitId':_0x2c758b,'ref':'','id':_0x155b3f[_0x16e2c5(0x1da)],'dT':D(+_0x155b3f[_0x16e2c5(0x1d5)]),'threadId':_0x155b3f['threadId'],'personId':(_0x11765a=(_0x3ecb30=_0x155b3f[_0x16e2c5(0x1f3)])==null?void 0x0:_0x3ecb30['userID'])!=null?_0x11765a:_0x155b3f[_0x16e2c5(0x1b7)],'text':JSON[_0x16e2c5(0x1f1)](_0x155b3f['content']),'parentId':_0x5bb1d0['id']});break;}case v[_0x16e2c5(0x1a7)]:{const _0x4381de=this['_threadCommentModel'][_0x16e2c5(0x1c0)](_0x1afcf1,_0x2c758b,_0x155b3f[_0x16e2c5(0x1da)]);_0x4381de&&_0x4381de[_0x16e2c5(0x1b6)]&&this[_0x16e2c5(0x1c5)][_0x16e2c5(0x1c2)](_0x1afcf1,_0x2c758b,_0x155b3f[_0x16e2c5(0x1da)]);break;}case v[_0x16e2c5(0x1e7)]:{this[_0x16e2c5(0x1c5)][_0x16e2c5(0x191)](_0x1afcf1,_0x2c758b,{'commentId':_0x155b3f[_0x16e2c5(0x1da)],'text':JSON[_0x16e2c5(0x1f1)](_0x155b3f[_0x16e2c5(0x1b1)])});break;}case v[_0x16e2c5(0x1cf)]:{const _0x194f9c=(_0x5bba12=this[_0x16e2c5(0x1c5)][_0x16e2c5(0x1b2)](_0x155b3f[_0x16e2c5(0x19c)])['find'](_0x73b62e=>_0x73b62e[_0x16e2c5(0x1b9)]===_0x155b3f['threadId']))==null?void 0x0:_0x5bba12[_0x16e2c5(0x1a0)];_0x194f9c&&this[_0x16e2c5(0x1c5)]['resolveComment'](_0x1afcf1,_0x2c758b,_0x194f9c['id'],_0x155b3f['solved']===I[_0x16e2c5(0x19f)]);break;}}}));}};S=V([p(0x0,_0x5c8dc2(_0x518e23)),p(0x1,_0x5c8dc2(_0x54939c)),p(0x2,_0x5c8dc2(_0xd09db)),p(0x3,_0x5c8dc2(_0x555bce))],S);const z=_0x2db34b(0x193),M={};var k=Object[_0x2db34b(0x1f2)],Q=(_0x12d8ba,_0x2e720f,_0x5ecb35,_0x12556a)=>{const _0x34d821=_0x2db34b;for(var _0x28d042=_0x12556a>0x1?void 0x0:_0x12556a?k(_0x2e720f,_0x5ecb35):_0x2e720f,_0xc5696e=_0x12d8ba[_0x34d821(0x1f7)]-0x1,_0x13e84f;_0xc5696e>=0x0;_0xc5696e--)(_0x13e84f=_0x12d8ba[_0xc5696e])&&(_0x28d042=_0x13e84f(_0x28d042)||_0x28d042);return _0x28d042;},_=(_0x396d9f,_0x584c3b)=>(_0x219826,_0x3ed782)=>_0x584c3b(_0x219826,_0x3ed782,_0x396d9f);function X(_0x1010f0,_0x50c67c){const _0x440225=_0x2db34b,_0x1e4ea7=_0x1010f0['replies'][0x0];return{..._0x50c67c,'id':_0x1e4ea7[_0x440225(0x1da)],'resolved':_0x1010f0[_0x440225(0x1f5)]===0x1,'dT':D(_0x1e4ea7[_0x440225(0x1d5)]),'personId':_0x1e4ea7[_0x440225(0x1b7)],'threadId':_0x1e4ea7[_0x440225(0x1b9)]};}function ee(_0x4b4504,_0xdc293e,_0x1c736a){const _0x368ce1=_0x2db34b;var _0x3b788c,_0x1aaf27;if(((_0x1aaf27=(_0x3b788c=_0x4b4504==null?void 0x0:_0x4b4504['replies'])==null?void 0x0:_0x3b788c[_0x368ce1(0x1f7)])!=null?_0x1aaf27:0x0)>0x0){const _0xc2fef0=(_0x190e50,_0x5b9b75)=>({'id':_0x190e50['replyId'],'threadId':_0x190e50[_0x368ce1(0x1b9)],'dT':D(_0x190e50[_0x368ce1(0x1d5)]),'personId':_0x190e50[_0x368ce1(0x1b7)],'resolved':_0x4b4504['solved']===I[_0x368ce1(0x19f)],'unitId':_0xdc293e,'subUnitId':_0x1c736a,'text':JSON[_0x368ce1(0x1f1)](_0x190e50[_0x368ce1(0x1b1)]),'parentId':_0x5b9b75}),_0x32a2da=_0xc2fef0(_0x4b4504[_0x368ce1(0x19d)][0x0]);return{..._0x32a2da,'children':_0x4b4504[_0x368ce1(0x19d)][_0x368ce1(0x1bd)](0x1)['map'](_0x530621=>_0xc2fef0(_0x530621,_0x32a2da['id']))};}return null;}let f=class{constructor(_0x308845,_0x16a615,_0x5c14b3,_0x31dc07){const _0x3ee019=_0x2db34b;this[_0x3ee019(0x1af)]=_0x308845,this[_0x3ee019(0x1ce)]=_0x16a615,this['_sessionService']=_0x5c14b3,this[_0x3ee019(0x1d0)]=_0x31dc07;}async[_0x2db34b(0x1ab)](_0x1f1b33){const _0x22c5d0=_0x2db34b;var _0x5c3ce7,_0x29e54e;const {parentId:_0x2f1bed,unitId:_0x2daf1d,text:_0x4d7839,threadId:_0x3e755d}=_0x1f1b33,_0x57d218=(_0x29e54e=(_0x5c3ce7=_0x4d7839[_0x22c5d0(0x192)])==null?void 0x0:_0x5c3ce7[_0x22c5d0(0x1d6)](_0x554aa9=>_0x554aa9['rangeType']===_0x4a9146['COMMENT'])[_0x22c5d0(0x1c3)](_0x78198f=>_0x78198f['rangeId']))!=null?_0x29e54e:[],_0x209db1=JSON['stringify'](_0x4d7839),_0x1ef5b9=(await this[_0x22c5d0(0x1ac)]['requireSession'](_0x2daf1d))['getMemberID']();if(_0x2f1bed){const _0x7aa876={'memberId':_0x1ef5b9,'unitId':_0x2daf1d,'content':_0x209db1,'mention':_0x57d218,'threadId':_0x3e755d},_0x3189a3=(await this[_0x22c5d0(0x1af)][_0x22c5d0(0x1e3)]('/universer-api/comment/unit/'+_0x2daf1d+'/reply',{'body':_0x7aa876}))[_0x22c5d0(0x1d2)][_0x22c5d0(0x1c4)];return{..._0x1f1b33,'id':_0x3189a3[_0x22c5d0(0x1da)],'dT':_0x4cfdfe(+_0x3189a3['createTimestamp'])[_0x22c5d0(0x1aa)](_0x22c5d0(0x1f0)),'personId':_0x3189a3[_0x22c5d0(0x1b7)]};}else{const _0xd6169d={'memberId':_0x1ef5b9,'unitId':_0x2daf1d,'content':_0x209db1,'mention':_0x57d218},_0x41f278=await this[_0x22c5d0(0x1af)][_0x22c5d0(0x1e3)](_0x22c5d0(0x1b0)+_0x2daf1d+'/add',{'body':_0xd6169d});return X(_0x41f278['body'][_0x22c5d0(0x1b5)],_0x1f1b33);}}async[_0x2db34b(0x191)](_0x4d165b){const _0x20c4bc=_0x2db34b;var _0x30480c,_0x45ad51;const {text:_0x46f97a,unitId:_0x5def01}=_0x4d165b,_0x55c4a8=(_0x45ad51=(_0x30480c=_0x46f97a[_0x20c4bc(0x192)])==null?void 0x0:_0x30480c[_0x20c4bc(0x1d6)](_0x1ebdcc=>_0x1ebdcc['rangeType']===_0x4a9146[_0x20c4bc(0x19a)])[_0x20c4bc(0x1c3)](_0x358abf=>_0x358abf[_0x20c4bc(0x1cd)]))!=null?_0x45ad51:[],_0x21698a=JSON[_0x20c4bc(0x198)](_0x46f97a),_0x5ef6cc=_0x4d165b[_0x20c4bc(0x1b9)],_0x2f9976=_0x4d165b['id'],_0x5c1d27={'memberId':(await this['_sessionService'][_0x20c4bc(0x1c9)](_0x5def01))['getMemberID'](),'unitId':_0x5def01,'threadId':_0x5ef6cc,'mention':_0x55c4a8,'content':_0x21698a,'replyId':_0x2f9976},_0xd0704b=await this[_0x20c4bc(0x1af)][_0x20c4bc(0x1e3)](_0x20c4bc(0x1b0)+_0x5def01+_0x20c4bc(0x1f4),{'body':_0x5c1d27});return!_0xd0704b[_0x20c4bc(0x1d2)]['error']||_0xd0704b[_0x20c4bc(0x1d2)][_0x20c4bc(0x1be)][_0x20c4bc(0x1e6)]===0x1;}async[_0x2db34b(0x1e5)](_0x1f4049){const _0x1dcf6e=_0x2db34b,{unitId:_0x273f64}=_0x1f4049,_0x4c1bf6=_0x1f4049[_0x1dcf6e(0x1b9)],_0x5773c6={'memberId':this['_userService'][_0x1dcf6e(0x1c8)]()[_0x1dcf6e(0x1bf)],'unitId':_0x273f64,'threadId':_0x4c1bf6,'solved':_0x1f4049['resolved']?I['Solved']:I[_0x1dcf6e(0x1ad)]},_0x1207a9=await this['_httpService'][_0x1dcf6e(0x1e3)](_0x1dcf6e(0x1b0)+_0x273f64+_0x1dcf6e(0x194),{'body':_0x5773c6});return!_0x1207a9[_0x1dcf6e(0x1d2)][_0x1dcf6e(0x1be)]||_0x1207a9[_0x1dcf6e(0x1d2)]['error'][_0x1dcf6e(0x1e6)]===0x1;}async[_0x2db34b(0x1c2)](_0x5dfcee,_0x1ecc59,_0x4f05f7,_0x20f444){const _0x50dded=_0x2db34b,_0x2639ef={'memberId':(await this[_0x50dded(0x1ac)][_0x50dded(0x1c9)](_0x5dfcee))[_0x50dded(0x1c1)](),'threadId':_0x4f05f7,'replyId':_0x20f444,'unitId':_0x5dfcee},_0x5bae07=await this[_0x50dded(0x1af)][_0x50dded(0x1e3)]('/universer-api/comment/unit/'+_0x5dfcee+_0x50dded(0x1a1),{'body':_0x2639ef});return!_0x5bae07[_0x50dded(0x1d2)][_0x50dded(0x1be)]||_0x5bae07['body'][_0x50dded(0x1be)]['code']===0x1;}async[_0x2db34b(0x1ca)](_0x4edcde,_0x403e6f,_0x33ca43){const _0x25d186=_0x2db34b,_0x3caafa={'unitId':_0x4edcde,'threadId':_0x33ca43},_0x444905=await this[_0x25d186(0x1af)]['post'](_0x25d186(0x1b0)+_0x4edcde+'/list',{'body':_0x3caafa}),_0x288e6b=_0x33ca43[_0x25d186(0x1c3)](_0x1a1bd4=>ee(_0x444905[_0x25d186(0x1d2)][_0x25d186(0x1d8)][_0x1a1bd4],_0x4edcde,_0x403e6f))[_0x25d186(0x1d6)](Boolean);return Object[_0x25d186(0x1d4)](_0x444905[_0x25d186(0x1d2)][_0x25d186(0x1a9)])[_0x25d186(0x1bb)](_0x5bb984=>{const _0x1ae605=_0x25d186;this[_0x1ae605(0x1ce)][_0x1ae605(0x1ed)](_0x5bb984);}),_0x288e6b;}[_0x2db34b(0x1e1)](_0x4b094f){const _0x1622eb=_0x2db34b;return{'id':_0x4b094f['id'],'threadId':_0x4b094f[_0x1622eb(0x1b9)],'ref':_0x4b094f[_0x1622eb(0x1eb)]};}};f=Q([_(0x0,_0x5c8dc2(_0x9577a3)),_(0x1,_0x5c8dc2(_0xd09db)),_(0x2,_0x5c8dc2(_0x25437f)),_(0x3,_0x5c8dc2(_0x555bce))],f);function _0xa939(_0x20a41b,_0x1881e9){const _0x153525=_0x1535();return _0xa939=function(_0xa93947,_0x20a87f){_0xa93947=_0xa93947-0x191;let _0x366989=_0x153525[_0xa93947];return _0x366989;},_0xa939(_0x20a41b,_0x1881e9);}var re=Object[_0x2db34b(0x1f2)],te=(_0xb45255,_0x11fa76,_0x56d3b3,_0x32fb3b)=>{for(var _0x5e3a2d=_0x32fb3b>0x1?void 0x0:_0x32fb3b?re(_0x11fa76,_0x56d3b3):_0x11fa76,_0x5ce67f=_0xb45255['length']-0x1,_0x3aa32c;_0x5ce67f>=0x0;_0x5ce67f--)(_0x3aa32c=_0xb45255[_0x5ce67f])&&(_0x5e3a2d=_0x3aa32c(_0x5e3a2d)||_0x5e3a2d);return _0x5e3a2d;},N=(_0x189a2c,_0x3d3767)=>(_0x517933,_0x5e34a6)=>_0x3d3767(_0x517933,_0x5e34a6,_0x189a2c);let g=class extends _0x209d22{constructor(_0x443e30,_0x540623){const _0x8ebfd=_0x2db34b;super(),this[_0x8ebfd(0x1a5)]=_0x443e30,this[_0x8ebfd(0x195)]=_0x540623,this[_0x8ebfd(0x1ba)]();}['_initDataSource'](){const _0x5e646a=_0x2db34b;this['_threadCommentDataSourceService'][_0x5e646a(0x1ec)]=this[_0x5e646a(0x195)],this[_0x5e646a(0x1a5)][_0x5e646a(0x1e9)]=!0x1;}};g=te([N(0x0,_0x3546ec),N(0x1,_0x5c8dc2(f))],g);var se=Object[_0x2db34b(0x1d1)],oe=Object[_0x2db34b(0x1f2)],ne=(_0x48b37f,_0x4d73af,_0x1fd5fd)=>_0x4d73af in _0x48b37f?se(_0x48b37f,_0x4d73af,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1fd5fd}):_0x48b37f[_0x4d73af]=_0x1fd5fd,ie=(_0x5ec4c9,_0x1ba78c,_0x4276dc,_0x520656)=>{const _0x4a0035=_0x2db34b;for(var _0x334e4d=_0x520656>0x1?void 0x0:_0x520656?oe(_0x1ba78c,_0x4276dc):_0x1ba78c,_0xf6ed8d=_0x5ec4c9[_0x4a0035(0x1f7)]-0x1,_0x526744;_0xf6ed8d>=0x0;_0xf6ed8d--)(_0x526744=_0x5ec4c9[_0xf6ed8d])&&(_0x334e4d=_0x526744(_0x334e4d)||_0x334e4d);return _0x334e4d;},w=(_0x573c95,_0x23b4c4)=>(_0x1ebfa8,_0x5e70ad)=>_0x23b4c4(_0x1ebfa8,_0x5e70ad,_0x573c95),$=(_0x5eddcf,_0x7e9cb3,_0x30b943)=>ne(_0x5eddcf,typeof _0x7e9cb3!=_0x2db34b(0x1e2)?_0x7e9cb3+'':_0x7e9cb3,_0x30b943);let b=class extends _0x47c1c6{constructor(_0x582bcf=M,_0x2b67b0,_0x3be51f){const _0x29ee52=_0x2db34b;super(),this['_config']=_0x582bcf,this[_0x29ee52(0x1d0)]=_0x2b67b0,this[_0x29ee52(0x1ea)]=_0x3be51f;const {..._0x249bb6}=_0x20b3b4({},M,this[_0x29ee52(0x1a6)]);this[_0x29ee52(0x1ea)][_0x29ee52(0x1bc)](z,_0x249bb6);}[_0x2db34b(0x1d7)](){const _0x3730a9=_0x2db34b;[[f],[g],[S]][_0x3730a9(0x1bb)](_0x49e43e=>{const _0x4e7c78=_0x3730a9;this['_injector'][_0x4e7c78(0x1b3)](_0x49e43e);});}[_0x2db34b(0x1a8)](){const _0x53d72d=_0x2db34b;this[_0x53d72d(0x1d0)][_0x53d72d(0x1dc)](g),this[_0x53d72d(0x1d0)][_0x53d72d(0x1dc)](S);}};$(b,_0x2db34b(0x197),W),$(b,'type',_0x4bf91a['UNIVER_UNKNOWN']),b=ie([_0x5f5485(_0x356d5f,_0x498854,_0x5bfe90),w(0x1,_0x5c8dc2(_0x555bce)),w(0x2,_0x91542d)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x1a6ee2=_0x455b;(function(_0x1f0d0e,_0x380543){const _0x215a76=_0x455b,_0x3a1a48=_0x1f0d0e();while(!![]){try{const _0x20b41c=-parseInt(_0x215a76(0x203))/0x1*(parseInt(_0x215a76(0x1c6))/0x2)+parseInt(_0x215a76(0x1da))/0x3*(parseInt(_0x215a76(0x1d1))/0x4)+-parseInt(_0x215a76(0x1a4))/0x5+-parseInt(_0x215a76(0x1ad))/0x6+-parseInt(_0x215a76(0x1bf))/0x7+-parseInt(_0x215a76(0x1db))/0x8*(-parseInt(_0x215a76(0x1ef))/0x9)+parseInt(_0x215a76(0x1a7))/0xa;if(_0x20b41c===_0x380543)break;else _0x3a1a48['push'](_0x3a1a48['shift']());}catch(_0x2fd466){_0x3a1a48['push'](_0x3a1a48['shift']());}}}(_0x3601,0x5ad91));import{CommentService as _0x37e2e7,CollaborationSessionService as _0x99aabe,UniverCollaborationClientPlugin as _0x5816e6}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1bc6a8}from'@univerjs-pro/license';import{dayjs as _0x173d38,UserManagerService as _0x268413,Inject as _0x18999a,Injector as _0x47417b,Disposable as _0x5e9a40,CustomRangeType as _0x4b606d,UniverInstanceType as _0x4c6779,DependentOn as _0x2a1c99,IConfigService as _0x562190,Plugin as _0x34ae44,merge as _0x29a050}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x47b7d1}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4ae210,IThreadCommentDataSourceService as _0x29bf24}from'@univerjs/thread-comment';import{bufferTime as _0x177664}from'rxjs';function _0x3601(){const _0x3e5031=['listComments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','9385880KYNGxW','comments','_sessionService','values','YYYY/MM/DD\x20HH:mm','thread-comment-data-source.config','547728kZwVls','slice','customRanges','parentId','dataSource','get','map','format','requireSession','rangeType','filter','Solved','forEach','Unknown','userID','content','UNIVER_UNKNOWN','getComment','4483661bqtATb','user','getUser','parse','Delete','/list','/universer-api/user/list','44gZpabz','Solve','Add','onReady','_initUserSync','_configService','rangeId','post','_httpService','/add','getOwnPropertyDescriptor','44ugdJDo','_threadCommentModel','getCurrentUser','error','/reply','getUnit','threadId','OpenOrReOpen','stringify','150492wkALkr','89616tCXiDW','/delete','body','payload','deleteComment','solved','addUser','UNRECOGNIZED','setConfig','createTimestamp','userId','disposeWithMe','root','resolveComment','personId','_config','addComment','subscribe','_injector','saveCommentToSnapshot','513spIecV','/edit','replyId','size','unitId','COMMENT','length','_init','_initDataSource','add','/universer-api/comment/unit/','replies','symbol','type','_commentService','_userService','/solved','getMemberID','Reply','_threadCommentDataSourceService','23023evFCRi','commentUpdate$','_threadCommentDataSource','updateComment','find','delete','code','2592380JonEhq'];_0x3601=function(){return _0x3e5031;};return _0x3601();}import{HTTPService as _0x57e027}from'@univerjs/network';const W=_0x1a6ee2(0x1a6);var I=(_0x2d4dbb=>(_0x2d4dbb[_0x2d4dbb[_0x1a6ee2(0x1d8)]=0x0]='OpenOrReOpen',_0x2d4dbb[_0x2d4dbb[_0x1a6ee2(0x1b8)]=0x1]=_0x1a6ee2(0x1b8),_0x2d4dbb[_0x2d4dbb[_0x1a6ee2(0x1e2)]=-0x1]=_0x1a6ee2(0x1e2),_0x2d4dbb))(I||{}),v=(_0xae58d3=>(_0xae58d3[_0xae58d3[_0x1a6ee2(0x1ba)]=0x0]=_0x1a6ee2(0x1ba),_0xae58d3[_0xae58d3[_0x1a6ee2(0x1c8)]=0x1]=_0x1a6ee2(0x1c8),_0xae58d3[_0xae58d3[_0x1a6ee2(0x201)]=0x2]=_0x1a6ee2(0x201),_0xae58d3[_0xae58d3['Edit']=0x3]='Edit',_0xae58d3[_0xae58d3['Delete']=0x4]=_0x1a6ee2(0x1c3),_0xae58d3[_0xae58d3[_0x1a6ee2(0x1c7)]=0x5]='Solve',_0xae58d3[_0xae58d3[_0x1a6ee2(0x1e2)]=-0x1]=_0x1a6ee2(0x1e2),_0xae58d3))(v||{});const D=_0x79f35e=>_0x173d38(new Date(+_0x79f35e))['format'](_0x1a6ee2(0x1ab)),B=async(_0x459df6,_0x229a2b)=>{const _0xf1adca=_0x1a6ee2,_0xe3cae7=_0x459df6['get'](_0x268413),_0x52772c=_0x459df6[_0xf1adca(0x1b2)](_0x57e027);_0x229a2b[_0xf1adca(0x1b9)](_0x521d8b=>{const _0x40be42=_0xf1adca;_0xe3cae7[_0x40be42(0x1c1)](_0x521d8b)&&_0x229a2b[_0x40be42(0x1a2)](_0x521d8b);}),_0x229a2b[_0xf1adca(0x1f2)]&&(await _0x52772c['get'](_0xf1adca(0x1c5),{'params':{'userIDs':[..._0x229a2b]}}))['body']['users'][_0xf1adca(0x1b9)](_0x42d1d8=>{_0x42d1d8&&_0xe3cae7['addUser'](_0x42d1d8);});};var K=Object[_0x1a6ee2(0x1d0)],V=(_0x338dc1,_0xf0785a,_0x38b216,_0x35af78)=>{const _0x4c8c4c=_0x1a6ee2;for(var _0x413a3=_0x35af78>0x1?void 0x0:_0x35af78?K(_0xf0785a,_0x38b216):_0xf0785a,_0x434a69=_0x338dc1[_0x4c8c4c(0x1f5)]-0x1,_0x3ec5ef;_0x434a69>=0x0;_0x434a69--)(_0x3ec5ef=_0x338dc1[_0x434a69])&&(_0x413a3=_0x3ec5ef(_0x413a3)||_0x413a3);return _0x413a3;},p=(_0x4a0093,_0x305650)=>(_0x1494dd,_0x5ca200)=>_0x305650(_0x1494dd,_0x5ca200,_0x4a0093);let S=class extends _0x5e9a40{constructor(_0x267215,_0x53b487,_0x2a4575,_0xbbdd4){const _0x3583e7=_0x1a6ee2;super(),this[_0x3583e7(0x1fd)]=_0x267215,this[_0x3583e7(0x1d2)]=_0x53b487,this[_0x3583e7(0x1fe)]=_0x2a4575,this[_0x3583e7(0x1ed)]=_0xbbdd4,this[_0x3583e7(0x1f6)](),this[_0x3583e7(0x1ca)]();}['_initUserSync'](){const _0x212914=_0x1a6ee2;this[_0x212914(0x1e6)](this[_0x212914(0x1d2)][_0x212914(0x204)]['pipe'](_0x177664(0x10))[_0x212914(0x1ec)](_0x276408=>{const _0x4ff9f2=_0x212914,_0x23f1e0=new Set();_0x276408['forEach'](_0x35b428=>{const _0x42c49a=_0x455b;switch(_0x35b428[_0x42c49a(0x1fc)]){case'add':{const _0x5eccc9=_0x35b428[_0x42c49a(0x1de)][_0x42c49a(0x1e9)];_0x23f1e0[_0x42c49a(0x1f8)](_0x5eccc9);break;}}}),B(this[_0x4ff9f2(0x1ed)],_0x23f1e0);}));}[_0x1a6ee2(0x1f6)](){const _0x3987c2=_0x1a6ee2;this[_0x3987c2(0x1e6)](this[_0x3987c2(0x1fd)][_0x3987c2(0x204)][_0x3987c2(0x1ec)](async _0x1e731e=>{const _0x349258=_0x3987c2;var _0x3cb5ed,_0x32fcdb,_0x5f31ed,_0x13ace4;const _0x3e20df=(_0x3cb5ed=this[_0x349258(0x1d2)][_0x349258(0x1d6)](_0x1e731e[_0x349258(0x1f3)])[_0x349258(0x207)](_0x2c3662=>_0x2c3662[_0x349258(0x1d7)]===_0x1e731e[_0x349258(0x1d7)]))==null?void 0x0:_0x3cb5ed[_0x349258(0x1e7)];if(!_0x3e20df)return;const {unitId:_0x29a61e,subUnitId:_0x449013}=_0x3e20df;switch(_0x1e731e[_0x349258(0x1c0)]&&this[_0x349258(0x1fe)][_0x349258(0x1e1)](_0x1e731e[_0x349258(0x1c0)]),_0x1e731e[_0x349258(0x1fc)]){case v['Add']:break;case v[_0x349258(0x201)]:{this[_0x349258(0x1d2)][_0x349258(0x1eb)](_0x29a61e,_0x449013,{'unitId':_0x29a61e,'subUnitId':_0x449013,'ref':'','id':_0x1e731e[_0x349258(0x1f1)],'dT':D(+_0x1e731e[_0x349258(0x1e4)]),'threadId':_0x1e731e[_0x349258(0x1d7)],'personId':(_0x5f31ed=(_0x32fcdb=_0x1e731e[_0x349258(0x1c0)])==null?void 0x0:_0x32fcdb[_0x349258(0x1bb)])!=null?_0x5f31ed:_0x1e731e[_0x349258(0x1e5)],'text':JSON[_0x349258(0x1c2)](_0x1e731e[_0x349258(0x1bc)]),'parentId':_0x3e20df['id']});break;}case v[_0x349258(0x1c3)]:{const _0x5869b7=this['_threadCommentModel'][_0x349258(0x1be)](_0x29a61e,_0x449013,_0x1e731e[_0x349258(0x1f1)]);_0x5869b7&&_0x5869b7[_0x349258(0x1b0)]&&this[_0x349258(0x1d2)][_0x349258(0x1df)](_0x29a61e,_0x449013,_0x1e731e[_0x349258(0x1f1)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x349258(0x206)](_0x29a61e,_0x449013,{'commentId':_0x1e731e[_0x349258(0x1f1)],'text':JSON[_0x349258(0x1c2)](_0x1e731e[_0x349258(0x1bc)])});break;}case v[_0x349258(0x1c7)]:{const _0x7d05a=(_0x13ace4=this[_0x349258(0x1d2)][_0x349258(0x1d6)](_0x1e731e[_0x349258(0x1f3)])['find'](_0x26ae86=>_0x26ae86[_0x349258(0x1d7)]===_0x1e731e[_0x349258(0x1d7)]))==null?void 0x0:_0x13ace4['root'];_0x7d05a&&this['_threadCommentModel']['resolveComment'](_0x29a61e,_0x449013,_0x7d05a['id'],_0x1e731e['solved']===I[_0x349258(0x1b8)]);break;}}}));}};S=V([p(0x0,_0x18999a(_0x37e2e7)),p(0x1,_0x18999a(_0x4ae210)),p(0x2,_0x18999a(_0x268413)),p(0x3,_0x18999a(_0x47417b))],S);const z=_0x1a6ee2(0x1ac),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x3af4e6,_0x25d3fc,_0xfe4dec,_0x4942e7)=>{const _0x29b208=_0x1a6ee2;for(var _0x291924=_0x4942e7>0x1?void 0x0:_0x4942e7?k(_0x25d3fc,_0xfe4dec):_0x25d3fc,_0x597cf2=_0x3af4e6[_0x29b208(0x1f5)]-0x1,_0x2d47a2;_0x597cf2>=0x0;_0x597cf2--)(_0x2d47a2=_0x3af4e6[_0x597cf2])&&(_0x291924=_0x2d47a2(_0x291924)||_0x291924);return _0x291924;},_=(_0x49951e,_0x4d95de)=>(_0x2451b8,_0x186c09)=>_0x4d95de(_0x2451b8,_0x186c09,_0x49951e);function X(_0x1c978a,_0x5cb55f){const _0x830b93=_0x1a6ee2,_0xb7f9e=_0x1c978a[_0x830b93(0x1fa)][0x0];return{..._0x5cb55f,'id':_0xb7f9e[_0x830b93(0x1f1)],'resolved':_0x1c978a['solved']===0x1,'dT':D(_0xb7f9e[_0x830b93(0x1e4)]),'personId':_0xb7f9e['userId'],'threadId':_0xb7f9e[_0x830b93(0x1d7)]};}function _0x455b(_0x187256,_0x15ce31){const _0x360141=_0x3601();return _0x455b=function(_0x455b0e,_0x3cefec){_0x455b0e=_0x455b0e-0x1a2;let _0x3ea1cb=_0x360141[_0x455b0e];return _0x3ea1cb;},_0x455b(_0x187256,_0x15ce31);}function ee(_0x4e88f0,_0x236cc9,_0x44397d){const _0x2da8a8=_0x1a6ee2;var _0x471af5,_0x2aaa25;if(((_0x2aaa25=(_0x471af5=_0x4e88f0==null?void 0x0:_0x4e88f0[_0x2da8a8(0x1fa)])==null?void 0x0:_0x471af5[_0x2da8a8(0x1f5)])!=null?_0x2aaa25:0x0)>0x0){const _0xef7917=(_0x3f7bb6,_0x6d8855)=>({'id':_0x3f7bb6['replyId'],'threadId':_0x3f7bb6['threadId'],'dT':D(_0x3f7bb6[_0x2da8a8(0x1e4)]),'personId':_0x3f7bb6[_0x2da8a8(0x1e5)],'resolved':_0x4e88f0[_0x2da8a8(0x1e0)]===I[_0x2da8a8(0x1b8)],'unitId':_0x236cc9,'subUnitId':_0x44397d,'text':JSON['parse'](_0x3f7bb6[_0x2da8a8(0x1bc)]),'parentId':_0x6d8855}),_0x78b139=_0xef7917(_0x4e88f0['replies'][0x0]);return{..._0x78b139,'children':_0x4e88f0[_0x2da8a8(0x1fa)][_0x2da8a8(0x1ae)](0x1)['map'](_0xdeeaaf=>_0xef7917(_0xdeeaaf,_0x78b139['id']))};}return null;}let f=class{constructor(_0x29f6bf,_0x1c3e9f,_0x430ba7,_0x2d9ae8){const _0x50fe06=_0x1a6ee2;this[_0x50fe06(0x1ce)]=_0x29f6bf,this['_userService']=_0x1c3e9f,this[_0x50fe06(0x1a9)]=_0x430ba7,this[_0x50fe06(0x1ed)]=_0x2d9ae8;}async[_0x1a6ee2(0x1eb)](_0x197cff){const _0x4b2a89=_0x1a6ee2;var _0x4c38b5,_0x2f9339;const {parentId:_0xad08d5,unitId:_0x2659b2,text:_0x21ee43,threadId:_0x369713}=_0x197cff,_0x5728cb=(_0x2f9339=(_0x4c38b5=_0x21ee43['customRanges'])==null?void 0x0:_0x4c38b5[_0x4b2a89(0x1b7)](_0x83e7a5=>_0x83e7a5[_0x4b2a89(0x1b6)]===_0x4b606d['COMMENT'])[_0x4b2a89(0x1b3)](_0x149d16=>_0x149d16[_0x4b2a89(0x1cc)]))!=null?_0x2f9339:[],_0x4fc3ad=JSON[_0x4b2a89(0x1d9)](_0x21ee43),_0x934d0e=(await this[_0x4b2a89(0x1a9)][_0x4b2a89(0x1b5)](_0x2659b2))[_0x4b2a89(0x200)]();if(_0xad08d5){const _0x57b9a3={'memberId':_0x934d0e,'unitId':_0x2659b2,'content':_0x4fc3ad,'mention':_0x5728cb,'threadId':_0x369713},_0x33b0ac=(await this[_0x4b2a89(0x1ce)]['post'](_0x4b2a89(0x1f9)+_0x2659b2+_0x4b2a89(0x1d5),{'body':_0x57b9a3}))['body']['reply'];return{..._0x197cff,'id':_0x33b0ac[_0x4b2a89(0x1f1)],'dT':_0x173d38(+_0x33b0ac[_0x4b2a89(0x1e4)])[_0x4b2a89(0x1b4)](_0x4b2a89(0x1ab)),'personId':_0x33b0ac[_0x4b2a89(0x1e5)]};}else{const _0x70479a={'memberId':_0x934d0e,'unitId':_0x2659b2,'content':_0x4fc3ad,'mention':_0x5728cb},_0x474e85=await this[_0x4b2a89(0x1ce)][_0x4b2a89(0x1cd)](_0x4b2a89(0x1f9)+_0x2659b2+_0x4b2a89(0x1cf),{'body':_0x70479a});return X(_0x474e85[_0x4b2a89(0x1dd)]['comment'],_0x197cff);}}async[_0x1a6ee2(0x206)](_0x3d1b37){const _0x157a4d=_0x1a6ee2;var _0x15339b,_0x82e0ed;const {text:_0x449ff2,unitId:_0x5b843b}=_0x3d1b37,_0x2cc6a5=(_0x82e0ed=(_0x15339b=_0x449ff2[_0x157a4d(0x1af)])==null?void 0x0:_0x15339b['filter'](_0xfc1e7d=>_0xfc1e7d['rangeType']===_0x4b606d[_0x157a4d(0x1f4)])['map'](_0x5be6f7=>_0x5be6f7['rangeId']))!=null?_0x82e0ed:[],_0x5c0e7f=JSON[_0x157a4d(0x1d9)](_0x449ff2),_0x49492c=_0x3d1b37[_0x157a4d(0x1d7)],_0x54f8ba=_0x3d1b37['id'],_0x5d4930={'memberId':(await this['_sessionService'][_0x157a4d(0x1b5)](_0x5b843b))['getMemberID'](),'unitId':_0x5b843b,'threadId':_0x49492c,'mention':_0x2cc6a5,'content':_0x5c0e7f,'replyId':_0x54f8ba},_0x5b993e=await this[_0x157a4d(0x1ce)]['post']('/universer-api/comment/unit/'+_0x5b843b+_0x157a4d(0x1f0),{'body':_0x5d4930});return!_0x5b993e[_0x157a4d(0x1dd)][_0x157a4d(0x1d4)]||_0x5b993e[_0x157a4d(0x1dd)][_0x157a4d(0x1d4)][_0x157a4d(0x1a3)]===0x1;}async[_0x1a6ee2(0x1e8)](_0x3010cd){const _0x22d4ca=_0x1a6ee2,{unitId:_0x33b7fd}=_0x3010cd,_0x25adfb=_0x3010cd[_0x22d4ca(0x1d7)],_0x4d1401={'memberId':this[_0x22d4ca(0x1fe)][_0x22d4ca(0x1d3)]()['userID'],'unitId':_0x33b7fd,'threadId':_0x25adfb,'solved':_0x3010cd['resolved']?I[_0x22d4ca(0x1b8)]:I['OpenOrReOpen']},_0x13f70a=await this[_0x22d4ca(0x1ce)]['post'](_0x22d4ca(0x1f9)+_0x33b7fd+_0x22d4ca(0x1ff),{'body':_0x4d1401});return!_0x13f70a[_0x22d4ca(0x1dd)][_0x22d4ca(0x1d4)]||_0x13f70a['body'][_0x22d4ca(0x1d4)][_0x22d4ca(0x1a3)]===0x1;}async[_0x1a6ee2(0x1df)](_0xc19cb3,_0xf8af14,_0xe635bc,_0x3a5d79){const _0x4628a6=_0x1a6ee2,_0x3de27e={'memberId':(await this[_0x4628a6(0x1a9)]['requireSession'](_0xc19cb3))['getMemberID'](),'threadId':_0xe635bc,'replyId':_0x3a5d79,'unitId':_0xc19cb3},_0x4f0377=await this[_0x4628a6(0x1ce)][_0x4628a6(0x1cd)](_0x4628a6(0x1f9)+_0xc19cb3+_0x4628a6(0x1dc),{'body':_0x3de27e});return!_0x4f0377[_0x4628a6(0x1dd)][_0x4628a6(0x1d4)]||_0x4f0377[_0x4628a6(0x1dd)][_0x4628a6(0x1d4)][_0x4628a6(0x1a3)]===0x1;}async[_0x1a6ee2(0x1a5)](_0x370f4e,_0xac2ccb,_0x5d38e3){const _0x5d3d9f=_0x1a6ee2,_0x5b40ec={'unitId':_0x370f4e,'threadId':_0x5d38e3},_0x3bb04c=await this['_httpService']['post'](_0x5d3d9f(0x1f9)+_0x370f4e+_0x5d3d9f(0x1c4),{'body':_0x5b40ec}),_0x4a3560=_0x5d38e3[_0x5d3d9f(0x1b3)](_0x5ace44=>ee(_0x3bb04c[_0x5d3d9f(0x1dd)][_0x5d3d9f(0x1a8)][_0x5ace44],_0x370f4e,_0xac2ccb))[_0x5d3d9f(0x1b7)](Boolean);return Object[_0x5d3d9f(0x1aa)](_0x3bb04c[_0x5d3d9f(0x1dd)]['users'])[_0x5d3d9f(0x1b9)](_0x2c16be=>{const _0x5b2cd1=_0x5d3d9f;this[_0x5b2cd1(0x1fe)][_0x5b2cd1(0x1e1)](_0x2c16be);}),_0x4a3560;}[_0x1a6ee2(0x1ee)](_0x26ffee){return{'id':_0x26ffee['id'],'threadId':_0x26ffee['threadId'],'ref':_0x26ffee['ref']};}};f=Q([_(0x0,_0x18999a(_0x57e027)),_(0x1,_0x18999a(_0x268413)),_(0x2,_0x18999a(_0x99aabe)),_(0x3,_0x18999a(_0x47417b))],f);var re=Object[_0x1a6ee2(0x1d0)],te=(_0x326ca7,_0xd1e35,_0x5154aa,_0x1c7eb2)=>{for(var _0x4e60c1=_0x1c7eb2>0x1?void 0x0:_0x1c7eb2?re(_0xd1e35,_0x5154aa):_0xd1e35,_0x10a66b=_0x326ca7['length']-0x1,_0x73b0b7;_0x10a66b>=0x0;_0x10a66b--)(_0x73b0b7=_0x326ca7[_0x10a66b])&&(_0x4e60c1=_0x73b0b7(_0x4e60c1)||_0x4e60c1);return _0x4e60c1;},N=(_0x579e8b,_0x144156)=>(_0xc825dd,_0xc334a9)=>_0x144156(_0xc825dd,_0xc334a9,_0x579e8b);let g=class extends _0x5e9a40{constructor(_0x379b28,_0xf4e12c){const _0x208f8f=_0x1a6ee2;super(),this[_0x208f8f(0x202)]=_0x379b28,this[_0x208f8f(0x205)]=_0xf4e12c,this[_0x208f8f(0x1f7)]();}[_0x1a6ee2(0x1f7)](){const _0x490919=_0x1a6ee2;this[_0x490919(0x202)][_0x490919(0x1b1)]=this[_0x490919(0x205)],this[_0x490919(0x202)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x29bf24),N(0x1,_0x18999a(f))],g);var se=Object['defineProperty'],oe=Object[_0x1a6ee2(0x1d0)],ne=(_0x3bd80e,_0x448f17,_0x3dc415)=>_0x448f17 in _0x3bd80e?se(_0x3bd80e,_0x448f17,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3dc415}):_0x3bd80e[_0x448f17]=_0x3dc415,ie=(_0xfb6150,_0x4520c3,_0x3aabb1,_0x14a136)=>{for(var _0x52d658=_0x14a136>0x1?void 0x0:_0x14a136?oe(_0x4520c3,_0x3aabb1):_0x4520c3,_0x5282d8=_0xfb6150['length']-0x1,_0xfe5031;_0x5282d8>=0x0;_0x5282d8--)(_0xfe5031=_0xfb6150[_0x5282d8])&&(_0x52d658=_0xfe5031(_0x52d658)||_0x52d658);return _0x52d658;},w=(_0x5c5c9b,_0x28cd85)=>(_0x59cf73,_0x8c4e8b)=>_0x28cd85(_0x59cf73,_0x8c4e8b,_0x5c5c9b),$=(_0x3da695,_0x2f462d,_0x505353)=>ne(_0x3da695,typeof _0x2f462d!=_0x1a6ee2(0x1fb)?_0x2f462d+'':_0x2f462d,_0x505353);let b=class extends _0x34ae44{constructor(_0x3e41c3=M,_0x175189,_0x1355dd){const _0x418ee7=_0x1a6ee2;super(),this[_0x418ee7(0x1ea)]=_0x3e41c3,this[_0x418ee7(0x1ed)]=_0x175189,this[_0x418ee7(0x1cb)]=_0x1355dd;const {..._0x2cabdf}=_0x29a050({},M,this[_0x418ee7(0x1ea)]);this['_configService'][_0x418ee7(0x1e3)](z,_0x2cabdf);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x5828a0=>{const _0x5c6e79=_0x455b;this['_injector'][_0x5c6e79(0x1f8)](_0x5828a0);});}[_0x1a6ee2(0x1c9)](){const _0x27be43=_0x1a6ee2;this['_injector']['get'](g),this['_injector'][_0x27be43(0x1b2)](S);}};$(b,'pluginName',W),$(b,'type',_0x4c6779[_0x1a6ee2(0x1bd)]),b=ie([_0x2a1c99(_0x47b7d1,_0x5816e6,_0x1bc6a8),w(0x1,_0x18999a(_0x47417b)),w(0x2,_0x562190)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x2db34b=_0xa939;(function(_0x8f2a5,_0x11f41f){const _0x46c229=_0xa939,_0x26a478=_0x8f2a5();while(!![]){try{const _0x4846b8=-parseInt(_0x46c229(0x1db))/0x1*(parseInt(_0x46c229(0x1dd))/0x2)+-parseInt(_0x46c229(0x1a2))/0x3+-parseInt(_0x46c229(0x196))/0x4+-parseInt(_0x46c229(0x1cc))/0x5+-parseInt(_0x46c229(0x1c6))/0x6+parseInt(_0x46c229(0x1ee))/0x7+parseInt(_0x46c229(0x1cb))/0x8;if(_0x4846b8===_0x11f41f)break;else _0x26a478['push'](_0x26a478['shift']());}catch(_0x452914){_0x26a478['push'](_0x26a478['shift']());}}}(_0x1535,0x2f021));import{CommentService as _0x518e23,CollaborationSessionService as _0x25437f,UniverCollaborationClientPlugin as _0x498854}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5bfe90}from'@univerjs-pro/license';import{dayjs as _0x4cfdfe,UserManagerService as _0xd09db,Inject as _0x5c8dc2,Injector as _0x555bce,Disposable as _0x209d22,CustomRangeType as _0x4a9146,UniverInstanceType as _0x4bf91a,DependentOn as _0x5f5485,IConfigService as _0x91542d,Plugin as _0x47c1c6,merge as _0x20b3b4}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x356d5f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x54939c,IThreadCommentDataSourceService as _0x3546ec}from'@univerjs/thread-comment';import{bufferTime as _0x3db8b5}from'rxjs';import{HTTPService as _0x9577a3}from'@univerjs/network';const W=_0x2db34b(0x1e8);var I=(_0x140958=>(_0x140958[_0x140958[_0x2db34b(0x1ad)]=0x0]=_0x2db34b(0x1ad),_0x140958[_0x140958['Solved']=0x1]='Solved',_0x140958[_0x140958[_0x2db34b(0x1e0)]=-0x1]=_0x2db34b(0x1e0),_0x140958))(I||{}),v=(_0x249edc=>(_0x249edc[_0x249edc[_0x2db34b(0x199)]=0x0]=_0x2db34b(0x199),_0x249edc[_0x249edc[_0x2db34b(0x1b8)]=0x1]='Add',_0x249edc[_0x249edc[_0x2db34b(0x1b4)]=0x2]=_0x2db34b(0x1b4),_0x249edc[_0x249edc[_0x2db34b(0x1e7)]=0x3]=_0x2db34b(0x1e7),_0x249edc[_0x249edc['Delete']=0x4]=_0x2db34b(0x1a7),_0x249edc[_0x249edc[_0x2db34b(0x1cf)]=0x5]='Solve',_0x249edc[_0x249edc['UNRECOGNIZED']=-0x1]=_0x2db34b(0x1e0),_0x249edc))(v||{});const D=_0x2745e3=>_0x4cfdfe(new Date(+_0x2745e3))[_0x2db34b(0x1aa)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x256ec9,_0xb841ce)=>{const _0x267fa5=_0x2db34b,_0x426e2f=_0x256ec9[_0x267fa5(0x1dc)](_0xd09db),_0x325a63=_0x256ec9['get'](_0x9577a3);_0xb841ce['forEach'](_0x5e6cd2=>{const _0x49571b=_0x267fa5;_0x426e2f[_0x49571b(0x1f6)](_0x5e6cd2)&&_0xb841ce[_0x49571b(0x1ef)](_0x5e6cd2);}),_0xb841ce[_0x267fa5(0x1df)]&&(await _0x325a63[_0x267fa5(0x1dc)](_0x267fa5(0x1d9),{'params':{'userIDs':[..._0xb841ce]}}))[_0x267fa5(0x1d2)][_0x267fa5(0x1a9)][_0x267fa5(0x1bb)](_0x463179=>{_0x463179&&_0x426e2f['addUser'](_0x463179);});};var K=Object[_0x2db34b(0x1f2)],V=(_0x1d2dd7,_0x93bb7e,_0x58492d,_0x47e7b3)=>{const _0x3bff70=_0x2db34b;for(var _0x49c219=_0x47e7b3>0x1?void 0x0:_0x47e7b3?K(_0x93bb7e,_0x58492d):_0x93bb7e,_0x2d1296=_0x1d2dd7[_0x3bff70(0x1f7)]-0x1,_0x1f9586;_0x2d1296>=0x0;_0x2d1296--)(_0x1f9586=_0x1d2dd7[_0x2d1296])&&(_0x49c219=_0x1f9586(_0x49c219)||_0x49c219);return _0x49c219;},p=(_0x3531c5,_0x38a4f8)=>(_0x5c6ea6,_0x124d6d)=>_0x38a4f8(_0x5c6ea6,_0x124d6d,_0x3531c5);function _0x1535(){const _0x534a3b=['listComments','7085632GlEhar','1499825TlKWbd','rangeId','_userService','Solve','_injector','defineProperty','body','find','values','createTimestamp','filter','onStarting','comments','/universer-api/user/list','replyId','140915RGdQlX','get','4XIOJHI','_initUserSync','size','UNRECOGNIZED','saveCommentToSnapshot','symbol','post','type','resolveComment','code','Edit','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','syncUpdateMutationToColla','_configService','ref','dataSource','addUser','1929025FlcjKI','delete','YYYY/MM/DD\x20HH:mm','parse','getOwnPropertyDescriptor','user','/edit','solved','getUser','length','updateComment','customRanges','thread-comment-data-source.config','/solved','_threadCommentDataSource','137028PJoWEq','pluginName','stringify','Unknown','COMMENT','disposeWithMe','unitId','replies','_init','Solved','root','/delete','601755PVCpup','personId','_commentService','_threadCommentDataSourceService','_config','Delete','onReady','users','format','addComment','_sessionService','OpenOrReOpen','commentUpdate$','_httpService','/universer-api/comment/unit/','content','getUnit','add','Reply','comment','parentId','userId','Add','threadId','_initDataSource','forEach','setConfig','slice','error','userID','getComment','getMemberID','deleteComment','map','reply','_threadCommentModel','912582qKzGGT','subscribe','getCurrentUser','requireSession'];_0x1535=function(){return _0x534a3b;};return _0x1535();}let S=class extends _0x209d22{constructor(_0x2ccf85,_0x23cdd5,_0x102600,_0xe3c5b3){const _0x16f0a2=_0x2db34b;super(),this[_0x16f0a2(0x1a4)]=_0x2ccf85,this['_threadCommentModel']=_0x23cdd5,this[_0x16f0a2(0x1ce)]=_0x102600,this[_0x16f0a2(0x1d0)]=_0xe3c5b3,this[_0x16f0a2(0x19e)](),this[_0x16f0a2(0x1de)]();}[_0x2db34b(0x1de)](){const _0x1490e2=_0x2db34b;this[_0x1490e2(0x19b)](this['_threadCommentModel'][_0x1490e2(0x1ae)]['pipe'](_0x3db8b5(0x10))[_0x1490e2(0x1c7)](_0x521090=>{const _0x3d2f8a=_0x1490e2,_0x3d5ae9=new Set();_0x521090[_0x3d2f8a(0x1bb)](_0x3b7597=>{const _0x18666a=_0x3d2f8a;switch(_0x3b7597[_0x18666a(0x1e4)]){case _0x18666a(0x1b3):{const _0x2bb14e=_0x3b7597['payload'][_0x18666a(0x1a3)];_0x3d5ae9[_0x18666a(0x1b3)](_0x2bb14e);break;}}}),B(this[_0x3d2f8a(0x1d0)],_0x3d5ae9);}));}['_init'](){const _0x415a45=_0x2db34b;this[_0x415a45(0x19b)](this[_0x415a45(0x1a4)][_0x415a45(0x1ae)][_0x415a45(0x1c7)](async _0x155b3f=>{const _0x16e2c5=_0x415a45;var _0x298ef1,_0x3ecb30,_0x11765a,_0x5bba12;const _0x5bb1d0=(_0x298ef1=this[_0x16e2c5(0x1c5)][_0x16e2c5(0x1b2)](_0x155b3f[_0x16e2c5(0x19c)])[_0x16e2c5(0x1d3)](_0x42b700=>_0x42b700['threadId']===_0x155b3f[_0x16e2c5(0x1b9)]))==null?void 0x0:_0x298ef1[_0x16e2c5(0x1a0)];if(!_0x5bb1d0)return;const {unitId:_0x1afcf1,subUnitId:_0x2c758b}=_0x5bb1d0;switch(_0x155b3f['user']&&this[_0x16e2c5(0x1ce)][_0x16e2c5(0x1ed)](_0x155b3f[_0x16e2c5(0x1f3)]),_0x155b3f['type']){case v[_0x16e2c5(0x1b8)]:break;case v['Reply']:{this['_threadCommentModel']['addComment'](_0x1afcf1,_0x2c758b,{'unitId':_0x1afcf1,'subUnitId':_0x2c758b,'ref':'','id':_0x155b3f[_0x16e2c5(0x1da)],'dT':D(+_0x155b3f[_0x16e2c5(0x1d5)]),'threadId':_0x155b3f['threadId'],'personId':(_0x11765a=(_0x3ecb30=_0x155b3f[_0x16e2c5(0x1f3)])==null?void 0x0:_0x3ecb30['userID'])!=null?_0x11765a:_0x155b3f[_0x16e2c5(0x1b7)],'text':JSON[_0x16e2c5(0x1f1)](_0x155b3f['content']),'parentId':_0x5bb1d0['id']});break;}case v[_0x16e2c5(0x1a7)]:{const _0x4381de=this['_threadCommentModel'][_0x16e2c5(0x1c0)](_0x1afcf1,_0x2c758b,_0x155b3f[_0x16e2c5(0x1da)]);_0x4381de&&_0x4381de[_0x16e2c5(0x1b6)]&&this[_0x16e2c5(0x1c5)][_0x16e2c5(0x1c2)](_0x1afcf1,_0x2c758b,_0x155b3f[_0x16e2c5(0x1da)]);break;}case v[_0x16e2c5(0x1e7)]:{this[_0x16e2c5(0x1c5)][_0x16e2c5(0x191)](_0x1afcf1,_0x2c758b,{'commentId':_0x155b3f[_0x16e2c5(0x1da)],'text':JSON[_0x16e2c5(0x1f1)](_0x155b3f[_0x16e2c5(0x1b1)])});break;}case v[_0x16e2c5(0x1cf)]:{const _0x194f9c=(_0x5bba12=this[_0x16e2c5(0x1c5)][_0x16e2c5(0x1b2)](_0x155b3f[_0x16e2c5(0x19c)])['find'](_0x73b62e=>_0x73b62e[_0x16e2c5(0x1b9)]===_0x155b3f['threadId']))==null?void 0x0:_0x5bba12[_0x16e2c5(0x1a0)];_0x194f9c&&this[_0x16e2c5(0x1c5)]['resolveComment'](_0x1afcf1,_0x2c758b,_0x194f9c['id'],_0x155b3f['solved']===I[_0x16e2c5(0x19f)]);break;}}}));}};S=V([p(0x0,_0x5c8dc2(_0x518e23)),p(0x1,_0x5c8dc2(_0x54939c)),p(0x2,_0x5c8dc2(_0xd09db)),p(0x3,_0x5c8dc2(_0x555bce))],S);const z=_0x2db34b(0x193),M={};var k=Object[_0x2db34b(0x1f2)],Q=(_0x12d8ba,_0x2e720f,_0x5ecb35,_0x12556a)=>{const _0x34d821=_0x2db34b;for(var _0x28d042=_0x12556a>0x1?void 0x0:_0x12556a?k(_0x2e720f,_0x5ecb35):_0x2e720f,_0xc5696e=_0x12d8ba[_0x34d821(0x1f7)]-0x1,_0x13e84f;_0xc5696e>=0x0;_0xc5696e--)(_0x13e84f=_0x12d8ba[_0xc5696e])&&(_0x28d042=_0x13e84f(_0x28d042)||_0x28d042);return _0x28d042;},_=(_0x396d9f,_0x584c3b)=>(_0x219826,_0x3ed782)=>_0x584c3b(_0x219826,_0x3ed782,_0x396d9f);function X(_0x1010f0,_0x50c67c){const _0x440225=_0x2db34b,_0x1e4ea7=_0x1010f0['replies'][0x0];return{..._0x50c67c,'id':_0x1e4ea7[_0x440225(0x1da)],'resolved':_0x1010f0[_0x440225(0x1f5)]===0x1,'dT':D(_0x1e4ea7[_0x440225(0x1d5)]),'personId':_0x1e4ea7[_0x440225(0x1b7)],'threadId':_0x1e4ea7[_0x440225(0x1b9)]};}function ee(_0x4b4504,_0xdc293e,_0x1c736a){const _0x368ce1=_0x2db34b;var _0x3b788c,_0x1aaf27;if(((_0x1aaf27=(_0x3b788c=_0x4b4504==null?void 0x0:_0x4b4504['replies'])==null?void 0x0:_0x3b788c[_0x368ce1(0x1f7)])!=null?_0x1aaf27:0x0)>0x0){const _0xc2fef0=(_0x190e50,_0x5b9b75)=>({'id':_0x190e50['replyId'],'threadId':_0x190e50[_0x368ce1(0x1b9)],'dT':D(_0x190e50[_0x368ce1(0x1d5)]),'personId':_0x190e50[_0x368ce1(0x1b7)],'resolved':_0x4b4504['solved']===I[_0x368ce1(0x19f)],'unitId':_0xdc293e,'subUnitId':_0x1c736a,'text':JSON[_0x368ce1(0x1f1)](_0x190e50[_0x368ce1(0x1b1)]),'parentId':_0x5b9b75}),_0x32a2da=_0xc2fef0(_0x4b4504[_0x368ce1(0x19d)][0x0]);return{..._0x32a2da,'children':_0x4b4504[_0x368ce1(0x19d)][_0x368ce1(0x1bd)](0x1)['map'](_0x530621=>_0xc2fef0(_0x530621,_0x32a2da['id']))};}return null;}let f=class{constructor(_0x308845,_0x16a615,_0x5c14b3,_0x31dc07){const _0x3ee019=_0x2db34b;this[_0x3ee019(0x1af)]=_0x308845,this[_0x3ee019(0x1ce)]=_0x16a615,this['_sessionService']=_0x5c14b3,this[_0x3ee019(0x1d0)]=_0x31dc07;}async[_0x2db34b(0x1ab)](_0x1f1b33){const _0x22c5d0=_0x2db34b;var _0x5c3ce7,_0x29e54e;const {parentId:_0x2f1bed,unitId:_0x2daf1d,text:_0x4d7839,threadId:_0x3e755d}=_0x1f1b33,_0x57d218=(_0x29e54e=(_0x5c3ce7=_0x4d7839[_0x22c5d0(0x192)])==null?void 0x0:_0x5c3ce7[_0x22c5d0(0x1d6)](_0x554aa9=>_0x554aa9['rangeType']===_0x4a9146['COMMENT'])[_0x22c5d0(0x1c3)](_0x78198f=>_0x78198f['rangeId']))!=null?_0x29e54e:[],_0x209db1=JSON['stringify'](_0x4d7839),_0x1ef5b9=(await this[_0x22c5d0(0x1ac)]['requireSession'](_0x2daf1d))['getMemberID']();if(_0x2f1bed){const _0x7aa876={'memberId':_0x1ef5b9,'unitId':_0x2daf1d,'content':_0x209db1,'mention':_0x57d218,'threadId':_0x3e755d},_0x3189a3=(await this[_0x22c5d0(0x1af)][_0x22c5d0(0x1e3)]('/universer-api/comment/unit/'+_0x2daf1d+'/reply',{'body':_0x7aa876}))[_0x22c5d0(0x1d2)][_0x22c5d0(0x1c4)];return{..._0x1f1b33,'id':_0x3189a3[_0x22c5d0(0x1da)],'dT':_0x4cfdfe(+_0x3189a3['createTimestamp'])[_0x22c5d0(0x1aa)](_0x22c5d0(0x1f0)),'personId':_0x3189a3[_0x22c5d0(0x1b7)]};}else{const _0xd6169d={'memberId':_0x1ef5b9,'unitId':_0x2daf1d,'content':_0x209db1,'mention':_0x57d218},_0x41f278=await this[_0x22c5d0(0x1af)][_0x22c5d0(0x1e3)](_0x22c5d0(0x1b0)+_0x2daf1d+'/add',{'body':_0xd6169d});return X(_0x41f278['body'][_0x22c5d0(0x1b5)],_0x1f1b33);}}async[_0x2db34b(0x191)](_0x4d165b){const _0x20c4bc=_0x2db34b;var _0x30480c,_0x45ad51;const {text:_0x46f97a,unitId:_0x5def01}=_0x4d165b,_0x55c4a8=(_0x45ad51=(_0x30480c=_0x46f97a[_0x20c4bc(0x192)])==null?void 0x0:_0x30480c[_0x20c4bc(0x1d6)](_0x1ebdcc=>_0x1ebdcc['rangeType']===_0x4a9146[_0x20c4bc(0x19a)])[_0x20c4bc(0x1c3)](_0x358abf=>_0x358abf[_0x20c4bc(0x1cd)]))!=null?_0x45ad51:[],_0x21698a=JSON[_0x20c4bc(0x198)](_0x46f97a),_0x5ef6cc=_0x4d165b[_0x20c4bc(0x1b9)],_0x2f9976=_0x4d165b['id'],_0x5c1d27={'memberId':(await this['_sessionService'][_0x20c4bc(0x1c9)](_0x5def01))['getMemberID'](),'unitId':_0x5def01,'threadId':_0x5ef6cc,'mention':_0x55c4a8,'content':_0x21698a,'replyId':_0x2f9976},_0xd0704b=await this[_0x20c4bc(0x1af)][_0x20c4bc(0x1e3)](_0x20c4bc(0x1b0)+_0x5def01+_0x20c4bc(0x1f4),{'body':_0x5c1d27});return!_0xd0704b[_0x20c4bc(0x1d2)]['error']||_0xd0704b[_0x20c4bc(0x1d2)][_0x20c4bc(0x1be)][_0x20c4bc(0x1e6)]===0x1;}async[_0x2db34b(0x1e5)](_0x1f4049){const _0x1dcf6e=_0x2db34b,{unitId:_0x273f64}=_0x1f4049,_0x4c1bf6=_0x1f4049[_0x1dcf6e(0x1b9)],_0x5773c6={'memberId':this['_userService'][_0x1dcf6e(0x1c8)]()[_0x1dcf6e(0x1bf)],'unitId':_0x273f64,'threadId':_0x4c1bf6,'solved':_0x1f4049['resolved']?I['Solved']:I[_0x1dcf6e(0x1ad)]},_0x1207a9=await this['_httpService'][_0x1dcf6e(0x1e3)](_0x1dcf6e(0x1b0)+_0x273f64+_0x1dcf6e(0x194),{'body':_0x5773c6});return!_0x1207a9[_0x1dcf6e(0x1d2)][_0x1dcf6e(0x1be)]||_0x1207a9[_0x1dcf6e(0x1d2)]['error'][_0x1dcf6e(0x1e6)]===0x1;}async[_0x2db34b(0x1c2)](_0x5dfcee,_0x1ecc59,_0x4f05f7,_0x20f444){const _0x50dded=_0x2db34b,_0x2639ef={'memberId':(await this[_0x50dded(0x1ac)][_0x50dded(0x1c9)](_0x5dfcee))[_0x50dded(0x1c1)](),'threadId':_0x4f05f7,'replyId':_0x20f444,'unitId':_0x5dfcee},_0x5bae07=await this[_0x50dded(0x1af)][_0x50dded(0x1e3)]('/universer-api/comment/unit/'+_0x5dfcee+_0x50dded(0x1a1),{'body':_0x2639ef});return!_0x5bae07[_0x50dded(0x1d2)][_0x50dded(0x1be)]||_0x5bae07['body'][_0x50dded(0x1be)]['code']===0x1;}async[_0x2db34b(0x1ca)](_0x4edcde,_0x403e6f,_0x33ca43){const _0x25d186=_0x2db34b,_0x3caafa={'unitId':_0x4edcde,'threadId':_0x33ca43},_0x444905=await this[_0x25d186(0x1af)]['post'](_0x25d186(0x1b0)+_0x4edcde+'/list',{'body':_0x3caafa}),_0x288e6b=_0x33ca43[_0x25d186(0x1c3)](_0x1a1bd4=>ee(_0x444905[_0x25d186(0x1d2)][_0x25d186(0x1d8)][_0x1a1bd4],_0x4edcde,_0x403e6f))[_0x25d186(0x1d6)](Boolean);return Object[_0x25d186(0x1d4)](_0x444905[_0x25d186(0x1d2)][_0x25d186(0x1a9)])[_0x25d186(0x1bb)](_0x5bb984=>{const _0x1ae605=_0x25d186;this[_0x1ae605(0x1ce)][_0x1ae605(0x1ed)](_0x5bb984);}),_0x288e6b;}[_0x2db34b(0x1e1)](_0x4b094f){const _0x1622eb=_0x2db34b;return{'id':_0x4b094f['id'],'threadId':_0x4b094f[_0x1622eb(0x1b9)],'ref':_0x4b094f[_0x1622eb(0x1eb)]};}};f=Q([_(0x0,_0x5c8dc2(_0x9577a3)),_(0x1,_0x5c8dc2(_0xd09db)),_(0x2,_0x5c8dc2(_0x25437f)),_(0x3,_0x5c8dc2(_0x555bce))],f);function _0xa939(_0x20a41b,_0x1881e9){const _0x153525=_0x1535();return _0xa939=function(_0xa93947,_0x20a87f){_0xa93947=_0xa93947-0x191;let _0x366989=_0x153525[_0xa93947];return _0x366989;},_0xa939(_0x20a41b,_0x1881e9);}var re=Object[_0x2db34b(0x1f2)],te=(_0xb45255,_0x11fa76,_0x56d3b3,_0x32fb3b)=>{for(var _0x5e3a2d=_0x32fb3b>0x1?void 0x0:_0x32fb3b?re(_0x11fa76,_0x56d3b3):_0x11fa76,_0x5ce67f=_0xb45255['length']-0x1,_0x3aa32c;_0x5ce67f>=0x0;_0x5ce67f--)(_0x3aa32c=_0xb45255[_0x5ce67f])&&(_0x5e3a2d=_0x3aa32c(_0x5e3a2d)||_0x5e3a2d);return _0x5e3a2d;},N=(_0x189a2c,_0x3d3767)=>(_0x517933,_0x5e34a6)=>_0x3d3767(_0x517933,_0x5e34a6,_0x189a2c);let g=class extends _0x209d22{constructor(_0x443e30,_0x540623){const _0x8ebfd=_0x2db34b;super(),this[_0x8ebfd(0x1a5)]=_0x443e30,this[_0x8ebfd(0x195)]=_0x540623,this[_0x8ebfd(0x1ba)]();}['_initDataSource'](){const _0x5e646a=_0x2db34b;this['_threadCommentDataSourceService'][_0x5e646a(0x1ec)]=this[_0x5e646a(0x195)],this[_0x5e646a(0x1a5)][_0x5e646a(0x1e9)]=!0x1;}};g=te([N(0x0,_0x3546ec),N(0x1,_0x5c8dc2(f))],g);var se=Object[_0x2db34b(0x1d1)],oe=Object[_0x2db34b(0x1f2)],ne=(_0x48b37f,_0x4d73af,_0x1fd5fd)=>_0x4d73af in _0x48b37f?se(_0x48b37f,_0x4d73af,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1fd5fd}):_0x48b37f[_0x4d73af]=_0x1fd5fd,ie=(_0x5ec4c9,_0x1ba78c,_0x4276dc,_0x520656)=>{const _0x4a0035=_0x2db34b;for(var _0x334e4d=_0x520656>0x1?void 0x0:_0x520656?oe(_0x1ba78c,_0x4276dc):_0x1ba78c,_0xf6ed8d=_0x5ec4c9[_0x4a0035(0x1f7)]-0x1,_0x526744;_0xf6ed8d>=0x0;_0xf6ed8d--)(_0x526744=_0x5ec4c9[_0xf6ed8d])&&(_0x334e4d=_0x526744(_0x334e4d)||_0x334e4d);return _0x334e4d;},w=(_0x573c95,_0x23b4c4)=>(_0x1ebfa8,_0x5e70ad)=>_0x23b4c4(_0x1ebfa8,_0x5e70ad,_0x573c95),$=(_0x5eddcf,_0x7e9cb3,_0x30b943)=>ne(_0x5eddcf,typeof _0x7e9cb3!=_0x2db34b(0x1e2)?_0x7e9cb3+'':_0x7e9cb3,_0x30b943);let b=class extends _0x47c1c6{constructor(_0x582bcf=M,_0x2b67b0,_0x3be51f){const _0x29ee52=_0x2db34b;super(),this['_config']=_0x582bcf,this[_0x29ee52(0x1d0)]=_0x2b67b0,this[_0x29ee52(0x1ea)]=_0x3be51f;const {..._0x249bb6}=_0x20b3b4({},M,this[_0x29ee52(0x1a6)]);this[_0x29ee52(0x1ea)][_0x29ee52(0x1bc)](z,_0x249bb6);}[_0x2db34b(0x1d7)](){const _0x3730a9=_0x2db34b;[[f],[g],[S]][_0x3730a9(0x1bb)](_0x49e43e=>{const _0x4e7c78=_0x3730a9;this['_injector'][_0x4e7c78(0x1b3)](_0x49e43e);});}[_0x2db34b(0x1a8)](){const _0x53d72d=_0x2db34b;this[_0x53d72d(0x1d0)][_0x53d72d(0x1dc)](g),this[_0x53d72d(0x1d0)][_0x53d72d(0x1dc)](S);}};$(b,_0x2db34b(0x197),W),$(b,'type',_0x4bf91a['UNIVER_UNKNOWN']),b=ie([_0x5f5485(_0x356d5f,_0x498854,_0x5bfe90),w(0x1,_0x5c8dc2(_0x555bce)),w(0x2,_0x91542d)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x1a6ee2=_0x455b;(function(_0x1f0d0e,_0x380543){const _0x215a76=_0x455b,_0x3a1a48=_0x1f0d0e();while(!![]){try{const _0x20b41c=-parseInt(_0x215a76(0x203))/0x1*(parseInt(_0x215a76(0x1c6))/0x2)+parseInt(_0x215a76(0x1da))/0x3*(parseInt(_0x215a76(0x1d1))/0x4)+-parseInt(_0x215a76(0x1a4))/0x5+-parseInt(_0x215a76(0x1ad))/0x6+-parseInt(_0x215a76(0x1bf))/0x7+-parseInt(_0x215a76(0x1db))/0x8*(-parseInt(_0x215a76(0x1ef))/0x9)+parseInt(_0x215a76(0x1a7))/0xa;if(_0x20b41c===_0x380543)break;else _0x3a1a48['push'](_0x3a1a48['shift']());}catch(_0x2fd466){_0x3a1a48['push'](_0x3a1a48['shift']());}}}(_0x3601,0x5ad91));import{CommentService as _0x37e2e7,CollaborationSessionService as _0x99aabe,UniverCollaborationClientPlugin as _0x5816e6}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1bc6a8}from'@univerjs-pro/license';import{dayjs as _0x173d38,UserManagerService as _0x268413,Inject as _0x18999a,Injector as _0x47417b,Disposable as _0x5e9a40,CustomRangeType as _0x4b606d,UniverInstanceType as _0x4c6779,DependentOn as _0x2a1c99,IConfigService as _0x562190,Plugin as _0x34ae44,merge as _0x29a050}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x47b7d1}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4ae210,IThreadCommentDataSourceService as _0x29bf24}from'@univerjs/thread-comment';import{bufferTime as _0x177664}from'rxjs';function _0x3601(){const _0x3e5031=['listComments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','9385880KYNGxW','comments','_sessionService','values','YYYY/MM/DD\x20HH:mm','thread-comment-data-source.config','547728kZwVls','slice','customRanges','parentId','dataSource','get','map','format','requireSession','rangeType','filter','Solved','forEach','Unknown','userID','content','UNIVER_UNKNOWN','getComment','4483661bqtATb','user','getUser','parse','Delete','/list','/universer-api/user/list','44gZpabz','Solve','Add','onReady','_initUserSync','_configService','rangeId','post','_httpService','/add','getOwnPropertyDescriptor','44ugdJDo','_threadCommentModel','getCurrentUser','error','/reply','getUnit','threadId','OpenOrReOpen','stringify','150492wkALkr','89616tCXiDW','/delete','body','payload','deleteComment','solved','addUser','UNRECOGNIZED','setConfig','createTimestamp','userId','disposeWithMe','root','resolveComment','personId','_config','addComment','subscribe','_injector','saveCommentToSnapshot','513spIecV','/edit','replyId','size','unitId','COMMENT','length','_init','_initDataSource','add','/universer-api/comment/unit/','replies','symbol','type','_commentService','_userService','/solved','getMemberID','Reply','_threadCommentDataSourceService','23023evFCRi','commentUpdate$','_threadCommentDataSource','updateComment','find','delete','code','2592380JonEhq'];_0x3601=function(){return _0x3e5031;};return _0x3601();}import{HTTPService as _0x57e027}from'@univerjs/network';const W=_0x1a6ee2(0x1a6);var I=(_0x2d4dbb=>(_0x2d4dbb[_0x2d4dbb[_0x1a6ee2(0x1d8)]=0x0]='OpenOrReOpen',_0x2d4dbb[_0x2d4dbb[_0x1a6ee2(0x1b8)]=0x1]=_0x1a6ee2(0x1b8),_0x2d4dbb[_0x2d4dbb[_0x1a6ee2(0x1e2)]=-0x1]=_0x1a6ee2(0x1e2),_0x2d4dbb))(I||{}),v=(_0xae58d3=>(_0xae58d3[_0xae58d3[_0x1a6ee2(0x1ba)]=0x0]=_0x1a6ee2(0x1ba),_0xae58d3[_0xae58d3[_0x1a6ee2(0x1c8)]=0x1]=_0x1a6ee2(0x1c8),_0xae58d3[_0xae58d3[_0x1a6ee2(0x201)]=0x2]=_0x1a6ee2(0x201),_0xae58d3[_0xae58d3['Edit']=0x3]='Edit',_0xae58d3[_0xae58d3['Delete']=0x4]=_0x1a6ee2(0x1c3),_0xae58d3[_0xae58d3[_0x1a6ee2(0x1c7)]=0x5]='Solve',_0xae58d3[_0xae58d3[_0x1a6ee2(0x1e2)]=-0x1]=_0x1a6ee2(0x1e2),_0xae58d3))(v||{});const D=_0x79f35e=>_0x173d38(new Date(+_0x79f35e))['format'](_0x1a6ee2(0x1ab)),B=async(_0x459df6,_0x229a2b)=>{const _0xf1adca=_0x1a6ee2,_0xe3cae7=_0x459df6['get'](_0x268413),_0x52772c=_0x459df6[_0xf1adca(0x1b2)](_0x57e027);_0x229a2b[_0xf1adca(0x1b9)](_0x521d8b=>{const _0x40be42=_0xf1adca;_0xe3cae7[_0x40be42(0x1c1)](_0x521d8b)&&_0x229a2b[_0x40be42(0x1a2)](_0x521d8b);}),_0x229a2b[_0xf1adca(0x1f2)]&&(await _0x52772c['get'](_0xf1adca(0x1c5),{'params':{'userIDs':[..._0x229a2b]}}))['body']['users'][_0xf1adca(0x1b9)](_0x42d1d8=>{_0x42d1d8&&_0xe3cae7['addUser'](_0x42d1d8);});};var K=Object[_0x1a6ee2(0x1d0)],V=(_0x338dc1,_0xf0785a,_0x38b216,_0x35af78)=>{const _0x4c8c4c=_0x1a6ee2;for(var _0x413a3=_0x35af78>0x1?void 0x0:_0x35af78?K(_0xf0785a,_0x38b216):_0xf0785a,_0x434a69=_0x338dc1[_0x4c8c4c(0x1f5)]-0x1,_0x3ec5ef;_0x434a69>=0x0;_0x434a69--)(_0x3ec5ef=_0x338dc1[_0x434a69])&&(_0x413a3=_0x3ec5ef(_0x413a3)||_0x413a3);return _0x413a3;},p=(_0x4a0093,_0x305650)=>(_0x1494dd,_0x5ca200)=>_0x305650(_0x1494dd,_0x5ca200,_0x4a0093);let S=class extends _0x5e9a40{constructor(_0x267215,_0x53b487,_0x2a4575,_0xbbdd4){const _0x3583e7=_0x1a6ee2;super(),this[_0x3583e7(0x1fd)]=_0x267215,this[_0x3583e7(0x1d2)]=_0x53b487,this[_0x3583e7(0x1fe)]=_0x2a4575,this[_0x3583e7(0x1ed)]=_0xbbdd4,this[_0x3583e7(0x1f6)](),this[_0x3583e7(0x1ca)]();}['_initUserSync'](){const _0x212914=_0x1a6ee2;this[_0x212914(0x1e6)](this[_0x212914(0x1d2)][_0x212914(0x204)]['pipe'](_0x177664(0x10))[_0x212914(0x1ec)](_0x276408=>{const _0x4ff9f2=_0x212914,_0x23f1e0=new Set();_0x276408['forEach'](_0x35b428=>{const _0x42c49a=_0x455b;switch(_0x35b428[_0x42c49a(0x1fc)]){case'add':{const _0x5eccc9=_0x35b428[_0x42c49a(0x1de)][_0x42c49a(0x1e9)];_0x23f1e0[_0x42c49a(0x1f8)](_0x5eccc9);break;}}}),B(this[_0x4ff9f2(0x1ed)],_0x23f1e0);}));}[_0x1a6ee2(0x1f6)](){const _0x3987c2=_0x1a6ee2;this[_0x3987c2(0x1e6)](this[_0x3987c2(0x1fd)][_0x3987c2(0x204)][_0x3987c2(0x1ec)](async _0x1e731e=>{const _0x349258=_0x3987c2;var _0x3cb5ed,_0x32fcdb,_0x5f31ed,_0x13ace4;const _0x3e20df=(_0x3cb5ed=this[_0x349258(0x1d2)][_0x349258(0x1d6)](_0x1e731e[_0x349258(0x1f3)])[_0x349258(0x207)](_0x2c3662=>_0x2c3662[_0x349258(0x1d7)]===_0x1e731e[_0x349258(0x1d7)]))==null?void 0x0:_0x3cb5ed[_0x349258(0x1e7)];if(!_0x3e20df)return;const {unitId:_0x29a61e,subUnitId:_0x449013}=_0x3e20df;switch(_0x1e731e[_0x349258(0x1c0)]&&this[_0x349258(0x1fe)][_0x349258(0x1e1)](_0x1e731e[_0x349258(0x1c0)]),_0x1e731e[_0x349258(0x1fc)]){case v['Add']:break;case v[_0x349258(0x201)]:{this[_0x349258(0x1d2)][_0x349258(0x1eb)](_0x29a61e,_0x449013,{'unitId':_0x29a61e,'subUnitId':_0x449013,'ref':'','id':_0x1e731e[_0x349258(0x1f1)],'dT':D(+_0x1e731e[_0x349258(0x1e4)]),'threadId':_0x1e731e[_0x349258(0x1d7)],'personId':(_0x5f31ed=(_0x32fcdb=_0x1e731e[_0x349258(0x1c0)])==null?void 0x0:_0x32fcdb[_0x349258(0x1bb)])!=null?_0x5f31ed:_0x1e731e[_0x349258(0x1e5)],'text':JSON[_0x349258(0x1c2)](_0x1e731e[_0x349258(0x1bc)]),'parentId':_0x3e20df['id']});break;}case v[_0x349258(0x1c3)]:{const _0x5869b7=this['_threadCommentModel'][_0x349258(0x1be)](_0x29a61e,_0x449013,_0x1e731e[_0x349258(0x1f1)]);_0x5869b7&&_0x5869b7[_0x349258(0x1b0)]&&this[_0x349258(0x1d2)][_0x349258(0x1df)](_0x29a61e,_0x449013,_0x1e731e[_0x349258(0x1f1)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x349258(0x206)](_0x29a61e,_0x449013,{'commentId':_0x1e731e[_0x349258(0x1f1)],'text':JSON[_0x349258(0x1c2)](_0x1e731e[_0x349258(0x1bc)])});break;}case v[_0x349258(0x1c7)]:{const _0x7d05a=(_0x13ace4=this[_0x349258(0x1d2)][_0x349258(0x1d6)](_0x1e731e[_0x349258(0x1f3)])['find'](_0x26ae86=>_0x26ae86[_0x349258(0x1d7)]===_0x1e731e[_0x349258(0x1d7)]))==null?void 0x0:_0x13ace4['root'];_0x7d05a&&this['_threadCommentModel']['resolveComment'](_0x29a61e,_0x449013,_0x7d05a['id'],_0x1e731e['solved']===I[_0x349258(0x1b8)]);break;}}}));}};S=V([p(0x0,_0x18999a(_0x37e2e7)),p(0x1,_0x18999a(_0x4ae210)),p(0x2,_0x18999a(_0x268413)),p(0x3,_0x18999a(_0x47417b))],S);const z=_0x1a6ee2(0x1ac),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x3af4e6,_0x25d3fc,_0xfe4dec,_0x4942e7)=>{const _0x29b208=_0x1a6ee2;for(var _0x291924=_0x4942e7>0x1?void 0x0:_0x4942e7?k(_0x25d3fc,_0xfe4dec):_0x25d3fc,_0x597cf2=_0x3af4e6[_0x29b208(0x1f5)]-0x1,_0x2d47a2;_0x597cf2>=0x0;_0x597cf2--)(_0x2d47a2=_0x3af4e6[_0x597cf2])&&(_0x291924=_0x2d47a2(_0x291924)||_0x291924);return _0x291924;},_=(_0x49951e,_0x4d95de)=>(_0x2451b8,_0x186c09)=>_0x4d95de(_0x2451b8,_0x186c09,_0x49951e);function X(_0x1c978a,_0x5cb55f){const _0x830b93=_0x1a6ee2,_0xb7f9e=_0x1c978a[_0x830b93(0x1fa)][0x0];return{..._0x5cb55f,'id':_0xb7f9e[_0x830b93(0x1f1)],'resolved':_0x1c978a['solved']===0x1,'dT':D(_0xb7f9e[_0x830b93(0x1e4)]),'personId':_0xb7f9e['userId'],'threadId':_0xb7f9e[_0x830b93(0x1d7)]};}function _0x455b(_0x187256,_0x15ce31){const _0x360141=_0x3601();return _0x455b=function(_0x455b0e,_0x3cefec){_0x455b0e=_0x455b0e-0x1a2;let _0x3ea1cb=_0x360141[_0x455b0e];return _0x3ea1cb;},_0x455b(_0x187256,_0x15ce31);}function ee(_0x4e88f0,_0x236cc9,_0x44397d){const _0x2da8a8=_0x1a6ee2;var _0x471af5,_0x2aaa25;if(((_0x2aaa25=(_0x471af5=_0x4e88f0==null?void 0x0:_0x4e88f0[_0x2da8a8(0x1fa)])==null?void 0x0:_0x471af5[_0x2da8a8(0x1f5)])!=null?_0x2aaa25:0x0)>0x0){const _0xef7917=(_0x3f7bb6,_0x6d8855)=>({'id':_0x3f7bb6['replyId'],'threadId':_0x3f7bb6['threadId'],'dT':D(_0x3f7bb6[_0x2da8a8(0x1e4)]),'personId':_0x3f7bb6[_0x2da8a8(0x1e5)],'resolved':_0x4e88f0[_0x2da8a8(0x1e0)]===I[_0x2da8a8(0x1b8)],'unitId':_0x236cc9,'subUnitId':_0x44397d,'text':JSON['parse'](_0x3f7bb6[_0x2da8a8(0x1bc)]),'parentId':_0x6d8855}),_0x78b139=_0xef7917(_0x4e88f0['replies'][0x0]);return{..._0x78b139,'children':_0x4e88f0[_0x2da8a8(0x1fa)][_0x2da8a8(0x1ae)](0x1)['map'](_0xdeeaaf=>_0xef7917(_0xdeeaaf,_0x78b139['id']))};}return null;}let f=class{constructor(_0x29f6bf,_0x1c3e9f,_0x430ba7,_0x2d9ae8){const _0x50fe06=_0x1a6ee2;this[_0x50fe06(0x1ce)]=_0x29f6bf,this['_userService']=_0x1c3e9f,this[_0x50fe06(0x1a9)]=_0x430ba7,this[_0x50fe06(0x1ed)]=_0x2d9ae8;}async[_0x1a6ee2(0x1eb)](_0x197cff){const _0x4b2a89=_0x1a6ee2;var _0x4c38b5,_0x2f9339;const {parentId:_0xad08d5,unitId:_0x2659b2,text:_0x21ee43,threadId:_0x369713}=_0x197cff,_0x5728cb=(_0x2f9339=(_0x4c38b5=_0x21ee43['customRanges'])==null?void 0x0:_0x4c38b5[_0x4b2a89(0x1b7)](_0x83e7a5=>_0x83e7a5[_0x4b2a89(0x1b6)]===_0x4b606d['COMMENT'])[_0x4b2a89(0x1b3)](_0x149d16=>_0x149d16[_0x4b2a89(0x1cc)]))!=null?_0x2f9339:[],_0x4fc3ad=JSON[_0x4b2a89(0x1d9)](_0x21ee43),_0x934d0e=(await this[_0x4b2a89(0x1a9)][_0x4b2a89(0x1b5)](_0x2659b2))[_0x4b2a89(0x200)]();if(_0xad08d5){const _0x57b9a3={'memberId':_0x934d0e,'unitId':_0x2659b2,'content':_0x4fc3ad,'mention':_0x5728cb,'threadId':_0x369713},_0x33b0ac=(await this[_0x4b2a89(0x1ce)]['post'](_0x4b2a89(0x1f9)+_0x2659b2+_0x4b2a89(0x1d5),{'body':_0x57b9a3}))['body']['reply'];return{..._0x197cff,'id':_0x33b0ac[_0x4b2a89(0x1f1)],'dT':_0x173d38(+_0x33b0ac[_0x4b2a89(0x1e4)])[_0x4b2a89(0x1b4)](_0x4b2a89(0x1ab)),'personId':_0x33b0ac[_0x4b2a89(0x1e5)]};}else{const _0x70479a={'memberId':_0x934d0e,'unitId':_0x2659b2,'content':_0x4fc3ad,'mention':_0x5728cb},_0x474e85=await this[_0x4b2a89(0x1ce)][_0x4b2a89(0x1cd)](_0x4b2a89(0x1f9)+_0x2659b2+_0x4b2a89(0x1cf),{'body':_0x70479a});return X(_0x474e85[_0x4b2a89(0x1dd)]['comment'],_0x197cff);}}async[_0x1a6ee2(0x206)](_0x3d1b37){const _0x157a4d=_0x1a6ee2;var _0x15339b,_0x82e0ed;const {text:_0x449ff2,unitId:_0x5b843b}=_0x3d1b37,_0x2cc6a5=(_0x82e0ed=(_0x15339b=_0x449ff2[_0x157a4d(0x1af)])==null?void 0x0:_0x15339b['filter'](_0xfc1e7d=>_0xfc1e7d['rangeType']===_0x4b606d[_0x157a4d(0x1f4)])['map'](_0x5be6f7=>_0x5be6f7['rangeId']))!=null?_0x82e0ed:[],_0x5c0e7f=JSON[_0x157a4d(0x1d9)](_0x449ff2),_0x49492c=_0x3d1b37[_0x157a4d(0x1d7)],_0x54f8ba=_0x3d1b37['id'],_0x5d4930={'memberId':(await this['_sessionService'][_0x157a4d(0x1b5)](_0x5b843b))['getMemberID'](),'unitId':_0x5b843b,'threadId':_0x49492c,'mention':_0x2cc6a5,'content':_0x5c0e7f,'replyId':_0x54f8ba},_0x5b993e=await this[_0x157a4d(0x1ce)]['post']('/universer-api/comment/unit/'+_0x5b843b+_0x157a4d(0x1f0),{'body':_0x5d4930});return!_0x5b993e[_0x157a4d(0x1dd)][_0x157a4d(0x1d4)]||_0x5b993e[_0x157a4d(0x1dd)][_0x157a4d(0x1d4)][_0x157a4d(0x1a3)]===0x1;}async[_0x1a6ee2(0x1e8)](_0x3010cd){const _0x22d4ca=_0x1a6ee2,{unitId:_0x33b7fd}=_0x3010cd,_0x25adfb=_0x3010cd[_0x22d4ca(0x1d7)],_0x4d1401={'memberId':this[_0x22d4ca(0x1fe)][_0x22d4ca(0x1d3)]()['userID'],'unitId':_0x33b7fd,'threadId':_0x25adfb,'solved':_0x3010cd['resolved']?I[_0x22d4ca(0x1b8)]:I['OpenOrReOpen']},_0x13f70a=await this[_0x22d4ca(0x1ce)]['post'](_0x22d4ca(0x1f9)+_0x33b7fd+_0x22d4ca(0x1ff),{'body':_0x4d1401});return!_0x13f70a[_0x22d4ca(0x1dd)][_0x22d4ca(0x1d4)]||_0x13f70a['body'][_0x22d4ca(0x1d4)][_0x22d4ca(0x1a3)]===0x1;}async[_0x1a6ee2(0x1df)](_0xc19cb3,_0xf8af14,_0xe635bc,_0x3a5d79){const _0x4628a6=_0x1a6ee2,_0x3de27e={'memberId':(await this[_0x4628a6(0x1a9)]['requireSession'](_0xc19cb3))['getMemberID'](),'threadId':_0xe635bc,'replyId':_0x3a5d79,'unitId':_0xc19cb3},_0x4f0377=await this[_0x4628a6(0x1ce)][_0x4628a6(0x1cd)](_0x4628a6(0x1f9)+_0xc19cb3+_0x4628a6(0x1dc),{'body':_0x3de27e});return!_0x4f0377[_0x4628a6(0x1dd)][_0x4628a6(0x1d4)]||_0x4f0377[_0x4628a6(0x1dd)][_0x4628a6(0x1d4)][_0x4628a6(0x1a3)]===0x1;}async[_0x1a6ee2(0x1a5)](_0x370f4e,_0xac2ccb,_0x5d38e3){const _0x5d3d9f=_0x1a6ee2,_0x5b40ec={'unitId':_0x370f4e,'threadId':_0x5d38e3},_0x3bb04c=await this['_httpService']['post'](_0x5d3d9f(0x1f9)+_0x370f4e+_0x5d3d9f(0x1c4),{'body':_0x5b40ec}),_0x4a3560=_0x5d38e3[_0x5d3d9f(0x1b3)](_0x5ace44=>ee(_0x3bb04c[_0x5d3d9f(0x1dd)][_0x5d3d9f(0x1a8)][_0x5ace44],_0x370f4e,_0xac2ccb))[_0x5d3d9f(0x1b7)](Boolean);return Object[_0x5d3d9f(0x1aa)](_0x3bb04c[_0x5d3d9f(0x1dd)]['users'])[_0x5d3d9f(0x1b9)](_0x2c16be=>{const _0x5b2cd1=_0x5d3d9f;this[_0x5b2cd1(0x1fe)][_0x5b2cd1(0x1e1)](_0x2c16be);}),_0x4a3560;}[_0x1a6ee2(0x1ee)](_0x26ffee){return{'id':_0x26ffee['id'],'threadId':_0x26ffee['threadId'],'ref':_0x26ffee['ref']};}};f=Q([_(0x0,_0x18999a(_0x57e027)),_(0x1,_0x18999a(_0x268413)),_(0x2,_0x18999a(_0x99aabe)),_(0x3,_0x18999a(_0x47417b))],f);var re=Object[_0x1a6ee2(0x1d0)],te=(_0x326ca7,_0xd1e35,_0x5154aa,_0x1c7eb2)=>{for(var _0x4e60c1=_0x1c7eb2>0x1?void 0x0:_0x1c7eb2?re(_0xd1e35,_0x5154aa):_0xd1e35,_0x10a66b=_0x326ca7['length']-0x1,_0x73b0b7;_0x10a66b>=0x0;_0x10a66b--)(_0x73b0b7=_0x326ca7[_0x10a66b])&&(_0x4e60c1=_0x73b0b7(_0x4e60c1)||_0x4e60c1);return _0x4e60c1;},N=(_0x579e8b,_0x144156)=>(_0xc825dd,_0xc334a9)=>_0x144156(_0xc825dd,_0xc334a9,_0x579e8b);let g=class extends _0x5e9a40{constructor(_0x379b28,_0xf4e12c){const _0x208f8f=_0x1a6ee2;super(),this[_0x208f8f(0x202)]=_0x379b28,this[_0x208f8f(0x205)]=_0xf4e12c,this[_0x208f8f(0x1f7)]();}[_0x1a6ee2(0x1f7)](){const _0x490919=_0x1a6ee2;this[_0x490919(0x202)][_0x490919(0x1b1)]=this[_0x490919(0x205)],this[_0x490919(0x202)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x29bf24),N(0x1,_0x18999a(f))],g);var se=Object['defineProperty'],oe=Object[_0x1a6ee2(0x1d0)],ne=(_0x3bd80e,_0x448f17,_0x3dc415)=>_0x448f17 in _0x3bd80e?se(_0x3bd80e,_0x448f17,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3dc415}):_0x3bd80e[_0x448f17]=_0x3dc415,ie=(_0xfb6150,_0x4520c3,_0x3aabb1,_0x14a136)=>{for(var _0x52d658=_0x14a136>0x1?void 0x0:_0x14a136?oe(_0x4520c3,_0x3aabb1):_0x4520c3,_0x5282d8=_0xfb6150['length']-0x1,_0xfe5031;_0x5282d8>=0x0;_0x5282d8--)(_0xfe5031=_0xfb6150[_0x5282d8])&&(_0x52d658=_0xfe5031(_0x52d658)||_0x52d658);return _0x52d658;},w=(_0x5c5c9b,_0x28cd85)=>(_0x59cf73,_0x8c4e8b)=>_0x28cd85(_0x59cf73,_0x8c4e8b,_0x5c5c9b),$=(_0x3da695,_0x2f462d,_0x505353)=>ne(_0x3da695,typeof _0x2f462d!=_0x1a6ee2(0x1fb)?_0x2f462d+'':_0x2f462d,_0x505353);let b=class extends _0x34ae44{constructor(_0x3e41c3=M,_0x175189,_0x1355dd){const _0x418ee7=_0x1a6ee2;super(),this[_0x418ee7(0x1ea)]=_0x3e41c3,this[_0x418ee7(0x1ed)]=_0x175189,this[_0x418ee7(0x1cb)]=_0x1355dd;const {..._0x2cabdf}=_0x29a050({},M,this[_0x418ee7(0x1ea)]);this['_configService'][_0x418ee7(0x1e3)](z,_0x2cabdf);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x5828a0=>{const _0x5c6e79=_0x455b;this['_injector'][_0x5c6e79(0x1f8)](_0x5828a0);});}[_0x1a6ee2(0x1c9)](){const _0x27be43=_0x1a6ee2;this['_injector']['get'](g),this['_injector'][_0x27be43(0x1b2)](S);}};$(b,'pluginName',W),$(b,'type',_0x4c6779[_0x1a6ee2(0x1bd)]),b=ie([_0x2a1c99(_0x47b7d1,_0x5816e6,_0x1bc6a8),w(0x1,_0x18999a(_0x47417b)),w(0x2,_0x562190)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x3bdf(_0x594c15,_0x3e43ea){const _0x4a430a=_0x4a43();return _0x3bdf=function(_0x3bdf4c,_0x42a2db){_0x3bdf4c=_0x3bdf4c-0x15d;let _0x2e4fef=_0x4a430a[_0x3bdf4c];return _0x2e4fef;},_0x3bdf(_0x594c15,_0x3e43ea);}function _0x4a43(){const _0x2e644f=['symbol','/delete','Inject','addComment','UniverProThreadCommentDatasource','solved','IThreadCommentDataSourceService','_config','UniverThreadCommentDataSourcePlugin','userID','rxjs','delete','@univerjs-pro/collaboration-client','merge','10cQfKVi','_injector','OpenOrReOpen','Injector','CustomRangeType','4FdAsiZ','createTimestamp','parse','userId','_sessionService','object','users','@univerjs/thread-comment-ui','_init','reply','addUser','replyId','getMemberID','getUser','parentId','Solved','5lnEcFB','3569283tBZdsT','_threadCommentModel','UniverThreadCommentUIPlugin','root','UniverNetwork','filter','Delete','customRanges','Unknown','@univerjs-pro/license','toStringTag','post','getUnit','UserManagerService','syncUpdateMutationToColla','_initUserSync','HTTPService','rangeType','UniverCore','Disposable','UNIVER_UNKNOWN','onReady','_initDataSource','content','bufferTime','map','ref','_configService','@univerjs/core','format','Solve','forEach','defineProperty','replies','Reply','2766939MKMYeT','threadId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverCollaborationClientPlugin','exports','subscribe','stringify','DependentOn','payload','onStarting','ThreadCommentModel','error','add','/universer-api/user/list','/universer-api/comment/unit/','478714lnsjTD','@univerjs/thread-comment','code','listComments','_threadCommentDataSource','user','3644272HotAZQ','1150158pXtyBx','_userService','Edit','setConfig','comment','deleteComment','/reply','length','/add','get','UniverThreadComment','@univerjs/network','YYYY/MM/DD\x20HH:mm','commentUpdate$','thread-comment-data-source.config','body','disposeWithMe','Module','requireSession','/list','UniverThreadCommentUi','resolved','2437972ftbnAn','getOwnPropertyDescriptor','IConfigService','updateComment','Add','type','_threadCommentDataSourceService','2107746zHWfSj','comments','_httpService','unitId','pipe','UNRECOGNIZED','find','function'];_0x4a43=function(){return _0x2e644f;};return _0x4a43();}(function(_0x51f62b,_0x58cea8){const _0x409bd0=_0x3bdf,_0x480ce1=_0x51f62b();while(!![]){try{const _0x2cbacd=parseInt(_0x409bd0(0x1c0))/0x1*(parseInt(_0x409bd0(0x17d))/0x2)+-parseInt(_0x409bd0(0x1c7))/0x3+parseInt(_0x409bd0(0x1dd))/0x4+parseInt(_0x409bd0(0x18d))/0x5*(-parseInt(_0x409bd0(0x162))/0x6)+-parseInt(_0x409bd0(0x1b1))/0x7+parseInt(_0x409bd0(0x1c6))/0x8+parseInt(_0x409bd0(0x18e))/0x9*(-parseInt(_0x409bd0(0x178))/0xa);if(_0x2cbacd===_0x58cea8)break;else _0x480ce1['push'](_0x480ce1['shift']());}catch(_0x612bf7){_0x480ce1['push'](_0x480ce1['shift']());}}}(_0x4a43,0x7912a),function(_0x1f6e10,_0x2c0f4c){const _0x32a653=_0x3bdf;typeof exports==_0x32a653(0x182)&&typeof module<'u'?_0x2c0f4c(exports,require('@univerjs-pro/collaboration-client'),require(_0x32a653(0x197)),require(_0x32a653(0x1aa)),require('@univerjs/thread-comment-ui'),require(_0x32a653(0x1c1)),require(_0x32a653(0x174)),require(_0x32a653(0x1d2))):typeof define==_0x32a653(0x169)&&define['amd']?define([_0x32a653(0x1b5),_0x32a653(0x176),_0x32a653(0x197),_0x32a653(0x1aa),_0x32a653(0x184),_0x32a653(0x1c1),_0x32a653(0x174),_0x32a653(0x1d2)],_0x2c0f4c):(_0x1f6e10=typeof globalThis<'u'?globalThis:_0x1f6e10||self,_0x2c0f4c(_0x1f6e10[_0x32a653(0x16e)]={},_0x1f6e10['UniverProCollaborationClient'],_0x1f6e10['UniverProLicense'],_0x1f6e10[_0x32a653(0x1a0)],_0x1f6e10[_0x32a653(0x1db)],_0x1f6e10[_0x32a653(0x1d1)],_0x1f6e10[_0x32a653(0x174)],_0x1f6e10[_0x32a653(0x192)]));}(this,function(_0x10eb17,_0x5d3f6c,_0x3cc515,_0x11729c,_0x16d96,_0x4fdace,_0x407c18,_0x4fddd5){'use strict';const _0x57af29=_0x3bdf;const _0x4a2e77=_0x57af29(0x1b3);var _0x45bb7a=(_0x384bb2=>(_0x384bb2[_0x384bb2[_0x57af29(0x17a)]=0x0]='OpenOrReOpen',_0x384bb2[_0x384bb2[_0x57af29(0x18c)]=0x1]=_0x57af29(0x18c),_0x384bb2[_0x384bb2['UNRECOGNIZED']=-0x1]=_0x57af29(0x167),_0x384bb2))(_0x45bb7a||{}),_0x223295=(_0xaab4a8=>(_0xaab4a8[_0xaab4a8[_0x57af29(0x196)]=0x0]=_0x57af29(0x196),_0xaab4a8[_0xaab4a8['Add']=0x1]=_0x57af29(0x15f),_0xaab4a8[_0xaab4a8['Reply']=0x2]=_0x57af29(0x1b0),_0xaab4a8[_0xaab4a8[_0x57af29(0x1c9)]=0x3]=_0x57af29(0x1c9),_0xaab4a8[_0xaab4a8[_0x57af29(0x194)]=0x4]=_0x57af29(0x194),_0xaab4a8[_0xaab4a8[_0x57af29(0x1ac)]=0x5]=_0x57af29(0x1ac),_0xaab4a8[_0xaab4a8['UNRECOGNIZED']=-0x1]=_0x57af29(0x167),_0xaab4a8))(_0x223295||{});const _0x508756=_0x1cc1ec=>_0x11729c['dayjs'](new Date(+_0x1cc1ec))[_0x57af29(0x1ab)]('YYYY/MM/DD\x20HH:mm'),_0x10900a=async(_0x2c4735,_0x3483f9)=>{const _0x3e0b5e=_0x57af29,_0x30c7e5=_0x2c4735['get'](_0x11729c[_0x3e0b5e(0x19b)]),_0xb0f364=_0x2c4735[_0x3e0b5e(0x1d0)](_0x4fddd5['HTTPService']);_0x3483f9[_0x3e0b5e(0x1ad)](_0x33f323=>{const _0x4eff6b=_0x3e0b5e;_0x30c7e5[_0x4eff6b(0x18a)](_0x33f323)&&_0x3483f9[_0x4eff6b(0x175)](_0x33f323);}),_0x3483f9['size']&&(await _0xb0f364[_0x3e0b5e(0x1d0)](_0x3e0b5e(0x1be),{'params':{'userIDs':[..._0x3483f9]}}))[_0x3e0b5e(0x1d6)][_0x3e0b5e(0x183)][_0x3e0b5e(0x1ad)](_0x3f6279=>{const _0x56fa5a=_0x3e0b5e;_0x3f6279&&_0x30c7e5[_0x56fa5a(0x187)](_0x3f6279);});};var _0x41ed99=Object[_0x57af29(0x1de)],_0x3a5b7d=(_0x3be72f,_0x245728,_0x40dbef,_0x5ecaac)=>{const _0x5e44b6=_0x57af29;for(var _0x2ab15c=_0x5ecaac>0x1?void 0x0:_0x5ecaac?_0x41ed99(_0x245728,_0x40dbef):_0x245728,_0x4cb737=_0x3be72f[_0x5e44b6(0x1ce)]-0x1,_0x1a2e64;_0x4cb737>=0x0;_0x4cb737--)(_0x1a2e64=_0x3be72f[_0x4cb737])&&(_0x2ab15c=_0x1a2e64(_0x2ab15c)||_0x2ab15c);return _0x2ab15c;},_0x4e45e8=(_0x430b18,_0x39013f)=>(_0xc634b2,_0x70a8ed)=>_0x39013f(_0xc634b2,_0x70a8ed,_0x430b18);let _0x5f4b78=class extends _0x11729c[_0x57af29(0x1a1)]{constructor(_0x2616cf,_0x4ebae2,_0x47b5de,_0x423d5b){const _0x1134ae=_0x57af29;super(),this['_commentService']=_0x2616cf,this[_0x1134ae(0x18f)]=_0x4ebae2,this[_0x1134ae(0x1c8)]=_0x47b5de,this['_injector']=_0x423d5b,this['_init'](),this[_0x1134ae(0x19d)]();}[_0x57af29(0x19d)](){const _0x1780d0=_0x57af29;this[_0x1780d0(0x1d7)](this['_threadCommentModel']['commentUpdate$'][_0x1780d0(0x166)](_0x407c18[_0x1780d0(0x1a6)](0x10))[_0x1780d0(0x1b6)](_0xdd6871=>{const _0x371853=_0x1780d0,_0x2e845a=new Set();_0xdd6871[_0x371853(0x1ad)](_0x52e8db=>{const _0x5a564c=_0x371853;switch(_0x52e8db[_0x5a564c(0x160)]){case'add':{const _0x12c1e0=_0x52e8db[_0x5a564c(0x1b9)]['personId'];_0x2e845a[_0x5a564c(0x1bd)](_0x12c1e0);break;}}}),_0x10900a(this[_0x371853(0x179)],_0x2e845a);}));}[_0x57af29(0x185)](){const _0x131747=_0x57af29;this[_0x131747(0x1d7)](this['_commentService'][_0x131747(0x1d4)][_0x131747(0x1b6)](async _0x23bd87=>{const _0x1bdf31=_0x131747;var _0x2194ad,_0xec0573,_0x4d1619,_0x21558b;const _0xd059b9=(_0x2194ad=this[_0x1bdf31(0x18f)][_0x1bdf31(0x19a)](_0x23bd87[_0x1bdf31(0x165)])['find'](_0x4c9df7=>_0x4c9df7[_0x1bdf31(0x1b2)]===_0x23bd87['threadId']))==null?void 0x0:_0x2194ad[_0x1bdf31(0x191)];if(!_0xd059b9)return;const {unitId:_0x332f7c,subUnitId:_0x49bc14}=_0xd059b9;switch(_0x23bd87[_0x1bdf31(0x1c5)]&&this[_0x1bdf31(0x1c8)][_0x1bdf31(0x187)](_0x23bd87[_0x1bdf31(0x1c5)]),_0x23bd87[_0x1bdf31(0x160)]){case _0x223295[_0x1bdf31(0x15f)]:break;case _0x223295[_0x1bdf31(0x1b0)]:{this[_0x1bdf31(0x18f)][_0x1bdf31(0x16d)](_0x332f7c,_0x49bc14,{'unitId':_0x332f7c,'subUnitId':_0x49bc14,'ref':'','id':_0x23bd87[_0x1bdf31(0x188)],'dT':_0x508756(+_0x23bd87[_0x1bdf31(0x17e)]),'threadId':_0x23bd87['threadId'],'personId':(_0x4d1619=(_0xec0573=_0x23bd87[_0x1bdf31(0x1c5)])==null?void 0x0:_0xec0573[_0x1bdf31(0x173)])!=null?_0x4d1619:_0x23bd87[_0x1bdf31(0x180)],'text':JSON['parse'](_0x23bd87[_0x1bdf31(0x1a5)]),'parentId':_0xd059b9['id']});break;}case _0x223295['Delete']:{const _0x1875c0=this[_0x1bdf31(0x18f)]['getComment'](_0x332f7c,_0x49bc14,_0x23bd87['replyId']);_0x1875c0&&_0x1875c0[_0x1bdf31(0x18b)]&&this[_0x1bdf31(0x18f)][_0x1bdf31(0x1cc)](_0x332f7c,_0x49bc14,_0x23bd87[_0x1bdf31(0x188)]);break;}case _0x223295[_0x1bdf31(0x1c9)]:{this[_0x1bdf31(0x18f)][_0x1bdf31(0x15e)](_0x332f7c,_0x49bc14,{'commentId':_0x23bd87[_0x1bdf31(0x188)],'text':JSON[_0x1bdf31(0x17f)](_0x23bd87[_0x1bdf31(0x1a5)])});break;}case _0x223295[_0x1bdf31(0x1ac)]:{const _0x4df4d9=(_0x21558b=this['_threadCommentModel']['getUnit'](_0x23bd87[_0x1bdf31(0x165)])[_0x1bdf31(0x168)](_0xc38e9a=>_0xc38e9a['threadId']===_0x23bd87[_0x1bdf31(0x1b2)]))==null?void 0x0:_0x21558b['root'];_0x4df4d9&&this[_0x1bdf31(0x18f)]['resolveComment'](_0x332f7c,_0x49bc14,_0x4df4d9['id'],_0x23bd87[_0x1bdf31(0x16f)]===_0x45bb7a['Solved']);break;}}}));}};_0x5f4b78=_0x3a5b7d([_0x4e45e8(0x0,_0x11729c[_0x57af29(0x16c)](_0x5d3f6c['CommentService'])),_0x4e45e8(0x1,_0x11729c[_0x57af29(0x16c)](_0x4fdace[_0x57af29(0x1bb)])),_0x4e45e8(0x2,_0x11729c[_0x57af29(0x16c)](_0x11729c[_0x57af29(0x19b)])),_0x4e45e8(0x3,_0x11729c[_0x57af29(0x16c)](_0x11729c[_0x57af29(0x17b)]))],_0x5f4b78);const _0x34c1e5=_0x57af29(0x1d5),_0x29eac8={};var _0x382dd9=Object[_0x57af29(0x1de)],_0x2b33ca=(_0x317e6e,_0x59fd4f,_0x4c4936,_0x2c4df3)=>{for(var _0x5aaa7a=_0x2c4df3>0x1?void 0x0:_0x2c4df3?_0x382dd9(_0x59fd4f,_0x4c4936):_0x59fd4f,_0x77e52e=_0x317e6e['length']-0x1,_0x369bbb;_0x77e52e>=0x0;_0x77e52e--)(_0x369bbb=_0x317e6e[_0x77e52e])&&(_0x5aaa7a=_0x369bbb(_0x5aaa7a)||_0x5aaa7a);return _0x5aaa7a;},_0x115bac=(_0x5f2418,_0x4a26b3)=>(_0x3c6dc5,_0x6df00)=>_0x4a26b3(_0x3c6dc5,_0x6df00,_0x5f2418);function _0x10164e(_0x238e37,_0x496d56){const _0x411b1b=_0x57af29,_0x436eec=_0x238e37[_0x411b1b(0x1af)][0x0];return{..._0x496d56,'id':_0x436eec[_0x411b1b(0x188)],'resolved':_0x238e37[_0x411b1b(0x16f)]===0x1,'dT':_0x508756(_0x436eec[_0x411b1b(0x17e)]),'personId':_0x436eec[_0x411b1b(0x180)],'threadId':_0x436eec[_0x411b1b(0x1b2)]};}function _0x256116(_0x5c0db7,_0x5ec356,_0x272f9e){const _0x461f5c=_0x57af29;var _0xf5767a,_0x56278b;if(((_0x56278b=(_0xf5767a=_0x5c0db7==null?void 0x0:_0x5c0db7[_0x461f5c(0x1af)])==null?void 0x0:_0xf5767a['length'])!=null?_0x56278b:0x0)>0x0){const _0x5bf791=(_0x1bdbba,_0xd85bec)=>({'id':_0x1bdbba[_0x461f5c(0x188)],'threadId':_0x1bdbba[_0x461f5c(0x1b2)],'dT':_0x508756(_0x1bdbba[_0x461f5c(0x17e)]),'personId':_0x1bdbba['userId'],'resolved':_0x5c0db7[_0x461f5c(0x16f)]===_0x45bb7a[_0x461f5c(0x18c)],'unitId':_0x5ec356,'subUnitId':_0x272f9e,'text':JSON['parse'](_0x1bdbba[_0x461f5c(0x1a5)]),'parentId':_0xd85bec}),_0x13a4c1=_0x5bf791(_0x5c0db7[_0x461f5c(0x1af)][0x0]);return{..._0x13a4c1,'children':_0x5c0db7['replies']['slice'](0x1)['map'](_0x1ba40a=>_0x5bf791(_0x1ba40a,_0x13a4c1['id']))};}return null;}let _0x5cb553=class{constructor(_0x4d7229,_0x44f816,_0x2025ef,_0x10f1d1){const _0x17c240=_0x57af29;this[_0x17c240(0x164)]=_0x4d7229,this[_0x17c240(0x1c8)]=_0x44f816,this[_0x17c240(0x181)]=_0x2025ef,this[_0x17c240(0x179)]=_0x10f1d1;}async['addComment'](_0x1ffa84){const _0x1b7972=_0x57af29;var _0x26d4bb,_0x34fc69;const {parentId:_0x4a022a,unitId:_0x5d70ff,text:_0x22b6a4,threadId:_0x1c90ee}=_0x1ffa84,_0x4c7dd9=(_0x34fc69=(_0x26d4bb=_0x22b6a4[_0x1b7972(0x195)])==null?void 0x0:_0x26d4bb[_0x1b7972(0x193)](_0x2dc102=>_0x2dc102[_0x1b7972(0x19f)]===_0x11729c['CustomRangeType']['COMMENT'])[_0x1b7972(0x1a7)](_0x400ef3=>_0x400ef3['rangeId']))!=null?_0x34fc69:[],_0x209545=JSON[_0x1b7972(0x1b7)](_0x22b6a4),_0x1b2ec1=(await this[_0x1b7972(0x181)][_0x1b7972(0x1d9)](_0x5d70ff))[_0x1b7972(0x189)]();if(_0x4a022a){const _0x28fd4b={'memberId':_0x1b2ec1,'unitId':_0x5d70ff,'content':_0x209545,'mention':_0x4c7dd9,'threadId':_0x1c90ee},_0x5d41c1=(await this['_httpService'][_0x1b7972(0x199)]('/universer-api/comment/unit/'+_0x5d70ff+_0x1b7972(0x1cd),{'body':_0x28fd4b}))['body'][_0x1b7972(0x186)];return{..._0x1ffa84,'id':_0x5d41c1[_0x1b7972(0x188)],'dT':_0x11729c['dayjs'](+_0x5d41c1['createTimestamp'])[_0x1b7972(0x1ab)](_0x1b7972(0x1d3)),'personId':_0x5d41c1['userId']};}else{const _0x467a0d={'memberId':_0x1b2ec1,'unitId':_0x5d70ff,'content':_0x209545,'mention':_0x4c7dd9},_0x29bcce=await this[_0x1b7972(0x164)][_0x1b7972(0x199)](_0x1b7972(0x1bf)+_0x5d70ff+_0x1b7972(0x1cf),{'body':_0x467a0d});return _0x10164e(_0x29bcce[_0x1b7972(0x1d6)][_0x1b7972(0x1cb)],_0x1ffa84);}}async[_0x57af29(0x15e)](_0x590f91){const _0x31fc00=_0x57af29;var _0xb2c33a,_0x4d493e;const {text:_0x23f77a,unitId:_0x3e1f33}=_0x590f91,_0x1c51b6=(_0x4d493e=(_0xb2c33a=_0x23f77a['customRanges'])==null?void 0x0:_0xb2c33a[_0x31fc00(0x193)](_0x91cb21=>_0x91cb21[_0x31fc00(0x19f)]===_0x11729c[_0x31fc00(0x17c)]['COMMENT'])[_0x31fc00(0x1a7)](_0xa532f1=>_0xa532f1['rangeId']))!=null?_0x4d493e:[],_0x40c1d9=JSON[_0x31fc00(0x1b7)](_0x23f77a),_0x4ba3de=_0x590f91[_0x31fc00(0x1b2)],_0x4aa009=_0x590f91['id'],_0x2b3659={'memberId':(await this[_0x31fc00(0x181)][_0x31fc00(0x1d9)](_0x3e1f33))['getMemberID'](),'unitId':_0x3e1f33,'threadId':_0x4ba3de,'mention':_0x1c51b6,'content':_0x40c1d9,'replyId':_0x4aa009},_0x70e981=await this[_0x31fc00(0x164)][_0x31fc00(0x199)](_0x31fc00(0x1bf)+_0x3e1f33+'/edit',{'body':_0x2b3659});return!_0x70e981[_0x31fc00(0x1d6)][_0x31fc00(0x1bc)]||_0x70e981[_0x31fc00(0x1d6)][_0x31fc00(0x1bc)]['code']===0x1;}async['resolveComment'](_0x30b8f5){const _0x398ec4=_0x57af29,{unitId:_0x2b6fb9}=_0x30b8f5,_0x3b7c68=_0x30b8f5[_0x398ec4(0x1b2)],_0x15e43d={'memberId':this['_userService']['getCurrentUser']()[_0x398ec4(0x173)],'unitId':_0x2b6fb9,'threadId':_0x3b7c68,'solved':_0x30b8f5[_0x398ec4(0x1dc)]?_0x45bb7a[_0x398ec4(0x18c)]:_0x45bb7a[_0x398ec4(0x17a)]},_0x5684b3=await this[_0x398ec4(0x164)][_0x398ec4(0x199)](_0x398ec4(0x1bf)+_0x2b6fb9+'/solved',{'body':_0x15e43d});return!_0x5684b3['body'][_0x398ec4(0x1bc)]||_0x5684b3[_0x398ec4(0x1d6)][_0x398ec4(0x1bc)]['code']===0x1;}async['deleteComment'](_0x2b48a8,_0x1cb67a,_0x4790d2,_0x4e945e){const _0x2bed64=_0x57af29,_0x3b5409={'memberId':(await this[_0x2bed64(0x181)][_0x2bed64(0x1d9)](_0x2b48a8))[_0x2bed64(0x189)](),'threadId':_0x4790d2,'replyId':_0x4e945e,'unitId':_0x2b48a8},_0x2aa747=await this[_0x2bed64(0x164)]['post'](_0x2bed64(0x1bf)+_0x2b48a8+_0x2bed64(0x16b),{'body':_0x3b5409});return!_0x2aa747[_0x2bed64(0x1d6)][_0x2bed64(0x1bc)]||_0x2aa747[_0x2bed64(0x1d6)]['error'][_0x2bed64(0x1c2)]===0x1;}async[_0x57af29(0x1c3)](_0x3b0bd5,_0x580f67,_0x19def7){const _0x1c8f8d=_0x57af29,_0x491266={'unitId':_0x3b0bd5,'threadId':_0x19def7},_0x4d3a45=await this[_0x1c8f8d(0x164)][_0x1c8f8d(0x199)]('/universer-api/comment/unit/'+_0x3b0bd5+_0x1c8f8d(0x1da),{'body':_0x491266}),_0x277533=_0x19def7[_0x1c8f8d(0x1a7)](_0x53a641=>_0x256116(_0x4d3a45['body'][_0x1c8f8d(0x163)][_0x53a641],_0x3b0bd5,_0x580f67))['filter'](Boolean);return Object['values'](_0x4d3a45[_0x1c8f8d(0x1d6)]['users'])[_0x1c8f8d(0x1ad)](_0x238230=>{const _0x3d73c4=_0x1c8f8d;this[_0x3d73c4(0x1c8)][_0x3d73c4(0x187)](_0x238230);}),_0x277533;}['saveCommentToSnapshot'](_0x574775){const _0x585d63=_0x57af29;return{'id':_0x574775['id'],'threadId':_0x574775[_0x585d63(0x1b2)],'ref':_0x574775[_0x585d63(0x1a8)]};}};_0x5cb553=_0x2b33ca([_0x115bac(0x0,_0x11729c[_0x57af29(0x16c)](_0x4fddd5[_0x57af29(0x19e)])),_0x115bac(0x1,_0x11729c['Inject'](_0x11729c[_0x57af29(0x19b)])),_0x115bac(0x2,_0x11729c[_0x57af29(0x16c)](_0x5d3f6c['CollaborationSessionService'])),_0x115bac(0x3,_0x11729c['Inject'](_0x11729c[_0x57af29(0x17b)]))],_0x5cb553);var _0x432a36=Object[_0x57af29(0x1de)],_0x2f10b4=(_0x4ce067,_0x45c336,_0x5a63d6,_0x5d9a22)=>{for(var _0x3e35af=_0x5d9a22>0x1?void 0x0:_0x5d9a22?_0x432a36(_0x45c336,_0x5a63d6):_0x45c336,_0x5cb357=_0x4ce067['length']-0x1,_0x47048a;_0x5cb357>=0x0;_0x5cb357--)(_0x47048a=_0x4ce067[_0x5cb357])&&(_0x3e35af=_0x47048a(_0x3e35af)||_0x3e35af);return _0x3e35af;},_0x1c8b78=(_0xcb6983,_0x52030a)=>(_0x52a284,_0x55e1d2)=>_0x52030a(_0x52a284,_0x55e1d2,_0xcb6983);let _0x16bf22=class extends _0x11729c[_0x57af29(0x1a1)]{constructor(_0x230feb,_0x5db848){const _0x195284=_0x57af29;super(),this[_0x195284(0x161)]=_0x230feb,this[_0x195284(0x1c4)]=_0x5db848,this[_0x195284(0x1a4)]();}[_0x57af29(0x1a4)](){const _0x301653=_0x57af29;this[_0x301653(0x161)]['dataSource']=this[_0x301653(0x1c4)],this[_0x301653(0x161)][_0x301653(0x19c)]=!0x1;}};_0x16bf22=_0x2f10b4([_0x1c8b78(0x0,_0x4fdace[_0x57af29(0x170)]),_0x1c8b78(0x1,_0x11729c[_0x57af29(0x16c)](_0x5cb553))],_0x16bf22);var _0x21125f=Object[_0x57af29(0x1ae)],_0x45c412=Object[_0x57af29(0x1de)],_0x4459c9=(_0x45c11b,_0x5a3b4c,_0x5a6267)=>_0x5a3b4c in _0x45c11b?_0x21125f(_0x45c11b,_0x5a3b4c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5a6267}):_0x45c11b[_0x5a3b4c]=_0x5a6267,_0x442364=(_0x2e0215,_0x519fba,_0x2d9a43,_0x17ca25)=>{const _0x4fc278=_0x57af29;for(var _0x17bd9c=_0x17ca25>0x1?void 0x0:_0x17ca25?_0x45c412(_0x519fba,_0x2d9a43):_0x519fba,_0x14615d=_0x2e0215[_0x4fc278(0x1ce)]-0x1,_0xde4319;_0x14615d>=0x0;_0x14615d--)(_0xde4319=_0x2e0215[_0x14615d])&&(_0x17bd9c=_0xde4319(_0x17bd9c)||_0x17bd9c);return _0x17bd9c;},_0x3f73e9=(_0x2a62a7,_0x833f70)=>(_0x15cb28,_0x17522f)=>_0x833f70(_0x15cb28,_0x17522f,_0x2a62a7),_0x35b413=(_0x1f72e3,_0x10e81c,_0x44c563)=>_0x4459c9(_0x1f72e3,typeof _0x10e81c!=_0x57af29(0x16a)?_0x10e81c+'':_0x10e81c,_0x44c563);_0x10eb17[_0x57af29(0x172)]=class extends _0x11729c['Plugin']{constructor(_0x4ef5bc=_0x29eac8,_0xa4f23e,_0x5230bd){const _0x443854=_0x57af29;super(),this['_config']=_0x4ef5bc,this['_injector']=_0xa4f23e,this['_configService']=_0x5230bd;const {..._0x349203}=_0x11729c[_0x443854(0x177)]({},_0x29eac8,this[_0x443854(0x171)]);this[_0x443854(0x1a9)][_0x443854(0x1ca)](_0x34c1e5,_0x349203);}[_0x57af29(0x1ba)](){[[_0x5cb553],[_0x16bf22],[_0x5f4b78]]['forEach'](_0x58b031=>{const _0xbad9b8=_0x3bdf;this[_0xbad9b8(0x179)][_0xbad9b8(0x1bd)](_0x58b031);});}[_0x57af29(0x1a3)](){const _0x15b6d5=_0x57af29;this[_0x15b6d5(0x179)][_0x15b6d5(0x1d0)](_0x16bf22),this[_0x15b6d5(0x179)]['get'](_0x5f4b78);}},_0x35b413(_0x10eb17['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x4a2e77),_0x35b413(_0x10eb17[_0x57af29(0x172)],_0x57af29(0x160),_0x11729c['UniverInstanceType'][_0x57af29(0x1a2)]),_0x10eb17[_0x57af29(0x172)]=_0x442364([_0x11729c[_0x57af29(0x1b8)](_0x16d96[_0x57af29(0x190)],_0x5d3f6c[_0x57af29(0x1b4)],_0x3cc515['UniverLicensePlugin']),_0x3f73e9(0x1,_0x11729c['Inject'](_0x11729c[_0x57af29(0x17b)])),_0x3f73e9(0x2,_0x11729c[_0x57af29(0x15d)])],_0x10eb17['UniverThreadCommentDataSourcePlugin']),Object[_0x57af29(0x1ae)](_0x10eb17,Symbol[_0x57af29(0x198)],{'value':_0x57af29(0x1d8)});}));
1
+ function _0x5a79(_0x4e2aa8,_0x823ad7){const _0x2432f9=_0x2432();return _0x5a79=function(_0x5a79e4,_0x3daf87){_0x5a79e4=_0x5a79e4-0x1c4;let _0x33bc64=_0x2432f9[_0x5a79e4];return _0x33bc64;},_0x5a79(_0x4e2aa8,_0x823ad7);}(function(_0x139aaf,_0x428c08){const _0x2211cc=_0x5a79,_0x56f30c=_0x139aaf();while(!![]){try{const _0x334cca=-parseInt(_0x2211cc(0x244))/0x1+-parseInt(_0x2211cc(0x1c8))/0x2*(parseInt(_0x2211cc(0x204))/0x3)+-parseInt(_0x2211cc(0x1c6))/0x4*(parseInt(_0x2211cc(0x21d))/0x5)+-parseInt(_0x2211cc(0x24a))/0x6*(parseInt(_0x2211cc(0x23e))/0x7)+parseInt(_0x2211cc(0x214))/0x8*(-parseInt(_0x2211cc(0x24e))/0x9)+parseInt(_0x2211cc(0x212))/0xa*(parseInt(_0x2211cc(0x1eb))/0xb)+-parseInt(_0x2211cc(0x205))/0xc*(-parseInt(_0x2211cc(0x20a))/0xd);if(_0x334cca===_0x428c08)break;else _0x56f30c['push'](_0x56f30c['shift']());}catch(_0x524d7c){_0x56f30c['push'](_0x56f30c['shift']());}}}(_0x2432,0x5014d),function(_0x4dd224,_0x5e9ecb){const _0x5418bc=_0x5a79;typeof exports==_0x5418bc(0x1f3)&&typeof module<'u'?_0x5e9ecb(exports,require(_0x5418bc(0x1dc)),require(_0x5418bc(0x1d1)),require(_0x5418bc(0x206)),require('@univerjs/thread-comment-ui'),require(_0x5418bc(0x243)),require(_0x5418bc(0x1d5)),require('@univerjs/network')):typeof define=='function'&&define['amd']?define(['exports',_0x5418bc(0x1dc),_0x5418bc(0x1d1),_0x5418bc(0x206),_0x5418bc(0x203),_0x5418bc(0x243),'rxjs','@univerjs/network'],_0x5e9ecb):(_0x4dd224=typeof globalThis<'u'?globalThis:_0x4dd224||self,_0x5e9ecb(_0x4dd224[_0x5418bc(0x202)]={},_0x4dd224[_0x5418bc(0x22f)],_0x4dd224[_0x5418bc(0x233)],_0x4dd224[_0x5418bc(0x238)],_0x4dd224[_0x5418bc(0x236)],_0x4dd224['UniverThreadComment'],_0x4dd224[_0x5418bc(0x1d5)],_0x4dd224[_0x5418bc(0x24f)]));}(this,function(_0x2f7650,_0x1b497f,_0x5f2cec,_0x374991,_0x1c5c7c,_0x1911a1,_0x58b860,_0x494c54){'use strict';const _0x2f589b=_0x5a79;const _0x5760d6=_0x2f589b(0x1fd);var _0x4f7c02=(_0x58c71a=>(_0x58c71a[_0x58c71a['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x58c71a[_0x58c71a['Solved']=0x1]=_0x2f589b(0x1d2),_0x58c71a[_0x58c71a['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x58c71a))(_0x4f7c02||{}),_0x5271d7=(_0x2d17d0=>(_0x2d17d0[_0x2d17d0[_0x2f589b(0x201)]=0x0]='Unknown',_0x2d17d0[_0x2d17d0[_0x2f589b(0x1e4)]=0x1]='Add',_0x2d17d0[_0x2d17d0[_0x2f589b(0x235)]=0x2]='Reply',_0x2d17d0[_0x2d17d0['Edit']=0x3]=_0x2f589b(0x22e),_0x2d17d0[_0x2d17d0[_0x2f589b(0x247)]=0x4]=_0x2f589b(0x247),_0x2d17d0[_0x2d17d0[_0x2f589b(0x249)]=0x5]=_0x2f589b(0x249),_0x2d17d0[_0x2d17d0[_0x2f589b(0x1ef)]=-0x1]='UNRECOGNIZED',_0x2d17d0))(_0x5271d7||{});const _0x4a7e76=_0x3a0775=>_0x374991[_0x2f589b(0x245)](new Date(+_0x3a0775))['format'](_0x2f589b(0x215)),_0x29816e=async(_0x79f622,_0x47d209)=>{const _0x4b89af=_0x2f589b,_0x3b2d5c=_0x79f622['get'](_0x374991[_0x4b89af(0x223)]),_0x381802=_0x79f622[_0x4b89af(0x239)](_0x494c54[_0x4b89af(0x241)]);_0x47d209[_0x4b89af(0x1f2)](_0x1df8d9=>{const _0xb5a897=_0x4b89af;_0x3b2d5c[_0xb5a897(0x1e2)](_0x1df8d9)&&_0x47d209[_0xb5a897(0x1fe)](_0x1df8d9);}),_0x47d209[_0x4b89af(0x1cc)]&&(await _0x381802[_0x4b89af(0x239)]('/universer-api/user/list',{'params':{'userIDs':[..._0x47d209]}}))[_0x4b89af(0x1ed)][_0x4b89af(0x234)][_0x4b89af(0x1f2)](_0x44db93=>{const _0x50e823=_0x4b89af;_0x44db93&&_0x3b2d5c[_0x50e823(0x207)](_0x44db93);});};var _0x1babb0=Object[_0x2f589b(0x21e)],_0x4142d1=(_0x40863b,_0x1a02d9,_0x157c1a,_0x32228e)=>{const _0x4fbb09=_0x2f589b;for(var _0x50f2bd=_0x32228e>0x1?void 0x0:_0x32228e?_0x1babb0(_0x1a02d9,_0x157c1a):_0x1a02d9,_0x3a7e6f=_0x40863b[_0x4fbb09(0x23d)]-0x1,_0x5c71e6;_0x3a7e6f>=0x0;_0x3a7e6f--)(_0x5c71e6=_0x40863b[_0x3a7e6f])&&(_0x50f2bd=_0x5c71e6(_0x50f2bd)||_0x50f2bd);return _0x50f2bd;},_0x3f7ede=(_0x56daf5,_0xf8c41b)=>(_0x199e24,_0x31752b)=>_0xf8c41b(_0x199e24,_0x31752b,_0x56daf5);let _0x4067ee=class extends _0x374991['Disposable']{constructor(_0x4cd27e,_0x18a851,_0x392ea6,_0x1a9c4d){const _0x5da839=_0x2f589b;super(),this['_commentService']=_0x4cd27e,this[_0x5da839(0x22b)]=_0x18a851,this[_0x5da839(0x1c5)]=_0x392ea6,this[_0x5da839(0x1c7)]=_0x1a9c4d,this[_0x5da839(0x21b)](),this['_initUserSync']();}['_initUserSync'](){const _0x48344a=_0x2f589b;this['disposeWithMe'](this[_0x48344a(0x22b)][_0x48344a(0x200)][_0x48344a(0x23a)](_0x58b860[_0x48344a(0x217)](0x10))['subscribe'](_0x2d6bfb=>{const _0x389f61=_0x48344a,_0x333650=new Set();_0x2d6bfb[_0x389f61(0x1f2)](_0x224110=>{const _0xaf11ce=_0x389f61;switch(_0x224110[_0xaf11ce(0x1e8)]){case'add':{const _0x560d87=_0x224110[_0xaf11ce(0x228)][_0xaf11ce(0x1de)];_0x333650[_0xaf11ce(0x1f8)](_0x560d87);break;}}}),_0x29816e(this[_0x389f61(0x1c7)],_0x333650);}));}[_0x2f589b(0x21b)](){const _0x2ffb8b=_0x2f589b;this['disposeWithMe'](this[_0x2ffb8b(0x1d9)][_0x2ffb8b(0x200)][_0x2ffb8b(0x1da)](async _0x383373=>{const _0x5accf6=_0x2ffb8b;var _0x2e668d,_0x773606,_0x3c3bd6,_0x11606f;const _0xa9a85a=(_0x2e668d=this[_0x5accf6(0x22b)]['getUnit'](_0x383373[_0x5accf6(0x242)])[_0x5accf6(0x222)](_0x11ce61=>_0x11ce61[_0x5accf6(0x1d4)]===_0x383373[_0x5accf6(0x1d4)]))==null?void 0x0:_0x2e668d[_0x5accf6(0x21c)];if(!_0xa9a85a)return;const {unitId:_0x341e02,subUnitId:_0x26952c}=_0xa9a85a;switch(_0x383373[_0x5accf6(0x20d)]&&this['_userService'][_0x5accf6(0x207)](_0x383373[_0x5accf6(0x20d)]),_0x383373[_0x5accf6(0x1e8)]){case _0x5271d7[_0x5accf6(0x1e4)]:break;case _0x5271d7[_0x5accf6(0x235)]:{this[_0x5accf6(0x22b)]['addComment'](_0x341e02,_0x26952c,{'unitId':_0x341e02,'subUnitId':_0x26952c,'ref':'','id':_0x383373[_0x5accf6(0x1cf)],'dT':_0x4a7e76(+_0x383373[_0x5accf6(0x1f4)]),'threadId':_0x383373[_0x5accf6(0x1d4)],'personId':(_0x3c3bd6=(_0x773606=_0x383373['user'])==null?void 0x0:_0x773606[_0x5accf6(0x248)])!=null?_0x3c3bd6:_0x383373[_0x5accf6(0x1e7)],'text':JSON[_0x5accf6(0x1f0)](_0x383373[_0x5accf6(0x21a)]),'parentId':_0xa9a85a['id']});break;}case _0x5271d7['Delete']:{const _0x5a1bac=this['_threadCommentModel']['getComment'](_0x341e02,_0x26952c,_0x383373['replyId']);_0x5a1bac&&_0x5a1bac['parentId']&&this[_0x5accf6(0x22b)]['deleteComment'](_0x341e02,_0x26952c,_0x383373[_0x5accf6(0x1cf)]);break;}case _0x5271d7[_0x5accf6(0x22e)]:{this['_threadCommentModel'][_0x5accf6(0x229)](_0x341e02,_0x26952c,{'commentId':_0x383373['replyId'],'text':JSON[_0x5accf6(0x1f0)](_0x383373[_0x5accf6(0x21a)])});break;}case _0x5271d7[_0x5accf6(0x249)]:{const _0x29608e=(_0x11606f=this[_0x5accf6(0x22b)][_0x5accf6(0x24c)](_0x383373['unitId'])[_0x5accf6(0x222)](_0x38376c=>_0x38376c[_0x5accf6(0x1d4)]===_0x383373[_0x5accf6(0x1d4)]))==null?void 0x0:_0x11606f[_0x5accf6(0x21c)];_0x29608e&&this[_0x5accf6(0x22b)][_0x5accf6(0x1e6)](_0x341e02,_0x26952c,_0x29608e['id'],_0x383373[_0x5accf6(0x22a)]===_0x4f7c02[_0x5accf6(0x1d2)]);break;}}}));}};_0x4067ee=_0x4142d1([_0x3f7ede(0x0,_0x374991['Inject'](_0x1b497f[_0x2f589b(0x1ea)])),_0x3f7ede(0x1,_0x374991[_0x2f589b(0x1fc)](_0x1911a1[_0x2f589b(0x1d7)])),_0x3f7ede(0x2,_0x374991[_0x2f589b(0x1fc)](_0x374991['UserManagerService'])),_0x3f7ede(0x3,_0x374991[_0x2f589b(0x1fc)](_0x374991[_0x2f589b(0x22d)]))],_0x4067ee);const _0x2c2389=_0x2f589b(0x216),_0x254c26={};var _0x253157=Object[_0x2f589b(0x21e)],_0x6fc92a=(_0x3e111a,_0x48307b,_0x27c54f,_0x16ef0e)=>{const _0x59ac04=_0x2f589b;for(var _0x1367a5=_0x16ef0e>0x1?void 0x0:_0x16ef0e?_0x253157(_0x48307b,_0x27c54f):_0x48307b,_0xd518e5=_0x3e111a[_0x59ac04(0x23d)]-0x1,_0x299808;_0xd518e5>=0x0;_0xd518e5--)(_0x299808=_0x3e111a[_0xd518e5])&&(_0x1367a5=_0x299808(_0x1367a5)||_0x1367a5);return _0x1367a5;},_0x3380a4=(_0x461a03,_0x482194)=>(_0x233451,_0x2386c7)=>_0x482194(_0x233451,_0x2386c7,_0x461a03);function _0x32239b(_0x3afc3a,_0x1d8cc5){const _0x247ab8=_0x2f589b,_0x3bbfe4=_0x3afc3a[_0x247ab8(0x1d8)][0x0];return{..._0x1d8cc5,'id':_0x3bbfe4[_0x247ab8(0x1cf)],'resolved':_0x3afc3a[_0x247ab8(0x22a)]===0x1,'dT':_0x4a7e76(_0x3bbfe4['createTimestamp']),'personId':_0x3bbfe4['userId'],'threadId':_0x3bbfe4['threadId']};}function _0x1d938a(_0x2ad608,_0x31f9e4,_0x302a7d){const _0x52ed3c=_0x2f589b;var _0x1c431f,_0x2cfeca;if(((_0x2cfeca=(_0x1c431f=_0x2ad608==null?void 0x0:_0x2ad608['replies'])==null?void 0x0:_0x1c431f[_0x52ed3c(0x23d)])!=null?_0x2cfeca:0x0)>0x0){const _0x131788=(_0x29a3ac,_0x5ccffd)=>({'id':_0x29a3ac[_0x52ed3c(0x1cf)],'threadId':_0x29a3ac[_0x52ed3c(0x1d4)],'dT':_0x4a7e76(_0x29a3ac['createTimestamp']),'personId':_0x29a3ac[_0x52ed3c(0x1e7)],'resolved':_0x2ad608[_0x52ed3c(0x22a)]===_0x4f7c02[_0x52ed3c(0x1d2)],'unitId':_0x31f9e4,'subUnitId':_0x302a7d,'text':JSON['parse'](_0x29a3ac[_0x52ed3c(0x21a)]),'parentId':_0x5ccffd}),_0x1fd250=_0x131788(_0x2ad608[_0x52ed3c(0x1d8)][0x0]);return{..._0x1fd250,'children':_0x2ad608[_0x52ed3c(0x1d8)][_0x52ed3c(0x1fa)](0x1)[_0x52ed3c(0x1e3)](_0x3267e3=>_0x131788(_0x3267e3,_0x1fd250['id']))};}return null;}let _0x38ffc9=class{constructor(_0x467b4d,_0x806804,_0x37217e,_0x499bb2){const _0x3915ef=_0x2f589b;this['_httpService']=_0x467b4d,this[_0x3915ef(0x1c5)]=_0x806804,this['_sessionService']=_0x37217e,this[_0x3915ef(0x1c7)]=_0x499bb2;}async[_0x2f589b(0x1db)](_0x2eb141){const _0x10a25e=_0x2f589b;var _0x163c52,_0x5d3540;const {parentId:_0x4aa010,unitId:_0x53768b,text:_0x1452fc,threadId:_0x213626}=_0x2eb141,_0x53f70f=(_0x5d3540=(_0x163c52=_0x1452fc['customRanges'])==null?void 0x0:_0x163c52[_0x10a25e(0x1f9)](_0x594d56=>_0x594d56[_0x10a25e(0x1f5)]===_0x374991[_0x10a25e(0x20c)][_0x10a25e(0x1f1)])[_0x10a25e(0x1e3)](_0x27b1ea=>_0x27b1ea[_0x10a25e(0x218)]))!=null?_0x5d3540:[],_0x13ad78=JSON[_0x10a25e(0x221)](_0x1452fc),_0x12ed3d=(await this[_0x10a25e(0x22c)][_0x10a25e(0x237)](_0x53768b))['getMemberID']();if(_0x4aa010){const _0x4b56eb={'memberId':_0x12ed3d,'unitId':_0x53768b,'content':_0x13ad78,'mention':_0x53f70f,'threadId':_0x213626},_0xeeba02=(await this[_0x10a25e(0x1d3)][_0x10a25e(0x232)](_0x10a25e(0x1e9)+_0x53768b+_0x10a25e(0x1fb),{'body':_0x4b56eb}))[_0x10a25e(0x1ed)][_0x10a25e(0x220)];return{..._0x2eb141,'id':_0xeeba02['replyId'],'dT':_0x374991[_0x10a25e(0x245)](+_0xeeba02[_0x10a25e(0x1f4)])[_0x10a25e(0x1ce)]('YYYY/MM/DD\x20HH:mm'),'personId':_0xeeba02[_0x10a25e(0x1e7)]};}else{const _0x377fff={'memberId':_0x12ed3d,'unitId':_0x53768b,'content':_0x13ad78,'mention':_0x53f70f},_0x4ab30f=await this[_0x10a25e(0x1d3)][_0x10a25e(0x232)](_0x10a25e(0x1e9)+_0x53768b+_0x10a25e(0x250),{'body':_0x377fff});return _0x32239b(_0x4ab30f[_0x10a25e(0x1ed)][_0x10a25e(0x226)],_0x2eb141);}}async[_0x2f589b(0x229)](_0x5f0c99){const _0x36ff44=_0x2f589b;var _0x58ab37,_0x42a160;const {text:_0xde3006,unitId:_0x8e032d}=_0x5f0c99,_0x4e7f3b=(_0x42a160=(_0x58ab37=_0xde3006['customRanges'])==null?void 0x0:_0x58ab37[_0x36ff44(0x1f9)](_0x249d32=>_0x249d32['rangeType']===_0x374991[_0x36ff44(0x20c)][_0x36ff44(0x1f1)])[_0x36ff44(0x1e3)](_0x4b86cf=>_0x4b86cf[_0x36ff44(0x218)]))!=null?_0x42a160:[],_0x39c456=JSON['stringify'](_0xde3006),_0x4032bb=_0x5f0c99[_0x36ff44(0x1d4)],_0x47f8e7=_0x5f0c99['id'],_0x4fa967={'memberId':(await this[_0x36ff44(0x22c)][_0x36ff44(0x237)](_0x8e032d))[_0x36ff44(0x20e)](),'unitId':_0x8e032d,'threadId':_0x4032bb,'mention':_0x4e7f3b,'content':_0x39c456,'replyId':_0x47f8e7},_0x119f84=await this[_0x36ff44(0x1d3)]['post'](_0x36ff44(0x1e9)+_0x8e032d+_0x36ff44(0x1ff),{'body':_0x4fa967});return!_0x119f84[_0x36ff44(0x1ed)][_0x36ff44(0x227)]||_0x119f84[_0x36ff44(0x1ed)][_0x36ff44(0x227)][_0x36ff44(0x1e5)]===0x1;}async[_0x2f589b(0x1e6)](_0x582cf6){const _0x463539=_0x2f589b,{unitId:_0x1a6393}=_0x582cf6,_0x655b64=_0x582cf6[_0x463539(0x1d4)],_0x26b977={'memberId':this[_0x463539(0x1c5)][_0x463539(0x1e0)]()[_0x463539(0x248)],'unitId':_0x1a6393,'threadId':_0x655b64,'solved':_0x582cf6['resolved']?_0x4f7c02[_0x463539(0x1d2)]:_0x4f7c02[_0x463539(0x1d0)]},_0x1385f4=await this[_0x463539(0x1d3)][_0x463539(0x232)]('/universer-api/comment/unit/'+_0x1a6393+_0x463539(0x208),{'body':_0x26b977});return!_0x1385f4[_0x463539(0x1ed)]['error']||_0x1385f4[_0x463539(0x1ed)][_0x463539(0x227)]['code']===0x1;}async[_0x2f589b(0x1c4)](_0x4b187a,_0x1b2401,_0x8b0f5b,_0x24cea8){const _0x27a0de=_0x2f589b,_0x34c462={'memberId':(await this[_0x27a0de(0x22c)]['requireSession'](_0x4b187a))['getMemberID'](),'threadId':_0x8b0f5b,'replyId':_0x24cea8,'unitId':_0x4b187a},_0x19030c=await this[_0x27a0de(0x1d3)][_0x27a0de(0x232)](_0x27a0de(0x1e9)+_0x4b187a+_0x27a0de(0x1e1),{'body':_0x34c462});return!_0x19030c['body'][_0x27a0de(0x227)]||_0x19030c[_0x27a0de(0x1ed)][_0x27a0de(0x227)][_0x27a0de(0x1e5)]===0x1;}async['listComments'](_0x409bc5,_0x1527de,_0x113253){const _0x4ac909=_0x2f589b,_0x295a4b={'unitId':_0x409bc5,'threadId':_0x113253},_0xe92855=await this[_0x4ac909(0x1d3)][_0x4ac909(0x232)](_0x4ac909(0x1e9)+_0x409bc5+'/list',{'body':_0x295a4b}),_0x4006cd=_0x113253[_0x4ac909(0x1e3)](_0x31ec64=>_0x1d938a(_0xe92855[_0x4ac909(0x1ed)][_0x4ac909(0x23c)][_0x31ec64],_0x409bc5,_0x1527de))['filter'](Boolean);return Object[_0x4ac909(0x211)](_0xe92855['body'][_0x4ac909(0x234)])[_0x4ac909(0x1f2)](_0x411c2b=>{const _0x17cc15=_0x4ac909;this[_0x17cc15(0x1c5)][_0x17cc15(0x207)](_0x411c2b);}),_0x4006cd;}[_0x2f589b(0x24d)](_0x261f87){const _0x3a4d31=_0x2f589b;return{'id':_0x261f87['id'],'threadId':_0x261f87[_0x3a4d31(0x1d4)],'ref':_0x261f87[_0x3a4d31(0x230)]};}};_0x38ffc9=_0x6fc92a([_0x3380a4(0x0,_0x374991[_0x2f589b(0x1fc)](_0x494c54[_0x2f589b(0x241)])),_0x3380a4(0x1,_0x374991['Inject'](_0x374991[_0x2f589b(0x223)])),_0x3380a4(0x2,_0x374991['Inject'](_0x1b497f[_0x2f589b(0x1c9)])),_0x3380a4(0x3,_0x374991[_0x2f589b(0x1fc)](_0x374991['Injector']))],_0x38ffc9);var _0x54df55=Object[_0x2f589b(0x21e)],_0x4e4aac=(_0x23fbea,_0x5bde50,_0x41fab1,_0x521d48)=>{const _0xe69e48=_0x2f589b;for(var _0x4ce823=_0x521d48>0x1?void 0x0:_0x521d48?_0x54df55(_0x5bde50,_0x41fab1):_0x5bde50,_0x40753d=_0x23fbea[_0xe69e48(0x23d)]-0x1,_0x380a01;_0x40753d>=0x0;_0x40753d--)(_0x380a01=_0x23fbea[_0x40753d])&&(_0x4ce823=_0x380a01(_0x4ce823)||_0x4ce823);return _0x4ce823;},_0x31fdac=(_0x3053ea,_0x5c68cc)=>(_0x48bbe9,_0x25c763)=>_0x5c68cc(_0x48bbe9,_0x25c763,_0x3053ea);let _0x3692c8=class extends _0x374991[_0x2f589b(0x213)]{constructor(_0x4bd915,_0x34cf5b){const _0x2f78ab=_0x2f589b;super(),this['_threadCommentDataSourceService']=_0x4bd915,this[_0x2f78ab(0x210)]=_0x34cf5b,this['_initDataSource']();}[_0x2f589b(0x23f)](){const _0x5aa42a=_0x2f589b;this[_0x5aa42a(0x240)][_0x5aa42a(0x1d6)]=this[_0x5aa42a(0x210)],this[_0x5aa42a(0x240)]['syncUpdateMutationToColla']=!0x1;}};_0x3692c8=_0x4e4aac([_0x31fdac(0x0,_0x1911a1[_0x2f589b(0x1f6)]),_0x31fdac(0x1,_0x374991[_0x2f589b(0x1fc)](_0x38ffc9))],_0x3692c8);var _0x5848fe=Object[_0x2f589b(0x231)],_0xfd1da4=Object[_0x2f589b(0x21e)],_0x14555a=(_0x14f768,_0x1dff89,_0x263c3d)=>_0x1dff89 in _0x14f768?_0x5848fe(_0x14f768,_0x1dff89,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x263c3d}):_0x14f768[_0x1dff89]=_0x263c3d,_0x1bff6d=(_0x2dacc9,_0x15399d,_0x1f4281,_0x27238e)=>{for(var _0x1d67c2=_0x27238e>0x1?void 0x0:_0x27238e?_0xfd1da4(_0x15399d,_0x1f4281):_0x15399d,_0x5d74a3=_0x2dacc9['length']-0x1,_0x3771bf;_0x5d74a3>=0x0;_0x5d74a3--)(_0x3771bf=_0x2dacc9[_0x5d74a3])&&(_0x1d67c2=_0x3771bf(_0x1d67c2)||_0x1d67c2);return _0x1d67c2;},_0x55af28=(_0x8e44b4,_0x43d6c2)=>(_0x42f872,_0x1b51b8)=>_0x43d6c2(_0x42f872,_0x1b51b8,_0x8e44b4),_0x3d3e79=(_0x27c4a8,_0x285815,_0x1deb4b)=>_0x14555a(_0x27c4a8,typeof _0x285815!='symbol'?_0x285815+'':_0x285815,_0x1deb4b);_0x2f7650['UniverThreadCommentDataSourcePlugin']=class extends _0x374991[_0x2f589b(0x20f)]{constructor(_0x502ce3=_0x254c26,_0x18ada1,_0x242fd9){const _0x1c96eb=_0x2f589b;super(),this[_0x1c96eb(0x1ee)]=_0x502ce3,this[_0x1c96eb(0x1c7)]=_0x18ada1,this['_configService']=_0x242fd9;const {..._0x14ff8c}=_0x374991[_0x1c96eb(0x20b)]({},_0x254c26,this[_0x1c96eb(0x1ee)]);this[_0x1c96eb(0x1ca)][_0x1c96eb(0x23b)](_0x2c2389,_0x14ff8c);}[_0x2f589b(0x246)](){const _0x388b9c=_0x2f589b;[[_0x38ffc9],[_0x3692c8],[_0x4067ee]][_0x388b9c(0x1f2)](_0x4a3a6d=>{const _0x547cc5=_0x388b9c;this[_0x547cc5(0x1c7)][_0x547cc5(0x1f8)](_0x4a3a6d);});}[_0x2f589b(0x21f)](){const _0x25f7a8=_0x2f589b;this[_0x25f7a8(0x1c7)][_0x25f7a8(0x239)](_0x3692c8),this['_injector']['get'](_0x4067ee);}},_0x3d3e79(_0x2f7650['UniverThreadCommentDataSourcePlugin'],_0x2f589b(0x1df),_0x5760d6),_0x3d3e79(_0x2f7650['UniverThreadCommentDataSourcePlugin'],_0x2f589b(0x1e8),_0x374991[_0x2f589b(0x224)][_0x2f589b(0x1cb)]),_0x2f7650[_0x2f589b(0x1f7)]=_0x1bff6d([_0x374991[_0x2f589b(0x209)](_0x1c5c7c[_0x2f589b(0x24b)],_0x1b497f[_0x2f589b(0x219)],_0x5f2cec[_0x2f589b(0x225)]),_0x55af28(0x1,_0x374991[_0x2f589b(0x1fc)](_0x374991[_0x2f589b(0x22d)])),_0x55af28(0x2,_0x374991[_0x2f589b(0x1cd)])],_0x2f7650[_0x2f589b(0x1f7)]),Object[_0x2f589b(0x231)](_0x2f7650,Symbol[_0x2f589b(0x1ec)],{'value':_0x2f589b(0x1dd)});}));function _0x2432(){const _0x87986d=['_sessionService','Injector','Edit','UniverProCollaborationClient','ref','defineProperty','post','UniverProLicense','users','Reply','UniverThreadCommentUi','requireSession','UniverCore','get','pipe','setConfig','comments','length','133eyjtmv','_initDataSource','_threadCommentDataSourceService','HTTPService','unitId','@univerjs/thread-comment','194538VLfiLR','dayjs','onStarting','Delete','userID','Solve','195684sHPyAD','UniverThreadCommentUIPlugin','getUnit','saveCommentToSnapshot','39168tibOTM','UniverNetwork','/add','deleteComment','_userService','78364GtbiRG','_injector','2rXzHuf','CollaborationSessionService','_configService','UNIVER_UNKNOWN','size','IConfigService','format','replyId','OpenOrReOpen','@univerjs-pro/license','Solved','_httpService','threadId','rxjs','dataSource','ThreadCommentModel','replies','_commentService','subscribe','addComment','@univerjs-pro/collaboration-client','Module','personId','pluginName','getCurrentUser','/delete','getUser','map','Add','code','resolveComment','userId','type','/universer-api/comment/unit/','CommentService','17303MJpCbd','toStringTag','body','_config','UNRECOGNIZED','parse','COMMENT','forEach','object','createTimestamp','rangeType','IThreadCommentDataSourceService','UniverThreadCommentDataSourcePlugin','add','filter','slice','/reply','Inject','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','delete','/edit','commentUpdate$','Unknown','UniverProThreadCommentDatasource','@univerjs/thread-comment-ui','93498bKRGuN','12FOYkon','@univerjs/core','addUser','/solved','DependentOn','17654819PUiqLj','merge','CustomRangeType','user','getMemberID','Plugin','_threadCommentDataSource','values','2410xoHdSh','Disposable','64wYvdtF','YYYY/MM/DD\x20HH:mm','thread-comment-data-source.config','bufferTime','rangeId','UniverCollaborationClientPlugin','content','_init','root','135cGIgJR','getOwnPropertyDescriptor','onReady','reply','stringify','find','UserManagerService','UniverInstanceType','UniverLicensePlugin','comment','error','payload','updateComment','solved','_threadCommentModel'];_0x2432=function(){return _0x87986d;};return _0x2432();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.6.10",
3
+ "version": "0.7.0-nightly.202504291607",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.6.10",
49
- "@univerjs-pro/license": "0.6.10",
50
- "@univerjs/core": "0.6.10",
51
- "@univerjs/network": "0.6.10",
52
- "@univerjs/thread-comment": "0.6.10",
48
+ "@univerjs-pro/collaboration-client": "0.7.0-nightly.202504291607",
49
+ "@univerjs-pro/license": "0.7.0-nightly.202504291607",
50
+ "@univerjs/core": "0.7.0-nightly.202504291607",
51
+ "@univerjs/network": "0.7.0-nightly.202504291607",
53
52
  "@univerjs/protocol": "0.1.46-alpha.3",
54
- "@univerjs/thread-comment-ui": "0.6.10"
53
+ "@univerjs/thread-comment": "0.7.0-nightly.202504291607",
54
+ "@univerjs/thread-comment-ui": "0.7.0-nightly.202504291607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",
58
58
  "typescript": "^5.8.3",
59
- "vite": "^6.3.0",
60
- "vitest": "^3.1.1",
61
- "@univerjs-infra/shared": "0.6.10"
59
+ "vite": "^6.3.3",
60
+ "vitest": "^3.1.2",
61
+ "@univerjs-infra/shared": "0.7.0-beta.0"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",