@univerjs-pro/thread-comment-datasource 0.12.4-experimental.20251210-d708bff → 0.12.4-experimental.20251211-e01e32a

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 _0x1888c3=_0x43bd;(function(_0x2ba05b,_0x4bb40b){const _0x3e1b85=_0x43bd,_0x1e4cbd=_0x2ba05b();while(!![]){try{const _0x11a6b7=parseInt(_0x3e1b85(0x115))/0x1*(-parseInt(_0x3e1b85(0xf8))/0x2)+parseInt(_0x3e1b85(0x117))/0x3*(-parseInt(_0x3e1b85(0x14b))/0x4)+parseInt(_0x3e1b85(0x150))/0x5+parseInt(_0x3e1b85(0x111))/0x6*(-parseInt(_0x3e1b85(0x106))/0x7)+-parseInt(_0x3e1b85(0x127))/0x8*(-parseInt(_0x3e1b85(0x167))/0x9)+parseInt(_0x3e1b85(0x118))/0xa*(parseInt(_0x3e1b85(0x124))/0xb)+-parseInt(_0x3e1b85(0x149))/0xc;if(_0x11a6b7===_0x4bb40b)break;else _0x1e4cbd['push'](_0x1e4cbd['shift']());}catch(_0x140c51){_0x1e4cbd['push'](_0x1e4cbd['shift']());}}}(_0x2d3f,0x74d5f));Object[_0x1888c3(0xf6)](exports,Symbol['toStringTag'],{'value':_0x1888c3(0x15d)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x1888c3(0x101);var I=(_0x384f36=>(_0x384f36[_0x384f36[_0x1888c3(0x11b)]=0x0]='OpenOrReOpen',_0x384f36[_0x384f36[_0x1888c3(0x158)]=0x1]=_0x1888c3(0x158),_0x384f36[_0x384f36['UNRECOGNIZED']=-0x1]=_0x1888c3(0xf1),_0x384f36))(I||{}),v=(_0x3ef90b=>(_0x3ef90b[_0x3ef90b[_0x1888c3(0x125)]=0x0]=_0x1888c3(0x125),_0x3ef90b[_0x3ef90b[_0x1888c3(0x162)]=0x1]=_0x1888c3(0x162),_0x3ef90b[_0x3ef90b[_0x1888c3(0x15b)]=0x2]='Reply',_0x3ef90b[_0x3ef90b[_0x1888c3(0x12a)]=0x3]=_0x1888c3(0x12a),_0x3ef90b[_0x3ef90b[_0x1888c3(0x10d)]=0x4]='Delete',_0x3ef90b[_0x3ef90b[_0x1888c3(0x143)]=0x5]=_0x1888c3(0x143),_0x3ef90b[_0x3ef90b[_0x1888c3(0xf1)]=-0x1]=_0x1888c3(0xf1),_0x3ef90b))(v||{});const f=_0x47bdcd=>c[_0x1888c3(0x137)](new Date(+_0x47bdcd))['format'](_0x1888c3(0xfc)),R=async(_0x95942,_0x47576a)=>{const _0x393920=_0x1888c3,_0x5d1200=_0x95942[_0x393920(0x142)](c[_0x393920(0x128)]),_0x27b64d=_0x95942[_0x393920(0x142)](P[_0x393920(0x10b)]);_0x47576a[_0x393920(0x140)](_0x16832c=>{const _0x5f50e4=_0x393920;_0x5d1200[_0x5f50e4(0x13e)](_0x16832c)&&_0x47576a[_0x5f50e4(0x14c)](_0x16832c);}),_0x47576a[_0x393920(0x163)]&&(await _0x27b64d[_0x393920(0x142)](_0x393920(0xfb),{'params':{'userIDs':[..._0x47576a]}}))['body']['users'][_0x393920(0x140)](_0x3963ed=>{_0x3963ed&&_0x5d1200['addUser'](_0x3963ed);});};var $=Object[_0x1888c3(0x116)],E=(_0x45ce24,_0x599d5d,_0x38b08a,_0x7dc6a1)=>{const _0x4ac7ff=_0x1888c3;for(var _0x571d9b=_0x7dc6a1>0x1?void 0x0:_0x7dc6a1?$(_0x599d5d,_0x38b08a):_0x599d5d,_0x9c72ae=_0x45ce24[_0x4ac7ff(0x15a)]-0x1,_0x55b343;_0x9c72ae>=0x0;_0x9c72ae--)(_0x55b343=_0x45ce24[_0x9c72ae])&&(_0x571d9b=_0x55b343(_0x571d9b)||_0x571d9b);return _0x571d9b;},S=(_0x27b5dc,_0x2e39cb)=>(_0x1d5108,_0x47b0c9)=>_0x2e39cb(_0x1d5108,_0x47b0c9,_0x27b5dc);let _=class extends c[_0x1888c3(0x152)]{constructor(_0x712adb,_0x404caf,_0x5a7ed5,_0x49cd83){const _0x5c96c1=_0x1888c3;super(),this['_commentService']=_0x712adb,this[_0x5c96c1(0x107)]=_0x404caf,this[_0x5c96c1(0x155)]=_0x5a7ed5,this['_injector']=_0x49cd83,this[_0x5c96c1(0x130)](),this[_0x5c96c1(0x159)]();}['_initUserSync'](){const _0x443a9d=_0x1888c3;this[_0x443a9d(0xf7)](this['_threadCommentModel'][_0x443a9d(0x120)][_0x443a9d(0x138)](j['bufferTime'](0x10))['subscribe'](_0x1af942=>{const _0x4954d7=_0x443a9d,_0x5d9958=new Set();_0x1af942[_0x4954d7(0x140)](_0x2c19a2=>{const _0x1b4eb6=_0x4954d7;switch(_0x2c19a2[_0x1b4eb6(0x121)]){case _0x1b4eb6(0x119):{const _0x2f7f2d=_0x2c19a2[_0x1b4eb6(0x11a)][_0x1b4eb6(0x11f)];_0x5d9958[_0x1b4eb6(0x119)](_0x2f7f2d);break;}}}),R(this['_injector'],_0x5d9958);}));}['_init'](){const _0x3b9995=_0x1888c3;this[_0x3b9995(0xf7)](this[_0x3b9995(0x123)][_0x3b9995(0x120)][_0x3b9995(0xf0)](async _0x644664=>{const _0x16025a=_0x3b9995;var _0x34a0ba,_0xdb0160,_0x346d56,_0x226f33;const _0x57d2cb=(_0x34a0ba=this[_0x16025a(0x107)][_0x16025a(0x133)](_0x644664['unitId'])[_0x16025a(0x160)](_0x5e8efe=>_0x5e8efe[_0x16025a(0xfe)]===_0x644664[_0x16025a(0xfe)]))==null?void 0x0:_0x34a0ba[_0x16025a(0x144)];if(!_0x57d2cb)return;const {unitId:_0x168825,subUnitId:_0x4e8c45}=_0x57d2cb;switch(_0x644664['user']&&this['_userService']['addUser'](_0x644664['user']),_0x644664['type']){case v[_0x16025a(0x162)]:break;case v['Reply']:{this['_threadCommentModel']['addComment'](_0x168825,_0x4e8c45,{'unitId':_0x168825,'subUnitId':_0x4e8c45,'ref':'','id':_0x644664[_0x16025a(0x164)],'dT':f(+_0x644664['createTimestamp']),'threadId':_0x644664[_0x16025a(0xfe)],'personId':(_0x346d56=(_0xdb0160=_0x644664[_0x16025a(0x13f)])==null?void 0x0:_0xdb0160[_0x16025a(0x161)])!=null?_0x346d56:_0x644664[_0x16025a(0x153)],'text':JSON['parse'](_0x644664[_0x16025a(0xfd)]),'parentId':_0x57d2cb['id']});break;}case v[_0x16025a(0x10d)]:{const _0x57a1df=this[_0x16025a(0x107)][_0x16025a(0x139)](_0x168825,_0x4e8c45,_0x644664[_0x16025a(0x164)]);_0x57a1df&&_0x57a1df[_0x16025a(0x10e)]&&this[_0x16025a(0x107)][_0x16025a(0x15e)](_0x168825,_0x4e8c45,_0x644664[_0x16025a(0x164)]);break;}case v[_0x16025a(0x12a)]:{this[_0x16025a(0x107)][_0x16025a(0xfa)](_0x168825,_0x4e8c45,{'commentId':_0x644664['replyId'],'text':JSON['parse'](_0x644664[_0x16025a(0xfd)])});break;}case v[_0x16025a(0x143)]:{const _0x42c666=(_0x226f33=this['_threadCommentModel'][_0x16025a(0x133)](_0x644664[_0x16025a(0x110)])[_0x16025a(0x160)](_0x25184c=>_0x25184c[_0x16025a(0xfe)]===_0x644664[_0x16025a(0xfe)]))==null?void 0x0:_0x226f33['root'];_0x42c666&&this['_threadCommentModel']['resolveComment'](_0x168825,_0x4e8c45,_0x42c666['id'],_0x644664[_0x16025a(0x12f)]===I[_0x16025a(0x158)]);break;}}}));}};function _0x2d3f(){const _0x2e8b30=['slice','Disposable','userId','symbol','_userService','thread-comment-data-source.config','dataSource','Solved','_initUserSync','length','Reply','COMMENT','Module','deleteComment','/add','find','userID','Add','size','replyId','Inject','stringify','333cyqofo','IConfigService','subscribe','UNRECOGNIZED','rangeType','CustomRangeType','UniverThreadCommentDataSourcePlugin','rangeId','defineProperty','disposeWithMe','19442Dvdwpw','Plugin','updateComment','/universer-api/user/list','YYYY/MM/DD\x20HH:mm','content','threadId','/universer-api/comment/unit/','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','parse','filter','addUser','_threadCommentDataSource','78785YUjqrG','_threadCommentModel','UNIVER_UNKNOWN','_injector','_configService','HTTPService','syncUpdateMutationToColla','Delete','parentId','DependentOn','unitId','150RgKQMM','resolved','_initDataSource','createTimestamp','1hnrEUR','getOwnPropertyDescriptor','3fqRGbW','1070WkGaGz','add','payload','OpenOrReOpen','/reply','pluginName','_threadCommentDataSourceService','personId','commentUpdate$','type','getCurrentUser','_commentService','78133XiXKrM','Unknown','ThreadCommentModel','64184zjQVJf','UserManagerService','UniverInstanceType','Edit','getMemberID','body','_httpService','comment','solved','_init','values','UniverThreadCommentUIPlugin','getUnit','map','listComments','Injector','dayjs','pipe','getComment','CommentService','/delete','requireSession','post','getUser','user','forEach','CollaborationSessionService','get','Solve','root','error','format','_config','customRanges','238584agLnzt','merge','2664092LJxKTF','delete','code','ref','_sessionService','1993440fxbYSD'];_0x2d3f=function(){return _0x2e8b30;};return _0x2d3f();}_=E([S(0x0,c['Inject'](b[_0x1888c3(0x13a)])),S(0x1,c['Inject'](M[_0x1888c3(0x126)])),S(0x2,c['Inject'](c[_0x1888c3(0x128)])),S(0x3,c[_0x1888c3(0x165)](c[_0x1888c3(0x136)]))],_);const q=_0x1888c3(0x156),D={};var A=Object[_0x1888c3(0x116)],x=(_0x37fe40,_0x158bb5,_0x5143df,_0x5c1a51)=>{const _0xfe44ad=_0x1888c3;for(var _0x10da52=_0x5c1a51>0x1?void 0x0:_0x5c1a51?A(_0x158bb5,_0x5143df):_0x158bb5,_0x4ee92e=_0x37fe40[_0xfe44ad(0x15a)]-0x1,_0x229636;_0x4ee92e>=0x0;_0x4ee92e--)(_0x229636=_0x37fe40[_0x4ee92e])&&(_0x10da52=_0x229636(_0x10da52)||_0x10da52);return _0x10da52;},C=(_0x2b5a6f,_0x47c57c)=>(_0x3d43f7,_0x30a94d)=>_0x47c57c(_0x3d43f7,_0x30a94d,_0x2b5a6f);function Y(_0x100041,_0x443287){const _0x13106e=_0x1888c3,_0x3164cd=_0x100041[_0x13106e(0x100)][0x0];return{..._0x443287,'id':_0x3164cd[_0x13106e(0x164)],'resolved':_0x100041['solved']===0x1,'dT':f(_0x3164cd[_0x13106e(0x114)]),'personId':_0x3164cd[_0x13106e(0x153)],'threadId':_0x3164cd[_0x13106e(0xfe)]};}function G(_0x5ed0e9,_0x4a5b94,_0x17b073){const _0x2c06d9=_0x1888c3;var _0x383261,_0x240e18;if(((_0x240e18=(_0x383261=_0x5ed0e9==null?void 0x0:_0x5ed0e9[_0x2c06d9(0x100)])==null?void 0x0:_0x383261[_0x2c06d9(0x15a)])!=null?_0x240e18:0x0)>0x0){const _0x49d696=(_0x25ec7e,_0x849351)=>({'id':_0x25ec7e['replyId'],'threadId':_0x25ec7e['threadId'],'dT':f(_0x25ec7e[_0x2c06d9(0x114)]),'personId':_0x25ec7e['userId'],'resolved':_0x5ed0e9[_0x2c06d9(0x12f)]===I[_0x2c06d9(0x158)],'unitId':_0x4a5b94,'subUnitId':_0x17b073,'text':JSON[_0x2c06d9(0x102)](_0x25ec7e['content']),'parentId':_0x849351}),_0x221515=_0x49d696(_0x5ed0e9[_0x2c06d9(0x100)][0x0]);return{..._0x221515,'children':_0x5ed0e9[_0x2c06d9(0x100)][_0x2c06d9(0x151)](0x1)[_0x2c06d9(0x134)](_0x5496c6=>_0x49d696(_0x5496c6,_0x221515['id']))};}return null;}let p=class{constructor(_0x376885,_0x18a3bf,_0x4befc7){const _0x26f50a=_0x1888c3;this[_0x26f50a(0x12d)]=_0x376885,this[_0x26f50a(0x155)]=_0x18a3bf,this[_0x26f50a(0x14f)]=_0x4befc7;}async['addComment'](_0x330d9e){const _0x202c88=_0x1888c3;var _0xaabada,_0x8d1291;const {parentId:_0x266295,unitId:_0x2944a2,text:_0x41b459,threadId:_0x3e8abd}=_0x330d9e,_0x392a2b=(_0x8d1291=(_0xaabada=_0x41b459['customRanges'])==null?void 0x0:_0xaabada['filter'](_0x1ced1d=>_0x1ced1d[_0x202c88(0xf2)]===c[_0x202c88(0xf3)][_0x202c88(0x15c)])['map'](_0x88b8ef=>_0x88b8ef[_0x202c88(0xf5)]))!=null?_0x8d1291:[],_0x1e0dcf=JSON['stringify'](_0x41b459),_0x39c75d=(await this[_0x202c88(0x14f)][_0x202c88(0x13c)](_0x2944a2))[_0x202c88(0x12b)]();if(_0x266295){const _0x261019={'memberId':_0x39c75d,'unitId':_0x2944a2,'content':_0x1e0dcf,'mention':_0x392a2b,'threadId':_0x3e8abd},_0x7e9e79=(await this[_0x202c88(0x12d)][_0x202c88(0x13d)](_0x202c88(0xff)+_0x2944a2+_0x202c88(0x11c),{'body':_0x261019}))['body']['reply'];return{..._0x330d9e,'id':_0x7e9e79[_0x202c88(0x164)],'dT':c[_0x202c88(0x137)](+_0x7e9e79[_0x202c88(0x114)])[_0x202c88(0x146)](_0x202c88(0xfc)),'personId':_0x7e9e79[_0x202c88(0x153)]};}else{const _0x470466={'memberId':_0x39c75d,'unitId':_0x2944a2,'content':_0x1e0dcf,'mention':_0x392a2b},_0x4124a6=await this[_0x202c88(0x12d)]['post'](_0x202c88(0xff)+_0x2944a2+_0x202c88(0x15f),{'body':_0x470466});return Y(_0x4124a6['body'][_0x202c88(0x12e)],_0x330d9e);}}async[_0x1888c3(0xfa)](_0x2a873d){const _0x2eeb14=_0x1888c3;var _0x3c0fe8,_0x4b2330;const {text:_0x5be4b2,unitId:_0x24c828}=_0x2a873d,_0x10d790=(_0x4b2330=(_0x3c0fe8=_0x5be4b2[_0x2eeb14(0x148)])==null?void 0x0:_0x3c0fe8[_0x2eeb14(0x103)](_0x1cb946=>_0x1cb946['rangeType']===c[_0x2eeb14(0xf3)]['COMMENT'])[_0x2eeb14(0x134)](_0x5f23eb=>_0x5f23eb[_0x2eeb14(0xf5)]))!=null?_0x4b2330:[],_0xd83c93=JSON[_0x2eeb14(0x166)](_0x5be4b2),_0x31ce00=_0x2a873d['threadId'],_0x1e3941=_0x2a873d['id'],_0x4565f7={'memberId':(await this['_sessionService']['requireSession'](_0x24c828))['getMemberID'](),'unitId':_0x24c828,'threadId':_0x31ce00,'mention':_0x10d790,'content':_0xd83c93,'replyId':_0x1e3941},_0x38b216=await this['_httpService'][_0x2eeb14(0x13d)](_0x2eeb14(0xff)+_0x24c828+'/edit',{'body':_0x4565f7});return!_0x38b216[_0x2eeb14(0x12c)][_0x2eeb14(0x145)]||_0x38b216[_0x2eeb14(0x12c)][_0x2eeb14(0x145)]['code']===0x1;}async['resolveComment'](_0x447063){const _0xbbd85a=_0x1888c3,{unitId:_0x5f3a07}=_0x447063,_0x3d1d4d=_0x447063[_0xbbd85a(0xfe)],_0x2e0432={'memberId':this[_0xbbd85a(0x155)][_0xbbd85a(0x122)]()[_0xbbd85a(0x161)],'unitId':_0x5f3a07,'threadId':_0x3d1d4d,'solved':_0x447063[_0xbbd85a(0x112)]?I[_0xbbd85a(0x158)]:I['OpenOrReOpen']},_0x5efcb4=await this[_0xbbd85a(0x12d)][_0xbbd85a(0x13d)]('/universer-api/comment/unit/'+_0x5f3a07+'/solved',{'body':_0x2e0432});return!_0x5efcb4['body'][_0xbbd85a(0x145)]||_0x5efcb4['body'][_0xbbd85a(0x145)][_0xbbd85a(0x14d)]===0x1;}async[_0x1888c3(0x15e)](_0x51f123,_0x9512fd,_0x1a70d2,_0x28feff){const _0xe4e6a1=_0x1888c3,_0x521122={'memberId':(await this['_sessionService'][_0xe4e6a1(0x13c)](_0x51f123))[_0xe4e6a1(0x12b)](),'threadId':_0x1a70d2,'replyId':_0x28feff,'unitId':_0x51f123},_0x163300=await this[_0xe4e6a1(0x12d)][_0xe4e6a1(0x13d)](_0xe4e6a1(0xff)+_0x51f123+_0xe4e6a1(0x13b),{'body':_0x521122});return!_0x163300['body'][_0xe4e6a1(0x145)]||_0x163300[_0xe4e6a1(0x12c)]['error']['code']===0x1;}async[_0x1888c3(0x135)](_0x4e4743,_0x529182,_0x10a06f){const _0x360190=_0x1888c3,_0x3abc90={'unitId':_0x4e4743,'threadId':_0x10a06f},_0x170259=await this[_0x360190(0x12d)]['post'](_0x360190(0xff)+_0x4e4743+'/list',{'body':_0x3abc90}),_0x54df3b=_0x10a06f[_0x360190(0x134)](_0x402bd4=>G(_0x170259[_0x360190(0x12c)]['comments'][_0x402bd4],_0x4e4743,_0x529182))[_0x360190(0x103)](Boolean);return Object[_0x360190(0x131)](_0x170259[_0x360190(0x12c)]['users'])[_0x360190(0x140)](_0x585efe=>{const _0x364d2e=_0x360190;this['_userService'][_0x364d2e(0x104)](_0x585efe);}),_0x54df3b;}['saveCommentToSnapshot'](_0x4beb55){const _0x4a4191=_0x1888c3;return{'id':_0x4beb55['id'],'threadId':_0x4beb55[_0x4a4191(0xfe)],'ref':_0x4beb55[_0x4a4191(0x14e)]};}};p=x([C(0x0,c[_0x1888c3(0x165)](P[_0x1888c3(0x10b)])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c[_0x1888c3(0x165)](b[_0x1888c3(0x141)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x27ef8a,_0x10fb27,_0x425d6a,_0x2395f2)=>{for(var _0x5aa957=_0x2395f2>0x1?void 0x0:_0x2395f2?H(_0x10fb27,_0x425d6a):_0x10fb27,_0x3188a3=_0x27ef8a['length']-0x1,_0x28008a;_0x3188a3>=0x0;_0x3188a3--)(_0x28008a=_0x27ef8a[_0x3188a3])&&(_0x5aa957=_0x28008a(_0x5aa957)||_0x5aa957);return _0x5aa957;},y=(_0x26766f,_0x11fcc7)=>(_0x543db4,_0xaaefcc)=>_0x11fcc7(_0x543db4,_0xaaefcc,_0x26766f);function _0x43bd(_0x3240d3,_0x54e897){_0x3240d3=_0x3240d3-0xf0;const _0x2d3f02=_0x2d3f();let _0x43bd8a=_0x2d3f02[_0x3240d3];return _0x43bd8a;}let g=class extends c[_0x1888c3(0x152)]{constructor(_0xc42b85,_0x40d4b1){const _0x45b12c=_0x1888c3;super(),this[_0x45b12c(0x11e)]=_0xc42b85,this[_0x45b12c(0x105)]=_0x40d4b1,this[_0x45b12c(0x113)]();}['_initDataSource'](){const _0x543c6f=_0x1888c3;this[_0x543c6f(0x11e)][_0x543c6f(0x157)]=this['_threadCommentDataSource'],this[_0x543c6f(0x11e)][_0x543c6f(0x10c)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x1888c3(0x165)](p))],g);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x485531,_0x12e569,_0x4823ea)=>_0x12e569 in _0x485531?F(_0x485531,_0x12e569,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4823ea}):_0x485531[_0x12e569]=_0x4823ea,W=(_0x4a5115,_0x984356,_0x4479d1,_0x1ffde3)=>{for(var _0x66e163=_0x1ffde3>0x1?void 0x0:_0x1ffde3?L(_0x984356,_0x4479d1):_0x984356,_0x2f56da=_0x4a5115['length']-0x1,_0x54eb55;_0x2f56da>=0x0;_0x2f56da--)(_0x54eb55=_0x4a5115[_0x2f56da])&&(_0x66e163=_0x54eb55(_0x66e163)||_0x66e163);return _0x66e163;},O=(_0x44c1b6,_0x1a42e6)=>(_0x556fa3,_0x4b792a)=>_0x1a42e6(_0x556fa3,_0x4b792a,_0x44c1b6),N=(_0x53b36e,_0x3fa555,_0x3466f9)=>Z(_0x53b36e,typeof _0x3fa555!=_0x1888c3(0x154)?_0x3fa555+'':_0x3fa555,_0x3466f9);exports[_0x1888c3(0xf4)]=class extends c[_0x1888c3(0xf9)]{constructor(_0x1c496f=D,_0x2605bb,_0xab95b6){const _0x23eb8b=_0x1888c3;super(),this['_config']=_0x1c496f,this['_injector']=_0x2605bb,this[_0x23eb8b(0x10a)]=_0xab95b6;const {..._0x2a20c2}=c[_0x23eb8b(0x14a)]({},D,this[_0x23eb8b(0x147)]);this[_0x23eb8b(0x10a)]['setConfig'](q,_0x2a20c2);}['onStarting'](){const _0x27f504=_0x1888c3;[[p],[g],[_]][_0x27f504(0x140)](_0x1f5e21=>{const _0x3e794a=_0x27f504;this[_0x3e794a(0x109)]['add'](_0x1f5e21);});}['onReady'](){const _0x228b78=_0x1888c3;this['_injector']['get'](g),this[_0x228b78(0x109)][_0x228b78(0x142)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x1888c3(0x11d),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x1888c3(0x121),c[_0x1888c3(0x129)][_0x1888c3(0x108)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x1888c3(0x10f)](w[_0x1888c3(0x132)],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c['Inject'](c[_0x1888c3(0x136)])),O(0x2,c[_0x1888c3(0x168)])],exports[_0x1888c3(0xf4)]);
1
+ 'use strict';const _0x52b213=_0x3df9;(function(_0x1b0644,_0x3e45b5){const _0x3b15c3=_0x3df9,_0x3ecca5=_0x1b0644();while(!![]){try{const _0x2d1350=-parseInt(_0x3b15c3(0x122))/0x1*(parseInt(_0x3b15c3(0x123))/0x2)+parseInt(_0x3b15c3(0x11d))/0x3+-parseInt(_0x3b15c3(0x147))/0x4+-parseInt(_0x3b15c3(0x126))/0x5+-parseInt(_0x3b15c3(0x15d))/0x6*(-parseInt(_0x3b15c3(0x154))/0x7)+-parseInt(_0x3b15c3(0x138))/0x8*(-parseInt(_0x3b15c3(0x13f))/0x9)+-parseInt(_0x3b15c3(0x149))/0xa*(parseInt(_0x3b15c3(0x16d))/0xb);if(_0x2d1350===_0x3e45b5)break;else _0x3ecca5['push'](_0x3ecca5['shift']());}catch(_0x33037a){_0x3ecca5['push'](_0x3ecca5['shift']());}}}(_0x4909,0x9dd1e));Object['defineProperty'](exports,Symbol[_0x52b213(0x11e)],{'value':_0x52b213(0x160)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x52b213(0x13e);var I=(_0x28d6ff=>(_0x28d6ff[_0x28d6ff[_0x52b213(0x14b)]=0x0]=_0x52b213(0x14b),_0x28d6ff[_0x28d6ff[_0x52b213(0x110)]=0x1]=_0x52b213(0x110),_0x28d6ff[_0x28d6ff[_0x52b213(0x162)]=-0x1]='UNRECOGNIZED',_0x28d6ff))(I||{}),v=(_0x2b45e1=>(_0x2b45e1[_0x2b45e1[_0x52b213(0x104)]=0x0]=_0x52b213(0x104),_0x2b45e1[_0x2b45e1[_0x52b213(0x140)]=0x1]=_0x52b213(0x140),_0x2b45e1[_0x2b45e1[_0x52b213(0x127)]=0x2]=_0x52b213(0x127),_0x2b45e1[_0x2b45e1[_0x52b213(0x151)]=0x3]=_0x52b213(0x151),_0x2b45e1[_0x2b45e1[_0x52b213(0x121)]=0x4]=_0x52b213(0x121),_0x2b45e1[_0x2b45e1['Solve']=0x5]=_0x52b213(0x13b),_0x2b45e1[_0x2b45e1[_0x52b213(0x162)]=-0x1]=_0x52b213(0x162),_0x2b45e1))(v||{});function _0x4909(){const _0x5f0be5=['rangeType','getUnit','_injector','slice','Unknown','/universer-api/comment/unit/','CustomRangeType','/reply','IConfigService','createTimestamp','onStarting','parentId','dayjs','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','_httpService','Solved','Inject','stringify','values','updateComment','/delete','UniverThreadCommentDataSourcePlugin','resolveComment','_initUserSync','HTTPService','threadId','_initDataSource','root','1543422URwCPW','toStringTag','_threadCommentModel','_config','Delete','8117IpLRuW','196wkumzO','pluginName','get','3349785TUOzio','Reply','payload','size','getComment','length','type','body','replyId','COMMENT','_userService','solved','Injector','error','reply','ThreadCommentModel','thread-comment-data-source.config','disposeWithMe','9453208JYprjf','/edit','UserManagerService','Solve','format','user','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','9CUlNEm','Add','parse','_init','_sessionService','getUser','UniverThreadCommentUIPlugin','rangeId','1751828HGhGxi','deleteComment','10HgQVzP','code','OpenOrReOpen','addUser','addComment','requireSession','add','resolved','Edit','syncUpdateMutationToColla','subscribe','10283azlRIM','getOwnPropertyDescriptor','comment','Plugin','customRanges','defineProperty','personId','replies','CollaborationSessionService','4008LBmUTD','UNIVER_UNKNOWN','merge','Module','userID','UNRECOGNIZED','_commentService','setConfig','forEach','getCurrentUser','post','filter','Disposable','bufferTime','content','saveCommentToSnapshot','1403677IAPkKh','find','map','commentUpdate$','UniverInstanceType','UniverLicensePlugin','/add','UniverCollaborationClientPlugin','_threadCommentDataSource','unitId','getMemberID','userId'];_0x4909=function(){return _0x5f0be5;};return _0x4909();}function _0x3df9(_0xa10cb4,_0x501053){_0xa10cb4=_0xa10cb4-0xf7;const _0x490936=_0x4909();let _0x3df9ba=_0x490936[_0xa10cb4];return _0x3df9ba;}const f=_0x4d1d0b=>c[_0x52b213(0x10c)](new Date(+_0x4d1d0b))['format'](_0x52b213(0x10d)),R=async(_0x4e1099,_0x75acfa)=>{const _0x2896c9=_0x52b213,_0x100b40=_0x4e1099[_0x2896c9(0x125)](c['UserManagerService']),_0x4d4327=_0x4e1099[_0x2896c9(0x125)](P[_0x2896c9(0x119)]);_0x75acfa['forEach'](_0x13f9f4=>{const _0x1eb00e=_0x2896c9;_0x100b40[_0x1eb00e(0x144)](_0x13f9f4)&&_0x75acfa['delete'](_0x13f9f4);}),_0x75acfa[_0x2896c9(0x129)]&&(await _0x4d4327[_0x2896c9(0x125)]('/universer-api/user/list',{'params':{'userIDs':[..._0x75acfa]}}))[_0x2896c9(0x12d)]['users']['forEach'](_0x2115de=>{const _0x1ee07e=_0x2896c9;_0x2115de&&_0x100b40[_0x1ee07e(0x14c)](_0x2115de);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x1841dc,_0x580155,_0x54a4fa,_0x344546)=>{const _0x1265b2=_0x52b213;for(var _0x483750=_0x344546>0x1?void 0x0:_0x344546?$(_0x580155,_0x54a4fa):_0x580155,_0x4e1ede=_0x1841dc[_0x1265b2(0x12b)]-0x1,_0x245576;_0x4e1ede>=0x0;_0x4e1ede--)(_0x245576=_0x1841dc[_0x4e1ede])&&(_0x483750=_0x245576(_0x483750)||_0x483750);return _0x483750;},S=(_0x130feb,_0xaf093e)=>(_0x2ab494,_0x11e376)=>_0xaf093e(_0x2ab494,_0x11e376,_0x130feb);let _=class extends c[_0x52b213(0x169)]{constructor(_0x232776,_0x13c518,_0x1b46c0,_0x34465f){const _0x54045e=_0x52b213;super(),this[_0x54045e(0x163)]=_0x232776,this[_0x54045e(0x11f)]=_0x13c518,this[_0x54045e(0x130)]=_0x1b46c0,this[_0x54045e(0x102)]=_0x34465f,this[_0x54045e(0x142)](),this[_0x54045e(0x118)]();}[_0x52b213(0x118)](){const _0x1a1d46=_0x52b213;this['disposeWithMe'](this[_0x1a1d46(0x11f)][_0x1a1d46(0xf7)]['pipe'](j[_0x1a1d46(0x16a)](0x10))[_0x1a1d46(0x153)](_0x44b405=>{const _0x106b9a=_0x1a1d46,_0x3c80b6=new Set();_0x44b405['forEach'](_0x5c0cfc=>{const _0x337dc0=_0x3df9;switch(_0x5c0cfc[_0x337dc0(0x12c)]){case _0x337dc0(0x14f):{const _0xf60d91=_0x5c0cfc[_0x337dc0(0x128)][_0x337dc0(0x15a)];_0x3c80b6['add'](_0xf60d91);break;}}}),R(this[_0x106b9a(0x102)],_0x3c80b6);}));}['_init'](){const _0x2f9054=_0x52b213;this[_0x2f9054(0x137)](this[_0x2f9054(0x163)][_0x2f9054(0xf7)][_0x2f9054(0x153)](async _0xfd1a9b=>{const _0x4ef364=_0x2f9054;var _0x55b7ac,_0x397a78,_0x5ace44,_0xdaa18b;const _0x123722=(_0x55b7ac=this[_0x4ef364(0x11f)][_0x4ef364(0x101)](_0xfd1a9b[_0x4ef364(0xfd)])[_0x4ef364(0x16e)](_0x1b3425=>_0x1b3425[_0x4ef364(0x11a)]===_0xfd1a9b['threadId']))==null?void 0x0:_0x55b7ac[_0x4ef364(0x11c)];if(!_0x123722)return;const {unitId:_0x5b91fb,subUnitId:_0xf731ac}=_0x123722;switch(_0xfd1a9b[_0x4ef364(0x13d)]&&this['_userService']['addUser'](_0xfd1a9b[_0x4ef364(0x13d)]),_0xfd1a9b[_0x4ef364(0x12c)]){case v['Add']:break;case v[_0x4ef364(0x127)]:{this['_threadCommentModel'][_0x4ef364(0x14d)](_0x5b91fb,_0xf731ac,{'unitId':_0x5b91fb,'subUnitId':_0xf731ac,'ref':'','id':_0xfd1a9b[_0x4ef364(0x12e)],'dT':f(+_0xfd1a9b['createTimestamp']),'threadId':_0xfd1a9b['threadId'],'personId':(_0x5ace44=(_0x397a78=_0xfd1a9b[_0x4ef364(0x13d)])==null?void 0x0:_0x397a78[_0x4ef364(0x161)])!=null?_0x5ace44:_0xfd1a9b['userId'],'text':JSON[_0x4ef364(0x141)](_0xfd1a9b[_0x4ef364(0x16b)]),'parentId':_0x123722['id']});break;}case v[_0x4ef364(0x121)]:{const _0x34885a=this[_0x4ef364(0x11f)][_0x4ef364(0x12a)](_0x5b91fb,_0xf731ac,_0xfd1a9b['replyId']);_0x34885a&&_0x34885a[_0x4ef364(0x10b)]&&this['_threadCommentModel'][_0x4ef364(0x148)](_0x5b91fb,_0xf731ac,_0xfd1a9b[_0x4ef364(0x12e)]);break;}case v[_0x4ef364(0x151)]:{this[_0x4ef364(0x11f)][_0x4ef364(0x114)](_0x5b91fb,_0xf731ac,{'commentId':_0xfd1a9b['replyId'],'text':JSON[_0x4ef364(0x141)](_0xfd1a9b[_0x4ef364(0x16b)])});break;}case v[_0x4ef364(0x13b)]:{const _0x5563a1=(_0xdaa18b=this[_0x4ef364(0x11f)][_0x4ef364(0x101)](_0xfd1a9b['unitId'])['find'](_0x2cd234=>_0x2cd234[_0x4ef364(0x11a)]===_0xfd1a9b[_0x4ef364(0x11a)]))==null?void 0x0:_0xdaa18b[_0x4ef364(0x11c)];_0x5563a1&&this['_threadCommentModel'][_0x4ef364(0x117)](_0x5b91fb,_0xf731ac,_0x5563a1['id'],_0xfd1a9b[_0x4ef364(0x131)]===I[_0x4ef364(0x110)]);break;}}}));}};_=E([S(0x0,c[_0x52b213(0x111)](b['CommentService'])),S(0x1,c[_0x52b213(0x111)](M[_0x52b213(0x135)])),S(0x2,c[_0x52b213(0x111)](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x52b213(0x132)]))],_);const q=_0x52b213(0x136),D={};var A=Object[_0x52b213(0x155)],x=(_0x7ba40a,_0x399c8d,_0xb76e2b,_0x2b07f4)=>{for(var _0x230551=_0x2b07f4>0x1?void 0x0:_0x2b07f4?A(_0x399c8d,_0xb76e2b):_0x399c8d,_0x1f4a3c=_0x7ba40a['length']-0x1,_0x1a83dc;_0x1f4a3c>=0x0;_0x1f4a3c--)(_0x1a83dc=_0x7ba40a[_0x1f4a3c])&&(_0x230551=_0x1a83dc(_0x230551)||_0x230551);return _0x230551;},C=(_0xf2ad75,_0x3606db)=>(_0x21a3e6,_0x4d84a8)=>_0x3606db(_0x21a3e6,_0x4d84a8,_0xf2ad75);function Y(_0x562d07,_0x58dbdb){const _0x1dbdf3=_0x52b213,_0x4e927e=_0x562d07[_0x1dbdf3(0x15b)][0x0];return{..._0x58dbdb,'id':_0x4e927e[_0x1dbdf3(0x12e)],'resolved':_0x562d07[_0x1dbdf3(0x131)]===0x1,'dT':f(_0x4e927e[_0x1dbdf3(0x109)]),'personId':_0x4e927e[_0x1dbdf3(0xff)],'threadId':_0x4e927e[_0x1dbdf3(0x11a)]};}function G(_0x2c39b2,_0x4fcd8e,_0x2489a0){const _0x2d6d7d=_0x52b213;var _0x5246e5,_0x175a23;if(((_0x175a23=(_0x5246e5=_0x2c39b2==null?void 0x0:_0x2c39b2['replies'])==null?void 0x0:_0x5246e5[_0x2d6d7d(0x12b)])!=null?_0x175a23:0x0)>0x0){const _0xe1528e=(_0x3f0629,_0x4f260e)=>({'id':_0x3f0629[_0x2d6d7d(0x12e)],'threadId':_0x3f0629[_0x2d6d7d(0x11a)],'dT':f(_0x3f0629[_0x2d6d7d(0x109)]),'personId':_0x3f0629[_0x2d6d7d(0xff)],'resolved':_0x2c39b2[_0x2d6d7d(0x131)]===I['Solved'],'unitId':_0x4fcd8e,'subUnitId':_0x2489a0,'text':JSON['parse'](_0x3f0629[_0x2d6d7d(0x16b)]),'parentId':_0x4f260e}),_0x58a2ce=_0xe1528e(_0x2c39b2['replies'][0x0]);return{..._0x58a2ce,'children':_0x2c39b2[_0x2d6d7d(0x15b)][_0x2d6d7d(0x103)](0x1)['map'](_0x3f1231=>_0xe1528e(_0x3f1231,_0x58a2ce['id']))};}return null;}let p=class{constructor(_0x33b93d,_0x539fd4,_0x23c3f5){const _0x2ef3f2=_0x52b213;this[_0x2ef3f2(0x10f)]=_0x33b93d,this['_userService']=_0x539fd4,this[_0x2ef3f2(0x143)]=_0x23c3f5;}async['addComment'](_0x1db5ce){const _0x2ffa05=_0x52b213;var _0x1e38ba,_0x599ad5;const {parentId:_0x2bb2cd,unitId:_0x1a2b90,text:_0x241081,threadId:_0x569119}=_0x1db5ce,_0x13bae4=(_0x599ad5=(_0x1e38ba=_0x241081[_0x2ffa05(0x158)])==null?void 0x0:_0x1e38ba[_0x2ffa05(0x168)](_0xf3b158=>_0xf3b158[_0x2ffa05(0x100)]===c[_0x2ffa05(0x106)][_0x2ffa05(0x12f)])[_0x2ffa05(0x16f)](_0x6841bd=>_0x6841bd[_0x2ffa05(0x146)]))!=null?_0x599ad5:[],_0x2f1698=JSON[_0x2ffa05(0x112)](_0x241081),_0x1c1cce=(await this[_0x2ffa05(0x143)][_0x2ffa05(0x14e)](_0x1a2b90))[_0x2ffa05(0xfe)]();if(_0x2bb2cd){const _0x49207e={'memberId':_0x1c1cce,'unitId':_0x1a2b90,'content':_0x2f1698,'mention':_0x13bae4,'threadId':_0x569119},_0x23e900=(await this[_0x2ffa05(0x10f)]['post'](_0x2ffa05(0x105)+_0x1a2b90+_0x2ffa05(0x107),{'body':_0x49207e}))[_0x2ffa05(0x12d)][_0x2ffa05(0x134)];return{..._0x1db5ce,'id':_0x23e900[_0x2ffa05(0x12e)],'dT':c['dayjs'](+_0x23e900[_0x2ffa05(0x109)])[_0x2ffa05(0x13c)](_0x2ffa05(0x10d)),'personId':_0x23e900[_0x2ffa05(0xff)]};}else{const _0x456df8={'memberId':_0x1c1cce,'unitId':_0x1a2b90,'content':_0x2f1698,'mention':_0x13bae4},_0x51e1cb=await this[_0x2ffa05(0x10f)][_0x2ffa05(0x167)](_0x2ffa05(0x105)+_0x1a2b90+_0x2ffa05(0xfa),{'body':_0x456df8});return Y(_0x51e1cb[_0x2ffa05(0x12d)][_0x2ffa05(0x156)],_0x1db5ce);}}async[_0x52b213(0x114)](_0x5ca402){const _0x907cb2=_0x52b213;var _0x1c0e61,_0xf7d546;const {text:_0x5e8695,unitId:_0x4dcd94}=_0x5ca402,_0xb99f07=(_0xf7d546=(_0x1c0e61=_0x5e8695[_0x907cb2(0x158)])==null?void 0x0:_0x1c0e61['filter'](_0x9cd5e3=>_0x9cd5e3['rangeType']===c[_0x907cb2(0x106)][_0x907cb2(0x12f)])[_0x907cb2(0x16f)](_0x17f525=>_0x17f525[_0x907cb2(0x146)]))!=null?_0xf7d546:[],_0x3b6fc2=JSON['stringify'](_0x5e8695),_0x24f292=_0x5ca402[_0x907cb2(0x11a)],_0x34f8c0=_0x5ca402['id'],_0x418eab={'memberId':(await this[_0x907cb2(0x143)][_0x907cb2(0x14e)](_0x4dcd94))['getMemberID'](),'unitId':_0x4dcd94,'threadId':_0x24f292,'mention':_0xb99f07,'content':_0x3b6fc2,'replyId':_0x34f8c0},_0x55c145=await this[_0x907cb2(0x10f)][_0x907cb2(0x167)]('/universer-api/comment/unit/'+_0x4dcd94+_0x907cb2(0x139),{'body':_0x418eab});return!_0x55c145[_0x907cb2(0x12d)][_0x907cb2(0x133)]||_0x55c145[_0x907cb2(0x12d)][_0x907cb2(0x133)][_0x907cb2(0x14a)]===0x1;}async['resolveComment'](_0x4afa79){const _0x8b1537=_0x52b213,{unitId:_0xc65c22}=_0x4afa79,_0x5506e8=_0x4afa79[_0x8b1537(0x11a)],_0x3a671a={'memberId':this[_0x8b1537(0x130)][_0x8b1537(0x166)]()['userID'],'unitId':_0xc65c22,'threadId':_0x5506e8,'solved':_0x4afa79[_0x8b1537(0x150)]?I['Solved']:I['OpenOrReOpen']},_0x28f05d=await this[_0x8b1537(0x10f)]['post'](_0x8b1537(0x105)+_0xc65c22+'/solved',{'body':_0x3a671a});return!_0x28f05d['body'][_0x8b1537(0x133)]||_0x28f05d[_0x8b1537(0x12d)][_0x8b1537(0x133)][_0x8b1537(0x14a)]===0x1;}async[_0x52b213(0x148)](_0x39303e,_0x5a0276,_0x38e6d7,_0x5c6203){const _0x2912dc=_0x52b213,_0x351ef6={'memberId':(await this[_0x2912dc(0x143)][_0x2912dc(0x14e)](_0x39303e))[_0x2912dc(0xfe)](),'threadId':_0x38e6d7,'replyId':_0x5c6203,'unitId':_0x39303e},_0x487b68=await this['_httpService'][_0x2912dc(0x167)]('/universer-api/comment/unit/'+_0x39303e+_0x2912dc(0x115),{'body':_0x351ef6});return!_0x487b68['body'][_0x2912dc(0x133)]||_0x487b68[_0x2912dc(0x12d)][_0x2912dc(0x133)][_0x2912dc(0x14a)]===0x1;}async['listComments'](_0x3a6d1a,_0x3f2c4d,_0x19bbca){const _0x3b4dbe=_0x52b213,_0x8c006a={'unitId':_0x3a6d1a,'threadId':_0x19bbca},_0x37bf0a=await this[_0x3b4dbe(0x10f)]['post'](_0x3b4dbe(0x105)+_0x3a6d1a+'/list',{'body':_0x8c006a}),_0x4c723b=_0x19bbca[_0x3b4dbe(0x16f)](_0x2a43e3=>G(_0x37bf0a[_0x3b4dbe(0x12d)]['comments'][_0x2a43e3],_0x3a6d1a,_0x3f2c4d))[_0x3b4dbe(0x168)](Boolean);return Object[_0x3b4dbe(0x113)](_0x37bf0a[_0x3b4dbe(0x12d)]['users'])[_0x3b4dbe(0x165)](_0x1b4afb=>{const _0x1accaa=_0x3b4dbe;this[_0x1accaa(0x130)]['addUser'](_0x1b4afb);}),_0x4c723b;}[_0x52b213(0x16c)](_0x121b20){const _0xa70a45=_0x52b213;return{'id':_0x121b20['id'],'threadId':_0x121b20[_0xa70a45(0x11a)],'ref':_0x121b20['ref']};}};p=x([C(0x0,c['Inject'](P[_0x52b213(0x119)])),C(0x1,c[_0x52b213(0x111)](c[_0x52b213(0x13a)])),C(0x2,c['Inject'](b[_0x52b213(0x15c)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x584305,_0x4a5aa9,_0x488762,_0x2f0ebf)=>{for(var _0x1e4983=_0x2f0ebf>0x1?void 0x0:_0x2f0ebf?H(_0x4a5aa9,_0x488762):_0x4a5aa9,_0x3bfb56=_0x584305['length']-0x1,_0x5d4a2c;_0x3bfb56>=0x0;_0x3bfb56--)(_0x5d4a2c=_0x584305[_0x3bfb56])&&(_0x1e4983=_0x5d4a2c(_0x1e4983)||_0x1e4983);return _0x1e4983;},y=(_0x9b3b7f,_0x479cf4)=>(_0x2c81d5,_0x44ddba)=>_0x479cf4(_0x2c81d5,_0x44ddba,_0x9b3b7f);let g=class extends c['Disposable']{constructor(_0x4f4c6c,_0x53cb52){const _0x506eb6=_0x52b213;super(),this[_0x506eb6(0x10e)]=_0x4f4c6c,this[_0x506eb6(0xfc)]=_0x53cb52,this[_0x506eb6(0x11b)]();}[_0x52b213(0x11b)](){const _0x11f4a2=_0x52b213;this[_0x11f4a2(0x10e)]['dataSource']=this[_0x11f4a2(0xfc)],this[_0x11f4a2(0x10e)][_0x11f4a2(0x152)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x52b213(0x111)](p))],g);var F=Object[_0x52b213(0x159)],L=Object['getOwnPropertyDescriptor'],Z=(_0x105b9c,_0xe13c40,_0x518c25)=>_0xe13c40 in _0x105b9c?F(_0x105b9c,_0xe13c40,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x518c25}):_0x105b9c[_0xe13c40]=_0x518c25,W=(_0x3b6d2b,_0x51a1df,_0x3cdfb9,_0x50861a)=>{for(var _0x20032b=_0x50861a>0x1?void 0x0:_0x50861a?L(_0x51a1df,_0x3cdfb9):_0x51a1df,_0x590061=_0x3b6d2b['length']-0x1,_0xe0785;_0x590061>=0x0;_0x590061--)(_0xe0785=_0x3b6d2b[_0x590061])&&(_0x20032b=_0xe0785(_0x20032b)||_0x20032b);return _0x20032b;},O=(_0x30942b,_0x472f5b)=>(_0xf0a832,_0x2249ae)=>_0x472f5b(_0xf0a832,_0x2249ae,_0x30942b),N=(_0x1861c6,_0x32563b,_0x561adb)=>Z(_0x1861c6,typeof _0x32563b!='symbol'?_0x32563b+'':_0x32563b,_0x561adb);exports[_0x52b213(0x116)]=class extends c[_0x52b213(0x157)]{constructor(_0x268ac1=D,_0x4a524a,_0x126a45){const _0x1a4e60=_0x52b213;super(),this[_0x1a4e60(0x120)]=_0x268ac1,this[_0x1a4e60(0x102)]=_0x4a524a,this['_configService']=_0x126a45;const {..._0x33c3f0}=c[_0x1a4e60(0x15f)]({},D,this[_0x1a4e60(0x120)]);this['_configService'][_0x1a4e60(0x164)](q,_0x33c3f0);}[_0x52b213(0x10a)](){const _0x51479c=_0x52b213;[[p],[g],[_]][_0x51479c(0x165)](_0x3d4ce4=>{const _0x4c1bb1=_0x51479c;this[_0x4c1bb1(0x102)][_0x4c1bb1(0x14f)](_0x3d4ce4);});}['onReady'](){const _0x35c42a=_0x52b213;this[_0x35c42a(0x102)][_0x35c42a(0x125)](g),this[_0x35c42a(0x102)][_0x35c42a(0x125)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x52b213(0x124),U),N(exports[_0x52b213(0x116)],_0x52b213(0x12c),c[_0x52b213(0xf8)][_0x52b213(0x15e)]),exports[_0x52b213(0x116)]=W([c['DependentOn'](w[_0x52b213(0x145)],b[_0x52b213(0xfb)],T[_0x52b213(0xf9)]),O(0x1,c['Inject'](c[_0x52b213(0x132)])),O(0x2,c[_0x52b213(0x108)])],exports[_0x52b213(0x116)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x32b9dc=_0x1b1b;(function(_0x549bd0,_0x293035){const _0x34e972=_0x1b1b,_0x31e4d9=_0x549bd0();while(!![]){try{const _0x481c4b=-parseInt(_0x34e972(0x129))/0x1*(parseInt(_0x34e972(0x147))/0x2)+-parseInt(_0x34e972(0x180))/0x3*(parseInt(_0x34e972(0x169))/0x4)+-parseInt(_0x34e972(0x16a))/0x5+-parseInt(_0x34e972(0x156))/0x6*(parseInt(_0x34e972(0x151))/0x7)+parseInt(_0x34e972(0x163))/0x8*(-parseInt(_0x34e972(0x15a))/0x9)+-parseInt(_0x34e972(0x164))/0xa*(parseInt(_0x34e972(0x13b))/0xb)+parseInt(_0x34e972(0x158))/0xc;if(_0x481c4b===_0x293035)break;else _0x31e4d9['push'](_0x31e4d9['shift']());}catch(_0x4b059a){_0x31e4d9['push'](_0x31e4d9['shift']());}}}(_0x20ab,0x20c9a));import{CommentService as _0x3ea4c9,CollaborationSessionService as _0x40bdf6,UniverCollaborationClientPlugin as _0x4fc8ae}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x41d447}from'@univerjs-pro/license';import{dayjs as _0x13af09,UserManagerService as _0x4fcaa5,Inject as _0x437868,Injector as _0xae6f09,Disposable as _0x503dbf,CustomRangeType as _0x5ee21e,UniverInstanceType as _0x49071b,DependentOn as _0x4e1f0a,IConfigService as _0x4968d2,Plugin as _0x5b3091,merge as _0x3695bb}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5e766f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1d12fa,IThreadCommentDataSourceService as _0x52765f}from'@univerjs/thread-comment';import{bufferTime as _0x84f976}from'rxjs';import{HTTPService as _0x3ff6a4}from'@univerjs/network';const W=_0x32b9dc(0x136);var I=(_0x33b554=>(_0x33b554[_0x33b554[_0x32b9dc(0x14d)]=0x0]=_0x32b9dc(0x14d),_0x33b554[_0x33b554[_0x32b9dc(0x17e)]=0x1]=_0x32b9dc(0x17e),_0x33b554[_0x33b554[_0x32b9dc(0x165)]=-0x1]=_0x32b9dc(0x165),_0x33b554))(I||{}),v=(_0x119e4d=>(_0x119e4d[_0x119e4d['Unknown']=0x0]='Unknown',_0x119e4d[_0x119e4d[_0x32b9dc(0x12d)]=0x1]=_0x32b9dc(0x12d),_0x119e4d[_0x119e4d[_0x32b9dc(0x16c)]=0x2]=_0x32b9dc(0x16c),_0x119e4d[_0x119e4d[_0x32b9dc(0x166)]=0x3]=_0x32b9dc(0x166),_0x119e4d[_0x119e4d[_0x32b9dc(0x149)]=0x4]='Delete',_0x119e4d[_0x119e4d[_0x32b9dc(0x179)]=0x5]=_0x32b9dc(0x179),_0x119e4d[_0x119e4d[_0x32b9dc(0x165)]=-0x1]=_0x32b9dc(0x165),_0x119e4d))(v||{});const y=_0x28e007=>_0x13af09(new Date(+_0x28e007))['format'](_0x32b9dc(0x16b)),B=async(_0x5998df,_0x5319eb)=>{const _0x508a57=_0x32b9dc,_0x137d18=_0x5998df['get'](_0x4fcaa5),_0x55ce6f=_0x5998df[_0x508a57(0x171)](_0x3ff6a4);_0x5319eb[_0x508a57(0x15d)](_0x43175e=>{const _0x200b65=_0x508a57;_0x137d18[_0x200b65(0x15e)](_0x43175e)&&_0x5319eb[_0x200b65(0x178)](_0x43175e);}),_0x5319eb['size']&&(await _0x55ce6f[_0x508a57(0x171)](_0x508a57(0x173),{'params':{'userIDs':[..._0x5319eb]}}))[_0x508a57(0x143)][_0x508a57(0x14e)][_0x508a57(0x15d)](_0x5005ea=>{const _0x2e6e6c=_0x508a57;_0x5005ea&&_0x137d18[_0x2e6e6c(0x135)](_0x5005ea);});};var K=Object[_0x32b9dc(0x161)],V=(_0x544eb3,_0x681674,_0x127d7b,_0x4d671a)=>{const _0x338166=_0x32b9dc;for(var _0x56ea57=_0x4d671a>0x1?void 0x0:_0x4d671a?K(_0x681674,_0x127d7b):_0x681674,_0x5f5807=_0x544eb3[_0x338166(0x155)]-0x1,_0x2a02c2;_0x5f5807>=0x0;_0x5f5807--)(_0x2a02c2=_0x544eb3[_0x5f5807])&&(_0x56ea57=_0x2a02c2(_0x56ea57)||_0x56ea57);return _0x56ea57;},p=(_0x526ece,_0x2eadeb)=>(_0x2e0510,_0x2b0463)=>_0x2eadeb(_0x2e0510,_0x2b0463,_0x526ece);let _=class extends _0x503dbf{constructor(_0x169431,_0xf19e1e,_0x208cc0,_0x558310){const _0x5395cd=_0x32b9dc;super(),this[_0x5395cd(0x152)]=_0x169431,this[_0x5395cd(0x12c)]=_0xf19e1e,this[_0x5395cd(0x123)]=_0x208cc0,this[_0x5395cd(0x12f)]=_0x558310,this[_0x5395cd(0x146)](),this['_initUserSync']();}[_0x32b9dc(0x172)](){const _0x2a9a4e=_0x32b9dc;this[_0x2a9a4e(0x126)](this[_0x2a9a4e(0x12c)][_0x2a9a4e(0x160)][_0x2a9a4e(0x137)](_0x84f976(0x10))[_0x2a9a4e(0x15b)](_0x15e6e4=>{const _0x4bd91e=_0x2a9a4e,_0x35d067=new Set();_0x15e6e4[_0x4bd91e(0x15d)](_0x456f3f=>{const _0x45da7b=_0x4bd91e;switch(_0x456f3f['type']){case _0x45da7b(0x182):{const _0x1e6426=_0x456f3f[_0x45da7b(0x142)]['personId'];_0x35d067[_0x45da7b(0x182)](_0x1e6426);break;}}}),B(this[_0x4bd91e(0x12f)],_0x35d067);}));}[_0x32b9dc(0x146)](){const _0x12ca6e=_0x32b9dc;this[_0x12ca6e(0x126)](this[_0x12ca6e(0x152)][_0x12ca6e(0x160)][_0x12ca6e(0x15b)](async _0x952833=>{const _0x194a9d=_0x12ca6e;var _0x4c02da,_0x46e0da,_0x41b64e,_0x5346a5;const _0xc95e14=(_0x4c02da=this['_threadCommentModel']['getUnit'](_0x952833[_0x194a9d(0x14b)])[_0x194a9d(0x128)](_0x334f25=>_0x334f25[_0x194a9d(0x130)]===_0x952833[_0x194a9d(0x130)]))==null?void 0x0:_0x4c02da['root'];if(!_0xc95e14)return;const {unitId:_0x3653c8,subUnitId:_0x15ff5b}=_0xc95e14;switch(_0x952833['user']&&this['_userService'][_0x194a9d(0x135)](_0x952833[_0x194a9d(0x154)]),_0x952833[_0x194a9d(0x181)]){case v[_0x194a9d(0x12d)]:break;case v['Reply']:{this[_0x194a9d(0x12c)][_0x194a9d(0x15c)](_0x3653c8,_0x15ff5b,{'unitId':_0x3653c8,'subUnitId':_0x15ff5b,'ref':'','id':_0x952833[_0x194a9d(0x139)],'dT':y(+_0x952833[_0x194a9d(0x127)]),'threadId':_0x952833[_0x194a9d(0x130)],'personId':(_0x41b64e=(_0x46e0da=_0x952833[_0x194a9d(0x154)])==null?void 0x0:_0x46e0da[_0x194a9d(0x162)])!=null?_0x41b64e:_0x952833['userId'],'text':JSON[_0x194a9d(0x183)](_0x952833[_0x194a9d(0x125)]),'parentId':_0xc95e14['id']});break;}case v['Delete']:{const _0x328f8d=this[_0x194a9d(0x12c)]['getComment'](_0x3653c8,_0x15ff5b,_0x952833[_0x194a9d(0x139)]);_0x328f8d&&_0x328f8d[_0x194a9d(0x14f)]&&this[_0x194a9d(0x12c)][_0x194a9d(0x167)](_0x3653c8,_0x15ff5b,_0x952833[_0x194a9d(0x139)]);break;}case v[_0x194a9d(0x166)]:{this['_threadCommentModel'][_0x194a9d(0x131)](_0x3653c8,_0x15ff5b,{'commentId':_0x952833[_0x194a9d(0x139)],'text':JSON[_0x194a9d(0x183)](_0x952833[_0x194a9d(0x125)])});break;}case v['Solve']:{const _0x3d093c=(_0x5346a5=this[_0x194a9d(0x12c)]['getUnit'](_0x952833[_0x194a9d(0x14b)])[_0x194a9d(0x128)](_0x216dfd=>_0x216dfd[_0x194a9d(0x130)]===_0x952833[_0x194a9d(0x130)]))==null?void 0x0:_0x5346a5[_0x194a9d(0x17f)];_0x3d093c&&this[_0x194a9d(0x12c)][_0x194a9d(0x132)](_0x3653c8,_0x15ff5b,_0x3d093c['id'],_0x952833[_0x194a9d(0x12e)]===I[_0x194a9d(0x17e)]);break;}}}));}};_=V([p(0x0,_0x437868(_0x3ea4c9)),p(0x1,_0x437868(_0x1d12fa)),p(0x2,_0x437868(_0x4fcaa5)),p(0x3,_0x437868(_0xae6f09))],_);const z=_0x32b9dc(0x170),O={};function _0x20ab(){const _0x1d63e5=['type','add','parse','rangeId','_userService','getMemberID','content','disposeWithMe','createTimestamp','find','1mUhyuV','map','customRanges','_threadCommentModel','Add','solved','_injector','threadId','updateComment','resolveComment','_initDataSource','error','addUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','pipe','setConfig','replyId','/edit','275ViNTCq','_config','_sessionService','values','_threadCommentDataSourceService','requireSession','stringify','payload','body','/universer-api/comment/unit/','syncUpdateMutationToColla','_init','147218XCpKWq','slice','Delete','/list','unitId','symbol','OpenOrReOpen','users','parentId','userId','184373ORNzhJ','_commentService','filter','user','length','18jWDwEY','onStarting','10397688VDmLKo','dataSource','27oRNQdW','subscribe','addComment','forEach','getUser','replies','commentUpdate$','getOwnPropertyDescriptor','userID','485864LnRzIY','34230aMjVlb','UNRECOGNIZED','Edit','deleteComment','listComments','2972BXReBG','485245XYJzWU','YYYY/MM/DD\x20HH:mm','Reply','code','ref','_httpService','thread-comment-data-source.config','get','_initUserSync','/universer-api/user/list','_configService','/add','rangeType','resolved','delete','Solve','_threadCommentDataSource','comments','pluginName','getCurrentUser','Solved','root','867WGvHcU'];_0x20ab=function(){return _0x1d63e5;};return _0x20ab();}function _0x1b1b(_0x39870a,_0x834e9d){_0x39870a=_0x39870a-0x122;const _0x20abc2=_0x20ab();let _0x1b1b6a=_0x20abc2[_0x39870a];return _0x1b1b6a;}var k=Object[_0x32b9dc(0x161)],Q=(_0x587e6c,_0x36ab8d,_0x512beb,_0x37bd2c)=>{const _0x52d762=_0x32b9dc;for(var _0x47b8ac=_0x37bd2c>0x1?void 0x0:_0x37bd2c?k(_0x36ab8d,_0x512beb):_0x36ab8d,_0x7e51af=_0x587e6c[_0x52d762(0x155)]-0x1,_0x2df0a6;_0x7e51af>=0x0;_0x7e51af--)(_0x2df0a6=_0x587e6c[_0x7e51af])&&(_0x47b8ac=_0x2df0a6(_0x47b8ac)||_0x47b8ac);return _0x47b8ac;},b=(_0x2fa719,_0x50f9c4)=>(_0x3ecc74,_0x35f349)=>_0x50f9c4(_0x3ecc74,_0x35f349,_0x2fa719);function X(_0x226259,_0x4ce389){const _0x2d703a=_0x32b9dc,_0x47449a=_0x226259['replies'][0x0];return{..._0x4ce389,'id':_0x47449a['replyId'],'resolved':_0x226259[_0x2d703a(0x12e)]===0x1,'dT':y(_0x47449a['createTimestamp']),'personId':_0x47449a['userId'],'threadId':_0x47449a[_0x2d703a(0x130)]};}function ee(_0x48d912,_0x5bba16,_0x9d8cb9){const _0x169b55=_0x32b9dc;var _0x492131,_0x9665aa;if(((_0x9665aa=(_0x492131=_0x48d912==null?void 0x0:_0x48d912[_0x169b55(0x15f)])==null?void 0x0:_0x492131['length'])!=null?_0x9665aa:0x0)>0x0){const _0xac84a0=(_0x1f4208,_0x19a437)=>({'id':_0x1f4208[_0x169b55(0x139)],'threadId':_0x1f4208[_0x169b55(0x130)],'dT':y(_0x1f4208[_0x169b55(0x127)]),'personId':_0x1f4208['userId'],'resolved':_0x48d912[_0x169b55(0x12e)]===I[_0x169b55(0x17e)],'unitId':_0x5bba16,'subUnitId':_0x9d8cb9,'text':JSON[_0x169b55(0x183)](_0x1f4208['content']),'parentId':_0x19a437}),_0x2e4c6f=_0xac84a0(_0x48d912['replies'][0x0]);return{..._0x2e4c6f,'children':_0x48d912[_0x169b55(0x15f)][_0x169b55(0x148)](0x1)[_0x169b55(0x12a)](_0x12df48=>_0xac84a0(_0x12df48,_0x2e4c6f['id']))};}return null;}let S=class{constructor(_0x17e3c9,_0x576942,_0x446493){const _0x2931f9=_0x32b9dc;this['_httpService']=_0x17e3c9,this['_userService']=_0x576942,this[_0x2931f9(0x13d)]=_0x446493;}async[_0x32b9dc(0x15c)](_0x362dbc){const _0x5bca19=_0x32b9dc;var _0x39801e,_0x42bae0;const {parentId:_0x199acc,unitId:_0x6a7324,text:_0x2f44c0,threadId:_0x295837}=_0x362dbc,_0x416f67=(_0x42bae0=(_0x39801e=_0x2f44c0[_0x5bca19(0x12b)])==null?void 0x0:_0x39801e[_0x5bca19(0x153)](_0x197da5=>_0x197da5['rangeType']===_0x5ee21e['COMMENT'])['map'](_0x3677d3=>_0x3677d3['rangeId']))!=null?_0x42bae0:[],_0x348611=JSON['stringify'](_0x2f44c0),_0x3d3312=(await this[_0x5bca19(0x13d)]['requireSession'](_0x6a7324))['getMemberID']();if(_0x199acc){const _0x3b6d28={'memberId':_0x3d3312,'unitId':_0x6a7324,'content':_0x348611,'mention':_0x416f67,'threadId':_0x295837},_0x1fe2e9=(await this[_0x5bca19(0x16f)]['post']('/universer-api/comment/unit/'+_0x6a7324+'/reply',{'body':_0x3b6d28}))[_0x5bca19(0x143)]['reply'];return{..._0x362dbc,'id':_0x1fe2e9[_0x5bca19(0x139)],'dT':_0x13af09(+_0x1fe2e9[_0x5bca19(0x127)])['format'](_0x5bca19(0x16b)),'personId':_0x1fe2e9[_0x5bca19(0x150)]};}else{const _0x1fd6e3={'memberId':_0x3d3312,'unitId':_0x6a7324,'content':_0x348611,'mention':_0x416f67},_0x6a7b3=await this['_httpService']['post'](_0x5bca19(0x144)+_0x6a7324+_0x5bca19(0x175),{'body':_0x1fd6e3});return X(_0x6a7b3[_0x5bca19(0x143)]['comment'],_0x362dbc);}}async['updateComment'](_0x35c8f0){const _0x4db05d=_0x32b9dc;var _0x216a24,_0x31332a;const {text:_0x1cf7e5,unitId:_0x118d09}=_0x35c8f0,_0x4ad272=(_0x31332a=(_0x216a24=_0x1cf7e5[_0x4db05d(0x12b)])==null?void 0x0:_0x216a24[_0x4db05d(0x153)](_0x552ab2=>_0x552ab2[_0x4db05d(0x176)]===_0x5ee21e['COMMENT'])[_0x4db05d(0x12a)](_0x29c0b6=>_0x29c0b6[_0x4db05d(0x122)]))!=null?_0x31332a:[],_0x1a3e17=JSON[_0x4db05d(0x141)](_0x1cf7e5),_0x3ae251=_0x35c8f0[_0x4db05d(0x130)],_0x68b2d7=_0x35c8f0['id'],_0x44cdff={'memberId':(await this[_0x4db05d(0x13d)][_0x4db05d(0x140)](_0x118d09))[_0x4db05d(0x124)](),'unitId':_0x118d09,'threadId':_0x3ae251,'mention':_0x4ad272,'content':_0x1a3e17,'replyId':_0x68b2d7},_0x321893=await this[_0x4db05d(0x16f)]['post']('/universer-api/comment/unit/'+_0x118d09+_0x4db05d(0x13a),{'body':_0x44cdff});return!_0x321893[_0x4db05d(0x143)][_0x4db05d(0x134)]||_0x321893['body'][_0x4db05d(0x134)][_0x4db05d(0x16d)]===0x1;}async[_0x32b9dc(0x132)](_0x28e9f4){const _0x18eb42=_0x32b9dc,{unitId:_0x21aca1}=_0x28e9f4,_0x943c3f=_0x28e9f4[_0x18eb42(0x130)],_0x29dbdf={'memberId':this[_0x18eb42(0x123)][_0x18eb42(0x17d)]()['userID'],'unitId':_0x21aca1,'threadId':_0x943c3f,'solved':_0x28e9f4[_0x18eb42(0x177)]?I[_0x18eb42(0x17e)]:I['OpenOrReOpen']},_0x461232=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x21aca1+'/solved',{'body':_0x29dbdf});return!_0x461232[_0x18eb42(0x143)][_0x18eb42(0x134)]||_0x461232[_0x18eb42(0x143)][_0x18eb42(0x134)]['code']===0x1;}async[_0x32b9dc(0x167)](_0xc2b08d,_0x440db4,_0x22e24c,_0x109188){const _0x4673da=_0x32b9dc,_0xf69d18={'memberId':(await this[_0x4673da(0x13d)][_0x4673da(0x140)](_0xc2b08d))[_0x4673da(0x124)](),'threadId':_0x22e24c,'replyId':_0x109188,'unitId':_0xc2b08d},_0x1a46c9=await this['_httpService']['post']('/universer-api/comment/unit/'+_0xc2b08d+'/delete',{'body':_0xf69d18});return!_0x1a46c9[_0x4673da(0x143)][_0x4673da(0x134)]||_0x1a46c9['body'][_0x4673da(0x134)][_0x4673da(0x16d)]===0x1;}async[_0x32b9dc(0x168)](_0x1ceecd,_0x5e2036,_0x1a1bb0){const _0x2ddf99=_0x32b9dc,_0x45aa66={'unitId':_0x1ceecd,'threadId':_0x1a1bb0},_0x11942a=await this[_0x2ddf99(0x16f)]['post'](_0x2ddf99(0x144)+_0x1ceecd+_0x2ddf99(0x14a),{'body':_0x45aa66}),_0x16d59b=_0x1a1bb0[_0x2ddf99(0x12a)](_0xbba3bc=>ee(_0x11942a['body'][_0x2ddf99(0x17b)][_0xbba3bc],_0x1ceecd,_0x5e2036))['filter'](Boolean);return Object[_0x2ddf99(0x13e)](_0x11942a['body'][_0x2ddf99(0x14e)])['forEach'](_0xffcd40=>{const _0x128ac2=_0x2ddf99;this['_userService'][_0x128ac2(0x135)](_0xffcd40);}),_0x16d59b;}['saveCommentToSnapshot'](_0x330ef1){const _0xe1a238=_0x32b9dc;return{'id':_0x330ef1['id'],'threadId':_0x330ef1['threadId'],'ref':_0x330ef1[_0xe1a238(0x16e)]};}};S=Q([b(0x0,_0x437868(_0x3ff6a4)),b(0x1,_0x437868(_0x4fcaa5)),b(0x2,_0x437868(_0x40bdf6))],S);var re=Object[_0x32b9dc(0x161)],te=(_0x95256f,_0x53083f,_0x5c70e6,_0x1365ed)=>{const _0x5872b1=_0x32b9dc;for(var _0x29db7a=_0x1365ed>0x1?void 0x0:_0x1365ed?re(_0x53083f,_0x5c70e6):_0x53083f,_0x5155f5=_0x95256f[_0x5872b1(0x155)]-0x1,_0x40a691;_0x5155f5>=0x0;_0x5155f5--)(_0x40a691=_0x95256f[_0x5155f5])&&(_0x29db7a=_0x40a691(_0x29db7a)||_0x29db7a);return _0x29db7a;},M=(_0x365fc3,_0x3d2b04)=>(_0x1dadad,_0x5a6819)=>_0x3d2b04(_0x1dadad,_0x5a6819,_0x365fc3);let f=class extends _0x503dbf{constructor(_0x432daf,_0x1afe1b){const _0x513a70=_0x32b9dc;super(),this[_0x513a70(0x13f)]=_0x432daf,this[_0x513a70(0x17a)]=_0x1afe1b,this['_initDataSource']();}[_0x32b9dc(0x133)](){const _0x4a258f=_0x32b9dc;this[_0x4a258f(0x13f)][_0x4a258f(0x159)]=this[_0x4a258f(0x17a)],this['_threadCommentDataSourceService'][_0x4a258f(0x145)]=!0x1;}};f=te([M(0x0,_0x52765f),M(0x1,_0x437868(S))],f);var se=Object['defineProperty'],oe=Object[_0x32b9dc(0x161)],ne=(_0x428ca5,_0x4b7e47,_0x3cf2eb)=>_0x4b7e47 in _0x428ca5?se(_0x428ca5,_0x4b7e47,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3cf2eb}):_0x428ca5[_0x4b7e47]=_0x3cf2eb,ie=(_0x46aa9b,_0x5224b5,_0x7edbe7,_0x2c5cc4)=>{const _0x199e2a=_0x32b9dc;for(var _0x4d3fc4=_0x2c5cc4>0x1?void 0x0:_0x2c5cc4?oe(_0x5224b5,_0x7edbe7):_0x5224b5,_0x555892=_0x46aa9b[_0x199e2a(0x155)]-0x1,_0x5cd87f;_0x555892>=0x0;_0x555892--)(_0x5cd87f=_0x46aa9b[_0x555892])&&(_0x4d3fc4=_0x5cd87f(_0x4d3fc4)||_0x4d3fc4);return _0x4d3fc4;},N=(_0x4b1894,_0x1c8ac9)=>(_0x1c1bce,_0x17f771)=>_0x1c8ac9(_0x1c1bce,_0x17f771,_0x4b1894),$=(_0x22658d,_0x5080c6,_0x2b0d4c)=>ne(_0x22658d,typeof _0x5080c6!=_0x32b9dc(0x14c)?_0x5080c6+'':_0x5080c6,_0x2b0d4c);let g=class extends _0x5b3091{constructor(_0x2c0ad1=O,_0x34be79,_0x413d60){const _0x55c274=_0x32b9dc;super(),this[_0x55c274(0x13c)]=_0x2c0ad1,this[_0x55c274(0x12f)]=_0x34be79,this[_0x55c274(0x174)]=_0x413d60;const {..._0x3aba16}=_0x3695bb({},O,this[_0x55c274(0x13c)]);this[_0x55c274(0x174)][_0x55c274(0x138)](z,_0x3aba16);}[_0x32b9dc(0x157)](){const _0x5d6ad4=_0x32b9dc;[[S],[f],[_]][_0x5d6ad4(0x15d)](_0x3cb404=>{const _0x5c0870=_0x5d6ad4;this[_0x5c0870(0x12f)][_0x5c0870(0x182)](_0x3cb404);});}['onReady'](){const _0x105523=_0x32b9dc;this[_0x105523(0x12f)]['get'](f),this['_injector'][_0x105523(0x171)](_);}};$(g,_0x32b9dc(0x17c),W),$(g,_0x32b9dc(0x181),_0x49071b['UNIVER_UNKNOWN']),g=ie([_0x4e1f0a(_0x5e766f,_0x4fc8ae,_0x41d447),N(0x1,_0x437868(_0xae6f09)),N(0x2,_0x4968d2)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x3b1ccc=_0x27d0;(function(_0x236341,_0x57c8ca){const _0x10b66c=_0x27d0,_0x2b9b68=_0x236341();while(!![]){try{const _0x4a20f8=-parseInt(_0x10b66c(0x162))/0x1*(-parseInt(_0x10b66c(0x121))/0x2)+parseInt(_0x10b66c(0x157))/0x3*(-parseInt(_0x10b66c(0x14a))/0x4)+-parseInt(_0x10b66c(0x138))/0x5*(-parseInt(_0x10b66c(0x13e))/0x6)+parseInt(_0x10b66c(0x14b))/0x7+parseInt(_0x10b66c(0x127))/0x8*(parseInt(_0x10b66c(0x151))/0x9)+-parseInt(_0x10b66c(0x128))/0xa*(parseInt(_0x10b66c(0x11c))/0xb)+-parseInt(_0x10b66c(0x174))/0xc*(parseInt(_0x10b66c(0x14e))/0xd);if(_0x4a20f8===_0x57c8ca)break;else _0x2b9b68['push'](_0x2b9b68['shift']());}catch(_0x28b8ff){_0x2b9b68['push'](_0x2b9b68['shift']());}}}(_0x1940,0x3166e));import{CommentService as _0x715a76,CollaborationSessionService as _0x35f564,UniverCollaborationClientPlugin as _0x4384f4}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2a32f2}from'@univerjs-pro/license';import{dayjs as _0x322dc9,UserManagerService as _0x2ce552,Inject as _0x34a257,Injector as _0x542498,Disposable as _0xf1ad03,CustomRangeType as _0x27f8f7,UniverInstanceType as _0x2ce404,DependentOn as _0xf85bf8,IConfigService as _0x3ec148,Plugin as _0x5e5be7,merge as _0x40a5c0}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x6ec7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x50892f,IThreadCommentDataSourceService as _0x4e0ea2}from'@univerjs/thread-comment';import{bufferTime as _0x32124d}from'rxjs';import{HTTPService as _0x4dc60b}from'@univerjs/network';const W=_0x3b1ccc(0x171);function _0x27d0(_0x7a5074,_0x1cd647){_0x7a5074=_0x7a5074-0x116;const _0x194020=_0x1940();let _0x27d0d4=_0x194020[_0x7a5074];return _0x27d0d4;}var I=(_0x3d8b6e=>(_0x3d8b6e[_0x3d8b6e['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x3d8b6e[_0x3d8b6e[_0x3b1ccc(0x167)]=0x1]=_0x3b1ccc(0x167),_0x3d8b6e[_0x3d8b6e[_0x3b1ccc(0x120)]=-0x1]=_0x3b1ccc(0x120),_0x3d8b6e))(I||{}),v=(_0x920794=>(_0x920794[_0x920794['Unknown']=0x0]=_0x3b1ccc(0x17a),_0x920794[_0x920794[_0x3b1ccc(0x141)]=0x1]=_0x3b1ccc(0x141),_0x920794[_0x920794[_0x3b1ccc(0x179)]=0x2]='Reply',_0x920794[_0x920794[_0x3b1ccc(0x180)]=0x3]=_0x3b1ccc(0x180),_0x920794[_0x920794[_0x3b1ccc(0x13a)]=0x4]=_0x3b1ccc(0x13a),_0x920794[_0x920794['Solve']=0x5]=_0x3b1ccc(0x118),_0x920794[_0x920794[_0x3b1ccc(0x120)]=-0x1]='UNRECOGNIZED',_0x920794))(v||{});function _0x1940(){const _0x5c5350=['Reply','Unknown','body','/delete','filter','deleteComment','rangeType','Edit','addUser','slice','userID','type','Solve','forEach','saveCommentToSnapshot','onStarting','1037509SYNQPY','requireSession','values','threadId','UNRECOGNIZED','22jCvODm','/universer-api/comment/unit/','_init','users','pipe','onReady','390072yZkFIf','10NTpLNU','comment','parentId','userId','/list','/add','_config','length','payload','rangeId','solved','unitId','_threadCommentModel','getComment','syncUpdateMutationToColla','_threadCommentDataSource','105EGWzda','parse','Delete','updateComment','COMMENT','/universer-api/user/list','43572nMEMSs','getOwnPropertyDescriptor','map','Add','_userService','add','customRanges','replyId','_httpService','getUnit','_configService','get','485512NfJLGe','2563848okvhGI','_commentService','dataSource','13pPwJcT','error','root','27zYXBmB','user','symbol','getMemberID','subscribe','post','6FzZumX','_threadCommentDataSourceService','disposeWithMe','_injector','OpenOrReOpen','YYYY/MM/DD\x20HH:mm','createTimestamp','_initDataSource','UNIVER_UNKNOWN','getUser','listComments','17653szNsce','ref','thread-comment-data-source.config','content','_initUserSync','Solved','replies','/edit','delete','resolveComment','format','getCurrentUser','reply','code','pluginName','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_sessionService','defineProperty','3837612srIMlu','resolved','addComment','personId','size'];_0x1940=function(){return _0x5c5350;};return _0x1940();}const y=_0x3954f5=>_0x322dc9(new Date(+_0x3954f5))[_0x3b1ccc(0x16c)](_0x3b1ccc(0x15c)),B=async(_0x2ff13c,_0x2bfb40)=>{const _0x96137f=_0x3b1ccc,_0x2ad364=_0x2ff13c[_0x96137f(0x149)](_0x2ce552),_0x2ef932=_0x2ff13c[_0x96137f(0x149)](_0x4dc60b);_0x2bfb40['forEach'](_0xafce86=>{const _0x20aaf2=_0x96137f;_0x2ad364[_0x20aaf2(0x160)](_0xafce86)&&_0x2bfb40[_0x20aaf2(0x16a)](_0xafce86);}),_0x2bfb40[_0x96137f(0x178)]&&(await _0x2ef932['get'](_0x96137f(0x13d),{'params':{'userIDs':[..._0x2bfb40]}}))['body'][_0x96137f(0x124)][_0x96137f(0x119)](_0x8e303b=>{const _0x439139=_0x96137f;_0x8e303b&&_0x2ad364[_0x439139(0x181)](_0x8e303b);});};var K=Object[_0x3b1ccc(0x13f)],V=(_0x56e419,_0x1e51e6,_0x16773c,_0x3dcb88)=>{const _0x2ecb08=_0x3b1ccc;for(var _0x1bbe56=_0x3dcb88>0x1?void 0x0:_0x3dcb88?K(_0x1e51e6,_0x16773c):_0x1e51e6,_0x1d4c81=_0x56e419[_0x2ecb08(0x12f)]-0x1,_0x2ff2bc;_0x1d4c81>=0x0;_0x1d4c81--)(_0x2ff2bc=_0x56e419[_0x1d4c81])&&(_0x1bbe56=_0x2ff2bc(_0x1bbe56)||_0x1bbe56);return _0x1bbe56;},p=(_0x187af4,_0x462ebf)=>(_0x48942c,_0x287630)=>_0x462ebf(_0x48942c,_0x287630,_0x187af4);let _=class extends _0xf1ad03{constructor(_0x5ae713,_0xb41ddc,_0x14b193,_0x34e918){const _0x30f290=_0x3b1ccc;super(),this[_0x30f290(0x14c)]=_0x5ae713,this[_0x30f290(0x134)]=_0xb41ddc,this[_0x30f290(0x142)]=_0x14b193,this[_0x30f290(0x15a)]=_0x34e918,this[_0x30f290(0x123)](),this[_0x30f290(0x166)]();}['_initUserSync'](){const _0x11a7d4=_0x3b1ccc;this[_0x11a7d4(0x159)](this[_0x11a7d4(0x134)]['commentUpdate$'][_0x11a7d4(0x125)](_0x32124d(0x10))[_0x11a7d4(0x155)](_0x27416d=>{const _0xd5e8ae=_0x11a7d4,_0x2d376f=new Set();_0x27416d['forEach'](_0x3f2bf1=>{const _0xb73af2=_0x27d0;switch(_0x3f2bf1[_0xb73af2(0x117)]){case _0xb73af2(0x143):{const _0x492253=_0x3f2bf1[_0xb73af2(0x130)][_0xb73af2(0x177)];_0x2d376f[_0xb73af2(0x143)](_0x492253);break;}}}),B(this[_0xd5e8ae(0x15a)],_0x2d376f);}));}[_0x3b1ccc(0x123)](){const _0x4e2533=_0x3b1ccc;this['disposeWithMe'](this[_0x4e2533(0x14c)]['commentUpdate$'][_0x4e2533(0x155)](async _0x16c9b7=>{const _0x2e8aa9=_0x4e2533;var _0x26ca62,_0x1063ca,_0x46b052,_0x474923;const _0xbfa2e5=(_0x26ca62=this[_0x2e8aa9(0x134)][_0x2e8aa9(0x147)](_0x16c9b7[_0x2e8aa9(0x133)])['find'](_0x3d5977=>_0x3d5977[_0x2e8aa9(0x11f)]===_0x16c9b7[_0x2e8aa9(0x11f)]))==null?void 0x0:_0x26ca62[_0x2e8aa9(0x150)];if(!_0xbfa2e5)return;const {unitId:_0x53b57e,subUnitId:_0x261012}=_0xbfa2e5;switch(_0x16c9b7[_0x2e8aa9(0x152)]&&this[_0x2e8aa9(0x142)]['addUser'](_0x16c9b7[_0x2e8aa9(0x152)]),_0x16c9b7[_0x2e8aa9(0x117)]){case v[_0x2e8aa9(0x141)]:break;case v[_0x2e8aa9(0x179)]:{this[_0x2e8aa9(0x134)]['addComment'](_0x53b57e,_0x261012,{'unitId':_0x53b57e,'subUnitId':_0x261012,'ref':'','id':_0x16c9b7[_0x2e8aa9(0x145)],'dT':y(+_0x16c9b7['createTimestamp']),'threadId':_0x16c9b7[_0x2e8aa9(0x11f)],'personId':(_0x46b052=(_0x1063ca=_0x16c9b7['user'])==null?void 0x0:_0x1063ca[_0x2e8aa9(0x116)])!=null?_0x46b052:_0x16c9b7[_0x2e8aa9(0x12b)],'text':JSON[_0x2e8aa9(0x139)](_0x16c9b7[_0x2e8aa9(0x165)]),'parentId':_0xbfa2e5['id']});break;}case v['Delete']:{const _0x20ff19=this[_0x2e8aa9(0x134)][_0x2e8aa9(0x135)](_0x53b57e,_0x261012,_0x16c9b7[_0x2e8aa9(0x145)]);_0x20ff19&&_0x20ff19[_0x2e8aa9(0x12a)]&&this[_0x2e8aa9(0x134)][_0x2e8aa9(0x17e)](_0x53b57e,_0x261012,_0x16c9b7[_0x2e8aa9(0x145)]);break;}case v[_0x2e8aa9(0x180)]:{this[_0x2e8aa9(0x134)][_0x2e8aa9(0x13b)](_0x53b57e,_0x261012,{'commentId':_0x16c9b7[_0x2e8aa9(0x145)],'text':JSON[_0x2e8aa9(0x139)](_0x16c9b7[_0x2e8aa9(0x165)])});break;}case v['Solve']:{const _0x1127d5=(_0x474923=this[_0x2e8aa9(0x134)]['getUnit'](_0x16c9b7[_0x2e8aa9(0x133)])['find'](_0x5d0227=>_0x5d0227[_0x2e8aa9(0x11f)]===_0x16c9b7[_0x2e8aa9(0x11f)]))==null?void 0x0:_0x474923['root'];_0x1127d5&&this[_0x2e8aa9(0x134)][_0x2e8aa9(0x16b)](_0x53b57e,_0x261012,_0x1127d5['id'],_0x16c9b7[_0x2e8aa9(0x132)]===I[_0x2e8aa9(0x167)]);break;}}}));}};_=V([p(0x0,_0x34a257(_0x715a76)),p(0x1,_0x34a257(_0x50892f)),p(0x2,_0x34a257(_0x2ce552)),p(0x3,_0x34a257(_0x542498))],_);const z=_0x3b1ccc(0x164),O={};var k=Object[_0x3b1ccc(0x13f)],Q=(_0x33e70b,_0x4698db,_0x14180d,_0x656761)=>{const _0x22064=_0x3b1ccc;for(var _0x1254d6=_0x656761>0x1?void 0x0:_0x656761?k(_0x4698db,_0x14180d):_0x4698db,_0x24523a=_0x33e70b[_0x22064(0x12f)]-0x1,_0xf8e5cd;_0x24523a>=0x0;_0x24523a--)(_0xf8e5cd=_0x33e70b[_0x24523a])&&(_0x1254d6=_0xf8e5cd(_0x1254d6)||_0x1254d6);return _0x1254d6;},b=(_0x590136,_0x2e2a90)=>(_0x1cca12,_0x3b46bb)=>_0x2e2a90(_0x1cca12,_0x3b46bb,_0x590136);function X(_0x1d0a25,_0x2148b7){const _0x23810d=_0x3b1ccc,_0x4c3c33=_0x1d0a25[_0x23810d(0x168)][0x0];return{..._0x2148b7,'id':_0x4c3c33[_0x23810d(0x145)],'resolved':_0x1d0a25['solved']===0x1,'dT':y(_0x4c3c33[_0x23810d(0x15d)]),'personId':_0x4c3c33[_0x23810d(0x12b)],'threadId':_0x4c3c33[_0x23810d(0x11f)]};}function ee(_0x56a363,_0x5b94a2,_0x3d1012){const _0x454844=_0x3b1ccc;var _0x59b7df,_0xe27b8a;if(((_0xe27b8a=(_0x59b7df=_0x56a363==null?void 0x0:_0x56a363[_0x454844(0x168)])==null?void 0x0:_0x59b7df[_0x454844(0x12f)])!=null?_0xe27b8a:0x0)>0x0){const _0x563fd3=(_0x564cb6,_0xb801e)=>({'id':_0x564cb6[_0x454844(0x145)],'threadId':_0x564cb6[_0x454844(0x11f)],'dT':y(_0x564cb6['createTimestamp']),'personId':_0x564cb6[_0x454844(0x12b)],'resolved':_0x56a363['solved']===I[_0x454844(0x167)],'unitId':_0x5b94a2,'subUnitId':_0x3d1012,'text':JSON[_0x454844(0x139)](_0x564cb6[_0x454844(0x165)]),'parentId':_0xb801e}),_0x269309=_0x563fd3(_0x56a363[_0x454844(0x168)][0x0]);return{..._0x269309,'children':_0x56a363[_0x454844(0x168)][_0x454844(0x182)](0x1)['map'](_0xb02d69=>_0x563fd3(_0xb02d69,_0x269309['id']))};}return null;}let S=class{constructor(_0x382220,_0x33eff5,_0x333d89){const _0x5b8f75=_0x3b1ccc;this[_0x5b8f75(0x146)]=_0x382220,this['_userService']=_0x33eff5,this[_0x5b8f75(0x172)]=_0x333d89;}async[_0x3b1ccc(0x176)](_0x2be025){const _0x36f2bc=_0x3b1ccc;var _0x1bfd07,_0x1cb9b6;const {parentId:_0x4cea74,unitId:_0xb3a5ae,text:_0x347d37,threadId:_0x1c501d}=_0x2be025,_0x599543=(_0x1cb9b6=(_0x1bfd07=_0x347d37[_0x36f2bc(0x144)])==null?void 0x0:_0x1bfd07[_0x36f2bc(0x17d)](_0x55d1d2=>_0x55d1d2['rangeType']===_0x27f8f7['COMMENT'])[_0x36f2bc(0x140)](_0x12e71f=>_0x12e71f[_0x36f2bc(0x131)]))!=null?_0x1cb9b6:[],_0x3c91ea=JSON['stringify'](_0x347d37),_0x52e5c9=(await this['_sessionService'][_0x36f2bc(0x11d)](_0xb3a5ae))[_0x36f2bc(0x154)]();if(_0x4cea74){const _0x53504f={'memberId':_0x52e5c9,'unitId':_0xb3a5ae,'content':_0x3c91ea,'mention':_0x599543,'threadId':_0x1c501d},_0x42dbd0=(await this['_httpService']['post'](_0x36f2bc(0x122)+_0xb3a5ae+'/reply',{'body':_0x53504f}))['body'][_0x36f2bc(0x16e)];return{..._0x2be025,'id':_0x42dbd0[_0x36f2bc(0x145)],'dT':_0x322dc9(+_0x42dbd0[_0x36f2bc(0x15d)])['format'](_0x36f2bc(0x15c)),'personId':_0x42dbd0[_0x36f2bc(0x12b)]};}else{const _0x39215a={'memberId':_0x52e5c9,'unitId':_0xb3a5ae,'content':_0x3c91ea,'mention':_0x599543},_0x15435c=await this[_0x36f2bc(0x146)][_0x36f2bc(0x156)]('/universer-api/comment/unit/'+_0xb3a5ae+_0x36f2bc(0x12d),{'body':_0x39215a});return X(_0x15435c[_0x36f2bc(0x17b)][_0x36f2bc(0x129)],_0x2be025);}}async[_0x3b1ccc(0x13b)](_0x4d0697){const _0x489600=_0x3b1ccc;var _0x1f3ce8,_0xdaa5d;const {text:_0x5535c7,unitId:_0x12a1d3}=_0x4d0697,_0x23e50e=(_0xdaa5d=(_0x1f3ce8=_0x5535c7[_0x489600(0x144)])==null?void 0x0:_0x1f3ce8[_0x489600(0x17d)](_0x2962f1=>_0x2962f1[_0x489600(0x17f)]===_0x27f8f7[_0x489600(0x13c)])['map'](_0xb29d61=>_0xb29d61[_0x489600(0x131)]))!=null?_0xdaa5d:[],_0x343cb8=JSON['stringify'](_0x5535c7),_0x28e1ff=_0x4d0697[_0x489600(0x11f)],_0x3249eb=_0x4d0697['id'],_0x5d58d7={'memberId':(await this[_0x489600(0x172)][_0x489600(0x11d)](_0x12a1d3))[_0x489600(0x154)](),'unitId':_0x12a1d3,'threadId':_0x28e1ff,'mention':_0x23e50e,'content':_0x343cb8,'replyId':_0x3249eb},_0x2cbb55=await this[_0x489600(0x146)][_0x489600(0x156)]('/universer-api/comment/unit/'+_0x12a1d3+_0x489600(0x169),{'body':_0x5d58d7});return!_0x2cbb55[_0x489600(0x17b)]['error']||_0x2cbb55[_0x489600(0x17b)][_0x489600(0x14f)][_0x489600(0x16f)]===0x1;}async[_0x3b1ccc(0x16b)](_0x2994be){const _0x142224=_0x3b1ccc,{unitId:_0x449268}=_0x2994be,_0x2bd30e=_0x2994be['threadId'],_0x2bebef={'memberId':this['_userService'][_0x142224(0x16d)]()['userID'],'unitId':_0x449268,'threadId':_0x2bd30e,'solved':_0x2994be[_0x142224(0x175)]?I[_0x142224(0x167)]:I[_0x142224(0x15b)]},_0x52449b=await this[_0x142224(0x146)]['post'](_0x142224(0x122)+_0x449268+'/solved',{'body':_0x2bebef});return!_0x52449b[_0x142224(0x17b)][_0x142224(0x14f)]||_0x52449b[_0x142224(0x17b)][_0x142224(0x14f)][_0x142224(0x16f)]===0x1;}async[_0x3b1ccc(0x17e)](_0x44377c,_0x3aadce,_0x7cd45a,_0x117789){const _0x1b2587=_0x3b1ccc,_0x416701={'memberId':(await this[_0x1b2587(0x172)][_0x1b2587(0x11d)](_0x44377c))['getMemberID'](),'threadId':_0x7cd45a,'replyId':_0x117789,'unitId':_0x44377c},_0x2b87a7=await this[_0x1b2587(0x146)]['post'](_0x1b2587(0x122)+_0x44377c+_0x1b2587(0x17c),{'body':_0x416701});return!_0x2b87a7[_0x1b2587(0x17b)]['error']||_0x2b87a7[_0x1b2587(0x17b)][_0x1b2587(0x14f)][_0x1b2587(0x16f)]===0x1;}async[_0x3b1ccc(0x161)](_0x513309,_0x44a170,_0x5a205e){const _0x3dbe41=_0x3b1ccc,_0x5a5020={'unitId':_0x513309,'threadId':_0x5a205e},_0x54616b=await this[_0x3dbe41(0x146)][_0x3dbe41(0x156)](_0x3dbe41(0x122)+_0x513309+_0x3dbe41(0x12c),{'body':_0x5a5020}),_0x52a8f8=_0x5a205e[_0x3dbe41(0x140)](_0x3f45a0=>ee(_0x54616b[_0x3dbe41(0x17b)]['comments'][_0x3f45a0],_0x513309,_0x44a170))[_0x3dbe41(0x17d)](Boolean);return Object[_0x3dbe41(0x11e)](_0x54616b['body'][_0x3dbe41(0x124)])[_0x3dbe41(0x119)](_0x115870=>{this['_userService']['addUser'](_0x115870);}),_0x52a8f8;}[_0x3b1ccc(0x11a)](_0x15bcb6){const _0x59f231=_0x3b1ccc;return{'id':_0x15bcb6['id'],'threadId':_0x15bcb6[_0x59f231(0x11f)],'ref':_0x15bcb6[_0x59f231(0x163)]};}};S=Q([b(0x0,_0x34a257(_0x4dc60b)),b(0x1,_0x34a257(_0x2ce552)),b(0x2,_0x34a257(_0x35f564))],S);var re=Object[_0x3b1ccc(0x13f)],te=(_0x545ab2,_0x349763,_0x319f90,_0x351b4d)=>{const _0x482b5f=_0x3b1ccc;for(var _0xb55e0d=_0x351b4d>0x1?void 0x0:_0x351b4d?re(_0x349763,_0x319f90):_0x349763,_0x2921ae=_0x545ab2[_0x482b5f(0x12f)]-0x1,_0x4ade7f;_0x2921ae>=0x0;_0x2921ae--)(_0x4ade7f=_0x545ab2[_0x2921ae])&&(_0xb55e0d=_0x4ade7f(_0xb55e0d)||_0xb55e0d);return _0xb55e0d;},M=(_0x4bb05f,_0x39ada5)=>(_0x292d4a,_0x349875)=>_0x39ada5(_0x292d4a,_0x349875,_0x4bb05f);let f=class extends _0xf1ad03{constructor(_0x1157b6,_0x98569c){const _0x1e1dda=_0x3b1ccc;super(),this[_0x1e1dda(0x158)]=_0x1157b6,this[_0x1e1dda(0x137)]=_0x98569c,this[_0x1e1dda(0x15e)]();}[_0x3b1ccc(0x15e)](){const _0x1b6071=_0x3b1ccc;this[_0x1b6071(0x158)][_0x1b6071(0x14d)]=this['_threadCommentDataSource'],this[_0x1b6071(0x158)][_0x1b6071(0x136)]=!0x1;}};f=te([M(0x0,_0x4e0ea2),M(0x1,_0x34a257(S))],f);var se=Object[_0x3b1ccc(0x173)],oe=Object[_0x3b1ccc(0x13f)],ne=(_0x5098e5,_0x1dac09,_0x26581a)=>_0x1dac09 in _0x5098e5?se(_0x5098e5,_0x1dac09,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x26581a}):_0x5098e5[_0x1dac09]=_0x26581a,ie=(_0x2ed43a,_0x50f2f6,_0x302d18,_0x3f5a0b)=>{const _0x503c4f=_0x3b1ccc;for(var _0x379f2c=_0x3f5a0b>0x1?void 0x0:_0x3f5a0b?oe(_0x50f2f6,_0x302d18):_0x50f2f6,_0x4f6203=_0x2ed43a[_0x503c4f(0x12f)]-0x1,_0x48100c;_0x4f6203>=0x0;_0x4f6203--)(_0x48100c=_0x2ed43a[_0x4f6203])&&(_0x379f2c=_0x48100c(_0x379f2c)||_0x379f2c);return _0x379f2c;},N=(_0x90a456,_0x380a62)=>(_0xf6dacc,_0x3e2ee3)=>_0x380a62(_0xf6dacc,_0x3e2ee3,_0x90a456),$=(_0x307a8d,_0xd797e0,_0x4069b1)=>ne(_0x307a8d,typeof _0xd797e0!=_0x3b1ccc(0x153)?_0xd797e0+'':_0xd797e0,_0x4069b1);let g=class extends _0x5e5be7{constructor(_0x4d6547=O,_0x418777,_0x5df7fe){const _0x743115=_0x3b1ccc;super(),this[_0x743115(0x12e)]=_0x4d6547,this[_0x743115(0x15a)]=_0x418777,this[_0x743115(0x148)]=_0x5df7fe;const {..._0x28a935}=_0x40a5c0({},O,this[_0x743115(0x12e)]);this[_0x743115(0x148)]['setConfig'](z,_0x28a935);}[_0x3b1ccc(0x11b)](){const _0x57fc02=_0x3b1ccc;[[S],[f],[_]][_0x57fc02(0x119)](_0x137a9f=>{const _0x3437ca=_0x57fc02;this[_0x3437ca(0x15a)][_0x3437ca(0x143)](_0x137a9f);});}[_0x3b1ccc(0x126)](){const _0x368d96=_0x3b1ccc;this['_injector'][_0x368d96(0x149)](f),this[_0x368d96(0x15a)][_0x368d96(0x149)](_);}};$(g,_0x3b1ccc(0x170),W),$(g,_0x3b1ccc(0x117),_0x2ce404[_0x3b1ccc(0x15f)]),g=ie([_0xf85bf8(_0x6ec7,_0x4384f4,_0x2a32f2),N(0x1,_0x34a257(_0x542498)),N(0x2,_0x3ec148)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x32b9dc=_0x1b1b;(function(_0x549bd0,_0x293035){const _0x34e972=_0x1b1b,_0x31e4d9=_0x549bd0();while(!![]){try{const _0x481c4b=-parseInt(_0x34e972(0x129))/0x1*(parseInt(_0x34e972(0x147))/0x2)+-parseInt(_0x34e972(0x180))/0x3*(parseInt(_0x34e972(0x169))/0x4)+-parseInt(_0x34e972(0x16a))/0x5+-parseInt(_0x34e972(0x156))/0x6*(parseInt(_0x34e972(0x151))/0x7)+parseInt(_0x34e972(0x163))/0x8*(-parseInt(_0x34e972(0x15a))/0x9)+-parseInt(_0x34e972(0x164))/0xa*(parseInt(_0x34e972(0x13b))/0xb)+parseInt(_0x34e972(0x158))/0xc;if(_0x481c4b===_0x293035)break;else _0x31e4d9['push'](_0x31e4d9['shift']());}catch(_0x4b059a){_0x31e4d9['push'](_0x31e4d9['shift']());}}}(_0x20ab,0x20c9a));import{CommentService as _0x3ea4c9,CollaborationSessionService as _0x40bdf6,UniverCollaborationClientPlugin as _0x4fc8ae}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x41d447}from'@univerjs-pro/license';import{dayjs as _0x13af09,UserManagerService as _0x4fcaa5,Inject as _0x437868,Injector as _0xae6f09,Disposable as _0x503dbf,CustomRangeType as _0x5ee21e,UniverInstanceType as _0x49071b,DependentOn as _0x4e1f0a,IConfigService as _0x4968d2,Plugin as _0x5b3091,merge as _0x3695bb}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5e766f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1d12fa,IThreadCommentDataSourceService as _0x52765f}from'@univerjs/thread-comment';import{bufferTime as _0x84f976}from'rxjs';import{HTTPService as _0x3ff6a4}from'@univerjs/network';const W=_0x32b9dc(0x136);var I=(_0x33b554=>(_0x33b554[_0x33b554[_0x32b9dc(0x14d)]=0x0]=_0x32b9dc(0x14d),_0x33b554[_0x33b554[_0x32b9dc(0x17e)]=0x1]=_0x32b9dc(0x17e),_0x33b554[_0x33b554[_0x32b9dc(0x165)]=-0x1]=_0x32b9dc(0x165),_0x33b554))(I||{}),v=(_0x119e4d=>(_0x119e4d[_0x119e4d['Unknown']=0x0]='Unknown',_0x119e4d[_0x119e4d[_0x32b9dc(0x12d)]=0x1]=_0x32b9dc(0x12d),_0x119e4d[_0x119e4d[_0x32b9dc(0x16c)]=0x2]=_0x32b9dc(0x16c),_0x119e4d[_0x119e4d[_0x32b9dc(0x166)]=0x3]=_0x32b9dc(0x166),_0x119e4d[_0x119e4d[_0x32b9dc(0x149)]=0x4]='Delete',_0x119e4d[_0x119e4d[_0x32b9dc(0x179)]=0x5]=_0x32b9dc(0x179),_0x119e4d[_0x119e4d[_0x32b9dc(0x165)]=-0x1]=_0x32b9dc(0x165),_0x119e4d))(v||{});const y=_0x28e007=>_0x13af09(new Date(+_0x28e007))['format'](_0x32b9dc(0x16b)),B=async(_0x5998df,_0x5319eb)=>{const _0x508a57=_0x32b9dc,_0x137d18=_0x5998df['get'](_0x4fcaa5),_0x55ce6f=_0x5998df[_0x508a57(0x171)](_0x3ff6a4);_0x5319eb[_0x508a57(0x15d)](_0x43175e=>{const _0x200b65=_0x508a57;_0x137d18[_0x200b65(0x15e)](_0x43175e)&&_0x5319eb[_0x200b65(0x178)](_0x43175e);}),_0x5319eb['size']&&(await _0x55ce6f[_0x508a57(0x171)](_0x508a57(0x173),{'params':{'userIDs':[..._0x5319eb]}}))[_0x508a57(0x143)][_0x508a57(0x14e)][_0x508a57(0x15d)](_0x5005ea=>{const _0x2e6e6c=_0x508a57;_0x5005ea&&_0x137d18[_0x2e6e6c(0x135)](_0x5005ea);});};var K=Object[_0x32b9dc(0x161)],V=(_0x544eb3,_0x681674,_0x127d7b,_0x4d671a)=>{const _0x338166=_0x32b9dc;for(var _0x56ea57=_0x4d671a>0x1?void 0x0:_0x4d671a?K(_0x681674,_0x127d7b):_0x681674,_0x5f5807=_0x544eb3[_0x338166(0x155)]-0x1,_0x2a02c2;_0x5f5807>=0x0;_0x5f5807--)(_0x2a02c2=_0x544eb3[_0x5f5807])&&(_0x56ea57=_0x2a02c2(_0x56ea57)||_0x56ea57);return _0x56ea57;},p=(_0x526ece,_0x2eadeb)=>(_0x2e0510,_0x2b0463)=>_0x2eadeb(_0x2e0510,_0x2b0463,_0x526ece);let _=class extends _0x503dbf{constructor(_0x169431,_0xf19e1e,_0x208cc0,_0x558310){const _0x5395cd=_0x32b9dc;super(),this[_0x5395cd(0x152)]=_0x169431,this[_0x5395cd(0x12c)]=_0xf19e1e,this[_0x5395cd(0x123)]=_0x208cc0,this[_0x5395cd(0x12f)]=_0x558310,this[_0x5395cd(0x146)](),this['_initUserSync']();}[_0x32b9dc(0x172)](){const _0x2a9a4e=_0x32b9dc;this[_0x2a9a4e(0x126)](this[_0x2a9a4e(0x12c)][_0x2a9a4e(0x160)][_0x2a9a4e(0x137)](_0x84f976(0x10))[_0x2a9a4e(0x15b)](_0x15e6e4=>{const _0x4bd91e=_0x2a9a4e,_0x35d067=new Set();_0x15e6e4[_0x4bd91e(0x15d)](_0x456f3f=>{const _0x45da7b=_0x4bd91e;switch(_0x456f3f['type']){case _0x45da7b(0x182):{const _0x1e6426=_0x456f3f[_0x45da7b(0x142)]['personId'];_0x35d067[_0x45da7b(0x182)](_0x1e6426);break;}}}),B(this[_0x4bd91e(0x12f)],_0x35d067);}));}[_0x32b9dc(0x146)](){const _0x12ca6e=_0x32b9dc;this[_0x12ca6e(0x126)](this[_0x12ca6e(0x152)][_0x12ca6e(0x160)][_0x12ca6e(0x15b)](async _0x952833=>{const _0x194a9d=_0x12ca6e;var _0x4c02da,_0x46e0da,_0x41b64e,_0x5346a5;const _0xc95e14=(_0x4c02da=this['_threadCommentModel']['getUnit'](_0x952833[_0x194a9d(0x14b)])[_0x194a9d(0x128)](_0x334f25=>_0x334f25[_0x194a9d(0x130)]===_0x952833[_0x194a9d(0x130)]))==null?void 0x0:_0x4c02da['root'];if(!_0xc95e14)return;const {unitId:_0x3653c8,subUnitId:_0x15ff5b}=_0xc95e14;switch(_0x952833['user']&&this['_userService'][_0x194a9d(0x135)](_0x952833[_0x194a9d(0x154)]),_0x952833[_0x194a9d(0x181)]){case v[_0x194a9d(0x12d)]:break;case v['Reply']:{this[_0x194a9d(0x12c)][_0x194a9d(0x15c)](_0x3653c8,_0x15ff5b,{'unitId':_0x3653c8,'subUnitId':_0x15ff5b,'ref':'','id':_0x952833[_0x194a9d(0x139)],'dT':y(+_0x952833[_0x194a9d(0x127)]),'threadId':_0x952833[_0x194a9d(0x130)],'personId':(_0x41b64e=(_0x46e0da=_0x952833[_0x194a9d(0x154)])==null?void 0x0:_0x46e0da[_0x194a9d(0x162)])!=null?_0x41b64e:_0x952833['userId'],'text':JSON[_0x194a9d(0x183)](_0x952833[_0x194a9d(0x125)]),'parentId':_0xc95e14['id']});break;}case v['Delete']:{const _0x328f8d=this[_0x194a9d(0x12c)]['getComment'](_0x3653c8,_0x15ff5b,_0x952833[_0x194a9d(0x139)]);_0x328f8d&&_0x328f8d[_0x194a9d(0x14f)]&&this[_0x194a9d(0x12c)][_0x194a9d(0x167)](_0x3653c8,_0x15ff5b,_0x952833[_0x194a9d(0x139)]);break;}case v[_0x194a9d(0x166)]:{this['_threadCommentModel'][_0x194a9d(0x131)](_0x3653c8,_0x15ff5b,{'commentId':_0x952833[_0x194a9d(0x139)],'text':JSON[_0x194a9d(0x183)](_0x952833[_0x194a9d(0x125)])});break;}case v['Solve']:{const _0x3d093c=(_0x5346a5=this[_0x194a9d(0x12c)]['getUnit'](_0x952833[_0x194a9d(0x14b)])[_0x194a9d(0x128)](_0x216dfd=>_0x216dfd[_0x194a9d(0x130)]===_0x952833[_0x194a9d(0x130)]))==null?void 0x0:_0x5346a5[_0x194a9d(0x17f)];_0x3d093c&&this[_0x194a9d(0x12c)][_0x194a9d(0x132)](_0x3653c8,_0x15ff5b,_0x3d093c['id'],_0x952833[_0x194a9d(0x12e)]===I[_0x194a9d(0x17e)]);break;}}}));}};_=V([p(0x0,_0x437868(_0x3ea4c9)),p(0x1,_0x437868(_0x1d12fa)),p(0x2,_0x437868(_0x4fcaa5)),p(0x3,_0x437868(_0xae6f09))],_);const z=_0x32b9dc(0x170),O={};function _0x20ab(){const _0x1d63e5=['type','add','parse','rangeId','_userService','getMemberID','content','disposeWithMe','createTimestamp','find','1mUhyuV','map','customRanges','_threadCommentModel','Add','solved','_injector','threadId','updateComment','resolveComment','_initDataSource','error','addUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','pipe','setConfig','replyId','/edit','275ViNTCq','_config','_sessionService','values','_threadCommentDataSourceService','requireSession','stringify','payload','body','/universer-api/comment/unit/','syncUpdateMutationToColla','_init','147218XCpKWq','slice','Delete','/list','unitId','symbol','OpenOrReOpen','users','parentId','userId','184373ORNzhJ','_commentService','filter','user','length','18jWDwEY','onStarting','10397688VDmLKo','dataSource','27oRNQdW','subscribe','addComment','forEach','getUser','replies','commentUpdate$','getOwnPropertyDescriptor','userID','485864LnRzIY','34230aMjVlb','UNRECOGNIZED','Edit','deleteComment','listComments','2972BXReBG','485245XYJzWU','YYYY/MM/DD\x20HH:mm','Reply','code','ref','_httpService','thread-comment-data-source.config','get','_initUserSync','/universer-api/user/list','_configService','/add','rangeType','resolved','delete','Solve','_threadCommentDataSource','comments','pluginName','getCurrentUser','Solved','root','867WGvHcU'];_0x20ab=function(){return _0x1d63e5;};return _0x20ab();}function _0x1b1b(_0x39870a,_0x834e9d){_0x39870a=_0x39870a-0x122;const _0x20abc2=_0x20ab();let _0x1b1b6a=_0x20abc2[_0x39870a];return _0x1b1b6a;}var k=Object[_0x32b9dc(0x161)],Q=(_0x587e6c,_0x36ab8d,_0x512beb,_0x37bd2c)=>{const _0x52d762=_0x32b9dc;for(var _0x47b8ac=_0x37bd2c>0x1?void 0x0:_0x37bd2c?k(_0x36ab8d,_0x512beb):_0x36ab8d,_0x7e51af=_0x587e6c[_0x52d762(0x155)]-0x1,_0x2df0a6;_0x7e51af>=0x0;_0x7e51af--)(_0x2df0a6=_0x587e6c[_0x7e51af])&&(_0x47b8ac=_0x2df0a6(_0x47b8ac)||_0x47b8ac);return _0x47b8ac;},b=(_0x2fa719,_0x50f9c4)=>(_0x3ecc74,_0x35f349)=>_0x50f9c4(_0x3ecc74,_0x35f349,_0x2fa719);function X(_0x226259,_0x4ce389){const _0x2d703a=_0x32b9dc,_0x47449a=_0x226259['replies'][0x0];return{..._0x4ce389,'id':_0x47449a['replyId'],'resolved':_0x226259[_0x2d703a(0x12e)]===0x1,'dT':y(_0x47449a['createTimestamp']),'personId':_0x47449a['userId'],'threadId':_0x47449a[_0x2d703a(0x130)]};}function ee(_0x48d912,_0x5bba16,_0x9d8cb9){const _0x169b55=_0x32b9dc;var _0x492131,_0x9665aa;if(((_0x9665aa=(_0x492131=_0x48d912==null?void 0x0:_0x48d912[_0x169b55(0x15f)])==null?void 0x0:_0x492131['length'])!=null?_0x9665aa:0x0)>0x0){const _0xac84a0=(_0x1f4208,_0x19a437)=>({'id':_0x1f4208[_0x169b55(0x139)],'threadId':_0x1f4208[_0x169b55(0x130)],'dT':y(_0x1f4208[_0x169b55(0x127)]),'personId':_0x1f4208['userId'],'resolved':_0x48d912[_0x169b55(0x12e)]===I[_0x169b55(0x17e)],'unitId':_0x5bba16,'subUnitId':_0x9d8cb9,'text':JSON[_0x169b55(0x183)](_0x1f4208['content']),'parentId':_0x19a437}),_0x2e4c6f=_0xac84a0(_0x48d912['replies'][0x0]);return{..._0x2e4c6f,'children':_0x48d912[_0x169b55(0x15f)][_0x169b55(0x148)](0x1)[_0x169b55(0x12a)](_0x12df48=>_0xac84a0(_0x12df48,_0x2e4c6f['id']))};}return null;}let S=class{constructor(_0x17e3c9,_0x576942,_0x446493){const _0x2931f9=_0x32b9dc;this['_httpService']=_0x17e3c9,this['_userService']=_0x576942,this[_0x2931f9(0x13d)]=_0x446493;}async[_0x32b9dc(0x15c)](_0x362dbc){const _0x5bca19=_0x32b9dc;var _0x39801e,_0x42bae0;const {parentId:_0x199acc,unitId:_0x6a7324,text:_0x2f44c0,threadId:_0x295837}=_0x362dbc,_0x416f67=(_0x42bae0=(_0x39801e=_0x2f44c0[_0x5bca19(0x12b)])==null?void 0x0:_0x39801e[_0x5bca19(0x153)](_0x197da5=>_0x197da5['rangeType']===_0x5ee21e['COMMENT'])['map'](_0x3677d3=>_0x3677d3['rangeId']))!=null?_0x42bae0:[],_0x348611=JSON['stringify'](_0x2f44c0),_0x3d3312=(await this[_0x5bca19(0x13d)]['requireSession'](_0x6a7324))['getMemberID']();if(_0x199acc){const _0x3b6d28={'memberId':_0x3d3312,'unitId':_0x6a7324,'content':_0x348611,'mention':_0x416f67,'threadId':_0x295837},_0x1fe2e9=(await this[_0x5bca19(0x16f)]['post']('/universer-api/comment/unit/'+_0x6a7324+'/reply',{'body':_0x3b6d28}))[_0x5bca19(0x143)]['reply'];return{..._0x362dbc,'id':_0x1fe2e9[_0x5bca19(0x139)],'dT':_0x13af09(+_0x1fe2e9[_0x5bca19(0x127)])['format'](_0x5bca19(0x16b)),'personId':_0x1fe2e9[_0x5bca19(0x150)]};}else{const _0x1fd6e3={'memberId':_0x3d3312,'unitId':_0x6a7324,'content':_0x348611,'mention':_0x416f67},_0x6a7b3=await this['_httpService']['post'](_0x5bca19(0x144)+_0x6a7324+_0x5bca19(0x175),{'body':_0x1fd6e3});return X(_0x6a7b3[_0x5bca19(0x143)]['comment'],_0x362dbc);}}async['updateComment'](_0x35c8f0){const _0x4db05d=_0x32b9dc;var _0x216a24,_0x31332a;const {text:_0x1cf7e5,unitId:_0x118d09}=_0x35c8f0,_0x4ad272=(_0x31332a=(_0x216a24=_0x1cf7e5[_0x4db05d(0x12b)])==null?void 0x0:_0x216a24[_0x4db05d(0x153)](_0x552ab2=>_0x552ab2[_0x4db05d(0x176)]===_0x5ee21e['COMMENT'])[_0x4db05d(0x12a)](_0x29c0b6=>_0x29c0b6[_0x4db05d(0x122)]))!=null?_0x31332a:[],_0x1a3e17=JSON[_0x4db05d(0x141)](_0x1cf7e5),_0x3ae251=_0x35c8f0[_0x4db05d(0x130)],_0x68b2d7=_0x35c8f0['id'],_0x44cdff={'memberId':(await this[_0x4db05d(0x13d)][_0x4db05d(0x140)](_0x118d09))[_0x4db05d(0x124)](),'unitId':_0x118d09,'threadId':_0x3ae251,'mention':_0x4ad272,'content':_0x1a3e17,'replyId':_0x68b2d7},_0x321893=await this[_0x4db05d(0x16f)]['post']('/universer-api/comment/unit/'+_0x118d09+_0x4db05d(0x13a),{'body':_0x44cdff});return!_0x321893[_0x4db05d(0x143)][_0x4db05d(0x134)]||_0x321893['body'][_0x4db05d(0x134)][_0x4db05d(0x16d)]===0x1;}async[_0x32b9dc(0x132)](_0x28e9f4){const _0x18eb42=_0x32b9dc,{unitId:_0x21aca1}=_0x28e9f4,_0x943c3f=_0x28e9f4[_0x18eb42(0x130)],_0x29dbdf={'memberId':this[_0x18eb42(0x123)][_0x18eb42(0x17d)]()['userID'],'unitId':_0x21aca1,'threadId':_0x943c3f,'solved':_0x28e9f4[_0x18eb42(0x177)]?I[_0x18eb42(0x17e)]:I['OpenOrReOpen']},_0x461232=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x21aca1+'/solved',{'body':_0x29dbdf});return!_0x461232[_0x18eb42(0x143)][_0x18eb42(0x134)]||_0x461232[_0x18eb42(0x143)][_0x18eb42(0x134)]['code']===0x1;}async[_0x32b9dc(0x167)](_0xc2b08d,_0x440db4,_0x22e24c,_0x109188){const _0x4673da=_0x32b9dc,_0xf69d18={'memberId':(await this[_0x4673da(0x13d)][_0x4673da(0x140)](_0xc2b08d))[_0x4673da(0x124)](),'threadId':_0x22e24c,'replyId':_0x109188,'unitId':_0xc2b08d},_0x1a46c9=await this['_httpService']['post']('/universer-api/comment/unit/'+_0xc2b08d+'/delete',{'body':_0xf69d18});return!_0x1a46c9[_0x4673da(0x143)][_0x4673da(0x134)]||_0x1a46c9['body'][_0x4673da(0x134)][_0x4673da(0x16d)]===0x1;}async[_0x32b9dc(0x168)](_0x1ceecd,_0x5e2036,_0x1a1bb0){const _0x2ddf99=_0x32b9dc,_0x45aa66={'unitId':_0x1ceecd,'threadId':_0x1a1bb0},_0x11942a=await this[_0x2ddf99(0x16f)]['post'](_0x2ddf99(0x144)+_0x1ceecd+_0x2ddf99(0x14a),{'body':_0x45aa66}),_0x16d59b=_0x1a1bb0[_0x2ddf99(0x12a)](_0xbba3bc=>ee(_0x11942a['body'][_0x2ddf99(0x17b)][_0xbba3bc],_0x1ceecd,_0x5e2036))['filter'](Boolean);return Object[_0x2ddf99(0x13e)](_0x11942a['body'][_0x2ddf99(0x14e)])['forEach'](_0xffcd40=>{const _0x128ac2=_0x2ddf99;this['_userService'][_0x128ac2(0x135)](_0xffcd40);}),_0x16d59b;}['saveCommentToSnapshot'](_0x330ef1){const _0xe1a238=_0x32b9dc;return{'id':_0x330ef1['id'],'threadId':_0x330ef1['threadId'],'ref':_0x330ef1[_0xe1a238(0x16e)]};}};S=Q([b(0x0,_0x437868(_0x3ff6a4)),b(0x1,_0x437868(_0x4fcaa5)),b(0x2,_0x437868(_0x40bdf6))],S);var re=Object[_0x32b9dc(0x161)],te=(_0x95256f,_0x53083f,_0x5c70e6,_0x1365ed)=>{const _0x5872b1=_0x32b9dc;for(var _0x29db7a=_0x1365ed>0x1?void 0x0:_0x1365ed?re(_0x53083f,_0x5c70e6):_0x53083f,_0x5155f5=_0x95256f[_0x5872b1(0x155)]-0x1,_0x40a691;_0x5155f5>=0x0;_0x5155f5--)(_0x40a691=_0x95256f[_0x5155f5])&&(_0x29db7a=_0x40a691(_0x29db7a)||_0x29db7a);return _0x29db7a;},M=(_0x365fc3,_0x3d2b04)=>(_0x1dadad,_0x5a6819)=>_0x3d2b04(_0x1dadad,_0x5a6819,_0x365fc3);let f=class extends _0x503dbf{constructor(_0x432daf,_0x1afe1b){const _0x513a70=_0x32b9dc;super(),this[_0x513a70(0x13f)]=_0x432daf,this[_0x513a70(0x17a)]=_0x1afe1b,this['_initDataSource']();}[_0x32b9dc(0x133)](){const _0x4a258f=_0x32b9dc;this[_0x4a258f(0x13f)][_0x4a258f(0x159)]=this[_0x4a258f(0x17a)],this['_threadCommentDataSourceService'][_0x4a258f(0x145)]=!0x1;}};f=te([M(0x0,_0x52765f),M(0x1,_0x437868(S))],f);var se=Object['defineProperty'],oe=Object[_0x32b9dc(0x161)],ne=(_0x428ca5,_0x4b7e47,_0x3cf2eb)=>_0x4b7e47 in _0x428ca5?se(_0x428ca5,_0x4b7e47,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3cf2eb}):_0x428ca5[_0x4b7e47]=_0x3cf2eb,ie=(_0x46aa9b,_0x5224b5,_0x7edbe7,_0x2c5cc4)=>{const _0x199e2a=_0x32b9dc;for(var _0x4d3fc4=_0x2c5cc4>0x1?void 0x0:_0x2c5cc4?oe(_0x5224b5,_0x7edbe7):_0x5224b5,_0x555892=_0x46aa9b[_0x199e2a(0x155)]-0x1,_0x5cd87f;_0x555892>=0x0;_0x555892--)(_0x5cd87f=_0x46aa9b[_0x555892])&&(_0x4d3fc4=_0x5cd87f(_0x4d3fc4)||_0x4d3fc4);return _0x4d3fc4;},N=(_0x4b1894,_0x1c8ac9)=>(_0x1c1bce,_0x17f771)=>_0x1c8ac9(_0x1c1bce,_0x17f771,_0x4b1894),$=(_0x22658d,_0x5080c6,_0x2b0d4c)=>ne(_0x22658d,typeof _0x5080c6!=_0x32b9dc(0x14c)?_0x5080c6+'':_0x5080c6,_0x2b0d4c);let g=class extends _0x5b3091{constructor(_0x2c0ad1=O,_0x34be79,_0x413d60){const _0x55c274=_0x32b9dc;super(),this[_0x55c274(0x13c)]=_0x2c0ad1,this[_0x55c274(0x12f)]=_0x34be79,this[_0x55c274(0x174)]=_0x413d60;const {..._0x3aba16}=_0x3695bb({},O,this[_0x55c274(0x13c)]);this[_0x55c274(0x174)][_0x55c274(0x138)](z,_0x3aba16);}[_0x32b9dc(0x157)](){const _0x5d6ad4=_0x32b9dc;[[S],[f],[_]][_0x5d6ad4(0x15d)](_0x3cb404=>{const _0x5c0870=_0x5d6ad4;this[_0x5c0870(0x12f)][_0x5c0870(0x182)](_0x3cb404);});}['onReady'](){const _0x105523=_0x32b9dc;this[_0x105523(0x12f)]['get'](f),this['_injector'][_0x105523(0x171)](_);}};$(g,_0x32b9dc(0x17c),W),$(g,_0x32b9dc(0x181),_0x49071b['UNIVER_UNKNOWN']),g=ie([_0x4e1f0a(_0x5e766f,_0x4fc8ae,_0x41d447),N(0x1,_0x437868(_0xae6f09)),N(0x2,_0x4968d2)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x3b1ccc=_0x27d0;(function(_0x236341,_0x57c8ca){const _0x10b66c=_0x27d0,_0x2b9b68=_0x236341();while(!![]){try{const _0x4a20f8=-parseInt(_0x10b66c(0x162))/0x1*(-parseInt(_0x10b66c(0x121))/0x2)+parseInt(_0x10b66c(0x157))/0x3*(-parseInt(_0x10b66c(0x14a))/0x4)+-parseInt(_0x10b66c(0x138))/0x5*(-parseInt(_0x10b66c(0x13e))/0x6)+parseInt(_0x10b66c(0x14b))/0x7+parseInt(_0x10b66c(0x127))/0x8*(parseInt(_0x10b66c(0x151))/0x9)+-parseInt(_0x10b66c(0x128))/0xa*(parseInt(_0x10b66c(0x11c))/0xb)+-parseInt(_0x10b66c(0x174))/0xc*(parseInt(_0x10b66c(0x14e))/0xd);if(_0x4a20f8===_0x57c8ca)break;else _0x2b9b68['push'](_0x2b9b68['shift']());}catch(_0x28b8ff){_0x2b9b68['push'](_0x2b9b68['shift']());}}}(_0x1940,0x3166e));import{CommentService as _0x715a76,CollaborationSessionService as _0x35f564,UniverCollaborationClientPlugin as _0x4384f4}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2a32f2}from'@univerjs-pro/license';import{dayjs as _0x322dc9,UserManagerService as _0x2ce552,Inject as _0x34a257,Injector as _0x542498,Disposable as _0xf1ad03,CustomRangeType as _0x27f8f7,UniverInstanceType as _0x2ce404,DependentOn as _0xf85bf8,IConfigService as _0x3ec148,Plugin as _0x5e5be7,merge as _0x40a5c0}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x6ec7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x50892f,IThreadCommentDataSourceService as _0x4e0ea2}from'@univerjs/thread-comment';import{bufferTime as _0x32124d}from'rxjs';import{HTTPService as _0x4dc60b}from'@univerjs/network';const W=_0x3b1ccc(0x171);function _0x27d0(_0x7a5074,_0x1cd647){_0x7a5074=_0x7a5074-0x116;const _0x194020=_0x1940();let _0x27d0d4=_0x194020[_0x7a5074];return _0x27d0d4;}var I=(_0x3d8b6e=>(_0x3d8b6e[_0x3d8b6e['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x3d8b6e[_0x3d8b6e[_0x3b1ccc(0x167)]=0x1]=_0x3b1ccc(0x167),_0x3d8b6e[_0x3d8b6e[_0x3b1ccc(0x120)]=-0x1]=_0x3b1ccc(0x120),_0x3d8b6e))(I||{}),v=(_0x920794=>(_0x920794[_0x920794['Unknown']=0x0]=_0x3b1ccc(0x17a),_0x920794[_0x920794[_0x3b1ccc(0x141)]=0x1]=_0x3b1ccc(0x141),_0x920794[_0x920794[_0x3b1ccc(0x179)]=0x2]='Reply',_0x920794[_0x920794[_0x3b1ccc(0x180)]=0x3]=_0x3b1ccc(0x180),_0x920794[_0x920794[_0x3b1ccc(0x13a)]=0x4]=_0x3b1ccc(0x13a),_0x920794[_0x920794['Solve']=0x5]=_0x3b1ccc(0x118),_0x920794[_0x920794[_0x3b1ccc(0x120)]=-0x1]='UNRECOGNIZED',_0x920794))(v||{});function _0x1940(){const _0x5c5350=['Reply','Unknown','body','/delete','filter','deleteComment','rangeType','Edit','addUser','slice','userID','type','Solve','forEach','saveCommentToSnapshot','onStarting','1037509SYNQPY','requireSession','values','threadId','UNRECOGNIZED','22jCvODm','/universer-api/comment/unit/','_init','users','pipe','onReady','390072yZkFIf','10NTpLNU','comment','parentId','userId','/list','/add','_config','length','payload','rangeId','solved','unitId','_threadCommentModel','getComment','syncUpdateMutationToColla','_threadCommentDataSource','105EGWzda','parse','Delete','updateComment','COMMENT','/universer-api/user/list','43572nMEMSs','getOwnPropertyDescriptor','map','Add','_userService','add','customRanges','replyId','_httpService','getUnit','_configService','get','485512NfJLGe','2563848okvhGI','_commentService','dataSource','13pPwJcT','error','root','27zYXBmB','user','symbol','getMemberID','subscribe','post','6FzZumX','_threadCommentDataSourceService','disposeWithMe','_injector','OpenOrReOpen','YYYY/MM/DD\x20HH:mm','createTimestamp','_initDataSource','UNIVER_UNKNOWN','getUser','listComments','17653szNsce','ref','thread-comment-data-source.config','content','_initUserSync','Solved','replies','/edit','delete','resolveComment','format','getCurrentUser','reply','code','pluginName','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_sessionService','defineProperty','3837612srIMlu','resolved','addComment','personId','size'];_0x1940=function(){return _0x5c5350;};return _0x1940();}const y=_0x3954f5=>_0x322dc9(new Date(+_0x3954f5))[_0x3b1ccc(0x16c)](_0x3b1ccc(0x15c)),B=async(_0x2ff13c,_0x2bfb40)=>{const _0x96137f=_0x3b1ccc,_0x2ad364=_0x2ff13c[_0x96137f(0x149)](_0x2ce552),_0x2ef932=_0x2ff13c[_0x96137f(0x149)](_0x4dc60b);_0x2bfb40['forEach'](_0xafce86=>{const _0x20aaf2=_0x96137f;_0x2ad364[_0x20aaf2(0x160)](_0xafce86)&&_0x2bfb40[_0x20aaf2(0x16a)](_0xafce86);}),_0x2bfb40[_0x96137f(0x178)]&&(await _0x2ef932['get'](_0x96137f(0x13d),{'params':{'userIDs':[..._0x2bfb40]}}))['body'][_0x96137f(0x124)][_0x96137f(0x119)](_0x8e303b=>{const _0x439139=_0x96137f;_0x8e303b&&_0x2ad364[_0x439139(0x181)](_0x8e303b);});};var K=Object[_0x3b1ccc(0x13f)],V=(_0x56e419,_0x1e51e6,_0x16773c,_0x3dcb88)=>{const _0x2ecb08=_0x3b1ccc;for(var _0x1bbe56=_0x3dcb88>0x1?void 0x0:_0x3dcb88?K(_0x1e51e6,_0x16773c):_0x1e51e6,_0x1d4c81=_0x56e419[_0x2ecb08(0x12f)]-0x1,_0x2ff2bc;_0x1d4c81>=0x0;_0x1d4c81--)(_0x2ff2bc=_0x56e419[_0x1d4c81])&&(_0x1bbe56=_0x2ff2bc(_0x1bbe56)||_0x1bbe56);return _0x1bbe56;},p=(_0x187af4,_0x462ebf)=>(_0x48942c,_0x287630)=>_0x462ebf(_0x48942c,_0x287630,_0x187af4);let _=class extends _0xf1ad03{constructor(_0x5ae713,_0xb41ddc,_0x14b193,_0x34e918){const _0x30f290=_0x3b1ccc;super(),this[_0x30f290(0x14c)]=_0x5ae713,this[_0x30f290(0x134)]=_0xb41ddc,this[_0x30f290(0x142)]=_0x14b193,this[_0x30f290(0x15a)]=_0x34e918,this[_0x30f290(0x123)](),this[_0x30f290(0x166)]();}['_initUserSync'](){const _0x11a7d4=_0x3b1ccc;this[_0x11a7d4(0x159)](this[_0x11a7d4(0x134)]['commentUpdate$'][_0x11a7d4(0x125)](_0x32124d(0x10))[_0x11a7d4(0x155)](_0x27416d=>{const _0xd5e8ae=_0x11a7d4,_0x2d376f=new Set();_0x27416d['forEach'](_0x3f2bf1=>{const _0xb73af2=_0x27d0;switch(_0x3f2bf1[_0xb73af2(0x117)]){case _0xb73af2(0x143):{const _0x492253=_0x3f2bf1[_0xb73af2(0x130)][_0xb73af2(0x177)];_0x2d376f[_0xb73af2(0x143)](_0x492253);break;}}}),B(this[_0xd5e8ae(0x15a)],_0x2d376f);}));}[_0x3b1ccc(0x123)](){const _0x4e2533=_0x3b1ccc;this['disposeWithMe'](this[_0x4e2533(0x14c)]['commentUpdate$'][_0x4e2533(0x155)](async _0x16c9b7=>{const _0x2e8aa9=_0x4e2533;var _0x26ca62,_0x1063ca,_0x46b052,_0x474923;const _0xbfa2e5=(_0x26ca62=this[_0x2e8aa9(0x134)][_0x2e8aa9(0x147)](_0x16c9b7[_0x2e8aa9(0x133)])['find'](_0x3d5977=>_0x3d5977[_0x2e8aa9(0x11f)]===_0x16c9b7[_0x2e8aa9(0x11f)]))==null?void 0x0:_0x26ca62[_0x2e8aa9(0x150)];if(!_0xbfa2e5)return;const {unitId:_0x53b57e,subUnitId:_0x261012}=_0xbfa2e5;switch(_0x16c9b7[_0x2e8aa9(0x152)]&&this[_0x2e8aa9(0x142)]['addUser'](_0x16c9b7[_0x2e8aa9(0x152)]),_0x16c9b7[_0x2e8aa9(0x117)]){case v[_0x2e8aa9(0x141)]:break;case v[_0x2e8aa9(0x179)]:{this[_0x2e8aa9(0x134)]['addComment'](_0x53b57e,_0x261012,{'unitId':_0x53b57e,'subUnitId':_0x261012,'ref':'','id':_0x16c9b7[_0x2e8aa9(0x145)],'dT':y(+_0x16c9b7['createTimestamp']),'threadId':_0x16c9b7[_0x2e8aa9(0x11f)],'personId':(_0x46b052=(_0x1063ca=_0x16c9b7['user'])==null?void 0x0:_0x1063ca[_0x2e8aa9(0x116)])!=null?_0x46b052:_0x16c9b7[_0x2e8aa9(0x12b)],'text':JSON[_0x2e8aa9(0x139)](_0x16c9b7[_0x2e8aa9(0x165)]),'parentId':_0xbfa2e5['id']});break;}case v['Delete']:{const _0x20ff19=this[_0x2e8aa9(0x134)][_0x2e8aa9(0x135)](_0x53b57e,_0x261012,_0x16c9b7[_0x2e8aa9(0x145)]);_0x20ff19&&_0x20ff19[_0x2e8aa9(0x12a)]&&this[_0x2e8aa9(0x134)][_0x2e8aa9(0x17e)](_0x53b57e,_0x261012,_0x16c9b7[_0x2e8aa9(0x145)]);break;}case v[_0x2e8aa9(0x180)]:{this[_0x2e8aa9(0x134)][_0x2e8aa9(0x13b)](_0x53b57e,_0x261012,{'commentId':_0x16c9b7[_0x2e8aa9(0x145)],'text':JSON[_0x2e8aa9(0x139)](_0x16c9b7[_0x2e8aa9(0x165)])});break;}case v['Solve']:{const _0x1127d5=(_0x474923=this[_0x2e8aa9(0x134)]['getUnit'](_0x16c9b7[_0x2e8aa9(0x133)])['find'](_0x5d0227=>_0x5d0227[_0x2e8aa9(0x11f)]===_0x16c9b7[_0x2e8aa9(0x11f)]))==null?void 0x0:_0x474923['root'];_0x1127d5&&this[_0x2e8aa9(0x134)][_0x2e8aa9(0x16b)](_0x53b57e,_0x261012,_0x1127d5['id'],_0x16c9b7[_0x2e8aa9(0x132)]===I[_0x2e8aa9(0x167)]);break;}}}));}};_=V([p(0x0,_0x34a257(_0x715a76)),p(0x1,_0x34a257(_0x50892f)),p(0x2,_0x34a257(_0x2ce552)),p(0x3,_0x34a257(_0x542498))],_);const z=_0x3b1ccc(0x164),O={};var k=Object[_0x3b1ccc(0x13f)],Q=(_0x33e70b,_0x4698db,_0x14180d,_0x656761)=>{const _0x22064=_0x3b1ccc;for(var _0x1254d6=_0x656761>0x1?void 0x0:_0x656761?k(_0x4698db,_0x14180d):_0x4698db,_0x24523a=_0x33e70b[_0x22064(0x12f)]-0x1,_0xf8e5cd;_0x24523a>=0x0;_0x24523a--)(_0xf8e5cd=_0x33e70b[_0x24523a])&&(_0x1254d6=_0xf8e5cd(_0x1254d6)||_0x1254d6);return _0x1254d6;},b=(_0x590136,_0x2e2a90)=>(_0x1cca12,_0x3b46bb)=>_0x2e2a90(_0x1cca12,_0x3b46bb,_0x590136);function X(_0x1d0a25,_0x2148b7){const _0x23810d=_0x3b1ccc,_0x4c3c33=_0x1d0a25[_0x23810d(0x168)][0x0];return{..._0x2148b7,'id':_0x4c3c33[_0x23810d(0x145)],'resolved':_0x1d0a25['solved']===0x1,'dT':y(_0x4c3c33[_0x23810d(0x15d)]),'personId':_0x4c3c33[_0x23810d(0x12b)],'threadId':_0x4c3c33[_0x23810d(0x11f)]};}function ee(_0x56a363,_0x5b94a2,_0x3d1012){const _0x454844=_0x3b1ccc;var _0x59b7df,_0xe27b8a;if(((_0xe27b8a=(_0x59b7df=_0x56a363==null?void 0x0:_0x56a363[_0x454844(0x168)])==null?void 0x0:_0x59b7df[_0x454844(0x12f)])!=null?_0xe27b8a:0x0)>0x0){const _0x563fd3=(_0x564cb6,_0xb801e)=>({'id':_0x564cb6[_0x454844(0x145)],'threadId':_0x564cb6[_0x454844(0x11f)],'dT':y(_0x564cb6['createTimestamp']),'personId':_0x564cb6[_0x454844(0x12b)],'resolved':_0x56a363['solved']===I[_0x454844(0x167)],'unitId':_0x5b94a2,'subUnitId':_0x3d1012,'text':JSON[_0x454844(0x139)](_0x564cb6[_0x454844(0x165)]),'parentId':_0xb801e}),_0x269309=_0x563fd3(_0x56a363[_0x454844(0x168)][0x0]);return{..._0x269309,'children':_0x56a363[_0x454844(0x168)][_0x454844(0x182)](0x1)['map'](_0xb02d69=>_0x563fd3(_0xb02d69,_0x269309['id']))};}return null;}let S=class{constructor(_0x382220,_0x33eff5,_0x333d89){const _0x5b8f75=_0x3b1ccc;this[_0x5b8f75(0x146)]=_0x382220,this['_userService']=_0x33eff5,this[_0x5b8f75(0x172)]=_0x333d89;}async[_0x3b1ccc(0x176)](_0x2be025){const _0x36f2bc=_0x3b1ccc;var _0x1bfd07,_0x1cb9b6;const {parentId:_0x4cea74,unitId:_0xb3a5ae,text:_0x347d37,threadId:_0x1c501d}=_0x2be025,_0x599543=(_0x1cb9b6=(_0x1bfd07=_0x347d37[_0x36f2bc(0x144)])==null?void 0x0:_0x1bfd07[_0x36f2bc(0x17d)](_0x55d1d2=>_0x55d1d2['rangeType']===_0x27f8f7['COMMENT'])[_0x36f2bc(0x140)](_0x12e71f=>_0x12e71f[_0x36f2bc(0x131)]))!=null?_0x1cb9b6:[],_0x3c91ea=JSON['stringify'](_0x347d37),_0x52e5c9=(await this['_sessionService'][_0x36f2bc(0x11d)](_0xb3a5ae))[_0x36f2bc(0x154)]();if(_0x4cea74){const _0x53504f={'memberId':_0x52e5c9,'unitId':_0xb3a5ae,'content':_0x3c91ea,'mention':_0x599543,'threadId':_0x1c501d},_0x42dbd0=(await this['_httpService']['post'](_0x36f2bc(0x122)+_0xb3a5ae+'/reply',{'body':_0x53504f}))['body'][_0x36f2bc(0x16e)];return{..._0x2be025,'id':_0x42dbd0[_0x36f2bc(0x145)],'dT':_0x322dc9(+_0x42dbd0[_0x36f2bc(0x15d)])['format'](_0x36f2bc(0x15c)),'personId':_0x42dbd0[_0x36f2bc(0x12b)]};}else{const _0x39215a={'memberId':_0x52e5c9,'unitId':_0xb3a5ae,'content':_0x3c91ea,'mention':_0x599543},_0x15435c=await this[_0x36f2bc(0x146)][_0x36f2bc(0x156)]('/universer-api/comment/unit/'+_0xb3a5ae+_0x36f2bc(0x12d),{'body':_0x39215a});return X(_0x15435c[_0x36f2bc(0x17b)][_0x36f2bc(0x129)],_0x2be025);}}async[_0x3b1ccc(0x13b)](_0x4d0697){const _0x489600=_0x3b1ccc;var _0x1f3ce8,_0xdaa5d;const {text:_0x5535c7,unitId:_0x12a1d3}=_0x4d0697,_0x23e50e=(_0xdaa5d=(_0x1f3ce8=_0x5535c7[_0x489600(0x144)])==null?void 0x0:_0x1f3ce8[_0x489600(0x17d)](_0x2962f1=>_0x2962f1[_0x489600(0x17f)]===_0x27f8f7[_0x489600(0x13c)])['map'](_0xb29d61=>_0xb29d61[_0x489600(0x131)]))!=null?_0xdaa5d:[],_0x343cb8=JSON['stringify'](_0x5535c7),_0x28e1ff=_0x4d0697[_0x489600(0x11f)],_0x3249eb=_0x4d0697['id'],_0x5d58d7={'memberId':(await this[_0x489600(0x172)][_0x489600(0x11d)](_0x12a1d3))[_0x489600(0x154)](),'unitId':_0x12a1d3,'threadId':_0x28e1ff,'mention':_0x23e50e,'content':_0x343cb8,'replyId':_0x3249eb},_0x2cbb55=await this[_0x489600(0x146)][_0x489600(0x156)]('/universer-api/comment/unit/'+_0x12a1d3+_0x489600(0x169),{'body':_0x5d58d7});return!_0x2cbb55[_0x489600(0x17b)]['error']||_0x2cbb55[_0x489600(0x17b)][_0x489600(0x14f)][_0x489600(0x16f)]===0x1;}async[_0x3b1ccc(0x16b)](_0x2994be){const _0x142224=_0x3b1ccc,{unitId:_0x449268}=_0x2994be,_0x2bd30e=_0x2994be['threadId'],_0x2bebef={'memberId':this['_userService'][_0x142224(0x16d)]()['userID'],'unitId':_0x449268,'threadId':_0x2bd30e,'solved':_0x2994be[_0x142224(0x175)]?I[_0x142224(0x167)]:I[_0x142224(0x15b)]},_0x52449b=await this[_0x142224(0x146)]['post'](_0x142224(0x122)+_0x449268+'/solved',{'body':_0x2bebef});return!_0x52449b[_0x142224(0x17b)][_0x142224(0x14f)]||_0x52449b[_0x142224(0x17b)][_0x142224(0x14f)][_0x142224(0x16f)]===0x1;}async[_0x3b1ccc(0x17e)](_0x44377c,_0x3aadce,_0x7cd45a,_0x117789){const _0x1b2587=_0x3b1ccc,_0x416701={'memberId':(await this[_0x1b2587(0x172)][_0x1b2587(0x11d)](_0x44377c))['getMemberID'](),'threadId':_0x7cd45a,'replyId':_0x117789,'unitId':_0x44377c},_0x2b87a7=await this[_0x1b2587(0x146)]['post'](_0x1b2587(0x122)+_0x44377c+_0x1b2587(0x17c),{'body':_0x416701});return!_0x2b87a7[_0x1b2587(0x17b)]['error']||_0x2b87a7[_0x1b2587(0x17b)][_0x1b2587(0x14f)][_0x1b2587(0x16f)]===0x1;}async[_0x3b1ccc(0x161)](_0x513309,_0x44a170,_0x5a205e){const _0x3dbe41=_0x3b1ccc,_0x5a5020={'unitId':_0x513309,'threadId':_0x5a205e},_0x54616b=await this[_0x3dbe41(0x146)][_0x3dbe41(0x156)](_0x3dbe41(0x122)+_0x513309+_0x3dbe41(0x12c),{'body':_0x5a5020}),_0x52a8f8=_0x5a205e[_0x3dbe41(0x140)](_0x3f45a0=>ee(_0x54616b[_0x3dbe41(0x17b)]['comments'][_0x3f45a0],_0x513309,_0x44a170))[_0x3dbe41(0x17d)](Boolean);return Object[_0x3dbe41(0x11e)](_0x54616b['body'][_0x3dbe41(0x124)])[_0x3dbe41(0x119)](_0x115870=>{this['_userService']['addUser'](_0x115870);}),_0x52a8f8;}[_0x3b1ccc(0x11a)](_0x15bcb6){const _0x59f231=_0x3b1ccc;return{'id':_0x15bcb6['id'],'threadId':_0x15bcb6[_0x59f231(0x11f)],'ref':_0x15bcb6[_0x59f231(0x163)]};}};S=Q([b(0x0,_0x34a257(_0x4dc60b)),b(0x1,_0x34a257(_0x2ce552)),b(0x2,_0x34a257(_0x35f564))],S);var re=Object[_0x3b1ccc(0x13f)],te=(_0x545ab2,_0x349763,_0x319f90,_0x351b4d)=>{const _0x482b5f=_0x3b1ccc;for(var _0xb55e0d=_0x351b4d>0x1?void 0x0:_0x351b4d?re(_0x349763,_0x319f90):_0x349763,_0x2921ae=_0x545ab2[_0x482b5f(0x12f)]-0x1,_0x4ade7f;_0x2921ae>=0x0;_0x2921ae--)(_0x4ade7f=_0x545ab2[_0x2921ae])&&(_0xb55e0d=_0x4ade7f(_0xb55e0d)||_0xb55e0d);return _0xb55e0d;},M=(_0x4bb05f,_0x39ada5)=>(_0x292d4a,_0x349875)=>_0x39ada5(_0x292d4a,_0x349875,_0x4bb05f);let f=class extends _0xf1ad03{constructor(_0x1157b6,_0x98569c){const _0x1e1dda=_0x3b1ccc;super(),this[_0x1e1dda(0x158)]=_0x1157b6,this[_0x1e1dda(0x137)]=_0x98569c,this[_0x1e1dda(0x15e)]();}[_0x3b1ccc(0x15e)](){const _0x1b6071=_0x3b1ccc;this[_0x1b6071(0x158)][_0x1b6071(0x14d)]=this['_threadCommentDataSource'],this[_0x1b6071(0x158)][_0x1b6071(0x136)]=!0x1;}};f=te([M(0x0,_0x4e0ea2),M(0x1,_0x34a257(S))],f);var se=Object[_0x3b1ccc(0x173)],oe=Object[_0x3b1ccc(0x13f)],ne=(_0x5098e5,_0x1dac09,_0x26581a)=>_0x1dac09 in _0x5098e5?se(_0x5098e5,_0x1dac09,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x26581a}):_0x5098e5[_0x1dac09]=_0x26581a,ie=(_0x2ed43a,_0x50f2f6,_0x302d18,_0x3f5a0b)=>{const _0x503c4f=_0x3b1ccc;for(var _0x379f2c=_0x3f5a0b>0x1?void 0x0:_0x3f5a0b?oe(_0x50f2f6,_0x302d18):_0x50f2f6,_0x4f6203=_0x2ed43a[_0x503c4f(0x12f)]-0x1,_0x48100c;_0x4f6203>=0x0;_0x4f6203--)(_0x48100c=_0x2ed43a[_0x4f6203])&&(_0x379f2c=_0x48100c(_0x379f2c)||_0x379f2c);return _0x379f2c;},N=(_0x90a456,_0x380a62)=>(_0xf6dacc,_0x3e2ee3)=>_0x380a62(_0xf6dacc,_0x3e2ee3,_0x90a456),$=(_0x307a8d,_0xd797e0,_0x4069b1)=>ne(_0x307a8d,typeof _0xd797e0!=_0x3b1ccc(0x153)?_0xd797e0+'':_0xd797e0,_0x4069b1);let g=class extends _0x5e5be7{constructor(_0x4d6547=O,_0x418777,_0x5df7fe){const _0x743115=_0x3b1ccc;super(),this[_0x743115(0x12e)]=_0x4d6547,this[_0x743115(0x15a)]=_0x418777,this[_0x743115(0x148)]=_0x5df7fe;const {..._0x28a935}=_0x40a5c0({},O,this[_0x743115(0x12e)]);this[_0x743115(0x148)]['setConfig'](z,_0x28a935);}[_0x3b1ccc(0x11b)](){const _0x57fc02=_0x3b1ccc;[[S],[f],[_]][_0x57fc02(0x119)](_0x137a9f=>{const _0x3437ca=_0x57fc02;this[_0x3437ca(0x15a)][_0x3437ca(0x143)](_0x137a9f);});}[_0x3b1ccc(0x126)](){const _0x368d96=_0x3b1ccc;this['_injector'][_0x368d96(0x149)](f),this[_0x368d96(0x15a)][_0x368d96(0x149)](_);}};$(g,_0x3b1ccc(0x170),W),$(g,_0x3b1ccc(0x117),_0x2ce404[_0x3b1ccc(0x15f)]),g=ie([_0xf85bf8(_0x6ec7,_0x4384f4,_0x2a32f2),N(0x1,_0x34a257(_0x542498)),N(0x2,_0x3ec148)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x49bd(){const _0x2b4341=['disposeWithMe','UniverThreadCommentUIPlugin','rxjs','post','_injector','updateComment','221076jHqOjz','customRanges','Unknown','OpenOrReOpen','reply','UniverProLicense','@univerjs-pro/license','parentId','Edit','comment','userId','format','addComment','CommentService','filter','_commentService','Add','content','map','requireSession','Solve','6821270CtaySs','symbol','getMemberID','UserManagerService','_initDataSource','saveCommentToSnapshot','subscribe','_config','getUser','Reply','createTimestamp','delete','1Tsschq','1097278WoxlRt','getOwnPropertyDescriptor','exports','object','1892421mhYmly','add','unitId','_httpService','Solved','/solved','_threadCommentModel','_initUserSync','18tvPwal','users','UniverProCollaborationClient','_threadCommentDataSource','threadId','userID','merge','_threadCommentDataSourceService','bufferTime','UniverInstanceType','@univerjs/network','replyId','_userService','error','deleteComment','slice','CustomRangeType','/delete','thread-comment-data-source.config','YYYY/MM/DD\x20HH:mm','604445kxbWLG','Injector','UNIVER_UNKNOWN','forEach','onReady','_sessionService','getUnit','body','addUser','toStringTag','rangeId','@univerjs/thread-comment','find','getComment','@univerjs/core','DependentOn','459468UuUfVu','_init','stringify','UNRECOGNIZED','@univerjs/thread-comment-ui','personId','24FLrZwF','COMMENT','rangeType','IConfigService','_configService','payload','parse','defineProperty','UniverCore','values','code','length','Delete','amd','HTTPService','syncUpdateMutationToColla','IThreadCommentDataSourceService','dayjs','user','get','/edit','setConfig','Inject','/universer-api/comment/unit/','resolveComment','/universer-api/user/list','comments','root','UniverThreadCommentDataSourcePlugin','602358dhCeKY','type','/list','pipe','replies','solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','CollaborationSessionService','UniverThreadComment'];_0x49bd=function(){return _0x2b4341;};return _0x49bd();}function _0x304b(_0x1341da,_0x37a169){_0x1341da=_0x1341da-0xae;const _0x49bdda=_0x49bd();let _0x304bb9=_0x49bdda[_0x1341da];return _0x304bb9;}(function(_0x1f9b10,_0x5800d4){const _0x5a9bc0=_0x304b,_0xa178ef=_0x1f9b10();while(!![]){try{const _0xaf423b=-parseInt(_0x5a9bc0(0xfb))/0x1*(-parseInt(_0x5a9bc0(0xcb))/0x2)+-parseInt(_0x5a9bc0(0x12c))/0x3+parseInt(_0x5a9bc0(0xda))/0x4+-parseInt(_0x5a9bc0(0x11c))/0x5*(parseInt(_0x5a9bc0(0x108))/0x6)+parseInt(_0x5a9bc0(0xfc))/0x7*(-parseInt(_0x5a9bc0(0xae))/0x8)+parseInt(_0x5a9bc0(0x100))/0x9+parseInt(_0x5a9bc0(0xef))/0xa;if(_0xaf423b===_0x5800d4)break;else _0xa178ef['push'](_0xa178ef['shift']());}catch(_0x367177){_0xa178ef['push'](_0xa178ef['shift']());}}}(_0x49bd,0x40267),function(_0x2c1fb6,_0x423ad1){const _0x353b80=_0x304b;typeof exports==_0x353b80(0xff)&&typeof module<'u'?_0x423ad1(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=='function'&&define[_0x353b80(0xbb)]?define([_0x353b80(0xfe),'@univerjs-pro/collaboration-client',_0x353b80(0xe0),_0x353b80(0x12a),_0x353b80(0x130),_0x353b80(0x127),_0x353b80(0xd6),_0x353b80(0x112)],_0x423ad1):(_0x2c1fb6=typeof globalThis<'u'?globalThis:_0x2c1fb6||self,_0x423ad1(_0x2c1fb6['UniverProThreadCommentDatasource']={},_0x2c1fb6[_0x353b80(0x10a)],_0x2c1fb6[_0x353b80(0xdf)],_0x2c1fb6[_0x353b80(0xb6)],_0x2c1fb6['UniverThreadCommentUi'],_0x2c1fb6[_0x353b80(0xd3)],_0x2c1fb6[_0x353b80(0xd6)],_0x2c1fb6['UniverNetwork']));}(this,function(_0x9e9bf4,_0x210bf8,_0x362b49,_0x202475,_0x373872,_0x4dc4ac,_0x2cd9a9,_0x507eab){'use strict';const _0x3e5609=_0x304b;const _0x279a9d=_0x3e5609(0xd1);var _0x19b0c8=(_0x15fcc5=>(_0x15fcc5[_0x15fcc5['OpenOrReOpen']=0x0]=_0x3e5609(0xdd),_0x15fcc5[_0x15fcc5[_0x3e5609(0x104)]=0x1]='Solved',_0x15fcc5[_0x15fcc5['UNRECOGNIZED']=-0x1]=_0x3e5609(0x12f),_0x15fcc5))(_0x19b0c8||{}),_0x3fcc7f=(_0x320b82=>(_0x320b82[_0x320b82[_0x3e5609(0xdc)]=0x0]=_0x3e5609(0xdc),_0x320b82[_0x320b82[_0x3e5609(0xea)]=0x1]='Add',_0x320b82[_0x320b82['Reply']=0x2]=_0x3e5609(0xf8),_0x320b82[_0x320b82[_0x3e5609(0xe2)]=0x3]=_0x3e5609(0xe2),_0x320b82[_0x320b82[_0x3e5609(0xba)]=0x4]=_0x3e5609(0xba),_0x320b82[_0x320b82[_0x3e5609(0xee)]=0x5]=_0x3e5609(0xee),_0x320b82[_0x320b82['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x320b82))(_0x3fcc7f||{});const _0x1eabda=_0x148376=>_0x202475['dayjs'](new Date(+_0x148376))[_0x3e5609(0xe5)](_0x3e5609(0x11b)),_0x22f5ce=async(_0x144b2b,_0x3c541d)=>{const _0x4dcc88=_0x3e5609,_0x4fcb45=_0x144b2b[_0x4dcc88(0xc1)](_0x202475[_0x4dcc88(0xf2)]),_0x1ccee2=_0x144b2b[_0x4dcc88(0xc1)](_0x507eab[_0x4dcc88(0xbc)]);_0x3c541d[_0x4dcc88(0x11f)](_0x4d5634=>{const _0xea520f=_0x4dcc88;_0x4fcb45[_0xea520f(0xf7)](_0x4d5634)&&_0x3c541d[_0xea520f(0xfa)](_0x4d5634);}),_0x3c541d['size']&&(await _0x1ccee2[_0x4dcc88(0xc1)](_0x4dcc88(0xc7),{'params':{'userIDs':[..._0x3c541d]}}))[_0x4dcc88(0x123)][_0x4dcc88(0x109)][_0x4dcc88(0x11f)](_0x4470f5=>{const _0xc69f1e=_0x4dcc88;_0x4470f5&&_0x4fcb45[_0xc69f1e(0x124)](_0x4470f5);});};var _0x4c9b0d=Object[_0x3e5609(0xfd)],_0x230cee=(_0x3fdcee,_0x33ebd6,_0x24ed6c,_0x51ae92)=>{for(var _0x48f846=_0x51ae92>0x1?void 0x0:_0x51ae92?_0x4c9b0d(_0x33ebd6,_0x24ed6c):_0x33ebd6,_0x2381ea=_0x3fdcee['length']-0x1,_0x4ede50;_0x2381ea>=0x0;_0x2381ea--)(_0x4ede50=_0x3fdcee[_0x2381ea])&&(_0x48f846=_0x4ede50(_0x48f846)||_0x48f846);return _0x48f846;},_0x212e72=(_0x37ec27,_0x3348ef)=>(_0x1f1ce7,_0x1ece43)=>_0x3348ef(_0x1f1ce7,_0x1ece43,_0x37ec27);let _0x4f3510=class extends _0x202475['Disposable']{constructor(_0x547705,_0x7eb2ad,_0x1e49f9,_0x395dba){const _0x350d4a=_0x3e5609;super(),this[_0x350d4a(0xe9)]=_0x547705,this[_0x350d4a(0x106)]=_0x7eb2ad,this[_0x350d4a(0x114)]=_0x1e49f9,this[_0x350d4a(0xd8)]=_0x395dba,this[_0x350d4a(0x12d)](),this[_0x350d4a(0x107)]();}[_0x3e5609(0x107)](){const _0xa7f7eb=_0x3e5609;this[_0xa7f7eb(0xd4)](this[_0xa7f7eb(0x106)]['commentUpdate$'][_0xa7f7eb(0xce)](_0x2cd9a9[_0xa7f7eb(0x110)](0x10))[_0xa7f7eb(0xf5)](_0xc625e2=>{const _0x15ede7=_0xa7f7eb,_0x33afd3=new Set();_0xc625e2[_0x15ede7(0x11f)](_0x5c84c6=>{const _0x5112ae=_0x15ede7;switch(_0x5c84c6['type']){case _0x5112ae(0x101):{const _0x3161b3=_0x5c84c6[_0x5112ae(0xb3)][_0x5112ae(0x131)];_0x33afd3[_0x5112ae(0x101)](_0x3161b3);break;}}}),_0x22f5ce(this[_0x15ede7(0xd8)],_0x33afd3);}));}[_0x3e5609(0x12d)](){const _0xc52f5b=_0x3e5609;this[_0xc52f5b(0xd4)](this[_0xc52f5b(0xe9)]['commentUpdate$'][_0xc52f5b(0xf5)](async _0x4f07fb=>{const _0x4bc363=_0xc52f5b;var _0x5aa5a0,_0x1816e0,_0x370da7,_0x2c8d62;const _0x12df3f=(_0x5aa5a0=this[_0x4bc363(0x106)][_0x4bc363(0x122)](_0x4f07fb[_0x4bc363(0x102)])[_0x4bc363(0x128)](_0x216a37=>_0x216a37[_0x4bc363(0x10c)]===_0x4f07fb['threadId']))==null?void 0x0:_0x5aa5a0[_0x4bc363(0xc9)];if(!_0x12df3f)return;const {unitId:_0x485f78,subUnitId:_0x568ef5}=_0x12df3f;switch(_0x4f07fb[_0x4bc363(0xc0)]&&this['_userService'][_0x4bc363(0x124)](_0x4f07fb[_0x4bc363(0xc0)]),_0x4f07fb[_0x4bc363(0xcc)]){case _0x3fcc7f[_0x4bc363(0xea)]:break;case _0x3fcc7f['Reply']:{this[_0x4bc363(0x106)][_0x4bc363(0xe6)](_0x485f78,_0x568ef5,{'unitId':_0x485f78,'subUnitId':_0x568ef5,'ref':'','id':_0x4f07fb[_0x4bc363(0x113)],'dT':_0x1eabda(+_0x4f07fb['createTimestamp']),'threadId':_0x4f07fb[_0x4bc363(0x10c)],'personId':(_0x370da7=(_0x1816e0=_0x4f07fb['user'])==null?void 0x0:_0x1816e0[_0x4bc363(0x10d)])!=null?_0x370da7:_0x4f07fb[_0x4bc363(0xe4)],'text':JSON['parse'](_0x4f07fb[_0x4bc363(0xeb)]),'parentId':_0x12df3f['id']});break;}case _0x3fcc7f['Delete']:{const _0x329df3=this[_0x4bc363(0x106)][_0x4bc363(0x129)](_0x485f78,_0x568ef5,_0x4f07fb[_0x4bc363(0x113)]);_0x329df3&&_0x329df3[_0x4bc363(0xe1)]&&this['_threadCommentModel']['deleteComment'](_0x485f78,_0x568ef5,_0x4f07fb[_0x4bc363(0x113)]);break;}case _0x3fcc7f[_0x4bc363(0xe2)]:{this[_0x4bc363(0x106)][_0x4bc363(0xd9)](_0x485f78,_0x568ef5,{'commentId':_0x4f07fb[_0x4bc363(0x113)],'text':JSON['parse'](_0x4f07fb[_0x4bc363(0xeb)])});break;}case _0x3fcc7f[_0x4bc363(0xee)]:{const _0x1d3f2b=(_0x2c8d62=this[_0x4bc363(0x106)][_0x4bc363(0x122)](_0x4f07fb[_0x4bc363(0x102)])['find'](_0x34b950=>_0x34b950[_0x4bc363(0x10c)]===_0x4f07fb['threadId']))==null?void 0x0:_0x2c8d62[_0x4bc363(0xc9)];_0x1d3f2b&&this[_0x4bc363(0x106)]['resolveComment'](_0x485f78,_0x568ef5,_0x1d3f2b['id'],_0x4f07fb[_0x4bc363(0xd0)]===_0x19b0c8[_0x4bc363(0x104)]);break;}}}));}};_0x4f3510=_0x230cee([_0x212e72(0x0,_0x202475[_0x3e5609(0xc4)](_0x210bf8[_0x3e5609(0xe7)])),_0x212e72(0x1,_0x202475['Inject'](_0x4dc4ac['ThreadCommentModel'])),_0x212e72(0x2,_0x202475[_0x3e5609(0xc4)](_0x202475[_0x3e5609(0xf2)])),_0x212e72(0x3,_0x202475['Inject'](_0x202475[_0x3e5609(0x11d)]))],_0x4f3510);const _0x5626f9=_0x3e5609(0x11a),_0x4f5793={};var _0x2207e8=Object[_0x3e5609(0xfd)],_0xb4a31d=(_0x26f0f6,_0x585f36,_0x803e07,_0x1d2a11)=>{const _0x412a91=_0x3e5609;for(var _0xcd4c23=_0x1d2a11>0x1?void 0x0:_0x1d2a11?_0x2207e8(_0x585f36,_0x803e07):_0x585f36,_0x3c2410=_0x26f0f6[_0x412a91(0xb9)]-0x1,_0x98604e;_0x3c2410>=0x0;_0x3c2410--)(_0x98604e=_0x26f0f6[_0x3c2410])&&(_0xcd4c23=_0x98604e(_0xcd4c23)||_0xcd4c23);return _0xcd4c23;},_0x208ff8=(_0x5cb5ee,_0x1d0691)=>(_0x21c860,_0x2bc8cd)=>_0x1d0691(_0x21c860,_0x2bc8cd,_0x5cb5ee);function _0x33b9b5(_0x403073,_0x421578){const _0x3d2876=_0x3e5609,_0x27f513=_0x403073[_0x3d2876(0xcf)][0x0];return{..._0x421578,'id':_0x27f513[_0x3d2876(0x113)],'resolved':_0x403073[_0x3d2876(0xd0)]===0x1,'dT':_0x1eabda(_0x27f513[_0x3d2876(0xf9)]),'personId':_0x27f513[_0x3d2876(0xe4)],'threadId':_0x27f513[_0x3d2876(0x10c)]};}function _0x2311b1(_0x56ee2b,_0x4f3cfa,_0x416fce){const _0x311ff3=_0x3e5609;var _0xbc7c97,_0x28487c;if(((_0x28487c=(_0xbc7c97=_0x56ee2b==null?void 0x0:_0x56ee2b['replies'])==null?void 0x0:_0xbc7c97[_0x311ff3(0xb9)])!=null?_0x28487c:0x0)>0x0){const _0xfcf787=(_0x270c80,_0x125a21)=>({'id':_0x270c80[_0x311ff3(0x113)],'threadId':_0x270c80[_0x311ff3(0x10c)],'dT':_0x1eabda(_0x270c80[_0x311ff3(0xf9)]),'personId':_0x270c80[_0x311ff3(0xe4)],'resolved':_0x56ee2b[_0x311ff3(0xd0)]===_0x19b0c8[_0x311ff3(0x104)],'unitId':_0x4f3cfa,'subUnitId':_0x416fce,'text':JSON[_0x311ff3(0xb4)](_0x270c80['content']),'parentId':_0x125a21}),_0x290e2f=_0xfcf787(_0x56ee2b['replies'][0x0]);return{..._0x290e2f,'children':_0x56ee2b['replies'][_0x311ff3(0x117)](0x1)['map'](_0x50099c=>_0xfcf787(_0x50099c,_0x290e2f['id']))};}return null;}let _0xdf0bdf=class{constructor(_0x56624b,_0x56d3f4,_0x1c217d){const _0x5bce36=_0x3e5609;this[_0x5bce36(0x103)]=_0x56624b,this['_userService']=_0x56d3f4,this[_0x5bce36(0x121)]=_0x1c217d;}async[_0x3e5609(0xe6)](_0x168e59){const _0x49cbfa=_0x3e5609;var _0x5c6078,_0x47ff27;const {parentId:_0x4da86b,unitId:_0x3914fe,text:_0x1dca7c,threadId:_0x5a989c}=_0x168e59,_0x29aef3=(_0x47ff27=(_0x5c6078=_0x1dca7c[_0x49cbfa(0xdb)])==null?void 0x0:_0x5c6078[_0x49cbfa(0xe8)](_0x3e8fa7=>_0x3e8fa7['rangeType']===_0x202475[_0x49cbfa(0x118)]['COMMENT'])[_0x49cbfa(0xec)](_0x385e81=>_0x385e81[_0x49cbfa(0x126)]))!=null?_0x47ff27:[],_0x4a149c=JSON[_0x49cbfa(0x12e)](_0x1dca7c),_0x362605=(await this[_0x49cbfa(0x121)][_0x49cbfa(0xed)](_0x3914fe))['getMemberID']();if(_0x4da86b){const _0x52f095={'memberId':_0x362605,'unitId':_0x3914fe,'content':_0x4a149c,'mention':_0x29aef3,'threadId':_0x5a989c},_0x395666=(await this[_0x49cbfa(0x103)][_0x49cbfa(0xd7)](_0x49cbfa(0xc5)+_0x3914fe+'/reply',{'body':_0x52f095}))['body'][_0x49cbfa(0xde)];return{..._0x168e59,'id':_0x395666[_0x49cbfa(0x113)],'dT':_0x202475[_0x49cbfa(0xbf)](+_0x395666[_0x49cbfa(0xf9)])[_0x49cbfa(0xe5)](_0x49cbfa(0x11b)),'personId':_0x395666['userId']};}else{const _0x1fa894={'memberId':_0x362605,'unitId':_0x3914fe,'content':_0x4a149c,'mention':_0x29aef3},_0x248c99=await this[_0x49cbfa(0x103)][_0x49cbfa(0xd7)]('/universer-api/comment/unit/'+_0x3914fe+'/add',{'body':_0x1fa894});return _0x33b9b5(_0x248c99[_0x49cbfa(0x123)][_0x49cbfa(0xe3)],_0x168e59);}}async['updateComment'](_0x5a535c){const _0x13bb1c=_0x3e5609;var _0x16e342,_0x25abcf;const {text:_0x5b4232,unitId:_0x2b2e10}=_0x5a535c,_0x549b7f=(_0x25abcf=(_0x16e342=_0x5b4232[_0x13bb1c(0xdb)])==null?void 0x0:_0x16e342[_0x13bb1c(0xe8)](_0x211152=>_0x211152[_0x13bb1c(0xb0)]===_0x202475[_0x13bb1c(0x118)][_0x13bb1c(0xaf)])[_0x13bb1c(0xec)](_0x3d69b8=>_0x3d69b8[_0x13bb1c(0x126)]))!=null?_0x25abcf:[],_0x4c6c13=JSON[_0x13bb1c(0x12e)](_0x5b4232),_0x919a62=_0x5a535c[_0x13bb1c(0x10c)],_0x482d0d=_0x5a535c['id'],_0x51f671={'memberId':(await this[_0x13bb1c(0x121)][_0x13bb1c(0xed)](_0x2b2e10))['getMemberID'](),'unitId':_0x2b2e10,'threadId':_0x919a62,'mention':_0x549b7f,'content':_0x4c6c13,'replyId':_0x482d0d},_0x3e61bd=await this[_0x13bb1c(0x103)][_0x13bb1c(0xd7)](_0x13bb1c(0xc5)+_0x2b2e10+_0x13bb1c(0xc2),{'body':_0x51f671});return!_0x3e61bd[_0x13bb1c(0x123)][_0x13bb1c(0x115)]||_0x3e61bd[_0x13bb1c(0x123)]['error']['code']===0x1;}async[_0x3e5609(0xc6)](_0x2303b8){const _0xc9f1ab=_0x3e5609,{unitId:_0x10386b}=_0x2303b8,_0x5c6a51=_0x2303b8['threadId'],_0x8bf873={'memberId':this[_0xc9f1ab(0x114)]['getCurrentUser']()[_0xc9f1ab(0x10d)],'unitId':_0x10386b,'threadId':_0x5c6a51,'solved':_0x2303b8['resolved']?_0x19b0c8[_0xc9f1ab(0x104)]:_0x19b0c8['OpenOrReOpen']},_0x12ba0a=await this[_0xc9f1ab(0x103)][_0xc9f1ab(0xd7)](_0xc9f1ab(0xc5)+_0x10386b+_0xc9f1ab(0x105),{'body':_0x8bf873});return!_0x12ba0a[_0xc9f1ab(0x123)]['error']||_0x12ba0a[_0xc9f1ab(0x123)][_0xc9f1ab(0x115)][_0xc9f1ab(0xb8)]===0x1;}async[_0x3e5609(0x116)](_0x3bc1be,_0x9e9625,_0x41ef59,_0x11f5cd){const _0x30a97f=_0x3e5609,_0x1c01f7={'memberId':(await this['_sessionService'][_0x30a97f(0xed)](_0x3bc1be))[_0x30a97f(0xf1)](),'threadId':_0x41ef59,'replyId':_0x11f5cd,'unitId':_0x3bc1be},_0x3f8fa8=await this['_httpService']['post'](_0x30a97f(0xc5)+_0x3bc1be+_0x30a97f(0x119),{'body':_0x1c01f7});return!_0x3f8fa8[_0x30a97f(0x123)][_0x30a97f(0x115)]||_0x3f8fa8[_0x30a97f(0x123)][_0x30a97f(0x115)][_0x30a97f(0xb8)]===0x1;}async['listComments'](_0x4ee892,_0x5d17b6,_0xbf7b2b){const _0x303bf2=_0x3e5609,_0xe64dc0={'unitId':_0x4ee892,'threadId':_0xbf7b2b},_0x88718a=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x4ee892+_0x303bf2(0xcd),{'body':_0xe64dc0}),_0x5e1eef=_0xbf7b2b[_0x303bf2(0xec)](_0x551f24=>_0x2311b1(_0x88718a[_0x303bf2(0x123)][_0x303bf2(0xc8)][_0x551f24],_0x4ee892,_0x5d17b6))[_0x303bf2(0xe8)](Boolean);return Object[_0x303bf2(0xb7)](_0x88718a[_0x303bf2(0x123)][_0x303bf2(0x109)])[_0x303bf2(0x11f)](_0x272551=>{const _0x23fb14=_0x303bf2;this[_0x23fb14(0x114)][_0x23fb14(0x124)](_0x272551);}),_0x5e1eef;}[_0x3e5609(0xf4)](_0x2c8f99){const _0x1ae9fa=_0x3e5609;return{'id':_0x2c8f99['id'],'threadId':_0x2c8f99[_0x1ae9fa(0x10c)],'ref':_0x2c8f99['ref']};}};_0xdf0bdf=_0xb4a31d([_0x208ff8(0x0,_0x202475['Inject'](_0x507eab['HTTPService'])),_0x208ff8(0x1,_0x202475[_0x3e5609(0xc4)](_0x202475[_0x3e5609(0xf2)])),_0x208ff8(0x2,_0x202475[_0x3e5609(0xc4)](_0x210bf8[_0x3e5609(0xd2)]))],_0xdf0bdf);var _0x27ff12=Object['getOwnPropertyDescriptor'],_0x5a430b=(_0x804519,_0xa83008,_0x22a1a4,_0x58094b)=>{const _0x33e9d6=_0x3e5609;for(var _0xfef8e4=_0x58094b>0x1?void 0x0:_0x58094b?_0x27ff12(_0xa83008,_0x22a1a4):_0xa83008,_0x45c851=_0x804519[_0x33e9d6(0xb9)]-0x1,_0x26e74b;_0x45c851>=0x0;_0x45c851--)(_0x26e74b=_0x804519[_0x45c851])&&(_0xfef8e4=_0x26e74b(_0xfef8e4)||_0xfef8e4);return _0xfef8e4;},_0x5d785c=(_0x1229f5,_0x2abb33)=>(_0x438bce,_0x41c468)=>_0x2abb33(_0x438bce,_0x41c468,_0x1229f5);let _0x2bb563=class extends _0x202475['Disposable']{constructor(_0x4803ab,_0x3adaf8){const _0x21160b=_0x3e5609;super(),this[_0x21160b(0x10f)]=_0x4803ab,this[_0x21160b(0x10b)]=_0x3adaf8,this[_0x21160b(0xf3)]();}['_initDataSource'](){const _0x378b7c=_0x3e5609;this[_0x378b7c(0x10f)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x378b7c(0xbd)]=!0x1;}};_0x2bb563=_0x5a430b([_0x5d785c(0x0,_0x4dc4ac[_0x3e5609(0xbe)]),_0x5d785c(0x1,_0x202475['Inject'](_0xdf0bdf))],_0x2bb563);var _0x371113=Object[_0x3e5609(0xb5)],_0x304192=Object[_0x3e5609(0xfd)],_0xb62991=(_0x174803,_0xd98d41,_0x3bb23a)=>_0xd98d41 in _0x174803?_0x371113(_0x174803,_0xd98d41,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3bb23a}):_0x174803[_0xd98d41]=_0x3bb23a,_0x251a17=(_0xfbf9af,_0x4ad050,_0x1a95f7,_0x4b9a68)=>{const _0x45803d=_0x3e5609;for(var _0x19a345=_0x4b9a68>0x1?void 0x0:_0x4b9a68?_0x304192(_0x4ad050,_0x1a95f7):_0x4ad050,_0x3bf28a=_0xfbf9af[_0x45803d(0xb9)]-0x1,_0x4373e3;_0x3bf28a>=0x0;_0x3bf28a--)(_0x4373e3=_0xfbf9af[_0x3bf28a])&&(_0x19a345=_0x4373e3(_0x19a345)||_0x19a345);return _0x19a345;},_0x360acd=(_0x4056c6,_0x2b1797)=>(_0x31bd9f,_0x2ae1da)=>_0x2b1797(_0x31bd9f,_0x2ae1da,_0x4056c6),_0x54f9de=(_0x144489,_0x480160,_0x5d9d6f)=>_0xb62991(_0x144489,typeof _0x480160!=_0x3e5609(0xf0)?_0x480160+'':_0x480160,_0x5d9d6f);_0x9e9bf4[_0x3e5609(0xca)]=class extends _0x202475['Plugin']{constructor(_0x42c1ca=_0x4f5793,_0x21479e,_0xfb189d){const _0x31c4b9=_0x3e5609;super(),this[_0x31c4b9(0xf6)]=_0x42c1ca,this[_0x31c4b9(0xd8)]=_0x21479e,this[_0x31c4b9(0xb2)]=_0xfb189d;const {..._0x5ade38}=_0x202475[_0x31c4b9(0x10e)]({},_0x4f5793,this[_0x31c4b9(0xf6)]);this[_0x31c4b9(0xb2)][_0x31c4b9(0xc3)](_0x5626f9,_0x5ade38);}['onStarting'](){[[_0xdf0bdf],[_0x2bb563],[_0x4f3510]]['forEach'](_0xb2c998=>{const _0x31f197=_0x304b;this[_0x31f197(0xd8)]['add'](_0xb2c998);});}[_0x3e5609(0x120)](){const _0x3f4ad0=_0x3e5609;this['_injector']['get'](_0x2bb563),this['_injector'][_0x3f4ad0(0xc1)](_0x4f3510);}},_0x54f9de(_0x9e9bf4[_0x3e5609(0xca)],'pluginName',_0x279a9d),_0x54f9de(_0x9e9bf4['UniverThreadCommentDataSourcePlugin'],_0x3e5609(0xcc),_0x202475[_0x3e5609(0x111)][_0x3e5609(0x11e)]),_0x9e9bf4[_0x3e5609(0xca)]=_0x251a17([_0x202475[_0x3e5609(0x12b)](_0x373872[_0x3e5609(0xd5)],_0x210bf8['UniverCollaborationClientPlugin'],_0x362b49['UniverLicensePlugin']),_0x360acd(0x1,_0x202475['Inject'](_0x202475[_0x3e5609(0x11d)])),_0x360acd(0x2,_0x202475[_0x3e5609(0xb1)])],_0x9e9bf4[_0x3e5609(0xca)]),Object['defineProperty'](_0x9e9bf4,Symbol[_0x3e5609(0x125)],{'value':'Module'});}));
1
+ (function(_0x5617cd,_0x40078b){const _0x54d6fd=_0xfd9a,_0xa17569=_0x5617cd();while(!![]){try{const _0x5559f3=parseInt(_0x54d6fd(0xf1))/0x1+-parseInt(_0x54d6fd(0x125))/0x2+-parseInt(_0x54d6fd(0x114))/0x3*(-parseInt(_0x54d6fd(0xf3))/0x4)+parseInt(_0x54d6fd(0x11e))/0x5+parseInt(_0x54d6fd(0xfc))/0x6*(-parseInt(_0x54d6fd(0x139))/0x7)+-parseInt(_0x54d6fd(0xf0))/0x8*(-parseInt(_0x54d6fd(0x136))/0x9)+-parseInt(_0x54d6fd(0x128))/0xa;if(_0x5559f3===_0x40078b)break;else _0xa17569['push'](_0xa17569['shift']());}catch(_0x4c4af5){_0xa17569['push'](_0xa17569['shift']());}}}(_0x4ba8,0xafe32),function(_0x2dee80,_0x812a82){const _0xa5c6bc=_0xfd9a;typeof exports=='object'&&typeof module<'u'?_0x812a82(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=='function'&&define[_0xa5c6bc(0x12d)]?define([_0xa5c6bc(0xcf),_0xa5c6bc(0x124),'@univerjs-pro/license','@univerjs/core',_0xa5c6bc(0xc7),_0xa5c6bc(0x12c),_0xa5c6bc(0xe0),_0xa5c6bc(0x126)],_0x812a82):(_0x2dee80=typeof globalThis<'u'?globalThis:_0x2dee80||self,_0x812a82(_0x2dee80[_0xa5c6bc(0xdc)]={},_0x2dee80[_0xa5c6bc(0x135)],_0x2dee80[_0xa5c6bc(0x13a)],_0x2dee80[_0xa5c6bc(0x117)],_0x2dee80[_0xa5c6bc(0xe5)],_0x2dee80[_0xa5c6bc(0xe4)],_0x2dee80[_0xa5c6bc(0xe0)],_0x2dee80['UniverNetwork']));}(this,function(_0x4d29f2,_0x217c0e,_0x37e221,_0x32905e,_0x755e1,_0x184247,_0x4ffd50,_0x53e959){'use strict';const _0x58b6af=_0xfd9a;const _0x379e79=_0x58b6af(0x137);var _0x53814a=(_0x328956=>(_0x328956[_0x328956['OpenOrReOpen']=0x0]=_0x58b6af(0xfa),_0x328956[_0x328956[_0x58b6af(0xf9)]=0x1]=_0x58b6af(0xf9),_0x328956[_0x328956[_0x58b6af(0x10e)]=-0x1]=_0x58b6af(0x10e),_0x328956))(_0x53814a||{}),_0x1c1f6d=(_0x1002bb=>(_0x1002bb[_0x1002bb[_0x58b6af(0x11a)]=0x0]='Unknown',_0x1002bb[_0x1002bb[_0x58b6af(0xee)]=0x1]=_0x58b6af(0xee),_0x1002bb[_0x1002bb[_0x58b6af(0x122)]=0x2]=_0x58b6af(0x122),_0x1002bb[_0x1002bb['Edit']=0x3]=_0x58b6af(0x103),_0x1002bb[_0x1002bb[_0x58b6af(0xdf)]=0x4]=_0x58b6af(0xdf),_0x1002bb[_0x1002bb[_0x58b6af(0xb5)]=0x5]=_0x58b6af(0xb5),_0x1002bb[_0x1002bb[_0x58b6af(0x10e)]=-0x1]=_0x58b6af(0x10e),_0x1002bb))(_0x1c1f6d||{});const _0x2ef30b=_0x565ecc=>_0x32905e['dayjs'](new Date(+_0x565ecc))['format'](_0x58b6af(0x108)),_0x2d1c3f=async(_0x36c8f8,_0x56b803)=>{const _0xe2a725=_0x58b6af,_0x333613=_0x36c8f8[_0xe2a725(0x110)](_0x32905e[_0xe2a725(0x102)]),_0x3cf0ca=_0x36c8f8['get'](_0x53e959['HTTPService']);_0x56b803['forEach'](_0x10a82b=>{const _0x2ac92f=_0xe2a725;_0x333613[_0x2ac92f(0xbb)](_0x10a82b)&&_0x56b803[_0x2ac92f(0x104)](_0x10a82b);}),_0x56b803[_0xe2a725(0x123)]&&(await _0x3cf0ca['get'](_0xe2a725(0x10a),{'params':{'userIDs':[..._0x56b803]}}))[_0xe2a725(0xcb)][_0xe2a725(0xea)][_0xe2a725(0xb9)](_0x44b216=>{const _0x530b72=_0xe2a725;_0x44b216&&_0x333613[_0x530b72(0xd9)](_0x44b216);});};var _0x39a2d9=Object['getOwnPropertyDescriptor'],_0x50939f=(_0x450453,_0xfb6952,_0x293fba,_0x17a63a)=>{const _0x3333b5=_0x58b6af;for(var _0x35f3c1=_0x17a63a>0x1?void 0x0:_0x17a63a?_0x39a2d9(_0xfb6952,_0x293fba):_0xfb6952,_0x1a99de=_0x450453[_0x3333b5(0x112)]-0x1,_0x41a6a3;_0x1a99de>=0x0;_0x1a99de--)(_0x41a6a3=_0x450453[_0x1a99de])&&(_0x35f3c1=_0x41a6a3(_0x35f3c1)||_0x35f3c1);return _0x35f3c1;},_0x45db65=(_0x3cd17b,_0x4e4bd9)=>(_0x42a318,_0x12f6e8)=>_0x4e4bd9(_0x42a318,_0x12f6e8,_0x3cd17b);let _0x509eb6=class extends _0x32905e[_0x58b6af(0x11b)]{constructor(_0x2e18ac,_0x52ab0e,_0x21c58a,_0x1242f0){const _0x426d54=_0x58b6af;super(),this['_commentService']=_0x2e18ac,this[_0x426d54(0xd2)]=_0x52ab0e,this[_0x426d54(0xe3)]=_0x21c58a,this[_0x426d54(0xd3)]=_0x1242f0,this[_0x426d54(0xc8)](),this['_initUserSync']();}[_0x58b6af(0x129)](){const _0x3475a5=_0x58b6af;this[_0x3475a5(0x10c)](this[_0x3475a5(0xd2)][_0x3475a5(0xda)][_0x3475a5(0xbd)](_0x4ffd50[_0x3475a5(0x12b)](0x10))[_0x3475a5(0x11d)](_0x2ab170=>{const _0x1dbacc=_0x3475a5,_0x355ea7=new Set();_0x2ab170[_0x1dbacc(0xb9)](_0x880a47=>{const _0x1e6b92=_0x1dbacc;switch(_0x880a47[_0x1e6b92(0xc0)]){case'add':{const _0x25f39e=_0x880a47[_0x1e6b92(0xef)]['personId'];_0x355ea7[_0x1e6b92(0x127)](_0x25f39e);break;}}}),_0x2d1c3f(this[_0x1dbacc(0xd3)],_0x355ea7);}));}[_0x58b6af(0xc8)](){const _0x2fddb3=_0x58b6af;this['disposeWithMe'](this[_0x2fddb3(0x111)]['commentUpdate$'][_0x2fddb3(0x11d)](async _0x3d7834=>{const _0x1bf521=_0x2fddb3;var _0x5dbf8f,_0x1e866e,_0x562693,_0x1d47cc;const _0x144d9f=(_0x5dbf8f=this[_0x1bf521(0xd2)]['getUnit'](_0x3d7834[_0x1bf521(0xc6)])[_0x1bf521(0x105)](_0x2e976b=>_0x2e976b[_0x1bf521(0x116)]===_0x3d7834['threadId']))==null?void 0x0:_0x5dbf8f[_0x1bf521(0xd4)];if(!_0x144d9f)return;const {unitId:_0x953a21,subUnitId:_0x155340}=_0x144d9f;switch(_0x3d7834[_0x1bf521(0xf6)]&&this['_userService'][_0x1bf521(0xd9)](_0x3d7834['user']),_0x3d7834[_0x1bf521(0xc0)]){case _0x1c1f6d[_0x1bf521(0xee)]:break;case _0x1c1f6d['Reply']:{this['_threadCommentModel'][_0x1bf521(0x109)](_0x953a21,_0x155340,{'unitId':_0x953a21,'subUnitId':_0x155340,'ref':'','id':_0x3d7834[_0x1bf521(0x12f)],'dT':_0x2ef30b(+_0x3d7834[_0x1bf521(0x13b)]),'threadId':_0x3d7834['threadId'],'personId':(_0x562693=(_0x1e866e=_0x3d7834[_0x1bf521(0xf6)])==null?void 0x0:_0x1e866e['userID'])!=null?_0x562693:_0x3d7834[_0x1bf521(0xb8)],'text':JSON[_0x1bf521(0x101)](_0x3d7834[_0x1bf521(0xc3)]),'parentId':_0x144d9f['id']});break;}case _0x1c1f6d['Delete']:{const _0x179d70=this[_0x1bf521(0xd2)][_0x1bf521(0x131)](_0x953a21,_0x155340,_0x3d7834['replyId']);_0x179d70&&_0x179d70[_0x1bf521(0xca)]&&this[_0x1bf521(0xd2)][_0x1bf521(0x11c)](_0x953a21,_0x155340,_0x3d7834[_0x1bf521(0x12f)]);break;}case _0x1c1f6d[_0x1bf521(0x103)]:{this[_0x1bf521(0xd2)][_0x1bf521(0x115)](_0x953a21,_0x155340,{'commentId':_0x3d7834[_0x1bf521(0x12f)],'text':JSON[_0x1bf521(0x101)](_0x3d7834['content'])});break;}case _0x1c1f6d[_0x1bf521(0xb5)]:{const _0x4b195e=(_0x1d47cc=this['_threadCommentModel'][_0x1bf521(0xd7)](_0x3d7834['unitId'])[_0x1bf521(0x105)](_0x494d69=>_0x494d69['threadId']===_0x3d7834[_0x1bf521(0x116)]))==null?void 0x0:_0x1d47cc['root'];_0x4b195e&&this[_0x1bf521(0xd2)][_0x1bf521(0x12e)](_0x953a21,_0x155340,_0x4b195e['id'],_0x3d7834[_0x1bf521(0xf2)]===_0x53814a[_0x1bf521(0xf9)]);break;}}}));}};_0x509eb6=_0x50939f([_0x45db65(0x0,_0x32905e[_0x58b6af(0x121)](_0x217c0e['CommentService'])),_0x45db65(0x1,_0x32905e[_0x58b6af(0x121)](_0x184247[_0x58b6af(0x132)])),_0x45db65(0x2,_0x32905e[_0x58b6af(0x121)](_0x32905e[_0x58b6af(0x102)])),_0x45db65(0x3,_0x32905e[_0x58b6af(0x121)](_0x32905e[_0x58b6af(0x130)]))],_0x509eb6);const _0x45e78a='thread-comment-data-source.config',_0x245238={};var _0x1cc9aa=Object[_0x58b6af(0xd6)],_0x435b09=(_0x6ff581,_0x35a1d6,_0x33ba56,_0x42183d)=>{for(var _0x498770=_0x42183d>0x1?void 0x0:_0x42183d?_0x1cc9aa(_0x35a1d6,_0x33ba56):_0x35a1d6,_0x241c6f=_0x6ff581['length']-0x1,_0x268758;_0x241c6f>=0x0;_0x241c6f--)(_0x268758=_0x6ff581[_0x241c6f])&&(_0x498770=_0x268758(_0x498770)||_0x498770);return _0x498770;},_0x3debcb=(_0x3bfd81,_0x10d7c3)=>(_0x42e6a2,_0x34070b)=>_0x10d7c3(_0x42e6a2,_0x34070b,_0x3bfd81);function _0x151da5(_0x367cc5,_0x2ab70d){const _0x6b7e21=_0x58b6af,_0x344dc8=_0x367cc5['replies'][0x0];return{..._0x2ab70d,'id':_0x344dc8['replyId'],'resolved':_0x367cc5['solved']===0x1,'dT':_0x2ef30b(_0x344dc8[_0x6b7e21(0x13b)]),'personId':_0x344dc8[_0x6b7e21(0xb8)],'threadId':_0x344dc8[_0x6b7e21(0x116)]};}function _0x120876(_0x94061,_0x17447e,_0x52a099){const _0xe753d=_0x58b6af;var _0x501abe,_0xbf85f1;if(((_0xbf85f1=(_0x501abe=_0x94061==null?void 0x0:_0x94061[_0xe753d(0x120)])==null?void 0x0:_0x501abe[_0xe753d(0x112)])!=null?_0xbf85f1:0x0)>0x0){const _0x5562a1=(_0x193f66,_0x193d38)=>({'id':_0x193f66[_0xe753d(0x12f)],'threadId':_0x193f66[_0xe753d(0x116)],'dT':_0x2ef30b(_0x193f66['createTimestamp']),'personId':_0x193f66[_0xe753d(0xb8)],'resolved':_0x94061['solved']===_0x53814a['Solved'],'unitId':_0x17447e,'subUnitId':_0x52a099,'text':JSON[_0xe753d(0x101)](_0x193f66[_0xe753d(0xc3)]),'parentId':_0x193d38}),_0x16f544=_0x5562a1(_0x94061['replies'][0x0]);return{..._0x16f544,'children':_0x94061[_0xe753d(0x120)][_0xe753d(0xe1)](0x1)['map'](_0x314816=>_0x5562a1(_0x314816,_0x16f544['id']))};}return null;}let _0x2313c9=class{constructor(_0x23b1e7,_0x3687ca,_0x29f7ca){const _0x1b9257=_0x58b6af;this[_0x1b9257(0x11f)]=_0x23b1e7,this[_0x1b9257(0xe3)]=_0x3687ca,this[_0x1b9257(0xdb)]=_0x29f7ca;}async[_0x58b6af(0x109)](_0x4286c7){const _0x59a6a0=_0x58b6af;var _0x395ccb,_0x15462e;const {parentId:_0x4e35ee,unitId:_0x4fb3be,text:_0x27f5cb,threadId:_0x119542}=_0x4286c7,_0x179653=(_0x15462e=(_0x395ccb=_0x27f5cb[_0x59a6a0(0x12a)])==null?void 0x0:_0x395ccb['filter'](_0x3ae080=>_0x3ae080['rangeType']===_0x32905e[_0x59a6a0(0xfe)][_0x59a6a0(0xb7)])['map'](_0x4e0dad=>_0x4e0dad[_0x59a6a0(0xf4)]))!=null?_0x15462e:[],_0xc08086=JSON[_0x59a6a0(0xc4)](_0x27f5cb),_0x4950e1=(await this[_0x59a6a0(0xdb)][_0x59a6a0(0x113)](_0x4fb3be))[_0x59a6a0(0x107)]();if(_0x4e35ee){const _0x363da8={'memberId':_0x4950e1,'unitId':_0x4fb3be,'content':_0xc08086,'mention':_0x179653,'threadId':_0x119542},_0x356935=(await this[_0x59a6a0(0x11f)][_0x59a6a0(0xc5)](_0x59a6a0(0x10b)+_0x4fb3be+'/reply',{'body':_0x363da8}))[_0x59a6a0(0xcb)][_0x59a6a0(0xff)];return{..._0x4286c7,'id':_0x356935['replyId'],'dT':_0x32905e[_0x59a6a0(0xce)](+_0x356935[_0x59a6a0(0x13b)])[_0x59a6a0(0xba)](_0x59a6a0(0x108)),'personId':_0x356935[_0x59a6a0(0xb8)]};}else{const _0xca38c7={'memberId':_0x4950e1,'unitId':_0x4fb3be,'content':_0xc08086,'mention':_0x179653},_0x54daf1=await this['_httpService'][_0x59a6a0(0xc5)](_0x59a6a0(0x10b)+_0x4fb3be+_0x59a6a0(0xc1),{'body':_0xca38c7});return _0x151da5(_0x54daf1[_0x59a6a0(0xcb)][_0x59a6a0(0xd5)],_0x4286c7);}}async[_0x58b6af(0x115)](_0x5ce69a){const _0x1e3c04=_0x58b6af;var _0x52c907,_0x2710d5;const {text:_0x2d9cd6,unitId:_0x4e65de}=_0x5ce69a,_0x2ba9b3=(_0x2710d5=(_0x52c907=_0x2d9cd6['customRanges'])==null?void 0x0:_0x52c907['filter'](_0x3d3a64=>_0x3d3a64[_0x1e3c04(0xeb)]===_0x32905e[_0x1e3c04(0xfe)]['COMMENT'])['map'](_0x4e93c1=>_0x4e93c1[_0x1e3c04(0xf4)]))!=null?_0x2710d5:[],_0x3d7ac5=JSON['stringify'](_0x2d9cd6),_0x514f18=_0x5ce69a[_0x1e3c04(0x116)],_0x4caee4=_0x5ce69a['id'],_0x20a279={'memberId':(await this[_0x1e3c04(0xdb)][_0x1e3c04(0x113)](_0x4e65de))[_0x1e3c04(0x107)](),'unitId':_0x4e65de,'threadId':_0x514f18,'mention':_0x2ba9b3,'content':_0x3d7ac5,'replyId':_0x4caee4},_0xa57cad=await this['_httpService'][_0x1e3c04(0xc5)](_0x1e3c04(0x10b)+_0x4e65de+'/edit',{'body':_0x20a279});return!_0xa57cad[_0x1e3c04(0xcb)][_0x1e3c04(0xd0)]||_0xa57cad['body'][_0x1e3c04(0xd0)]['code']===0x1;}async[_0x58b6af(0x12e)](_0x1968ed){const _0x56602f=_0x58b6af,{unitId:_0x928749}=_0x1968ed,_0x5a812c=_0x1968ed[_0x56602f(0x116)],_0x244475={'memberId':this[_0x56602f(0xe3)]['getCurrentUser']()['userID'],'unitId':_0x928749,'threadId':_0x5a812c,'solved':_0x1968ed[_0x56602f(0x138)]?_0x53814a[_0x56602f(0xf9)]:_0x53814a[_0x56602f(0xfa)]},_0x589899=await this[_0x56602f(0x11f)]['post']('/universer-api/comment/unit/'+_0x928749+_0x56602f(0x134),{'body':_0x244475});return!_0x589899['body']['error']||_0x589899[_0x56602f(0xcb)][_0x56602f(0xd0)]['code']===0x1;}async[_0x58b6af(0x11c)](_0x17661b,_0x4972c2,_0x500233,_0x312b43){const _0x124c10=_0x58b6af,_0x4fb490={'memberId':(await this['_sessionService'][_0x124c10(0x113)](_0x17661b))[_0x124c10(0x107)](),'threadId':_0x500233,'replyId':_0x312b43,'unitId':_0x17661b},_0x1711aa=await this[_0x124c10(0x11f)][_0x124c10(0xc5)](_0x124c10(0x10b)+_0x17661b+'/delete',{'body':_0x4fb490});return!_0x1711aa['body']['error']||_0x1711aa[_0x124c10(0xcb)][_0x124c10(0xd0)][_0x124c10(0x106)]===0x1;}async[_0x58b6af(0xd1)](_0x21bdd3,_0x4342d7,_0x28854d){const _0x4b7bdb=_0x58b6af,_0xaa7ddf={'unitId':_0x21bdd3,'threadId':_0x28854d},_0x45ae22=await this[_0x4b7bdb(0x11f)][_0x4b7bdb(0xc5)]('/universer-api/comment/unit/'+_0x21bdd3+_0x4b7bdb(0xe2),{'body':_0xaa7ddf}),_0x358b73=_0x28854d[_0x4b7bdb(0xf7)](_0x3656c7=>_0x120876(_0x45ae22['body'][_0x4b7bdb(0xed)][_0x3656c7],_0x21bdd3,_0x4342d7))[_0x4b7bdb(0xd8)](Boolean);return Object[_0x4b7bdb(0xfd)](_0x45ae22[_0x4b7bdb(0xcb)][_0x4b7bdb(0xea)])[_0x4b7bdb(0xb9)](_0x9f3e48=>{this['_userService']['addUser'](_0x9f3e48);}),_0x358b73;}[_0x58b6af(0xb6)](_0x2b95ab){const _0x335ba8=_0x58b6af;return{'id':_0x2b95ab['id'],'threadId':_0x2b95ab[_0x335ba8(0x116)],'ref':_0x2b95ab[_0x335ba8(0xdd)]};}};_0x2313c9=_0x435b09([_0x3debcb(0x0,_0x32905e['Inject'](_0x53e959[_0x58b6af(0x118)])),_0x3debcb(0x1,_0x32905e[_0x58b6af(0x121)](_0x32905e['UserManagerService'])),_0x3debcb(0x2,_0x32905e[_0x58b6af(0x121)](_0x217c0e[_0x58b6af(0xe8)]))],_0x2313c9);var _0x5ef52f=Object[_0x58b6af(0xd6)],_0x24ada9=(_0x55ac4d,_0x109920,_0x52646c,_0xab023e)=>{const _0x5c9509=_0x58b6af;for(var _0x34d219=_0xab023e>0x1?void 0x0:_0xab023e?_0x5ef52f(_0x109920,_0x52646c):_0x109920,_0x1f082d=_0x55ac4d[_0x5c9509(0x112)]-0x1,_0x1f8c4d;_0x1f082d>=0x0;_0x1f082d--)(_0x1f8c4d=_0x55ac4d[_0x1f082d])&&(_0x34d219=_0x1f8c4d(_0x34d219)||_0x34d219);return _0x34d219;},_0x5a2316=(_0x5af494,_0x205cca)=>(_0x2e8013,_0x3db82d)=>_0x205cca(_0x2e8013,_0x3db82d,_0x5af494);let _0x40c124=class extends _0x32905e['Disposable']{constructor(_0x283a1c,_0x16c4c3){const _0x5851ea=_0x58b6af;super(),this['_threadCommentDataSourceService']=_0x283a1c,this[_0x5851ea(0x119)]=_0x16c4c3,this[_0x5851ea(0xf8)]();}['_initDataSource'](){const _0x741710=_0x58b6af;this[_0x741710(0xbc)]['dataSource']=this[_0x741710(0x119)],this[_0x741710(0xbc)][_0x741710(0xe6)]=!0x1;}};_0x40c124=_0x24ada9([_0x5a2316(0x0,_0x184247['IThreadCommentDataSourceService']),_0x5a2316(0x1,_0x32905e[_0x58b6af(0x121)](_0x2313c9))],_0x40c124);var _0x1006ce=Object[_0x58b6af(0xcc)],_0x2b7ddf=Object['getOwnPropertyDescriptor'],_0x304488=(_0x2b5b05,_0x3820c4,_0x30d704)=>_0x3820c4 in _0x2b5b05?_0x1006ce(_0x2b5b05,_0x3820c4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x30d704}):_0x2b5b05[_0x3820c4]=_0x30d704,_0x508122=(_0x183a86,_0x3c1873,_0xa46be4,_0x4250c5)=>{for(var _0x167aa2=_0x4250c5>0x1?void 0x0:_0x4250c5?_0x2b7ddf(_0x3c1873,_0xa46be4):_0x3c1873,_0x46d1b0=_0x183a86['length']-0x1,_0x314f12;_0x46d1b0>=0x0;_0x46d1b0--)(_0x314f12=_0x183a86[_0x46d1b0])&&(_0x167aa2=_0x314f12(_0x167aa2)||_0x167aa2);return _0x167aa2;},_0xbaca1d=(_0x1c90bc,_0x148c67)=>(_0x27a234,_0x2fdfda)=>_0x148c67(_0x27a234,_0x2fdfda,_0x1c90bc),_0x57ce49=(_0x1946b1,_0x917f08,_0x56dcb6)=>_0x304488(_0x1946b1,typeof _0x917f08!='symbol'?_0x917f08+'':_0x917f08,_0x56dcb6);_0x4d29f2[_0x58b6af(0xc9)]=class extends _0x32905e[_0x58b6af(0x133)]{constructor(_0x4e3e52=_0x245238,_0x55e17e,_0x601f35){const _0xc1d4a2=_0x58b6af;super(),this[_0xc1d4a2(0x10f)]=_0x4e3e52,this[_0xc1d4a2(0xd3)]=_0x55e17e,this[_0xc1d4a2(0x10d)]=_0x601f35;const {..._0x3f550f}=_0x32905e[_0xc1d4a2(0xbe)]({},_0x245238,this[_0xc1d4a2(0x10f)]);this[_0xc1d4a2(0x10d)][_0xc1d4a2(0xfb)](_0x45e78a,_0x3f550f);}[_0x58b6af(0xe7)](){const _0x30cc78=_0x58b6af;[[_0x2313c9],[_0x40c124],[_0x509eb6]][_0x30cc78(0xb9)](_0x13ccb9=>{const _0x572403=_0x30cc78;this['_injector'][_0x572403(0x127)](_0x13ccb9);});}[_0x58b6af(0xe9)](){const _0x4736f0=_0x58b6af;this[_0x4736f0(0xd3)]['get'](_0x40c124),this['_injector'][_0x4736f0(0x110)](_0x509eb6);}},_0x57ce49(_0x4d29f2['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x379e79),_0x57ce49(_0x4d29f2[_0x58b6af(0xc9)],_0x58b6af(0xc0),_0x32905e[_0x58b6af(0xf5)]['UNIVER_UNKNOWN']),_0x4d29f2[_0x58b6af(0xc9)]=_0x508122([_0x32905e['DependentOn'](_0x755e1[_0x58b6af(0x100)],_0x217c0e[_0x58b6af(0xec)],_0x37e221[_0x58b6af(0xcd)]),_0xbaca1d(0x1,_0x32905e['Inject'](_0x32905e[_0x58b6af(0x130)])),_0xbaca1d(0x2,_0x32905e[_0x58b6af(0xc2)])],_0x4d29f2[_0x58b6af(0xc9)]),Object[_0x58b6af(0xcc)](_0x4d29f2,Symbol[_0x58b6af(0xde)],{'value':_0x58b6af(0xbf)});}));function _0xfd9a(_0x3dcced,_0x418a57){_0x3dcced=_0x3dcced-0xb5;const _0x4ba8f3=_0x4ba8();let _0xfd9a5a=_0x4ba8f3[_0x3dcced];return _0xfd9a5a;}function _0x4ba8(){const _0x117e60=['UNRECOGNIZED','_config','get','_commentService','length','requireSession','1303791fAazRy','updateComment','threadId','UniverCore','HTTPService','_threadCommentDataSource','Unknown','Disposable','deleteComment','subscribe','2449415sWMSeV','_httpService','replies','Inject','Reply','size','@univerjs-pro/collaboration-client','1077390cHajiS','@univerjs/network','add','20780000RJeMQD','_initUserSync','customRanges','bufferTime','@univerjs/thread-comment','amd','resolveComment','replyId','Injector','getComment','ThreadCommentModel','Plugin','/solved','UniverProCollaborationClient','12796560hwTCtB','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolved','28JpjkdG','UniverProLicense','createTimestamp','Solve','saveCommentToSnapshot','COMMENT','userId','forEach','format','getUser','_threadCommentDataSourceService','pipe','merge','Module','type','/add','IConfigService','content','stringify','post','unitId','@univerjs/thread-comment-ui','_init','UniverThreadCommentDataSourcePlugin','parentId','body','defineProperty','UniverLicensePlugin','dayjs','exports','error','listComments','_threadCommentModel','_injector','root','comment','getOwnPropertyDescriptor','getUnit','filter','addUser','commentUpdate$','_sessionService','UniverProThreadCommentDatasource','ref','toStringTag','Delete','rxjs','slice','/list','_userService','UniverThreadComment','UniverThreadCommentUi','syncUpdateMutationToColla','onStarting','CollaborationSessionService','onReady','users','rangeType','UniverCollaborationClientPlugin','comments','Add','payload','8VbVAfT','1384403SteYfU','solved','12BygrRx','rangeId','UniverInstanceType','user','map','_initDataSource','Solved','OpenOrReOpen','setConfig','1894182ZpVQAW','values','CustomRangeType','reply','UniverThreadCommentUIPlugin','parse','UserManagerService','Edit','delete','find','code','getMemberID','YYYY/MM/DD\x20HH:mm','addComment','/universer-api/user/list','/universer-api/comment/unit/','disposeWithMe','_configService'];_0x4ba8=function(){return _0x117e60;};return _0x4ba8();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.12.4-experimental.20251210-d708bff",
3
+ "version": "0.12.4-experimental.20251211-e01e32a",
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/license": "0.12.4-experimental.20251210-d708bff",
49
- "@univerjs/network": "0.12.4-experimental.20251210-d708bff",
50
- "@univerjs/core": "0.12.4-experimental.20251210-d708bff",
51
- "@univerjs-pro/collaboration-client": "0.12.4-experimental.20251210-d708bff",
52
- "@univerjs/thread-comment": "0.12.4-experimental.20251210-d708bff",
48
+ "@univerjs-pro/collaboration-client": "0.12.4-experimental.20251211-e01e32a",
49
+ "@univerjs-pro/license": "0.12.4-experimental.20251211-e01e32a",
53
50
  "@univerjs/protocol": "0.1.47",
54
- "@univerjs/thread-comment-ui": "0.12.4-experimental.20251210-d708bff"
51
+ "@univerjs/core": "0.12.4-experimental.20251211-e01e32a",
52
+ "@univerjs/network": "0.12.4-experimental.20251211-e01e32a",
53
+ "@univerjs/thread-comment": "0.12.4-experimental.20251211-e01e32a",
54
+ "@univerjs/thread-comment-ui": "0.12.4-experimental.20251211-e01e32a"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",