@univerjs-pro/thread-comment-datasource 0.6.10-nightly.202504261606 → 0.6.10-nightly.202504281607

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';function _0x2a99(_0x30bfe8,_0x1a6b13){const _0xd6c4f6=_0xd6c4();return _0x2a99=function(_0x2a996a,_0x48941e){_0x2a996a=_0x2a996a-0xf9;let _0x5d0d48=_0xd6c4f6[_0x2a996a];return _0x5d0d48;},_0x2a99(_0x30bfe8,_0x1a6b13);}const _0x3ab517=_0x2a99;(function(_0x579176,_0x400ad3){const _0x3a8bef=_0x2a99,_0x404ccc=_0x579176();while(!![]){try{const _0x1c9add=-parseInt(_0x3a8bef(0x10e))/0x1*(-parseInt(_0x3a8bef(0x101))/0x2)+-parseInt(_0x3a8bef(0x135))/0x3+-parseInt(_0x3a8bef(0x160))/0x4+-parseInt(_0x3a8bef(0x13d))/0x5+parseInt(_0x3a8bef(0x111))/0x6+parseInt(_0x3a8bef(0x156))/0x7*(-parseInt(_0x3a8bef(0x11c))/0x8)+parseInt(_0x3a8bef(0x123))/0x9*(parseInt(_0x3a8bef(0xfb))/0xa);if(_0x1c9add===_0x400ad3)break;else _0x404ccc['push'](_0x404ccc['shift']());}catch(_0x12c6ff){_0x404ccc['push'](_0x404ccc['shift']());}}}(_0xd6c4,0x61a93));Object[_0x3ab517(0x125)](exports,Symbol[_0x3ab517(0x165)],{'value':'Module'});const b=require(_0x3ab517(0x149)),T=require(_0x3ab517(0xf9)),c=require(_0x3ab517(0x114)),j=require('@univerjs/thread-comment-ui'),M=require(_0x3ab517(0x167)),w=require(_0x3ab517(0x140)),P=require(_0x3ab517(0x11e)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x331231=>(_0x331231[_0x331231[_0x3ab517(0x15f)]=0x0]='OpenOrReOpen',_0x331231[_0x331231['Solved']=0x1]=_0x3ab517(0x133),_0x331231[_0x331231[_0x3ab517(0x10a)]=-0x1]='UNRECOGNIZED',_0x331231))(I||{}),v=(_0x556f02=>(_0x556f02[_0x556f02[_0x3ab517(0x16a)]=0x0]=_0x3ab517(0x16a),_0x556f02[_0x556f02[_0x3ab517(0x131)]=0x1]=_0x3ab517(0x131),_0x556f02[_0x556f02[_0x3ab517(0x15a)]=0x2]=_0x3ab517(0x15a),_0x556f02[_0x556f02[_0x3ab517(0x102)]=0x3]=_0x3ab517(0x102),_0x556f02[_0x556f02[_0x3ab517(0x10b)]=0x4]=_0x3ab517(0x10b),_0x556f02[_0x556f02[_0x3ab517(0x119)]=0x5]=_0x3ab517(0x119),_0x556f02[_0x556f02['UNRECOGNIZED']=-0x1]=_0x3ab517(0x10a),_0x556f02))(v||{});const f=_0x3a8d50=>c[_0x3ab517(0x121)](new Date(+_0x3a8d50))[_0x3ab517(0x11a)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x7f5107,_0x407a50)=>{const _0x401f57=_0x3ab517,_0x1598ee=_0x7f5107[_0x401f57(0x104)](c[_0x401f57(0x158)]),_0xe92a5d=_0x7f5107[_0x401f57(0x104)](P['HTTPService']);_0x407a50['forEach'](_0x207550=>{const _0x4d47fb=_0x401f57;_0x1598ee[_0x4d47fb(0x145)](_0x207550)&&_0x407a50[_0x4d47fb(0xff)](_0x207550);}),_0x407a50['size']&&(await _0xe92a5d[_0x401f57(0x104)](_0x401f57(0x136),{'params':{'userIDs':[..._0x407a50]}}))[_0x401f57(0x175)][_0x401f57(0x129)][_0x401f57(0x124)](_0x43b036=>{const _0x2bc760=_0x401f57;_0x43b036&&_0x1598ee[_0x2bc760(0x103)](_0x43b036);});};var $=Object[_0x3ab517(0x162)],E=(_0x5b0649,_0x2443cb,_0x8ad92d,_0x1f2061)=>{const _0x189602=_0x3ab517;for(var _0x221cdd=_0x1f2061>0x1?void 0x0:_0x1f2061?$(_0x2443cb,_0x8ad92d):_0x2443cb,_0x3dba53=_0x5b0649[_0x189602(0x112)]-0x1,_0x3fc7be;_0x3dba53>=0x0;_0x3dba53--)(_0x3fc7be=_0x5b0649[_0x3dba53])&&(_0x221cdd=_0x3fc7be(_0x221cdd)||_0x221cdd);return _0x221cdd;},S=(_0x5ad530,_0x13e2ac)=>(_0x31a3e9,_0x342a34)=>_0x13e2ac(_0x31a3e9,_0x342a34,_0x5ad530);let p=class extends c['Disposable']{constructor(_0x4a2f13,_0x4d4b6f,_0x31229a,_0x1001be){const _0x17edfd=_0x3ab517;super(),this[_0x17edfd(0x155)]=_0x4a2f13,this[_0x17edfd(0x122)]=_0x4d4b6f,this[_0x17edfd(0x170)]=_0x31229a,this[_0x17edfd(0x13f)]=_0x1001be,this[_0x17edfd(0x105)](),this[_0x17edfd(0x142)]();}[_0x3ab517(0x142)](){const _0x36a637=_0x3ab517;this['disposeWithMe'](this[_0x36a637(0x122)]['commentUpdate$'][_0x36a637(0x164)](w[_0x36a637(0x117)](0x10))[_0x36a637(0x108)](_0xe4802f=>{const _0x24a9c9=new Set();_0xe4802f['forEach'](_0x6b3e12=>{const _0x5c5695=_0x2a99;switch(_0x6b3e12[_0x5c5695(0x146)]){case'add':{const _0x5742ff=_0x6b3e12[_0x5c5695(0x138)][_0x5c5695(0x148)];_0x24a9c9[_0x5c5695(0x113)](_0x5742ff);break;}}}),R(this['_injector'],_0x24a9c9);}));}[_0x3ab517(0x105)](){const _0xfc4bf5=_0x3ab517;this[_0xfc4bf5(0x12f)](this[_0xfc4bf5(0x155)][_0xfc4bf5(0x174)]['subscribe'](async _0x4df6fd=>{const _0x519cfc=_0xfc4bf5;var _0x336669,_0x5ec28f,_0x3d8409,_0x382f73;const _0x51a642=(_0x336669=this[_0x519cfc(0x122)][_0x519cfc(0x10c)](_0x4df6fd['unitId'])['find'](_0x44ca89=>_0x44ca89[_0x519cfc(0x13e)]===_0x4df6fd['threadId']))==null?void 0x0:_0x336669['root'];if(!_0x51a642)return;const {unitId:_0x8c38ef,subUnitId:_0x2db0b5}=_0x51a642;switch(_0x4df6fd[_0x519cfc(0x10f)]&&this['_userService'][_0x519cfc(0x103)](_0x4df6fd['user']),_0x4df6fd['type']){case v[_0x519cfc(0x131)]:break;case v[_0x519cfc(0x15a)]:{this[_0x519cfc(0x122)][_0x519cfc(0x107)](_0x8c38ef,_0x2db0b5,{'unitId':_0x8c38ef,'subUnitId':_0x2db0b5,'ref':'','id':_0x4df6fd[_0x519cfc(0x143)],'dT':f(+_0x4df6fd[_0x519cfc(0x161)]),'threadId':_0x4df6fd['threadId'],'personId':(_0x3d8409=(_0x5ec28f=_0x4df6fd[_0x519cfc(0x10f)])==null?void 0x0:_0x5ec28f[_0x519cfc(0x150)])!=null?_0x3d8409:_0x4df6fd['userId'],'text':JSON[_0x519cfc(0x13a)](_0x4df6fd[_0x519cfc(0x12e)]),'parentId':_0x51a642['id']});break;}case v[_0x519cfc(0x10b)]:{const _0x464924=this[_0x519cfc(0x122)][_0x519cfc(0x137)](_0x8c38ef,_0x2db0b5,_0x4df6fd[_0x519cfc(0x143)]);_0x464924&&_0x464924['parentId']&&this[_0x519cfc(0x122)]['deleteComment'](_0x8c38ef,_0x2db0b5,_0x4df6fd['replyId']);break;}case v[_0x519cfc(0x102)]:{this[_0x519cfc(0x122)][_0x519cfc(0xfa)](_0x8c38ef,_0x2db0b5,{'commentId':_0x4df6fd[_0x519cfc(0x143)],'text':JSON['parse'](_0x4df6fd['content'])});break;}case v['Solve']:{const _0x38ec49=(_0x382f73=this[_0x519cfc(0x122)]['getUnit'](_0x4df6fd[_0x519cfc(0x166)])[_0x519cfc(0x139)](_0x502c77=>_0x502c77[_0x519cfc(0x13e)]===_0x4df6fd[_0x519cfc(0x13e)]))==null?void 0x0:_0x382f73[_0x519cfc(0x11f)];_0x38ec49&&this['_threadCommentModel'][_0x519cfc(0x151)](_0x8c38ef,_0x2db0b5,_0x38ec49['id'],_0x4df6fd[_0x519cfc(0x109)]===I[_0x519cfc(0x133)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x3ab517(0x11b)])),S(0x1,c[_0x3ab517(0x134)](M[_0x3ab517(0x128)])),S(0x2,c['Inject'](c[_0x3ab517(0x158)])),S(0x3,c[_0x3ab517(0x134)](c[_0x3ab517(0x152)]))],p);const q=_0x3ab517(0x110),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x1d3bfd,_0x5bd5b0,_0x573280,_0x2d338a)=>{const _0x421441=_0x3ab517;for(var _0x361b85=_0x2d338a>0x1?void 0x0:_0x2d338a?A(_0x5bd5b0,_0x573280):_0x5bd5b0,_0x57b5aa=_0x1d3bfd[_0x421441(0x112)]-0x1,_0x2f7025;_0x57b5aa>=0x0;_0x57b5aa--)(_0x2f7025=_0x1d3bfd[_0x57b5aa])&&(_0x361b85=_0x2f7025(_0x361b85)||_0x361b85);return _0x361b85;},_=(_0x5f0e6f,_0xd3166a)=>(_0x154a4a,_0x389d98)=>_0xd3166a(_0x154a4a,_0x389d98,_0x5f0e6f);function Y(_0x33139b,_0x1e0371){const _0x4da0be=_0x3ab517,_0x594b87=_0x33139b[_0x4da0be(0x171)][0x0];return{..._0x1e0371,'id':_0x594b87['replyId'],'resolved':_0x33139b[_0x4da0be(0x109)]===0x1,'dT':f(_0x594b87[_0x4da0be(0x161)]),'personId':_0x594b87[_0x4da0be(0x118)],'threadId':_0x594b87[_0x4da0be(0x13e)]};}function G(_0x308f20,_0x1a6ce0,_0x597a98){const _0x1879b6=_0x3ab517;var _0x2288c9,_0x148092;if(((_0x148092=(_0x2288c9=_0x308f20==null?void 0x0:_0x308f20[_0x1879b6(0x171)])==null?void 0x0:_0x2288c9[_0x1879b6(0x112)])!=null?_0x148092:0x0)>0x0){const _0x5e249d=(_0x2f4d8d,_0x297caf)=>({'id':_0x2f4d8d['replyId'],'threadId':_0x2f4d8d[_0x1879b6(0x13e)],'dT':f(_0x2f4d8d[_0x1879b6(0x161)]),'personId':_0x2f4d8d[_0x1879b6(0x118)],'resolved':_0x308f20[_0x1879b6(0x109)]===I[_0x1879b6(0x133)],'unitId':_0x1a6ce0,'subUnitId':_0x597a98,'text':JSON[_0x1879b6(0x13a)](_0x2f4d8d[_0x1879b6(0x12e)]),'parentId':_0x297caf}),_0x5dbd19=_0x5e249d(_0x308f20[_0x1879b6(0x171)][0x0]);return{..._0x5dbd19,'children':_0x308f20['replies'][_0x1879b6(0x12c)](0x1)[_0x1879b6(0x147)](_0x48dfd6=>_0x5e249d(_0x48dfd6,_0x5dbd19['id']))};}return null;}function _0xd6c4(){const _0x318d26=['add','@univerjs/core','/list','error','bufferTime','userId','Solve','format','CommentService','16LjckwN','_threadCommentDataSourceService','@univerjs/network','root','filter','dayjs','_threadCommentModel','9DzYrif','forEach','defineProperty','/solved','comment','ThreadCommentModel','users','/reply','_threadCommentDataSource','slice','rangeType','content','disposeWithMe','customRanges','Add','getCurrentUser','Solved','Inject','742155mZlDiA','/universer-api/user/list','getComment','payload','find','parse','YYYY/MM/DD\x20HH:mm','_configService','2480270zdTIqj','threadId','_injector','rxjs','UniverThreadCommentDataSourcePlugin','_initUserSync','replyId','post','getUser','type','map','personId','@univerjs-pro/collaboration-client','dataSource','UNIVER_UNKNOWN','values','Plugin','_config','UniverCollaborationClientPlugin','userID','resolveComment','Injector','CustomRangeType','UniverInstanceType','_commentService','533554qyHBPQ','merge','UserManagerService','_httpService','Reply','deleteComment','symbol','pluginName','IConfigService','OpenOrReOpen','1141196TsyfUm','createTimestamp','getOwnPropertyDescriptor','rangeId','pipe','toStringTag','unitId','@univerjs/thread-comment','onReady','UniverLicensePlugin','Unknown','getMemberID','/universer-api/comment/unit/','/delete','onStarting','requireSession','_userService','replies','setConfig','reply','commentUpdate$','body','code','_initDataSource','_sessionService','@univerjs-pro/license','updateComment','7117260xIFyXU','CollaborationSessionService','Disposable','HTTPService','delete','COMMENT','112876bfZGXs','Edit','addUser','get','_init','resolved','addComment','subscribe','solved','UNRECOGNIZED','Delete','getUnit','stringify','5MFwLKa','user','thread-comment-data-source.config','3523710IUciSS','length'];_0xd6c4=function(){return _0x318d26;};return _0xd6c4();}let g=class{constructor(_0x280366,_0x1c6ac1,_0x4f70fd,_0x15cf66){const _0x2d01ac=_0x3ab517;this[_0x2d01ac(0x159)]=_0x280366,this['_userService']=_0x1c6ac1,this[_0x2d01ac(0x178)]=_0x4f70fd,this[_0x2d01ac(0x13f)]=_0x15cf66;}async[_0x3ab517(0x107)](_0xdaba6c){const _0x8d329e=_0x3ab517;var _0x24bd10,_0x2dc146;const {parentId:_0x43e767,unitId:_0x2aeb38,text:_0x16ec3b,threadId:_0x50bb41}=_0xdaba6c,_0x17f60a=(_0x2dc146=(_0x24bd10=_0x16ec3b[_0x8d329e(0x130)])==null?void 0x0:_0x24bd10['filter'](_0x3703c3=>_0x3703c3[_0x8d329e(0x12d)]===c[_0x8d329e(0x153)][_0x8d329e(0x100)])['map'](_0x49914a=>_0x49914a[_0x8d329e(0x163)]))!=null?_0x2dc146:[],_0x23ccbb=JSON[_0x8d329e(0x10d)](_0x16ec3b),_0x57375d=(await this['_sessionService'][_0x8d329e(0x16f)](_0x2aeb38))[_0x8d329e(0x16b)]();if(_0x43e767){const _0x3a90c5={'memberId':_0x57375d,'unitId':_0x2aeb38,'content':_0x23ccbb,'mention':_0x17f60a,'threadId':_0x50bb41},_0x46c236=(await this[_0x8d329e(0x159)]['post'](_0x8d329e(0x16c)+_0x2aeb38+_0x8d329e(0x12a),{'body':_0x3a90c5}))['body'][_0x8d329e(0x173)];return{..._0xdaba6c,'id':_0x46c236[_0x8d329e(0x143)],'dT':c['dayjs'](+_0x46c236[_0x8d329e(0x161)])[_0x8d329e(0x11a)](_0x8d329e(0x13b)),'personId':_0x46c236[_0x8d329e(0x118)]};}else{const _0x207344={'memberId':_0x57375d,'unitId':_0x2aeb38,'content':_0x23ccbb,'mention':_0x17f60a},_0x332b40=await this['_httpService']['post'](_0x8d329e(0x16c)+_0x2aeb38+'/add',{'body':_0x207344});return Y(_0x332b40[_0x8d329e(0x175)][_0x8d329e(0x127)],_0xdaba6c);}}async[_0x3ab517(0xfa)](_0x8feed9){const _0x4bb57b=_0x3ab517;var _0x54ea68,_0x45c134;const {text:_0x45f53a,unitId:_0x4c8b4f}=_0x8feed9,_0x1ee346=(_0x45c134=(_0x54ea68=_0x45f53a['customRanges'])==null?void 0x0:_0x54ea68[_0x4bb57b(0x120)](_0x5895b3=>_0x5895b3['rangeType']===c[_0x4bb57b(0x153)][_0x4bb57b(0x100)])[_0x4bb57b(0x147)](_0x5dffe2=>_0x5dffe2['rangeId']))!=null?_0x45c134:[],_0x42dd1d=JSON['stringify'](_0x45f53a),_0x5edb6d=_0x8feed9[_0x4bb57b(0x13e)],_0x39666b=_0x8feed9['id'],_0x563118={'memberId':(await this[_0x4bb57b(0x178)]['requireSession'](_0x4c8b4f))['getMemberID'](),'unitId':_0x4c8b4f,'threadId':_0x5edb6d,'mention':_0x1ee346,'content':_0x42dd1d,'replyId':_0x39666b},_0x11ef71=await this['_httpService'][_0x4bb57b(0x144)](_0x4bb57b(0x16c)+_0x4c8b4f+'/edit',{'body':_0x563118});return!_0x11ef71['body']['error']||_0x11ef71[_0x4bb57b(0x175)][_0x4bb57b(0x116)][_0x4bb57b(0x176)]===0x1;}async['resolveComment'](_0x100664){const _0x50331c=_0x3ab517,{unitId:_0x14c782}=_0x100664,_0x1fd9b0=_0x100664[_0x50331c(0x13e)],_0x500639={'memberId':this[_0x50331c(0x170)][_0x50331c(0x132)]()['userID'],'unitId':_0x14c782,'threadId':_0x1fd9b0,'solved':_0x100664[_0x50331c(0x106)]?I[_0x50331c(0x133)]:I[_0x50331c(0x15f)]},_0x561f2a=await this[_0x50331c(0x159)][_0x50331c(0x144)](_0x50331c(0x16c)+_0x14c782+_0x50331c(0x126),{'body':_0x500639});return!_0x561f2a[_0x50331c(0x175)][_0x50331c(0x116)]||_0x561f2a[_0x50331c(0x175)]['error']['code']===0x1;}async[_0x3ab517(0x15b)](_0x2d8b59,_0x3b7786,_0x33063e,_0x29a65e){const _0x231309=_0x3ab517,_0x1e1ce3={'memberId':(await this[_0x231309(0x178)][_0x231309(0x16f)](_0x2d8b59))['getMemberID'](),'threadId':_0x33063e,'replyId':_0x29a65e,'unitId':_0x2d8b59},_0xffbcb3=await this[_0x231309(0x159)]['post'](_0x231309(0x16c)+_0x2d8b59+_0x231309(0x16d),{'body':_0x1e1ce3});return!_0xffbcb3[_0x231309(0x175)][_0x231309(0x116)]||_0xffbcb3[_0x231309(0x175)][_0x231309(0x116)]['code']===0x1;}async['listComments'](_0x104bd4,_0x26d7dd,_0x333c05){const _0x1928ce=_0x3ab517,_0x3be569={'unitId':_0x104bd4,'threadId':_0x333c05},_0x53416f=await this['_httpService'][_0x1928ce(0x144)](_0x1928ce(0x16c)+_0x104bd4+_0x1928ce(0x115),{'body':_0x3be569}),_0x2b4916=_0x333c05['map'](_0x34854b=>G(_0x53416f[_0x1928ce(0x175)]['comments'][_0x34854b],_0x104bd4,_0x26d7dd))[_0x1928ce(0x120)](Boolean);return Object[_0x1928ce(0x14c)](_0x53416f[_0x1928ce(0x175)][_0x1928ce(0x129)])[_0x1928ce(0x124)](_0x2fbc42=>{const _0x2fd757=_0x1928ce;this[_0x2fd757(0x170)][_0x2fd757(0x103)](_0x2fbc42);}),_0x2b4916;}['saveCommentToSnapshot'](_0x40ebe0){const _0x419077=_0x3ab517;return{'id':_0x40ebe0['id'],'threadId':_0x40ebe0[_0x419077(0x13e)],'ref':_0x40ebe0['ref']};}};g=x([_(0x0,c[_0x3ab517(0x134)](P[_0x3ab517(0xfe)])),_(0x1,c['Inject'](c[_0x3ab517(0x158)])),_(0x2,c[_0x3ab517(0x134)](b[_0x3ab517(0xfc)])),_(0x3,c[_0x3ab517(0x134)](c[_0x3ab517(0x152)]))],g);var H=Object[_0x3ab517(0x162)],J=(_0x4c4fb8,_0x149bef,_0x5ca91f,_0x555640)=>{const _0x3c7693=_0x3ab517;for(var _0x200e5c=_0x555640>0x1?void 0x0:_0x555640?H(_0x149bef,_0x5ca91f):_0x149bef,_0x15fa1b=_0x4c4fb8[_0x3c7693(0x112)]-0x1,_0x549040;_0x15fa1b>=0x0;_0x15fa1b--)(_0x549040=_0x4c4fb8[_0x15fa1b])&&(_0x200e5c=_0x549040(_0x200e5c)||_0x200e5c);return _0x200e5c;},y=(_0x35894e,_0x58cfd5)=>(_0x1f8ba8,_0x5f38ac)=>_0x58cfd5(_0x1f8ba8,_0x5f38ac,_0x35894e);let C=class extends c[_0x3ab517(0xfd)]{constructor(_0x3d5a4f,_0x1a1cdd){const _0x2fa8f6=_0x3ab517;super(),this['_threadCommentDataSourceService']=_0x3d5a4f,this[_0x2fa8f6(0x12b)]=_0x1a1cdd,this[_0x2fa8f6(0x177)]();}[_0x3ab517(0x177)](){const _0x51bc33=_0x3ab517;this[_0x51bc33(0x11d)][_0x51bc33(0x14a)]=this[_0x51bc33(0x12b)],this[_0x51bc33(0x11d)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](g))],C);var F=Object[_0x3ab517(0x125)],L=Object['getOwnPropertyDescriptor'],Z=(_0x1e5997,_0x396032,_0x5cc45a)=>_0x396032 in _0x1e5997?F(_0x1e5997,_0x396032,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5cc45a}):_0x1e5997[_0x396032]=_0x5cc45a,W=(_0x4681cc,_0x42c703,_0x53c913,_0x1d0bca)=>{const _0x60ac29=_0x3ab517;for(var _0x3129a2=_0x1d0bca>0x1?void 0x0:_0x1d0bca?L(_0x42c703,_0x53c913):_0x42c703,_0x3e91bf=_0x4681cc[_0x60ac29(0x112)]-0x1,_0x1e1432;_0x3e91bf>=0x0;_0x3e91bf--)(_0x1e1432=_0x4681cc[_0x3e91bf])&&(_0x3129a2=_0x1e1432(_0x3129a2)||_0x3129a2);return _0x3129a2;},O=(_0x1d287d,_0x58f440)=>(_0x2d78c4,_0x52a6bf)=>_0x58f440(_0x2d78c4,_0x52a6bf,_0x1d287d),N=(_0x33eb97,_0x585480,_0x5de5e6)=>Z(_0x33eb97,typeof _0x585480!=_0x3ab517(0x15c)?_0x585480+'':_0x585480,_0x5de5e6);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x3ab517(0x14d)]{constructor(_0x5cd30b=D,_0x42aaba,_0x47878d){const _0x34de37=_0x3ab517;super(),this[_0x34de37(0x14e)]=_0x5cd30b,this[_0x34de37(0x13f)]=_0x42aaba,this[_0x34de37(0x13c)]=_0x47878d;const {..._0x50d14a}=c[_0x34de37(0x157)]({},D,this['_config']);this['_configService'][_0x34de37(0x172)](q,_0x50d14a);}[_0x3ab517(0x16e)](){const _0x2e2484=_0x3ab517;[[g],[C],[p]][_0x2e2484(0x124)](_0x78d9df=>{const _0x4428c0=_0x2e2484;this[_0x4428c0(0x13f)]['add'](_0x78d9df);});}[_0x3ab517(0x168)](){const _0x1bbeae=_0x3ab517;this[_0x1bbeae(0x13f)][_0x1bbeae(0x104)](C),this['_injector']['get'](p);}},N(exports[_0x3ab517(0x141)],_0x3ab517(0x15d),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x3ab517(0x146),c[_0x3ab517(0x154)][_0x3ab517(0x14b)]),exports[_0x3ab517(0x141)]=W([c['DependentOn'](j['UniverThreadCommentUIPlugin'],b[_0x3ab517(0x14f)],T[_0x3ab517(0x169)]),O(0x1,c[_0x3ab517(0x134)](c[_0x3ab517(0x152)])),O(0x2,c[_0x3ab517(0x15e)])],exports[_0x3ab517(0x141)]);
1
+ 'use strict';const _0x13e4c0=_0x5c8b;(function(_0x4bf158,_0x4bc613){const _0x50619b=_0x5c8b,_0x451b34=_0x4bf158();while(!![]){try{const _0x29373b=parseInt(_0x50619b(0x12f))/0x1+parseInt(_0x50619b(0xe3))/0x2+-parseInt(_0x50619b(0x123))/0x3*(parseInt(_0x50619b(0xe7))/0x4)+parseInt(_0x50619b(0xe0))/0x5+-parseInt(_0x50619b(0xca))/0x6*(parseInt(_0x50619b(0x109))/0x7)+-parseInt(_0x50619b(0xde))/0x8+parseInt(_0x50619b(0x10f))/0x9*(parseInt(_0x50619b(0x13e))/0xa);if(_0x29373b===_0x4bc613)break;else _0x451b34['push'](_0x451b34['shift']());}catch(_0x332996){_0x451b34['push'](_0x451b34['shift']());}}}(_0x116e,0x5cd40));Object[_0x13e4c0(0xe1)](exports,Symbol[_0x13e4c0(0x144)],{'value':'Module'});const b=require(_0x13e4c0(0x11e)),T=require('@univerjs-pro/license'),c=require(_0x13e4c0(0x122)),j=require(_0x13e4c0(0x11c)),M=require(_0x13e4c0(0xe4)),w=require(_0x13e4c0(0xd0)),P=require(_0x13e4c0(0xd1)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x543f0c=>(_0x543f0c[_0x543f0c[_0x13e4c0(0xcf)]=0x0]='OpenOrReOpen',_0x543f0c[_0x543f0c[_0x13e4c0(0x124)]=0x1]=_0x13e4c0(0x124),_0x543f0c[_0x543f0c[_0x13e4c0(0xda)]=-0x1]=_0x13e4c0(0xda),_0x543f0c))(I||{}),v=(_0x3f0358=>(_0x3f0358[_0x3f0358['Unknown']=0x0]=_0x13e4c0(0xe2),_0x3f0358[_0x3f0358[_0x13e4c0(0x14a)]=0x1]=_0x13e4c0(0x14a),_0x3f0358[_0x3f0358[_0x13e4c0(0x13b)]=0x2]='Reply',_0x3f0358[_0x3f0358[_0x13e4c0(0x11a)]=0x3]=_0x13e4c0(0x11a),_0x3f0358[_0x3f0358['Delete']=0x4]=_0x13e4c0(0xfd),_0x3f0358[_0x3f0358[_0x13e4c0(0x10c)]=0x5]=_0x13e4c0(0x10c),_0x3f0358[_0x3f0358['UNRECOGNIZED']=-0x1]=_0x13e4c0(0xda),_0x3f0358))(v||{});const f=_0x5e5122=>c[_0x13e4c0(0xf5)](new Date(+_0x5e5122))[_0x13e4c0(0x131)](_0x13e4c0(0xcd)),R=async(_0x11ee5,_0x3d0d07)=>{const _0x94422a=_0x13e4c0,_0x55aec8=_0x11ee5[_0x94422a(0xd7)](c[_0x94422a(0xf2)]),_0x1613ee=_0x11ee5[_0x94422a(0xd7)](P['HTTPService']);_0x3d0d07[_0x94422a(0x127)](_0x49a61a=>{const _0x23f7f5=_0x94422a;_0x55aec8[_0x23f7f5(0xc8)](_0x49a61a)&&_0x3d0d07[_0x23f7f5(0xeb)](_0x49a61a);}),_0x3d0d07[_0x94422a(0x134)]&&(await _0x1613ee['get'](_0x94422a(0x136),{'params':{'userIDs':[..._0x3d0d07]}}))[_0x94422a(0x13c)][_0x94422a(0xfa)][_0x94422a(0x127)](_0x3d8e19=>{const _0x4b4c7f=_0x94422a;_0x3d8e19&&_0x55aec8[_0x4b4c7f(0x11d)](_0x3d8e19);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x6dc93e,_0x473406,_0x196a4f,_0x17f593)=>{const _0xf4ebfb=_0x13e4c0;for(var _0x562dd3=_0x17f593>0x1?void 0x0:_0x17f593?$(_0x473406,_0x196a4f):_0x473406,_0x4b4d93=_0x6dc93e[_0xf4ebfb(0x12a)]-0x1,_0x1755a1;_0x4b4d93>=0x0;_0x4b4d93--)(_0x1755a1=_0x6dc93e[_0x4b4d93])&&(_0x562dd3=_0x1755a1(_0x562dd3)||_0x562dd3);return _0x562dd3;},S=(_0x9b6136,_0x140cb2)=>(_0x16e78e,_0x5072e2)=>_0x140cb2(_0x16e78e,_0x5072e2,_0x9b6136);function _0x116e(){const _0x4d6fd6=['Add','/edit','getUser','parse','228EFEbmd','add','getCurrentUser','YYYY/MM/DD\x20HH:mm','comments','OpenOrReOpen','rxjs','@univerjs/network','customRanges','_configService','_commentService','/universer-api/comment/unit/','addComment','get','find','Injector','UNRECOGNIZED','getOwnPropertyDescriptor','map','/delete','5527120ACXKsY','slice','385870mZYdZU','defineProperty','Unknown','894030ktVMqF','@univerjs/thread-comment','replies','post','34920IcpEpN','_httpService','Plugin','root','delete','listComments','dataSource','reply','comment','content','_userService','UserManagerService','_threadCommentDataSource','setConfig','dayjs','updateComment','personId','ref','_initDataSource','users','pipe','/add','Delete','threadId','solved','/reply','Inject','commentUpdate$','UniverThreadCommentUIPlugin','unitId','disposeWithMe','rangeType','userId','requireSession','77021tCvfEv','error','createTimestamp','Solve','UNIVER_UNKNOWN','UniverLicensePlugin','205335rpbEYE','rangeId','_injector','IThreadCommentDataSourceService','onReady','UniverThreadCommentDataSourcePlugin','saveCommentToSnapshot','UniverInstanceType','Disposable','stringify','userID','Edit','code','@univerjs/thread-comment-ui','addUser','@univerjs-pro/collaboration-client','resolveComment','user','DependentOn','@univerjs/core','33xLJgNq','Solved','payload','type','forEach','values','bufferTime','length','symbol','_sessionService','subscribe','getMemberID','445064VeFpgj','getComment','format','resolved','_threadCommentDataSourceService','size','COMMENT','/universer-api/user/list','deleteComment','/list','getUnit','filter','Reply','body','_initUserSync','270aUpsxt','replyId','/solved','ThreadCommentModel','parentId','CollaborationSessionService','toStringTag','CommentService','CustomRangeType','_threadCommentModel','IConfigService','pluginName'];_0x116e=function(){return _0x4d6fd6;};return _0x116e();}let p=class extends c[_0x13e4c0(0x117)]{constructor(_0x4a60d8,_0x3b9c85,_0x28713f,_0x116796){const _0x5f415f=_0x13e4c0;super(),this[_0x5f415f(0xd4)]=_0x4a60d8,this[_0x5f415f(0x147)]=_0x3b9c85,this[_0x5f415f(0xf1)]=_0x28713f,this[_0x5f415f(0x111)]=_0x116796,this['_init'](),this[_0x5f415f(0x13d)]();}[_0x13e4c0(0x13d)](){const _0x5bcb38=_0x13e4c0;this[_0x5bcb38(0x105)](this[_0x5bcb38(0x147)]['commentUpdate$'][_0x5bcb38(0xfb)](w[_0x5bcb38(0x129)](0x10))[_0x5bcb38(0x12d)](_0x3ad83c=>{const _0x2111bb=_0x5bcb38,_0x385cc6=new Set();_0x3ad83c[_0x2111bb(0x127)](_0x4c4fae=>{const _0x167f9b=_0x2111bb;switch(_0x4c4fae['type']){case _0x167f9b(0xcb):{const _0x49fb32=_0x4c4fae[_0x167f9b(0x125)][_0x167f9b(0xf7)];_0x385cc6[_0x167f9b(0xcb)](_0x49fb32);break;}}}),R(this[_0x2111bb(0x111)],_0x385cc6);}));}['_init'](){const _0x4f46cb=_0x13e4c0;this[_0x4f46cb(0x105)](this[_0x4f46cb(0xd4)][_0x4f46cb(0x102)]['subscribe'](async _0x5aefb1=>{const _0x5dd356=_0x4f46cb;var _0x22722c,_0x4ebeb6,_0x59509c,_0x2912c3;const _0x5b4db9=(_0x22722c=this[_0x5dd356(0x147)]['getUnit'](_0x5aefb1[_0x5dd356(0x104)])[_0x5dd356(0xd8)](_0x1dc417=>_0x1dc417['threadId']===_0x5aefb1[_0x5dd356(0xfe)]))==null?void 0x0:_0x22722c['root'];if(!_0x5b4db9)return;const {unitId:_0x5bc70b,subUnitId:_0x2cc2ca}=_0x5b4db9;switch(_0x5aefb1[_0x5dd356(0x120)]&&this[_0x5dd356(0xf1)]['addUser'](_0x5aefb1[_0x5dd356(0x120)]),_0x5aefb1[_0x5dd356(0x126)]){case v[_0x5dd356(0x14a)]:break;case v[_0x5dd356(0x13b)]:{this[_0x5dd356(0x147)][_0x5dd356(0xd6)](_0x5bc70b,_0x2cc2ca,{'unitId':_0x5bc70b,'subUnitId':_0x2cc2ca,'ref':'','id':_0x5aefb1[_0x5dd356(0x13f)],'dT':f(+_0x5aefb1[_0x5dd356(0x10b)]),'threadId':_0x5aefb1[_0x5dd356(0xfe)],'personId':(_0x59509c=(_0x4ebeb6=_0x5aefb1[_0x5dd356(0x120)])==null?void 0x0:_0x4ebeb6[_0x5dd356(0x119)])!=null?_0x59509c:_0x5aefb1['userId'],'text':JSON['parse'](_0x5aefb1[_0x5dd356(0xf0)]),'parentId':_0x5b4db9['id']});break;}case v['Delete']:{const _0x4aa4eb=this[_0x5dd356(0x147)][_0x5dd356(0x130)](_0x5bc70b,_0x2cc2ca,_0x5aefb1['replyId']);_0x4aa4eb&&_0x4aa4eb[_0x5dd356(0x142)]&&this[_0x5dd356(0x147)][_0x5dd356(0x137)](_0x5bc70b,_0x2cc2ca,_0x5aefb1[_0x5dd356(0x13f)]);break;}case v['Edit']:{this['_threadCommentModel']['updateComment'](_0x5bc70b,_0x2cc2ca,{'commentId':_0x5aefb1[_0x5dd356(0x13f)],'text':JSON[_0x5dd356(0xc9)](_0x5aefb1['content'])});break;}case v[_0x5dd356(0x10c)]:{const _0x264fef=(_0x2912c3=this[_0x5dd356(0x147)][_0x5dd356(0x139)](_0x5aefb1[_0x5dd356(0x104)])['find'](_0x587091=>_0x587091[_0x5dd356(0xfe)]===_0x5aefb1[_0x5dd356(0xfe)]))==null?void 0x0:_0x2912c3[_0x5dd356(0xea)];_0x264fef&&this[_0x5dd356(0x147)][_0x5dd356(0x11f)](_0x5bc70b,_0x2cc2ca,_0x264fef['id'],_0x5aefb1['solved']===I[_0x5dd356(0x124)]);break;}}}));}};p=E([S(0x0,c[_0x13e4c0(0x101)](b[_0x13e4c0(0x145)])),S(0x1,c[_0x13e4c0(0x101)](M[_0x13e4c0(0x141)])),S(0x2,c[_0x13e4c0(0x101)](c[_0x13e4c0(0xf2)])),S(0x3,c[_0x13e4c0(0x101)](c[_0x13e4c0(0xd9)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x13e4c0(0xdb)],x=(_0x1205ce,_0x4fb0de,_0x170e0c,_0x5a51af)=>{const _0x24d43c=_0x13e4c0;for(var _0x8659c4=_0x5a51af>0x1?void 0x0:_0x5a51af?A(_0x4fb0de,_0x170e0c):_0x4fb0de,_0xd51712=_0x1205ce[_0x24d43c(0x12a)]-0x1,_0x34fa6d;_0xd51712>=0x0;_0xd51712--)(_0x34fa6d=_0x1205ce[_0xd51712])&&(_0x8659c4=_0x34fa6d(_0x8659c4)||_0x8659c4);return _0x8659c4;},_=(_0x27a9ce,_0x3239ed)=>(_0x134c64,_0x2f52a2)=>_0x3239ed(_0x134c64,_0x2f52a2,_0x27a9ce);function Y(_0x584777,_0xa4030b){const _0x571b4e=_0x13e4c0,_0x3fd377=_0x584777[_0x571b4e(0xe5)][0x0];return{..._0xa4030b,'id':_0x3fd377[_0x571b4e(0x13f)],'resolved':_0x584777[_0x571b4e(0xff)]===0x1,'dT':f(_0x3fd377[_0x571b4e(0x10b)]),'personId':_0x3fd377[_0x571b4e(0x107)],'threadId':_0x3fd377['threadId']};}function G(_0x141a63,_0x1b88b1,_0x50e815){const _0x556267=_0x13e4c0;var _0x2a2424,_0x249472;if(((_0x249472=(_0x2a2424=_0x141a63==null?void 0x0:_0x141a63['replies'])==null?void 0x0:_0x2a2424[_0x556267(0x12a)])!=null?_0x249472:0x0)>0x0){const _0x18d664=(_0x4484f9,_0x418e1f)=>({'id':_0x4484f9[_0x556267(0x13f)],'threadId':_0x4484f9[_0x556267(0xfe)],'dT':f(_0x4484f9[_0x556267(0x10b)]),'personId':_0x4484f9[_0x556267(0x107)],'resolved':_0x141a63[_0x556267(0xff)]===I[_0x556267(0x124)],'unitId':_0x1b88b1,'subUnitId':_0x50e815,'text':JSON[_0x556267(0xc9)](_0x4484f9[_0x556267(0xf0)]),'parentId':_0x418e1f}),_0x313f55=_0x18d664(_0x141a63[_0x556267(0xe5)][0x0]);return{..._0x313f55,'children':_0x141a63[_0x556267(0xe5)][_0x556267(0xdf)](0x1)[_0x556267(0xdc)](_0x4f7655=>_0x18d664(_0x4f7655,_0x313f55['id']))};}return null;}let g=class{constructor(_0x4142de,_0x2c7451,_0x5b8573,_0x183298){const _0xf34b3f=_0x13e4c0;this[_0xf34b3f(0xe8)]=_0x4142de,this['_userService']=_0x2c7451,this[_0xf34b3f(0x12c)]=_0x5b8573,this[_0xf34b3f(0x111)]=_0x183298;}async[_0x13e4c0(0xd6)](_0x58b2bd){const _0x186c8f=_0x13e4c0;var _0xa90636,_0x270d7c;const {parentId:_0x47e100,unitId:_0x1c2b95,text:_0x52f90e,threadId:_0x44d5b6}=_0x58b2bd,_0x4a28d6=(_0x270d7c=(_0xa90636=_0x52f90e[_0x186c8f(0xd2)])==null?void 0x0:_0xa90636[_0x186c8f(0x13a)](_0x2a9af0=>_0x2a9af0['rangeType']===c[_0x186c8f(0x146)][_0x186c8f(0x135)])[_0x186c8f(0xdc)](_0x7620b=>_0x7620b[_0x186c8f(0x110)]))!=null?_0x270d7c:[],_0x5d8134=JSON[_0x186c8f(0x118)](_0x52f90e),_0x424c5e=(await this['_sessionService'][_0x186c8f(0x108)](_0x1c2b95))[_0x186c8f(0x12e)]();if(_0x47e100){const _0x5f079d={'memberId':_0x424c5e,'unitId':_0x1c2b95,'content':_0x5d8134,'mention':_0x4a28d6,'threadId':_0x44d5b6},_0x94cf5f=(await this['_httpService'][_0x186c8f(0xe6)](_0x186c8f(0xd5)+_0x1c2b95+_0x186c8f(0x100),{'body':_0x5f079d}))[_0x186c8f(0x13c)][_0x186c8f(0xee)];return{..._0x58b2bd,'id':_0x94cf5f[_0x186c8f(0x13f)],'dT':c['dayjs'](+_0x94cf5f[_0x186c8f(0x10b)])[_0x186c8f(0x131)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x94cf5f[_0x186c8f(0x107)]};}else{const _0x42fe0a={'memberId':_0x424c5e,'unitId':_0x1c2b95,'content':_0x5d8134,'mention':_0x4a28d6},_0x5483a8=await this[_0x186c8f(0xe8)]['post'](_0x186c8f(0xd5)+_0x1c2b95+_0x186c8f(0xfc),{'body':_0x42fe0a});return Y(_0x5483a8[_0x186c8f(0x13c)][_0x186c8f(0xef)],_0x58b2bd);}}async[_0x13e4c0(0xf6)](_0x376661){const _0x8d4836=_0x13e4c0;var _0x32ad04,_0x1aae6b;const {text:_0x1d7431,unitId:_0x4e4193}=_0x376661,_0x140c9f=(_0x1aae6b=(_0x32ad04=_0x1d7431[_0x8d4836(0xd2)])==null?void 0x0:_0x32ad04[_0x8d4836(0x13a)](_0x2ad2e3=>_0x2ad2e3[_0x8d4836(0x106)]===c[_0x8d4836(0x146)]['COMMENT'])[_0x8d4836(0xdc)](_0x20c2ac=>_0x20c2ac['rangeId']))!=null?_0x1aae6b:[],_0x3f432e=JSON['stringify'](_0x1d7431),_0x2002f9=_0x376661['threadId'],_0x191df4=_0x376661['id'],_0x50f0fd={'memberId':(await this[_0x8d4836(0x12c)][_0x8d4836(0x108)](_0x4e4193))[_0x8d4836(0x12e)](),'unitId':_0x4e4193,'threadId':_0x2002f9,'mention':_0x140c9f,'content':_0x3f432e,'replyId':_0x191df4},_0x38e963=await this[_0x8d4836(0xe8)]['post'](_0x8d4836(0xd5)+_0x4e4193+_0x8d4836(0xc7),{'body':_0x50f0fd});return!_0x38e963['body']['error']||_0x38e963[_0x8d4836(0x13c)]['error'][_0x8d4836(0x11b)]===0x1;}async[_0x13e4c0(0x11f)](_0x46358a){const _0x56584f=_0x13e4c0,{unitId:_0x96801}=_0x46358a,_0x227889=_0x46358a[_0x56584f(0xfe)],_0x5997e1={'memberId':this['_userService'][_0x56584f(0xcc)]()[_0x56584f(0x119)],'unitId':_0x96801,'threadId':_0x227889,'solved':_0x46358a[_0x56584f(0x132)]?I['Solved']:I['OpenOrReOpen']},_0x652d6=await this['_httpService'][_0x56584f(0xe6)](_0x56584f(0xd5)+_0x96801+_0x56584f(0x140),{'body':_0x5997e1});return!_0x652d6[_0x56584f(0x13c)][_0x56584f(0x10a)]||_0x652d6[_0x56584f(0x13c)][_0x56584f(0x10a)][_0x56584f(0x11b)]===0x1;}async[_0x13e4c0(0x137)](_0x4a8f61,_0x4293ec,_0x20d3d5,_0x7a3a18){const _0x58b313=_0x13e4c0,_0x1a0455={'memberId':(await this[_0x58b313(0x12c)]['requireSession'](_0x4a8f61))['getMemberID'](),'threadId':_0x20d3d5,'replyId':_0x7a3a18,'unitId':_0x4a8f61},_0x389d2e=await this[_0x58b313(0xe8)][_0x58b313(0xe6)](_0x58b313(0xd5)+_0x4a8f61+_0x58b313(0xdd),{'body':_0x1a0455});return!_0x389d2e['body'][_0x58b313(0x10a)]||_0x389d2e['body'][_0x58b313(0x10a)][_0x58b313(0x11b)]===0x1;}async[_0x13e4c0(0xec)](_0x5e0892,_0xfa956e,_0x550d5c){const _0x583a9a=_0x13e4c0,_0x85421e={'unitId':_0x5e0892,'threadId':_0x550d5c},_0x9c4509=await this[_0x583a9a(0xe8)]['post'](_0x583a9a(0xd5)+_0x5e0892+_0x583a9a(0x138),{'body':_0x85421e}),_0x307d65=_0x550d5c[_0x583a9a(0xdc)](_0x576826=>G(_0x9c4509['body'][_0x583a9a(0xce)][_0x576826],_0x5e0892,_0xfa956e))['filter'](Boolean);return Object[_0x583a9a(0x128)](_0x9c4509[_0x583a9a(0x13c)][_0x583a9a(0xfa)])[_0x583a9a(0x127)](_0x44e3b3=>{const _0x2e1c65=_0x583a9a;this[_0x2e1c65(0xf1)]['addUser'](_0x44e3b3);}),_0x307d65;}[_0x13e4c0(0x115)](_0x222c5a){const _0x4a19f3=_0x13e4c0;return{'id':_0x222c5a['id'],'threadId':_0x222c5a[_0x4a19f3(0xfe)],'ref':_0x222c5a[_0x4a19f3(0xf8)]};}};function _0x5c8b(_0x36593a,_0xe14f2f){const _0x116e8a=_0x116e();return _0x5c8b=function(_0x5c8b33,_0x156b20){_0x5c8b33=_0x5c8b33-0xc7;let _0x3d480e=_0x116e8a[_0x5c8b33];return _0x3d480e;},_0x5c8b(_0x36593a,_0xe14f2f);}g=x([_(0x0,c[_0x13e4c0(0x101)](P['HTTPService'])),_(0x1,c[_0x13e4c0(0x101)](c[_0x13e4c0(0xf2)])),_(0x2,c['Inject'](b[_0x13e4c0(0x143)])),_(0x3,c[_0x13e4c0(0x101)](c[_0x13e4c0(0xd9)]))],g);var H=Object[_0x13e4c0(0xdb)],J=(_0x389e1c,_0x37ba42,_0x5ad650,_0x3f7200)=>{for(var _0x554df7=_0x3f7200>0x1?void 0x0:_0x3f7200?H(_0x37ba42,_0x5ad650):_0x37ba42,_0x462c9b=_0x389e1c['length']-0x1,_0x6c1722;_0x462c9b>=0x0;_0x462c9b--)(_0x6c1722=_0x389e1c[_0x462c9b])&&(_0x554df7=_0x6c1722(_0x554df7)||_0x554df7);return _0x554df7;},y=(_0x289a6c,_0x2a08af)=>(_0x3fa146,_0x2973a9)=>_0x2a08af(_0x3fa146,_0x2973a9,_0x289a6c);let C=class extends c['Disposable']{constructor(_0x18255a,_0x486f0a){const _0x1d5564=_0x13e4c0;super(),this[_0x1d5564(0x133)]=_0x18255a,this[_0x1d5564(0xf3)]=_0x486f0a,this[_0x1d5564(0xf9)]();}[_0x13e4c0(0xf9)](){const _0x37c2bd=_0x13e4c0;this['_threadCommentDataSourceService'][_0x37c2bd(0xed)]=this[_0x37c2bd(0xf3)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x13e4c0(0x112)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x13e4c0(0xe1)],L=Object[_0x13e4c0(0xdb)],Z=(_0x3c326a,_0x3d3d19,_0x3e6a2b)=>_0x3d3d19 in _0x3c326a?F(_0x3c326a,_0x3d3d19,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3e6a2b}):_0x3c326a[_0x3d3d19]=_0x3e6a2b,W=(_0x2b842e,_0x92cd84,_0x5428a8,_0x5dbf57)=>{for(var _0x2906b0=_0x5dbf57>0x1?void 0x0:_0x5dbf57?L(_0x92cd84,_0x5428a8):_0x92cd84,_0x461445=_0x2b842e['length']-0x1,_0x50f6bb;_0x461445>=0x0;_0x461445--)(_0x50f6bb=_0x2b842e[_0x461445])&&(_0x2906b0=_0x50f6bb(_0x2906b0)||_0x2906b0);return _0x2906b0;},O=(_0x460fa9,_0xc1d7d8)=>(_0x3d0b70,_0x40f662)=>_0xc1d7d8(_0x3d0b70,_0x40f662,_0x460fa9),N=(_0x2e14e2,_0x24369e,_0x29957e)=>Z(_0x2e14e2,typeof _0x24369e!=_0x13e4c0(0x12b)?_0x24369e+'':_0x24369e,_0x29957e);exports[_0x13e4c0(0x114)]=class extends c[_0x13e4c0(0xe9)]{constructor(_0x98f0b7=D,_0x1f6981,_0x8f164e){const _0x3ba687=_0x13e4c0;super(),this['_config']=_0x98f0b7,this['_injector']=_0x1f6981,this[_0x3ba687(0xd3)]=_0x8f164e;const {..._0x3a2382}=c['merge']({},D,this['_config']);this[_0x3ba687(0xd3)][_0x3ba687(0xf4)](q,_0x3a2382);}['onStarting'](){const _0x4b2828=_0x13e4c0;[[g],[C],[p]][_0x4b2828(0x127)](_0x3129cc=>{const _0xe839dc=_0x4b2828;this[_0xe839dc(0x111)][_0xe839dc(0xcb)](_0x3129cc);});}[_0x13e4c0(0x113)](){const _0x39a968=_0x13e4c0;this[_0x39a968(0x111)][_0x39a968(0xd7)](C),this[_0x39a968(0x111)][_0x39a968(0xd7)](p);}},N(exports[_0x13e4c0(0x114)],_0x13e4c0(0x149),U),N(exports[_0x13e4c0(0x114)],_0x13e4c0(0x126),c[_0x13e4c0(0x116)][_0x13e4c0(0x10d)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x13e4c0(0x121)](j[_0x13e4c0(0x103)],b['UniverCollaborationClientPlugin'],T[_0x13e4c0(0x10e)]),O(0x1,c[_0x13e4c0(0x101)](c[_0x13e4c0(0xd9)])),O(0x2,c[_0x13e4c0(0x148)])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- function _0x5716(){const _0x31cc18=['addUser','format','forEach','_initUserSync','content','_configService','length','pipe','error','body','root','1034658InGYRu','UNIVER_UNKNOWN','customRanges','saveCommentToSnapshot','16JNDQVD','unitId','_httpService','solved','resolved','_init','createTimestamp','onReady','rangeType','COMMENT','10ShJXGe','userId','requireSession','_sessionService','listComments','getCurrentUser','1363109nPtDsl','onStarting','/add','_injector','1267QSawTf','UNRECOGNIZED','post','addComment','parse','/delete','353445qiwXlI','replies','/reply','Delete','get','personId','user','resolveComment','Solve','updateComment','2qKCvXT','filter','userID','stringify','_threadCommentDataSourceService','Unknown','/edit','30aZHOBY','reply','YYYY/MM/DD\x20HH:mm','_config','users','find','Solved','parentId','getOwnPropertyDescriptor','OpenOrReOpen','setConfig','Add','subscribe','_commentService','_initDataSource','commentUpdate$','replyId','_threadCommentModel','type','deleteComment','getUser','comment','/universer-api/user/list','9749220dXWStH','thread-comment-data-source.config','rangeId','Edit','getMemberID','disposeWithMe','pluginName','add','_userService','values','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','map','code','threadId','/universer-api/comment/unit/','14538KcQXWl','getUnit','812160NDqfqC','999873iiNjBI','size'];_0x5716=function(){return _0x31cc18;};return _0x5716();}function _0x7d36(_0x23232e,_0xda627e){const _0x57161f=_0x5716();return _0x7d36=function(_0x7d3660,_0x324e7d){_0x7d3660=_0x7d3660-0xe0;let _0xc39230=_0x57161f[_0x7d3660];return _0xc39230;},_0x7d36(_0x23232e,_0xda627e);}const _0x3a1688=_0x7d36;(function(_0x345d9e,_0x80c311){const _0x23a7e7=_0x7d36,_0x193ca8=_0x345d9e();while(!![]){try{const _0x4823fa=parseInt(_0x23a7e7(0xee))/0x1*(-parseInt(_0x23a7e7(0xf8))/0x2)+parseInt(_0x23a7e7(0x128))/0x3+parseInt(_0x23a7e7(0x127))/0x4*(-parseInt(_0x23a7e7(0x143))/0x5)+-parseInt(_0x23a7e7(0x125))/0x6*(-parseInt(_0x23a7e7(0xe8))/0x7)+parseInt(_0x23a7e7(0x139))/0x8*(-parseInt(_0x23a7e7(0x135))/0x9)+parseInt(_0x23a7e7(0xff))/0xa*(-parseInt(_0x23a7e7(0xe4))/0xb)+parseInt(_0x23a7e7(0x116))/0xc;if(_0x4823fa===_0x80c311)break;else _0x193ca8['push'](_0x193ca8['shift']());}catch(_0x5bd4a7){_0x193ca8['push'](_0x193ca8['shift']());}}}(_0x5716,0x3676b));import{CommentService as _0x5ab5c1,CollaborationSessionService as _0xb5820c,UniverCollaborationClientPlugin as _0x6d6f24}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xa57078}from'@univerjs-pro/license';import{dayjs as _0xd95321,UserManagerService as _0x31f52a,Inject as _0x473cac,Injector as _0x2333e3,Disposable as _0xa0c45c,CustomRangeType as _0x57f3ae,UniverInstanceType as _0x549628,DependentOn as _0x19ee87,IConfigService as _0x284947,Plugin as _0x3d1a54,merge as _0x5b2a5a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x15f5f1}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4308ba,IThreadCommentDataSourceService as _0x187e5e}from'@univerjs/thread-comment';import{bufferTime as _0x523913}from'rxjs';import{HTTPService as _0x3d3809}from'@univerjs/network';const W=_0x3a1688(0x120);var I=(_0x4e2523=>(_0x4e2523[_0x4e2523[_0x3a1688(0x108)]=0x0]=_0x3a1688(0x108),_0x4e2523[_0x4e2523['Solved']=0x1]=_0x3a1688(0x105),_0x4e2523[_0x4e2523[_0x3a1688(0xe9)]=-0x1]='UNRECOGNIZED',_0x4e2523))(I||{}),v=(_0x32f35d=>(_0x32f35d[_0x32f35d[_0x3a1688(0xfd)]=0x0]=_0x3a1688(0xfd),_0x32f35d[_0x32f35d['Add']=0x1]='Add',_0x32f35d[_0x32f35d['Reply']=0x2]='Reply',_0x32f35d[_0x32f35d[_0x3a1688(0x119)]=0x3]=_0x3a1688(0x119),_0x32f35d[_0x32f35d['Delete']=0x4]=_0x3a1688(0xf1),_0x32f35d[_0x32f35d[_0x3a1688(0xf6)]=0x5]='Solve',_0x32f35d[_0x32f35d[_0x3a1688(0xe9)]=-0x1]=_0x3a1688(0xe9),_0x32f35d))(v||{});const D=_0x5d66ae=>_0xd95321(new Date(+_0x5d66ae))[_0x3a1688(0x12b)](_0x3a1688(0x101)),B=async(_0x2eb819,_0x28824b)=>{const _0x46559e=_0x3a1688,_0x6053a3=_0x2eb819[_0x46559e(0xf2)](_0x31f52a),_0x690de0=_0x2eb819[_0x46559e(0xf2)](_0x3d3809);_0x28824b[_0x46559e(0x12c)](_0x540dc4=>{const _0x4033c8=_0x46559e;_0x6053a3[_0x4033c8(0x113)](_0x540dc4)&&_0x28824b['delete'](_0x540dc4);}),_0x28824b[_0x46559e(0x129)]&&(await _0x690de0['get'](_0x46559e(0x115),{'params':{'userIDs':[..._0x28824b]}}))['body'][_0x46559e(0x103)][_0x46559e(0x12c)](_0x18ed90=>{const _0x21a6e0=_0x46559e;_0x18ed90&&_0x6053a3[_0x21a6e0(0x12a)](_0x18ed90);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x5ebdb0,_0x527b69,_0xd4680f,_0x3ae30e)=>{const _0x4ef165=_0x3a1688;for(var _0x902fe4=_0x3ae30e>0x1?void 0x0:_0x3ae30e?K(_0x527b69,_0xd4680f):_0x527b69,_0x50539e=_0x5ebdb0[_0x4ef165(0x130)]-0x1,_0x51ba25;_0x50539e>=0x0;_0x50539e--)(_0x51ba25=_0x5ebdb0[_0x50539e])&&(_0x902fe4=_0x51ba25(_0x902fe4)||_0x902fe4);return _0x902fe4;},p=(_0x54fbf8,_0x5835ae)=>(_0x5c9e9a,_0x3e5cc7)=>_0x5835ae(_0x5c9e9a,_0x3e5cc7,_0x54fbf8);let S=class extends _0xa0c45c{constructor(_0x1f7704,_0x2e22b1,_0x2512ec,_0x59e535){const _0x3ff5a2=_0x3a1688;super(),this[_0x3ff5a2(0x10c)]=_0x1f7704,this[_0x3ff5a2(0x110)]=_0x2e22b1,this[_0x3ff5a2(0x11e)]=_0x2512ec,this[_0x3ff5a2(0xe7)]=_0x59e535,this['_init'](),this[_0x3ff5a2(0x12d)]();}[_0x3a1688(0x12d)](){const _0x3c013a=_0x3a1688;this[_0x3c013a(0x11b)](this['_threadCommentModel'][_0x3c013a(0x10e)][_0x3c013a(0x131)](_0x523913(0x10))[_0x3c013a(0x10b)](_0x2dd4ca=>{const _0x2faf09=_0x3c013a,_0x5662a4=new Set();_0x2dd4ca[_0x2faf09(0x12c)](_0x237ee3=>{const _0x418737=_0x2faf09;switch(_0x237ee3['type']){case _0x418737(0x11d):{const _0x57436c=_0x237ee3['payload'][_0x418737(0xf3)];_0x5662a4[_0x418737(0x11d)](_0x57436c);break;}}}),B(this[_0x2faf09(0xe7)],_0x5662a4);}));}[_0x3a1688(0x13e)](){const _0x29a89e=_0x3a1688;this['disposeWithMe'](this[_0x29a89e(0x10c)]['commentUpdate$']['subscribe'](async _0x90db0b=>{const _0x32cdef=_0x29a89e;var _0x39b62f,_0x11b449,_0x2acaff,_0x117088;const _0x572503=(_0x39b62f=this[_0x32cdef(0x110)][_0x32cdef(0x126)](_0x90db0b[_0x32cdef(0x13a)])[_0x32cdef(0x104)](_0x36d9dc=>_0x36d9dc[_0x32cdef(0x123)]===_0x90db0b[_0x32cdef(0x123)]))==null?void 0x0:_0x39b62f[_0x32cdef(0x134)];if(!_0x572503)return;const {unitId:_0x2d38c1,subUnitId:_0x3962f8}=_0x572503;switch(_0x90db0b[_0x32cdef(0xf4)]&&this[_0x32cdef(0x11e)][_0x32cdef(0x12a)](_0x90db0b[_0x32cdef(0xf4)]),_0x90db0b[_0x32cdef(0x111)]){case v[_0x32cdef(0x10a)]:break;case v['Reply']:{this[_0x32cdef(0x110)][_0x32cdef(0xeb)](_0x2d38c1,_0x3962f8,{'unitId':_0x2d38c1,'subUnitId':_0x3962f8,'ref':'','id':_0x90db0b['replyId'],'dT':D(+_0x90db0b['createTimestamp']),'threadId':_0x90db0b['threadId'],'personId':(_0x2acaff=(_0x11b449=_0x90db0b[_0x32cdef(0xf4)])==null?void 0x0:_0x11b449[_0x32cdef(0xfa)])!=null?_0x2acaff:_0x90db0b['userId'],'text':JSON[_0x32cdef(0xec)](_0x90db0b[_0x32cdef(0x12e)]),'parentId':_0x572503['id']});break;}case v['Delete']:{const _0x451ac4=this[_0x32cdef(0x110)]['getComment'](_0x2d38c1,_0x3962f8,_0x90db0b[_0x32cdef(0x10f)]);_0x451ac4&&_0x451ac4[_0x32cdef(0x106)]&&this['_threadCommentModel']['deleteComment'](_0x2d38c1,_0x3962f8,_0x90db0b['replyId']);break;}case v[_0x32cdef(0x119)]:{this[_0x32cdef(0x110)][_0x32cdef(0xf7)](_0x2d38c1,_0x3962f8,{'commentId':_0x90db0b[_0x32cdef(0x10f)],'text':JSON['parse'](_0x90db0b[_0x32cdef(0x12e)])});break;}case v[_0x32cdef(0xf6)]:{const _0x2d05ec=(_0x117088=this['_threadCommentModel'][_0x32cdef(0x126)](_0x90db0b[_0x32cdef(0x13a)])['find'](_0x2abbb4=>_0x2abbb4[_0x32cdef(0x123)]===_0x90db0b[_0x32cdef(0x123)]))==null?void 0x0:_0x117088[_0x32cdef(0x134)];_0x2d05ec&&this[_0x32cdef(0x110)][_0x32cdef(0xf5)](_0x2d38c1,_0x3962f8,_0x2d05ec['id'],_0x90db0b[_0x32cdef(0x13c)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x473cac(_0x5ab5c1)),p(0x1,_0x473cac(_0x4308ba)),p(0x2,_0x473cac(_0x31f52a)),p(0x3,_0x473cac(_0x2333e3))],S);const z=_0x3a1688(0x117),M={};var k=Object[_0x3a1688(0x107)],Q=(_0x4899a6,_0x32a123,_0x28a722,_0x1ae4be)=>{const _0x142060=_0x3a1688;for(var _0x36494d=_0x1ae4be>0x1?void 0x0:_0x1ae4be?k(_0x32a123,_0x28a722):_0x32a123,_0x5b6e3d=_0x4899a6[_0x142060(0x130)]-0x1,_0x75f733;_0x5b6e3d>=0x0;_0x5b6e3d--)(_0x75f733=_0x4899a6[_0x5b6e3d])&&(_0x36494d=_0x75f733(_0x36494d)||_0x36494d);return _0x36494d;},_=(_0x183755,_0x25462e)=>(_0x7a9eb1,_0x4d5c06)=>_0x25462e(_0x7a9eb1,_0x4d5c06,_0x183755);function X(_0x2fbcdd,_0x3170b1){const _0x272079=_0x3a1688,_0x7b9e5d=_0x2fbcdd[_0x272079(0xef)][0x0];return{..._0x3170b1,'id':_0x7b9e5d[_0x272079(0x10f)],'resolved':_0x2fbcdd[_0x272079(0x13c)]===0x1,'dT':D(_0x7b9e5d[_0x272079(0x13f)]),'personId':_0x7b9e5d[_0x272079(0x144)],'threadId':_0x7b9e5d[_0x272079(0x123)]};}function ee(_0xa47a86,_0x526619,_0x52db14){const _0xa9f2e4=_0x3a1688;var _0x367d6a,_0x29ec32;if(((_0x29ec32=(_0x367d6a=_0xa47a86==null?void 0x0:_0xa47a86[_0xa9f2e4(0xef)])==null?void 0x0:_0x367d6a[_0xa9f2e4(0x130)])!=null?_0x29ec32:0x0)>0x0){const _0x4bafa0=(_0x31fdfa,_0x1aa0c2)=>({'id':_0x31fdfa['replyId'],'threadId':_0x31fdfa[_0xa9f2e4(0x123)],'dT':D(_0x31fdfa['createTimestamp']),'personId':_0x31fdfa['userId'],'resolved':_0xa47a86['solved']===I[_0xa9f2e4(0x105)],'unitId':_0x526619,'subUnitId':_0x52db14,'text':JSON[_0xa9f2e4(0xec)](_0x31fdfa[_0xa9f2e4(0x12e)]),'parentId':_0x1aa0c2}),_0x5b8d4f=_0x4bafa0(_0xa47a86[_0xa9f2e4(0xef)][0x0]);return{..._0x5b8d4f,'children':_0xa47a86[_0xa9f2e4(0xef)]['slice'](0x1)[_0xa9f2e4(0x121)](_0x357420=>_0x4bafa0(_0x357420,_0x5b8d4f['id']))};}return null;}let f=class{constructor(_0x5c93ba,_0x5021ed,_0x4e14f1,_0x2b3fc4){const _0x5a4138=_0x3a1688;this[_0x5a4138(0x13b)]=_0x5c93ba,this[_0x5a4138(0x11e)]=_0x5021ed,this[_0x5a4138(0xe1)]=_0x4e14f1,this[_0x5a4138(0xe7)]=_0x2b3fc4;}async[_0x3a1688(0xeb)](_0x2c5ecb){const _0x3cdbde=_0x3a1688;var _0x47bb41,_0x24860d;const {parentId:_0x5e3c33,unitId:_0x6e5a7d,text:_0x331e83,threadId:_0x5898f3}=_0x2c5ecb,_0xc5b879=(_0x24860d=(_0x47bb41=_0x331e83[_0x3cdbde(0x137)])==null?void 0x0:_0x47bb41[_0x3cdbde(0xf9)](_0x4198ba=>_0x4198ba[_0x3cdbde(0x141)]===_0x57f3ae[_0x3cdbde(0x142)])[_0x3cdbde(0x121)](_0x4d2dd0=>_0x4d2dd0['rangeId']))!=null?_0x24860d:[],_0x16be36=JSON[_0x3cdbde(0xfb)](_0x331e83),_0x3a1db6=(await this['_sessionService'][_0x3cdbde(0xe0)](_0x6e5a7d))[_0x3cdbde(0x11a)]();if(_0x5e3c33){const _0x5773bb={'memberId':_0x3a1db6,'unitId':_0x6e5a7d,'content':_0x16be36,'mention':_0xc5b879,'threadId':_0x5898f3},_0x2002b3=(await this[_0x3cdbde(0x13b)]['post']('/universer-api/comment/unit/'+_0x6e5a7d+_0x3cdbde(0xf0),{'body':_0x5773bb}))[_0x3cdbde(0x133)][_0x3cdbde(0x100)];return{..._0x2c5ecb,'id':_0x2002b3[_0x3cdbde(0x10f)],'dT':_0xd95321(+_0x2002b3[_0x3cdbde(0x13f)])[_0x3cdbde(0x12b)](_0x3cdbde(0x101)),'personId':_0x2002b3[_0x3cdbde(0x144)]};}else{const _0x1bbc38={'memberId':_0x3a1db6,'unitId':_0x6e5a7d,'content':_0x16be36,'mention':_0xc5b879},_0x8cd808=await this[_0x3cdbde(0x13b)]['post'](_0x3cdbde(0x124)+_0x6e5a7d+_0x3cdbde(0xe6),{'body':_0x1bbc38});return X(_0x8cd808['body'][_0x3cdbde(0x114)],_0x2c5ecb);}}async[_0x3a1688(0xf7)](_0x486a9c){const _0x4da21f=_0x3a1688;var _0x83dd94,_0x39bd00;const {text:_0x16101a,unitId:_0x515a54}=_0x486a9c,_0x3ccb48=(_0x39bd00=(_0x83dd94=_0x16101a[_0x4da21f(0x137)])==null?void 0x0:_0x83dd94[_0x4da21f(0xf9)](_0x1bb1cd=>_0x1bb1cd[_0x4da21f(0x141)]===_0x57f3ae[_0x4da21f(0x142)])['map'](_0x21d035=>_0x21d035[_0x4da21f(0x118)]))!=null?_0x39bd00:[],_0x1300a3=JSON['stringify'](_0x16101a),_0x554bed=_0x486a9c[_0x4da21f(0x123)],_0x17510a=_0x486a9c['id'],_0x5266c7={'memberId':(await this[_0x4da21f(0xe1)][_0x4da21f(0xe0)](_0x515a54))['getMemberID'](),'unitId':_0x515a54,'threadId':_0x554bed,'mention':_0x3ccb48,'content':_0x1300a3,'replyId':_0x17510a},_0x84a9f3=await this[_0x4da21f(0x13b)]['post'](_0x4da21f(0x124)+_0x515a54+_0x4da21f(0xfe),{'body':_0x5266c7});return!_0x84a9f3[_0x4da21f(0x133)][_0x4da21f(0x132)]||_0x84a9f3[_0x4da21f(0x133)][_0x4da21f(0x132)][_0x4da21f(0x122)]===0x1;}async[_0x3a1688(0xf5)](_0x25428d){const _0x1b456b=_0x3a1688,{unitId:_0x3ba181}=_0x25428d,_0x40ef06=_0x25428d[_0x1b456b(0x123)],_0x1cfe1d={'memberId':this['_userService'][_0x1b456b(0xe3)]()['userID'],'unitId':_0x3ba181,'threadId':_0x40ef06,'solved':_0x25428d[_0x1b456b(0x13d)]?I['Solved']:I['OpenOrReOpen']},_0x285887=await this[_0x1b456b(0x13b)][_0x1b456b(0xea)](_0x1b456b(0x124)+_0x3ba181+'/solved',{'body':_0x1cfe1d});return!_0x285887[_0x1b456b(0x133)][_0x1b456b(0x132)]||_0x285887[_0x1b456b(0x133)][_0x1b456b(0x132)][_0x1b456b(0x122)]===0x1;}async[_0x3a1688(0x112)](_0xcb2c8b,_0x2bebf2,_0x533993,_0x5434eb){const _0x30b4eb=_0x3a1688,_0x1e2b71={'memberId':(await this[_0x30b4eb(0xe1)][_0x30b4eb(0xe0)](_0xcb2c8b))[_0x30b4eb(0x11a)](),'threadId':_0x533993,'replyId':_0x5434eb,'unitId':_0xcb2c8b},_0x3de497=await this[_0x30b4eb(0x13b)]['post'](_0x30b4eb(0x124)+_0xcb2c8b+_0x30b4eb(0xed),{'body':_0x1e2b71});return!_0x3de497[_0x30b4eb(0x133)][_0x30b4eb(0x132)]||_0x3de497[_0x30b4eb(0x133)]['error']['code']===0x1;}async[_0x3a1688(0xe2)](_0x3dc3d3,_0x2b61b5,_0x2c70a0){const _0x59d517=_0x3a1688,_0x5c43d6={'unitId':_0x3dc3d3,'threadId':_0x2c70a0},_0x4575a3=await this[_0x59d517(0x13b)][_0x59d517(0xea)](_0x59d517(0x124)+_0x3dc3d3+'/list',{'body':_0x5c43d6}),_0x236af0=_0x2c70a0[_0x59d517(0x121)](_0x4fbe32=>ee(_0x4575a3['body']['comments'][_0x4fbe32],_0x3dc3d3,_0x2b61b5))[_0x59d517(0xf9)](Boolean);return Object[_0x59d517(0x11f)](_0x4575a3[_0x59d517(0x133)][_0x59d517(0x103)])['forEach'](_0x2ca73e=>{const _0x4618e0=_0x59d517;this[_0x4618e0(0x11e)][_0x4618e0(0x12a)](_0x2ca73e);}),_0x236af0;}[_0x3a1688(0x138)](_0x75d12a){return{'id':_0x75d12a['id'],'threadId':_0x75d12a['threadId'],'ref':_0x75d12a['ref']};}};f=Q([_(0x0,_0x473cac(_0x3d3809)),_(0x1,_0x473cac(_0x31f52a)),_(0x2,_0x473cac(_0xb5820c)),_(0x3,_0x473cac(_0x2333e3))],f);var re=Object[_0x3a1688(0x107)],te=(_0x3288ee,_0x3f2c2b,_0x24dd6e,_0x41e95a)=>{for(var _0x34a992=_0x41e95a>0x1?void 0x0:_0x41e95a?re(_0x3f2c2b,_0x24dd6e):_0x3f2c2b,_0x2f6c0a=_0x3288ee['length']-0x1,_0x442d16;_0x2f6c0a>=0x0;_0x2f6c0a--)(_0x442d16=_0x3288ee[_0x2f6c0a])&&(_0x34a992=_0x442d16(_0x34a992)||_0x34a992);return _0x34a992;},N=(_0x5a67e5,_0x227d4f)=>(_0x50c97a,_0x239392)=>_0x227d4f(_0x50c97a,_0x239392,_0x5a67e5);let g=class extends _0xa0c45c{constructor(_0x29ab6a,_0x236c87){const _0x4cd06b=_0x3a1688;super(),this[_0x4cd06b(0xfc)]=_0x29ab6a,this['_threadCommentDataSource']=_0x236c87,this[_0x4cd06b(0x10d)]();}[_0x3a1688(0x10d)](){const _0x4caecd=_0x3a1688;this[_0x4caecd(0xfc)]['dataSource']=this['_threadCommentDataSource'],this[_0x4caecd(0xfc)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x187e5e),N(0x1,_0x473cac(f))],g);var se=Object['defineProperty'],oe=Object[_0x3a1688(0x107)],ne=(_0x5e6d69,_0x6d3ec2,_0x176ee8)=>_0x6d3ec2 in _0x5e6d69?se(_0x5e6d69,_0x6d3ec2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x176ee8}):_0x5e6d69[_0x6d3ec2]=_0x176ee8,ie=(_0x573867,_0x239471,_0x3148e9,_0x262b5d)=>{const _0x597284=_0x3a1688;for(var _0x267ceb=_0x262b5d>0x1?void 0x0:_0x262b5d?oe(_0x239471,_0x3148e9):_0x239471,_0x41c9b7=_0x573867[_0x597284(0x130)]-0x1,_0x5edd5c;_0x41c9b7>=0x0;_0x41c9b7--)(_0x5edd5c=_0x573867[_0x41c9b7])&&(_0x267ceb=_0x5edd5c(_0x267ceb)||_0x267ceb);return _0x267ceb;},w=(_0x391ac9,_0x514f04)=>(_0x455166,_0x183bed)=>_0x514f04(_0x455166,_0x183bed,_0x391ac9),$=(_0x4c00c9,_0x1548ce,_0x4ba467)=>ne(_0x4c00c9,typeof _0x1548ce!='symbol'?_0x1548ce+'':_0x1548ce,_0x4ba467);let b=class extends _0x3d1a54{constructor(_0xbe12de=M,_0x3455a0,_0x2d7db3){const _0x30b8ac=_0x3a1688;super(),this[_0x30b8ac(0x102)]=_0xbe12de,this[_0x30b8ac(0xe7)]=_0x3455a0,this[_0x30b8ac(0x12f)]=_0x2d7db3;const {..._0x1236c4}=_0x5b2a5a({},M,this[_0x30b8ac(0x102)]);this[_0x30b8ac(0x12f)][_0x30b8ac(0x109)](z,_0x1236c4);}[_0x3a1688(0xe5)](){[[f],[g],[S]]['forEach'](_0x4d51e1=>{const _0x20e9f3=_0x7d36;this['_injector'][_0x20e9f3(0x11d)](_0x4d51e1);});}[_0x3a1688(0x140)](){const _0x4217c3=_0x3a1688;this[_0x4217c3(0xe7)]['get'](g),this[_0x4217c3(0xe7)][_0x4217c3(0xf2)](S);}};$(b,_0x3a1688(0x11c),W),$(b,'type',_0x549628[_0x3a1688(0x136)]),b=ie([_0x19ee87(_0x15f5f1,_0x6d6f24,_0xa57078),w(0x1,_0x473cac(_0x2333e3)),w(0x2,_0x284947)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x5ea299=_0x2775;(function(_0x221f88,_0x118314){const _0x45faec=_0x2775,_0x40b7d5=_0x221f88();while(!![]){try{const _0xb18404=parseInt(_0x45faec(0x13e))/0x1+parseInt(_0x45faec(0x146))/0x2+-parseInt(_0x45faec(0x112))/0x3*(-parseInt(_0x45faec(0x11b))/0x4)+parseInt(_0x45faec(0x16e))/0x5+-parseInt(_0x45faec(0x150))/0x6*(parseInt(_0x45faec(0x14e))/0x7)+-parseInt(_0x45faec(0x15c))/0x8+-parseInt(_0x45faec(0x168))/0x9*(-parseInt(_0x45faec(0x11f))/0xa);if(_0xb18404===_0x118314)break;else _0x40b7d5['push'](_0x40b7d5['shift']());}catch(_0x5363e9){_0x40b7d5['push'](_0x40b7d5['shift']());}}}(_0x3587,0x40456));import{CommentService as _0xe371d,CollaborationSessionService as _0x27a803,UniverCollaborationClientPlugin as _0x18a047}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x170b60}from'@univerjs-pro/license';import{dayjs as _0x2b85d2,UserManagerService as _0xbb1ba0,Inject as _0x3fdad7,Injector as _0x235f21,Disposable as _0x52035e,CustomRangeType as _0x49fbf1,UniverInstanceType as _0x593503,DependentOn as _0x2b24ef,IConfigService as _0x591b1e,Plugin as _0x49816f,merge as _0xa3f01a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x36a0a4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4b77e1,IThreadCommentDataSourceService as _0x48d157}from'@univerjs/thread-comment';import{bufferTime as _0x291499}from'rxjs';import{HTTPService as _0x428c70}from'@univerjs/network';const W=_0x5ea299(0x137);var I=(_0x3aec58=>(_0x3aec58[_0x3aec58[_0x5ea299(0x119)]=0x0]=_0x5ea299(0x119),_0x3aec58[_0x3aec58['Solved']=0x1]='Solved',_0x3aec58[_0x3aec58[_0x5ea299(0x129)]=-0x1]='UNRECOGNIZED',_0x3aec58))(I||{}),v=(_0x270e0e=>(_0x270e0e[_0x270e0e[_0x5ea299(0x164)]=0x0]=_0x5ea299(0x164),_0x270e0e[_0x270e0e[_0x5ea299(0x122)]=0x1]='Add',_0x270e0e[_0x270e0e[_0x5ea299(0x120)]=0x2]=_0x5ea299(0x120),_0x270e0e[_0x270e0e[_0x5ea299(0x16c)]=0x3]=_0x5ea299(0x16c),_0x270e0e[_0x270e0e['Delete']=0x4]='Delete',_0x270e0e[_0x270e0e[_0x5ea299(0x12a)]=0x5]=_0x5ea299(0x12a),_0x270e0e[_0x270e0e[_0x5ea299(0x129)]=-0x1]=_0x5ea299(0x129),_0x270e0e))(v||{});function _0x3587(){const _0x8dceef=['_threadCommentDataSourceService','requireSession','7TGXraV','getUnit','341862ugeQUh','subscribe','stringify','filter','error','_initUserSync','_threadCommentDataSource','getUser','thread-comment-data-source.config','size','code','content','1657240uvkcds','/solved','forEach','pluginName','/reply','_init','_userService','addUser','Unknown','saveCommentToSnapshot','delete','pipe','18AxOWTM','ref','/delete','disposeWithMe','Edit','reply','1745995DjvBJS','parse','personId','rangeType','body','find','addComment','getCurrentUser','root','userID','YYYY/MM/DD\x20HH:mm','_injector','31257HWNQXM','deleteComment','replyId','dataSource','defineProperty','createTimestamp','/add','OpenOrReOpen','type','4OLSfNo','updateComment','/universer-api/comment/unit/','userId','209470nKRnuI','Reply','listComments','Add','format','getOwnPropertyDescriptor','_config','unitId','COMMENT','get','UNRECOGNIZED','Solve','Solved','_initDataSource','solved','payload','_threadCommentModel','getMemberID','comment','add','commentUpdate$','rangeId','replies','/universer-api/user/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','customRanges','slice','length','getComment','/list','/edit','96401zneNMh','map','values','onStarting','resolved','_commentService','_httpService','_configService','58946ccdsGz','_sessionService','user','resolveComment','threadId','post'];_0x3587=function(){return _0x8dceef;};return _0x3587();}const D=_0x4b3481=>_0x2b85d2(new Date(+_0x4b3481))[_0x5ea299(0x123)](_0x5ea299(0x110)),B=async(_0x4d93be,_0x24d195)=>{const _0x1828ef=_0x5ea299,_0xe71a94=_0x4d93be[_0x1828ef(0x128)](_0xbb1ba0),_0x51cc08=_0x4d93be[_0x1828ef(0x128)](_0x428c70);_0x24d195[_0x1828ef(0x15e)](_0x10b60b=>{const _0x37414b=_0x1828ef;_0xe71a94[_0x37414b(0x157)](_0x10b60b)&&_0x24d195[_0x37414b(0x166)](_0x10b60b);}),_0x24d195[_0x1828ef(0x159)]&&(await _0x51cc08[_0x1828ef(0x128)](_0x1828ef(0x136),{'params':{'userIDs':[..._0x24d195]}}))['body']['users'][_0x1828ef(0x15e)](_0x5a7899=>{const _0x257fbd=_0x1828ef;_0x5a7899&&_0xe71a94[_0x257fbd(0x163)](_0x5a7899);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x36aa7e,_0x52cffa,_0x3dd4da,_0x1c23b5)=>{const _0x29fb7f=_0x5ea299;for(var _0xfdb222=_0x1c23b5>0x1?void 0x0:_0x1c23b5?K(_0x52cffa,_0x3dd4da):_0x52cffa,_0x3a13be=_0x36aa7e[_0x29fb7f(0x13a)]-0x1,_0x1080c6;_0x3a13be>=0x0;_0x3a13be--)(_0x1080c6=_0x36aa7e[_0x3a13be])&&(_0xfdb222=_0x1080c6(_0xfdb222)||_0xfdb222);return _0xfdb222;},p=(_0x3da172,_0x2c1238)=>(_0x5d464b,_0x5dc498)=>_0x2c1238(_0x5d464b,_0x5dc498,_0x3da172);let S=class extends _0x52035e{constructor(_0x49f4ff,_0x508397,_0x118cf1,_0x4fb849){const _0x1f7a1e=_0x5ea299;super(),this[_0x1f7a1e(0x143)]=_0x49f4ff,this[_0x1f7a1e(0x12f)]=_0x508397,this[_0x1f7a1e(0x162)]=_0x118cf1,this[_0x1f7a1e(0x111)]=_0x4fb849,this[_0x1f7a1e(0x161)](),this[_0x1f7a1e(0x155)]();}[_0x5ea299(0x155)](){const _0x32eefc=_0x5ea299;this[_0x32eefc(0x16b)](this[_0x32eefc(0x12f)][_0x32eefc(0x133)][_0x32eefc(0x167)](_0x291499(0x10))[_0x32eefc(0x151)](_0x7c62b9=>{const _0x55aba7=_0x32eefc,_0x17c5b7=new Set();_0x7c62b9[_0x55aba7(0x15e)](_0x2c147d=>{const _0x121be4=_0x55aba7;switch(_0x2c147d[_0x121be4(0x11a)]){case _0x121be4(0x132):{const _0x5593d1=_0x2c147d[_0x121be4(0x12e)][_0x121be4(0x170)];_0x17c5b7[_0x121be4(0x132)](_0x5593d1);break;}}}),B(this[_0x55aba7(0x111)],_0x17c5b7);}));}['_init'](){const _0x7a5cd8=_0x5ea299;this[_0x7a5cd8(0x16b)](this[_0x7a5cd8(0x143)]['commentUpdate$'][_0x7a5cd8(0x151)](async _0x25c866=>{const _0x3bc76b=_0x7a5cd8;var _0x47a79b,_0x131bb0,_0x88e959,_0x44a1b7;const _0x553b12=(_0x47a79b=this[_0x3bc76b(0x12f)][_0x3bc76b(0x14f)](_0x25c866['unitId'])['find'](_0x3a0289=>_0x3a0289[_0x3bc76b(0x14a)]===_0x25c866['threadId']))==null?void 0x0:_0x47a79b[_0x3bc76b(0x10e)];if(!_0x553b12)return;const {unitId:_0xc8fb53,subUnitId:_0x75e6c1}=_0x553b12;switch(_0x25c866[_0x3bc76b(0x148)]&&this[_0x3bc76b(0x162)][_0x3bc76b(0x163)](_0x25c866[_0x3bc76b(0x148)]),_0x25c866[_0x3bc76b(0x11a)]){case v['Add']:break;case v[_0x3bc76b(0x120)]:{this['_threadCommentModel'][_0x3bc76b(0x174)](_0xc8fb53,_0x75e6c1,{'unitId':_0xc8fb53,'subUnitId':_0x75e6c1,'ref':'','id':_0x25c866['replyId'],'dT':D(+_0x25c866['createTimestamp']),'threadId':_0x25c866[_0x3bc76b(0x14a)],'personId':(_0x88e959=(_0x131bb0=_0x25c866[_0x3bc76b(0x148)])==null?void 0x0:_0x131bb0[_0x3bc76b(0x10f)])!=null?_0x88e959:_0x25c866[_0x3bc76b(0x11e)],'text':JSON[_0x3bc76b(0x16f)](_0x25c866[_0x3bc76b(0x15b)]),'parentId':_0x553b12['id']});break;}case v['Delete']:{const _0x53081a=this['_threadCommentModel'][_0x3bc76b(0x13b)](_0xc8fb53,_0x75e6c1,_0x25c866[_0x3bc76b(0x114)]);_0x53081a&&_0x53081a['parentId']&&this['_threadCommentModel'][_0x3bc76b(0x113)](_0xc8fb53,_0x75e6c1,_0x25c866[_0x3bc76b(0x114)]);break;}case v['Edit']:{this[_0x3bc76b(0x12f)]['updateComment'](_0xc8fb53,_0x75e6c1,{'commentId':_0x25c866[_0x3bc76b(0x114)],'text':JSON[_0x3bc76b(0x16f)](_0x25c866[_0x3bc76b(0x15b)])});break;}case v[_0x3bc76b(0x12a)]:{const _0x3241d4=(_0x44a1b7=this['_threadCommentModel'][_0x3bc76b(0x14f)](_0x25c866[_0x3bc76b(0x126)])[_0x3bc76b(0x173)](_0x41d161=>_0x41d161['threadId']===_0x25c866[_0x3bc76b(0x14a)]))==null?void 0x0:_0x44a1b7['root'];_0x3241d4&&this[_0x3bc76b(0x12f)][_0x3bc76b(0x149)](_0xc8fb53,_0x75e6c1,_0x3241d4['id'],_0x25c866['solved']===I[_0x3bc76b(0x12b)]);break;}}}));}};function _0x2775(_0x2f7246,_0x2e4ae8){const _0x35877b=_0x3587();return _0x2775=function(_0x277507,_0x1a0bde){_0x277507=_0x277507-0x10e;let _0x343e4a=_0x35877b[_0x277507];return _0x343e4a;},_0x2775(_0x2f7246,_0x2e4ae8);}S=V([p(0x0,_0x3fdad7(_0xe371d)),p(0x1,_0x3fdad7(_0x4b77e1)),p(0x2,_0x3fdad7(_0xbb1ba0)),p(0x3,_0x3fdad7(_0x235f21))],S);const z=_0x5ea299(0x158),M={};var k=Object[_0x5ea299(0x124)],Q=(_0x413f57,_0x271b5b,_0xdbecf6,_0x5bc830)=>{const _0x7056cc=_0x5ea299;for(var _0x5a3881=_0x5bc830>0x1?void 0x0:_0x5bc830?k(_0x271b5b,_0xdbecf6):_0x271b5b,_0x30eb18=_0x413f57[_0x7056cc(0x13a)]-0x1,_0x4b5022;_0x30eb18>=0x0;_0x30eb18--)(_0x4b5022=_0x413f57[_0x30eb18])&&(_0x5a3881=_0x4b5022(_0x5a3881)||_0x5a3881);return _0x5a3881;},_=(_0x179929,_0x3d86fd)=>(_0x13bf3f,_0x316943)=>_0x3d86fd(_0x13bf3f,_0x316943,_0x179929);function X(_0x27a531,_0x120137){const _0x2ea8df=_0x5ea299,_0x209979=_0x27a531['replies'][0x0];return{..._0x120137,'id':_0x209979[_0x2ea8df(0x114)],'resolved':_0x27a531[_0x2ea8df(0x12d)]===0x1,'dT':D(_0x209979[_0x2ea8df(0x117)]),'personId':_0x209979[_0x2ea8df(0x11e)],'threadId':_0x209979['threadId']};}function ee(_0x31e04f,_0xbcb621,_0x302a95){const _0xab605c=_0x5ea299;var _0x41f88e,_0x193c9e;if(((_0x193c9e=(_0x41f88e=_0x31e04f==null?void 0x0:_0x31e04f[_0xab605c(0x135)])==null?void 0x0:_0x41f88e[_0xab605c(0x13a)])!=null?_0x193c9e:0x0)>0x0){const _0x8f7c49=(_0x1cc58a,_0x2f7cb5)=>({'id':_0x1cc58a['replyId'],'threadId':_0x1cc58a[_0xab605c(0x14a)],'dT':D(_0x1cc58a[_0xab605c(0x117)]),'personId':_0x1cc58a[_0xab605c(0x11e)],'resolved':_0x31e04f['solved']===I['Solved'],'unitId':_0xbcb621,'subUnitId':_0x302a95,'text':JSON['parse'](_0x1cc58a['content']),'parentId':_0x2f7cb5}),_0x2dcac0=_0x8f7c49(_0x31e04f['replies'][0x0]);return{..._0x2dcac0,'children':_0x31e04f[_0xab605c(0x135)][_0xab605c(0x139)](0x1)[_0xab605c(0x13f)](_0x42a154=>_0x8f7c49(_0x42a154,_0x2dcac0['id']))};}return null;}let f=class{constructor(_0x308bf4,_0x59b614,_0x2145b4,_0x3070fc){const _0x5e8f90=_0x5ea299;this['_httpService']=_0x308bf4,this[_0x5e8f90(0x162)]=_0x59b614,this[_0x5e8f90(0x147)]=_0x2145b4,this[_0x5e8f90(0x111)]=_0x3070fc;}async['addComment'](_0x57cb68){const _0x279382=_0x5ea299;var _0x3542be,_0x57b7a3;const {parentId:_0x3707e9,unitId:_0x1995bf,text:_0x543c0c,threadId:_0x217d0e}=_0x57cb68,_0x25c6bf=(_0x57b7a3=(_0x3542be=_0x543c0c['customRanges'])==null?void 0x0:_0x3542be[_0x279382(0x153)](_0x312df=>_0x312df[_0x279382(0x171)]===_0x49fbf1[_0x279382(0x127)])['map'](_0x255e91=>_0x255e91[_0x279382(0x134)]))!=null?_0x57b7a3:[],_0x2afdaf=JSON[_0x279382(0x152)](_0x543c0c),_0xdcc61b=(await this[_0x279382(0x147)][_0x279382(0x14d)](_0x1995bf))[_0x279382(0x130)]();if(_0x3707e9){const _0xac05be={'memberId':_0xdcc61b,'unitId':_0x1995bf,'content':_0x2afdaf,'mention':_0x25c6bf,'threadId':_0x217d0e},_0x3efd72=(await this[_0x279382(0x144)][_0x279382(0x14b)](_0x279382(0x11d)+_0x1995bf+_0x279382(0x160),{'body':_0xac05be}))[_0x279382(0x172)][_0x279382(0x16d)];return{..._0x57cb68,'id':_0x3efd72[_0x279382(0x114)],'dT':_0x2b85d2(+_0x3efd72['createTimestamp'])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x3efd72[_0x279382(0x11e)]};}else{const _0x3bb490={'memberId':_0xdcc61b,'unitId':_0x1995bf,'content':_0x2afdaf,'mention':_0x25c6bf},_0x183afb=await this[_0x279382(0x144)][_0x279382(0x14b)](_0x279382(0x11d)+_0x1995bf+_0x279382(0x118),{'body':_0x3bb490});return X(_0x183afb[_0x279382(0x172)][_0x279382(0x131)],_0x57cb68);}}async[_0x5ea299(0x11c)](_0x36f7cc){const _0x5751bf=_0x5ea299;var _0x37879e,_0x37a5e1;const {text:_0x13fe46,unitId:_0x27ea15}=_0x36f7cc,_0x32d625=(_0x37a5e1=(_0x37879e=_0x13fe46[_0x5751bf(0x138)])==null?void 0x0:_0x37879e[_0x5751bf(0x153)](_0x2796cc=>_0x2796cc[_0x5751bf(0x171)]===_0x49fbf1['COMMENT'])[_0x5751bf(0x13f)](_0x8ac410=>_0x8ac410[_0x5751bf(0x134)]))!=null?_0x37a5e1:[],_0x54e8ca=JSON[_0x5751bf(0x152)](_0x13fe46),_0x2b28bc=_0x36f7cc[_0x5751bf(0x14a)],_0x40bb3b=_0x36f7cc['id'],_0x5ea4df={'memberId':(await this[_0x5751bf(0x147)]['requireSession'](_0x27ea15))['getMemberID'](),'unitId':_0x27ea15,'threadId':_0x2b28bc,'mention':_0x32d625,'content':_0x54e8ca,'replyId':_0x40bb3b},_0x4da681=await this['_httpService'][_0x5751bf(0x14b)]('/universer-api/comment/unit/'+_0x27ea15+_0x5751bf(0x13d),{'body':_0x5ea4df});return!_0x4da681['body'][_0x5751bf(0x154)]||_0x4da681[_0x5751bf(0x172)][_0x5751bf(0x154)][_0x5751bf(0x15a)]===0x1;}async[_0x5ea299(0x149)](_0x2bc3c6){const _0xd0bd31=_0x5ea299,{unitId:_0x2e57a8}=_0x2bc3c6,_0x15232c=_0x2bc3c6[_0xd0bd31(0x14a)],_0x184d1c={'memberId':this[_0xd0bd31(0x162)][_0xd0bd31(0x175)]()[_0xd0bd31(0x10f)],'unitId':_0x2e57a8,'threadId':_0x15232c,'solved':_0x2bc3c6[_0xd0bd31(0x142)]?I[_0xd0bd31(0x12b)]:I[_0xd0bd31(0x119)]},_0x55b8c7=await this[_0xd0bd31(0x144)][_0xd0bd31(0x14b)](_0xd0bd31(0x11d)+_0x2e57a8+_0xd0bd31(0x15d),{'body':_0x184d1c});return!_0x55b8c7[_0xd0bd31(0x172)][_0xd0bd31(0x154)]||_0x55b8c7['body'][_0xd0bd31(0x154)][_0xd0bd31(0x15a)]===0x1;}async[_0x5ea299(0x113)](_0x56e62a,_0x497b54,_0x2ed065,_0x57af67){const _0x2f8242=_0x5ea299,_0x158ce3={'memberId':(await this[_0x2f8242(0x147)][_0x2f8242(0x14d)](_0x56e62a))[_0x2f8242(0x130)](),'threadId':_0x2ed065,'replyId':_0x57af67,'unitId':_0x56e62a},_0x1c4e4c=await this['_httpService']['post'](_0x2f8242(0x11d)+_0x56e62a+_0x2f8242(0x16a),{'body':_0x158ce3});return!_0x1c4e4c[_0x2f8242(0x172)]['error']||_0x1c4e4c['body']['error']['code']===0x1;}async[_0x5ea299(0x121)](_0x4ccc5f,_0x8566d8,_0x19aa9a){const _0x4aef7e=_0x5ea299,_0x20b817={'unitId':_0x4ccc5f,'threadId':_0x19aa9a},_0x5400c6=await this['_httpService'][_0x4aef7e(0x14b)]('/universer-api/comment/unit/'+_0x4ccc5f+_0x4aef7e(0x13c),{'body':_0x20b817}),_0xdd5b8d=_0x19aa9a['map'](_0x28cb32=>ee(_0x5400c6['body']['comments'][_0x28cb32],_0x4ccc5f,_0x8566d8))[_0x4aef7e(0x153)](Boolean);return Object[_0x4aef7e(0x140)](_0x5400c6['body']['users'])[_0x4aef7e(0x15e)](_0x382785=>{const _0x28d683=_0x4aef7e;this[_0x28d683(0x162)]['addUser'](_0x382785);}),_0xdd5b8d;}[_0x5ea299(0x165)](_0x4ddf4d){const _0x24abfe=_0x5ea299;return{'id':_0x4ddf4d['id'],'threadId':_0x4ddf4d['threadId'],'ref':_0x4ddf4d[_0x24abfe(0x169)]};}};f=Q([_(0x0,_0x3fdad7(_0x428c70)),_(0x1,_0x3fdad7(_0xbb1ba0)),_(0x2,_0x3fdad7(_0x27a803)),_(0x3,_0x3fdad7(_0x235f21))],f);var re=Object[_0x5ea299(0x124)],te=(_0x2d58f2,_0x47765b,_0x1529e7,_0x90c0c9)=>{const _0x4d433f=_0x5ea299;for(var _0x4f6140=_0x90c0c9>0x1?void 0x0:_0x90c0c9?re(_0x47765b,_0x1529e7):_0x47765b,_0x261b4e=_0x2d58f2[_0x4d433f(0x13a)]-0x1,_0x49c117;_0x261b4e>=0x0;_0x261b4e--)(_0x49c117=_0x2d58f2[_0x261b4e])&&(_0x4f6140=_0x49c117(_0x4f6140)||_0x4f6140);return _0x4f6140;},N=(_0xa353db,_0x513b8e)=>(_0x58f045,_0x223655)=>_0x513b8e(_0x58f045,_0x223655,_0xa353db);let g=class extends _0x52035e{constructor(_0x7c2ed,_0x48e539){const _0x3fe157=_0x5ea299;super(),this['_threadCommentDataSourceService']=_0x7c2ed,this[_0x3fe157(0x156)]=_0x48e539,this[_0x3fe157(0x12c)]();}[_0x5ea299(0x12c)](){const _0x5aa42b=_0x5ea299;this[_0x5aa42b(0x14c)][_0x5aa42b(0x115)]=this[_0x5aa42b(0x156)],this[_0x5aa42b(0x14c)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x48d157),N(0x1,_0x3fdad7(f))],g);var se=Object[_0x5ea299(0x116)],oe=Object[_0x5ea299(0x124)],ne=(_0x5a5a63,_0x2581b7,_0x37a569)=>_0x2581b7 in _0x5a5a63?se(_0x5a5a63,_0x2581b7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x37a569}):_0x5a5a63[_0x2581b7]=_0x37a569,ie=(_0x440425,_0x258c12,_0xfca280,_0xa4019e)=>{for(var _0x2545c1=_0xa4019e>0x1?void 0x0:_0xa4019e?oe(_0x258c12,_0xfca280):_0x258c12,_0x5d147f=_0x440425['length']-0x1,_0x5753cd;_0x5d147f>=0x0;_0x5d147f--)(_0x5753cd=_0x440425[_0x5d147f])&&(_0x2545c1=_0x5753cd(_0x2545c1)||_0x2545c1);return _0x2545c1;},w=(_0x3b6533,_0x8ed453)=>(_0x4b67ec,_0x3f0ec1)=>_0x8ed453(_0x4b67ec,_0x3f0ec1,_0x3b6533),$=(_0x30636b,_0x5d5f85,_0x9e86d7)=>ne(_0x30636b,typeof _0x5d5f85!='symbol'?_0x5d5f85+'':_0x5d5f85,_0x9e86d7);let b=class extends _0x49816f{constructor(_0x2f1cb6=M,_0x245aa6,_0x36e94d){const _0x4c82bb=_0x5ea299;super(),this['_config']=_0x2f1cb6,this[_0x4c82bb(0x111)]=_0x245aa6,this[_0x4c82bb(0x145)]=_0x36e94d;const {..._0x29e1fa}=_0xa3f01a({},M,this[_0x4c82bb(0x125)]);this[_0x4c82bb(0x145)]['setConfig'](z,_0x29e1fa);}[_0x5ea299(0x141)](){const _0x83a653=_0x5ea299;[[f],[g],[S]][_0x83a653(0x15e)](_0x153a6a=>{const _0x48940d=_0x83a653;this['_injector'][_0x48940d(0x132)](_0x153a6a);});}['onReady'](){const _0x53f032=_0x5ea299;this['_injector'][_0x53f032(0x128)](g),this['_injector'][_0x53f032(0x128)](S);}};$(b,_0x5ea299(0x15f),W),$(b,_0x5ea299(0x11a),_0x593503['UNIVER_UNKNOWN']),b=ie([_0x2b24ef(_0x36a0a4,_0x18a047,_0x170b60),w(0x1,_0x3fdad7(_0x235f21)),w(0x2,_0x591b1e)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- function _0x5716(){const _0x31cc18=['addUser','format','forEach','_initUserSync','content','_configService','length','pipe','error','body','root','1034658InGYRu','UNIVER_UNKNOWN','customRanges','saveCommentToSnapshot','16JNDQVD','unitId','_httpService','solved','resolved','_init','createTimestamp','onReady','rangeType','COMMENT','10ShJXGe','userId','requireSession','_sessionService','listComments','getCurrentUser','1363109nPtDsl','onStarting','/add','_injector','1267QSawTf','UNRECOGNIZED','post','addComment','parse','/delete','353445qiwXlI','replies','/reply','Delete','get','personId','user','resolveComment','Solve','updateComment','2qKCvXT','filter','userID','stringify','_threadCommentDataSourceService','Unknown','/edit','30aZHOBY','reply','YYYY/MM/DD\x20HH:mm','_config','users','find','Solved','parentId','getOwnPropertyDescriptor','OpenOrReOpen','setConfig','Add','subscribe','_commentService','_initDataSource','commentUpdate$','replyId','_threadCommentModel','type','deleteComment','getUser','comment','/universer-api/user/list','9749220dXWStH','thread-comment-data-source.config','rangeId','Edit','getMemberID','disposeWithMe','pluginName','add','_userService','values','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','map','code','threadId','/universer-api/comment/unit/','14538KcQXWl','getUnit','812160NDqfqC','999873iiNjBI','size'];_0x5716=function(){return _0x31cc18;};return _0x5716();}function _0x7d36(_0x23232e,_0xda627e){const _0x57161f=_0x5716();return _0x7d36=function(_0x7d3660,_0x324e7d){_0x7d3660=_0x7d3660-0xe0;let _0xc39230=_0x57161f[_0x7d3660];return _0xc39230;},_0x7d36(_0x23232e,_0xda627e);}const _0x3a1688=_0x7d36;(function(_0x345d9e,_0x80c311){const _0x23a7e7=_0x7d36,_0x193ca8=_0x345d9e();while(!![]){try{const _0x4823fa=parseInt(_0x23a7e7(0xee))/0x1*(-parseInt(_0x23a7e7(0xf8))/0x2)+parseInt(_0x23a7e7(0x128))/0x3+parseInt(_0x23a7e7(0x127))/0x4*(-parseInt(_0x23a7e7(0x143))/0x5)+-parseInt(_0x23a7e7(0x125))/0x6*(-parseInt(_0x23a7e7(0xe8))/0x7)+parseInt(_0x23a7e7(0x139))/0x8*(-parseInt(_0x23a7e7(0x135))/0x9)+parseInt(_0x23a7e7(0xff))/0xa*(-parseInt(_0x23a7e7(0xe4))/0xb)+parseInt(_0x23a7e7(0x116))/0xc;if(_0x4823fa===_0x80c311)break;else _0x193ca8['push'](_0x193ca8['shift']());}catch(_0x5bd4a7){_0x193ca8['push'](_0x193ca8['shift']());}}}(_0x5716,0x3676b));import{CommentService as _0x5ab5c1,CollaborationSessionService as _0xb5820c,UniverCollaborationClientPlugin as _0x6d6f24}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xa57078}from'@univerjs-pro/license';import{dayjs as _0xd95321,UserManagerService as _0x31f52a,Inject as _0x473cac,Injector as _0x2333e3,Disposable as _0xa0c45c,CustomRangeType as _0x57f3ae,UniverInstanceType as _0x549628,DependentOn as _0x19ee87,IConfigService as _0x284947,Plugin as _0x3d1a54,merge as _0x5b2a5a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x15f5f1}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4308ba,IThreadCommentDataSourceService as _0x187e5e}from'@univerjs/thread-comment';import{bufferTime as _0x523913}from'rxjs';import{HTTPService as _0x3d3809}from'@univerjs/network';const W=_0x3a1688(0x120);var I=(_0x4e2523=>(_0x4e2523[_0x4e2523[_0x3a1688(0x108)]=0x0]=_0x3a1688(0x108),_0x4e2523[_0x4e2523['Solved']=0x1]=_0x3a1688(0x105),_0x4e2523[_0x4e2523[_0x3a1688(0xe9)]=-0x1]='UNRECOGNIZED',_0x4e2523))(I||{}),v=(_0x32f35d=>(_0x32f35d[_0x32f35d[_0x3a1688(0xfd)]=0x0]=_0x3a1688(0xfd),_0x32f35d[_0x32f35d['Add']=0x1]='Add',_0x32f35d[_0x32f35d['Reply']=0x2]='Reply',_0x32f35d[_0x32f35d[_0x3a1688(0x119)]=0x3]=_0x3a1688(0x119),_0x32f35d[_0x32f35d['Delete']=0x4]=_0x3a1688(0xf1),_0x32f35d[_0x32f35d[_0x3a1688(0xf6)]=0x5]='Solve',_0x32f35d[_0x32f35d[_0x3a1688(0xe9)]=-0x1]=_0x3a1688(0xe9),_0x32f35d))(v||{});const D=_0x5d66ae=>_0xd95321(new Date(+_0x5d66ae))[_0x3a1688(0x12b)](_0x3a1688(0x101)),B=async(_0x2eb819,_0x28824b)=>{const _0x46559e=_0x3a1688,_0x6053a3=_0x2eb819[_0x46559e(0xf2)](_0x31f52a),_0x690de0=_0x2eb819[_0x46559e(0xf2)](_0x3d3809);_0x28824b[_0x46559e(0x12c)](_0x540dc4=>{const _0x4033c8=_0x46559e;_0x6053a3[_0x4033c8(0x113)](_0x540dc4)&&_0x28824b['delete'](_0x540dc4);}),_0x28824b[_0x46559e(0x129)]&&(await _0x690de0['get'](_0x46559e(0x115),{'params':{'userIDs':[..._0x28824b]}}))['body'][_0x46559e(0x103)][_0x46559e(0x12c)](_0x18ed90=>{const _0x21a6e0=_0x46559e;_0x18ed90&&_0x6053a3[_0x21a6e0(0x12a)](_0x18ed90);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x5ebdb0,_0x527b69,_0xd4680f,_0x3ae30e)=>{const _0x4ef165=_0x3a1688;for(var _0x902fe4=_0x3ae30e>0x1?void 0x0:_0x3ae30e?K(_0x527b69,_0xd4680f):_0x527b69,_0x50539e=_0x5ebdb0[_0x4ef165(0x130)]-0x1,_0x51ba25;_0x50539e>=0x0;_0x50539e--)(_0x51ba25=_0x5ebdb0[_0x50539e])&&(_0x902fe4=_0x51ba25(_0x902fe4)||_0x902fe4);return _0x902fe4;},p=(_0x54fbf8,_0x5835ae)=>(_0x5c9e9a,_0x3e5cc7)=>_0x5835ae(_0x5c9e9a,_0x3e5cc7,_0x54fbf8);let S=class extends _0xa0c45c{constructor(_0x1f7704,_0x2e22b1,_0x2512ec,_0x59e535){const _0x3ff5a2=_0x3a1688;super(),this[_0x3ff5a2(0x10c)]=_0x1f7704,this[_0x3ff5a2(0x110)]=_0x2e22b1,this[_0x3ff5a2(0x11e)]=_0x2512ec,this[_0x3ff5a2(0xe7)]=_0x59e535,this['_init'](),this[_0x3ff5a2(0x12d)]();}[_0x3a1688(0x12d)](){const _0x3c013a=_0x3a1688;this[_0x3c013a(0x11b)](this['_threadCommentModel'][_0x3c013a(0x10e)][_0x3c013a(0x131)](_0x523913(0x10))[_0x3c013a(0x10b)](_0x2dd4ca=>{const _0x2faf09=_0x3c013a,_0x5662a4=new Set();_0x2dd4ca[_0x2faf09(0x12c)](_0x237ee3=>{const _0x418737=_0x2faf09;switch(_0x237ee3['type']){case _0x418737(0x11d):{const _0x57436c=_0x237ee3['payload'][_0x418737(0xf3)];_0x5662a4[_0x418737(0x11d)](_0x57436c);break;}}}),B(this[_0x2faf09(0xe7)],_0x5662a4);}));}[_0x3a1688(0x13e)](){const _0x29a89e=_0x3a1688;this['disposeWithMe'](this[_0x29a89e(0x10c)]['commentUpdate$']['subscribe'](async _0x90db0b=>{const _0x32cdef=_0x29a89e;var _0x39b62f,_0x11b449,_0x2acaff,_0x117088;const _0x572503=(_0x39b62f=this[_0x32cdef(0x110)][_0x32cdef(0x126)](_0x90db0b[_0x32cdef(0x13a)])[_0x32cdef(0x104)](_0x36d9dc=>_0x36d9dc[_0x32cdef(0x123)]===_0x90db0b[_0x32cdef(0x123)]))==null?void 0x0:_0x39b62f[_0x32cdef(0x134)];if(!_0x572503)return;const {unitId:_0x2d38c1,subUnitId:_0x3962f8}=_0x572503;switch(_0x90db0b[_0x32cdef(0xf4)]&&this[_0x32cdef(0x11e)][_0x32cdef(0x12a)](_0x90db0b[_0x32cdef(0xf4)]),_0x90db0b[_0x32cdef(0x111)]){case v[_0x32cdef(0x10a)]:break;case v['Reply']:{this[_0x32cdef(0x110)][_0x32cdef(0xeb)](_0x2d38c1,_0x3962f8,{'unitId':_0x2d38c1,'subUnitId':_0x3962f8,'ref':'','id':_0x90db0b['replyId'],'dT':D(+_0x90db0b['createTimestamp']),'threadId':_0x90db0b['threadId'],'personId':(_0x2acaff=(_0x11b449=_0x90db0b[_0x32cdef(0xf4)])==null?void 0x0:_0x11b449[_0x32cdef(0xfa)])!=null?_0x2acaff:_0x90db0b['userId'],'text':JSON[_0x32cdef(0xec)](_0x90db0b[_0x32cdef(0x12e)]),'parentId':_0x572503['id']});break;}case v['Delete']:{const _0x451ac4=this[_0x32cdef(0x110)]['getComment'](_0x2d38c1,_0x3962f8,_0x90db0b[_0x32cdef(0x10f)]);_0x451ac4&&_0x451ac4[_0x32cdef(0x106)]&&this['_threadCommentModel']['deleteComment'](_0x2d38c1,_0x3962f8,_0x90db0b['replyId']);break;}case v[_0x32cdef(0x119)]:{this[_0x32cdef(0x110)][_0x32cdef(0xf7)](_0x2d38c1,_0x3962f8,{'commentId':_0x90db0b[_0x32cdef(0x10f)],'text':JSON['parse'](_0x90db0b[_0x32cdef(0x12e)])});break;}case v[_0x32cdef(0xf6)]:{const _0x2d05ec=(_0x117088=this['_threadCommentModel'][_0x32cdef(0x126)](_0x90db0b[_0x32cdef(0x13a)])['find'](_0x2abbb4=>_0x2abbb4[_0x32cdef(0x123)]===_0x90db0b[_0x32cdef(0x123)]))==null?void 0x0:_0x117088[_0x32cdef(0x134)];_0x2d05ec&&this[_0x32cdef(0x110)][_0x32cdef(0xf5)](_0x2d38c1,_0x3962f8,_0x2d05ec['id'],_0x90db0b[_0x32cdef(0x13c)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x473cac(_0x5ab5c1)),p(0x1,_0x473cac(_0x4308ba)),p(0x2,_0x473cac(_0x31f52a)),p(0x3,_0x473cac(_0x2333e3))],S);const z=_0x3a1688(0x117),M={};var k=Object[_0x3a1688(0x107)],Q=(_0x4899a6,_0x32a123,_0x28a722,_0x1ae4be)=>{const _0x142060=_0x3a1688;for(var _0x36494d=_0x1ae4be>0x1?void 0x0:_0x1ae4be?k(_0x32a123,_0x28a722):_0x32a123,_0x5b6e3d=_0x4899a6[_0x142060(0x130)]-0x1,_0x75f733;_0x5b6e3d>=0x0;_0x5b6e3d--)(_0x75f733=_0x4899a6[_0x5b6e3d])&&(_0x36494d=_0x75f733(_0x36494d)||_0x36494d);return _0x36494d;},_=(_0x183755,_0x25462e)=>(_0x7a9eb1,_0x4d5c06)=>_0x25462e(_0x7a9eb1,_0x4d5c06,_0x183755);function X(_0x2fbcdd,_0x3170b1){const _0x272079=_0x3a1688,_0x7b9e5d=_0x2fbcdd[_0x272079(0xef)][0x0];return{..._0x3170b1,'id':_0x7b9e5d[_0x272079(0x10f)],'resolved':_0x2fbcdd[_0x272079(0x13c)]===0x1,'dT':D(_0x7b9e5d[_0x272079(0x13f)]),'personId':_0x7b9e5d[_0x272079(0x144)],'threadId':_0x7b9e5d[_0x272079(0x123)]};}function ee(_0xa47a86,_0x526619,_0x52db14){const _0xa9f2e4=_0x3a1688;var _0x367d6a,_0x29ec32;if(((_0x29ec32=(_0x367d6a=_0xa47a86==null?void 0x0:_0xa47a86[_0xa9f2e4(0xef)])==null?void 0x0:_0x367d6a[_0xa9f2e4(0x130)])!=null?_0x29ec32:0x0)>0x0){const _0x4bafa0=(_0x31fdfa,_0x1aa0c2)=>({'id':_0x31fdfa['replyId'],'threadId':_0x31fdfa[_0xa9f2e4(0x123)],'dT':D(_0x31fdfa['createTimestamp']),'personId':_0x31fdfa['userId'],'resolved':_0xa47a86['solved']===I[_0xa9f2e4(0x105)],'unitId':_0x526619,'subUnitId':_0x52db14,'text':JSON[_0xa9f2e4(0xec)](_0x31fdfa[_0xa9f2e4(0x12e)]),'parentId':_0x1aa0c2}),_0x5b8d4f=_0x4bafa0(_0xa47a86[_0xa9f2e4(0xef)][0x0]);return{..._0x5b8d4f,'children':_0xa47a86[_0xa9f2e4(0xef)]['slice'](0x1)[_0xa9f2e4(0x121)](_0x357420=>_0x4bafa0(_0x357420,_0x5b8d4f['id']))};}return null;}let f=class{constructor(_0x5c93ba,_0x5021ed,_0x4e14f1,_0x2b3fc4){const _0x5a4138=_0x3a1688;this[_0x5a4138(0x13b)]=_0x5c93ba,this[_0x5a4138(0x11e)]=_0x5021ed,this[_0x5a4138(0xe1)]=_0x4e14f1,this[_0x5a4138(0xe7)]=_0x2b3fc4;}async[_0x3a1688(0xeb)](_0x2c5ecb){const _0x3cdbde=_0x3a1688;var _0x47bb41,_0x24860d;const {parentId:_0x5e3c33,unitId:_0x6e5a7d,text:_0x331e83,threadId:_0x5898f3}=_0x2c5ecb,_0xc5b879=(_0x24860d=(_0x47bb41=_0x331e83[_0x3cdbde(0x137)])==null?void 0x0:_0x47bb41[_0x3cdbde(0xf9)](_0x4198ba=>_0x4198ba[_0x3cdbde(0x141)]===_0x57f3ae[_0x3cdbde(0x142)])[_0x3cdbde(0x121)](_0x4d2dd0=>_0x4d2dd0['rangeId']))!=null?_0x24860d:[],_0x16be36=JSON[_0x3cdbde(0xfb)](_0x331e83),_0x3a1db6=(await this['_sessionService'][_0x3cdbde(0xe0)](_0x6e5a7d))[_0x3cdbde(0x11a)]();if(_0x5e3c33){const _0x5773bb={'memberId':_0x3a1db6,'unitId':_0x6e5a7d,'content':_0x16be36,'mention':_0xc5b879,'threadId':_0x5898f3},_0x2002b3=(await this[_0x3cdbde(0x13b)]['post']('/universer-api/comment/unit/'+_0x6e5a7d+_0x3cdbde(0xf0),{'body':_0x5773bb}))[_0x3cdbde(0x133)][_0x3cdbde(0x100)];return{..._0x2c5ecb,'id':_0x2002b3[_0x3cdbde(0x10f)],'dT':_0xd95321(+_0x2002b3[_0x3cdbde(0x13f)])[_0x3cdbde(0x12b)](_0x3cdbde(0x101)),'personId':_0x2002b3[_0x3cdbde(0x144)]};}else{const _0x1bbc38={'memberId':_0x3a1db6,'unitId':_0x6e5a7d,'content':_0x16be36,'mention':_0xc5b879},_0x8cd808=await this[_0x3cdbde(0x13b)]['post'](_0x3cdbde(0x124)+_0x6e5a7d+_0x3cdbde(0xe6),{'body':_0x1bbc38});return X(_0x8cd808['body'][_0x3cdbde(0x114)],_0x2c5ecb);}}async[_0x3a1688(0xf7)](_0x486a9c){const _0x4da21f=_0x3a1688;var _0x83dd94,_0x39bd00;const {text:_0x16101a,unitId:_0x515a54}=_0x486a9c,_0x3ccb48=(_0x39bd00=(_0x83dd94=_0x16101a[_0x4da21f(0x137)])==null?void 0x0:_0x83dd94[_0x4da21f(0xf9)](_0x1bb1cd=>_0x1bb1cd[_0x4da21f(0x141)]===_0x57f3ae[_0x4da21f(0x142)])['map'](_0x21d035=>_0x21d035[_0x4da21f(0x118)]))!=null?_0x39bd00:[],_0x1300a3=JSON['stringify'](_0x16101a),_0x554bed=_0x486a9c[_0x4da21f(0x123)],_0x17510a=_0x486a9c['id'],_0x5266c7={'memberId':(await this[_0x4da21f(0xe1)][_0x4da21f(0xe0)](_0x515a54))['getMemberID'](),'unitId':_0x515a54,'threadId':_0x554bed,'mention':_0x3ccb48,'content':_0x1300a3,'replyId':_0x17510a},_0x84a9f3=await this[_0x4da21f(0x13b)]['post'](_0x4da21f(0x124)+_0x515a54+_0x4da21f(0xfe),{'body':_0x5266c7});return!_0x84a9f3[_0x4da21f(0x133)][_0x4da21f(0x132)]||_0x84a9f3[_0x4da21f(0x133)][_0x4da21f(0x132)][_0x4da21f(0x122)]===0x1;}async[_0x3a1688(0xf5)](_0x25428d){const _0x1b456b=_0x3a1688,{unitId:_0x3ba181}=_0x25428d,_0x40ef06=_0x25428d[_0x1b456b(0x123)],_0x1cfe1d={'memberId':this['_userService'][_0x1b456b(0xe3)]()['userID'],'unitId':_0x3ba181,'threadId':_0x40ef06,'solved':_0x25428d[_0x1b456b(0x13d)]?I['Solved']:I['OpenOrReOpen']},_0x285887=await this[_0x1b456b(0x13b)][_0x1b456b(0xea)](_0x1b456b(0x124)+_0x3ba181+'/solved',{'body':_0x1cfe1d});return!_0x285887[_0x1b456b(0x133)][_0x1b456b(0x132)]||_0x285887[_0x1b456b(0x133)][_0x1b456b(0x132)][_0x1b456b(0x122)]===0x1;}async[_0x3a1688(0x112)](_0xcb2c8b,_0x2bebf2,_0x533993,_0x5434eb){const _0x30b4eb=_0x3a1688,_0x1e2b71={'memberId':(await this[_0x30b4eb(0xe1)][_0x30b4eb(0xe0)](_0xcb2c8b))[_0x30b4eb(0x11a)](),'threadId':_0x533993,'replyId':_0x5434eb,'unitId':_0xcb2c8b},_0x3de497=await this[_0x30b4eb(0x13b)]['post'](_0x30b4eb(0x124)+_0xcb2c8b+_0x30b4eb(0xed),{'body':_0x1e2b71});return!_0x3de497[_0x30b4eb(0x133)][_0x30b4eb(0x132)]||_0x3de497[_0x30b4eb(0x133)]['error']['code']===0x1;}async[_0x3a1688(0xe2)](_0x3dc3d3,_0x2b61b5,_0x2c70a0){const _0x59d517=_0x3a1688,_0x5c43d6={'unitId':_0x3dc3d3,'threadId':_0x2c70a0},_0x4575a3=await this[_0x59d517(0x13b)][_0x59d517(0xea)](_0x59d517(0x124)+_0x3dc3d3+'/list',{'body':_0x5c43d6}),_0x236af0=_0x2c70a0[_0x59d517(0x121)](_0x4fbe32=>ee(_0x4575a3['body']['comments'][_0x4fbe32],_0x3dc3d3,_0x2b61b5))[_0x59d517(0xf9)](Boolean);return Object[_0x59d517(0x11f)](_0x4575a3[_0x59d517(0x133)][_0x59d517(0x103)])['forEach'](_0x2ca73e=>{const _0x4618e0=_0x59d517;this[_0x4618e0(0x11e)][_0x4618e0(0x12a)](_0x2ca73e);}),_0x236af0;}[_0x3a1688(0x138)](_0x75d12a){return{'id':_0x75d12a['id'],'threadId':_0x75d12a['threadId'],'ref':_0x75d12a['ref']};}};f=Q([_(0x0,_0x473cac(_0x3d3809)),_(0x1,_0x473cac(_0x31f52a)),_(0x2,_0x473cac(_0xb5820c)),_(0x3,_0x473cac(_0x2333e3))],f);var re=Object[_0x3a1688(0x107)],te=(_0x3288ee,_0x3f2c2b,_0x24dd6e,_0x41e95a)=>{for(var _0x34a992=_0x41e95a>0x1?void 0x0:_0x41e95a?re(_0x3f2c2b,_0x24dd6e):_0x3f2c2b,_0x2f6c0a=_0x3288ee['length']-0x1,_0x442d16;_0x2f6c0a>=0x0;_0x2f6c0a--)(_0x442d16=_0x3288ee[_0x2f6c0a])&&(_0x34a992=_0x442d16(_0x34a992)||_0x34a992);return _0x34a992;},N=(_0x5a67e5,_0x227d4f)=>(_0x50c97a,_0x239392)=>_0x227d4f(_0x50c97a,_0x239392,_0x5a67e5);let g=class extends _0xa0c45c{constructor(_0x29ab6a,_0x236c87){const _0x4cd06b=_0x3a1688;super(),this[_0x4cd06b(0xfc)]=_0x29ab6a,this['_threadCommentDataSource']=_0x236c87,this[_0x4cd06b(0x10d)]();}[_0x3a1688(0x10d)](){const _0x4caecd=_0x3a1688;this[_0x4caecd(0xfc)]['dataSource']=this['_threadCommentDataSource'],this[_0x4caecd(0xfc)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x187e5e),N(0x1,_0x473cac(f))],g);var se=Object['defineProperty'],oe=Object[_0x3a1688(0x107)],ne=(_0x5e6d69,_0x6d3ec2,_0x176ee8)=>_0x6d3ec2 in _0x5e6d69?se(_0x5e6d69,_0x6d3ec2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x176ee8}):_0x5e6d69[_0x6d3ec2]=_0x176ee8,ie=(_0x573867,_0x239471,_0x3148e9,_0x262b5d)=>{const _0x597284=_0x3a1688;for(var _0x267ceb=_0x262b5d>0x1?void 0x0:_0x262b5d?oe(_0x239471,_0x3148e9):_0x239471,_0x41c9b7=_0x573867[_0x597284(0x130)]-0x1,_0x5edd5c;_0x41c9b7>=0x0;_0x41c9b7--)(_0x5edd5c=_0x573867[_0x41c9b7])&&(_0x267ceb=_0x5edd5c(_0x267ceb)||_0x267ceb);return _0x267ceb;},w=(_0x391ac9,_0x514f04)=>(_0x455166,_0x183bed)=>_0x514f04(_0x455166,_0x183bed,_0x391ac9),$=(_0x4c00c9,_0x1548ce,_0x4ba467)=>ne(_0x4c00c9,typeof _0x1548ce!='symbol'?_0x1548ce+'':_0x1548ce,_0x4ba467);let b=class extends _0x3d1a54{constructor(_0xbe12de=M,_0x3455a0,_0x2d7db3){const _0x30b8ac=_0x3a1688;super(),this[_0x30b8ac(0x102)]=_0xbe12de,this[_0x30b8ac(0xe7)]=_0x3455a0,this[_0x30b8ac(0x12f)]=_0x2d7db3;const {..._0x1236c4}=_0x5b2a5a({},M,this[_0x30b8ac(0x102)]);this[_0x30b8ac(0x12f)][_0x30b8ac(0x109)](z,_0x1236c4);}[_0x3a1688(0xe5)](){[[f],[g],[S]]['forEach'](_0x4d51e1=>{const _0x20e9f3=_0x7d36;this['_injector'][_0x20e9f3(0x11d)](_0x4d51e1);});}[_0x3a1688(0x140)](){const _0x4217c3=_0x3a1688;this[_0x4217c3(0xe7)]['get'](g),this[_0x4217c3(0xe7)][_0x4217c3(0xf2)](S);}};$(b,_0x3a1688(0x11c),W),$(b,'type',_0x549628[_0x3a1688(0x136)]),b=ie([_0x19ee87(_0x15f5f1,_0x6d6f24,_0xa57078),w(0x1,_0x473cac(_0x2333e3)),w(0x2,_0x284947)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x5ea299=_0x2775;(function(_0x221f88,_0x118314){const _0x45faec=_0x2775,_0x40b7d5=_0x221f88();while(!![]){try{const _0xb18404=parseInt(_0x45faec(0x13e))/0x1+parseInt(_0x45faec(0x146))/0x2+-parseInt(_0x45faec(0x112))/0x3*(-parseInt(_0x45faec(0x11b))/0x4)+parseInt(_0x45faec(0x16e))/0x5+-parseInt(_0x45faec(0x150))/0x6*(parseInt(_0x45faec(0x14e))/0x7)+-parseInt(_0x45faec(0x15c))/0x8+-parseInt(_0x45faec(0x168))/0x9*(-parseInt(_0x45faec(0x11f))/0xa);if(_0xb18404===_0x118314)break;else _0x40b7d5['push'](_0x40b7d5['shift']());}catch(_0x5363e9){_0x40b7d5['push'](_0x40b7d5['shift']());}}}(_0x3587,0x40456));import{CommentService as _0xe371d,CollaborationSessionService as _0x27a803,UniverCollaborationClientPlugin as _0x18a047}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x170b60}from'@univerjs-pro/license';import{dayjs as _0x2b85d2,UserManagerService as _0xbb1ba0,Inject as _0x3fdad7,Injector as _0x235f21,Disposable as _0x52035e,CustomRangeType as _0x49fbf1,UniverInstanceType as _0x593503,DependentOn as _0x2b24ef,IConfigService as _0x591b1e,Plugin as _0x49816f,merge as _0xa3f01a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x36a0a4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4b77e1,IThreadCommentDataSourceService as _0x48d157}from'@univerjs/thread-comment';import{bufferTime as _0x291499}from'rxjs';import{HTTPService as _0x428c70}from'@univerjs/network';const W=_0x5ea299(0x137);var I=(_0x3aec58=>(_0x3aec58[_0x3aec58[_0x5ea299(0x119)]=0x0]=_0x5ea299(0x119),_0x3aec58[_0x3aec58['Solved']=0x1]='Solved',_0x3aec58[_0x3aec58[_0x5ea299(0x129)]=-0x1]='UNRECOGNIZED',_0x3aec58))(I||{}),v=(_0x270e0e=>(_0x270e0e[_0x270e0e[_0x5ea299(0x164)]=0x0]=_0x5ea299(0x164),_0x270e0e[_0x270e0e[_0x5ea299(0x122)]=0x1]='Add',_0x270e0e[_0x270e0e[_0x5ea299(0x120)]=0x2]=_0x5ea299(0x120),_0x270e0e[_0x270e0e[_0x5ea299(0x16c)]=0x3]=_0x5ea299(0x16c),_0x270e0e[_0x270e0e['Delete']=0x4]='Delete',_0x270e0e[_0x270e0e[_0x5ea299(0x12a)]=0x5]=_0x5ea299(0x12a),_0x270e0e[_0x270e0e[_0x5ea299(0x129)]=-0x1]=_0x5ea299(0x129),_0x270e0e))(v||{});function _0x3587(){const _0x8dceef=['_threadCommentDataSourceService','requireSession','7TGXraV','getUnit','341862ugeQUh','subscribe','stringify','filter','error','_initUserSync','_threadCommentDataSource','getUser','thread-comment-data-source.config','size','code','content','1657240uvkcds','/solved','forEach','pluginName','/reply','_init','_userService','addUser','Unknown','saveCommentToSnapshot','delete','pipe','18AxOWTM','ref','/delete','disposeWithMe','Edit','reply','1745995DjvBJS','parse','personId','rangeType','body','find','addComment','getCurrentUser','root','userID','YYYY/MM/DD\x20HH:mm','_injector','31257HWNQXM','deleteComment','replyId','dataSource','defineProperty','createTimestamp','/add','OpenOrReOpen','type','4OLSfNo','updateComment','/universer-api/comment/unit/','userId','209470nKRnuI','Reply','listComments','Add','format','getOwnPropertyDescriptor','_config','unitId','COMMENT','get','UNRECOGNIZED','Solve','Solved','_initDataSource','solved','payload','_threadCommentModel','getMemberID','comment','add','commentUpdate$','rangeId','replies','/universer-api/user/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','customRanges','slice','length','getComment','/list','/edit','96401zneNMh','map','values','onStarting','resolved','_commentService','_httpService','_configService','58946ccdsGz','_sessionService','user','resolveComment','threadId','post'];_0x3587=function(){return _0x8dceef;};return _0x3587();}const D=_0x4b3481=>_0x2b85d2(new Date(+_0x4b3481))[_0x5ea299(0x123)](_0x5ea299(0x110)),B=async(_0x4d93be,_0x24d195)=>{const _0x1828ef=_0x5ea299,_0xe71a94=_0x4d93be[_0x1828ef(0x128)](_0xbb1ba0),_0x51cc08=_0x4d93be[_0x1828ef(0x128)](_0x428c70);_0x24d195[_0x1828ef(0x15e)](_0x10b60b=>{const _0x37414b=_0x1828ef;_0xe71a94[_0x37414b(0x157)](_0x10b60b)&&_0x24d195[_0x37414b(0x166)](_0x10b60b);}),_0x24d195[_0x1828ef(0x159)]&&(await _0x51cc08[_0x1828ef(0x128)](_0x1828ef(0x136),{'params':{'userIDs':[..._0x24d195]}}))['body']['users'][_0x1828ef(0x15e)](_0x5a7899=>{const _0x257fbd=_0x1828ef;_0x5a7899&&_0xe71a94[_0x257fbd(0x163)](_0x5a7899);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x36aa7e,_0x52cffa,_0x3dd4da,_0x1c23b5)=>{const _0x29fb7f=_0x5ea299;for(var _0xfdb222=_0x1c23b5>0x1?void 0x0:_0x1c23b5?K(_0x52cffa,_0x3dd4da):_0x52cffa,_0x3a13be=_0x36aa7e[_0x29fb7f(0x13a)]-0x1,_0x1080c6;_0x3a13be>=0x0;_0x3a13be--)(_0x1080c6=_0x36aa7e[_0x3a13be])&&(_0xfdb222=_0x1080c6(_0xfdb222)||_0xfdb222);return _0xfdb222;},p=(_0x3da172,_0x2c1238)=>(_0x5d464b,_0x5dc498)=>_0x2c1238(_0x5d464b,_0x5dc498,_0x3da172);let S=class extends _0x52035e{constructor(_0x49f4ff,_0x508397,_0x118cf1,_0x4fb849){const _0x1f7a1e=_0x5ea299;super(),this[_0x1f7a1e(0x143)]=_0x49f4ff,this[_0x1f7a1e(0x12f)]=_0x508397,this[_0x1f7a1e(0x162)]=_0x118cf1,this[_0x1f7a1e(0x111)]=_0x4fb849,this[_0x1f7a1e(0x161)](),this[_0x1f7a1e(0x155)]();}[_0x5ea299(0x155)](){const _0x32eefc=_0x5ea299;this[_0x32eefc(0x16b)](this[_0x32eefc(0x12f)][_0x32eefc(0x133)][_0x32eefc(0x167)](_0x291499(0x10))[_0x32eefc(0x151)](_0x7c62b9=>{const _0x55aba7=_0x32eefc,_0x17c5b7=new Set();_0x7c62b9[_0x55aba7(0x15e)](_0x2c147d=>{const _0x121be4=_0x55aba7;switch(_0x2c147d[_0x121be4(0x11a)]){case _0x121be4(0x132):{const _0x5593d1=_0x2c147d[_0x121be4(0x12e)][_0x121be4(0x170)];_0x17c5b7[_0x121be4(0x132)](_0x5593d1);break;}}}),B(this[_0x55aba7(0x111)],_0x17c5b7);}));}['_init'](){const _0x7a5cd8=_0x5ea299;this[_0x7a5cd8(0x16b)](this[_0x7a5cd8(0x143)]['commentUpdate$'][_0x7a5cd8(0x151)](async _0x25c866=>{const _0x3bc76b=_0x7a5cd8;var _0x47a79b,_0x131bb0,_0x88e959,_0x44a1b7;const _0x553b12=(_0x47a79b=this[_0x3bc76b(0x12f)][_0x3bc76b(0x14f)](_0x25c866['unitId'])['find'](_0x3a0289=>_0x3a0289[_0x3bc76b(0x14a)]===_0x25c866['threadId']))==null?void 0x0:_0x47a79b[_0x3bc76b(0x10e)];if(!_0x553b12)return;const {unitId:_0xc8fb53,subUnitId:_0x75e6c1}=_0x553b12;switch(_0x25c866[_0x3bc76b(0x148)]&&this[_0x3bc76b(0x162)][_0x3bc76b(0x163)](_0x25c866[_0x3bc76b(0x148)]),_0x25c866[_0x3bc76b(0x11a)]){case v['Add']:break;case v[_0x3bc76b(0x120)]:{this['_threadCommentModel'][_0x3bc76b(0x174)](_0xc8fb53,_0x75e6c1,{'unitId':_0xc8fb53,'subUnitId':_0x75e6c1,'ref':'','id':_0x25c866['replyId'],'dT':D(+_0x25c866['createTimestamp']),'threadId':_0x25c866[_0x3bc76b(0x14a)],'personId':(_0x88e959=(_0x131bb0=_0x25c866[_0x3bc76b(0x148)])==null?void 0x0:_0x131bb0[_0x3bc76b(0x10f)])!=null?_0x88e959:_0x25c866[_0x3bc76b(0x11e)],'text':JSON[_0x3bc76b(0x16f)](_0x25c866[_0x3bc76b(0x15b)]),'parentId':_0x553b12['id']});break;}case v['Delete']:{const _0x53081a=this['_threadCommentModel'][_0x3bc76b(0x13b)](_0xc8fb53,_0x75e6c1,_0x25c866[_0x3bc76b(0x114)]);_0x53081a&&_0x53081a['parentId']&&this['_threadCommentModel'][_0x3bc76b(0x113)](_0xc8fb53,_0x75e6c1,_0x25c866[_0x3bc76b(0x114)]);break;}case v['Edit']:{this[_0x3bc76b(0x12f)]['updateComment'](_0xc8fb53,_0x75e6c1,{'commentId':_0x25c866[_0x3bc76b(0x114)],'text':JSON[_0x3bc76b(0x16f)](_0x25c866[_0x3bc76b(0x15b)])});break;}case v[_0x3bc76b(0x12a)]:{const _0x3241d4=(_0x44a1b7=this['_threadCommentModel'][_0x3bc76b(0x14f)](_0x25c866[_0x3bc76b(0x126)])[_0x3bc76b(0x173)](_0x41d161=>_0x41d161['threadId']===_0x25c866[_0x3bc76b(0x14a)]))==null?void 0x0:_0x44a1b7['root'];_0x3241d4&&this[_0x3bc76b(0x12f)][_0x3bc76b(0x149)](_0xc8fb53,_0x75e6c1,_0x3241d4['id'],_0x25c866['solved']===I[_0x3bc76b(0x12b)]);break;}}}));}};function _0x2775(_0x2f7246,_0x2e4ae8){const _0x35877b=_0x3587();return _0x2775=function(_0x277507,_0x1a0bde){_0x277507=_0x277507-0x10e;let _0x343e4a=_0x35877b[_0x277507];return _0x343e4a;},_0x2775(_0x2f7246,_0x2e4ae8);}S=V([p(0x0,_0x3fdad7(_0xe371d)),p(0x1,_0x3fdad7(_0x4b77e1)),p(0x2,_0x3fdad7(_0xbb1ba0)),p(0x3,_0x3fdad7(_0x235f21))],S);const z=_0x5ea299(0x158),M={};var k=Object[_0x5ea299(0x124)],Q=(_0x413f57,_0x271b5b,_0xdbecf6,_0x5bc830)=>{const _0x7056cc=_0x5ea299;for(var _0x5a3881=_0x5bc830>0x1?void 0x0:_0x5bc830?k(_0x271b5b,_0xdbecf6):_0x271b5b,_0x30eb18=_0x413f57[_0x7056cc(0x13a)]-0x1,_0x4b5022;_0x30eb18>=0x0;_0x30eb18--)(_0x4b5022=_0x413f57[_0x30eb18])&&(_0x5a3881=_0x4b5022(_0x5a3881)||_0x5a3881);return _0x5a3881;},_=(_0x179929,_0x3d86fd)=>(_0x13bf3f,_0x316943)=>_0x3d86fd(_0x13bf3f,_0x316943,_0x179929);function X(_0x27a531,_0x120137){const _0x2ea8df=_0x5ea299,_0x209979=_0x27a531['replies'][0x0];return{..._0x120137,'id':_0x209979[_0x2ea8df(0x114)],'resolved':_0x27a531[_0x2ea8df(0x12d)]===0x1,'dT':D(_0x209979[_0x2ea8df(0x117)]),'personId':_0x209979[_0x2ea8df(0x11e)],'threadId':_0x209979['threadId']};}function ee(_0x31e04f,_0xbcb621,_0x302a95){const _0xab605c=_0x5ea299;var _0x41f88e,_0x193c9e;if(((_0x193c9e=(_0x41f88e=_0x31e04f==null?void 0x0:_0x31e04f[_0xab605c(0x135)])==null?void 0x0:_0x41f88e[_0xab605c(0x13a)])!=null?_0x193c9e:0x0)>0x0){const _0x8f7c49=(_0x1cc58a,_0x2f7cb5)=>({'id':_0x1cc58a['replyId'],'threadId':_0x1cc58a[_0xab605c(0x14a)],'dT':D(_0x1cc58a[_0xab605c(0x117)]),'personId':_0x1cc58a[_0xab605c(0x11e)],'resolved':_0x31e04f['solved']===I['Solved'],'unitId':_0xbcb621,'subUnitId':_0x302a95,'text':JSON['parse'](_0x1cc58a['content']),'parentId':_0x2f7cb5}),_0x2dcac0=_0x8f7c49(_0x31e04f['replies'][0x0]);return{..._0x2dcac0,'children':_0x31e04f[_0xab605c(0x135)][_0xab605c(0x139)](0x1)[_0xab605c(0x13f)](_0x42a154=>_0x8f7c49(_0x42a154,_0x2dcac0['id']))};}return null;}let f=class{constructor(_0x308bf4,_0x59b614,_0x2145b4,_0x3070fc){const _0x5e8f90=_0x5ea299;this['_httpService']=_0x308bf4,this[_0x5e8f90(0x162)]=_0x59b614,this[_0x5e8f90(0x147)]=_0x2145b4,this[_0x5e8f90(0x111)]=_0x3070fc;}async['addComment'](_0x57cb68){const _0x279382=_0x5ea299;var _0x3542be,_0x57b7a3;const {parentId:_0x3707e9,unitId:_0x1995bf,text:_0x543c0c,threadId:_0x217d0e}=_0x57cb68,_0x25c6bf=(_0x57b7a3=(_0x3542be=_0x543c0c['customRanges'])==null?void 0x0:_0x3542be[_0x279382(0x153)](_0x312df=>_0x312df[_0x279382(0x171)]===_0x49fbf1[_0x279382(0x127)])['map'](_0x255e91=>_0x255e91[_0x279382(0x134)]))!=null?_0x57b7a3:[],_0x2afdaf=JSON[_0x279382(0x152)](_0x543c0c),_0xdcc61b=(await this[_0x279382(0x147)][_0x279382(0x14d)](_0x1995bf))[_0x279382(0x130)]();if(_0x3707e9){const _0xac05be={'memberId':_0xdcc61b,'unitId':_0x1995bf,'content':_0x2afdaf,'mention':_0x25c6bf,'threadId':_0x217d0e},_0x3efd72=(await this[_0x279382(0x144)][_0x279382(0x14b)](_0x279382(0x11d)+_0x1995bf+_0x279382(0x160),{'body':_0xac05be}))[_0x279382(0x172)][_0x279382(0x16d)];return{..._0x57cb68,'id':_0x3efd72[_0x279382(0x114)],'dT':_0x2b85d2(+_0x3efd72['createTimestamp'])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x3efd72[_0x279382(0x11e)]};}else{const _0x3bb490={'memberId':_0xdcc61b,'unitId':_0x1995bf,'content':_0x2afdaf,'mention':_0x25c6bf},_0x183afb=await this[_0x279382(0x144)][_0x279382(0x14b)](_0x279382(0x11d)+_0x1995bf+_0x279382(0x118),{'body':_0x3bb490});return X(_0x183afb[_0x279382(0x172)][_0x279382(0x131)],_0x57cb68);}}async[_0x5ea299(0x11c)](_0x36f7cc){const _0x5751bf=_0x5ea299;var _0x37879e,_0x37a5e1;const {text:_0x13fe46,unitId:_0x27ea15}=_0x36f7cc,_0x32d625=(_0x37a5e1=(_0x37879e=_0x13fe46[_0x5751bf(0x138)])==null?void 0x0:_0x37879e[_0x5751bf(0x153)](_0x2796cc=>_0x2796cc[_0x5751bf(0x171)]===_0x49fbf1['COMMENT'])[_0x5751bf(0x13f)](_0x8ac410=>_0x8ac410[_0x5751bf(0x134)]))!=null?_0x37a5e1:[],_0x54e8ca=JSON[_0x5751bf(0x152)](_0x13fe46),_0x2b28bc=_0x36f7cc[_0x5751bf(0x14a)],_0x40bb3b=_0x36f7cc['id'],_0x5ea4df={'memberId':(await this[_0x5751bf(0x147)]['requireSession'](_0x27ea15))['getMemberID'](),'unitId':_0x27ea15,'threadId':_0x2b28bc,'mention':_0x32d625,'content':_0x54e8ca,'replyId':_0x40bb3b},_0x4da681=await this['_httpService'][_0x5751bf(0x14b)]('/universer-api/comment/unit/'+_0x27ea15+_0x5751bf(0x13d),{'body':_0x5ea4df});return!_0x4da681['body'][_0x5751bf(0x154)]||_0x4da681[_0x5751bf(0x172)][_0x5751bf(0x154)][_0x5751bf(0x15a)]===0x1;}async[_0x5ea299(0x149)](_0x2bc3c6){const _0xd0bd31=_0x5ea299,{unitId:_0x2e57a8}=_0x2bc3c6,_0x15232c=_0x2bc3c6[_0xd0bd31(0x14a)],_0x184d1c={'memberId':this[_0xd0bd31(0x162)][_0xd0bd31(0x175)]()[_0xd0bd31(0x10f)],'unitId':_0x2e57a8,'threadId':_0x15232c,'solved':_0x2bc3c6[_0xd0bd31(0x142)]?I[_0xd0bd31(0x12b)]:I[_0xd0bd31(0x119)]},_0x55b8c7=await this[_0xd0bd31(0x144)][_0xd0bd31(0x14b)](_0xd0bd31(0x11d)+_0x2e57a8+_0xd0bd31(0x15d),{'body':_0x184d1c});return!_0x55b8c7[_0xd0bd31(0x172)][_0xd0bd31(0x154)]||_0x55b8c7['body'][_0xd0bd31(0x154)][_0xd0bd31(0x15a)]===0x1;}async[_0x5ea299(0x113)](_0x56e62a,_0x497b54,_0x2ed065,_0x57af67){const _0x2f8242=_0x5ea299,_0x158ce3={'memberId':(await this[_0x2f8242(0x147)][_0x2f8242(0x14d)](_0x56e62a))[_0x2f8242(0x130)](),'threadId':_0x2ed065,'replyId':_0x57af67,'unitId':_0x56e62a},_0x1c4e4c=await this['_httpService']['post'](_0x2f8242(0x11d)+_0x56e62a+_0x2f8242(0x16a),{'body':_0x158ce3});return!_0x1c4e4c[_0x2f8242(0x172)]['error']||_0x1c4e4c['body']['error']['code']===0x1;}async[_0x5ea299(0x121)](_0x4ccc5f,_0x8566d8,_0x19aa9a){const _0x4aef7e=_0x5ea299,_0x20b817={'unitId':_0x4ccc5f,'threadId':_0x19aa9a},_0x5400c6=await this['_httpService'][_0x4aef7e(0x14b)]('/universer-api/comment/unit/'+_0x4ccc5f+_0x4aef7e(0x13c),{'body':_0x20b817}),_0xdd5b8d=_0x19aa9a['map'](_0x28cb32=>ee(_0x5400c6['body']['comments'][_0x28cb32],_0x4ccc5f,_0x8566d8))[_0x4aef7e(0x153)](Boolean);return Object[_0x4aef7e(0x140)](_0x5400c6['body']['users'])[_0x4aef7e(0x15e)](_0x382785=>{const _0x28d683=_0x4aef7e;this[_0x28d683(0x162)]['addUser'](_0x382785);}),_0xdd5b8d;}[_0x5ea299(0x165)](_0x4ddf4d){const _0x24abfe=_0x5ea299;return{'id':_0x4ddf4d['id'],'threadId':_0x4ddf4d['threadId'],'ref':_0x4ddf4d[_0x24abfe(0x169)]};}};f=Q([_(0x0,_0x3fdad7(_0x428c70)),_(0x1,_0x3fdad7(_0xbb1ba0)),_(0x2,_0x3fdad7(_0x27a803)),_(0x3,_0x3fdad7(_0x235f21))],f);var re=Object[_0x5ea299(0x124)],te=(_0x2d58f2,_0x47765b,_0x1529e7,_0x90c0c9)=>{const _0x4d433f=_0x5ea299;for(var _0x4f6140=_0x90c0c9>0x1?void 0x0:_0x90c0c9?re(_0x47765b,_0x1529e7):_0x47765b,_0x261b4e=_0x2d58f2[_0x4d433f(0x13a)]-0x1,_0x49c117;_0x261b4e>=0x0;_0x261b4e--)(_0x49c117=_0x2d58f2[_0x261b4e])&&(_0x4f6140=_0x49c117(_0x4f6140)||_0x4f6140);return _0x4f6140;},N=(_0xa353db,_0x513b8e)=>(_0x58f045,_0x223655)=>_0x513b8e(_0x58f045,_0x223655,_0xa353db);let g=class extends _0x52035e{constructor(_0x7c2ed,_0x48e539){const _0x3fe157=_0x5ea299;super(),this['_threadCommentDataSourceService']=_0x7c2ed,this[_0x3fe157(0x156)]=_0x48e539,this[_0x3fe157(0x12c)]();}[_0x5ea299(0x12c)](){const _0x5aa42b=_0x5ea299;this[_0x5aa42b(0x14c)][_0x5aa42b(0x115)]=this[_0x5aa42b(0x156)],this[_0x5aa42b(0x14c)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x48d157),N(0x1,_0x3fdad7(f))],g);var se=Object[_0x5ea299(0x116)],oe=Object[_0x5ea299(0x124)],ne=(_0x5a5a63,_0x2581b7,_0x37a569)=>_0x2581b7 in _0x5a5a63?se(_0x5a5a63,_0x2581b7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x37a569}):_0x5a5a63[_0x2581b7]=_0x37a569,ie=(_0x440425,_0x258c12,_0xfca280,_0xa4019e)=>{for(var _0x2545c1=_0xa4019e>0x1?void 0x0:_0xa4019e?oe(_0x258c12,_0xfca280):_0x258c12,_0x5d147f=_0x440425['length']-0x1,_0x5753cd;_0x5d147f>=0x0;_0x5d147f--)(_0x5753cd=_0x440425[_0x5d147f])&&(_0x2545c1=_0x5753cd(_0x2545c1)||_0x2545c1);return _0x2545c1;},w=(_0x3b6533,_0x8ed453)=>(_0x4b67ec,_0x3f0ec1)=>_0x8ed453(_0x4b67ec,_0x3f0ec1,_0x3b6533),$=(_0x30636b,_0x5d5f85,_0x9e86d7)=>ne(_0x30636b,typeof _0x5d5f85!='symbol'?_0x5d5f85+'':_0x5d5f85,_0x9e86d7);let b=class extends _0x49816f{constructor(_0x2f1cb6=M,_0x245aa6,_0x36e94d){const _0x4c82bb=_0x5ea299;super(),this['_config']=_0x2f1cb6,this[_0x4c82bb(0x111)]=_0x245aa6,this[_0x4c82bb(0x145)]=_0x36e94d;const {..._0x29e1fa}=_0xa3f01a({},M,this[_0x4c82bb(0x125)]);this[_0x4c82bb(0x145)]['setConfig'](z,_0x29e1fa);}[_0x5ea299(0x141)](){const _0x83a653=_0x5ea299;[[f],[g],[S]][_0x83a653(0x15e)](_0x153a6a=>{const _0x48940d=_0x83a653;this['_injector'][_0x48940d(0x132)](_0x153a6a);});}['onReady'](){const _0x53f032=_0x5ea299;this['_injector'][_0x53f032(0x128)](g),this['_injector'][_0x53f032(0x128)](S);}};$(b,_0x5ea299(0x15f),W),$(b,_0x5ea299(0x11a),_0x593503['UNIVER_UNKNOWN']),b=ie([_0x2b24ef(_0x36a0a4,_0x18a047,_0x170b60),w(0x1,_0x3fdad7(_0x235f21)),w(0x2,_0x591b1e)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0xe8f4(_0x3b5d95,_0xb41ee2){const _0x1820a5=_0x1820();return _0xe8f4=function(_0xe8f4ce,_0x2c4ec3){_0xe8f4ce=_0xe8f4ce-0x111;let _0x1bd215=_0x1820a5[_0xe8f4ce];return _0x1bd215;},_0xe8f4(_0x3b5d95,_0xb41ee2);}function _0x1820(){const _0x12a26b=['addComment','_initDataSource','UniverCore','unitId','Solve','_sessionService','get','rxjs','Delete','@univerjs-pro/license','subscribe','listComments','length','_commentService','192HYfvgv','UserManagerService','UNIVER_UNKNOWN','setConfig','/add','226899UffqIV','Add','CustomRangeType','add','find','_threadCommentModel','/universer-api/comment/unit/','createTimestamp','COMMENT','ThreadCommentModel','ref','Solved','CollaborationSessionService','addUser','type','map','18439050JDcDsq','body','getUser','symbol','112NGaHcV','_injector','Inject','DependentOn','reply','requireSession','replies','personId','content','user','UniverLicensePlugin','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','error','@univerjs/thread-comment-ui','166572PcGEsG','thread-comment-data-source.config','_threadCommentDataSourceService','threadId','values','dayjs','Unknown','/solved','@univerjs/thread-comment','Disposable','_init','resolved','getMemberID','@univerjs-pro/collaboration-client','amd','UniverCollaborationClientPlugin','pluginName','replyId','OpenOrReOpen','resolveComment','rangeType','78CAkxNF','root','merge','_httpService','YYYY/MM/DD\x20HH:mm','@univerjs/core','comment','15255bpnzJB','forEach','309405rzidRI','UniverThreadCommentUi','_initUserSync','UniverNetwork','UniverProCollaborationClient','disposeWithMe','post','code','size','deleteComment','slice','userId','Reply','_configService','toStringTag','object','format','exports','HTTPService','/list','parentId','stringify','IConfigService','solved','updateComment','onStarting','getComment','Injector','users','getCurrentUser','customRanges','userID','Edit','UNRECOGNIZED','/universer-api/user/list','rangeId','UniverThreadCommentUIPlugin','UniverProThreadCommentDatasource','delete','UniverProLicense','_threadCommentDataSource','/edit','/reply','1121048cXPCdk','UniverThreadComment','_userService','getOwnPropertyDescriptor','commentUpdate$','IThreadCommentDataSourceService','defineProperty','UniverThreadCommentDataSourcePlugin','bufferTime','dataSource','2322531UyyiYA','filter','getUnit','parse','_config','syncUpdateMutationToColla','@univerjs/network'];_0x1820=function(){return _0x12a26b;};return _0x1820();}(function(_0x2776a7,_0x36d75b){const _0x6f8c5b=_0xe8f4,_0x4ff0e1=_0x2776a7();while(!![]){try{const _0x504dbb=-parseInt(_0x6f8c5b(0x161))/0x1+-parseInt(_0x6f8c5b(0x13d))/0x2+-parseInt(_0x6f8c5b(0x19f))/0x3*(-parseInt(_0x6f8c5b(0x15c))/0x4)+parseInt(_0x6f8c5b(0x112))/0x5*(-parseInt(_0x6f8c5b(0x198))/0x6)+-parseInt(_0x6f8c5b(0x183))/0x7*(parseInt(_0x6f8c5b(0x175))/0x8)+parseInt(_0x6f8c5b(0x147))/0x9+parseInt(_0x6f8c5b(0x171))/0xa;if(_0x504dbb===_0x36d75b)break;else _0x4ff0e1['push'](_0x4ff0e1['shift']());}catch(_0x5ed113){_0x4ff0e1['push'](_0x4ff0e1['shift']());}}}(_0x1820,0x66ca0),function(_0x30b8d0,_0x5d0e5f){const _0x5afcbc=_0xe8f4;typeof exports==_0x5afcbc(0x121)&&typeof module<'u'?_0x5d0e5f(exports,require(_0x5afcbc(0x190)),require(_0x5afcbc(0x157)),require(_0x5afcbc(0x19d)),require(_0x5afcbc(0x182)),require(_0x5afcbc(0x18b)),require(_0x5afcbc(0x155)),require(_0x5afcbc(0x14d))):typeof define=='function'&&define[_0x5afcbc(0x191)]?define([_0x5afcbc(0x123),_0x5afcbc(0x190),_0x5afcbc(0x157),_0x5afcbc(0x19d),_0x5afcbc(0x182),_0x5afcbc(0x18b),_0x5afcbc(0x155),_0x5afcbc(0x14d)],_0x5d0e5f):(_0x30b8d0=typeof globalThis<'u'?globalThis:_0x30b8d0||self,_0x5d0e5f(_0x30b8d0[_0x5afcbc(0x137)]={},_0x30b8d0[_0x5afcbc(0x116)],_0x30b8d0[_0x5afcbc(0x139)],_0x30b8d0[_0x5afcbc(0x150)],_0x30b8d0[_0x5afcbc(0x113)],_0x30b8d0[_0x5afcbc(0x13e)],_0x30b8d0[_0x5afcbc(0x155)],_0x30b8d0[_0x5afcbc(0x115)]));}(this,function(_0x296bf4,_0x1c1a0b,_0x252e42,_0xf09126,_0x4f03f5,_0x4c8322,_0x4479db,_0x45f42f){'use strict';const _0x34e985=_0xe8f4;const _0xba2d02=_0x34e985(0x180);var _0x55d6b5=(_0x345c38=>(_0x345c38[_0x345c38[_0x34e985(0x195)]=0x0]='OpenOrReOpen',_0x345c38[_0x345c38['Solved']=0x1]=_0x34e985(0x16c),_0x345c38[_0x345c38[_0x34e985(0x133)]=-0x1]=_0x34e985(0x133),_0x345c38))(_0x55d6b5||{}),_0x4f2936=(_0x469705=>(_0x469705[_0x469705[_0x34e985(0x189)]=0x0]='Unknown',_0x469705[_0x469705[_0x34e985(0x162)]=0x1]='Add',_0x469705[_0x469705['Reply']=0x2]=_0x34e985(0x11e),_0x469705[_0x469705['Edit']=0x3]=_0x34e985(0x132),_0x469705[_0x469705[_0x34e985(0x156)]=0x4]=_0x34e985(0x156),_0x469705[_0x469705[_0x34e985(0x152)]=0x5]='Solve',_0x469705[_0x469705['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x469705))(_0x4f2936||{});const _0x1781a6=_0x2127da=>_0xf09126['dayjs'](new Date(+_0x2127da))['format']('YYYY/MM/DD\x20HH:mm'),_0x28bd86=async(_0x1e41c0,_0x4521a8)=>{const _0x11595f=_0x34e985,_0x5c34bd=_0x1e41c0[_0x11595f(0x154)](_0xf09126[_0x11595f(0x15d)]),_0x385e15=_0x1e41c0[_0x11595f(0x154)](_0x45f42f[_0x11595f(0x124)]);_0x4521a8[_0x11595f(0x111)](_0x174d31=>{const _0x5beb65=_0x11595f;_0x5c34bd[_0x5beb65(0x173)](_0x174d31)&&_0x4521a8[_0x5beb65(0x138)](_0x174d31);}),_0x4521a8[_0x11595f(0x11a)]&&(await _0x385e15[_0x11595f(0x154)](_0x11595f(0x134),{'params':{'userIDs':[..._0x4521a8]}}))[_0x11595f(0x172)][_0x11595f(0x12e)][_0x11595f(0x111)](_0x43b734=>{_0x43b734&&_0x5c34bd['addUser'](_0x43b734);});};var _0x1c1353=Object['getOwnPropertyDescriptor'],_0x1a9573=(_0x1ff9c0,_0x474c3c,_0x44792e,_0x17a3a3)=>{const _0x39cf1e=_0x34e985;for(var _0xb46a3d=_0x17a3a3>0x1?void 0x0:_0x17a3a3?_0x1c1353(_0x474c3c,_0x44792e):_0x474c3c,_0xf284c7=_0x1ff9c0[_0x39cf1e(0x15a)]-0x1,_0x2d5775;_0xf284c7>=0x0;_0xf284c7--)(_0x2d5775=_0x1ff9c0[_0xf284c7])&&(_0xb46a3d=_0x2d5775(_0xb46a3d)||_0xb46a3d);return _0xb46a3d;},_0x18c2df=(_0x52391a,_0x32555e)=>(_0x19a269,_0x108c8d)=>_0x32555e(_0x19a269,_0x108c8d,_0x52391a);let _0x47b599=class extends _0xf09126[_0x34e985(0x18c)]{constructor(_0x2553fc,_0x4a653b,_0x53404b,_0x4fa09d){const _0x4bfc9f=_0x34e985;super(),this[_0x4bfc9f(0x15b)]=_0x2553fc,this[_0x4bfc9f(0x166)]=_0x4a653b,this[_0x4bfc9f(0x13f)]=_0x53404b,this[_0x4bfc9f(0x176)]=_0x4fa09d,this[_0x4bfc9f(0x18d)](),this[_0x4bfc9f(0x114)]();}[_0x34e985(0x114)](){const _0x19078c=_0x34e985;this['disposeWithMe'](this[_0x19078c(0x166)][_0x19078c(0x141)]['pipe'](_0x4479db[_0x19078c(0x145)](0x10))[_0x19078c(0x158)](_0x236295=>{const _0x3cb8ad=_0x19078c,_0x472263=new Set();_0x236295[_0x3cb8ad(0x111)](_0x1b3f3f=>{const _0x5a2f65=_0x3cb8ad;switch(_0x1b3f3f[_0x5a2f65(0x16f)]){case _0x5a2f65(0x164):{const _0x57398d=_0x1b3f3f['payload'][_0x5a2f65(0x17c)];_0x472263[_0x5a2f65(0x164)](_0x57398d);break;}}}),_0x28bd86(this[_0x3cb8ad(0x176)],_0x472263);}));}[_0x34e985(0x18d)](){const _0x3668f7=_0x34e985;this[_0x3668f7(0x117)](this[_0x3668f7(0x15b)][_0x3668f7(0x141)]['subscribe'](async _0x55317f=>{const _0x138982=_0x3668f7;var _0x9d1551,_0x5018fd,_0x53b72d,_0x97537f;const _0xf3f7b0=(_0x9d1551=this['_threadCommentModel'][_0x138982(0x149)](_0x55317f[_0x138982(0x151)])[_0x138982(0x165)](_0x2397a6=>_0x2397a6[_0x138982(0x186)]===_0x55317f[_0x138982(0x186)]))==null?void 0x0:_0x9d1551['root'];if(!_0xf3f7b0)return;const {unitId:_0x43fa53,subUnitId:_0x210234}=_0xf3f7b0;switch(_0x55317f[_0x138982(0x17e)]&&this[_0x138982(0x13f)]['addUser'](_0x55317f[_0x138982(0x17e)]),_0x55317f['type']){case _0x4f2936[_0x138982(0x162)]:break;case _0x4f2936[_0x138982(0x11e)]:{this[_0x138982(0x166)]['addComment'](_0x43fa53,_0x210234,{'unitId':_0x43fa53,'subUnitId':_0x210234,'ref':'','id':_0x55317f[_0x138982(0x194)],'dT':_0x1781a6(+_0x55317f[_0x138982(0x168)]),'threadId':_0x55317f[_0x138982(0x186)],'personId':(_0x53b72d=(_0x5018fd=_0x55317f[_0x138982(0x17e)])==null?void 0x0:_0x5018fd[_0x138982(0x131)])!=null?_0x53b72d:_0x55317f[_0x138982(0x11d)],'text':JSON[_0x138982(0x14a)](_0x55317f['content']),'parentId':_0xf3f7b0['id']});break;}case _0x4f2936['Delete']:{const _0x8df5c=this['_threadCommentModel'][_0x138982(0x12c)](_0x43fa53,_0x210234,_0x55317f[_0x138982(0x194)]);_0x8df5c&&_0x8df5c[_0x138982(0x126)]&&this[_0x138982(0x166)]['deleteComment'](_0x43fa53,_0x210234,_0x55317f['replyId']);break;}case _0x4f2936[_0x138982(0x132)]:{this['_threadCommentModel'][_0x138982(0x12a)](_0x43fa53,_0x210234,{'commentId':_0x55317f[_0x138982(0x194)],'text':JSON[_0x138982(0x14a)](_0x55317f[_0x138982(0x17d)])});break;}case _0x4f2936[_0x138982(0x152)]:{const _0x1bd84c=(_0x97537f=this[_0x138982(0x166)]['getUnit'](_0x55317f[_0x138982(0x151)])[_0x138982(0x165)](_0x2c3449=>_0x2c3449[_0x138982(0x186)]===_0x55317f[_0x138982(0x186)]))==null?void 0x0:_0x97537f[_0x138982(0x199)];_0x1bd84c&&this[_0x138982(0x166)]['resolveComment'](_0x43fa53,_0x210234,_0x1bd84c['id'],_0x55317f[_0x138982(0x129)]===_0x55d6b5[_0x138982(0x16c)]);break;}}}));}};_0x47b599=_0x1a9573([_0x18c2df(0x0,_0xf09126[_0x34e985(0x177)](_0x1c1a0b['CommentService'])),_0x18c2df(0x1,_0xf09126['Inject'](_0x4c8322[_0x34e985(0x16a)])),_0x18c2df(0x2,_0xf09126[_0x34e985(0x177)](_0xf09126[_0x34e985(0x15d)])),_0x18c2df(0x3,_0xf09126[_0x34e985(0x177)](_0xf09126[_0x34e985(0x12d)]))],_0x47b599);const _0x5794b9=_0x34e985(0x184),_0x38a6f2={};var _0x1b2138=Object[_0x34e985(0x140)],_0x52d5c4=(_0x4a7f95,_0xf8dfcc,_0x2a7e7f,_0x227190)=>{for(var _0x513f22=_0x227190>0x1?void 0x0:_0x227190?_0x1b2138(_0xf8dfcc,_0x2a7e7f):_0xf8dfcc,_0x1b44a8=_0x4a7f95['length']-0x1,_0x5f2d8c;_0x1b44a8>=0x0;_0x1b44a8--)(_0x5f2d8c=_0x4a7f95[_0x1b44a8])&&(_0x513f22=_0x5f2d8c(_0x513f22)||_0x513f22);return _0x513f22;},_0x17d5dd=(_0x18497a,_0x1d1915)=>(_0x51032d,_0xf465d6)=>_0x1d1915(_0x51032d,_0xf465d6,_0x18497a);function _0x52d250(_0x536d0e,_0x2315dd){const _0x1a4345=_0x34e985,_0xf6c1e8=_0x536d0e[_0x1a4345(0x17b)][0x0];return{..._0x2315dd,'id':_0xf6c1e8[_0x1a4345(0x194)],'resolved':_0x536d0e[_0x1a4345(0x129)]===0x1,'dT':_0x1781a6(_0xf6c1e8[_0x1a4345(0x168)]),'personId':_0xf6c1e8['userId'],'threadId':_0xf6c1e8[_0x1a4345(0x186)]};}function _0x2234cb(_0x5ee5cf,_0xce8be2,_0x3fb04d){const _0x3f3ecb=_0x34e985;var _0x53c557,_0x233612;if(((_0x233612=(_0x53c557=_0x5ee5cf==null?void 0x0:_0x5ee5cf[_0x3f3ecb(0x17b)])==null?void 0x0:_0x53c557[_0x3f3ecb(0x15a)])!=null?_0x233612:0x0)>0x0){const _0x3b9cb8=(_0x169292,_0x392f70)=>({'id':_0x169292[_0x3f3ecb(0x194)],'threadId':_0x169292[_0x3f3ecb(0x186)],'dT':_0x1781a6(_0x169292['createTimestamp']),'personId':_0x169292[_0x3f3ecb(0x11d)],'resolved':_0x5ee5cf['solved']===_0x55d6b5[_0x3f3ecb(0x16c)],'unitId':_0xce8be2,'subUnitId':_0x3fb04d,'text':JSON[_0x3f3ecb(0x14a)](_0x169292[_0x3f3ecb(0x17d)]),'parentId':_0x392f70}),_0xc1bb67=_0x3b9cb8(_0x5ee5cf['replies'][0x0]);return{..._0xc1bb67,'children':_0x5ee5cf[_0x3f3ecb(0x17b)][_0x3f3ecb(0x11c)](0x1)['map'](_0x32b05b=>_0x3b9cb8(_0x32b05b,_0xc1bb67['id']))};}return null;}let _0xc4df68=class{constructor(_0x5202ac,_0x452ac3,_0xf850ea,_0x461938){const _0x2648e1=_0x34e985;this[_0x2648e1(0x19b)]=_0x5202ac,this[_0x2648e1(0x13f)]=_0x452ac3,this['_sessionService']=_0xf850ea,this[_0x2648e1(0x176)]=_0x461938;}async[_0x34e985(0x14e)](_0x539536){const _0x116338=_0x34e985;var _0x380c1d,_0x9a3a89;const {parentId:_0x297c79,unitId:_0x391908,text:_0x51e836,threadId:_0x1c6860}=_0x539536,_0xbba368=(_0x9a3a89=(_0x380c1d=_0x51e836[_0x116338(0x130)])==null?void 0x0:_0x380c1d[_0x116338(0x148)](_0x18ff2b=>_0x18ff2b[_0x116338(0x197)]===_0xf09126[_0x116338(0x163)][_0x116338(0x169)])['map'](_0x195faa=>_0x195faa[_0x116338(0x135)]))!=null?_0x9a3a89:[],_0x41fc45=JSON[_0x116338(0x127)](_0x51e836),_0x26867a=(await this[_0x116338(0x153)][_0x116338(0x17a)](_0x391908))[_0x116338(0x18f)]();if(_0x297c79){const _0x5af8bd={'memberId':_0x26867a,'unitId':_0x391908,'content':_0x41fc45,'mention':_0xbba368,'threadId':_0x1c6860},_0x624879=(await this[_0x116338(0x19b)][_0x116338(0x118)]('/universer-api/comment/unit/'+_0x391908+_0x116338(0x13c),{'body':_0x5af8bd}))[_0x116338(0x172)][_0x116338(0x179)];return{..._0x539536,'id':_0x624879[_0x116338(0x194)],'dT':_0xf09126[_0x116338(0x188)](+_0x624879[_0x116338(0x168)])[_0x116338(0x122)](_0x116338(0x19c)),'personId':_0x624879[_0x116338(0x11d)]};}else{const _0x2c4c78={'memberId':_0x26867a,'unitId':_0x391908,'content':_0x41fc45,'mention':_0xbba368},_0x3de5da=await this[_0x116338(0x19b)][_0x116338(0x118)](_0x116338(0x167)+_0x391908+_0x116338(0x160),{'body':_0x2c4c78});return _0x52d250(_0x3de5da[_0x116338(0x172)][_0x116338(0x19e)],_0x539536);}}async[_0x34e985(0x12a)](_0x2071f4){const _0x2961c6=_0x34e985;var _0x1324b8,_0x4281d4;const {text:_0x4e6bbc,unitId:_0x2cf313}=_0x2071f4,_0x4eb0a9=(_0x4281d4=(_0x1324b8=_0x4e6bbc[_0x2961c6(0x130)])==null?void 0x0:_0x1324b8[_0x2961c6(0x148)](_0xd4f4d0=>_0xd4f4d0[_0x2961c6(0x197)]===_0xf09126[_0x2961c6(0x163)][_0x2961c6(0x169)])['map'](_0x445cdf=>_0x445cdf[_0x2961c6(0x135)]))!=null?_0x4281d4:[],_0x20d4ef=JSON['stringify'](_0x4e6bbc),_0x1612b7=_0x2071f4[_0x2961c6(0x186)],_0x221239=_0x2071f4['id'],_0x134950={'memberId':(await this['_sessionService'][_0x2961c6(0x17a)](_0x2cf313))[_0x2961c6(0x18f)](),'unitId':_0x2cf313,'threadId':_0x1612b7,'mention':_0x4eb0a9,'content':_0x20d4ef,'replyId':_0x221239},_0x49586f=await this[_0x2961c6(0x19b)]['post'](_0x2961c6(0x167)+_0x2cf313+_0x2961c6(0x13b),{'body':_0x134950});return!_0x49586f[_0x2961c6(0x172)]['error']||_0x49586f[_0x2961c6(0x172)][_0x2961c6(0x181)][_0x2961c6(0x119)]===0x1;}async[_0x34e985(0x196)](_0x10b4d1){const _0x497ab0=_0x34e985,{unitId:_0x41bc1b}=_0x10b4d1,_0xc35833=_0x10b4d1[_0x497ab0(0x186)],_0x513fb9={'memberId':this[_0x497ab0(0x13f)][_0x497ab0(0x12f)]()[_0x497ab0(0x131)],'unitId':_0x41bc1b,'threadId':_0xc35833,'solved':_0x10b4d1[_0x497ab0(0x18e)]?_0x55d6b5[_0x497ab0(0x16c)]:_0x55d6b5[_0x497ab0(0x195)]},_0xb21ee4=await this[_0x497ab0(0x19b)][_0x497ab0(0x118)](_0x497ab0(0x167)+_0x41bc1b+_0x497ab0(0x18a),{'body':_0x513fb9});return!_0xb21ee4[_0x497ab0(0x172)][_0x497ab0(0x181)]||_0xb21ee4[_0x497ab0(0x172)][_0x497ab0(0x181)]['code']===0x1;}async[_0x34e985(0x11b)](_0x23855b,_0x1b3140,_0x1f2ae5,_0x28fa4c){const _0x2f6dbf=_0x34e985,_0x227f6a={'memberId':(await this[_0x2f6dbf(0x153)][_0x2f6dbf(0x17a)](_0x23855b))[_0x2f6dbf(0x18f)](),'threadId':_0x1f2ae5,'replyId':_0x28fa4c,'unitId':_0x23855b},_0x26cb2c=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x23855b+'/delete',{'body':_0x227f6a});return!_0x26cb2c[_0x2f6dbf(0x172)][_0x2f6dbf(0x181)]||_0x26cb2c[_0x2f6dbf(0x172)][_0x2f6dbf(0x181)]['code']===0x1;}async[_0x34e985(0x159)](_0x520085,_0x408a9c,_0x28fda2){const _0x3b0561=_0x34e985,_0x5538bc={'unitId':_0x520085,'threadId':_0x28fda2},_0x8baf13=await this[_0x3b0561(0x19b)][_0x3b0561(0x118)](_0x3b0561(0x167)+_0x520085+_0x3b0561(0x125),{'body':_0x5538bc}),_0x3d84bc=_0x28fda2[_0x3b0561(0x170)](_0x1b4288=>_0x2234cb(_0x8baf13[_0x3b0561(0x172)]['comments'][_0x1b4288],_0x520085,_0x408a9c))[_0x3b0561(0x148)](Boolean);return Object[_0x3b0561(0x187)](_0x8baf13[_0x3b0561(0x172)][_0x3b0561(0x12e)])['forEach'](_0x39fad9=>{const _0x2b1790=_0x3b0561;this['_userService'][_0x2b1790(0x16e)](_0x39fad9);}),_0x3d84bc;}['saveCommentToSnapshot'](_0x323a0d){const _0x31458a=_0x34e985;return{'id':_0x323a0d['id'],'threadId':_0x323a0d[_0x31458a(0x186)],'ref':_0x323a0d[_0x31458a(0x16b)]};}};_0xc4df68=_0x52d5c4([_0x17d5dd(0x0,_0xf09126[_0x34e985(0x177)](_0x45f42f[_0x34e985(0x124)])),_0x17d5dd(0x1,_0xf09126[_0x34e985(0x177)](_0xf09126['UserManagerService'])),_0x17d5dd(0x2,_0xf09126[_0x34e985(0x177)](_0x1c1a0b[_0x34e985(0x16d)])),_0x17d5dd(0x3,_0xf09126[_0x34e985(0x177)](_0xf09126['Injector']))],_0xc4df68);var _0x5af0fb=Object['getOwnPropertyDescriptor'],_0x52bc23=(_0x2082aa,_0x12b71c,_0x259eb3,_0x469812)=>{const _0x33e541=_0x34e985;for(var _0x41c37a=_0x469812>0x1?void 0x0:_0x469812?_0x5af0fb(_0x12b71c,_0x259eb3):_0x12b71c,_0x526ab8=_0x2082aa[_0x33e541(0x15a)]-0x1,_0x411489;_0x526ab8>=0x0;_0x526ab8--)(_0x411489=_0x2082aa[_0x526ab8])&&(_0x41c37a=_0x411489(_0x41c37a)||_0x41c37a);return _0x41c37a;},_0x162522=(_0x442488,_0x76c71b)=>(_0x47ea9e,_0x32f1c0)=>_0x76c71b(_0x47ea9e,_0x32f1c0,_0x442488);let _0x41d538=class extends _0xf09126['Disposable']{constructor(_0x30cfb8,_0x521eb9){const _0x37614e=_0x34e985;super(),this[_0x37614e(0x185)]=_0x30cfb8,this[_0x37614e(0x13a)]=_0x521eb9,this[_0x37614e(0x14f)]();}[_0x34e985(0x14f)](){const _0x4db29c=_0x34e985;this[_0x4db29c(0x185)][_0x4db29c(0x146)]=this[_0x4db29c(0x13a)],this[_0x4db29c(0x185)][_0x4db29c(0x14c)]=!0x1;}};_0x41d538=_0x52bc23([_0x162522(0x0,_0x4c8322[_0x34e985(0x142)]),_0x162522(0x1,_0xf09126[_0x34e985(0x177)](_0xc4df68))],_0x41d538);var _0x5d44f5=Object[_0x34e985(0x143)],_0x2d1161=Object['getOwnPropertyDescriptor'],_0x176a19=(_0x53f5b0,_0x3aa893,_0x2dfa18)=>_0x3aa893 in _0x53f5b0?_0x5d44f5(_0x53f5b0,_0x3aa893,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2dfa18}):_0x53f5b0[_0x3aa893]=_0x2dfa18,_0x7f3043=(_0x1ea81b,_0x3d68bf,_0x41dd6b,_0x1e3be5)=>{const _0x26260c=_0x34e985;for(var _0x44dbcb=_0x1e3be5>0x1?void 0x0:_0x1e3be5?_0x2d1161(_0x3d68bf,_0x41dd6b):_0x3d68bf,_0x13d420=_0x1ea81b[_0x26260c(0x15a)]-0x1,_0x2a40a5;_0x13d420>=0x0;_0x13d420--)(_0x2a40a5=_0x1ea81b[_0x13d420])&&(_0x44dbcb=_0x2a40a5(_0x44dbcb)||_0x44dbcb);return _0x44dbcb;},_0x26022c=(_0x176a3e,_0x10b4af)=>(_0x1d2ba5,_0xa44548)=>_0x10b4af(_0x1d2ba5,_0xa44548,_0x176a3e),_0x33e67b=(_0xe9ae2d,_0x16127c,_0x14e1c1)=>_0x176a19(_0xe9ae2d,typeof _0x16127c!=_0x34e985(0x174)?_0x16127c+'':_0x16127c,_0x14e1c1);_0x296bf4[_0x34e985(0x144)]=class extends _0xf09126['Plugin']{constructor(_0x3f9ee8=_0x38a6f2,_0x1476d0,_0x573de8){const _0x25de91=_0x34e985;super(),this[_0x25de91(0x14b)]=_0x3f9ee8,this['_injector']=_0x1476d0,this[_0x25de91(0x11f)]=_0x573de8;const {..._0x1dc3b6}=_0xf09126[_0x25de91(0x19a)]({},_0x38a6f2,this[_0x25de91(0x14b)]);this[_0x25de91(0x11f)][_0x25de91(0x15f)](_0x5794b9,_0x1dc3b6);}[_0x34e985(0x12b)](){const _0x5716b6=_0x34e985;[[_0xc4df68],[_0x41d538],[_0x47b599]][_0x5716b6(0x111)](_0x36d9d1=>{const _0x31d1d3=_0x5716b6;this[_0x31d1d3(0x176)]['add'](_0x36d9d1);});}['onReady'](){const _0x1139ec=_0x34e985;this['_injector'][_0x1139ec(0x154)](_0x41d538),this[_0x1139ec(0x176)][_0x1139ec(0x154)](_0x47b599);}},_0x33e67b(_0x296bf4[_0x34e985(0x144)],_0x34e985(0x193),_0xba2d02),_0x33e67b(_0x296bf4[_0x34e985(0x144)],_0x34e985(0x16f),_0xf09126['UniverInstanceType'][_0x34e985(0x15e)]),_0x296bf4[_0x34e985(0x144)]=_0x7f3043([_0xf09126[_0x34e985(0x178)](_0x4f03f5[_0x34e985(0x136)],_0x1c1a0b[_0x34e985(0x192)],_0x252e42[_0x34e985(0x17f)]),_0x26022c(0x1,_0xf09126[_0x34e985(0x177)](_0xf09126['Injector'])),_0x26022c(0x2,_0xf09126[_0x34e985(0x128)])],_0x296bf4[_0x34e985(0x144)]),Object[_0x34e985(0x143)](_0x296bf4,Symbol[_0x34e985(0x120)],{'value':'Module'});}));
1
+ (function(_0x374d69,_0x5d0e07){const _0x28e9c=_0x45a4,_0x274bd3=_0x374d69();while(!![]){try{const _0x12d541=-parseInt(_0x28e9c(0x232))/0x1*(-parseInt(_0x28e9c(0x1f0))/0x2)+parseInt(_0x28e9c(0x220))/0x3*(parseInt(_0x28e9c(0x218))/0x4)+parseInt(_0x28e9c(0x233))/0x5*(parseInt(_0x28e9c(0x24b))/0x6)+-parseInt(_0x28e9c(0x22e))/0x7*(parseInt(_0x28e9c(0x21a))/0x8)+-parseInt(_0x28e9c(0x1c7))/0x9+parseInt(_0x28e9c(0x1d1))/0xa*(-parseInt(_0x28e9c(0x1e2))/0xb)+parseInt(_0x28e9c(0x20c))/0xc;if(_0x12d541===_0x5d0e07)break;else _0x274bd3['push'](_0x274bd3['shift']());}catch(_0xfadb9){_0x274bd3['push'](_0x274bd3['shift']());}}}(_0x45e8,0x62b97),function(_0xc427b,_0x1fa432){const _0x42d602=_0x45a4;typeof exports==_0x42d602(0x1ed)&&typeof module<'u'?_0x1fa432(exports,require(_0x42d602(0x204)),require(_0x42d602(0x1f5)),require(_0x42d602(0x244)),require(_0x42d602(0x1e6)),require('@univerjs/thread-comment'),require(_0x42d602(0x1f7)),require(_0x42d602(0x237))):typeof define==_0x42d602(0x20b)&&define[_0x42d602(0x1d3)]?define([_0x42d602(0x23c),'@univerjs-pro/collaboration-client','@univerjs-pro/license',_0x42d602(0x244),'@univerjs/thread-comment-ui',_0x42d602(0x1ff),_0x42d602(0x1f7),_0x42d602(0x237)],_0x1fa432):(_0xc427b=typeof globalThis<'u'?globalThis:_0xc427b||self,_0x1fa432(_0xc427b[_0x42d602(0x24a)]={},_0xc427b[_0x42d602(0x1ce)],_0xc427b['UniverProLicense'],_0xc427b[_0x42d602(0x228)],_0xc427b[_0x42d602(0x21b)],_0xc427b['UniverThreadComment'],_0xc427b[_0x42d602(0x1f7)],_0xc427b[_0x42d602(0x1f1)]));}(this,function(_0x2682ef,_0x5bf447,_0x87c284,_0x3d2349,_0x2eb246,_0x163613,_0x54ad63,_0x1c96cf){'use strict';const _0x32f792=_0x45a4;const _0x6600a5=_0x32f792(0x210);var _0x55a88f=(_0x52d678=>(_0x52d678[_0x52d678[_0x32f792(0x248)]=0x0]=_0x32f792(0x248),_0x52d678[_0x52d678['Solved']=0x1]=_0x32f792(0x200),_0x52d678[_0x52d678[_0x32f792(0x1ec)]=-0x1]=_0x32f792(0x1ec),_0x52d678))(_0x55a88f||{}),_0x574f5f=(_0x5bda62=>(_0x5bda62[_0x5bda62['Unknown']=0x0]=_0x32f792(0x22b),_0x5bda62[_0x5bda62[_0x32f792(0x213)]=0x1]=_0x32f792(0x213),_0x5bda62[_0x5bda62[_0x32f792(0x1d9)]=0x2]=_0x32f792(0x1d9),_0x5bda62[_0x5bda62[_0x32f792(0x216)]=0x3]=_0x32f792(0x216),_0x5bda62[_0x5bda62[_0x32f792(0x230)]=0x4]=_0x32f792(0x230),_0x5bda62[_0x5bda62[_0x32f792(0x22f)]=0x5]=_0x32f792(0x22f),_0x5bda62[_0x5bda62['UNRECOGNIZED']=-0x1]=_0x32f792(0x1ec),_0x5bda62))(_0x574f5f||{});const _0x53d14c=_0x2d2520=>_0x3d2349[_0x32f792(0x226)](new Date(+_0x2d2520))[_0x32f792(0x243)](_0x32f792(0x23a)),_0x265863=async(_0x562fc3,_0x268906)=>{const _0x776e6c=_0x32f792,_0x515abb=_0x562fc3[_0x776e6c(0x249)](_0x3d2349['UserManagerService']),_0x35930d=_0x562fc3['get'](_0x1c96cf[_0x776e6c(0x1eb)]);_0x268906['forEach'](_0xef0e41=>{const _0x259b69=_0x776e6c;_0x515abb[_0x259b69(0x201)](_0xef0e41)&&_0x268906[_0x259b69(0x221)](_0xef0e41);}),_0x268906[_0x776e6c(0x1f2)]&&(await _0x35930d['get'](_0x776e6c(0x20f),{'params':{'userIDs':[..._0x268906]}}))[_0x776e6c(0x1cd)]['users']['forEach'](_0x51bdb2=>{const _0x371f9a=_0x776e6c;_0x51bdb2&&_0x515abb[_0x371f9a(0x1fd)](_0x51bdb2);});};var _0x54c67f=Object[_0x32f792(0x206)],_0x4521c8=(_0x4c41de,_0x9e3df4,_0x7e3850,_0x49000b)=>{const _0x1f11f8=_0x32f792;for(var _0x48e598=_0x49000b>0x1?void 0x0:_0x49000b?_0x54c67f(_0x9e3df4,_0x7e3850):_0x9e3df4,_0x310832=_0x4c41de[_0x1f11f8(0x1e8)]-0x1,_0x3f8434;_0x310832>=0x0;_0x310832--)(_0x3f8434=_0x4c41de[_0x310832])&&(_0x48e598=_0x3f8434(_0x48e598)||_0x48e598);return _0x48e598;},_0x262f31=(_0x54ceed,_0x4e9a1c)=>(_0x4c7857,_0x3b48e2)=>_0x4e9a1c(_0x4c7857,_0x3b48e2,_0x54ceed);let _0x34b785=class extends _0x3d2349['Disposable']{constructor(_0xd8b08e,_0x20a890,_0x550781,_0xf65251){const _0x32d6a0=_0x32f792;super(),this[_0x32d6a0(0x21c)]=_0xd8b08e,this[_0x32d6a0(0x22c)]=_0x20a890,this[_0x32d6a0(0x247)]=_0x550781,this[_0x32d6a0(0x1e5)]=_0xf65251,this[_0x32d6a0(0x241)](),this[_0x32d6a0(0x1f8)]();}[_0x32f792(0x1f8)](){const _0xd712d0=_0x32f792;this[_0xd712d0(0x1ea)](this[_0xd712d0(0x22c)]['commentUpdate$'][_0xd712d0(0x222)](_0x54ad63[_0xd712d0(0x212)](0x10))['subscribe'](_0x39a2b5=>{const _0x2ff023=_0xd712d0,_0x4e9547=new Set();_0x39a2b5[_0x2ff023(0x214)](_0x526686=>{const _0x988d86=_0x2ff023;switch(_0x526686[_0x988d86(0x1d4)]){case _0x988d86(0x21e):{const _0x957ef1=_0x526686[_0x988d86(0x23b)]['personId'];_0x4e9547['add'](_0x957ef1);break;}}}),_0x265863(this['_injector'],_0x4e9547);}));}[_0x32f792(0x241)](){const _0x5ef15f=_0x32f792;this[_0x5ef15f(0x1ea)](this[_0x5ef15f(0x21c)][_0x5ef15f(0x21d)][_0x5ef15f(0x1ef)](async _0x5bfa5e=>{const _0xe1b3a6=_0x5ef15f;var _0x30119e,_0x506267,_0x33b3c5,_0x34e1df;const _0x2262ae=(_0x30119e=this['_threadCommentModel'][_0xe1b3a6(0x227)](_0x5bfa5e['unitId'])[_0xe1b3a6(0x22a)](_0x531623=>_0x531623[_0xe1b3a6(0x22d)]===_0x5bfa5e['threadId']))==null?void 0x0:_0x30119e[_0xe1b3a6(0x1fa)];if(!_0x2262ae)return;const {unitId:_0x2fa52c,subUnitId:_0x26ffa7}=_0x2262ae;switch(_0x5bfa5e[_0xe1b3a6(0x1c9)]&&this[_0xe1b3a6(0x247)][_0xe1b3a6(0x1fd)](_0x5bfa5e[_0xe1b3a6(0x1c9)]),_0x5bfa5e[_0xe1b3a6(0x1d4)]){case _0x574f5f[_0xe1b3a6(0x213)]:break;case _0x574f5f[_0xe1b3a6(0x1d9)]:{this['_threadCommentModel'][_0xe1b3a6(0x205)](_0x2fa52c,_0x26ffa7,{'unitId':_0x2fa52c,'subUnitId':_0x26ffa7,'ref':'','id':_0x5bfa5e['replyId'],'dT':_0x53d14c(+_0x5bfa5e[_0xe1b3a6(0x1fb)]),'threadId':_0x5bfa5e[_0xe1b3a6(0x22d)],'personId':(_0x33b3c5=(_0x506267=_0x5bfa5e[_0xe1b3a6(0x1c9)])==null?void 0x0:_0x506267['userID'])!=null?_0x33b3c5:_0x5bfa5e[_0xe1b3a6(0x24c)],'text':JSON[_0xe1b3a6(0x242)](_0x5bfa5e[_0xe1b3a6(0x21f)]),'parentId':_0x2262ae['id']});break;}case _0x574f5f[_0xe1b3a6(0x230)]:{const _0x3065e2=this[_0xe1b3a6(0x22c)][_0xe1b3a6(0x1e4)](_0x2fa52c,_0x26ffa7,_0x5bfa5e[_0xe1b3a6(0x1ca)]);_0x3065e2&&_0x3065e2[_0xe1b3a6(0x1c8)]&&this[_0xe1b3a6(0x22c)][_0xe1b3a6(0x1c3)](_0x2fa52c,_0x26ffa7,_0x5bfa5e['replyId']);break;}case _0x574f5f[_0xe1b3a6(0x216)]:{this[_0xe1b3a6(0x22c)][_0xe1b3a6(0x1d7)](_0x2fa52c,_0x26ffa7,{'commentId':_0x5bfa5e[_0xe1b3a6(0x1ca)],'text':JSON[_0xe1b3a6(0x242)](_0x5bfa5e[_0xe1b3a6(0x21f)])});break;}case _0x574f5f[_0xe1b3a6(0x22f)]:{const _0xdc1ca9=(_0x34e1df=this[_0xe1b3a6(0x22c)][_0xe1b3a6(0x227)](_0x5bfa5e[_0xe1b3a6(0x225)])[_0xe1b3a6(0x22a)](_0x5d175a=>_0x5d175a[_0xe1b3a6(0x22d)]===_0x5bfa5e[_0xe1b3a6(0x22d)]))==null?void 0x0:_0x34e1df[_0xe1b3a6(0x1fa)];_0xdc1ca9&&this['_threadCommentModel'][_0xe1b3a6(0x23f)](_0x2fa52c,_0x26ffa7,_0xdc1ca9['id'],_0x5bfa5e[_0xe1b3a6(0x235)]===_0x55a88f[_0xe1b3a6(0x200)]);break;}}}));}};_0x34b785=_0x4521c8([_0x262f31(0x0,_0x3d2349['Inject'](_0x5bf447['CommentService'])),_0x262f31(0x1,_0x3d2349[_0x32f792(0x1cf)](_0x163613['ThreadCommentModel'])),_0x262f31(0x2,_0x3d2349[_0x32f792(0x1cf)](_0x3d2349[_0x32f792(0x1de)])),_0x262f31(0x3,_0x3d2349[_0x32f792(0x1cf)](_0x3d2349[_0x32f792(0x245)]))],_0x34b785);const _0x33ef92=_0x32f792(0x238),_0x34d92f={};var _0x24b354=Object['getOwnPropertyDescriptor'],_0x7d825d=(_0x2e9e13,_0x261d3a,_0x2db8ac,_0x5d8342)=>{const _0x597835=_0x32f792;for(var _0x2543c0=_0x5d8342>0x1?void 0x0:_0x5d8342?_0x24b354(_0x261d3a,_0x2db8ac):_0x261d3a,_0x1caf90=_0x2e9e13[_0x597835(0x1e8)]-0x1,_0x17f632;_0x1caf90>=0x0;_0x1caf90--)(_0x17f632=_0x2e9e13[_0x1caf90])&&(_0x2543c0=_0x17f632(_0x2543c0)||_0x2543c0);return _0x2543c0;},_0x2d8e28=(_0x40e734,_0x4ccf88)=>(_0x28f770,_0x59be39)=>_0x4ccf88(_0x28f770,_0x59be39,_0x40e734);function _0x3a2eb0(_0x7ae03f,_0x1f62ec){const _0x55d1b7=_0x32f792,_0x5c246c=_0x7ae03f[_0x55d1b7(0x1e0)][0x0];return{..._0x1f62ec,'id':_0x5c246c[_0x55d1b7(0x1ca)],'resolved':_0x7ae03f[_0x55d1b7(0x235)]===0x1,'dT':_0x53d14c(_0x5c246c[_0x55d1b7(0x1fb)]),'personId':_0x5c246c[_0x55d1b7(0x24c)],'threadId':_0x5c246c[_0x55d1b7(0x22d)]};}function _0x1df6e8(_0x1296d2,_0x46818c,_0x27bf66){const _0xc39ba6=_0x32f792;var _0x528169,_0x2a6790;if(((_0x2a6790=(_0x528169=_0x1296d2==null?void 0x0:_0x1296d2[_0xc39ba6(0x1e0)])==null?void 0x0:_0x528169[_0xc39ba6(0x1e8)])!=null?_0x2a6790:0x0)>0x0){const _0x2ecb00=(_0x5de774,_0x2dc63d)=>({'id':_0x5de774['replyId'],'threadId':_0x5de774['threadId'],'dT':_0x53d14c(_0x5de774[_0xc39ba6(0x1fb)]),'personId':_0x5de774[_0xc39ba6(0x24c)],'resolved':_0x1296d2[_0xc39ba6(0x235)]===_0x55a88f[_0xc39ba6(0x200)],'unitId':_0x46818c,'subUnitId':_0x27bf66,'text':JSON[_0xc39ba6(0x242)](_0x5de774['content']),'parentId':_0x2dc63d}),_0x1443af=_0x2ecb00(_0x1296d2[_0xc39ba6(0x1e0)][0x0]);return{..._0x1443af,'children':_0x1296d2[_0xc39ba6(0x1e0)][_0xc39ba6(0x229)](0x1)[_0xc39ba6(0x240)](_0x5e454f=>_0x2ecb00(_0x5e454f,_0x1443af['id']))};}return null;}let _0x59d0d9=class{constructor(_0x35bf2b,_0x2ad2e8,_0x5c3c3e,_0x3df11c){const _0x58fd7b=_0x32f792;this['_httpService']=_0x35bf2b,this[_0x58fd7b(0x247)]=_0x2ad2e8,this[_0x58fd7b(0x236)]=_0x5c3c3e,this['_injector']=_0x3df11c;}async[_0x32f792(0x205)](_0x55333d){const _0x1ed39b=_0x32f792;var _0x3f8ff1,_0x38ea10;const {parentId:_0x139cf7,unitId:_0x6d60f9,text:_0x520457,threadId:_0x5dee78}=_0x55333d,_0x43f433=(_0x38ea10=(_0x3f8ff1=_0x520457[_0x1ed39b(0x1cb)])==null?void 0x0:_0x3f8ff1[_0x1ed39b(0x1c2)](_0x2f6937=>_0x2f6937[_0x1ed39b(0x1f4)]===_0x3d2349[_0x1ed39b(0x239)]['COMMENT'])[_0x1ed39b(0x240)](_0x10013a=>_0x10013a[_0x1ed39b(0x23e)]))!=null?_0x38ea10:[],_0x3bfec3=JSON[_0x1ed39b(0x20a)](_0x520457),_0x39d34e=(await this[_0x1ed39b(0x236)][_0x1ed39b(0x1f9)](_0x6d60f9))[_0x1ed39b(0x20e)]();if(_0x139cf7){const _0x2e5d09={'memberId':_0x39d34e,'unitId':_0x6d60f9,'content':_0x3bfec3,'mention':_0x43f433,'threadId':_0x5dee78},_0xb9fdab=(await this['_httpService'][_0x1ed39b(0x219)](_0x1ed39b(0x215)+_0x6d60f9+_0x1ed39b(0x1e7),{'body':_0x2e5d09}))[_0x1ed39b(0x1cd)][_0x1ed39b(0x1e3)];return{..._0x55333d,'id':_0xb9fdab[_0x1ed39b(0x1ca)],'dT':_0x3d2349[_0x1ed39b(0x226)](+_0xb9fdab[_0x1ed39b(0x1fb)])[_0x1ed39b(0x243)](_0x1ed39b(0x23a)),'personId':_0xb9fdab[_0x1ed39b(0x24c)]};}else{const _0xd79d18={'memberId':_0x39d34e,'unitId':_0x6d60f9,'content':_0x3bfec3,'mention':_0x43f433},_0x274295=await this['_httpService']['post'](_0x1ed39b(0x215)+_0x6d60f9+_0x1ed39b(0x1ee),{'body':_0xd79d18});return _0x3a2eb0(_0x274295[_0x1ed39b(0x1cd)][_0x1ed39b(0x1f3)],_0x55333d);}}async['updateComment'](_0x2abec5){const _0x32ae58=_0x32f792;var _0x4754fa,_0x50e24d;const {text:_0x48c27d,unitId:_0x182fae}=_0x2abec5,_0x294294=(_0x50e24d=(_0x4754fa=_0x48c27d['customRanges'])==null?void 0x0:_0x4754fa[_0x32ae58(0x1c2)](_0x56d5b6=>_0x56d5b6[_0x32ae58(0x1f4)]===_0x3d2349['CustomRangeType'][_0x32ae58(0x209)])[_0x32ae58(0x240)](_0x5dac7a=>_0x5dac7a[_0x32ae58(0x23e)]))!=null?_0x50e24d:[],_0xf44d85=JSON[_0x32ae58(0x20a)](_0x48c27d),_0x20f350=_0x2abec5[_0x32ae58(0x22d)],_0x1ea3a9=_0x2abec5['id'],_0x2868d9={'memberId':(await this[_0x32ae58(0x236)]['requireSession'](_0x182fae))[_0x32ae58(0x20e)](),'unitId':_0x182fae,'threadId':_0x20f350,'mention':_0x294294,'content':_0xf44d85,'replyId':_0x1ea3a9},_0x485218=await this[_0x32ae58(0x223)][_0x32ae58(0x219)](_0x32ae58(0x215)+_0x182fae+_0x32ae58(0x203),{'body':_0x2868d9});return!_0x485218[_0x32ae58(0x1cd)]['error']||_0x485218[_0x32ae58(0x1cd)]['error'][_0x32ae58(0x20d)]===0x1;}async['resolveComment'](_0x50f231){const _0x119379=_0x32f792,{unitId:_0x26e49a}=_0x50f231,_0x23a2f0=_0x50f231[_0x119379(0x22d)],_0x2c5314={'memberId':this[_0x119379(0x247)][_0x119379(0x1dc)]()[_0x119379(0x246)],'unitId':_0x26e49a,'threadId':_0x23a2f0,'solved':_0x50f231[_0x119379(0x1da)]?_0x55a88f[_0x119379(0x200)]:_0x55a88f[_0x119379(0x248)]},_0x4b9af5=await this[_0x119379(0x223)]['post'](_0x119379(0x215)+_0x26e49a+'/solved',{'body':_0x2c5314});return!_0x4b9af5[_0x119379(0x1cd)]['error']||_0x4b9af5[_0x119379(0x1cd)][_0x119379(0x1d2)][_0x119379(0x20d)]===0x1;}async[_0x32f792(0x1c3)](_0x35a4f0,_0x9b13d1,_0x2fbe74,_0x27a1b6){const _0x3bfac1=_0x32f792,_0x430ebd={'memberId':(await this[_0x3bfac1(0x236)][_0x3bfac1(0x1f9)](_0x35a4f0))[_0x3bfac1(0x20e)](),'threadId':_0x2fbe74,'replyId':_0x27a1b6,'unitId':_0x35a4f0},_0x459ef6=await this[_0x3bfac1(0x223)][_0x3bfac1(0x219)](_0x3bfac1(0x215)+_0x35a4f0+'/delete',{'body':_0x430ebd});return!_0x459ef6[_0x3bfac1(0x1cd)][_0x3bfac1(0x1d2)]||_0x459ef6[_0x3bfac1(0x1cd)][_0x3bfac1(0x1d2)]['code']===0x1;}async['listComments'](_0x1152c3,_0x57fd5f,_0x53e996){const _0x190f7e=_0x32f792,_0x216f57={'unitId':_0x1152c3,'threadId':_0x53e996},_0x26bbb0=await this[_0x190f7e(0x223)][_0x190f7e(0x219)](_0x190f7e(0x215)+_0x1152c3+'/list',{'body':_0x216f57}),_0x3cd4fa=_0x53e996[_0x190f7e(0x240)](_0xdf9ef6=>_0x1df6e8(_0x26bbb0[_0x190f7e(0x1cd)][_0x190f7e(0x211)][_0xdf9ef6],_0x1152c3,_0x57fd5f))[_0x190f7e(0x1c2)](Boolean);return Object['values'](_0x26bbb0[_0x190f7e(0x1cd)][_0x190f7e(0x1db)])['forEach'](_0x4aa009=>{const _0x55d204=_0x190f7e;this[_0x55d204(0x247)][_0x55d204(0x1fd)](_0x4aa009);}),_0x3cd4fa;}[_0x32f792(0x1d0)](_0x11787f){const _0x20dba1=_0x32f792;return{'id':_0x11787f['id'],'threadId':_0x11787f[_0x20dba1(0x22d)],'ref':_0x11787f['ref']};}};_0x59d0d9=_0x7d825d([_0x2d8e28(0x0,_0x3d2349[_0x32f792(0x1cf)](_0x1c96cf['HTTPService'])),_0x2d8e28(0x1,_0x3d2349[_0x32f792(0x1cf)](_0x3d2349['UserManagerService'])),_0x2d8e28(0x2,_0x3d2349[_0x32f792(0x1cf)](_0x5bf447[_0x32f792(0x1df)])),_0x2d8e28(0x3,_0x3d2349[_0x32f792(0x1cf)](_0x3d2349[_0x32f792(0x245)]))],_0x59d0d9);var _0x69fd53=Object[_0x32f792(0x206)],_0x205afc=(_0x1a6058,_0x3b0a8a,_0x4d8cae,_0x276e57)=>{const _0x20fadd=_0x32f792;for(var _0x1b1672=_0x276e57>0x1?void 0x0:_0x276e57?_0x69fd53(_0x3b0a8a,_0x4d8cae):_0x3b0a8a,_0x5ef300=_0x1a6058[_0x20fadd(0x1e8)]-0x1,_0x3c56b1;_0x5ef300>=0x0;_0x5ef300--)(_0x3c56b1=_0x1a6058[_0x5ef300])&&(_0x1b1672=_0x3c56b1(_0x1b1672)||_0x1b1672);return _0x1b1672;},_0x1e0a69=(_0xd65d9,_0x2db075)=>(_0x5a683a,_0x407b61)=>_0x2db075(_0x5a683a,_0x407b61,_0xd65d9);let _0x165979=class extends _0x3d2349['Disposable']{constructor(_0x151cb6,_0x490627){const _0x203b4e=_0x32f792;super(),this[_0x203b4e(0x1e9)]=_0x151cb6,this[_0x203b4e(0x217)]=_0x490627,this['_initDataSource']();}['_initDataSource'](){const _0x91997e=_0x32f792;this[_0x91997e(0x1e9)][_0x91997e(0x1c6)]=this[_0x91997e(0x217)],this[_0x91997e(0x1e9)]['syncUpdateMutationToColla']=!0x1;}};_0x165979=_0x205afc([_0x1e0a69(0x0,_0x163613[_0x32f792(0x1fc)]),_0x1e0a69(0x1,_0x3d2349['Inject'](_0x59d0d9))],_0x165979);var _0x5db343=Object[_0x32f792(0x208)],_0x16e533=Object['getOwnPropertyDescriptor'],_0x4b1f61=(_0x2c9caa,_0x5a578c,_0x3aad28)=>_0x5a578c in _0x2c9caa?_0x5db343(_0x2c9caa,_0x5a578c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3aad28}):_0x2c9caa[_0x5a578c]=_0x3aad28,_0x5681cd=(_0x344422,_0x5f192e,_0x55b018,_0x3730ac)=>{const _0x1e63b0=_0x32f792;for(var _0x17d6b9=_0x3730ac>0x1?void 0x0:_0x3730ac?_0x16e533(_0x5f192e,_0x55b018):_0x5f192e,_0x596df8=_0x344422[_0x1e63b0(0x1e8)]-0x1,_0x53bd17;_0x596df8>=0x0;_0x596df8--)(_0x53bd17=_0x344422[_0x596df8])&&(_0x17d6b9=_0x53bd17(_0x17d6b9)||_0x17d6b9);return _0x17d6b9;},_0x13b900=(_0x1aeaf3,_0x472c49)=>(_0x3362dd,_0x2d039c)=>_0x472c49(_0x3362dd,_0x2d039c,_0x1aeaf3),_0x27c141=(_0x16a990,_0x3fda19,_0xaf7f98)=>_0x4b1f61(_0x16a990,typeof _0x3fda19!=_0x32f792(0x1d5)?_0x3fda19+'':_0x3fda19,_0xaf7f98);_0x2682ef[_0x32f792(0x224)]=class extends _0x3d2349['Plugin']{constructor(_0x20a41c=_0x34d92f,_0x2013ce,_0x44483d){const _0x3c536e=_0x32f792;super(),this[_0x3c536e(0x234)]=_0x20a41c,this['_injector']=_0x2013ce,this[_0x3c536e(0x1d8)]=_0x44483d;const {..._0x483d11}=_0x3d2349[_0x3c536e(0x1c4)]({},_0x34d92f,this['_config']);this['_configService'][_0x3c536e(0x1f6)](_0x33ef92,_0x483d11);}[_0x32f792(0x1fe)](){[[_0x59d0d9],[_0x165979],[_0x34b785]]['forEach'](_0x2222c3=>{const _0x256784=_0x45a4;this[_0x256784(0x1e5)]['add'](_0x2222c3);});}['onReady'](){const _0x1a55d8=_0x32f792;this[_0x1a55d8(0x1e5)][_0x1a55d8(0x249)](_0x165979),this[_0x1a55d8(0x1e5)]['get'](_0x34b785);}},_0x27c141(_0x2682ef['UniverThreadCommentDataSourcePlugin'],_0x32f792(0x23d),_0x6600a5),_0x27c141(_0x2682ef[_0x32f792(0x224)],_0x32f792(0x1d4),_0x3d2349[_0x32f792(0x231)][_0x32f792(0x202)]),_0x2682ef[_0x32f792(0x224)]=_0x5681cd([_0x3d2349['DependentOn'](_0x2eb246[_0x32f792(0x1e1)],_0x5bf447[_0x32f792(0x207)],_0x87c284[_0x32f792(0x1d6)]),_0x13b900(0x1,_0x3d2349[_0x32f792(0x1cf)](_0x3d2349[_0x32f792(0x245)])),_0x13b900(0x2,_0x3d2349[_0x32f792(0x1dd)])],_0x2682ef[_0x32f792(0x224)]),Object[_0x32f792(0x208)](_0x2682ef,Symbol[_0x32f792(0x1cc)],{'value':_0x32f792(0x1c5)});}));function _0x45a4(_0x4148b0,_0x15bc52){const _0x45e888=_0x45e8();return _0x45a4=function(_0x45a4ce,_0xfeb70c){_0x45a4ce=_0x45a4ce-0x1c2;let _0x4a8f6f=_0x45e888[_0x45a4ce];return _0x4a8f6f;},_0x45a4(_0x4148b0,_0x15bc52);}function _0x45e8(){const _0xbe8abd=['_config','solved','_sessionService','@univerjs/network','thread-comment-data-source.config','CustomRangeType','YYYY/MM/DD\x20HH:mm','payload','exports','pluginName','rangeId','resolveComment','map','_init','parse','format','@univerjs/core','Injector','userID','_userService','OpenOrReOpen','get','UniverProThreadCommentDatasource','78IvPnwI','userId','filter','deleteComment','merge','Module','dataSource','3598776BUWdib','parentId','user','replyId','customRanges','toStringTag','body','UniverProCollaborationClient','Inject','saveCommentToSnapshot','1694560eHCuDq','error','amd','type','symbol','UniverLicensePlugin','updateComment','_configService','Reply','resolved','users','getCurrentUser','IConfigService','UserManagerService','CollaborationSessionService','replies','UniverThreadCommentUIPlugin','33zDcTgb','reply','getComment','_injector','@univerjs/thread-comment-ui','/reply','length','_threadCommentDataSourceService','disposeWithMe','HTTPService','UNRECOGNIZED','object','/add','subscribe','6RfcBJA','UniverNetwork','size','comment','rangeType','@univerjs-pro/license','setConfig','rxjs','_initUserSync','requireSession','root','createTimestamp','IThreadCommentDataSourceService','addUser','onStarting','@univerjs/thread-comment','Solved','getUser','UNIVER_UNKNOWN','/edit','@univerjs-pro/collaboration-client','addComment','getOwnPropertyDescriptor','UniverCollaborationClientPlugin','defineProperty','COMMENT','stringify','function','6446064FaBFsB','code','getMemberID','/universer-api/user/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','comments','bufferTime','Add','forEach','/universer-api/comment/unit/','Edit','_threadCommentDataSource','34856hdXAqp','post','8rHbspF','UniverThreadCommentUi','_commentService','commentUpdate$','add','content','267xyeRdt','delete','pipe','_httpService','UniverThreadCommentDataSourcePlugin','unitId','dayjs','getUnit','UniverCore','slice','find','Unknown','_threadCommentModel','threadId','2924012KkRfQw','Solve','Delete','UniverInstanceType','135449AxNwbC','4330OkweGK'];_0x45e8=function(){return _0xbe8abd;};return _0x45e8();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.6.10-nightly.202504261606",
3
+ "version": "0.6.10-nightly.202504281607",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,18 +45,18 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.6.10-nightly.202504261606",
49
- "@univerjs/network": "0.6.10-nightly.202504261606",
50
- "@univerjs-pro/license": "0.6.10-nightly.202504261606",
51
- "@univerjs/core": "0.6.10-nightly.202504261606",
48
+ "@univerjs-pro/collaboration-client": "0.6.10-nightly.202504281607",
49
+ "@univerjs/core": "0.6.10-nightly.202504281607",
50
+ "@univerjs-pro/license": "0.6.10-nightly.202504281607",
52
51
  "@univerjs/protocol": "0.1.46-alpha.3",
53
- "@univerjs/thread-comment-ui": "0.6.10-nightly.202504261606",
54
- "@univerjs/thread-comment": "0.6.10-nightly.202504261606"
52
+ "@univerjs/thread-comment": "0.6.10-nightly.202504281607",
53
+ "@univerjs/network": "0.6.10-nightly.202504281607",
54
+ "@univerjs/thread-comment-ui": "0.6.10-nightly.202504281607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",
58
58
  "typescript": "^5.8.3",
59
- "vite": "^6.3.0",
59
+ "vite": "^6.3.3",
60
60
  "vitest": "^3.1.2",
61
61
  "@univerjs-infra/shared": "0.6.10"
62
62
  },