@univerjs-pro/thread-comment-datasource 0.6.10 → 0.7.0-beta.0

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';const _0x41db1f=_0x4cea;function _0x57df(){const _0x8e83fa=['_sessionService','format','@univerjs/core','unitId','OpenOrReOpen','customRanges','Inject','content','updateComment','UniverInstanceType','post','ThreadCommentModel','delete','error','_initUserSync','819oeDrhX','getOwnPropertyDescriptor','YYYY/MM/DD\x20HH:mm','UNIVER_UNKNOWN','_initDataSource','commentUpdate$','symbol','dayjs','Unknown','/add','Reply','filter','_threadCommentModel','parse','type','HTTPService','code','saveCommentToSnapshot','CollaborationSessionService','@univerjs/thread-comment','Solve','Delete','setConfig','518490hYPgSk','addComment','replyId','CustomRangeType','UniverThreadCommentDataSourcePlugin','onStarting','addUser','_userService','UniverCollaborationClientPlugin','8648ldDBAe','root','userId','thread-comment-data-source.config','requireSession','stringify','comments','rangeType','onReady','Solved','size','payload','getUnit','UserManagerService','_threadCommentDataSourceService','/universer-api/user/list','4137576jLnary','bufferTime','Add','Disposable','_injector','DependentOn','/edit','4609026sxOexh','ref','forEach','toStringTag','762772ZeIqNI','getUser','length','defineProperty','_threadCommentDataSource','map','body','_config','Injector','deleteComment','UNRECOGNIZED','rangeId','/universer-api/comment/unit/','replies','COMMENT','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_configService','_init','@univerjs-pro/license','@univerjs/network','rxjs','_commentService','threadId','createTimestamp','find','1040000YUNkZO','_httpService','subscribe','get','user','pipe','add','users','@univerjs/thread-comment-ui','165372SSbqYn','merge','personId','Module','solved','Plugin','userID','Edit','180zPGQhc','getMemberID','getCurrentUser','IConfigService','listComments','resolveComment'];_0x57df=function(){return _0x8e83fa;};return _0x57df();}(function(_0x44152f,_0x47096e){const _0x12005b=_0x4cea,_0x5abe77=_0x44152f();while(!![]){try{const _0x2be710=-parseInt(_0x12005b(0xad))/0x1+parseInt(_0x12005b(0x10e))/0x2+-parseInt(_0x12005b(0xea))/0x3+parseInt(_0x12005b(0x103))/0x4+parseInt(_0x12005b(0xbe))/0x5*(parseInt(_0x12005b(0xb6))/0x6)+-parseInt(_0x12005b(0xd3))/0x7*(parseInt(_0x12005b(0xf3))/0x8)+-parseInt(_0x12005b(0x10a))/0x9;if(_0x2be710===_0x47096e)break;else _0x5abe77['push'](_0x5abe77['shift']());}catch(_0x42e42e){_0x5abe77['push'](_0x5abe77['shift']());}}}(_0x57df,0x87e2f));Object[_0x41db1f(0x97)](exports,Symbol[_0x41db1f(0x10d)],{'value':_0x41db1f(0xb9)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x41db1f(0xa6)),c=require(_0x41db1f(0xc6)),j=require(_0x41db1f(0xb5)),M=require(_0x41db1f(0xe6)),w=require(_0x41db1f(0xa8)),P=require(_0x41db1f(0xa7)),U=_0x41db1f(0xa3);var I=(_0x47ea19=>(_0x47ea19[_0x47ea19[_0x41db1f(0xc8)]=0x0]=_0x41db1f(0xc8),_0x47ea19[_0x47ea19[_0x41db1f(0xfc)]=0x1]=_0x41db1f(0xfc),_0x47ea19[_0x47ea19[_0x41db1f(0x9e)]=-0x1]=_0x41db1f(0x9e),_0x47ea19))(I||{}),v=(_0x37989e=>(_0x37989e[_0x37989e[_0x41db1f(0xdb)]=0x0]=_0x41db1f(0xdb),_0x37989e[_0x37989e[_0x41db1f(0x105)]=0x1]=_0x41db1f(0x105),_0x37989e[_0x37989e[_0x41db1f(0xdd)]=0x2]='Reply',_0x37989e[_0x37989e['Edit']=0x3]=_0x41db1f(0xbd),_0x37989e[_0x37989e[_0x41db1f(0xe8)]=0x4]='Delete',_0x37989e[_0x37989e[_0x41db1f(0xe7)]=0x5]=_0x41db1f(0xe7),_0x37989e[_0x37989e[_0x41db1f(0x9e)]=-0x1]='UNRECOGNIZED',_0x37989e))(v||{});function _0x4cea(_0xe28412,_0x23a8a9){const _0x57df90=_0x57df();return _0x4cea=function(_0x4cea6b,_0x273331){_0x4cea6b=_0x4cea6b-0x97;let _0x2e8e30=_0x57df90[_0x4cea6b];return _0x2e8e30;},_0x4cea(_0xe28412,_0x23a8a9);}const f=_0x480da2=>c[_0x41db1f(0xda)](new Date(+_0x480da2))[_0x41db1f(0xc5)](_0x41db1f(0xd5)),R=async(_0x49cf2a,_0x29c760)=>{const _0x29c7dc=_0x41db1f,_0x1c3f0d=_0x49cf2a[_0x29c7dc(0xb0)](c[_0x29c7dc(0x100)]),_0x4e2ed1=_0x49cf2a[_0x29c7dc(0xb0)](P['HTTPService']);_0x29c760[_0x29c7dc(0x10c)](_0x54bb38=>{const _0x1ba777=_0x29c7dc;_0x1c3f0d[_0x1ba777(0x10f)](_0x54bb38)&&_0x29c760[_0x1ba777(0xd0)](_0x54bb38);}),_0x29c760[_0x29c7dc(0xfd)]&&(await _0x4e2ed1[_0x29c7dc(0xb0)](_0x29c7dc(0x102),{'params':{'userIDs':[..._0x29c760]}}))[_0x29c7dc(0x9a)][_0x29c7dc(0xb4)][_0x29c7dc(0x10c)](_0x5a7699=>{const _0xeb7433=_0x29c7dc;_0x5a7699&&_0x1c3f0d[_0xeb7433(0xf0)](_0x5a7699);});};var $=Object[_0x41db1f(0xd4)],E=(_0x35494b,_0x118fce,_0x44b33c,_0x226c64)=>{const _0x223faa=_0x41db1f;for(var _0x330f80=_0x226c64>0x1?void 0x0:_0x226c64?$(_0x118fce,_0x44b33c):_0x118fce,_0x35f43b=_0x35494b[_0x223faa(0x110)]-0x1,_0x26521f;_0x35f43b>=0x0;_0x35f43b--)(_0x26521f=_0x35494b[_0x35f43b])&&(_0x330f80=_0x26521f(_0x330f80)||_0x330f80);return _0x330f80;},S=(_0x5635f2,_0x5a704d)=>(_0x4877c5,_0x2bca34)=>_0x5a704d(_0x4877c5,_0x2bca34,_0x5635f2);let p=class extends c[_0x41db1f(0x106)]{constructor(_0x55283a,_0x27475d,_0x1940ae,_0x595849){const _0x3d0519=_0x41db1f;super(),this[_0x3d0519(0xa9)]=_0x55283a,this[_0x3d0519(0xdf)]=_0x27475d,this[_0x3d0519(0xf1)]=_0x1940ae,this[_0x3d0519(0x107)]=_0x595849,this[_0x3d0519(0xa5)](),this[_0x3d0519(0xd2)]();}['_initUserSync'](){const _0x15d9bc=_0x41db1f;this['disposeWithMe'](this[_0x15d9bc(0xdf)][_0x15d9bc(0xd8)][_0x15d9bc(0xb2)](w[_0x15d9bc(0x104)](0x10))[_0x15d9bc(0xaf)](_0x3289b6=>{const _0x43003f=_0x15d9bc,_0x508298=new Set();_0x3289b6[_0x43003f(0x10c)](_0xc44d1b=>{const _0xa70f97=_0x43003f;switch(_0xc44d1b['type']){case _0xa70f97(0xb3):{const _0x2ff598=_0xc44d1b[_0xa70f97(0xfe)][_0xa70f97(0xb8)];_0x508298[_0xa70f97(0xb3)](_0x2ff598);break;}}}),R(this[_0x43003f(0x107)],_0x508298);}));}[_0x41db1f(0xa5)](){const _0x4e5626=_0x41db1f;this['disposeWithMe'](this[_0x4e5626(0xa9)][_0x4e5626(0xd8)][_0x4e5626(0xaf)](async _0x1c5de5=>{const _0x3cd13a=_0x4e5626;var _0x5c4da3,_0x5ccea3,_0x2e3e5c,_0x589b21;const _0xdb26fd=(_0x5c4da3=this[_0x3cd13a(0xdf)][_0x3cd13a(0xff)](_0x1c5de5[_0x3cd13a(0xc7)])[_0x3cd13a(0xac)](_0x4bba39=>_0x4bba39[_0x3cd13a(0xaa)]===_0x1c5de5[_0x3cd13a(0xaa)]))==null?void 0x0:_0x5c4da3['root'];if(!_0xdb26fd)return;const {unitId:_0x3f36b0,subUnitId:_0x5dcb26}=_0xdb26fd;switch(_0x1c5de5[_0x3cd13a(0xb1)]&&this[_0x3cd13a(0xf1)][_0x3cd13a(0xf0)](_0x1c5de5[_0x3cd13a(0xb1)]),_0x1c5de5[_0x3cd13a(0xe1)]){case v[_0x3cd13a(0x105)]:break;case v['Reply']:{this[_0x3cd13a(0xdf)][_0x3cd13a(0xeb)](_0x3f36b0,_0x5dcb26,{'unitId':_0x3f36b0,'subUnitId':_0x5dcb26,'ref':'','id':_0x1c5de5['replyId'],'dT':f(+_0x1c5de5[_0x3cd13a(0xab)]),'threadId':_0x1c5de5[_0x3cd13a(0xaa)],'personId':(_0x2e3e5c=(_0x5ccea3=_0x1c5de5['user'])==null?void 0x0:_0x5ccea3[_0x3cd13a(0xbc)])!=null?_0x2e3e5c:_0x1c5de5[_0x3cd13a(0xf5)],'text':JSON[_0x3cd13a(0xe0)](_0x1c5de5['content']),'parentId':_0xdb26fd['id']});break;}case v['Delete']:{const _0x19afbb=this['_threadCommentModel']['getComment'](_0x3f36b0,_0x5dcb26,_0x1c5de5[_0x3cd13a(0xec)]);_0x19afbb&&_0x19afbb['parentId']&&this[_0x3cd13a(0xdf)][_0x3cd13a(0x9d)](_0x3f36b0,_0x5dcb26,_0x1c5de5['replyId']);break;}case v['Edit']:{this['_threadCommentModel'][_0x3cd13a(0xcc)](_0x3f36b0,_0x5dcb26,{'commentId':_0x1c5de5['replyId'],'text':JSON[_0x3cd13a(0xe0)](_0x1c5de5['content'])});break;}case v[_0x3cd13a(0xe7)]:{const _0x3e8991=(_0x589b21=this['_threadCommentModel'][_0x3cd13a(0xff)](_0x1c5de5[_0x3cd13a(0xc7)])[_0x3cd13a(0xac)](_0x43afe0=>_0x43afe0[_0x3cd13a(0xaa)]===_0x1c5de5['threadId']))==null?void 0x0:_0x589b21[_0x3cd13a(0xf4)];_0x3e8991&&this[_0x3cd13a(0xdf)][_0x3cd13a(0xc3)](_0x3f36b0,_0x5dcb26,_0x3e8991['id'],_0x1c5de5[_0x3cd13a(0xba)]===I[_0x3cd13a(0xfc)]);break;}}}));}};p=E([S(0x0,c[_0x41db1f(0xca)](b['CommentService'])),S(0x1,c['Inject'](M[_0x41db1f(0xcf)])),S(0x2,c[_0x41db1f(0xca)](c['UserManagerService'])),S(0x3,c[_0x41db1f(0xca)](c[_0x41db1f(0x9c)]))],p);const q=_0x41db1f(0xf6),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0xd4af63,_0x592955,_0x311e34,_0x322f68)=>{const _0x4fb828=_0x41db1f;for(var _0x37ee9a=_0x322f68>0x1?void 0x0:_0x322f68?A(_0x592955,_0x311e34):_0x592955,_0x595540=_0xd4af63[_0x4fb828(0x110)]-0x1,_0x202252;_0x595540>=0x0;_0x595540--)(_0x202252=_0xd4af63[_0x595540])&&(_0x37ee9a=_0x202252(_0x37ee9a)||_0x37ee9a);return _0x37ee9a;},_=(_0x390c3b,_0x19d26d)=>(_0x1d8794,_0x4484ce)=>_0x19d26d(_0x1d8794,_0x4484ce,_0x390c3b);function Y(_0x4d28e3,_0x283d73){const _0x105374=_0x41db1f,_0x428eeb=_0x4d28e3[_0x105374(0xa1)][0x0];return{..._0x283d73,'id':_0x428eeb['replyId'],'resolved':_0x4d28e3[_0x105374(0xba)]===0x1,'dT':f(_0x428eeb[_0x105374(0xab)]),'personId':_0x428eeb[_0x105374(0xf5)],'threadId':_0x428eeb[_0x105374(0xaa)]};}function G(_0x1a640a,_0x4da8aa,_0x132402){const _0x3932e3=_0x41db1f;var _0x3c0dc7,_0x16734b;if(((_0x16734b=(_0x3c0dc7=_0x1a640a==null?void 0x0:_0x1a640a[_0x3932e3(0xa1)])==null?void 0x0:_0x3c0dc7[_0x3932e3(0x110)])!=null?_0x16734b:0x0)>0x0){const _0x45cf90=(_0x58ab2d,_0x176fd0)=>({'id':_0x58ab2d[_0x3932e3(0xec)],'threadId':_0x58ab2d[_0x3932e3(0xaa)],'dT':f(_0x58ab2d['createTimestamp']),'personId':_0x58ab2d[_0x3932e3(0xf5)],'resolved':_0x1a640a[_0x3932e3(0xba)]===I['Solved'],'unitId':_0x4da8aa,'subUnitId':_0x132402,'text':JSON[_0x3932e3(0xe0)](_0x58ab2d[_0x3932e3(0xcb)]),'parentId':_0x176fd0}),_0xdaedb6=_0x45cf90(_0x1a640a[_0x3932e3(0xa1)][0x0]);return{..._0xdaedb6,'children':_0x1a640a[_0x3932e3(0xa1)]['slice'](0x1)[_0x3932e3(0x99)](_0x5b3425=>_0x45cf90(_0x5b3425,_0xdaedb6['id']))};}return null;}let g=class{constructor(_0x2478e6,_0x31db45,_0x52f017,_0x1dec99){const _0x349373=_0x41db1f;this[_0x349373(0xae)]=_0x2478e6,this[_0x349373(0xf1)]=_0x31db45,this[_0x349373(0xc4)]=_0x52f017,this['_injector']=_0x1dec99;}async[_0x41db1f(0xeb)](_0x5aa5a6){const _0x4be2cf=_0x41db1f;var _0x5ab8c5,_0x336681;const {parentId:_0x264148,unitId:_0x5259b6,text:_0xec7f03,threadId:_0x27eca2}=_0x5aa5a6,_0x294c8d=(_0x336681=(_0x5ab8c5=_0xec7f03[_0x4be2cf(0xc9)])==null?void 0x0:_0x5ab8c5[_0x4be2cf(0xde)](_0x4c7d39=>_0x4c7d39[_0x4be2cf(0xfa)]===c[_0x4be2cf(0xed)][_0x4be2cf(0xa2)])[_0x4be2cf(0x99)](_0x67aae0=>_0x67aae0['rangeId']))!=null?_0x336681:[],_0xb16f61=JSON[_0x4be2cf(0xf8)](_0xec7f03),_0x1df3e2=(await this[_0x4be2cf(0xc4)]['requireSession'](_0x5259b6))[_0x4be2cf(0xbf)]();if(_0x264148){const _0x9c23a={'memberId':_0x1df3e2,'unitId':_0x5259b6,'content':_0xb16f61,'mention':_0x294c8d,'threadId':_0x27eca2},_0x572298=(await this[_0x4be2cf(0xae)][_0x4be2cf(0xce)](_0x4be2cf(0xa0)+_0x5259b6+'/reply',{'body':_0x9c23a}))[_0x4be2cf(0x9a)]['reply'];return{..._0x5aa5a6,'id':_0x572298[_0x4be2cf(0xec)],'dT':c['dayjs'](+_0x572298[_0x4be2cf(0xab)])[_0x4be2cf(0xc5)](_0x4be2cf(0xd5)),'personId':_0x572298[_0x4be2cf(0xf5)]};}else{const _0x751e90={'memberId':_0x1df3e2,'unitId':_0x5259b6,'content':_0xb16f61,'mention':_0x294c8d},_0x4991fd=await this[_0x4be2cf(0xae)][_0x4be2cf(0xce)](_0x4be2cf(0xa0)+_0x5259b6+_0x4be2cf(0xdc),{'body':_0x751e90});return Y(_0x4991fd[_0x4be2cf(0x9a)]['comment'],_0x5aa5a6);}}async['updateComment'](_0x1558a6){const _0x561a09=_0x41db1f;var _0x2d94c5,_0x1396bb;const {text:_0x4bb600,unitId:_0xe4290c}=_0x1558a6,_0x3a8bf1=(_0x1396bb=(_0x2d94c5=_0x4bb600[_0x561a09(0xc9)])==null?void 0x0:_0x2d94c5['filter'](_0x5c2cdd=>_0x5c2cdd['rangeType']===c[_0x561a09(0xed)]['COMMENT'])['map'](_0x5817ce=>_0x5817ce[_0x561a09(0x9f)]))!=null?_0x1396bb:[],_0x317c3c=JSON[_0x561a09(0xf8)](_0x4bb600),_0x21eb94=_0x1558a6[_0x561a09(0xaa)],_0x18cd57=_0x1558a6['id'],_0x25d1b2={'memberId':(await this[_0x561a09(0xc4)][_0x561a09(0xf7)](_0xe4290c))[_0x561a09(0xbf)](),'unitId':_0xe4290c,'threadId':_0x21eb94,'mention':_0x3a8bf1,'content':_0x317c3c,'replyId':_0x18cd57},_0x142904=await this[_0x561a09(0xae)]['post'](_0x561a09(0xa0)+_0xe4290c+_0x561a09(0x109),{'body':_0x25d1b2});return!_0x142904[_0x561a09(0x9a)][_0x561a09(0xd1)]||_0x142904[_0x561a09(0x9a)][_0x561a09(0xd1)][_0x561a09(0xe3)]===0x1;}async[_0x41db1f(0xc3)](_0x348062){const _0x365e83=_0x41db1f,{unitId:_0x4ac8c5}=_0x348062,_0x334c4e=_0x348062[_0x365e83(0xaa)],_0x2c1df4={'memberId':this[_0x365e83(0xf1)][_0x365e83(0xc0)]()[_0x365e83(0xbc)],'unitId':_0x4ac8c5,'threadId':_0x334c4e,'solved':_0x348062['resolved']?I[_0x365e83(0xfc)]:I[_0x365e83(0xc8)]},_0xefb99f=await this[_0x365e83(0xae)][_0x365e83(0xce)](_0x365e83(0xa0)+_0x4ac8c5+'/solved',{'body':_0x2c1df4});return!_0xefb99f['body'][_0x365e83(0xd1)]||_0xefb99f[_0x365e83(0x9a)][_0x365e83(0xd1)]['code']===0x1;}async[_0x41db1f(0x9d)](_0x2ccae5,_0x3af31f,_0x27b458,_0x264b90){const _0x32ba34=_0x41db1f,_0x5fe687={'memberId':(await this[_0x32ba34(0xc4)]['requireSession'](_0x2ccae5))[_0x32ba34(0xbf)](),'threadId':_0x27b458,'replyId':_0x264b90,'unitId':_0x2ccae5},_0x479cba=await this[_0x32ba34(0xae)]['post'](_0x32ba34(0xa0)+_0x2ccae5+'/delete',{'body':_0x5fe687});return!_0x479cba[_0x32ba34(0x9a)][_0x32ba34(0xd1)]||_0x479cba[_0x32ba34(0x9a)]['error']['code']===0x1;}async[_0x41db1f(0xc2)](_0x21ab54,_0x2dd98a,_0x5a0b6a){const _0x44e127=_0x41db1f,_0xa8fe86={'unitId':_0x21ab54,'threadId':_0x5a0b6a},_0x365e5d=await this['_httpService'][_0x44e127(0xce)]('/universer-api/comment/unit/'+_0x21ab54+'/list',{'body':_0xa8fe86}),_0x31210c=_0x5a0b6a[_0x44e127(0x99)](_0x2b0e38=>G(_0x365e5d[_0x44e127(0x9a)][_0x44e127(0xf9)][_0x2b0e38],_0x21ab54,_0x2dd98a))[_0x44e127(0xde)](Boolean);return Object['values'](_0x365e5d[_0x44e127(0x9a)]['users'])[_0x44e127(0x10c)](_0x2a8891=>{this['_userService']['addUser'](_0x2a8891);}),_0x31210c;}[_0x41db1f(0xe4)](_0x15fd9b){const _0x15b49a=_0x41db1f;return{'id':_0x15fd9b['id'],'threadId':_0x15fd9b[_0x15b49a(0xaa)],'ref':_0x15fd9b[_0x15b49a(0x10b)]};}};g=x([_(0x0,c[_0x41db1f(0xca)](P[_0x41db1f(0xe2)])),_(0x1,c[_0x41db1f(0xca)](c[_0x41db1f(0x100)])),_(0x2,c[_0x41db1f(0xca)](b[_0x41db1f(0xe5)])),_(0x3,c[_0x41db1f(0xca)](c[_0x41db1f(0x9c)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x23eb32,_0xee7f,_0x43826f,_0xb9ec34)=>{const _0x3e691a=_0x41db1f;for(var _0x458b07=_0xb9ec34>0x1?void 0x0:_0xb9ec34?H(_0xee7f,_0x43826f):_0xee7f,_0x2156bc=_0x23eb32[_0x3e691a(0x110)]-0x1,_0x54df22;_0x2156bc>=0x0;_0x2156bc--)(_0x54df22=_0x23eb32[_0x2156bc])&&(_0x458b07=_0x54df22(_0x458b07)||_0x458b07);return _0x458b07;},y=(_0x17916c,_0x7d7a4b)=>(_0x34178a,_0x3dc03b)=>_0x7d7a4b(_0x34178a,_0x3dc03b,_0x17916c);let C=class extends c[_0x41db1f(0x106)]{constructor(_0x22937c,_0x4370c4){const _0x403c8d=_0x41db1f;super(),this[_0x403c8d(0x101)]=_0x22937c,this[_0x403c8d(0x98)]=_0x4370c4,this['_initDataSource']();}[_0x41db1f(0xd7)](){const _0x316d33=_0x41db1f;this['_threadCommentDataSourceService']['dataSource']=this[_0x316d33(0x98)],this[_0x316d33(0x101)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](g))],C);var F=Object[_0x41db1f(0x97)],L=Object['getOwnPropertyDescriptor'],Z=(_0x1e766f,_0x37dbec,_0x4c022f)=>_0x37dbec in _0x1e766f?F(_0x1e766f,_0x37dbec,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4c022f}):_0x1e766f[_0x37dbec]=_0x4c022f,W=(_0x4a963a,_0x2bedd7,_0x22753d,_0x28eade)=>{for(var _0x4e42c3=_0x28eade>0x1?void 0x0:_0x28eade?L(_0x2bedd7,_0x22753d):_0x2bedd7,_0x591fb3=_0x4a963a['length']-0x1,_0x192d46;_0x591fb3>=0x0;_0x591fb3--)(_0x192d46=_0x4a963a[_0x591fb3])&&(_0x4e42c3=_0x192d46(_0x4e42c3)||_0x4e42c3);return _0x4e42c3;},O=(_0x508c24,_0x2dc29d)=>(_0x8579d1,_0x3183c2)=>_0x2dc29d(_0x8579d1,_0x3183c2,_0x508c24),N=(_0x464c65,_0x53bd76,_0x2a2fcb)=>Z(_0x464c65,typeof _0x53bd76!=_0x41db1f(0xd9)?_0x53bd76+'':_0x53bd76,_0x2a2fcb);exports[_0x41db1f(0xee)]=class extends c[_0x41db1f(0xbb)]{constructor(_0x314855=D,_0x2eb1bb,_0x5ee599){const _0x14f34c=_0x41db1f;super(),this[_0x14f34c(0x9b)]=_0x314855,this[_0x14f34c(0x107)]=_0x2eb1bb,this[_0x14f34c(0xa4)]=_0x5ee599;const {..._0x5d3a77}=c[_0x14f34c(0xb7)]({},D,this[_0x14f34c(0x9b)]);this['_configService'][_0x14f34c(0xe9)](q,_0x5d3a77);}[_0x41db1f(0xef)](){[[g],[C],[p]]['forEach'](_0x3d70b1=>{const _0x2e5dff=_0x4cea;this['_injector'][_0x2e5dff(0xb3)](_0x3d70b1);});}[_0x41db1f(0xfb)](){const _0x1a46ea=_0x41db1f;this[_0x1a46ea(0x107)][_0x1a46ea(0xb0)](C),this[_0x1a46ea(0x107)][_0x1a46ea(0xb0)](p);}},N(exports[_0x41db1f(0xee)],'pluginName',U),N(exports[_0x41db1f(0xee)],_0x41db1f(0xe1),c[_0x41db1f(0xcd)][_0x41db1f(0xd6)]),exports[_0x41db1f(0xee)]=W([c[_0x41db1f(0x108)](j['UniverThreadCommentUIPlugin'],b[_0x41db1f(0xf2)],T['UniverLicensePlugin']),O(0x1,c[_0x41db1f(0xca)](c[_0x41db1f(0x9c)])),O(0x2,c[_0x41db1f(0xc1)])],exports[_0x41db1f(0xee)]);
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 _0x2cc8a6=_0x1055;(function(_0x5b8c71,_0x2628e5){const _0x751248=_0x1055,_0x53f661=_0x5b8c71();while(!![]){try{const _0x38a1bf=-parseInt(_0x751248(0x1bf))/0x1+parseInt(_0x751248(0x1d6))/0x2*(-parseInt(_0x751248(0x1bb))/0x3)+parseInt(_0x751248(0x1bc))/0x4+-parseInt(_0x751248(0x1db))/0x5+parseInt(_0x751248(0x1a0))/0x6*(-parseInt(_0x751248(0x1d3))/0x7)+-parseInt(_0x751248(0x1b9))/0x8*(parseInt(_0x751248(0x1f0))/0x9)+parseInt(_0x751248(0x1b1))/0xa*(parseInt(_0x751248(0x1a1))/0xb);if(_0x38a1bf===_0x2628e5)break;else _0x53f661['push'](_0x53f661['shift']());}catch(_0x5e43ed){_0x53f661['push'](_0x53f661['shift']());}}}(_0x5b60,0x211cb));import{CommentService as _0x74c6c3,CollaborationSessionService as _0x48974a,UniverCollaborationClientPlugin as _0x5cf774}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x26eb12}from'@univerjs-pro/license';import{dayjs as _0x3e9fc4,UserManagerService as _0x196045,Inject as _0x508d76,Injector as _0x54331d,Disposable as _0x4cf6d8,CustomRangeType as _0x3f5e23,UniverInstanceType as _0x22d94a,DependentOn as _0x37d3da,IConfigService as _0x6fd7ab,Plugin as _0x173940,merge as _0x422e60}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4388c4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1b41e9,IThreadCommentDataSourceService as _0xa3bc21}from'@univerjs/thread-comment';import{bufferTime as _0x5a99f1}from'rxjs';import{HTTPService as _0x3d2d95}from'@univerjs/network';const W=_0x2cc8a6(0x1aa);var I=(_0x27d71c=>(_0x27d71c[_0x27d71c[_0x2cc8a6(0x1d5)]=0x0]=_0x2cc8a6(0x1d5),_0x27d71c[_0x27d71c[_0x2cc8a6(0x1eb)]=0x1]=_0x2cc8a6(0x1eb),_0x27d71c[_0x27d71c['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x27d71c))(I||{}),v=(_0x366c39=>(_0x366c39[_0x366c39[_0x2cc8a6(0x1e9)]=0x0]='Unknown',_0x366c39[_0x366c39[_0x2cc8a6(0x1c3)]=0x1]='Add',_0x366c39[_0x366c39[_0x2cc8a6(0x1ad)]=0x2]=_0x2cc8a6(0x1ad),_0x366c39[_0x366c39[_0x2cc8a6(0x1ef)]=0x3]='Edit',_0x366c39[_0x366c39['Delete']=0x4]='Delete',_0x366c39[_0x366c39[_0x2cc8a6(0x1b0)]=0x5]=_0x2cc8a6(0x1b0),_0x366c39[_0x366c39[_0x2cc8a6(0x1da)]=-0x1]='UNRECOGNIZED',_0x366c39))(v||{});const D=_0x31337d=>_0x3e9fc4(new Date(+_0x31337d))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x4e0a83,_0x50f89f)=>{const _0xf43e6e=_0x2cc8a6,_0x133bb6=_0x4e0a83[_0xf43e6e(0x1e5)](_0x196045),_0x126725=_0x4e0a83[_0xf43e6e(0x1e5)](_0x3d2d95);_0x50f89f[_0xf43e6e(0x1e7)](_0x24483f=>{const _0x668824=_0xf43e6e;_0x133bb6[_0x668824(0x19e)](_0x24483f)&&_0x50f89f[_0x668824(0x1c1)](_0x24483f);}),_0x50f89f[_0xf43e6e(0x1ee)]&&(await _0x126725['get'](_0xf43e6e(0x1cf),{'params':{'userIDs':[..._0x50f89f]}}))[_0xf43e6e(0x1d4)]['users'][_0xf43e6e(0x1e7)](_0x5eaeb7=>{const _0x5a7dfe=_0xf43e6e;_0x5eaeb7&&_0x133bb6[_0x5a7dfe(0x1a2)](_0x5eaeb7);});};var K=Object[_0x2cc8a6(0x1fa)],V=(_0x341f89,_0x5e988f,_0x1d6e9e,_0x574205)=>{for(var _0x1ae094=_0x574205>0x1?void 0x0:_0x574205?K(_0x5e988f,_0x1d6e9e):_0x5e988f,_0x104601=_0x341f89['length']-0x1,_0x273303;_0x104601>=0x0;_0x104601--)(_0x273303=_0x341f89[_0x104601])&&(_0x1ae094=_0x273303(_0x1ae094)||_0x1ae094);return _0x1ae094;},p=(_0x31f48a,_0x167e6c)=>(_0x1f6941,_0x4caff9)=>_0x167e6c(_0x1f6941,_0x4caff9,_0x31f48a);function _0x5b60(){const _0x55a7e6=['error','threadId','/edit','/universer-api/user/list','createTimestamp','slice','users','43085BfYcxO','body','OpenOrReOpen','96166dxVwVG','deleteComment','COMMENT','find','UNRECOGNIZED','529310gCeyTH','map','_injector','/list','post','/universer-api/comment/unit/','_threadCommentDataSource','stringify','add','Delete','get','filter','forEach','/solved','Unknown','unitId','Solved','disposeWithMe','subscribe','size','Edit','783kQyDdT','getUnit','customRanges','rangeId','symbol','_initUserSync','rangeType','content','personId','comment','getOwnPropertyDescriptor','code','_sessionService','/add','listComments','_init','addComment','getUser','replies','144CWLwzP','642378JgbtwO','addUser','_httpService','userID','_config','replyId','solved','parentId','comments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getComment','parse','Reply','_commentService','resolved','Solve','110OtIegn','type','saveCommentToSnapshot','pipe','_configService','updateComment','getMemberID','onStarting','23672BgeZbM','_threadCommentDataSourceService','3aCvdgq','777076CVlYQv','_userService','_threadCommentModel','141922aItzIx','user','delete','/delete','Add','length','_initDataSource','userId','values','root','commentUpdate$','requireSession','reply'];_0x5b60=function(){return _0x55a7e6;};return _0x5b60();}let S=class extends _0x4cf6d8{constructor(_0x91d85d,_0x59cc94,_0x322416,_0x5d7ec4){const _0x164134=_0x2cc8a6;super(),this[_0x164134(0x1ae)]=_0x91d85d,this['_threadCommentModel']=_0x59cc94,this['_userService']=_0x322416,this[_0x164134(0x1dd)]=_0x5d7ec4,this['_init'](),this[_0x164134(0x1f5)]();}[_0x2cc8a6(0x1f5)](){const _0x347c0f=_0x2cc8a6;this['disposeWithMe'](this[_0x347c0f(0x1be)][_0x347c0f(0x1c9)][_0x347c0f(0x1b4)](_0x5a99f1(0x10))['subscribe'](_0x3cf785=>{const _0x1da555=new Set();_0x3cf785['forEach'](_0xc69bb3=>{const _0x391e3d=_0x1055;switch(_0xc69bb3[_0x391e3d(0x1b2)]){case _0x391e3d(0x1e3):{const _0x5f3472=_0xc69bb3['payload'][_0x391e3d(0x1f8)];_0x1da555[_0x391e3d(0x1e3)](_0x5f3472);break;}}}),B(this['_injector'],_0x1da555);}));}[_0x2cc8a6(0x19c)](){const _0x529c7c=_0x2cc8a6;this[_0x529c7c(0x1ec)](this[_0x529c7c(0x1ae)]['commentUpdate$'][_0x529c7c(0x1ed)](async _0x1a1cc2=>{const _0x1282cb=_0x529c7c;var _0x3eb973,_0x34964c,_0x534ef4,_0x33fe5e;const _0x4eb6f1=(_0x3eb973=this[_0x1282cb(0x1be)][_0x1282cb(0x1f1)](_0x1a1cc2[_0x1282cb(0x1ea)])[_0x1282cb(0x1d9)](_0x55054f=>_0x55054f[_0x1282cb(0x1cd)]===_0x1a1cc2['threadId']))==null?void 0x0:_0x3eb973[_0x1282cb(0x1c8)];if(!_0x4eb6f1)return;const {unitId:_0x360a76,subUnitId:_0x4bded6}=_0x4eb6f1;switch(_0x1a1cc2['user']&&this[_0x1282cb(0x1bd)][_0x1282cb(0x1a2)](_0x1a1cc2[_0x1282cb(0x1c0)]),_0x1a1cc2[_0x1282cb(0x1b2)]){case v[_0x1282cb(0x1c3)]:break;case v[_0x1282cb(0x1ad)]:{this[_0x1282cb(0x1be)][_0x1282cb(0x19d)](_0x360a76,_0x4bded6,{'unitId':_0x360a76,'subUnitId':_0x4bded6,'ref':'','id':_0x1a1cc2[_0x1282cb(0x1a6)],'dT':D(+_0x1a1cc2['createTimestamp']),'threadId':_0x1a1cc2[_0x1282cb(0x1cd)],'personId':(_0x534ef4=(_0x34964c=_0x1a1cc2[_0x1282cb(0x1c0)])==null?void 0x0:_0x34964c['userID'])!=null?_0x534ef4:_0x1a1cc2[_0x1282cb(0x1c6)],'text':JSON[_0x1282cb(0x1ac)](_0x1a1cc2[_0x1282cb(0x1f7)]),'parentId':_0x4eb6f1['id']});break;}case v[_0x1282cb(0x1e4)]:{const _0x14a0a5=this[_0x1282cb(0x1be)][_0x1282cb(0x1ab)](_0x360a76,_0x4bded6,_0x1a1cc2[_0x1282cb(0x1a6)]);_0x14a0a5&&_0x14a0a5[_0x1282cb(0x1a8)]&&this[_0x1282cb(0x1be)][_0x1282cb(0x1d7)](_0x360a76,_0x4bded6,_0x1a1cc2['replyId']);break;}case v['Edit']:{this[_0x1282cb(0x1be)][_0x1282cb(0x1b6)](_0x360a76,_0x4bded6,{'commentId':_0x1a1cc2['replyId'],'text':JSON['parse'](_0x1a1cc2['content'])});break;}case v[_0x1282cb(0x1b0)]:{const _0xdb3e69=(_0x33fe5e=this['_threadCommentModel'][_0x1282cb(0x1f1)](_0x1a1cc2[_0x1282cb(0x1ea)])['find'](_0x4d00ef=>_0x4d00ef[_0x1282cb(0x1cd)]===_0x1a1cc2[_0x1282cb(0x1cd)]))==null?void 0x0:_0x33fe5e[_0x1282cb(0x1c8)];_0xdb3e69&&this[_0x1282cb(0x1be)]['resolveComment'](_0x360a76,_0x4bded6,_0xdb3e69['id'],_0x1a1cc2[_0x1282cb(0x1a7)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x508d76(_0x74c6c3)),p(0x1,_0x508d76(_0x1b41e9)),p(0x2,_0x508d76(_0x196045)),p(0x3,_0x508d76(_0x54331d))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x47c3bd,_0x3693ef,_0x449b11,_0xc171e4)=>{const _0x4bf66a=_0x2cc8a6;for(var _0x2cf6bf=_0xc171e4>0x1?void 0x0:_0xc171e4?k(_0x3693ef,_0x449b11):_0x3693ef,_0x4e9866=_0x47c3bd[_0x4bf66a(0x1c4)]-0x1,_0x7833b6;_0x4e9866>=0x0;_0x4e9866--)(_0x7833b6=_0x47c3bd[_0x4e9866])&&(_0x2cf6bf=_0x7833b6(_0x2cf6bf)||_0x2cf6bf);return _0x2cf6bf;},_=(_0x381e6d,_0x1c8501)=>(_0x3520aa,_0x5b426d)=>_0x1c8501(_0x3520aa,_0x5b426d,_0x381e6d);function X(_0x40bc8c,_0xb32cf1){const _0x451a23=_0x2cc8a6,_0x487652=_0x40bc8c[_0x451a23(0x19f)][0x0];return{..._0xb32cf1,'id':_0x487652[_0x451a23(0x1a6)],'resolved':_0x40bc8c['solved']===0x1,'dT':D(_0x487652['createTimestamp']),'personId':_0x487652[_0x451a23(0x1c6)],'threadId':_0x487652[_0x451a23(0x1cd)]};}function ee(_0x2d7b2e,_0x114984,_0x4e2d25){const _0x386e95=_0x2cc8a6;var _0x48bd19,_0x2ccb25;if(((_0x2ccb25=(_0x48bd19=_0x2d7b2e==null?void 0x0:_0x2d7b2e['replies'])==null?void 0x0:_0x48bd19[_0x386e95(0x1c4)])!=null?_0x2ccb25:0x0)>0x0){const _0x4aa96f=(_0x4bba49,_0x4f7bcc)=>({'id':_0x4bba49[_0x386e95(0x1a6)],'threadId':_0x4bba49[_0x386e95(0x1cd)],'dT':D(_0x4bba49[_0x386e95(0x1d0)]),'personId':_0x4bba49[_0x386e95(0x1c6)],'resolved':_0x2d7b2e['solved']===I[_0x386e95(0x1eb)],'unitId':_0x114984,'subUnitId':_0x4e2d25,'text':JSON[_0x386e95(0x1ac)](_0x4bba49[_0x386e95(0x1f7)]),'parentId':_0x4f7bcc}),_0x3d9af9=_0x4aa96f(_0x2d7b2e['replies'][0x0]);return{..._0x3d9af9,'children':_0x2d7b2e[_0x386e95(0x19f)][_0x386e95(0x1d1)](0x1)['map'](_0x3f40c7=>_0x4aa96f(_0x3f40c7,_0x3d9af9['id']))};}return null;}let f=class{constructor(_0x3283c2,_0x2aaf8d,_0xd160ac,_0x2330c4){const _0x120c9e=_0x2cc8a6;this[_0x120c9e(0x1a3)]=_0x3283c2,this['_userService']=_0x2aaf8d,this['_sessionService']=_0xd160ac,this[_0x120c9e(0x1dd)]=_0x2330c4;}async[_0x2cc8a6(0x19d)](_0x26e7a9){const _0x5a7ea5=_0x2cc8a6;var _0x546a69,_0x15f3aa;const {parentId:_0x454460,unitId:_0x3a945d,text:_0x419298,threadId:_0x4827c1}=_0x26e7a9,_0x31158c=(_0x15f3aa=(_0x546a69=_0x419298['customRanges'])==null?void 0x0:_0x546a69['filter'](_0x3a5040=>_0x3a5040[_0x5a7ea5(0x1f6)]===_0x3f5e23[_0x5a7ea5(0x1d8)])[_0x5a7ea5(0x1dc)](_0x32c1af=>_0x32c1af[_0x5a7ea5(0x1f3)]))!=null?_0x15f3aa:[],_0x18efbc=JSON[_0x5a7ea5(0x1e2)](_0x419298),_0x33ac2b=(await this[_0x5a7ea5(0x1fc)][_0x5a7ea5(0x1ca)](_0x3a945d))[_0x5a7ea5(0x1b7)]();if(_0x454460){const _0x52f831={'memberId':_0x33ac2b,'unitId':_0x3a945d,'content':_0x18efbc,'mention':_0x31158c,'threadId':_0x4827c1},_0x559380=(await this[_0x5a7ea5(0x1a3)][_0x5a7ea5(0x1df)]('/universer-api/comment/unit/'+_0x3a945d+'/reply',{'body':_0x52f831}))[_0x5a7ea5(0x1d4)][_0x5a7ea5(0x1cb)];return{..._0x26e7a9,'id':_0x559380[_0x5a7ea5(0x1a6)],'dT':_0x3e9fc4(+_0x559380[_0x5a7ea5(0x1d0)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x559380[_0x5a7ea5(0x1c6)]};}else{const _0x34da07={'memberId':_0x33ac2b,'unitId':_0x3a945d,'content':_0x18efbc,'mention':_0x31158c},_0x35aa30=await this[_0x5a7ea5(0x1a3)][_0x5a7ea5(0x1df)]('/universer-api/comment/unit/'+_0x3a945d+_0x5a7ea5(0x1fd),{'body':_0x34da07});return X(_0x35aa30[_0x5a7ea5(0x1d4)][_0x5a7ea5(0x1f9)],_0x26e7a9);}}async['updateComment'](_0x416c67){const _0x5d810b=_0x2cc8a6;var _0x5e5eb8,_0x1202f1;const {text:_0x43bb2f,unitId:_0x4976c8}=_0x416c67,_0x5c686c=(_0x1202f1=(_0x5e5eb8=_0x43bb2f[_0x5d810b(0x1f2)])==null?void 0x0:_0x5e5eb8[_0x5d810b(0x1e6)](_0x56340f=>_0x56340f[_0x5d810b(0x1f6)]===_0x3f5e23['COMMENT'])[_0x5d810b(0x1dc)](_0x4ff117=>_0x4ff117[_0x5d810b(0x1f3)]))!=null?_0x1202f1:[],_0x634c5d=JSON[_0x5d810b(0x1e2)](_0x43bb2f),_0x3db1cb=_0x416c67['threadId'],_0x5994e1=_0x416c67['id'],_0x274f6a={'memberId':(await this[_0x5d810b(0x1fc)][_0x5d810b(0x1ca)](_0x4976c8))['getMemberID'](),'unitId':_0x4976c8,'threadId':_0x3db1cb,'mention':_0x5c686c,'content':_0x634c5d,'replyId':_0x5994e1},_0x16110a=await this[_0x5d810b(0x1a3)][_0x5d810b(0x1df)]('/universer-api/comment/unit/'+_0x4976c8+_0x5d810b(0x1ce),{'body':_0x274f6a});return!_0x16110a[_0x5d810b(0x1d4)][_0x5d810b(0x1cc)]||_0x16110a['body'][_0x5d810b(0x1cc)]['code']===0x1;}async['resolveComment'](_0x569f01){const _0x2c6c05=_0x2cc8a6,{unitId:_0x13004c}=_0x569f01,_0x2e855d=_0x569f01[_0x2c6c05(0x1cd)],_0x199af3={'memberId':this[_0x2c6c05(0x1bd)]['getCurrentUser']()[_0x2c6c05(0x1a4)],'unitId':_0x13004c,'threadId':_0x2e855d,'solved':_0x569f01[_0x2c6c05(0x1af)]?I[_0x2c6c05(0x1eb)]:I['OpenOrReOpen']},_0x27cebc=await this[_0x2c6c05(0x1a3)][_0x2c6c05(0x1df)](_0x2c6c05(0x1e0)+_0x13004c+_0x2c6c05(0x1e8),{'body':_0x199af3});return!_0x27cebc[_0x2c6c05(0x1d4)][_0x2c6c05(0x1cc)]||_0x27cebc[_0x2c6c05(0x1d4)]['error'][_0x2c6c05(0x1fb)]===0x1;}async['deleteComment'](_0x172133,_0x276567,_0x5945f5,_0x384546){const _0x271eee=_0x2cc8a6,_0x1a29f2={'memberId':(await this[_0x271eee(0x1fc)][_0x271eee(0x1ca)](_0x172133))[_0x271eee(0x1b7)](),'threadId':_0x5945f5,'replyId':_0x384546,'unitId':_0x172133},_0x4e0af9=await this[_0x271eee(0x1a3)][_0x271eee(0x1df)]('/universer-api/comment/unit/'+_0x172133+_0x271eee(0x1c2),{'body':_0x1a29f2});return!_0x4e0af9['body'][_0x271eee(0x1cc)]||_0x4e0af9[_0x271eee(0x1d4)][_0x271eee(0x1cc)][_0x271eee(0x1fb)]===0x1;}async[_0x2cc8a6(0x19b)](_0x55e253,_0x56397a,_0x5a4b68){const _0x397508=_0x2cc8a6,_0x21666f={'unitId':_0x55e253,'threadId':_0x5a4b68},_0x57ab13=await this[_0x397508(0x1a3)]['post'](_0x397508(0x1e0)+_0x55e253+_0x397508(0x1de),{'body':_0x21666f}),_0xdf5013=_0x5a4b68['map'](_0x294766=>ee(_0x57ab13[_0x397508(0x1d4)][_0x397508(0x1a9)][_0x294766],_0x55e253,_0x56397a))[_0x397508(0x1e6)](Boolean);return Object[_0x397508(0x1c7)](_0x57ab13[_0x397508(0x1d4)][_0x397508(0x1d2)])[_0x397508(0x1e7)](_0x3b3a7d=>{const _0x5ae66f=_0x397508;this[_0x5ae66f(0x1bd)][_0x5ae66f(0x1a2)](_0x3b3a7d);}),_0xdf5013;}[_0x2cc8a6(0x1b3)](_0xfc9ce7){const _0x1e0306=_0x2cc8a6;return{'id':_0xfc9ce7['id'],'threadId':_0xfc9ce7[_0x1e0306(0x1cd)],'ref':_0xfc9ce7['ref']};}};f=Q([_(0x0,_0x508d76(_0x3d2d95)),_(0x1,_0x508d76(_0x196045)),_(0x2,_0x508d76(_0x48974a)),_(0x3,_0x508d76(_0x54331d))],f);var re=Object[_0x2cc8a6(0x1fa)],te=(_0x477f8e,_0x41e07b,_0x21938f,_0x487709)=>{const _0x57feed=_0x2cc8a6;for(var _0x496bda=_0x487709>0x1?void 0x0:_0x487709?re(_0x41e07b,_0x21938f):_0x41e07b,_0x53da12=_0x477f8e[_0x57feed(0x1c4)]-0x1,_0x164b4e;_0x53da12>=0x0;_0x53da12--)(_0x164b4e=_0x477f8e[_0x53da12])&&(_0x496bda=_0x164b4e(_0x496bda)||_0x496bda);return _0x496bda;},N=(_0x2d904a,_0xcbabe2)=>(_0x3282e8,_0x46583e)=>_0xcbabe2(_0x3282e8,_0x46583e,_0x2d904a);let g=class extends _0x4cf6d8{constructor(_0x15ca97,_0x48a214){const _0x2d6572=_0x2cc8a6;super(),this['_threadCommentDataSourceService']=_0x15ca97,this[_0x2d6572(0x1e1)]=_0x48a214,this[_0x2d6572(0x1c5)]();}[_0x2cc8a6(0x1c5)](){const _0xd6efc1=_0x2cc8a6;this[_0xd6efc1(0x1ba)]['dataSource']=this['_threadCommentDataSource'],this[_0xd6efc1(0x1ba)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0xa3bc21),N(0x1,_0x508d76(f))],g);var se=Object['defineProperty'],oe=Object[_0x2cc8a6(0x1fa)],ne=(_0x56a402,_0x2e3a15,_0x4fa52d)=>_0x2e3a15 in _0x56a402?se(_0x56a402,_0x2e3a15,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4fa52d}):_0x56a402[_0x2e3a15]=_0x4fa52d,ie=(_0x212195,_0x338356,_0x23dee3,_0x38b712)=>{for(var _0x49df31=_0x38b712>0x1?void 0x0:_0x38b712?oe(_0x338356,_0x23dee3):_0x338356,_0x5a6128=_0x212195['length']-0x1,_0x3211bb;_0x5a6128>=0x0;_0x5a6128--)(_0x3211bb=_0x212195[_0x5a6128])&&(_0x49df31=_0x3211bb(_0x49df31)||_0x49df31);return _0x49df31;},w=(_0x1cf2e9,_0x7e46e3)=>(_0x205031,_0x477d12)=>_0x7e46e3(_0x205031,_0x477d12,_0x1cf2e9),$=(_0xa16efd,_0x4c7be5,_0x6d4b36)=>ne(_0xa16efd,typeof _0x4c7be5!=_0x2cc8a6(0x1f4)?_0x4c7be5+'':_0x4c7be5,_0x6d4b36);let b=class extends _0x173940{constructor(_0x311ece=M,_0xa5aef7,_0x260226){const _0x2a2c74=_0x2cc8a6;super(),this[_0x2a2c74(0x1a5)]=_0x311ece,this['_injector']=_0xa5aef7,this[_0x2a2c74(0x1b5)]=_0x260226;const {..._0x33eb49}=_0x422e60({},M,this[_0x2a2c74(0x1a5)]);this[_0x2a2c74(0x1b5)]['setConfig'](z,_0x33eb49);}[_0x2cc8a6(0x1b8)](){const _0x3d45f4=_0x2cc8a6;[[f],[g],[S]][_0x3d45f4(0x1e7)](_0x220941=>{const _0x183db6=_0x3d45f4;this[_0x183db6(0x1dd)][_0x183db6(0x1e3)](_0x220941);});}['onReady'](){const _0x47dae5=_0x2cc8a6;this[_0x47dae5(0x1dd)][_0x47dae5(0x1e5)](g),this[_0x47dae5(0x1dd)][_0x47dae5(0x1e5)](S);}};$(b,'pluginName',W),$(b,'type',_0x22d94a['UNIVER_UNKNOWN']),b=ie([_0x37d3da(_0x4388c4,_0x5cf774,_0x26eb12),w(0x1,_0x508d76(_0x54331d)),w(0x2,_0x6fd7ab)],b);function _0x1055(_0x46ac91,_0x399605){const _0x5b605e=_0x5b60();return _0x1055=function(_0x1055aa,_0x2dbf99){_0x1055aa=_0x1055aa-0x19b;let _0x3145ce=_0x5b605e[_0x1055aa];return _0x3145ce;},_0x1055(_0x46ac91,_0x399605);}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 _0x2cc8a6=_0x1055;(function(_0x5b8c71,_0x2628e5){const _0x751248=_0x1055,_0x53f661=_0x5b8c71();while(!![]){try{const _0x38a1bf=-parseInt(_0x751248(0x1bf))/0x1+parseInt(_0x751248(0x1d6))/0x2*(-parseInt(_0x751248(0x1bb))/0x3)+parseInt(_0x751248(0x1bc))/0x4+-parseInt(_0x751248(0x1db))/0x5+parseInt(_0x751248(0x1a0))/0x6*(-parseInt(_0x751248(0x1d3))/0x7)+-parseInt(_0x751248(0x1b9))/0x8*(parseInt(_0x751248(0x1f0))/0x9)+parseInt(_0x751248(0x1b1))/0xa*(parseInt(_0x751248(0x1a1))/0xb);if(_0x38a1bf===_0x2628e5)break;else _0x53f661['push'](_0x53f661['shift']());}catch(_0x5e43ed){_0x53f661['push'](_0x53f661['shift']());}}}(_0x5b60,0x211cb));import{CommentService as _0x74c6c3,CollaborationSessionService as _0x48974a,UniverCollaborationClientPlugin as _0x5cf774}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x26eb12}from'@univerjs-pro/license';import{dayjs as _0x3e9fc4,UserManagerService as _0x196045,Inject as _0x508d76,Injector as _0x54331d,Disposable as _0x4cf6d8,CustomRangeType as _0x3f5e23,UniverInstanceType as _0x22d94a,DependentOn as _0x37d3da,IConfigService as _0x6fd7ab,Plugin as _0x173940,merge as _0x422e60}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4388c4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1b41e9,IThreadCommentDataSourceService as _0xa3bc21}from'@univerjs/thread-comment';import{bufferTime as _0x5a99f1}from'rxjs';import{HTTPService as _0x3d2d95}from'@univerjs/network';const W=_0x2cc8a6(0x1aa);var I=(_0x27d71c=>(_0x27d71c[_0x27d71c[_0x2cc8a6(0x1d5)]=0x0]=_0x2cc8a6(0x1d5),_0x27d71c[_0x27d71c[_0x2cc8a6(0x1eb)]=0x1]=_0x2cc8a6(0x1eb),_0x27d71c[_0x27d71c['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x27d71c))(I||{}),v=(_0x366c39=>(_0x366c39[_0x366c39[_0x2cc8a6(0x1e9)]=0x0]='Unknown',_0x366c39[_0x366c39[_0x2cc8a6(0x1c3)]=0x1]='Add',_0x366c39[_0x366c39[_0x2cc8a6(0x1ad)]=0x2]=_0x2cc8a6(0x1ad),_0x366c39[_0x366c39[_0x2cc8a6(0x1ef)]=0x3]='Edit',_0x366c39[_0x366c39['Delete']=0x4]='Delete',_0x366c39[_0x366c39[_0x2cc8a6(0x1b0)]=0x5]=_0x2cc8a6(0x1b0),_0x366c39[_0x366c39[_0x2cc8a6(0x1da)]=-0x1]='UNRECOGNIZED',_0x366c39))(v||{});const D=_0x31337d=>_0x3e9fc4(new Date(+_0x31337d))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x4e0a83,_0x50f89f)=>{const _0xf43e6e=_0x2cc8a6,_0x133bb6=_0x4e0a83[_0xf43e6e(0x1e5)](_0x196045),_0x126725=_0x4e0a83[_0xf43e6e(0x1e5)](_0x3d2d95);_0x50f89f[_0xf43e6e(0x1e7)](_0x24483f=>{const _0x668824=_0xf43e6e;_0x133bb6[_0x668824(0x19e)](_0x24483f)&&_0x50f89f[_0x668824(0x1c1)](_0x24483f);}),_0x50f89f[_0xf43e6e(0x1ee)]&&(await _0x126725['get'](_0xf43e6e(0x1cf),{'params':{'userIDs':[..._0x50f89f]}}))[_0xf43e6e(0x1d4)]['users'][_0xf43e6e(0x1e7)](_0x5eaeb7=>{const _0x5a7dfe=_0xf43e6e;_0x5eaeb7&&_0x133bb6[_0x5a7dfe(0x1a2)](_0x5eaeb7);});};var K=Object[_0x2cc8a6(0x1fa)],V=(_0x341f89,_0x5e988f,_0x1d6e9e,_0x574205)=>{for(var _0x1ae094=_0x574205>0x1?void 0x0:_0x574205?K(_0x5e988f,_0x1d6e9e):_0x5e988f,_0x104601=_0x341f89['length']-0x1,_0x273303;_0x104601>=0x0;_0x104601--)(_0x273303=_0x341f89[_0x104601])&&(_0x1ae094=_0x273303(_0x1ae094)||_0x1ae094);return _0x1ae094;},p=(_0x31f48a,_0x167e6c)=>(_0x1f6941,_0x4caff9)=>_0x167e6c(_0x1f6941,_0x4caff9,_0x31f48a);function _0x5b60(){const _0x55a7e6=['error','threadId','/edit','/universer-api/user/list','createTimestamp','slice','users','43085BfYcxO','body','OpenOrReOpen','96166dxVwVG','deleteComment','COMMENT','find','UNRECOGNIZED','529310gCeyTH','map','_injector','/list','post','/universer-api/comment/unit/','_threadCommentDataSource','stringify','add','Delete','get','filter','forEach','/solved','Unknown','unitId','Solved','disposeWithMe','subscribe','size','Edit','783kQyDdT','getUnit','customRanges','rangeId','symbol','_initUserSync','rangeType','content','personId','comment','getOwnPropertyDescriptor','code','_sessionService','/add','listComments','_init','addComment','getUser','replies','144CWLwzP','642378JgbtwO','addUser','_httpService','userID','_config','replyId','solved','parentId','comments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getComment','parse','Reply','_commentService','resolved','Solve','110OtIegn','type','saveCommentToSnapshot','pipe','_configService','updateComment','getMemberID','onStarting','23672BgeZbM','_threadCommentDataSourceService','3aCvdgq','777076CVlYQv','_userService','_threadCommentModel','141922aItzIx','user','delete','/delete','Add','length','_initDataSource','userId','values','root','commentUpdate$','requireSession','reply'];_0x5b60=function(){return _0x55a7e6;};return _0x5b60();}let S=class extends _0x4cf6d8{constructor(_0x91d85d,_0x59cc94,_0x322416,_0x5d7ec4){const _0x164134=_0x2cc8a6;super(),this[_0x164134(0x1ae)]=_0x91d85d,this['_threadCommentModel']=_0x59cc94,this['_userService']=_0x322416,this[_0x164134(0x1dd)]=_0x5d7ec4,this['_init'](),this[_0x164134(0x1f5)]();}[_0x2cc8a6(0x1f5)](){const _0x347c0f=_0x2cc8a6;this['disposeWithMe'](this[_0x347c0f(0x1be)][_0x347c0f(0x1c9)][_0x347c0f(0x1b4)](_0x5a99f1(0x10))['subscribe'](_0x3cf785=>{const _0x1da555=new Set();_0x3cf785['forEach'](_0xc69bb3=>{const _0x391e3d=_0x1055;switch(_0xc69bb3[_0x391e3d(0x1b2)]){case _0x391e3d(0x1e3):{const _0x5f3472=_0xc69bb3['payload'][_0x391e3d(0x1f8)];_0x1da555[_0x391e3d(0x1e3)](_0x5f3472);break;}}}),B(this['_injector'],_0x1da555);}));}[_0x2cc8a6(0x19c)](){const _0x529c7c=_0x2cc8a6;this[_0x529c7c(0x1ec)](this[_0x529c7c(0x1ae)]['commentUpdate$'][_0x529c7c(0x1ed)](async _0x1a1cc2=>{const _0x1282cb=_0x529c7c;var _0x3eb973,_0x34964c,_0x534ef4,_0x33fe5e;const _0x4eb6f1=(_0x3eb973=this[_0x1282cb(0x1be)][_0x1282cb(0x1f1)](_0x1a1cc2[_0x1282cb(0x1ea)])[_0x1282cb(0x1d9)](_0x55054f=>_0x55054f[_0x1282cb(0x1cd)]===_0x1a1cc2['threadId']))==null?void 0x0:_0x3eb973[_0x1282cb(0x1c8)];if(!_0x4eb6f1)return;const {unitId:_0x360a76,subUnitId:_0x4bded6}=_0x4eb6f1;switch(_0x1a1cc2['user']&&this[_0x1282cb(0x1bd)][_0x1282cb(0x1a2)](_0x1a1cc2[_0x1282cb(0x1c0)]),_0x1a1cc2[_0x1282cb(0x1b2)]){case v[_0x1282cb(0x1c3)]:break;case v[_0x1282cb(0x1ad)]:{this[_0x1282cb(0x1be)][_0x1282cb(0x19d)](_0x360a76,_0x4bded6,{'unitId':_0x360a76,'subUnitId':_0x4bded6,'ref':'','id':_0x1a1cc2[_0x1282cb(0x1a6)],'dT':D(+_0x1a1cc2['createTimestamp']),'threadId':_0x1a1cc2[_0x1282cb(0x1cd)],'personId':(_0x534ef4=(_0x34964c=_0x1a1cc2[_0x1282cb(0x1c0)])==null?void 0x0:_0x34964c['userID'])!=null?_0x534ef4:_0x1a1cc2[_0x1282cb(0x1c6)],'text':JSON[_0x1282cb(0x1ac)](_0x1a1cc2[_0x1282cb(0x1f7)]),'parentId':_0x4eb6f1['id']});break;}case v[_0x1282cb(0x1e4)]:{const _0x14a0a5=this[_0x1282cb(0x1be)][_0x1282cb(0x1ab)](_0x360a76,_0x4bded6,_0x1a1cc2[_0x1282cb(0x1a6)]);_0x14a0a5&&_0x14a0a5[_0x1282cb(0x1a8)]&&this[_0x1282cb(0x1be)][_0x1282cb(0x1d7)](_0x360a76,_0x4bded6,_0x1a1cc2['replyId']);break;}case v['Edit']:{this[_0x1282cb(0x1be)][_0x1282cb(0x1b6)](_0x360a76,_0x4bded6,{'commentId':_0x1a1cc2['replyId'],'text':JSON['parse'](_0x1a1cc2['content'])});break;}case v[_0x1282cb(0x1b0)]:{const _0xdb3e69=(_0x33fe5e=this['_threadCommentModel'][_0x1282cb(0x1f1)](_0x1a1cc2[_0x1282cb(0x1ea)])['find'](_0x4d00ef=>_0x4d00ef[_0x1282cb(0x1cd)]===_0x1a1cc2[_0x1282cb(0x1cd)]))==null?void 0x0:_0x33fe5e[_0x1282cb(0x1c8)];_0xdb3e69&&this[_0x1282cb(0x1be)]['resolveComment'](_0x360a76,_0x4bded6,_0xdb3e69['id'],_0x1a1cc2[_0x1282cb(0x1a7)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x508d76(_0x74c6c3)),p(0x1,_0x508d76(_0x1b41e9)),p(0x2,_0x508d76(_0x196045)),p(0x3,_0x508d76(_0x54331d))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x47c3bd,_0x3693ef,_0x449b11,_0xc171e4)=>{const _0x4bf66a=_0x2cc8a6;for(var _0x2cf6bf=_0xc171e4>0x1?void 0x0:_0xc171e4?k(_0x3693ef,_0x449b11):_0x3693ef,_0x4e9866=_0x47c3bd[_0x4bf66a(0x1c4)]-0x1,_0x7833b6;_0x4e9866>=0x0;_0x4e9866--)(_0x7833b6=_0x47c3bd[_0x4e9866])&&(_0x2cf6bf=_0x7833b6(_0x2cf6bf)||_0x2cf6bf);return _0x2cf6bf;},_=(_0x381e6d,_0x1c8501)=>(_0x3520aa,_0x5b426d)=>_0x1c8501(_0x3520aa,_0x5b426d,_0x381e6d);function X(_0x40bc8c,_0xb32cf1){const _0x451a23=_0x2cc8a6,_0x487652=_0x40bc8c[_0x451a23(0x19f)][0x0];return{..._0xb32cf1,'id':_0x487652[_0x451a23(0x1a6)],'resolved':_0x40bc8c['solved']===0x1,'dT':D(_0x487652['createTimestamp']),'personId':_0x487652[_0x451a23(0x1c6)],'threadId':_0x487652[_0x451a23(0x1cd)]};}function ee(_0x2d7b2e,_0x114984,_0x4e2d25){const _0x386e95=_0x2cc8a6;var _0x48bd19,_0x2ccb25;if(((_0x2ccb25=(_0x48bd19=_0x2d7b2e==null?void 0x0:_0x2d7b2e['replies'])==null?void 0x0:_0x48bd19[_0x386e95(0x1c4)])!=null?_0x2ccb25:0x0)>0x0){const _0x4aa96f=(_0x4bba49,_0x4f7bcc)=>({'id':_0x4bba49[_0x386e95(0x1a6)],'threadId':_0x4bba49[_0x386e95(0x1cd)],'dT':D(_0x4bba49[_0x386e95(0x1d0)]),'personId':_0x4bba49[_0x386e95(0x1c6)],'resolved':_0x2d7b2e['solved']===I[_0x386e95(0x1eb)],'unitId':_0x114984,'subUnitId':_0x4e2d25,'text':JSON[_0x386e95(0x1ac)](_0x4bba49[_0x386e95(0x1f7)]),'parentId':_0x4f7bcc}),_0x3d9af9=_0x4aa96f(_0x2d7b2e['replies'][0x0]);return{..._0x3d9af9,'children':_0x2d7b2e[_0x386e95(0x19f)][_0x386e95(0x1d1)](0x1)['map'](_0x3f40c7=>_0x4aa96f(_0x3f40c7,_0x3d9af9['id']))};}return null;}let f=class{constructor(_0x3283c2,_0x2aaf8d,_0xd160ac,_0x2330c4){const _0x120c9e=_0x2cc8a6;this[_0x120c9e(0x1a3)]=_0x3283c2,this['_userService']=_0x2aaf8d,this['_sessionService']=_0xd160ac,this[_0x120c9e(0x1dd)]=_0x2330c4;}async[_0x2cc8a6(0x19d)](_0x26e7a9){const _0x5a7ea5=_0x2cc8a6;var _0x546a69,_0x15f3aa;const {parentId:_0x454460,unitId:_0x3a945d,text:_0x419298,threadId:_0x4827c1}=_0x26e7a9,_0x31158c=(_0x15f3aa=(_0x546a69=_0x419298['customRanges'])==null?void 0x0:_0x546a69['filter'](_0x3a5040=>_0x3a5040[_0x5a7ea5(0x1f6)]===_0x3f5e23[_0x5a7ea5(0x1d8)])[_0x5a7ea5(0x1dc)](_0x32c1af=>_0x32c1af[_0x5a7ea5(0x1f3)]))!=null?_0x15f3aa:[],_0x18efbc=JSON[_0x5a7ea5(0x1e2)](_0x419298),_0x33ac2b=(await this[_0x5a7ea5(0x1fc)][_0x5a7ea5(0x1ca)](_0x3a945d))[_0x5a7ea5(0x1b7)]();if(_0x454460){const _0x52f831={'memberId':_0x33ac2b,'unitId':_0x3a945d,'content':_0x18efbc,'mention':_0x31158c,'threadId':_0x4827c1},_0x559380=(await this[_0x5a7ea5(0x1a3)][_0x5a7ea5(0x1df)]('/universer-api/comment/unit/'+_0x3a945d+'/reply',{'body':_0x52f831}))[_0x5a7ea5(0x1d4)][_0x5a7ea5(0x1cb)];return{..._0x26e7a9,'id':_0x559380[_0x5a7ea5(0x1a6)],'dT':_0x3e9fc4(+_0x559380[_0x5a7ea5(0x1d0)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x559380[_0x5a7ea5(0x1c6)]};}else{const _0x34da07={'memberId':_0x33ac2b,'unitId':_0x3a945d,'content':_0x18efbc,'mention':_0x31158c},_0x35aa30=await this[_0x5a7ea5(0x1a3)][_0x5a7ea5(0x1df)]('/universer-api/comment/unit/'+_0x3a945d+_0x5a7ea5(0x1fd),{'body':_0x34da07});return X(_0x35aa30[_0x5a7ea5(0x1d4)][_0x5a7ea5(0x1f9)],_0x26e7a9);}}async['updateComment'](_0x416c67){const _0x5d810b=_0x2cc8a6;var _0x5e5eb8,_0x1202f1;const {text:_0x43bb2f,unitId:_0x4976c8}=_0x416c67,_0x5c686c=(_0x1202f1=(_0x5e5eb8=_0x43bb2f[_0x5d810b(0x1f2)])==null?void 0x0:_0x5e5eb8[_0x5d810b(0x1e6)](_0x56340f=>_0x56340f[_0x5d810b(0x1f6)]===_0x3f5e23['COMMENT'])[_0x5d810b(0x1dc)](_0x4ff117=>_0x4ff117[_0x5d810b(0x1f3)]))!=null?_0x1202f1:[],_0x634c5d=JSON[_0x5d810b(0x1e2)](_0x43bb2f),_0x3db1cb=_0x416c67['threadId'],_0x5994e1=_0x416c67['id'],_0x274f6a={'memberId':(await this[_0x5d810b(0x1fc)][_0x5d810b(0x1ca)](_0x4976c8))['getMemberID'](),'unitId':_0x4976c8,'threadId':_0x3db1cb,'mention':_0x5c686c,'content':_0x634c5d,'replyId':_0x5994e1},_0x16110a=await this[_0x5d810b(0x1a3)][_0x5d810b(0x1df)]('/universer-api/comment/unit/'+_0x4976c8+_0x5d810b(0x1ce),{'body':_0x274f6a});return!_0x16110a[_0x5d810b(0x1d4)][_0x5d810b(0x1cc)]||_0x16110a['body'][_0x5d810b(0x1cc)]['code']===0x1;}async['resolveComment'](_0x569f01){const _0x2c6c05=_0x2cc8a6,{unitId:_0x13004c}=_0x569f01,_0x2e855d=_0x569f01[_0x2c6c05(0x1cd)],_0x199af3={'memberId':this[_0x2c6c05(0x1bd)]['getCurrentUser']()[_0x2c6c05(0x1a4)],'unitId':_0x13004c,'threadId':_0x2e855d,'solved':_0x569f01[_0x2c6c05(0x1af)]?I[_0x2c6c05(0x1eb)]:I['OpenOrReOpen']},_0x27cebc=await this[_0x2c6c05(0x1a3)][_0x2c6c05(0x1df)](_0x2c6c05(0x1e0)+_0x13004c+_0x2c6c05(0x1e8),{'body':_0x199af3});return!_0x27cebc[_0x2c6c05(0x1d4)][_0x2c6c05(0x1cc)]||_0x27cebc[_0x2c6c05(0x1d4)]['error'][_0x2c6c05(0x1fb)]===0x1;}async['deleteComment'](_0x172133,_0x276567,_0x5945f5,_0x384546){const _0x271eee=_0x2cc8a6,_0x1a29f2={'memberId':(await this[_0x271eee(0x1fc)][_0x271eee(0x1ca)](_0x172133))[_0x271eee(0x1b7)](),'threadId':_0x5945f5,'replyId':_0x384546,'unitId':_0x172133},_0x4e0af9=await this[_0x271eee(0x1a3)][_0x271eee(0x1df)]('/universer-api/comment/unit/'+_0x172133+_0x271eee(0x1c2),{'body':_0x1a29f2});return!_0x4e0af9['body'][_0x271eee(0x1cc)]||_0x4e0af9[_0x271eee(0x1d4)][_0x271eee(0x1cc)][_0x271eee(0x1fb)]===0x1;}async[_0x2cc8a6(0x19b)](_0x55e253,_0x56397a,_0x5a4b68){const _0x397508=_0x2cc8a6,_0x21666f={'unitId':_0x55e253,'threadId':_0x5a4b68},_0x57ab13=await this[_0x397508(0x1a3)]['post'](_0x397508(0x1e0)+_0x55e253+_0x397508(0x1de),{'body':_0x21666f}),_0xdf5013=_0x5a4b68['map'](_0x294766=>ee(_0x57ab13[_0x397508(0x1d4)][_0x397508(0x1a9)][_0x294766],_0x55e253,_0x56397a))[_0x397508(0x1e6)](Boolean);return Object[_0x397508(0x1c7)](_0x57ab13[_0x397508(0x1d4)][_0x397508(0x1d2)])[_0x397508(0x1e7)](_0x3b3a7d=>{const _0x5ae66f=_0x397508;this[_0x5ae66f(0x1bd)][_0x5ae66f(0x1a2)](_0x3b3a7d);}),_0xdf5013;}[_0x2cc8a6(0x1b3)](_0xfc9ce7){const _0x1e0306=_0x2cc8a6;return{'id':_0xfc9ce7['id'],'threadId':_0xfc9ce7[_0x1e0306(0x1cd)],'ref':_0xfc9ce7['ref']};}};f=Q([_(0x0,_0x508d76(_0x3d2d95)),_(0x1,_0x508d76(_0x196045)),_(0x2,_0x508d76(_0x48974a)),_(0x3,_0x508d76(_0x54331d))],f);var re=Object[_0x2cc8a6(0x1fa)],te=(_0x477f8e,_0x41e07b,_0x21938f,_0x487709)=>{const _0x57feed=_0x2cc8a6;for(var _0x496bda=_0x487709>0x1?void 0x0:_0x487709?re(_0x41e07b,_0x21938f):_0x41e07b,_0x53da12=_0x477f8e[_0x57feed(0x1c4)]-0x1,_0x164b4e;_0x53da12>=0x0;_0x53da12--)(_0x164b4e=_0x477f8e[_0x53da12])&&(_0x496bda=_0x164b4e(_0x496bda)||_0x496bda);return _0x496bda;},N=(_0x2d904a,_0xcbabe2)=>(_0x3282e8,_0x46583e)=>_0xcbabe2(_0x3282e8,_0x46583e,_0x2d904a);let g=class extends _0x4cf6d8{constructor(_0x15ca97,_0x48a214){const _0x2d6572=_0x2cc8a6;super(),this['_threadCommentDataSourceService']=_0x15ca97,this[_0x2d6572(0x1e1)]=_0x48a214,this[_0x2d6572(0x1c5)]();}[_0x2cc8a6(0x1c5)](){const _0xd6efc1=_0x2cc8a6;this[_0xd6efc1(0x1ba)]['dataSource']=this['_threadCommentDataSource'],this[_0xd6efc1(0x1ba)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0xa3bc21),N(0x1,_0x508d76(f))],g);var se=Object['defineProperty'],oe=Object[_0x2cc8a6(0x1fa)],ne=(_0x56a402,_0x2e3a15,_0x4fa52d)=>_0x2e3a15 in _0x56a402?se(_0x56a402,_0x2e3a15,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4fa52d}):_0x56a402[_0x2e3a15]=_0x4fa52d,ie=(_0x212195,_0x338356,_0x23dee3,_0x38b712)=>{for(var _0x49df31=_0x38b712>0x1?void 0x0:_0x38b712?oe(_0x338356,_0x23dee3):_0x338356,_0x5a6128=_0x212195['length']-0x1,_0x3211bb;_0x5a6128>=0x0;_0x5a6128--)(_0x3211bb=_0x212195[_0x5a6128])&&(_0x49df31=_0x3211bb(_0x49df31)||_0x49df31);return _0x49df31;},w=(_0x1cf2e9,_0x7e46e3)=>(_0x205031,_0x477d12)=>_0x7e46e3(_0x205031,_0x477d12,_0x1cf2e9),$=(_0xa16efd,_0x4c7be5,_0x6d4b36)=>ne(_0xa16efd,typeof _0x4c7be5!=_0x2cc8a6(0x1f4)?_0x4c7be5+'':_0x4c7be5,_0x6d4b36);let b=class extends _0x173940{constructor(_0x311ece=M,_0xa5aef7,_0x260226){const _0x2a2c74=_0x2cc8a6;super(),this[_0x2a2c74(0x1a5)]=_0x311ece,this['_injector']=_0xa5aef7,this[_0x2a2c74(0x1b5)]=_0x260226;const {..._0x33eb49}=_0x422e60({},M,this[_0x2a2c74(0x1a5)]);this[_0x2a2c74(0x1b5)]['setConfig'](z,_0x33eb49);}[_0x2cc8a6(0x1b8)](){const _0x3d45f4=_0x2cc8a6;[[f],[g],[S]][_0x3d45f4(0x1e7)](_0x220941=>{const _0x183db6=_0x3d45f4;this[_0x183db6(0x1dd)][_0x183db6(0x1e3)](_0x220941);});}['onReady'](){const _0x47dae5=_0x2cc8a6;this[_0x47dae5(0x1dd)][_0x47dae5(0x1e5)](g),this[_0x47dae5(0x1dd)][_0x47dae5(0x1e5)](S);}};$(b,'pluginName',W),$(b,'type',_0x22d94a['UNIVER_UNKNOWN']),b=ie([_0x37d3da(_0x4388c4,_0x5cf774,_0x26eb12),w(0x1,_0x508d76(_0x54331d)),w(0x2,_0x6fd7ab)],b);function _0x1055(_0x46ac91,_0x399605){const _0x5b605e=_0x5b60();return _0x1055=function(_0x1055aa,_0x2dbf99){_0x1055aa=_0x1055aa-0x19b;let _0x3145ce=_0x5b605e[_0x1055aa];return _0x3145ce;},_0x1055(_0x46ac91,_0x399605);}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(_0x441d4c,_0x481c05){const _0x47d82f=_0x29cd,_0x91e344=_0x441d4c();while(!![]){try{const _0xbc2bce=-parseInt(_0x47d82f(0x1d1))/0x1*(-parseInt(_0x47d82f(0x1b7))/0x2)+parseInt(_0x47d82f(0x200))/0x3*(parseInt(_0x47d82f(0x1fa))/0x4)+-parseInt(_0x47d82f(0x228))/0x5+-parseInt(_0x47d82f(0x1b1))/0x6+-parseInt(_0x47d82f(0x227))/0x7+-parseInt(_0x47d82f(0x225))/0x8+parseInt(_0x47d82f(0x229))/0x9*(parseInt(_0x47d82f(0x1c7))/0xa);if(_0xbc2bce===_0x481c05)break;else _0x91e344['push'](_0x91e344['shift']());}catch(_0x4a3846){_0x91e344['push'](_0x91e344['shift']());}}}(_0x2451,0x94512),function(_0x3397ec,_0xa4b193){const _0x2213c9=_0x29cd;typeof exports==_0x2213c9(0x1fe)&&typeof module<'u'?_0xa4b193(exports,require(_0x2213c9(0x1d5)),require('@univerjs-pro/license'),require(_0x2213c9(0x1b9)),require('@univerjs/thread-comment-ui'),require(_0x2213c9(0x1fc)),require('rxjs'),require(_0x2213c9(0x1c3))):typeof define=='function'&&define[_0x2213c9(0x20d)]?define([_0x2213c9(0x1ea),_0x2213c9(0x1d5),_0x2213c9(0x206),_0x2213c9(0x1b9),_0x2213c9(0x223),_0x2213c9(0x1fc),'rxjs',_0x2213c9(0x1c3)],_0xa4b193):(_0x3397ec=typeof globalThis<'u'?globalThis:_0x3397ec||self,_0xa4b193(_0x3397ec[_0x2213c9(0x1d3)]={},_0x3397ec[_0x2213c9(0x220)],_0x3397ec[_0x2213c9(0x1db)],_0x3397ec['UniverCore'],_0x3397ec[_0x2213c9(0x205)],_0x3397ec[_0x2213c9(0x20a)],_0x3397ec[_0x2213c9(0x1f6)],_0x3397ec[_0x2213c9(0x214)]));}(this,function(_0x5708ee,_0xa6c00e,_0x3dcb7f,_0x40565c,_0x11e035,_0x2e46d8,_0x50e44c,_0x126f1a){'use strict';const _0x15bd47=_0x29cd;const _0x2ddd03=_0x15bd47(0x21a);var _0x3f0710=(_0x55a6f1=>(_0x55a6f1[_0x55a6f1[_0x15bd47(0x207)]=0x0]='OpenOrReOpen',_0x55a6f1[_0x55a6f1[_0x15bd47(0x1cd)]=0x1]=_0x15bd47(0x1cd),_0x55a6f1[_0x55a6f1[_0x15bd47(0x218)]=-0x1]=_0x15bd47(0x218),_0x55a6f1))(_0x3f0710||{}),_0x3283b7=(_0x21eb7b=>(_0x21eb7b[_0x21eb7b[_0x15bd47(0x1c9)]=0x0]=_0x15bd47(0x1c9),_0x21eb7b[_0x21eb7b['Add']=0x1]='Add',_0x21eb7b[_0x21eb7b['Reply']=0x2]=_0x15bd47(0x20e),_0x21eb7b[_0x21eb7b[_0x15bd47(0x1bb)]=0x3]=_0x15bd47(0x1bb),_0x21eb7b[_0x21eb7b[_0x15bd47(0x1b6)]=0x4]=_0x15bd47(0x1b6),_0x21eb7b[_0x21eb7b[_0x15bd47(0x1f8)]=0x5]='Solve',_0x21eb7b[_0x21eb7b[_0x15bd47(0x218)]=-0x1]='UNRECOGNIZED',_0x21eb7b))(_0x3283b7||{});const _0x3ac07d=_0x86fb95=>_0x40565c[_0x15bd47(0x1d0)](new Date(+_0x86fb95))['format']('YYYY/MM/DD\x20HH:mm'),_0x59a2e5=async(_0x49b654,_0x2a0433)=>{const _0x481e40=_0x15bd47,_0x33df57=_0x49b654[_0x481e40(0x1dc)](_0x40565c[_0x481e40(0x1cf)]),_0x1e3e65=_0x49b654[_0x481e40(0x1dc)](_0x126f1a[_0x481e40(0x1e0)]);_0x2a0433[_0x481e40(0x20f)](_0x4b790b=>{const _0x334c80=_0x481e40;_0x33df57[_0x334c80(0x213)](_0x4b790b)&&_0x2a0433[_0x334c80(0x1f4)](_0x4b790b);}),_0x2a0433['size']&&(await _0x1e3e65[_0x481e40(0x1dc)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2a0433]}}))[_0x481e40(0x1ca)]['users'][_0x481e40(0x20f)](_0x5789e5=>{_0x5789e5&&_0x33df57['addUser'](_0x5789e5);});};var _0x1ffb52=Object[_0x15bd47(0x201)],_0x3eaf2e=(_0x54a7c4,_0x2aa985,_0x55f94d,_0x466127)=>{const _0x14fad1=_0x15bd47;for(var _0x33b456=_0x466127>0x1?void 0x0:_0x466127?_0x1ffb52(_0x2aa985,_0x55f94d):_0x2aa985,_0x4a8d07=_0x54a7c4[_0x14fad1(0x1ba)]-0x1,_0x194495;_0x4a8d07>=0x0;_0x4a8d07--)(_0x194495=_0x54a7c4[_0x4a8d07])&&(_0x33b456=_0x194495(_0x33b456)||_0x33b456);return _0x33b456;},_0x486313=(_0x1144ad,_0x1d030f)=>(_0x4b38da,_0x2e6cf9)=>_0x1d030f(_0x4b38da,_0x2e6cf9,_0x1144ad);let _0x208812=class extends _0x40565c[_0x15bd47(0x1f3)]{constructor(_0x4c94af,_0x47a30e,_0x29a89b,_0x2e882c){const _0x578880=_0x15bd47;super(),this['_commentService']=_0x4c94af,this[_0x578880(0x1dd)]=_0x47a30e,this[_0x578880(0x1b3)]=_0x29a89b,this[_0x578880(0x1c1)]=_0x2e882c,this[_0x578880(0x1f5)](),this[_0x578880(0x1da)]();}['_initUserSync'](){const _0x3f7db0=_0x15bd47;this['disposeWithMe'](this['_threadCommentModel'][_0x3f7db0(0x20b)]['pipe'](_0x50e44c[_0x3f7db0(0x1ad)](0x10))[_0x3f7db0(0x209)](_0x3af95f=>{const _0x4ff42b=_0x3f7db0,_0x527a2f=new Set();_0x3af95f[_0x4ff42b(0x20f)](_0x4e8b49=>{const _0x406573=_0x4ff42b;switch(_0x4e8b49['type']){case _0x406573(0x1bc):{const _0x42b6df=_0x4e8b49[_0x406573(0x1b5)]['personId'];_0x527a2f[_0x406573(0x1bc)](_0x42b6df);break;}}}),_0x59a2e5(this[_0x4ff42b(0x1c1)],_0x527a2f);}));}[_0x15bd47(0x1f5)](){const _0xf0adff=_0x15bd47;this[_0xf0adff(0x20c)](this[_0xf0adff(0x1f2)]['commentUpdate$']['subscribe'](async _0x1dee6e=>{const _0x118155=_0xf0adff;var _0x4302cc,_0x1edb28,_0x56c94b,_0x2f5776;const _0x2ee505=(_0x4302cc=this[_0x118155(0x1dd)][_0x118155(0x1eb)](_0x1dee6e[_0x118155(0x202)])['find'](_0x19e17f=>_0x19e17f[_0x118155(0x1e7)]===_0x1dee6e[_0x118155(0x1e7)]))==null?void 0x0:_0x4302cc['root'];if(!_0x2ee505)return;const {unitId:_0x3de618,subUnitId:_0x27f30a}=_0x2ee505;switch(_0x1dee6e[_0x118155(0x1c0)]&&this[_0x118155(0x1b3)][_0x118155(0x1c2)](_0x1dee6e[_0x118155(0x1c0)]),_0x1dee6e[_0x118155(0x219)]){case _0x3283b7[_0x118155(0x1aa)]:break;case _0x3283b7[_0x118155(0x20e)]:{this['_threadCommentModel'][_0x118155(0x215)](_0x3de618,_0x27f30a,{'unitId':_0x3de618,'subUnitId':_0x27f30a,'ref':'','id':_0x1dee6e[_0x118155(0x1df)],'dT':_0x3ac07d(+_0x1dee6e[_0x118155(0x1af)]),'threadId':_0x1dee6e[_0x118155(0x1e7)],'personId':(_0x56c94b=(_0x1edb28=_0x1dee6e['user'])==null?void 0x0:_0x1edb28[_0x118155(0x222)])!=null?_0x56c94b:_0x1dee6e[_0x118155(0x1b8)],'text':JSON[_0x118155(0x1fd)](_0x1dee6e[_0x118155(0x1e8)]),'parentId':_0x2ee505['id']});break;}case _0x3283b7['Delete']:{const _0x404d7c=this['_threadCommentModel'][_0x118155(0x208)](_0x3de618,_0x27f30a,_0x1dee6e[_0x118155(0x1df)]);_0x404d7c&&_0x404d7c[_0x118155(0x1cb)]&&this[_0x118155(0x1dd)]['deleteComment'](_0x3de618,_0x27f30a,_0x1dee6e[_0x118155(0x1df)]);break;}case _0x3283b7[_0x118155(0x1bb)]:{this[_0x118155(0x1dd)][_0x118155(0x1d7)](_0x3de618,_0x27f30a,{'commentId':_0x1dee6e[_0x118155(0x1df)],'text':JSON[_0x118155(0x1fd)](_0x1dee6e[_0x118155(0x1e8)])});break;}case _0x3283b7[_0x118155(0x1f8)]:{const _0x1d97b9=(_0x2f5776=this['_threadCommentModel'][_0x118155(0x1eb)](_0x1dee6e[_0x118155(0x202)])[_0x118155(0x1d6)](_0x607583=>_0x607583['threadId']===_0x1dee6e['threadId']))==null?void 0x0:_0x2f5776[_0x118155(0x212)];_0x1d97b9&&this[_0x118155(0x1dd)]['resolveComment'](_0x3de618,_0x27f30a,_0x1d97b9['id'],_0x1dee6e[_0x118155(0x22a)]===_0x3f0710[_0x118155(0x1cd)]);break;}}}));}};_0x208812=_0x3eaf2e([_0x486313(0x0,_0x40565c[_0x15bd47(0x1c6)](_0xa6c00e['CommentService'])),_0x486313(0x1,_0x40565c[_0x15bd47(0x1c6)](_0x2e46d8[_0x15bd47(0x1e1)])),_0x486313(0x2,_0x40565c['Inject'](_0x40565c[_0x15bd47(0x1cf)])),_0x486313(0x3,_0x40565c['Inject'](_0x40565c['Injector']))],_0x208812);const _0x2ef742=_0x15bd47(0x1ec),_0x5b7dbe={};var _0x16054b=Object[_0x15bd47(0x201)],_0x4e4a4a=(_0x1df027,_0x348bfe,_0x2061a1,_0x21976c)=>{const _0x5ec660=_0x15bd47;for(var _0xd7e007=_0x21976c>0x1?void 0x0:_0x21976c?_0x16054b(_0x348bfe,_0x2061a1):_0x348bfe,_0x146511=_0x1df027[_0x5ec660(0x1ba)]-0x1,_0xb67e1a;_0x146511>=0x0;_0x146511--)(_0xb67e1a=_0x1df027[_0x146511])&&(_0xd7e007=_0xb67e1a(_0xd7e007)||_0xd7e007);return _0xd7e007;},_0x18c4cc=(_0x52f0d2,_0x27fc72)=>(_0x15e24f,_0x3e49af)=>_0x27fc72(_0x15e24f,_0x3e49af,_0x52f0d2);function _0x33a584(_0x3167bd,_0x47371d){const _0x27901f=_0x15bd47,_0x24d3db=_0x3167bd[_0x27901f(0x216)][0x0];return{..._0x47371d,'id':_0x24d3db[_0x27901f(0x1df)],'resolved':_0x3167bd[_0x27901f(0x22a)]===0x1,'dT':_0x3ac07d(_0x24d3db[_0x27901f(0x1af)]),'personId':_0x24d3db[_0x27901f(0x1b8)],'threadId':_0x24d3db['threadId']};}function _0x41d4cc(_0x495836,_0x80e79f,_0x76e95b){const _0x5d18c1=_0x15bd47;var _0x16540a,_0x568556;if(((_0x568556=(_0x16540a=_0x495836==null?void 0x0:_0x495836[_0x5d18c1(0x216)])==null?void 0x0:_0x16540a[_0x5d18c1(0x1ba)])!=null?_0x568556:0x0)>0x0){const _0x4e9afb=(_0x21f9a8,_0x32bcb6)=>({'id':_0x21f9a8[_0x5d18c1(0x1df)],'threadId':_0x21f9a8[_0x5d18c1(0x1e7)],'dT':_0x3ac07d(_0x21f9a8[_0x5d18c1(0x1af)]),'personId':_0x21f9a8[_0x5d18c1(0x1b8)],'resolved':_0x495836[_0x5d18c1(0x22a)]===_0x3f0710[_0x5d18c1(0x1cd)],'unitId':_0x80e79f,'subUnitId':_0x76e95b,'text':JSON[_0x5d18c1(0x1fd)](_0x21f9a8['content']),'parentId':_0x32bcb6}),_0x3a1533=_0x4e9afb(_0x495836[_0x5d18c1(0x216)][0x0]);return{..._0x3a1533,'children':_0x495836[_0x5d18c1(0x216)][_0x5d18c1(0x21e)](0x1)[_0x5d18c1(0x21f)](_0x5f4b27=>_0x4e9afb(_0x5f4b27,_0x3a1533['id']))};}return null;}let _0x58f14a=class{constructor(_0x784b80,_0x51440d,_0x243d33,_0x5039a9){const _0x1149ec=_0x15bd47;this['_httpService']=_0x784b80,this[_0x1149ec(0x1b3)]=_0x51440d,this[_0x1149ec(0x21b)]=_0x243d33,this[_0x1149ec(0x1c1)]=_0x5039a9;}async[_0x15bd47(0x215)](_0x3c7fac){const _0x57ecdc=_0x15bd47;var _0x234f6f,_0x52eaf0;const {parentId:_0x31c52e,unitId:_0x393195,text:_0x253e3c,threadId:_0x15b91e}=_0x3c7fac,_0xe63c68=(_0x52eaf0=(_0x234f6f=_0x253e3c[_0x57ecdc(0x224)])==null?void 0x0:_0x234f6f[_0x57ecdc(0x1d2)](_0x3b3fb3=>_0x3b3fb3[_0x57ecdc(0x1ef)]===_0x40565c[_0x57ecdc(0x1ab)][_0x57ecdc(0x1f7)])[_0x57ecdc(0x21f)](_0x50dc89=>_0x50dc89['rangeId']))!=null?_0x52eaf0:[],_0x151e7a=JSON[_0x57ecdc(0x1fb)](_0x253e3c),_0x51dca9=(await this[_0x57ecdc(0x21b)][_0x57ecdc(0x1b0)](_0x393195))['getMemberID']();if(_0x31c52e){const _0x148ffc={'memberId':_0x51dca9,'unitId':_0x393195,'content':_0x151e7a,'mention':_0xe63c68,'threadId':_0x15b91e},_0x5ee446=(await this[_0x57ecdc(0x203)][_0x57ecdc(0x1e6)]('/universer-api/comment/unit/'+_0x393195+_0x57ecdc(0x1f0),{'body':_0x148ffc}))[_0x57ecdc(0x1ca)][_0x57ecdc(0x1ce)];return{..._0x3c7fac,'id':_0x5ee446[_0x57ecdc(0x1df)],'dT':_0x40565c[_0x57ecdc(0x1d0)](+_0x5ee446['createTimestamp'])[_0x57ecdc(0x211)](_0x57ecdc(0x1ff)),'personId':_0x5ee446[_0x57ecdc(0x1b8)]};}else{const _0x2c86bd={'memberId':_0x51dca9,'unitId':_0x393195,'content':_0x151e7a,'mention':_0xe63c68},_0x3fb94b=await this[_0x57ecdc(0x203)][_0x57ecdc(0x1e6)](_0x57ecdc(0x1f9)+_0x393195+'/add',{'body':_0x2c86bd});return _0x33a584(_0x3fb94b[_0x57ecdc(0x1ca)][_0x57ecdc(0x1bd)],_0x3c7fac);}}async[_0x15bd47(0x1d7)](_0x43014e){const _0xe1f46a=_0x15bd47;var _0x3e2630,_0x408025;const {text:_0x1b43ab,unitId:_0x2c2522}=_0x43014e,_0x4dd532=(_0x408025=(_0x3e2630=_0x1b43ab[_0xe1f46a(0x224)])==null?void 0x0:_0x3e2630[_0xe1f46a(0x1d2)](_0x5a3144=>_0x5a3144['rangeType']===_0x40565c[_0xe1f46a(0x1ab)][_0xe1f46a(0x1f7)])['map'](_0x4a102b=>_0x4a102b[_0xe1f46a(0x1d4)]))!=null?_0x408025:[],_0x58f1e1=JSON[_0xe1f46a(0x1fb)](_0x1b43ab),_0x217bc5=_0x43014e[_0xe1f46a(0x1e7)],_0x5687fe=_0x43014e['id'],_0x1a2530={'memberId':(await this['_sessionService'][_0xe1f46a(0x1b0)](_0x2c2522))[_0xe1f46a(0x1e5)](),'unitId':_0x2c2522,'threadId':_0x217bc5,'mention':_0x4dd532,'content':_0x58f1e1,'replyId':_0x5687fe},_0x4df379=await this[_0xe1f46a(0x203)][_0xe1f46a(0x1e6)](_0xe1f46a(0x1f9)+_0x2c2522+'/edit',{'body':_0x1a2530});return!_0x4df379[_0xe1f46a(0x1ca)][_0xe1f46a(0x1f1)]||_0x4df379[_0xe1f46a(0x1ca)][_0xe1f46a(0x1f1)][_0xe1f46a(0x1e9)]===0x1;}async[_0x15bd47(0x1d8)](_0x217ab9){const _0x2c06af=_0x15bd47,{unitId:_0x76e4b9}=_0x217ab9,_0xc3b3ab=_0x217ab9[_0x2c06af(0x1e7)],_0x185fd3={'memberId':this['_userService']['getCurrentUser']()[_0x2c06af(0x222)],'unitId':_0x76e4b9,'threadId':_0xc3b3ab,'solved':_0x217ab9[_0x2c06af(0x1e4)]?_0x3f0710[_0x2c06af(0x1cd)]:_0x3f0710['OpenOrReOpen']},_0x172a24=await this['_httpService'][_0x2c06af(0x1e6)](_0x2c06af(0x1f9)+_0x76e4b9+_0x2c06af(0x1c8),{'body':_0x185fd3});return!_0x172a24[_0x2c06af(0x1ca)]['error']||_0x172a24[_0x2c06af(0x1ca)][_0x2c06af(0x1f1)][_0x2c06af(0x1e9)]===0x1;}async['deleteComment'](_0x53d197,_0x10f5ae,_0x3d3d7a,_0xd5811){const _0x76db7f=_0x15bd47,_0x4a4931={'memberId':(await this[_0x76db7f(0x21b)][_0x76db7f(0x1b0)](_0x53d197))['getMemberID'](),'threadId':_0x3d3d7a,'replyId':_0xd5811,'unitId':_0x53d197},_0x690f07=await this[_0x76db7f(0x203)][_0x76db7f(0x1e6)](_0x76db7f(0x1f9)+_0x53d197+_0x76db7f(0x1a9),{'body':_0x4a4931});return!_0x690f07[_0x76db7f(0x1ca)]['error']||_0x690f07[_0x76db7f(0x1ca)]['error'][_0x76db7f(0x1e9)]===0x1;}async[_0x15bd47(0x1de)](_0x4bd754,_0x558d7b,_0x170c4f){const _0x96bc73=_0x15bd47,_0x19150e={'unitId':_0x4bd754,'threadId':_0x170c4f},_0x26dfef=await this[_0x96bc73(0x203)]['post'](_0x96bc73(0x1f9)+_0x4bd754+'/list',{'body':_0x19150e}),_0x4c9f08=_0x170c4f[_0x96bc73(0x21f)](_0x1e6d2f=>_0x41d4cc(_0x26dfef['body'][_0x96bc73(0x1ac)][_0x1e6d2f],_0x4bd754,_0x558d7b))[_0x96bc73(0x1d2)](Boolean);return Object['values'](_0x26dfef[_0x96bc73(0x1ca)][_0x96bc73(0x1ae)])[_0x96bc73(0x20f)](_0xc1f1bb=>{const _0x26f884=_0x96bc73;this[_0x26f884(0x1b3)]['addUser'](_0xc1f1bb);}),_0x4c9f08;}[_0x15bd47(0x221)](_0x10a60c){const _0x264c8f=_0x15bd47;return{'id':_0x10a60c['id'],'threadId':_0x10a60c[_0x264c8f(0x1e7)],'ref':_0x10a60c[_0x264c8f(0x1cc)]};}};_0x58f14a=_0x4e4a4a([_0x18c4cc(0x0,_0x40565c[_0x15bd47(0x1c6)](_0x126f1a[_0x15bd47(0x1e0)])),_0x18c4cc(0x1,_0x40565c[_0x15bd47(0x1c6)](_0x40565c['UserManagerService'])),_0x18c4cc(0x2,_0x40565c['Inject'](_0xa6c00e['CollaborationSessionService'])),_0x18c4cc(0x3,_0x40565c[_0x15bd47(0x1c6)](_0x40565c[_0x15bd47(0x210)]))],_0x58f14a);var _0x5797ff=Object[_0x15bd47(0x201)],_0x19c1ed=(_0x8e2e44,_0x3202a2,_0xaff06d,_0x356c6b)=>{const _0x18c7c3=_0x15bd47;for(var _0x2f66fd=_0x356c6b>0x1?void 0x0:_0x356c6b?_0x5797ff(_0x3202a2,_0xaff06d):_0x3202a2,_0x3d7bd5=_0x8e2e44[_0x18c7c3(0x1ba)]-0x1,_0x32b694;_0x3d7bd5>=0x0;_0x3d7bd5--)(_0x32b694=_0x8e2e44[_0x3d7bd5])&&(_0x2f66fd=_0x32b694(_0x2f66fd)||_0x2f66fd);return _0x2f66fd;},_0x493d77=(_0x44509d,_0x3c787b)=>(_0x330b95,_0xac5553)=>_0x3c787b(_0x330b95,_0xac5553,_0x44509d);let _0x1b65e3=class extends _0x40565c[_0x15bd47(0x1f3)]{constructor(_0x1c4bc0,_0x11535f){const _0x55e2f9=_0x15bd47;super(),this[_0x55e2f9(0x1d9)]=_0x1c4bc0,this['_threadCommentDataSource']=_0x11535f,this['_initDataSource']();}[_0x15bd47(0x204)](){const _0x36f88a=_0x15bd47;this[_0x36f88a(0x1d9)][_0x36f88a(0x1c4)]=this['_threadCommentDataSource'],this[_0x36f88a(0x1d9)]['syncUpdateMutationToColla']=!0x1;}};_0x1b65e3=_0x19c1ed([_0x493d77(0x0,_0x2e46d8[_0x15bd47(0x1c5)]),_0x493d77(0x1,_0x40565c['Inject'](_0x58f14a))],_0x1b65e3);var _0xd596b3=Object[_0x15bd47(0x1b2)],_0xd06090=Object[_0x15bd47(0x201)],_0x1b074e=(_0x1ea63a,_0x1ae1aa,_0x256ea2)=>_0x1ae1aa in _0x1ea63a?_0xd596b3(_0x1ea63a,_0x1ae1aa,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x256ea2}):_0x1ea63a[_0x1ae1aa]=_0x256ea2,_0x4019ea=(_0x114d4f,_0x2821dd,_0x563095,_0x10c936)=>{for(var _0x299df3=_0x10c936>0x1?void 0x0:_0x10c936?_0xd06090(_0x2821dd,_0x563095):_0x2821dd,_0x52ac87=_0x114d4f['length']-0x1,_0x2fd152;_0x52ac87>=0x0;_0x52ac87--)(_0x2fd152=_0x114d4f[_0x52ac87])&&(_0x299df3=_0x2fd152(_0x299df3)||_0x299df3);return _0x299df3;},_0xde1a5c=(_0x466446,_0x37e845)=>(_0x44840f,_0x5b2dbf)=>_0x37e845(_0x44840f,_0x5b2dbf,_0x466446),_0x108fa6=(_0x4dbb3d,_0x5e4e86,_0x30adea)=>_0x1b074e(_0x4dbb3d,typeof _0x5e4e86!='symbol'?_0x5e4e86+'':_0x5e4e86,_0x30adea);_0x5708ee[_0x15bd47(0x21c)]=class extends _0x40565c[_0x15bd47(0x1e3)]{constructor(_0x29f5f9=_0x5b7dbe,_0x529e65,_0x4a63d3){const _0x5a9006=_0x15bd47;super(),this[_0x5a9006(0x217)]=_0x29f5f9,this[_0x5a9006(0x1c1)]=_0x529e65,this['_configService']=_0x4a63d3;const {..._0x3624ca}=_0x40565c[_0x5a9006(0x1ed)]({},_0x5b7dbe,this['_config']);this[_0x5a9006(0x226)][_0x5a9006(0x21d)](_0x2ef742,_0x3624ca);}['onStarting'](){const _0x4ff97f=_0x15bd47;[[_0x58f14a],[_0x1b65e3],[_0x208812]][_0x4ff97f(0x20f)](_0x306bb4=>{const _0x16d2bd=_0x4ff97f;this['_injector'][_0x16d2bd(0x1bc)](_0x306bb4);});}['onReady'](){const _0x484708=_0x15bd47;this[_0x484708(0x1c1)][_0x484708(0x1dc)](_0x1b65e3),this[_0x484708(0x1c1)][_0x484708(0x1dc)](_0x208812);}},_0x108fa6(_0x5708ee[_0x15bd47(0x21c)],'pluginName',_0x2ddd03),_0x108fa6(_0x5708ee[_0x15bd47(0x21c)],_0x15bd47(0x219),_0x40565c['UniverInstanceType'][_0x15bd47(0x1bf)]),_0x5708ee[_0x15bd47(0x21c)]=_0x4019ea([_0x40565c[_0x15bd47(0x1be)](_0x11e035[_0x15bd47(0x1ee)],_0xa6c00e['UniverCollaborationClientPlugin'],_0x3dcb7f[_0x15bd47(0x1b4)]),_0xde1a5c(0x1,_0x40565c[_0x15bd47(0x1c6)](_0x40565c['Injector'])),_0xde1a5c(0x2,_0x40565c['IConfigService'])],_0x5708ee[_0x15bd47(0x21c)]),Object[_0x15bd47(0x1b2)](_0x5708ee,Symbol[_0x15bd47(0x1e2)],{'value':'Module'});}));function _0x29cd(_0x28562f,_0x3105d0){const _0x2451c7=_0x2451();return _0x29cd=function(_0x29cd6d,_0x1f7480){_0x29cd6d=_0x29cd6d-0x1a9;let _0x10e19f=_0x2451c7[_0x29cd6d];return _0x10e19f;},_0x29cd(_0x28562f,_0x3105d0);}function _0x2451(){const _0x100484=['thread-comment-data-source.config','merge','UniverThreadCommentUIPlugin','rangeType','/reply','error','_commentService','Disposable','delete','_init','rxjs','COMMENT','Solve','/universer-api/comment/unit/','10732DTGpGl','stringify','@univerjs/thread-comment','parse','object','YYYY/MM/DD\x20HH:mm','690HIvytn','getOwnPropertyDescriptor','unitId','_httpService','_initDataSource','UniverThreadCommentUi','@univerjs-pro/license','OpenOrReOpen','getComment','subscribe','UniverThreadComment','commentUpdate$','disposeWithMe','amd','Reply','forEach','Injector','format','root','getUser','UniverNetwork','addComment','replies','_config','UNRECOGNIZED','type','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_sessionService','UniverThreadCommentDataSourcePlugin','setConfig','slice','map','UniverProCollaborationClient','saveCommentToSnapshot','userID','@univerjs/thread-comment-ui','customRanges','6791288bKMxLc','_configService','856051TzECeo','2177100nQSMdW','5121ygdCBN','solved','/delete','Add','CustomRangeType','comments','bufferTime','users','createTimestamp','requireSession','6545154syKtVB','defineProperty','_userService','UniverLicensePlugin','payload','Delete','16DleDzf','userId','@univerjs/core','length','Edit','add','comment','DependentOn','UNIVER_UNKNOWN','user','_injector','addUser','@univerjs/network','dataSource','IThreadCommentDataSourceService','Inject','41950uKoEXY','/solved','Unknown','body','parentId','ref','Solved','reply','UserManagerService','dayjs','12618mNUxaH','filter','UniverProThreadCommentDatasource','rangeId','@univerjs-pro/collaboration-client','find','updateComment','resolveComment','_threadCommentDataSourceService','_initUserSync','UniverProLicense','get','_threadCommentModel','listComments','replyId','HTTPService','ThreadCommentModel','toStringTag','Plugin','resolved','getMemberID','post','threadId','content','code','exports','getUnit'];_0x2451=function(){return _0x100484;};return _0x2451();}
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-beta.0",
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-beta.0",
49
+ "@univerjs/core": "0.7.0-beta.0",
50
+ "@univerjs/network": "0.7.0-beta.0",
51
+ "@univerjs-pro/license": "0.7.0-beta.0",
53
52
  "@univerjs/protocol": "0.1.46-alpha.3",
54
- "@univerjs/thread-comment-ui": "0.6.10"
53
+ "@univerjs/thread-comment": "0.7.0-beta.0",
54
+ "@univerjs/thread-comment-ui": "0.7.0-beta.0"
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",