@univerjs-pro/thread-comment-datasource 0.8.3-nightly.202506271607 → 0.8.3-nightly.202507010644

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x4c88de=_0x8573;(function(_0x4d606e,_0x4cf289){const _0x1b45a8=_0x8573,_0xc90cfe=_0x4d606e();while(!![]){try{const _0x1d02f5=-parseInt(_0x1b45a8(0xc9))/0x1+parseInt(_0x1b45a8(0xca))/0x2*(-parseInt(_0x1b45a8(0x10d))/0x3)+-parseInt(_0x1b45a8(0xe3))/0x4*(-parseInt(_0x1b45a8(0x118))/0x5)+-parseInt(_0x1b45a8(0x11c))/0x6+-parseInt(_0x1b45a8(0xf3))/0x7+-parseInt(_0x1b45a8(0xc3))/0x8*(parseInt(_0x1b45a8(0xad))/0x9)+parseInt(_0x1b45a8(0xda))/0xa*(parseInt(_0x1b45a8(0xc6))/0xb);if(_0x1d02f5===_0x4cf289)break;else _0xc90cfe['push'](_0xc90cfe['shift']());}catch(_0x3e54f6){_0xc90cfe['push'](_0xc90cfe['shift']());}}}(_0x530f,0xad2d4));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x4c88de(0xff)});const b=require(_0x4c88de(0xd3)),T=require(_0x4c88de(0xa9)),c=require(_0x4c88de(0x107)),j=require(_0x4c88de(0x101)),M=require(_0x4c88de(0x116)),w=require(_0x4c88de(0xbc)),P=require(_0x4c88de(0xec)),U=_0x4c88de(0x10a);var I=(_0x16b073=>(_0x16b073[_0x16b073['OpenOrReOpen']=0x0]=_0x4c88de(0xb0),_0x16b073[_0x16b073[_0x4c88de(0xc2)]=0x1]='Solved',_0x16b073[_0x16b073[_0x4c88de(0xa6)]=-0x1]=_0x4c88de(0xa6),_0x16b073))(I||{}),v=(_0x52a311=>(_0x52a311[_0x52a311[_0x4c88de(0xbd)]=0x0]=_0x4c88de(0xbd),_0x52a311[_0x52a311[_0x4c88de(0x10f)]=0x1]=_0x4c88de(0x10f),_0x52a311[_0x52a311[_0x4c88de(0x121)]=0x2]='Reply',_0x52a311[_0x52a311[_0x4c88de(0xd7)]=0x3]='Edit',_0x52a311[_0x52a311[_0x4c88de(0x120)]=0x4]=_0x4c88de(0x120),_0x52a311[_0x52a311[_0x4c88de(0xb6)]=0x5]='Solve',_0x52a311[_0x52a311[_0x4c88de(0xa6)]=-0x1]=_0x4c88de(0xa6),_0x52a311))(v||{});const f=_0x5f35dc=>c['dayjs'](new Date(+_0x5f35dc))['format'](_0x4c88de(0xf7)),R=async(_0x1c3af7,_0x2f8461)=>{const _0x5f2b59=_0x4c88de,_0x11dc1e=_0x1c3af7[_0x5f2b59(0x122)](c['UserManagerService']),_0x4c36f7=_0x1c3af7[_0x5f2b59(0x122)](P[_0x5f2b59(0xa7)]);_0x2f8461[_0x5f2b59(0xfc)](_0x3ae7c9=>{const _0x40303e=_0x5f2b59;_0x11dc1e['getUser'](_0x3ae7c9)&&_0x2f8461[_0x40303e(0xb7)](_0x3ae7c9);}),_0x2f8461[_0x5f2b59(0xbe)]&&(await _0x4c36f7[_0x5f2b59(0x122)](_0x5f2b59(0xc5),{'params':{'userIDs':[..._0x2f8461]}}))[_0x5f2b59(0x11b)][_0x5f2b59(0xaf)][_0x5f2b59(0xfc)](_0x283e6b=>{const _0x1c0718=_0x5f2b59;_0x283e6b&&_0x11dc1e[_0x1c0718(0xf1)](_0x283e6b);});};var $=Object[_0x4c88de(0xcf)],E=(_0x369e14,_0x34318b,_0x3679e8,_0x410f57)=>{const _0xfcdf8e=_0x4c88de;for(var _0x2b2279=_0x410f57>0x1?void 0x0:_0x410f57?$(_0x34318b,_0x3679e8):_0x34318b,_0x53ce26=_0x369e14[_0xfcdf8e(0xf2)]-0x1,_0x37fa1a;_0x53ce26>=0x0;_0x53ce26--)(_0x37fa1a=_0x369e14[_0x53ce26])&&(_0x2b2279=_0x37fa1a(_0x2b2279)||_0x2b2279);return _0x2b2279;},S=(_0x405b5b,_0x4071b4)=>(_0x35da1e,_0x4b571f)=>_0x4071b4(_0x35da1e,_0x4b571f,_0x405b5b);let p=class extends c[_0x4c88de(0xce)]{constructor(_0x174f78,_0x1029b9,_0x59d3e0,_0x3ab0b4){const _0x498a15=_0x4c88de;super(),this[_0x498a15(0x10e)]=_0x174f78,this[_0x498a15(0x124)]=_0x1029b9,this[_0x498a15(0x11e)]=_0x59d3e0,this[_0x498a15(0xe0)]=_0x3ab0b4,this['_init'](),this[_0x498a15(0xc0)]();}[_0x4c88de(0xc0)](){const _0x1f3d3c=_0x4c88de;this[_0x1f3d3c(0xc4)](this[_0x1f3d3c(0x124)]['commentUpdate$'][_0x1f3d3c(0xb1)](w[_0x1f3d3c(0x110)](0x10))['subscribe'](_0x346017=>{const _0x1520f6=_0x1f3d3c,_0x4661fa=new Set();_0x346017[_0x1520f6(0xfc)](_0x141be1=>{const _0x522b3a=_0x1520f6;switch(_0x141be1[_0x522b3a(0x111)]){case _0x522b3a(0xd9):{const _0xa76929=_0x141be1['payload'][_0x522b3a(0x100)];_0x4661fa[_0x522b3a(0xd9)](_0xa76929);break;}}}),R(this[_0x1520f6(0xe0)],_0x4661fa);}));}[_0x4c88de(0xbf)](){const _0x5f5cd6=_0x4c88de;this[_0x5f5cd6(0xc4)](this[_0x5f5cd6(0x10e)][_0x5f5cd6(0xc1)][_0x5f5cd6(0xe2)](async _0x215788=>{const _0x9d33f7=_0x5f5cd6;var _0x4956e5,_0x3c4418,_0x22f4e1,_0x1b5454;const _0x4fa5f1=(_0x4956e5=this[_0x9d33f7(0x124)][_0x9d33f7(0xe8)](_0x215788[_0x9d33f7(0x123)])[_0x9d33f7(0xef)](_0x108fd2=>_0x108fd2['threadId']===_0x215788[_0x9d33f7(0xb8)]))==null?void 0x0:_0x4956e5[_0x9d33f7(0xb2)];if(!_0x4fa5f1)return;const {unitId:_0x30df7d,subUnitId:_0x4874bc}=_0x4fa5f1;switch(_0x215788[_0x9d33f7(0xd2)]&&this[_0x9d33f7(0x11e)]['addUser'](_0x215788[_0x9d33f7(0xd2)]),_0x215788['type']){case v[_0x9d33f7(0x10f)]:break;case v['Reply']:{this[_0x9d33f7(0x124)]['addComment'](_0x30df7d,_0x4874bc,{'unitId':_0x30df7d,'subUnitId':_0x4874bc,'ref':'','id':_0x215788[_0x9d33f7(0x102)],'dT':f(+_0x215788['createTimestamp']),'threadId':_0x215788[_0x9d33f7(0xb8)],'personId':(_0x22f4e1=(_0x3c4418=_0x215788[_0x9d33f7(0xd2)])==null?void 0x0:_0x3c4418[_0x9d33f7(0xf0)])!=null?_0x22f4e1:_0x215788[_0x9d33f7(0x114)],'text':JSON[_0x9d33f7(0xea)](_0x215788[_0x9d33f7(0xdf)]),'parentId':_0x4fa5f1['id']});break;}case v[_0x9d33f7(0x120)]:{const _0x399684=this['_threadCommentModel'][_0x9d33f7(0x113)](_0x30df7d,_0x4874bc,_0x215788[_0x9d33f7(0x102)]);_0x399684&&_0x399684[_0x9d33f7(0x10b)]&&this[_0x9d33f7(0x124)][_0x9d33f7(0x103)](_0x30df7d,_0x4874bc,_0x215788[_0x9d33f7(0x102)]);break;}case v[_0x9d33f7(0xd7)]:{this[_0x9d33f7(0x124)]['updateComment'](_0x30df7d,_0x4874bc,{'commentId':_0x215788[_0x9d33f7(0x102)],'text':JSON[_0x9d33f7(0xea)](_0x215788[_0x9d33f7(0xdf)])});break;}case v[_0x9d33f7(0xb6)]:{const _0xc78090=(_0x1b5454=this[_0x9d33f7(0x124)][_0x9d33f7(0xe8)](_0x215788[_0x9d33f7(0x123)])['find'](_0x14de45=>_0x14de45[_0x9d33f7(0xb8)]===_0x215788[_0x9d33f7(0xb8)]))==null?void 0x0:_0x1b5454[_0x9d33f7(0xb2)];_0xc78090&&this[_0x9d33f7(0x124)][_0x9d33f7(0xd6)](_0x30df7d,_0x4874bc,_0xc78090['id'],_0x215788[_0x9d33f7(0xac)]===I[_0x9d33f7(0xc2)]);break;}}}));}};p=E([S(0x0,c[_0x4c88de(0x108)](b[_0x4c88de(0xf8)])),S(0x1,c[_0x4c88de(0x108)](M[_0x4c88de(0xb9)])),S(0x2,c[_0x4c88de(0x108)](c[_0x4c88de(0x104)])),S(0x3,c[_0x4c88de(0x108)](c[_0x4c88de(0xb4)]))],p);const q=_0x4c88de(0xde),D={};var A=Object[_0x4c88de(0xcf)],x=(_0xe35a9c,_0x4dae2c,_0x3d74dd,_0x1d5432)=>{const _0x4c16db=_0x4c88de;for(var _0xb8d9c0=_0x1d5432>0x1?void 0x0:_0x1d5432?A(_0x4dae2c,_0x3d74dd):_0x4dae2c,_0x413c10=_0xe35a9c[_0x4c16db(0xf2)]-0x1,_0x3cb522;_0x413c10>=0x0;_0x413c10--)(_0x3cb522=_0xe35a9c[_0x413c10])&&(_0xb8d9c0=_0x3cb522(_0xb8d9c0)||_0xb8d9c0);return _0xb8d9c0;},_=(_0x38396e,_0x3938ad)=>(_0x1f981c,_0xb4c87a)=>_0x3938ad(_0x1f981c,_0xb4c87a,_0x38396e);function Y(_0x1cec11,_0x2de4fb){const _0x20737c=_0x4c88de,_0x545d99=_0x1cec11['replies'][0x0];return{..._0x2de4fb,'id':_0x545d99[_0x20737c(0x102)],'resolved':_0x1cec11['solved']===0x1,'dT':f(_0x545d99[_0x20737c(0xd5)]),'personId':_0x545d99[_0x20737c(0x114)],'threadId':_0x545d99[_0x20737c(0xb8)]};}function G(_0x5afd5c,_0x1b18e8,_0x1439c9){const _0x172abb=_0x4c88de;var _0xdf9adb,_0x51c4f8;if(((_0x51c4f8=(_0xdf9adb=_0x5afd5c==null?void 0x0:_0x5afd5c[_0x172abb(0xcd)])==null?void 0x0:_0xdf9adb[_0x172abb(0xf2)])!=null?_0x51c4f8:0x0)>0x0){const _0xb7f97c=(_0x3bf557,_0x1b36f0)=>({'id':_0x3bf557[_0x172abb(0x102)],'threadId':_0x3bf557[_0x172abb(0xb8)],'dT':f(_0x3bf557['createTimestamp']),'personId':_0x3bf557[_0x172abb(0x114)],'resolved':_0x5afd5c['solved']===I[_0x172abb(0xc2)],'unitId':_0x1b18e8,'subUnitId':_0x1439c9,'text':JSON['parse'](_0x3bf557['content']),'parentId':_0x1b36f0}),_0x3d7040=_0xb7f97c(_0x5afd5c['replies'][0x0]);return{..._0x3d7040,'children':_0x5afd5c[_0x172abb(0xcd)][_0x172abb(0x115)](0x1)[_0x172abb(0x112)](_0x1faf37=>_0xb7f97c(_0x1faf37,_0x3d7040['id']))};}return null;}let g=class{constructor(_0x3a8dcf,_0x50b2d1,_0x4fa1a3,_0x1f8dd6){const _0x3b42c4=_0x4c88de;this[_0x3b42c4(0x11d)]=_0x3a8dcf,this[_0x3b42c4(0x11e)]=_0x50b2d1,this['_sessionService']=_0x4fa1a3,this[_0x3b42c4(0xe0)]=_0x1f8dd6;}async['addComment'](_0xa0b70d){const _0x124772=_0x4c88de;var _0x55b3ad,_0x164e59;const {parentId:_0x5a2d36,unitId:_0x1ad543,text:_0x13c9f2,threadId:_0x177b9a}=_0xa0b70d,_0x54c55c=(_0x164e59=(_0x55b3ad=_0x13c9f2[_0x124772(0x109)])==null?void 0x0:_0x55b3ad['filter'](_0xe1a6f0=>_0xe1a6f0[_0x124772(0xfd)]===c[_0x124772(0xe6)][_0x124772(0xfa)])[_0x124772(0x112)](_0x47c715=>_0x47c715[_0x124772(0x106)]))!=null?_0x164e59:[],_0x1ce384=JSON[_0x124772(0xf5)](_0x13c9f2),_0x2a7f49=(await this[_0x124772(0xe7)][_0x124772(0xeb)](_0x1ad543))[_0x124772(0xba)]();if(_0x5a2d36){const _0x3dd42b={'memberId':_0x2a7f49,'unitId':_0x1ad543,'content':_0x1ce384,'mention':_0x54c55c,'threadId':_0x177b9a},_0x551c4a=(await this[_0x124772(0x11d)]['post'](_0x124772(0x119)+_0x1ad543+'/reply',{'body':_0x3dd42b}))['body'][_0x124772(0x105)];return{..._0xa0b70d,'id':_0x551c4a[_0x124772(0x102)],'dT':c[_0x124772(0xd0)](+_0x551c4a[_0x124772(0xd5)])[_0x124772(0xf9)](_0x124772(0xf7)),'personId':_0x551c4a['userId']};}else{const _0x20518d={'memberId':_0x2a7f49,'unitId':_0x1ad543,'content':_0x1ce384,'mention':_0x54c55c},_0x14f883=await this[_0x124772(0x11d)][_0x124772(0xc8)](_0x124772(0x119)+_0x1ad543+_0x124772(0xe5),{'body':_0x20518d});return Y(_0x14f883['body']['comment'],_0xa0b70d);}}async['updateComment'](_0x599f4f){const _0xe7e994=_0x4c88de;var _0x184924,_0x16db31;const {text:_0x10a4d4,unitId:_0x5939bb}=_0x599f4f,_0x2010fa=(_0x16db31=(_0x184924=_0x10a4d4[_0xe7e994(0x109)])==null?void 0x0:_0x184924[_0xe7e994(0xaa)](_0x565985=>_0x565985[_0xe7e994(0xfd)]===c[_0xe7e994(0xe6)][_0xe7e994(0xfa)])[_0xe7e994(0x112)](_0x531fce=>_0x531fce['rangeId']))!=null?_0x16db31:[],_0xd20448=JSON[_0xe7e994(0xf5)](_0x10a4d4),_0x35317b=_0x599f4f[_0xe7e994(0xb8)],_0x58390d=_0x599f4f['id'],_0x2efda8={'memberId':(await this['_sessionService']['requireSession'](_0x5939bb))[_0xe7e994(0xba)](),'unitId':_0x5939bb,'threadId':_0x35317b,'mention':_0x2010fa,'content':_0xd20448,'replyId':_0x58390d},_0x5be125=await this[_0xe7e994(0x11d)][_0xe7e994(0xc8)](_0xe7e994(0x119)+_0x5939bb+_0xe7e994(0xc7),{'body':_0x2efda8});return!_0x5be125['body'][_0xe7e994(0xfb)]||_0x5be125['body']['error'][_0xe7e994(0xdc)]===0x1;}async['resolveComment'](_0xf50bc1){const _0x5c3e71=_0x4c88de,{unitId:_0x1951cd}=_0xf50bc1,_0x5bf4e6=_0xf50bc1[_0x5c3e71(0xb8)],_0x21e95e={'memberId':this[_0x5c3e71(0x11e)][_0x5c3e71(0x10c)]()[_0x5c3e71(0xf0)],'unitId':_0x1951cd,'threadId':_0x5bf4e6,'solved':_0xf50bc1[_0x5c3e71(0xd1)]?I[_0x5c3e71(0xc2)]:I[_0x5c3e71(0xb0)]},_0x24b8f5=await this[_0x5c3e71(0x11d)][_0x5c3e71(0xc8)](_0x5c3e71(0x119)+_0x1951cd+_0x5c3e71(0xd4),{'body':_0x21e95e});return!_0x24b8f5[_0x5c3e71(0x11b)]['error']||_0x24b8f5[_0x5c3e71(0x11b)]['error'][_0x5c3e71(0xdc)]===0x1;}async['deleteComment'](_0x468820,_0x1c6a20,_0x20b454,_0x59c383){const _0x3ecfa5=_0x4c88de,_0x386b3d={'memberId':(await this[_0x3ecfa5(0xe7)][_0x3ecfa5(0xeb)](_0x468820))[_0x3ecfa5(0xba)](),'threadId':_0x20b454,'replyId':_0x59c383,'unitId':_0x468820},_0x5b9fcb=await this[_0x3ecfa5(0x11d)][_0x3ecfa5(0xc8)](_0x3ecfa5(0x119)+_0x468820+'/delete',{'body':_0x386b3d});return!_0x5b9fcb[_0x3ecfa5(0x11b)][_0x3ecfa5(0xfb)]||_0x5b9fcb['body'][_0x3ecfa5(0xfb)][_0x3ecfa5(0xdc)]===0x1;}async[_0x4c88de(0x11a)](_0x286659,_0x32448f,_0x2c3aa1){const _0x175ae9=_0x4c88de,_0x4684a3={'unitId':_0x286659,'threadId':_0x2c3aa1},_0x4392e1=await this[_0x175ae9(0x11d)][_0x175ae9(0xc8)](_0x175ae9(0x119)+_0x286659+_0x175ae9(0xee),{'body':_0x4684a3}),_0x52bbce=_0x2c3aa1[_0x175ae9(0x112)](_0x8f4496=>G(_0x4392e1[_0x175ae9(0x11b)][_0x175ae9(0xf4)][_0x8f4496],_0x286659,_0x32448f))[_0x175ae9(0xaa)](Boolean);return Object[_0x175ae9(0xe9)](_0x4392e1[_0x175ae9(0x11b)][_0x175ae9(0xaf)])[_0x175ae9(0xfc)](_0x332e87=>{const _0x9ccad1=_0x175ae9;this[_0x9ccad1(0x11e)][_0x9ccad1(0xf1)](_0x332e87);}),_0x52bbce;}['saveCommentToSnapshot'](_0x359f5b){const _0x5de62f=_0x4c88de;return{'id':_0x359f5b['id'],'threadId':_0x359f5b[_0x5de62f(0xb8)],'ref':_0x359f5b['ref']};}};function _0x530f(){const _0x4cc208=['onStarting','Injector','_configService','Solve','delete','threadId','ThreadCommentModel','getMemberID','setConfig','rxjs','Unknown','size','_init','_initUserSync','commentUpdate$','Solved','8BBuaRb','disposeWithMe','/universer-api/user/list','22kKZKeC','/edit','post','1261955VcGYbc','1007534kSWPAt','_threadCommentDataSource','_initDataSource','replies','Disposable','getOwnPropertyDescriptor','dayjs','resolved','user','@univerjs-pro/collaboration-client','/solved','createTimestamp','resolveComment','Edit','UniverInstanceType','add','17974340srtrqI','UniverThreadCommentDataSourcePlugin','code','IConfigService','thread-comment-data-source.config','content','_injector','dataSource','subscribe','3971676LPsqCc','merge','/add','CustomRangeType','_sessionService','getUnit','values','parse','requireSession','@univerjs/network','_config','/list','find','userID','addUser','length','8808688IVorKZ','comments','stringify','pluginName','YYYY/MM/DD\x20HH:mm','CommentService','format','COMMENT','error','forEach','rangeType','IThreadCommentDataSourceService','Module','personId','@univerjs/thread-comment-ui','replyId','deleteComment','UserManagerService','reply','rangeId','@univerjs/core','Inject','customRanges','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','parentId','getCurrentUser','3XNPccL','_commentService','Add','bufferTime','type','map','getComment','userId','slice','@univerjs/thread-comment','_threadCommentDataSourceService','5dsouYy','/universer-api/comment/unit/','listComments','body','760308BvHOdx','_httpService','_userService','Plugin','Delete','Reply','get','unitId','_threadCommentModel','onReady','UNRECOGNIZED','HTTPService','UNIVER_UNKNOWN','@univerjs-pro/license','filter','defineProperty','solved','6548679MkQWGF','symbol','users','OpenOrReOpen','pipe','root'];_0x530f=function(){return _0x4cc208;};return _0x530f();}g=x([_(0x0,c[_0x4c88de(0x108)](P[_0x4c88de(0xa7)])),_(0x1,c['Inject'](c['UserManagerService'])),_(0x2,c[_0x4c88de(0x108)](b['CollaborationSessionService'])),_(0x3,c[_0x4c88de(0x108)](c[_0x4c88de(0xb4)]))],g);var H=Object[_0x4c88de(0xcf)],J=(_0x4ae716,_0x41a2f9,_0x1d4047,_0x4c57f5)=>{for(var _0x19591a=_0x4c57f5>0x1?void 0x0:_0x4c57f5?H(_0x41a2f9,_0x1d4047):_0x41a2f9,_0x9dd3a4=_0x4ae716['length']-0x1,_0x589d09;_0x9dd3a4>=0x0;_0x9dd3a4--)(_0x589d09=_0x4ae716[_0x9dd3a4])&&(_0x19591a=_0x589d09(_0x19591a)||_0x19591a);return _0x19591a;},y=(_0x12ce44,_0x1d3e81)=>(_0x3c98a1,_0x3fd810)=>_0x1d3e81(_0x3c98a1,_0x3fd810,_0x12ce44);let C=class extends c[_0x4c88de(0xce)]{constructor(_0x2232e5,_0x324d31){const _0x4cdc2b=_0x4c88de;super(),this[_0x4cdc2b(0x117)]=_0x2232e5,this[_0x4cdc2b(0xcb)]=_0x324d31,this[_0x4cdc2b(0xcc)]();}[_0x4c88de(0xcc)](){const _0x4d330d=_0x4c88de;this['_threadCommentDataSourceService'][_0x4d330d(0xe1)]=this[_0x4d330d(0xcb)],this[_0x4d330d(0x117)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x4c88de(0xfe)]),y(0x1,c[_0x4c88de(0x108)](g))],C);function _0x8573(_0x31d457,_0x52fb7f){const _0x530f70=_0x530f();return _0x8573=function(_0x8573d8,_0x244932){_0x8573d8=_0x8573d8-0xa6;let _0x5539d8=_0x530f70[_0x8573d8];return _0x5539d8;},_0x8573(_0x31d457,_0x52fb7f);}var F=Object[_0x4c88de(0xab)],L=Object['getOwnPropertyDescriptor'],Z=(_0x338955,_0x172973,_0x2c4d83)=>_0x172973 in _0x338955?F(_0x338955,_0x172973,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2c4d83}):_0x338955[_0x172973]=_0x2c4d83,W=(_0x50129c,_0x3b5204,_0x37ee09,_0x612bb2)=>{const _0x5f553a=_0x4c88de;for(var _0x229399=_0x612bb2>0x1?void 0x0:_0x612bb2?L(_0x3b5204,_0x37ee09):_0x3b5204,_0x28ad38=_0x50129c[_0x5f553a(0xf2)]-0x1,_0x803942;_0x28ad38>=0x0;_0x28ad38--)(_0x803942=_0x50129c[_0x28ad38])&&(_0x229399=_0x803942(_0x229399)||_0x229399);return _0x229399;},O=(_0x3a8acf,_0x29fa5a)=>(_0x51b7ba,_0x7deae7)=>_0x29fa5a(_0x51b7ba,_0x7deae7,_0x3a8acf),N=(_0xa77771,_0x2932c4,_0x35f4af)=>Z(_0xa77771,typeof _0x2932c4!=_0x4c88de(0xae)?_0x2932c4+'':_0x2932c4,_0x35f4af);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x4c88de(0x11f)]{constructor(_0x581c26=D,_0x13000f,_0x3350b7){const _0x2f6cb8=_0x4c88de;super(),this[_0x2f6cb8(0xed)]=_0x581c26,this[_0x2f6cb8(0xe0)]=_0x13000f,this[_0x2f6cb8(0xb5)]=_0x3350b7;const {..._0x4d380a}=c[_0x2f6cb8(0xe4)]({},D,this[_0x2f6cb8(0xed)]);this[_0x2f6cb8(0xb5)][_0x2f6cb8(0xbb)](q,_0x4d380a);}[_0x4c88de(0xb3)](){[[g],[C],[p]]['forEach'](_0x200305=>{const _0x1eda1b=_0x8573;this['_injector'][_0x1eda1b(0xd9)](_0x200305);});}[_0x4c88de(0x125)](){const _0x1fd12c=_0x4c88de;this[_0x1fd12c(0xe0)][_0x1fd12c(0x122)](C),this['_injector'][_0x1fd12c(0x122)](p);}},N(exports[_0x4c88de(0xdb)],_0x4c88de(0xf6),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x4c88de(0x111),c[_0x4c88de(0xd8)][_0x4c88de(0xa8)]),exports[_0x4c88de(0xdb)]=W([c['DependentOn'](j['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c[_0x4c88de(0x108)](c[_0x4c88de(0xb4)])),O(0x2,c[_0x4c88de(0xdd)])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0x39019a=_0x20a6;(function(_0x5c0596,_0x5e0462){const _0x3a34be=_0x20a6,_0x1a7564=_0x5c0596();while(!![]){try{const _0x56f6bc=parseInt(_0x3a34be(0xef))/0x1*(-parseInt(_0x3a34be(0xb8))/0x2)+parseInt(_0x3a34be(0x108))/0x3+-parseInt(_0x3a34be(0x10c))/0x4+-parseInt(_0x3a34be(0x113))/0x5*(parseInt(_0x3a34be(0xd9))/0x6)+parseInt(_0x3a34be(0x10a))/0x7+-parseInt(_0x3a34be(0xc9))/0x8*(parseInt(_0x3a34be(0xd1))/0x9)+parseInt(_0x3a34be(0xfe))/0xa;if(_0x56f6bc===_0x5e0462)break;else _0x1a7564['push'](_0x1a7564['shift']());}catch(_0x282623){_0x1a7564['push'](_0x1a7564['shift']());}}}(_0x4105,0xb55c5));Object[_0x39019a(0x10b)](exports,Symbol['toStringTag'],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x39019a(0x101);var I=(_0xd3269f=>(_0xd3269f[_0xd3269f[_0x39019a(0x106)]=0x0]=_0x39019a(0x106),_0xd3269f[_0xd3269f[_0x39019a(0xc5)]=0x1]='Solved',_0xd3269f[_0xd3269f['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0xd3269f))(I||{}),v=(_0x109d9c=>(_0x109d9c[_0x109d9c['Unknown']=0x0]=_0x39019a(0xf7),_0x109d9c[_0x109d9c[_0x39019a(0xe5)]=0x1]=_0x39019a(0xe5),_0x109d9c[_0x109d9c[_0x39019a(0xd5)]=0x2]=_0x39019a(0xd5),_0x109d9c[_0x109d9c[_0x39019a(0xc4)]=0x3]=_0x39019a(0xc4),_0x109d9c[_0x109d9c[_0x39019a(0x105)]=0x4]=_0x39019a(0x105),_0x109d9c[_0x109d9c[_0x39019a(0xdf)]=0x5]=_0x39019a(0xdf),_0x109d9c[_0x109d9c['UNRECOGNIZED']=-0x1]=_0x39019a(0xb0),_0x109d9c))(v||{});const f=_0x5ae064=>c[_0x39019a(0xfa)](new Date(+_0x5ae064))[_0x39019a(0xbe)](_0x39019a(0xbb)),R=async(_0x4cc640,_0x396c5b)=>{const _0x391f0e=_0x39019a,_0x2a8b8b=_0x4cc640[_0x391f0e(0xf4)](c['UserManagerService']),_0x132b70=_0x4cc640[_0x391f0e(0xf4)](P[_0x391f0e(0x107)]);_0x396c5b['forEach'](_0x49ebc8=>{const _0x44c8a8=_0x391f0e;_0x2a8b8b[_0x44c8a8(0x112)](_0x49ebc8)&&_0x396c5b['delete'](_0x49ebc8);}),_0x396c5b['size']&&(await _0x132b70[_0x391f0e(0xf4)]('/universer-api/user/list',{'params':{'userIDs':[..._0x396c5b]}}))[_0x391f0e(0xed)][_0x391f0e(0xe2)]['forEach'](_0x277b41=>{_0x277b41&&_0x2a8b8b['addUser'](_0x277b41);});};var $=Object[_0x39019a(0xfd)],E=(_0x468be5,_0x2c9b55,_0x15e432,_0x50d7f3)=>{const _0xe5094d=_0x39019a;for(var _0x32dfe4=_0x50d7f3>0x1?void 0x0:_0x50d7f3?$(_0x2c9b55,_0x15e432):_0x2c9b55,_0x2b3e67=_0x468be5[_0xe5094d(0xcd)]-0x1,_0x4ea425;_0x2b3e67>=0x0;_0x2b3e67--)(_0x4ea425=_0x468be5[_0x2b3e67])&&(_0x32dfe4=_0x4ea425(_0x32dfe4)||_0x32dfe4);return _0x32dfe4;},S=(_0x4c3356,_0x37ebdf)=>(_0x2964b5,_0x3aa8aa)=>_0x37ebdf(_0x2964b5,_0x3aa8aa,_0x4c3356);let p=class extends c[_0x39019a(0xbf)]{constructor(_0x192718,_0x134170,_0x2dddbb,_0x560db8){const _0x247213=_0x39019a;super(),this[_0x247213(0xea)]=_0x192718,this[_0x247213(0xc1)]=_0x134170,this[_0x247213(0x109)]=_0x2dddbb,this[_0x247213(0x11a)]=_0x560db8,this[_0x247213(0x102)](),this[_0x247213(0xb1)]();}[_0x39019a(0xb1)](){const _0x3e5380=_0x39019a;this[_0x3e5380(0x116)](this[_0x3e5380(0xc1)][_0x3e5380(0x10f)]['pipe'](w['bufferTime'](0x10))['subscribe'](_0x5a32b0=>{const _0x19cecc=_0x3e5380,_0x2f2a6b=new Set();_0x5a32b0[_0x19cecc(0x11d)](_0x56e37d=>{const _0x4d04bf=_0x19cecc;switch(_0x56e37d[_0x4d04bf(0x119)]){case _0x4d04bf(0xd6):{const _0x2c169f=_0x56e37d[_0x4d04bf(0xf3)][_0x4d04bf(0xf1)];_0x2f2a6b[_0x4d04bf(0xd6)](_0x2c169f);break;}}}),R(this['_injector'],_0x2f2a6b);}));}[_0x39019a(0x102)](){const _0x4db1cd=_0x39019a;this[_0x4db1cd(0x116)](this[_0x4db1cd(0xea)][_0x4db1cd(0x10f)][_0x4db1cd(0xd8)](async _0x4111c3=>{const _0x3e083a=_0x4db1cd;var _0x1e95c2,_0x2a117f,_0x432c6b,_0x34bb83;const _0x3b9b75=(_0x1e95c2=this[_0x3e083a(0xc1)]['getUnit'](_0x4111c3[_0x3e083a(0x11c)])[_0x3e083a(0xda)](_0x30225c=>_0x30225c['threadId']===_0x4111c3[_0x3e083a(0x117)]))==null?void 0x0:_0x1e95c2[_0x3e083a(0xaf)];if(!_0x3b9b75)return;const {unitId:_0x3fcc31,subUnitId:_0x399d96}=_0x3b9b75;switch(_0x4111c3[_0x3e083a(0x100)]&&this[_0x3e083a(0x109)]['addUser'](_0x4111c3[_0x3e083a(0x100)]),_0x4111c3['type']){case v[_0x3e083a(0xe5)]:break;case v[_0x3e083a(0xd5)]:{this['_threadCommentModel'][_0x3e083a(0xf0)](_0x3fcc31,_0x399d96,{'unitId':_0x3fcc31,'subUnitId':_0x399d96,'ref':'','id':_0x4111c3[_0x3e083a(0xc7)],'dT':f(+_0x4111c3[_0x3e083a(0x118)]),'threadId':_0x4111c3['threadId'],'personId':(_0x432c6b=(_0x2a117f=_0x4111c3[_0x3e083a(0x100)])==null?void 0x0:_0x2a117f[_0x3e083a(0xf5)])!=null?_0x432c6b:_0x4111c3[_0x3e083a(0xf8)],'text':JSON[_0x3e083a(0xde)](_0x4111c3[_0x3e083a(0xd0)]),'parentId':_0x3b9b75['id']});break;}case v[_0x3e083a(0x105)]:{const _0x596a8a=this[_0x3e083a(0xc1)][_0x3e083a(0xe6)](_0x3fcc31,_0x399d96,_0x4111c3[_0x3e083a(0xc7)]);_0x596a8a&&_0x596a8a['parentId']&&this[_0x3e083a(0xc1)]['deleteComment'](_0x3fcc31,_0x399d96,_0x4111c3[_0x3e083a(0xc7)]);break;}case v[_0x3e083a(0xc4)]:{this[_0x3e083a(0xc1)][_0x3e083a(0xdc)](_0x3fcc31,_0x399d96,{'commentId':_0x4111c3['replyId'],'text':JSON[_0x3e083a(0xde)](_0x4111c3[_0x3e083a(0xd0)])});break;}case v['Solve']:{const _0x12e409=(_0x34bb83=this[_0x3e083a(0xc1)][_0x3e083a(0xf6)](_0x4111c3[_0x3e083a(0x11c)])['find'](_0x18745a=>_0x18745a[_0x3e083a(0x117)]===_0x4111c3['threadId']))==null?void 0x0:_0x34bb83[_0x3e083a(0xaf)];_0x12e409&&this[_0x3e083a(0xc1)][_0x3e083a(0x103)](_0x3fcc31,_0x399d96,_0x12e409['id'],_0x4111c3[_0x3e083a(0xce)]===I[_0x3e083a(0xc5)]);break;}}}));}};p=E([S(0x0,c[_0x39019a(0xdd)](b['CommentService'])),S(0x1,c[_0x39019a(0xdd)](M[_0x39019a(0x115)])),S(0x2,c[_0x39019a(0xdd)](c[_0x39019a(0xb4)])),S(0x3,c['Inject'](c['Injector']))],p);const q=_0x39019a(0xcb),D={};function _0x20a6(_0x2fd923,_0x349622){const _0x41054b=_0x4105();return _0x20a6=function(_0x20a647,_0x11ddc6){_0x20a647=_0x20a647-0xac;let _0x2b51a9=_0x41054b[_0x20a647];return _0x2b51a9;},_0x20a6(_0x2fd923,_0x349622);}var A=Object[_0x39019a(0xfd)],x=(_0x3bf36f,_0x1c2e5c,_0x7c40be,_0x5991be)=>{for(var _0x408da1=_0x5991be>0x1?void 0x0:_0x5991be?A(_0x1c2e5c,_0x7c40be):_0x1c2e5c,_0x2dc089=_0x3bf36f['length']-0x1,_0x36b15b;_0x2dc089>=0x0;_0x2dc089--)(_0x36b15b=_0x3bf36f[_0x2dc089])&&(_0x408da1=_0x36b15b(_0x408da1)||_0x408da1);return _0x408da1;},_=(_0x1acc37,_0x230ca0)=>(_0x5aee1b,_0xed20ab)=>_0x230ca0(_0x5aee1b,_0xed20ab,_0x1acc37);function Y(_0x13c5cc,_0x3c5f03){const _0x4c9474=_0x39019a,_0x1cdfb3=_0x13c5cc[_0x4c9474(0xc6)][0x0];return{..._0x3c5f03,'id':_0x1cdfb3[_0x4c9474(0xc7)],'resolved':_0x13c5cc[_0x4c9474(0xce)]===0x1,'dT':f(_0x1cdfb3['createTimestamp']),'personId':_0x1cdfb3[_0x4c9474(0xf8)],'threadId':_0x1cdfb3['threadId']};}function G(_0xd89636,_0x34d959,_0x5b8b02){const _0x175234=_0x39019a;var _0x1c14c9,_0x3d616e;if(((_0x3d616e=(_0x1c14c9=_0xd89636==null?void 0x0:_0xd89636['replies'])==null?void 0x0:_0x1c14c9[_0x175234(0xcd)])!=null?_0x3d616e:0x0)>0x0){const _0x1675e9=(_0x127ec8,_0x188062)=>({'id':_0x127ec8[_0x175234(0xc7)],'threadId':_0x127ec8[_0x175234(0x117)],'dT':f(_0x127ec8[_0x175234(0x118)]),'personId':_0x127ec8['userId'],'resolved':_0xd89636['solved']===I[_0x175234(0xc5)],'unitId':_0x34d959,'subUnitId':_0x5b8b02,'text':JSON[_0x175234(0xde)](_0x127ec8[_0x175234(0xd0)]),'parentId':_0x188062}),_0x19f8cc=_0x1675e9(_0xd89636[_0x175234(0xc6)][0x0]);return{..._0x19f8cc,'children':_0xd89636[_0x175234(0xc6)]['slice'](0x1)[_0x175234(0xac)](_0x5726d0=>_0x1675e9(_0x5726d0,_0x19f8cc['id']))};}return null;}let g=class{constructor(_0x404a1f,_0x4c0d9c,_0x322399,_0x50d001){const _0x283764=_0x39019a;this[_0x283764(0xff)]=_0x404a1f,this[_0x283764(0x109)]=_0x4c0d9c,this[_0x283764(0xfc)]=_0x322399,this['_injector']=_0x50d001;}async['addComment'](_0x132952){const _0x16720b=_0x39019a;var _0x3c8767,_0x2db275;const {parentId:_0x229ca9,unitId:_0xcdd3e8,text:_0x23e51d,threadId:_0x3c2809}=_0x132952,_0x2cf9ce=(_0x2db275=(_0x3c8767=_0x23e51d[_0x16720b(0xdb)])==null?void 0x0:_0x3c8767['filter'](_0x1bf71d=>_0x1bf71d['rangeType']===c[_0x16720b(0xb9)][_0x16720b(0xbc)])['map'](_0x5b59b7=>_0x5b59b7[_0x16720b(0xeb)]))!=null?_0x2db275:[],_0x4dade4=JSON['stringify'](_0x23e51d),_0x3f629f=(await this[_0x16720b(0xfc)][_0x16720b(0xee)](_0xcdd3e8))[_0x16720b(0xf2)]();if(_0x229ca9){const _0x2cb869={'memberId':_0x3f629f,'unitId':_0xcdd3e8,'content':_0x4dade4,'mention':_0x2cf9ce,'threadId':_0x3c2809},_0x452619=(await this[_0x16720b(0xff)][_0x16720b(0xc2)](_0x16720b(0xad)+_0xcdd3e8+_0x16720b(0xba),{'body':_0x2cb869}))[_0x16720b(0xed)][_0x16720b(0xb5)];return{..._0x132952,'id':_0x452619['replyId'],'dT':c[_0x16720b(0xfa)](+_0x452619[_0x16720b(0x118)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x452619['userId']};}else{const _0x1ca3f5={'memberId':_0x3f629f,'unitId':_0xcdd3e8,'content':_0x4dade4,'mention':_0x2cf9ce},_0x1e4606=await this[_0x16720b(0xff)][_0x16720b(0xc2)](_0x16720b(0xad)+_0xcdd3e8+'/add',{'body':_0x1ca3f5});return Y(_0x1e4606[_0x16720b(0xed)][_0x16720b(0xd4)],_0x132952);}}async['updateComment'](_0x4ed2a0){const _0x69c1dc=_0x39019a;var _0x583155,_0x30f9ff;const {text:_0x1a54c7,unitId:_0x26b75d}=_0x4ed2a0,_0x62c392=(_0x30f9ff=(_0x583155=_0x1a54c7['customRanges'])==null?void 0x0:_0x583155[_0x69c1dc(0xfb)](_0x358036=>_0x358036[_0x69c1dc(0xe7)]===c['CustomRangeType'][_0x69c1dc(0xbc)])[_0x69c1dc(0xac)](_0x111872=>_0x111872[_0x69c1dc(0xeb)]))!=null?_0x30f9ff:[],_0x81179d=JSON[_0x69c1dc(0xcf)](_0x1a54c7),_0x1fbc2d=_0x4ed2a0[_0x69c1dc(0x117)],_0x3fbd90=_0x4ed2a0['id'],_0x1f4052={'memberId':(await this['_sessionService']['requireSession'](_0x26b75d))[_0x69c1dc(0xf2)](),'unitId':_0x26b75d,'threadId':_0x1fbc2d,'mention':_0x62c392,'content':_0x81179d,'replyId':_0x3fbd90},_0x50408e=await this['_httpService'][_0x69c1dc(0xc2)](_0x69c1dc(0xad)+_0x26b75d+'/edit',{'body':_0x1f4052});return!_0x50408e[_0x69c1dc(0xed)][_0x69c1dc(0xe8)]||_0x50408e[_0x69c1dc(0xed)]['error'][_0x69c1dc(0x10e)]===0x1;}async[_0x39019a(0x103)](_0x2aadbd){const _0x306217=_0x39019a,{unitId:_0x25ab61}=_0x2aadbd,_0x40160e=_0x2aadbd[_0x306217(0x117)],_0x281f5f={'memberId':this[_0x306217(0x109)]['getCurrentUser']()[_0x306217(0xf5)],'unitId':_0x25ab61,'threadId':_0x40160e,'solved':_0x2aadbd[_0x306217(0xc8)]?I[_0x306217(0xc5)]:I[_0x306217(0x106)]},_0x53c138=await this[_0x306217(0xff)][_0x306217(0xc2)](_0x306217(0xad)+_0x25ab61+_0x306217(0xd3),{'body':_0x281f5f});return!_0x53c138[_0x306217(0xed)]['error']||_0x53c138[_0x306217(0xed)][_0x306217(0xe8)][_0x306217(0x10e)]===0x1;}async['deleteComment'](_0x252980,_0x7be464,_0x54a66e,_0x3bcf0d){const _0x124b04=_0x39019a,_0x36c417={'memberId':(await this[_0x124b04(0xfc)][_0x124b04(0xee)](_0x252980))['getMemberID'](),'threadId':_0x54a66e,'replyId':_0x3bcf0d,'unitId':_0x252980},_0x117e15=await this[_0x124b04(0xff)]['post'](_0x124b04(0xad)+_0x252980+_0x124b04(0x11b),{'body':_0x36c417});return!_0x117e15[_0x124b04(0xed)][_0x124b04(0xe8)]||_0x117e15[_0x124b04(0xed)][_0x124b04(0xe8)][_0x124b04(0x10e)]===0x1;}async['listComments'](_0x41c08d,_0x4f2ba1,_0x31938e){const _0x2c8617=_0x39019a,_0x1fd354={'unitId':_0x41c08d,'threadId':_0x31938e},_0x42e930=await this['_httpService'][_0x2c8617(0xc2)]('/universer-api/comment/unit/'+_0x41c08d+'/list',{'body':_0x1fd354}),_0x37cff0=_0x31938e[_0x2c8617(0xac)](_0x266c52=>G(_0x42e930[_0x2c8617(0xed)][_0x2c8617(0xec)][_0x266c52],_0x41c08d,_0x4f2ba1))[_0x2c8617(0xfb)](Boolean);return Object[_0x2c8617(0xb7)](_0x42e930[_0x2c8617(0xed)][_0x2c8617(0xe2)])[_0x2c8617(0x11d)](_0x18bfa0=>{const _0x38815a=_0x2c8617;this[_0x38815a(0x109)]['addUser'](_0x18bfa0);}),_0x37cff0;}[_0x39019a(0xd7)](_0x53d7fa){const _0x112bce=_0x39019a;return{'id':_0x53d7fa['id'],'threadId':_0x53d7fa[_0x112bce(0x117)],'ref':_0x53d7fa[_0x112bce(0x110)]};}};g=x([_(0x0,c[_0x39019a(0xdd)](P[_0x39019a(0x107)])),_(0x1,c['Inject'](c[_0x39019a(0xb4)])),_(0x2,c[_0x39019a(0xdd)](b[_0x39019a(0x104)])),_(0x3,c[_0x39019a(0xdd)](c[_0x39019a(0xe0)]))],g);var H=Object[_0x39019a(0xfd)],J=(_0x135d19,_0x3a7f0a,_0x45c9f1,_0x40ce6f)=>{const _0x94424f=_0x39019a;for(var _0x429361=_0x40ce6f>0x1?void 0x0:_0x40ce6f?H(_0x3a7f0a,_0x45c9f1):_0x3a7f0a,_0xe20fb2=_0x135d19[_0x94424f(0xcd)]-0x1,_0x111b25;_0xe20fb2>=0x0;_0xe20fb2--)(_0x111b25=_0x135d19[_0xe20fb2])&&(_0x429361=_0x111b25(_0x429361)||_0x429361);return _0x429361;},y=(_0xa59c59,_0x498c46)=>(_0x1f982f,_0x2e8b47)=>_0x498c46(_0x1f982f,_0x2e8b47,_0xa59c59);function _0x4105(){const _0x5df9b9=['symbol','length','solved','stringify','content','8426295mtFMSr','UniverThreadCommentDataSourcePlugin','/solved','comment','Reply','add','saveCommentToSnapshot','subscribe','6UCwxol','find','customRanges','updateComment','Inject','parse','Solve','Injector','syncUpdateMutationToColla','users','_configService','onReady','Add','getComment','rangeType','error','UNIVER_UNKNOWN','_commentService','rangeId','comments','body','requireSession','1TVgZWS','addComment','personId','getMemberID','payload','get','userID','getUnit','Unknown','userId','setConfig','dayjs','filter','_sessionService','getOwnPropertyDescriptor','13023770LrqoTj','_httpService','user','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_init','resolveComment','CollaborationSessionService','Delete','OpenOrReOpen','HTTPService','3917658gyPXKz','_userService','8677949cjMWXB','defineProperty','5442776ZXqkCP','UniverThreadCommentUIPlugin','code','commentUpdate$','ref','_initDataSource','getUser','3914410uMimFQ','UniverCollaborationClientPlugin','ThreadCommentModel','disposeWithMe','threadId','createTimestamp','type','_injector','/delete','unitId','forEach','map','/universer-api/comment/unit/','DependentOn','root','UNRECOGNIZED','_initUserSync','_config','_threadCommentDataSource','UserManagerService','reply','merge','values','50572JiRPUy','CustomRangeType','/reply','YYYY/MM/DD\x20HH:mm','COMMENT','_threadCommentDataSourceService','format','Disposable','Plugin','_threadCommentModel','post','UniverInstanceType','Edit','Solved','replies','replyId','resolved','8QqmfSV','UniverLicensePlugin','thread-comment-data-source.config'];_0x4105=function(){return _0x5df9b9;};return _0x4105();}let C=class extends c[_0x39019a(0xbf)]{constructor(_0x3199cd,_0x34d061){const _0x246258=_0x39019a;super(),this[_0x246258(0xbd)]=_0x3199cd,this['_threadCommentDataSource']=_0x34d061,this['_initDataSource']();}[_0x39019a(0x111)](){const _0x35a48b=_0x39019a;this[_0x35a48b(0xbd)]['dataSource']=this[_0x35a48b(0xb3)],this[_0x35a48b(0xbd)][_0x35a48b(0xe1)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x39019a(0xdd)](g))],C);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x16f042,_0xd4873b,_0x228eee)=>_0xd4873b in _0x16f042?F(_0x16f042,_0xd4873b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x228eee}):_0x16f042[_0xd4873b]=_0x228eee,W=(_0x5a1c65,_0x2f8cbb,_0x3983c6,_0x3fa279)=>{for(var _0x5a4195=_0x3fa279>0x1?void 0x0:_0x3fa279?L(_0x2f8cbb,_0x3983c6):_0x2f8cbb,_0x1f3983=_0x5a1c65['length']-0x1,_0xacbb2b;_0x1f3983>=0x0;_0x1f3983--)(_0xacbb2b=_0x5a1c65[_0x1f3983])&&(_0x5a4195=_0xacbb2b(_0x5a4195)||_0x5a4195);return _0x5a4195;},O=(_0x150e38,_0x299657)=>(_0x5e76e6,_0x45c57b)=>_0x299657(_0x5e76e6,_0x45c57b,_0x150e38),N=(_0x225c72,_0xdbcb19,_0x204314)=>Z(_0x225c72,typeof _0xdbcb19!=_0x39019a(0xcc)?_0xdbcb19+'':_0xdbcb19,_0x204314);exports[_0x39019a(0xd2)]=class extends c[_0x39019a(0xc0)]{constructor(_0xab130a=D,_0x5a72f7,_0xaf7685){const _0x4ee355=_0x39019a;super(),this[_0x4ee355(0xb2)]=_0xab130a,this['_injector']=_0x5a72f7,this[_0x4ee355(0xe3)]=_0xaf7685;const {..._0x2e4f2f}=c[_0x4ee355(0xb6)]({},D,this['_config']);this[_0x4ee355(0xe3)][_0x4ee355(0xf9)](q,_0x2e4f2f);}['onStarting'](){[[g],[C],[p]]['forEach'](_0xa2e3c8=>{const _0x3f82a9=_0x20a6;this[_0x3f82a9(0x11a)]['add'](_0xa2e3c8);});}[_0x39019a(0xe4)](){const _0x26e06f=_0x39019a;this[_0x26e06f(0x11a)]['get'](C),this['_injector'][_0x26e06f(0xf4)](p);}},N(exports[_0x39019a(0xd2)],'pluginName',U),N(exports[_0x39019a(0xd2)],'type',c[_0x39019a(0xc3)][_0x39019a(0xe9)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x39019a(0xae)](j[_0x39019a(0x10d)],b[_0x39019a(0x114)],T[_0x39019a(0xca)]),O(0x1,c[_0x39019a(0xdd)](c[_0x39019a(0xe0)])),O(0x2,c['IConfigService'])],exports[_0x39019a(0xd2)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0xd3216e=_0x586b;(function(_0x22c8e5,_0x3f9307){const _0x54fb4e=_0x586b,_0x218f47=_0x22c8e5();while(!![]){try{const _0x20c050=parseInt(_0x54fb4e(0x13a))/0x1*(parseInt(_0x54fb4e(0x113))/0x2)+parseInt(_0x54fb4e(0xed))/0x3+parseInt(_0x54fb4e(0x120))/0x4+-parseInt(_0x54fb4e(0x11f))/0x5+parseInt(_0x54fb4e(0x134))/0x6*(-parseInt(_0x54fb4e(0xef))/0x7)+-parseInt(_0x54fb4e(0x145))/0x8+-parseInt(_0x54fb4e(0x114))/0x9*(parseInt(_0x54fb4e(0x10e))/0xa);if(_0x20c050===_0x3f9307)break;else _0x218f47['push'](_0x218f47['shift']());}catch(_0x408bfd){_0x218f47['push'](_0x218f47['shift']());}}}(_0x9c85,0x80583));import{CommentService as _0x67df09,CollaborationSessionService as _0x41d110,UniverCollaborationClientPlugin as _0x4ed5e1}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1c7e69}from'@univerjs-pro/license';import{dayjs as _0x20ef59,UserManagerService as _0x40b3f1,Inject as _0x44f5e1,Injector as _0x58e5e7,Disposable as _0x1b4e61,CustomRangeType as _0x4ab199,UniverInstanceType as _0x37bca2,DependentOn as _0x83fc12,IConfigService as _0x20992b,Plugin as _0x323721,merge as _0x67d16f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x49bd5f}from'@univerjs/thread-comment-ui';function _0x586b(_0x5325d1,_0x4b4180){const _0x9c85e1=_0x9c85();return _0x586b=function(_0x586b50,_0x3604e5){_0x586b50=_0x586b50-0xe8;let _0x5c460a=_0x9c85e1[_0x586b50];return _0x5c460a;},_0x586b(_0x5325d1,_0x4b4180);}import{ThreadCommentModel as _0x700cee,IThreadCommentDataSourceService as _0x12b23a}from'@univerjs/thread-comment';import{bufferTime as _0x1a9a9a}from'rxjs';function _0x9c85(){const _0x407200=['users','userID','user','_initDataSource','getCurrentUser','getMemberID','_init','Solve','_sessionService','deleteComment','419658wxUmig','OpenOrReOpen','disposeWithMe','type','userId','requireSession','113gkkshO','Unknown','comments','payload','personId','updateComment','customRanges','rangeType','createTimestamp','body','content','4240896tLZfyP','replyId','Reply','UNRECOGNIZED','reply','getUnit','/universer-api/user/list','_configService','code','solved','getOwnPropertyDescriptor','symbol','YYYY/MM/DD\x20HH:mm','/edit','767598yGlVsz','comment','7ZLHvhe','_commentService','/solved','_threadCommentDataSource','_httpService','/universer-api/comment/unit/','COMMENT','subscribe','/list','size','_threadCommentDataSourceService','post','syncUpdateMutationToColla','filter','delete','get','unitId','forEach','add','addUser','threadId','error','find','_threadCommentModel','Delete','thread-comment-data-source.config','/delete','/add','pipe','_userService','addComment','450BzGMxr','map','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initUserSync','parentId','15534atJLgL','35676HgIESP','rangeId','_injector','length','slice','onReady','Add','format','pluginName','getComment','commentUpdate$','2137165ENxGuP','2392120ciQfvE','getUser','root','replies','stringify','_config','Edit','parse','resolveComment','Solved'];_0x9c85=function(){return _0x407200;};return _0x9c85();}import{HTTPService as _0x38707a}from'@univerjs/network';const W=_0xd3216e(0x110);var I=(_0x34644b=>(_0x34644b[_0x34644b['OpenOrReOpen']=0x0]=_0xd3216e(0x135),_0x34644b[_0x34644b[_0xd3216e(0x129)]=0x1]='Solved',_0x34644b[_0x34644b[_0xd3216e(0x148)]=-0x1]=_0xd3216e(0x148),_0x34644b))(I||{}),v=(_0x5a6ae8=>(_0x5a6ae8[_0x5a6ae8['Unknown']=0x0]=_0xd3216e(0x13b),_0x5a6ae8[_0x5a6ae8[_0xd3216e(0x11a)]=0x1]=_0xd3216e(0x11a),_0x5a6ae8[_0x5a6ae8[_0xd3216e(0x147)]=0x2]='Reply',_0x5a6ae8[_0x5a6ae8[_0xd3216e(0x126)]=0x3]=_0xd3216e(0x126),_0x5a6ae8[_0x5a6ae8['Delete']=0x4]='Delete',_0x5a6ae8[_0x5a6ae8[_0xd3216e(0x131)]=0x5]=_0xd3216e(0x131),_0x5a6ae8[_0x5a6ae8[_0xd3216e(0x148)]=-0x1]=_0xd3216e(0x148),_0x5a6ae8))(v||{});const D=_0x36e24f=>_0x20ef59(new Date(+_0x36e24f))[_0xd3216e(0x11b)](_0xd3216e(0xeb)),B=async(_0x1344df,_0x4b7d37)=>{const _0x396a93=_0xd3216e,_0x3dafdb=_0x1344df['get'](_0x40b3f1),_0x55b8bc=_0x1344df[_0x396a93(0xfe)](_0x38707a);_0x4b7d37['forEach'](_0x4103c3=>{const _0x732a2c=_0x396a93;_0x3dafdb[_0x732a2c(0x121)](_0x4103c3)&&_0x4b7d37[_0x732a2c(0xfd)](_0x4103c3);}),_0x4b7d37[_0x396a93(0xf8)]&&(await _0x55b8bc[_0x396a93(0xfe)](_0x396a93(0x14b),{'params':{'userIDs':[..._0x4b7d37]}}))[_0x396a93(0x143)][_0x396a93(0x12a)][_0x396a93(0x100)](_0x477a09=>{const _0x2fb1ea=_0x396a93;_0x477a09&&_0x3dafdb[_0x2fb1ea(0x102)](_0x477a09);});};var K=Object[_0xd3216e(0xe9)],V=(_0x31706f,_0x5658bc,_0xd74f1b,_0x5ec9b7)=>{const _0x515d23=_0xd3216e;for(var _0x149e06=_0x5ec9b7>0x1?void 0x0:_0x5ec9b7?K(_0x5658bc,_0xd74f1b):_0x5658bc,_0x1b285c=_0x31706f[_0x515d23(0x117)]-0x1,_0x42af4e;_0x1b285c>=0x0;_0x1b285c--)(_0x42af4e=_0x31706f[_0x1b285c])&&(_0x149e06=_0x42af4e(_0x149e06)||_0x149e06);return _0x149e06;},p=(_0x594d18,_0x1f8570)=>(_0x39abcc,_0x55474d)=>_0x1f8570(_0x39abcc,_0x55474d,_0x594d18);let S=class extends _0x1b4e61{constructor(_0x511efc,_0x31069c,_0x1403a0,_0x556254){const _0x366c7f=_0xd3216e;super(),this['_commentService']=_0x511efc,this[_0x366c7f(0x106)]=_0x31069c,this[_0x366c7f(0x10c)]=_0x1403a0,this[_0x366c7f(0x116)]=_0x556254,this['_init'](),this[_0x366c7f(0x111)]();}[_0xd3216e(0x111)](){const _0x7a7bb0=_0xd3216e;this[_0x7a7bb0(0x136)](this[_0x7a7bb0(0x106)][_0x7a7bb0(0x11e)][_0x7a7bb0(0x10b)](_0x1a9a9a(0x10))['subscribe'](_0x374198=>{const _0x20c4f7=_0x7a7bb0,_0x54ab82=new Set();_0x374198['forEach'](_0xe0228c=>{const _0x50419c=_0x586b;switch(_0xe0228c[_0x50419c(0x137)]){case _0x50419c(0x101):{const _0x402882=_0xe0228c[_0x50419c(0x13d)][_0x50419c(0x13e)];_0x54ab82[_0x50419c(0x101)](_0x402882);break;}}}),B(this[_0x20c4f7(0x116)],_0x54ab82);}));}[_0xd3216e(0x130)](){const _0x38ebf5=_0xd3216e;this[_0x38ebf5(0x136)](this[_0x38ebf5(0xf0)][_0x38ebf5(0x11e)][_0x38ebf5(0xf6)](async _0x31c229=>{const _0x4ef882=_0x38ebf5;var _0x312950,_0x1f28a8,_0x323e9b,_0x2a94f0;const _0x59625d=(_0x312950=this[_0x4ef882(0x106)][_0x4ef882(0x14a)](_0x31c229[_0x4ef882(0xff)])[_0x4ef882(0x105)](_0x45a0db=>_0x45a0db[_0x4ef882(0x103)]===_0x31c229[_0x4ef882(0x103)]))==null?void 0x0:_0x312950['root'];if(!_0x59625d)return;const {unitId:_0x386981,subUnitId:_0x5e6a56}=_0x59625d;switch(_0x31c229[_0x4ef882(0x12c)]&&this[_0x4ef882(0x10c)]['addUser'](_0x31c229[_0x4ef882(0x12c)]),_0x31c229['type']){case v[_0x4ef882(0x11a)]:break;case v[_0x4ef882(0x147)]:{this['_threadCommentModel']['addComment'](_0x386981,_0x5e6a56,{'unitId':_0x386981,'subUnitId':_0x5e6a56,'ref':'','id':_0x31c229[_0x4ef882(0x146)],'dT':D(+_0x31c229[_0x4ef882(0x142)]),'threadId':_0x31c229['threadId'],'personId':(_0x323e9b=(_0x1f28a8=_0x31c229[_0x4ef882(0x12c)])==null?void 0x0:_0x1f28a8[_0x4ef882(0x12b)])!=null?_0x323e9b:_0x31c229[_0x4ef882(0x138)],'text':JSON[_0x4ef882(0x127)](_0x31c229['content']),'parentId':_0x59625d['id']});break;}case v[_0x4ef882(0x107)]:{const _0x5a5085=this[_0x4ef882(0x106)][_0x4ef882(0x11d)](_0x386981,_0x5e6a56,_0x31c229['replyId']);_0x5a5085&&_0x5a5085[_0x4ef882(0x112)]&&this[_0x4ef882(0x106)][_0x4ef882(0x133)](_0x386981,_0x5e6a56,_0x31c229['replyId']);break;}case v[_0x4ef882(0x126)]:{this[_0x4ef882(0x106)][_0x4ef882(0x13f)](_0x386981,_0x5e6a56,{'commentId':_0x31c229['replyId'],'text':JSON[_0x4ef882(0x127)](_0x31c229[_0x4ef882(0x144)])});break;}case v[_0x4ef882(0x131)]:{const _0x5bc1b6=(_0x2a94f0=this['_threadCommentModel'][_0x4ef882(0x14a)](_0x31c229[_0x4ef882(0xff)])[_0x4ef882(0x105)](_0x447cf0=>_0x447cf0[_0x4ef882(0x103)]===_0x31c229[_0x4ef882(0x103)]))==null?void 0x0:_0x2a94f0[_0x4ef882(0x122)];_0x5bc1b6&&this['_threadCommentModel']['resolveComment'](_0x386981,_0x5e6a56,_0x5bc1b6['id'],_0x31c229[_0x4ef882(0xe8)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x44f5e1(_0x67df09)),p(0x1,_0x44f5e1(_0x700cee)),p(0x2,_0x44f5e1(_0x40b3f1)),p(0x3,_0x44f5e1(_0x58e5e7))],S);const z=_0xd3216e(0x108),M={};var k=Object[_0xd3216e(0xe9)],Q=(_0x536f2d,_0x1c1e1a,_0x5afd63,_0x13be80)=>{const _0x234cd8=_0xd3216e;for(var _0x230fc4=_0x13be80>0x1?void 0x0:_0x13be80?k(_0x1c1e1a,_0x5afd63):_0x1c1e1a,_0x4b10a9=_0x536f2d[_0x234cd8(0x117)]-0x1,_0x1bf5ad;_0x4b10a9>=0x0;_0x4b10a9--)(_0x1bf5ad=_0x536f2d[_0x4b10a9])&&(_0x230fc4=_0x1bf5ad(_0x230fc4)||_0x230fc4);return _0x230fc4;},_=(_0x5aa1cf,_0x24fe43)=>(_0x3e576f,_0x55cd1a)=>_0x24fe43(_0x3e576f,_0x55cd1a,_0x5aa1cf);function X(_0xbfc9ec,_0x4cfcd9){const _0x2f203c=_0xd3216e,_0x11c5d5=_0xbfc9ec[_0x2f203c(0x123)][0x0];return{..._0x4cfcd9,'id':_0x11c5d5[_0x2f203c(0x146)],'resolved':_0xbfc9ec['solved']===0x1,'dT':D(_0x11c5d5[_0x2f203c(0x142)]),'personId':_0x11c5d5['userId'],'threadId':_0x11c5d5[_0x2f203c(0x103)]};}function ee(_0x53c2f9,_0x19bf08,_0x51d1b7){const _0xe522ac=_0xd3216e;var _0x57f858,_0x528677;if(((_0x528677=(_0x57f858=_0x53c2f9==null?void 0x0:_0x53c2f9[_0xe522ac(0x123)])==null?void 0x0:_0x57f858[_0xe522ac(0x117)])!=null?_0x528677:0x0)>0x0){const _0x3e0b84=(_0x35c3bf,_0x2a9813)=>({'id':_0x35c3bf['replyId'],'threadId':_0x35c3bf[_0xe522ac(0x103)],'dT':D(_0x35c3bf[_0xe522ac(0x142)]),'personId':_0x35c3bf[_0xe522ac(0x138)],'resolved':_0x53c2f9[_0xe522ac(0xe8)]===I[_0xe522ac(0x129)],'unitId':_0x19bf08,'subUnitId':_0x51d1b7,'text':JSON[_0xe522ac(0x127)](_0x35c3bf[_0xe522ac(0x144)]),'parentId':_0x2a9813}),_0x4cd1c4=_0x3e0b84(_0x53c2f9[_0xe522ac(0x123)][0x0]);return{..._0x4cd1c4,'children':_0x53c2f9[_0xe522ac(0x123)][_0xe522ac(0x118)](0x1)['map'](_0x367808=>_0x3e0b84(_0x367808,_0x4cd1c4['id']))};}return null;}let f=class{constructor(_0x2a3828,_0xb64f44,_0x4d2b89,_0x4433ee){const _0x4bbd33=_0xd3216e;this[_0x4bbd33(0xf3)]=_0x2a3828,this[_0x4bbd33(0x10c)]=_0xb64f44,this[_0x4bbd33(0x132)]=_0x4d2b89,this[_0x4bbd33(0x116)]=_0x4433ee;}async[_0xd3216e(0x10d)](_0x2c74c){const _0x2c6fd6=_0xd3216e;var _0x553c3b,_0x48284c;const {parentId:_0x448fde,unitId:_0x273f47,text:_0x59e12e,threadId:_0x412fe4}=_0x2c74c,_0x156609=(_0x48284c=(_0x553c3b=_0x59e12e[_0x2c6fd6(0x140)])==null?void 0x0:_0x553c3b[_0x2c6fd6(0xfc)](_0x4e4263=>_0x4e4263[_0x2c6fd6(0x141)]===_0x4ab199[_0x2c6fd6(0xf5)])[_0x2c6fd6(0x10f)](_0x5d7f2f=>_0x5d7f2f[_0x2c6fd6(0x115)]))!=null?_0x48284c:[],_0x3289cf=JSON[_0x2c6fd6(0x124)](_0x59e12e),_0x3ddbd0=(await this[_0x2c6fd6(0x132)][_0x2c6fd6(0x139)](_0x273f47))[_0x2c6fd6(0x12f)]();if(_0x448fde){const _0x53e926={'memberId':_0x3ddbd0,'unitId':_0x273f47,'content':_0x3289cf,'mention':_0x156609,'threadId':_0x412fe4},_0x176bc7=(await this[_0x2c6fd6(0xf3)][_0x2c6fd6(0xfa)](_0x2c6fd6(0xf4)+_0x273f47+'/reply',{'body':_0x53e926}))[_0x2c6fd6(0x143)][_0x2c6fd6(0x149)];return{..._0x2c74c,'id':_0x176bc7[_0x2c6fd6(0x146)],'dT':_0x20ef59(+_0x176bc7[_0x2c6fd6(0x142)])[_0x2c6fd6(0x11b)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x176bc7['userId']};}else{const _0x3402a7={'memberId':_0x3ddbd0,'unitId':_0x273f47,'content':_0x3289cf,'mention':_0x156609},_0xabd233=await this[_0x2c6fd6(0xf3)]['post']('/universer-api/comment/unit/'+_0x273f47+_0x2c6fd6(0x10a),{'body':_0x3402a7});return X(_0xabd233['body'][_0x2c6fd6(0xee)],_0x2c74c);}}async[_0xd3216e(0x13f)](_0x2807e8){const _0xd92e92=_0xd3216e;var _0x39a968,_0x16f1e7;const {text:_0x4fd718,unitId:_0x2c3675}=_0x2807e8,_0x1dbf83=(_0x16f1e7=(_0x39a968=_0x4fd718[_0xd92e92(0x140)])==null?void 0x0:_0x39a968[_0xd92e92(0xfc)](_0x357215=>_0x357215[_0xd92e92(0x141)]===_0x4ab199[_0xd92e92(0xf5)])[_0xd92e92(0x10f)](_0x45b2da=>_0x45b2da[_0xd92e92(0x115)]))!=null?_0x16f1e7:[],_0x1f9ff2=JSON['stringify'](_0x4fd718),_0x5d4d3a=_0x2807e8[_0xd92e92(0x103)],_0x26831d=_0x2807e8['id'],_0x3a5058={'memberId':(await this[_0xd92e92(0x132)][_0xd92e92(0x139)](_0x2c3675))[_0xd92e92(0x12f)](),'unitId':_0x2c3675,'threadId':_0x5d4d3a,'mention':_0x1dbf83,'content':_0x1f9ff2,'replyId':_0x26831d},_0x34ee16=await this[_0xd92e92(0xf3)][_0xd92e92(0xfa)]('/universer-api/comment/unit/'+_0x2c3675+_0xd92e92(0xec),{'body':_0x3a5058});return!_0x34ee16[_0xd92e92(0x143)][_0xd92e92(0x104)]||_0x34ee16[_0xd92e92(0x143)]['error'][_0xd92e92(0x14d)]===0x1;}async[_0xd3216e(0x128)](_0x591bbd){const _0x30aac6=_0xd3216e,{unitId:_0x56dd20}=_0x591bbd,_0x14de69=_0x591bbd['threadId'],_0x4c94cc={'memberId':this[_0x30aac6(0x10c)][_0x30aac6(0x12e)]()[_0x30aac6(0x12b)],'unitId':_0x56dd20,'threadId':_0x14de69,'solved':_0x591bbd['resolved']?I['Solved']:I['OpenOrReOpen']},_0x19ebb3=await this[_0x30aac6(0xf3)][_0x30aac6(0xfa)](_0x30aac6(0xf4)+_0x56dd20+_0x30aac6(0xf1),{'body':_0x4c94cc});return!_0x19ebb3['body'][_0x30aac6(0x104)]||_0x19ebb3[_0x30aac6(0x143)][_0x30aac6(0x104)][_0x30aac6(0x14d)]===0x1;}async[_0xd3216e(0x133)](_0x5f2d93,_0x9dedba,_0xe6c608,_0xbc7115){const _0x25c46b=_0xd3216e,_0x5308db={'memberId':(await this[_0x25c46b(0x132)][_0x25c46b(0x139)](_0x5f2d93))['getMemberID'](),'threadId':_0xe6c608,'replyId':_0xbc7115,'unitId':_0x5f2d93},_0x1c6d15=await this[_0x25c46b(0xf3)][_0x25c46b(0xfa)](_0x25c46b(0xf4)+_0x5f2d93+_0x25c46b(0x109),{'body':_0x5308db});return!_0x1c6d15[_0x25c46b(0x143)][_0x25c46b(0x104)]||_0x1c6d15[_0x25c46b(0x143)][_0x25c46b(0x104)]['code']===0x1;}async['listComments'](_0x4a9fad,_0x52232a,_0x1c0b25){const _0x2420a2=_0xd3216e,_0x6b7e28={'unitId':_0x4a9fad,'threadId':_0x1c0b25},_0x10be8e=await this[_0x2420a2(0xf3)][_0x2420a2(0xfa)]('/universer-api/comment/unit/'+_0x4a9fad+_0x2420a2(0xf7),{'body':_0x6b7e28}),_0x51c729=_0x1c0b25[_0x2420a2(0x10f)](_0x4d35f0=>ee(_0x10be8e[_0x2420a2(0x143)][_0x2420a2(0x13c)][_0x4d35f0],_0x4a9fad,_0x52232a))[_0x2420a2(0xfc)](Boolean);return Object['values'](_0x10be8e['body']['users'])['forEach'](_0x164820=>{const _0x2b5f4b=_0x2420a2;this[_0x2b5f4b(0x10c)][_0x2b5f4b(0x102)](_0x164820);}),_0x51c729;}['saveCommentToSnapshot'](_0x91b87a){const _0x17161f=_0xd3216e;return{'id':_0x91b87a['id'],'threadId':_0x91b87a[_0x17161f(0x103)],'ref':_0x91b87a['ref']};}};f=Q([_(0x0,_0x44f5e1(_0x38707a)),_(0x1,_0x44f5e1(_0x40b3f1)),_(0x2,_0x44f5e1(_0x41d110)),_(0x3,_0x44f5e1(_0x58e5e7))],f);var re=Object[_0xd3216e(0xe9)],te=(_0x3cf2bf,_0x2e6f79,_0xa9403d,_0xc2372d)=>{for(var _0x2be11d=_0xc2372d>0x1?void 0x0:_0xc2372d?re(_0x2e6f79,_0xa9403d):_0x2e6f79,_0x551c44=_0x3cf2bf['length']-0x1,_0x1aaa47;_0x551c44>=0x0;_0x551c44--)(_0x1aaa47=_0x3cf2bf[_0x551c44])&&(_0x2be11d=_0x1aaa47(_0x2be11d)||_0x2be11d);return _0x2be11d;},N=(_0x5789f1,_0x4b641a)=>(_0x47a6d7,_0x33ce02)=>_0x4b641a(_0x47a6d7,_0x33ce02,_0x5789f1);let g=class extends _0x1b4e61{constructor(_0x2d97e5,_0x38d672){const _0x57cc43=_0xd3216e;super(),this[_0x57cc43(0xf9)]=_0x2d97e5,this[_0x57cc43(0xf2)]=_0x38d672,this[_0x57cc43(0x12d)]();}[_0xd3216e(0x12d)](){const _0x93161a=_0xd3216e;this[_0x93161a(0xf9)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x93161a(0xfb)]=!0x1;}};g=te([N(0x0,_0x12b23a),N(0x1,_0x44f5e1(f))],g);var se=Object['defineProperty'],oe=Object[_0xd3216e(0xe9)],ne=(_0x4491b0,_0x59cfb4,_0x46b6a3)=>_0x59cfb4 in _0x4491b0?se(_0x4491b0,_0x59cfb4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x46b6a3}):_0x4491b0[_0x59cfb4]=_0x46b6a3,ie=(_0x4f198b,_0x30244d,_0x162e04,_0x433009)=>{const _0x1c8ac5=_0xd3216e;for(var _0x1ddd54=_0x433009>0x1?void 0x0:_0x433009?oe(_0x30244d,_0x162e04):_0x30244d,_0x2c7c59=_0x4f198b[_0x1c8ac5(0x117)]-0x1,_0x33dba1;_0x2c7c59>=0x0;_0x2c7c59--)(_0x33dba1=_0x4f198b[_0x2c7c59])&&(_0x1ddd54=_0x33dba1(_0x1ddd54)||_0x1ddd54);return _0x1ddd54;},w=(_0x4c6027,_0x2b4b58)=>(_0x3bb3cf,_0x336562)=>_0x2b4b58(_0x3bb3cf,_0x336562,_0x4c6027),$=(_0x66c4b9,_0x29b27e,_0x1df97a)=>ne(_0x66c4b9,typeof _0x29b27e!=_0xd3216e(0xea)?_0x29b27e+'':_0x29b27e,_0x1df97a);let b=class extends _0x323721{constructor(_0x1c0732=M,_0x421891,_0x4f209a){const _0x5e4b68=_0xd3216e;super(),this[_0x5e4b68(0x125)]=_0x1c0732,this[_0x5e4b68(0x116)]=_0x421891,this[_0x5e4b68(0x14c)]=_0x4f209a;const {..._0x38ecbe}=_0x67d16f({},M,this[_0x5e4b68(0x125)]);this[_0x5e4b68(0x14c)]['setConfig'](z,_0x38ecbe);}['onStarting'](){const _0x6a015=_0xd3216e;[[f],[g],[S]][_0x6a015(0x100)](_0x336f50=>{const _0x3ab620=_0x6a015;this['_injector'][_0x3ab620(0x101)](_0x336f50);});}[_0xd3216e(0x119)](){const _0x50184a=_0xd3216e;this[_0x50184a(0x116)]['get'](g),this[_0x50184a(0x116)][_0x50184a(0xfe)](S);}};$(b,_0xd3216e(0x11c),W),$(b,_0xd3216e(0x137),_0x37bca2['UNIVER_UNKNOWN']),b=ie([_0x83fc12(_0x49bd5f,_0x4ed5e1,_0x1c7e69),w(0x1,_0x44f5e1(_0x58e5e7)),w(0x2,_0x20992b)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x33e44b=_0x1814;(function(_0x195a22,_0x872dbd){const _0x23408a=_0x1814,_0x263be5=_0x195a22();while(!![]){try{const _0x26a1ed=parseInt(_0x23408a(0x145))/0x1*(parseInt(_0x23408a(0x16d))/0x2)+parseInt(_0x23408a(0x198))/0x3+-parseInt(_0x23408a(0x169))/0x4+-parseInt(_0x23408a(0x15f))/0x5+-parseInt(_0x23408a(0x157))/0x6*(parseInt(_0x23408a(0x142))/0x7)+-parseInt(_0x23408a(0x146))/0x8+parseInt(_0x23408a(0x13f))/0x9;if(_0x26a1ed===_0x872dbd)break;else _0x263be5['push'](_0x263be5['shift']());}catch(_0xf1ed01){_0x263be5['push'](_0x263be5['shift']());}}}(_0x61ae,0xe9d10));import{CommentService as _0x1b43bb,CollaborationSessionService as _0x5a3e8e,UniverCollaborationClientPlugin as _0x35611b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x35b6ab}from'@univerjs-pro/license';import{dayjs as _0x1f8faa,UserManagerService as _0x32d721,Inject as _0xa81a04,Injector as _0x30a5b9,Disposable as _0x234e12,CustomRangeType as _0x49eeca,UniverInstanceType as _0x35e9a7,DependentOn as _0x2567c7,IConfigService as _0x54763b,Plugin as _0x21f70a,merge as _0x10f491}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x6f43cc}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x718fe,IThreadCommentDataSourceService as _0xfc7a2e}from'@univerjs/thread-comment';import{bufferTime as _0x364169}from'rxjs';import{HTTPService as _0x240bd7}from'@univerjs/network';function _0x1814(_0x19fcff,_0x2f00f2){const _0x61ae16=_0x61ae();return _0x1814=function(_0x18147a,_0x5e4737){_0x18147a=_0x18147a-0x139;let _0x165412=_0x61ae16[_0x18147a];return _0x165412;},_0x1814(_0x19fcff,_0x2f00f2);}const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x347a70=>(_0x347a70[_0x347a70[_0x33e44b(0x197)]=0x0]=_0x33e44b(0x197),_0x347a70[_0x347a70[_0x33e44b(0x191)]=0x1]='Solved',_0x347a70[_0x347a70[_0x33e44b(0x165)]=-0x1]=_0x33e44b(0x165),_0x347a70))(I||{}),v=(_0x2484a0=>(_0x2484a0[_0x2484a0[_0x33e44b(0x13d)]=0x0]=_0x33e44b(0x13d),_0x2484a0[_0x2484a0[_0x33e44b(0x15b)]=0x1]=_0x33e44b(0x15b),_0x2484a0[_0x2484a0[_0x33e44b(0x154)]=0x2]=_0x33e44b(0x154),_0x2484a0[_0x2484a0['Edit']=0x3]=_0x33e44b(0x13e),_0x2484a0[_0x2484a0[_0x33e44b(0x160)]=0x4]=_0x33e44b(0x160),_0x2484a0[_0x2484a0['Solve']=0x5]=_0x33e44b(0x18f),_0x2484a0[_0x2484a0[_0x33e44b(0x165)]=-0x1]=_0x33e44b(0x165),_0x2484a0))(v||{});const D=_0x5a8cae=>_0x1f8faa(new Date(+_0x5a8cae))[_0x33e44b(0x16a)](_0x33e44b(0x18b)),B=async(_0x13ef69,_0x30f6e2)=>{const _0x317ee0=_0x33e44b,_0x54b34d=_0x13ef69[_0x317ee0(0x178)](_0x32d721),_0x2523a5=_0x13ef69[_0x317ee0(0x178)](_0x240bd7);_0x30f6e2[_0x317ee0(0x192)](_0x36203a=>{const _0x33bf70=_0x317ee0;_0x54b34d[_0x33bf70(0x161)](_0x36203a)&&_0x30f6e2[_0x33bf70(0x17b)](_0x36203a);}),_0x30f6e2['size']&&(await _0x2523a5[_0x317ee0(0x178)](_0x317ee0(0x18a),{'params':{'userIDs':[..._0x30f6e2]}}))['body'][_0x317ee0(0x18d)][_0x317ee0(0x192)](_0x18fad2=>{const _0x542fd8=_0x317ee0;_0x18fad2&&_0x54b34d[_0x542fd8(0x13a)](_0x18fad2);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x201492,_0x1be307,_0x4eb997,_0x106951)=>{const _0x57a0a0=_0x33e44b;for(var _0x378a9c=_0x106951>0x1?void 0x0:_0x106951?K(_0x1be307,_0x4eb997):_0x1be307,_0x1f8311=_0x201492[_0x57a0a0(0x16f)]-0x1,_0xf61a94;_0x1f8311>=0x0;_0x1f8311--)(_0xf61a94=_0x201492[_0x1f8311])&&(_0x378a9c=_0xf61a94(_0x378a9c)||_0x378a9c);return _0x378a9c;},p=(_0x541783,_0x22a56f)=>(_0x3b00b6,_0x378187)=>_0x22a56f(_0x3b00b6,_0x378187,_0x541783);let S=class extends _0x234e12{constructor(_0x4161d6,_0x5d6f0d,_0x54c056,_0x4dcf0a){const _0x5bd590=_0x33e44b;super(),this['_commentService']=_0x4161d6,this[_0x5bd590(0x156)]=_0x5d6f0d,this[_0x5bd590(0x16c)]=_0x54c056,this['_injector']=_0x4dcf0a,this[_0x5bd590(0x16b)](),this[_0x5bd590(0x155)]();}[_0x33e44b(0x155)](){const _0x14a527=_0x33e44b;this[_0x14a527(0x13b)](this[_0x14a527(0x156)]['commentUpdate$'][_0x14a527(0x171)](_0x364169(0x10))[_0x14a527(0x15a)](_0x49fafa=>{const _0x34267a=_0x14a527,_0x4859ec=new Set();_0x49fafa[_0x34267a(0x192)](_0x3e448c=>{const _0x3f4fff=_0x34267a;switch(_0x3e448c[_0x3f4fff(0x153)]){case'add':{const _0x1b45ed=_0x3e448c[_0x3f4fff(0x15e)]['personId'];_0x4859ec[_0x3f4fff(0x174)](_0x1b45ed);break;}}}),B(this[_0x34267a(0x166)],_0x4859ec);}));}['_init'](){const _0x39c400=_0x33e44b;this['disposeWithMe'](this[_0x39c400(0x14e)]['commentUpdate$'][_0x39c400(0x15a)](async _0x55debe=>{const _0x33ddc5=_0x39c400;var _0x13ec1b,_0x3bf708,_0x4e3332,_0x12c2eb;const _0x83d487=(_0x13ec1b=this['_threadCommentModel'][_0x33ddc5(0x182)](_0x55debe[_0x33ddc5(0x17a)])['find'](_0x3fbc49=>_0x3fbc49[_0x33ddc5(0x196)]===_0x55debe[_0x33ddc5(0x196)]))==null?void 0x0:_0x13ec1b[_0x33ddc5(0x149)];if(!_0x83d487)return;const {unitId:_0xd5fbc3,subUnitId:_0x298ab9}=_0x83d487;switch(_0x55debe[_0x33ddc5(0x176)]&&this['_userService']['addUser'](_0x55debe[_0x33ddc5(0x176)]),_0x55debe[_0x33ddc5(0x153)]){case v[_0x33ddc5(0x15b)]:break;case v[_0x33ddc5(0x154)]:{this[_0x33ddc5(0x156)][_0x33ddc5(0x14b)](_0xd5fbc3,_0x298ab9,{'unitId':_0xd5fbc3,'subUnitId':_0x298ab9,'ref':'','id':_0x55debe[_0x33ddc5(0x162)],'dT':D(+_0x55debe[_0x33ddc5(0x188)]),'threadId':_0x55debe['threadId'],'personId':(_0x4e3332=(_0x3bf708=_0x55debe[_0x33ddc5(0x176)])==null?void 0x0:_0x3bf708[_0x33ddc5(0x15c)])!=null?_0x4e3332:_0x55debe[_0x33ddc5(0x194)],'text':JSON['parse'](_0x55debe['content']),'parentId':_0x83d487['id']});break;}case v[_0x33ddc5(0x160)]:{const _0x286dfd=this[_0x33ddc5(0x156)][_0x33ddc5(0x179)](_0xd5fbc3,_0x298ab9,_0x55debe[_0x33ddc5(0x162)]);_0x286dfd&&_0x286dfd[_0x33ddc5(0x164)]&&this[_0x33ddc5(0x156)][_0x33ddc5(0x13c)](_0xd5fbc3,_0x298ab9,_0x55debe[_0x33ddc5(0x162)]);break;}case v[_0x33ddc5(0x13e)]:{this[_0x33ddc5(0x156)][_0x33ddc5(0x193)](_0xd5fbc3,_0x298ab9,{'commentId':_0x55debe[_0x33ddc5(0x162)],'text':JSON[_0x33ddc5(0x159)](_0x55debe['content'])});break;}case v[_0x33ddc5(0x18f)]:{const _0x156455=(_0x12c2eb=this[_0x33ddc5(0x156)]['getUnit'](_0x55debe[_0x33ddc5(0x17a)])['find'](_0x27e031=>_0x27e031[_0x33ddc5(0x196)]===_0x55debe[_0x33ddc5(0x196)]))==null?void 0x0:_0x12c2eb['root'];_0x156455&&this[_0x33ddc5(0x156)]['resolveComment'](_0xd5fbc3,_0x298ab9,_0x156455['id'],_0x55debe[_0x33ddc5(0x183)]===I[_0x33ddc5(0x191)]);break;}}}));}};S=V([p(0x0,_0xa81a04(_0x1b43bb)),p(0x1,_0xa81a04(_0x718fe)),p(0x2,_0xa81a04(_0x32d721)),p(0x3,_0xa81a04(_0x30a5b9))],S);const z=_0x33e44b(0x144),M={};function _0x61ae(){const _0x2fcdb5=['/reply','pipe','resolved','map','add','replies','user','_sessionService','get','getComment','unitId','delete','UNIVER_UNKNOWN','/solved','requireSession','/delete','resolveComment','listComments','getUnit','solved','onStarting','_configService','error','values','createTimestamp','symbol','/universer-api/user/list','YYYY/MM/DD\x20HH:mm','slice','users','ref','Solve','getMemberID','Solved','forEach','updateComment','userId','/add','threadId','OpenOrReOpen','2374848bzaYuG','rangeId','addUser','disposeWithMe','deleteComment','Unknown','Edit','24403572jOgYdr','_threadCommentDataSourceService','_config','2639imQSlB','body','thread-comment-data-source.config','2cLhwQM','3016760YyPaJm','defineProperty','stringify','root','pluginName','addComment','_initDataSource','_httpService','_commentService','customRanges','getCurrentUser','code','content','type','Reply','_initUserSync','_threadCommentModel','17352xnDUVj','_threadCommentDataSource','parse','subscribe','Add','userID','filter','payload','5286465uVGwnn','Delete','getUser','replyId','COMMENT','parentId','UNRECOGNIZED','_injector','/list','/universer-api/comment/unit/','4855488FvkWjj','format','_init','_userService','1193132QAImPg','post','length'];_0x61ae=function(){return _0x2fcdb5;};return _0x61ae();}var k=Object['getOwnPropertyDescriptor'],Q=(_0xb63c92,_0x412e24,_0x400f49,_0x12acb2)=>{for(var _0x19b5a3=_0x12acb2>0x1?void 0x0:_0x12acb2?k(_0x412e24,_0x400f49):_0x412e24,_0x901cc4=_0xb63c92['length']-0x1,_0x33c4c9;_0x901cc4>=0x0;_0x901cc4--)(_0x33c4c9=_0xb63c92[_0x901cc4])&&(_0x19b5a3=_0x33c4c9(_0x19b5a3)||_0x19b5a3);return _0x19b5a3;},_=(_0x50f8c2,_0x5ed6b1)=>(_0x5382b2,_0x5da11b)=>_0x5ed6b1(_0x5382b2,_0x5da11b,_0x50f8c2);function X(_0x597caf,_0x4ae1b1){const _0x5efd8f=_0x33e44b,_0x2fc86e=_0x597caf[_0x5efd8f(0x175)][0x0];return{..._0x4ae1b1,'id':_0x2fc86e[_0x5efd8f(0x162)],'resolved':_0x597caf['solved']===0x1,'dT':D(_0x2fc86e[_0x5efd8f(0x188)]),'personId':_0x2fc86e[_0x5efd8f(0x194)],'threadId':_0x2fc86e[_0x5efd8f(0x196)]};}function ee(_0x452392,_0x6a07c2,_0x39cc24){const _0x504b20=_0x33e44b;var _0x261901,_0x179fc5;if(((_0x179fc5=(_0x261901=_0x452392==null?void 0x0:_0x452392[_0x504b20(0x175)])==null?void 0x0:_0x261901[_0x504b20(0x16f)])!=null?_0x179fc5:0x0)>0x0){const _0x4c470a=(_0x1202f2,_0x5e6750)=>({'id':_0x1202f2[_0x504b20(0x162)],'threadId':_0x1202f2[_0x504b20(0x196)],'dT':D(_0x1202f2[_0x504b20(0x188)]),'personId':_0x1202f2[_0x504b20(0x194)],'resolved':_0x452392[_0x504b20(0x183)]===I[_0x504b20(0x191)],'unitId':_0x6a07c2,'subUnitId':_0x39cc24,'text':JSON[_0x504b20(0x159)](_0x1202f2[_0x504b20(0x152)]),'parentId':_0x5e6750}),_0x2baedb=_0x4c470a(_0x452392[_0x504b20(0x175)][0x0]);return{..._0x2baedb,'children':_0x452392[_0x504b20(0x175)][_0x504b20(0x18c)](0x1)['map'](_0x25a538=>_0x4c470a(_0x25a538,_0x2baedb['id']))};}return null;}let f=class{constructor(_0x40c91b,_0x331edd,_0x2786d0,_0x208af3){const _0x5612d1=_0x33e44b;this['_httpService']=_0x40c91b,this[_0x5612d1(0x16c)]=_0x331edd,this[_0x5612d1(0x177)]=_0x2786d0,this[_0x5612d1(0x166)]=_0x208af3;}async[_0x33e44b(0x14b)](_0x188dfe){const _0x3ecf2a=_0x33e44b;var _0x25c102,_0x453824;const {parentId:_0x4d131c,unitId:_0x53081c,text:_0x457f56,threadId:_0xc1c935}=_0x188dfe,_0x562d63=(_0x453824=(_0x25c102=_0x457f56[_0x3ecf2a(0x14f)])==null?void 0x0:_0x25c102[_0x3ecf2a(0x15d)](_0x2218d9=>_0x2218d9['rangeType']===_0x49eeca[_0x3ecf2a(0x163)])[_0x3ecf2a(0x173)](_0x16cf04=>_0x16cf04[_0x3ecf2a(0x139)]))!=null?_0x453824:[],_0x4dd26e=JSON[_0x3ecf2a(0x148)](_0x457f56),_0x4c5f14=(await this['_sessionService'][_0x3ecf2a(0x17e)](_0x53081c))['getMemberID']();if(_0x4d131c){const _0x563418={'memberId':_0x4c5f14,'unitId':_0x53081c,'content':_0x4dd26e,'mention':_0x562d63,'threadId':_0xc1c935},_0x22a6d5=(await this['_httpService'][_0x3ecf2a(0x16e)](_0x3ecf2a(0x168)+_0x53081c+_0x3ecf2a(0x170),{'body':_0x563418}))[_0x3ecf2a(0x143)]['reply'];return{..._0x188dfe,'id':_0x22a6d5['replyId'],'dT':_0x1f8faa(+_0x22a6d5[_0x3ecf2a(0x188)])[_0x3ecf2a(0x16a)](_0x3ecf2a(0x18b)),'personId':_0x22a6d5[_0x3ecf2a(0x194)]};}else{const _0x525565={'memberId':_0x4c5f14,'unitId':_0x53081c,'content':_0x4dd26e,'mention':_0x562d63},_0x3ba475=await this[_0x3ecf2a(0x14d)]['post']('/universer-api/comment/unit/'+_0x53081c+_0x3ecf2a(0x195),{'body':_0x525565});return X(_0x3ba475[_0x3ecf2a(0x143)]['comment'],_0x188dfe);}}async['updateComment'](_0x4f3c05){const _0xa625aa=_0x33e44b;var _0x1a16a2,_0xac8ed7;const {text:_0x53d29b,unitId:_0x4767ac}=_0x4f3c05,_0x4b4ea5=(_0xac8ed7=(_0x1a16a2=_0x53d29b[_0xa625aa(0x14f)])==null?void 0x0:_0x1a16a2[_0xa625aa(0x15d)](_0x504a2d=>_0x504a2d['rangeType']===_0x49eeca['COMMENT'])['map'](_0x149f30=>_0x149f30['rangeId']))!=null?_0xac8ed7:[],_0x139d56=JSON[_0xa625aa(0x148)](_0x53d29b),_0x290533=_0x4f3c05[_0xa625aa(0x196)],_0x131041=_0x4f3c05['id'],_0x1cedb9={'memberId':(await this[_0xa625aa(0x177)][_0xa625aa(0x17e)](_0x4767ac))[_0xa625aa(0x190)](),'unitId':_0x4767ac,'threadId':_0x290533,'mention':_0x4b4ea5,'content':_0x139d56,'replyId':_0x131041},_0x4024b6=await this[_0xa625aa(0x14d)][_0xa625aa(0x16e)](_0xa625aa(0x168)+_0x4767ac+'/edit',{'body':_0x1cedb9});return!_0x4024b6[_0xa625aa(0x143)][_0xa625aa(0x186)]||_0x4024b6[_0xa625aa(0x143)][_0xa625aa(0x186)][_0xa625aa(0x151)]===0x1;}async[_0x33e44b(0x180)](_0x4e5da9){const _0x562026=_0x33e44b,{unitId:_0x5e5cf8}=_0x4e5da9,_0x333317=_0x4e5da9[_0x562026(0x196)],_0x15de05={'memberId':this[_0x562026(0x16c)][_0x562026(0x150)]()[_0x562026(0x15c)],'unitId':_0x5e5cf8,'threadId':_0x333317,'solved':_0x4e5da9[_0x562026(0x172)]?I[_0x562026(0x191)]:I['OpenOrReOpen']},_0x193b21=await this[_0x562026(0x14d)][_0x562026(0x16e)](_0x562026(0x168)+_0x5e5cf8+_0x562026(0x17d),{'body':_0x15de05});return!_0x193b21[_0x562026(0x143)][_0x562026(0x186)]||_0x193b21['body'][_0x562026(0x186)][_0x562026(0x151)]===0x1;}async['deleteComment'](_0x27c859,_0x10b0ab,_0x4fa416,_0x5fc2fb){const _0x4f5034=_0x33e44b,_0x5838b3={'memberId':(await this[_0x4f5034(0x177)][_0x4f5034(0x17e)](_0x27c859))['getMemberID'](),'threadId':_0x4fa416,'replyId':_0x5fc2fb,'unitId':_0x27c859},_0x47387e=await this['_httpService'][_0x4f5034(0x16e)](_0x4f5034(0x168)+_0x27c859+_0x4f5034(0x17f),{'body':_0x5838b3});return!_0x47387e[_0x4f5034(0x143)][_0x4f5034(0x186)]||_0x47387e[_0x4f5034(0x143)][_0x4f5034(0x186)]['code']===0x1;}async[_0x33e44b(0x181)](_0x4c0f1e,_0x84e585,_0x59945b){const _0x4dee12=_0x33e44b,_0x2839f8={'unitId':_0x4c0f1e,'threadId':_0x59945b},_0x59efc7=await this[_0x4dee12(0x14d)][_0x4dee12(0x16e)](_0x4dee12(0x168)+_0x4c0f1e+_0x4dee12(0x167),{'body':_0x2839f8}),_0x182448=_0x59945b[_0x4dee12(0x173)](_0x307dd2=>ee(_0x59efc7[_0x4dee12(0x143)]['comments'][_0x307dd2],_0x4c0f1e,_0x84e585))[_0x4dee12(0x15d)](Boolean);return Object[_0x4dee12(0x187)](_0x59efc7[_0x4dee12(0x143)][_0x4dee12(0x18d)])[_0x4dee12(0x192)](_0x4d5fe8=>{const _0xbcb1eb=_0x4dee12;this[_0xbcb1eb(0x16c)][_0xbcb1eb(0x13a)](_0x4d5fe8);}),_0x182448;}['saveCommentToSnapshot'](_0x22fa47){const _0x9d2d4c=_0x33e44b;return{'id':_0x22fa47['id'],'threadId':_0x22fa47[_0x9d2d4c(0x196)],'ref':_0x22fa47[_0x9d2d4c(0x18e)]};}};f=Q([_(0x0,_0xa81a04(_0x240bd7)),_(0x1,_0xa81a04(_0x32d721)),_(0x2,_0xa81a04(_0x5a3e8e)),_(0x3,_0xa81a04(_0x30a5b9))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x2db29d,_0x2266ac,_0xa0d49,_0x58b8e3)=>{const _0x2aabd9=_0x33e44b;for(var _0x4a5b8c=_0x58b8e3>0x1?void 0x0:_0x58b8e3?re(_0x2266ac,_0xa0d49):_0x2266ac,_0x2f91c5=_0x2db29d[_0x2aabd9(0x16f)]-0x1,_0x48c58e;_0x2f91c5>=0x0;_0x2f91c5--)(_0x48c58e=_0x2db29d[_0x2f91c5])&&(_0x4a5b8c=_0x48c58e(_0x4a5b8c)||_0x4a5b8c);return _0x4a5b8c;},N=(_0x63090c,_0x148c24)=>(_0x4aa630,_0x25aef5)=>_0x148c24(_0x4aa630,_0x25aef5,_0x63090c);let g=class extends _0x234e12{constructor(_0x318cc3,_0x10b625){const _0x5ec075=_0x33e44b;super(),this[_0x5ec075(0x140)]=_0x318cc3,this[_0x5ec075(0x158)]=_0x10b625,this[_0x5ec075(0x14c)]();}[_0x33e44b(0x14c)](){const _0x3ef9e4=_0x33e44b;this[_0x3ef9e4(0x140)]['dataSource']=this[_0x3ef9e4(0x158)],this[_0x3ef9e4(0x140)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0xfc7a2e),N(0x1,_0xa81a04(f))],g);var se=Object[_0x33e44b(0x147)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x298bbb,_0x57b2ec,_0xb7471d)=>_0x57b2ec in _0x298bbb?se(_0x298bbb,_0x57b2ec,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xb7471d}):_0x298bbb[_0x57b2ec]=_0xb7471d,ie=(_0x191339,_0x36b300,_0x36f3c3,_0x58c65d)=>{const _0x3b603a=_0x33e44b;for(var _0x570a1e=_0x58c65d>0x1?void 0x0:_0x58c65d?oe(_0x36b300,_0x36f3c3):_0x36b300,_0xd33c2d=_0x191339[_0x3b603a(0x16f)]-0x1,_0x377201;_0xd33c2d>=0x0;_0xd33c2d--)(_0x377201=_0x191339[_0xd33c2d])&&(_0x570a1e=_0x377201(_0x570a1e)||_0x570a1e);return _0x570a1e;},w=(_0x2bc0f8,_0x20fd8a)=>(_0x54480f,_0x4b6192)=>_0x20fd8a(_0x54480f,_0x4b6192,_0x2bc0f8),$=(_0x2caad2,_0x3d72f6,_0x4bdb62)=>ne(_0x2caad2,typeof _0x3d72f6!=_0x33e44b(0x189)?_0x3d72f6+'':_0x3d72f6,_0x4bdb62);let b=class extends _0x21f70a{constructor(_0x57572b=M,_0x56c523,_0x1baf7f){const _0x5be9bd=_0x33e44b;super(),this['_config']=_0x57572b,this[_0x5be9bd(0x166)]=_0x56c523,this[_0x5be9bd(0x185)]=_0x1baf7f;const {..._0x523092}=_0x10f491({},M,this[_0x5be9bd(0x141)]);this[_0x5be9bd(0x185)]['setConfig'](z,_0x523092);}[_0x33e44b(0x184)](){const _0x539a9c=_0x33e44b;[[f],[g],[S]][_0x539a9c(0x192)](_0x589f8a=>{const _0x1cdfed=_0x539a9c;this[_0x1cdfed(0x166)][_0x1cdfed(0x174)](_0x589f8a);});}['onReady'](){const _0x17946e=_0x33e44b;this['_injector'][_0x17946e(0x178)](g),this[_0x17946e(0x166)][_0x17946e(0x178)](S);}};$(b,_0x33e44b(0x14a),W),$(b,'type',_0x35e9a7[_0x33e44b(0x17c)]),b=ie([_0x2567c7(_0x6f43cc,_0x35611b,_0x35b6ab),w(0x1,_0xa81a04(_0x30a5b9)),w(0x2,_0x54763b)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0xd3216e=_0x586b;(function(_0x22c8e5,_0x3f9307){const _0x54fb4e=_0x586b,_0x218f47=_0x22c8e5();while(!![]){try{const _0x20c050=parseInt(_0x54fb4e(0x13a))/0x1*(parseInt(_0x54fb4e(0x113))/0x2)+parseInt(_0x54fb4e(0xed))/0x3+parseInt(_0x54fb4e(0x120))/0x4+-parseInt(_0x54fb4e(0x11f))/0x5+parseInt(_0x54fb4e(0x134))/0x6*(-parseInt(_0x54fb4e(0xef))/0x7)+-parseInt(_0x54fb4e(0x145))/0x8+-parseInt(_0x54fb4e(0x114))/0x9*(parseInt(_0x54fb4e(0x10e))/0xa);if(_0x20c050===_0x3f9307)break;else _0x218f47['push'](_0x218f47['shift']());}catch(_0x408bfd){_0x218f47['push'](_0x218f47['shift']());}}}(_0x9c85,0x80583));import{CommentService as _0x67df09,CollaborationSessionService as _0x41d110,UniverCollaborationClientPlugin as _0x4ed5e1}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1c7e69}from'@univerjs-pro/license';import{dayjs as _0x20ef59,UserManagerService as _0x40b3f1,Inject as _0x44f5e1,Injector as _0x58e5e7,Disposable as _0x1b4e61,CustomRangeType as _0x4ab199,UniverInstanceType as _0x37bca2,DependentOn as _0x83fc12,IConfigService as _0x20992b,Plugin as _0x323721,merge as _0x67d16f}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x49bd5f}from'@univerjs/thread-comment-ui';function _0x586b(_0x5325d1,_0x4b4180){const _0x9c85e1=_0x9c85();return _0x586b=function(_0x586b50,_0x3604e5){_0x586b50=_0x586b50-0xe8;let _0x5c460a=_0x9c85e1[_0x586b50];return _0x5c460a;},_0x586b(_0x5325d1,_0x4b4180);}import{ThreadCommentModel as _0x700cee,IThreadCommentDataSourceService as _0x12b23a}from'@univerjs/thread-comment';import{bufferTime as _0x1a9a9a}from'rxjs';function _0x9c85(){const _0x407200=['users','userID','user','_initDataSource','getCurrentUser','getMemberID','_init','Solve','_sessionService','deleteComment','419658wxUmig','OpenOrReOpen','disposeWithMe','type','userId','requireSession','113gkkshO','Unknown','comments','payload','personId','updateComment','customRanges','rangeType','createTimestamp','body','content','4240896tLZfyP','replyId','Reply','UNRECOGNIZED','reply','getUnit','/universer-api/user/list','_configService','code','solved','getOwnPropertyDescriptor','symbol','YYYY/MM/DD\x20HH:mm','/edit','767598yGlVsz','comment','7ZLHvhe','_commentService','/solved','_threadCommentDataSource','_httpService','/universer-api/comment/unit/','COMMENT','subscribe','/list','size','_threadCommentDataSourceService','post','syncUpdateMutationToColla','filter','delete','get','unitId','forEach','add','addUser','threadId','error','find','_threadCommentModel','Delete','thread-comment-data-source.config','/delete','/add','pipe','_userService','addComment','450BzGMxr','map','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initUserSync','parentId','15534atJLgL','35676HgIESP','rangeId','_injector','length','slice','onReady','Add','format','pluginName','getComment','commentUpdate$','2137165ENxGuP','2392120ciQfvE','getUser','root','replies','stringify','_config','Edit','parse','resolveComment','Solved'];_0x9c85=function(){return _0x407200;};return _0x9c85();}import{HTTPService as _0x38707a}from'@univerjs/network';const W=_0xd3216e(0x110);var I=(_0x34644b=>(_0x34644b[_0x34644b['OpenOrReOpen']=0x0]=_0xd3216e(0x135),_0x34644b[_0x34644b[_0xd3216e(0x129)]=0x1]='Solved',_0x34644b[_0x34644b[_0xd3216e(0x148)]=-0x1]=_0xd3216e(0x148),_0x34644b))(I||{}),v=(_0x5a6ae8=>(_0x5a6ae8[_0x5a6ae8['Unknown']=0x0]=_0xd3216e(0x13b),_0x5a6ae8[_0x5a6ae8[_0xd3216e(0x11a)]=0x1]=_0xd3216e(0x11a),_0x5a6ae8[_0x5a6ae8[_0xd3216e(0x147)]=0x2]='Reply',_0x5a6ae8[_0x5a6ae8[_0xd3216e(0x126)]=0x3]=_0xd3216e(0x126),_0x5a6ae8[_0x5a6ae8['Delete']=0x4]='Delete',_0x5a6ae8[_0x5a6ae8[_0xd3216e(0x131)]=0x5]=_0xd3216e(0x131),_0x5a6ae8[_0x5a6ae8[_0xd3216e(0x148)]=-0x1]=_0xd3216e(0x148),_0x5a6ae8))(v||{});const D=_0x36e24f=>_0x20ef59(new Date(+_0x36e24f))[_0xd3216e(0x11b)](_0xd3216e(0xeb)),B=async(_0x1344df,_0x4b7d37)=>{const _0x396a93=_0xd3216e,_0x3dafdb=_0x1344df['get'](_0x40b3f1),_0x55b8bc=_0x1344df[_0x396a93(0xfe)](_0x38707a);_0x4b7d37['forEach'](_0x4103c3=>{const _0x732a2c=_0x396a93;_0x3dafdb[_0x732a2c(0x121)](_0x4103c3)&&_0x4b7d37[_0x732a2c(0xfd)](_0x4103c3);}),_0x4b7d37[_0x396a93(0xf8)]&&(await _0x55b8bc[_0x396a93(0xfe)](_0x396a93(0x14b),{'params':{'userIDs':[..._0x4b7d37]}}))[_0x396a93(0x143)][_0x396a93(0x12a)][_0x396a93(0x100)](_0x477a09=>{const _0x2fb1ea=_0x396a93;_0x477a09&&_0x3dafdb[_0x2fb1ea(0x102)](_0x477a09);});};var K=Object[_0xd3216e(0xe9)],V=(_0x31706f,_0x5658bc,_0xd74f1b,_0x5ec9b7)=>{const _0x515d23=_0xd3216e;for(var _0x149e06=_0x5ec9b7>0x1?void 0x0:_0x5ec9b7?K(_0x5658bc,_0xd74f1b):_0x5658bc,_0x1b285c=_0x31706f[_0x515d23(0x117)]-0x1,_0x42af4e;_0x1b285c>=0x0;_0x1b285c--)(_0x42af4e=_0x31706f[_0x1b285c])&&(_0x149e06=_0x42af4e(_0x149e06)||_0x149e06);return _0x149e06;},p=(_0x594d18,_0x1f8570)=>(_0x39abcc,_0x55474d)=>_0x1f8570(_0x39abcc,_0x55474d,_0x594d18);let S=class extends _0x1b4e61{constructor(_0x511efc,_0x31069c,_0x1403a0,_0x556254){const _0x366c7f=_0xd3216e;super(),this['_commentService']=_0x511efc,this[_0x366c7f(0x106)]=_0x31069c,this[_0x366c7f(0x10c)]=_0x1403a0,this[_0x366c7f(0x116)]=_0x556254,this['_init'](),this[_0x366c7f(0x111)]();}[_0xd3216e(0x111)](){const _0x7a7bb0=_0xd3216e;this[_0x7a7bb0(0x136)](this[_0x7a7bb0(0x106)][_0x7a7bb0(0x11e)][_0x7a7bb0(0x10b)](_0x1a9a9a(0x10))['subscribe'](_0x374198=>{const _0x20c4f7=_0x7a7bb0,_0x54ab82=new Set();_0x374198['forEach'](_0xe0228c=>{const _0x50419c=_0x586b;switch(_0xe0228c[_0x50419c(0x137)]){case _0x50419c(0x101):{const _0x402882=_0xe0228c[_0x50419c(0x13d)][_0x50419c(0x13e)];_0x54ab82[_0x50419c(0x101)](_0x402882);break;}}}),B(this[_0x20c4f7(0x116)],_0x54ab82);}));}[_0xd3216e(0x130)](){const _0x38ebf5=_0xd3216e;this[_0x38ebf5(0x136)](this[_0x38ebf5(0xf0)][_0x38ebf5(0x11e)][_0x38ebf5(0xf6)](async _0x31c229=>{const _0x4ef882=_0x38ebf5;var _0x312950,_0x1f28a8,_0x323e9b,_0x2a94f0;const _0x59625d=(_0x312950=this[_0x4ef882(0x106)][_0x4ef882(0x14a)](_0x31c229[_0x4ef882(0xff)])[_0x4ef882(0x105)](_0x45a0db=>_0x45a0db[_0x4ef882(0x103)]===_0x31c229[_0x4ef882(0x103)]))==null?void 0x0:_0x312950['root'];if(!_0x59625d)return;const {unitId:_0x386981,subUnitId:_0x5e6a56}=_0x59625d;switch(_0x31c229[_0x4ef882(0x12c)]&&this[_0x4ef882(0x10c)]['addUser'](_0x31c229[_0x4ef882(0x12c)]),_0x31c229['type']){case v[_0x4ef882(0x11a)]:break;case v[_0x4ef882(0x147)]:{this['_threadCommentModel']['addComment'](_0x386981,_0x5e6a56,{'unitId':_0x386981,'subUnitId':_0x5e6a56,'ref':'','id':_0x31c229[_0x4ef882(0x146)],'dT':D(+_0x31c229[_0x4ef882(0x142)]),'threadId':_0x31c229['threadId'],'personId':(_0x323e9b=(_0x1f28a8=_0x31c229[_0x4ef882(0x12c)])==null?void 0x0:_0x1f28a8[_0x4ef882(0x12b)])!=null?_0x323e9b:_0x31c229[_0x4ef882(0x138)],'text':JSON[_0x4ef882(0x127)](_0x31c229['content']),'parentId':_0x59625d['id']});break;}case v[_0x4ef882(0x107)]:{const _0x5a5085=this[_0x4ef882(0x106)][_0x4ef882(0x11d)](_0x386981,_0x5e6a56,_0x31c229['replyId']);_0x5a5085&&_0x5a5085[_0x4ef882(0x112)]&&this[_0x4ef882(0x106)][_0x4ef882(0x133)](_0x386981,_0x5e6a56,_0x31c229['replyId']);break;}case v[_0x4ef882(0x126)]:{this[_0x4ef882(0x106)][_0x4ef882(0x13f)](_0x386981,_0x5e6a56,{'commentId':_0x31c229['replyId'],'text':JSON[_0x4ef882(0x127)](_0x31c229[_0x4ef882(0x144)])});break;}case v[_0x4ef882(0x131)]:{const _0x5bc1b6=(_0x2a94f0=this['_threadCommentModel'][_0x4ef882(0x14a)](_0x31c229[_0x4ef882(0xff)])[_0x4ef882(0x105)](_0x447cf0=>_0x447cf0[_0x4ef882(0x103)]===_0x31c229[_0x4ef882(0x103)]))==null?void 0x0:_0x2a94f0[_0x4ef882(0x122)];_0x5bc1b6&&this['_threadCommentModel']['resolveComment'](_0x386981,_0x5e6a56,_0x5bc1b6['id'],_0x31c229[_0x4ef882(0xe8)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x44f5e1(_0x67df09)),p(0x1,_0x44f5e1(_0x700cee)),p(0x2,_0x44f5e1(_0x40b3f1)),p(0x3,_0x44f5e1(_0x58e5e7))],S);const z=_0xd3216e(0x108),M={};var k=Object[_0xd3216e(0xe9)],Q=(_0x536f2d,_0x1c1e1a,_0x5afd63,_0x13be80)=>{const _0x234cd8=_0xd3216e;for(var _0x230fc4=_0x13be80>0x1?void 0x0:_0x13be80?k(_0x1c1e1a,_0x5afd63):_0x1c1e1a,_0x4b10a9=_0x536f2d[_0x234cd8(0x117)]-0x1,_0x1bf5ad;_0x4b10a9>=0x0;_0x4b10a9--)(_0x1bf5ad=_0x536f2d[_0x4b10a9])&&(_0x230fc4=_0x1bf5ad(_0x230fc4)||_0x230fc4);return _0x230fc4;},_=(_0x5aa1cf,_0x24fe43)=>(_0x3e576f,_0x55cd1a)=>_0x24fe43(_0x3e576f,_0x55cd1a,_0x5aa1cf);function X(_0xbfc9ec,_0x4cfcd9){const _0x2f203c=_0xd3216e,_0x11c5d5=_0xbfc9ec[_0x2f203c(0x123)][0x0];return{..._0x4cfcd9,'id':_0x11c5d5[_0x2f203c(0x146)],'resolved':_0xbfc9ec['solved']===0x1,'dT':D(_0x11c5d5[_0x2f203c(0x142)]),'personId':_0x11c5d5['userId'],'threadId':_0x11c5d5[_0x2f203c(0x103)]};}function ee(_0x53c2f9,_0x19bf08,_0x51d1b7){const _0xe522ac=_0xd3216e;var _0x57f858,_0x528677;if(((_0x528677=(_0x57f858=_0x53c2f9==null?void 0x0:_0x53c2f9[_0xe522ac(0x123)])==null?void 0x0:_0x57f858[_0xe522ac(0x117)])!=null?_0x528677:0x0)>0x0){const _0x3e0b84=(_0x35c3bf,_0x2a9813)=>({'id':_0x35c3bf['replyId'],'threadId':_0x35c3bf[_0xe522ac(0x103)],'dT':D(_0x35c3bf[_0xe522ac(0x142)]),'personId':_0x35c3bf[_0xe522ac(0x138)],'resolved':_0x53c2f9[_0xe522ac(0xe8)]===I[_0xe522ac(0x129)],'unitId':_0x19bf08,'subUnitId':_0x51d1b7,'text':JSON[_0xe522ac(0x127)](_0x35c3bf[_0xe522ac(0x144)]),'parentId':_0x2a9813}),_0x4cd1c4=_0x3e0b84(_0x53c2f9[_0xe522ac(0x123)][0x0]);return{..._0x4cd1c4,'children':_0x53c2f9[_0xe522ac(0x123)][_0xe522ac(0x118)](0x1)['map'](_0x367808=>_0x3e0b84(_0x367808,_0x4cd1c4['id']))};}return null;}let f=class{constructor(_0x2a3828,_0xb64f44,_0x4d2b89,_0x4433ee){const _0x4bbd33=_0xd3216e;this[_0x4bbd33(0xf3)]=_0x2a3828,this[_0x4bbd33(0x10c)]=_0xb64f44,this[_0x4bbd33(0x132)]=_0x4d2b89,this[_0x4bbd33(0x116)]=_0x4433ee;}async[_0xd3216e(0x10d)](_0x2c74c){const _0x2c6fd6=_0xd3216e;var _0x553c3b,_0x48284c;const {parentId:_0x448fde,unitId:_0x273f47,text:_0x59e12e,threadId:_0x412fe4}=_0x2c74c,_0x156609=(_0x48284c=(_0x553c3b=_0x59e12e[_0x2c6fd6(0x140)])==null?void 0x0:_0x553c3b[_0x2c6fd6(0xfc)](_0x4e4263=>_0x4e4263[_0x2c6fd6(0x141)]===_0x4ab199[_0x2c6fd6(0xf5)])[_0x2c6fd6(0x10f)](_0x5d7f2f=>_0x5d7f2f[_0x2c6fd6(0x115)]))!=null?_0x48284c:[],_0x3289cf=JSON[_0x2c6fd6(0x124)](_0x59e12e),_0x3ddbd0=(await this[_0x2c6fd6(0x132)][_0x2c6fd6(0x139)](_0x273f47))[_0x2c6fd6(0x12f)]();if(_0x448fde){const _0x53e926={'memberId':_0x3ddbd0,'unitId':_0x273f47,'content':_0x3289cf,'mention':_0x156609,'threadId':_0x412fe4},_0x176bc7=(await this[_0x2c6fd6(0xf3)][_0x2c6fd6(0xfa)](_0x2c6fd6(0xf4)+_0x273f47+'/reply',{'body':_0x53e926}))[_0x2c6fd6(0x143)][_0x2c6fd6(0x149)];return{..._0x2c74c,'id':_0x176bc7[_0x2c6fd6(0x146)],'dT':_0x20ef59(+_0x176bc7[_0x2c6fd6(0x142)])[_0x2c6fd6(0x11b)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x176bc7['userId']};}else{const _0x3402a7={'memberId':_0x3ddbd0,'unitId':_0x273f47,'content':_0x3289cf,'mention':_0x156609},_0xabd233=await this[_0x2c6fd6(0xf3)]['post']('/universer-api/comment/unit/'+_0x273f47+_0x2c6fd6(0x10a),{'body':_0x3402a7});return X(_0xabd233['body'][_0x2c6fd6(0xee)],_0x2c74c);}}async[_0xd3216e(0x13f)](_0x2807e8){const _0xd92e92=_0xd3216e;var _0x39a968,_0x16f1e7;const {text:_0x4fd718,unitId:_0x2c3675}=_0x2807e8,_0x1dbf83=(_0x16f1e7=(_0x39a968=_0x4fd718[_0xd92e92(0x140)])==null?void 0x0:_0x39a968[_0xd92e92(0xfc)](_0x357215=>_0x357215[_0xd92e92(0x141)]===_0x4ab199[_0xd92e92(0xf5)])[_0xd92e92(0x10f)](_0x45b2da=>_0x45b2da[_0xd92e92(0x115)]))!=null?_0x16f1e7:[],_0x1f9ff2=JSON['stringify'](_0x4fd718),_0x5d4d3a=_0x2807e8[_0xd92e92(0x103)],_0x26831d=_0x2807e8['id'],_0x3a5058={'memberId':(await this[_0xd92e92(0x132)][_0xd92e92(0x139)](_0x2c3675))[_0xd92e92(0x12f)](),'unitId':_0x2c3675,'threadId':_0x5d4d3a,'mention':_0x1dbf83,'content':_0x1f9ff2,'replyId':_0x26831d},_0x34ee16=await this[_0xd92e92(0xf3)][_0xd92e92(0xfa)]('/universer-api/comment/unit/'+_0x2c3675+_0xd92e92(0xec),{'body':_0x3a5058});return!_0x34ee16[_0xd92e92(0x143)][_0xd92e92(0x104)]||_0x34ee16[_0xd92e92(0x143)]['error'][_0xd92e92(0x14d)]===0x1;}async[_0xd3216e(0x128)](_0x591bbd){const _0x30aac6=_0xd3216e,{unitId:_0x56dd20}=_0x591bbd,_0x14de69=_0x591bbd['threadId'],_0x4c94cc={'memberId':this[_0x30aac6(0x10c)][_0x30aac6(0x12e)]()[_0x30aac6(0x12b)],'unitId':_0x56dd20,'threadId':_0x14de69,'solved':_0x591bbd['resolved']?I['Solved']:I['OpenOrReOpen']},_0x19ebb3=await this[_0x30aac6(0xf3)][_0x30aac6(0xfa)](_0x30aac6(0xf4)+_0x56dd20+_0x30aac6(0xf1),{'body':_0x4c94cc});return!_0x19ebb3['body'][_0x30aac6(0x104)]||_0x19ebb3[_0x30aac6(0x143)][_0x30aac6(0x104)][_0x30aac6(0x14d)]===0x1;}async[_0xd3216e(0x133)](_0x5f2d93,_0x9dedba,_0xe6c608,_0xbc7115){const _0x25c46b=_0xd3216e,_0x5308db={'memberId':(await this[_0x25c46b(0x132)][_0x25c46b(0x139)](_0x5f2d93))['getMemberID'](),'threadId':_0xe6c608,'replyId':_0xbc7115,'unitId':_0x5f2d93},_0x1c6d15=await this[_0x25c46b(0xf3)][_0x25c46b(0xfa)](_0x25c46b(0xf4)+_0x5f2d93+_0x25c46b(0x109),{'body':_0x5308db});return!_0x1c6d15[_0x25c46b(0x143)][_0x25c46b(0x104)]||_0x1c6d15[_0x25c46b(0x143)][_0x25c46b(0x104)]['code']===0x1;}async['listComments'](_0x4a9fad,_0x52232a,_0x1c0b25){const _0x2420a2=_0xd3216e,_0x6b7e28={'unitId':_0x4a9fad,'threadId':_0x1c0b25},_0x10be8e=await this[_0x2420a2(0xf3)][_0x2420a2(0xfa)]('/universer-api/comment/unit/'+_0x4a9fad+_0x2420a2(0xf7),{'body':_0x6b7e28}),_0x51c729=_0x1c0b25[_0x2420a2(0x10f)](_0x4d35f0=>ee(_0x10be8e[_0x2420a2(0x143)][_0x2420a2(0x13c)][_0x4d35f0],_0x4a9fad,_0x52232a))[_0x2420a2(0xfc)](Boolean);return Object['values'](_0x10be8e['body']['users'])['forEach'](_0x164820=>{const _0x2b5f4b=_0x2420a2;this[_0x2b5f4b(0x10c)][_0x2b5f4b(0x102)](_0x164820);}),_0x51c729;}['saveCommentToSnapshot'](_0x91b87a){const _0x17161f=_0xd3216e;return{'id':_0x91b87a['id'],'threadId':_0x91b87a[_0x17161f(0x103)],'ref':_0x91b87a['ref']};}};f=Q([_(0x0,_0x44f5e1(_0x38707a)),_(0x1,_0x44f5e1(_0x40b3f1)),_(0x2,_0x44f5e1(_0x41d110)),_(0x3,_0x44f5e1(_0x58e5e7))],f);var re=Object[_0xd3216e(0xe9)],te=(_0x3cf2bf,_0x2e6f79,_0xa9403d,_0xc2372d)=>{for(var _0x2be11d=_0xc2372d>0x1?void 0x0:_0xc2372d?re(_0x2e6f79,_0xa9403d):_0x2e6f79,_0x551c44=_0x3cf2bf['length']-0x1,_0x1aaa47;_0x551c44>=0x0;_0x551c44--)(_0x1aaa47=_0x3cf2bf[_0x551c44])&&(_0x2be11d=_0x1aaa47(_0x2be11d)||_0x2be11d);return _0x2be11d;},N=(_0x5789f1,_0x4b641a)=>(_0x47a6d7,_0x33ce02)=>_0x4b641a(_0x47a6d7,_0x33ce02,_0x5789f1);let g=class extends _0x1b4e61{constructor(_0x2d97e5,_0x38d672){const _0x57cc43=_0xd3216e;super(),this[_0x57cc43(0xf9)]=_0x2d97e5,this[_0x57cc43(0xf2)]=_0x38d672,this[_0x57cc43(0x12d)]();}[_0xd3216e(0x12d)](){const _0x93161a=_0xd3216e;this[_0x93161a(0xf9)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x93161a(0xfb)]=!0x1;}};g=te([N(0x0,_0x12b23a),N(0x1,_0x44f5e1(f))],g);var se=Object['defineProperty'],oe=Object[_0xd3216e(0xe9)],ne=(_0x4491b0,_0x59cfb4,_0x46b6a3)=>_0x59cfb4 in _0x4491b0?se(_0x4491b0,_0x59cfb4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x46b6a3}):_0x4491b0[_0x59cfb4]=_0x46b6a3,ie=(_0x4f198b,_0x30244d,_0x162e04,_0x433009)=>{const _0x1c8ac5=_0xd3216e;for(var _0x1ddd54=_0x433009>0x1?void 0x0:_0x433009?oe(_0x30244d,_0x162e04):_0x30244d,_0x2c7c59=_0x4f198b[_0x1c8ac5(0x117)]-0x1,_0x33dba1;_0x2c7c59>=0x0;_0x2c7c59--)(_0x33dba1=_0x4f198b[_0x2c7c59])&&(_0x1ddd54=_0x33dba1(_0x1ddd54)||_0x1ddd54);return _0x1ddd54;},w=(_0x4c6027,_0x2b4b58)=>(_0x3bb3cf,_0x336562)=>_0x2b4b58(_0x3bb3cf,_0x336562,_0x4c6027),$=(_0x66c4b9,_0x29b27e,_0x1df97a)=>ne(_0x66c4b9,typeof _0x29b27e!=_0xd3216e(0xea)?_0x29b27e+'':_0x29b27e,_0x1df97a);let b=class extends _0x323721{constructor(_0x1c0732=M,_0x421891,_0x4f209a){const _0x5e4b68=_0xd3216e;super(),this[_0x5e4b68(0x125)]=_0x1c0732,this[_0x5e4b68(0x116)]=_0x421891,this[_0x5e4b68(0x14c)]=_0x4f209a;const {..._0x38ecbe}=_0x67d16f({},M,this[_0x5e4b68(0x125)]);this[_0x5e4b68(0x14c)]['setConfig'](z,_0x38ecbe);}['onStarting'](){const _0x6a015=_0xd3216e;[[f],[g],[S]][_0x6a015(0x100)](_0x336f50=>{const _0x3ab620=_0x6a015;this['_injector'][_0x3ab620(0x101)](_0x336f50);});}[_0xd3216e(0x119)](){const _0x50184a=_0xd3216e;this[_0x50184a(0x116)]['get'](g),this[_0x50184a(0x116)][_0x50184a(0xfe)](S);}};$(b,_0xd3216e(0x11c),W),$(b,_0xd3216e(0x137),_0x37bca2['UNIVER_UNKNOWN']),b=ie([_0x83fc12(_0x49bd5f,_0x4ed5e1,_0x1c7e69),w(0x1,_0x44f5e1(_0x58e5e7)),w(0x2,_0x20992b)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x33e44b=_0x1814;(function(_0x195a22,_0x872dbd){const _0x23408a=_0x1814,_0x263be5=_0x195a22();while(!![]){try{const _0x26a1ed=parseInt(_0x23408a(0x145))/0x1*(parseInt(_0x23408a(0x16d))/0x2)+parseInt(_0x23408a(0x198))/0x3+-parseInt(_0x23408a(0x169))/0x4+-parseInt(_0x23408a(0x15f))/0x5+-parseInt(_0x23408a(0x157))/0x6*(parseInt(_0x23408a(0x142))/0x7)+-parseInt(_0x23408a(0x146))/0x8+parseInt(_0x23408a(0x13f))/0x9;if(_0x26a1ed===_0x872dbd)break;else _0x263be5['push'](_0x263be5['shift']());}catch(_0xf1ed01){_0x263be5['push'](_0x263be5['shift']());}}}(_0x61ae,0xe9d10));import{CommentService as _0x1b43bb,CollaborationSessionService as _0x5a3e8e,UniverCollaborationClientPlugin as _0x35611b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x35b6ab}from'@univerjs-pro/license';import{dayjs as _0x1f8faa,UserManagerService as _0x32d721,Inject as _0xa81a04,Injector as _0x30a5b9,Disposable as _0x234e12,CustomRangeType as _0x49eeca,UniverInstanceType as _0x35e9a7,DependentOn as _0x2567c7,IConfigService as _0x54763b,Plugin as _0x21f70a,merge as _0x10f491}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x6f43cc}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x718fe,IThreadCommentDataSourceService as _0xfc7a2e}from'@univerjs/thread-comment';import{bufferTime as _0x364169}from'rxjs';import{HTTPService as _0x240bd7}from'@univerjs/network';function _0x1814(_0x19fcff,_0x2f00f2){const _0x61ae16=_0x61ae();return _0x1814=function(_0x18147a,_0x5e4737){_0x18147a=_0x18147a-0x139;let _0x165412=_0x61ae16[_0x18147a];return _0x165412;},_0x1814(_0x19fcff,_0x2f00f2);}const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x347a70=>(_0x347a70[_0x347a70[_0x33e44b(0x197)]=0x0]=_0x33e44b(0x197),_0x347a70[_0x347a70[_0x33e44b(0x191)]=0x1]='Solved',_0x347a70[_0x347a70[_0x33e44b(0x165)]=-0x1]=_0x33e44b(0x165),_0x347a70))(I||{}),v=(_0x2484a0=>(_0x2484a0[_0x2484a0[_0x33e44b(0x13d)]=0x0]=_0x33e44b(0x13d),_0x2484a0[_0x2484a0[_0x33e44b(0x15b)]=0x1]=_0x33e44b(0x15b),_0x2484a0[_0x2484a0[_0x33e44b(0x154)]=0x2]=_0x33e44b(0x154),_0x2484a0[_0x2484a0['Edit']=0x3]=_0x33e44b(0x13e),_0x2484a0[_0x2484a0[_0x33e44b(0x160)]=0x4]=_0x33e44b(0x160),_0x2484a0[_0x2484a0['Solve']=0x5]=_0x33e44b(0x18f),_0x2484a0[_0x2484a0[_0x33e44b(0x165)]=-0x1]=_0x33e44b(0x165),_0x2484a0))(v||{});const D=_0x5a8cae=>_0x1f8faa(new Date(+_0x5a8cae))[_0x33e44b(0x16a)](_0x33e44b(0x18b)),B=async(_0x13ef69,_0x30f6e2)=>{const _0x317ee0=_0x33e44b,_0x54b34d=_0x13ef69[_0x317ee0(0x178)](_0x32d721),_0x2523a5=_0x13ef69[_0x317ee0(0x178)](_0x240bd7);_0x30f6e2[_0x317ee0(0x192)](_0x36203a=>{const _0x33bf70=_0x317ee0;_0x54b34d[_0x33bf70(0x161)](_0x36203a)&&_0x30f6e2[_0x33bf70(0x17b)](_0x36203a);}),_0x30f6e2['size']&&(await _0x2523a5[_0x317ee0(0x178)](_0x317ee0(0x18a),{'params':{'userIDs':[..._0x30f6e2]}}))['body'][_0x317ee0(0x18d)][_0x317ee0(0x192)](_0x18fad2=>{const _0x542fd8=_0x317ee0;_0x18fad2&&_0x54b34d[_0x542fd8(0x13a)](_0x18fad2);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x201492,_0x1be307,_0x4eb997,_0x106951)=>{const _0x57a0a0=_0x33e44b;for(var _0x378a9c=_0x106951>0x1?void 0x0:_0x106951?K(_0x1be307,_0x4eb997):_0x1be307,_0x1f8311=_0x201492[_0x57a0a0(0x16f)]-0x1,_0xf61a94;_0x1f8311>=0x0;_0x1f8311--)(_0xf61a94=_0x201492[_0x1f8311])&&(_0x378a9c=_0xf61a94(_0x378a9c)||_0x378a9c);return _0x378a9c;},p=(_0x541783,_0x22a56f)=>(_0x3b00b6,_0x378187)=>_0x22a56f(_0x3b00b6,_0x378187,_0x541783);let S=class extends _0x234e12{constructor(_0x4161d6,_0x5d6f0d,_0x54c056,_0x4dcf0a){const _0x5bd590=_0x33e44b;super(),this['_commentService']=_0x4161d6,this[_0x5bd590(0x156)]=_0x5d6f0d,this[_0x5bd590(0x16c)]=_0x54c056,this['_injector']=_0x4dcf0a,this[_0x5bd590(0x16b)](),this[_0x5bd590(0x155)]();}[_0x33e44b(0x155)](){const _0x14a527=_0x33e44b;this[_0x14a527(0x13b)](this[_0x14a527(0x156)]['commentUpdate$'][_0x14a527(0x171)](_0x364169(0x10))[_0x14a527(0x15a)](_0x49fafa=>{const _0x34267a=_0x14a527,_0x4859ec=new Set();_0x49fafa[_0x34267a(0x192)](_0x3e448c=>{const _0x3f4fff=_0x34267a;switch(_0x3e448c[_0x3f4fff(0x153)]){case'add':{const _0x1b45ed=_0x3e448c[_0x3f4fff(0x15e)]['personId'];_0x4859ec[_0x3f4fff(0x174)](_0x1b45ed);break;}}}),B(this[_0x34267a(0x166)],_0x4859ec);}));}['_init'](){const _0x39c400=_0x33e44b;this['disposeWithMe'](this[_0x39c400(0x14e)]['commentUpdate$'][_0x39c400(0x15a)](async _0x55debe=>{const _0x33ddc5=_0x39c400;var _0x13ec1b,_0x3bf708,_0x4e3332,_0x12c2eb;const _0x83d487=(_0x13ec1b=this['_threadCommentModel'][_0x33ddc5(0x182)](_0x55debe[_0x33ddc5(0x17a)])['find'](_0x3fbc49=>_0x3fbc49[_0x33ddc5(0x196)]===_0x55debe[_0x33ddc5(0x196)]))==null?void 0x0:_0x13ec1b[_0x33ddc5(0x149)];if(!_0x83d487)return;const {unitId:_0xd5fbc3,subUnitId:_0x298ab9}=_0x83d487;switch(_0x55debe[_0x33ddc5(0x176)]&&this['_userService']['addUser'](_0x55debe[_0x33ddc5(0x176)]),_0x55debe[_0x33ddc5(0x153)]){case v[_0x33ddc5(0x15b)]:break;case v[_0x33ddc5(0x154)]:{this[_0x33ddc5(0x156)][_0x33ddc5(0x14b)](_0xd5fbc3,_0x298ab9,{'unitId':_0xd5fbc3,'subUnitId':_0x298ab9,'ref':'','id':_0x55debe[_0x33ddc5(0x162)],'dT':D(+_0x55debe[_0x33ddc5(0x188)]),'threadId':_0x55debe['threadId'],'personId':(_0x4e3332=(_0x3bf708=_0x55debe[_0x33ddc5(0x176)])==null?void 0x0:_0x3bf708[_0x33ddc5(0x15c)])!=null?_0x4e3332:_0x55debe[_0x33ddc5(0x194)],'text':JSON['parse'](_0x55debe['content']),'parentId':_0x83d487['id']});break;}case v[_0x33ddc5(0x160)]:{const _0x286dfd=this[_0x33ddc5(0x156)][_0x33ddc5(0x179)](_0xd5fbc3,_0x298ab9,_0x55debe[_0x33ddc5(0x162)]);_0x286dfd&&_0x286dfd[_0x33ddc5(0x164)]&&this[_0x33ddc5(0x156)][_0x33ddc5(0x13c)](_0xd5fbc3,_0x298ab9,_0x55debe[_0x33ddc5(0x162)]);break;}case v[_0x33ddc5(0x13e)]:{this[_0x33ddc5(0x156)][_0x33ddc5(0x193)](_0xd5fbc3,_0x298ab9,{'commentId':_0x55debe[_0x33ddc5(0x162)],'text':JSON[_0x33ddc5(0x159)](_0x55debe['content'])});break;}case v[_0x33ddc5(0x18f)]:{const _0x156455=(_0x12c2eb=this[_0x33ddc5(0x156)]['getUnit'](_0x55debe[_0x33ddc5(0x17a)])['find'](_0x27e031=>_0x27e031[_0x33ddc5(0x196)]===_0x55debe[_0x33ddc5(0x196)]))==null?void 0x0:_0x12c2eb['root'];_0x156455&&this[_0x33ddc5(0x156)]['resolveComment'](_0xd5fbc3,_0x298ab9,_0x156455['id'],_0x55debe[_0x33ddc5(0x183)]===I[_0x33ddc5(0x191)]);break;}}}));}};S=V([p(0x0,_0xa81a04(_0x1b43bb)),p(0x1,_0xa81a04(_0x718fe)),p(0x2,_0xa81a04(_0x32d721)),p(0x3,_0xa81a04(_0x30a5b9))],S);const z=_0x33e44b(0x144),M={};function _0x61ae(){const _0x2fcdb5=['/reply','pipe','resolved','map','add','replies','user','_sessionService','get','getComment','unitId','delete','UNIVER_UNKNOWN','/solved','requireSession','/delete','resolveComment','listComments','getUnit','solved','onStarting','_configService','error','values','createTimestamp','symbol','/universer-api/user/list','YYYY/MM/DD\x20HH:mm','slice','users','ref','Solve','getMemberID','Solved','forEach','updateComment','userId','/add','threadId','OpenOrReOpen','2374848bzaYuG','rangeId','addUser','disposeWithMe','deleteComment','Unknown','Edit','24403572jOgYdr','_threadCommentDataSourceService','_config','2639imQSlB','body','thread-comment-data-source.config','2cLhwQM','3016760YyPaJm','defineProperty','stringify','root','pluginName','addComment','_initDataSource','_httpService','_commentService','customRanges','getCurrentUser','code','content','type','Reply','_initUserSync','_threadCommentModel','17352xnDUVj','_threadCommentDataSource','parse','subscribe','Add','userID','filter','payload','5286465uVGwnn','Delete','getUser','replyId','COMMENT','parentId','UNRECOGNIZED','_injector','/list','/universer-api/comment/unit/','4855488FvkWjj','format','_init','_userService','1193132QAImPg','post','length'];_0x61ae=function(){return _0x2fcdb5;};return _0x61ae();}var k=Object['getOwnPropertyDescriptor'],Q=(_0xb63c92,_0x412e24,_0x400f49,_0x12acb2)=>{for(var _0x19b5a3=_0x12acb2>0x1?void 0x0:_0x12acb2?k(_0x412e24,_0x400f49):_0x412e24,_0x901cc4=_0xb63c92['length']-0x1,_0x33c4c9;_0x901cc4>=0x0;_0x901cc4--)(_0x33c4c9=_0xb63c92[_0x901cc4])&&(_0x19b5a3=_0x33c4c9(_0x19b5a3)||_0x19b5a3);return _0x19b5a3;},_=(_0x50f8c2,_0x5ed6b1)=>(_0x5382b2,_0x5da11b)=>_0x5ed6b1(_0x5382b2,_0x5da11b,_0x50f8c2);function X(_0x597caf,_0x4ae1b1){const _0x5efd8f=_0x33e44b,_0x2fc86e=_0x597caf[_0x5efd8f(0x175)][0x0];return{..._0x4ae1b1,'id':_0x2fc86e[_0x5efd8f(0x162)],'resolved':_0x597caf['solved']===0x1,'dT':D(_0x2fc86e[_0x5efd8f(0x188)]),'personId':_0x2fc86e[_0x5efd8f(0x194)],'threadId':_0x2fc86e[_0x5efd8f(0x196)]};}function ee(_0x452392,_0x6a07c2,_0x39cc24){const _0x504b20=_0x33e44b;var _0x261901,_0x179fc5;if(((_0x179fc5=(_0x261901=_0x452392==null?void 0x0:_0x452392[_0x504b20(0x175)])==null?void 0x0:_0x261901[_0x504b20(0x16f)])!=null?_0x179fc5:0x0)>0x0){const _0x4c470a=(_0x1202f2,_0x5e6750)=>({'id':_0x1202f2[_0x504b20(0x162)],'threadId':_0x1202f2[_0x504b20(0x196)],'dT':D(_0x1202f2[_0x504b20(0x188)]),'personId':_0x1202f2[_0x504b20(0x194)],'resolved':_0x452392[_0x504b20(0x183)]===I[_0x504b20(0x191)],'unitId':_0x6a07c2,'subUnitId':_0x39cc24,'text':JSON[_0x504b20(0x159)](_0x1202f2[_0x504b20(0x152)]),'parentId':_0x5e6750}),_0x2baedb=_0x4c470a(_0x452392[_0x504b20(0x175)][0x0]);return{..._0x2baedb,'children':_0x452392[_0x504b20(0x175)][_0x504b20(0x18c)](0x1)['map'](_0x25a538=>_0x4c470a(_0x25a538,_0x2baedb['id']))};}return null;}let f=class{constructor(_0x40c91b,_0x331edd,_0x2786d0,_0x208af3){const _0x5612d1=_0x33e44b;this['_httpService']=_0x40c91b,this[_0x5612d1(0x16c)]=_0x331edd,this[_0x5612d1(0x177)]=_0x2786d0,this[_0x5612d1(0x166)]=_0x208af3;}async[_0x33e44b(0x14b)](_0x188dfe){const _0x3ecf2a=_0x33e44b;var _0x25c102,_0x453824;const {parentId:_0x4d131c,unitId:_0x53081c,text:_0x457f56,threadId:_0xc1c935}=_0x188dfe,_0x562d63=(_0x453824=(_0x25c102=_0x457f56[_0x3ecf2a(0x14f)])==null?void 0x0:_0x25c102[_0x3ecf2a(0x15d)](_0x2218d9=>_0x2218d9['rangeType']===_0x49eeca[_0x3ecf2a(0x163)])[_0x3ecf2a(0x173)](_0x16cf04=>_0x16cf04[_0x3ecf2a(0x139)]))!=null?_0x453824:[],_0x4dd26e=JSON[_0x3ecf2a(0x148)](_0x457f56),_0x4c5f14=(await this['_sessionService'][_0x3ecf2a(0x17e)](_0x53081c))['getMemberID']();if(_0x4d131c){const _0x563418={'memberId':_0x4c5f14,'unitId':_0x53081c,'content':_0x4dd26e,'mention':_0x562d63,'threadId':_0xc1c935},_0x22a6d5=(await this['_httpService'][_0x3ecf2a(0x16e)](_0x3ecf2a(0x168)+_0x53081c+_0x3ecf2a(0x170),{'body':_0x563418}))[_0x3ecf2a(0x143)]['reply'];return{..._0x188dfe,'id':_0x22a6d5['replyId'],'dT':_0x1f8faa(+_0x22a6d5[_0x3ecf2a(0x188)])[_0x3ecf2a(0x16a)](_0x3ecf2a(0x18b)),'personId':_0x22a6d5[_0x3ecf2a(0x194)]};}else{const _0x525565={'memberId':_0x4c5f14,'unitId':_0x53081c,'content':_0x4dd26e,'mention':_0x562d63},_0x3ba475=await this[_0x3ecf2a(0x14d)]['post']('/universer-api/comment/unit/'+_0x53081c+_0x3ecf2a(0x195),{'body':_0x525565});return X(_0x3ba475[_0x3ecf2a(0x143)]['comment'],_0x188dfe);}}async['updateComment'](_0x4f3c05){const _0xa625aa=_0x33e44b;var _0x1a16a2,_0xac8ed7;const {text:_0x53d29b,unitId:_0x4767ac}=_0x4f3c05,_0x4b4ea5=(_0xac8ed7=(_0x1a16a2=_0x53d29b[_0xa625aa(0x14f)])==null?void 0x0:_0x1a16a2[_0xa625aa(0x15d)](_0x504a2d=>_0x504a2d['rangeType']===_0x49eeca['COMMENT'])['map'](_0x149f30=>_0x149f30['rangeId']))!=null?_0xac8ed7:[],_0x139d56=JSON[_0xa625aa(0x148)](_0x53d29b),_0x290533=_0x4f3c05[_0xa625aa(0x196)],_0x131041=_0x4f3c05['id'],_0x1cedb9={'memberId':(await this[_0xa625aa(0x177)][_0xa625aa(0x17e)](_0x4767ac))[_0xa625aa(0x190)](),'unitId':_0x4767ac,'threadId':_0x290533,'mention':_0x4b4ea5,'content':_0x139d56,'replyId':_0x131041},_0x4024b6=await this[_0xa625aa(0x14d)][_0xa625aa(0x16e)](_0xa625aa(0x168)+_0x4767ac+'/edit',{'body':_0x1cedb9});return!_0x4024b6[_0xa625aa(0x143)][_0xa625aa(0x186)]||_0x4024b6[_0xa625aa(0x143)][_0xa625aa(0x186)][_0xa625aa(0x151)]===0x1;}async[_0x33e44b(0x180)](_0x4e5da9){const _0x562026=_0x33e44b,{unitId:_0x5e5cf8}=_0x4e5da9,_0x333317=_0x4e5da9[_0x562026(0x196)],_0x15de05={'memberId':this[_0x562026(0x16c)][_0x562026(0x150)]()[_0x562026(0x15c)],'unitId':_0x5e5cf8,'threadId':_0x333317,'solved':_0x4e5da9[_0x562026(0x172)]?I[_0x562026(0x191)]:I['OpenOrReOpen']},_0x193b21=await this[_0x562026(0x14d)][_0x562026(0x16e)](_0x562026(0x168)+_0x5e5cf8+_0x562026(0x17d),{'body':_0x15de05});return!_0x193b21[_0x562026(0x143)][_0x562026(0x186)]||_0x193b21['body'][_0x562026(0x186)][_0x562026(0x151)]===0x1;}async['deleteComment'](_0x27c859,_0x10b0ab,_0x4fa416,_0x5fc2fb){const _0x4f5034=_0x33e44b,_0x5838b3={'memberId':(await this[_0x4f5034(0x177)][_0x4f5034(0x17e)](_0x27c859))['getMemberID'](),'threadId':_0x4fa416,'replyId':_0x5fc2fb,'unitId':_0x27c859},_0x47387e=await this['_httpService'][_0x4f5034(0x16e)](_0x4f5034(0x168)+_0x27c859+_0x4f5034(0x17f),{'body':_0x5838b3});return!_0x47387e[_0x4f5034(0x143)][_0x4f5034(0x186)]||_0x47387e[_0x4f5034(0x143)][_0x4f5034(0x186)]['code']===0x1;}async[_0x33e44b(0x181)](_0x4c0f1e,_0x84e585,_0x59945b){const _0x4dee12=_0x33e44b,_0x2839f8={'unitId':_0x4c0f1e,'threadId':_0x59945b},_0x59efc7=await this[_0x4dee12(0x14d)][_0x4dee12(0x16e)](_0x4dee12(0x168)+_0x4c0f1e+_0x4dee12(0x167),{'body':_0x2839f8}),_0x182448=_0x59945b[_0x4dee12(0x173)](_0x307dd2=>ee(_0x59efc7[_0x4dee12(0x143)]['comments'][_0x307dd2],_0x4c0f1e,_0x84e585))[_0x4dee12(0x15d)](Boolean);return Object[_0x4dee12(0x187)](_0x59efc7[_0x4dee12(0x143)][_0x4dee12(0x18d)])[_0x4dee12(0x192)](_0x4d5fe8=>{const _0xbcb1eb=_0x4dee12;this[_0xbcb1eb(0x16c)][_0xbcb1eb(0x13a)](_0x4d5fe8);}),_0x182448;}['saveCommentToSnapshot'](_0x22fa47){const _0x9d2d4c=_0x33e44b;return{'id':_0x22fa47['id'],'threadId':_0x22fa47[_0x9d2d4c(0x196)],'ref':_0x22fa47[_0x9d2d4c(0x18e)]};}};f=Q([_(0x0,_0xa81a04(_0x240bd7)),_(0x1,_0xa81a04(_0x32d721)),_(0x2,_0xa81a04(_0x5a3e8e)),_(0x3,_0xa81a04(_0x30a5b9))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x2db29d,_0x2266ac,_0xa0d49,_0x58b8e3)=>{const _0x2aabd9=_0x33e44b;for(var _0x4a5b8c=_0x58b8e3>0x1?void 0x0:_0x58b8e3?re(_0x2266ac,_0xa0d49):_0x2266ac,_0x2f91c5=_0x2db29d[_0x2aabd9(0x16f)]-0x1,_0x48c58e;_0x2f91c5>=0x0;_0x2f91c5--)(_0x48c58e=_0x2db29d[_0x2f91c5])&&(_0x4a5b8c=_0x48c58e(_0x4a5b8c)||_0x4a5b8c);return _0x4a5b8c;},N=(_0x63090c,_0x148c24)=>(_0x4aa630,_0x25aef5)=>_0x148c24(_0x4aa630,_0x25aef5,_0x63090c);let g=class extends _0x234e12{constructor(_0x318cc3,_0x10b625){const _0x5ec075=_0x33e44b;super(),this[_0x5ec075(0x140)]=_0x318cc3,this[_0x5ec075(0x158)]=_0x10b625,this[_0x5ec075(0x14c)]();}[_0x33e44b(0x14c)](){const _0x3ef9e4=_0x33e44b;this[_0x3ef9e4(0x140)]['dataSource']=this[_0x3ef9e4(0x158)],this[_0x3ef9e4(0x140)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0xfc7a2e),N(0x1,_0xa81a04(f))],g);var se=Object[_0x33e44b(0x147)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x298bbb,_0x57b2ec,_0xb7471d)=>_0x57b2ec in _0x298bbb?se(_0x298bbb,_0x57b2ec,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xb7471d}):_0x298bbb[_0x57b2ec]=_0xb7471d,ie=(_0x191339,_0x36b300,_0x36f3c3,_0x58c65d)=>{const _0x3b603a=_0x33e44b;for(var _0x570a1e=_0x58c65d>0x1?void 0x0:_0x58c65d?oe(_0x36b300,_0x36f3c3):_0x36b300,_0xd33c2d=_0x191339[_0x3b603a(0x16f)]-0x1,_0x377201;_0xd33c2d>=0x0;_0xd33c2d--)(_0x377201=_0x191339[_0xd33c2d])&&(_0x570a1e=_0x377201(_0x570a1e)||_0x570a1e);return _0x570a1e;},w=(_0x2bc0f8,_0x20fd8a)=>(_0x54480f,_0x4b6192)=>_0x20fd8a(_0x54480f,_0x4b6192,_0x2bc0f8),$=(_0x2caad2,_0x3d72f6,_0x4bdb62)=>ne(_0x2caad2,typeof _0x3d72f6!=_0x33e44b(0x189)?_0x3d72f6+'':_0x3d72f6,_0x4bdb62);let b=class extends _0x21f70a{constructor(_0x57572b=M,_0x56c523,_0x1baf7f){const _0x5be9bd=_0x33e44b;super(),this['_config']=_0x57572b,this[_0x5be9bd(0x166)]=_0x56c523,this[_0x5be9bd(0x185)]=_0x1baf7f;const {..._0x523092}=_0x10f491({},M,this[_0x5be9bd(0x141)]);this[_0x5be9bd(0x185)]['setConfig'](z,_0x523092);}[_0x33e44b(0x184)](){const _0x539a9c=_0x33e44b;[[f],[g],[S]][_0x539a9c(0x192)](_0x589f8a=>{const _0x1cdfed=_0x539a9c;this[_0x1cdfed(0x166)][_0x1cdfed(0x174)](_0x589f8a);});}['onReady'](){const _0x17946e=_0x33e44b;this['_injector'][_0x17946e(0x178)](g),this[_0x17946e(0x166)][_0x17946e(0x178)](S);}};$(b,_0x33e44b(0x14a),W),$(b,'type',_0x35e9a7[_0x33e44b(0x17c)]),b=ie([_0x2567c7(_0x6f43cc,_0x35611b,_0x35b6ab),w(0x1,_0xa81a04(_0x30a5b9)),w(0x2,_0x54763b)],b);export{b as UniverThreadCommentDataSourcePlugin};
@@ -1,6 +1,6 @@
1
+ import { CommentService } from '@univerjs-pro/collaboration-client';
1
2
  import { Disposable, Injector, UserManagerService } from '@univerjs/core';
2
3
  import { ThreadCommentModel } from '@univerjs/thread-comment';
3
- import { CommentService } from '@univerjs-pro/collaboration-client';
4
4
  export declare class ThreadCommentCollaUpdateController extends Disposable {
5
5
  private readonly _commentService;
6
6
  private readonly _threadCommentModel;
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x24120b,_0xb4849e){const _0x38ef67=_0x3563,_0x3d3ad6=_0x24120b();while(!![]){try{const _0x4d0f64=parseInt(_0x38ef67(0x128))/0x1*(-parseInt(_0x38ef67(0x182))/0x2)+-parseInt(_0x38ef67(0x139))/0x3*(-parseInt(_0x38ef67(0x177))/0x4)+-parseInt(_0x38ef67(0x11c))/0x5+-parseInt(_0x38ef67(0x159))/0x6*(-parseInt(_0x38ef67(0x13d))/0x7)+parseInt(_0x38ef67(0x133))/0x8*(parseInt(_0x38ef67(0x12f))/0x9)+parseInt(_0x38ef67(0x127))/0xa+-parseInt(_0x38ef67(0x152))/0xb*(parseInt(_0x38ef67(0x130))/0xc);if(_0x4d0f64===_0xb4849e)break;else _0x3d3ad6['push'](_0x3d3ad6['shift']());}catch(_0x39900e){_0x3d3ad6['push'](_0x3d3ad6['shift']());}}}(_0x45bc,0x58379),function(_0x42644c,_0x186832){const _0x4196c5=_0x3563;typeof exports==_0x4196c5(0x157)&&typeof module<'u'?_0x186832(exports,require(_0x4196c5(0x13f)),require(_0x4196c5(0x121)),require(_0x4196c5(0x18f)),require('@univerjs/thread-comment-ui'),require(_0x4196c5(0x16c)),require(_0x4196c5(0x16e)),require(_0x4196c5(0x12a))):typeof define=='function'&&define[_0x4196c5(0x123)]?define([_0x4196c5(0x126),'@univerjs-pro/collaboration-client',_0x4196c5(0x121),_0x4196c5(0x18f),_0x4196c5(0x199),_0x4196c5(0x16c),_0x4196c5(0x16e),_0x4196c5(0x12a)],_0x186832):(_0x42644c=typeof globalThis<'u'?globalThis:_0x42644c||self,_0x186832(_0x42644c['UniverProThreadCommentDatasource']={},_0x42644c[_0x4196c5(0x15b)],_0x42644c[_0x4196c5(0x179)],_0x42644c[_0x4196c5(0x172)],_0x42644c[_0x4196c5(0x191)],_0x42644c[_0x4196c5(0x17e)],_0x42644c['rxjs'],_0x42644c['UniverNetwork']));}(this,function(_0x4356d4,_0x57ede3,_0x23dd2c,_0x1a3eec,_0x387b75,_0x1ac41c,_0x47b16d,_0x111a10){'use strict';const _0x54ff9a=_0x3563;const _0x312f13='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x484586=(_0x3ff615=>(_0x3ff615[_0x3ff615[_0x54ff9a(0x184)]=0x0]='OpenOrReOpen',_0x3ff615[_0x3ff615['Solved']=0x1]=_0x54ff9a(0x170),_0x3ff615[_0x3ff615['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x3ff615))(_0x484586||{}),_0x5e4060=(_0x1d67bc=>(_0x1d67bc[_0x1d67bc[_0x54ff9a(0x167)]=0x0]=_0x54ff9a(0x167),_0x1d67bc[_0x1d67bc[_0x54ff9a(0x19a)]=0x1]=_0x54ff9a(0x19a),_0x1d67bc[_0x1d67bc[_0x54ff9a(0x146)]=0x2]=_0x54ff9a(0x146),_0x1d67bc[_0x1d67bc[_0x54ff9a(0x175)]=0x3]=_0x54ff9a(0x175),_0x1d67bc[_0x1d67bc['Delete']=0x4]=_0x54ff9a(0x13c),_0x1d67bc[_0x1d67bc[_0x54ff9a(0x188)]=0x5]=_0x54ff9a(0x188),_0x1d67bc[_0x1d67bc[_0x54ff9a(0x18b)]=-0x1]=_0x54ff9a(0x18b),_0x1d67bc))(_0x5e4060||{});const _0x57bc42=_0x479324=>_0x1a3eec['dayjs'](new Date(+_0x479324))[_0x54ff9a(0x11b)]('YYYY/MM/DD\x20HH:mm'),_0x19ef1c=async(_0x1df545,_0x46eb19)=>{const _0x3f6471=_0x54ff9a,_0x4fb019=_0x1df545[_0x3f6471(0x142)](_0x1a3eec['UserManagerService']),_0x553edb=_0x1df545['get'](_0x111a10[_0x3f6471(0x166)]);_0x46eb19[_0x3f6471(0x131)](_0x251d45=>{const _0xb4eda6=_0x3f6471;_0x4fb019[_0xb4eda6(0x15a)](_0x251d45)&&_0x46eb19[_0xb4eda6(0x16a)](_0x251d45);}),_0x46eb19[_0x3f6471(0x124)]&&(await _0x553edb[_0x3f6471(0x142)](_0x3f6471(0x151),{'params':{'userIDs':[..._0x46eb19]}}))['body'][_0x3f6471(0x143)]['forEach'](_0x4dccb0=>{const _0x383c4f=_0x3f6471;_0x4dccb0&&_0x4fb019[_0x383c4f(0x1a1)](_0x4dccb0);});};var _0x1c8fce=Object[_0x54ff9a(0x144)],_0x276a2f=(_0x45606b,_0x5f3886,_0x39838a,_0x119bd1)=>{const _0x4c101a=_0x54ff9a;for(var _0x4cb5fc=_0x119bd1>0x1?void 0x0:_0x119bd1?_0x1c8fce(_0x5f3886,_0x39838a):_0x5f3886,_0x580784=_0x45606b[_0x4c101a(0x192)]-0x1,_0x2ce28a;_0x580784>=0x0;_0x580784--)(_0x2ce28a=_0x45606b[_0x580784])&&(_0x4cb5fc=_0x2ce28a(_0x4cb5fc)||_0x4cb5fc);return _0x4cb5fc;},_0x1b5d06=(_0x187450,_0x5be837)=>(_0x3378f4,_0x3d5d03)=>_0x5be837(_0x3378f4,_0x3d5d03,_0x187450);let _0x415376=class extends _0x1a3eec[_0x54ff9a(0x134)]{constructor(_0x5cb1ea,_0x1f249e,_0x9a1eac,_0x2efc86){const _0xcd84e5=_0x54ff9a;super(),this[_0xcd84e5(0x18c)]=_0x5cb1ea,this['_threadCommentModel']=_0x1f249e,this['_userService']=_0x9a1eac,this[_0xcd84e5(0x137)]=_0x2efc86,this['_init'](),this[_0xcd84e5(0x12e)]();}[_0x54ff9a(0x12e)](){const _0x1438e8=_0x54ff9a;this[_0x1438e8(0x153)](this[_0x1438e8(0x189)][_0x1438e8(0x13b)][_0x1438e8(0x17f)](_0x47b16d[_0x1438e8(0x132)](0x10))['subscribe'](_0x28f7c2=>{const _0x2b77b2=new Set();_0x28f7c2['forEach'](_0x4ac0a7=>{const _0x10902e=_0x3563;switch(_0x4ac0a7[_0x10902e(0x15d)]){case'add':{const _0x1cdbb1=_0x4ac0a7[_0x10902e(0x14c)]['personId'];_0x2b77b2[_0x10902e(0x194)](_0x1cdbb1);break;}}}),_0x19ef1c(this['_injector'],_0x2b77b2);}));}[_0x54ff9a(0x145)](){const _0x29ad7c=_0x54ff9a;this[_0x29ad7c(0x153)](this['_commentService'][_0x29ad7c(0x13b)][_0x29ad7c(0x18e)](async _0x53f64f=>{const _0x483eba=_0x29ad7c;var _0x458827,_0x403b9e,_0x22be36,_0x5df1bb;const _0x1efb05=(_0x458827=this[_0x483eba(0x189)][_0x483eba(0x19d)](_0x53f64f[_0x483eba(0x149)])[_0x483eba(0x185)](_0x407067=>_0x407067[_0x483eba(0x171)]===_0x53f64f[_0x483eba(0x171)]))==null?void 0x0:_0x458827[_0x483eba(0x122)];if(!_0x1efb05)return;const {unitId:_0x334b7e,subUnitId:_0x5edc04}=_0x1efb05;switch(_0x53f64f[_0x483eba(0x161)]&&this[_0x483eba(0x197)][_0x483eba(0x1a1)](_0x53f64f[_0x483eba(0x161)]),_0x53f64f[_0x483eba(0x15d)]){case _0x5e4060[_0x483eba(0x19a)]:break;case _0x5e4060[_0x483eba(0x146)]:{this[_0x483eba(0x189)]['addComment'](_0x334b7e,_0x5edc04,{'unitId':_0x334b7e,'subUnitId':_0x5edc04,'ref':'','id':_0x53f64f['replyId'],'dT':_0x57bc42(+_0x53f64f[_0x483eba(0x19e)]),'threadId':_0x53f64f[_0x483eba(0x171)],'personId':(_0x22be36=(_0x403b9e=_0x53f64f[_0x483eba(0x161)])==null?void 0x0:_0x403b9e[_0x483eba(0x13e)])!=null?_0x22be36:_0x53f64f['userId'],'text':JSON[_0x483eba(0x19b)](_0x53f64f[_0x483eba(0x19c)]),'parentId':_0x1efb05['id']});break;}case _0x5e4060[_0x483eba(0x13c)]:{const _0x3f1d12=this[_0x483eba(0x189)][_0x483eba(0x12b)](_0x334b7e,_0x5edc04,_0x53f64f[_0x483eba(0x15c)]);_0x3f1d12&&_0x3f1d12[_0x483eba(0x195)]&&this['_threadCommentModel']['deleteComment'](_0x334b7e,_0x5edc04,_0x53f64f[_0x483eba(0x15c)]);break;}case _0x5e4060[_0x483eba(0x175)]:{this[_0x483eba(0x189)]['updateComment'](_0x334b7e,_0x5edc04,{'commentId':_0x53f64f[_0x483eba(0x15c)],'text':JSON['parse'](_0x53f64f[_0x483eba(0x19c)])});break;}case _0x5e4060[_0x483eba(0x188)]:{const _0x5de41c=(_0x5df1bb=this[_0x483eba(0x189)][_0x483eba(0x19d)](_0x53f64f[_0x483eba(0x149)])[_0x483eba(0x185)](_0x4622e1=>_0x4622e1['threadId']===_0x53f64f[_0x483eba(0x171)]))==null?void 0x0:_0x5df1bb['root'];_0x5de41c&&this[_0x483eba(0x189)]['resolveComment'](_0x334b7e,_0x5edc04,_0x5de41c['id'],_0x53f64f[_0x483eba(0x11f)]===_0x484586[_0x483eba(0x170)]);break;}}}));}};_0x415376=_0x276a2f([_0x1b5d06(0x0,_0x1a3eec[_0x54ff9a(0x187)](_0x57ede3[_0x54ff9a(0x16d)])),_0x1b5d06(0x1,_0x1a3eec[_0x54ff9a(0x187)](_0x1ac41c['ThreadCommentModel'])),_0x1b5d06(0x2,_0x1a3eec['Inject'](_0x1a3eec[_0x54ff9a(0x16b)])),_0x1b5d06(0x3,_0x1a3eec['Inject'](_0x1a3eec[_0x54ff9a(0x140)]))],_0x415376);const _0x163bb3='thread-comment-data-source.config',_0x3b344e={};var _0x509b79=Object[_0x54ff9a(0x144)],_0x2a7d4b=(_0x2f64dc,_0x2157a7,_0x3cfab6,_0x100865)=>{const _0x568d4f=_0x54ff9a;for(var _0x984a49=_0x100865>0x1?void 0x0:_0x100865?_0x509b79(_0x2157a7,_0x3cfab6):_0x2157a7,_0x2000cf=_0x2f64dc[_0x568d4f(0x192)]-0x1,_0x21cab0;_0x2000cf>=0x0;_0x2000cf--)(_0x21cab0=_0x2f64dc[_0x2000cf])&&(_0x984a49=_0x21cab0(_0x984a49)||_0x984a49);return _0x984a49;},_0x170555=(_0x45228f,_0x257c38)=>(_0x59ffc7,_0x1e0ba0)=>_0x257c38(_0x59ffc7,_0x1e0ba0,_0x45228f);function _0x1d0b8d(_0xd1db15,_0x539d69){const _0x17734c=_0x54ff9a,_0x3073bc=_0xd1db15[_0x17734c(0x136)][0x0];return{..._0x539d69,'id':_0x3073bc[_0x17734c(0x15c)],'resolved':_0xd1db15[_0x17734c(0x11f)]===0x1,'dT':_0x57bc42(_0x3073bc[_0x17734c(0x19e)]),'personId':_0x3073bc['userId'],'threadId':_0x3073bc[_0x17734c(0x171)]};}function _0x49c300(_0x392df8,_0x4b5949,_0x5939e6){const _0x74b241=_0x54ff9a;var _0x2a4697,_0x409883;if(((_0x409883=(_0x2a4697=_0x392df8==null?void 0x0:_0x392df8['replies'])==null?void 0x0:_0x2a4697[_0x74b241(0x192)])!=null?_0x409883:0x0)>0x0){const _0x2b20e1=(_0x5cc7a5,_0x40390d)=>({'id':_0x5cc7a5[_0x74b241(0x15c)],'threadId':_0x5cc7a5[_0x74b241(0x171)],'dT':_0x57bc42(_0x5cc7a5[_0x74b241(0x19e)]),'personId':_0x5cc7a5[_0x74b241(0x17b)],'resolved':_0x392df8['solved']===_0x484586[_0x74b241(0x170)],'unitId':_0x4b5949,'subUnitId':_0x5939e6,'text':JSON[_0x74b241(0x19b)](_0x5cc7a5[_0x74b241(0x19c)]),'parentId':_0x40390d}),_0x865f3d=_0x2b20e1(_0x392df8['replies'][0x0]);return{..._0x865f3d,'children':_0x392df8[_0x74b241(0x136)][_0x74b241(0x193)](0x1)[_0x74b241(0x178)](_0x328f85=>_0x2b20e1(_0x328f85,_0x865f3d['id']))};}return null;}let _0x178f16=class{constructor(_0xbc9869,_0x1f98d3,_0x2f62d2,_0x31b0d9){const _0x23107c=_0x54ff9a;this[_0x23107c(0x154)]=_0xbc9869,this[_0x23107c(0x197)]=_0x1f98d3,this[_0x23107c(0x160)]=_0x2f62d2,this['_injector']=_0x31b0d9;}async[_0x54ff9a(0x119)](_0xf451e1){const _0xbc620=_0x54ff9a;var _0x46ca60,_0x210ce6;const {parentId:_0x265309,unitId:_0x247b85,text:_0x4aac96,threadId:_0x46f97a}=_0xf451e1,_0xea42d1=(_0x210ce6=(_0x46ca60=_0x4aac96[_0xbc620(0x138)])==null?void 0x0:_0x46ca60[_0xbc620(0x135)](_0x262b14=>_0x262b14[_0xbc620(0x150)]===_0x1a3eec[_0xbc620(0x1a0)]['COMMENT'])[_0xbc620(0x178)](_0x1c9498=>_0x1c9498[_0xbc620(0x163)]))!=null?_0x210ce6:[],_0x1f0504=JSON[_0xbc620(0x164)](_0x4aac96),_0x21be1b=(await this[_0xbc620(0x160)]['requireSession'](_0x247b85))[_0xbc620(0x11e)]();if(_0x265309){const _0x4d3106={'memberId':_0x21be1b,'unitId':_0x247b85,'content':_0x1f0504,'mention':_0xea42d1,'threadId':_0x46f97a},_0x4220f7=(await this['_httpService'][_0xbc620(0x12c)](_0xbc620(0x147)+_0x247b85+_0xbc620(0x14e),{'body':_0x4d3106}))[_0xbc620(0x17a)][_0xbc620(0x14f)];return{..._0xf451e1,'id':_0x4220f7['replyId'],'dT':_0x1a3eec[_0xbc620(0x148)](+_0x4220f7[_0xbc620(0x19e)])[_0xbc620(0x11b)](_0xbc620(0x174)),'personId':_0x4220f7[_0xbc620(0x17b)]};}else{const _0x4ebb12={'memberId':_0x21be1b,'unitId':_0x247b85,'content':_0x1f0504,'mention':_0xea42d1},_0x19d80d=await this[_0xbc620(0x154)]['post'](_0xbc620(0x147)+_0x247b85+_0xbc620(0x165),{'body':_0x4ebb12});return _0x1d0b8d(_0x19d80d[_0xbc620(0x17a)]['comment'],_0xf451e1);}}async[_0x54ff9a(0x129)](_0xc43afe){const _0x15361e=_0x54ff9a;var _0x46b271,_0x12de5b;const {text:_0x5c0737,unitId:_0xbfb042}=_0xc43afe,_0x5a3c93=(_0x12de5b=(_0x46b271=_0x5c0737[_0x15361e(0x138)])==null?void 0x0:_0x46b271['filter'](_0x277262=>_0x277262[_0x15361e(0x150)]===_0x1a3eec['CustomRangeType'][_0x15361e(0x14b)])[_0x15361e(0x178)](_0x327df2=>_0x327df2[_0x15361e(0x163)]))!=null?_0x12de5b:[],_0x736795=JSON[_0x15361e(0x164)](_0x5c0737),_0x50ecf0=_0xc43afe[_0x15361e(0x171)],_0x55a228=_0xc43afe['id'],_0x34b35f={'memberId':(await this[_0x15361e(0x160)][_0x15361e(0x196)](_0xbfb042))[_0x15361e(0x11e)](),'unitId':_0xbfb042,'threadId':_0x50ecf0,'mention':_0x5a3c93,'content':_0x736795,'replyId':_0x55a228},_0x366de8=await this[_0x15361e(0x154)][_0x15361e(0x12c)](_0x15361e(0x147)+_0xbfb042+_0x15361e(0x11d),{'body':_0x34b35f});return!_0x366de8[_0x15361e(0x17a)][_0x15361e(0x158)]||_0x366de8[_0x15361e(0x17a)][_0x15361e(0x158)]['code']===0x1;}async[_0x54ff9a(0x198)](_0x43a5b1){const _0x362f68=_0x54ff9a,{unitId:_0x42a82d}=_0x43a5b1,_0x3fbf26=_0x43a5b1[_0x362f68(0x171)],_0x586984={'memberId':this[_0x362f68(0x197)][_0x362f68(0x125)]()[_0x362f68(0x13e)],'unitId':_0x42a82d,'threadId':_0x3fbf26,'solved':_0x43a5b1['resolved']?_0x484586['Solved']:_0x484586['OpenOrReOpen']},_0x21afeb=await this[_0x362f68(0x154)][_0x362f68(0x12c)](_0x362f68(0x147)+_0x42a82d+'/solved',{'body':_0x586984});return!_0x21afeb[_0x362f68(0x17a)][_0x362f68(0x158)]||_0x21afeb['body'][_0x362f68(0x158)][_0x362f68(0x17c)]===0x1;}async[_0x54ff9a(0x13a)](_0x12d1de,_0x4d3d9d,_0x3e716e,_0x9d1428){const _0x94bfb0=_0x54ff9a,_0x47884c={'memberId':(await this[_0x94bfb0(0x160)][_0x94bfb0(0x196)](_0x12d1de))[_0x94bfb0(0x11e)](),'threadId':_0x3e716e,'replyId':_0x9d1428,'unitId':_0x12d1de},_0x526c73=await this['_httpService'][_0x94bfb0(0x12c)](_0x94bfb0(0x147)+_0x12d1de+_0x94bfb0(0x16f),{'body':_0x47884c});return!_0x526c73[_0x94bfb0(0x17a)]['error']||_0x526c73[_0x94bfb0(0x17a)][_0x94bfb0(0x158)][_0x94bfb0(0x17c)]===0x1;}async[_0x54ff9a(0x15f)](_0x2e8aad,_0x52ed14,_0x224fbf){const _0x4b7a34=_0x54ff9a,_0x55a4bc={'unitId':_0x2e8aad,'threadId':_0x224fbf},_0xada793=await this[_0x4b7a34(0x154)]['post'](_0x4b7a34(0x147)+_0x2e8aad+_0x4b7a34(0x180),{'body':_0x55a4bc}),_0x54c04e=_0x224fbf[_0x4b7a34(0x178)](_0x33e924=>_0x49c300(_0xada793[_0x4b7a34(0x17a)][_0x4b7a34(0x155)][_0x33e924],_0x2e8aad,_0x52ed14))[_0x4b7a34(0x135)](Boolean);return Object[_0x4b7a34(0x190)](_0xada793[_0x4b7a34(0x17a)][_0x4b7a34(0x143)])[_0x4b7a34(0x131)](_0x3f811e=>{const _0x4839f9=_0x4b7a34;this[_0x4839f9(0x197)][_0x4839f9(0x1a1)](_0x3f811e);}),_0x54c04e;}[_0x54ff9a(0x18a)](_0x536e28){const _0x21d60e=_0x54ff9a;return{'id':_0x536e28['id'],'threadId':_0x536e28[_0x21d60e(0x171)],'ref':_0x536e28[_0x21d60e(0x181)]};}};_0x178f16=_0x2a7d4b([_0x170555(0x0,_0x1a3eec['Inject'](_0x111a10[_0x54ff9a(0x166)])),_0x170555(0x1,_0x1a3eec[_0x54ff9a(0x187)](_0x1a3eec[_0x54ff9a(0x16b)])),_0x170555(0x2,_0x1a3eec[_0x54ff9a(0x187)](_0x57ede3[_0x54ff9a(0x183)])),_0x170555(0x3,_0x1a3eec[_0x54ff9a(0x187)](_0x1a3eec[_0x54ff9a(0x140)]))],_0x178f16);var _0x2ecc0b=Object[_0x54ff9a(0x144)],_0x34f39d=(_0x16c1f8,_0x1c1e81,_0x40dffa,_0x40b90f)=>{for(var _0x4407f4=_0x40b90f>0x1?void 0x0:_0x40b90f?_0x2ecc0b(_0x1c1e81,_0x40dffa):_0x1c1e81,_0x581811=_0x16c1f8['length']-0x1,_0x5b6295;_0x581811>=0x0;_0x581811--)(_0x5b6295=_0x16c1f8[_0x581811])&&(_0x4407f4=_0x5b6295(_0x4407f4)||_0x4407f4);return _0x4407f4;},_0x8a9c1b=(_0x4822a4,_0x26dae3)=>(_0x5010e6,_0x4d20d0)=>_0x26dae3(_0x5010e6,_0x4d20d0,_0x4822a4);let _0x3f38ed=class extends _0x1a3eec[_0x54ff9a(0x134)]{constructor(_0x18e9e7,_0x571dce){const _0xd97f33=_0x54ff9a;super(),this['_threadCommentDataSourceService']=_0x18e9e7,this[_0xd97f33(0x173)]=_0x571dce,this[_0xd97f33(0x168)]();}[_0x54ff9a(0x168)](){const _0x5dd4c7=_0x54ff9a;this[_0x5dd4c7(0x169)]['dataSource']=this[_0x5dd4c7(0x173)],this[_0x5dd4c7(0x169)][_0x5dd4c7(0x176)]=!0x1;}};_0x3f38ed=_0x34f39d([_0x8a9c1b(0x0,_0x1ac41c[_0x54ff9a(0x12d)]),_0x8a9c1b(0x1,_0x1a3eec[_0x54ff9a(0x187)](_0x178f16))],_0x3f38ed);var _0x335069=Object['defineProperty'],_0x1f0cd4=Object['getOwnPropertyDescriptor'],_0x247c1a=(_0x3b7c04,_0x1b2606,_0x7aba86)=>_0x1b2606 in _0x3b7c04?_0x335069(_0x3b7c04,_0x1b2606,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x7aba86}):_0x3b7c04[_0x1b2606]=_0x7aba86,_0x21cde3=(_0x2c5852,_0x54d285,_0x362d78,_0xf6fb5)=>{const _0x37f9b4=_0x54ff9a;for(var _0x4a05ad=_0xf6fb5>0x1?void 0x0:_0xf6fb5?_0x1f0cd4(_0x54d285,_0x362d78):_0x54d285,_0x5802fa=_0x2c5852[_0x37f9b4(0x192)]-0x1,_0x267d42;_0x5802fa>=0x0;_0x5802fa--)(_0x267d42=_0x2c5852[_0x5802fa])&&(_0x4a05ad=_0x267d42(_0x4a05ad)||_0x4a05ad);return _0x4a05ad;},_0x52a6ef=(_0x1b0364,_0x5c0ddb)=>(_0xcfa587,_0x21bdf2)=>_0x5c0ddb(_0xcfa587,_0x21bdf2,_0x1b0364),_0xb5282f=(_0x53c3c2,_0x55100a,_0x591ea5)=>_0x247c1a(_0x53c3c2,typeof _0x55100a!='symbol'?_0x55100a+'':_0x55100a,_0x591ea5);_0x4356d4[_0x54ff9a(0x141)]=class extends _0x1a3eec[_0x54ff9a(0x19f)]{constructor(_0x4e9b50=_0x3b344e,_0x3c5315,_0x44a5c2){const _0x4d85b0=_0x54ff9a;super(),this[_0x4d85b0(0x120)]=_0x4e9b50,this[_0x4d85b0(0x137)]=_0x3c5315,this[_0x4d85b0(0x14a)]=_0x44a5c2;const {..._0x50ad4a}=_0x1a3eec[_0x4d85b0(0x15e)]({},_0x3b344e,this[_0x4d85b0(0x120)]);this['_configService'][_0x4d85b0(0x14d)](_0x163bb3,_0x50ad4a);}['onStarting'](){const _0x359698=_0x54ff9a;[[_0x178f16],[_0x3f38ed],[_0x415376]][_0x359698(0x131)](_0x25c887=>{const _0x5791d5=_0x359698;this[_0x5791d5(0x137)][_0x5791d5(0x194)](_0x25c887);});}['onReady'](){const _0x3edc80=_0x54ff9a;this['_injector'][_0x3edc80(0x142)](_0x3f38ed),this[_0x3edc80(0x137)][_0x3edc80(0x142)](_0x415376);}},_0xb5282f(_0x4356d4['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x312f13),_0xb5282f(_0x4356d4[_0x54ff9a(0x141)],_0x54ff9a(0x15d),_0x1a3eec[_0x54ff9a(0x11a)]['UNIVER_UNKNOWN']),_0x4356d4[_0x54ff9a(0x141)]=_0x21cde3([_0x1a3eec['DependentOn'](_0x387b75[_0x54ff9a(0x156)],_0x57ede3['UniverCollaborationClientPlugin'],_0x23dd2c['UniverLicensePlugin']),_0x52a6ef(0x1,_0x1a3eec[_0x54ff9a(0x187)](_0x1a3eec[_0x54ff9a(0x140)])),_0x52a6ef(0x2,_0x1a3eec[_0x54ff9a(0x162)])],_0x4356d4['UniverThreadCommentDataSourcePlugin']),Object[_0x54ff9a(0x17d)](_0x4356d4,Symbol[_0x54ff9a(0x186)],{'value':_0x54ff9a(0x18d)});}));function _0x3563(_0x1ec659,_0x4c5a49){const _0x45bc6c=_0x45bc();return _0x3563=function(_0x356306,_0x5f1a7e){_0x356306=_0x356306-0x119;let _0x2379db=_0x45bc6c[_0x356306];return _0x2379db;},_0x3563(_0x1ec659,_0x4c5a49);}function _0x45bc(){const _0x1c2881=['3616VlXgnJ','map','UniverProLicense','body','userId','code','defineProperty','UniverThreadComment','pipe','/list','ref','740046eRuNzT','CollaborationSessionService','OpenOrReOpen','find','toStringTag','Inject','Solve','_threadCommentModel','saveCommentToSnapshot','UNRECOGNIZED','_commentService','Module','subscribe','@univerjs/core','values','UniverThreadCommentUi','length','slice','add','parentId','requireSession','_userService','resolveComment','@univerjs/thread-comment-ui','Add','parse','content','getUnit','createTimestamp','Plugin','CustomRangeType','addUser','addComment','UniverInstanceType','format','1055110vmTlFw','/edit','getMemberID','solved','_config','@univerjs-pro/license','root','amd','size','getCurrentUser','exports','774860LIVNoy','1gYEBgM','updateComment','@univerjs/network','getComment','post','IThreadCommentDataSourceService','_initUserSync','311013dgihtV','12jpMQbC','forEach','bufferTime','136QkuuOd','Disposable','filter','replies','_injector','customRanges','1500KXWArA','deleteComment','commentUpdate$','Delete','2907415LOtOBI','userID','@univerjs-pro/collaboration-client','Injector','UniverThreadCommentDataSourcePlugin','get','users','getOwnPropertyDescriptor','_init','Reply','/universer-api/comment/unit/','dayjs','unitId','_configService','COMMENT','payload','setConfig','/reply','reply','rangeType','/universer-api/user/list','6489098bPhkJo','disposeWithMe','_httpService','comments','UniverThreadCommentUIPlugin','object','error','6ySGsQt','getUser','UniverProCollaborationClient','replyId','type','merge','listComments','_sessionService','user','IConfigService','rangeId','stringify','/add','HTTPService','Unknown','_initDataSource','_threadCommentDataSourceService','delete','UserManagerService','@univerjs/thread-comment','CommentService','rxjs','/delete','Solved','threadId','UniverCore','_threadCommentDataSource','YYYY/MM/DD\x20HH:mm','Edit','syncUpdateMutationToColla'];_0x45bc=function(){return _0x1c2881;};return _0x45bc();}
1
+ function _0x5c2a(_0x19a6ae,_0x5c71cb){const _0x549ba8=_0x549b();return _0x5c2a=function(_0x5c2a83,_0x57d9c0){_0x5c2a83=_0x5c2a83-0x1e9;let _0x4e035a=_0x549ba8[_0x5c2a83];return _0x4e035a;},_0x5c2a(_0x19a6ae,_0x5c71cb);}(function(_0x32d4c2,_0x31dd43){const _0x159e11=_0x5c2a,_0x19d29d=_0x32d4c2();while(!![]){try{const _0x468824=parseInt(_0x159e11(0x264))/0x1*(-parseInt(_0x159e11(0x22a))/0x2)+parseInt(_0x159e11(0x252))/0x3*(parseInt(_0x159e11(0x235))/0x4)+-parseInt(_0x159e11(0x1ea))/0x5*(parseInt(_0x159e11(0x1f6))/0x6)+parseInt(_0x159e11(0x1f9))/0x7*(parseInt(_0x159e11(0x20e))/0x8)+-parseInt(_0x159e11(0x236))/0x9*(parseInt(_0x159e11(0x1f0))/0xa)+parseInt(_0x159e11(0x26b))/0xb*(parseInt(_0x159e11(0x229))/0xc)+parseInt(_0x159e11(0x24b))/0xd*(parseInt(_0x159e11(0x231))/0xe);if(_0x468824===_0x31dd43)break;else _0x19d29d['push'](_0x19d29d['shift']());}catch(_0x12f06c){_0x19d29d['push'](_0x19d29d['shift']());}}}(_0x549b,0xd676d),function(_0x128ed0,_0x509d68){const _0x494867=_0x5c2a;typeof exports==_0x494867(0x222)&&typeof module<'u'?_0x509d68(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==_0x494867(0x230)&&define[_0x494867(0x1fa)]?define([_0x494867(0x261),_0x494867(0x24d),'@univerjs-pro/license',_0x494867(0x20b),_0x494867(0x22d),_0x494867(0x20a),_0x494867(0x218),_0x494867(0x246)],_0x509d68):(_0x128ed0=typeof globalThis<'u'?globalThis:_0x128ed0||self,_0x509d68(_0x128ed0[_0x494867(0x1ec)]={},_0x128ed0['UniverProCollaborationClient'],_0x128ed0['UniverProLicense'],_0x128ed0[_0x494867(0x26f)],_0x128ed0[_0x494867(0x233)],_0x128ed0[_0x494867(0x25a)],_0x128ed0[_0x494867(0x218)],_0x128ed0[_0x494867(0x216)]));}(this,function(_0x1d62b6,_0x92ed58,_0x1ff71c,_0x29f4a9,_0x351f90,_0x572169,_0x358b88,_0x504172){'use strict';const _0x2181ea=_0x5c2a;const _0x5802bb=_0x2181ea(0x258);var _0x4eba9b=(_0x24f219=>(_0x24f219[_0x24f219['OpenOrReOpen']=0x0]=_0x2181ea(0x247),_0x24f219[_0x24f219[_0x2181ea(0x23e)]=0x1]=_0x2181ea(0x23e),_0x24f219[_0x24f219[_0x2181ea(0x1fd)]=-0x1]=_0x2181ea(0x1fd),_0x24f219))(_0x4eba9b||{}),_0x1cedac=(_0x2ad95e=>(_0x2ad95e[_0x2ad95e[_0x2181ea(0x243)]=0x0]=_0x2181ea(0x243),_0x2ad95e[_0x2ad95e['Add']=0x1]=_0x2181ea(0x267),_0x2ad95e[_0x2ad95e[_0x2181ea(0x253)]=0x2]=_0x2181ea(0x253),_0x2ad95e[_0x2ad95e[_0x2181ea(0x21a)]=0x3]=_0x2181ea(0x21a),_0x2ad95e[_0x2ad95e[_0x2181ea(0x241)]=0x4]=_0x2181ea(0x241),_0x2ad95e[_0x2ad95e['Solve']=0x5]=_0x2181ea(0x232),_0x2ad95e[_0x2ad95e['UNRECOGNIZED']=-0x1]=_0x2181ea(0x1fd),_0x2ad95e))(_0x1cedac||{});const _0x94ca74=_0x49658f=>_0x29f4a9[_0x2181ea(0x250)](new Date(+_0x49658f))[_0x2181ea(0x255)](_0x2181ea(0x256)),_0x22260a=async(_0x29b179,_0x470679)=>{const _0x42f388=_0x2181ea,_0x58698c=_0x29b179[_0x42f388(0x217)](_0x29f4a9['UserManagerService']),_0x4f24cb=_0x29b179[_0x42f388(0x217)](_0x504172['HTTPService']);_0x470679[_0x42f388(0x21b)](_0x5e33ac=>{const _0x63e98b=_0x42f388;_0x58698c[_0x63e98b(0x209)](_0x5e33ac)&&_0x470679[_0x63e98b(0x1fb)](_0x5e33ac);}),_0x470679[_0x42f388(0x20f)]&&(await _0x4f24cb[_0x42f388(0x217)](_0x42f388(0x238),{'params':{'userIDs':[..._0x470679]}}))[_0x42f388(0x1f5)][_0x42f388(0x210)]['forEach'](_0x1ef3a0=>{const _0x465293=_0x42f388;_0x1ef3a0&&_0x58698c[_0x465293(0x251)](_0x1ef3a0);});};var _0xa199d1=Object[_0x2181ea(0x237)],_0x417a9f=(_0x19811a,_0x2c76bd,_0x2b59fd,_0x442595)=>{const _0xbd4cc2=_0x2181ea;for(var _0xb3e3b8=_0x442595>0x1?void 0x0:_0x442595?_0xa199d1(_0x2c76bd,_0x2b59fd):_0x2c76bd,_0x7c2fe2=_0x19811a[_0xbd4cc2(0x1fe)]-0x1,_0x13bc50;_0x7c2fe2>=0x0;_0x7c2fe2--)(_0x13bc50=_0x19811a[_0x7c2fe2])&&(_0xb3e3b8=_0x13bc50(_0xb3e3b8)||_0xb3e3b8);return _0xb3e3b8;},_0x33df37=(_0x899cc3,_0x2d5347)=>(_0x3b1d9b,_0x521f98)=>_0x2d5347(_0x3b1d9b,_0x521f98,_0x899cc3);let _0x38bae6=class extends _0x29f4a9[_0x2181ea(0x21c)]{constructor(_0x52f176,_0x15033c,_0x237f76,_0x1fdd7f){const _0x1bb706=_0x2181ea;super(),this[_0x1bb706(0x1f1)]=_0x52f176,this[_0x1bb706(0x23a)]=_0x15033c,this[_0x1bb706(0x21d)]=_0x237f76,this[_0x1bb706(0x221)]=_0x1fdd7f,this[_0x1bb706(0x201)](),this[_0x1bb706(0x25d)]();}[_0x2181ea(0x25d)](){const _0x47268f=_0x2181ea;this[_0x47268f(0x224)](this[_0x47268f(0x23a)]['commentUpdate$'][_0x47268f(0x244)](_0x358b88[_0x47268f(0x257)](0x10))[_0x47268f(0x259)](_0x688417=>{const _0x5b7746=_0x47268f,_0x5ffede=new Set();_0x688417[_0x5b7746(0x21b)](_0x4e917d=>{const _0x17bd38=_0x5b7746;switch(_0x4e917d['type']){case _0x17bd38(0x223):{const _0x10971b=_0x4e917d[_0x17bd38(0x21e)][_0x17bd38(0x26c)];_0x5ffede[_0x17bd38(0x223)](_0x10971b);break;}}}),_0x22260a(this[_0x5b7746(0x221)],_0x5ffede);}));}[_0x2181ea(0x201)](){const _0x5b1385=_0x2181ea;this['disposeWithMe'](this[_0x5b1385(0x1f1)][_0x5b1385(0x266)][_0x5b1385(0x259)](async _0x1fb90d=>{const _0x59da79=_0x5b1385;var _0x33fc15,_0x4ba6fe,_0x48c111,_0x1b3853;const _0x12f5ba=(_0x33fc15=this[_0x59da79(0x23a)]['getUnit'](_0x1fb90d[_0x59da79(0x228)])[_0x59da79(0x225)](_0x4d28d3=>_0x4d28d3[_0x59da79(0x1fc)]===_0x1fb90d[_0x59da79(0x1fc)]))==null?void 0x0:_0x33fc15[_0x59da79(0x20c)];if(!_0x12f5ba)return;const {unitId:_0x42a6da,subUnitId:_0x360932}=_0x12f5ba;switch(_0x1fb90d['user']&&this['_userService'][_0x59da79(0x251)](_0x1fb90d[_0x59da79(0x248)]),_0x1fb90d[_0x59da79(0x204)]){case _0x1cedac[_0x59da79(0x267)]:break;case _0x1cedac[_0x59da79(0x253)]:{this[_0x59da79(0x23a)]['addComment'](_0x42a6da,_0x360932,{'unitId':_0x42a6da,'subUnitId':_0x360932,'ref':'','id':_0x1fb90d[_0x59da79(0x1f3)],'dT':_0x94ca74(+_0x1fb90d[_0x59da79(0x242)]),'threadId':_0x1fb90d[_0x59da79(0x1fc)],'personId':(_0x48c111=(_0x4ba6fe=_0x1fb90d['user'])==null?void 0x0:_0x4ba6fe[_0x59da79(0x265)])!=null?_0x48c111:_0x1fb90d[_0x59da79(0x1f4)],'text':JSON[_0x59da79(0x254)](_0x1fb90d[_0x59da79(0x26e)]),'parentId':_0x12f5ba['id']});break;}case _0x1cedac[_0x59da79(0x241)]:{const _0x1c0571=this[_0x59da79(0x23a)][_0x59da79(0x1ee)](_0x42a6da,_0x360932,_0x1fb90d['replyId']);_0x1c0571&&_0x1c0571[_0x59da79(0x227)]&&this[_0x59da79(0x23a)][_0x59da79(0x1f7)](_0x42a6da,_0x360932,_0x1fb90d[_0x59da79(0x1f3)]);break;}case _0x1cedac[_0x59da79(0x21a)]:{this[_0x59da79(0x23a)][_0x59da79(0x208)](_0x42a6da,_0x360932,{'commentId':_0x1fb90d['replyId'],'text':JSON['parse'](_0x1fb90d[_0x59da79(0x26e)])});break;}case _0x1cedac[_0x59da79(0x232)]:{const _0x37d329=(_0x1b3853=this['_threadCommentModel'][_0x59da79(0x25b)](_0x1fb90d[_0x59da79(0x228)])[_0x59da79(0x225)](_0x5286d5=>_0x5286d5[_0x59da79(0x1fc)]===_0x1fb90d[_0x59da79(0x1fc)]))==null?void 0x0:_0x1b3853['root'];_0x37d329&&this[_0x59da79(0x23a)][_0x59da79(0x211)](_0x42a6da,_0x360932,_0x37d329['id'],_0x1fb90d[_0x59da79(0x239)]===_0x4eba9b[_0x59da79(0x23e)]);break;}}}));}};_0x38bae6=_0x417a9f([_0x33df37(0x0,_0x29f4a9['Inject'](_0x92ed58[_0x2181ea(0x203)])),_0x33df37(0x1,_0x29f4a9[_0x2181ea(0x249)](_0x572169[_0x2181ea(0x1e9)])),_0x33df37(0x2,_0x29f4a9[_0x2181ea(0x249)](_0x29f4a9['UserManagerService'])),_0x33df37(0x3,_0x29f4a9[_0x2181ea(0x249)](_0x29f4a9[_0x2181ea(0x21f)]))],_0x38bae6);const _0x5de7e5='thread-comment-data-source.config',_0x2d364e={};var _0x4de006=Object['getOwnPropertyDescriptor'],_0x5e8d77=(_0x5700fc,_0x28f6dc,_0x35a64f,_0x21ae9e)=>{const _0x4069e9=_0x2181ea;for(var _0x5aab52=_0x21ae9e>0x1?void 0x0:_0x21ae9e?_0x4de006(_0x28f6dc,_0x35a64f):_0x28f6dc,_0x47db0f=_0x5700fc[_0x4069e9(0x1fe)]-0x1,_0x38bff5;_0x47db0f>=0x0;_0x47db0f--)(_0x38bff5=_0x5700fc[_0x47db0f])&&(_0x5aab52=_0x38bff5(_0x5aab52)||_0x5aab52);return _0x5aab52;},_0xf11922=(_0x145db5,_0x5a06a3)=>(_0x262780,_0x46ce68)=>_0x5a06a3(_0x262780,_0x46ce68,_0x145db5);function _0x5ec51e(_0x4b2f02,_0x26839e){const _0x26b1ae=_0x2181ea,_0x55f513=_0x4b2f02[_0x26b1ae(0x24a)][0x0];return{..._0x26839e,'id':_0x55f513[_0x26b1ae(0x1f3)],'resolved':_0x4b2f02[_0x26b1ae(0x239)]===0x1,'dT':_0x94ca74(_0x55f513['createTimestamp']),'personId':_0x55f513[_0x26b1ae(0x1f4)],'threadId':_0x55f513[_0x26b1ae(0x1fc)]};}function _0x4202ff(_0x275bee,_0x4f3085,_0x17c82a){const _0x583550=_0x2181ea;var _0xa56cad,_0x53990c;if(((_0x53990c=(_0xa56cad=_0x275bee==null?void 0x0:_0x275bee['replies'])==null?void 0x0:_0xa56cad[_0x583550(0x1fe)])!=null?_0x53990c:0x0)>0x0){const _0x29ae31=(_0x166ec2,_0x5d9071)=>({'id':_0x166ec2[_0x583550(0x1f3)],'threadId':_0x166ec2[_0x583550(0x1fc)],'dT':_0x94ca74(_0x166ec2[_0x583550(0x242)]),'personId':_0x166ec2[_0x583550(0x1f4)],'resolved':_0x275bee['solved']===_0x4eba9b['Solved'],'unitId':_0x4f3085,'subUnitId':_0x17c82a,'text':JSON[_0x583550(0x254)](_0x166ec2[_0x583550(0x26e)]),'parentId':_0x5d9071}),_0x1b0763=_0x29ae31(_0x275bee[_0x583550(0x24a)][0x0]);return{..._0x1b0763,'children':_0x275bee['replies'][_0x583550(0x234)](0x1)['map'](_0x537efa=>_0x29ae31(_0x537efa,_0x1b0763['id']))};}return null;}let _0x2bea4f=class{constructor(_0x4029b2,_0x2b94b6,_0x360fd3,_0x54c87b){const _0x2050a8=_0x2181ea;this['_httpService']=_0x4029b2,this['_userService']=_0x2b94b6,this[_0x2050a8(0x274)]=_0x360fd3,this[_0x2050a8(0x221)]=_0x54c87b;}async[_0x2181ea(0x214)](_0x2a3c22){const _0xa5e2e7=_0x2181ea;var _0x10e309,_0x3a3714;const {parentId:_0x1c4d6a,unitId:_0x2da87d,text:_0x18da47,threadId:_0x2d63a3}=_0x2a3c22,_0x472936=(_0x3a3714=(_0x10e309=_0x18da47[_0xa5e2e7(0x25f)])==null?void 0x0:_0x10e309[_0xa5e2e7(0x1f2)](_0xf2e544=>_0xf2e544['rangeType']===_0x29f4a9[_0xa5e2e7(0x23f)][_0xa5e2e7(0x1ed)])[_0xa5e2e7(0x268)](_0x33c05b=>_0x33c05b['rangeId']))!=null?_0x3a3714:[],_0x441065=JSON[_0xa5e2e7(0x262)](_0x18da47),_0x2426e2=(await this[_0xa5e2e7(0x274)]['requireSession'](_0x2da87d))['getMemberID']();if(_0x1c4d6a){const _0x36b527={'memberId':_0x2426e2,'unitId':_0x2da87d,'content':_0x441065,'mention':_0x472936,'threadId':_0x2d63a3},_0x527ccd=(await this[_0xa5e2e7(0x24c)][_0xa5e2e7(0x22c)](_0xa5e2e7(0x220)+_0x2da87d+_0xa5e2e7(0x22f),{'body':_0x36b527}))['body']['reply'];return{..._0x2a3c22,'id':_0x527ccd[_0xa5e2e7(0x1f3)],'dT':_0x29f4a9[_0xa5e2e7(0x250)](+_0x527ccd[_0xa5e2e7(0x242)])[_0xa5e2e7(0x255)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x527ccd['userId']};}else{const _0x2c3633={'memberId':_0x2426e2,'unitId':_0x2da87d,'content':_0x441065,'mention':_0x472936},_0xc26a=await this[_0xa5e2e7(0x24c)]['post'](_0xa5e2e7(0x220)+_0x2da87d+_0xa5e2e7(0x269),{'body':_0x2c3633});return _0x5ec51e(_0xc26a['body'][_0xa5e2e7(0x24f)],_0x2a3c22);}}async[_0x2181ea(0x208)](_0x321931){const _0x55e558=_0x2181ea;var _0x328b79,_0x4b9a74;const {text:_0x50276d,unitId:_0x5b618c}=_0x321931,_0x4aee5b=(_0x4b9a74=(_0x328b79=_0x50276d[_0x55e558(0x25f)])==null?void 0x0:_0x328b79[_0x55e558(0x1f2)](_0x214c36=>_0x214c36[_0x55e558(0x202)]===_0x29f4a9[_0x55e558(0x23f)][_0x55e558(0x1ed)])[_0x55e558(0x268)](_0x65f945=>_0x65f945[_0x55e558(0x270)]))!=null?_0x4b9a74:[],_0x549ba5=JSON['stringify'](_0x50276d),_0x3c1d6f=_0x321931['threadId'],_0x2e57a2=_0x321931['id'],_0x421748={'memberId':(await this[_0x55e558(0x274)][_0x55e558(0x1f8)](_0x5b618c))[_0x55e558(0x213)](),'unitId':_0x5b618c,'threadId':_0x3c1d6f,'mention':_0x4aee5b,'content':_0x549ba5,'replyId':_0x2e57a2},_0x4fc6dd=await this[_0x55e558(0x24c)]['post'](_0x55e558(0x220)+_0x5b618c+_0x55e558(0x207),{'body':_0x421748});return!_0x4fc6dd[_0x55e558(0x1f5)][_0x55e558(0x272)]||_0x4fc6dd[_0x55e558(0x1f5)]['error']['code']===0x1;}async[_0x2181ea(0x211)](_0x460dae){const _0x36e2bd=_0x2181ea,{unitId:_0x506021}=_0x460dae,_0x3ea2fb=_0x460dae[_0x36e2bd(0x1fc)],_0x27ab46={'memberId':this[_0x36e2bd(0x21d)]['getCurrentUser']()[_0x36e2bd(0x265)],'unitId':_0x506021,'threadId':_0x3ea2fb,'solved':_0x460dae[_0x36e2bd(0x1ef)]?_0x4eba9b['Solved']:_0x4eba9b[_0x36e2bd(0x247)]},_0x419fd9=await this[_0x36e2bd(0x24c)][_0x36e2bd(0x22c)](_0x36e2bd(0x220)+_0x506021+'/solved',{'body':_0x27ab46});return!_0x419fd9['body'][_0x36e2bd(0x272)]||_0x419fd9[_0x36e2bd(0x1f5)][_0x36e2bd(0x272)][_0x36e2bd(0x205)]===0x1;}async['deleteComment'](_0x4ab337,_0x3be897,_0x5d81cf,_0x43bc5b){const _0x188334=_0x2181ea,_0x2dc15a={'memberId':(await this[_0x188334(0x274)]['requireSession'](_0x4ab337))['getMemberID'](),'threadId':_0x5d81cf,'replyId':_0x43bc5b,'unitId':_0x4ab337},_0x637c30=await this[_0x188334(0x24c)]['post'](_0x188334(0x220)+_0x4ab337+_0x188334(0x260),{'body':_0x2dc15a});return!_0x637c30[_0x188334(0x1f5)][_0x188334(0x272)]||_0x637c30[_0x188334(0x1f5)]['error'][_0x188334(0x205)]===0x1;}async[_0x2181ea(0x219)](_0x368f8b,_0x5db104,_0x4ffc71){const _0x2bb9c7=_0x2181ea,_0x50fb8d={'unitId':_0x368f8b,'threadId':_0x4ffc71},_0x3a8283=await this[_0x2bb9c7(0x24c)][_0x2bb9c7(0x22c)]('/universer-api/comment/unit/'+_0x368f8b+'/list',{'body':_0x50fb8d}),_0x21295b=_0x4ffc71[_0x2bb9c7(0x268)](_0x1f6cab=>_0x4202ff(_0x3a8283['body']['comments'][_0x1f6cab],_0x368f8b,_0x5db104))[_0x2bb9c7(0x1f2)](Boolean);return Object[_0x2bb9c7(0x25c)](_0x3a8283[_0x2bb9c7(0x1f5)][_0x2bb9c7(0x210)])['forEach'](_0x4645ba=>{const _0x341d63=_0x2bb9c7;this[_0x341d63(0x21d)][_0x341d63(0x251)](_0x4645ba);}),_0x21295b;}['saveCommentToSnapshot'](_0x1f2bcf){const _0x1572a5=_0x2181ea;return{'id':_0x1f2bcf['id'],'threadId':_0x1f2bcf['threadId'],'ref':_0x1f2bcf[_0x1572a5(0x26a)]};}};_0x2bea4f=_0x5e8d77([_0xf11922(0x0,_0x29f4a9[_0x2181ea(0x249)](_0x504172[_0x2181ea(0x25e)])),_0xf11922(0x1,_0x29f4a9[_0x2181ea(0x249)](_0x29f4a9['UserManagerService'])),_0xf11922(0x2,_0x29f4a9[_0x2181ea(0x249)](_0x92ed58[_0x2181ea(0x271)])),_0xf11922(0x3,_0x29f4a9[_0x2181ea(0x249)](_0x29f4a9[_0x2181ea(0x21f)]))],_0x2bea4f);var _0x3ad209=Object[_0x2181ea(0x237)],_0x41e847=(_0x50c805,_0x1addaa,_0x50316d,_0x18a259)=>{for(var _0x360b50=_0x18a259>0x1?void 0x0:_0x18a259?_0x3ad209(_0x1addaa,_0x50316d):_0x1addaa,_0x503075=_0x50c805['length']-0x1,_0x4cc08e;_0x503075>=0x0;_0x503075--)(_0x4cc08e=_0x50c805[_0x503075])&&(_0x360b50=_0x4cc08e(_0x360b50)||_0x360b50);return _0x360b50;},_0x53a623=(_0x28920d,_0x48617a)=>(_0x1dc37a,_0x8709d)=>_0x48617a(_0x1dc37a,_0x8709d,_0x28920d);let _0xca5961=class extends _0x29f4a9['Disposable']{constructor(_0x2656d3,_0x106316){const _0x3933ab=_0x2181ea;super(),this['_threadCommentDataSourceService']=_0x2656d3,this[_0x3933ab(0x26d)]=_0x106316,this[_0x3933ab(0x215)]();}[_0x2181ea(0x215)](){const _0x91b79a=_0x2181ea;this[_0x91b79a(0x245)]['dataSource']=this[_0x91b79a(0x26d)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0xca5961=_0x41e847([_0x53a623(0x0,_0x572169[_0x2181ea(0x263)]),_0x53a623(0x1,_0x29f4a9[_0x2181ea(0x249)](_0x2bea4f))],_0xca5961);var _0xdb0ca6=Object[_0x2181ea(0x1ff)],_0x4e93b3=Object[_0x2181ea(0x237)],_0x19f388=(_0x5c95cc,_0x1e1784,_0x549b21)=>_0x1e1784 in _0x5c95cc?_0xdb0ca6(_0x5c95cc,_0x1e1784,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x549b21}):_0x5c95cc[_0x1e1784]=_0x549b21,_0x3acc60=(_0xb4e647,_0xf6971,_0x23ca6f,_0x594ae5)=>{const _0x36f55c=_0x2181ea;for(var _0x5d6332=_0x594ae5>0x1?void 0x0:_0x594ae5?_0x4e93b3(_0xf6971,_0x23ca6f):_0xf6971,_0x439c34=_0xb4e647[_0x36f55c(0x1fe)]-0x1,_0x3f7ab8;_0x439c34>=0x0;_0x439c34--)(_0x3f7ab8=_0xb4e647[_0x439c34])&&(_0x5d6332=_0x3f7ab8(_0x5d6332)||_0x5d6332);return _0x5d6332;},_0x2ef9bd=(_0x21e5a9,_0x2ee03e)=>(_0x2fd1af,_0x186f4c)=>_0x2ee03e(_0x2fd1af,_0x186f4c,_0x21e5a9),_0x4d8a04=(_0x3768e6,_0x3245e0,_0x31d63f)=>_0x19f388(_0x3768e6,typeof _0x3245e0!='symbol'?_0x3245e0+'':_0x3245e0,_0x31d63f);_0x1d62b6[_0x2181ea(0x206)]=class extends _0x29f4a9[_0x2181ea(0x23c)]{constructor(_0x27594a=_0x2d364e,_0x5d67b8,_0x585a6e){const _0x2fc2ce=_0x2181ea;super(),this[_0x2fc2ce(0x24e)]=_0x27594a,this[_0x2fc2ce(0x221)]=_0x5d67b8,this[_0x2fc2ce(0x23b)]=_0x585a6e;const {..._0xbc2e85}=_0x29f4a9['merge']({},_0x2d364e,this[_0x2fc2ce(0x24e)]);this[_0x2fc2ce(0x23b)][_0x2fc2ce(0x226)](_0x5de7e5,_0xbc2e85);}['onStarting'](){const _0x3acbba=_0x2181ea;[[_0x2bea4f],[_0xca5961],[_0x38bae6]][_0x3acbba(0x21b)](_0x5a88b7=>{const _0x12253a=_0x3acbba;this[_0x12253a(0x221)][_0x12253a(0x223)](_0x5a88b7);});}['onReady'](){const _0x35c24f=_0x2181ea;this[_0x35c24f(0x221)][_0x35c24f(0x217)](_0xca5961),this[_0x35c24f(0x221)][_0x35c24f(0x217)](_0x38bae6);}},_0x4d8a04(_0x1d62b6['UniverThreadCommentDataSourcePlugin'],_0x2181ea(0x240),_0x5802bb),_0x4d8a04(_0x1d62b6['UniverThreadCommentDataSourcePlugin'],_0x2181ea(0x204),_0x29f4a9[_0x2181ea(0x200)][_0x2181ea(0x23d)]),_0x1d62b6['UniverThreadCommentDataSourcePlugin']=_0x3acc60([_0x29f4a9[_0x2181ea(0x20d)](_0x351f90[_0x2181ea(0x22b)],_0x92ed58[_0x2181ea(0x1eb)],_0x1ff71c[_0x2181ea(0x22e)]),_0x2ef9bd(0x1,_0x29f4a9['Inject'](_0x29f4a9[_0x2181ea(0x21f)])),_0x2ef9bd(0x2,_0x29f4a9[_0x2181ea(0x273)])],_0x1d62b6['UniverThreadCommentDataSourcePlugin']),Object[_0x2181ea(0x1ff)](_0x1d62b6,Symbol['toStringTag'],{'value':_0x2181ea(0x212)});}));function _0x549b(){const _0x511855=['/delete','exports','stringify','IThreadCommentDataSourceService','783141mIZZcV','userID','commentUpdate$','Add','map','/add','ref','30635WIeZza','personId','_threadCommentDataSource','content','UniverCore','rangeId','CollaborationSessionService','error','IConfigService','_sessionService','ThreadCommentModel','25430eBwnjJ','UniverCollaborationClientPlugin','UniverProThreadCommentDatasource','COMMENT','getComment','resolved','1029580esWUyb','_commentService','filter','replyId','userId','body','1866FPJgVB','deleteComment','requireSession','14pWoJog','amd','delete','threadId','UNRECOGNIZED','length','defineProperty','UniverInstanceType','_init','rangeType','CommentService','type','code','UniverThreadCommentDataSourcePlugin','/edit','updateComment','getUser','@univerjs/thread-comment','@univerjs/core','root','DependentOn','6040432iUQgRY','size','users','resolveComment','Module','getMemberID','addComment','_initDataSource','UniverNetwork','get','rxjs','listComments','Edit','forEach','Disposable','_userService','payload','Injector','/universer-api/comment/unit/','_injector','object','add','disposeWithMe','find','setConfig','parentId','unitId','1188NSzBCk','2WRJLoy','UniverThreadCommentUIPlugin','post','@univerjs/thread-comment-ui','UniverLicensePlugin','/reply','function','24976JjDUrJ','Solve','UniverThreadCommentUi','slice','4XKUimd','18qJuKNZ','getOwnPropertyDescriptor','/universer-api/user/list','solved','_threadCommentModel','_configService','Plugin','UNIVER_UNKNOWN','Solved','CustomRangeType','pluginName','Delete','createTimestamp','Unknown','pipe','_threadCommentDataSourceService','@univerjs/network','OpenOrReOpen','user','Inject','replies','91vpUnJP','_httpService','@univerjs-pro/collaboration-client','_config','comment','dayjs','addUser','4952811ZdaAxm','Reply','parse','format','YYYY/MM/DD\x20HH:mm','bufferTime','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','subscribe','UniverThreadComment','getUnit','values','_initUserSync','HTTPService','customRanges'];_0x549b=function(){return _0x511855;};return _0x549b();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.8.3-nightly.202506271607",
3
+ "version": "0.8.3-nightly.202507010644",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.8.3-nightly.202506271607",
49
- "@univerjs-pro/license": "0.8.3-nightly.202506271607",
48
+ "@univerjs-pro/collaboration-client": "0.8.3-nightly.202507010644",
49
+ "@univerjs-pro/license": "0.8.3-nightly.202507010644",
50
+ "@univerjs/core": "0.8.3-nightly.202507010644",
50
51
  "@univerjs/protocol": "0.1.47-alpha.0",
51
- "@univerjs/network": "0.8.3-nightly.202506271607",
52
- "@univerjs/core": "0.8.3-nightly.202506271607",
53
- "@univerjs/thread-comment": "0.8.3-nightly.202506271607",
54
- "@univerjs/thread-comment-ui": "0.8.3-nightly.202506271607"
52
+ "@univerjs/thread-comment-ui": "0.8.3-nightly.202507010644",
53
+ "@univerjs/network": "0.8.3-nightly.202507010644",
54
+ "@univerjs/thread-comment": "0.8.3-nightly.202507010644"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",