@univerjs-pro/thread-comment-datasource 0.15.2-insiders.20260119-edc718c → 0.15.2
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 +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x4485d0=_0x4af3;function _0x4af3(_0x2131ce,_0x4077c7){_0x2131ce=_0x2131ce-0x117;const _0x5b48c2=_0x5b48();let _0x4af311=_0x5b48c2[_0x2131ce];return _0x4af311;}(function(_0x496217,_0x5a4f77){const _0x10fcae=_0x4af3,_0x2b210a=_0x496217();while(!![]){try{const _0x2f9152=parseInt(_0x10fcae(0x139))/0x1*(-parseInt(_0x10fcae(0x177))/0x2)+parseInt(_0x10fcae(0x11e))/0x3*(parseInt(_0x10fcae(0x164))/0x4)+-parseInt(_0x10fcae(0x171))/0x5*(parseInt(_0x10fcae(0x135))/0x6)+-parseInt(_0x10fcae(0x189))/0x7+-parseInt(_0x10fcae(0x140))/0x8+parseInt(_0x10fcae(0x187))/0x9*(parseInt(_0x10fcae(0x183))/0xa)+parseInt(_0x10fcae(0x16a))/0xb;if(_0x2f9152===_0x5a4f77)break;else _0x2b210a['push'](_0x2b210a['shift']());}catch(_0x4dd295){_0x2b210a['push'](_0x2b210a['shift']());}}}(_0x5b48,0xacd1f));Object[_0x4485d0(0x11f)](exports,Symbol[_0x4485d0(0x13c)],{'value':_0x4485d0(0x160)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x4485d0(0x14f);var I=(_0x74d356=>(_0x74d356[_0x74d356['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x74d356[_0x74d356['Solved']=0x1]=_0x4485d0(0x145),_0x74d356[_0x74d356[_0x4485d0(0x120)]=-0x1]=_0x4485d0(0x120),_0x74d356))(I||{}),v=(_0x4bf3e9=>(_0x4bf3e9[_0x4bf3e9[_0x4485d0(0x168)]=0x0]='Unknown',_0x4bf3e9[_0x4bf3e9[_0x4485d0(0x180)]=0x1]=_0x4485d0(0x180),_0x4bf3e9[_0x4bf3e9[_0x4485d0(0x165)]=0x2]='Reply',_0x4bf3e9[_0x4bf3e9[_0x4485d0(0x166)]=0x3]=_0x4485d0(0x166),_0x4bf3e9[_0x4bf3e9[_0x4485d0(0x138)]=0x4]='Delete',_0x4bf3e9[_0x4bf3e9[_0x4485d0(0x127)]=0x5]=_0x4485d0(0x127),_0x4bf3e9[_0x4bf3e9[_0x4485d0(0x120)]=-0x1]=_0x4485d0(0x120),_0x4bf3e9))(v||{});function _0x5b48(){const _0xe90e07=['UniverThreadCommentUIPlugin','commentUpdate$','onReady','Add','onStarting','addComment','344210ukPQRk','getUnit','_threadCommentModel','_configService','81dCbCiz','post','345450sNtNeW','UserManagerService','UniverThreadCommentDataSourcePlugin','resolved','find','requireSession','IConfigService','stringify','_commentService','/universer-api/comment/unit/','userId','CustomRangeType','UniverInstanceType','1362162YoMzth','defineProperty','UNRECOGNIZED','pluginName','users','Inject','pipe','/universer-api/user/list','UniverCollaborationClientPlugin','Solve','COMMENT','ThreadCommentModel','symbol','body','solved','deleteComment','format','map','addUser','/edit','/solved','resolveComment','_threadCommentDataSourceService','66aINZdD','replies','saveCommentToSnapshot','Delete','1YsLOFV','payload','listComments','toStringTag','CollaborationSessionService','root','_config','5458744hkECLn','user','comment','_injector','comments','Solved','createTimestamp','length','replyId','/add','UniverLicensePlugin','/reply','slice','HTTPService','add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_userService','CommentService','customRanges','_initDataSource','threadId','IThreadCommentDataSourceService','getMemberID','rangeId','_threadCommentDataSource','Plugin','forEach','Injector','getOwnPropertyDescriptor','type','get','subscribe','Module','reply','error','rangeType','4FdJHjS','Reply','Edit','dayjs','Unknown','content','12047772owvyfQ','personId','userID','_initUserSync','values','filter','disposeWithMe','127795Rqufpj','bufferTime','_init','_sessionService','parse','getComment','276764PePFWi','YYYY/MM/DD\x20HH:mm','code','_httpService','getCurrentUser','parentId'];_0x5b48=function(){return _0xe90e07;};return _0x5b48();}const f=_0x285897=>c[_0x4485d0(0x167)](new Date(+_0x285897))[_0x4485d0(0x12e)](_0x4485d0(0x178)),R=async(_0x455202,_0xc32e69)=>{const _0x26fb46=_0x4485d0,_0xb8a3e1=_0x455202[_0x26fb46(0x15e)](c[_0x26fb46(0x18a)]),_0x25fbd1=_0x455202[_0x26fb46(0x15e)](P['HTTPService']);_0xc32e69[_0x26fb46(0x15a)](_0x1362d8=>{_0xb8a3e1['getUser'](_0x1362d8)&&_0xc32e69['delete'](_0x1362d8);}),_0xc32e69['size']&&(await _0x25fbd1[_0x26fb46(0x15e)](_0x26fb46(0x125),{'params':{'userIDs':[..._0xc32e69]}}))['body'][_0x26fb46(0x122)][_0x26fb46(0x15a)](_0x1ad742=>{_0x1ad742&&_0xb8a3e1['addUser'](_0x1ad742);});};var $=Object[_0x4485d0(0x15c)],E=(_0x56bd90,_0x1aec70,_0x48937c,_0x1d63b2)=>{const _0x22d3ee=_0x4485d0;for(var _0x4f4243=_0x1d63b2>0x1?void 0x0:_0x1d63b2?$(_0x1aec70,_0x48937c):_0x1aec70,_0x580166=_0x56bd90[_0x22d3ee(0x147)]-0x1,_0x41bcc5;_0x580166>=0x0;_0x580166--)(_0x41bcc5=_0x56bd90[_0x580166])&&(_0x4f4243=_0x41bcc5(_0x4f4243)||_0x4f4243);return _0x4f4243;},S=(_0x1f1d55,_0x47715b)=>(_0x1a9e7a,_0x4531bf)=>_0x47715b(_0x1a9e7a,_0x4531bf,_0x1f1d55);let _=class extends c['Disposable']{constructor(_0x253a8e,_0x5f83ae,_0x4813ac,_0x263eef){const _0x4060a4=_0x4485d0;super(),this[_0x4060a4(0x119)]=_0x253a8e,this[_0x4060a4(0x185)]=_0x5f83ae,this[_0x4060a4(0x150)]=_0x4813ac,this[_0x4060a4(0x143)]=_0x263eef,this['_init'](),this[_0x4060a4(0x16d)]();}['_initUserSync'](){const _0x390a22=_0x4485d0;this[_0x390a22(0x170)](this[_0x390a22(0x185)][_0x390a22(0x17e)][_0x390a22(0x124)](j[_0x390a22(0x172)](0x10))[_0x390a22(0x15f)](_0x684686=>{const _0x5eed94=_0x390a22,_0x5c1464=new Set();_0x684686[_0x5eed94(0x15a)](_0x80e962=>{const _0x95113a=_0x5eed94;if(_0x80e962[_0x95113a(0x15d)]===_0x95113a(0x14e)){const _0x3fa10f=_0x80e962[_0x95113a(0x13a)][_0x95113a(0x16b)];_0x5c1464[_0x95113a(0x14e)](_0x3fa10f);}}),R(this[_0x5eed94(0x143)],_0x5c1464);}));}[_0x4485d0(0x173)](){const _0x32f2b7=_0x4485d0;this[_0x32f2b7(0x170)](this['_commentService'][_0x32f2b7(0x17e)]['subscribe'](async _0x3b5bb2=>{const _0x450d6b=_0x32f2b7;var _0x2a27d0,_0x4a7102,_0x4e09d5,_0xebbe91;const _0x403e16=(_0x2a27d0=this[_0x450d6b(0x185)][_0x450d6b(0x184)](_0x3b5bb2['unitId'])[_0x450d6b(0x18d)](_0x42ae57=>_0x42ae57['threadId']===_0x3b5bb2[_0x450d6b(0x154)]))==null?void 0x0:_0x2a27d0[_0x450d6b(0x13e)];if(!_0x403e16)return;const {unitId:_0x24959e,subUnitId:_0x32cc45}=_0x403e16;switch(_0x3b5bb2[_0x450d6b(0x141)]&&this['_userService'][_0x450d6b(0x130)](_0x3b5bb2[_0x450d6b(0x141)]),_0x3b5bb2[_0x450d6b(0x15d)]){case v[_0x450d6b(0x180)]:break;case v['Reply']:{this[_0x450d6b(0x185)][_0x450d6b(0x182)](_0x24959e,_0x32cc45,{'unitId':_0x24959e,'subUnitId':_0x32cc45,'ref':'','id':_0x3b5bb2[_0x450d6b(0x148)],'dT':f(+_0x3b5bb2[_0x450d6b(0x146)]),'threadId':_0x3b5bb2[_0x450d6b(0x154)],'personId':(_0x4e09d5=(_0x4a7102=_0x3b5bb2[_0x450d6b(0x141)])==null?void 0x0:_0x4a7102['userID'])!=null?_0x4e09d5:_0x3b5bb2[_0x450d6b(0x11b)],'text':JSON[_0x450d6b(0x175)](_0x3b5bb2[_0x450d6b(0x169)]),'parentId':_0x403e16['id']});break;}case v[_0x450d6b(0x138)]:{const _0x7a2373=this[_0x450d6b(0x185)][_0x450d6b(0x176)](_0x24959e,_0x32cc45,_0x3b5bb2['replyId']);_0x7a2373&&_0x7a2373[_0x450d6b(0x17c)]&&this[_0x450d6b(0x185)][_0x450d6b(0x12d)](_0x24959e,_0x32cc45,_0x3b5bb2[_0x450d6b(0x148)]);break;}case v[_0x450d6b(0x166)]:{this[_0x450d6b(0x185)]['updateComment'](_0x24959e,_0x32cc45,{'commentId':_0x3b5bb2[_0x450d6b(0x148)],'text':JSON[_0x450d6b(0x175)](_0x3b5bb2[_0x450d6b(0x169)])});break;}case v['Solve']:{const _0x241a2b=(_0xebbe91=this[_0x450d6b(0x185)][_0x450d6b(0x184)](_0x3b5bb2['unitId'])[_0x450d6b(0x18d)](_0x1f5eb2=>_0x1f5eb2['threadId']===_0x3b5bb2[_0x450d6b(0x154)]))==null?void 0x0:_0xebbe91[_0x450d6b(0x13e)];_0x241a2b&&this['_threadCommentModel'][_0x450d6b(0x133)](_0x24959e,_0x32cc45,_0x241a2b['id'],_0x3b5bb2['solved']===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x4485d0(0x123)](b[_0x4485d0(0x151)])),S(0x1,c[_0x4485d0(0x123)](M[_0x4485d0(0x129)])),S(0x2,c[_0x4485d0(0x123)](c[_0x4485d0(0x18a)])),S(0x3,c[_0x4485d0(0x123)](c[_0x4485d0(0x15b)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x4485d0(0x15c)],x=(_0x3f83ed,_0x89d256,_0x2c7370,_0x96cfed)=>{const _0x5e2b09=_0x4485d0;for(var _0x5eb9eb=_0x96cfed>0x1?void 0x0:_0x96cfed?A(_0x89d256,_0x2c7370):_0x89d256,_0x5ef3cc=_0x3f83ed[_0x5e2b09(0x147)]-0x1,_0x370b60;_0x5ef3cc>=0x0;_0x5ef3cc--)(_0x370b60=_0x3f83ed[_0x5ef3cc])&&(_0x5eb9eb=_0x370b60(_0x5eb9eb)||_0x5eb9eb);return _0x5eb9eb;},C=(_0x103dd1,_0x10df01)=>(_0x227640,_0x186514)=>_0x10df01(_0x227640,_0x186514,_0x103dd1);function Y(_0x3bf569,_0xc28e10){const _0x20db1a=_0x4485d0,_0x25a38f=_0x3bf569[_0x20db1a(0x136)][0x0];return{..._0xc28e10,'id':_0x25a38f[_0x20db1a(0x148)],'resolved':_0x3bf569[_0x20db1a(0x12c)]===0x1,'dT':f(_0x25a38f[_0x20db1a(0x146)]),'personId':_0x25a38f[_0x20db1a(0x11b)],'threadId':_0x25a38f[_0x20db1a(0x154)]};}function G(_0x405378,_0x3dc330,_0x1ac440){const _0x31163a=_0x4485d0;var _0xa066e7,_0x46d2e5;if(((_0x46d2e5=(_0xa066e7=_0x405378==null?void 0x0:_0x405378['replies'])==null?void 0x0:_0xa066e7[_0x31163a(0x147)])!=null?_0x46d2e5:0x0)>0x0){const _0x356c56=(_0x1e49f0,_0x20d8d1)=>({'id':_0x1e49f0[_0x31163a(0x148)],'threadId':_0x1e49f0[_0x31163a(0x154)],'dT':f(_0x1e49f0[_0x31163a(0x146)]),'personId':_0x1e49f0['userId'],'resolved':_0x405378[_0x31163a(0x12c)]===I[_0x31163a(0x145)],'unitId':_0x3dc330,'subUnitId':_0x1ac440,'text':JSON[_0x31163a(0x175)](_0x1e49f0[_0x31163a(0x169)]),'parentId':_0x20d8d1}),_0x32b92d=_0x356c56(_0x405378['replies'][0x0]);return{..._0x32b92d,'children':_0x405378[_0x31163a(0x136)][_0x31163a(0x14c)](0x1)[_0x31163a(0x12f)](_0x470e50=>_0x356c56(_0x470e50,_0x32b92d['id']))};}return null;}let p=class{constructor(_0x3119c7,_0x2f3c74,_0x2d7c36){const _0x3a40b6=_0x4485d0;this[_0x3a40b6(0x17a)]=_0x3119c7,this['_userService']=_0x2f3c74,this[_0x3a40b6(0x174)]=_0x2d7c36;}async['addComment'](_0x19030c){const _0x2e074c=_0x4485d0;var _0x3dd260,_0x157e14;const {parentId:_0x42c4c5,unitId:_0x417165,text:_0x330a9b,threadId:_0x9306a7}=_0x19030c,_0x462c83=(_0x157e14=(_0x3dd260=_0x330a9b['customRanges'])==null?void 0x0:_0x3dd260['filter'](_0x332c39=>_0x332c39['rangeType']===c[_0x2e074c(0x11c)][_0x2e074c(0x128)])[_0x2e074c(0x12f)](_0x113a8d=>_0x113a8d[_0x2e074c(0x157)]))!=null?_0x157e14:[],_0xeac8b5=JSON[_0x2e074c(0x118)](_0x330a9b),_0x99bcbe=(await this[_0x2e074c(0x174)]['requireSession'](_0x417165))['getMemberID']();if(_0x42c4c5){const _0x280276={'memberId':_0x99bcbe,'unitId':_0x417165,'content':_0xeac8b5,'mention':_0x462c83,'threadId':_0x9306a7},_0x7ff0ef=(await this[_0x2e074c(0x17a)][_0x2e074c(0x188)](_0x2e074c(0x11a)+_0x417165+_0x2e074c(0x14b),{'body':_0x280276}))[_0x2e074c(0x12b)][_0x2e074c(0x161)];return{..._0x19030c,'id':_0x7ff0ef[_0x2e074c(0x148)],'dT':c['dayjs'](+_0x7ff0ef[_0x2e074c(0x146)])[_0x2e074c(0x12e)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x7ff0ef[_0x2e074c(0x11b)]};}else{const _0xe0ab31={'memberId':_0x99bcbe,'unitId':_0x417165,'content':_0xeac8b5,'mention':_0x462c83},_0x34e720=await this[_0x2e074c(0x17a)][_0x2e074c(0x188)]('/universer-api/comment/unit/'+_0x417165+_0x2e074c(0x149),{'body':_0xe0ab31});return Y(_0x34e720[_0x2e074c(0x12b)][_0x2e074c(0x142)],_0x19030c);}}async['updateComment'](_0x58d7d5){const _0x52c1a7=_0x4485d0;var _0x258127,_0x1dcecf;const {text:_0x4d198d,unitId:_0x1847ed}=_0x58d7d5,_0x579b6c=(_0x1dcecf=(_0x258127=_0x4d198d[_0x52c1a7(0x152)])==null?void 0x0:_0x258127[_0x52c1a7(0x16f)](_0x4f7132=>_0x4f7132[_0x52c1a7(0x163)]===c[_0x52c1a7(0x11c)][_0x52c1a7(0x128)])[_0x52c1a7(0x12f)](_0x974ce0=>_0x974ce0[_0x52c1a7(0x157)]))!=null?_0x1dcecf:[],_0x342f64=JSON[_0x52c1a7(0x118)](_0x4d198d),_0x1a472e=_0x58d7d5[_0x52c1a7(0x154)],_0x4f2624=_0x58d7d5['id'],_0x4cdfba={'memberId':(await this[_0x52c1a7(0x174)][_0x52c1a7(0x18e)](_0x1847ed))[_0x52c1a7(0x156)](),'unitId':_0x1847ed,'threadId':_0x1a472e,'mention':_0x579b6c,'content':_0x342f64,'replyId':_0x4f2624},_0x3197cd=await this[_0x52c1a7(0x17a)]['post'](_0x52c1a7(0x11a)+_0x1847ed+_0x52c1a7(0x131),{'body':_0x4cdfba});return!_0x3197cd[_0x52c1a7(0x12b)][_0x52c1a7(0x162)]||_0x3197cd[_0x52c1a7(0x12b)][_0x52c1a7(0x162)][_0x52c1a7(0x179)]===0x1;}async['resolveComment'](_0x5eb72f){const _0x5a0562=_0x4485d0,{unitId:_0x4288e9}=_0x5eb72f,_0x11c57f=_0x5eb72f[_0x5a0562(0x154)],_0x4af4e4={'memberId':this[_0x5a0562(0x150)][_0x5a0562(0x17b)]()[_0x5a0562(0x16c)],'unitId':_0x4288e9,'threadId':_0x11c57f,'solved':_0x5eb72f[_0x5a0562(0x18c)]?I[_0x5a0562(0x145)]:I['OpenOrReOpen']},_0x48b55e=await this[_0x5a0562(0x17a)][_0x5a0562(0x188)](_0x5a0562(0x11a)+_0x4288e9+_0x5a0562(0x132),{'body':_0x4af4e4});return!_0x48b55e[_0x5a0562(0x12b)][_0x5a0562(0x162)]||_0x48b55e[_0x5a0562(0x12b)][_0x5a0562(0x162)][_0x5a0562(0x179)]===0x1;}async[_0x4485d0(0x12d)](_0x608403,_0x7bc88c,_0x3f5ea1,_0x540086){const _0x5f581d=_0x4485d0,_0x3a8583={'memberId':(await this[_0x5f581d(0x174)][_0x5f581d(0x18e)](_0x608403))[_0x5f581d(0x156)](),'threadId':_0x3f5ea1,'replyId':_0x540086,'unitId':_0x608403},_0x511e5f=await this[_0x5f581d(0x17a)][_0x5f581d(0x188)]('/universer-api/comment/unit/'+_0x608403+'/delete',{'body':_0x3a8583});return!_0x511e5f['body'][_0x5f581d(0x162)]||_0x511e5f[_0x5f581d(0x12b)][_0x5f581d(0x162)][_0x5f581d(0x179)]===0x1;}async[_0x4485d0(0x13b)](_0x28fb89,_0x52aca7,_0x356263){const _0x19a231=_0x4485d0,_0x7f055c={'unitId':_0x28fb89,'threadId':_0x356263},_0x2fca40=await this[_0x19a231(0x17a)][_0x19a231(0x188)]('/universer-api/comment/unit/'+_0x28fb89+'/list',{'body':_0x7f055c}),_0x5c942b=_0x356263['map'](_0x1e0c4d=>G(_0x2fca40[_0x19a231(0x12b)][_0x19a231(0x144)][_0x1e0c4d],_0x28fb89,_0x52aca7))[_0x19a231(0x16f)](Boolean);return Object[_0x19a231(0x16e)](_0x2fca40[_0x19a231(0x12b)][_0x19a231(0x122)])[_0x19a231(0x15a)](_0x542868=>{const _0x45b658=_0x19a231;this['_userService'][_0x45b658(0x130)](_0x542868);}),_0x5c942b;}[_0x4485d0(0x137)](_0x1b7fc3){return{'id':_0x1b7fc3['id'],'threadId':_0x1b7fc3['threadId'],'ref':_0x1b7fc3['ref']};}};p=x([C(0x0,c['Inject'](P[_0x4485d0(0x14d)])),C(0x1,c['Inject'](c[_0x4485d0(0x18a)])),C(0x2,c[_0x4485d0(0x123)](b[_0x4485d0(0x13d)]))],p);var H=Object[_0x4485d0(0x15c)],J=(_0x21ffda,_0x3e7c90,_0x3b99ad,_0xcded46)=>{for(var _0x5de86d=_0xcded46>0x1?void 0x0:_0xcded46?H(_0x3e7c90,_0x3b99ad):_0x3e7c90,_0x571e3f=_0x21ffda['length']-0x1,_0x2eba8a;_0x571e3f>=0x0;_0x571e3f--)(_0x2eba8a=_0x21ffda[_0x571e3f])&&(_0x5de86d=_0x2eba8a(_0x5de86d)||_0x5de86d);return _0x5de86d;},y=(_0x3aaab7,_0x2fdb74)=>(_0x129747,_0x789f8d)=>_0x2fdb74(_0x129747,_0x789f8d,_0x3aaab7);let g=class extends c['Disposable']{constructor(_0x25c56b,_0x2fbc4d){const _0x224ed8=_0x4485d0;super(),this['_threadCommentDataSourceService']=_0x25c56b,this['_threadCommentDataSource']=_0x2fbc4d,this[_0x224ed8(0x153)]();}['_initDataSource'](){const _0xed1f4c=_0x4485d0;this[_0xed1f4c(0x134)]['dataSource']=this[_0xed1f4c(0x158)],this[_0xed1f4c(0x134)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x4485d0(0x155)]),y(0x1,c['Inject'](p))],g);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x2ea3cc,_0x5ef46d,_0x2b169c)=>_0x5ef46d in _0x2ea3cc?F(_0x2ea3cc,_0x5ef46d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2b169c}):_0x2ea3cc[_0x5ef46d]=_0x2b169c,W=(_0x5854c2,_0x1392be,_0x1b9687,_0x1ddbfc)=>{for(var _0x5133af=_0x1ddbfc>0x1?void 0x0:_0x1ddbfc?L(_0x1392be,_0x1b9687):_0x1392be,_0x1e77ba=_0x5854c2['length']-0x1,_0x32f5e5;_0x1e77ba>=0x0;_0x1e77ba--)(_0x32f5e5=_0x5854c2[_0x1e77ba])&&(_0x5133af=_0x32f5e5(_0x5133af)||_0x5133af);return _0x5133af;},O=(_0x4587ec,_0x4b6fbe)=>(_0x514f5a,_0x463206)=>_0x4b6fbe(_0x514f5a,_0x463206,_0x4587ec),N=(_0x5e7846,_0x465ab6,_0xf299ba)=>Z(_0x5e7846,typeof _0x465ab6!=_0x4485d0(0x12a)?_0x465ab6+'':_0x465ab6,_0xf299ba);exports[_0x4485d0(0x18b)]=class extends c[_0x4485d0(0x159)]{constructor(_0x18b9e3=D,_0x3934f7,_0xc2f1a6){const _0xb270cb=_0x4485d0;super(),this[_0xb270cb(0x13f)]=_0x18b9e3,this[_0xb270cb(0x143)]=_0x3934f7,this['_configService']=_0xc2f1a6;const {..._0x4d1d56}=c['merge']({},D,this['_config']);this[_0xb270cb(0x186)]['setConfig'](q,_0x4d1d56);}[_0x4485d0(0x181)](){const _0x39c08b=_0x4485d0;[[p],[g],[_]][_0x39c08b(0x15a)](_0x1a4202=>{const _0x45c622=_0x39c08b;this['_injector'][_0x45c622(0x14e)](_0x1a4202);});}[_0x4485d0(0x17f)](){const _0x48d98e=_0x4485d0;this['_injector']['get'](g),this[_0x48d98e(0x143)]['get'](_);}},N(exports[_0x4485d0(0x18b)],_0x4485d0(0x121),U),N(exports[_0x4485d0(0x18b)],_0x4485d0(0x15d),c[_0x4485d0(0x11d)]['UNIVER_UNKNOWN']),exports[_0x4485d0(0x18b)]=W([c['DependentOn'](w[_0x4485d0(0x17d)],b[_0x4485d0(0x126)],T[_0x4485d0(0x14a)]),O(0x1,c[_0x4485d0(0x123)](c[_0x4485d0(0x15b)])),O(0x2,c[_0x4485d0(0x117)])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';const _0x8cd178=_0x4922;(function(_0x4d6641,_0x3ef7ff){const _0x16d886=_0x4922,_0x3d50fb=_0x4d6641();while(!![]){try{const _0x595e37=parseInt(_0x16d886(0x1ea))/0x1+parseInt(_0x16d886(0x1b6))/0x2+parseInt(_0x16d886(0x18b))/0x3*(-parseInt(_0x16d886(0x1c1))/0x4)+-parseInt(_0x16d886(0x17a))/0x5*(-parseInt(_0x16d886(0x193))/0x6)+-parseInt(_0x16d886(0x1cd))/0x7*(-parseInt(_0x16d886(0x1c0))/0x8)+-parseInt(_0x16d886(0x1d4))/0x9*(parseInt(_0x16d886(0x1b0))/0xa)+-parseInt(_0x16d886(0x1d3))/0xb;if(_0x595e37===_0x3ef7ff)break;else _0x3d50fb['push'](_0x3d50fb['shift']());}catch(_0x260069){_0x3d50fb['push'](_0x3d50fb['shift']());}}}(_0x30df,0x5508b));function _0x30df(){const _0x3b4576=['code','resolveComment','length','CollaborationSessionService','rangeId','updateComment','body','disposeWithMe','/universer-api/comment/unit/','73510kaCSdO','/add','Plugin','users','_configService','UniverCollaborationClientPlugin','690114CbbrDF','add','onReady','_threadCommentDataSource','getComment','deleteComment','delete','_initUserSync','addComment','map','3509768QMEYBp','192OYVAkf','symbol','ThreadCommentModel','getUnit','customRanges','UNRECOGNIZED','parse','Module','commentUpdate$','merge','content','CustomRangeType','7akpaQu','userId','format','toStringTag','solved','UniverThreadCommentDataSourcePlugin','4833994uXWJHu','144QkeTHF','threadId','Reply','_sessionService','thread-comment-data-source.config','dayjs','find','UniverInstanceType','requireSession','forEach','CommentService','Edit','Solved','YYYY/MM/DD\x20HH:mm','_injector','Injector','getCurrentUser','dataSource','Disposable','COMMENT','setConfig','rangeType','239004ePqmLu','replyId','onStarting','comment','_config','_threadCommentModel','UserManagerService','filter','Delete','saveCommentToSnapshot','type','Inject','root','1209815cieXYu','/list','userID','pluginName','subscribe','UniverLicensePlugin','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_userService','Add','_commentService','replies','user','createTimestamp','_httpService','personId','/edit','_initDataSource','22461bawxPo','payload','HTTPService','comments','_threadCommentDataSourceService','values','error','UniverThreadCommentUIPlugin','6AMTSXq','Unknown','getUser','Solve','/solved','stringify','_init','ref','OpenOrReOpen','/universer-api/user/list','UNIVER_UNKNOWN','bufferTime','getMemberID','get','listComments','defineProperty','addUser','getOwnPropertyDescriptor','post','size'];_0x30df=function(){return _0x3b4576;};return _0x30df();}Object[_0x8cd178(0x1a2)](exports,Symbol[_0x8cd178(0x1d0)],{'value':_0x8cd178(0x1c8)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x8cd178(0x180);var I=(_0xe10d25=>(_0xe10d25[_0xe10d25[_0x8cd178(0x19b)]=0x0]=_0x8cd178(0x19b),_0xe10d25[_0xe10d25[_0x8cd178(0x1e0)]=0x1]='Solved',_0xe10d25[_0xe10d25['UNRECOGNIZED']=-0x1]=_0x8cd178(0x1c6),_0xe10d25))(I||{}),v=(_0x4b9c88=>(_0x4b9c88[_0x4b9c88[_0x8cd178(0x194)]=0x0]=_0x8cd178(0x194),_0x4b9c88[_0x4b9c88[_0x8cd178(0x182)]=0x1]='Add',_0x4b9c88[_0x4b9c88['Reply']=0x2]=_0x8cd178(0x1d6),_0x4b9c88[_0x4b9c88[_0x8cd178(0x1df)]=0x3]=_0x8cd178(0x1df),_0x4b9c88[_0x4b9c88[_0x8cd178(0x1f2)]=0x4]=_0x8cd178(0x1f2),_0x4b9c88[_0x4b9c88[_0x8cd178(0x196)]=0x5]=_0x8cd178(0x196),_0x4b9c88[_0x4b9c88[_0x8cd178(0x1c6)]=-0x1]=_0x8cd178(0x1c6),_0x4b9c88))(v||{});const f=_0x302a46=>c[_0x8cd178(0x1d9)](new Date(+_0x302a46))[_0x8cd178(0x1cf)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x15ceb5,_0x175be0)=>{const _0x1b864a=_0x8cd178,_0x2bccd8=_0x15ceb5[_0x1b864a(0x1a0)](c[_0x1b864a(0x1f0)]),_0x9f8997=_0x15ceb5[_0x1b864a(0x1a0)](P[_0x1b864a(0x18d)]);_0x175be0['forEach'](_0x16da71=>{const _0x3cdfe5=_0x1b864a;_0x2bccd8[_0x3cdfe5(0x195)](_0x16da71)&&_0x175be0[_0x3cdfe5(0x1bc)](_0x16da71);}),_0x175be0[_0x1b864a(0x1a6)]&&(await _0x9f8997['get'](_0x1b864a(0x19c),{'params':{'userIDs':[..._0x175be0]}}))[_0x1b864a(0x1ad)][_0x1b864a(0x1b3)][_0x1b864a(0x1dd)](_0x4f1522=>{const _0x356c66=_0x1b864a;_0x4f1522&&_0x2bccd8[_0x356c66(0x1a3)](_0x4f1522);});};var $=Object[_0x8cd178(0x1a4)],E=(_0xb692c0,_0x49202e,_0x3aae3d,_0x261bbf)=>{const _0x14778f=_0x8cd178;for(var _0x1ac03c=_0x261bbf>0x1?void 0x0:_0x261bbf?$(_0x49202e,_0x3aae3d):_0x49202e,_0x449b29=_0xb692c0[_0x14778f(0x1a9)]-0x1,_0x18686f;_0x449b29>=0x0;_0x449b29--)(_0x18686f=_0xb692c0[_0x449b29])&&(_0x1ac03c=_0x18686f(_0x1ac03c)||_0x1ac03c);return _0x1ac03c;},S=(_0x884b1a,_0x47cad6)=>(_0x3ad7f1,_0x247d74)=>_0x47cad6(_0x3ad7f1,_0x247d74,_0x884b1a);let _=class extends c[_0x8cd178(0x1e6)]{constructor(_0x4dac6e,_0x33612b,_0x5073a8,_0xac51fe){const _0x5b94aa=_0x8cd178;super(),this[_0x5b94aa(0x183)]=_0x4dac6e,this[_0x5b94aa(0x1ef)]=_0x33612b,this['_userService']=_0x5073a8,this[_0x5b94aa(0x1e2)]=_0xac51fe,this[_0x5b94aa(0x199)](),this[_0x5b94aa(0x1bd)]();}[_0x8cd178(0x1bd)](){const _0x16c29e=_0x8cd178;this[_0x16c29e(0x1ae)](this['_threadCommentModel'][_0x16c29e(0x1c9)]['pipe'](j[_0x16c29e(0x19e)](0x10))['subscribe'](_0x2c2873=>{const _0x1d34ed=_0x16c29e,_0x18acbe=new Set();_0x2c2873[_0x1d34ed(0x1dd)](_0x51b410=>{const _0xbb17a1=_0x1d34ed;if(_0x51b410[_0xbb17a1(0x177)]===_0xbb17a1(0x1b7)){const _0x14729f=_0x51b410[_0xbb17a1(0x18c)][_0xbb17a1(0x188)];_0x18acbe[_0xbb17a1(0x1b7)](_0x14729f);}}),R(this['_injector'],_0x18acbe);}));}['_init'](){const _0x24320b=_0x8cd178;this[_0x24320b(0x1ae)](this[_0x24320b(0x183)][_0x24320b(0x1c9)][_0x24320b(0x17e)](async _0x27b196=>{const _0x5909dc=_0x24320b;var _0x63cd58,_0x41ec0f,_0x2e7dbc,_0x52358a;const _0xe40662=(_0x63cd58=this[_0x5909dc(0x1ef)][_0x5909dc(0x1c4)](_0x27b196['unitId'])[_0x5909dc(0x1da)](_0xc86749=>_0xc86749[_0x5909dc(0x1d5)]===_0x27b196[_0x5909dc(0x1d5)]))==null?void 0x0:_0x63cd58[_0x5909dc(0x179)];if(!_0xe40662)return;const {unitId:_0x72b606,subUnitId:_0x5b141d}=_0xe40662;switch(_0x27b196[_0x5909dc(0x185)]&&this[_0x5909dc(0x181)][_0x5909dc(0x1a3)](_0x27b196[_0x5909dc(0x185)]),_0x27b196[_0x5909dc(0x177)]){case v[_0x5909dc(0x182)]:break;case v['Reply']:{this[_0x5909dc(0x1ef)][_0x5909dc(0x1be)](_0x72b606,_0x5b141d,{'unitId':_0x72b606,'subUnitId':_0x5b141d,'ref':'','id':_0x27b196[_0x5909dc(0x1eb)],'dT':f(+_0x27b196[_0x5909dc(0x186)]),'threadId':_0x27b196[_0x5909dc(0x1d5)],'personId':(_0x2e7dbc=(_0x41ec0f=_0x27b196['user'])==null?void 0x0:_0x41ec0f['userID'])!=null?_0x2e7dbc:_0x27b196[_0x5909dc(0x1ce)],'text':JSON['parse'](_0x27b196[_0x5909dc(0x1cb)]),'parentId':_0xe40662['id']});break;}case v[_0x5909dc(0x1f2)]:{const _0xf606be=this[_0x5909dc(0x1ef)][_0x5909dc(0x1ba)](_0x72b606,_0x5b141d,_0x27b196['replyId']);_0xf606be&&_0xf606be['parentId']&&this['_threadCommentModel'][_0x5909dc(0x1bb)](_0x72b606,_0x5b141d,_0x27b196[_0x5909dc(0x1eb)]);break;}case v[_0x5909dc(0x1df)]:{this[_0x5909dc(0x1ef)][_0x5909dc(0x1ac)](_0x72b606,_0x5b141d,{'commentId':_0x27b196[_0x5909dc(0x1eb)],'text':JSON[_0x5909dc(0x1c7)](_0x27b196[_0x5909dc(0x1cb)])});break;}case v[_0x5909dc(0x196)]:{const _0x54ad45=(_0x52358a=this[_0x5909dc(0x1ef)][_0x5909dc(0x1c4)](_0x27b196['unitId'])['find'](_0x3de66c=>_0x3de66c[_0x5909dc(0x1d5)]===_0x27b196['threadId']))==null?void 0x0:_0x52358a[_0x5909dc(0x179)];_0x54ad45&&this[_0x5909dc(0x1ef)][_0x5909dc(0x1a8)](_0x72b606,_0x5b141d,_0x54ad45['id'],_0x27b196[_0x5909dc(0x1d1)]===I[_0x5909dc(0x1e0)]);break;}}}));}};function _0x4922(_0x2c181f,_0x2be650){_0x2c181f=_0x2c181f-0x176;const _0x30df98=_0x30df();let _0x4922fc=_0x30df98[_0x2c181f];return _0x4922fc;}_=E([S(0x0,c['Inject'](b[_0x8cd178(0x1de)])),S(0x1,c[_0x8cd178(0x178)](M[_0x8cd178(0x1c3)])),S(0x2,c['Inject'](c[_0x8cd178(0x1f0)])),S(0x3,c[_0x8cd178(0x178)](c['Injector']))],_);const q=_0x8cd178(0x1d8),D={};var A=Object[_0x8cd178(0x1a4)],x=(_0x437ff0,_0x3ab07c,_0x665455,_0x23946e)=>{for(var _0x5c6272=_0x23946e>0x1?void 0x0:_0x23946e?A(_0x3ab07c,_0x665455):_0x3ab07c,_0x7ccf46=_0x437ff0['length']-0x1,_0x155620;_0x7ccf46>=0x0;_0x7ccf46--)(_0x155620=_0x437ff0[_0x7ccf46])&&(_0x5c6272=_0x155620(_0x5c6272)||_0x5c6272);return _0x5c6272;},C=(_0x48b2de,_0x22e297)=>(_0x2b8002,_0x2bf1c3)=>_0x22e297(_0x2b8002,_0x2bf1c3,_0x48b2de);function Y(_0x4f38c7,_0x27c484){const _0x105a85=_0x8cd178,_0x18580d=_0x4f38c7[_0x105a85(0x184)][0x0];return{..._0x27c484,'id':_0x18580d[_0x105a85(0x1eb)],'resolved':_0x4f38c7[_0x105a85(0x1d1)]===0x1,'dT':f(_0x18580d[_0x105a85(0x186)]),'personId':_0x18580d['userId'],'threadId':_0x18580d['threadId']};}function G(_0x2796b1,_0xe01ac7,_0x168137){const _0x602fe4=_0x8cd178;var _0x518cf8,_0x30bc1f;if(((_0x30bc1f=(_0x518cf8=_0x2796b1==null?void 0x0:_0x2796b1[_0x602fe4(0x184)])==null?void 0x0:_0x518cf8['length'])!=null?_0x30bc1f:0x0)>0x0){const _0x2242b1=(_0x4d3c25,_0x2fd831)=>({'id':_0x4d3c25['replyId'],'threadId':_0x4d3c25[_0x602fe4(0x1d5)],'dT':f(_0x4d3c25[_0x602fe4(0x186)]),'personId':_0x4d3c25[_0x602fe4(0x1ce)],'resolved':_0x2796b1[_0x602fe4(0x1d1)]===I['Solved'],'unitId':_0xe01ac7,'subUnitId':_0x168137,'text':JSON['parse'](_0x4d3c25[_0x602fe4(0x1cb)]),'parentId':_0x2fd831}),_0xb1b3ec=_0x2242b1(_0x2796b1[_0x602fe4(0x184)][0x0]);return{..._0xb1b3ec,'children':_0x2796b1[_0x602fe4(0x184)]['slice'](0x1)[_0x602fe4(0x1bf)](_0x28a723=>_0x2242b1(_0x28a723,_0xb1b3ec['id']))};}return null;}let p=class{constructor(_0x4bf3c8,_0x203b63,_0x21c986){const _0x53256e=_0x8cd178;this['_httpService']=_0x4bf3c8,this[_0x53256e(0x181)]=_0x203b63,this['_sessionService']=_0x21c986;}async[_0x8cd178(0x1be)](_0x592102){const _0x3358ee=_0x8cd178;var _0x2ce32a,_0x396dd8;const {parentId:_0x3c0d2c,unitId:_0x21686e,text:_0x5a1c1e,threadId:_0x514fc7}=_0x592102,_0x4a5192=(_0x396dd8=(_0x2ce32a=_0x5a1c1e[_0x3358ee(0x1c5)])==null?void 0x0:_0x2ce32a[_0x3358ee(0x1f1)](_0x48e146=>_0x48e146[_0x3358ee(0x1e9)]===c['CustomRangeType'][_0x3358ee(0x1e7)])[_0x3358ee(0x1bf)](_0x4851c9=>_0x4851c9[_0x3358ee(0x1ab)]))!=null?_0x396dd8:[],_0x22fd92=JSON[_0x3358ee(0x198)](_0x5a1c1e),_0x56d145=(await this[_0x3358ee(0x1d7)]['requireSession'](_0x21686e))['getMemberID']();if(_0x3c0d2c){const _0x4cf076={'memberId':_0x56d145,'unitId':_0x21686e,'content':_0x22fd92,'mention':_0x4a5192,'threadId':_0x514fc7},_0x4ed914=(await this[_0x3358ee(0x187)]['post'](_0x3358ee(0x1af)+_0x21686e+'/reply',{'body':_0x4cf076}))[_0x3358ee(0x1ad)]['reply'];return{..._0x592102,'id':_0x4ed914[_0x3358ee(0x1eb)],'dT':c['dayjs'](+_0x4ed914['createTimestamp'])[_0x3358ee(0x1cf)](_0x3358ee(0x1e1)),'personId':_0x4ed914[_0x3358ee(0x1ce)]};}else{const _0xcdd1e0={'memberId':_0x56d145,'unitId':_0x21686e,'content':_0x22fd92,'mention':_0x4a5192},_0x3e8f1a=await this['_httpService'][_0x3358ee(0x1a5)]('/universer-api/comment/unit/'+_0x21686e+_0x3358ee(0x1b1),{'body':_0xcdd1e0});return Y(_0x3e8f1a[_0x3358ee(0x1ad)][_0x3358ee(0x1ed)],_0x592102);}}async[_0x8cd178(0x1ac)](_0x2b76ee){const _0x365c91=_0x8cd178;var _0x3ff1bf,_0x21e609;const {text:_0x465ddf,unitId:_0x50bc99}=_0x2b76ee,_0x509d5d=(_0x21e609=(_0x3ff1bf=_0x465ddf[_0x365c91(0x1c5)])==null?void 0x0:_0x3ff1bf[_0x365c91(0x1f1)](_0x1adf6b=>_0x1adf6b[_0x365c91(0x1e9)]===c[_0x365c91(0x1cc)][_0x365c91(0x1e7)])['map'](_0x5874d8=>_0x5874d8[_0x365c91(0x1ab)]))!=null?_0x21e609:[],_0x1be442=JSON[_0x365c91(0x198)](_0x465ddf),_0x87a922=_0x2b76ee['threadId'],_0x310407=_0x2b76ee['id'],_0x4bf9f9={'memberId':(await this['_sessionService'][_0x365c91(0x1dc)](_0x50bc99))[_0x365c91(0x19f)](),'unitId':_0x50bc99,'threadId':_0x87a922,'mention':_0x509d5d,'content':_0x1be442,'replyId':_0x310407},_0x3cf45c=await this['_httpService'][_0x365c91(0x1a5)](_0x365c91(0x1af)+_0x50bc99+_0x365c91(0x189),{'body':_0x4bf9f9});return!_0x3cf45c[_0x365c91(0x1ad)][_0x365c91(0x191)]||_0x3cf45c[_0x365c91(0x1ad)][_0x365c91(0x191)]['code']===0x1;}async['resolveComment'](_0x33367d){const _0x1ad690=_0x8cd178,{unitId:_0x217d07}=_0x33367d,_0xc7d59a=_0x33367d['threadId'],_0x34aa45={'memberId':this['_userService'][_0x1ad690(0x1e4)]()[_0x1ad690(0x17c)],'unitId':_0x217d07,'threadId':_0xc7d59a,'solved':_0x33367d['resolved']?I['Solved']:I['OpenOrReOpen']},_0x390e08=await this[_0x1ad690(0x187)][_0x1ad690(0x1a5)](_0x1ad690(0x1af)+_0x217d07+_0x1ad690(0x197),{'body':_0x34aa45});return!_0x390e08[_0x1ad690(0x1ad)][_0x1ad690(0x191)]||_0x390e08[_0x1ad690(0x1ad)]['error'][_0x1ad690(0x1a7)]===0x1;}async['deleteComment'](_0x2b9e0b,_0x1c3c68,_0x823c8a,_0x5868fc){const _0x16448d=_0x8cd178,_0x3732c4={'memberId':(await this[_0x16448d(0x1d7)][_0x16448d(0x1dc)](_0x2b9e0b))['getMemberID'](),'threadId':_0x823c8a,'replyId':_0x5868fc,'unitId':_0x2b9e0b},_0xe39c08=await this['_httpService'][_0x16448d(0x1a5)](_0x16448d(0x1af)+_0x2b9e0b+'/delete',{'body':_0x3732c4});return!_0xe39c08[_0x16448d(0x1ad)]['error']||_0xe39c08[_0x16448d(0x1ad)][_0x16448d(0x191)]['code']===0x1;}async[_0x8cd178(0x1a1)](_0x37c917,_0x181872,_0x4b9ad8){const _0x593ae0=_0x8cd178,_0xb307d7={'unitId':_0x37c917,'threadId':_0x4b9ad8},_0x59f4ef=await this[_0x593ae0(0x187)][_0x593ae0(0x1a5)](_0x593ae0(0x1af)+_0x37c917+_0x593ae0(0x17b),{'body':_0xb307d7}),_0x254361=_0x4b9ad8[_0x593ae0(0x1bf)](_0x1068c5=>G(_0x59f4ef[_0x593ae0(0x1ad)][_0x593ae0(0x18e)][_0x1068c5],_0x37c917,_0x181872))['filter'](Boolean);return Object[_0x593ae0(0x190)](_0x59f4ef[_0x593ae0(0x1ad)]['users'])[_0x593ae0(0x1dd)](_0x4268d2=>{const _0x5cf475=_0x593ae0;this[_0x5cf475(0x181)][_0x5cf475(0x1a3)](_0x4268d2);}),_0x254361;}[_0x8cd178(0x176)](_0x14bd06){const _0x28817d=_0x8cd178;return{'id':_0x14bd06['id'],'threadId':_0x14bd06[_0x28817d(0x1d5)],'ref':_0x14bd06[_0x28817d(0x19a)]};}};p=x([C(0x0,c[_0x8cd178(0x178)](P[_0x8cd178(0x18d)])),C(0x1,c[_0x8cd178(0x178)](c[_0x8cd178(0x1f0)])),C(0x2,c[_0x8cd178(0x178)](b[_0x8cd178(0x1aa)]))],p);var H=Object[_0x8cd178(0x1a4)],J=(_0x511f77,_0x41e109,_0x33238a,_0x56d579)=>{const _0xe51137=_0x8cd178;for(var _0x176679=_0x56d579>0x1?void 0x0:_0x56d579?H(_0x41e109,_0x33238a):_0x41e109,_0x21e59d=_0x511f77[_0xe51137(0x1a9)]-0x1,_0x437d01;_0x21e59d>=0x0;_0x21e59d--)(_0x437d01=_0x511f77[_0x21e59d])&&(_0x176679=_0x437d01(_0x176679)||_0x176679);return _0x176679;},y=(_0x4047d2,_0x88d563)=>(_0x3b6dc1,_0x498164)=>_0x88d563(_0x3b6dc1,_0x498164,_0x4047d2);let g=class extends c['Disposable']{constructor(_0x230551,_0x4d44e1){const _0x1267af=_0x8cd178;super(),this[_0x1267af(0x18f)]=_0x230551,this[_0x1267af(0x1b9)]=_0x4d44e1,this[_0x1267af(0x18a)]();}['_initDataSource'](){const _0x1e56ee=_0x8cd178;this[_0x1e56ee(0x18f)][_0x1e56ee(0x1e5)]=this[_0x1e56ee(0x1b9)],this[_0x1e56ee(0x18f)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x8cd178(0x178)](p))],g);var F=Object['defineProperty'],L=Object[_0x8cd178(0x1a4)],Z=(_0x34f656,_0x864655,_0xcf292c)=>_0x864655 in _0x34f656?F(_0x34f656,_0x864655,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xcf292c}):_0x34f656[_0x864655]=_0xcf292c,W=(_0x505cce,_0xe6a79,_0x29e441,_0x57aad3)=>{for(var _0x25d4d0=_0x57aad3>0x1?void 0x0:_0x57aad3?L(_0xe6a79,_0x29e441):_0xe6a79,_0x155c7c=_0x505cce['length']-0x1,_0x3dc7f2;_0x155c7c>=0x0;_0x155c7c--)(_0x3dc7f2=_0x505cce[_0x155c7c])&&(_0x25d4d0=_0x3dc7f2(_0x25d4d0)||_0x25d4d0);return _0x25d4d0;},O=(_0x2c8bfb,_0x5694ca)=>(_0xa24161,_0x513b56)=>_0x5694ca(_0xa24161,_0x513b56,_0x2c8bfb),N=(_0x38aeb2,_0x4f3287,_0x4a7620)=>Z(_0x38aeb2,typeof _0x4f3287!=_0x8cd178(0x1c2)?_0x4f3287+'':_0x4f3287,_0x4a7620);exports[_0x8cd178(0x1d2)]=class extends c[_0x8cd178(0x1b2)]{constructor(_0x4274bc=D,_0x229480,_0x1b0e34){const _0x6f2f70=_0x8cd178;super(),this[_0x6f2f70(0x1ee)]=_0x4274bc,this[_0x6f2f70(0x1e2)]=_0x229480,this[_0x6f2f70(0x1b4)]=_0x1b0e34;const {..._0x112e4e}=c[_0x6f2f70(0x1ca)]({},D,this[_0x6f2f70(0x1ee)]);this[_0x6f2f70(0x1b4)][_0x6f2f70(0x1e8)](q,_0x112e4e);}[_0x8cd178(0x1ec)](){[[p],[g],[_]]['forEach'](_0x5570ff=>{this['_injector']['add'](_0x5570ff);});}[_0x8cd178(0x1b8)](){const _0x1381fb=_0x8cd178;this[_0x1381fb(0x1e2)][_0x1381fb(0x1a0)](g),this[_0x1381fb(0x1e2)]['get'](_);}},N(exports[_0x8cd178(0x1d2)],_0x8cd178(0x17d),U),N(exports[_0x8cd178(0x1d2)],_0x8cd178(0x177),c[_0x8cd178(0x1db)][_0x8cd178(0x19d)]),exports[_0x8cd178(0x1d2)]=W([c['DependentOn'](w[_0x8cd178(0x192)],b[_0x8cd178(0x1b5)],T[_0x8cd178(0x17f)]),O(0x1,c[_0x8cd178(0x178)](c[_0x8cd178(0x1e3)])),O(0x2,c['IConfigService'])],exports[_0x8cd178(0x1d2)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xe6a052=_0x4fcb;(function(_0x24bf2d,_0x4f925b){const _0x7e76f8=_0x4fcb,_0x347f4d=_0x24bf2d();while(!![]){try{const _0x5d0bd8=parseInt(_0x7e76f8(0x1a2))/0x1+parseInt(_0x7e76f8(0x1a1))/0x2*(-parseInt(_0x7e76f8(0x17f))/0x3)+parseInt(_0x7e76f8(0x19d))/0x4+parseInt(_0x7e76f8(0x166))/0x5+parseInt(_0x7e76f8(0x160))/0x6+parseInt(_0x7e76f8(0x13f))/0x7*(parseInt(_0x7e76f8(0x15a))/0x8)+-parseInt(_0x7e76f8(0x164))/0x9;if(_0x5d0bd8===_0x4f925b)break;else _0x347f4d['push'](_0x347f4d['shift']());}catch(_0x38de5c){_0x347f4d['push'](_0x347f4d['shift']());}}}(_0x4b0e,0xef927));import{CommentService as _0xb08f,CollaborationSessionService as _0x567848,UniverCollaborationClientPlugin as _0x5ad52c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2fbf2b}from'@univerjs-pro/license';import{dayjs as _0x13a1d2,UserManagerService as _0x38029a,Inject as _0x12192d,Injector as _0xf533d4,Disposable as _0x2c54e0,CustomRangeType as _0x109d28,UniverInstanceType as _0x3870f6,DependentOn as _0x3bfe6e,IConfigService as _0x2536f6,Plugin as _0x348a81,merge as _0x20dbf3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4c1e57}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x38ef02,IThreadCommentDataSourceService as _0x292b6b}from'@univerjs/thread-comment';function _0x4b0e(){const _0x148abd=['259862nRqodf','map','updateComment','rangeId','Edit','112GBCSbs','find','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','payload','addUser','size','solved','createTimestamp','format','_commentService','unitId','UNRECOGNIZED','symbol','/universer-api/user/list','_init','content','personId','filter','length','onStarting','stringify','rangeType','/list','pipe','_threadCommentDataSource','users','_initDataSource','250784IPgRwp','user','_threadCommentModel','get','post','/solved','1787670PPPbVs','body','replyId','slice','9090018NCQebj','parentId','8100085tYIXBn','pluginName','Add','customRanges','resolved','YYYY/MM/DD\x20HH:mm','Reply','_injector','delete','userID','forEach','_configService','Solve','OpenOrReOpen','userId','_httpService','_sessionService','onReady','commentUpdate$','comments','listComments','root','COMMENT','add','disposeWithMe','30RSChrF','deleteComment','reply','getMemberID','subscribe','requireSession','_threadCommentDataSourceService','code','Delete','getUnit','/add','_config','threadId','Solved','/universer-api/comment/unit/','Unknown','resolveComment','getCurrentUser','error','dataSource','getOwnPropertyDescriptor','_userService','replies','type','getComment','saveCommentToSnapshot','_initUserSync','values','thread-comment-data-source.config','defineProperty','4762428XHmqFc','parse','addComment','/edit','375742UBBABf'];_0x4b0e=function(){return _0x148abd;};return _0x4b0e();}import{bufferTime as _0x26be54}from'rxjs';import{HTTPService as _0x486692}from'@univerjs/network';const W=_0xe6a052(0x141);var I=(_0x12fb0b=>(_0x12fb0b[_0x12fb0b[_0xe6a052(0x173)]=0x0]=_0xe6a052(0x173),_0x12fb0b[_0x12fb0b['Solved']=0x1]=_0xe6a052(0x18c),_0x12fb0b[_0x12fb0b['UNRECOGNIZED']=-0x1]=_0xe6a052(0x14a),_0x12fb0b))(I||{}),v=(_0x475ce0=>(_0x475ce0[_0x475ce0[_0xe6a052(0x18e)]=0x0]='Unknown',_0x475ce0[_0x475ce0[_0xe6a052(0x168)]=0x1]=_0xe6a052(0x168),_0x475ce0[_0x475ce0[_0xe6a052(0x16c)]=0x2]=_0xe6a052(0x16c),_0x475ce0[_0x475ce0[_0xe6a052(0x13e)]=0x3]='Edit',_0x475ce0[_0x475ce0[_0xe6a052(0x187)]=0x4]=_0xe6a052(0x187),_0x475ce0[_0x475ce0[_0xe6a052(0x172)]=0x5]=_0xe6a052(0x172),_0x475ce0[_0x475ce0[_0xe6a052(0x14a)]=-0x1]=_0xe6a052(0x14a),_0x475ce0))(v||{});const y=_0x21d1d8=>_0x13a1d2(new Date(+_0x21d1d8))[_0xe6a052(0x147)](_0xe6a052(0x16b)),B=async(_0x3d10f5,_0x37c479)=>{const _0x1ff679=_0xe6a052,_0x56d22c=_0x3d10f5[_0x1ff679(0x15d)](_0x38029a),_0x2e17f9=_0x3d10f5[_0x1ff679(0x15d)](_0x486692);_0x37c479[_0x1ff679(0x170)](_0x72a39a=>{const _0x5ab5eb=_0x1ff679;_0x56d22c['getUser'](_0x72a39a)&&_0x37c479[_0x5ab5eb(0x16e)](_0x72a39a);}),_0x37c479[_0x1ff679(0x144)]&&(await _0x2e17f9[_0x1ff679(0x15d)](_0x1ff679(0x14c),{'params':{'userIDs':[..._0x37c479]}}))[_0x1ff679(0x161)][_0x1ff679(0x158)]['forEach'](_0xb175b8=>{const _0x317093=_0x1ff679;_0xb175b8&&_0x56d22c[_0x317093(0x143)](_0xb175b8);});};function _0x4fcb(_0x405347,_0x34f04e){_0x405347=_0x405347-0x13d;const _0x4b0e98=_0x4b0e();let _0x4fcb05=_0x4b0e98[_0x405347];return _0x4fcb05;}var K=Object['getOwnPropertyDescriptor'],V=(_0x5b1ef9,_0xdf9bbd,_0x17667b,_0x39b8a0)=>{for(var _0x3dc491=_0x39b8a0>0x1?void 0x0:_0x39b8a0?K(_0xdf9bbd,_0x17667b):_0xdf9bbd,_0x52b412=_0x5b1ef9['length']-0x1,_0x27386e;_0x52b412>=0x0;_0x52b412--)(_0x27386e=_0x5b1ef9[_0x52b412])&&(_0x3dc491=_0x27386e(_0x3dc491)||_0x3dc491);return _0x3dc491;},p=(_0x36b307,_0x42fa51)=>(_0x4feef0,_0x44690c)=>_0x42fa51(_0x4feef0,_0x44690c,_0x36b307);let _=class extends _0x2c54e0{constructor(_0x1d15a4,_0x181d93,_0x18b03b,_0x52786a){const _0x71fad4=_0xe6a052;super(),this['_commentService']=_0x1d15a4,this[_0x71fad4(0x15c)]=_0x181d93,this[_0x71fad4(0x194)]=_0x18b03b,this[_0x71fad4(0x16d)]=_0x52786a,this[_0x71fad4(0x14d)](),this[_0x71fad4(0x199)]();}['_initUserSync'](){const _0x2eb814=_0xe6a052;this[_0x2eb814(0x17e)](this[_0x2eb814(0x15c)][_0x2eb814(0x178)][_0x2eb814(0x156)](_0x26be54(0x10))['subscribe'](_0x3a642a=>{const _0x2ca5a0=_0x2eb814,_0x51c038=new Set();_0x3a642a['forEach'](_0x59daf8=>{const _0x3f0685=_0x4fcb;if(_0x59daf8[_0x3f0685(0x196)]===_0x3f0685(0x17d)){const _0x543e2e=_0x59daf8[_0x3f0685(0x142)][_0x3f0685(0x14f)];_0x51c038[_0x3f0685(0x17d)](_0x543e2e);}}),B(this[_0x2ca5a0(0x16d)],_0x51c038);}));}['_init'](){const _0x1da173=_0xe6a052;this[_0x1da173(0x17e)](this[_0x1da173(0x148)][_0x1da173(0x178)][_0x1da173(0x183)](async _0x440938=>{const _0x2f9c48=_0x1da173;var _0xcf35fd,_0x198d5e,_0x270bd2,_0x201a10;const _0x2b1dd3=(_0xcf35fd=this['_threadCommentModel'][_0x2f9c48(0x188)](_0x440938[_0x2f9c48(0x149)])['find'](_0xb5e806=>_0xb5e806[_0x2f9c48(0x18b)]===_0x440938[_0x2f9c48(0x18b)]))==null?void 0x0:_0xcf35fd['root'];if(!_0x2b1dd3)return;const {unitId:_0x193aee,subUnitId:_0xf933cd}=_0x2b1dd3;switch(_0x440938[_0x2f9c48(0x15b)]&&this[_0x2f9c48(0x194)]['addUser'](_0x440938[_0x2f9c48(0x15b)]),_0x440938[_0x2f9c48(0x196)]){case v['Add']:break;case v[_0x2f9c48(0x16c)]:{this[_0x2f9c48(0x15c)]['addComment'](_0x193aee,_0xf933cd,{'unitId':_0x193aee,'subUnitId':_0xf933cd,'ref':'','id':_0x440938[_0x2f9c48(0x162)],'dT':y(+_0x440938[_0x2f9c48(0x146)]),'threadId':_0x440938['threadId'],'personId':(_0x270bd2=(_0x198d5e=_0x440938[_0x2f9c48(0x15b)])==null?void 0x0:_0x198d5e[_0x2f9c48(0x16f)])!=null?_0x270bd2:_0x440938[_0x2f9c48(0x174)],'text':JSON['parse'](_0x440938['content']),'parentId':_0x2b1dd3['id']});break;}case v['Delete']:{const _0x50226b=this[_0x2f9c48(0x15c)][_0x2f9c48(0x197)](_0x193aee,_0xf933cd,_0x440938[_0x2f9c48(0x162)]);_0x50226b&&_0x50226b[_0x2f9c48(0x165)]&&this[_0x2f9c48(0x15c)]['deleteComment'](_0x193aee,_0xf933cd,_0x440938['replyId']);break;}case v['Edit']:{this[_0x2f9c48(0x15c)][_0x2f9c48(0x1a4)](_0x193aee,_0xf933cd,{'commentId':_0x440938[_0x2f9c48(0x162)],'text':JSON[_0x2f9c48(0x19e)](_0x440938[_0x2f9c48(0x14e)])});break;}case v[_0x2f9c48(0x172)]:{const _0x2b69e0=(_0x201a10=this[_0x2f9c48(0x15c)][_0x2f9c48(0x188)](_0x440938[_0x2f9c48(0x149)])[_0x2f9c48(0x140)](_0x2289b8=>_0x2289b8['threadId']===_0x440938['threadId']))==null?void 0x0:_0x201a10[_0x2f9c48(0x17b)];_0x2b69e0&&this[_0x2f9c48(0x15c)]['resolveComment'](_0x193aee,_0xf933cd,_0x2b69e0['id'],_0x440938[_0x2f9c48(0x145)]===I[_0x2f9c48(0x18c)]);break;}}}));}};_=V([p(0x0,_0x12192d(_0xb08f)),p(0x1,_0x12192d(_0x38ef02)),p(0x2,_0x12192d(_0x38029a)),p(0x3,_0x12192d(_0xf533d4))],_);const z=_0xe6a052(0x19b),O={};var k=Object[_0xe6a052(0x193)],Q=(_0x3e436f,_0x342a09,_0x235486,_0x395e32)=>{const _0x17517e=_0xe6a052;for(var _0xe70f30=_0x395e32>0x1?void 0x0:_0x395e32?k(_0x342a09,_0x235486):_0x342a09,_0x9acd04=_0x3e436f[_0x17517e(0x151)]-0x1,_0x2a9430;_0x9acd04>=0x0;_0x9acd04--)(_0x2a9430=_0x3e436f[_0x9acd04])&&(_0xe70f30=_0x2a9430(_0xe70f30)||_0xe70f30);return _0xe70f30;},b=(_0x5e3d88,_0x17fb4b)=>(_0x916747,_0x34bfe0)=>_0x17fb4b(_0x916747,_0x34bfe0,_0x5e3d88);function X(_0x225c7d,_0x121dbb){const _0x5d6d65=_0xe6a052,_0x4223e6=_0x225c7d[_0x5d6d65(0x195)][0x0];return{..._0x121dbb,'id':_0x4223e6[_0x5d6d65(0x162)],'resolved':_0x225c7d[_0x5d6d65(0x145)]===0x1,'dT':y(_0x4223e6[_0x5d6d65(0x146)]),'personId':_0x4223e6['userId'],'threadId':_0x4223e6[_0x5d6d65(0x18b)]};}function ee(_0x51a597,_0x48ca9c,_0x15ba24){const _0x5be51a=_0xe6a052;var _0x399abb,_0x269511;if(((_0x269511=(_0x399abb=_0x51a597==null?void 0x0:_0x51a597[_0x5be51a(0x195)])==null?void 0x0:_0x399abb[_0x5be51a(0x151)])!=null?_0x269511:0x0)>0x0){const _0x299127=(_0x5b580a,_0x36315a)=>({'id':_0x5b580a[_0x5be51a(0x162)],'threadId':_0x5b580a[_0x5be51a(0x18b)],'dT':y(_0x5b580a[_0x5be51a(0x146)]),'personId':_0x5b580a[_0x5be51a(0x174)],'resolved':_0x51a597[_0x5be51a(0x145)]===I[_0x5be51a(0x18c)],'unitId':_0x48ca9c,'subUnitId':_0x15ba24,'text':JSON[_0x5be51a(0x19e)](_0x5b580a[_0x5be51a(0x14e)]),'parentId':_0x36315a}),_0x57e257=_0x299127(_0x51a597['replies'][0x0]);return{..._0x57e257,'children':_0x51a597[_0x5be51a(0x195)][_0x5be51a(0x163)](0x1)[_0x5be51a(0x1a3)](_0x4e1e55=>_0x299127(_0x4e1e55,_0x57e257['id']))};}return null;}let S=class{constructor(_0x2fb2af,_0x331a75,_0x201029){const _0x31526c=_0xe6a052;this['_httpService']=_0x2fb2af,this[_0x31526c(0x194)]=_0x331a75,this[_0x31526c(0x176)]=_0x201029;}async[_0xe6a052(0x19f)](_0x4f4d22){const _0x941846=_0xe6a052;var _0x4a4924,_0x2a81ca;const {parentId:_0x40f5eb,unitId:_0x35db58,text:_0x4b9e4a,threadId:_0x226d71}=_0x4f4d22,_0x3bfcfa=(_0x2a81ca=(_0x4a4924=_0x4b9e4a[_0x941846(0x169)])==null?void 0x0:_0x4a4924[_0x941846(0x150)](_0x119034=>_0x119034['rangeType']===_0x109d28['COMMENT'])['map'](_0x2d7baf=>_0x2d7baf[_0x941846(0x13d)]))!=null?_0x2a81ca:[],_0xccb6a7=JSON[_0x941846(0x153)](_0x4b9e4a),_0x3559d5=(await this[_0x941846(0x176)][_0x941846(0x184)](_0x35db58))[_0x941846(0x182)]();if(_0x40f5eb){const _0x4b0454={'memberId':_0x3559d5,'unitId':_0x35db58,'content':_0xccb6a7,'mention':_0x3bfcfa,'threadId':_0x226d71},_0x2551c6=(await this[_0x941846(0x175)][_0x941846(0x15e)](_0x941846(0x18d)+_0x35db58+'/reply',{'body':_0x4b0454}))['body'][_0x941846(0x181)];return{..._0x4f4d22,'id':_0x2551c6[_0x941846(0x162)],'dT':_0x13a1d2(+_0x2551c6[_0x941846(0x146)])[_0x941846(0x147)](_0x941846(0x16b)),'personId':_0x2551c6[_0x941846(0x174)]};}else{const _0x2fe52f={'memberId':_0x3559d5,'unitId':_0x35db58,'content':_0xccb6a7,'mention':_0x3bfcfa},_0x57f240=await this[_0x941846(0x175)][_0x941846(0x15e)]('/universer-api/comment/unit/'+_0x35db58+_0x941846(0x189),{'body':_0x2fe52f});return X(_0x57f240['body']['comment'],_0x4f4d22);}}async[_0xe6a052(0x1a4)](_0x204d2c){const _0x4af545=_0xe6a052;var _0x50c019,_0x5b41f5;const {text:_0x174606,unitId:_0x590a43}=_0x204d2c,_0x2f3573=(_0x5b41f5=(_0x50c019=_0x174606[_0x4af545(0x169)])==null?void 0x0:_0x50c019[_0x4af545(0x150)](_0x3e709c=>_0x3e709c[_0x4af545(0x154)]===_0x109d28[_0x4af545(0x17c)])[_0x4af545(0x1a3)](_0x2f5c51=>_0x2f5c51[_0x4af545(0x13d)]))!=null?_0x5b41f5:[],_0x3b2046=JSON[_0x4af545(0x153)](_0x174606),_0x1ab213=_0x204d2c[_0x4af545(0x18b)],_0x2251fa=_0x204d2c['id'],_0x458644={'memberId':(await this[_0x4af545(0x176)][_0x4af545(0x184)](_0x590a43))[_0x4af545(0x182)](),'unitId':_0x590a43,'threadId':_0x1ab213,'mention':_0x2f3573,'content':_0x3b2046,'replyId':_0x2251fa},_0x34cc7f=await this[_0x4af545(0x175)][_0x4af545(0x15e)](_0x4af545(0x18d)+_0x590a43+_0x4af545(0x1a0),{'body':_0x458644});return!_0x34cc7f[_0x4af545(0x161)][_0x4af545(0x191)]||_0x34cc7f[_0x4af545(0x161)][_0x4af545(0x191)][_0x4af545(0x186)]===0x1;}async[_0xe6a052(0x18f)](_0x5f43cf){const _0x2aba21=_0xe6a052,{unitId:_0xdf3484}=_0x5f43cf,_0x55e94e=_0x5f43cf[_0x2aba21(0x18b)],_0x50c4ed={'memberId':this['_userService'][_0x2aba21(0x190)]()[_0x2aba21(0x16f)],'unitId':_0xdf3484,'threadId':_0x55e94e,'solved':_0x5f43cf[_0x2aba21(0x16a)]?I[_0x2aba21(0x18c)]:I[_0x2aba21(0x173)]},_0x16a97e=await this['_httpService'][_0x2aba21(0x15e)](_0x2aba21(0x18d)+_0xdf3484+_0x2aba21(0x15f),{'body':_0x50c4ed});return!_0x16a97e[_0x2aba21(0x161)][_0x2aba21(0x191)]||_0x16a97e['body']['error'][_0x2aba21(0x186)]===0x1;}async[_0xe6a052(0x180)](_0x271530,_0xf50eb9,_0x28df2e,_0x248c8c){const _0x3836f7=_0xe6a052,_0xd3644f={'memberId':(await this[_0x3836f7(0x176)]['requireSession'](_0x271530))[_0x3836f7(0x182)](),'threadId':_0x28df2e,'replyId':_0x248c8c,'unitId':_0x271530},_0x275028=await this[_0x3836f7(0x175)][_0x3836f7(0x15e)](_0x3836f7(0x18d)+_0x271530+'/delete',{'body':_0xd3644f});return!_0x275028[_0x3836f7(0x161)][_0x3836f7(0x191)]||_0x275028[_0x3836f7(0x161)][_0x3836f7(0x191)]['code']===0x1;}async[_0xe6a052(0x17a)](_0x4453c1,_0x6434b7,_0x1ee2a3){const _0x25e3f4=_0xe6a052,_0x2d3f00={'unitId':_0x4453c1,'threadId':_0x1ee2a3},_0x2be0c7=await this[_0x25e3f4(0x175)]['post'](_0x25e3f4(0x18d)+_0x4453c1+_0x25e3f4(0x155),{'body':_0x2d3f00}),_0xe05332=_0x1ee2a3[_0x25e3f4(0x1a3)](_0xedfe4e=>ee(_0x2be0c7[_0x25e3f4(0x161)][_0x25e3f4(0x179)][_0xedfe4e],_0x4453c1,_0x6434b7))[_0x25e3f4(0x150)](Boolean);return Object[_0x25e3f4(0x19a)](_0x2be0c7[_0x25e3f4(0x161)][_0x25e3f4(0x158)])[_0x25e3f4(0x170)](_0x5b1dbd=>{const _0x21e398=_0x25e3f4;this['_userService'][_0x21e398(0x143)](_0x5b1dbd);}),_0xe05332;}[_0xe6a052(0x198)](_0x2f98b8){const _0x509092=_0xe6a052;return{'id':_0x2f98b8['id'],'threadId':_0x2f98b8[_0x509092(0x18b)],'ref':_0x2f98b8['ref']};}};S=Q([b(0x0,_0x12192d(_0x486692)),b(0x1,_0x12192d(_0x38029a)),b(0x2,_0x12192d(_0x567848))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x2dda0e,_0x200e47,_0x463783,_0x11be95)=>{const _0x2c1743=_0xe6a052;for(var _0x3c821d=_0x11be95>0x1?void 0x0:_0x11be95?re(_0x200e47,_0x463783):_0x200e47,_0x3c887b=_0x2dda0e[_0x2c1743(0x151)]-0x1,_0x5c5162;_0x3c887b>=0x0;_0x3c887b--)(_0x5c5162=_0x2dda0e[_0x3c887b])&&(_0x3c821d=_0x5c5162(_0x3c821d)||_0x3c821d);return _0x3c821d;},M=(_0x251002,_0x4e911e)=>(_0x315f61,_0x22d594)=>_0x4e911e(_0x315f61,_0x22d594,_0x251002);let f=class extends _0x2c54e0{constructor(_0x214b15,_0x899d0e){const _0x268dc6=_0xe6a052;super(),this['_threadCommentDataSourceService']=_0x214b15,this[_0x268dc6(0x157)]=_0x899d0e,this['_initDataSource']();}[_0xe6a052(0x159)](){const _0x1d1a56=_0xe6a052;this[_0x1d1a56(0x185)][_0x1d1a56(0x192)]=this[_0x1d1a56(0x157)],this[_0x1d1a56(0x185)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x292b6b),M(0x1,_0x12192d(S))],f);var se=Object[_0xe6a052(0x19c)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1f4026,_0x2caddf,_0x3d9fa6)=>_0x2caddf in _0x1f4026?se(_0x1f4026,_0x2caddf,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3d9fa6}):_0x1f4026[_0x2caddf]=_0x3d9fa6,ie=(_0x1e6e22,_0x374349,_0x45c5d2,_0x56e1a3)=>{const _0x27a7dd=_0xe6a052;for(var _0x4577e5=_0x56e1a3>0x1?void 0x0:_0x56e1a3?oe(_0x374349,_0x45c5d2):_0x374349,_0x4bae33=_0x1e6e22[_0x27a7dd(0x151)]-0x1,_0x55e71f;_0x4bae33>=0x0;_0x4bae33--)(_0x55e71f=_0x1e6e22[_0x4bae33])&&(_0x4577e5=_0x55e71f(_0x4577e5)||_0x4577e5);return _0x4577e5;},N=(_0x5952e0,_0x2439fe)=>(_0x44757f,_0x1fe3a5)=>_0x2439fe(_0x44757f,_0x1fe3a5,_0x5952e0),$=(_0x43f1a5,_0x37509a,_0x5aed8c)=>ne(_0x43f1a5,typeof _0x37509a!=_0xe6a052(0x14b)?_0x37509a+'':_0x37509a,_0x5aed8c);let g=class extends _0x348a81{constructor(_0x43b060=O,_0x56fb0b,_0xdb6bf4){const _0x3b877e=_0xe6a052;super(),this[_0x3b877e(0x18a)]=_0x43b060,this[_0x3b877e(0x16d)]=_0x56fb0b,this['_configService']=_0xdb6bf4;const {..._0x592d69}=_0x20dbf3({},O,this[_0x3b877e(0x18a)]);this[_0x3b877e(0x171)]['setConfig'](z,_0x592d69);}[_0xe6a052(0x152)](){const _0x45b801=_0xe6a052;[[S],[f],[_]][_0x45b801(0x170)](_0x5c8711=>{const _0x3fa95d=_0x45b801;this[_0x3fa95d(0x16d)]['add'](_0x5c8711);});}[_0xe6a052(0x177)](){const _0x11b704=_0xe6a052;this[_0x11b704(0x16d)]['get'](f),this[_0x11b704(0x16d)][_0x11b704(0x15d)](_);}};$(g,_0xe6a052(0x167),W),$(g,'type',_0x3870f6['UNIVER_UNKNOWN']),g=ie([_0x3bfe6e(_0x4c1e57,_0x5ad52c,_0x2fbf2b),N(0x1,_0x12192d(_0xf533d4)),N(0x2,_0x2536f6)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x36cf26=_0x14cc;function _0x14cc(_0x58ea9f,_0x239878){_0x58ea9f=_0x58ea9f-0x1a1;const _0x216faf=_0x216f();let _0x14cc17=_0x216faf[_0x58ea9f];return _0x14cc17;}(function(_0x726610,_0x5ac411){const _0xb0c06d=_0x14cc,_0x104eea=_0x726610();while(!![]){try{const _0x18b4c5=-parseInt(_0xb0c06d(0x1e9))/0x1*(-parseInt(_0xb0c06d(0x1a8))/0x2)+-parseInt(_0xb0c06d(0x1d2))/0x3+-parseInt(_0xb0c06d(0x1cf))/0x4*(parseInt(_0xb0c06d(0x1de))/0x5)+-parseInt(_0xb0c06d(0x1b1))/0x6+parseInt(_0xb0c06d(0x1e4))/0x7+-parseInt(_0xb0c06d(0x1aa))/0x8+parseInt(_0xb0c06d(0x1ac))/0x9;if(_0x18b4c5===_0x5ac411)break;else _0x104eea['push'](_0x104eea['shift']());}catch(_0x485782){_0x104eea['push'](_0x104eea['shift']());}}}(_0x216f,0xbd8d1));import{CommentService as _0x447352,CollaborationSessionService as _0x2c5c35,UniverCollaborationClientPlugin as _0x25931d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x22a647}from'@univerjs-pro/license';import{dayjs as _0x8e0352,UserManagerService as _0x58c1c8,Inject as _0x198cd5,Injector as _0x1cb825,Disposable as _0x307552,CustomRangeType as _0x1c6580,UniverInstanceType as _0xe103b3,DependentOn as _0x574e8a,IConfigService as _0x3e8e81,Plugin as _0x31d320,merge as _0x38f854}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2e2bfc}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3d52ec,IThreadCommentDataSourceService as _0x1850ce}from'@univerjs/thread-comment';import{bufferTime as _0x31fefb}from'rxjs';import{HTTPService as _0x3fc487}from'@univerjs/network';const W=_0x36cf26(0x205);var I=(_0x46f1eb=>(_0x46f1eb[_0x46f1eb[_0x36cf26(0x1dd)]=0x0]='OpenOrReOpen',_0x46f1eb[_0x46f1eb['Solved']=0x1]=_0x36cf26(0x1d9),_0x46f1eb[_0x46f1eb['UNRECOGNIZED']=-0x1]=_0x36cf26(0x1ff),_0x46f1eb))(I||{}),v=(_0x366877=>(_0x366877[_0x366877[_0x36cf26(0x1ba)]=0x0]='Unknown',_0x366877[_0x366877['Add']=0x1]='Add',_0x366877[_0x366877['Reply']=0x2]=_0x36cf26(0x1d5),_0x366877[_0x366877[_0x36cf26(0x1cb)]=0x3]=_0x36cf26(0x1cb),_0x366877[_0x366877[_0x36cf26(0x1c5)]=0x4]=_0x36cf26(0x1c5),_0x366877[_0x366877[_0x36cf26(0x1c7)]=0x5]='Solve',_0x366877[_0x366877[_0x36cf26(0x1ff)]=-0x1]=_0x36cf26(0x1ff),_0x366877))(v||{});const y=_0x2c9e2e=>_0x8e0352(new Date(+_0x2c9e2e))[_0x36cf26(0x202)](_0x36cf26(0x1d4)),B=async(_0x317dac,_0x5c079c)=>{const _0x269c17=_0x36cf26,_0x3f568a=_0x317dac[_0x269c17(0x1bf)](_0x58c1c8),_0x5521ea=_0x317dac[_0x269c17(0x1bf)](_0x3fc487);_0x5c079c[_0x269c17(0x1ab)](_0x265c0f=>{const _0x23812d=_0x269c17;_0x3f568a[_0x23812d(0x1e2)](_0x265c0f)&&_0x5c079c['delete'](_0x265c0f);}),_0x5c079c[_0x269c17(0x1df)]&&(await _0x5521ea[_0x269c17(0x1bf)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5c079c]}}))[_0x269c17(0x1b2)][_0x269c17(0x203)]['forEach'](_0x2b8dbd=>{const _0x52be3c=_0x269c17;_0x2b8dbd&&_0x3f568a[_0x52be3c(0x1c9)](_0x2b8dbd);});};var K=Object[_0x36cf26(0x1fb)],V=(_0x2f4a83,_0x2594f6,_0x46fa24,_0x2a0b16)=>{for(var _0x1812da=_0x2a0b16>0x1?void 0x0:_0x2a0b16?K(_0x2594f6,_0x46fa24):_0x2594f6,_0x3b5ace=_0x2f4a83['length']-0x1,_0x56d4da;_0x3b5ace>=0x0;_0x3b5ace--)(_0x56d4da=_0x2f4a83[_0x3b5ace])&&(_0x1812da=_0x56d4da(_0x1812da)||_0x1812da);return _0x1812da;},p=(_0x211937,_0x2e7498)=>(_0x1bd517,_0x2e47c2)=>_0x2e7498(_0x1bd517,_0x2e47c2,_0x211937);let _=class extends _0x307552{constructor(_0x8ee7ca,_0x1df3d5,_0xb48c0,_0x54bb5c){const _0x3d0173=_0x36cf26;super(),this['_commentService']=_0x8ee7ca,this['_threadCommentModel']=_0x1df3d5,this[_0x3d0173(0x1f1)]=_0xb48c0,this[_0x3d0173(0x1d7)]=_0x54bb5c,this[_0x3d0173(0x1a3)](),this[_0x3d0173(0x1fe)]();}['_initUserSync'](){const _0x3a652c=_0x36cf26;this[_0x3a652c(0x1c6)](this[_0x3a652c(0x1f4)][_0x3a652c(0x1f3)][_0x3a652c(0x1db)](_0x31fefb(0x10))[_0x3a652c(0x1c8)](_0x19aa2c=>{const _0x10d940=_0x3a652c,_0x4c5f47=new Set();_0x19aa2c[_0x10d940(0x1ab)](_0x4a14dd=>{const _0x3f06f2=_0x10d940;if(_0x4a14dd[_0x3f06f2(0x1c4)]==='add'){const _0x115f1d=_0x4a14dd[_0x3f06f2(0x1bd)][_0x3f06f2(0x1ad)];_0x4c5f47[_0x3f06f2(0x1c0)](_0x115f1d);}}),B(this[_0x10d940(0x1d7)],_0x4c5f47);}));}[_0x36cf26(0x1a3)](){const _0x54c596=_0x36cf26;this['disposeWithMe'](this['_commentService'][_0x54c596(0x1f3)][_0x54c596(0x1c8)](async _0x22d5cb=>{const _0x420aa2=_0x54c596;var _0x29b3d2,_0x5399ce,_0x21b023,_0x4a6fb0;const _0x521912=(_0x29b3d2=this[_0x420aa2(0x1f4)][_0x420aa2(0x1f7)](_0x22d5cb['unitId'])[_0x420aa2(0x1cc)](_0x45b81f=>_0x45b81f[_0x420aa2(0x1ed)]===_0x22d5cb[_0x420aa2(0x1ed)]))==null?void 0x0:_0x29b3d2[_0x420aa2(0x1eb)];if(!_0x521912)return;const {unitId:_0x1d066c,subUnitId:_0x26ebf7}=_0x521912;switch(_0x22d5cb[_0x420aa2(0x1a4)]&&this[_0x420aa2(0x1f1)][_0x420aa2(0x1c9)](_0x22d5cb[_0x420aa2(0x1a4)]),_0x22d5cb[_0x420aa2(0x1c4)]){case v[_0x420aa2(0x1b9)]:break;case v['Reply']:{this[_0x420aa2(0x1f4)]['addComment'](_0x1d066c,_0x26ebf7,{'unitId':_0x1d066c,'subUnitId':_0x26ebf7,'ref':'','id':_0x22d5cb[_0x420aa2(0x1c1)],'dT':y(+_0x22d5cb[_0x420aa2(0x1b3)]),'threadId':_0x22d5cb[_0x420aa2(0x1ed)],'personId':(_0x21b023=(_0x5399ce=_0x22d5cb[_0x420aa2(0x1a4)])==null?void 0x0:_0x5399ce[_0x420aa2(0x1d3)])!=null?_0x21b023:_0x22d5cb['userId'],'text':JSON['parse'](_0x22d5cb[_0x420aa2(0x1a7)]),'parentId':_0x521912['id']});break;}case v[_0x420aa2(0x1c5)]:{const _0x5bcc35=this[_0x420aa2(0x1f4)][_0x420aa2(0x1b0)](_0x1d066c,_0x26ebf7,_0x22d5cb['replyId']);_0x5bcc35&&_0x5bcc35[_0x420aa2(0x201)]&&this[_0x420aa2(0x1f4)]['deleteComment'](_0x1d066c,_0x26ebf7,_0x22d5cb[_0x420aa2(0x1c1)]);break;}case v[_0x420aa2(0x1cb)]:{this[_0x420aa2(0x1f4)][_0x420aa2(0x1fd)](_0x1d066c,_0x26ebf7,{'commentId':_0x22d5cb[_0x420aa2(0x1c1)],'text':JSON[_0x420aa2(0x1da)](_0x22d5cb['content'])});break;}case v['Solve']:{const _0x360b49=(_0x4a6fb0=this['_threadCommentModel'][_0x420aa2(0x1f7)](_0x22d5cb[_0x420aa2(0x1b5)])[_0x420aa2(0x1cc)](_0x564b5f=>_0x564b5f[_0x420aa2(0x1ed)]===_0x22d5cb[_0x420aa2(0x1ed)]))==null?void 0x0:_0x4a6fb0[_0x420aa2(0x1eb)];_0x360b49&&this['_threadCommentModel'][_0x420aa2(0x1f8)](_0x1d066c,_0x26ebf7,_0x360b49['id'],_0x22d5cb['solved']===I[_0x420aa2(0x1d9)]);break;}}}));}};_=V([p(0x0,_0x198cd5(_0x447352)),p(0x1,_0x198cd5(_0x3d52ec)),p(0x2,_0x198cd5(_0x58c1c8)),p(0x3,_0x198cd5(_0x1cb825))],_);const z=_0x36cf26(0x1ef),O={};var k=Object[_0x36cf26(0x1fb)],Q=(_0x2e5ba5,_0x1320fc,_0x5cf073,_0x4ff179)=>{const _0x303b4d=_0x36cf26;for(var _0x5c516b=_0x4ff179>0x1?void 0x0:_0x4ff179?k(_0x1320fc,_0x5cf073):_0x1320fc,_0x3c12d6=_0x2e5ba5[_0x303b4d(0x1f0)]-0x1,_0x569194;_0x3c12d6>=0x0;_0x3c12d6--)(_0x569194=_0x2e5ba5[_0x3c12d6])&&(_0x5c516b=_0x569194(_0x5c516b)||_0x5c516b);return _0x5c516b;},b=(_0x4ab7bc,_0x53f9fc)=>(_0x5d80c4,_0x110a27)=>_0x53f9fc(_0x5d80c4,_0x110a27,_0x4ab7bc);function X(_0x3373c0,_0x5c2cb5){const _0x27a95e=_0x36cf26,_0xb6c0e9=_0x3373c0[_0x27a95e(0x1be)][0x0];return{..._0x5c2cb5,'id':_0xb6c0e9[_0x27a95e(0x1c1)],'resolved':_0x3373c0[_0x27a95e(0x1f5)]===0x1,'dT':y(_0xb6c0e9[_0x27a95e(0x1b3)]),'personId':_0xb6c0e9[_0x27a95e(0x1f2)],'threadId':_0xb6c0e9[_0x27a95e(0x1ed)]};}function _0x216f(){const _0x3b0b30=['OpenOrReOpen','15NuURaS','size','_config','COMMENT','getUser','_sessionService','8292592CNnLXw','pluginName','filter','addComment','ref','1396963wkwXjW','slice','root','customRanges','threadId','getCurrentUser','thread-comment-data-source.config','length','_userService','userId','commentUpdate$','_threadCommentModel','solved','map','getUnit','resolveComment','getMemberID','_initDataSource','getOwnPropertyDescriptor','_configService','updateComment','_initUserSync','UNRECOGNIZED','_threadCommentDataSource','parentId','format','users','/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_httpService','saveCommentToSnapshot','rangeType','_init','user','values','defineProperty','content','2dMyclV','post','9469184FnTYIe','forEach','9261585fQzyJS','personId','comment','code','getComment','3192282vUoLjp','body','createTimestamp','UNIVER_UNKNOWN','unitId','rangeId','setConfig','error','Add','Unknown','deleteComment','stringify','payload','replies','get','add','replyId','/edit','onStarting','type','Delete','disposeWithMe','Solve','subscribe','addUser','reply','Edit','find','/add','/solved','304840kKUULW','listComments','/delete','2669874HjrlQP','userID','YYYY/MM/DD\x20HH:mm','Reply','/universer-api/comment/unit/','_injector','_threadCommentDataSourceService','Solved','parse','pipe','resolved'];_0x216f=function(){return _0x3b0b30;};return _0x216f();}function ee(_0x284771,_0xbb1ec0,_0x5060cc){const _0x2cd6fc=_0x36cf26;var _0x43feed,_0x81eb8d;if(((_0x81eb8d=(_0x43feed=_0x284771==null?void 0x0:_0x284771[_0x2cd6fc(0x1be)])==null?void 0x0:_0x43feed[_0x2cd6fc(0x1f0)])!=null?_0x81eb8d:0x0)>0x0){const _0x24d5f5=(_0x4707d7,_0x33953d)=>({'id':_0x4707d7[_0x2cd6fc(0x1c1)],'threadId':_0x4707d7['threadId'],'dT':y(_0x4707d7[_0x2cd6fc(0x1b3)]),'personId':_0x4707d7[_0x2cd6fc(0x1f2)],'resolved':_0x284771[_0x2cd6fc(0x1f5)]===I[_0x2cd6fc(0x1d9)],'unitId':_0xbb1ec0,'subUnitId':_0x5060cc,'text':JSON[_0x2cd6fc(0x1da)](_0x4707d7[_0x2cd6fc(0x1a7)]),'parentId':_0x33953d}),_0x591a68=_0x24d5f5(_0x284771[_0x2cd6fc(0x1be)][0x0]);return{..._0x591a68,'children':_0x284771['replies'][_0x2cd6fc(0x1ea)](0x1)[_0x2cd6fc(0x1f6)](_0x5d2a27=>_0x24d5f5(_0x5d2a27,_0x591a68['id']))};}return null;}let S=class{constructor(_0x52a9e1,_0xd0a8e2,_0x365ed1){const _0x152ebd=_0x36cf26;this[_0x152ebd(0x206)]=_0x52a9e1,this[_0x152ebd(0x1f1)]=_0xd0a8e2,this[_0x152ebd(0x1e3)]=_0x365ed1;}async[_0x36cf26(0x1e7)](_0x4d1935){const _0x59a866=_0x36cf26;var _0x26954f,_0x417839;const {parentId:_0x439241,unitId:_0x10f754,text:_0x2086dc,threadId:_0xac721c}=_0x4d1935,_0x43c2f0=(_0x417839=(_0x26954f=_0x2086dc[_0x59a866(0x1ec)])==null?void 0x0:_0x26954f[_0x59a866(0x1e6)](_0x27a119=>_0x27a119[_0x59a866(0x1a2)]===_0x1c6580['COMMENT'])['map'](_0x5e2c43=>_0x5e2c43[_0x59a866(0x1b6)]))!=null?_0x417839:[],_0x8ec671=JSON[_0x59a866(0x1bc)](_0x2086dc),_0x5978c4=(await this['_sessionService']['requireSession'](_0x10f754))[_0x59a866(0x1f9)]();if(_0x439241){const _0x45bc67={'memberId':_0x5978c4,'unitId':_0x10f754,'content':_0x8ec671,'mention':_0x43c2f0,'threadId':_0xac721c},_0x9aa019=(await this[_0x59a866(0x206)][_0x59a866(0x1a9)](_0x59a866(0x1d6)+_0x10f754+'/reply',{'body':_0x45bc67}))[_0x59a866(0x1b2)][_0x59a866(0x1ca)];return{..._0x4d1935,'id':_0x9aa019[_0x59a866(0x1c1)],'dT':_0x8e0352(+_0x9aa019[_0x59a866(0x1b3)])[_0x59a866(0x202)](_0x59a866(0x1d4)),'personId':_0x9aa019[_0x59a866(0x1f2)]};}else{const _0x57a16a={'memberId':_0x5978c4,'unitId':_0x10f754,'content':_0x8ec671,'mention':_0x43c2f0},_0x5842eb=await this[_0x59a866(0x206)][_0x59a866(0x1a9)](_0x59a866(0x1d6)+_0x10f754+_0x59a866(0x1cd),{'body':_0x57a16a});return X(_0x5842eb[_0x59a866(0x1b2)][_0x59a866(0x1ae)],_0x4d1935);}}async[_0x36cf26(0x1fd)](_0x5c0f65){const _0x5d197c=_0x36cf26;var _0xb613f9,_0x1fed17;const {text:_0x317e6e,unitId:_0x31e7e6}=_0x5c0f65,_0x2559ba=(_0x1fed17=(_0xb613f9=_0x317e6e[_0x5d197c(0x1ec)])==null?void 0x0:_0xb613f9['filter'](_0x335bc3=>_0x335bc3[_0x5d197c(0x1a2)]===_0x1c6580[_0x5d197c(0x1e1)])[_0x5d197c(0x1f6)](_0x301ce3=>_0x301ce3['rangeId']))!=null?_0x1fed17:[],_0x37931a=JSON[_0x5d197c(0x1bc)](_0x317e6e),_0x35faaa=_0x5c0f65['threadId'],_0x40e206=_0x5c0f65['id'],_0x34ea47={'memberId':(await this['_sessionService']['requireSession'](_0x31e7e6))[_0x5d197c(0x1f9)](),'unitId':_0x31e7e6,'threadId':_0x35faaa,'mention':_0x2559ba,'content':_0x37931a,'replyId':_0x40e206},_0x1ade5f=await this[_0x5d197c(0x206)][_0x5d197c(0x1a9)]('/universer-api/comment/unit/'+_0x31e7e6+_0x5d197c(0x1c2),{'body':_0x34ea47});return!_0x1ade5f[_0x5d197c(0x1b2)][_0x5d197c(0x1b8)]||_0x1ade5f[_0x5d197c(0x1b2)]['error'][_0x5d197c(0x1af)]===0x1;}async[_0x36cf26(0x1f8)](_0x354d5b){const _0x364b24=_0x36cf26,{unitId:_0x1a7c57}=_0x354d5b,_0x5de33f=_0x354d5b[_0x364b24(0x1ed)],_0x236caf={'memberId':this[_0x364b24(0x1f1)][_0x364b24(0x1ee)]()['userID'],'unitId':_0x1a7c57,'threadId':_0x5de33f,'solved':_0x354d5b[_0x364b24(0x1dc)]?I['Solved']:I['OpenOrReOpen']},_0x250bb5=await this[_0x364b24(0x206)][_0x364b24(0x1a9)](_0x364b24(0x1d6)+_0x1a7c57+_0x364b24(0x1ce),{'body':_0x236caf});return!_0x250bb5['body'][_0x364b24(0x1b8)]||_0x250bb5[_0x364b24(0x1b2)][_0x364b24(0x1b8)][_0x364b24(0x1af)]===0x1;}async[_0x36cf26(0x1bb)](_0x4274be,_0x5ca0e5,_0x4b5ca0,_0x10d540){const _0x3c4c1f=_0x36cf26,_0x21aaab={'memberId':(await this[_0x3c4c1f(0x1e3)]['requireSession'](_0x4274be))[_0x3c4c1f(0x1f9)](),'threadId':_0x4b5ca0,'replyId':_0x10d540,'unitId':_0x4274be},_0x3fa3ec=await this['_httpService'][_0x3c4c1f(0x1a9)](_0x3c4c1f(0x1d6)+_0x4274be+_0x3c4c1f(0x1d1),{'body':_0x21aaab});return!_0x3fa3ec[_0x3c4c1f(0x1b2)][_0x3c4c1f(0x1b8)]||_0x3fa3ec[_0x3c4c1f(0x1b2)]['error'][_0x3c4c1f(0x1af)]===0x1;}async[_0x36cf26(0x1d0)](_0x784645,_0x760559,_0x42608f){const _0x21d655=_0x36cf26,_0x245e52={'unitId':_0x784645,'threadId':_0x42608f},_0x3b042d=await this['_httpService'][_0x21d655(0x1a9)]('/universer-api/comment/unit/'+_0x784645+_0x21d655(0x204),{'body':_0x245e52}),_0x3ed959=_0x42608f[_0x21d655(0x1f6)](_0x2e84b8=>ee(_0x3b042d[_0x21d655(0x1b2)]['comments'][_0x2e84b8],_0x784645,_0x760559))[_0x21d655(0x1e6)](Boolean);return Object[_0x21d655(0x1a5)](_0x3b042d[_0x21d655(0x1b2)][_0x21d655(0x203)])[_0x21d655(0x1ab)](_0x3863f0=>{const _0x257e78=_0x21d655;this[_0x257e78(0x1f1)][_0x257e78(0x1c9)](_0x3863f0);}),_0x3ed959;}[_0x36cf26(0x1a1)](_0x2b843f){const _0x20e88b=_0x36cf26;return{'id':_0x2b843f['id'],'threadId':_0x2b843f['threadId'],'ref':_0x2b843f[_0x20e88b(0x1e8)]};}};S=Q([b(0x0,_0x198cd5(_0x3fc487)),b(0x1,_0x198cd5(_0x58c1c8)),b(0x2,_0x198cd5(_0x2c5c35))],S);var re=Object[_0x36cf26(0x1fb)],te=(_0xee185,_0x2f99d3,_0x2cfd1f,_0x84bf89)=>{const _0x3fd391=_0x36cf26;for(var _0xf067bf=_0x84bf89>0x1?void 0x0:_0x84bf89?re(_0x2f99d3,_0x2cfd1f):_0x2f99d3,_0x5f3759=_0xee185[_0x3fd391(0x1f0)]-0x1,_0x4b396a;_0x5f3759>=0x0;_0x5f3759--)(_0x4b396a=_0xee185[_0x5f3759])&&(_0xf067bf=_0x4b396a(_0xf067bf)||_0xf067bf);return _0xf067bf;},M=(_0x2b4370,_0x31d5ad)=>(_0xd63ca1,_0x1b7b25)=>_0x31d5ad(_0xd63ca1,_0x1b7b25,_0x2b4370);let f=class extends _0x307552{constructor(_0x197aa1,_0x3cfaaf){const _0x1ffa8f=_0x36cf26;super(),this[_0x1ffa8f(0x1d8)]=_0x197aa1,this[_0x1ffa8f(0x200)]=_0x3cfaaf,this[_0x1ffa8f(0x1fa)]();}[_0x36cf26(0x1fa)](){const _0x519aad=_0x36cf26;this[_0x519aad(0x1d8)]['dataSource']=this[_0x519aad(0x200)],this[_0x519aad(0x1d8)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x1850ce),M(0x1,_0x198cd5(S))],f);var se=Object[_0x36cf26(0x1a6)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x231bbf,_0x1275e4,_0x199d57)=>_0x1275e4 in _0x231bbf?se(_0x231bbf,_0x1275e4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x199d57}):_0x231bbf[_0x1275e4]=_0x199d57,ie=(_0x3a79ba,_0x18423f,_0x3e40ee,_0x1ebeae)=>{const _0x2c5ff0=_0x36cf26;for(var _0x26c2cf=_0x1ebeae>0x1?void 0x0:_0x1ebeae?oe(_0x18423f,_0x3e40ee):_0x18423f,_0x4bd729=_0x3a79ba[_0x2c5ff0(0x1f0)]-0x1,_0x500696;_0x4bd729>=0x0;_0x4bd729--)(_0x500696=_0x3a79ba[_0x4bd729])&&(_0x26c2cf=_0x500696(_0x26c2cf)||_0x26c2cf);return _0x26c2cf;},N=(_0x66c31e,_0x6f7bd0)=>(_0x4e60f4,_0x525aff)=>_0x6f7bd0(_0x4e60f4,_0x525aff,_0x66c31e),$=(_0x9ac0d5,_0x518b53,_0x4cc8f5)=>ne(_0x9ac0d5,typeof _0x518b53!='symbol'?_0x518b53+'':_0x518b53,_0x4cc8f5);let g=class extends _0x31d320{constructor(_0x23a878=O,_0x1c9f45,_0x3179dc){const _0xd5987a=_0x36cf26;super(),this[_0xd5987a(0x1e0)]=_0x23a878,this[_0xd5987a(0x1d7)]=_0x1c9f45,this['_configService']=_0x3179dc;const {..._0x7d090c}=_0x38f854({},O,this[_0xd5987a(0x1e0)]);this[_0xd5987a(0x1fc)][_0xd5987a(0x1b7)](z,_0x7d090c);}[_0x36cf26(0x1c3)](){[[S],[f],[_]]['forEach'](_0x2801c7=>{const _0x52a294=_0x14cc;this[_0x52a294(0x1d7)][_0x52a294(0x1c0)](_0x2801c7);});}['onReady'](){const _0x4c7b08=_0x36cf26;this[_0x4c7b08(0x1d7)]['get'](f),this[_0x4c7b08(0x1d7)]['get'](_);}};$(g,_0x36cf26(0x1e5),W),$(g,_0x36cf26(0x1c4),_0xe103b3[_0x36cf26(0x1b4)]),g=ie([_0x574e8a(_0x2e2bfc,_0x25931d,_0x22a647),N(0x1,_0x198cd5(_0x1cb825)),N(0x2,_0x3e8e81)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xe6a052=_0x4fcb;(function(_0x24bf2d,_0x4f925b){const _0x7e76f8=_0x4fcb,_0x347f4d=_0x24bf2d();while(!![]){try{const _0x5d0bd8=parseInt(_0x7e76f8(0x1a2))/0x1+parseInt(_0x7e76f8(0x1a1))/0x2*(-parseInt(_0x7e76f8(0x17f))/0x3)+parseInt(_0x7e76f8(0x19d))/0x4+parseInt(_0x7e76f8(0x166))/0x5+parseInt(_0x7e76f8(0x160))/0x6+parseInt(_0x7e76f8(0x13f))/0x7*(parseInt(_0x7e76f8(0x15a))/0x8)+-parseInt(_0x7e76f8(0x164))/0x9;if(_0x5d0bd8===_0x4f925b)break;else _0x347f4d['push'](_0x347f4d['shift']());}catch(_0x38de5c){_0x347f4d['push'](_0x347f4d['shift']());}}}(_0x4b0e,0xef927));import{CommentService as _0xb08f,CollaborationSessionService as _0x567848,UniverCollaborationClientPlugin as _0x5ad52c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2fbf2b}from'@univerjs-pro/license';import{dayjs as _0x13a1d2,UserManagerService as _0x38029a,Inject as _0x12192d,Injector as _0xf533d4,Disposable as _0x2c54e0,CustomRangeType as _0x109d28,UniverInstanceType as _0x3870f6,DependentOn as _0x3bfe6e,IConfigService as _0x2536f6,Plugin as _0x348a81,merge as _0x20dbf3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4c1e57}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x38ef02,IThreadCommentDataSourceService as _0x292b6b}from'@univerjs/thread-comment';function _0x4b0e(){const _0x148abd=['259862nRqodf','map','updateComment','rangeId','Edit','112GBCSbs','find','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','payload','addUser','size','solved','createTimestamp','format','_commentService','unitId','UNRECOGNIZED','symbol','/universer-api/user/list','_init','content','personId','filter','length','onStarting','stringify','rangeType','/list','pipe','_threadCommentDataSource','users','_initDataSource','250784IPgRwp','user','_threadCommentModel','get','post','/solved','1787670PPPbVs','body','replyId','slice','9090018NCQebj','parentId','8100085tYIXBn','pluginName','Add','customRanges','resolved','YYYY/MM/DD\x20HH:mm','Reply','_injector','delete','userID','forEach','_configService','Solve','OpenOrReOpen','userId','_httpService','_sessionService','onReady','commentUpdate$','comments','listComments','root','COMMENT','add','disposeWithMe','30RSChrF','deleteComment','reply','getMemberID','subscribe','requireSession','_threadCommentDataSourceService','code','Delete','getUnit','/add','_config','threadId','Solved','/universer-api/comment/unit/','Unknown','resolveComment','getCurrentUser','error','dataSource','getOwnPropertyDescriptor','_userService','replies','type','getComment','saveCommentToSnapshot','_initUserSync','values','thread-comment-data-source.config','defineProperty','4762428XHmqFc','parse','addComment','/edit','375742UBBABf'];_0x4b0e=function(){return _0x148abd;};return _0x4b0e();}import{bufferTime as _0x26be54}from'rxjs';import{HTTPService as _0x486692}from'@univerjs/network';const W=_0xe6a052(0x141);var I=(_0x12fb0b=>(_0x12fb0b[_0x12fb0b[_0xe6a052(0x173)]=0x0]=_0xe6a052(0x173),_0x12fb0b[_0x12fb0b['Solved']=0x1]=_0xe6a052(0x18c),_0x12fb0b[_0x12fb0b['UNRECOGNIZED']=-0x1]=_0xe6a052(0x14a),_0x12fb0b))(I||{}),v=(_0x475ce0=>(_0x475ce0[_0x475ce0[_0xe6a052(0x18e)]=0x0]='Unknown',_0x475ce0[_0x475ce0[_0xe6a052(0x168)]=0x1]=_0xe6a052(0x168),_0x475ce0[_0x475ce0[_0xe6a052(0x16c)]=0x2]=_0xe6a052(0x16c),_0x475ce0[_0x475ce0[_0xe6a052(0x13e)]=0x3]='Edit',_0x475ce0[_0x475ce0[_0xe6a052(0x187)]=0x4]=_0xe6a052(0x187),_0x475ce0[_0x475ce0[_0xe6a052(0x172)]=0x5]=_0xe6a052(0x172),_0x475ce0[_0x475ce0[_0xe6a052(0x14a)]=-0x1]=_0xe6a052(0x14a),_0x475ce0))(v||{});const y=_0x21d1d8=>_0x13a1d2(new Date(+_0x21d1d8))[_0xe6a052(0x147)](_0xe6a052(0x16b)),B=async(_0x3d10f5,_0x37c479)=>{const _0x1ff679=_0xe6a052,_0x56d22c=_0x3d10f5[_0x1ff679(0x15d)](_0x38029a),_0x2e17f9=_0x3d10f5[_0x1ff679(0x15d)](_0x486692);_0x37c479[_0x1ff679(0x170)](_0x72a39a=>{const _0x5ab5eb=_0x1ff679;_0x56d22c['getUser'](_0x72a39a)&&_0x37c479[_0x5ab5eb(0x16e)](_0x72a39a);}),_0x37c479[_0x1ff679(0x144)]&&(await _0x2e17f9[_0x1ff679(0x15d)](_0x1ff679(0x14c),{'params':{'userIDs':[..._0x37c479]}}))[_0x1ff679(0x161)][_0x1ff679(0x158)]['forEach'](_0xb175b8=>{const _0x317093=_0x1ff679;_0xb175b8&&_0x56d22c[_0x317093(0x143)](_0xb175b8);});};function _0x4fcb(_0x405347,_0x34f04e){_0x405347=_0x405347-0x13d;const _0x4b0e98=_0x4b0e();let _0x4fcb05=_0x4b0e98[_0x405347];return _0x4fcb05;}var K=Object['getOwnPropertyDescriptor'],V=(_0x5b1ef9,_0xdf9bbd,_0x17667b,_0x39b8a0)=>{for(var _0x3dc491=_0x39b8a0>0x1?void 0x0:_0x39b8a0?K(_0xdf9bbd,_0x17667b):_0xdf9bbd,_0x52b412=_0x5b1ef9['length']-0x1,_0x27386e;_0x52b412>=0x0;_0x52b412--)(_0x27386e=_0x5b1ef9[_0x52b412])&&(_0x3dc491=_0x27386e(_0x3dc491)||_0x3dc491);return _0x3dc491;},p=(_0x36b307,_0x42fa51)=>(_0x4feef0,_0x44690c)=>_0x42fa51(_0x4feef0,_0x44690c,_0x36b307);let _=class extends _0x2c54e0{constructor(_0x1d15a4,_0x181d93,_0x18b03b,_0x52786a){const _0x71fad4=_0xe6a052;super(),this['_commentService']=_0x1d15a4,this[_0x71fad4(0x15c)]=_0x181d93,this[_0x71fad4(0x194)]=_0x18b03b,this[_0x71fad4(0x16d)]=_0x52786a,this[_0x71fad4(0x14d)](),this[_0x71fad4(0x199)]();}['_initUserSync'](){const _0x2eb814=_0xe6a052;this[_0x2eb814(0x17e)](this[_0x2eb814(0x15c)][_0x2eb814(0x178)][_0x2eb814(0x156)](_0x26be54(0x10))['subscribe'](_0x3a642a=>{const _0x2ca5a0=_0x2eb814,_0x51c038=new Set();_0x3a642a['forEach'](_0x59daf8=>{const _0x3f0685=_0x4fcb;if(_0x59daf8[_0x3f0685(0x196)]===_0x3f0685(0x17d)){const _0x543e2e=_0x59daf8[_0x3f0685(0x142)][_0x3f0685(0x14f)];_0x51c038[_0x3f0685(0x17d)](_0x543e2e);}}),B(this[_0x2ca5a0(0x16d)],_0x51c038);}));}['_init'](){const _0x1da173=_0xe6a052;this[_0x1da173(0x17e)](this[_0x1da173(0x148)][_0x1da173(0x178)][_0x1da173(0x183)](async _0x440938=>{const _0x2f9c48=_0x1da173;var _0xcf35fd,_0x198d5e,_0x270bd2,_0x201a10;const _0x2b1dd3=(_0xcf35fd=this['_threadCommentModel'][_0x2f9c48(0x188)](_0x440938[_0x2f9c48(0x149)])['find'](_0xb5e806=>_0xb5e806[_0x2f9c48(0x18b)]===_0x440938[_0x2f9c48(0x18b)]))==null?void 0x0:_0xcf35fd['root'];if(!_0x2b1dd3)return;const {unitId:_0x193aee,subUnitId:_0xf933cd}=_0x2b1dd3;switch(_0x440938[_0x2f9c48(0x15b)]&&this[_0x2f9c48(0x194)]['addUser'](_0x440938[_0x2f9c48(0x15b)]),_0x440938[_0x2f9c48(0x196)]){case v['Add']:break;case v[_0x2f9c48(0x16c)]:{this[_0x2f9c48(0x15c)]['addComment'](_0x193aee,_0xf933cd,{'unitId':_0x193aee,'subUnitId':_0xf933cd,'ref':'','id':_0x440938[_0x2f9c48(0x162)],'dT':y(+_0x440938[_0x2f9c48(0x146)]),'threadId':_0x440938['threadId'],'personId':(_0x270bd2=(_0x198d5e=_0x440938[_0x2f9c48(0x15b)])==null?void 0x0:_0x198d5e[_0x2f9c48(0x16f)])!=null?_0x270bd2:_0x440938[_0x2f9c48(0x174)],'text':JSON['parse'](_0x440938['content']),'parentId':_0x2b1dd3['id']});break;}case v['Delete']:{const _0x50226b=this[_0x2f9c48(0x15c)][_0x2f9c48(0x197)](_0x193aee,_0xf933cd,_0x440938[_0x2f9c48(0x162)]);_0x50226b&&_0x50226b[_0x2f9c48(0x165)]&&this[_0x2f9c48(0x15c)]['deleteComment'](_0x193aee,_0xf933cd,_0x440938['replyId']);break;}case v['Edit']:{this[_0x2f9c48(0x15c)][_0x2f9c48(0x1a4)](_0x193aee,_0xf933cd,{'commentId':_0x440938[_0x2f9c48(0x162)],'text':JSON[_0x2f9c48(0x19e)](_0x440938[_0x2f9c48(0x14e)])});break;}case v[_0x2f9c48(0x172)]:{const _0x2b69e0=(_0x201a10=this[_0x2f9c48(0x15c)][_0x2f9c48(0x188)](_0x440938[_0x2f9c48(0x149)])[_0x2f9c48(0x140)](_0x2289b8=>_0x2289b8['threadId']===_0x440938['threadId']))==null?void 0x0:_0x201a10[_0x2f9c48(0x17b)];_0x2b69e0&&this[_0x2f9c48(0x15c)]['resolveComment'](_0x193aee,_0xf933cd,_0x2b69e0['id'],_0x440938[_0x2f9c48(0x145)]===I[_0x2f9c48(0x18c)]);break;}}}));}};_=V([p(0x0,_0x12192d(_0xb08f)),p(0x1,_0x12192d(_0x38ef02)),p(0x2,_0x12192d(_0x38029a)),p(0x3,_0x12192d(_0xf533d4))],_);const z=_0xe6a052(0x19b),O={};var k=Object[_0xe6a052(0x193)],Q=(_0x3e436f,_0x342a09,_0x235486,_0x395e32)=>{const _0x17517e=_0xe6a052;for(var _0xe70f30=_0x395e32>0x1?void 0x0:_0x395e32?k(_0x342a09,_0x235486):_0x342a09,_0x9acd04=_0x3e436f[_0x17517e(0x151)]-0x1,_0x2a9430;_0x9acd04>=0x0;_0x9acd04--)(_0x2a9430=_0x3e436f[_0x9acd04])&&(_0xe70f30=_0x2a9430(_0xe70f30)||_0xe70f30);return _0xe70f30;},b=(_0x5e3d88,_0x17fb4b)=>(_0x916747,_0x34bfe0)=>_0x17fb4b(_0x916747,_0x34bfe0,_0x5e3d88);function X(_0x225c7d,_0x121dbb){const _0x5d6d65=_0xe6a052,_0x4223e6=_0x225c7d[_0x5d6d65(0x195)][0x0];return{..._0x121dbb,'id':_0x4223e6[_0x5d6d65(0x162)],'resolved':_0x225c7d[_0x5d6d65(0x145)]===0x1,'dT':y(_0x4223e6[_0x5d6d65(0x146)]),'personId':_0x4223e6['userId'],'threadId':_0x4223e6[_0x5d6d65(0x18b)]};}function ee(_0x51a597,_0x48ca9c,_0x15ba24){const _0x5be51a=_0xe6a052;var _0x399abb,_0x269511;if(((_0x269511=(_0x399abb=_0x51a597==null?void 0x0:_0x51a597[_0x5be51a(0x195)])==null?void 0x0:_0x399abb[_0x5be51a(0x151)])!=null?_0x269511:0x0)>0x0){const _0x299127=(_0x5b580a,_0x36315a)=>({'id':_0x5b580a[_0x5be51a(0x162)],'threadId':_0x5b580a[_0x5be51a(0x18b)],'dT':y(_0x5b580a[_0x5be51a(0x146)]),'personId':_0x5b580a[_0x5be51a(0x174)],'resolved':_0x51a597[_0x5be51a(0x145)]===I[_0x5be51a(0x18c)],'unitId':_0x48ca9c,'subUnitId':_0x15ba24,'text':JSON[_0x5be51a(0x19e)](_0x5b580a[_0x5be51a(0x14e)]),'parentId':_0x36315a}),_0x57e257=_0x299127(_0x51a597['replies'][0x0]);return{..._0x57e257,'children':_0x51a597[_0x5be51a(0x195)][_0x5be51a(0x163)](0x1)[_0x5be51a(0x1a3)](_0x4e1e55=>_0x299127(_0x4e1e55,_0x57e257['id']))};}return null;}let S=class{constructor(_0x2fb2af,_0x331a75,_0x201029){const _0x31526c=_0xe6a052;this['_httpService']=_0x2fb2af,this[_0x31526c(0x194)]=_0x331a75,this[_0x31526c(0x176)]=_0x201029;}async[_0xe6a052(0x19f)](_0x4f4d22){const _0x941846=_0xe6a052;var _0x4a4924,_0x2a81ca;const {parentId:_0x40f5eb,unitId:_0x35db58,text:_0x4b9e4a,threadId:_0x226d71}=_0x4f4d22,_0x3bfcfa=(_0x2a81ca=(_0x4a4924=_0x4b9e4a[_0x941846(0x169)])==null?void 0x0:_0x4a4924[_0x941846(0x150)](_0x119034=>_0x119034['rangeType']===_0x109d28['COMMENT'])['map'](_0x2d7baf=>_0x2d7baf[_0x941846(0x13d)]))!=null?_0x2a81ca:[],_0xccb6a7=JSON[_0x941846(0x153)](_0x4b9e4a),_0x3559d5=(await this[_0x941846(0x176)][_0x941846(0x184)](_0x35db58))[_0x941846(0x182)]();if(_0x40f5eb){const _0x4b0454={'memberId':_0x3559d5,'unitId':_0x35db58,'content':_0xccb6a7,'mention':_0x3bfcfa,'threadId':_0x226d71},_0x2551c6=(await this[_0x941846(0x175)][_0x941846(0x15e)](_0x941846(0x18d)+_0x35db58+'/reply',{'body':_0x4b0454}))['body'][_0x941846(0x181)];return{..._0x4f4d22,'id':_0x2551c6[_0x941846(0x162)],'dT':_0x13a1d2(+_0x2551c6[_0x941846(0x146)])[_0x941846(0x147)](_0x941846(0x16b)),'personId':_0x2551c6[_0x941846(0x174)]};}else{const _0x2fe52f={'memberId':_0x3559d5,'unitId':_0x35db58,'content':_0xccb6a7,'mention':_0x3bfcfa},_0x57f240=await this[_0x941846(0x175)][_0x941846(0x15e)]('/universer-api/comment/unit/'+_0x35db58+_0x941846(0x189),{'body':_0x2fe52f});return X(_0x57f240['body']['comment'],_0x4f4d22);}}async[_0xe6a052(0x1a4)](_0x204d2c){const _0x4af545=_0xe6a052;var _0x50c019,_0x5b41f5;const {text:_0x174606,unitId:_0x590a43}=_0x204d2c,_0x2f3573=(_0x5b41f5=(_0x50c019=_0x174606[_0x4af545(0x169)])==null?void 0x0:_0x50c019[_0x4af545(0x150)](_0x3e709c=>_0x3e709c[_0x4af545(0x154)]===_0x109d28[_0x4af545(0x17c)])[_0x4af545(0x1a3)](_0x2f5c51=>_0x2f5c51[_0x4af545(0x13d)]))!=null?_0x5b41f5:[],_0x3b2046=JSON[_0x4af545(0x153)](_0x174606),_0x1ab213=_0x204d2c[_0x4af545(0x18b)],_0x2251fa=_0x204d2c['id'],_0x458644={'memberId':(await this[_0x4af545(0x176)][_0x4af545(0x184)](_0x590a43))[_0x4af545(0x182)](),'unitId':_0x590a43,'threadId':_0x1ab213,'mention':_0x2f3573,'content':_0x3b2046,'replyId':_0x2251fa},_0x34cc7f=await this[_0x4af545(0x175)][_0x4af545(0x15e)](_0x4af545(0x18d)+_0x590a43+_0x4af545(0x1a0),{'body':_0x458644});return!_0x34cc7f[_0x4af545(0x161)][_0x4af545(0x191)]||_0x34cc7f[_0x4af545(0x161)][_0x4af545(0x191)][_0x4af545(0x186)]===0x1;}async[_0xe6a052(0x18f)](_0x5f43cf){const _0x2aba21=_0xe6a052,{unitId:_0xdf3484}=_0x5f43cf,_0x55e94e=_0x5f43cf[_0x2aba21(0x18b)],_0x50c4ed={'memberId':this['_userService'][_0x2aba21(0x190)]()[_0x2aba21(0x16f)],'unitId':_0xdf3484,'threadId':_0x55e94e,'solved':_0x5f43cf[_0x2aba21(0x16a)]?I[_0x2aba21(0x18c)]:I[_0x2aba21(0x173)]},_0x16a97e=await this['_httpService'][_0x2aba21(0x15e)](_0x2aba21(0x18d)+_0xdf3484+_0x2aba21(0x15f),{'body':_0x50c4ed});return!_0x16a97e[_0x2aba21(0x161)][_0x2aba21(0x191)]||_0x16a97e['body']['error'][_0x2aba21(0x186)]===0x1;}async[_0xe6a052(0x180)](_0x271530,_0xf50eb9,_0x28df2e,_0x248c8c){const _0x3836f7=_0xe6a052,_0xd3644f={'memberId':(await this[_0x3836f7(0x176)]['requireSession'](_0x271530))[_0x3836f7(0x182)](),'threadId':_0x28df2e,'replyId':_0x248c8c,'unitId':_0x271530},_0x275028=await this[_0x3836f7(0x175)][_0x3836f7(0x15e)](_0x3836f7(0x18d)+_0x271530+'/delete',{'body':_0xd3644f});return!_0x275028[_0x3836f7(0x161)][_0x3836f7(0x191)]||_0x275028[_0x3836f7(0x161)][_0x3836f7(0x191)]['code']===0x1;}async[_0xe6a052(0x17a)](_0x4453c1,_0x6434b7,_0x1ee2a3){const _0x25e3f4=_0xe6a052,_0x2d3f00={'unitId':_0x4453c1,'threadId':_0x1ee2a3},_0x2be0c7=await this[_0x25e3f4(0x175)]['post'](_0x25e3f4(0x18d)+_0x4453c1+_0x25e3f4(0x155),{'body':_0x2d3f00}),_0xe05332=_0x1ee2a3[_0x25e3f4(0x1a3)](_0xedfe4e=>ee(_0x2be0c7[_0x25e3f4(0x161)][_0x25e3f4(0x179)][_0xedfe4e],_0x4453c1,_0x6434b7))[_0x25e3f4(0x150)](Boolean);return Object[_0x25e3f4(0x19a)](_0x2be0c7[_0x25e3f4(0x161)][_0x25e3f4(0x158)])[_0x25e3f4(0x170)](_0x5b1dbd=>{const _0x21e398=_0x25e3f4;this['_userService'][_0x21e398(0x143)](_0x5b1dbd);}),_0xe05332;}[_0xe6a052(0x198)](_0x2f98b8){const _0x509092=_0xe6a052;return{'id':_0x2f98b8['id'],'threadId':_0x2f98b8[_0x509092(0x18b)],'ref':_0x2f98b8['ref']};}};S=Q([b(0x0,_0x12192d(_0x486692)),b(0x1,_0x12192d(_0x38029a)),b(0x2,_0x12192d(_0x567848))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x2dda0e,_0x200e47,_0x463783,_0x11be95)=>{const _0x2c1743=_0xe6a052;for(var _0x3c821d=_0x11be95>0x1?void 0x0:_0x11be95?re(_0x200e47,_0x463783):_0x200e47,_0x3c887b=_0x2dda0e[_0x2c1743(0x151)]-0x1,_0x5c5162;_0x3c887b>=0x0;_0x3c887b--)(_0x5c5162=_0x2dda0e[_0x3c887b])&&(_0x3c821d=_0x5c5162(_0x3c821d)||_0x3c821d);return _0x3c821d;},M=(_0x251002,_0x4e911e)=>(_0x315f61,_0x22d594)=>_0x4e911e(_0x315f61,_0x22d594,_0x251002);let f=class extends _0x2c54e0{constructor(_0x214b15,_0x899d0e){const _0x268dc6=_0xe6a052;super(),this['_threadCommentDataSourceService']=_0x214b15,this[_0x268dc6(0x157)]=_0x899d0e,this['_initDataSource']();}[_0xe6a052(0x159)](){const _0x1d1a56=_0xe6a052;this[_0x1d1a56(0x185)][_0x1d1a56(0x192)]=this[_0x1d1a56(0x157)],this[_0x1d1a56(0x185)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x292b6b),M(0x1,_0x12192d(S))],f);var se=Object[_0xe6a052(0x19c)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1f4026,_0x2caddf,_0x3d9fa6)=>_0x2caddf in _0x1f4026?se(_0x1f4026,_0x2caddf,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3d9fa6}):_0x1f4026[_0x2caddf]=_0x3d9fa6,ie=(_0x1e6e22,_0x374349,_0x45c5d2,_0x56e1a3)=>{const _0x27a7dd=_0xe6a052;for(var _0x4577e5=_0x56e1a3>0x1?void 0x0:_0x56e1a3?oe(_0x374349,_0x45c5d2):_0x374349,_0x4bae33=_0x1e6e22[_0x27a7dd(0x151)]-0x1,_0x55e71f;_0x4bae33>=0x0;_0x4bae33--)(_0x55e71f=_0x1e6e22[_0x4bae33])&&(_0x4577e5=_0x55e71f(_0x4577e5)||_0x4577e5);return _0x4577e5;},N=(_0x5952e0,_0x2439fe)=>(_0x44757f,_0x1fe3a5)=>_0x2439fe(_0x44757f,_0x1fe3a5,_0x5952e0),$=(_0x43f1a5,_0x37509a,_0x5aed8c)=>ne(_0x43f1a5,typeof _0x37509a!=_0xe6a052(0x14b)?_0x37509a+'':_0x37509a,_0x5aed8c);let g=class extends _0x348a81{constructor(_0x43b060=O,_0x56fb0b,_0xdb6bf4){const _0x3b877e=_0xe6a052;super(),this[_0x3b877e(0x18a)]=_0x43b060,this[_0x3b877e(0x16d)]=_0x56fb0b,this['_configService']=_0xdb6bf4;const {..._0x592d69}=_0x20dbf3({},O,this[_0x3b877e(0x18a)]);this[_0x3b877e(0x171)]['setConfig'](z,_0x592d69);}[_0xe6a052(0x152)](){const _0x45b801=_0xe6a052;[[S],[f],[_]][_0x45b801(0x170)](_0x5c8711=>{const _0x3fa95d=_0x45b801;this[_0x3fa95d(0x16d)]['add'](_0x5c8711);});}[_0xe6a052(0x177)](){const _0x11b704=_0xe6a052;this[_0x11b704(0x16d)]['get'](f),this[_0x11b704(0x16d)][_0x11b704(0x15d)](_);}};$(g,_0xe6a052(0x167),W),$(g,'type',_0x3870f6['UNIVER_UNKNOWN']),g=ie([_0x3bfe6e(_0x4c1e57,_0x5ad52c,_0x2fbf2b),N(0x1,_0x12192d(_0xf533d4)),N(0x2,_0x2536f6)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x36cf26=_0x14cc;function _0x14cc(_0x58ea9f,_0x239878){_0x58ea9f=_0x58ea9f-0x1a1;const _0x216faf=_0x216f();let _0x14cc17=_0x216faf[_0x58ea9f];return _0x14cc17;}(function(_0x726610,_0x5ac411){const _0xb0c06d=_0x14cc,_0x104eea=_0x726610();while(!![]){try{const _0x18b4c5=-parseInt(_0xb0c06d(0x1e9))/0x1*(-parseInt(_0xb0c06d(0x1a8))/0x2)+-parseInt(_0xb0c06d(0x1d2))/0x3+-parseInt(_0xb0c06d(0x1cf))/0x4*(parseInt(_0xb0c06d(0x1de))/0x5)+-parseInt(_0xb0c06d(0x1b1))/0x6+parseInt(_0xb0c06d(0x1e4))/0x7+-parseInt(_0xb0c06d(0x1aa))/0x8+parseInt(_0xb0c06d(0x1ac))/0x9;if(_0x18b4c5===_0x5ac411)break;else _0x104eea['push'](_0x104eea['shift']());}catch(_0x485782){_0x104eea['push'](_0x104eea['shift']());}}}(_0x216f,0xbd8d1));import{CommentService as _0x447352,CollaborationSessionService as _0x2c5c35,UniverCollaborationClientPlugin as _0x25931d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x22a647}from'@univerjs-pro/license';import{dayjs as _0x8e0352,UserManagerService as _0x58c1c8,Inject as _0x198cd5,Injector as _0x1cb825,Disposable as _0x307552,CustomRangeType as _0x1c6580,UniverInstanceType as _0xe103b3,DependentOn as _0x574e8a,IConfigService as _0x3e8e81,Plugin as _0x31d320,merge as _0x38f854}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2e2bfc}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3d52ec,IThreadCommentDataSourceService as _0x1850ce}from'@univerjs/thread-comment';import{bufferTime as _0x31fefb}from'rxjs';import{HTTPService as _0x3fc487}from'@univerjs/network';const W=_0x36cf26(0x205);var I=(_0x46f1eb=>(_0x46f1eb[_0x46f1eb[_0x36cf26(0x1dd)]=0x0]='OpenOrReOpen',_0x46f1eb[_0x46f1eb['Solved']=0x1]=_0x36cf26(0x1d9),_0x46f1eb[_0x46f1eb['UNRECOGNIZED']=-0x1]=_0x36cf26(0x1ff),_0x46f1eb))(I||{}),v=(_0x366877=>(_0x366877[_0x366877[_0x36cf26(0x1ba)]=0x0]='Unknown',_0x366877[_0x366877['Add']=0x1]='Add',_0x366877[_0x366877['Reply']=0x2]=_0x36cf26(0x1d5),_0x366877[_0x366877[_0x36cf26(0x1cb)]=0x3]=_0x36cf26(0x1cb),_0x366877[_0x366877[_0x36cf26(0x1c5)]=0x4]=_0x36cf26(0x1c5),_0x366877[_0x366877[_0x36cf26(0x1c7)]=0x5]='Solve',_0x366877[_0x366877[_0x36cf26(0x1ff)]=-0x1]=_0x36cf26(0x1ff),_0x366877))(v||{});const y=_0x2c9e2e=>_0x8e0352(new Date(+_0x2c9e2e))[_0x36cf26(0x202)](_0x36cf26(0x1d4)),B=async(_0x317dac,_0x5c079c)=>{const _0x269c17=_0x36cf26,_0x3f568a=_0x317dac[_0x269c17(0x1bf)](_0x58c1c8),_0x5521ea=_0x317dac[_0x269c17(0x1bf)](_0x3fc487);_0x5c079c[_0x269c17(0x1ab)](_0x265c0f=>{const _0x23812d=_0x269c17;_0x3f568a[_0x23812d(0x1e2)](_0x265c0f)&&_0x5c079c['delete'](_0x265c0f);}),_0x5c079c[_0x269c17(0x1df)]&&(await _0x5521ea[_0x269c17(0x1bf)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5c079c]}}))[_0x269c17(0x1b2)][_0x269c17(0x203)]['forEach'](_0x2b8dbd=>{const _0x52be3c=_0x269c17;_0x2b8dbd&&_0x3f568a[_0x52be3c(0x1c9)](_0x2b8dbd);});};var K=Object[_0x36cf26(0x1fb)],V=(_0x2f4a83,_0x2594f6,_0x46fa24,_0x2a0b16)=>{for(var _0x1812da=_0x2a0b16>0x1?void 0x0:_0x2a0b16?K(_0x2594f6,_0x46fa24):_0x2594f6,_0x3b5ace=_0x2f4a83['length']-0x1,_0x56d4da;_0x3b5ace>=0x0;_0x3b5ace--)(_0x56d4da=_0x2f4a83[_0x3b5ace])&&(_0x1812da=_0x56d4da(_0x1812da)||_0x1812da);return _0x1812da;},p=(_0x211937,_0x2e7498)=>(_0x1bd517,_0x2e47c2)=>_0x2e7498(_0x1bd517,_0x2e47c2,_0x211937);let _=class extends _0x307552{constructor(_0x8ee7ca,_0x1df3d5,_0xb48c0,_0x54bb5c){const _0x3d0173=_0x36cf26;super(),this['_commentService']=_0x8ee7ca,this['_threadCommentModel']=_0x1df3d5,this[_0x3d0173(0x1f1)]=_0xb48c0,this[_0x3d0173(0x1d7)]=_0x54bb5c,this[_0x3d0173(0x1a3)](),this[_0x3d0173(0x1fe)]();}['_initUserSync'](){const _0x3a652c=_0x36cf26;this[_0x3a652c(0x1c6)](this[_0x3a652c(0x1f4)][_0x3a652c(0x1f3)][_0x3a652c(0x1db)](_0x31fefb(0x10))[_0x3a652c(0x1c8)](_0x19aa2c=>{const _0x10d940=_0x3a652c,_0x4c5f47=new Set();_0x19aa2c[_0x10d940(0x1ab)](_0x4a14dd=>{const _0x3f06f2=_0x10d940;if(_0x4a14dd[_0x3f06f2(0x1c4)]==='add'){const _0x115f1d=_0x4a14dd[_0x3f06f2(0x1bd)][_0x3f06f2(0x1ad)];_0x4c5f47[_0x3f06f2(0x1c0)](_0x115f1d);}}),B(this[_0x10d940(0x1d7)],_0x4c5f47);}));}[_0x36cf26(0x1a3)](){const _0x54c596=_0x36cf26;this['disposeWithMe'](this['_commentService'][_0x54c596(0x1f3)][_0x54c596(0x1c8)](async _0x22d5cb=>{const _0x420aa2=_0x54c596;var _0x29b3d2,_0x5399ce,_0x21b023,_0x4a6fb0;const _0x521912=(_0x29b3d2=this[_0x420aa2(0x1f4)][_0x420aa2(0x1f7)](_0x22d5cb['unitId'])[_0x420aa2(0x1cc)](_0x45b81f=>_0x45b81f[_0x420aa2(0x1ed)]===_0x22d5cb[_0x420aa2(0x1ed)]))==null?void 0x0:_0x29b3d2[_0x420aa2(0x1eb)];if(!_0x521912)return;const {unitId:_0x1d066c,subUnitId:_0x26ebf7}=_0x521912;switch(_0x22d5cb[_0x420aa2(0x1a4)]&&this[_0x420aa2(0x1f1)][_0x420aa2(0x1c9)](_0x22d5cb[_0x420aa2(0x1a4)]),_0x22d5cb[_0x420aa2(0x1c4)]){case v[_0x420aa2(0x1b9)]:break;case v['Reply']:{this[_0x420aa2(0x1f4)]['addComment'](_0x1d066c,_0x26ebf7,{'unitId':_0x1d066c,'subUnitId':_0x26ebf7,'ref':'','id':_0x22d5cb[_0x420aa2(0x1c1)],'dT':y(+_0x22d5cb[_0x420aa2(0x1b3)]),'threadId':_0x22d5cb[_0x420aa2(0x1ed)],'personId':(_0x21b023=(_0x5399ce=_0x22d5cb[_0x420aa2(0x1a4)])==null?void 0x0:_0x5399ce[_0x420aa2(0x1d3)])!=null?_0x21b023:_0x22d5cb['userId'],'text':JSON['parse'](_0x22d5cb[_0x420aa2(0x1a7)]),'parentId':_0x521912['id']});break;}case v[_0x420aa2(0x1c5)]:{const _0x5bcc35=this[_0x420aa2(0x1f4)][_0x420aa2(0x1b0)](_0x1d066c,_0x26ebf7,_0x22d5cb['replyId']);_0x5bcc35&&_0x5bcc35[_0x420aa2(0x201)]&&this[_0x420aa2(0x1f4)]['deleteComment'](_0x1d066c,_0x26ebf7,_0x22d5cb[_0x420aa2(0x1c1)]);break;}case v[_0x420aa2(0x1cb)]:{this[_0x420aa2(0x1f4)][_0x420aa2(0x1fd)](_0x1d066c,_0x26ebf7,{'commentId':_0x22d5cb[_0x420aa2(0x1c1)],'text':JSON[_0x420aa2(0x1da)](_0x22d5cb['content'])});break;}case v['Solve']:{const _0x360b49=(_0x4a6fb0=this['_threadCommentModel'][_0x420aa2(0x1f7)](_0x22d5cb[_0x420aa2(0x1b5)])[_0x420aa2(0x1cc)](_0x564b5f=>_0x564b5f[_0x420aa2(0x1ed)]===_0x22d5cb[_0x420aa2(0x1ed)]))==null?void 0x0:_0x4a6fb0[_0x420aa2(0x1eb)];_0x360b49&&this['_threadCommentModel'][_0x420aa2(0x1f8)](_0x1d066c,_0x26ebf7,_0x360b49['id'],_0x22d5cb['solved']===I[_0x420aa2(0x1d9)]);break;}}}));}};_=V([p(0x0,_0x198cd5(_0x447352)),p(0x1,_0x198cd5(_0x3d52ec)),p(0x2,_0x198cd5(_0x58c1c8)),p(0x3,_0x198cd5(_0x1cb825))],_);const z=_0x36cf26(0x1ef),O={};var k=Object[_0x36cf26(0x1fb)],Q=(_0x2e5ba5,_0x1320fc,_0x5cf073,_0x4ff179)=>{const _0x303b4d=_0x36cf26;for(var _0x5c516b=_0x4ff179>0x1?void 0x0:_0x4ff179?k(_0x1320fc,_0x5cf073):_0x1320fc,_0x3c12d6=_0x2e5ba5[_0x303b4d(0x1f0)]-0x1,_0x569194;_0x3c12d6>=0x0;_0x3c12d6--)(_0x569194=_0x2e5ba5[_0x3c12d6])&&(_0x5c516b=_0x569194(_0x5c516b)||_0x5c516b);return _0x5c516b;},b=(_0x4ab7bc,_0x53f9fc)=>(_0x5d80c4,_0x110a27)=>_0x53f9fc(_0x5d80c4,_0x110a27,_0x4ab7bc);function X(_0x3373c0,_0x5c2cb5){const _0x27a95e=_0x36cf26,_0xb6c0e9=_0x3373c0[_0x27a95e(0x1be)][0x0];return{..._0x5c2cb5,'id':_0xb6c0e9[_0x27a95e(0x1c1)],'resolved':_0x3373c0[_0x27a95e(0x1f5)]===0x1,'dT':y(_0xb6c0e9[_0x27a95e(0x1b3)]),'personId':_0xb6c0e9[_0x27a95e(0x1f2)],'threadId':_0xb6c0e9[_0x27a95e(0x1ed)]};}function _0x216f(){const _0x3b0b30=['OpenOrReOpen','15NuURaS','size','_config','COMMENT','getUser','_sessionService','8292592CNnLXw','pluginName','filter','addComment','ref','1396963wkwXjW','slice','root','customRanges','threadId','getCurrentUser','thread-comment-data-source.config','length','_userService','userId','commentUpdate$','_threadCommentModel','solved','map','getUnit','resolveComment','getMemberID','_initDataSource','getOwnPropertyDescriptor','_configService','updateComment','_initUserSync','UNRECOGNIZED','_threadCommentDataSource','parentId','format','users','/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_httpService','saveCommentToSnapshot','rangeType','_init','user','values','defineProperty','content','2dMyclV','post','9469184FnTYIe','forEach','9261585fQzyJS','personId','comment','code','getComment','3192282vUoLjp','body','createTimestamp','UNIVER_UNKNOWN','unitId','rangeId','setConfig','error','Add','Unknown','deleteComment','stringify','payload','replies','get','add','replyId','/edit','onStarting','type','Delete','disposeWithMe','Solve','subscribe','addUser','reply','Edit','find','/add','/solved','304840kKUULW','listComments','/delete','2669874HjrlQP','userID','YYYY/MM/DD\x20HH:mm','Reply','/universer-api/comment/unit/','_injector','_threadCommentDataSourceService','Solved','parse','pipe','resolved'];_0x216f=function(){return _0x3b0b30;};return _0x216f();}function ee(_0x284771,_0xbb1ec0,_0x5060cc){const _0x2cd6fc=_0x36cf26;var _0x43feed,_0x81eb8d;if(((_0x81eb8d=(_0x43feed=_0x284771==null?void 0x0:_0x284771[_0x2cd6fc(0x1be)])==null?void 0x0:_0x43feed[_0x2cd6fc(0x1f0)])!=null?_0x81eb8d:0x0)>0x0){const _0x24d5f5=(_0x4707d7,_0x33953d)=>({'id':_0x4707d7[_0x2cd6fc(0x1c1)],'threadId':_0x4707d7['threadId'],'dT':y(_0x4707d7[_0x2cd6fc(0x1b3)]),'personId':_0x4707d7[_0x2cd6fc(0x1f2)],'resolved':_0x284771[_0x2cd6fc(0x1f5)]===I[_0x2cd6fc(0x1d9)],'unitId':_0xbb1ec0,'subUnitId':_0x5060cc,'text':JSON[_0x2cd6fc(0x1da)](_0x4707d7[_0x2cd6fc(0x1a7)]),'parentId':_0x33953d}),_0x591a68=_0x24d5f5(_0x284771[_0x2cd6fc(0x1be)][0x0]);return{..._0x591a68,'children':_0x284771['replies'][_0x2cd6fc(0x1ea)](0x1)[_0x2cd6fc(0x1f6)](_0x5d2a27=>_0x24d5f5(_0x5d2a27,_0x591a68['id']))};}return null;}let S=class{constructor(_0x52a9e1,_0xd0a8e2,_0x365ed1){const _0x152ebd=_0x36cf26;this[_0x152ebd(0x206)]=_0x52a9e1,this[_0x152ebd(0x1f1)]=_0xd0a8e2,this[_0x152ebd(0x1e3)]=_0x365ed1;}async[_0x36cf26(0x1e7)](_0x4d1935){const _0x59a866=_0x36cf26;var _0x26954f,_0x417839;const {parentId:_0x439241,unitId:_0x10f754,text:_0x2086dc,threadId:_0xac721c}=_0x4d1935,_0x43c2f0=(_0x417839=(_0x26954f=_0x2086dc[_0x59a866(0x1ec)])==null?void 0x0:_0x26954f[_0x59a866(0x1e6)](_0x27a119=>_0x27a119[_0x59a866(0x1a2)]===_0x1c6580['COMMENT'])['map'](_0x5e2c43=>_0x5e2c43[_0x59a866(0x1b6)]))!=null?_0x417839:[],_0x8ec671=JSON[_0x59a866(0x1bc)](_0x2086dc),_0x5978c4=(await this['_sessionService']['requireSession'](_0x10f754))[_0x59a866(0x1f9)]();if(_0x439241){const _0x45bc67={'memberId':_0x5978c4,'unitId':_0x10f754,'content':_0x8ec671,'mention':_0x43c2f0,'threadId':_0xac721c},_0x9aa019=(await this[_0x59a866(0x206)][_0x59a866(0x1a9)](_0x59a866(0x1d6)+_0x10f754+'/reply',{'body':_0x45bc67}))[_0x59a866(0x1b2)][_0x59a866(0x1ca)];return{..._0x4d1935,'id':_0x9aa019[_0x59a866(0x1c1)],'dT':_0x8e0352(+_0x9aa019[_0x59a866(0x1b3)])[_0x59a866(0x202)](_0x59a866(0x1d4)),'personId':_0x9aa019[_0x59a866(0x1f2)]};}else{const _0x57a16a={'memberId':_0x5978c4,'unitId':_0x10f754,'content':_0x8ec671,'mention':_0x43c2f0},_0x5842eb=await this[_0x59a866(0x206)][_0x59a866(0x1a9)](_0x59a866(0x1d6)+_0x10f754+_0x59a866(0x1cd),{'body':_0x57a16a});return X(_0x5842eb[_0x59a866(0x1b2)][_0x59a866(0x1ae)],_0x4d1935);}}async[_0x36cf26(0x1fd)](_0x5c0f65){const _0x5d197c=_0x36cf26;var _0xb613f9,_0x1fed17;const {text:_0x317e6e,unitId:_0x31e7e6}=_0x5c0f65,_0x2559ba=(_0x1fed17=(_0xb613f9=_0x317e6e[_0x5d197c(0x1ec)])==null?void 0x0:_0xb613f9['filter'](_0x335bc3=>_0x335bc3[_0x5d197c(0x1a2)]===_0x1c6580[_0x5d197c(0x1e1)])[_0x5d197c(0x1f6)](_0x301ce3=>_0x301ce3['rangeId']))!=null?_0x1fed17:[],_0x37931a=JSON[_0x5d197c(0x1bc)](_0x317e6e),_0x35faaa=_0x5c0f65['threadId'],_0x40e206=_0x5c0f65['id'],_0x34ea47={'memberId':(await this['_sessionService']['requireSession'](_0x31e7e6))[_0x5d197c(0x1f9)](),'unitId':_0x31e7e6,'threadId':_0x35faaa,'mention':_0x2559ba,'content':_0x37931a,'replyId':_0x40e206},_0x1ade5f=await this[_0x5d197c(0x206)][_0x5d197c(0x1a9)]('/universer-api/comment/unit/'+_0x31e7e6+_0x5d197c(0x1c2),{'body':_0x34ea47});return!_0x1ade5f[_0x5d197c(0x1b2)][_0x5d197c(0x1b8)]||_0x1ade5f[_0x5d197c(0x1b2)]['error'][_0x5d197c(0x1af)]===0x1;}async[_0x36cf26(0x1f8)](_0x354d5b){const _0x364b24=_0x36cf26,{unitId:_0x1a7c57}=_0x354d5b,_0x5de33f=_0x354d5b[_0x364b24(0x1ed)],_0x236caf={'memberId':this[_0x364b24(0x1f1)][_0x364b24(0x1ee)]()['userID'],'unitId':_0x1a7c57,'threadId':_0x5de33f,'solved':_0x354d5b[_0x364b24(0x1dc)]?I['Solved']:I['OpenOrReOpen']},_0x250bb5=await this[_0x364b24(0x206)][_0x364b24(0x1a9)](_0x364b24(0x1d6)+_0x1a7c57+_0x364b24(0x1ce),{'body':_0x236caf});return!_0x250bb5['body'][_0x364b24(0x1b8)]||_0x250bb5[_0x364b24(0x1b2)][_0x364b24(0x1b8)][_0x364b24(0x1af)]===0x1;}async[_0x36cf26(0x1bb)](_0x4274be,_0x5ca0e5,_0x4b5ca0,_0x10d540){const _0x3c4c1f=_0x36cf26,_0x21aaab={'memberId':(await this[_0x3c4c1f(0x1e3)]['requireSession'](_0x4274be))[_0x3c4c1f(0x1f9)](),'threadId':_0x4b5ca0,'replyId':_0x10d540,'unitId':_0x4274be},_0x3fa3ec=await this['_httpService'][_0x3c4c1f(0x1a9)](_0x3c4c1f(0x1d6)+_0x4274be+_0x3c4c1f(0x1d1),{'body':_0x21aaab});return!_0x3fa3ec[_0x3c4c1f(0x1b2)][_0x3c4c1f(0x1b8)]||_0x3fa3ec[_0x3c4c1f(0x1b2)]['error'][_0x3c4c1f(0x1af)]===0x1;}async[_0x36cf26(0x1d0)](_0x784645,_0x760559,_0x42608f){const _0x21d655=_0x36cf26,_0x245e52={'unitId':_0x784645,'threadId':_0x42608f},_0x3b042d=await this['_httpService'][_0x21d655(0x1a9)]('/universer-api/comment/unit/'+_0x784645+_0x21d655(0x204),{'body':_0x245e52}),_0x3ed959=_0x42608f[_0x21d655(0x1f6)](_0x2e84b8=>ee(_0x3b042d[_0x21d655(0x1b2)]['comments'][_0x2e84b8],_0x784645,_0x760559))[_0x21d655(0x1e6)](Boolean);return Object[_0x21d655(0x1a5)](_0x3b042d[_0x21d655(0x1b2)][_0x21d655(0x203)])[_0x21d655(0x1ab)](_0x3863f0=>{const _0x257e78=_0x21d655;this[_0x257e78(0x1f1)][_0x257e78(0x1c9)](_0x3863f0);}),_0x3ed959;}[_0x36cf26(0x1a1)](_0x2b843f){const _0x20e88b=_0x36cf26;return{'id':_0x2b843f['id'],'threadId':_0x2b843f['threadId'],'ref':_0x2b843f[_0x20e88b(0x1e8)]};}};S=Q([b(0x0,_0x198cd5(_0x3fc487)),b(0x1,_0x198cd5(_0x58c1c8)),b(0x2,_0x198cd5(_0x2c5c35))],S);var re=Object[_0x36cf26(0x1fb)],te=(_0xee185,_0x2f99d3,_0x2cfd1f,_0x84bf89)=>{const _0x3fd391=_0x36cf26;for(var _0xf067bf=_0x84bf89>0x1?void 0x0:_0x84bf89?re(_0x2f99d3,_0x2cfd1f):_0x2f99d3,_0x5f3759=_0xee185[_0x3fd391(0x1f0)]-0x1,_0x4b396a;_0x5f3759>=0x0;_0x5f3759--)(_0x4b396a=_0xee185[_0x5f3759])&&(_0xf067bf=_0x4b396a(_0xf067bf)||_0xf067bf);return _0xf067bf;},M=(_0x2b4370,_0x31d5ad)=>(_0xd63ca1,_0x1b7b25)=>_0x31d5ad(_0xd63ca1,_0x1b7b25,_0x2b4370);let f=class extends _0x307552{constructor(_0x197aa1,_0x3cfaaf){const _0x1ffa8f=_0x36cf26;super(),this[_0x1ffa8f(0x1d8)]=_0x197aa1,this[_0x1ffa8f(0x200)]=_0x3cfaaf,this[_0x1ffa8f(0x1fa)]();}[_0x36cf26(0x1fa)](){const _0x519aad=_0x36cf26;this[_0x519aad(0x1d8)]['dataSource']=this[_0x519aad(0x200)],this[_0x519aad(0x1d8)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x1850ce),M(0x1,_0x198cd5(S))],f);var se=Object[_0x36cf26(0x1a6)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x231bbf,_0x1275e4,_0x199d57)=>_0x1275e4 in _0x231bbf?se(_0x231bbf,_0x1275e4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x199d57}):_0x231bbf[_0x1275e4]=_0x199d57,ie=(_0x3a79ba,_0x18423f,_0x3e40ee,_0x1ebeae)=>{const _0x2c5ff0=_0x36cf26;for(var _0x26c2cf=_0x1ebeae>0x1?void 0x0:_0x1ebeae?oe(_0x18423f,_0x3e40ee):_0x18423f,_0x4bd729=_0x3a79ba[_0x2c5ff0(0x1f0)]-0x1,_0x500696;_0x4bd729>=0x0;_0x4bd729--)(_0x500696=_0x3a79ba[_0x4bd729])&&(_0x26c2cf=_0x500696(_0x26c2cf)||_0x26c2cf);return _0x26c2cf;},N=(_0x66c31e,_0x6f7bd0)=>(_0x4e60f4,_0x525aff)=>_0x6f7bd0(_0x4e60f4,_0x525aff,_0x66c31e),$=(_0x9ac0d5,_0x518b53,_0x4cc8f5)=>ne(_0x9ac0d5,typeof _0x518b53!='symbol'?_0x518b53+'':_0x518b53,_0x4cc8f5);let g=class extends _0x31d320{constructor(_0x23a878=O,_0x1c9f45,_0x3179dc){const _0xd5987a=_0x36cf26;super(),this[_0xd5987a(0x1e0)]=_0x23a878,this[_0xd5987a(0x1d7)]=_0x1c9f45,this['_configService']=_0x3179dc;const {..._0x7d090c}=_0x38f854({},O,this[_0xd5987a(0x1e0)]);this[_0xd5987a(0x1fc)][_0xd5987a(0x1b7)](z,_0x7d090c);}[_0x36cf26(0x1c3)](){[[S],[f],[_]]['forEach'](_0x2801c7=>{const _0x52a294=_0x14cc;this[_0x52a294(0x1d7)][_0x52a294(0x1c0)](_0x2801c7);});}['onReady'](){const _0x4c7b08=_0x36cf26;this[_0x4c7b08(0x1d7)]['get'](f),this[_0x4c7b08(0x1d7)]['get'](_);}};$(g,_0x36cf26(0x1e5),W),$(g,_0x36cf26(0x1c4),_0xe103b3[_0x36cf26(0x1b4)]),g=ie([_0x574e8a(_0x2e2bfc,_0x25931d,_0x22a647),N(0x1,_0x198cd5(_0x1cb825)),N(0x2,_0x3e8e81)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x429c(_0x514cc1,_0x15e815){_0x514cc1=_0x514cc1-0xe3;const _0x57f2ee=_0x57f2();let _0x429ce1=_0x57f2ee[_0x514cc1];return _0x429ce1;}(function(_0x197a96,_0x2a0c0a){const _0x3f671a=_0x429c,_0x6bcca1=_0x197a96();while(!![]){try{const _0xbf5d27=-parseInt(_0x3f671a(0x119))/0x1*(parseInt(_0x3f671a(0xf3))/0x2)+-parseInt(_0x3f671a(0xfc))/0x3*(parseInt(_0x3f671a(0x13f))/0x4)+-parseInt(_0x3f671a(0xe9))/0x5*(-parseInt(_0x3f671a(0x122))/0x6)+parseInt(_0x3f671a(0x158))/0x7+parseInt(_0x3f671a(0x14f))/0x8*(-parseInt(_0x3f671a(0x107))/0x9)+-parseInt(_0x3f671a(0x124))/0xa+-parseInt(_0x3f671a(0x15b))/0xb*(-parseInt(_0x3f671a(0x137))/0xc);if(_0xbf5d27===_0x2a0c0a)break;else _0x6bcca1['push'](_0x6bcca1['shift']());}catch(_0x2e5293){_0x6bcca1['push'](_0x6bcca1['shift']());}}}(_0x57f2,0x770db),function(_0x2bf953,_0x1c05ec){const _0x2d42aa=_0x429c;typeof exports=='object'&&typeof module<'u'?_0x1c05ec(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x2d42aa(0x101)&&define[_0x2d42aa(0x152)]?define([_0x2d42aa(0x10e),_0x2d42aa(0x132),_0x2d42aa(0x14e),_0x2d42aa(0x12e),_0x2d42aa(0x125),_0x2d42aa(0xf5),_0x2d42aa(0xf0),_0x2d42aa(0x104)],_0x1c05ec):(_0x2bf953=typeof globalThis<'u'?globalThis:_0x2bf953||self,_0x1c05ec(_0x2bf953['UniverProThreadCommentDatasource']={},_0x2bf953[_0x2d42aa(0x140)],_0x2bf953[_0x2d42aa(0x13a)],_0x2bf953['UniverCore'],_0x2bf953['UniverThreadCommentUi'],_0x2bf953[_0x2d42aa(0x10b)],_0x2bf953[_0x2d42aa(0xf0)],_0x2bf953[_0x2d42aa(0xed)]));}(this,function(_0x2e86e2,_0x101de3,_0x572db9,_0x5edd3f,_0x525bd8,_0x5b30bc,_0x498f71,_0x431989){'use strict';const _0x263c48=_0x429c;const _0x907ed='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x3342ea=(_0x189a1e=>(_0x189a1e[_0x189a1e[_0x263c48(0x14d)]=0x0]='OpenOrReOpen',_0x189a1e[_0x189a1e[_0x263c48(0x142)]=0x1]=_0x263c48(0x142),_0x189a1e[_0x189a1e[_0x263c48(0x143)]=-0x1]=_0x263c48(0x143),_0x189a1e))(_0x3342ea||{}),_0x4e3d4b=(_0x29383a=>(_0x29383a[_0x29383a[_0x263c48(0x155)]=0x0]='Unknown',_0x29383a[_0x29383a['Add']=0x1]=_0x263c48(0x109),_0x29383a[_0x29383a['Reply']=0x2]=_0x263c48(0x165),_0x29383a[_0x29383a[_0x263c48(0x10a)]=0x3]=_0x263c48(0x10a),_0x29383a[_0x29383a[_0x263c48(0x11a)]=0x4]=_0x263c48(0x11a),_0x29383a[_0x29383a['Solve']=0x5]='Solve',_0x29383a[_0x29383a[_0x263c48(0x143)]=-0x1]=_0x263c48(0x143),_0x29383a))(_0x4e3d4b||{});const _0x10e43f=_0x31d7cb=>_0x5edd3f[_0x263c48(0x13e)](new Date(+_0x31d7cb))[_0x263c48(0xe6)](_0x263c48(0x134)),_0x23ebbc=async(_0x3a3613,_0x36592e)=>{const _0x510563=_0x263c48,_0x17466b=_0x3a3613[_0x510563(0x11b)](_0x5edd3f['UserManagerService']),_0x1324f6=_0x3a3613[_0x510563(0x11b)](_0x431989[_0x510563(0xef)]);_0x36592e[_0x510563(0xfa)](_0x10f3c6=>{const _0x51408f=_0x510563;_0x17466b[_0x51408f(0x161)](_0x10f3c6)&&_0x36592e['delete'](_0x10f3c6);}),_0x36592e['size']&&(await _0x1324f6[_0x510563(0x11b)](_0x510563(0x13c),{'params':{'userIDs':[..._0x36592e]}}))[_0x510563(0x10d)]['users'][_0x510563(0xfa)](_0x5130e3=>{_0x5130e3&&_0x17466b['addUser'](_0x5130e3);});};var _0x2c570c=Object[_0x263c48(0x157)],_0x46261c=(_0x59377d,_0x50994b,_0x3a49,_0x5ec3c2)=>{for(var _0x30b3da=_0x5ec3c2>0x1?void 0x0:_0x5ec3c2?_0x2c570c(_0x50994b,_0x3a49):_0x50994b,_0x3ba2c4=_0x59377d['length']-0x1,_0x53c46e;_0x3ba2c4>=0x0;_0x3ba2c4--)(_0x53c46e=_0x59377d[_0x3ba2c4])&&(_0x30b3da=_0x53c46e(_0x30b3da)||_0x30b3da);return _0x30b3da;},_0x4fbd81=(_0x5206a2,_0x589d41)=>(_0x588db2,_0x4160cf)=>_0x589d41(_0x588db2,_0x4160cf,_0x5206a2);let _0x6779bf=class extends _0x5edd3f[_0x263c48(0x156)]{constructor(_0x2677ba,_0xcea4d6,_0x4c2744,_0x3dd4c5){const _0x50994d=_0x263c48;super(),this[_0x50994d(0xf9)]=_0x2677ba,this[_0x50994d(0xfe)]=_0xcea4d6,this[_0x50994d(0x118)]=_0x4c2744,this[_0x50994d(0x133)]=_0x3dd4c5,this[_0x50994d(0x129)](),this[_0x50994d(0x117)]();}[_0x263c48(0x117)](){const _0x4d1550=_0x263c48;this[_0x4d1550(0x113)](this['_threadCommentModel'][_0x4d1550(0xf2)][_0x4d1550(0x120)](_0x498f71[_0x4d1550(0x100)](0x10))[_0x4d1550(0xe3)](_0x4435b5=>{const _0x3240f9=_0x4d1550,_0x962c49=new Set();_0x4435b5[_0x3240f9(0xfa)](_0x45e45d=>{const _0x502c22=_0x3240f9;if(_0x45e45d[_0x502c22(0xf4)]===_0x502c22(0x154)){const _0x3f30ba=_0x45e45d[_0x502c22(0x146)][_0x502c22(0xf1)];_0x962c49[_0x502c22(0x154)](_0x3f30ba);}}),_0x23ebbc(this['_injector'],_0x962c49);}));}['_init'](){const _0x4f4c00=_0x263c48;this[_0x4f4c00(0x113)](this[_0x4f4c00(0xf9)][_0x4f4c00(0xf2)][_0x4f4c00(0xe3)](async _0x5e5861=>{const _0x53eff6=_0x4f4c00;var _0x21e5b3,_0x111f94,_0x2a4076,_0x12d42c;const _0x372544=(_0x21e5b3=this[_0x53eff6(0xfe)]['getUnit'](_0x5e5861['unitId'])[_0x53eff6(0x111)](_0x4bdc1b=>_0x4bdc1b[_0x53eff6(0x15a)]===_0x5e5861['threadId']))==null?void 0x0:_0x21e5b3[_0x53eff6(0x141)];if(!_0x372544)return;const {unitId:_0x24f2ef,subUnitId:_0xf99ec7}=_0x372544;switch(_0x5e5861[_0x53eff6(0xfd)]&&this[_0x53eff6(0x118)][_0x53eff6(0x138)](_0x5e5861['user']),_0x5e5861[_0x53eff6(0xf4)]){case _0x4e3d4b['Add']:break;case _0x4e3d4b['Reply']:{this[_0x53eff6(0xfe)][_0x53eff6(0x108)](_0x24f2ef,_0xf99ec7,{'unitId':_0x24f2ef,'subUnitId':_0xf99ec7,'ref':'','id':_0x5e5861[_0x53eff6(0x149)],'dT':_0x10e43f(+_0x5e5861[_0x53eff6(0xe7)]),'threadId':_0x5e5861['threadId'],'personId':(_0x2a4076=(_0x111f94=_0x5e5861['user'])==null?void 0x0:_0x111f94['userID'])!=null?_0x2a4076:_0x5e5861['userId'],'text':JSON['parse'](_0x5e5861['content']),'parentId':_0x372544['id']});break;}case _0x4e3d4b[_0x53eff6(0x11a)]:{const _0x27b98b=this[_0x53eff6(0xfe)][_0x53eff6(0x115)](_0x24f2ef,_0xf99ec7,_0x5e5861[_0x53eff6(0x149)]);_0x27b98b&&_0x27b98b[_0x53eff6(0x151)]&&this[_0x53eff6(0xfe)]['deleteComment'](_0x24f2ef,_0xf99ec7,_0x5e5861[_0x53eff6(0x149)]);break;}case _0x4e3d4b[_0x53eff6(0x10a)]:{this[_0x53eff6(0xfe)]['updateComment'](_0x24f2ef,_0xf99ec7,{'commentId':_0x5e5861[_0x53eff6(0x149)],'text':JSON[_0x53eff6(0x121)](_0x5e5861[_0x53eff6(0x130)])});break;}case _0x4e3d4b[_0x53eff6(0x14a)]:{const _0x1a0549=(_0x12d42c=this[_0x53eff6(0xfe)][_0x53eff6(0x12b)](_0x5e5861[_0x53eff6(0x123)])['find'](_0x1fb3a6=>_0x1fb3a6[_0x53eff6(0x15a)]===_0x5e5861['threadId']))==null?void 0x0:_0x12d42c[_0x53eff6(0x141)];_0x1a0549&&this['_threadCommentModel'][_0x53eff6(0x13b)](_0x24f2ef,_0xf99ec7,_0x1a0549['id'],_0x5e5861['solved']===_0x3342ea[_0x53eff6(0x142)]);break;}}}));}};_0x6779bf=_0x46261c([_0x4fbd81(0x0,_0x5edd3f[_0x263c48(0x105)](_0x101de3['CommentService'])),_0x4fbd81(0x1,_0x5edd3f[_0x263c48(0x105)](_0x5b30bc[_0x263c48(0xf7)])),_0x4fbd81(0x2,_0x5edd3f[_0x263c48(0x105)](_0x5edd3f[_0x263c48(0xe4)])),_0x4fbd81(0x3,_0x5edd3f[_0x263c48(0x105)](_0x5edd3f['Injector']))],_0x6779bf);const _0x12ca71=_0x263c48(0x15e),_0x1c0e90={};var _0x1944b1=Object[_0x263c48(0x157)],_0x5ac215=(_0x1e6b68,_0x2354e7,_0x1902bd,_0xa61d8d)=>{for(var _0x5824a1=_0xa61d8d>0x1?void 0x0:_0xa61d8d?_0x1944b1(_0x2354e7,_0x1902bd):_0x2354e7,_0x58eea1=_0x1e6b68['length']-0x1,_0x2725c9;_0x58eea1>=0x0;_0x58eea1--)(_0x2725c9=_0x1e6b68[_0x58eea1])&&(_0x5824a1=_0x2725c9(_0x5824a1)||_0x5824a1);return _0x5824a1;},_0x34f093=(_0x1f2d59,_0x1932a3)=>(_0x31e27a,_0x39f6bc)=>_0x1932a3(_0x31e27a,_0x39f6bc,_0x1f2d59);function _0x1609c2(_0x306cb3,_0x29d0ef){const _0xe5944=_0x263c48,_0x27d389=_0x306cb3['replies'][0x0];return{..._0x29d0ef,'id':_0x27d389[_0xe5944(0x149)],'resolved':_0x306cb3['solved']===0x1,'dT':_0x10e43f(_0x27d389[_0xe5944(0xe7)]),'personId':_0x27d389[_0xe5944(0x131)],'threadId':_0x27d389[_0xe5944(0x15a)]};}function _0x34bcd1(_0x3747dd,_0x3c5601,_0x46a0ea){const _0x160d94=_0x263c48;var _0x50b01c,_0x56c518;if(((_0x56c518=(_0x50b01c=_0x3747dd==null?void 0x0:_0x3747dd[_0x160d94(0x163)])==null?void 0x0:_0x50b01c[_0x160d94(0x136)])!=null?_0x56c518:0x0)>0x0){const _0x6cd6ee=(_0x1c1d06,_0x37490a)=>({'id':_0x1c1d06[_0x160d94(0x149)],'threadId':_0x1c1d06[_0x160d94(0x15a)],'dT':_0x10e43f(_0x1c1d06[_0x160d94(0xe7)]),'personId':_0x1c1d06[_0x160d94(0x131)],'resolved':_0x3747dd['solved']===_0x3342ea[_0x160d94(0x142)],'unitId':_0x3c5601,'subUnitId':_0x46a0ea,'text':JSON[_0x160d94(0x121)](_0x1c1d06[_0x160d94(0x130)]),'parentId':_0x37490a}),_0x567fa1=_0x6cd6ee(_0x3747dd[_0x160d94(0x163)][0x0]);return{..._0x567fa1,'children':_0x3747dd['replies'][_0x160d94(0x15f)](0x1)['map'](_0x558c53=>_0x6cd6ee(_0x558c53,_0x567fa1['id']))};}return null;}let _0x19c89e=class{constructor(_0x257441,_0x100dac,_0xea8ec1){const _0x58a913=_0x263c48;this[_0x58a913(0x14c)]=_0x257441,this[_0x58a913(0x118)]=_0x100dac,this[_0x58a913(0xee)]=_0xea8ec1;}async['addComment'](_0x1d36e2){const _0x41d359=_0x263c48;var _0x474b99,_0x3a7801;const {parentId:_0x5a081d,unitId:_0x396374,text:_0x39c947,threadId:_0x347963}=_0x1d36e2,_0x4fec81=(_0x3a7801=(_0x474b99=_0x39c947[_0x41d359(0x112)])==null?void 0x0:_0x474b99['filter'](_0x54ab58=>_0x54ab58['rangeType']===_0x5edd3f[_0x41d359(0x150)][_0x41d359(0xea)])[_0x41d359(0x147)](_0x5c5c4f=>_0x5c5c4f['rangeId']))!=null?_0x3a7801:[],_0xf759ed=JSON[_0x41d359(0x144)](_0x39c947),_0x5a5ac7=(await this[_0x41d359(0xee)][_0x41d359(0x11f)](_0x396374))['getMemberID']();if(_0x5a081d){const _0x35700e={'memberId':_0x5a5ac7,'unitId':_0x396374,'content':_0xf759ed,'mention':_0x4fec81,'threadId':_0x347963},_0x4d5dbe=(await this['_httpService'][_0x41d359(0x135)]('/universer-api/comment/unit/'+_0x396374+_0x41d359(0x12f),{'body':_0x35700e}))[_0x41d359(0x10d)][_0x41d359(0x116)];return{..._0x1d36e2,'id':_0x4d5dbe[_0x41d359(0x149)],'dT':_0x5edd3f[_0x41d359(0x13e)](+_0x4d5dbe[_0x41d359(0xe7)])[_0x41d359(0xe6)](_0x41d359(0x134)),'personId':_0x4d5dbe[_0x41d359(0x131)]};}else{const _0x1a74f1={'memberId':_0x5a5ac7,'unitId':_0x396374,'content':_0xf759ed,'mention':_0x4fec81},_0x4066c2=await this[_0x41d359(0x14c)][_0x41d359(0x135)](_0x41d359(0xeb)+_0x396374+_0x41d359(0xe5),{'body':_0x1a74f1});return _0x1609c2(_0x4066c2[_0x41d359(0x10d)]['comment'],_0x1d36e2);}}async[_0x263c48(0x159)](_0x3ccf29){const _0x17a38e=_0x263c48;var _0x5e0cf4,_0x14eea9;const {text:_0x3eed50,unitId:_0x506b96}=_0x3ccf29,_0x20980e=(_0x14eea9=(_0x5e0cf4=_0x3eed50['customRanges'])==null?void 0x0:_0x5e0cf4['filter'](_0x226f4b=>_0x226f4b[_0x17a38e(0xe8)]===_0x5edd3f[_0x17a38e(0x150)][_0x17a38e(0xea)])[_0x17a38e(0x147)](_0x5b5b3a=>_0x5b5b3a[_0x17a38e(0x139)]))!=null?_0x14eea9:[],_0x56e599=JSON[_0x17a38e(0x144)](_0x3eed50),_0x6fc3ed=_0x3ccf29[_0x17a38e(0x15a)],_0x5e9b73=_0x3ccf29['id'],_0x48f79c={'memberId':(await this['_sessionService']['requireSession'](_0x506b96))['getMemberID'](),'unitId':_0x506b96,'threadId':_0x6fc3ed,'mention':_0x20980e,'content':_0x56e599,'replyId':_0x5e9b73},_0x1315bb=await this['_httpService'][_0x17a38e(0x135)]('/universer-api/comment/unit/'+_0x506b96+_0x17a38e(0x164),{'body':_0x48f79c});return!_0x1315bb[_0x17a38e(0x10d)][_0x17a38e(0x114)]||_0x1315bb[_0x17a38e(0x10d)][_0x17a38e(0x114)][_0x17a38e(0x12d)]===0x1;}async['resolveComment'](_0x1e897b){const _0x141703=_0x263c48,{unitId:_0x276d22}=_0x1e897b,_0x177686=_0x1e897b[_0x141703(0x15a)],_0x5f1f60={'memberId':this[_0x141703(0x118)]['getCurrentUser']()['userID'],'unitId':_0x276d22,'threadId':_0x177686,'solved':_0x1e897b['resolved']?_0x3342ea[_0x141703(0x142)]:_0x3342ea[_0x141703(0x14d)]},_0x1133d6=await this[_0x141703(0x14c)]['post'](_0x141703(0xeb)+_0x276d22+_0x141703(0x127),{'body':_0x5f1f60});return!_0x1133d6['body'][_0x141703(0x114)]||_0x1133d6[_0x141703(0x10d)][_0x141703(0x114)][_0x141703(0x12d)]===0x1;}async['deleteComment'](_0x391c99,_0xd17749,_0x81214,_0x4641d4){const _0x1f7102=_0x263c48,_0x27c233={'memberId':(await this[_0x1f7102(0xee)][_0x1f7102(0x11f)](_0x391c99))[_0x1f7102(0x10c)](),'threadId':_0x81214,'replyId':_0x4641d4,'unitId':_0x391c99},_0x2ff54e=await this['_httpService'][_0x1f7102(0x135)](_0x1f7102(0xeb)+_0x391c99+'/delete',{'body':_0x27c233});return!_0x2ff54e[_0x1f7102(0x10d)][_0x1f7102(0x114)]||_0x2ff54e[_0x1f7102(0x10d)][_0x1f7102(0x114)][_0x1f7102(0x12d)]===0x1;}async[_0x263c48(0xec)](_0x9b4fd8,_0x5a07ce,_0xcb10fc){const _0xb7121a=_0x263c48,_0x414c68={'unitId':_0x9b4fd8,'threadId':_0xcb10fc},_0x3e24d5=await this[_0xb7121a(0x14c)][_0xb7121a(0x135)]('/universer-api/comment/unit/'+_0x9b4fd8+'/list',{'body':_0x414c68}),_0x200b6c=_0xcb10fc[_0xb7121a(0x147)](_0x118d42=>_0x34bcd1(_0x3e24d5['body']['comments'][_0x118d42],_0x9b4fd8,_0x5a07ce))[_0xb7121a(0x167)](Boolean);return Object[_0xb7121a(0xf6)](_0x3e24d5[_0xb7121a(0x10d)]['users'])[_0xb7121a(0xfa)](_0x12205d=>{const _0x1f20eb=_0xb7121a;this['_userService'][_0x1f20eb(0x138)](_0x12205d);}),_0x200b6c;}[_0x263c48(0x153)](_0x5c1cbb){const _0xca3fce=_0x263c48;return{'id':_0x5c1cbb['id'],'threadId':_0x5c1cbb['threadId'],'ref':_0x5c1cbb[_0xca3fce(0x11e)]};}};_0x19c89e=_0x5ac215([_0x34f093(0x0,_0x5edd3f[_0x263c48(0x105)](_0x431989[_0x263c48(0xef)])),_0x34f093(0x1,_0x5edd3f[_0x263c48(0x105)](_0x5edd3f[_0x263c48(0xe4)])),_0x34f093(0x2,_0x5edd3f[_0x263c48(0x105)](_0x101de3[_0x263c48(0x110)]))],_0x19c89e);var _0x3af1fe=Object[_0x263c48(0x157)],_0x509cdb=(_0x1ffe20,_0x1e99ff,_0x30bcc0,_0x3bde0b)=>{const _0x586528=_0x263c48;for(var _0x102958=_0x3bde0b>0x1?void 0x0:_0x3bde0b?_0x3af1fe(_0x1e99ff,_0x30bcc0):_0x1e99ff,_0x4450aa=_0x1ffe20[_0x586528(0x136)]-0x1,_0x4fe9b8;_0x4450aa>=0x0;_0x4450aa--)(_0x4fe9b8=_0x1ffe20[_0x4450aa])&&(_0x102958=_0x4fe9b8(_0x102958)||_0x102958);return _0x102958;},_0x305309=(_0x47c6aa,_0x340e33)=>(_0x29236d,_0x2b420f)=>_0x340e33(_0x29236d,_0x2b420f,_0x47c6aa);let _0x4dd3c9=class extends _0x5edd3f[_0x263c48(0x156)]{constructor(_0x3b4b00,_0x32e66d){const _0x29d10d=_0x263c48;super(),this[_0x29d10d(0x148)]=_0x3b4b00,this['_threadCommentDataSource']=_0x32e66d,this[_0x29d10d(0x102)]();}[_0x263c48(0x102)](){const _0x1ceb63=_0x263c48;this[_0x1ceb63(0x148)]['dataSource']=this[_0x1ceb63(0x15d)],this[_0x1ceb63(0x148)][_0x1ceb63(0x12a)]=!0x1;}};_0x4dd3c9=_0x509cdb([_0x305309(0x0,_0x5b30bc['IThreadCommentDataSourceService']),_0x305309(0x1,_0x5edd3f['Inject'](_0x19c89e))],_0x4dd3c9);var _0x54904a=Object[_0x263c48(0x162)],_0x21b3b5=Object[_0x263c48(0x157)],_0x4e2eb3=(_0x36ecf8,_0x4966b0,_0x401b83)=>_0x4966b0 in _0x36ecf8?_0x54904a(_0x36ecf8,_0x4966b0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x401b83}):_0x36ecf8[_0x4966b0]=_0x401b83,_0xf6cd56=(_0x3615a2,_0x595323,_0x350e3e,_0x404de0)=>{const _0x363896=_0x263c48;for(var _0x3dd8a8=_0x404de0>0x1?void 0x0:_0x404de0?_0x21b3b5(_0x595323,_0x350e3e):_0x595323,_0xb42d7=_0x3615a2[_0x363896(0x136)]-0x1,_0x1ae9fa;_0xb42d7>=0x0;_0xb42d7--)(_0x1ae9fa=_0x3615a2[_0xb42d7])&&(_0x3dd8a8=_0x1ae9fa(_0x3dd8a8)||_0x3dd8a8);return _0x3dd8a8;},_0x58fd34=(_0x2e9c8b,_0xc4aec2)=>(_0x4d8a2b,_0xfd1169)=>_0xc4aec2(_0x4d8a2b,_0xfd1169,_0x2e9c8b),_0x1790c1=(_0x4362c8,_0x47d277,_0x2003af)=>_0x4e2eb3(_0x4362c8,typeof _0x47d277!=_0x263c48(0x126)?_0x47d277+'':_0x47d277,_0x2003af);_0x2e86e2[_0x263c48(0x15c)]=class extends _0x5edd3f[_0x263c48(0xf8)]{constructor(_0x1c3de2=_0x1c0e90,_0x4fb401,_0x426b56){const _0x5a9832=_0x263c48;super(),this['_config']=_0x1c3de2,this['_injector']=_0x4fb401,this[_0x5a9832(0x14b)]=_0x426b56;const {..._0x25dc97}=_0x5edd3f[_0x5a9832(0x106)]({},_0x1c0e90,this[_0x5a9832(0x10f)]);this['_configService'][_0x5a9832(0xfb)](_0x12ca71,_0x25dc97);}[_0x263c48(0x11d)](){const _0x5ebc1e=_0x263c48;[[_0x19c89e],[_0x4dd3c9],[_0x6779bf]][_0x5ebc1e(0xfa)](_0x727300=>{const _0x179447=_0x5ebc1e;this[_0x179447(0x133)][_0x179447(0x154)](_0x727300);});}[_0x263c48(0xff)](){const _0xdc3671=_0x263c48;this['_injector'][_0xdc3671(0x11b)](_0x4dd3c9),this[_0xdc3671(0x133)]['get'](_0x6779bf);}},_0x1790c1(_0x2e86e2[_0x263c48(0x15c)],_0x263c48(0x11c),_0x907ed),_0x1790c1(_0x2e86e2[_0x263c48(0x15c)],'type',_0x5edd3f[_0x263c48(0x128)][_0x263c48(0x13d)]),_0x2e86e2[_0x263c48(0x15c)]=_0xf6cd56([_0x5edd3f['DependentOn'](_0x525bd8['UniverThreadCommentUIPlugin'],_0x101de3['UniverCollaborationClientPlugin'],_0x572db9[_0x263c48(0x145)]),_0x58fd34(0x1,_0x5edd3f[_0x263c48(0x105)](_0x5edd3f[_0x263c48(0x166)])),_0x58fd34(0x2,_0x5edd3f[_0x263c48(0x12c)])],_0x2e86e2[_0x263c48(0x15c)]),Object[_0x263c48(0x162)](_0x2e86e2,Symbol[_0x263c48(0x103)],{'value':_0x263c48(0x160)});}));function _0x57f2(){const _0x5ca6f4=['syncUpdateMutationToColla','getUnit','IConfigService','code','@univerjs/core','/reply','content','userId','@univerjs-pro/collaboration-client','_injector','YYYY/MM/DD\x20HH:mm','post','length','372ErBjfr','addUser','rangeId','UniverProLicense','resolveComment','/universer-api/user/list','UNIVER_UNKNOWN','dayjs','4CBYCZs','UniverProCollaborationClient','root','Solved','UNRECOGNIZED','stringify','UniverLicensePlugin','payload','map','_threadCommentDataSourceService','replyId','Solve','_configService','_httpService','OpenOrReOpen','@univerjs-pro/license','7348976aBZEMH','CustomRangeType','parentId','amd','saveCommentToSnapshot','add','Unknown','Disposable','getOwnPropertyDescriptor','2524732cUOREB','updateComment','threadId','406274eeKnyA','UniverThreadCommentDataSourcePlugin','_threadCommentDataSource','thread-comment-data-source.config','slice','Module','getUser','defineProperty','replies','/edit','Reply','Injector','filter','subscribe','UserManagerService','/add','format','createTimestamp','rangeType','20ZiTLvq','COMMENT','/universer-api/comment/unit/','listComments','UniverNetwork','_sessionService','HTTPService','rxjs','personId','commentUpdate$','30ZjVZBU','type','@univerjs/thread-comment','values','ThreadCommentModel','Plugin','_commentService','forEach','setConfig','70302RoBKsK','user','_threadCommentModel','onReady','bufferTime','function','_initDataSource','toStringTag','@univerjs/network','Inject','merge','9gSwjAQ','addComment','Add','Edit','UniverThreadComment','getMemberID','body','exports','_config','CollaborationSessionService','find','customRanges','disposeWithMe','error','getComment','reply','_initUserSync','_userService','2130TGqpCY','Delete','get','pluginName','onStarting','ref','requireSession','pipe','parse','819216RZdQLJ','unitId','5901250RsYYTZ','@univerjs/thread-comment-ui','symbol','/solved','UniverInstanceType','_init'];_0x57f2=function(){return _0x5ca6f4;};return _0x57f2();}
|
|
1
|
+
function _0x1068(_0x5c47e2,_0x104ab3){_0x5c47e2=_0x5c47e2-0x16b;const _0x1deb6d=_0x1deb();let _0x1068ec=_0x1deb6d[_0x5c47e2];return _0x1068ec;}(function(_0xbb264a,_0x333679){const _0x5e8e36=_0x1068,_0x1e50e2=_0xbb264a();while(!![]){try{const _0x5dfe26=parseInt(_0x5e8e36(0x1f1))/0x1+parseInt(_0x5e8e36(0x1a1))/0x2+-parseInt(_0x5e8e36(0x1cf))/0x3*(parseInt(_0x5e8e36(0x1c1))/0x4)+-parseInt(_0x5e8e36(0x195))/0x5*(parseInt(_0x5e8e36(0x16e))/0x6)+parseInt(_0x5e8e36(0x18e))/0x7*(parseInt(_0x5e8e36(0x1d5))/0x8)+parseInt(_0x5e8e36(0x184))/0x9+parseInt(_0x5e8e36(0x193))/0xa*(-parseInt(_0x5e8e36(0x1c5))/0xb);if(_0x5dfe26===_0x333679)break;else _0x1e50e2['push'](_0x1e50e2['shift']());}catch(_0x49c61d){_0x1e50e2['push'](_0x1e50e2['shift']());}}}(_0x1deb,0x306dc),function(_0x26b9b2,_0x4e8fe2){const _0x52e026=_0x1068;typeof exports==_0x52e026(0x16d)&&typeof module<'u'?_0x4e8fe2(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x52e026(0x18a)&&define[_0x52e026(0x1b4)]?define([_0x52e026(0x1c3),'@univerjs-pro/collaboration-client',_0x52e026(0x18c),'@univerjs/core',_0x52e026(0x1bb),_0x52e026(0x1c4),_0x52e026(0x1be),_0x52e026(0x1e6)],_0x4e8fe2):(_0x26b9b2=typeof globalThis<'u'?globalThis:_0x26b9b2||self,_0x4e8fe2(_0x26b9b2[_0x52e026(0x186)]={},_0x26b9b2[_0x52e026(0x1e1)],_0x26b9b2[_0x52e026(0x1e8)],_0x26b9b2['UniverCore'],_0x26b9b2[_0x52e026(0x1ce)],_0x26b9b2[_0x52e026(0x17e)],_0x26b9b2[_0x52e026(0x1be)],_0x26b9b2['UniverNetwork']));}(this,function(_0x18595e,_0x259e13,_0x5e1cd1,_0x557eb8,_0x22fd3d,_0x5d20e1,_0x286f37,_0xc86999){'use strict';const _0x273874=_0x1068;const _0x398ac2=_0x273874(0x192);var _0x68b241=(_0x30d653=>(_0x30d653[_0x30d653['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x30d653[_0x30d653[_0x273874(0x1a0)]=0x1]='Solved',_0x30d653[_0x30d653[_0x273874(0x1b0)]=-0x1]='UNRECOGNIZED',_0x30d653))(_0x68b241||{}),_0x5105e0=(_0x166ab6=>(_0x166ab6[_0x166ab6[_0x273874(0x17b)]=0x0]=_0x273874(0x17b),_0x166ab6[_0x166ab6['Add']=0x1]=_0x273874(0x190),_0x166ab6[_0x166ab6[_0x273874(0x1e4)]=0x2]=_0x273874(0x1e4),_0x166ab6[_0x166ab6[_0x273874(0x1f2)]=0x3]=_0x273874(0x1f2),_0x166ab6[_0x166ab6[_0x273874(0x1b8)]=0x4]='Delete',_0x166ab6[_0x166ab6[_0x273874(0x1d8)]=0x5]=_0x273874(0x1d8),_0x166ab6[_0x166ab6[_0x273874(0x1b0)]=-0x1]='UNRECOGNIZED',_0x166ab6))(_0x5105e0||{});const _0x497fc3=_0x250860=>_0x557eb8[_0x273874(0x18f)](new Date(+_0x250860))[_0x273874(0x188)](_0x273874(0x19e)),_0x32a0db=async(_0x55bcfa,_0x2d6f1f)=>{const _0x1614f8=_0x273874,_0x57a10e=_0x55bcfa[_0x1614f8(0x1df)](_0x557eb8[_0x1614f8(0x1c9)]),_0x366d91=_0x55bcfa[_0x1614f8(0x1df)](_0xc86999[_0x1614f8(0x1da)]);_0x2d6f1f[_0x1614f8(0x1b2)](_0x1c17a5=>{const _0x1cf0f4=_0x1614f8;_0x57a10e[_0x1cf0f4(0x16b)](_0x1c17a5)&&_0x2d6f1f[_0x1cf0f4(0x1a4)](_0x1c17a5);}),_0x2d6f1f['size']&&(await _0x366d91[_0x1614f8(0x1df)](_0x1614f8(0x1a5),{'params':{'userIDs':[..._0x2d6f1f]}}))['body'][_0x1614f8(0x182)][_0x1614f8(0x1b2)](_0x266a79=>{const _0x4e90ab=_0x1614f8;_0x266a79&&_0x57a10e[_0x4e90ab(0x18d)](_0x266a79);});};var _0x497dc4=Object[_0x273874(0x175)],_0x38d9f6=(_0x59d3ee,_0x430498,_0x2c3c74,_0x16217a)=>{for(var _0x1399ca=_0x16217a>0x1?void 0x0:_0x16217a?_0x497dc4(_0x430498,_0x2c3c74):_0x430498,_0x1b60b3=_0x59d3ee['length']-0x1,_0x557a36;_0x1b60b3>=0x0;_0x1b60b3--)(_0x557a36=_0x59d3ee[_0x1b60b3])&&(_0x1399ca=_0x557a36(_0x1399ca)||_0x1399ca);return _0x1399ca;},_0x11a110=(_0xf5387,_0xc88fb8)=>(_0x1e736f,_0x4380e4)=>_0xc88fb8(_0x1e736f,_0x4380e4,_0xf5387);let _0x16917b=class extends _0x557eb8[_0x273874(0x1d4)]{constructor(_0x90a5a1,_0x1725c3,_0x27607a,_0x33b3b9){const _0x54c70a=_0x273874;super(),this['_commentService']=_0x90a5a1,this[_0x54c70a(0x1ab)]=_0x1725c3,this['_userService']=_0x27607a,this[_0x54c70a(0x1f3)]=_0x33b3b9,this[_0x54c70a(0x19f)](),this[_0x54c70a(0x18b)]();}[_0x273874(0x18b)](){const _0x21308f=_0x273874;this[_0x21308f(0x1ef)](this['_threadCommentModel'][_0x21308f(0x1e9)][_0x21308f(0x171)](_0x286f37[_0x21308f(0x19b)](0x10))[_0x21308f(0x1d7)](_0x4f290e=>{const _0x5c58a3=_0x21308f,_0x2edd21=new Set();_0x4f290e[_0x5c58a3(0x1b2)](_0x53ec5b=>{const _0x428f60=_0x5c58a3;if(_0x53ec5b[_0x428f60(0x1b1)]==='add'){const _0x57411b=_0x53ec5b[_0x428f60(0x197)][_0x428f60(0x1f0)];_0x2edd21[_0x428f60(0x1c8)](_0x57411b);}}),_0x32a0db(this[_0x5c58a3(0x1f3)],_0x2edd21);}));}[_0x273874(0x19f)](){const _0x5e768f=_0x273874;this[_0x5e768f(0x1ef)](this[_0x5e768f(0x17c)][_0x5e768f(0x1e9)][_0x5e768f(0x1d7)](async _0x2cbb8a=>{const _0x1afff1=_0x5e768f;var _0x5278c5,_0x44e694,_0x567c02,_0x1c378a;const _0x4361e0=(_0x5278c5=this[_0x1afff1(0x1ab)][_0x1afff1(0x1e5)](_0x2cbb8a[_0x1afff1(0x1ae)])[_0x1afff1(0x1cb)](_0x426ca1=>_0x426ca1[_0x1afff1(0x17d)]===_0x2cbb8a[_0x1afff1(0x17d)]))==null?void 0x0:_0x5278c5[_0x1afff1(0x172)];if(!_0x4361e0)return;const {unitId:_0xa7302a,subUnitId:_0x337fe4}=_0x4361e0;switch(_0x2cbb8a['user']&&this[_0x1afff1(0x1e2)][_0x1afff1(0x18d)](_0x2cbb8a[_0x1afff1(0x17f)]),_0x2cbb8a[_0x1afff1(0x1b1)]){case _0x5105e0[_0x1afff1(0x190)]:break;case _0x5105e0[_0x1afff1(0x1e4)]:{this['_threadCommentModel'][_0x1afff1(0x1b3)](_0xa7302a,_0x337fe4,{'unitId':_0xa7302a,'subUnitId':_0x337fe4,'ref':'','id':_0x2cbb8a['replyId'],'dT':_0x497fc3(+_0x2cbb8a[_0x1afff1(0x198)]),'threadId':_0x2cbb8a[_0x1afff1(0x17d)],'personId':(_0x567c02=(_0x44e694=_0x2cbb8a['user'])==null?void 0x0:_0x44e694[_0x1afff1(0x1d6)])!=null?_0x567c02:_0x2cbb8a[_0x1afff1(0x1e0)],'text':JSON[_0x1afff1(0x1dd)](_0x2cbb8a['content']),'parentId':_0x4361e0['id']});break;}case _0x5105e0['Delete']:{const _0x32974c=this[_0x1afff1(0x1ab)][_0x1afff1(0x179)](_0xa7302a,_0x337fe4,_0x2cbb8a[_0x1afff1(0x19d)]);_0x32974c&&_0x32974c['parentId']&&this['_threadCommentModel'][_0x1afff1(0x1c0)](_0xa7302a,_0x337fe4,_0x2cbb8a[_0x1afff1(0x19d)]);break;}case _0x5105e0[_0x1afff1(0x1f2)]:{this[_0x1afff1(0x1ab)][_0x1afff1(0x1c7)](_0xa7302a,_0x337fe4,{'commentId':_0x2cbb8a['replyId'],'text':JSON[_0x1afff1(0x1dd)](_0x2cbb8a[_0x1afff1(0x1e7)])});break;}case _0x5105e0['Solve']:{const _0x4ed3e6=(_0x1c378a=this[_0x1afff1(0x1ab)][_0x1afff1(0x1e5)](_0x2cbb8a[_0x1afff1(0x1ae)])[_0x1afff1(0x1cb)](_0x9dcd6a=>_0x9dcd6a[_0x1afff1(0x17d)]===_0x2cbb8a['threadId']))==null?void 0x0:_0x1c378a[_0x1afff1(0x172)];_0x4ed3e6&&this['_threadCommentModel']['resolveComment'](_0xa7302a,_0x337fe4,_0x4ed3e6['id'],_0x2cbb8a[_0x1afff1(0x183)]===_0x68b241[_0x1afff1(0x1a0)]);break;}}}));}};_0x16917b=_0x38d9f6([_0x11a110(0x0,_0x557eb8[_0x273874(0x1c6)](_0x259e13['CommentService'])),_0x11a110(0x1,_0x557eb8['Inject'](_0x5d20e1[_0x273874(0x1c2)])),_0x11a110(0x2,_0x557eb8['Inject'](_0x557eb8['UserManagerService'])),_0x11a110(0x3,_0x557eb8[_0x273874(0x1c6)](_0x557eb8[_0x273874(0x199)]))],_0x16917b);const _0x454e53=_0x273874(0x1db),_0xa3686b={};var _0x5b0d02=Object[_0x273874(0x175)],_0x2199f4=(_0x50c8a8,_0x42d4cf,_0x2f98e0,_0x436f31)=>{const _0x349357=_0x273874;for(var _0x4342df=_0x436f31>0x1?void 0x0:_0x436f31?_0x5b0d02(_0x42d4cf,_0x2f98e0):_0x42d4cf,_0x3bd632=_0x50c8a8[_0x349357(0x177)]-0x1,_0x2b0909;_0x3bd632>=0x0;_0x3bd632--)(_0x2b0909=_0x50c8a8[_0x3bd632])&&(_0x4342df=_0x2b0909(_0x4342df)||_0x4342df);return _0x4342df;},_0x13e649=(_0x378603,_0x15284c)=>(_0x588aa5,_0x3e8d14)=>_0x15284c(_0x588aa5,_0x3e8d14,_0x378603);function _0x36f5e1(_0x935f1e,_0x7d3804){const _0x9fd5d3=_0x273874,_0x171a75=_0x935f1e[_0x9fd5d3(0x194)][0x0];return{..._0x7d3804,'id':_0x171a75['replyId'],'resolved':_0x935f1e[_0x9fd5d3(0x183)]===0x1,'dT':_0x497fc3(_0x171a75[_0x9fd5d3(0x198)]),'personId':_0x171a75[_0x9fd5d3(0x1e0)],'threadId':_0x171a75['threadId']};}function _0x56ecca(_0x5c1035,_0x29a5a5,_0x1aef2c){const _0x3806b5=_0x273874;var _0x5e39df,_0x3198b7;if(((_0x3198b7=(_0x5e39df=_0x5c1035==null?void 0x0:_0x5c1035[_0x3806b5(0x194)])==null?void 0x0:_0x5e39df[_0x3806b5(0x177)])!=null?_0x3198b7:0x0)>0x0){const _0x2e6706=(_0x3f8560,_0x4552ac)=>({'id':_0x3f8560[_0x3806b5(0x19d)],'threadId':_0x3f8560[_0x3806b5(0x17d)],'dT':_0x497fc3(_0x3f8560['createTimestamp']),'personId':_0x3f8560['userId'],'resolved':_0x5c1035[_0x3806b5(0x183)]===_0x68b241[_0x3806b5(0x1a0)],'unitId':_0x29a5a5,'subUnitId':_0x1aef2c,'text':JSON[_0x3806b5(0x1dd)](_0x3f8560[_0x3806b5(0x1e7)]),'parentId':_0x4552ac}),_0xa6d09a=_0x2e6706(_0x5c1035[_0x3806b5(0x194)][0x0]);return{..._0xa6d09a,'children':_0x5c1035[_0x3806b5(0x194)][_0x3806b5(0x191)](0x1)[_0x3806b5(0x17a)](_0x1b9674=>_0x2e6706(_0x1b9674,_0xa6d09a['id']))};}return null;}let _0x2fdd5d=class{constructor(_0x40b369,_0x128d63,_0x508dc9){const _0xcdfd4a=_0x273874;this[_0xcdfd4a(0x1de)]=_0x40b369,this[_0xcdfd4a(0x1e2)]=_0x128d63,this[_0xcdfd4a(0x1d1)]=_0x508dc9;}async['addComment'](_0x589153){const _0x54bef6=_0x273874;var _0x3319ba,_0x22e0bb;const {parentId:_0x1445d0,unitId:_0x2358d0,text:_0x3c417f,threadId:_0x1a2f22}=_0x589153,_0x29cae8=(_0x22e0bb=(_0x3319ba=_0x3c417f[_0x54bef6(0x181)])==null?void 0x0:_0x3319ba['filter'](_0x58eb57=>_0x58eb57[_0x54bef6(0x1e3)]===_0x557eb8['CustomRangeType'][_0x54bef6(0x1b6)])[_0x54bef6(0x17a)](_0x5a4d67=>_0x5a4d67[_0x54bef6(0x1aa)]))!=null?_0x22e0bb:[],_0x29ab06=JSON[_0x54bef6(0x1d2)](_0x3c417f),_0x5dffcf=(await this[_0x54bef6(0x1d1)][_0x54bef6(0x1d0)](_0x2358d0))[_0x54bef6(0x1ec)]();if(_0x1445d0){const _0x483ce1={'memberId':_0x5dffcf,'unitId':_0x2358d0,'content':_0x29ab06,'mention':_0x29cae8,'threadId':_0x1a2f22},_0x339536=(await this[_0x54bef6(0x1de)][_0x54bef6(0x1eb)](_0x54bef6(0x1ca)+_0x2358d0+_0x54bef6(0x170),{'body':_0x483ce1}))[_0x54bef6(0x189)][_0x54bef6(0x196)];return{..._0x589153,'id':_0x339536[_0x54bef6(0x19d)],'dT':_0x557eb8[_0x54bef6(0x18f)](+_0x339536['createTimestamp'])['format'](_0x54bef6(0x19e)),'personId':_0x339536[_0x54bef6(0x1e0)]};}else{const _0x2d2f78={'memberId':_0x5dffcf,'unitId':_0x2358d0,'content':_0x29ab06,'mention':_0x29cae8},_0x596752=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x2358d0+_0x54bef6(0x1af),{'body':_0x2d2f78});return _0x36f5e1(_0x596752[_0x54bef6(0x189)]['comment'],_0x589153);}}async[_0x273874(0x1c7)](_0x428b8c){const _0xc1f7e2=_0x273874;var _0x1596c4,_0x133efb;const {text:_0x167903,unitId:_0x3deab3}=_0x428b8c,_0x245206=(_0x133efb=(_0x1596c4=_0x167903[_0xc1f7e2(0x181)])==null?void 0x0:_0x1596c4[_0xc1f7e2(0x1a3)](_0x129ef4=>_0x129ef4[_0xc1f7e2(0x1e3)]===_0x557eb8[_0xc1f7e2(0x1bf)][_0xc1f7e2(0x1b6)])[_0xc1f7e2(0x17a)](_0x273306=>_0x273306[_0xc1f7e2(0x1aa)]))!=null?_0x133efb:[],_0x17f21a=JSON[_0xc1f7e2(0x1d2)](_0x167903),_0x3e6976=_0x428b8c[_0xc1f7e2(0x17d)],_0x36cc28=_0x428b8c['id'],_0x43cc83={'memberId':(await this[_0xc1f7e2(0x1d1)][_0xc1f7e2(0x1d0)](_0x3deab3))['getMemberID'](),'unitId':_0x3deab3,'threadId':_0x3e6976,'mention':_0x245206,'content':_0x17f21a,'replyId':_0x36cc28},_0xf5fc87=await this[_0xc1f7e2(0x1de)][_0xc1f7e2(0x1eb)](_0xc1f7e2(0x1ca)+_0x3deab3+_0xc1f7e2(0x1ea),{'body':_0x43cc83});return!_0xf5fc87['body'][_0xc1f7e2(0x1a2)]||_0xf5fc87['body'][_0xc1f7e2(0x1a2)][_0xc1f7e2(0x1d3)]===0x1;}async[_0x273874(0x1a9)](_0x1d461b){const _0x2406e3=_0x273874,{unitId:_0x375ba1}=_0x1d461b,_0x449a7d=_0x1d461b[_0x2406e3(0x17d)],_0x3ec698={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x375ba1,'threadId':_0x449a7d,'solved':_0x1d461b[_0x2406e3(0x16c)]?_0x68b241[_0x2406e3(0x1a0)]:_0x68b241[_0x2406e3(0x174)]},_0x569c94=await this[_0x2406e3(0x1de)][_0x2406e3(0x1eb)]('/universer-api/comment/unit/'+_0x375ba1+_0x2406e3(0x16f),{'body':_0x3ec698});return!_0x569c94[_0x2406e3(0x189)][_0x2406e3(0x1a2)]||_0x569c94[_0x2406e3(0x189)][_0x2406e3(0x1a2)]['code']===0x1;}async['deleteComment'](_0x51f608,_0x41b7c2,_0x3080ca,_0x4c3753){const _0x270ba4=_0x273874,_0x131362={'memberId':(await this[_0x270ba4(0x1d1)]['requireSession'](_0x51f608))['getMemberID'](),'threadId':_0x3080ca,'replyId':_0x4c3753,'unitId':_0x51f608},_0xe9786c=await this['_httpService']['post'](_0x270ba4(0x1ca)+_0x51f608+'/delete',{'body':_0x131362});return!_0xe9786c[_0x270ba4(0x189)]['error']||_0xe9786c[_0x270ba4(0x189)][_0x270ba4(0x1a2)][_0x270ba4(0x1d3)]===0x1;}async[_0x273874(0x19a)](_0x198487,_0xd74f2a,_0x323d11){const _0x468902=_0x273874,_0x558b71={'unitId':_0x198487,'threadId':_0x323d11},_0x34c72d=await this['_httpService']['post'](_0x468902(0x1ca)+_0x198487+_0x468902(0x1dc),{'body':_0x558b71}),_0xd766b6=_0x323d11['map'](_0x1ddf31=>_0x56ecca(_0x34c72d[_0x468902(0x189)][_0x468902(0x1cd)][_0x1ddf31],_0x198487,_0xd74f2a))[_0x468902(0x1a3)](Boolean);return Object[_0x468902(0x1a8)](_0x34c72d[_0x468902(0x189)][_0x468902(0x182)])['forEach'](_0x128366=>{const _0x28b9d1=_0x468902;this['_userService'][_0x28b9d1(0x18d)](_0x128366);}),_0xd766b6;}[_0x273874(0x1d9)](_0x46e8c9){const _0x3ca442=_0x273874;return{'id':_0x46e8c9['id'],'threadId':_0x46e8c9[_0x3ca442(0x17d)],'ref':_0x46e8c9['ref']};}};_0x2fdd5d=_0x2199f4([_0x13e649(0x0,_0x557eb8['Inject'](_0xc86999[_0x273874(0x1da)])),_0x13e649(0x1,_0x557eb8[_0x273874(0x1c6)](_0x557eb8[_0x273874(0x1c9)])),_0x13e649(0x2,_0x557eb8['Inject'](_0x259e13['CollaborationSessionService']))],_0x2fdd5d);var _0x42f408=Object[_0x273874(0x175)],_0x3b839c=(_0x45030e,_0x37bdd2,_0x3572b5,_0x62a11d)=>{const _0xf5c70e=_0x273874;for(var _0x5afa77=_0x62a11d>0x1?void 0x0:_0x62a11d?_0x42f408(_0x37bdd2,_0x3572b5):_0x37bdd2,_0x236de2=_0x45030e[_0xf5c70e(0x177)]-0x1,_0x47ce1d;_0x236de2>=0x0;_0x236de2--)(_0x47ce1d=_0x45030e[_0x236de2])&&(_0x5afa77=_0x47ce1d(_0x5afa77)||_0x5afa77);return _0x5afa77;},_0x8415cd=(_0xee2029,_0x105c41)=>(_0x5291ed,_0x51a377)=>_0x105c41(_0x5291ed,_0x51a377,_0xee2029);let _0x32d9bc=class extends _0x557eb8[_0x273874(0x1d4)]{constructor(_0x411a5b,_0x19280e){const _0x5a1142=_0x273874;super(),this[_0x5a1142(0x1cc)]=_0x411a5b,this['_threadCommentDataSource']=_0x19280e,this[_0x5a1142(0x180)]();}[_0x273874(0x180)](){const _0x5afebc=_0x273874;this[_0x5afebc(0x1cc)][_0x5afebc(0x1ba)]=this[_0x5afebc(0x1a7)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x32d9bc=_0x3b839c([_0x8415cd(0x0,_0x5d20e1[_0x273874(0x178)]),_0x8415cd(0x1,_0x557eb8['Inject'](_0x2fdd5d))],_0x32d9bc);var _0x1280af=Object[_0x273874(0x187)],_0x22a270=Object['getOwnPropertyDescriptor'],_0x4b6f7a=(_0x384d89,_0x408bae,_0x599c55)=>_0x408bae in _0x384d89?_0x1280af(_0x384d89,_0x408bae,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x599c55}):_0x384d89[_0x408bae]=_0x599c55,_0x1b12be=(_0x480134,_0x48896d,_0x47a8dc,_0x2b044c)=>{const _0x37e0ed=_0x273874;for(var _0x3ea76a=_0x2b044c>0x1?void 0x0:_0x2b044c?_0x22a270(_0x48896d,_0x47a8dc):_0x48896d,_0x3245a4=_0x480134[_0x37e0ed(0x177)]-0x1,_0x4e8109;_0x3245a4>=0x0;_0x3245a4--)(_0x4e8109=_0x480134[_0x3245a4])&&(_0x3ea76a=_0x4e8109(_0x3ea76a)||_0x3ea76a);return _0x3ea76a;},_0x4bfd89=(_0xf4ca4f,_0x151a80)=>(_0x22de0e,_0x2863e0)=>_0x151a80(_0x22de0e,_0x2863e0,_0xf4ca4f),_0x1e4ab6=(_0x40a861,_0x434431,_0x529b47)=>_0x4b6f7a(_0x40a861,typeof _0x434431!=_0x273874(0x1a6)?_0x434431+'':_0x434431,_0x529b47);_0x18595e['UniverThreadCommentDataSourcePlugin']=class extends _0x557eb8[_0x273874(0x1b9)]{constructor(_0x5a24db=_0xa3686b,_0x42d596,_0x4d7618){const _0x544cd6=_0x273874;super(),this[_0x544cd6(0x1ac)]=_0x5a24db,this[_0x544cd6(0x1f3)]=_0x42d596,this[_0x544cd6(0x1ad)]=_0x4d7618;const {..._0x33f505}=_0x557eb8[_0x544cd6(0x1ed)]({},_0xa3686b,this[_0x544cd6(0x1ac)]);this[_0x544cd6(0x1ad)][_0x544cd6(0x1bc)](_0x454e53,_0x33f505);}[_0x273874(0x1b5)](){[[_0x2fdd5d],[_0x32d9bc],[_0x16917b]]['forEach'](_0x109492=>{const _0x1a2196=_0x1068;this['_injector'][_0x1a2196(0x1c8)](_0x109492);});}[_0x273874(0x1ee)](){const _0x50f977=_0x273874;this[_0x50f977(0x1f3)][_0x50f977(0x1df)](_0x32d9bc),this[_0x50f977(0x1f3)][_0x50f977(0x1df)](_0x16917b);}},_0x1e4ab6(_0x18595e[_0x273874(0x1b7)],'pluginName',_0x398ac2),_0x1e4ab6(_0x18595e[_0x273874(0x1b7)],'type',_0x557eb8[_0x273874(0x176)][_0x273874(0x173)]),_0x18595e[_0x273874(0x1b7)]=_0x1b12be([_0x557eb8[_0x273874(0x1bd)](_0x22fd3d['UniverThreadCommentUIPlugin'],_0x259e13['UniverCollaborationClientPlugin'],_0x5e1cd1[_0x273874(0x19c)]),_0x4bfd89(0x1,_0x557eb8[_0x273874(0x1c6)](_0x557eb8[_0x273874(0x199)])),_0x4bfd89(0x2,_0x557eb8['IConfigService'])],_0x18595e['UniverThreadCommentDataSourcePlugin']),Object[_0x273874(0x187)](_0x18595e,Symbol['toStringTag'],{'value':_0x273874(0x185)});}));function _0x1deb(){const _0x21a943=['@univerjs/thread-comment','16148TzhWqN','Inject','updateComment','add','UserManagerService','/universer-api/comment/unit/','find','_threadCommentDataSourceService','comments','UniverThreadCommentUi','6vRoHYV','requireSession','_sessionService','stringify','code','Disposable','482720PvSnlB','userID','subscribe','Solve','saveCommentToSnapshot','HTTPService','thread-comment-data-source.config','/list','parse','_httpService','get','userId','UniverProCollaborationClient','_userService','rangeType','Reply','getUnit','@univerjs/network','content','UniverProLicense','commentUpdate$','/edit','post','getMemberID','merge','onReady','disposeWithMe','personId','242201gskNxG','Edit','_injector','getUser','resolved','object','6SCWixc','/solved','/reply','pipe','root','UNIVER_UNKNOWN','OpenOrReOpen','getOwnPropertyDescriptor','UniverInstanceType','length','IThreadCommentDataSourceService','getComment','map','Unknown','_commentService','threadId','UniverThreadComment','user','_initDataSource','customRanges','users','solved','3062574vjTGnr','Module','UniverProThreadCommentDatasource','defineProperty','format','body','function','_initUserSync','@univerjs-pro/license','addUser','7MlMmsN','dayjs','Add','slice','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','140CLCbQv','replies','1635395qtMHWX','reply','payload','createTimestamp','Injector','listComments','bufferTime','UniverLicensePlugin','replyId','YYYY/MM/DD\x20HH:mm','_init','Solved','247268TlGJUk','error','filter','delete','/universer-api/user/list','symbol','_threadCommentDataSource','values','resolveComment','rangeId','_threadCommentModel','_config','_configService','unitId','/add','UNRECOGNIZED','type','forEach','addComment','amd','onStarting','COMMENT','UniverThreadCommentDataSourcePlugin','Delete','Plugin','dataSource','@univerjs/thread-comment-ui','setConfig','DependentOn','rxjs','CustomRangeType','deleteComment','440932biyuvG','ThreadCommentModel','exports'];_0x1deb=function(){return _0x21a943;};return _0x1deb();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.15.2
|
|
3
|
+
"version": "0.15.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.15.2
|
|
49
|
-
"@univerjs
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.15.2",
|
|
49
|
+
"@univerjs/core": "0.15.2",
|
|
50
|
+
"@univerjs-pro/license": "0.15.2",
|
|
51
|
+
"@univerjs/network": "0.15.2",
|
|
52
|
+
"@univerjs/thread-comment": "0.15.2",
|
|
52
53
|
"@univerjs/protocol": "0.1.48",
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.15.2
|
|
54
|
-
"@univerjs/thread-comment": "0.15.2-insiders.20260119-edc718c"
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.15.2"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|