@univerjs-pro/thread-comment-datasource 0.8.1-nightly.202506151606 → 0.8.1-nightly.202506161607

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 _0x4273bd=_0x2cbf;(function(_0x29cc5b,_0x2f58a2){const _0x4d14dd=_0x2cbf,_0x2a8a56=_0x29cc5b();while(!![]){try{const _0x454db6=parseInt(_0x4d14dd(0x15a))/0x1+parseInt(_0x4d14dd(0x195))/0x2*(-parseInt(_0x4d14dd(0x14a))/0x3)+-parseInt(_0x4d14dd(0x172))/0x4+-parseInt(_0x4d14dd(0x13f))/0x5+-parseInt(_0x4d14dd(0x19c))/0x6*(-parseInt(_0x4d14dd(0x15e))/0x7)+parseInt(_0x4d14dd(0x17f))/0x8*(-parseInt(_0x4d14dd(0x148))/0x9)+parseInt(_0x4d14dd(0x143))/0xa*(parseInt(_0x4d14dd(0x197))/0xb);if(_0x454db6===_0x2f58a2)break;else _0x2a8a56['push'](_0x2a8a56['shift']());}catch(_0x5b8a91){_0x2a8a56['push'](_0x2a8a56['shift']());}}}(_0x17a9,0xee943));Object['defineProperty'](exports,Symbol[_0x4273bd(0x184)],{'value':_0x4273bd(0x160)});const b=require(_0x4273bd(0x17a)),T=require(_0x4273bd(0x1a0)),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require(_0x4273bd(0x193)),w=require('rxjs'),P=require(_0x4273bd(0x18b)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xa0d434=>(_0xa0d434[_0xa0d434[_0x4273bd(0x192)]=0x0]=_0x4273bd(0x192),_0xa0d434[_0xa0d434[_0x4273bd(0x1b9)]=0x1]=_0x4273bd(0x1b9),_0xa0d434[_0xa0d434[_0x4273bd(0x163)]=-0x1]=_0x4273bd(0x163),_0xa0d434))(I||{}),v=(_0x84d24e=>(_0x84d24e[_0x84d24e[_0x4273bd(0x173)]=0x0]=_0x4273bd(0x173),_0x84d24e[_0x84d24e[_0x4273bd(0x142)]=0x1]=_0x4273bd(0x142),_0x84d24e[_0x84d24e[_0x4273bd(0x1b4)]=0x2]=_0x4273bd(0x1b4),_0x84d24e[_0x84d24e[_0x4273bd(0x169)]=0x3]=_0x4273bd(0x169),_0x84d24e[_0x84d24e['Delete']=0x4]=_0x4273bd(0x151),_0x84d24e[_0x84d24e[_0x4273bd(0x13d)]=0x5]=_0x4273bd(0x13d),_0x84d24e[_0x84d24e[_0x4273bd(0x163)]=-0x1]=_0x4273bd(0x163),_0x84d24e))(v||{});function _0x17a9(){const _0x20b6cc=['CommentService','replies','OpenOrReOpen','@univerjs/thread-comment','threadId','2PXpWfn','/list','6167953iGjqGb','unitId','updateComment','/universer-api/comment/unit/','type','326958QOjHVX','thread-comment-data-source.config','size','CustomRangeType','@univerjs-pro/license','pluginName','add','post','listComments','content','length','UniverCollaborationClientPlugin','stringify','slice','_threadCommentModel','defineProperty','_threadCommentDataSource','format','addUser','/add','userID','UniverInstanceType','replyId','COMMENT','Reply','IThreadCommentDataSourceService','rangeId','delete','getOwnPropertyDescriptor','Solved','deleteComment','getComment','/reply','Solve','addComment','1633630IQHajo','user','customRanges','Add','20pTyODt','dataSource','Inject','reply','values','27eahPCu','merge','4257717NAMSyC','resolveComment','filter','UniverThreadCommentUIPlugin','_configService','Disposable','saveCommentToSnapshot','Delete','getMemberID','_initUserSync','parse','UserManagerService','onStarting','Injector','YYYY/MM/DD\x20HH:mm','root','1371983ZtqkGd','personId','_threadCommentDataSourceService','HTTPService','154tMbmhp','_injector','Module','userId','forEach','UNRECOGNIZED','map','/solved','_userService','comments','/edit','Edit','_sessionService','solved','find','bufferTime','_init','dayjs','setConfig','getUnit','3508600eoTWEO','Unknown','ref','body','createTimestamp','getUser','symbol','subscribe','@univerjs-pro/collaboration-client','disposeWithMe','_commentService','users','code','245176TtbPNs','commentUpdate$','_initDataSource','comment','/universer-api/user/list','toStringTag','/delete','requireSession','error','UniverThreadCommentDataSourcePlugin','getCurrentUser','pipe','@univerjs/network','onReady','_httpService','CollaborationSessionService','get'];_0x17a9=function(){return _0x20b6cc;};return _0x17a9();}function _0x2cbf(_0x287195,_0x38ddd4){const _0x17a997=_0x17a9();return _0x2cbf=function(_0x2cbfa2,_0x2aa9e7){_0x2cbfa2=_0x2cbfa2-0x13a;let _0x1fb4e6=_0x17a997[_0x2cbfa2];return _0x1fb4e6;},_0x2cbf(_0x287195,_0x38ddd4);}const f=_0x2b3911=>c[_0x4273bd(0x16f)](new Date(+_0x2b3911))[_0x4273bd(0x1ad)](_0x4273bd(0x158)),R=async(_0x230799,_0x4d9cba)=>{const _0x36fb89=_0x4273bd,_0x19ae31=_0x230799[_0x36fb89(0x18f)](c[_0x36fb89(0x155)]),_0x11fed7=_0x230799[_0x36fb89(0x18f)](P[_0x36fb89(0x15d)]);_0x4d9cba[_0x36fb89(0x162)](_0x47e4a2=>{const _0x2eac18=_0x36fb89;_0x19ae31[_0x2eac18(0x177)](_0x47e4a2)&&_0x4d9cba[_0x2eac18(0x1b7)](_0x47e4a2);}),_0x4d9cba[_0x36fb89(0x19e)]&&(await _0x11fed7[_0x36fb89(0x18f)](_0x36fb89(0x183),{'params':{'userIDs':[..._0x4d9cba]}}))[_0x36fb89(0x175)]['users']['forEach'](_0x2f5f93=>{const _0x3a38e1=_0x36fb89;_0x2f5f93&&_0x19ae31[_0x3a38e1(0x1ae)](_0x2f5f93);});};var $=Object[_0x4273bd(0x1b8)],E=(_0x4bf83a,_0x2a48c5,_0x42bc98,_0x2fc269)=>{const _0x3a769d=_0x4273bd;for(var _0xafc864=_0x2fc269>0x1?void 0x0:_0x2fc269?$(_0x2a48c5,_0x42bc98):_0x2a48c5,_0x57594f=_0x4bf83a[_0x3a769d(0x1a6)]-0x1,_0x541465;_0x57594f>=0x0;_0x57594f--)(_0x541465=_0x4bf83a[_0x57594f])&&(_0xafc864=_0x541465(_0xafc864)||_0xafc864);return _0xafc864;},S=(_0x44fc3f,_0x4852ba)=>(_0x19cdcf,_0x33ab5b)=>_0x4852ba(_0x19cdcf,_0x33ab5b,_0x44fc3f);let p=class extends c['Disposable']{constructor(_0x264886,_0x1061f3,_0x48eb89,_0x1df609){const _0x57795b=_0x4273bd;super(),this[_0x57795b(0x17c)]=_0x264886,this[_0x57795b(0x1aa)]=_0x1061f3,this['_userService']=_0x48eb89,this['_injector']=_0x1df609,this[_0x57795b(0x16e)](),this['_initUserSync']();}[_0x4273bd(0x153)](){const _0x2b11ca=_0x4273bd;this['disposeWithMe'](this[_0x2b11ca(0x1aa)][_0x2b11ca(0x180)][_0x2b11ca(0x18a)](w[_0x2b11ca(0x16d)](0x10))[_0x2b11ca(0x179)](_0x115cd3=>{const _0x35e97a=_0x2b11ca,_0x2a8831=new Set();_0x115cd3[_0x35e97a(0x162)](_0x532699=>{const _0x4e0ff6=_0x35e97a;switch(_0x532699[_0x4e0ff6(0x19b)]){case _0x4e0ff6(0x1a2):{const _0x44ffd3=_0x532699['payload'][_0x4e0ff6(0x15b)];_0x2a8831[_0x4e0ff6(0x1a2)](_0x44ffd3);break;}}}),R(this[_0x35e97a(0x15f)],_0x2a8831);}));}[_0x4273bd(0x16e)](){const _0xd0d3e1=_0x4273bd;this[_0xd0d3e1(0x17b)](this[_0xd0d3e1(0x17c)][_0xd0d3e1(0x180)][_0xd0d3e1(0x179)](async _0x19d04a=>{const _0x74aaba=_0xd0d3e1;var _0x1149c7,_0x3553ea,_0x1d705f,_0x5480a4;const _0x37be08=(_0x1149c7=this[_0x74aaba(0x1aa)][_0x74aaba(0x171)](_0x19d04a[_0x74aaba(0x198)])[_0x74aaba(0x16c)](_0x5d3c96=>_0x5d3c96[_0x74aaba(0x194)]===_0x19d04a[_0x74aaba(0x194)]))==null?void 0x0:_0x1149c7[_0x74aaba(0x159)];if(!_0x37be08)return;const {unitId:_0x1a8772,subUnitId:_0x18443a}=_0x37be08;switch(_0x19d04a[_0x74aaba(0x140)]&&this[_0x74aaba(0x166)][_0x74aaba(0x1ae)](_0x19d04a[_0x74aaba(0x140)]),_0x19d04a[_0x74aaba(0x19b)]){case v['Add']:break;case v[_0x74aaba(0x1b4)]:{this['_threadCommentModel'][_0x74aaba(0x13e)](_0x1a8772,_0x18443a,{'unitId':_0x1a8772,'subUnitId':_0x18443a,'ref':'','id':_0x19d04a[_0x74aaba(0x1b2)],'dT':f(+_0x19d04a['createTimestamp']),'threadId':_0x19d04a['threadId'],'personId':(_0x1d705f=(_0x3553ea=_0x19d04a[_0x74aaba(0x140)])==null?void 0x0:_0x3553ea[_0x74aaba(0x1b0)])!=null?_0x1d705f:_0x19d04a[_0x74aaba(0x161)],'text':JSON['parse'](_0x19d04a[_0x74aaba(0x1a5)]),'parentId':_0x37be08['id']});break;}case v[_0x74aaba(0x151)]:{const _0x3c6d6a=this['_threadCommentModel'][_0x74aaba(0x13b)](_0x1a8772,_0x18443a,_0x19d04a[_0x74aaba(0x1b2)]);_0x3c6d6a&&_0x3c6d6a['parentId']&&this[_0x74aaba(0x1aa)][_0x74aaba(0x13a)](_0x1a8772,_0x18443a,_0x19d04a[_0x74aaba(0x1b2)]);break;}case v[_0x74aaba(0x169)]:{this[_0x74aaba(0x1aa)][_0x74aaba(0x199)](_0x1a8772,_0x18443a,{'commentId':_0x19d04a[_0x74aaba(0x1b2)],'text':JSON[_0x74aaba(0x154)](_0x19d04a[_0x74aaba(0x1a5)])});break;}case v[_0x74aaba(0x13d)]:{const _0x479c2a=(_0x5480a4=this[_0x74aaba(0x1aa)][_0x74aaba(0x171)](_0x19d04a[_0x74aaba(0x198)])[_0x74aaba(0x16c)](_0x4bea40=>_0x4bea40[_0x74aaba(0x194)]===_0x19d04a['threadId']))==null?void 0x0:_0x5480a4[_0x74aaba(0x159)];_0x479c2a&&this[_0x74aaba(0x1aa)][_0x74aaba(0x14b)](_0x1a8772,_0x18443a,_0x479c2a['id'],_0x19d04a[_0x74aaba(0x16b)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x4273bd(0x145)](b[_0x4273bd(0x190)])),S(0x1,c['Inject'](M['ThreadCommentModel'])),S(0x2,c[_0x4273bd(0x145)](c[_0x4273bd(0x155)])),S(0x3,c[_0x4273bd(0x145)](c[_0x4273bd(0x157)]))],p);const q=_0x4273bd(0x19d),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x468ad3,_0x392c31,_0x274bea,_0x32493d)=>{const _0x2a0b14=_0x4273bd;for(var _0x6fe643=_0x32493d>0x1?void 0x0:_0x32493d?A(_0x392c31,_0x274bea):_0x392c31,_0x2eebe1=_0x468ad3[_0x2a0b14(0x1a6)]-0x1,_0x22217f;_0x2eebe1>=0x0;_0x2eebe1--)(_0x22217f=_0x468ad3[_0x2eebe1])&&(_0x6fe643=_0x22217f(_0x6fe643)||_0x6fe643);return _0x6fe643;},_=(_0x5a1818,_0x13defc)=>(_0x3ae528,_0xa1c54c)=>_0x13defc(_0x3ae528,_0xa1c54c,_0x5a1818);function Y(_0x5bc337,_0x5d4108){const _0x44a02f=_0x4273bd,_0xf1f264=_0x5bc337[_0x44a02f(0x191)][0x0];return{..._0x5d4108,'id':_0xf1f264[_0x44a02f(0x1b2)],'resolved':_0x5bc337['solved']===0x1,'dT':f(_0xf1f264[_0x44a02f(0x176)]),'personId':_0xf1f264[_0x44a02f(0x161)],'threadId':_0xf1f264[_0x44a02f(0x194)]};}function G(_0x23e508,_0xad24cd,_0x37a589){const _0x2b55ef=_0x4273bd;var _0x12cd8b,_0x17fead;if(((_0x17fead=(_0x12cd8b=_0x23e508==null?void 0x0:_0x23e508[_0x2b55ef(0x191)])==null?void 0x0:_0x12cd8b['length'])!=null?_0x17fead:0x0)>0x0){const _0x593c7a=(_0x58b718,_0x7d408b)=>({'id':_0x58b718[_0x2b55ef(0x1b2)],'threadId':_0x58b718['threadId'],'dT':f(_0x58b718[_0x2b55ef(0x176)]),'personId':_0x58b718[_0x2b55ef(0x161)],'resolved':_0x23e508[_0x2b55ef(0x16b)]===I[_0x2b55ef(0x1b9)],'unitId':_0xad24cd,'subUnitId':_0x37a589,'text':JSON[_0x2b55ef(0x154)](_0x58b718[_0x2b55ef(0x1a5)]),'parentId':_0x7d408b}),_0x8b9e48=_0x593c7a(_0x23e508[_0x2b55ef(0x191)][0x0]);return{..._0x8b9e48,'children':_0x23e508['replies'][_0x2b55ef(0x1a9)](0x1)[_0x2b55ef(0x164)](_0x284e00=>_0x593c7a(_0x284e00,_0x8b9e48['id']))};}return null;}let g=class{constructor(_0x2a456d,_0x249a61,_0x5771c6,_0x4e62c2){const _0x215154=_0x4273bd;this[_0x215154(0x18d)]=_0x2a456d,this[_0x215154(0x166)]=_0x249a61,this[_0x215154(0x16a)]=_0x5771c6,this[_0x215154(0x15f)]=_0x4e62c2;}async['addComment'](_0x2e8cef){const _0x26b1ec=_0x4273bd;var _0x577014,_0x3ee63c;const {parentId:_0x4f7f9f,unitId:_0x38c36c,text:_0x1c2e21,threadId:_0x57a25b}=_0x2e8cef,_0x1938fb=(_0x3ee63c=(_0x577014=_0x1c2e21[_0x26b1ec(0x141)])==null?void 0x0:_0x577014[_0x26b1ec(0x14c)](_0x15f923=>_0x15f923['rangeType']===c[_0x26b1ec(0x19f)][_0x26b1ec(0x1b3)])['map'](_0x1c65f4=>_0x1c65f4['rangeId']))!=null?_0x3ee63c:[],_0x224608=JSON[_0x26b1ec(0x1a8)](_0x1c2e21),_0x4d3e72=(await this[_0x26b1ec(0x16a)][_0x26b1ec(0x186)](_0x38c36c))[_0x26b1ec(0x152)]();if(_0x4f7f9f){const _0xdd3ea8={'memberId':_0x4d3e72,'unitId':_0x38c36c,'content':_0x224608,'mention':_0x1938fb,'threadId':_0x57a25b},_0x3126c3=(await this[_0x26b1ec(0x18d)]['post'](_0x26b1ec(0x19a)+_0x38c36c+_0x26b1ec(0x13c),{'body':_0xdd3ea8}))['body'][_0x26b1ec(0x146)];return{..._0x2e8cef,'id':_0x3126c3[_0x26b1ec(0x1b2)],'dT':c['dayjs'](+_0x3126c3[_0x26b1ec(0x176)])[_0x26b1ec(0x1ad)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3126c3[_0x26b1ec(0x161)]};}else{const _0x55b603={'memberId':_0x4d3e72,'unitId':_0x38c36c,'content':_0x224608,'mention':_0x1938fb},_0x51b327=await this[_0x26b1ec(0x18d)][_0x26b1ec(0x1a3)]('/universer-api/comment/unit/'+_0x38c36c+_0x26b1ec(0x1af),{'body':_0x55b603});return Y(_0x51b327[_0x26b1ec(0x175)][_0x26b1ec(0x182)],_0x2e8cef);}}async[_0x4273bd(0x199)](_0x403483){const _0x177b82=_0x4273bd;var _0x24e9ac,_0x45df38;const {text:_0x2a8d1b,unitId:_0x1ba52d}=_0x403483,_0x315fc7=(_0x45df38=(_0x24e9ac=_0x2a8d1b[_0x177b82(0x141)])==null?void 0x0:_0x24e9ac[_0x177b82(0x14c)](_0x2e710d=>_0x2e710d['rangeType']===c[_0x177b82(0x19f)][_0x177b82(0x1b3)])[_0x177b82(0x164)](_0x22c69e=>_0x22c69e[_0x177b82(0x1b6)]))!=null?_0x45df38:[],_0xfcff2c=JSON[_0x177b82(0x1a8)](_0x2a8d1b),_0x2bc939=_0x403483[_0x177b82(0x194)],_0x4f6e0a=_0x403483['id'],_0x10405={'memberId':(await this[_0x177b82(0x16a)][_0x177b82(0x186)](_0x1ba52d))[_0x177b82(0x152)](),'unitId':_0x1ba52d,'threadId':_0x2bc939,'mention':_0x315fc7,'content':_0xfcff2c,'replyId':_0x4f6e0a},_0x1f9903=await this[_0x177b82(0x18d)][_0x177b82(0x1a3)](_0x177b82(0x19a)+_0x1ba52d+_0x177b82(0x168),{'body':_0x10405});return!_0x1f9903['body'][_0x177b82(0x187)]||_0x1f9903['body'][_0x177b82(0x187)][_0x177b82(0x17e)]===0x1;}async[_0x4273bd(0x14b)](_0x1cbcf2){const _0x11715f=_0x4273bd,{unitId:_0x447ddd}=_0x1cbcf2,_0x3c7d41=_0x1cbcf2[_0x11715f(0x194)],_0x2fb78d={'memberId':this['_userService'][_0x11715f(0x189)]()[_0x11715f(0x1b0)],'unitId':_0x447ddd,'threadId':_0x3c7d41,'solved':_0x1cbcf2['resolved']?I[_0x11715f(0x1b9)]:I[_0x11715f(0x192)]},_0x29bae8=await this[_0x11715f(0x18d)][_0x11715f(0x1a3)](_0x11715f(0x19a)+_0x447ddd+_0x11715f(0x165),{'body':_0x2fb78d});return!_0x29bae8[_0x11715f(0x175)][_0x11715f(0x187)]||_0x29bae8[_0x11715f(0x175)][_0x11715f(0x187)][_0x11715f(0x17e)]===0x1;}async[_0x4273bd(0x13a)](_0x21cd4f,_0x4adb5f,_0x34f2e9,_0x10d016){const _0x52c0f4=_0x4273bd,_0xa677d1={'memberId':(await this[_0x52c0f4(0x16a)]['requireSession'](_0x21cd4f))[_0x52c0f4(0x152)](),'threadId':_0x34f2e9,'replyId':_0x10d016,'unitId':_0x21cd4f},_0x3a1c65=await this[_0x52c0f4(0x18d)]['post']('/universer-api/comment/unit/'+_0x21cd4f+_0x52c0f4(0x185),{'body':_0xa677d1});return!_0x3a1c65[_0x52c0f4(0x175)][_0x52c0f4(0x187)]||_0x3a1c65[_0x52c0f4(0x175)][_0x52c0f4(0x187)][_0x52c0f4(0x17e)]===0x1;}async[_0x4273bd(0x1a4)](_0x2d7023,_0x21a88f,_0x429aeb){const _0x15af0e=_0x4273bd,_0x222050={'unitId':_0x2d7023,'threadId':_0x429aeb},_0x58df2f=await this['_httpService']['post'](_0x15af0e(0x19a)+_0x2d7023+_0x15af0e(0x196),{'body':_0x222050}),_0x383f12=_0x429aeb[_0x15af0e(0x164)](_0x3940c8=>G(_0x58df2f[_0x15af0e(0x175)][_0x15af0e(0x167)][_0x3940c8],_0x2d7023,_0x21a88f))['filter'](Boolean);return Object[_0x15af0e(0x147)](_0x58df2f[_0x15af0e(0x175)][_0x15af0e(0x17d)])[_0x15af0e(0x162)](_0x17aa39=>{const _0xd50f0a=_0x15af0e;this[_0xd50f0a(0x166)][_0xd50f0a(0x1ae)](_0x17aa39);}),_0x383f12;}[_0x4273bd(0x150)](_0x5664a5){const _0x3976ce=_0x4273bd;return{'id':_0x5664a5['id'],'threadId':_0x5664a5[_0x3976ce(0x194)],'ref':_0x5664a5[_0x3976ce(0x174)]};}};g=x([_(0x0,c['Inject'](P[_0x4273bd(0x15d)])),_(0x1,c[_0x4273bd(0x145)](c[_0x4273bd(0x155)])),_(0x2,c[_0x4273bd(0x145)](b[_0x4273bd(0x18e)])),_(0x3,c[_0x4273bd(0x145)](c[_0x4273bd(0x157)]))],g);var H=Object[_0x4273bd(0x1b8)],J=(_0x2d4c5a,_0x1346f6,_0x59959c,_0x57c7c9)=>{const _0x386148=_0x4273bd;for(var _0x527f88=_0x57c7c9>0x1?void 0x0:_0x57c7c9?H(_0x1346f6,_0x59959c):_0x1346f6,_0x470177=_0x2d4c5a[_0x386148(0x1a6)]-0x1,_0x536093;_0x470177>=0x0;_0x470177--)(_0x536093=_0x2d4c5a[_0x470177])&&(_0x527f88=_0x536093(_0x527f88)||_0x527f88);return _0x527f88;},y=(_0x23f083,_0x118a7b)=>(_0x2a12dc,_0x23789f)=>_0x118a7b(_0x2a12dc,_0x23789f,_0x23f083);let C=class extends c[_0x4273bd(0x14f)]{constructor(_0x5cf0f7,_0x1ef115){const _0xa669b7=_0x4273bd;super(),this[_0xa669b7(0x15c)]=_0x5cf0f7,this[_0xa669b7(0x1ac)]=_0x1ef115,this[_0xa669b7(0x181)]();}[_0x4273bd(0x181)](){const _0x55a005=_0x4273bd;this['_threadCommentDataSourceService'][_0x55a005(0x144)]=this[_0x55a005(0x1ac)],this[_0x55a005(0x15c)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x4273bd(0x1b5)]),y(0x1,c[_0x4273bd(0x145)](g))],C);var F=Object[_0x4273bd(0x1ab)],L=Object['getOwnPropertyDescriptor'],Z=(_0x44b245,_0xf05778,_0x3f2f95)=>_0xf05778 in _0x44b245?F(_0x44b245,_0xf05778,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3f2f95}):_0x44b245[_0xf05778]=_0x3f2f95,W=(_0x3a2a48,_0x2e6c7d,_0x6224ae,_0x52ed1c)=>{const _0x51eb37=_0x4273bd;for(var _0x199fe1=_0x52ed1c>0x1?void 0x0:_0x52ed1c?L(_0x2e6c7d,_0x6224ae):_0x2e6c7d,_0x210c62=_0x3a2a48[_0x51eb37(0x1a6)]-0x1,_0x2fb75e;_0x210c62>=0x0;_0x210c62--)(_0x2fb75e=_0x3a2a48[_0x210c62])&&(_0x199fe1=_0x2fb75e(_0x199fe1)||_0x199fe1);return _0x199fe1;},O=(_0x32b971,_0x20afa0)=>(_0x27169c,_0x4ad8c9)=>_0x20afa0(_0x27169c,_0x4ad8c9,_0x32b971),N=(_0x2fed45,_0x39c880,_0x440ab7)=>Z(_0x2fed45,typeof _0x39c880!=_0x4273bd(0x178)?_0x39c880+'':_0x39c880,_0x440ab7);exports[_0x4273bd(0x188)]=class extends c['Plugin']{constructor(_0x1a8e45=D,_0x1bb74e,_0x40b548){const _0x44e55a=_0x4273bd;super(),this['_config']=_0x1a8e45,this[_0x44e55a(0x15f)]=_0x1bb74e,this[_0x44e55a(0x14e)]=_0x40b548;const {..._0x5688df}=c[_0x44e55a(0x149)]({},D,this['_config']);this['_configService'][_0x44e55a(0x170)](q,_0x5688df);}[_0x4273bd(0x156)](){const _0x535a00=_0x4273bd;[[g],[C],[p]][_0x535a00(0x162)](_0x32ec85=>{const _0x4a16b7=_0x535a00;this[_0x4a16b7(0x15f)]['add'](_0x32ec85);});}[_0x4273bd(0x18c)](){const _0x235d4d=_0x4273bd;this[_0x235d4d(0x15f)]['get'](C),this[_0x235d4d(0x15f)][_0x235d4d(0x18f)](p);}},N(exports[_0x4273bd(0x188)],_0x4273bd(0x1a1),U),N(exports[_0x4273bd(0x188)],_0x4273bd(0x19b),c[_0x4273bd(0x1b1)]['UNIVER_UNKNOWN']),exports[_0x4273bd(0x188)]=W([c['DependentOn'](j[_0x4273bd(0x14d)],b[_0x4273bd(0x1a7)],T['UniverLicensePlugin']),O(0x1,c[_0x4273bd(0x145)](c[_0x4273bd(0x157)])),O(0x2,c['IConfigService'])],exports[_0x4273bd(0x188)]);
1
+ 'use strict';const _0x5a7473=_0x5780;(function(_0x2afd33,_0x1cf00a){const _0x3875dc=_0x5780,_0x53334b=_0x2afd33();while(!![]){try{const _0x2915d8=-parseInt(_0x3875dc(0x197))/0x1*(parseInt(_0x3875dc(0x1b1))/0x2)+-parseInt(_0x3875dc(0x175))/0x3*(parseInt(_0x3875dc(0x1ae))/0x4)+-parseInt(_0x3875dc(0x1bc))/0x5+parseInt(_0x3875dc(0x172))/0x6*(-parseInt(_0x3875dc(0x187))/0x7)+parseInt(_0x3875dc(0x18c))/0x8+-parseInt(_0x3875dc(0x159))/0x9*(parseInt(_0x3875dc(0x1bf))/0xa)+parseInt(_0x3875dc(0x192))/0xb;if(_0x2915d8===_0x1cf00a)break;else _0x53334b['push'](_0x53334b['shift']());}catch(_0x2d864b){_0x53334b['push'](_0x53334b['shift']());}}}(_0x46f5,0x41f53));function _0x46f5(){const _0x3a6f17=['_injector','addUser','stringify','UniverCollaborationClientPlugin','comments','CustomRangeType','91TSUspa','type','_userService','@univerjs-pro/license','replies','3741544FVhogi','UNRECOGNIZED','users','OpenOrReOpen','UniverInstanceType','/universer-api/user/list','13349094UDJiZX','delete','merge','symbol','@univerjs/core','13qGUQMK','Solved','post','/delete','body','error','/universer-api/comment/unit/','Disposable','onStarting','payload','_initUserSync','_httpService','requireSession','UserManagerService','replyId','setConfig','pipe','/reply','_threadCommentModel','_config','get','personId','@univerjs/thread-comment','6484obhjnw','content','rangeId','81586sSbQmQ','_configService','@univerjs/thread-comment-ui','syncUpdateMutationToColla','HTTPService','_commentService','Solve','Module','bufferTime','/solved','UNIVER_UNKNOWN','288330japzTy','YYYY/MM/DD\x20HH:mm','unitId','5079490pLCpUZ','/add','size','/list','Plugin','ref','getUser','Injector','@univerjs/network','disposeWithMe','_initDataSource','filter','Inject','UniverLicensePlugin','pluginName','COMMENT','code','rxjs','map','_init','rangeType','customRanges','subscribe','solved','deleteComment','createTimestamp','defineProperty','find','userID','9WIUhPv','addComment','_sessionService','UniverThreadCommentDataSourcePlugin','updateComment','getMemberID','length','parse','threadId','parentId','/edit','resolveComment','root','values','_threadCommentDataSourceService','IConfigService','Add','onReady','DependentOn','getUnit','commentUpdate$','Delete','add','listComments','Edit','123762hjhTzi','dayjs','userId','87UUffLU','format','saveCommentToSnapshot','thread-comment-data-source.config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getOwnPropertyDescriptor','Reply','forEach','UniverThreadCommentUIPlugin','CommentService','comment','_threadCommentDataSource'];_0x46f5=function(){return _0x3a6f17;};return _0x46f5();}Object[_0x5a7473(0x156)](exports,Symbol['toStringTag'],{'value':_0x5a7473(0x1b8)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x5a7473(0x18a)),c=require(_0x5a7473(0x196)),j=require(_0x5a7473(0x1b3)),M=require(_0x5a7473(0x1ad)),w=require(_0x5a7473(0x14d)),P=require(_0x5a7473(0x1c7)),U=_0x5a7473(0x179);var I=(_0x4fe93a=>(_0x4fe93a[_0x4fe93a[_0x5a7473(0x18f)]=0x0]='OpenOrReOpen',_0x4fe93a[_0x4fe93a[_0x5a7473(0x198)]=0x1]=_0x5a7473(0x198),_0x4fe93a[_0x4fe93a[_0x5a7473(0x18d)]=-0x1]=_0x5a7473(0x18d),_0x4fe93a))(I||{}),v=(_0x592765=>(_0x592765[_0x592765['Unknown']=0x0]='Unknown',_0x592765[_0x592765[_0x5a7473(0x169)]=0x1]='Add',_0x592765[_0x592765[_0x5a7473(0x17b)]=0x2]=_0x5a7473(0x17b),_0x592765[_0x592765[_0x5a7473(0x171)]=0x3]='Edit',_0x592765[_0x592765[_0x5a7473(0x16e)]=0x4]=_0x5a7473(0x16e),_0x592765[_0x592765[_0x5a7473(0x1b7)]=0x5]=_0x5a7473(0x1b7),_0x592765[_0x592765[_0x5a7473(0x18d)]=-0x1]=_0x5a7473(0x18d),_0x592765))(v||{});const f=_0x30aae6=>c['dayjs'](new Date(+_0x30aae6))[_0x5a7473(0x176)](_0x5a7473(0x1bd)),R=async(_0x47cd8b,_0x2a508c)=>{const _0x1acf27=_0x5a7473,_0x5b38f1=_0x47cd8b[_0x1acf27(0x1ab)](c[_0x1acf27(0x1a4)]),_0xeab1c8=_0x47cd8b['get'](P[_0x1acf27(0x1b5)]);_0x2a508c[_0x1acf27(0x17c)](_0x315d9b=>{const _0x4aad08=_0x1acf27;_0x5b38f1[_0x4aad08(0x1c5)](_0x315d9b)&&_0x2a508c[_0x4aad08(0x193)](_0x315d9b);}),_0x2a508c[_0x1acf27(0x1c1)]&&(await _0xeab1c8[_0x1acf27(0x1ab)](_0x1acf27(0x191),{'params':{'userIDs':[..._0x2a508c]}}))['body'][_0x1acf27(0x18e)][_0x1acf27(0x17c)](_0x1179e6=>{_0x1179e6&&_0x5b38f1['addUser'](_0x1179e6);});};var $=Object[_0x5a7473(0x17a)],E=(_0x1be346,_0xc501f9,_0x1eae46,_0x42c049)=>{const _0x2bb034=_0x5a7473;for(var _0x259c94=_0x42c049>0x1?void 0x0:_0x42c049?$(_0xc501f9,_0x1eae46):_0xc501f9,_0x66fdf6=_0x1be346[_0x2bb034(0x15f)]-0x1,_0x320c27;_0x66fdf6>=0x0;_0x66fdf6--)(_0x320c27=_0x1be346[_0x66fdf6])&&(_0x259c94=_0x320c27(_0x259c94)||_0x259c94);return _0x259c94;},S=(_0x52d42c,_0xadaa7d)=>(_0x6cd097,_0x29cf7d)=>_0xadaa7d(_0x6cd097,_0x29cf7d,_0x52d42c);let p=class extends c[_0x5a7473(0x19e)]{constructor(_0xea76ee,_0x57e70d,_0x25275c,_0x10d749){const _0x1945d5=_0x5a7473;super(),this[_0x1945d5(0x1b6)]=_0xea76ee,this['_threadCommentModel']=_0x57e70d,this[_0x1945d5(0x189)]=_0x25275c,this[_0x1945d5(0x181)]=_0x10d749,this[_0x1945d5(0x14f)](),this[_0x1945d5(0x1a1)]();}[_0x5a7473(0x1a1)](){const _0x89d0e3=_0x5a7473;this['disposeWithMe'](this[_0x89d0e3(0x1a9)][_0x89d0e3(0x16d)][_0x89d0e3(0x1a7)](w[_0x89d0e3(0x1b9)](0x10))[_0x89d0e3(0x152)](_0x5ebfac=>{const _0x1d48ee=new Set();_0x5ebfac['forEach'](_0x39326f=>{const _0x593bd=_0x5780;switch(_0x39326f[_0x593bd(0x188)]){case'add':{const _0x540ec6=_0x39326f[_0x593bd(0x1a0)][_0x593bd(0x1ac)];_0x1d48ee['add'](_0x540ec6);break;}}}),R(this['_injector'],_0x1d48ee);}));}[_0x5a7473(0x14f)](){const _0x25366b=_0x5a7473;this[_0x25366b(0x1c8)](this[_0x25366b(0x1b6)][_0x25366b(0x16d)][_0x25366b(0x152)](async _0x4c61c2=>{const _0x366e3b=_0x25366b;var _0x2304d6,_0x32cb6d,_0x115194,_0xb21282;const _0xd2669a=(_0x2304d6=this[_0x366e3b(0x1a9)][_0x366e3b(0x16c)](_0x4c61c2[_0x366e3b(0x1be)])[_0x366e3b(0x157)](_0x224dd9=>_0x224dd9[_0x366e3b(0x161)]===_0x4c61c2[_0x366e3b(0x161)]))==null?void 0x0:_0x2304d6[_0x366e3b(0x165)];if(!_0xd2669a)return;const {unitId:_0x3fad69,subUnitId:_0x233258}=_0xd2669a;switch(_0x4c61c2['user']&&this[_0x366e3b(0x189)][_0x366e3b(0x182)](_0x4c61c2['user']),_0x4c61c2[_0x366e3b(0x188)]){case v[_0x366e3b(0x169)]:break;case v[_0x366e3b(0x17b)]:{this[_0x366e3b(0x1a9)]['addComment'](_0x3fad69,_0x233258,{'unitId':_0x3fad69,'subUnitId':_0x233258,'ref':'','id':_0x4c61c2['replyId'],'dT':f(+_0x4c61c2['createTimestamp']),'threadId':_0x4c61c2[_0x366e3b(0x161)],'personId':(_0x115194=(_0x32cb6d=_0x4c61c2['user'])==null?void 0x0:_0x32cb6d['userID'])!=null?_0x115194:_0x4c61c2[_0x366e3b(0x174)],'text':JSON[_0x366e3b(0x160)](_0x4c61c2['content']),'parentId':_0xd2669a['id']});break;}case v['Delete']:{const _0x56e54d=this['_threadCommentModel']['getComment'](_0x3fad69,_0x233258,_0x4c61c2[_0x366e3b(0x1a5)]);_0x56e54d&&_0x56e54d[_0x366e3b(0x162)]&&this[_0x366e3b(0x1a9)][_0x366e3b(0x154)](_0x3fad69,_0x233258,_0x4c61c2[_0x366e3b(0x1a5)]);break;}case v[_0x366e3b(0x171)]:{this[_0x366e3b(0x1a9)][_0x366e3b(0x15d)](_0x3fad69,_0x233258,{'commentId':_0x4c61c2[_0x366e3b(0x1a5)],'text':JSON[_0x366e3b(0x160)](_0x4c61c2[_0x366e3b(0x1af)])});break;}case v['Solve']:{const _0x3f3851=(_0xb21282=this[_0x366e3b(0x1a9)][_0x366e3b(0x16c)](_0x4c61c2['unitId'])['find'](_0x1bee86=>_0x1bee86[_0x366e3b(0x161)]===_0x4c61c2[_0x366e3b(0x161)]))==null?void 0x0:_0xb21282[_0x366e3b(0x165)];_0x3f3851&&this[_0x366e3b(0x1a9)]['resolveComment'](_0x3fad69,_0x233258,_0x3f3851['id'],_0x4c61c2['solved']===I[_0x366e3b(0x198)]);break;}}}));}};p=E([S(0x0,c[_0x5a7473(0x1cb)](b[_0x5a7473(0x17e)])),S(0x1,c[_0x5a7473(0x1cb)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0x5a7473(0x1a4)])),S(0x3,c[_0x5a7473(0x1cb)](c[_0x5a7473(0x1c6)]))],p);const q=_0x5a7473(0x178),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x127a76,_0x254249,_0x5c4d87,_0x17c975)=>{for(var _0x570008=_0x17c975>0x1?void 0x0:_0x17c975?A(_0x254249,_0x5c4d87):_0x254249,_0x5ca767=_0x127a76['length']-0x1,_0x346c03;_0x5ca767>=0x0;_0x5ca767--)(_0x346c03=_0x127a76[_0x5ca767])&&(_0x570008=_0x346c03(_0x570008)||_0x570008);return _0x570008;},_=(_0x20151f,_0x39145d)=>(_0x5b47e3,_0x327454)=>_0x39145d(_0x5b47e3,_0x327454,_0x20151f);function _0x5780(_0x59a013,_0x4391d8){const _0x46f5f8=_0x46f5();return _0x5780=function(_0x578019,_0x5d7ae9){_0x578019=_0x578019-0x149;let _0x302a70=_0x46f5f8[_0x578019];return _0x302a70;},_0x5780(_0x59a013,_0x4391d8);}function Y(_0x9b454f,_0x479504){const _0x5a32ee=_0x5a7473,_0x3e69f6=_0x9b454f[_0x5a32ee(0x18b)][0x0];return{..._0x479504,'id':_0x3e69f6[_0x5a32ee(0x1a5)],'resolved':_0x9b454f[_0x5a32ee(0x153)]===0x1,'dT':f(_0x3e69f6['createTimestamp']),'personId':_0x3e69f6[_0x5a32ee(0x174)],'threadId':_0x3e69f6[_0x5a32ee(0x161)]};}function G(_0x572a91,_0x11e351,_0x40ea76){const _0x319638=_0x5a7473;var _0x379fd2,_0x51bc03;if(((_0x51bc03=(_0x379fd2=_0x572a91==null?void 0x0:_0x572a91[_0x319638(0x18b)])==null?void 0x0:_0x379fd2[_0x319638(0x15f)])!=null?_0x51bc03:0x0)>0x0){const _0x47a41f=(_0x4e0dfd,_0x3ab2ca)=>({'id':_0x4e0dfd[_0x319638(0x1a5)],'threadId':_0x4e0dfd['threadId'],'dT':f(_0x4e0dfd[_0x319638(0x155)]),'personId':_0x4e0dfd[_0x319638(0x174)],'resolved':_0x572a91[_0x319638(0x153)]===I[_0x319638(0x198)],'unitId':_0x11e351,'subUnitId':_0x40ea76,'text':JSON['parse'](_0x4e0dfd['content']),'parentId':_0x3ab2ca}),_0x432f4e=_0x47a41f(_0x572a91[_0x319638(0x18b)][0x0]);return{..._0x432f4e,'children':_0x572a91['replies']['slice'](0x1)[_0x319638(0x14e)](_0x1e6dc6=>_0x47a41f(_0x1e6dc6,_0x432f4e['id']))};}return null;}let g=class{constructor(_0x155ec3,_0x3c08d2,_0x100087,_0x555db4){const _0x2c5e69=_0x5a7473;this['_httpService']=_0x155ec3,this[_0x2c5e69(0x189)]=_0x3c08d2,this[_0x2c5e69(0x15b)]=_0x100087,this['_injector']=_0x555db4;}async[_0x5a7473(0x15a)](_0x575a49){const _0x236c2e=_0x5a7473;var _0x1b13e0,_0x28912a;const {parentId:_0x492cc7,unitId:_0x2c0b64,text:_0x331432,threadId:_0x171957}=_0x575a49,_0x59801d=(_0x28912a=(_0x1b13e0=_0x331432['customRanges'])==null?void 0x0:_0x1b13e0[_0x236c2e(0x1ca)](_0x26b486=>_0x26b486[_0x236c2e(0x150)]===c[_0x236c2e(0x186)][_0x236c2e(0x14b)])[_0x236c2e(0x14e)](_0x322c36=>_0x322c36[_0x236c2e(0x1b0)]))!=null?_0x28912a:[],_0x4f0dc6=JSON['stringify'](_0x331432),_0x48da28=(await this[_0x236c2e(0x15b)][_0x236c2e(0x1a3)](_0x2c0b64))[_0x236c2e(0x15e)]();if(_0x492cc7){const _0x4368ee={'memberId':_0x48da28,'unitId':_0x2c0b64,'content':_0x4f0dc6,'mention':_0x59801d,'threadId':_0x171957},_0x3eb3f1=(await this['_httpService'][_0x236c2e(0x199)](_0x236c2e(0x19d)+_0x2c0b64+_0x236c2e(0x1a8),{'body':_0x4368ee}))[_0x236c2e(0x19b)]['reply'];return{..._0x575a49,'id':_0x3eb3f1['replyId'],'dT':c[_0x236c2e(0x173)](+_0x3eb3f1[_0x236c2e(0x155)])[_0x236c2e(0x176)](_0x236c2e(0x1bd)),'personId':_0x3eb3f1['userId']};}else{const _0x514090={'memberId':_0x48da28,'unitId':_0x2c0b64,'content':_0x4f0dc6,'mention':_0x59801d},_0x198edc=await this[_0x236c2e(0x1a2)][_0x236c2e(0x199)](_0x236c2e(0x19d)+_0x2c0b64+_0x236c2e(0x1c0),{'body':_0x514090});return Y(_0x198edc[_0x236c2e(0x19b)][_0x236c2e(0x17f)],_0x575a49);}}async[_0x5a7473(0x15d)](_0x310ffd){const _0x4cb5e4=_0x5a7473;var _0x509d8a,_0x3d089d;const {text:_0x3b811e,unitId:_0x5a1f17}=_0x310ffd,_0x4a5492=(_0x3d089d=(_0x509d8a=_0x3b811e[_0x4cb5e4(0x151)])==null?void 0x0:_0x509d8a['filter'](_0x44b2d5=>_0x44b2d5[_0x4cb5e4(0x150)]===c[_0x4cb5e4(0x186)][_0x4cb5e4(0x14b)])[_0x4cb5e4(0x14e)](_0x4d1f04=>_0x4d1f04[_0x4cb5e4(0x1b0)]))!=null?_0x3d089d:[],_0x381ccb=JSON[_0x4cb5e4(0x183)](_0x3b811e),_0x1c6951=_0x310ffd[_0x4cb5e4(0x161)],_0x55b0cb=_0x310ffd['id'],_0x2706c9={'memberId':(await this['_sessionService'][_0x4cb5e4(0x1a3)](_0x5a1f17))[_0x4cb5e4(0x15e)](),'unitId':_0x5a1f17,'threadId':_0x1c6951,'mention':_0x4a5492,'content':_0x381ccb,'replyId':_0x55b0cb},_0x6ba42a=await this[_0x4cb5e4(0x1a2)][_0x4cb5e4(0x199)](_0x4cb5e4(0x19d)+_0x5a1f17+_0x4cb5e4(0x163),{'body':_0x2706c9});return!_0x6ba42a[_0x4cb5e4(0x19b)][_0x4cb5e4(0x19c)]||_0x6ba42a[_0x4cb5e4(0x19b)][_0x4cb5e4(0x19c)][_0x4cb5e4(0x14c)]===0x1;}async[_0x5a7473(0x164)](_0x210abf){const _0x4ffef9=_0x5a7473,{unitId:_0x2276f}=_0x210abf,_0x3c4f2a=_0x210abf[_0x4ffef9(0x161)],_0x3864a4={'memberId':this[_0x4ffef9(0x189)]['getCurrentUser']()[_0x4ffef9(0x158)],'unitId':_0x2276f,'threadId':_0x3c4f2a,'solved':_0x210abf['resolved']?I[_0x4ffef9(0x198)]:I[_0x4ffef9(0x18f)]},_0x5055f8=await this['_httpService'][_0x4ffef9(0x199)](_0x4ffef9(0x19d)+_0x2276f+_0x4ffef9(0x1ba),{'body':_0x3864a4});return!_0x5055f8[_0x4ffef9(0x19b)][_0x4ffef9(0x19c)]||_0x5055f8[_0x4ffef9(0x19b)][_0x4ffef9(0x19c)][_0x4ffef9(0x14c)]===0x1;}async[_0x5a7473(0x154)](_0x2ca6d5,_0x58fff6,_0x3465fb,_0x1ea876){const _0x21a73f=_0x5a7473,_0x1038a7={'memberId':(await this['_sessionService'][_0x21a73f(0x1a3)](_0x2ca6d5))[_0x21a73f(0x15e)](),'threadId':_0x3465fb,'replyId':_0x1ea876,'unitId':_0x2ca6d5},_0x435490=await this['_httpService'][_0x21a73f(0x199)](_0x21a73f(0x19d)+_0x2ca6d5+_0x21a73f(0x19a),{'body':_0x1038a7});return!_0x435490['body'][_0x21a73f(0x19c)]||_0x435490['body'][_0x21a73f(0x19c)][_0x21a73f(0x14c)]===0x1;}async[_0x5a7473(0x170)](_0x4d7d6a,_0x3ca8b1,_0x1cf9a8){const _0x339b66=_0x5a7473,_0x439d9b={'unitId':_0x4d7d6a,'threadId':_0x1cf9a8},_0x50fdf8=await this[_0x339b66(0x1a2)][_0x339b66(0x199)]('/universer-api/comment/unit/'+_0x4d7d6a+_0x339b66(0x1c2),{'body':_0x439d9b}),_0x355970=_0x1cf9a8[_0x339b66(0x14e)](_0x45e947=>G(_0x50fdf8[_0x339b66(0x19b)][_0x339b66(0x185)][_0x45e947],_0x4d7d6a,_0x3ca8b1))[_0x339b66(0x1ca)](Boolean);return Object[_0x339b66(0x166)](_0x50fdf8[_0x339b66(0x19b)][_0x339b66(0x18e)])['forEach'](_0x217443=>{const _0x3778e9=_0x339b66;this['_userService'][_0x3778e9(0x182)](_0x217443);}),_0x355970;}[_0x5a7473(0x177)](_0x8da89){const _0x1e0221=_0x5a7473;return{'id':_0x8da89['id'],'threadId':_0x8da89[_0x1e0221(0x161)],'ref':_0x8da89[_0x1e0221(0x1c4)]};}};g=x([_(0x0,c[_0x5a7473(0x1cb)](P[_0x5a7473(0x1b5)])),_(0x1,c[_0x5a7473(0x1cb)](c[_0x5a7473(0x1a4)])),_(0x2,c[_0x5a7473(0x1cb)](b['CollaborationSessionService'])),_(0x3,c[_0x5a7473(0x1cb)](c[_0x5a7473(0x1c6)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x593df0,_0x24f3da,_0x18adb8,_0x2f55c6)=>{for(var _0x27c7e1=_0x2f55c6>0x1?void 0x0:_0x2f55c6?H(_0x24f3da,_0x18adb8):_0x24f3da,_0x29084c=_0x593df0['length']-0x1,_0x813ec3;_0x29084c>=0x0;_0x29084c--)(_0x813ec3=_0x593df0[_0x29084c])&&(_0x27c7e1=_0x813ec3(_0x27c7e1)||_0x27c7e1);return _0x27c7e1;},y=(_0x2b4503,_0x259ef1)=>(_0x735b89,_0x2860a4)=>_0x259ef1(_0x735b89,_0x2860a4,_0x2b4503);let C=class extends c['Disposable']{constructor(_0x4a9a88,_0x1c8b98){const _0x1533a9=_0x5a7473;super(),this[_0x1533a9(0x167)]=_0x4a9a88,this[_0x1533a9(0x180)]=_0x1c8b98,this[_0x1533a9(0x1c9)]();}['_initDataSource'](){const _0x1e4e99=_0x5a7473;this[_0x1e4e99(0x167)]['dataSource']=this['_threadCommentDataSource'],this[_0x1e4e99(0x167)][_0x1e4e99(0x1b4)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x5a7473(0x1cb)](g))],C);var F=Object[_0x5a7473(0x156)],L=Object['getOwnPropertyDescriptor'],Z=(_0x582bad,_0x3265b1,_0x326366)=>_0x3265b1 in _0x582bad?F(_0x582bad,_0x3265b1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x326366}):_0x582bad[_0x3265b1]=_0x326366,W=(_0x3d980d,_0x4773bb,_0x4c0263,_0x274c71)=>{for(var _0x305f0b=_0x274c71>0x1?void 0x0:_0x274c71?L(_0x4773bb,_0x4c0263):_0x4773bb,_0x510002=_0x3d980d['length']-0x1,_0x4697a2;_0x510002>=0x0;_0x510002--)(_0x4697a2=_0x3d980d[_0x510002])&&(_0x305f0b=_0x4697a2(_0x305f0b)||_0x305f0b);return _0x305f0b;},O=(_0x1c423c,_0x4cd4d8)=>(_0x2aebdc,_0x293456)=>_0x4cd4d8(_0x2aebdc,_0x293456,_0x1c423c),N=(_0x6fea50,_0x795899,_0x338e0f)=>Z(_0x6fea50,typeof _0x795899!=_0x5a7473(0x195)?_0x795899+'':_0x795899,_0x338e0f);exports[_0x5a7473(0x15c)]=class extends c[_0x5a7473(0x1c3)]{constructor(_0x3c5e66=D,_0x12acdb,_0x5e821c){const _0x1c8d6b=_0x5a7473;super(),this[_0x1c8d6b(0x1aa)]=_0x3c5e66,this['_injector']=_0x12acdb,this[_0x1c8d6b(0x1b2)]=_0x5e821c;const {..._0x4b090e}=c[_0x1c8d6b(0x194)]({},D,this[_0x1c8d6b(0x1aa)]);this[_0x1c8d6b(0x1b2)][_0x1c8d6b(0x1a6)](q,_0x4b090e);}[_0x5a7473(0x19f)](){const _0x28e813=_0x5a7473;[[g],[C],[p]][_0x28e813(0x17c)](_0xca3914=>{const _0x40e09f=_0x28e813;this[_0x40e09f(0x181)][_0x40e09f(0x16f)](_0xca3914);});}[_0x5a7473(0x16a)](){const _0x29f794=_0x5a7473;this[_0x29f794(0x181)][_0x29f794(0x1ab)](C),this[_0x29f794(0x181)][_0x29f794(0x1ab)](p);}},N(exports[_0x5a7473(0x15c)],_0x5a7473(0x14a),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x5a7473(0x188),c[_0x5a7473(0x190)][_0x5a7473(0x1bb)]),exports[_0x5a7473(0x15c)]=W([c[_0x5a7473(0x16b)](j[_0x5a7473(0x17d)],b[_0x5a7473(0x184)],T[_0x5a7473(0x149)]),O(0x1,c[_0x5a7473(0x1cb)](c[_0x5a7473(0x1c6)])),O(0x2,c[_0x5a7473(0x168)])],exports[_0x5a7473(0x15c)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x1a9525=_0x281e;(function(_0x29b3a3,_0x2d8e36){const _0x292153=_0x281e,_0x500b2b=_0x29b3a3();while(!![]){try{const _0x4e0f9e=-parseInt(_0x292153(0x150))/0x1*(-parseInt(_0x292153(0x152))/0x2)+parseInt(_0x292153(0x186))/0x3*(parseInt(_0x292153(0x149))/0x4)+-parseInt(_0x292153(0x15b))/0x5*(parseInt(_0x292153(0x191))/0x6)+parseInt(_0x292153(0x192))/0x7+-parseInt(_0x292153(0x14c))/0x8*(-parseInt(_0x292153(0x154))/0x9)+-parseInt(_0x292153(0x16b))/0xa*(parseInt(_0x292153(0x165))/0xb)+parseInt(_0x292153(0x188))/0xc*(-parseInt(_0x292153(0x160))/0xd);if(_0x4e0f9e===_0x2d8e36)break;else _0x500b2b['push'](_0x500b2b['shift']());}catch(_0x57215d){_0x500b2b['push'](_0x500b2b['shift']());}}}(_0x5a97,0x32e0f));import{CommentService as _0x40c369,CollaborationSessionService as _0xb5f0f6,UniverCollaborationClientPlugin as _0x156a54}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x44c437}from'@univerjs-pro/license';import{dayjs as _0x8d8ae0,UserManagerService as _0x3744cb,Inject as _0x22e7e9,Injector as _0x5645be,Disposable as _0x52e380,CustomRangeType as _0x3fa89b,UniverInstanceType as _0x5c86df,DependentOn as _0x3c4a67,IConfigService as _0x23818b,Plugin as _0x14760f,merge as _0x3fdcf6}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5d7089}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x94249b,IThreadCommentDataSourceService as _0x14199e}from'@univerjs/thread-comment';import{bufferTime as _0x3dfed0}from'rxjs';function _0x281e(_0x5d54cf,_0x37828b){const _0x5a97c4=_0x5a97();return _0x281e=function(_0x281e15,_0xaeb5d7){_0x281e15=_0x281e15-0x13f;let _0x375546=_0x5a97c4[_0x281e15];return _0x375546;},_0x281e(_0x5d54cf,_0x37828b);}import{HTTPService as _0x207092}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2854b3=>(_0x2854b3[_0x2854b3[_0x1a9525(0x157)]=0x0]=_0x1a9525(0x157),_0x2854b3[_0x2854b3[_0x1a9525(0x184)]=0x1]=_0x1a9525(0x184),_0x2854b3[_0x2854b3['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2854b3))(I||{}),v=(_0xa6053e=>(_0xa6053e[_0xa6053e[_0x1a9525(0x198)]=0x0]=_0x1a9525(0x198),_0xa6053e[_0xa6053e[_0x1a9525(0x13f)]=0x1]='Add',_0xa6053e[_0xa6053e['Reply']=0x2]=_0x1a9525(0x143),_0xa6053e[_0xa6053e[_0x1a9525(0x159)]=0x3]=_0x1a9525(0x159),_0xa6053e[_0xa6053e[_0x1a9525(0x190)]=0x4]=_0x1a9525(0x190),_0xa6053e[_0xa6053e[_0x1a9525(0x18f)]=0x5]=_0x1a9525(0x18f),_0xa6053e[_0xa6053e[_0x1a9525(0x17f)]=-0x1]=_0x1a9525(0x17f),_0xa6053e))(v||{});const D=_0x2f9ac0=>_0x8d8ae0(new Date(+_0x2f9ac0))[_0x1a9525(0x187)](_0x1a9525(0x17a)),B=async(_0x466682,_0x4ba6fc)=>{const _0x43f220=_0x1a9525,_0x451675=_0x466682[_0x43f220(0x167)](_0x3744cb),_0x16c8b0=_0x466682['get'](_0x207092);_0x4ba6fc['forEach'](_0x295762=>{const _0x57bd28=_0x43f220;_0x451675[_0x57bd28(0x140)](_0x295762)&&_0x4ba6fc[_0x57bd28(0x15c)](_0x295762);}),_0x4ba6fc[_0x43f220(0x1a8)]&&(await _0x16c8b0[_0x43f220(0x167)](_0x43f220(0x166),{'params':{'userIDs':[..._0x4ba6fc]}}))[_0x43f220(0x144)][_0x43f220(0x155)][_0x43f220(0x14d)](_0x34e0ea=>{const _0x2c12a1=_0x43f220;_0x34e0ea&&_0x451675[_0x2c12a1(0x175)](_0x34e0ea);});};var K=Object[_0x1a9525(0x151)],V=(_0x41501a,_0x359580,_0x2a9c4b,_0x3a0312)=>{const _0x158f61=_0x1a9525;for(var _0x30e415=_0x3a0312>0x1?void 0x0:_0x3a0312?K(_0x359580,_0x2a9c4b):_0x359580,_0x292757=_0x41501a[_0x158f61(0x16f)]-0x1,_0x2adb6d;_0x292757>=0x0;_0x292757--)(_0x2adb6d=_0x41501a[_0x292757])&&(_0x30e415=_0x2adb6d(_0x30e415)||_0x30e415);return _0x30e415;},p=(_0x29f0e2,_0x1e5c94)=>(_0x54c32f,_0x591cff)=>_0x1e5c94(_0x54c32f,_0x591cff,_0x29f0e2);let S=class extends _0x52e380{constructor(_0x9ae7ac,_0x52ac7a,_0x1fd2f4,_0x1a70e8){const _0x15073c=_0x1a9525;super(),this[_0x15073c(0x18c)]=_0x9ae7ac,this[_0x15073c(0x19a)]=_0x52ac7a,this[_0x15073c(0x179)]=_0x1fd2f4,this['_injector']=_0x1a70e8,this[_0x15073c(0x1ab)](),this[_0x15073c(0x195)]();}['_initUserSync'](){const _0x43b798=_0x1a9525;this[_0x43b798(0x1a5)](this[_0x43b798(0x19a)][_0x43b798(0x145)][_0x43b798(0x19c)](_0x3dfed0(0x10))['subscribe'](_0x565d36=>{const _0x5414a9=_0x43b798,_0x873893=new Set();_0x565d36[_0x5414a9(0x14d)](_0x452d1d=>{const _0x3b75af=_0x5414a9;switch(_0x452d1d[_0x3b75af(0x1a2)]){case'add':{const _0x246373=_0x452d1d[_0x3b75af(0x161)][_0x3b75af(0x181)];_0x873893[_0x3b75af(0x156)](_0x246373);break;}}}),B(this[_0x5414a9(0x15f)],_0x873893);}));}[_0x1a9525(0x1ab)](){const _0x50dd4e=_0x1a9525;this[_0x50dd4e(0x1a5)](this[_0x50dd4e(0x18c)][_0x50dd4e(0x145)][_0x50dd4e(0x176)](async _0xdfa244=>{const _0x433fcc=_0x50dd4e;var _0x3cd55e,_0x24f8b8,_0x5480fc,_0x4487f4;const _0x383e74=(_0x3cd55e=this[_0x433fcc(0x19a)][_0x433fcc(0x1a6)](_0xdfa244[_0x433fcc(0x158)])[_0x433fcc(0x1a7)](_0x55b7a3=>_0x55b7a3[_0x433fcc(0x142)]===_0xdfa244[_0x433fcc(0x142)]))==null?void 0x0:_0x3cd55e['root'];if(!_0x383e74)return;const {unitId:_0x385c67,subUnitId:_0x55b27a}=_0x383e74;switch(_0xdfa244[_0x433fcc(0x1a4)]&&this[_0x433fcc(0x179)][_0x433fcc(0x175)](_0xdfa244['user']),_0xdfa244[_0x433fcc(0x1a2)]){case v[_0x433fcc(0x13f)]:break;case v[_0x433fcc(0x143)]:{this[_0x433fcc(0x19a)][_0x433fcc(0x15a)](_0x385c67,_0x55b27a,{'unitId':_0x385c67,'subUnitId':_0x55b27a,'ref':'','id':_0xdfa244[_0x433fcc(0x162)],'dT':D(+_0xdfa244[_0x433fcc(0x153)]),'threadId':_0xdfa244['threadId'],'personId':(_0x5480fc=(_0x24f8b8=_0xdfa244[_0x433fcc(0x1a4)])==null?void 0x0:_0x24f8b8['userID'])!=null?_0x5480fc:_0xdfa244['userId'],'text':JSON[_0x433fcc(0x14a)](_0xdfa244[_0x433fcc(0x17c)]),'parentId':_0x383e74['id']});break;}case v[_0x433fcc(0x190)]:{const _0x3644f6=this[_0x433fcc(0x19a)][_0x433fcc(0x168)](_0x385c67,_0x55b27a,_0xdfa244[_0x433fcc(0x162)]);_0x3644f6&&_0x3644f6[_0x433fcc(0x18a)]&&this[_0x433fcc(0x19a)][_0x433fcc(0x1a1)](_0x385c67,_0x55b27a,_0xdfa244[_0x433fcc(0x162)]);break;}case v[_0x433fcc(0x159)]:{this[_0x433fcc(0x19a)]['updateComment'](_0x385c67,_0x55b27a,{'commentId':_0xdfa244[_0x433fcc(0x162)],'text':JSON[_0x433fcc(0x14a)](_0xdfa244[_0x433fcc(0x17c)])});break;}case v[_0x433fcc(0x18f)]:{const _0x4edcd5=(_0x4487f4=this['_threadCommentModel'][_0x433fcc(0x1a6)](_0xdfa244[_0x433fcc(0x158)])[_0x433fcc(0x1a7)](_0x31b569=>_0x31b569[_0x433fcc(0x142)]===_0xdfa244[_0x433fcc(0x142)]))==null?void 0x0:_0x4487f4['root'];_0x4edcd5&&this[_0x433fcc(0x19a)][_0x433fcc(0x14f)](_0x385c67,_0x55b27a,_0x4edcd5['id'],_0xdfa244[_0x433fcc(0x14e)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x22e7e9(_0x40c369)),p(0x1,_0x22e7e9(_0x94249b)),p(0x2,_0x22e7e9(_0x3744cb)),p(0x3,_0x22e7e9(_0x5645be))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x1a9525(0x151)],Q=(_0x415310,_0x5a4bd2,_0xe1fd49,_0x4f86c3)=>{const _0x33407d=_0x1a9525;for(var _0x5830e7=_0x4f86c3>0x1?void 0x0:_0x4f86c3?k(_0x5a4bd2,_0xe1fd49):_0x5a4bd2,_0x99997b=_0x415310[_0x33407d(0x16f)]-0x1,_0x5038eb;_0x99997b>=0x0;_0x99997b--)(_0x5038eb=_0x415310[_0x99997b])&&(_0x5830e7=_0x5038eb(_0x5830e7)||_0x5830e7);return _0x5830e7;},_=(_0x56b842,_0x531499)=>(_0x41b231,_0x5b228e)=>_0x531499(_0x41b231,_0x5b228e,_0x56b842);function X(_0x1dc29f,_0x55b3e8){const _0x283aea=_0x1a9525,_0x5ba95d=_0x1dc29f[_0x283aea(0x178)][0x0];return{..._0x55b3e8,'id':_0x5ba95d[_0x283aea(0x162)],'resolved':_0x1dc29f[_0x283aea(0x14e)]===0x1,'dT':D(_0x5ba95d[_0x283aea(0x153)]),'personId':_0x5ba95d[_0x283aea(0x163)],'threadId':_0x5ba95d[_0x283aea(0x142)]};}function ee(_0xf45a16,_0x380eb4,_0x556894){const _0x1f9b87=_0x1a9525;var _0x463bb7,_0x5908a9;if(((_0x5908a9=(_0x463bb7=_0xf45a16==null?void 0x0:_0xf45a16[_0x1f9b87(0x178)])==null?void 0x0:_0x463bb7[_0x1f9b87(0x16f)])!=null?_0x5908a9:0x0)>0x0){const _0x1be153=(_0x2f8038,_0x2fe42e)=>({'id':_0x2f8038[_0x1f9b87(0x162)],'threadId':_0x2f8038['threadId'],'dT':D(_0x2f8038['createTimestamp']),'personId':_0x2f8038[_0x1f9b87(0x163)],'resolved':_0xf45a16[_0x1f9b87(0x14e)]===I[_0x1f9b87(0x184)],'unitId':_0x380eb4,'subUnitId':_0x556894,'text':JSON[_0x1f9b87(0x14a)](_0x2f8038[_0x1f9b87(0x17c)]),'parentId':_0x2fe42e}),_0x15a128=_0x1be153(_0xf45a16[_0x1f9b87(0x178)][0x0]);return{..._0x15a128,'children':_0xf45a16[_0x1f9b87(0x178)][_0x1f9b87(0x17b)](0x1)[_0x1f9b87(0x185)](_0xb4aa20=>_0x1be153(_0xb4aa20,_0x15a128['id']))};}return null;}let f=class{constructor(_0x170bb6,_0x36beb0,_0x28ed81,_0x41427a){const _0x5d54ec=_0x1a9525;this[_0x5d54ec(0x173)]=_0x170bb6,this[_0x5d54ec(0x179)]=_0x36beb0,this[_0x5d54ec(0x17e)]=_0x28ed81,this[_0x5d54ec(0x15f)]=_0x41427a;}async[_0x1a9525(0x15a)](_0x170fb8){const _0x5eb96b=_0x1a9525;var _0x4c0deb,_0x3bcdf4;const {parentId:_0x484456,unitId:_0x3df598,text:_0x38a5a8,threadId:_0x53931a}=_0x170fb8,_0x304d2e=(_0x3bcdf4=(_0x4c0deb=_0x38a5a8[_0x5eb96b(0x17d)])==null?void 0x0:_0x4c0deb[_0x5eb96b(0x15d)](_0x392cf3=>_0x392cf3[_0x5eb96b(0x19d)]===_0x3fa89b[_0x5eb96b(0x15e)])[_0x5eb96b(0x185)](_0x149650=>_0x149650[_0x5eb96b(0x19b)]))!=null?_0x3bcdf4:[],_0x37b017=JSON[_0x5eb96b(0x164)](_0x38a5a8),_0x3fe66f=(await this[_0x5eb96b(0x17e)]['requireSession'](_0x3df598))['getMemberID']();if(_0x484456){const _0x4da751={'memberId':_0x3fe66f,'unitId':_0x3df598,'content':_0x37b017,'mention':_0x304d2e,'threadId':_0x53931a},_0x8dc241=(await this[_0x5eb96b(0x173)][_0x5eb96b(0x19e)]('/universer-api/comment/unit/'+_0x3df598+_0x5eb96b(0x171),{'body':_0x4da751}))[_0x5eb96b(0x144)][_0x5eb96b(0x1a0)];return{..._0x170fb8,'id':_0x8dc241[_0x5eb96b(0x162)],'dT':_0x8d8ae0(+_0x8dc241['createTimestamp'])[_0x5eb96b(0x187)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x8dc241[_0x5eb96b(0x163)]};}else{const _0xd0b960={'memberId':_0x3fe66f,'unitId':_0x3df598,'content':_0x37b017,'mention':_0x304d2e},_0x5b586c=await this['_httpService'][_0x5eb96b(0x19e)]('/universer-api/comment/unit/'+_0x3df598+_0x5eb96b(0x147),{'body':_0xd0b960});return X(_0x5b586c['body'][_0x5eb96b(0x1a3)],_0x170fb8);}}async[_0x1a9525(0x18e)](_0x147bb9){const _0x16c9a1=_0x1a9525;var _0x2f7eca,_0xd942d6;const {text:_0x39bce1,unitId:_0x5c0973}=_0x147bb9,_0x1a0660=(_0xd942d6=(_0x2f7eca=_0x39bce1['customRanges'])==null?void 0x0:_0x2f7eca[_0x16c9a1(0x15d)](_0x43eff0=>_0x43eff0['rangeType']===_0x3fa89b[_0x16c9a1(0x15e)])[_0x16c9a1(0x185)](_0x2f20cb=>_0x2f20cb[_0x16c9a1(0x19b)]))!=null?_0xd942d6:[],_0x37828c=JSON['stringify'](_0x39bce1),_0x443d5e=_0x147bb9['threadId'],_0x4dd1d1=_0x147bb9['id'],_0x5c4fe1={'memberId':(await this['_sessionService'][_0x16c9a1(0x193)](_0x5c0973))[_0x16c9a1(0x183)](),'unitId':_0x5c0973,'threadId':_0x443d5e,'mention':_0x1a0660,'content':_0x37828c,'replyId':_0x4dd1d1},_0x49e4a8=await this[_0x16c9a1(0x173)][_0x16c9a1(0x19e)]('/universer-api/comment/unit/'+_0x5c0973+_0x16c9a1(0x194),{'body':_0x5c4fe1});return!_0x49e4a8[_0x16c9a1(0x144)]['error']||_0x49e4a8['body']['error'][_0x16c9a1(0x196)]===0x1;}async['resolveComment'](_0x223bdd){const _0x2d163a=_0x1a9525,{unitId:_0x659991}=_0x223bdd,_0x20c221=_0x223bdd[_0x2d163a(0x142)],_0x43ba23={'memberId':this['_userService'][_0x2d163a(0x1a9)]()[_0x2d163a(0x182)],'unitId':_0x659991,'threadId':_0x20c221,'solved':_0x223bdd[_0x2d163a(0x1aa)]?I[_0x2d163a(0x184)]:I[_0x2d163a(0x157)]},_0x3e663d=await this[_0x2d163a(0x173)][_0x2d163a(0x19e)](_0x2d163a(0x16a)+_0x659991+'/solved',{'body':_0x43ba23});return!_0x3e663d[_0x2d163a(0x144)]['error']||_0x3e663d['body']['error'][_0x2d163a(0x196)]===0x1;}async['deleteComment'](_0x31c426,_0x109a50,_0x5221d3,_0x54f231){const _0x1163cc=_0x1a9525,_0x4f28d4={'memberId':(await this[_0x1163cc(0x17e)][_0x1163cc(0x193)](_0x31c426))[_0x1163cc(0x183)](),'threadId':_0x5221d3,'replyId':_0x54f231,'unitId':_0x31c426},_0x4ec5f4=await this[_0x1163cc(0x173)][_0x1163cc(0x19e)]('/universer-api/comment/unit/'+_0x31c426+'/delete',{'body':_0x4f28d4});return!_0x4ec5f4[_0x1163cc(0x144)][_0x1163cc(0x16c)]||_0x4ec5f4['body'][_0x1163cc(0x16c)][_0x1163cc(0x196)]===0x1;}async[_0x1a9525(0x18b)](_0x2c8eb7,_0x15bdd5,_0x2516e5){const _0x3b03d9=_0x1a9525,_0x287236={'unitId':_0x2c8eb7,'threadId':_0x2516e5},_0x4d9369=await this[_0x3b03d9(0x173)]['post'](_0x3b03d9(0x16a)+_0x2c8eb7+_0x3b03d9(0x172),{'body':_0x287236}),_0x2a38fd=_0x2516e5[_0x3b03d9(0x185)](_0x22e9f5=>ee(_0x4d9369[_0x3b03d9(0x144)][_0x3b03d9(0x169)][_0x22e9f5],_0x2c8eb7,_0x15bdd5))[_0x3b03d9(0x15d)](Boolean);return Object[_0x3b03d9(0x174)](_0x4d9369[_0x3b03d9(0x144)]['users'])[_0x3b03d9(0x14d)](_0x23253f=>{const _0x472c18=_0x3b03d9;this[_0x472c18(0x179)][_0x472c18(0x175)](_0x23253f);}),_0x2a38fd;}[_0x1a9525(0x16d)](_0x25fdeb){const _0xfeeeb2=_0x1a9525;return{'id':_0x25fdeb['id'],'threadId':_0x25fdeb[_0xfeeeb2(0x142)],'ref':_0x25fdeb[_0xfeeeb2(0x141)]};}};f=Q([_(0x0,_0x22e7e9(_0x207092)),_(0x1,_0x22e7e9(_0x3744cb)),_(0x2,_0x22e7e9(_0xb5f0f6)),_(0x3,_0x22e7e9(_0x5645be))],f);var re=Object[_0x1a9525(0x151)],te=(_0x1b5106,_0x165841,_0x58a085,_0x1c1e4a)=>{const _0x289f95=_0x1a9525;for(var _0x59ce3c=_0x1c1e4a>0x1?void 0x0:_0x1c1e4a?re(_0x165841,_0x58a085):_0x165841,_0x26c42e=_0x1b5106[_0x289f95(0x16f)]-0x1,_0x3adca6;_0x26c42e>=0x0;_0x26c42e--)(_0x3adca6=_0x1b5106[_0x26c42e])&&(_0x59ce3c=_0x3adca6(_0x59ce3c)||_0x59ce3c);return _0x59ce3c;},N=(_0x44988c,_0x577d11)=>(_0x1886a8,_0x20115d)=>_0x577d11(_0x1886a8,_0x20115d,_0x44988c);let g=class extends _0x52e380{constructor(_0x44cee3,_0x1d1169){const _0x487315=_0x1a9525;super(),this['_threadCommentDataSourceService']=_0x44cee3,this[_0x487315(0x197)]=_0x1d1169,this[_0x487315(0x19f)]();}[_0x1a9525(0x19f)](){const _0x1c2763=_0x1a9525;this[_0x1c2763(0x148)]['dataSource']=this[_0x1c2763(0x197)],this[_0x1c2763(0x148)]['syncUpdateMutationToColla']=!0x1;}};function _0x5a97(){const _0x388fcc=['/reply','/list','_httpService','values','addUser','subscribe','onStarting','replies','_userService','YYYY/MM/DD\x20HH:mm','slice','content','customRanges','_sessionService','UNRECOGNIZED','onReady','personId','userID','getMemberID','Solved','map','30dqSJtM','format','12ZUlxxC','_configService','parentId','listComments','_commentService','defineProperty','updateComment','Solve','Delete','84594QkklsI','415359pfXLZg','requireSession','/edit','_initUserSync','code','_threadCommentDataSource','Unknown','UNIVER_UNKNOWN','_threadCommentModel','rangeId','pipe','rangeType','post','_initDataSource','reply','deleteComment','type','comment','user','disposeWithMe','getUnit','find','size','getCurrentUser','resolved','_init','Add','getUser','ref','threadId','Reply','body','commentUpdate$','pluginName','/add','_threadCommentDataSourceService','42848KIIVhZ','parse','symbol','93016LpNQPu','forEach','solved','resolveComment','3GLkCms','getOwnPropertyDescriptor','83724tyetAg','createTimestamp','198hsLCgw','users','add','OpenOrReOpen','unitId','Edit','addComment','5uJGKoi','delete','filter','COMMENT','_injector','1666262hyvytS','payload','replyId','userId','stringify','46145XMJNCM','/universer-api/user/list','get','getComment','comments','/universer-api/comment/unit/','470RkjJYY','error','saveCommentToSnapshot','_config','length','setConfig'];_0x5a97=function(){return _0x388fcc;};return _0x5a97();}g=te([N(0x0,_0x14199e),N(0x1,_0x22e7e9(f))],g);var se=Object[_0x1a9525(0x18d)],oe=Object[_0x1a9525(0x151)],ne=(_0xe30eee,_0x4ea96f,_0x59f59f)=>_0x4ea96f in _0xe30eee?se(_0xe30eee,_0x4ea96f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x59f59f}):_0xe30eee[_0x4ea96f]=_0x59f59f,ie=(_0x5bdcb7,_0x3ce996,_0x1266c5,_0x13d61c)=>{for(var _0x5507c9=_0x13d61c>0x1?void 0x0:_0x13d61c?oe(_0x3ce996,_0x1266c5):_0x3ce996,_0x5a7208=_0x5bdcb7['length']-0x1,_0x459d35;_0x5a7208>=0x0;_0x5a7208--)(_0x459d35=_0x5bdcb7[_0x5a7208])&&(_0x5507c9=_0x459d35(_0x5507c9)||_0x5507c9);return _0x5507c9;},w=(_0x55efcf,_0x5cd973)=>(_0x378872,_0x44783b)=>_0x5cd973(_0x378872,_0x44783b,_0x55efcf),$=(_0x1dc2ff,_0xee071e,_0x4524eb)=>ne(_0x1dc2ff,typeof _0xee071e!=_0x1a9525(0x14b)?_0xee071e+'':_0xee071e,_0x4524eb);let b=class extends _0x14760f{constructor(_0x686d3f=M,_0x3e7257,_0x4dc320){const _0x3714ad=_0x1a9525;super(),this[_0x3714ad(0x16e)]=_0x686d3f,this[_0x3714ad(0x15f)]=_0x3e7257,this[_0x3714ad(0x189)]=_0x4dc320;const {..._0x12bc84}=_0x3fdcf6({},M,this[_0x3714ad(0x16e)]);this[_0x3714ad(0x189)][_0x3714ad(0x170)](z,_0x12bc84);}[_0x1a9525(0x177)](){const _0x4828e3=_0x1a9525;[[f],[g],[S]][_0x4828e3(0x14d)](_0x5416d7=>{const _0x1f6d7b=_0x4828e3;this[_0x1f6d7b(0x15f)][_0x1f6d7b(0x156)](_0x5416d7);});}[_0x1a9525(0x180)](){const _0x60ccf5=_0x1a9525;this['_injector'][_0x60ccf5(0x167)](g),this[_0x60ccf5(0x15f)]['get'](S);}};$(b,_0x1a9525(0x146),W),$(b,_0x1a9525(0x1a2),_0x5c86df[_0x1a9525(0x199)]),b=ie([_0x3c4a67(_0x5d7089,_0x156a54,_0x44c437),w(0x1,_0x22e7e9(_0x5645be)),w(0x2,_0x23818b)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x12b56c=_0x10d6;function _0x10d6(_0x3ec3a3,_0x389d62){const _0xce34ea=_0xce34();return _0x10d6=function(_0x10d6db,_0x593616){_0x10d6db=_0x10d6db-0x198;let _0x481542=_0xce34ea[_0x10d6db];return _0x481542;},_0x10d6(_0x3ec3a3,_0x389d62);}(function(_0x215dac,_0x3e3d42){const _0x100892=_0x10d6,_0x359c04=_0x215dac();while(!![]){try{const _0x3b64df=-parseInt(_0x100892(0x1e4))/0x1*(parseInt(_0x100892(0x1dd))/0x2)+-parseInt(_0x100892(0x1ba))/0x3+-parseInt(_0x100892(0x1a4))/0x4+parseInt(_0x100892(0x1f0))/0x5+parseInt(_0x100892(0x1d0))/0x6*(-parseInt(_0x100892(0x1f2))/0x7)+-parseInt(_0x100892(0x1b7))/0x8*(parseInt(_0x100892(0x1c0))/0x9)+-parseInt(_0x100892(0x1d7))/0xa*(-parseInt(_0x100892(0x1c1))/0xb);if(_0x3b64df===_0x3e3d42)break;else _0x359c04['push'](_0x359c04['shift']());}catch(_0x507c53){_0x359c04['push'](_0x359c04['shift']());}}}(_0xce34,0x2fda4));import{CommentService as _0x4961eb,CollaborationSessionService as _0x29ed8b,UniverCollaborationClientPlugin as _0x34c6e6}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x109dd0}from'@univerjs-pro/license';import{dayjs as _0x471f42,UserManagerService as _0x49fe3b,Inject as _0x39b796,Injector as _0x424bef,Disposable as _0x2461f3,CustomRangeType as _0x3f7c3c,UniverInstanceType as _0x823561,DependentOn as _0x21a168,IConfigService as _0x560613,Plugin as _0x3a42a6,merge as _0x720492}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3dd3a8}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xd98492,IThreadCommentDataSourceService as _0x91912c}from'@univerjs/thread-comment';import{bufferTime as _0x212897}from'rxjs';import{HTTPService as _0x397a0a}from'@univerjs/network';const W=_0x12b56c(0x1c9);var I=(_0x1d96a6=>(_0x1d96a6[_0x1d96a6['OpenOrReOpen']=0x0]=_0x12b56c(0x1e9),_0x1d96a6[_0x1d96a6[_0x12b56c(0x1a8)]=0x1]=_0x12b56c(0x1a8),_0x1d96a6[_0x1d96a6['UNRECOGNIZED']=-0x1]=_0x12b56c(0x1c6),_0x1d96a6))(I||{}),v=(_0x2eb9eb=>(_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x19c)]=0x0]=_0x12b56c(0x19c),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1c5)]=0x1]=_0x12b56c(0x1c5),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1e6)]=0x2]=_0x12b56c(0x1e6),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1c7)]=0x3]=_0x12b56c(0x1c7),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1dc)]=0x4]=_0x12b56c(0x1dc),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1d8)]=0x5]=_0x12b56c(0x1d8),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1c6)]=-0x1]=_0x12b56c(0x1c6),_0x2eb9eb))(v||{});const D=_0x59c67d=>_0x471f42(new Date(+_0x59c67d))[_0x12b56c(0x1b9)](_0x12b56c(0x1ea)),B=async(_0x28c461,_0x2fda40)=>{const _0x4426f8=_0x12b56c,_0x95603c=_0x28c461['get'](_0x49fe3b),_0x36971b=_0x28c461[_0x4426f8(0x1b3)](_0x397a0a);_0x2fda40['forEach'](_0x134d6b=>{const _0x4b5b00=_0x4426f8;_0x95603c[_0x4b5b00(0x1af)](_0x134d6b)&&_0x2fda40[_0x4b5b00(0x1d5)](_0x134d6b);}),_0x2fda40[_0x4426f8(0x1f6)]&&(await _0x36971b[_0x4426f8(0x1b3)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2fda40]}}))[_0x4426f8(0x1b8)][_0x4426f8(0x1aa)][_0x4426f8(0x1d1)](_0x242a8d=>{const _0x39c586=_0x4426f8;_0x242a8d&&_0x95603c[_0x39c586(0x1e8)](_0x242a8d);});};var K=Object[_0x12b56c(0x1e1)],V=(_0x49dddd,_0x2f2948,_0x1f4f6d,_0x4d5bbc)=>{const _0x397ab9=_0x12b56c;for(var _0x1de8a2=_0x4d5bbc>0x1?void 0x0:_0x4d5bbc?K(_0x2f2948,_0x1f4f6d):_0x2f2948,_0x15a2d9=_0x49dddd[_0x397ab9(0x1f5)]-0x1,_0x145d0a;_0x15a2d9>=0x0;_0x15a2d9--)(_0x145d0a=_0x49dddd[_0x15a2d9])&&(_0x1de8a2=_0x145d0a(_0x1de8a2)||_0x1de8a2);return _0x1de8a2;},p=(_0x1c2670,_0x51ff8a)=>(_0x16d015,_0x31b19e)=>_0x51ff8a(_0x16d015,_0x31b19e,_0x1c2670);let S=class extends _0x2461f3{constructor(_0x37664f,_0x3415c1,_0x35fd08,_0x3135cd){const _0x57ca06=_0x12b56c;super(),this['_commentService']=_0x37664f,this[_0x57ca06(0x1e3)]=_0x3415c1,this[_0x57ca06(0x1ee)]=_0x35fd08,this[_0x57ca06(0x1ed)]=_0x3135cd,this[_0x57ca06(0x1c2)](),this['_initUserSync']();}['_initUserSync'](){const _0xd74971=_0x12b56c;this[_0xd74971(0x1f3)](this[_0xd74971(0x1e3)][_0xd74971(0x1f1)][_0xd74971(0x19f)](_0x212897(0x10))[_0xd74971(0x1c8)](_0x299557=>{const _0x539ecf=_0xd74971,_0x56e015=new Set();_0x299557[_0x539ecf(0x1d1)](_0x5509a8=>{const _0x37ad16=_0x539ecf;switch(_0x5509a8['type']){case _0x37ad16(0x1cf):{const _0x458f6c=_0x5509a8['payload'][_0x37ad16(0x1bd)];_0x56e015[_0x37ad16(0x1cf)](_0x458f6c);break;}}}),B(this[_0x539ecf(0x1ed)],_0x56e015);}));}[_0x12b56c(0x1c2)](){const _0xb948cb=_0x12b56c;this[_0xb948cb(0x1f3)](this['_commentService'][_0xb948cb(0x1f1)][_0xb948cb(0x1c8)](async _0x5338d9=>{const _0x2b6797=_0xb948cb;var _0x3102cd,_0x591ee7,_0x2ed96c,_0x189afb;const _0x37ba69=(_0x3102cd=this[_0x2b6797(0x1e3)][_0x2b6797(0x198)](_0x5338d9[_0x2b6797(0x1a5)])[_0x2b6797(0x1cb)](_0x44decd=>_0x44decd[_0x2b6797(0x19a)]===_0x5338d9[_0x2b6797(0x19a)]))==null?void 0x0:_0x3102cd[_0x2b6797(0x1a0)];if(!_0x37ba69)return;const {unitId:_0x474aba,subUnitId:_0x58e080}=_0x37ba69;switch(_0x5338d9[_0x2b6797(0x1f9)]&&this['_userService'][_0x2b6797(0x1e8)](_0x5338d9[_0x2b6797(0x1f9)]),_0x5338d9[_0x2b6797(0x19e)]){case v[_0x2b6797(0x1c5)]:break;case v[_0x2b6797(0x1e6)]:{this[_0x2b6797(0x1e3)][_0x2b6797(0x1f7)](_0x474aba,_0x58e080,{'unitId':_0x474aba,'subUnitId':_0x58e080,'ref':'','id':_0x5338d9[_0x2b6797(0x1da)],'dT':D(+_0x5338d9[_0x2b6797(0x1ec)]),'threadId':_0x5338d9[_0x2b6797(0x19a)],'personId':(_0x2ed96c=(_0x591ee7=_0x5338d9[_0x2b6797(0x1f9)])==null?void 0x0:_0x591ee7[_0x2b6797(0x1b5)])!=null?_0x2ed96c:_0x5338d9[_0x2b6797(0x1ce)],'text':JSON['parse'](_0x5338d9['content']),'parentId':_0x37ba69['id']});break;}case v['Delete']:{const _0x3cb262=this[_0x2b6797(0x1e3)][_0x2b6797(0x1df)](_0x474aba,_0x58e080,_0x5338d9[_0x2b6797(0x1da)]);_0x3cb262&&_0x3cb262[_0x2b6797(0x1e5)]&&this['_threadCommentModel'][_0x2b6797(0x1a1)](_0x474aba,_0x58e080,_0x5338d9[_0x2b6797(0x1da)]);break;}case v[_0x2b6797(0x1c7)]:{this['_threadCommentModel'][_0x2b6797(0x1b1)](_0x474aba,_0x58e080,{'commentId':_0x5338d9['replyId'],'text':JSON[_0x2b6797(0x1ab)](_0x5338d9[_0x2b6797(0x1de)])});break;}case v[_0x2b6797(0x1d8)]:{const _0x16464f=(_0x189afb=this[_0x2b6797(0x1e3)][_0x2b6797(0x198)](_0x5338d9[_0x2b6797(0x1a5)])[_0x2b6797(0x1cb)](_0x361be3=>_0x361be3['threadId']===_0x5338d9[_0x2b6797(0x19a)]))==null?void 0x0:_0x189afb[_0x2b6797(0x1a0)];_0x16464f&&this[_0x2b6797(0x1e3)][_0x2b6797(0x1e7)](_0x474aba,_0x58e080,_0x16464f['id'],_0x5338d9['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x39b796(_0x4961eb)),p(0x1,_0x39b796(_0xd98492)),p(0x2,_0x39b796(_0x49fe3b)),p(0x3,_0x39b796(_0x424bef))],S);const z=_0x12b56c(0x1ef),M={};var k=Object[_0x12b56c(0x1e1)],Q=(_0x5d2e38,_0x2770b6,_0x4ed512,_0x4829a2)=>{const _0x5765dc=_0x12b56c;for(var _0x3f8544=_0x4829a2>0x1?void 0x0:_0x4829a2?k(_0x2770b6,_0x4ed512):_0x2770b6,_0x58b16a=_0x5d2e38[_0x5765dc(0x1f5)]-0x1,_0x449da5;_0x58b16a>=0x0;_0x58b16a--)(_0x449da5=_0x5d2e38[_0x58b16a])&&(_0x3f8544=_0x449da5(_0x3f8544)||_0x3f8544);return _0x3f8544;},_=(_0x499741,_0x242072)=>(_0x1250f3,_0x4e5125)=>_0x242072(_0x1250f3,_0x4e5125,_0x499741);function X(_0xcb7f20,_0x2c6057){const _0x397d31=_0x12b56c,_0x5b0c32=_0xcb7f20['replies'][0x0];return{..._0x2c6057,'id':_0x5b0c32['replyId'],'resolved':_0xcb7f20[_0x397d31(0x1bc)]===0x1,'dT':D(_0x5b0c32[_0x397d31(0x1ec)]),'personId':_0x5b0c32[_0x397d31(0x1ce)],'threadId':_0x5b0c32[_0x397d31(0x19a)]};}function ee(_0x494b40,_0x57abb2,_0x404687){const _0x42a50e=_0x12b56c;var _0x206ca9,_0x238f14;if(((_0x238f14=(_0x206ca9=_0x494b40==null?void 0x0:_0x494b40[_0x42a50e(0x199)])==null?void 0x0:_0x206ca9['length'])!=null?_0x238f14:0x0)>0x0){const _0x5d06ff=(_0x4b9736,_0x580b0b)=>({'id':_0x4b9736[_0x42a50e(0x1da)],'threadId':_0x4b9736[_0x42a50e(0x19a)],'dT':D(_0x4b9736['createTimestamp']),'personId':_0x4b9736[_0x42a50e(0x1ce)],'resolved':_0x494b40[_0x42a50e(0x1bc)]===I[_0x42a50e(0x1a8)],'unitId':_0x57abb2,'subUnitId':_0x404687,'text':JSON[_0x42a50e(0x1ab)](_0x4b9736[_0x42a50e(0x1de)]),'parentId':_0x580b0b}),_0x214db7=_0x5d06ff(_0x494b40[_0x42a50e(0x199)][0x0]);return{..._0x214db7,'children':_0x494b40[_0x42a50e(0x199)]['slice'](0x1)[_0x42a50e(0x1ae)](_0x5ad52e=>_0x5d06ff(_0x5ad52e,_0x214db7['id']))};}return null;}let f=class{constructor(_0x5274cf,_0x30f7e5,_0x20a447,_0x406063){const _0x2a4dc7=_0x12b56c;this[_0x2a4dc7(0x1f8)]=_0x5274cf,this['_userService']=_0x30f7e5,this[_0x2a4dc7(0x1f4)]=_0x20a447,this[_0x2a4dc7(0x1ed)]=_0x406063;}async['addComment'](_0x1c0eac){const _0x4f63a9=_0x12b56c;var _0x26aeb3,_0x2c362f;const {parentId:_0x2c5e69,unitId:_0x5c1e49,text:_0x36ec8e,threadId:_0x5bd0aa}=_0x1c0eac,_0x110a9c=(_0x2c362f=(_0x26aeb3=_0x36ec8e[_0x4f63a9(0x19b)])==null?void 0x0:_0x26aeb3[_0x4f63a9(0x1b2)](_0x2fd52c=>_0x2fd52c[_0x4f63a9(0x1e2)]===_0x3f7c3c['COMMENT'])['map'](_0xad4890=>_0xad4890[_0x4f63a9(0x1db)]))!=null?_0x2c362f:[],_0x52b941=JSON[_0x4f63a9(0x1c4)](_0x36ec8e),_0x1a8f8b=(await this[_0x4f63a9(0x1f4)]['requireSession'](_0x5c1e49))[_0x4f63a9(0x1eb)]();if(_0x2c5e69){const _0x419575={'memberId':_0x1a8f8b,'unitId':_0x5c1e49,'content':_0x52b941,'mention':_0x110a9c,'threadId':_0x5bd0aa},_0x5a1d8f=(await this[_0x4f63a9(0x1f8)][_0x4f63a9(0x1bb)](_0x4f63a9(0x1d4)+_0x5c1e49+'/reply',{'body':_0x419575}))[_0x4f63a9(0x1b8)][_0x4f63a9(0x1b4)];return{..._0x1c0eac,'id':_0x5a1d8f[_0x4f63a9(0x1da)],'dT':_0x471f42(+_0x5a1d8f[_0x4f63a9(0x1ec)])[_0x4f63a9(0x1b9)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5a1d8f[_0x4f63a9(0x1ce)]};}else{const _0xc58149={'memberId':_0x1a8f8b,'unitId':_0x5c1e49,'content':_0x52b941,'mention':_0x110a9c},_0x357b2c=await this['_httpService'][_0x4f63a9(0x1bb)](_0x4f63a9(0x1d4)+_0x5c1e49+_0x4f63a9(0x1d6),{'body':_0xc58149});return X(_0x357b2c[_0x4f63a9(0x1b8)][_0x4f63a9(0x1a3)],_0x1c0eac);}}async['updateComment'](_0x1dc244){const _0x13dac0=_0x12b56c;var _0xf84e6a,_0x46404c;const {text:_0x2c6bea,unitId:_0x273e79}=_0x1dc244,_0x52252f=(_0x46404c=(_0xf84e6a=_0x2c6bea[_0x13dac0(0x19b)])==null?void 0x0:_0xf84e6a[_0x13dac0(0x1b2)](_0x485391=>_0x485391[_0x13dac0(0x1e2)]===_0x3f7c3c['COMMENT'])[_0x13dac0(0x1ae)](_0x36e49f=>_0x36e49f[_0x13dac0(0x1db)]))!=null?_0x46404c:[],_0x4ef4be=JSON[_0x13dac0(0x1c4)](_0x2c6bea),_0x57cd05=_0x1dc244[_0x13dac0(0x19a)],_0x3a1684=_0x1dc244['id'],_0x36cb59={'memberId':(await this[_0x13dac0(0x1f4)][_0x13dac0(0x1d3)](_0x273e79))[_0x13dac0(0x1eb)](),'unitId':_0x273e79,'threadId':_0x57cd05,'mention':_0x52252f,'content':_0x4ef4be,'replyId':_0x3a1684},_0x562e3c=await this[_0x13dac0(0x1f8)][_0x13dac0(0x1bb)](_0x13dac0(0x1d4)+_0x273e79+'/edit',{'body':_0x36cb59});return!_0x562e3c[_0x13dac0(0x1b8)][_0x13dac0(0x1bf)]||_0x562e3c[_0x13dac0(0x1b8)]['error'][_0x13dac0(0x1c3)]===0x1;}async[_0x12b56c(0x1e7)](_0x400644){const _0x3d0046=_0x12b56c,{unitId:_0x2e15c8}=_0x400644,_0x4be0ef=_0x400644['threadId'],_0x51070c={'memberId':this[_0x3d0046(0x1ee)][_0x3d0046(0x1d2)]()['userID'],'unitId':_0x2e15c8,'threadId':_0x4be0ef,'solved':_0x400644['resolved']?I[_0x3d0046(0x1a8)]:I[_0x3d0046(0x1e9)]},_0x1cabff=await this['_httpService'][_0x3d0046(0x1bb)]('/universer-api/comment/unit/'+_0x2e15c8+'/solved',{'body':_0x51070c});return!_0x1cabff[_0x3d0046(0x1b8)][_0x3d0046(0x1bf)]||_0x1cabff[_0x3d0046(0x1b8)][_0x3d0046(0x1bf)][_0x3d0046(0x1c3)]===0x1;}async['deleteComment'](_0x33f749,_0x4a8dd0,_0x3dc8d8,_0x7080){const _0x1edd4e=_0x12b56c,_0x35b9af={'memberId':(await this[_0x1edd4e(0x1f4)][_0x1edd4e(0x1d3)](_0x33f749))['getMemberID'](),'threadId':_0x3dc8d8,'replyId':_0x7080,'unitId':_0x33f749},_0x13a547=await this[_0x1edd4e(0x1f8)][_0x1edd4e(0x1bb)](_0x1edd4e(0x1d4)+_0x33f749+_0x1edd4e(0x1be),{'body':_0x35b9af});return!_0x13a547[_0x1edd4e(0x1b8)]['error']||_0x13a547[_0x1edd4e(0x1b8)]['error'][_0x1edd4e(0x1c3)]===0x1;}async[_0x12b56c(0x1cd)](_0x30a587,_0x2a0dd9,_0x29e4b1){const _0x345ca0=_0x12b56c,_0x14e0fb={'unitId':_0x30a587,'threadId':_0x29e4b1},_0x2edb5c=await this['_httpService'][_0x345ca0(0x1bb)](_0x345ca0(0x1d4)+_0x30a587+'/list',{'body':_0x14e0fb}),_0x9970c=_0x29e4b1[_0x345ca0(0x1ae)](_0x55961a=>ee(_0x2edb5c[_0x345ca0(0x1b8)]['comments'][_0x55961a],_0x30a587,_0x2a0dd9))['filter'](Boolean);return Object['values'](_0x2edb5c[_0x345ca0(0x1b8)][_0x345ca0(0x1aa)])['forEach'](_0x1d9cbf=>{const _0x32aa6c=_0x345ca0;this[_0x32aa6c(0x1ee)][_0x32aa6c(0x1e8)](_0x1d9cbf);}),_0x9970c;}[_0x12b56c(0x1cc)](_0x31306f){const _0x3f49c8=_0x12b56c;return{'id':_0x31306f['id'],'threadId':_0x31306f[_0x3f49c8(0x19a)],'ref':_0x31306f[_0x3f49c8(0x1ad)]};}};f=Q([_(0x0,_0x39b796(_0x397a0a)),_(0x1,_0x39b796(_0x49fe3b)),_(0x2,_0x39b796(_0x29ed8b)),_(0x3,_0x39b796(_0x424bef))],f);var re=Object[_0x12b56c(0x1e1)],te=(_0x195d00,_0x3804a4,_0x32fccf,_0x11799b)=>{const _0x1f94d9=_0x12b56c;for(var _0x247dde=_0x11799b>0x1?void 0x0:_0x11799b?re(_0x3804a4,_0x32fccf):_0x3804a4,_0xdaeddd=_0x195d00[_0x1f94d9(0x1f5)]-0x1,_0x5f3674;_0xdaeddd>=0x0;_0xdaeddd--)(_0x5f3674=_0x195d00[_0xdaeddd])&&(_0x247dde=_0x5f3674(_0x247dde)||_0x247dde);return _0x247dde;},N=(_0x14a4e0,_0x366d79)=>(_0x56242a,_0x57b7b4)=>_0x366d79(_0x56242a,_0x57b7b4,_0x14a4e0);function _0xce34(){const _0x4ad063=['parentId','Reply','resolveComment','addUser','OpenOrReOpen','YYYY/MM/DD\x20HH:mm','getMemberID','createTimestamp','_injector','_userService','thread-comment-data-source.config','450885yUTaLy','commentUpdate$','175BvaMsD','disposeWithMe','_sessionService','length','size','addComment','_httpService','user','getUnit','replies','threadId','customRanges','Unknown','UNIVER_UNKNOWN','type','pipe','root','deleteComment','dataSource','comment','731232bYBsLZ','unitId','defineProperty','_config','Solved','symbol','users','parse','_threadCommentDataSource','ref','map','getUser','pluginName','updateComment','filter','get','reply','userID','_threadCommentDataSourceService','538904vtzFOm','body','format','1118307pxPZje','post','solved','personId','/delete','error','36zrKTBX','11hAPOoA','_init','code','stringify','Add','UNRECOGNIZED','Edit','subscribe','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initDataSource','find','saveCommentToSnapshot','listComments','userId','add','26454HqJiae','forEach','getCurrentUser','requireSession','/universer-api/comment/unit/','delete','/add','11385430nAKAIF','Solve','setConfig','replyId','rangeId','Delete','2HdmDbf','content','getComment','_configService','getOwnPropertyDescriptor','rangeType','_threadCommentModel','97462rCBWoe'];_0xce34=function(){return _0x4ad063;};return _0xce34();}let g=class extends _0x2461f3{constructor(_0x3c357d,_0x166fdb){const _0x5c8294=_0x12b56c;super(),this[_0x5c8294(0x1b6)]=_0x3c357d,this[_0x5c8294(0x1ac)]=_0x166fdb,this[_0x5c8294(0x1ca)]();}[_0x12b56c(0x1ca)](){const _0x50baa6=_0x12b56c;this[_0x50baa6(0x1b6)][_0x50baa6(0x1a2)]=this[_0x50baa6(0x1ac)],this[_0x50baa6(0x1b6)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x91912c),N(0x1,_0x39b796(f))],g);var se=Object[_0x12b56c(0x1a6)],oe=Object[_0x12b56c(0x1e1)],ne=(_0x37a0d9,_0xb50cc6,_0x7beabe)=>_0xb50cc6 in _0x37a0d9?se(_0x37a0d9,_0xb50cc6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x7beabe}):_0x37a0d9[_0xb50cc6]=_0x7beabe,ie=(_0x40b3a8,_0xc0a831,_0xace0f5,_0x73095e)=>{const _0x4fb9ce=_0x12b56c;for(var _0x16d76e=_0x73095e>0x1?void 0x0:_0x73095e?oe(_0xc0a831,_0xace0f5):_0xc0a831,_0x52c5a3=_0x40b3a8[_0x4fb9ce(0x1f5)]-0x1,_0x39d5d6;_0x52c5a3>=0x0;_0x52c5a3--)(_0x39d5d6=_0x40b3a8[_0x52c5a3])&&(_0x16d76e=_0x39d5d6(_0x16d76e)||_0x16d76e);return _0x16d76e;},w=(_0x369b6d,_0x4a6cb7)=>(_0x55b64e,_0x11fe55)=>_0x4a6cb7(_0x55b64e,_0x11fe55,_0x369b6d),$=(_0x5d71be,_0x93677f,_0x3dd09e)=>ne(_0x5d71be,typeof _0x93677f!=_0x12b56c(0x1a9)?_0x93677f+'':_0x93677f,_0x3dd09e);let b=class extends _0x3a42a6{constructor(_0x14eaa1=M,_0x57a787,_0x4237b3){const _0x3d2193=_0x12b56c;super(),this[_0x3d2193(0x1a7)]=_0x14eaa1,this[_0x3d2193(0x1ed)]=_0x57a787,this[_0x3d2193(0x1e0)]=_0x4237b3;const {..._0x2f5890}=_0x720492({},M,this[_0x3d2193(0x1a7)]);this['_configService'][_0x3d2193(0x1d9)](z,_0x2f5890);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x51bc9d=>{const _0x7b6389=_0x10d6;this[_0x7b6389(0x1ed)]['add'](_0x51bc9d);});}['onReady'](){const _0x456ea9=_0x12b56c;this[_0x456ea9(0x1ed)][_0x456ea9(0x1b3)](g),this[_0x456ea9(0x1ed)]['get'](S);}};$(b,_0x12b56c(0x1b0),W),$(b,'type',_0x823561[_0x12b56c(0x19d)]),b=ie([_0x21a168(_0x3dd3a8,_0x34c6e6,_0x109dd0),w(0x1,_0x39b796(_0x424bef)),w(0x2,_0x560613)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x1a9525=_0x281e;(function(_0x29b3a3,_0x2d8e36){const _0x292153=_0x281e,_0x500b2b=_0x29b3a3();while(!![]){try{const _0x4e0f9e=-parseInt(_0x292153(0x150))/0x1*(-parseInt(_0x292153(0x152))/0x2)+parseInt(_0x292153(0x186))/0x3*(parseInt(_0x292153(0x149))/0x4)+-parseInt(_0x292153(0x15b))/0x5*(parseInt(_0x292153(0x191))/0x6)+parseInt(_0x292153(0x192))/0x7+-parseInt(_0x292153(0x14c))/0x8*(-parseInt(_0x292153(0x154))/0x9)+-parseInt(_0x292153(0x16b))/0xa*(parseInt(_0x292153(0x165))/0xb)+parseInt(_0x292153(0x188))/0xc*(-parseInt(_0x292153(0x160))/0xd);if(_0x4e0f9e===_0x2d8e36)break;else _0x500b2b['push'](_0x500b2b['shift']());}catch(_0x57215d){_0x500b2b['push'](_0x500b2b['shift']());}}}(_0x5a97,0x32e0f));import{CommentService as _0x40c369,CollaborationSessionService as _0xb5f0f6,UniverCollaborationClientPlugin as _0x156a54}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x44c437}from'@univerjs-pro/license';import{dayjs as _0x8d8ae0,UserManagerService as _0x3744cb,Inject as _0x22e7e9,Injector as _0x5645be,Disposable as _0x52e380,CustomRangeType as _0x3fa89b,UniverInstanceType as _0x5c86df,DependentOn as _0x3c4a67,IConfigService as _0x23818b,Plugin as _0x14760f,merge as _0x3fdcf6}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5d7089}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x94249b,IThreadCommentDataSourceService as _0x14199e}from'@univerjs/thread-comment';import{bufferTime as _0x3dfed0}from'rxjs';function _0x281e(_0x5d54cf,_0x37828b){const _0x5a97c4=_0x5a97();return _0x281e=function(_0x281e15,_0xaeb5d7){_0x281e15=_0x281e15-0x13f;let _0x375546=_0x5a97c4[_0x281e15];return _0x375546;},_0x281e(_0x5d54cf,_0x37828b);}import{HTTPService as _0x207092}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2854b3=>(_0x2854b3[_0x2854b3[_0x1a9525(0x157)]=0x0]=_0x1a9525(0x157),_0x2854b3[_0x2854b3[_0x1a9525(0x184)]=0x1]=_0x1a9525(0x184),_0x2854b3[_0x2854b3['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2854b3))(I||{}),v=(_0xa6053e=>(_0xa6053e[_0xa6053e[_0x1a9525(0x198)]=0x0]=_0x1a9525(0x198),_0xa6053e[_0xa6053e[_0x1a9525(0x13f)]=0x1]='Add',_0xa6053e[_0xa6053e['Reply']=0x2]=_0x1a9525(0x143),_0xa6053e[_0xa6053e[_0x1a9525(0x159)]=0x3]=_0x1a9525(0x159),_0xa6053e[_0xa6053e[_0x1a9525(0x190)]=0x4]=_0x1a9525(0x190),_0xa6053e[_0xa6053e[_0x1a9525(0x18f)]=0x5]=_0x1a9525(0x18f),_0xa6053e[_0xa6053e[_0x1a9525(0x17f)]=-0x1]=_0x1a9525(0x17f),_0xa6053e))(v||{});const D=_0x2f9ac0=>_0x8d8ae0(new Date(+_0x2f9ac0))[_0x1a9525(0x187)](_0x1a9525(0x17a)),B=async(_0x466682,_0x4ba6fc)=>{const _0x43f220=_0x1a9525,_0x451675=_0x466682[_0x43f220(0x167)](_0x3744cb),_0x16c8b0=_0x466682['get'](_0x207092);_0x4ba6fc['forEach'](_0x295762=>{const _0x57bd28=_0x43f220;_0x451675[_0x57bd28(0x140)](_0x295762)&&_0x4ba6fc[_0x57bd28(0x15c)](_0x295762);}),_0x4ba6fc[_0x43f220(0x1a8)]&&(await _0x16c8b0[_0x43f220(0x167)](_0x43f220(0x166),{'params':{'userIDs':[..._0x4ba6fc]}}))[_0x43f220(0x144)][_0x43f220(0x155)][_0x43f220(0x14d)](_0x34e0ea=>{const _0x2c12a1=_0x43f220;_0x34e0ea&&_0x451675[_0x2c12a1(0x175)](_0x34e0ea);});};var K=Object[_0x1a9525(0x151)],V=(_0x41501a,_0x359580,_0x2a9c4b,_0x3a0312)=>{const _0x158f61=_0x1a9525;for(var _0x30e415=_0x3a0312>0x1?void 0x0:_0x3a0312?K(_0x359580,_0x2a9c4b):_0x359580,_0x292757=_0x41501a[_0x158f61(0x16f)]-0x1,_0x2adb6d;_0x292757>=0x0;_0x292757--)(_0x2adb6d=_0x41501a[_0x292757])&&(_0x30e415=_0x2adb6d(_0x30e415)||_0x30e415);return _0x30e415;},p=(_0x29f0e2,_0x1e5c94)=>(_0x54c32f,_0x591cff)=>_0x1e5c94(_0x54c32f,_0x591cff,_0x29f0e2);let S=class extends _0x52e380{constructor(_0x9ae7ac,_0x52ac7a,_0x1fd2f4,_0x1a70e8){const _0x15073c=_0x1a9525;super(),this[_0x15073c(0x18c)]=_0x9ae7ac,this[_0x15073c(0x19a)]=_0x52ac7a,this[_0x15073c(0x179)]=_0x1fd2f4,this['_injector']=_0x1a70e8,this[_0x15073c(0x1ab)](),this[_0x15073c(0x195)]();}['_initUserSync'](){const _0x43b798=_0x1a9525;this[_0x43b798(0x1a5)](this[_0x43b798(0x19a)][_0x43b798(0x145)][_0x43b798(0x19c)](_0x3dfed0(0x10))['subscribe'](_0x565d36=>{const _0x5414a9=_0x43b798,_0x873893=new Set();_0x565d36[_0x5414a9(0x14d)](_0x452d1d=>{const _0x3b75af=_0x5414a9;switch(_0x452d1d[_0x3b75af(0x1a2)]){case'add':{const _0x246373=_0x452d1d[_0x3b75af(0x161)][_0x3b75af(0x181)];_0x873893[_0x3b75af(0x156)](_0x246373);break;}}}),B(this[_0x5414a9(0x15f)],_0x873893);}));}[_0x1a9525(0x1ab)](){const _0x50dd4e=_0x1a9525;this[_0x50dd4e(0x1a5)](this[_0x50dd4e(0x18c)][_0x50dd4e(0x145)][_0x50dd4e(0x176)](async _0xdfa244=>{const _0x433fcc=_0x50dd4e;var _0x3cd55e,_0x24f8b8,_0x5480fc,_0x4487f4;const _0x383e74=(_0x3cd55e=this[_0x433fcc(0x19a)][_0x433fcc(0x1a6)](_0xdfa244[_0x433fcc(0x158)])[_0x433fcc(0x1a7)](_0x55b7a3=>_0x55b7a3[_0x433fcc(0x142)]===_0xdfa244[_0x433fcc(0x142)]))==null?void 0x0:_0x3cd55e['root'];if(!_0x383e74)return;const {unitId:_0x385c67,subUnitId:_0x55b27a}=_0x383e74;switch(_0xdfa244[_0x433fcc(0x1a4)]&&this[_0x433fcc(0x179)][_0x433fcc(0x175)](_0xdfa244['user']),_0xdfa244[_0x433fcc(0x1a2)]){case v[_0x433fcc(0x13f)]:break;case v[_0x433fcc(0x143)]:{this[_0x433fcc(0x19a)][_0x433fcc(0x15a)](_0x385c67,_0x55b27a,{'unitId':_0x385c67,'subUnitId':_0x55b27a,'ref':'','id':_0xdfa244[_0x433fcc(0x162)],'dT':D(+_0xdfa244[_0x433fcc(0x153)]),'threadId':_0xdfa244['threadId'],'personId':(_0x5480fc=(_0x24f8b8=_0xdfa244[_0x433fcc(0x1a4)])==null?void 0x0:_0x24f8b8['userID'])!=null?_0x5480fc:_0xdfa244['userId'],'text':JSON[_0x433fcc(0x14a)](_0xdfa244[_0x433fcc(0x17c)]),'parentId':_0x383e74['id']});break;}case v[_0x433fcc(0x190)]:{const _0x3644f6=this[_0x433fcc(0x19a)][_0x433fcc(0x168)](_0x385c67,_0x55b27a,_0xdfa244[_0x433fcc(0x162)]);_0x3644f6&&_0x3644f6[_0x433fcc(0x18a)]&&this[_0x433fcc(0x19a)][_0x433fcc(0x1a1)](_0x385c67,_0x55b27a,_0xdfa244[_0x433fcc(0x162)]);break;}case v[_0x433fcc(0x159)]:{this[_0x433fcc(0x19a)]['updateComment'](_0x385c67,_0x55b27a,{'commentId':_0xdfa244[_0x433fcc(0x162)],'text':JSON[_0x433fcc(0x14a)](_0xdfa244[_0x433fcc(0x17c)])});break;}case v[_0x433fcc(0x18f)]:{const _0x4edcd5=(_0x4487f4=this['_threadCommentModel'][_0x433fcc(0x1a6)](_0xdfa244[_0x433fcc(0x158)])[_0x433fcc(0x1a7)](_0x31b569=>_0x31b569[_0x433fcc(0x142)]===_0xdfa244[_0x433fcc(0x142)]))==null?void 0x0:_0x4487f4['root'];_0x4edcd5&&this[_0x433fcc(0x19a)][_0x433fcc(0x14f)](_0x385c67,_0x55b27a,_0x4edcd5['id'],_0xdfa244[_0x433fcc(0x14e)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x22e7e9(_0x40c369)),p(0x1,_0x22e7e9(_0x94249b)),p(0x2,_0x22e7e9(_0x3744cb)),p(0x3,_0x22e7e9(_0x5645be))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x1a9525(0x151)],Q=(_0x415310,_0x5a4bd2,_0xe1fd49,_0x4f86c3)=>{const _0x33407d=_0x1a9525;for(var _0x5830e7=_0x4f86c3>0x1?void 0x0:_0x4f86c3?k(_0x5a4bd2,_0xe1fd49):_0x5a4bd2,_0x99997b=_0x415310[_0x33407d(0x16f)]-0x1,_0x5038eb;_0x99997b>=0x0;_0x99997b--)(_0x5038eb=_0x415310[_0x99997b])&&(_0x5830e7=_0x5038eb(_0x5830e7)||_0x5830e7);return _0x5830e7;},_=(_0x56b842,_0x531499)=>(_0x41b231,_0x5b228e)=>_0x531499(_0x41b231,_0x5b228e,_0x56b842);function X(_0x1dc29f,_0x55b3e8){const _0x283aea=_0x1a9525,_0x5ba95d=_0x1dc29f[_0x283aea(0x178)][0x0];return{..._0x55b3e8,'id':_0x5ba95d[_0x283aea(0x162)],'resolved':_0x1dc29f[_0x283aea(0x14e)]===0x1,'dT':D(_0x5ba95d[_0x283aea(0x153)]),'personId':_0x5ba95d[_0x283aea(0x163)],'threadId':_0x5ba95d[_0x283aea(0x142)]};}function ee(_0xf45a16,_0x380eb4,_0x556894){const _0x1f9b87=_0x1a9525;var _0x463bb7,_0x5908a9;if(((_0x5908a9=(_0x463bb7=_0xf45a16==null?void 0x0:_0xf45a16[_0x1f9b87(0x178)])==null?void 0x0:_0x463bb7[_0x1f9b87(0x16f)])!=null?_0x5908a9:0x0)>0x0){const _0x1be153=(_0x2f8038,_0x2fe42e)=>({'id':_0x2f8038[_0x1f9b87(0x162)],'threadId':_0x2f8038['threadId'],'dT':D(_0x2f8038['createTimestamp']),'personId':_0x2f8038[_0x1f9b87(0x163)],'resolved':_0xf45a16[_0x1f9b87(0x14e)]===I[_0x1f9b87(0x184)],'unitId':_0x380eb4,'subUnitId':_0x556894,'text':JSON[_0x1f9b87(0x14a)](_0x2f8038[_0x1f9b87(0x17c)]),'parentId':_0x2fe42e}),_0x15a128=_0x1be153(_0xf45a16[_0x1f9b87(0x178)][0x0]);return{..._0x15a128,'children':_0xf45a16[_0x1f9b87(0x178)][_0x1f9b87(0x17b)](0x1)[_0x1f9b87(0x185)](_0xb4aa20=>_0x1be153(_0xb4aa20,_0x15a128['id']))};}return null;}let f=class{constructor(_0x170bb6,_0x36beb0,_0x28ed81,_0x41427a){const _0x5d54ec=_0x1a9525;this[_0x5d54ec(0x173)]=_0x170bb6,this[_0x5d54ec(0x179)]=_0x36beb0,this[_0x5d54ec(0x17e)]=_0x28ed81,this[_0x5d54ec(0x15f)]=_0x41427a;}async[_0x1a9525(0x15a)](_0x170fb8){const _0x5eb96b=_0x1a9525;var _0x4c0deb,_0x3bcdf4;const {parentId:_0x484456,unitId:_0x3df598,text:_0x38a5a8,threadId:_0x53931a}=_0x170fb8,_0x304d2e=(_0x3bcdf4=(_0x4c0deb=_0x38a5a8[_0x5eb96b(0x17d)])==null?void 0x0:_0x4c0deb[_0x5eb96b(0x15d)](_0x392cf3=>_0x392cf3[_0x5eb96b(0x19d)]===_0x3fa89b[_0x5eb96b(0x15e)])[_0x5eb96b(0x185)](_0x149650=>_0x149650[_0x5eb96b(0x19b)]))!=null?_0x3bcdf4:[],_0x37b017=JSON[_0x5eb96b(0x164)](_0x38a5a8),_0x3fe66f=(await this[_0x5eb96b(0x17e)]['requireSession'](_0x3df598))['getMemberID']();if(_0x484456){const _0x4da751={'memberId':_0x3fe66f,'unitId':_0x3df598,'content':_0x37b017,'mention':_0x304d2e,'threadId':_0x53931a},_0x8dc241=(await this[_0x5eb96b(0x173)][_0x5eb96b(0x19e)]('/universer-api/comment/unit/'+_0x3df598+_0x5eb96b(0x171),{'body':_0x4da751}))[_0x5eb96b(0x144)][_0x5eb96b(0x1a0)];return{..._0x170fb8,'id':_0x8dc241[_0x5eb96b(0x162)],'dT':_0x8d8ae0(+_0x8dc241['createTimestamp'])[_0x5eb96b(0x187)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x8dc241[_0x5eb96b(0x163)]};}else{const _0xd0b960={'memberId':_0x3fe66f,'unitId':_0x3df598,'content':_0x37b017,'mention':_0x304d2e},_0x5b586c=await this['_httpService'][_0x5eb96b(0x19e)]('/universer-api/comment/unit/'+_0x3df598+_0x5eb96b(0x147),{'body':_0xd0b960});return X(_0x5b586c['body'][_0x5eb96b(0x1a3)],_0x170fb8);}}async[_0x1a9525(0x18e)](_0x147bb9){const _0x16c9a1=_0x1a9525;var _0x2f7eca,_0xd942d6;const {text:_0x39bce1,unitId:_0x5c0973}=_0x147bb9,_0x1a0660=(_0xd942d6=(_0x2f7eca=_0x39bce1['customRanges'])==null?void 0x0:_0x2f7eca[_0x16c9a1(0x15d)](_0x43eff0=>_0x43eff0['rangeType']===_0x3fa89b[_0x16c9a1(0x15e)])[_0x16c9a1(0x185)](_0x2f20cb=>_0x2f20cb[_0x16c9a1(0x19b)]))!=null?_0xd942d6:[],_0x37828c=JSON['stringify'](_0x39bce1),_0x443d5e=_0x147bb9['threadId'],_0x4dd1d1=_0x147bb9['id'],_0x5c4fe1={'memberId':(await this['_sessionService'][_0x16c9a1(0x193)](_0x5c0973))[_0x16c9a1(0x183)](),'unitId':_0x5c0973,'threadId':_0x443d5e,'mention':_0x1a0660,'content':_0x37828c,'replyId':_0x4dd1d1},_0x49e4a8=await this[_0x16c9a1(0x173)][_0x16c9a1(0x19e)]('/universer-api/comment/unit/'+_0x5c0973+_0x16c9a1(0x194),{'body':_0x5c4fe1});return!_0x49e4a8[_0x16c9a1(0x144)]['error']||_0x49e4a8['body']['error'][_0x16c9a1(0x196)]===0x1;}async['resolveComment'](_0x223bdd){const _0x2d163a=_0x1a9525,{unitId:_0x659991}=_0x223bdd,_0x20c221=_0x223bdd[_0x2d163a(0x142)],_0x43ba23={'memberId':this['_userService'][_0x2d163a(0x1a9)]()[_0x2d163a(0x182)],'unitId':_0x659991,'threadId':_0x20c221,'solved':_0x223bdd[_0x2d163a(0x1aa)]?I[_0x2d163a(0x184)]:I[_0x2d163a(0x157)]},_0x3e663d=await this[_0x2d163a(0x173)][_0x2d163a(0x19e)](_0x2d163a(0x16a)+_0x659991+'/solved',{'body':_0x43ba23});return!_0x3e663d[_0x2d163a(0x144)]['error']||_0x3e663d['body']['error'][_0x2d163a(0x196)]===0x1;}async['deleteComment'](_0x31c426,_0x109a50,_0x5221d3,_0x54f231){const _0x1163cc=_0x1a9525,_0x4f28d4={'memberId':(await this[_0x1163cc(0x17e)][_0x1163cc(0x193)](_0x31c426))[_0x1163cc(0x183)](),'threadId':_0x5221d3,'replyId':_0x54f231,'unitId':_0x31c426},_0x4ec5f4=await this[_0x1163cc(0x173)][_0x1163cc(0x19e)]('/universer-api/comment/unit/'+_0x31c426+'/delete',{'body':_0x4f28d4});return!_0x4ec5f4[_0x1163cc(0x144)][_0x1163cc(0x16c)]||_0x4ec5f4['body'][_0x1163cc(0x16c)][_0x1163cc(0x196)]===0x1;}async[_0x1a9525(0x18b)](_0x2c8eb7,_0x15bdd5,_0x2516e5){const _0x3b03d9=_0x1a9525,_0x287236={'unitId':_0x2c8eb7,'threadId':_0x2516e5},_0x4d9369=await this[_0x3b03d9(0x173)]['post'](_0x3b03d9(0x16a)+_0x2c8eb7+_0x3b03d9(0x172),{'body':_0x287236}),_0x2a38fd=_0x2516e5[_0x3b03d9(0x185)](_0x22e9f5=>ee(_0x4d9369[_0x3b03d9(0x144)][_0x3b03d9(0x169)][_0x22e9f5],_0x2c8eb7,_0x15bdd5))[_0x3b03d9(0x15d)](Boolean);return Object[_0x3b03d9(0x174)](_0x4d9369[_0x3b03d9(0x144)]['users'])[_0x3b03d9(0x14d)](_0x23253f=>{const _0x472c18=_0x3b03d9;this[_0x472c18(0x179)][_0x472c18(0x175)](_0x23253f);}),_0x2a38fd;}[_0x1a9525(0x16d)](_0x25fdeb){const _0xfeeeb2=_0x1a9525;return{'id':_0x25fdeb['id'],'threadId':_0x25fdeb[_0xfeeeb2(0x142)],'ref':_0x25fdeb[_0xfeeeb2(0x141)]};}};f=Q([_(0x0,_0x22e7e9(_0x207092)),_(0x1,_0x22e7e9(_0x3744cb)),_(0x2,_0x22e7e9(_0xb5f0f6)),_(0x3,_0x22e7e9(_0x5645be))],f);var re=Object[_0x1a9525(0x151)],te=(_0x1b5106,_0x165841,_0x58a085,_0x1c1e4a)=>{const _0x289f95=_0x1a9525;for(var _0x59ce3c=_0x1c1e4a>0x1?void 0x0:_0x1c1e4a?re(_0x165841,_0x58a085):_0x165841,_0x26c42e=_0x1b5106[_0x289f95(0x16f)]-0x1,_0x3adca6;_0x26c42e>=0x0;_0x26c42e--)(_0x3adca6=_0x1b5106[_0x26c42e])&&(_0x59ce3c=_0x3adca6(_0x59ce3c)||_0x59ce3c);return _0x59ce3c;},N=(_0x44988c,_0x577d11)=>(_0x1886a8,_0x20115d)=>_0x577d11(_0x1886a8,_0x20115d,_0x44988c);let g=class extends _0x52e380{constructor(_0x44cee3,_0x1d1169){const _0x487315=_0x1a9525;super(),this['_threadCommentDataSourceService']=_0x44cee3,this[_0x487315(0x197)]=_0x1d1169,this[_0x487315(0x19f)]();}[_0x1a9525(0x19f)](){const _0x1c2763=_0x1a9525;this[_0x1c2763(0x148)]['dataSource']=this[_0x1c2763(0x197)],this[_0x1c2763(0x148)]['syncUpdateMutationToColla']=!0x1;}};function _0x5a97(){const _0x388fcc=['/reply','/list','_httpService','values','addUser','subscribe','onStarting','replies','_userService','YYYY/MM/DD\x20HH:mm','slice','content','customRanges','_sessionService','UNRECOGNIZED','onReady','personId','userID','getMemberID','Solved','map','30dqSJtM','format','12ZUlxxC','_configService','parentId','listComments','_commentService','defineProperty','updateComment','Solve','Delete','84594QkklsI','415359pfXLZg','requireSession','/edit','_initUserSync','code','_threadCommentDataSource','Unknown','UNIVER_UNKNOWN','_threadCommentModel','rangeId','pipe','rangeType','post','_initDataSource','reply','deleteComment','type','comment','user','disposeWithMe','getUnit','find','size','getCurrentUser','resolved','_init','Add','getUser','ref','threadId','Reply','body','commentUpdate$','pluginName','/add','_threadCommentDataSourceService','42848KIIVhZ','parse','symbol','93016LpNQPu','forEach','solved','resolveComment','3GLkCms','getOwnPropertyDescriptor','83724tyetAg','createTimestamp','198hsLCgw','users','add','OpenOrReOpen','unitId','Edit','addComment','5uJGKoi','delete','filter','COMMENT','_injector','1666262hyvytS','payload','replyId','userId','stringify','46145XMJNCM','/universer-api/user/list','get','getComment','comments','/universer-api/comment/unit/','470RkjJYY','error','saveCommentToSnapshot','_config','length','setConfig'];_0x5a97=function(){return _0x388fcc;};return _0x5a97();}g=te([N(0x0,_0x14199e),N(0x1,_0x22e7e9(f))],g);var se=Object[_0x1a9525(0x18d)],oe=Object[_0x1a9525(0x151)],ne=(_0xe30eee,_0x4ea96f,_0x59f59f)=>_0x4ea96f in _0xe30eee?se(_0xe30eee,_0x4ea96f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x59f59f}):_0xe30eee[_0x4ea96f]=_0x59f59f,ie=(_0x5bdcb7,_0x3ce996,_0x1266c5,_0x13d61c)=>{for(var _0x5507c9=_0x13d61c>0x1?void 0x0:_0x13d61c?oe(_0x3ce996,_0x1266c5):_0x3ce996,_0x5a7208=_0x5bdcb7['length']-0x1,_0x459d35;_0x5a7208>=0x0;_0x5a7208--)(_0x459d35=_0x5bdcb7[_0x5a7208])&&(_0x5507c9=_0x459d35(_0x5507c9)||_0x5507c9);return _0x5507c9;},w=(_0x55efcf,_0x5cd973)=>(_0x378872,_0x44783b)=>_0x5cd973(_0x378872,_0x44783b,_0x55efcf),$=(_0x1dc2ff,_0xee071e,_0x4524eb)=>ne(_0x1dc2ff,typeof _0xee071e!=_0x1a9525(0x14b)?_0xee071e+'':_0xee071e,_0x4524eb);let b=class extends _0x14760f{constructor(_0x686d3f=M,_0x3e7257,_0x4dc320){const _0x3714ad=_0x1a9525;super(),this[_0x3714ad(0x16e)]=_0x686d3f,this[_0x3714ad(0x15f)]=_0x3e7257,this[_0x3714ad(0x189)]=_0x4dc320;const {..._0x12bc84}=_0x3fdcf6({},M,this[_0x3714ad(0x16e)]);this[_0x3714ad(0x189)][_0x3714ad(0x170)](z,_0x12bc84);}[_0x1a9525(0x177)](){const _0x4828e3=_0x1a9525;[[f],[g],[S]][_0x4828e3(0x14d)](_0x5416d7=>{const _0x1f6d7b=_0x4828e3;this[_0x1f6d7b(0x15f)][_0x1f6d7b(0x156)](_0x5416d7);});}[_0x1a9525(0x180)](){const _0x60ccf5=_0x1a9525;this['_injector'][_0x60ccf5(0x167)](g),this[_0x60ccf5(0x15f)]['get'](S);}};$(b,_0x1a9525(0x146),W),$(b,_0x1a9525(0x1a2),_0x5c86df[_0x1a9525(0x199)]),b=ie([_0x3c4a67(_0x5d7089,_0x156a54,_0x44c437),w(0x1,_0x22e7e9(_0x5645be)),w(0x2,_0x23818b)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x12b56c=_0x10d6;function _0x10d6(_0x3ec3a3,_0x389d62){const _0xce34ea=_0xce34();return _0x10d6=function(_0x10d6db,_0x593616){_0x10d6db=_0x10d6db-0x198;let _0x481542=_0xce34ea[_0x10d6db];return _0x481542;},_0x10d6(_0x3ec3a3,_0x389d62);}(function(_0x215dac,_0x3e3d42){const _0x100892=_0x10d6,_0x359c04=_0x215dac();while(!![]){try{const _0x3b64df=-parseInt(_0x100892(0x1e4))/0x1*(parseInt(_0x100892(0x1dd))/0x2)+-parseInt(_0x100892(0x1ba))/0x3+-parseInt(_0x100892(0x1a4))/0x4+parseInt(_0x100892(0x1f0))/0x5+parseInt(_0x100892(0x1d0))/0x6*(-parseInt(_0x100892(0x1f2))/0x7)+-parseInt(_0x100892(0x1b7))/0x8*(parseInt(_0x100892(0x1c0))/0x9)+-parseInt(_0x100892(0x1d7))/0xa*(-parseInt(_0x100892(0x1c1))/0xb);if(_0x3b64df===_0x3e3d42)break;else _0x359c04['push'](_0x359c04['shift']());}catch(_0x507c53){_0x359c04['push'](_0x359c04['shift']());}}}(_0xce34,0x2fda4));import{CommentService as _0x4961eb,CollaborationSessionService as _0x29ed8b,UniverCollaborationClientPlugin as _0x34c6e6}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x109dd0}from'@univerjs-pro/license';import{dayjs as _0x471f42,UserManagerService as _0x49fe3b,Inject as _0x39b796,Injector as _0x424bef,Disposable as _0x2461f3,CustomRangeType as _0x3f7c3c,UniverInstanceType as _0x823561,DependentOn as _0x21a168,IConfigService as _0x560613,Plugin as _0x3a42a6,merge as _0x720492}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3dd3a8}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xd98492,IThreadCommentDataSourceService as _0x91912c}from'@univerjs/thread-comment';import{bufferTime as _0x212897}from'rxjs';import{HTTPService as _0x397a0a}from'@univerjs/network';const W=_0x12b56c(0x1c9);var I=(_0x1d96a6=>(_0x1d96a6[_0x1d96a6['OpenOrReOpen']=0x0]=_0x12b56c(0x1e9),_0x1d96a6[_0x1d96a6[_0x12b56c(0x1a8)]=0x1]=_0x12b56c(0x1a8),_0x1d96a6[_0x1d96a6['UNRECOGNIZED']=-0x1]=_0x12b56c(0x1c6),_0x1d96a6))(I||{}),v=(_0x2eb9eb=>(_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x19c)]=0x0]=_0x12b56c(0x19c),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1c5)]=0x1]=_0x12b56c(0x1c5),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1e6)]=0x2]=_0x12b56c(0x1e6),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1c7)]=0x3]=_0x12b56c(0x1c7),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1dc)]=0x4]=_0x12b56c(0x1dc),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1d8)]=0x5]=_0x12b56c(0x1d8),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1c6)]=-0x1]=_0x12b56c(0x1c6),_0x2eb9eb))(v||{});const D=_0x59c67d=>_0x471f42(new Date(+_0x59c67d))[_0x12b56c(0x1b9)](_0x12b56c(0x1ea)),B=async(_0x28c461,_0x2fda40)=>{const _0x4426f8=_0x12b56c,_0x95603c=_0x28c461['get'](_0x49fe3b),_0x36971b=_0x28c461[_0x4426f8(0x1b3)](_0x397a0a);_0x2fda40['forEach'](_0x134d6b=>{const _0x4b5b00=_0x4426f8;_0x95603c[_0x4b5b00(0x1af)](_0x134d6b)&&_0x2fda40[_0x4b5b00(0x1d5)](_0x134d6b);}),_0x2fda40[_0x4426f8(0x1f6)]&&(await _0x36971b[_0x4426f8(0x1b3)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2fda40]}}))[_0x4426f8(0x1b8)][_0x4426f8(0x1aa)][_0x4426f8(0x1d1)](_0x242a8d=>{const _0x39c586=_0x4426f8;_0x242a8d&&_0x95603c[_0x39c586(0x1e8)](_0x242a8d);});};var K=Object[_0x12b56c(0x1e1)],V=(_0x49dddd,_0x2f2948,_0x1f4f6d,_0x4d5bbc)=>{const _0x397ab9=_0x12b56c;for(var _0x1de8a2=_0x4d5bbc>0x1?void 0x0:_0x4d5bbc?K(_0x2f2948,_0x1f4f6d):_0x2f2948,_0x15a2d9=_0x49dddd[_0x397ab9(0x1f5)]-0x1,_0x145d0a;_0x15a2d9>=0x0;_0x15a2d9--)(_0x145d0a=_0x49dddd[_0x15a2d9])&&(_0x1de8a2=_0x145d0a(_0x1de8a2)||_0x1de8a2);return _0x1de8a2;},p=(_0x1c2670,_0x51ff8a)=>(_0x16d015,_0x31b19e)=>_0x51ff8a(_0x16d015,_0x31b19e,_0x1c2670);let S=class extends _0x2461f3{constructor(_0x37664f,_0x3415c1,_0x35fd08,_0x3135cd){const _0x57ca06=_0x12b56c;super(),this['_commentService']=_0x37664f,this[_0x57ca06(0x1e3)]=_0x3415c1,this[_0x57ca06(0x1ee)]=_0x35fd08,this[_0x57ca06(0x1ed)]=_0x3135cd,this[_0x57ca06(0x1c2)](),this['_initUserSync']();}['_initUserSync'](){const _0xd74971=_0x12b56c;this[_0xd74971(0x1f3)](this[_0xd74971(0x1e3)][_0xd74971(0x1f1)][_0xd74971(0x19f)](_0x212897(0x10))[_0xd74971(0x1c8)](_0x299557=>{const _0x539ecf=_0xd74971,_0x56e015=new Set();_0x299557[_0x539ecf(0x1d1)](_0x5509a8=>{const _0x37ad16=_0x539ecf;switch(_0x5509a8['type']){case _0x37ad16(0x1cf):{const _0x458f6c=_0x5509a8['payload'][_0x37ad16(0x1bd)];_0x56e015[_0x37ad16(0x1cf)](_0x458f6c);break;}}}),B(this[_0x539ecf(0x1ed)],_0x56e015);}));}[_0x12b56c(0x1c2)](){const _0xb948cb=_0x12b56c;this[_0xb948cb(0x1f3)](this['_commentService'][_0xb948cb(0x1f1)][_0xb948cb(0x1c8)](async _0x5338d9=>{const _0x2b6797=_0xb948cb;var _0x3102cd,_0x591ee7,_0x2ed96c,_0x189afb;const _0x37ba69=(_0x3102cd=this[_0x2b6797(0x1e3)][_0x2b6797(0x198)](_0x5338d9[_0x2b6797(0x1a5)])[_0x2b6797(0x1cb)](_0x44decd=>_0x44decd[_0x2b6797(0x19a)]===_0x5338d9[_0x2b6797(0x19a)]))==null?void 0x0:_0x3102cd[_0x2b6797(0x1a0)];if(!_0x37ba69)return;const {unitId:_0x474aba,subUnitId:_0x58e080}=_0x37ba69;switch(_0x5338d9[_0x2b6797(0x1f9)]&&this['_userService'][_0x2b6797(0x1e8)](_0x5338d9[_0x2b6797(0x1f9)]),_0x5338d9[_0x2b6797(0x19e)]){case v[_0x2b6797(0x1c5)]:break;case v[_0x2b6797(0x1e6)]:{this[_0x2b6797(0x1e3)][_0x2b6797(0x1f7)](_0x474aba,_0x58e080,{'unitId':_0x474aba,'subUnitId':_0x58e080,'ref':'','id':_0x5338d9[_0x2b6797(0x1da)],'dT':D(+_0x5338d9[_0x2b6797(0x1ec)]),'threadId':_0x5338d9[_0x2b6797(0x19a)],'personId':(_0x2ed96c=(_0x591ee7=_0x5338d9[_0x2b6797(0x1f9)])==null?void 0x0:_0x591ee7[_0x2b6797(0x1b5)])!=null?_0x2ed96c:_0x5338d9[_0x2b6797(0x1ce)],'text':JSON['parse'](_0x5338d9['content']),'parentId':_0x37ba69['id']});break;}case v['Delete']:{const _0x3cb262=this[_0x2b6797(0x1e3)][_0x2b6797(0x1df)](_0x474aba,_0x58e080,_0x5338d9[_0x2b6797(0x1da)]);_0x3cb262&&_0x3cb262[_0x2b6797(0x1e5)]&&this['_threadCommentModel'][_0x2b6797(0x1a1)](_0x474aba,_0x58e080,_0x5338d9[_0x2b6797(0x1da)]);break;}case v[_0x2b6797(0x1c7)]:{this['_threadCommentModel'][_0x2b6797(0x1b1)](_0x474aba,_0x58e080,{'commentId':_0x5338d9['replyId'],'text':JSON[_0x2b6797(0x1ab)](_0x5338d9[_0x2b6797(0x1de)])});break;}case v[_0x2b6797(0x1d8)]:{const _0x16464f=(_0x189afb=this[_0x2b6797(0x1e3)][_0x2b6797(0x198)](_0x5338d9[_0x2b6797(0x1a5)])[_0x2b6797(0x1cb)](_0x361be3=>_0x361be3['threadId']===_0x5338d9[_0x2b6797(0x19a)]))==null?void 0x0:_0x189afb[_0x2b6797(0x1a0)];_0x16464f&&this[_0x2b6797(0x1e3)][_0x2b6797(0x1e7)](_0x474aba,_0x58e080,_0x16464f['id'],_0x5338d9['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x39b796(_0x4961eb)),p(0x1,_0x39b796(_0xd98492)),p(0x2,_0x39b796(_0x49fe3b)),p(0x3,_0x39b796(_0x424bef))],S);const z=_0x12b56c(0x1ef),M={};var k=Object[_0x12b56c(0x1e1)],Q=(_0x5d2e38,_0x2770b6,_0x4ed512,_0x4829a2)=>{const _0x5765dc=_0x12b56c;for(var _0x3f8544=_0x4829a2>0x1?void 0x0:_0x4829a2?k(_0x2770b6,_0x4ed512):_0x2770b6,_0x58b16a=_0x5d2e38[_0x5765dc(0x1f5)]-0x1,_0x449da5;_0x58b16a>=0x0;_0x58b16a--)(_0x449da5=_0x5d2e38[_0x58b16a])&&(_0x3f8544=_0x449da5(_0x3f8544)||_0x3f8544);return _0x3f8544;},_=(_0x499741,_0x242072)=>(_0x1250f3,_0x4e5125)=>_0x242072(_0x1250f3,_0x4e5125,_0x499741);function X(_0xcb7f20,_0x2c6057){const _0x397d31=_0x12b56c,_0x5b0c32=_0xcb7f20['replies'][0x0];return{..._0x2c6057,'id':_0x5b0c32['replyId'],'resolved':_0xcb7f20[_0x397d31(0x1bc)]===0x1,'dT':D(_0x5b0c32[_0x397d31(0x1ec)]),'personId':_0x5b0c32[_0x397d31(0x1ce)],'threadId':_0x5b0c32[_0x397d31(0x19a)]};}function ee(_0x494b40,_0x57abb2,_0x404687){const _0x42a50e=_0x12b56c;var _0x206ca9,_0x238f14;if(((_0x238f14=(_0x206ca9=_0x494b40==null?void 0x0:_0x494b40[_0x42a50e(0x199)])==null?void 0x0:_0x206ca9['length'])!=null?_0x238f14:0x0)>0x0){const _0x5d06ff=(_0x4b9736,_0x580b0b)=>({'id':_0x4b9736[_0x42a50e(0x1da)],'threadId':_0x4b9736[_0x42a50e(0x19a)],'dT':D(_0x4b9736['createTimestamp']),'personId':_0x4b9736[_0x42a50e(0x1ce)],'resolved':_0x494b40[_0x42a50e(0x1bc)]===I[_0x42a50e(0x1a8)],'unitId':_0x57abb2,'subUnitId':_0x404687,'text':JSON[_0x42a50e(0x1ab)](_0x4b9736[_0x42a50e(0x1de)]),'parentId':_0x580b0b}),_0x214db7=_0x5d06ff(_0x494b40[_0x42a50e(0x199)][0x0]);return{..._0x214db7,'children':_0x494b40[_0x42a50e(0x199)]['slice'](0x1)[_0x42a50e(0x1ae)](_0x5ad52e=>_0x5d06ff(_0x5ad52e,_0x214db7['id']))};}return null;}let f=class{constructor(_0x5274cf,_0x30f7e5,_0x20a447,_0x406063){const _0x2a4dc7=_0x12b56c;this[_0x2a4dc7(0x1f8)]=_0x5274cf,this['_userService']=_0x30f7e5,this[_0x2a4dc7(0x1f4)]=_0x20a447,this[_0x2a4dc7(0x1ed)]=_0x406063;}async['addComment'](_0x1c0eac){const _0x4f63a9=_0x12b56c;var _0x26aeb3,_0x2c362f;const {parentId:_0x2c5e69,unitId:_0x5c1e49,text:_0x36ec8e,threadId:_0x5bd0aa}=_0x1c0eac,_0x110a9c=(_0x2c362f=(_0x26aeb3=_0x36ec8e[_0x4f63a9(0x19b)])==null?void 0x0:_0x26aeb3[_0x4f63a9(0x1b2)](_0x2fd52c=>_0x2fd52c[_0x4f63a9(0x1e2)]===_0x3f7c3c['COMMENT'])['map'](_0xad4890=>_0xad4890[_0x4f63a9(0x1db)]))!=null?_0x2c362f:[],_0x52b941=JSON[_0x4f63a9(0x1c4)](_0x36ec8e),_0x1a8f8b=(await this[_0x4f63a9(0x1f4)]['requireSession'](_0x5c1e49))[_0x4f63a9(0x1eb)]();if(_0x2c5e69){const _0x419575={'memberId':_0x1a8f8b,'unitId':_0x5c1e49,'content':_0x52b941,'mention':_0x110a9c,'threadId':_0x5bd0aa},_0x5a1d8f=(await this[_0x4f63a9(0x1f8)][_0x4f63a9(0x1bb)](_0x4f63a9(0x1d4)+_0x5c1e49+'/reply',{'body':_0x419575}))[_0x4f63a9(0x1b8)][_0x4f63a9(0x1b4)];return{..._0x1c0eac,'id':_0x5a1d8f[_0x4f63a9(0x1da)],'dT':_0x471f42(+_0x5a1d8f[_0x4f63a9(0x1ec)])[_0x4f63a9(0x1b9)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5a1d8f[_0x4f63a9(0x1ce)]};}else{const _0xc58149={'memberId':_0x1a8f8b,'unitId':_0x5c1e49,'content':_0x52b941,'mention':_0x110a9c},_0x357b2c=await this['_httpService'][_0x4f63a9(0x1bb)](_0x4f63a9(0x1d4)+_0x5c1e49+_0x4f63a9(0x1d6),{'body':_0xc58149});return X(_0x357b2c[_0x4f63a9(0x1b8)][_0x4f63a9(0x1a3)],_0x1c0eac);}}async['updateComment'](_0x1dc244){const _0x13dac0=_0x12b56c;var _0xf84e6a,_0x46404c;const {text:_0x2c6bea,unitId:_0x273e79}=_0x1dc244,_0x52252f=(_0x46404c=(_0xf84e6a=_0x2c6bea[_0x13dac0(0x19b)])==null?void 0x0:_0xf84e6a[_0x13dac0(0x1b2)](_0x485391=>_0x485391[_0x13dac0(0x1e2)]===_0x3f7c3c['COMMENT'])[_0x13dac0(0x1ae)](_0x36e49f=>_0x36e49f[_0x13dac0(0x1db)]))!=null?_0x46404c:[],_0x4ef4be=JSON[_0x13dac0(0x1c4)](_0x2c6bea),_0x57cd05=_0x1dc244[_0x13dac0(0x19a)],_0x3a1684=_0x1dc244['id'],_0x36cb59={'memberId':(await this[_0x13dac0(0x1f4)][_0x13dac0(0x1d3)](_0x273e79))[_0x13dac0(0x1eb)](),'unitId':_0x273e79,'threadId':_0x57cd05,'mention':_0x52252f,'content':_0x4ef4be,'replyId':_0x3a1684},_0x562e3c=await this[_0x13dac0(0x1f8)][_0x13dac0(0x1bb)](_0x13dac0(0x1d4)+_0x273e79+'/edit',{'body':_0x36cb59});return!_0x562e3c[_0x13dac0(0x1b8)][_0x13dac0(0x1bf)]||_0x562e3c[_0x13dac0(0x1b8)]['error'][_0x13dac0(0x1c3)]===0x1;}async[_0x12b56c(0x1e7)](_0x400644){const _0x3d0046=_0x12b56c,{unitId:_0x2e15c8}=_0x400644,_0x4be0ef=_0x400644['threadId'],_0x51070c={'memberId':this[_0x3d0046(0x1ee)][_0x3d0046(0x1d2)]()['userID'],'unitId':_0x2e15c8,'threadId':_0x4be0ef,'solved':_0x400644['resolved']?I[_0x3d0046(0x1a8)]:I[_0x3d0046(0x1e9)]},_0x1cabff=await this['_httpService'][_0x3d0046(0x1bb)]('/universer-api/comment/unit/'+_0x2e15c8+'/solved',{'body':_0x51070c});return!_0x1cabff[_0x3d0046(0x1b8)][_0x3d0046(0x1bf)]||_0x1cabff[_0x3d0046(0x1b8)][_0x3d0046(0x1bf)][_0x3d0046(0x1c3)]===0x1;}async['deleteComment'](_0x33f749,_0x4a8dd0,_0x3dc8d8,_0x7080){const _0x1edd4e=_0x12b56c,_0x35b9af={'memberId':(await this[_0x1edd4e(0x1f4)][_0x1edd4e(0x1d3)](_0x33f749))['getMemberID'](),'threadId':_0x3dc8d8,'replyId':_0x7080,'unitId':_0x33f749},_0x13a547=await this[_0x1edd4e(0x1f8)][_0x1edd4e(0x1bb)](_0x1edd4e(0x1d4)+_0x33f749+_0x1edd4e(0x1be),{'body':_0x35b9af});return!_0x13a547[_0x1edd4e(0x1b8)]['error']||_0x13a547[_0x1edd4e(0x1b8)]['error'][_0x1edd4e(0x1c3)]===0x1;}async[_0x12b56c(0x1cd)](_0x30a587,_0x2a0dd9,_0x29e4b1){const _0x345ca0=_0x12b56c,_0x14e0fb={'unitId':_0x30a587,'threadId':_0x29e4b1},_0x2edb5c=await this['_httpService'][_0x345ca0(0x1bb)](_0x345ca0(0x1d4)+_0x30a587+'/list',{'body':_0x14e0fb}),_0x9970c=_0x29e4b1[_0x345ca0(0x1ae)](_0x55961a=>ee(_0x2edb5c[_0x345ca0(0x1b8)]['comments'][_0x55961a],_0x30a587,_0x2a0dd9))['filter'](Boolean);return Object['values'](_0x2edb5c[_0x345ca0(0x1b8)][_0x345ca0(0x1aa)])['forEach'](_0x1d9cbf=>{const _0x32aa6c=_0x345ca0;this[_0x32aa6c(0x1ee)][_0x32aa6c(0x1e8)](_0x1d9cbf);}),_0x9970c;}[_0x12b56c(0x1cc)](_0x31306f){const _0x3f49c8=_0x12b56c;return{'id':_0x31306f['id'],'threadId':_0x31306f[_0x3f49c8(0x19a)],'ref':_0x31306f[_0x3f49c8(0x1ad)]};}};f=Q([_(0x0,_0x39b796(_0x397a0a)),_(0x1,_0x39b796(_0x49fe3b)),_(0x2,_0x39b796(_0x29ed8b)),_(0x3,_0x39b796(_0x424bef))],f);var re=Object[_0x12b56c(0x1e1)],te=(_0x195d00,_0x3804a4,_0x32fccf,_0x11799b)=>{const _0x1f94d9=_0x12b56c;for(var _0x247dde=_0x11799b>0x1?void 0x0:_0x11799b?re(_0x3804a4,_0x32fccf):_0x3804a4,_0xdaeddd=_0x195d00[_0x1f94d9(0x1f5)]-0x1,_0x5f3674;_0xdaeddd>=0x0;_0xdaeddd--)(_0x5f3674=_0x195d00[_0xdaeddd])&&(_0x247dde=_0x5f3674(_0x247dde)||_0x247dde);return _0x247dde;},N=(_0x14a4e0,_0x366d79)=>(_0x56242a,_0x57b7b4)=>_0x366d79(_0x56242a,_0x57b7b4,_0x14a4e0);function _0xce34(){const _0x4ad063=['parentId','Reply','resolveComment','addUser','OpenOrReOpen','YYYY/MM/DD\x20HH:mm','getMemberID','createTimestamp','_injector','_userService','thread-comment-data-source.config','450885yUTaLy','commentUpdate$','175BvaMsD','disposeWithMe','_sessionService','length','size','addComment','_httpService','user','getUnit','replies','threadId','customRanges','Unknown','UNIVER_UNKNOWN','type','pipe','root','deleteComment','dataSource','comment','731232bYBsLZ','unitId','defineProperty','_config','Solved','symbol','users','parse','_threadCommentDataSource','ref','map','getUser','pluginName','updateComment','filter','get','reply','userID','_threadCommentDataSourceService','538904vtzFOm','body','format','1118307pxPZje','post','solved','personId','/delete','error','36zrKTBX','11hAPOoA','_init','code','stringify','Add','UNRECOGNIZED','Edit','subscribe','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initDataSource','find','saveCommentToSnapshot','listComments','userId','add','26454HqJiae','forEach','getCurrentUser','requireSession','/universer-api/comment/unit/','delete','/add','11385430nAKAIF','Solve','setConfig','replyId','rangeId','Delete','2HdmDbf','content','getComment','_configService','getOwnPropertyDescriptor','rangeType','_threadCommentModel','97462rCBWoe'];_0xce34=function(){return _0x4ad063;};return _0xce34();}let g=class extends _0x2461f3{constructor(_0x3c357d,_0x166fdb){const _0x5c8294=_0x12b56c;super(),this[_0x5c8294(0x1b6)]=_0x3c357d,this[_0x5c8294(0x1ac)]=_0x166fdb,this[_0x5c8294(0x1ca)]();}[_0x12b56c(0x1ca)](){const _0x50baa6=_0x12b56c;this[_0x50baa6(0x1b6)][_0x50baa6(0x1a2)]=this[_0x50baa6(0x1ac)],this[_0x50baa6(0x1b6)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x91912c),N(0x1,_0x39b796(f))],g);var se=Object[_0x12b56c(0x1a6)],oe=Object[_0x12b56c(0x1e1)],ne=(_0x37a0d9,_0xb50cc6,_0x7beabe)=>_0xb50cc6 in _0x37a0d9?se(_0x37a0d9,_0xb50cc6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x7beabe}):_0x37a0d9[_0xb50cc6]=_0x7beabe,ie=(_0x40b3a8,_0xc0a831,_0xace0f5,_0x73095e)=>{const _0x4fb9ce=_0x12b56c;for(var _0x16d76e=_0x73095e>0x1?void 0x0:_0x73095e?oe(_0xc0a831,_0xace0f5):_0xc0a831,_0x52c5a3=_0x40b3a8[_0x4fb9ce(0x1f5)]-0x1,_0x39d5d6;_0x52c5a3>=0x0;_0x52c5a3--)(_0x39d5d6=_0x40b3a8[_0x52c5a3])&&(_0x16d76e=_0x39d5d6(_0x16d76e)||_0x16d76e);return _0x16d76e;},w=(_0x369b6d,_0x4a6cb7)=>(_0x55b64e,_0x11fe55)=>_0x4a6cb7(_0x55b64e,_0x11fe55,_0x369b6d),$=(_0x5d71be,_0x93677f,_0x3dd09e)=>ne(_0x5d71be,typeof _0x93677f!=_0x12b56c(0x1a9)?_0x93677f+'':_0x93677f,_0x3dd09e);let b=class extends _0x3a42a6{constructor(_0x14eaa1=M,_0x57a787,_0x4237b3){const _0x3d2193=_0x12b56c;super(),this[_0x3d2193(0x1a7)]=_0x14eaa1,this[_0x3d2193(0x1ed)]=_0x57a787,this[_0x3d2193(0x1e0)]=_0x4237b3;const {..._0x2f5890}=_0x720492({},M,this[_0x3d2193(0x1a7)]);this['_configService'][_0x3d2193(0x1d9)](z,_0x2f5890);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x51bc9d=>{const _0x7b6389=_0x10d6;this[_0x7b6389(0x1ed)]['add'](_0x51bc9d);});}['onReady'](){const _0x456ea9=_0x12b56c;this[_0x456ea9(0x1ed)][_0x456ea9(0x1b3)](g),this[_0x456ea9(0x1ed)]['get'](S);}};$(b,_0x12b56c(0x1b0),W),$(b,'type',_0x823561[_0x12b56c(0x19d)]),b=ie([_0x21a168(_0x3dd3a8,_0x34c6e6,_0x109dd0),w(0x1,_0x39b796(_0x424bef)),w(0x2,_0x560613)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x4eca(_0x34fa58,_0xf5b468){const _0x11d81d=_0x11d8();return _0x4eca=function(_0x4eca21,_0x4b2832){_0x4eca21=_0x4eca21-0x7d;let _0x59270b=_0x11d81d[_0x4eca21];return _0x59270b;},_0x4eca(_0x34fa58,_0xf5b468);}function _0x11d8(){const _0x42e031=['/edit','/universer-api/user/list','_initUserSync','length','211073nhOHYa','ref','root','_threadCommentDataSourceService','pluginName','solved','_httpService','Delete','userId','stringify','resolveComment','2010584LOgIHc','3222486ndozNI','map','threadId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverCore','commentUpdate$','Inject','UserManagerService','@univerjs/network','Disposable','getUnit','UniverNetwork','comment','_initDataSource','_injector','merge','disposeWithMe','payload','exports','userID','OpenOrReOpen','size','toStringTag','defineProperty','filter','_configService','10eFlLHO','UniverLicensePlugin','get','values','replyId','2689785guTgGi','/reply','_commentService','Solved','Edit','rangeId','UniverProThreadCommentDatasource','/delete','content','_sessionService','@univerjs-pro/license','_threadCommentModel','UNIVER_UNKNOWN','rangeType','unitId','CommentService','forEach','UniverProCollaborationClient','error','format','onReady','@univerjs-pro/collaboration-client','subscribe','Module','Injector','UniverThreadCommentUi','Add','135492JNDXCi','UniverThreadCommentDataSourcePlugin','thread-comment-data-source.config','getOwnPropertyDescriptor','getUser','addComment','body','addUser','getMemberID','rxjs','6qWktUz','@univerjs/thread-comment','parentId','onStarting','dayjs','_init','Plugin','COMMENT','getComment','parse','users','UniverCollaborationClientPlugin','HTTPService','listComments','UNRECOGNIZED','requireSession','UniverProLicense','/universer-api/comment/unit/','_userService','syncUpdateMutationToColla','Reply','bufferTime','YYYY/MM/DD\x20HH:mm','createTimestamp','CustomRangeType','code','saveCommentToSnapshot','find','35nEfPjc','_config','1136241BnqeUl','updateComment','user','post','UniverInstanceType','ThreadCommentModel','symbol','amd','/list','add','IConfigService','1070996SFHObn','Unknown','UniverThreadComment','getCurrentUser','Solve','@univerjs/thread-comment-ui','type','@univerjs/core','deleteComment','replies','setConfig'];_0x11d8=function(){return _0x42e031;};return _0x11d8();}(function(_0x322a3a,_0x2aebe){const _0xe2f5d2=_0x4eca,_0x53b4d5=_0x322a3a();while(!![]){try{const _0x586fc4=parseInt(_0xe2f5d2(0x104))/0x1+-parseInt(_0xe2f5d2(0xf5))/0x2+-parseInt(_0xe2f5d2(0xea))/0x3+parseInt(_0xe2f5d2(0xc2))/0x4*(parseInt(_0xe2f5d2(0xe8))/0x5)+-parseInt(_0xe2f5d2(0xcc))/0x6*(-parseInt(_0xe2f5d2(0xa7))/0x7)+parseInt(_0xe2f5d2(0x87))/0x8+-parseInt(_0xe2f5d2(0x88))/0x9*(-parseInt(_0xe2f5d2(0xa2))/0xa);if(_0x586fc4===_0x2aebe)break;else _0x53b4d5['push'](_0x53b4d5['shift']());}catch(_0x47a6e1){_0x53b4d5['push'](_0x53b4d5['shift']());}}}(_0x11d8,0x80cd3),function(_0x593c7e,_0x522d16){const _0x461ab2=_0x4eca;typeof exports=='object'&&typeof module<'u'?_0x522d16(exports,require(_0x461ab2(0xbc)),require(_0x461ab2(0xb1)),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require(_0x461ab2(0xcd)),require(_0x461ab2(0xcb)),require(_0x461ab2(0x90))):typeof define=='function'&&define[_0x461ab2(0xf1)]?define([_0x461ab2(0x9a),_0x461ab2(0xbc),_0x461ab2(0xb1),_0x461ab2(0xfc),_0x461ab2(0xfa),_0x461ab2(0xcd),'rxjs',_0x461ab2(0x90)],_0x522d16):(_0x593c7e=typeof globalThis<'u'?globalThis:_0x593c7e||self,_0x522d16(_0x593c7e[_0x461ab2(0xad)]={},_0x593c7e[_0x461ab2(0xb8)],_0x593c7e[_0x461ab2(0xdc)],_0x593c7e[_0x461ab2(0x8c)],_0x593c7e[_0x461ab2(0xc0)],_0x593c7e[_0x461ab2(0xf7)],_0x593c7e['rxjs'],_0x593c7e[_0x461ab2(0x93)]));}(this,function(_0x1285c5,_0x42ac7c,_0x331109,_0xe19bdc,_0x3d9925,_0x48b03f,_0x1ca3a4,_0x240138){'use strict';const _0x3ecfc6=_0x4eca;const _0x4320c7=_0x3ecfc6(0x8b);var _0x3c6c6a=(_0x2ed066=>(_0x2ed066[_0x2ed066[_0x3ecfc6(0x9c)]=0x0]=_0x3ecfc6(0x9c),_0x2ed066[_0x2ed066[_0x3ecfc6(0xaa)]=0x1]=_0x3ecfc6(0xaa),_0x2ed066[_0x2ed066[_0x3ecfc6(0xda)]=-0x1]=_0x3ecfc6(0xda),_0x2ed066))(_0x3c6c6a||{}),_0x126599=(_0x3cd0f3=>(_0x3cd0f3[_0x3cd0f3[_0x3ecfc6(0xf6)]=0x0]=_0x3ecfc6(0xf6),_0x3cd0f3[_0x3cd0f3[_0x3ecfc6(0xc1)]=0x1]=_0x3ecfc6(0xc1),_0x3cd0f3[_0x3cd0f3[_0x3ecfc6(0xe0)]=0x2]=_0x3ecfc6(0xe0),_0x3cd0f3[_0x3cd0f3['Edit']=0x3]=_0x3ecfc6(0xab),_0x3cd0f3[_0x3cd0f3[_0x3ecfc6(0x83)]=0x4]='Delete',_0x3cd0f3[_0x3cd0f3[_0x3ecfc6(0xf9)]=0x5]='Solve',_0x3cd0f3[_0x3cd0f3[_0x3ecfc6(0xda)]=-0x1]=_0x3ecfc6(0xda),_0x3cd0f3))(_0x126599||{});const _0x41f94d=_0x7512e2=>_0xe19bdc['dayjs'](new Date(+_0x7512e2))['format'](_0x3ecfc6(0xe2)),_0x5b122b=async(_0x524e44,_0x5733ad)=>{const _0x1fb942=_0x3ecfc6,_0x5ed1a1=_0x524e44[_0x1fb942(0xa4)](_0xe19bdc[_0x1fb942(0x8f)]),_0x58f846=_0x524e44['get'](_0x240138['HTTPService']);_0x5733ad[_0x1fb942(0xb7)](_0x126365=>{const _0x4c9976=_0x1fb942;_0x5ed1a1[_0x4c9976(0xc6)](_0x126365)&&_0x5733ad['delete'](_0x126365);}),_0x5733ad[_0x1fb942(0x9d)]&&(await _0x58f846[_0x1fb942(0xa4)](_0x1fb942(0x101),{'params':{'userIDs':[..._0x5733ad]}}))['body'][_0x1fb942(0xd6)][_0x1fb942(0xb7)](_0xea531d=>{const _0x3bd979=_0x1fb942;_0xea531d&&_0x5ed1a1[_0x3bd979(0xc9)](_0xea531d);});};var _0x2900b6=Object[_0x3ecfc6(0xc5)],_0x2b0e65=(_0x377e4c,_0x2f400b,_0x1f36f7,_0x1f2127)=>{for(var _0x2a0466=_0x1f2127>0x1?void 0x0:_0x1f2127?_0x2900b6(_0x2f400b,_0x1f36f7):_0x2f400b,_0x204e3f=_0x377e4c['length']-0x1,_0x58ca82;_0x204e3f>=0x0;_0x204e3f--)(_0x58ca82=_0x377e4c[_0x204e3f])&&(_0x2a0466=_0x58ca82(_0x2a0466)||_0x2a0466);return _0x2a0466;},_0x462b4c=(_0x35fc37,_0x70c0ed)=>(_0x69be17,_0x274cab)=>_0x70c0ed(_0x69be17,_0x274cab,_0x35fc37);let _0x44cf48=class extends _0xe19bdc['Disposable']{constructor(_0x4ff232,_0x77b183,_0x55771b,_0x442f60){const _0x579fb6=_0x3ecfc6;super(),this[_0x579fb6(0xa9)]=_0x4ff232,this['_threadCommentModel']=_0x77b183,this[_0x579fb6(0xde)]=_0x55771b,this[_0x579fb6(0x96)]=_0x442f60,this[_0x579fb6(0xd1)](),this[_0x579fb6(0x102)]();}[_0x3ecfc6(0x102)](){const _0x562d30=_0x3ecfc6;this[_0x562d30(0x98)](this[_0x562d30(0xb2)][_0x562d30(0x8d)]['pipe'](_0x1ca3a4[_0x562d30(0xe1)](0x10))[_0x562d30(0xbd)](_0x4c1c2e=>{const _0x3990f5=_0x562d30,_0x19d5ae=new Set();_0x4c1c2e[_0x3990f5(0xb7)](_0x5e85eb=>{const _0x5dc5cd=_0x3990f5;switch(_0x5e85eb[_0x5dc5cd(0xfb)]){case _0x5dc5cd(0xf3):{const _0x34be63=_0x5e85eb[_0x5dc5cd(0x99)]['personId'];_0x19d5ae['add'](_0x34be63);break;}}}),_0x5b122b(this[_0x3990f5(0x96)],_0x19d5ae);}));}[_0x3ecfc6(0xd1)](){const _0x347b11=_0x3ecfc6;this[_0x347b11(0x98)](this[_0x347b11(0xa9)]['commentUpdate$'][_0x347b11(0xbd)](async _0x3b7b13=>{const _0x44593b=_0x347b11;var _0x92457e,_0x1bf9cd,_0x43f4cc,_0x16d269;const _0xbeed1b=(_0x92457e=this['_threadCommentModel']['getUnit'](_0x3b7b13['unitId'])[_0x44593b(0xe7)](_0x1d76fe=>_0x1d76fe[_0x44593b(0x8a)]===_0x3b7b13['threadId']))==null?void 0x0:_0x92457e[_0x44593b(0x7e)];if(!_0xbeed1b)return;const {unitId:_0x48733a,subUnitId:_0x4def0d}=_0xbeed1b;switch(_0x3b7b13[_0x44593b(0xec)]&&this[_0x44593b(0xde)][_0x44593b(0xc9)](_0x3b7b13[_0x44593b(0xec)]),_0x3b7b13[_0x44593b(0xfb)]){case _0x126599['Add']:break;case _0x126599[_0x44593b(0xe0)]:{this[_0x44593b(0xb2)][_0x44593b(0xc7)](_0x48733a,_0x4def0d,{'unitId':_0x48733a,'subUnitId':_0x4def0d,'ref':'','id':_0x3b7b13[_0x44593b(0xa6)],'dT':_0x41f94d(+_0x3b7b13[_0x44593b(0xe3)]),'threadId':_0x3b7b13[_0x44593b(0x8a)],'personId':(_0x43f4cc=(_0x1bf9cd=_0x3b7b13['user'])==null?void 0x0:_0x1bf9cd[_0x44593b(0x9b)])!=null?_0x43f4cc:_0x3b7b13[_0x44593b(0x84)],'text':JSON[_0x44593b(0xd5)](_0x3b7b13['content']),'parentId':_0xbeed1b['id']});break;}case _0x126599[_0x44593b(0x83)]:{const _0x365702=this[_0x44593b(0xb2)][_0x44593b(0xd4)](_0x48733a,_0x4def0d,_0x3b7b13[_0x44593b(0xa6)]);_0x365702&&_0x365702[_0x44593b(0xce)]&&this['_threadCommentModel']['deleteComment'](_0x48733a,_0x4def0d,_0x3b7b13[_0x44593b(0xa6)]);break;}case _0x126599[_0x44593b(0xab)]:{this[_0x44593b(0xb2)][_0x44593b(0xeb)](_0x48733a,_0x4def0d,{'commentId':_0x3b7b13[_0x44593b(0xa6)],'text':JSON[_0x44593b(0xd5)](_0x3b7b13[_0x44593b(0xaf)])});break;}case _0x126599['Solve']:{const _0x58317b=(_0x16d269=this['_threadCommentModel'][_0x44593b(0x92)](_0x3b7b13[_0x44593b(0xb5)])[_0x44593b(0xe7)](_0x4337a3=>_0x4337a3['threadId']===_0x3b7b13[_0x44593b(0x8a)]))==null?void 0x0:_0x16d269[_0x44593b(0x7e)];_0x58317b&&this[_0x44593b(0xb2)][_0x44593b(0x86)](_0x48733a,_0x4def0d,_0x58317b['id'],_0x3b7b13[_0x44593b(0x81)]===_0x3c6c6a[_0x44593b(0xaa)]);break;}}}));}};_0x44cf48=_0x2b0e65([_0x462b4c(0x0,_0xe19bdc[_0x3ecfc6(0x8e)](_0x42ac7c[_0x3ecfc6(0xb6)])),_0x462b4c(0x1,_0xe19bdc[_0x3ecfc6(0x8e)](_0x48b03f[_0x3ecfc6(0xef)])),_0x462b4c(0x2,_0xe19bdc[_0x3ecfc6(0x8e)](_0xe19bdc['UserManagerService'])),_0x462b4c(0x3,_0xe19bdc[_0x3ecfc6(0x8e)](_0xe19bdc['Injector']))],_0x44cf48);const _0x39cf89=_0x3ecfc6(0xc4),_0xa038f5={};var _0x2080b7=Object['getOwnPropertyDescriptor'],_0x590b87=(_0x5f4aa0,_0x283aa4,_0x23b549,_0x380cb1)=>{const _0x8c04a4=_0x3ecfc6;for(var _0x3d7915=_0x380cb1>0x1?void 0x0:_0x380cb1?_0x2080b7(_0x283aa4,_0x23b549):_0x283aa4,_0x2b64bd=_0x5f4aa0[_0x8c04a4(0x103)]-0x1,_0x516463;_0x2b64bd>=0x0;_0x2b64bd--)(_0x516463=_0x5f4aa0[_0x2b64bd])&&(_0x3d7915=_0x516463(_0x3d7915)||_0x3d7915);return _0x3d7915;},_0x38591f=(_0x2e4948,_0x55d888)=>(_0x38f5b0,_0x307ca2)=>_0x55d888(_0x38f5b0,_0x307ca2,_0x2e4948);function _0x51d544(_0x83065d,_0x2301e2){const _0x25467b=_0x3ecfc6,_0x2120b6=_0x83065d[_0x25467b(0xfe)][0x0];return{..._0x2301e2,'id':_0x2120b6[_0x25467b(0xa6)],'resolved':_0x83065d['solved']===0x1,'dT':_0x41f94d(_0x2120b6[_0x25467b(0xe3)]),'personId':_0x2120b6[_0x25467b(0x84)],'threadId':_0x2120b6[_0x25467b(0x8a)]};}function _0x3aebd2(_0x360c45,_0x454b6f,_0x7c9e9a){const _0x851f89=_0x3ecfc6;var _0x2ad367,_0x258762;if(((_0x258762=(_0x2ad367=_0x360c45==null?void 0x0:_0x360c45[_0x851f89(0xfe)])==null?void 0x0:_0x2ad367[_0x851f89(0x103)])!=null?_0x258762:0x0)>0x0){const _0x38826e=(_0x1ec1b2,_0x2d6a74)=>({'id':_0x1ec1b2[_0x851f89(0xa6)],'threadId':_0x1ec1b2[_0x851f89(0x8a)],'dT':_0x41f94d(_0x1ec1b2['createTimestamp']),'personId':_0x1ec1b2[_0x851f89(0x84)],'resolved':_0x360c45[_0x851f89(0x81)]===_0x3c6c6a[_0x851f89(0xaa)],'unitId':_0x454b6f,'subUnitId':_0x7c9e9a,'text':JSON[_0x851f89(0xd5)](_0x1ec1b2['content']),'parentId':_0x2d6a74}),_0x4778b1=_0x38826e(_0x360c45[_0x851f89(0xfe)][0x0]);return{..._0x4778b1,'children':_0x360c45['replies']['slice'](0x1)[_0x851f89(0x89)](_0x58b574=>_0x38826e(_0x58b574,_0x4778b1['id']))};}return null;}let _0x3e92a6=class{constructor(_0x54aa4e,_0x55f44d,_0x379886,_0xa101a6){const _0x3de947=_0x3ecfc6;this[_0x3de947(0x82)]=_0x54aa4e,this['_userService']=_0x55f44d,this[_0x3de947(0xb0)]=_0x379886,this[_0x3de947(0x96)]=_0xa101a6;}async[_0x3ecfc6(0xc7)](_0x52429a){const _0xd267e2=_0x3ecfc6;var _0x27b5d0,_0x16e07f;const {parentId:_0x259e7d,unitId:_0x5b087f,text:_0x5d24e6,threadId:_0xb20cf5}=_0x52429a,_0x228e3e=(_0x16e07f=(_0x27b5d0=_0x5d24e6['customRanges'])==null?void 0x0:_0x27b5d0[_0xd267e2(0xa0)](_0x3881ee=>_0x3881ee[_0xd267e2(0xb4)]===_0xe19bdc[_0xd267e2(0xe4)][_0xd267e2(0xd3)])[_0xd267e2(0x89)](_0x5a9a96=>_0x5a9a96[_0xd267e2(0xac)]))!=null?_0x16e07f:[],_0x1ce385=JSON[_0xd267e2(0x85)](_0x5d24e6),_0x24a185=(await this['_sessionService'][_0xd267e2(0xdb)](_0x5b087f))['getMemberID']();if(_0x259e7d){const _0x39ba1c={'memberId':_0x24a185,'unitId':_0x5b087f,'content':_0x1ce385,'mention':_0x228e3e,'threadId':_0xb20cf5},_0x2f32ae=(await this['_httpService'][_0xd267e2(0xed)](_0xd267e2(0xdd)+_0x5b087f+_0xd267e2(0xa8),{'body':_0x39ba1c}))[_0xd267e2(0xc8)]['reply'];return{..._0x52429a,'id':_0x2f32ae['replyId'],'dT':_0xe19bdc[_0xd267e2(0xd0)](+_0x2f32ae['createTimestamp'])[_0xd267e2(0xba)](_0xd267e2(0xe2)),'personId':_0x2f32ae['userId']};}else{const _0x532c3f={'memberId':_0x24a185,'unitId':_0x5b087f,'content':_0x1ce385,'mention':_0x228e3e},_0x4dda61=await this[_0xd267e2(0x82)][_0xd267e2(0xed)](_0xd267e2(0xdd)+_0x5b087f+'/add',{'body':_0x532c3f});return _0x51d544(_0x4dda61[_0xd267e2(0xc8)][_0xd267e2(0x94)],_0x52429a);}}async[_0x3ecfc6(0xeb)](_0x4f99c4){const _0x4234e9=_0x3ecfc6;var _0x2c7cc3,_0x4bb915;const {text:_0x40fe80,unitId:_0x3d8bd3}=_0x4f99c4,_0x316937=(_0x4bb915=(_0x2c7cc3=_0x40fe80['customRanges'])==null?void 0x0:_0x2c7cc3['filter'](_0x395933=>_0x395933[_0x4234e9(0xb4)]===_0xe19bdc['CustomRangeType'][_0x4234e9(0xd3)])['map'](_0x337fb8=>_0x337fb8[_0x4234e9(0xac)]))!=null?_0x4bb915:[],_0x3ef974=JSON[_0x4234e9(0x85)](_0x40fe80),_0x11b4d2=_0x4f99c4[_0x4234e9(0x8a)],_0x53f1bb=_0x4f99c4['id'],_0x5ee485={'memberId':(await this[_0x4234e9(0xb0)][_0x4234e9(0xdb)](_0x3d8bd3))[_0x4234e9(0xca)](),'unitId':_0x3d8bd3,'threadId':_0x11b4d2,'mention':_0x316937,'content':_0x3ef974,'replyId':_0x53f1bb},_0x1b4622=await this[_0x4234e9(0x82)][_0x4234e9(0xed)](_0x4234e9(0xdd)+_0x3d8bd3+_0x4234e9(0x100),{'body':_0x5ee485});return!_0x1b4622[_0x4234e9(0xc8)][_0x4234e9(0xb9)]||_0x1b4622['body'][_0x4234e9(0xb9)][_0x4234e9(0xe5)]===0x1;}async['resolveComment'](_0x24693a){const _0xb1945e=_0x3ecfc6,{unitId:_0x404101}=_0x24693a,_0x2e27ab=_0x24693a[_0xb1945e(0x8a)],_0x33ec05={'memberId':this[_0xb1945e(0xde)][_0xb1945e(0xf8)]()[_0xb1945e(0x9b)],'unitId':_0x404101,'threadId':_0x2e27ab,'solved':_0x24693a['resolved']?_0x3c6c6a[_0xb1945e(0xaa)]:_0x3c6c6a[_0xb1945e(0x9c)]},_0x8f5e84=await this[_0xb1945e(0x82)][_0xb1945e(0xed)](_0xb1945e(0xdd)+_0x404101+'/solved',{'body':_0x33ec05});return!_0x8f5e84[_0xb1945e(0xc8)][_0xb1945e(0xb9)]||_0x8f5e84[_0xb1945e(0xc8)]['error'][_0xb1945e(0xe5)]===0x1;}async[_0x3ecfc6(0xfd)](_0x1badd3,_0x49d44c,_0x4eca3d,_0x2a43e3){const _0x5e1dd8=_0x3ecfc6,_0x2fbf68={'memberId':(await this[_0x5e1dd8(0xb0)][_0x5e1dd8(0xdb)](_0x1badd3))['getMemberID'](),'threadId':_0x4eca3d,'replyId':_0x2a43e3,'unitId':_0x1badd3},_0x4c3cfe=await this[_0x5e1dd8(0x82)][_0x5e1dd8(0xed)](_0x5e1dd8(0xdd)+_0x1badd3+_0x5e1dd8(0xae),{'body':_0x2fbf68});return!_0x4c3cfe[_0x5e1dd8(0xc8)][_0x5e1dd8(0xb9)]||_0x4c3cfe[_0x5e1dd8(0xc8)][_0x5e1dd8(0xb9)][_0x5e1dd8(0xe5)]===0x1;}async[_0x3ecfc6(0xd9)](_0x3f424e,_0x197c6b,_0x3f5448){const _0x4d612b=_0x3ecfc6,_0x5612f8={'unitId':_0x3f424e,'threadId':_0x3f5448},_0x32c609=await this[_0x4d612b(0x82)][_0x4d612b(0xed)]('/universer-api/comment/unit/'+_0x3f424e+_0x4d612b(0xf2),{'body':_0x5612f8}),_0x20374=_0x3f5448[_0x4d612b(0x89)](_0x34d9ce=>_0x3aebd2(_0x32c609[_0x4d612b(0xc8)]['comments'][_0x34d9ce],_0x3f424e,_0x197c6b))[_0x4d612b(0xa0)](Boolean);return Object[_0x4d612b(0xa5)](_0x32c609[_0x4d612b(0xc8)][_0x4d612b(0xd6)])[_0x4d612b(0xb7)](_0x1f0b45=>{const _0x245e51=_0x4d612b;this[_0x245e51(0xde)][_0x245e51(0xc9)](_0x1f0b45);}),_0x20374;}[_0x3ecfc6(0xe6)](_0x7186b5){const _0x1c76c3=_0x3ecfc6;return{'id':_0x7186b5['id'],'threadId':_0x7186b5[_0x1c76c3(0x8a)],'ref':_0x7186b5[_0x1c76c3(0x7d)]};}};_0x3e92a6=_0x590b87([_0x38591f(0x0,_0xe19bdc['Inject'](_0x240138[_0x3ecfc6(0xd8)])),_0x38591f(0x1,_0xe19bdc[_0x3ecfc6(0x8e)](_0xe19bdc[_0x3ecfc6(0x8f)])),_0x38591f(0x2,_0xe19bdc['Inject'](_0x42ac7c['CollaborationSessionService'])),_0x38591f(0x3,_0xe19bdc[_0x3ecfc6(0x8e)](_0xe19bdc[_0x3ecfc6(0xbf)]))],_0x3e92a6);var _0x19a746=Object[_0x3ecfc6(0xc5)],_0x48d7d8=(_0x975b71,_0x57a3a7,_0x12500d,_0x500f91)=>{const _0x48a84e=_0x3ecfc6;for(var _0x231d6b=_0x500f91>0x1?void 0x0:_0x500f91?_0x19a746(_0x57a3a7,_0x12500d):_0x57a3a7,_0x3970f8=_0x975b71[_0x48a84e(0x103)]-0x1,_0x3f33ff;_0x3970f8>=0x0;_0x3970f8--)(_0x3f33ff=_0x975b71[_0x3970f8])&&(_0x231d6b=_0x3f33ff(_0x231d6b)||_0x231d6b);return _0x231d6b;},_0x2095e7=(_0x57a947,_0x34b9b6)=>(_0x29a9b5,_0x5b502b)=>_0x34b9b6(_0x29a9b5,_0x5b502b,_0x57a947);let _0x435457=class extends _0xe19bdc[_0x3ecfc6(0x91)]{constructor(_0x33c791,_0x5d37d9){const _0x22fd8b=_0x3ecfc6;super(),this[_0x22fd8b(0x7f)]=_0x33c791,this['_threadCommentDataSource']=_0x5d37d9,this[_0x22fd8b(0x95)]();}[_0x3ecfc6(0x95)](){const _0x3072ea=_0x3ecfc6;this[_0x3072ea(0x7f)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x3072ea(0xdf)]=!0x1;}};_0x435457=_0x48d7d8([_0x2095e7(0x0,_0x48b03f['IThreadCommentDataSourceService']),_0x2095e7(0x1,_0xe19bdc[_0x3ecfc6(0x8e)](_0x3e92a6))],_0x435457);var _0x1ebdb8=Object['defineProperty'],_0xa6bd07=Object['getOwnPropertyDescriptor'],_0x57c022=(_0x394866,_0x46f1e0,_0x8783bd)=>_0x46f1e0 in _0x394866?_0x1ebdb8(_0x394866,_0x46f1e0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x8783bd}):_0x394866[_0x46f1e0]=_0x8783bd,_0xf3f16d=(_0x2ecb46,_0x2f6e21,_0x595f90,_0x2b07f0)=>{for(var _0x4695af=_0x2b07f0>0x1?void 0x0:_0x2b07f0?_0xa6bd07(_0x2f6e21,_0x595f90):_0x2f6e21,_0xf4733c=_0x2ecb46['length']-0x1,_0x4c74e5;_0xf4733c>=0x0;_0xf4733c--)(_0x4c74e5=_0x2ecb46[_0xf4733c])&&(_0x4695af=_0x4c74e5(_0x4695af)||_0x4695af);return _0x4695af;},_0x20deea=(_0x232c8d,_0x3b32ce)=>(_0x241533,_0x2ca6fe)=>_0x3b32ce(_0x241533,_0x2ca6fe,_0x232c8d),_0x4307bc=(_0x3e8e35,_0x486fe0,_0x2011f8)=>_0x57c022(_0x3e8e35,typeof _0x486fe0!=_0x3ecfc6(0xf0)?_0x486fe0+'':_0x486fe0,_0x2011f8);_0x1285c5[_0x3ecfc6(0xc3)]=class extends _0xe19bdc[_0x3ecfc6(0xd2)]{constructor(_0x228de5=_0xa038f5,_0x3082b4,_0x84d2d7){const _0x3a3753=_0x3ecfc6;super(),this[_0x3a3753(0xe9)]=_0x228de5,this[_0x3a3753(0x96)]=_0x3082b4,this['_configService']=_0x84d2d7;const {..._0x4ba125}=_0xe19bdc[_0x3a3753(0x97)]({},_0xa038f5,this['_config']);this[_0x3a3753(0xa1)][_0x3a3753(0xff)](_0x39cf89,_0x4ba125);}[_0x3ecfc6(0xcf)](){const _0x23e4eb=_0x3ecfc6;[[_0x3e92a6],[_0x435457],[_0x44cf48]][_0x23e4eb(0xb7)](_0x2c1906=>{const _0x1db15c=_0x23e4eb;this[_0x1db15c(0x96)][_0x1db15c(0xf3)](_0x2c1906);});}[_0x3ecfc6(0xbb)](){const _0x44b80c=_0x3ecfc6;this['_injector'][_0x44b80c(0xa4)](_0x435457),this[_0x44b80c(0x96)][_0x44b80c(0xa4)](_0x44cf48);}},_0x4307bc(_0x1285c5[_0x3ecfc6(0xc3)],_0x3ecfc6(0x80),_0x4320c7),_0x4307bc(_0x1285c5[_0x3ecfc6(0xc3)],_0x3ecfc6(0xfb),_0xe19bdc[_0x3ecfc6(0xee)][_0x3ecfc6(0xb3)]),_0x1285c5[_0x3ecfc6(0xc3)]=_0xf3f16d([_0xe19bdc['DependentOn'](_0x3d9925['UniverThreadCommentUIPlugin'],_0x42ac7c[_0x3ecfc6(0xd7)],_0x331109[_0x3ecfc6(0xa3)]),_0x20deea(0x1,_0xe19bdc[_0x3ecfc6(0x8e)](_0xe19bdc[_0x3ecfc6(0xbf)])),_0x20deea(0x2,_0xe19bdc[_0x3ecfc6(0xf4)])],_0x1285c5['UniverThreadCommentDataSourcePlugin']),Object[_0x3ecfc6(0x9f)](_0x1285c5,Symbol[_0x3ecfc6(0x9e)],{'value':_0x3ecfc6(0xbe)});}));
1
+ function _0x1a3b(){const _0x5f4946=['22337090QKcsGM','reply','@univerjs/core','parse','_injector','get','@univerjs-pro/collaboration-client','9PJStME','addComment','UniverInstanceType','UniverThreadComment','Inject','pluginName','post','DependentOn','/list','add','find','type','root','@univerjs/thread-comment-ui','amd','UniverThreadCommentUIPlugin','thread-comment-data-source.config','@univerjs/network','rxjs','UniverCore','content','merge','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/solved','replyId','object','_configService','rangeType','map','31ZngTWj','UniverLicensePlugin','Solve','createTimestamp','setConfig','ThreadCommentModel','Injector','customRanges','_threadCommentModel','_init','onStarting','_sessionService','length','Delete','getComment','8pSHgIR','7731126ylLhFH','/universer-api/comment/unit/','/delete','values','parentId','personId','UniverNetwork','UserManagerService','getOwnPropertyDescriptor','/add','_threadCommentDataSourceService','commentUpdate$','_httpService','error','getMemberID','disposeWithMe','_initUserSync','ref','updateComment','1479948okIVtE','rangeId','_initDataSource','stringify','UNRECOGNIZED','delete','6349912NdYvAp','UniverProThreadCommentDatasource','filter','resolved','Edit','YYYY/MM/DD\x20HH:mm','Add','_commentService','Solved','OpenOrReOpen','IConfigService','getUnit','@univerjs-pro/license','UniverThreadCommentDataSourcePlugin','user','listComments','code','UniverThreadCommentUi','CollaborationSessionService','_config','Module','dayjs','8860159wyNqKh','body','CustomRangeType','requireSession','COMMENT','79334iFLXHJ','2155435uxpaYa','Disposable','saveCommentToSnapshot','slice','solved','@univerjs/thread-comment','format','subscribe','threadId','_threadCommentDataSource','forEach','HTTPService','/universer-api/user/list','getUser','comment','pipe','resolveComment','userId','addUser','replies','_userService','deleteComment','Reply','bufferTime','Unknown'];_0x1a3b=function(){return _0x5f4946;};return _0x1a3b();}function _0x3d08(_0xefa884,_0x12b092){const _0x1a3b03=_0x1a3b();return _0x3d08=function(_0x3d08f2,_0x489b3f){_0x3d08f2=_0x3d08f2-0x1da;let _0x185430=_0x1a3b03[_0x3d08f2];return _0x185430;},_0x3d08(_0xefa884,_0x12b092);}(function(_0x352dba,_0x5aba1b){const _0x2c6a1e=_0x3d08,_0x395d72=_0x352dba();while(!![]){try{const _0x9385c1=parseInt(_0x2c6a1e(0x20c))/0x1*(-parseInt(_0x2c6a1e(0x250))/0x2)+-parseInt(_0x2c6a1e(0x22f))/0x3*(-parseInt(_0x2c6a1e(0x21b))/0x4)+parseInt(_0x2c6a1e(0x251))/0x5+-parseInt(_0x2c6a1e(0x21c))/0x6+-parseInt(_0x2c6a1e(0x24b))/0x7+parseInt(_0x2c6a1e(0x235))/0x8+parseInt(_0x2c6a1e(0x1ef))/0x9*(parseInt(_0x2c6a1e(0x1e8))/0xa);if(_0x9385c1===_0x5aba1b)break;else _0x395d72['push'](_0x395d72['shift']());}catch(_0xd39e8a){_0x395d72['push'](_0x395d72['shift']());}}}(_0x1a3b,0xa16f0),function(_0x4f9d2c,_0xa10ccd){const _0x5ad4c7=_0x3d08;typeof exports==_0x5ad4c7(0x208)&&typeof module<'u'?_0xa10ccd(exports,require(_0x5ad4c7(0x1ee)),require(_0x5ad4c7(0x241)),require(_0x5ad4c7(0x1ea)),require(_0x5ad4c7(0x1fc)),require(_0x5ad4c7(0x256)),require('rxjs'),require(_0x5ad4c7(0x200))):typeof define=='function'&&define[_0x5ad4c7(0x1fd)]?define(['exports','@univerjs-pro/collaboration-client','@univerjs-pro/license','@univerjs/core',_0x5ad4c7(0x1fc),'@univerjs/thread-comment',_0x5ad4c7(0x201),_0x5ad4c7(0x200)],_0xa10ccd):(_0x4f9d2c=typeof globalThis<'u'?globalThis:_0x4f9d2c||self,_0xa10ccd(_0x4f9d2c[_0x5ad4c7(0x236)]={},_0x4f9d2c['UniverProCollaborationClient'],_0x4f9d2c['UniverProLicense'],_0x4f9d2c[_0x5ad4c7(0x202)],_0x4f9d2c[_0x5ad4c7(0x246)],_0x4f9d2c[_0x5ad4c7(0x1f2)],_0x4f9d2c[_0x5ad4c7(0x201)],_0x4f9d2c[_0x5ad4c7(0x222)]));}(this,function(_0x5d58c4,_0x3c22ee,_0x5e75e3,_0x34997e,_0x438e4f,_0x2dc169,_0x1cb9ba,_0x26368c){'use strict';const _0x14e1d3=_0x3d08;const _0x404f18=_0x14e1d3(0x205);var _0x3e00c0=(_0x278d7d=>(_0x278d7d[_0x278d7d['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x278d7d[_0x278d7d['Solved']=0x1]='Solved',_0x278d7d[_0x278d7d[_0x14e1d3(0x233)]=-0x1]=_0x14e1d3(0x233),_0x278d7d))(_0x3e00c0||{}),_0x460808=(_0x188360=>(_0x188360[_0x188360[_0x14e1d3(0x1e7)]=0x0]='Unknown',_0x188360[_0x188360[_0x14e1d3(0x23b)]=0x1]='Add',_0x188360[_0x188360['Reply']=0x2]=_0x14e1d3(0x1e5),_0x188360[_0x188360[_0x14e1d3(0x239)]=0x3]=_0x14e1d3(0x239),_0x188360[_0x188360['Delete']=0x4]=_0x14e1d3(0x219),_0x188360[_0x188360[_0x14e1d3(0x20e)]=0x5]='Solve',_0x188360[_0x188360['UNRECOGNIZED']=-0x1]=_0x14e1d3(0x233),_0x188360))(_0x460808||{});const _0x11f57c=_0x8b9dc=>_0x34997e['dayjs'](new Date(+_0x8b9dc))[_0x14e1d3(0x257)](_0x14e1d3(0x23a)),_0x2cb561=async(_0x5850b3,_0xcd6991)=>{const _0xfffec1=_0x14e1d3,_0x42a9ca=_0x5850b3[_0xfffec1(0x1ed)](_0x34997e[_0xfffec1(0x223)]),_0x4913ea=_0x5850b3[_0xfffec1(0x1ed)](_0x26368c[_0xfffec1(0x1da)]);_0xcd6991['forEach'](_0x22a325=>{const _0x15d322=_0xfffec1;_0x42a9ca[_0x15d322(0x1dc)](_0x22a325)&&_0xcd6991[_0x15d322(0x234)](_0x22a325);}),_0xcd6991['size']&&(await _0x4913ea[_0xfffec1(0x1ed)](_0xfffec1(0x1db),{'params':{'userIDs':[..._0xcd6991]}}))[_0xfffec1(0x24c)]['users'][_0xfffec1(0x25b)](_0x27d92b=>{const _0x492d92=_0xfffec1;_0x27d92b&&_0x42a9ca[_0x492d92(0x1e1)](_0x27d92b);});};var _0x4b552b=Object[_0x14e1d3(0x224)],_0x6c0dc8=(_0x3c21ce,_0x2ee4e4,_0x539223,_0x3351cc)=>{const _0x51cfd4=_0x14e1d3;for(var _0x49befa=_0x3351cc>0x1?void 0x0:_0x3351cc?_0x4b552b(_0x2ee4e4,_0x539223):_0x2ee4e4,_0x1ba067=_0x3c21ce[_0x51cfd4(0x218)]-0x1,_0x35ae9f;_0x1ba067>=0x0;_0x1ba067--)(_0x35ae9f=_0x3c21ce[_0x1ba067])&&(_0x49befa=_0x35ae9f(_0x49befa)||_0x49befa);return _0x49befa;},_0x201133=(_0xb23236,_0x221b04)=>(_0xc1eee7,_0x4f0996)=>_0x221b04(_0xc1eee7,_0x4f0996,_0xb23236);let _0x219890=class extends _0x34997e[_0x14e1d3(0x252)]{constructor(_0xeb6fed,_0x48fcfb,_0xc2573b,_0x46d009){const _0x4fa084=_0x14e1d3;super(),this[_0x4fa084(0x23c)]=_0xeb6fed,this['_threadCommentModel']=_0x48fcfb,this['_userService']=_0xc2573b,this[_0x4fa084(0x1ec)]=_0x46d009,this[_0x4fa084(0x215)](),this[_0x4fa084(0x22c)]();}[_0x14e1d3(0x22c)](){const _0x2a003d=_0x14e1d3;this[_0x2a003d(0x22b)](this['_threadCommentModel'][_0x2a003d(0x227)][_0x2a003d(0x1de)](_0x1cb9ba[_0x2a003d(0x1e6)](0x10))['subscribe'](_0x3e0eb6=>{const _0xa625e5=_0x2a003d,_0x5e0dcc=new Set();_0x3e0eb6[_0xa625e5(0x25b)](_0x438e4c=>{const _0x5e705c=_0xa625e5;switch(_0x438e4c[_0x5e705c(0x1fa)]){case _0x5e705c(0x1f8):{const _0x3fd311=_0x438e4c['payload'][_0x5e705c(0x221)];_0x5e0dcc['add'](_0x3fd311);break;}}}),_0x2cb561(this[_0xa625e5(0x1ec)],_0x5e0dcc);}));}[_0x14e1d3(0x215)](){const _0x2ea736=_0x14e1d3;this['disposeWithMe'](this[_0x2ea736(0x23c)][_0x2ea736(0x227)][_0x2ea736(0x258)](async _0x5e306c=>{const _0x21e224=_0x2ea736;var _0x154bfa,_0x4a0179,_0x56442f,_0x293449;const _0x264373=(_0x154bfa=this['_threadCommentModel'][_0x21e224(0x240)](_0x5e306c['unitId'])[_0x21e224(0x1f9)](_0x5a07bf=>_0x5a07bf[_0x21e224(0x259)]===_0x5e306c[_0x21e224(0x259)]))==null?void 0x0:_0x154bfa[_0x21e224(0x1fb)];if(!_0x264373)return;const {unitId:_0x3f930b,subUnitId:_0x3ec814}=_0x264373;switch(_0x5e306c['user']&&this['_userService']['addUser'](_0x5e306c[_0x21e224(0x243)]),_0x5e306c['type']){case _0x460808[_0x21e224(0x23b)]:break;case _0x460808['Reply']:{this[_0x21e224(0x214)][_0x21e224(0x1f0)](_0x3f930b,_0x3ec814,{'unitId':_0x3f930b,'subUnitId':_0x3ec814,'ref':'','id':_0x5e306c[_0x21e224(0x207)],'dT':_0x11f57c(+_0x5e306c[_0x21e224(0x20f)]),'threadId':_0x5e306c[_0x21e224(0x259)],'personId':(_0x56442f=(_0x4a0179=_0x5e306c[_0x21e224(0x243)])==null?void 0x0:_0x4a0179['userID'])!=null?_0x56442f:_0x5e306c[_0x21e224(0x1e0)],'text':JSON[_0x21e224(0x1eb)](_0x5e306c[_0x21e224(0x203)]),'parentId':_0x264373['id']});break;}case _0x460808[_0x21e224(0x219)]:{const _0x1e0eba=this[_0x21e224(0x214)][_0x21e224(0x21a)](_0x3f930b,_0x3ec814,_0x5e306c['replyId']);_0x1e0eba&&_0x1e0eba[_0x21e224(0x220)]&&this[_0x21e224(0x214)]['deleteComment'](_0x3f930b,_0x3ec814,_0x5e306c[_0x21e224(0x207)]);break;}case _0x460808['Edit']:{this[_0x21e224(0x214)][_0x21e224(0x22e)](_0x3f930b,_0x3ec814,{'commentId':_0x5e306c['replyId'],'text':JSON[_0x21e224(0x1eb)](_0x5e306c[_0x21e224(0x203)])});break;}case _0x460808[_0x21e224(0x20e)]:{const _0x1d55bc=(_0x293449=this[_0x21e224(0x214)][_0x21e224(0x240)](_0x5e306c['unitId'])[_0x21e224(0x1f9)](_0x555cb7=>_0x555cb7['threadId']===_0x5e306c[_0x21e224(0x259)]))==null?void 0x0:_0x293449[_0x21e224(0x1fb)];_0x1d55bc&&this['_threadCommentModel'][_0x21e224(0x1df)](_0x3f930b,_0x3ec814,_0x1d55bc['id'],_0x5e306c[_0x21e224(0x255)]===_0x3e00c0['Solved']);break;}}}));}};_0x219890=_0x6c0dc8([_0x201133(0x0,_0x34997e[_0x14e1d3(0x1f3)](_0x3c22ee['CommentService'])),_0x201133(0x1,_0x34997e[_0x14e1d3(0x1f3)](_0x2dc169[_0x14e1d3(0x211)])),_0x201133(0x2,_0x34997e[_0x14e1d3(0x1f3)](_0x34997e[_0x14e1d3(0x223)])),_0x201133(0x3,_0x34997e['Inject'](_0x34997e[_0x14e1d3(0x212)]))],_0x219890);const _0x219f2d=_0x14e1d3(0x1ff),_0x40e0d1={};var _0x259a8d=Object[_0x14e1d3(0x224)],_0x1fc87a=(_0x2e4dfe,_0x2e753b,_0x26fdfa,_0x64c699)=>{const _0x4b5b39=_0x14e1d3;for(var _0x217336=_0x64c699>0x1?void 0x0:_0x64c699?_0x259a8d(_0x2e753b,_0x26fdfa):_0x2e753b,_0x56aba1=_0x2e4dfe[_0x4b5b39(0x218)]-0x1,_0x4462c0;_0x56aba1>=0x0;_0x56aba1--)(_0x4462c0=_0x2e4dfe[_0x56aba1])&&(_0x217336=_0x4462c0(_0x217336)||_0x217336);return _0x217336;},_0x14f142=(_0x365acf,_0x28d2ee)=>(_0x476f9b,_0x50053e)=>_0x28d2ee(_0x476f9b,_0x50053e,_0x365acf);function _0x349a8f(_0x50a91f,_0x2fceb6){const _0x1334b2=_0x14e1d3,_0x58490e=_0x50a91f[_0x1334b2(0x1e2)][0x0];return{..._0x2fceb6,'id':_0x58490e['replyId'],'resolved':_0x50a91f[_0x1334b2(0x255)]===0x1,'dT':_0x11f57c(_0x58490e[_0x1334b2(0x20f)]),'personId':_0x58490e[_0x1334b2(0x1e0)],'threadId':_0x58490e[_0x1334b2(0x259)]};}function _0x57d166(_0x90ee81,_0x1d4184,_0x477318){const _0x623ddd=_0x14e1d3;var _0x5cc5aa,_0x59d989;if(((_0x59d989=(_0x5cc5aa=_0x90ee81==null?void 0x0:_0x90ee81['replies'])==null?void 0x0:_0x5cc5aa['length'])!=null?_0x59d989:0x0)>0x0){const _0x460214=(_0x69c6fc,_0xe33c6d)=>({'id':_0x69c6fc[_0x623ddd(0x207)],'threadId':_0x69c6fc[_0x623ddd(0x259)],'dT':_0x11f57c(_0x69c6fc[_0x623ddd(0x20f)]),'personId':_0x69c6fc[_0x623ddd(0x1e0)],'resolved':_0x90ee81[_0x623ddd(0x255)]===_0x3e00c0[_0x623ddd(0x23d)],'unitId':_0x1d4184,'subUnitId':_0x477318,'text':JSON[_0x623ddd(0x1eb)](_0x69c6fc[_0x623ddd(0x203)]),'parentId':_0xe33c6d}),_0x4ed3f8=_0x460214(_0x90ee81['replies'][0x0]);return{..._0x4ed3f8,'children':_0x90ee81['replies'][_0x623ddd(0x254)](0x1)[_0x623ddd(0x20b)](_0x2dbc23=>_0x460214(_0x2dbc23,_0x4ed3f8['id']))};}return null;}let _0x3113e2=class{constructor(_0x1aa023,_0x2821d1,_0x30ebb,_0xe8b0c6){const _0x4af897=_0x14e1d3;this[_0x4af897(0x228)]=_0x1aa023,this[_0x4af897(0x1e3)]=_0x2821d1,this[_0x4af897(0x217)]=_0x30ebb,this[_0x4af897(0x1ec)]=_0xe8b0c6;}async[_0x14e1d3(0x1f0)](_0x4a7d34){const _0x353891=_0x14e1d3;var _0x129b13,_0x32791f;const {parentId:_0xb8c2fa,unitId:_0x122e83,text:_0x257e1f,threadId:_0x3e8e77}=_0x4a7d34,_0x20512=(_0x32791f=(_0x129b13=_0x257e1f[_0x353891(0x213)])==null?void 0x0:_0x129b13[_0x353891(0x237)](_0x570a00=>_0x570a00[_0x353891(0x20a)]===_0x34997e[_0x353891(0x24d)]['COMMENT'])[_0x353891(0x20b)](_0x360b48=>_0x360b48['rangeId']))!=null?_0x32791f:[],_0x3dad73=JSON[_0x353891(0x232)](_0x257e1f),_0x14f24f=(await this[_0x353891(0x217)][_0x353891(0x24e)](_0x122e83))[_0x353891(0x22a)]();if(_0xb8c2fa){const _0x3634f0={'memberId':_0x14f24f,'unitId':_0x122e83,'content':_0x3dad73,'mention':_0x20512,'threadId':_0x3e8e77},_0x43bb2=(await this['_httpService'][_0x353891(0x1f5)]('/universer-api/comment/unit/'+_0x122e83+'/reply',{'body':_0x3634f0}))['body'][_0x353891(0x1e9)];return{..._0x4a7d34,'id':_0x43bb2[_0x353891(0x207)],'dT':_0x34997e[_0x353891(0x24a)](+_0x43bb2[_0x353891(0x20f)])['format'](_0x353891(0x23a)),'personId':_0x43bb2[_0x353891(0x1e0)]};}else{const _0x5d6317={'memberId':_0x14f24f,'unitId':_0x122e83,'content':_0x3dad73,'mention':_0x20512},_0x49e0ee=await this['_httpService'][_0x353891(0x1f5)](_0x353891(0x21d)+_0x122e83+_0x353891(0x225),{'body':_0x5d6317});return _0x349a8f(_0x49e0ee[_0x353891(0x24c)][_0x353891(0x1dd)],_0x4a7d34);}}async[_0x14e1d3(0x22e)](_0x25b942){const _0x5b38b0=_0x14e1d3;var _0x5cd0fe,_0x43496f;const {text:_0x31a95b,unitId:_0x1e2c6c}=_0x25b942,_0x530513=(_0x43496f=(_0x5cd0fe=_0x31a95b[_0x5b38b0(0x213)])==null?void 0x0:_0x5cd0fe[_0x5b38b0(0x237)](_0x2c11be=>_0x2c11be[_0x5b38b0(0x20a)]===_0x34997e[_0x5b38b0(0x24d)][_0x5b38b0(0x24f)])[_0x5b38b0(0x20b)](_0xbd5b15=>_0xbd5b15[_0x5b38b0(0x230)]))!=null?_0x43496f:[],_0x51f19a=JSON['stringify'](_0x31a95b),_0xec6e91=_0x25b942[_0x5b38b0(0x259)],_0x2b1eab=_0x25b942['id'],_0x4691ad={'memberId':(await this['_sessionService'][_0x5b38b0(0x24e)](_0x1e2c6c))[_0x5b38b0(0x22a)](),'unitId':_0x1e2c6c,'threadId':_0xec6e91,'mention':_0x530513,'content':_0x51f19a,'replyId':_0x2b1eab},_0x4b3b78=await this[_0x5b38b0(0x228)][_0x5b38b0(0x1f5)](_0x5b38b0(0x21d)+_0x1e2c6c+'/edit',{'body':_0x4691ad});return!_0x4b3b78['body'][_0x5b38b0(0x229)]||_0x4b3b78['body']['error'][_0x5b38b0(0x245)]===0x1;}async['resolveComment'](_0x1fafcb){const _0x5df248=_0x14e1d3,{unitId:_0x36fcaf}=_0x1fafcb,_0x597812=_0x1fafcb[_0x5df248(0x259)],_0x443a1c={'memberId':this[_0x5df248(0x1e3)]['getCurrentUser']()['userID'],'unitId':_0x36fcaf,'threadId':_0x597812,'solved':_0x1fafcb[_0x5df248(0x238)]?_0x3e00c0[_0x5df248(0x23d)]:_0x3e00c0[_0x5df248(0x23e)]},_0x48fbde=await this['_httpService'][_0x5df248(0x1f5)](_0x5df248(0x21d)+_0x36fcaf+_0x5df248(0x206),{'body':_0x443a1c});return!_0x48fbde['body']['error']||_0x48fbde[_0x5df248(0x24c)][_0x5df248(0x229)][_0x5df248(0x245)]===0x1;}async[_0x14e1d3(0x1e4)](_0x5f1967,_0x51bf3a,_0x390939,_0x31ee6a){const _0x1de6aa=_0x14e1d3,_0x35ca10={'memberId':(await this[_0x1de6aa(0x217)][_0x1de6aa(0x24e)](_0x5f1967))['getMemberID'](),'threadId':_0x390939,'replyId':_0x31ee6a,'unitId':_0x5f1967},_0x1f66e0=await this['_httpService'][_0x1de6aa(0x1f5)](_0x1de6aa(0x21d)+_0x5f1967+_0x1de6aa(0x21e),{'body':_0x35ca10});return!_0x1f66e0[_0x1de6aa(0x24c)][_0x1de6aa(0x229)]||_0x1f66e0[_0x1de6aa(0x24c)]['error']['code']===0x1;}async[_0x14e1d3(0x244)](_0x992956,_0x132549,_0x12a19){const _0x467ac3=_0x14e1d3,_0x429ebc={'unitId':_0x992956,'threadId':_0x12a19},_0x100985=await this[_0x467ac3(0x228)]['post'](_0x467ac3(0x21d)+_0x992956+_0x467ac3(0x1f7),{'body':_0x429ebc}),_0x38c4ca=_0x12a19[_0x467ac3(0x20b)](_0x4a8cf8=>_0x57d166(_0x100985[_0x467ac3(0x24c)]['comments'][_0x4a8cf8],_0x992956,_0x132549))['filter'](Boolean);return Object[_0x467ac3(0x21f)](_0x100985[_0x467ac3(0x24c)]['users'])[_0x467ac3(0x25b)](_0x20cc85=>{const _0x230443=_0x467ac3;this[_0x230443(0x1e3)][_0x230443(0x1e1)](_0x20cc85);}),_0x38c4ca;}[_0x14e1d3(0x253)](_0x9b58d){const _0x9ba0e3=_0x14e1d3;return{'id':_0x9b58d['id'],'threadId':_0x9b58d['threadId'],'ref':_0x9b58d[_0x9ba0e3(0x22d)]};}};_0x3113e2=_0x1fc87a([_0x14f142(0x0,_0x34997e[_0x14e1d3(0x1f3)](_0x26368c[_0x14e1d3(0x1da)])),_0x14f142(0x1,_0x34997e[_0x14e1d3(0x1f3)](_0x34997e['UserManagerService'])),_0x14f142(0x2,_0x34997e['Inject'](_0x3c22ee[_0x14e1d3(0x247)])),_0x14f142(0x3,_0x34997e[_0x14e1d3(0x1f3)](_0x34997e['Injector']))],_0x3113e2);var _0x364e8e=Object[_0x14e1d3(0x224)],_0x4c5a77=(_0x4f508b,_0x43710b,_0x53e5e6,_0x552bfd)=>{const _0x528999=_0x14e1d3;for(var _0x5a7ad8=_0x552bfd>0x1?void 0x0:_0x552bfd?_0x364e8e(_0x43710b,_0x53e5e6):_0x43710b,_0xac2530=_0x4f508b[_0x528999(0x218)]-0x1,_0x1c9561;_0xac2530>=0x0;_0xac2530--)(_0x1c9561=_0x4f508b[_0xac2530])&&(_0x5a7ad8=_0x1c9561(_0x5a7ad8)||_0x5a7ad8);return _0x5a7ad8;},_0x1ca1d5=(_0x2d74bc,_0x401883)=>(_0x24d92c,_0x5bf1f7)=>_0x401883(_0x24d92c,_0x5bf1f7,_0x2d74bc);let _0x34c2ef=class extends _0x34997e[_0x14e1d3(0x252)]{constructor(_0x31f41e,_0x347547){const _0x5b6df8=_0x14e1d3;super(),this[_0x5b6df8(0x226)]=_0x31f41e,this[_0x5b6df8(0x25a)]=_0x347547,this[_0x5b6df8(0x231)]();}[_0x14e1d3(0x231)](){const _0xd44fef=_0x14e1d3;this['_threadCommentDataSourceService']['dataSource']=this[_0xd44fef(0x25a)],this[_0xd44fef(0x226)]['syncUpdateMutationToColla']=!0x1;}};_0x34c2ef=_0x4c5a77([_0x1ca1d5(0x0,_0x2dc169['IThreadCommentDataSourceService']),_0x1ca1d5(0x1,_0x34997e[_0x14e1d3(0x1f3)](_0x3113e2))],_0x34c2ef);var _0x5cf7ee=Object['defineProperty'],_0x81077c=Object[_0x14e1d3(0x224)],_0x9ffec6=(_0x2e077f,_0x2a1922,_0x2e6a04)=>_0x2a1922 in _0x2e077f?_0x5cf7ee(_0x2e077f,_0x2a1922,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2e6a04}):_0x2e077f[_0x2a1922]=_0x2e6a04,_0xe0623c=(_0x590ebe,_0x19f1d3,_0x461d14,_0x55a07c)=>{const _0x483153=_0x14e1d3;for(var _0x1f7857=_0x55a07c>0x1?void 0x0:_0x55a07c?_0x81077c(_0x19f1d3,_0x461d14):_0x19f1d3,_0x450586=_0x590ebe[_0x483153(0x218)]-0x1,_0x20fd4e;_0x450586>=0x0;_0x450586--)(_0x20fd4e=_0x590ebe[_0x450586])&&(_0x1f7857=_0x20fd4e(_0x1f7857)||_0x1f7857);return _0x1f7857;},_0xc64092=(_0x2dce45,_0x290dec)=>(_0x400ce9,_0x342bfa)=>_0x290dec(_0x400ce9,_0x342bfa,_0x2dce45),_0x53b8cb=(_0x9ad304,_0x64fec3,_0x4ee082)=>_0x9ffec6(_0x9ad304,typeof _0x64fec3!='symbol'?_0x64fec3+'':_0x64fec3,_0x4ee082);_0x5d58c4[_0x14e1d3(0x242)]=class extends _0x34997e['Plugin']{constructor(_0x174c86=_0x40e0d1,_0x362f6b,_0x220d45){const _0x2c32cc=_0x14e1d3;super(),this[_0x2c32cc(0x248)]=_0x174c86,this[_0x2c32cc(0x1ec)]=_0x362f6b,this['_configService']=_0x220d45;const {..._0x36e29b}=_0x34997e[_0x2c32cc(0x204)]({},_0x40e0d1,this[_0x2c32cc(0x248)]);this[_0x2c32cc(0x209)][_0x2c32cc(0x210)](_0x219f2d,_0x36e29b);}[_0x14e1d3(0x216)](){[[_0x3113e2],[_0x34c2ef],[_0x219890]]['forEach'](_0x3f7ca7=>{this['_injector']['add'](_0x3f7ca7);});}['onReady'](){const _0x23ce61=_0x14e1d3;this[_0x23ce61(0x1ec)]['get'](_0x34c2ef),this[_0x23ce61(0x1ec)][_0x23ce61(0x1ed)](_0x219890);}},_0x53b8cb(_0x5d58c4[_0x14e1d3(0x242)],_0x14e1d3(0x1f4),_0x404f18),_0x53b8cb(_0x5d58c4[_0x14e1d3(0x242)],_0x14e1d3(0x1fa),_0x34997e[_0x14e1d3(0x1f1)]['UNIVER_UNKNOWN']),_0x5d58c4[_0x14e1d3(0x242)]=_0xe0623c([_0x34997e[_0x14e1d3(0x1f6)](_0x438e4f[_0x14e1d3(0x1fe)],_0x3c22ee['UniverCollaborationClientPlugin'],_0x5e75e3[_0x14e1d3(0x20d)]),_0xc64092(0x1,_0x34997e[_0x14e1d3(0x1f3)](_0x34997e[_0x14e1d3(0x212)])),_0xc64092(0x2,_0x34997e[_0x14e1d3(0x23f)])],_0x5d58c4[_0x14e1d3(0x242)]),Object['defineProperty'](_0x5d58c4,Symbol['toStringTag'],{'value':_0x14e1d3(0x249)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.8.1-nightly.202506151606",
3
+ "version": "0.8.1-nightly.202506161607",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.8.1-nightly.202506151606",
49
- "@univerjs-pro/license": "0.8.1-nightly.202506151606",
50
- "@univerjs/core": "0.8.1-nightly.202506151606",
51
- "@univerjs/network": "0.8.1-nightly.202506151606",
48
+ "@univerjs-pro/collaboration-client": "0.8.1-nightly.202506161607",
49
+ "@univerjs-pro/license": "0.8.1-nightly.202506161607",
52
50
  "@univerjs/protocol": "0.1.47-alpha.0",
53
- "@univerjs/thread-comment": "0.8.1-nightly.202506151606",
54
- "@univerjs/thread-comment-ui": "0.8.1-nightly.202506151606"
51
+ "@univerjs/network": "0.8.1-nightly.202506161607",
52
+ "@univerjs/core": "0.8.1-nightly.202506161607",
53
+ "@univerjs/thread-comment": "0.8.1-nightly.202506161607",
54
+ "@univerjs/thread-comment-ui": "0.8.1-nightly.202506161607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",