@univerjs-pro/thread-comment-datasource 0.9.4 → 0.10.0

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 _0x161a(){const _0x396c16=['Module','getUnit','/universer-api/user/list','76QeXvsQ','getMemberID','/solved','_commentService','UniverThreadCommentUIPlugin','_userService','/delete','createTimestamp','syncUpdateMutationToColla','addComment','userId','updateComment','Solved','thread-comment-data-source.config','saveCommentToSnapshot','symbol','IConfigService','86218GrvNys','_config','parse','587322JFLxHr','replies','unitId','getUser','solved','subscribe','UniverInstanceType','Plugin','format','pluginName','payload','UniverCollaborationClientPlugin','defineProperty','toStringTag','post','filter','UniverLicensePlugin','parentId','UserManagerService','threadId','resolved','get','Disposable','bufferTime','/list','UniverThreadCommentDataSourcePlugin','DependentOn','COMMENT','map','values','HTTPService','CustomRangeType','IThreadCommentDataSourceService','_initDataSource','_threadCommentDataSource','546423jIQSHV','code','onReady','deleteComment','requireSession','_initUserSync','45feJDYl','add','forEach','353978NvHrrU','getComment','rangeType','userID','Injector','_threadCommentDataSourceService','UNIVER_UNKNOWN','rangeId','replyId','OpenOrReOpen','/universer-api/comment/unit/','1fOkwle','length','_injector','Add','error','_init','173440JnsrCI','330XzqxHD','content','/add','resolveComment','/reply','Reply','size','_threadCommentModel','body','merge','Edit','find','root','dayjs','Delete','addUser','getOwnPropertyDescriptor','Unknown','UNRECOGNIZED','_httpService','customRanges','user','Solve','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','setConfig','56395IMAMil','commentUpdate$','disposeWithMe','listComments','217665yxKsAE','comment','comments','type','Inject','getCurrentUser','_sessionService','stringify'];_0x161a=function(){return _0x396c16;};return _0x161a();}const _0x45f004=_0x11a1;(function(_0x426e38,_0x5342ed){const _0x4a0224=_0x11a1,_0x4d3b0b=_0x426e38();while(!![]){try{const _0x42a89b=parseInt(_0x4a0224(0xbc))/0x1*(parseInt(_0x4a0224(0xb1))/0x2)+parseInt(_0x4a0224(0xa8))/0x3+-parseInt(_0x4a0224(0xeb))/0x4*(-parseInt(_0x4a0224(0xdc))/0x5)+-parseInt(_0x4a0224(0x85))/0x6+parseInt(_0x4a0224(0xe0))/0x7+-parseInt(_0x4a0224(0xc2))/0x8*(parseInt(_0x4a0224(0xae))/0x9)+-parseInt(_0x4a0224(0xc3))/0xa*(parseInt(_0x4a0224(0x82))/0xb);if(_0x42a89b===_0x5342ed)break;else _0x4d3b0b['push'](_0x4d3b0b['shift']());}catch(_0x245303){_0x4d3b0b['push'](_0x4d3b0b['shift']());}}}(_0x161a,0x22141));function _0x11a1(_0x344031,_0x1ae23e){const _0x161a2f=_0x161a();return _0x11a1=function(_0x11a159,_0x242ace){_0x11a159=_0x11a159-0x7b;let _0x8d27b7=_0x161a2f[_0x11a159];return _0x8d27b7;},_0x11a1(_0x344031,_0x1ae23e);}Object[_0x45f004(0x91)](exports,Symbol[_0x45f004(0x92)],{'value':_0x45f004(0xe8)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x45f004(0xda);var I=(_0x408f74=>(_0x408f74[_0x408f74[_0x45f004(0xba)]=0x0]=_0x45f004(0xba),_0x408f74[_0x408f74[_0x45f004(0x7d)]=0x1]=_0x45f004(0x7d),_0x408f74[_0x408f74[_0x45f004(0xd5)]=-0x1]=_0x45f004(0xd5),_0x408f74))(I||{}),v=(_0x44637e=>(_0x44637e[_0x44637e[_0x45f004(0xd4)]=0x0]=_0x45f004(0xd4),_0x44637e[_0x44637e[_0x45f004(0xbf)]=0x1]=_0x45f004(0xbf),_0x44637e[_0x44637e[_0x45f004(0xc8)]=0x2]=_0x45f004(0xc8),_0x44637e[_0x44637e[_0x45f004(0xcd)]=0x3]=_0x45f004(0xcd),_0x44637e[_0x44637e[_0x45f004(0xd1)]=0x4]='Delete',_0x44637e[_0x44637e['Solve']=0x5]=_0x45f004(0xd9),_0x44637e[_0x44637e[_0x45f004(0xd5)]=-0x1]='UNRECOGNIZED',_0x44637e))(v||{});const f=_0x52dc62=>c[_0x45f004(0xd0)](new Date(+_0x52dc62))[_0x45f004(0x8d)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x3b5a92,_0x30e8ed)=>{const _0x5530e3=_0x45f004,_0x5d4117=_0x3b5a92[_0x5530e3(0x9a)](c[_0x5530e3(0x97)]),_0x1e6e9f=_0x3b5a92[_0x5530e3(0x9a)](P[_0x5530e3(0xa3)]);_0x30e8ed['forEach'](_0x1ca309=>{const _0x27de68=_0x5530e3;_0x5d4117[_0x27de68(0x88)](_0x1ca309)&&_0x30e8ed['delete'](_0x1ca309);}),_0x30e8ed[_0x5530e3(0xc9)]&&(await _0x1e6e9f[_0x5530e3(0x9a)](_0x5530e3(0xea),{'params':{'userIDs':[..._0x30e8ed]}}))[_0x5530e3(0xcb)]['users'][_0x5530e3(0xb0)](_0x34e684=>{_0x34e684&&_0x5d4117['addUser'](_0x34e684);});};var $=Object[_0x45f004(0xd3)],E=(_0x466644,_0x577342,_0x49d696,_0x11ac6f)=>{const _0x52bdcb=_0x45f004;for(var _0x1c652c=_0x11ac6f>0x1?void 0x0:_0x11ac6f?$(_0x577342,_0x49d696):_0x577342,_0xd8bbef=_0x466644[_0x52bdcb(0xbd)]-0x1,_0x134a63;_0xd8bbef>=0x0;_0xd8bbef--)(_0x134a63=_0x466644[_0xd8bbef])&&(_0x1c652c=_0x134a63(_0x1c652c)||_0x1c652c);return _0x1c652c;},S=(_0x2c3a04,_0x57ddfb)=>(_0x14e24a,_0x544d67)=>_0x57ddfb(_0x14e24a,_0x544d67,_0x2c3a04);let p=class extends c[_0x45f004(0x9b)]{constructor(_0x1b6107,_0x143260,_0x43021c,_0x56d6f9){const _0x34feb2=_0x45f004;super(),this[_0x34feb2(0xee)]=_0x1b6107,this[_0x34feb2(0xca)]=_0x143260,this[_0x34feb2(0xf0)]=_0x43021c,this[_0x34feb2(0xbe)]=_0x56d6f9,this[_0x34feb2(0xc1)](),this[_0x34feb2(0xad)]();}[_0x45f004(0xad)](){const _0x4fbb3b=_0x45f004;this[_0x4fbb3b(0xde)](this[_0x4fbb3b(0xca)]['commentUpdate$']['pipe'](w[_0x4fbb3b(0x9c)](0x10))['subscribe'](_0x5cd6d9=>{const _0x2a90ab=_0x4fbb3b,_0x3f6805=new Set();_0x5cd6d9[_0x2a90ab(0xb0)](_0x386b45=>{const _0x1b1107=_0x2a90ab;switch(_0x386b45['type']){case _0x1b1107(0xaf):{const _0x38c2ef=_0x386b45[_0x1b1107(0x8f)]['personId'];_0x3f6805[_0x1b1107(0xaf)](_0x38c2ef);break;}}}),R(this[_0x2a90ab(0xbe)],_0x3f6805);}));}['_init'](){const _0x4874d6=_0x45f004;this[_0x4874d6(0xde)](this[_0x4874d6(0xee)][_0x4874d6(0xdd)][_0x4874d6(0x8a)](async _0x28488=>{const _0x3c5907=_0x4874d6;var _0x2348f9,_0x12466a,_0x10fee9,_0x164b19;const _0x3a8554=(_0x2348f9=this[_0x3c5907(0xca)][_0x3c5907(0xe9)](_0x28488['unitId'])[_0x3c5907(0xce)](_0x45a80d=>_0x45a80d['threadId']===_0x28488[_0x3c5907(0x98)]))==null?void 0x0:_0x2348f9[_0x3c5907(0xcf)];if(!_0x3a8554)return;const {unitId:_0x4386cb,subUnitId:_0x3fe8ad}=_0x3a8554;switch(_0x28488['user']&&this[_0x3c5907(0xf0)][_0x3c5907(0xd2)](_0x28488['user']),_0x28488[_0x3c5907(0xe3)]){case v['Add']:break;case v[_0x3c5907(0xc8)]:{this[_0x3c5907(0xca)][_0x3c5907(0xf4)](_0x4386cb,_0x3fe8ad,{'unitId':_0x4386cb,'subUnitId':_0x3fe8ad,'ref':'','id':_0x28488[_0x3c5907(0xb9)],'dT':f(+_0x28488[_0x3c5907(0xf2)]),'threadId':_0x28488[_0x3c5907(0x98)],'personId':(_0x10fee9=(_0x12466a=_0x28488[_0x3c5907(0xd8)])==null?void 0x0:_0x12466a['userID'])!=null?_0x10fee9:_0x28488[_0x3c5907(0x7b)],'text':JSON[_0x3c5907(0x84)](_0x28488[_0x3c5907(0xc4)]),'parentId':_0x3a8554['id']});break;}case v['Delete']:{const _0x16fb91=this[_0x3c5907(0xca)][_0x3c5907(0xb2)](_0x4386cb,_0x3fe8ad,_0x28488[_0x3c5907(0xb9)]);_0x16fb91&&_0x16fb91[_0x3c5907(0x96)]&&this['_threadCommentModel'][_0x3c5907(0xab)](_0x4386cb,_0x3fe8ad,_0x28488[_0x3c5907(0xb9)]);break;}case v[_0x3c5907(0xcd)]:{this[_0x3c5907(0xca)][_0x3c5907(0x7c)](_0x4386cb,_0x3fe8ad,{'commentId':_0x28488[_0x3c5907(0xb9)],'text':JSON['parse'](_0x28488[_0x3c5907(0xc4)])});break;}case v[_0x3c5907(0xd9)]:{const _0x291e34=(_0x164b19=this['_threadCommentModel'][_0x3c5907(0xe9)](_0x28488[_0x3c5907(0x87)])['find'](_0x2840c7=>_0x2840c7['threadId']===_0x28488['threadId']))==null?void 0x0:_0x164b19['root'];_0x291e34&&this[_0x3c5907(0xca)][_0x3c5907(0xc6)](_0x4386cb,_0x3fe8ad,_0x291e34['id'],_0x28488[_0x3c5907(0x89)]===I[_0x3c5907(0x7d)]);break;}}}));}};p=E([S(0x0,c[_0x45f004(0xe4)](b['CommentService'])),S(0x1,c['Inject'](M['ThreadCommentModel'])),S(0x2,c[_0x45f004(0xe4)](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x45f004(0xb5)]))],p);const q=_0x45f004(0x7e),D={};var A=Object[_0x45f004(0xd3)],x=(_0x2c2da9,_0x4c4d10,_0x5d78d3,_0x49f4e1)=>{const _0x32e890=_0x45f004;for(var _0x338b86=_0x49f4e1>0x1?void 0x0:_0x49f4e1?A(_0x4c4d10,_0x5d78d3):_0x4c4d10,_0x14909f=_0x2c2da9[_0x32e890(0xbd)]-0x1,_0x21e484;_0x14909f>=0x0;_0x14909f--)(_0x21e484=_0x2c2da9[_0x14909f])&&(_0x338b86=_0x21e484(_0x338b86)||_0x338b86);return _0x338b86;},_=(_0xc3b227,_0xddc7a2)=>(_0x455fdb,_0x10d649)=>_0xddc7a2(_0x455fdb,_0x10d649,_0xc3b227);function Y(_0x5b5fc2,_0x18cf83){const _0x10ddc6=_0x45f004,_0x2e1446=_0x5b5fc2[_0x10ddc6(0x86)][0x0];return{..._0x18cf83,'id':_0x2e1446[_0x10ddc6(0xb9)],'resolved':_0x5b5fc2[_0x10ddc6(0x89)]===0x1,'dT':f(_0x2e1446[_0x10ddc6(0xf2)]),'personId':_0x2e1446[_0x10ddc6(0x7b)],'threadId':_0x2e1446[_0x10ddc6(0x98)]};}function G(_0x25b3de,_0x10bfa2,_0x592d0f){const _0x5b5b12=_0x45f004;var _0xb4e3b1,_0x588c61;if(((_0x588c61=(_0xb4e3b1=_0x25b3de==null?void 0x0:_0x25b3de[_0x5b5b12(0x86)])==null?void 0x0:_0xb4e3b1['length'])!=null?_0x588c61:0x0)>0x0){const _0x42c4ed=(_0x33632b,_0x425921)=>({'id':_0x33632b[_0x5b5b12(0xb9)],'threadId':_0x33632b[_0x5b5b12(0x98)],'dT':f(_0x33632b[_0x5b5b12(0xf2)]),'personId':_0x33632b[_0x5b5b12(0x7b)],'resolved':_0x25b3de['solved']===I['Solved'],'unitId':_0x10bfa2,'subUnitId':_0x592d0f,'text':JSON['parse'](_0x33632b['content']),'parentId':_0x425921}),_0x2ebe19=_0x42c4ed(_0x25b3de[_0x5b5b12(0x86)][0x0]);return{..._0x2ebe19,'children':_0x25b3de['replies']['slice'](0x1)[_0x5b5b12(0xa1)](_0x20b1f6=>_0x42c4ed(_0x20b1f6,_0x2ebe19['id']))};}return null;}let g=class{constructor(_0x319ebb,_0x41dec7,_0x10b267,_0x1fa59b){const _0x1c14a0=_0x45f004;this[_0x1c14a0(0xd6)]=_0x319ebb,this['_userService']=_0x41dec7,this[_0x1c14a0(0xe6)]=_0x10b267,this[_0x1c14a0(0xbe)]=_0x1fa59b;}async[_0x45f004(0xf4)](_0x420e19){const _0x33fe8e=_0x45f004;var _0x147650,_0x39bc88;const {parentId:_0x123431,unitId:_0x404fcb,text:_0x54fda5,threadId:_0x3efc96}=_0x420e19,_0x144c40=(_0x39bc88=(_0x147650=_0x54fda5[_0x33fe8e(0xd7)])==null?void 0x0:_0x147650[_0x33fe8e(0x94)](_0x73ffbc=>_0x73ffbc['rangeType']===c['CustomRangeType'][_0x33fe8e(0xa0)])[_0x33fe8e(0xa1)](_0x3af34f=>_0x3af34f['rangeId']))!=null?_0x39bc88:[],_0x14b138=JSON[_0x33fe8e(0xe7)](_0x54fda5),_0xcff443=(await this[_0x33fe8e(0xe6)]['requireSession'](_0x404fcb))[_0x33fe8e(0xec)]();if(_0x123431){const _0x2c7397={'memberId':_0xcff443,'unitId':_0x404fcb,'content':_0x14b138,'mention':_0x144c40,'threadId':_0x3efc96},_0x2d5409=(await this[_0x33fe8e(0xd6)][_0x33fe8e(0x93)](_0x33fe8e(0xbb)+_0x404fcb+_0x33fe8e(0xc7),{'body':_0x2c7397}))[_0x33fe8e(0xcb)]['reply'];return{..._0x420e19,'id':_0x2d5409['replyId'],'dT':c[_0x33fe8e(0xd0)](+_0x2d5409[_0x33fe8e(0xf2)])[_0x33fe8e(0x8d)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2d5409[_0x33fe8e(0x7b)]};}else{const _0x4c0541={'memberId':_0xcff443,'unitId':_0x404fcb,'content':_0x14b138,'mention':_0x144c40},_0x1e9726=await this[_0x33fe8e(0xd6)]['post'](_0x33fe8e(0xbb)+_0x404fcb+_0x33fe8e(0xc5),{'body':_0x4c0541});return Y(_0x1e9726[_0x33fe8e(0xcb)][_0x33fe8e(0xe1)],_0x420e19);}}async[_0x45f004(0x7c)](_0x4ec422){const _0x28498d=_0x45f004;var _0x47252a,_0xe56b3a;const {text:_0x2e2e1e,unitId:_0x21a944}=_0x4ec422,_0x3e433f=(_0xe56b3a=(_0x47252a=_0x2e2e1e['customRanges'])==null?void 0x0:_0x47252a[_0x28498d(0x94)](_0x2feefc=>_0x2feefc[_0x28498d(0xb3)]===c[_0x28498d(0xa4)]['COMMENT'])[_0x28498d(0xa1)](_0x17899f=>_0x17899f[_0x28498d(0xb8)]))!=null?_0xe56b3a:[],_0x187191=JSON['stringify'](_0x2e2e1e),_0x4e9969=_0x4ec422['threadId'],_0xdc7a90=_0x4ec422['id'],_0x9b3369={'memberId':(await this['_sessionService'][_0x28498d(0xac)](_0x21a944))[_0x28498d(0xec)](),'unitId':_0x21a944,'threadId':_0x4e9969,'mention':_0x3e433f,'content':_0x187191,'replyId':_0xdc7a90},_0x5aa58a=await this['_httpService']['post'](_0x28498d(0xbb)+_0x21a944+'/edit',{'body':_0x9b3369});return!_0x5aa58a[_0x28498d(0xcb)][_0x28498d(0xc0)]||_0x5aa58a[_0x28498d(0xcb)][_0x28498d(0xc0)][_0x28498d(0xa9)]===0x1;}async[_0x45f004(0xc6)](_0x29a8ec){const _0x4d3342=_0x45f004,{unitId:_0x36b580}=_0x29a8ec,_0x33932e=_0x29a8ec['threadId'],_0x5bc336={'memberId':this['_userService'][_0x4d3342(0xe5)]()[_0x4d3342(0xb4)],'unitId':_0x36b580,'threadId':_0x33932e,'solved':_0x29a8ec[_0x4d3342(0x99)]?I['Solved']:I[_0x4d3342(0xba)]},_0x27aa3f=await this['_httpService'][_0x4d3342(0x93)](_0x4d3342(0xbb)+_0x36b580+_0x4d3342(0xed),{'body':_0x5bc336});return!_0x27aa3f[_0x4d3342(0xcb)]['error']||_0x27aa3f[_0x4d3342(0xcb)]['error'][_0x4d3342(0xa9)]===0x1;}async[_0x45f004(0xab)](_0x21fae9,_0x2e880c,_0x4d5103,_0x4da26b){const _0xfbcf7f=_0x45f004,_0x3333ea={'memberId':(await this[_0xfbcf7f(0xe6)]['requireSession'](_0x21fae9))[_0xfbcf7f(0xec)](),'threadId':_0x4d5103,'replyId':_0x4da26b,'unitId':_0x21fae9},_0x124be7=await this[_0xfbcf7f(0xd6)][_0xfbcf7f(0x93)](_0xfbcf7f(0xbb)+_0x21fae9+_0xfbcf7f(0xf1),{'body':_0x3333ea});return!_0x124be7['body'][_0xfbcf7f(0xc0)]||_0x124be7[_0xfbcf7f(0xcb)]['error'][_0xfbcf7f(0xa9)]===0x1;}async[_0x45f004(0xdf)](_0x44b512,_0x7d40d9,_0x45a5d0){const _0xbfbd37=_0x45f004,_0x5e9819={'unitId':_0x44b512,'threadId':_0x45a5d0},_0x205e30=await this[_0xbfbd37(0xd6)][_0xbfbd37(0x93)](_0xbfbd37(0xbb)+_0x44b512+_0xbfbd37(0x9d),{'body':_0x5e9819}),_0x45374b=_0x45a5d0['map'](_0x47cd05=>G(_0x205e30[_0xbfbd37(0xcb)][_0xbfbd37(0xe2)][_0x47cd05],_0x44b512,_0x7d40d9))[_0xbfbd37(0x94)](Boolean);return Object[_0xbfbd37(0xa2)](_0x205e30[_0xbfbd37(0xcb)]['users'])[_0xbfbd37(0xb0)](_0x27d128=>{const _0x472d98=_0xbfbd37;this[_0x472d98(0xf0)][_0x472d98(0xd2)](_0x27d128);}),_0x45374b;}[_0x45f004(0x7f)](_0x5ae77){const _0x2aa8dd=_0x45f004;return{'id':_0x5ae77['id'],'threadId':_0x5ae77[_0x2aa8dd(0x98)],'ref':_0x5ae77['ref']};}};g=x([_(0x0,c[_0x45f004(0xe4)](P[_0x45f004(0xa3)])),_(0x1,c[_0x45f004(0xe4)](c[_0x45f004(0x97)])),_(0x2,c[_0x45f004(0xe4)](b['CollaborationSessionService'])),_(0x3,c[_0x45f004(0xe4)](c[_0x45f004(0xb5)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x216b7d,_0x5ed629,_0x8aa81d,_0x20d2b1)=>{const _0x6d5dd1=_0x45f004;for(var _0x167002=_0x20d2b1>0x1?void 0x0:_0x20d2b1?H(_0x5ed629,_0x8aa81d):_0x5ed629,_0x1a64a8=_0x216b7d[_0x6d5dd1(0xbd)]-0x1,_0x5a7c70;_0x1a64a8>=0x0;_0x1a64a8--)(_0x5a7c70=_0x216b7d[_0x1a64a8])&&(_0x167002=_0x5a7c70(_0x167002)||_0x167002);return _0x167002;},y=(_0x9846a8,_0x27ab5f)=>(_0x56c8dd,_0x5bd9c6)=>_0x27ab5f(_0x56c8dd,_0x5bd9c6,_0x9846a8);let C=class extends c[_0x45f004(0x9b)]{constructor(_0x14102a,_0x117b0c){const _0x5e9d47=_0x45f004;super(),this[_0x5e9d47(0xb6)]=_0x14102a,this[_0x5e9d47(0xa7)]=_0x117b0c,this[_0x5e9d47(0xa6)]();}[_0x45f004(0xa6)](){const _0x416390=_0x45f004;this[_0x416390(0xb6)]['dataSource']=this['_threadCommentDataSource'],this[_0x416390(0xb6)][_0x416390(0xf3)]=!0x1;}};C=J([y(0x0,M[_0x45f004(0xa5)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x45f004(0x91)],L=Object[_0x45f004(0xd3)],Z=(_0x11508b,_0x281916,_0x198f3b)=>_0x281916 in _0x11508b?F(_0x11508b,_0x281916,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x198f3b}):_0x11508b[_0x281916]=_0x198f3b,W=(_0x30b714,_0x3bd9a3,_0x584ff2,_0x4acd62)=>{const _0x423d81=_0x45f004;for(var _0x5abfde=_0x4acd62>0x1?void 0x0:_0x4acd62?L(_0x3bd9a3,_0x584ff2):_0x3bd9a3,_0x205bfb=_0x30b714[_0x423d81(0xbd)]-0x1,_0x4a5c8c;_0x205bfb>=0x0;_0x205bfb--)(_0x4a5c8c=_0x30b714[_0x205bfb])&&(_0x5abfde=_0x4a5c8c(_0x5abfde)||_0x5abfde);return _0x5abfde;},O=(_0x71d156,_0x2cdc90)=>(_0xa0b083,_0x45d4c1)=>_0x2cdc90(_0xa0b083,_0x45d4c1,_0x71d156),N=(_0x37eff9,_0x518455,_0x25f0ed)=>Z(_0x37eff9,typeof _0x518455!=_0x45f004(0x80)?_0x518455+'':_0x518455,_0x25f0ed);exports[_0x45f004(0x9e)]=class extends c[_0x45f004(0x8c)]{constructor(_0x1fcd64=D,_0x36f918,_0x515292){const _0x1a87b0=_0x45f004;super(),this[_0x1a87b0(0x83)]=_0x1fcd64,this['_injector']=_0x36f918,this['_configService']=_0x515292;const {..._0x5b32d3}=c[_0x1a87b0(0xcc)]({},D,this['_config']);this['_configService'][_0x1a87b0(0xdb)](q,_0x5b32d3);}['onStarting'](){const _0x230676=_0x45f004;[[g],[C],[p]][_0x230676(0xb0)](_0x5a86a6=>{const _0x99c7d=_0x230676;this[_0x99c7d(0xbe)]['add'](_0x5a86a6);});}[_0x45f004(0xaa)](){const _0x1bcf0e=_0x45f004;this['_injector'][_0x1bcf0e(0x9a)](C),this[_0x1bcf0e(0xbe)][_0x1bcf0e(0x9a)](p);}},N(exports[_0x45f004(0x9e)],_0x45f004(0x8e),U),N(exports[_0x45f004(0x9e)],_0x45f004(0xe3),c[_0x45f004(0x8b)][_0x45f004(0xb7)]),exports[_0x45f004(0x9e)]=W([c[_0x45f004(0x9f)](j[_0x45f004(0xef)],b[_0x45f004(0x90)],T[_0x45f004(0x95)]),O(0x1,c['Inject'](c[_0x45f004(0xb5)])),O(0x2,c[_0x45f004(0x81)])],exports[_0x45f004(0x9e)]);
1
+ 'use strict';const _0x44fd51=_0x3844;(function(_0x4bfa38,_0x5834bd){const _0x597fea=_0x3844,_0xe4744c=_0x4bfa38();while(!![]){try{const _0x4587d4=parseInt(_0x597fea(0x10f))/0x1*(parseInt(_0x597fea(0x16c))/0x2)+-parseInt(_0x597fea(0x140))/0x3*(-parseInt(_0x597fea(0x135))/0x4)+parseInt(_0x597fea(0x160))/0x5+-parseInt(_0x597fea(0x139))/0x6*(parseInt(_0x597fea(0x159))/0x7)+-parseInt(_0x597fea(0x112))/0x8+parseInt(_0x597fea(0x100))/0x9*(-parseInt(_0x597fea(0x14e))/0xa)+parseInt(_0x597fea(0x137))/0xb;if(_0x4587d4===_0x5834bd)break;else _0xe4744c['push'](_0xe4744c['shift']());}catch(_0x17e7c1){_0xe4744c['push'](_0xe4744c['shift']());}}}(_0x5cc8,0x3b251));Object[_0x44fd51(0x15f)](exports,Symbol[_0x44fd51(0x11c)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x44fd51(0xf7);function _0x3844(_0x384446,_0x8a56f){const _0x5cc8f3=_0x5cc8();return _0x3844=function(_0x38449a,_0x33f0d0){_0x38449a=_0x38449a-0xf5;let _0x38376e=_0x5cc8f3[_0x38449a];return _0x38376e;},_0x3844(_0x384446,_0x8a56f);}function _0x5cc8(){const _0x38a626=['type','size','merge','_threadCommentDataSource','Solve','subscribe','user','UniverInstanceType','Solved','_threadCommentModel','length','40hHdxPf','thread-comment-data-source.config','saveCommentToSnapshot','listComments','onReady','content','delete','map','_threadCommentDataSourceService','filter','threadId','63PPxvzG','payload','_configService','parentId','_init','CustomRangeType','defineProperty','1036615GRAVRT','solved','Injector','Add','comment','_config','Delete','YYYY/MM/DD\x20HH:mm','Edit','onStarting','add','stringify','2XixLxI','resolveComment','post','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','createTimestamp','_commentService','users','UniverThreadCommentUIPlugin','addComment','resolved','pluginName','UNRECOGNIZED','695790sMWlyO','CommentService','addUser','Reply','userID','find','UNIVER_UNKNOWN','error','comments','deleteComment','_httpService','code','dayjs','rangeId','symbol','230273SQPZaF','customRanges','requireSession','3365760ndTVCD','/add','UniverThreadCommentDataSourcePlugin','/delete','getComment','replyId','root','userId','HTTPService','rangeType','toStringTag','syncUpdateMutationToColla','Inject','parse','getMemberID','_sessionService','UserManagerService','_initUserSync','disposeWithMe','/universer-api/user/list','format','pipe','values','body','getUnit','updateComment','IConfigService','forEach','/universer-api/comment/unit/','/list','slice','bufferTime','commentUpdate$','/reply','IThreadCommentDataSourceService','88IFuAsc','replies','6313879WjSZXw','_userService','280404RiCLtx','_injector','getOwnPropertyDescriptor','OpenOrReOpen','get','unitId','Unknown','51987GzMTLb','_initDataSource','personId'];_0x5cc8=function(){return _0x38a626;};return _0x5cc8();}var I=(_0x208777=>(_0x208777[_0x208777['OpenOrReOpen']=0x0]=_0x44fd51(0x13c),_0x208777[_0x208777['Solved']=0x1]='Solved',_0x208777[_0x208777[_0x44fd51(0xff)]=-0x1]='UNRECOGNIZED',_0x208777))(I||{}),v=(_0x322731=>(_0x322731[_0x322731[_0x44fd51(0x13f)]=0x0]=_0x44fd51(0x13f),_0x322731[_0x322731['Add']=0x1]=_0x44fd51(0x163),_0x322731[_0x322731[_0x44fd51(0x103)]=0x2]=_0x44fd51(0x103),_0x322731[_0x322731[_0x44fd51(0x168)]=0x3]=_0x44fd51(0x168),_0x322731[_0x322731['Delete']=0x4]=_0x44fd51(0x166),_0x322731[_0x322731[_0x44fd51(0x147)]=0x5]=_0x44fd51(0x147),_0x322731[_0x322731[_0x44fd51(0xff)]=-0x1]=_0x44fd51(0xff),_0x322731))(v||{});const f=_0x3a6fb5=>c[_0x44fd51(0x10c)](new Date(+_0x3a6fb5))[_0x44fd51(0x126)](_0x44fd51(0x167)),R=async(_0x2ba362,_0x2c5c6e)=>{const _0x303ace=_0x44fd51,_0x211540=_0x2ba362[_0x303ace(0x13d)](c[_0x303ace(0x122)]),_0x1e1890=_0x2ba362['get'](P['HTTPService']);_0x2c5c6e[_0x303ace(0x12d)](_0x4d48cc=>{const _0x10caa4=_0x303ace;_0x211540['getUser'](_0x4d48cc)&&_0x2c5c6e[_0x10caa4(0x154)](_0x4d48cc);}),_0x2c5c6e[_0x303ace(0x144)]&&(await _0x1e1890['get'](_0x303ace(0x125),{'params':{'userIDs':[..._0x2c5c6e]}}))[_0x303ace(0x129)]['users'][_0x303ace(0x12d)](_0x36c2f4=>{_0x36c2f4&&_0x211540['addUser'](_0x36c2f4);});};var $=Object[_0x44fd51(0x13b)],E=(_0x2c76e8,_0x1e439d,_0x18c783,_0x58cbf7)=>{for(var _0x4b6800=_0x58cbf7>0x1?void 0x0:_0x58cbf7?$(_0x1e439d,_0x18c783):_0x1e439d,_0x6260bb=_0x2c76e8['length']-0x1,_0x41ef3f;_0x6260bb>=0x0;_0x6260bb--)(_0x41ef3f=_0x2c76e8[_0x6260bb])&&(_0x4b6800=_0x41ef3f(_0x4b6800)||_0x4b6800);return _0x4b6800;},S=(_0x33ff2f,_0x376d44)=>(_0x4c5490,_0x5eca7b)=>_0x376d44(_0x4c5490,_0x5eca7b,_0x33ff2f);let _=class extends c['Disposable']{constructor(_0x2d2016,_0x30a552,_0x58c5d2,_0x679766){const _0x37728c=_0x44fd51;super(),this[_0x37728c(0xf9)]=_0x2d2016,this[_0x37728c(0x14c)]=_0x30a552,this[_0x37728c(0x138)]=_0x58c5d2,this[_0x37728c(0x13a)]=_0x679766,this['_init'](),this['_initUserSync']();}[_0x44fd51(0x123)](){const _0x48fa4f=_0x44fd51;this[_0x48fa4f(0x124)](this[_0x48fa4f(0x14c)]['commentUpdate$'][_0x48fa4f(0x127)](j[_0x48fa4f(0x131)](0x10))[_0x48fa4f(0x148)](_0x4a88f9=>{const _0x244a81=_0x48fa4f,_0x49c320=new Set();_0x4a88f9[_0x244a81(0x12d)](_0x586e3e=>{const _0x2e7f6c=_0x244a81;switch(_0x586e3e['type']){case _0x2e7f6c(0x16a):{const _0x2b138e=_0x586e3e[_0x2e7f6c(0x15a)][_0x2e7f6c(0x142)];_0x49c320[_0x2e7f6c(0x16a)](_0x2b138e);break;}}}),R(this[_0x244a81(0x13a)],_0x49c320);}));}[_0x44fd51(0x15d)](){const _0x5d2ea1=_0x44fd51;this['disposeWithMe'](this[_0x5d2ea1(0xf9)][_0x5d2ea1(0x132)]['subscribe'](async _0x5635b4=>{const _0x2d644d=_0x5d2ea1;var _0x193a4b,_0x2d5ef8,_0x39ad4f,_0x3d27be;const _0x1d1e1a=(_0x193a4b=this[_0x2d644d(0x14c)]['getUnit'](_0x5635b4['unitId'])['find'](_0x1b8e01=>_0x1b8e01[_0x2d644d(0x158)]===_0x5635b4['threadId']))==null?void 0x0:_0x193a4b['root'];if(!_0x1d1e1a)return;const {unitId:_0x3cb841,subUnitId:_0x842c23}=_0x1d1e1a;switch(_0x5635b4[_0x2d644d(0x149)]&&this['_userService'][_0x2d644d(0x102)](_0x5635b4[_0x2d644d(0x149)]),_0x5635b4[_0x2d644d(0x143)]){case v['Add']:break;case v['Reply']:{this['_threadCommentModel'][_0x2d644d(0xfc)](_0x3cb841,_0x842c23,{'unitId':_0x3cb841,'subUnitId':_0x842c23,'ref':'','id':_0x5635b4['replyId'],'dT':f(+_0x5635b4[_0x2d644d(0xf8)]),'threadId':_0x5635b4['threadId'],'personId':(_0x39ad4f=(_0x2d5ef8=_0x5635b4['user'])==null?void 0x0:_0x2d5ef8['userID'])!=null?_0x39ad4f:_0x5635b4['userId'],'text':JSON['parse'](_0x5635b4[_0x2d644d(0x153)]),'parentId':_0x1d1e1a['id']});break;}case v['Delete']:{const _0x64be2d=this['_threadCommentModel'][_0x2d644d(0x116)](_0x3cb841,_0x842c23,_0x5635b4[_0x2d644d(0x117)]);_0x64be2d&&_0x64be2d[_0x2d644d(0x15c)]&&this[_0x2d644d(0x14c)][_0x2d644d(0x109)](_0x3cb841,_0x842c23,_0x5635b4[_0x2d644d(0x117)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x2d644d(0x12b)](_0x3cb841,_0x842c23,{'commentId':_0x5635b4[_0x2d644d(0x117)],'text':JSON[_0x2d644d(0x11f)](_0x5635b4['content'])});break;}case v[_0x2d644d(0x147)]:{const _0x463568=(_0x3d27be=this['_threadCommentModel'][_0x2d644d(0x12a)](_0x5635b4[_0x2d644d(0x13e)])[_0x2d644d(0x105)](_0x2623c2=>_0x2623c2['threadId']===_0x5635b4[_0x2d644d(0x158)]))==null?void 0x0:_0x3d27be[_0x2d644d(0x118)];_0x463568&&this[_0x2d644d(0x14c)][_0x2d644d(0xf5)](_0x3cb841,_0x842c23,_0x463568['id'],_0x5635b4[_0x2d644d(0x161)]===I[_0x2d644d(0x14b)]);break;}}}));}};_=E([S(0x0,c['Inject'](b[_0x44fd51(0x101)])),S(0x1,c[_0x44fd51(0x11e)](M['ThreadCommentModel'])),S(0x2,c[_0x44fd51(0x11e)](c[_0x44fd51(0x122)])),S(0x3,c[_0x44fd51(0x11e)](c[_0x44fd51(0x162)]))],_);const q=_0x44fd51(0x14f),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x47e790,_0x2edf2d,_0x5bd3f6,_0x15ac12)=>{for(var _0x137419=_0x15ac12>0x1?void 0x0:_0x15ac12?A(_0x2edf2d,_0x5bd3f6):_0x2edf2d,_0x26a2c0=_0x47e790['length']-0x1,_0x51ecc2;_0x26a2c0>=0x0;_0x26a2c0--)(_0x51ecc2=_0x47e790[_0x26a2c0])&&(_0x137419=_0x51ecc2(_0x137419)||_0x137419);return _0x137419;},C=(_0x1195a6,_0x20d0d5)=>(_0x21845e,_0x5f1053)=>_0x20d0d5(_0x21845e,_0x5f1053,_0x1195a6);function Y(_0x484784,_0x56bcb8){const _0x462f21=_0x44fd51,_0x3a13f7=_0x484784[_0x462f21(0x136)][0x0];return{..._0x56bcb8,'id':_0x3a13f7[_0x462f21(0x117)],'resolved':_0x484784[_0x462f21(0x161)]===0x1,'dT':f(_0x3a13f7[_0x462f21(0xf8)]),'personId':_0x3a13f7[_0x462f21(0x119)],'threadId':_0x3a13f7[_0x462f21(0x158)]};}function G(_0x5db0f2,_0x363f87,_0x4fdd49){const _0xf08581=_0x44fd51;var _0x8dea75,_0x4ac46f;if(((_0x4ac46f=(_0x8dea75=_0x5db0f2==null?void 0x0:_0x5db0f2[_0xf08581(0x136)])==null?void 0x0:_0x8dea75['length'])!=null?_0x4ac46f:0x0)>0x0){const _0x415deb=(_0x326a6b,_0x2e0992)=>({'id':_0x326a6b[_0xf08581(0x117)],'threadId':_0x326a6b[_0xf08581(0x158)],'dT':f(_0x326a6b[_0xf08581(0xf8)]),'personId':_0x326a6b[_0xf08581(0x119)],'resolved':_0x5db0f2[_0xf08581(0x161)]===I[_0xf08581(0x14b)],'unitId':_0x363f87,'subUnitId':_0x4fdd49,'text':JSON[_0xf08581(0x11f)](_0x326a6b[_0xf08581(0x153)]),'parentId':_0x2e0992}),_0xc80241=_0x415deb(_0x5db0f2[_0xf08581(0x136)][0x0]);return{..._0xc80241,'children':_0x5db0f2[_0xf08581(0x136)][_0xf08581(0x130)](0x1)[_0xf08581(0x155)](_0x358942=>_0x415deb(_0x358942,_0xc80241['id']))};}return null;}let p=class{constructor(_0x175ed3,_0x3c9a7c,_0x983409){const _0x158f44=_0x44fd51;this[_0x158f44(0x10a)]=_0x175ed3,this[_0x158f44(0x138)]=_0x3c9a7c,this['_sessionService']=_0x983409;}async[_0x44fd51(0xfc)](_0x39049f){const _0x5006db=_0x44fd51;var _0x52f87b,_0xd8d841;const {parentId:_0x1879c9,unitId:_0x3851aa,text:_0x503c70,threadId:_0x41b741}=_0x39049f,_0x27a1e1=(_0xd8d841=(_0x52f87b=_0x503c70[_0x5006db(0x110)])==null?void 0x0:_0x52f87b['filter'](_0x387ef1=>_0x387ef1['rangeType']===c[_0x5006db(0x15e)]['COMMENT'])[_0x5006db(0x155)](_0x49ea40=>_0x49ea40[_0x5006db(0x10d)]))!=null?_0xd8d841:[],_0x1ba041=JSON['stringify'](_0x503c70),_0x79f599=(await this['_sessionService'][_0x5006db(0x111)](_0x3851aa))[_0x5006db(0x120)]();if(_0x1879c9){const _0x4c2093={'memberId':_0x79f599,'unitId':_0x3851aa,'content':_0x1ba041,'mention':_0x27a1e1,'threadId':_0x41b741},_0x104506=(await this[_0x5006db(0x10a)][_0x5006db(0xf6)](_0x5006db(0x12e)+_0x3851aa+_0x5006db(0x133),{'body':_0x4c2093}))[_0x5006db(0x129)]['reply'];return{..._0x39049f,'id':_0x104506[_0x5006db(0x117)],'dT':c[_0x5006db(0x10c)](+_0x104506[_0x5006db(0xf8)])[_0x5006db(0x126)](_0x5006db(0x167)),'personId':_0x104506['userId']};}else{const _0x3cbd1f={'memberId':_0x79f599,'unitId':_0x3851aa,'content':_0x1ba041,'mention':_0x27a1e1},_0x6c9111=await this[_0x5006db(0x10a)][_0x5006db(0xf6)](_0x5006db(0x12e)+_0x3851aa+_0x5006db(0x113),{'body':_0x3cbd1f});return Y(_0x6c9111[_0x5006db(0x129)][_0x5006db(0x164)],_0x39049f);}}async['updateComment'](_0x486c46){const _0x155b1c=_0x44fd51;var _0x397fd8,_0xbc2cea;const {text:_0x1e7092,unitId:_0x17c97b}=_0x486c46,_0x5c88c4=(_0xbc2cea=(_0x397fd8=_0x1e7092[_0x155b1c(0x110)])==null?void 0x0:_0x397fd8['filter'](_0x1782dc=>_0x1782dc[_0x155b1c(0x11b)]===c[_0x155b1c(0x15e)]['COMMENT'])['map'](_0x11d0b1=>_0x11d0b1['rangeId']))!=null?_0xbc2cea:[],_0x32f061=JSON[_0x155b1c(0x16b)](_0x1e7092),_0x138575=_0x486c46['threadId'],_0xa39524=_0x486c46['id'],_0x4dfe3c={'memberId':(await this[_0x155b1c(0x121)][_0x155b1c(0x111)](_0x17c97b))[_0x155b1c(0x120)](),'unitId':_0x17c97b,'threadId':_0x138575,'mention':_0x5c88c4,'content':_0x32f061,'replyId':_0xa39524},_0xdaaccd=await this[_0x155b1c(0x10a)]['post']('/universer-api/comment/unit/'+_0x17c97b+'/edit',{'body':_0x4dfe3c});return!_0xdaaccd[_0x155b1c(0x129)][_0x155b1c(0x107)]||_0xdaaccd[_0x155b1c(0x129)]['error'][_0x155b1c(0x10b)]===0x1;}async[_0x44fd51(0xf5)](_0x417a8d){const _0x37da45=_0x44fd51,{unitId:_0x1de615}=_0x417a8d,_0x324849=_0x417a8d['threadId'],_0x1ef0d6={'memberId':this[_0x37da45(0x138)]['getCurrentUser']()[_0x37da45(0x104)],'unitId':_0x1de615,'threadId':_0x324849,'solved':_0x417a8d[_0x37da45(0xfd)]?I[_0x37da45(0x14b)]:I[_0x37da45(0x13c)]},_0x1941da=await this[_0x37da45(0x10a)][_0x37da45(0xf6)](_0x37da45(0x12e)+_0x1de615+'/solved',{'body':_0x1ef0d6});return!_0x1941da[_0x37da45(0x129)][_0x37da45(0x107)]||_0x1941da[_0x37da45(0x129)][_0x37da45(0x107)][_0x37da45(0x10b)]===0x1;}async[_0x44fd51(0x109)](_0x5eaad4,_0x18f97b,_0x335327,_0x498435){const _0x14e1ea=_0x44fd51,_0x536acc={'memberId':(await this[_0x14e1ea(0x121)][_0x14e1ea(0x111)](_0x5eaad4))[_0x14e1ea(0x120)](),'threadId':_0x335327,'replyId':_0x498435,'unitId':_0x5eaad4},_0x52cf6d=await this['_httpService'][_0x14e1ea(0xf6)](_0x14e1ea(0x12e)+_0x5eaad4+_0x14e1ea(0x115),{'body':_0x536acc});return!_0x52cf6d['body']['error']||_0x52cf6d[_0x14e1ea(0x129)][_0x14e1ea(0x107)][_0x14e1ea(0x10b)]===0x1;}async[_0x44fd51(0x151)](_0xb23bb7,_0x507b49,_0x1ee5bb){const _0x261b43=_0x44fd51,_0x1495e6={'unitId':_0xb23bb7,'threadId':_0x1ee5bb},_0x2b1290=await this[_0x261b43(0x10a)][_0x261b43(0xf6)](_0x261b43(0x12e)+_0xb23bb7+_0x261b43(0x12f),{'body':_0x1495e6}),_0x1c20b8=_0x1ee5bb[_0x261b43(0x155)](_0x3ce63c=>G(_0x2b1290[_0x261b43(0x129)][_0x261b43(0x108)][_0x3ce63c],_0xb23bb7,_0x507b49))[_0x261b43(0x157)](Boolean);return Object[_0x261b43(0x128)](_0x2b1290['body'][_0x261b43(0xfa)])['forEach'](_0x51fd00=>{const _0x198db8=_0x261b43;this[_0x198db8(0x138)]['addUser'](_0x51fd00);}),_0x1c20b8;}[_0x44fd51(0x150)](_0x2b4b29){return{'id':_0x2b4b29['id'],'threadId':_0x2b4b29['threadId'],'ref':_0x2b4b29['ref']};}};p=x([C(0x0,c[_0x44fd51(0x11e)](P[_0x44fd51(0x11a)])),C(0x1,c['Inject'](c[_0x44fd51(0x122)])),C(0x2,c['Inject'](b['CollaborationSessionService']))],p);var H=Object[_0x44fd51(0x13b)],J=(_0x379db1,_0x4610f6,_0x4a2f9d,_0x5bdcd1)=>{const _0x2f5cb7=_0x44fd51;for(var _0x56e50d=_0x5bdcd1>0x1?void 0x0:_0x5bdcd1?H(_0x4610f6,_0x4a2f9d):_0x4610f6,_0x30b9cb=_0x379db1[_0x2f5cb7(0x14d)]-0x1,_0x272a7f;_0x30b9cb>=0x0;_0x30b9cb--)(_0x272a7f=_0x379db1[_0x30b9cb])&&(_0x56e50d=_0x272a7f(_0x56e50d)||_0x56e50d);return _0x56e50d;},y=(_0x3e2d13,_0x35fa32)=>(_0x54706d,_0x5536d8)=>_0x35fa32(_0x54706d,_0x5536d8,_0x3e2d13);let g=class extends c['Disposable']{constructor(_0x230be9,_0x21c6e1){const _0x4b41f3=_0x44fd51;super(),this[_0x4b41f3(0x156)]=_0x230be9,this[_0x4b41f3(0x146)]=_0x21c6e1,this[_0x4b41f3(0x141)]();}[_0x44fd51(0x141)](){const _0x166dea=_0x44fd51;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x166dea(0x156)][_0x166dea(0x11d)]=!0x1;}};g=J([y(0x0,M[_0x44fd51(0x134)]),y(0x1,c['Inject'](p))],g);var F=Object[_0x44fd51(0x15f)],L=Object['getOwnPropertyDescriptor'],Z=(_0x3599ec,_0x4bddbd,_0x4273d3)=>_0x4bddbd in _0x3599ec?F(_0x3599ec,_0x4bddbd,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4273d3}):_0x3599ec[_0x4bddbd]=_0x4273d3,W=(_0x41898d,_0x3a897e,_0x303e9e,_0x3a3424)=>{for(var _0x3ecfd4=_0x3a3424>0x1?void 0x0:_0x3a3424?L(_0x3a897e,_0x303e9e):_0x3a897e,_0x2cea53=_0x41898d['length']-0x1,_0x364c90;_0x2cea53>=0x0;_0x2cea53--)(_0x364c90=_0x41898d[_0x2cea53])&&(_0x3ecfd4=_0x364c90(_0x3ecfd4)||_0x3ecfd4);return _0x3ecfd4;},O=(_0xef4f44,_0x1213e2)=>(_0x4df72b,_0x28bfcb)=>_0x1213e2(_0x4df72b,_0x28bfcb,_0xef4f44),N=(_0x4563fb,_0x3c76ac,_0x522a16)=>Z(_0x4563fb,typeof _0x3c76ac!=_0x44fd51(0x10e)?_0x3c76ac+'':_0x3c76ac,_0x522a16);exports[_0x44fd51(0x114)]=class extends c['Plugin']{constructor(_0x17f3df=D,_0x4a91f0,_0x1775e2){const _0x132d93=_0x44fd51;super(),this[_0x132d93(0x165)]=_0x17f3df,this[_0x132d93(0x13a)]=_0x4a91f0,this['_configService']=_0x1775e2;const {..._0x5b2d03}=c[_0x132d93(0x145)]({},D,this[_0x132d93(0x165)]);this[_0x132d93(0x15b)]['setConfig'](q,_0x5b2d03);}[_0x44fd51(0x169)](){[[p],[g],[_]]['forEach'](_0xfbdb81=>{const _0x5dcfc5=_0x3844;this[_0x5dcfc5(0x13a)][_0x5dcfc5(0x16a)](_0xfbdb81);});}[_0x44fd51(0x152)](){const _0x589810=_0x44fd51;this[_0x589810(0x13a)][_0x589810(0x13d)](g),this[_0x589810(0x13a)][_0x589810(0x13d)](_);}},N(exports[_0x44fd51(0x114)],_0x44fd51(0xfe),U),N(exports[_0x44fd51(0x114)],_0x44fd51(0x143),c[_0x44fd51(0x14a)][_0x44fd51(0x106)]),exports[_0x44fd51(0x114)]=W([c['DependentOn'](w[_0x44fd51(0xfb)],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c[_0x44fd51(0x11e)](c['Injector'])),O(0x2,c[_0x44fd51(0x12c)])],exports[_0x44fd51(0x114)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- function _0x3d57(_0xe4c055,_0x47fc09){const _0x3533da=_0x3533();return _0x3d57=function(_0x3d5730,_0x3a8d47){_0x3d5730=_0x3d5730-0x7e;let _0x583c03=_0x3533da[_0x3d5730];return _0x583c03;},_0x3d57(_0xe4c055,_0x47fc09);}const _0x39886c=_0x3d57;(function(_0x378dfa,_0x155e36){const _0x4ff5cd=_0x3d57,_0x51cecd=_0x378dfa();while(!![]){try{const _0x88934c=-parseInt(_0x4ff5cd(0xb3))/0x1+parseInt(_0x4ff5cd(0xad))/0x2*(parseInt(_0x4ff5cd(0xd0))/0x3)+-parseInt(_0x4ff5cd(0xc6))/0x4+-parseInt(_0x4ff5cd(0x94))/0x5*(-parseInt(_0x4ff5cd(0xa9))/0x6)+-parseInt(_0x4ff5cd(0x7f))/0x7*(-parseInt(_0x4ff5cd(0xa2))/0x8)+-parseInt(_0x4ff5cd(0x7e))/0x9+parseInt(_0x4ff5cd(0xbf))/0xa;if(_0x88934c===_0x155e36)break;else _0x51cecd['push'](_0x51cecd['shift']());}catch(_0x394202){_0x51cecd['push'](_0x51cecd['shift']());}}}(_0x3533,0x91f21));import{CommentService as _0x5ec5d5,CollaborationSessionService as _0x2f98bf,UniverCollaborationClientPlugin as _0x1627d3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2b2705}from'@univerjs-pro/license';import{dayjs as _0x56943a,UserManagerService as _0x3307ae,Inject as _0x361c7c,Injector as _0x585345,Disposable as _0x41eace,CustomRangeType as _0x86fd2c,UniverInstanceType as _0x235ad1,DependentOn as _0x56b67b,IConfigService as _0x45f6f1,Plugin as _0x5da7bd,merge as _0x22fe1a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x230aaa}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x563c28,IThreadCommentDataSourceService as _0x852eb8}from'@univerjs/thread-comment';import{bufferTime as _0x4c3460}from'rxjs';import{HTTPService as _0x5c7a01}from'@univerjs/network';const W=_0x39886c(0xc8);var I=(_0x3162a0=>(_0x3162a0[_0x3162a0[_0x39886c(0x90)]=0x0]=_0x39886c(0x90),_0x3162a0[_0x3162a0[_0x39886c(0x80)]=0x1]=_0x39886c(0x80),_0x3162a0[_0x3162a0[_0x39886c(0xd7)]=-0x1]='UNRECOGNIZED',_0x3162a0))(I||{}),v=(_0x3b9353=>(_0x3b9353[_0x3b9353[_0x39886c(0x81)]=0x0]=_0x39886c(0x81),_0x3b9353[_0x3b9353[_0x39886c(0xc1)]=0x1]=_0x39886c(0xc1),_0x3b9353[_0x3b9353[_0x39886c(0x9a)]=0x2]=_0x39886c(0x9a),_0x3b9353[_0x3b9353[_0x39886c(0x84)]=0x3]=_0x39886c(0x84),_0x3b9353[_0x3b9353[_0x39886c(0x9d)]=0x4]=_0x39886c(0x9d),_0x3b9353[_0x3b9353[_0x39886c(0x89)]=0x5]='Solve',_0x3b9353[_0x3b9353[_0x39886c(0xd7)]=-0x1]='UNRECOGNIZED',_0x3b9353))(v||{});const D=_0x2baa93=>_0x56943a(new Date(+_0x2baa93))[_0x39886c(0x91)](_0x39886c(0xd8)),B=async(_0x59e396,_0x3b1f24)=>{const _0x1f0570=_0x39886c,_0x4ef7bd=_0x59e396['get'](_0x3307ae),_0x1a0c2e=_0x59e396[_0x1f0570(0xd5)](_0x5c7a01);_0x3b1f24[_0x1f0570(0xa3)](_0x24c803=>{const _0xb3dde8=_0x1f0570;_0x4ef7bd[_0xb3dde8(0xcb)](_0x24c803)&&_0x3b1f24[_0xb3dde8(0xb8)](_0x24c803);}),_0x3b1f24[_0x1f0570(0x9b)]&&(await _0x1a0c2e[_0x1f0570(0xd5)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3b1f24]}}))[_0x1f0570(0xb2)][_0x1f0570(0xd2)][_0x1f0570(0xa3)](_0x2c0dbf=>{const _0x16c451=_0x1f0570;_0x2c0dbf&&_0x4ef7bd[_0x16c451(0xd4)](_0x2c0dbf);});};var K=Object[_0x39886c(0xc0)],V=(_0x29a740,_0x44576b,_0x1ce186,_0x2e8a47)=>{const _0x401f71=_0x39886c;for(var _0x17eb9a=_0x2e8a47>0x1?void 0x0:_0x2e8a47?K(_0x44576b,_0x1ce186):_0x44576b,_0x9e4b3a=_0x29a740[_0x401f71(0xa1)]-0x1,_0x3dd2dd;_0x9e4b3a>=0x0;_0x9e4b3a--)(_0x3dd2dd=_0x29a740[_0x9e4b3a])&&(_0x17eb9a=_0x3dd2dd(_0x17eb9a)||_0x17eb9a);return _0x17eb9a;},p=(_0x5f2760,_0x5a91f6)=>(_0x206706,_0x4d0370)=>_0x5a91f6(_0x206706,_0x4d0370,_0x5f2760);let S=class extends _0x41eace{constructor(_0x4d6662,_0x4ae1ff,_0x58133e,_0x2f3ec0){const _0x44b827=_0x39886c;super(),this['_commentService']=_0x4d6662,this[_0x44b827(0x97)]=_0x4ae1ff,this[_0x44b827(0x95)]=_0x58133e,this[_0x44b827(0xbc)]=_0x2f3ec0,this[_0x44b827(0xc4)](),this[_0x44b827(0x88)]();}[_0x39886c(0x88)](){const _0x45bd2f=_0x39886c;this[_0x45bd2f(0xd3)](this[_0x45bd2f(0x97)][_0x45bd2f(0xc5)]['pipe'](_0x4c3460(0x10))['subscribe'](_0x4d0dfa=>{const _0x9bfcac=_0x45bd2f,_0x5c2b06=new Set();_0x4d0dfa['forEach'](_0x474358=>{const _0x144d87=_0x3d57;switch(_0x474358['type']){case _0x144d87(0x92):{const _0x1cb79b=_0x474358['payload'][_0x144d87(0x8f)];_0x5c2b06[_0x144d87(0x92)](_0x1cb79b);break;}}}),B(this[_0x9bfcac(0xbc)],_0x5c2b06);}));}[_0x39886c(0xc4)](){const _0x1ed618=_0x39886c;this[_0x1ed618(0xd3)](this[_0x1ed618(0xa5)][_0x1ed618(0xc5)]['subscribe'](async _0x4155f2=>{const _0x26cd9a=_0x1ed618;var _0x247e86,_0x25f7d6,_0x41d695,_0x5e9f39;const _0x359b5b=(_0x247e86=this[_0x26cd9a(0x97)][_0x26cd9a(0xbd)](_0x4155f2[_0x26cd9a(0xaf)])[_0x26cd9a(0x83)](_0x5ce09e=>_0x5ce09e[_0x26cd9a(0xca)]===_0x4155f2[_0x26cd9a(0xca)]))==null?void 0x0:_0x247e86[_0x26cd9a(0xb4)];if(!_0x359b5b)return;const {unitId:_0x1e85e,subUnitId:_0x11ae3a}=_0x359b5b;switch(_0x4155f2[_0x26cd9a(0x99)]&&this[_0x26cd9a(0x95)][_0x26cd9a(0xd4)](_0x4155f2[_0x26cd9a(0x99)]),_0x4155f2[_0x26cd9a(0xb1)]){case v[_0x26cd9a(0xc1)]:break;case v[_0x26cd9a(0x9a)]:{this[_0x26cd9a(0x97)][_0x26cd9a(0x98)](_0x1e85e,_0x11ae3a,{'unitId':_0x1e85e,'subUnitId':_0x11ae3a,'ref':'','id':_0x4155f2[_0x26cd9a(0xb0)],'dT':D(+_0x4155f2[_0x26cd9a(0x82)]),'threadId':_0x4155f2[_0x26cd9a(0xca)],'personId':(_0x41d695=(_0x25f7d6=_0x4155f2[_0x26cd9a(0x99)])==null?void 0x0:_0x25f7d6['userID'])!=null?_0x41d695:_0x4155f2[_0x26cd9a(0x86)],'text':JSON[_0x26cd9a(0xc9)](_0x4155f2['content']),'parentId':_0x359b5b['id']});break;}case v[_0x26cd9a(0x9d)]:{const _0xa2e8e=this[_0x26cd9a(0x97)]['getComment'](_0x1e85e,_0x11ae3a,_0x4155f2[_0x26cd9a(0xb0)]);_0xa2e8e&&_0xa2e8e['parentId']&&this[_0x26cd9a(0x97)][_0x26cd9a(0xae)](_0x1e85e,_0x11ae3a,_0x4155f2[_0x26cd9a(0xb0)]);break;}case v[_0x26cd9a(0x84)]:{this[_0x26cd9a(0x97)][_0x26cd9a(0xa8)](_0x1e85e,_0x11ae3a,{'commentId':_0x4155f2['replyId'],'text':JSON[_0x26cd9a(0xc9)](_0x4155f2[_0x26cd9a(0xc7)])});break;}case v[_0x26cd9a(0x89)]:{const _0x123507=(_0x5e9f39=this[_0x26cd9a(0x97)]['getUnit'](_0x4155f2['unitId'])[_0x26cd9a(0x83)](_0x371ee0=>_0x371ee0['threadId']===_0x4155f2[_0x26cd9a(0xca)]))==null?void 0x0:_0x5e9f39['root'];_0x123507&&this[_0x26cd9a(0x97)][_0x26cd9a(0xc3)](_0x1e85e,_0x11ae3a,_0x123507['id'],_0x4155f2[_0x26cd9a(0x9e)]===I[_0x26cd9a(0x80)]);break;}}}));}};S=V([p(0x0,_0x361c7c(_0x5ec5d5)),p(0x1,_0x361c7c(_0x563c28)),p(0x2,_0x361c7c(_0x3307ae)),p(0x3,_0x361c7c(_0x585345))],S);const z=_0x39886c(0xbe),M={};function _0x3533(){const _0x4d9ab5=['/reply','customRanges','191355sMMxkj','error','users','disposeWithMe','addUser','get','filter','UNRECOGNIZED','YYYY/MM/DD\x20HH:mm','_sessionService','requireSession','_threadCommentDataSource','stringify','syncUpdateMutationToColla','COMMENT','reply','code','/solved','rangeId','5278419GIllrd','14WhDRUU','Solved','Unknown','createTimestamp','find','Edit','_config','userId','symbol','_initUserSync','Solve','setConfig','rangeType','_httpService','/universer-api/comment/unit/','replies','personId','OpenOrReOpen','format','add','pluginName','3456795gkspCh','_userService','onReady','_threadCommentModel','addComment','user','Reply','size','getMemberID','Delete','solved','UNIVER_UNKNOWN','_initDataSource','length','1309896tdsCln','forEach','getCurrentUser','_commentService','post','resolved','updateComment','6MHFJxs','map','ref','_configService','2DZiYsX','deleteComment','unitId','replyId','type','body','639252bIgXBv','root','/list','dataSource','values','delete','defineProperty','userID','/add','_injector','getUnit','thread-comment-data-source.config','9822720SWhxud','getOwnPropertyDescriptor','Add','_threadCommentDataSourceService','resolveComment','_init','commentUpdate$','965416gWcaPo','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','parse','threadId','getUser','listComments','slice'];_0x3533=function(){return _0x4d9ab5;};return _0x3533();}var k=Object[_0x39886c(0xc0)],Q=(_0x27caee,_0x2c1173,_0x3df7f4,_0x4ba2d4)=>{for(var _0x43e158=_0x4ba2d4>0x1?void 0x0:_0x4ba2d4?k(_0x2c1173,_0x3df7f4):_0x2c1173,_0x5c3eca=_0x27caee['length']-0x1,_0x157efd;_0x5c3eca>=0x0;_0x5c3eca--)(_0x157efd=_0x27caee[_0x5c3eca])&&(_0x43e158=_0x157efd(_0x43e158)||_0x43e158);return _0x43e158;},_=(_0x5e8b9d,_0x302278)=>(_0xa05181,_0x433fed)=>_0x302278(_0xa05181,_0x433fed,_0x5e8b9d);function X(_0x52db82,_0x1bb424){const _0x16260c=_0x39886c,_0x35e06d=_0x52db82[_0x16260c(0x8e)][0x0];return{..._0x1bb424,'id':_0x35e06d[_0x16260c(0xb0)],'resolved':_0x52db82[_0x16260c(0x9e)]===0x1,'dT':D(_0x35e06d['createTimestamp']),'personId':_0x35e06d[_0x16260c(0x86)],'threadId':_0x35e06d['threadId']};}function ee(_0x1756eb,_0x5bacad,_0x466eef){const _0x1d33dc=_0x39886c;var _0x251756,_0x223ffc;if(((_0x223ffc=(_0x251756=_0x1756eb==null?void 0x0:_0x1756eb['replies'])==null?void 0x0:_0x251756[_0x1d33dc(0xa1)])!=null?_0x223ffc:0x0)>0x0){const _0x59ea43=(_0x1cb48c,_0x49f513)=>({'id':_0x1cb48c[_0x1d33dc(0xb0)],'threadId':_0x1cb48c['threadId'],'dT':D(_0x1cb48c[_0x1d33dc(0x82)]),'personId':_0x1cb48c['userId'],'resolved':_0x1756eb[_0x1d33dc(0x9e)]===I[_0x1d33dc(0x80)],'unitId':_0x5bacad,'subUnitId':_0x466eef,'text':JSON[_0x1d33dc(0xc9)](_0x1cb48c[_0x1d33dc(0xc7)]),'parentId':_0x49f513}),_0x58982e=_0x59ea43(_0x1756eb[_0x1d33dc(0x8e)][0x0]);return{..._0x58982e,'children':_0x1756eb['replies'][_0x1d33dc(0xcd)](0x1)[_0x1d33dc(0xaa)](_0x3eeb2c=>_0x59ea43(_0x3eeb2c,_0x58982e['id']))};}return null;}let f=class{constructor(_0x440ec8,_0x163202,_0x3aeecf,_0x4a520e){const _0x58773b=_0x39886c;this[_0x58773b(0x8c)]=_0x440ec8,this[_0x58773b(0x95)]=_0x163202,this[_0x58773b(0xd9)]=_0x3aeecf,this[_0x58773b(0xbc)]=_0x4a520e;}async[_0x39886c(0x98)](_0x5ef400){const _0x23d365=_0x39886c;var _0x559da1,_0x51fbae;const {parentId:_0x47c123,unitId:_0x49820b,text:_0x1e8667,threadId:_0x4add82}=_0x5ef400,_0x29f8ab=(_0x51fbae=(_0x559da1=_0x1e8667[_0x23d365(0xcf)])==null?void 0x0:_0x559da1['filter'](_0x72771a=>_0x72771a[_0x23d365(0x8b)]===_0x86fd2c[_0x23d365(0xde)])[_0x23d365(0xaa)](_0x560e9d=>_0x560e9d[_0x23d365(0xe2)]))!=null?_0x51fbae:[],_0x136ca0=JSON[_0x23d365(0xdc)](_0x1e8667),_0x1f3f91=(await this[_0x23d365(0xd9)]['requireSession'](_0x49820b))['getMemberID']();if(_0x47c123){const _0x2e711a={'memberId':_0x1f3f91,'unitId':_0x49820b,'content':_0x136ca0,'mention':_0x29f8ab,'threadId':_0x4add82},_0x38aca9=(await this['_httpService']['post'](_0x23d365(0x8d)+_0x49820b+_0x23d365(0xce),{'body':_0x2e711a}))['body'][_0x23d365(0xdf)];return{..._0x5ef400,'id':_0x38aca9[_0x23d365(0xb0)],'dT':_0x56943a(+_0x38aca9[_0x23d365(0x82)])[_0x23d365(0x91)](_0x23d365(0xd8)),'personId':_0x38aca9[_0x23d365(0x86)]};}else{const _0x4a2ea5={'memberId':_0x1f3f91,'unitId':_0x49820b,'content':_0x136ca0,'mention':_0x29f8ab},_0x466e56=await this[_0x23d365(0x8c)][_0x23d365(0xa6)]('/universer-api/comment/unit/'+_0x49820b+_0x23d365(0xbb),{'body':_0x4a2ea5});return X(_0x466e56[_0x23d365(0xb2)]['comment'],_0x5ef400);}}async[_0x39886c(0xa8)](_0x2615cc){const _0x177d9c=_0x39886c;var _0x49dc6f,_0x11e42c;const {text:_0x17e4ea,unitId:_0x31fe31}=_0x2615cc,_0x77a1f3=(_0x11e42c=(_0x49dc6f=_0x17e4ea[_0x177d9c(0xcf)])==null?void 0x0:_0x49dc6f[_0x177d9c(0xd6)](_0x32534a=>_0x32534a[_0x177d9c(0x8b)]===_0x86fd2c[_0x177d9c(0xde)])[_0x177d9c(0xaa)](_0x39cdf8=>_0x39cdf8[_0x177d9c(0xe2)]))!=null?_0x11e42c:[],_0x2d6b90=JSON[_0x177d9c(0xdc)](_0x17e4ea),_0x1d291d=_0x2615cc['threadId'],_0x390d6b=_0x2615cc['id'],_0x2eb635={'memberId':(await this[_0x177d9c(0xd9)][_0x177d9c(0xda)](_0x31fe31))[_0x177d9c(0x9c)](),'unitId':_0x31fe31,'threadId':_0x1d291d,'mention':_0x77a1f3,'content':_0x2d6b90,'replyId':_0x390d6b},_0x45516c=await this[_0x177d9c(0x8c)][_0x177d9c(0xa6)]('/universer-api/comment/unit/'+_0x31fe31+'/edit',{'body':_0x2eb635});return!_0x45516c[_0x177d9c(0xb2)][_0x177d9c(0xd1)]||_0x45516c[_0x177d9c(0xb2)]['error'][_0x177d9c(0xe0)]===0x1;}async[_0x39886c(0xc3)](_0x55755a){const _0x2fb7c5=_0x39886c,{unitId:_0x5316df}=_0x55755a,_0x183734=_0x55755a[_0x2fb7c5(0xca)],_0x27a597={'memberId':this[_0x2fb7c5(0x95)][_0x2fb7c5(0xa4)]()[_0x2fb7c5(0xba)],'unitId':_0x5316df,'threadId':_0x183734,'solved':_0x55755a[_0x2fb7c5(0xa7)]?I['Solved']:I[_0x2fb7c5(0x90)]},_0x104d8e=await this[_0x2fb7c5(0x8c)][_0x2fb7c5(0xa6)](_0x2fb7c5(0x8d)+_0x5316df+_0x2fb7c5(0xe1),{'body':_0x27a597});return!_0x104d8e[_0x2fb7c5(0xb2)][_0x2fb7c5(0xd1)]||_0x104d8e[_0x2fb7c5(0xb2)]['error']['code']===0x1;}async['deleteComment'](_0x2a7bed,_0x42235b,_0x79369b,_0x14d604){const _0x2f8f54=_0x39886c,_0xf2418={'memberId':(await this['_sessionService']['requireSession'](_0x2a7bed))['getMemberID'](),'threadId':_0x79369b,'replyId':_0x14d604,'unitId':_0x2a7bed},_0x57e576=await this[_0x2f8f54(0x8c)][_0x2f8f54(0xa6)]('/universer-api/comment/unit/'+_0x2a7bed+'/delete',{'body':_0xf2418});return!_0x57e576[_0x2f8f54(0xb2)]['error']||_0x57e576[_0x2f8f54(0xb2)][_0x2f8f54(0xd1)][_0x2f8f54(0xe0)]===0x1;}async[_0x39886c(0xcc)](_0x4e66b1,_0x42b289,_0x58a73f){const _0x16acf5=_0x39886c,_0x27869d={'unitId':_0x4e66b1,'threadId':_0x58a73f},_0x1e4cf0=await this[_0x16acf5(0x8c)]['post'](_0x16acf5(0x8d)+_0x4e66b1+_0x16acf5(0xb5),{'body':_0x27869d}),_0x4c367f=_0x58a73f[_0x16acf5(0xaa)](_0x2aae77=>ee(_0x1e4cf0['body']['comments'][_0x2aae77],_0x4e66b1,_0x42b289))[_0x16acf5(0xd6)](Boolean);return Object[_0x16acf5(0xb7)](_0x1e4cf0[_0x16acf5(0xb2)]['users'])[_0x16acf5(0xa3)](_0x1cba00=>{const _0x26bdf0=_0x16acf5;this['_userService'][_0x26bdf0(0xd4)](_0x1cba00);}),_0x4c367f;}['saveCommentToSnapshot'](_0x2d343f){const _0x3ead00=_0x39886c;return{'id':_0x2d343f['id'],'threadId':_0x2d343f[_0x3ead00(0xca)],'ref':_0x2d343f[_0x3ead00(0xab)]};}};f=Q([_(0x0,_0x361c7c(_0x5c7a01)),_(0x1,_0x361c7c(_0x3307ae)),_(0x2,_0x361c7c(_0x2f98bf)),_(0x3,_0x361c7c(_0x585345))],f);var re=Object[_0x39886c(0xc0)],te=(_0x1a593c,_0x302d7c,_0x36c683,_0x610613)=>{const _0x2309f5=_0x39886c;for(var _0xb77bd5=_0x610613>0x1?void 0x0:_0x610613?re(_0x302d7c,_0x36c683):_0x302d7c,_0x23ea12=_0x1a593c[_0x2309f5(0xa1)]-0x1,_0x2cf29e;_0x23ea12>=0x0;_0x23ea12--)(_0x2cf29e=_0x1a593c[_0x23ea12])&&(_0xb77bd5=_0x2cf29e(_0xb77bd5)||_0xb77bd5);return _0xb77bd5;},N=(_0x5598ca,_0x8bd59e)=>(_0x1612a5,_0x334700)=>_0x8bd59e(_0x1612a5,_0x334700,_0x5598ca);let g=class extends _0x41eace{constructor(_0x347896,_0x3ebda7){const _0x360e8a=_0x39886c;super(),this[_0x360e8a(0xc2)]=_0x347896,this['_threadCommentDataSource']=_0x3ebda7,this[_0x360e8a(0xa0)]();}[_0x39886c(0xa0)](){const _0x1e9fd8=_0x39886c;this[_0x1e9fd8(0xc2)][_0x1e9fd8(0xb6)]=this[_0x1e9fd8(0xdb)],this[_0x1e9fd8(0xc2)][_0x1e9fd8(0xdd)]=!0x1;}};g=te([N(0x0,_0x852eb8),N(0x1,_0x361c7c(f))],g);var se=Object[_0x39886c(0xb9)],oe=Object[_0x39886c(0xc0)],ne=(_0x516097,_0xdb44bb,_0x29f9e3)=>_0xdb44bb in _0x516097?se(_0x516097,_0xdb44bb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x29f9e3}):_0x516097[_0xdb44bb]=_0x29f9e3,ie=(_0x49640a,_0x5d20d1,_0x19abec,_0x36c7a2)=>{const _0x3e833a=_0x39886c;for(var _0x24987f=_0x36c7a2>0x1?void 0x0:_0x36c7a2?oe(_0x5d20d1,_0x19abec):_0x5d20d1,_0x453cf1=_0x49640a[_0x3e833a(0xa1)]-0x1,_0xc578a3;_0x453cf1>=0x0;_0x453cf1--)(_0xc578a3=_0x49640a[_0x453cf1])&&(_0x24987f=_0xc578a3(_0x24987f)||_0x24987f);return _0x24987f;},w=(_0x329b6a,_0x1dcdcf)=>(_0x19706b,_0x42322c)=>_0x1dcdcf(_0x19706b,_0x42322c,_0x329b6a),$=(_0x2a1c2b,_0xa592,_0x327d14)=>ne(_0x2a1c2b,typeof _0xa592!=_0x39886c(0x87)?_0xa592+'':_0xa592,_0x327d14);let b=class extends _0x5da7bd{constructor(_0x4b5d60=M,_0x5df046,_0x18ceb7){const _0x2f1178=_0x39886c;super(),this[_0x2f1178(0x85)]=_0x4b5d60,this[_0x2f1178(0xbc)]=_0x5df046,this['_configService']=_0x18ceb7;const {..._0x5d8b90}=_0x22fe1a({},M,this[_0x2f1178(0x85)]);this[_0x2f1178(0xac)][_0x2f1178(0x8a)](z,_0x5d8b90);}['onStarting'](){const _0x4f9a77=_0x39886c;[[f],[g],[S]][_0x4f9a77(0xa3)](_0x4bba79=>{this['_injector']['add'](_0x4bba79);});}[_0x39886c(0x96)](){const _0x21854f=_0x39886c;this[_0x21854f(0xbc)]['get'](g),this[_0x21854f(0xbc)][_0x21854f(0xd5)](S);}};$(b,_0x39886c(0x93),W),$(b,_0x39886c(0xb1),_0x235ad1[_0x39886c(0x9f)]),b=ie([_0x56b67b(_0x230aaa,_0x1627d3,_0x2b2705),w(0x1,_0x361c7c(_0x585345)),w(0x2,_0x45f6f1)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x4216a6=_0xb571;(function(_0x2d8b2f,_0x59151c){const _0xa1f72=_0xb571,_0x559c02=_0x2d8b2f();while(!![]){try{const _0x527ec2=-parseInt(_0xa1f72(0xcf))/0x1+parseInt(_0xa1f72(0xdb))/0x2+-parseInt(_0xa1f72(0xeb))/0x3*(-parseInt(_0xa1f72(0xb2))/0x4)+parseInt(_0xa1f72(0xe4))/0x5+parseInt(_0xa1f72(0xf0))/0x6+parseInt(_0xa1f72(0xde))/0x7*(parseInt(_0xa1f72(0x9d))/0x8)+parseInt(_0xa1f72(0xa0))/0x9*(-parseInt(_0xa1f72(0xf5))/0xa);if(_0x527ec2===_0x59151c)break;else _0x559c02['push'](_0x559c02['shift']());}catch(_0x54dd11){_0x559c02['push'](_0x559c02['shift']());}}}(_0x5c5c,0xc48b6));import{CommentService as _0x1584c3,CollaborationSessionService as _0x12ee47,UniverCollaborationClientPlugin as _0x5719a3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x187f4d}from'@univerjs-pro/license';import{dayjs as _0x5b50d4,UserManagerService as _0x598b93,Inject as _0x49b372,Injector as _0x43ed79,Disposable as _0xef71e6,CustomRangeType as _0x5edfc0,UniverInstanceType as _0x347d61,DependentOn as _0x526950,IConfigService as _0x349588,Plugin as _0x2e9e01,merge as _0x41cc18}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x54f46d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x35b968,IThreadCommentDataSourceService as _0x23173b}from'@univerjs/thread-comment';import{bufferTime as _0x4b2858}from'rxjs';import{HTTPService as _0x38b897}from'@univerjs/network';const W=_0x4216a6(0xd9);var I=(_0x20269e=>(_0x20269e[_0x20269e['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x20269e[_0x20269e[_0x4216a6(0xcc)]=0x1]=_0x4216a6(0xcc),_0x20269e[_0x20269e[_0x4216a6(0xe8)]=-0x1]=_0x4216a6(0xe8),_0x20269e))(I||{}),v=(_0x5f1b7b=>(_0x5f1b7b[_0x5f1b7b[_0x4216a6(0xcb)]=0x0]=_0x4216a6(0xcb),_0x5f1b7b[_0x5f1b7b[_0x4216a6(0xfd)]=0x1]=_0x4216a6(0xfd),_0x5f1b7b[_0x5f1b7b[_0x4216a6(0xab)]=0x2]=_0x4216a6(0xab),_0x5f1b7b[_0x5f1b7b[_0x4216a6(0xd2)]=0x3]='Edit',_0x5f1b7b[_0x5f1b7b['Delete']=0x4]='Delete',_0x5f1b7b[_0x5f1b7b[_0x4216a6(0xff)]=0x5]=_0x4216a6(0xff),_0x5f1b7b[_0x5f1b7b[_0x4216a6(0xe8)]=-0x1]=_0x4216a6(0xe8),_0x5f1b7b))(v||{});const y=_0x2a8d2c=>_0x5b50d4(new Date(+_0x2a8d2c))[_0x4216a6(0xc8)](_0x4216a6(0xa1)),B=async(_0x53a0c8,_0x2de9bf)=>{const _0x431f59=_0x4216a6,_0x4090dc=_0x53a0c8[_0x431f59(0xa4)](_0x598b93),_0x2c2bdc=_0x53a0c8[_0x431f59(0xa4)](_0x38b897);_0x2de9bf[_0x431f59(0xec)](_0x3569be=>{const _0x566d9d=_0x431f59;_0x4090dc[_0x566d9d(0xad)](_0x3569be)&&_0x2de9bf['delete'](_0x3569be);}),_0x2de9bf[_0x431f59(0xea)]&&(await _0x2c2bdc[_0x431f59(0xa4)](_0x431f59(0x9f),{'params':{'userIDs':[..._0x2de9bf]}}))[_0x431f59(0xbe)][_0x431f59(0xf3)][_0x431f59(0xec)](_0x22f4b6=>{const _0x546d23=_0x431f59;_0x22f4b6&&_0x4090dc[_0x546d23(0xe0)](_0x22f4b6);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x4d6cf8,_0x3bb8fe,_0x599119,_0x46b88d)=>{for(var _0xfbae88=_0x46b88d>0x1?void 0x0:_0x46b88d?K(_0x3bb8fe,_0x599119):_0x3bb8fe,_0x524dec=_0x4d6cf8['length']-0x1,_0x1d27d6;_0x524dec>=0x0;_0x524dec--)(_0x1d27d6=_0x4d6cf8[_0x524dec])&&(_0xfbae88=_0x1d27d6(_0xfbae88)||_0xfbae88);return _0xfbae88;},p=(_0x469302,_0x3c61f1)=>(_0x3ec9ac,_0x36e9fb)=>_0x3c61f1(_0x3ec9ac,_0x36e9fb,_0x469302);let _=class extends _0xef71e6{constructor(_0x29bb3d,_0xf8d8af,_0x1559d2,_0x2fa1a8){const _0x3d6071=_0x4216a6;super(),this['_commentService']=_0x29bb3d,this['_threadCommentModel']=_0xf8d8af,this[_0x3d6071(0xf8)]=_0x1559d2,this[_0x3d6071(0xc0)]=_0x2fa1a8,this[_0x3d6071(0xac)](),this['_initUserSync']();}['_initUserSync'](){const _0x13cca5=_0x4216a6;this['disposeWithMe'](this[_0x13cca5(0xc5)][_0x13cca5(0xc2)]['pipe'](_0x4b2858(0x10))[_0x13cca5(0xfc)](_0x1de64d=>{const _0x17c26b=_0x13cca5,_0x3efb5e=new Set();_0x1de64d['forEach'](_0xf06023=>{const _0x2dbedc=_0xb571;switch(_0xf06023[_0x2dbedc(0xdf)]){case'add':{const _0x19f1d0=_0xf06023['payload']['personId'];_0x3efb5e['add'](_0x19f1d0);break;}}}),B(this[_0x17c26b(0xc0)],_0x3efb5e);}));}['_init'](){const _0x25c521=_0x4216a6;this['disposeWithMe'](this[_0x25c521(0xf6)][_0x25c521(0xc2)][_0x25c521(0xfc)](async _0x27952f=>{const _0x2232f3=_0x25c521;var _0x5ef136,_0x2d05b3,_0x9d3245,_0x1843b4;const _0x91a08a=(_0x5ef136=this[_0x2232f3(0xc5)]['getUnit'](_0x27952f[_0x2232f3(0x9e)])[_0x2232f3(0xd1)](_0xc242fc=>_0xc242fc['threadId']===_0x27952f['threadId']))==null?void 0x0:_0x5ef136['root'];if(!_0x91a08a)return;const {unitId:_0x110ed3,subUnitId:_0x46d10a}=_0x91a08a;switch(_0x27952f['user']&&this['_userService']['addUser'](_0x27952f['user']),_0x27952f[_0x2232f3(0xdf)]){case v[_0x2232f3(0xfd)]:break;case v['Reply']:{this[_0x2232f3(0xc5)]['addComment'](_0x110ed3,_0x46d10a,{'unitId':_0x110ed3,'subUnitId':_0x46d10a,'ref':'','id':_0x27952f[_0x2232f3(0xba)],'dT':y(+_0x27952f['createTimestamp']),'threadId':_0x27952f[_0x2232f3(0xae)],'personId':(_0x9d3245=(_0x2d05b3=_0x27952f[_0x2232f3(0xe6)])==null?void 0x0:_0x2d05b3[_0x2232f3(0xaf)])!=null?_0x9d3245:_0x27952f['userId'],'text':JSON['parse'](_0x27952f['content']),'parentId':_0x91a08a['id']});break;}case v[_0x2232f3(0xaa)]:{const _0x1f8839=this[_0x2232f3(0xc5)]['getComment'](_0x110ed3,_0x46d10a,_0x27952f[_0x2232f3(0xba)]);_0x1f8839&&_0x1f8839['parentId']&&this[_0x2232f3(0xc5)][_0x2232f3(0xb7)](_0x110ed3,_0x46d10a,_0x27952f[_0x2232f3(0xba)]);break;}case v[_0x2232f3(0xd2)]:{this[_0x2232f3(0xc5)][_0x2232f3(0xed)](_0x110ed3,_0x46d10a,{'commentId':_0x27952f[_0x2232f3(0xba)],'text':JSON[_0x2232f3(0xd5)](_0x27952f[_0x2232f3(0xc1)])});break;}case v[_0x2232f3(0xff)]:{const _0x48098a=(_0x1843b4=this[_0x2232f3(0xc5)][_0x2232f3(0xc7)](_0x27952f['unitId'])[_0x2232f3(0xd1)](_0x211a44=>_0x211a44['threadId']===_0x27952f['threadId']))==null?void 0x0:_0x1843b4[_0x2232f3(0xbf)];_0x48098a&&this[_0x2232f3(0xc5)][_0x2232f3(0xbc)](_0x110ed3,_0x46d10a,_0x48098a['id'],_0x27952f[_0x2232f3(0xa9)]===I[_0x2232f3(0xcc)]);break;}}}));}};_=V([p(0x0,_0x49b372(_0x1584c3)),p(0x1,_0x49b372(_0x35b968)),p(0x2,_0x49b372(_0x598b93)),p(0x3,_0x49b372(_0x43ed79))],_);const z=_0x4216a6(0xd6),O={};function _0xb571(_0x3d7de3,_0x8b813a){const _0x5c5cb7=_0x5c5c();return _0xb571=function(_0xb5711a,_0x53b26d){_0xb5711a=_0xb5711a-0x9d;let _0x5dfa3b=_0x5c5cb7[_0xb5711a];return _0x5dfa3b;},_0xb571(_0x3d7de3,_0x8b813a);}var k=Object['getOwnPropertyDescriptor'],Q=(_0x3fa53d,_0x3e42e8,_0x4b9dc8,_0x396df9)=>{for(var _0x1d9696=_0x396df9>0x1?void 0x0:_0x396df9?k(_0x3e42e8,_0x4b9dc8):_0x3e42e8,_0x554496=_0x3fa53d['length']-0x1,_0x560d1b;_0x554496>=0x0;_0x554496--)(_0x560d1b=_0x3fa53d[_0x554496])&&(_0x1d9696=_0x560d1b(_0x1d9696)||_0x1d9696);return _0x1d9696;},b=(_0x23497d,_0x526561)=>(_0x54d12d,_0x9bceb)=>_0x526561(_0x54d12d,_0x9bceb,_0x23497d);function X(_0x2ec03e,_0x2288c3){const _0x31fa5d=_0x4216a6,_0x3e668f=_0x2ec03e[_0x31fa5d(0xc3)][0x0];return{..._0x2288c3,'id':_0x3e668f[_0x31fa5d(0xba)],'resolved':_0x2ec03e[_0x31fa5d(0xa9)]===0x1,'dT':y(_0x3e668f[_0x31fa5d(0xe2)]),'personId':_0x3e668f['userId'],'threadId':_0x3e668f[_0x31fa5d(0xae)]};}function ee(_0x25a34a,_0x191128,_0x183b51){const _0x2afda8=_0x4216a6;var _0x5557ca,_0x6fc11b;if(((_0x6fc11b=(_0x5557ca=_0x25a34a==null?void 0x0:_0x25a34a[_0x2afda8(0xc3)])==null?void 0x0:_0x5557ca['length'])!=null?_0x6fc11b:0x0)>0x0){const _0x4f3d99=(_0x325783,_0x360fa1)=>({'id':_0x325783[_0x2afda8(0xba)],'threadId':_0x325783[_0x2afda8(0xae)],'dT':y(_0x325783[_0x2afda8(0xe2)]),'personId':_0x325783['userId'],'resolved':_0x25a34a['solved']===I['Solved'],'unitId':_0x191128,'subUnitId':_0x183b51,'text':JSON[_0x2afda8(0xd5)](_0x325783[_0x2afda8(0xc1)]),'parentId':_0x360fa1}),_0xbe6269=_0x4f3d99(_0x25a34a['replies'][0x0]);return{..._0xbe6269,'children':_0x25a34a['replies'][_0x2afda8(0xf7)](0x1)['map'](_0x2d4475=>_0x4f3d99(_0x2d4475,_0xbe6269['id']))};}return null;}let S=class{constructor(_0x206409,_0x559f8e,_0xf1f047){const _0xf5386a=_0x4216a6;this[_0xf5386a(0xb0)]=_0x206409,this['_userService']=_0x559f8e,this[_0xf5386a(0xb6)]=_0xf1f047;}async[_0x4216a6(0xca)](_0x54a245){const _0xa64d51=_0x4216a6;var _0x59cfeb,_0x3388ad;const {parentId:_0x57cee4,unitId:_0x33e0b3,text:_0x3eddd2,threadId:_0x2d4399}=_0x54a245,_0x271ad8=(_0x3388ad=(_0x59cfeb=_0x3eddd2[_0xa64d51(0xfa)])==null?void 0x0:_0x59cfeb[_0xa64d51(0xe5)](_0x21818a=>_0x21818a[_0xa64d51(0xa3)]===_0x5edfc0[_0xa64d51(0xbd)])['map'](_0x558601=>_0x558601['rangeId']))!=null?_0x3388ad:[],_0x304aeb=JSON[_0xa64d51(0xa2)](_0x3eddd2),_0x2c8c9f=(await this[_0xa64d51(0xb6)][_0xa64d51(0xd4)](_0x33e0b3))[_0xa64d51(0xfe)]();if(_0x57cee4){const _0xda28d1={'memberId':_0x2c8c9f,'unitId':_0x33e0b3,'content':_0x304aeb,'mention':_0x271ad8,'threadId':_0x2d4399},_0x5d50c5=(await this[_0xa64d51(0xb0)][_0xa64d51(0xbb)]('/universer-api/comment/unit/'+_0x33e0b3+_0xa64d51(0xef),{'body':_0xda28d1}))['body'][_0xa64d51(0xb8)];return{..._0x54a245,'id':_0x5d50c5[_0xa64d51(0xba)],'dT':_0x5b50d4(+_0x5d50c5[_0xa64d51(0xe2)])['format'](_0xa64d51(0xa1)),'personId':_0x5d50c5[_0xa64d51(0xf9)]};}else{const _0x3a3bcb={'memberId':_0x2c8c9f,'unitId':_0x33e0b3,'content':_0x304aeb,'mention':_0x271ad8},_0x4f1c8f=await this[_0xa64d51(0xb0)][_0xa64d51(0xbb)]('/universer-api/comment/unit/'+_0x33e0b3+_0xa64d51(0xf1),{'body':_0x3a3bcb});return X(_0x4f1c8f['body'][_0xa64d51(0xd3)],_0x54a245);}}async['updateComment'](_0xb1d840){const _0x119173=_0x4216a6;var _0x43ec39,_0x507f0a;const {text:_0x2ff724,unitId:_0x411044}=_0xb1d840,_0x260608=(_0x507f0a=(_0x43ec39=_0x2ff724[_0x119173(0xfa)])==null?void 0x0:_0x43ec39[_0x119173(0xe5)](_0x11c5bc=>_0x11c5bc[_0x119173(0xa3)]===_0x5edfc0[_0x119173(0xbd)])[_0x119173(0xc4)](_0x5e4b41=>_0x5e4b41[_0x119173(0xcd)]))!=null?_0x507f0a:[],_0x488b94=JSON['stringify'](_0x2ff724),_0x40d891=_0xb1d840[_0x119173(0xae)],_0x229020=_0xb1d840['id'],_0x588261={'memberId':(await this[_0x119173(0xb6)][_0x119173(0xd4)](_0x411044))[_0x119173(0xfe)](),'unitId':_0x411044,'threadId':_0x40d891,'mention':_0x260608,'content':_0x488b94,'replyId':_0x229020},_0x12cf44=await this[_0x119173(0xb0)][_0x119173(0xbb)](_0x119173(0xa5)+_0x411044+'/edit',{'body':_0x588261});return!_0x12cf44['body'][_0x119173(0xfb)]||_0x12cf44['body'][_0x119173(0xfb)][_0x119173(0xb5)]===0x1;}async[_0x4216a6(0xbc)](_0x384578){const _0x44ae4e=_0x4216a6,{unitId:_0x1f43b3}=_0x384578,_0x3b1657=_0x384578[_0x44ae4e(0xae)],_0x9f6883={'memberId':this[_0x44ae4e(0xf8)]['getCurrentUser']()['userID'],'unitId':_0x1f43b3,'threadId':_0x3b1657,'solved':_0x384578[_0x44ae4e(0xf2)]?I[_0x44ae4e(0xcc)]:I[_0x44ae4e(0xa7)]},_0x1584ca=await this[_0x44ae4e(0xb0)][_0x44ae4e(0xbb)](_0x44ae4e(0xa5)+_0x1f43b3+_0x44ae4e(0xd8),{'body':_0x9f6883});return!_0x1584ca['body'][_0x44ae4e(0xfb)]||_0x1584ca[_0x44ae4e(0xbe)]['error']['code']===0x1;}async[_0x4216a6(0xb7)](_0x8f098,_0xd47587,_0x121e87,_0x1d296a){const _0x1f4169=_0x4216a6,_0xd622c0={'memberId':(await this[_0x1f4169(0xb6)][_0x1f4169(0xd4)](_0x8f098))[_0x1f4169(0xfe)](),'threadId':_0x121e87,'replyId':_0x1d296a,'unitId':_0x8f098},_0x2911d8=await this[_0x1f4169(0xb0)][_0x1f4169(0xbb)]('/universer-api/comment/unit/'+_0x8f098+_0x1f4169(0xda),{'body':_0xd622c0});return!_0x2911d8['body']['error']||_0x2911d8[_0x1f4169(0xbe)][_0x1f4169(0xfb)][_0x1f4169(0xb5)]===0x1;}async['listComments'](_0x23b489,_0x222ba0,_0x20e8b9){const _0x3c2907=_0x4216a6,_0x33c943={'unitId':_0x23b489,'threadId':_0x20e8b9},_0x1eb491=await this[_0x3c2907(0xb0)][_0x3c2907(0xbb)](_0x3c2907(0xa5)+_0x23b489+_0x3c2907(0xe9),{'body':_0x33c943}),_0x3d55df=_0x20e8b9[_0x3c2907(0xc4)](_0x509889=>ee(_0x1eb491[_0x3c2907(0xbe)][_0x3c2907(0x100)][_0x509889],_0x23b489,_0x222ba0))[_0x3c2907(0xe5)](Boolean);return Object[_0x3c2907(0xd0)](_0x1eb491[_0x3c2907(0xbe)][_0x3c2907(0xf3)])[_0x3c2907(0xec)](_0x479309=>{const _0x1d5a5e=_0x3c2907;this[_0x1d5a5e(0xf8)][_0x1d5a5e(0xe0)](_0x479309);}),_0x3d55df;}[_0x4216a6(0xa8)](_0x434240){const _0x5e7bb6=_0x4216a6;return{'id':_0x434240['id'],'threadId':_0x434240[_0x5e7bb6(0xae)],'ref':_0x434240[_0x5e7bb6(0xd7)]};}};S=Q([b(0x0,_0x49b372(_0x38b897)),b(0x1,_0x49b372(_0x598b93)),b(0x2,_0x49b372(_0x12ee47))],S);var re=Object[_0x4216a6(0xe1)],te=(_0x347f9d,_0x45d7d4,_0x63250c,_0x3defd5)=>{const _0x2415d1=_0x4216a6;for(var _0x2251de=_0x3defd5>0x1?void 0x0:_0x3defd5?re(_0x45d7d4,_0x63250c):_0x45d7d4,_0x3564a4=_0x347f9d[_0x2415d1(0xe3)]-0x1,_0x2918e9;_0x3564a4>=0x0;_0x3564a4--)(_0x2918e9=_0x347f9d[_0x3564a4])&&(_0x2251de=_0x2918e9(_0x2251de)||_0x2251de);return _0x2251de;},M=(_0x3d6542,_0x2b609d)=>(_0x49e1bf,_0x2ae6d8)=>_0x2b609d(_0x49e1bf,_0x2ae6d8,_0x3d6542);let f=class extends _0xef71e6{constructor(_0x50d149,_0x9bb59e){const _0x3e6000=_0x4216a6;super(),this[_0x3e6000(0xf4)]=_0x50d149,this['_threadCommentDataSource']=_0x9bb59e,this[_0x3e6000(0xb3)]();}[_0x4216a6(0xb3)](){const _0x2d4ab3=_0x4216a6;this['_threadCommentDataSourceService'][_0x2d4ab3(0xdd)]=this['_threadCommentDataSource'],this[_0x2d4ab3(0xf4)][_0x2d4ab3(0xb1)]=!0x1;}};f=te([M(0x0,_0x23173b),M(0x1,_0x49b372(S))],f);function _0x5c5c(){const _0xb48658=['reply','_config','replyId','post','resolveComment','COMMENT','body','root','_injector','content','commentUpdate$','replies','map','_threadCommentModel','setConfig','getUnit','format','defineProperty','addComment','Unknown','Solved','rangeId','UNIVER_UNKNOWN','1423865lLpQkd','values','find','Edit','comment','requireSession','parse','thread-comment-data-source.config','ref','/solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/delete','1718768wEfgwp','onReady','dataSource','707KkHKJh','type','addUser','getOwnPropertyDescriptor','createTimestamp','length','4544560GuSjYK','filter','user','onStarting','UNRECOGNIZED','/list','size','1751991ssMERF','forEach','updateComment','add','/reply','7920756JbXfiK','/add','resolved','users','_threadCommentDataSourceService','145600IUrZQv','_commentService','slice','_userService','userId','customRanges','error','subscribe','Add','getMemberID','Solve','comments','3296nDEwci','unitId','/universer-api/user/list','918xCawYy','YYYY/MM/DD\x20HH:mm','stringify','rangeType','get','/universer-api/comment/unit/','pluginName','OpenOrReOpen','saveCommentToSnapshot','solved','Delete','Reply','_init','getUser','threadId','userID','_httpService','syncUpdateMutationToColla','4LWHoFh','_initDataSource','_configService','code','_sessionService','deleteComment'];_0x5c5c=function(){return _0xb48658;};return _0x5c5c();}var se=Object[_0x4216a6(0xc9)],oe=Object[_0x4216a6(0xe1)],ne=(_0x441d6e,_0xd6a5ed,_0x11cfb0)=>_0xd6a5ed in _0x441d6e?se(_0x441d6e,_0xd6a5ed,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x11cfb0}):_0x441d6e[_0xd6a5ed]=_0x11cfb0,ie=(_0x541027,_0x39134b,_0x58a663,_0x547a9d)=>{const _0x2f5176=_0x4216a6;for(var _0xd75e81=_0x547a9d>0x1?void 0x0:_0x547a9d?oe(_0x39134b,_0x58a663):_0x39134b,_0x3a899c=_0x541027[_0x2f5176(0xe3)]-0x1,_0x56bff0;_0x3a899c>=0x0;_0x3a899c--)(_0x56bff0=_0x541027[_0x3a899c])&&(_0xd75e81=_0x56bff0(_0xd75e81)||_0xd75e81);return _0xd75e81;},N=(_0x3e2aef,_0x1e4ee2)=>(_0x1d7003,_0x30b021)=>_0x1e4ee2(_0x1d7003,_0x30b021,_0x3e2aef),$=(_0x4e1eb8,_0x1f8670,_0x5255f4)=>ne(_0x4e1eb8,typeof _0x1f8670!='symbol'?_0x1f8670+'':_0x1f8670,_0x5255f4);let g=class extends _0x2e9e01{constructor(_0x2b1a19=O,_0x169ad5,_0x366b34){const _0x212939=_0x4216a6;super(),this[_0x212939(0xb9)]=_0x2b1a19,this['_injector']=_0x169ad5,this['_configService']=_0x366b34;const {..._0x1c14c0}=_0x41cc18({},O,this[_0x212939(0xb9)]);this[_0x212939(0xb4)][_0x212939(0xc6)](z,_0x1c14c0);}[_0x4216a6(0xe7)](){const _0x745e4f=_0x4216a6;[[S],[f],[_]][_0x745e4f(0xec)](_0x171f41=>{const _0x22f5d5=_0x745e4f;this[_0x22f5d5(0xc0)][_0x22f5d5(0xee)](_0x171f41);});}[_0x4216a6(0xdc)](){const _0x466b3e=_0x4216a6;this['_injector']['get'](f),this['_injector'][_0x466b3e(0xa4)](_);}};$(g,_0x4216a6(0xa6),W),$(g,'type',_0x347d61[_0x4216a6(0xce)]),g=ie([_0x526950(_0x54f46d,_0x5719a3,_0x187f4d),N(0x1,_0x49b372(_0x43ed79)),N(0x2,_0x349588)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- function _0x3d57(_0xe4c055,_0x47fc09){const _0x3533da=_0x3533();return _0x3d57=function(_0x3d5730,_0x3a8d47){_0x3d5730=_0x3d5730-0x7e;let _0x583c03=_0x3533da[_0x3d5730];return _0x583c03;},_0x3d57(_0xe4c055,_0x47fc09);}const _0x39886c=_0x3d57;(function(_0x378dfa,_0x155e36){const _0x4ff5cd=_0x3d57,_0x51cecd=_0x378dfa();while(!![]){try{const _0x88934c=-parseInt(_0x4ff5cd(0xb3))/0x1+parseInt(_0x4ff5cd(0xad))/0x2*(parseInt(_0x4ff5cd(0xd0))/0x3)+-parseInt(_0x4ff5cd(0xc6))/0x4+-parseInt(_0x4ff5cd(0x94))/0x5*(-parseInt(_0x4ff5cd(0xa9))/0x6)+-parseInt(_0x4ff5cd(0x7f))/0x7*(-parseInt(_0x4ff5cd(0xa2))/0x8)+-parseInt(_0x4ff5cd(0x7e))/0x9+parseInt(_0x4ff5cd(0xbf))/0xa;if(_0x88934c===_0x155e36)break;else _0x51cecd['push'](_0x51cecd['shift']());}catch(_0x394202){_0x51cecd['push'](_0x51cecd['shift']());}}}(_0x3533,0x91f21));import{CommentService as _0x5ec5d5,CollaborationSessionService as _0x2f98bf,UniverCollaborationClientPlugin as _0x1627d3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2b2705}from'@univerjs-pro/license';import{dayjs as _0x56943a,UserManagerService as _0x3307ae,Inject as _0x361c7c,Injector as _0x585345,Disposable as _0x41eace,CustomRangeType as _0x86fd2c,UniverInstanceType as _0x235ad1,DependentOn as _0x56b67b,IConfigService as _0x45f6f1,Plugin as _0x5da7bd,merge as _0x22fe1a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x230aaa}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x563c28,IThreadCommentDataSourceService as _0x852eb8}from'@univerjs/thread-comment';import{bufferTime as _0x4c3460}from'rxjs';import{HTTPService as _0x5c7a01}from'@univerjs/network';const W=_0x39886c(0xc8);var I=(_0x3162a0=>(_0x3162a0[_0x3162a0[_0x39886c(0x90)]=0x0]=_0x39886c(0x90),_0x3162a0[_0x3162a0[_0x39886c(0x80)]=0x1]=_0x39886c(0x80),_0x3162a0[_0x3162a0[_0x39886c(0xd7)]=-0x1]='UNRECOGNIZED',_0x3162a0))(I||{}),v=(_0x3b9353=>(_0x3b9353[_0x3b9353[_0x39886c(0x81)]=0x0]=_0x39886c(0x81),_0x3b9353[_0x3b9353[_0x39886c(0xc1)]=0x1]=_0x39886c(0xc1),_0x3b9353[_0x3b9353[_0x39886c(0x9a)]=0x2]=_0x39886c(0x9a),_0x3b9353[_0x3b9353[_0x39886c(0x84)]=0x3]=_0x39886c(0x84),_0x3b9353[_0x3b9353[_0x39886c(0x9d)]=0x4]=_0x39886c(0x9d),_0x3b9353[_0x3b9353[_0x39886c(0x89)]=0x5]='Solve',_0x3b9353[_0x3b9353[_0x39886c(0xd7)]=-0x1]='UNRECOGNIZED',_0x3b9353))(v||{});const D=_0x2baa93=>_0x56943a(new Date(+_0x2baa93))[_0x39886c(0x91)](_0x39886c(0xd8)),B=async(_0x59e396,_0x3b1f24)=>{const _0x1f0570=_0x39886c,_0x4ef7bd=_0x59e396['get'](_0x3307ae),_0x1a0c2e=_0x59e396[_0x1f0570(0xd5)](_0x5c7a01);_0x3b1f24[_0x1f0570(0xa3)](_0x24c803=>{const _0xb3dde8=_0x1f0570;_0x4ef7bd[_0xb3dde8(0xcb)](_0x24c803)&&_0x3b1f24[_0xb3dde8(0xb8)](_0x24c803);}),_0x3b1f24[_0x1f0570(0x9b)]&&(await _0x1a0c2e[_0x1f0570(0xd5)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3b1f24]}}))[_0x1f0570(0xb2)][_0x1f0570(0xd2)][_0x1f0570(0xa3)](_0x2c0dbf=>{const _0x16c451=_0x1f0570;_0x2c0dbf&&_0x4ef7bd[_0x16c451(0xd4)](_0x2c0dbf);});};var K=Object[_0x39886c(0xc0)],V=(_0x29a740,_0x44576b,_0x1ce186,_0x2e8a47)=>{const _0x401f71=_0x39886c;for(var _0x17eb9a=_0x2e8a47>0x1?void 0x0:_0x2e8a47?K(_0x44576b,_0x1ce186):_0x44576b,_0x9e4b3a=_0x29a740[_0x401f71(0xa1)]-0x1,_0x3dd2dd;_0x9e4b3a>=0x0;_0x9e4b3a--)(_0x3dd2dd=_0x29a740[_0x9e4b3a])&&(_0x17eb9a=_0x3dd2dd(_0x17eb9a)||_0x17eb9a);return _0x17eb9a;},p=(_0x5f2760,_0x5a91f6)=>(_0x206706,_0x4d0370)=>_0x5a91f6(_0x206706,_0x4d0370,_0x5f2760);let S=class extends _0x41eace{constructor(_0x4d6662,_0x4ae1ff,_0x58133e,_0x2f3ec0){const _0x44b827=_0x39886c;super(),this['_commentService']=_0x4d6662,this[_0x44b827(0x97)]=_0x4ae1ff,this[_0x44b827(0x95)]=_0x58133e,this[_0x44b827(0xbc)]=_0x2f3ec0,this[_0x44b827(0xc4)](),this[_0x44b827(0x88)]();}[_0x39886c(0x88)](){const _0x45bd2f=_0x39886c;this[_0x45bd2f(0xd3)](this[_0x45bd2f(0x97)][_0x45bd2f(0xc5)]['pipe'](_0x4c3460(0x10))['subscribe'](_0x4d0dfa=>{const _0x9bfcac=_0x45bd2f,_0x5c2b06=new Set();_0x4d0dfa['forEach'](_0x474358=>{const _0x144d87=_0x3d57;switch(_0x474358['type']){case _0x144d87(0x92):{const _0x1cb79b=_0x474358['payload'][_0x144d87(0x8f)];_0x5c2b06[_0x144d87(0x92)](_0x1cb79b);break;}}}),B(this[_0x9bfcac(0xbc)],_0x5c2b06);}));}[_0x39886c(0xc4)](){const _0x1ed618=_0x39886c;this[_0x1ed618(0xd3)](this[_0x1ed618(0xa5)][_0x1ed618(0xc5)]['subscribe'](async _0x4155f2=>{const _0x26cd9a=_0x1ed618;var _0x247e86,_0x25f7d6,_0x41d695,_0x5e9f39;const _0x359b5b=(_0x247e86=this[_0x26cd9a(0x97)][_0x26cd9a(0xbd)](_0x4155f2[_0x26cd9a(0xaf)])[_0x26cd9a(0x83)](_0x5ce09e=>_0x5ce09e[_0x26cd9a(0xca)]===_0x4155f2[_0x26cd9a(0xca)]))==null?void 0x0:_0x247e86[_0x26cd9a(0xb4)];if(!_0x359b5b)return;const {unitId:_0x1e85e,subUnitId:_0x11ae3a}=_0x359b5b;switch(_0x4155f2[_0x26cd9a(0x99)]&&this[_0x26cd9a(0x95)][_0x26cd9a(0xd4)](_0x4155f2[_0x26cd9a(0x99)]),_0x4155f2[_0x26cd9a(0xb1)]){case v[_0x26cd9a(0xc1)]:break;case v[_0x26cd9a(0x9a)]:{this[_0x26cd9a(0x97)][_0x26cd9a(0x98)](_0x1e85e,_0x11ae3a,{'unitId':_0x1e85e,'subUnitId':_0x11ae3a,'ref':'','id':_0x4155f2[_0x26cd9a(0xb0)],'dT':D(+_0x4155f2[_0x26cd9a(0x82)]),'threadId':_0x4155f2[_0x26cd9a(0xca)],'personId':(_0x41d695=(_0x25f7d6=_0x4155f2[_0x26cd9a(0x99)])==null?void 0x0:_0x25f7d6['userID'])!=null?_0x41d695:_0x4155f2[_0x26cd9a(0x86)],'text':JSON[_0x26cd9a(0xc9)](_0x4155f2['content']),'parentId':_0x359b5b['id']});break;}case v[_0x26cd9a(0x9d)]:{const _0xa2e8e=this[_0x26cd9a(0x97)]['getComment'](_0x1e85e,_0x11ae3a,_0x4155f2[_0x26cd9a(0xb0)]);_0xa2e8e&&_0xa2e8e['parentId']&&this[_0x26cd9a(0x97)][_0x26cd9a(0xae)](_0x1e85e,_0x11ae3a,_0x4155f2[_0x26cd9a(0xb0)]);break;}case v[_0x26cd9a(0x84)]:{this[_0x26cd9a(0x97)][_0x26cd9a(0xa8)](_0x1e85e,_0x11ae3a,{'commentId':_0x4155f2['replyId'],'text':JSON[_0x26cd9a(0xc9)](_0x4155f2[_0x26cd9a(0xc7)])});break;}case v[_0x26cd9a(0x89)]:{const _0x123507=(_0x5e9f39=this[_0x26cd9a(0x97)]['getUnit'](_0x4155f2['unitId'])[_0x26cd9a(0x83)](_0x371ee0=>_0x371ee0['threadId']===_0x4155f2[_0x26cd9a(0xca)]))==null?void 0x0:_0x5e9f39['root'];_0x123507&&this[_0x26cd9a(0x97)][_0x26cd9a(0xc3)](_0x1e85e,_0x11ae3a,_0x123507['id'],_0x4155f2[_0x26cd9a(0x9e)]===I[_0x26cd9a(0x80)]);break;}}}));}};S=V([p(0x0,_0x361c7c(_0x5ec5d5)),p(0x1,_0x361c7c(_0x563c28)),p(0x2,_0x361c7c(_0x3307ae)),p(0x3,_0x361c7c(_0x585345))],S);const z=_0x39886c(0xbe),M={};function _0x3533(){const _0x4d9ab5=['/reply','customRanges','191355sMMxkj','error','users','disposeWithMe','addUser','get','filter','UNRECOGNIZED','YYYY/MM/DD\x20HH:mm','_sessionService','requireSession','_threadCommentDataSource','stringify','syncUpdateMutationToColla','COMMENT','reply','code','/solved','rangeId','5278419GIllrd','14WhDRUU','Solved','Unknown','createTimestamp','find','Edit','_config','userId','symbol','_initUserSync','Solve','setConfig','rangeType','_httpService','/universer-api/comment/unit/','replies','personId','OpenOrReOpen','format','add','pluginName','3456795gkspCh','_userService','onReady','_threadCommentModel','addComment','user','Reply','size','getMemberID','Delete','solved','UNIVER_UNKNOWN','_initDataSource','length','1309896tdsCln','forEach','getCurrentUser','_commentService','post','resolved','updateComment','6MHFJxs','map','ref','_configService','2DZiYsX','deleteComment','unitId','replyId','type','body','639252bIgXBv','root','/list','dataSource','values','delete','defineProperty','userID','/add','_injector','getUnit','thread-comment-data-source.config','9822720SWhxud','getOwnPropertyDescriptor','Add','_threadCommentDataSourceService','resolveComment','_init','commentUpdate$','965416gWcaPo','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','parse','threadId','getUser','listComments','slice'];_0x3533=function(){return _0x4d9ab5;};return _0x3533();}var k=Object[_0x39886c(0xc0)],Q=(_0x27caee,_0x2c1173,_0x3df7f4,_0x4ba2d4)=>{for(var _0x43e158=_0x4ba2d4>0x1?void 0x0:_0x4ba2d4?k(_0x2c1173,_0x3df7f4):_0x2c1173,_0x5c3eca=_0x27caee['length']-0x1,_0x157efd;_0x5c3eca>=0x0;_0x5c3eca--)(_0x157efd=_0x27caee[_0x5c3eca])&&(_0x43e158=_0x157efd(_0x43e158)||_0x43e158);return _0x43e158;},_=(_0x5e8b9d,_0x302278)=>(_0xa05181,_0x433fed)=>_0x302278(_0xa05181,_0x433fed,_0x5e8b9d);function X(_0x52db82,_0x1bb424){const _0x16260c=_0x39886c,_0x35e06d=_0x52db82[_0x16260c(0x8e)][0x0];return{..._0x1bb424,'id':_0x35e06d[_0x16260c(0xb0)],'resolved':_0x52db82[_0x16260c(0x9e)]===0x1,'dT':D(_0x35e06d['createTimestamp']),'personId':_0x35e06d[_0x16260c(0x86)],'threadId':_0x35e06d['threadId']};}function ee(_0x1756eb,_0x5bacad,_0x466eef){const _0x1d33dc=_0x39886c;var _0x251756,_0x223ffc;if(((_0x223ffc=(_0x251756=_0x1756eb==null?void 0x0:_0x1756eb['replies'])==null?void 0x0:_0x251756[_0x1d33dc(0xa1)])!=null?_0x223ffc:0x0)>0x0){const _0x59ea43=(_0x1cb48c,_0x49f513)=>({'id':_0x1cb48c[_0x1d33dc(0xb0)],'threadId':_0x1cb48c['threadId'],'dT':D(_0x1cb48c[_0x1d33dc(0x82)]),'personId':_0x1cb48c['userId'],'resolved':_0x1756eb[_0x1d33dc(0x9e)]===I[_0x1d33dc(0x80)],'unitId':_0x5bacad,'subUnitId':_0x466eef,'text':JSON[_0x1d33dc(0xc9)](_0x1cb48c[_0x1d33dc(0xc7)]),'parentId':_0x49f513}),_0x58982e=_0x59ea43(_0x1756eb[_0x1d33dc(0x8e)][0x0]);return{..._0x58982e,'children':_0x1756eb['replies'][_0x1d33dc(0xcd)](0x1)[_0x1d33dc(0xaa)](_0x3eeb2c=>_0x59ea43(_0x3eeb2c,_0x58982e['id']))};}return null;}let f=class{constructor(_0x440ec8,_0x163202,_0x3aeecf,_0x4a520e){const _0x58773b=_0x39886c;this[_0x58773b(0x8c)]=_0x440ec8,this[_0x58773b(0x95)]=_0x163202,this[_0x58773b(0xd9)]=_0x3aeecf,this[_0x58773b(0xbc)]=_0x4a520e;}async[_0x39886c(0x98)](_0x5ef400){const _0x23d365=_0x39886c;var _0x559da1,_0x51fbae;const {parentId:_0x47c123,unitId:_0x49820b,text:_0x1e8667,threadId:_0x4add82}=_0x5ef400,_0x29f8ab=(_0x51fbae=(_0x559da1=_0x1e8667[_0x23d365(0xcf)])==null?void 0x0:_0x559da1['filter'](_0x72771a=>_0x72771a[_0x23d365(0x8b)]===_0x86fd2c[_0x23d365(0xde)])[_0x23d365(0xaa)](_0x560e9d=>_0x560e9d[_0x23d365(0xe2)]))!=null?_0x51fbae:[],_0x136ca0=JSON[_0x23d365(0xdc)](_0x1e8667),_0x1f3f91=(await this[_0x23d365(0xd9)]['requireSession'](_0x49820b))['getMemberID']();if(_0x47c123){const _0x2e711a={'memberId':_0x1f3f91,'unitId':_0x49820b,'content':_0x136ca0,'mention':_0x29f8ab,'threadId':_0x4add82},_0x38aca9=(await this['_httpService']['post'](_0x23d365(0x8d)+_0x49820b+_0x23d365(0xce),{'body':_0x2e711a}))['body'][_0x23d365(0xdf)];return{..._0x5ef400,'id':_0x38aca9[_0x23d365(0xb0)],'dT':_0x56943a(+_0x38aca9[_0x23d365(0x82)])[_0x23d365(0x91)](_0x23d365(0xd8)),'personId':_0x38aca9[_0x23d365(0x86)]};}else{const _0x4a2ea5={'memberId':_0x1f3f91,'unitId':_0x49820b,'content':_0x136ca0,'mention':_0x29f8ab},_0x466e56=await this[_0x23d365(0x8c)][_0x23d365(0xa6)]('/universer-api/comment/unit/'+_0x49820b+_0x23d365(0xbb),{'body':_0x4a2ea5});return X(_0x466e56[_0x23d365(0xb2)]['comment'],_0x5ef400);}}async[_0x39886c(0xa8)](_0x2615cc){const _0x177d9c=_0x39886c;var _0x49dc6f,_0x11e42c;const {text:_0x17e4ea,unitId:_0x31fe31}=_0x2615cc,_0x77a1f3=(_0x11e42c=(_0x49dc6f=_0x17e4ea[_0x177d9c(0xcf)])==null?void 0x0:_0x49dc6f[_0x177d9c(0xd6)](_0x32534a=>_0x32534a[_0x177d9c(0x8b)]===_0x86fd2c[_0x177d9c(0xde)])[_0x177d9c(0xaa)](_0x39cdf8=>_0x39cdf8[_0x177d9c(0xe2)]))!=null?_0x11e42c:[],_0x2d6b90=JSON[_0x177d9c(0xdc)](_0x17e4ea),_0x1d291d=_0x2615cc['threadId'],_0x390d6b=_0x2615cc['id'],_0x2eb635={'memberId':(await this[_0x177d9c(0xd9)][_0x177d9c(0xda)](_0x31fe31))[_0x177d9c(0x9c)](),'unitId':_0x31fe31,'threadId':_0x1d291d,'mention':_0x77a1f3,'content':_0x2d6b90,'replyId':_0x390d6b},_0x45516c=await this[_0x177d9c(0x8c)][_0x177d9c(0xa6)]('/universer-api/comment/unit/'+_0x31fe31+'/edit',{'body':_0x2eb635});return!_0x45516c[_0x177d9c(0xb2)][_0x177d9c(0xd1)]||_0x45516c[_0x177d9c(0xb2)]['error'][_0x177d9c(0xe0)]===0x1;}async[_0x39886c(0xc3)](_0x55755a){const _0x2fb7c5=_0x39886c,{unitId:_0x5316df}=_0x55755a,_0x183734=_0x55755a[_0x2fb7c5(0xca)],_0x27a597={'memberId':this[_0x2fb7c5(0x95)][_0x2fb7c5(0xa4)]()[_0x2fb7c5(0xba)],'unitId':_0x5316df,'threadId':_0x183734,'solved':_0x55755a[_0x2fb7c5(0xa7)]?I['Solved']:I[_0x2fb7c5(0x90)]},_0x104d8e=await this[_0x2fb7c5(0x8c)][_0x2fb7c5(0xa6)](_0x2fb7c5(0x8d)+_0x5316df+_0x2fb7c5(0xe1),{'body':_0x27a597});return!_0x104d8e[_0x2fb7c5(0xb2)][_0x2fb7c5(0xd1)]||_0x104d8e[_0x2fb7c5(0xb2)]['error']['code']===0x1;}async['deleteComment'](_0x2a7bed,_0x42235b,_0x79369b,_0x14d604){const _0x2f8f54=_0x39886c,_0xf2418={'memberId':(await this['_sessionService']['requireSession'](_0x2a7bed))['getMemberID'](),'threadId':_0x79369b,'replyId':_0x14d604,'unitId':_0x2a7bed},_0x57e576=await this[_0x2f8f54(0x8c)][_0x2f8f54(0xa6)]('/universer-api/comment/unit/'+_0x2a7bed+'/delete',{'body':_0xf2418});return!_0x57e576[_0x2f8f54(0xb2)]['error']||_0x57e576[_0x2f8f54(0xb2)][_0x2f8f54(0xd1)][_0x2f8f54(0xe0)]===0x1;}async[_0x39886c(0xcc)](_0x4e66b1,_0x42b289,_0x58a73f){const _0x16acf5=_0x39886c,_0x27869d={'unitId':_0x4e66b1,'threadId':_0x58a73f},_0x1e4cf0=await this[_0x16acf5(0x8c)]['post'](_0x16acf5(0x8d)+_0x4e66b1+_0x16acf5(0xb5),{'body':_0x27869d}),_0x4c367f=_0x58a73f[_0x16acf5(0xaa)](_0x2aae77=>ee(_0x1e4cf0['body']['comments'][_0x2aae77],_0x4e66b1,_0x42b289))[_0x16acf5(0xd6)](Boolean);return Object[_0x16acf5(0xb7)](_0x1e4cf0[_0x16acf5(0xb2)]['users'])[_0x16acf5(0xa3)](_0x1cba00=>{const _0x26bdf0=_0x16acf5;this['_userService'][_0x26bdf0(0xd4)](_0x1cba00);}),_0x4c367f;}['saveCommentToSnapshot'](_0x2d343f){const _0x3ead00=_0x39886c;return{'id':_0x2d343f['id'],'threadId':_0x2d343f[_0x3ead00(0xca)],'ref':_0x2d343f[_0x3ead00(0xab)]};}};f=Q([_(0x0,_0x361c7c(_0x5c7a01)),_(0x1,_0x361c7c(_0x3307ae)),_(0x2,_0x361c7c(_0x2f98bf)),_(0x3,_0x361c7c(_0x585345))],f);var re=Object[_0x39886c(0xc0)],te=(_0x1a593c,_0x302d7c,_0x36c683,_0x610613)=>{const _0x2309f5=_0x39886c;for(var _0xb77bd5=_0x610613>0x1?void 0x0:_0x610613?re(_0x302d7c,_0x36c683):_0x302d7c,_0x23ea12=_0x1a593c[_0x2309f5(0xa1)]-0x1,_0x2cf29e;_0x23ea12>=0x0;_0x23ea12--)(_0x2cf29e=_0x1a593c[_0x23ea12])&&(_0xb77bd5=_0x2cf29e(_0xb77bd5)||_0xb77bd5);return _0xb77bd5;},N=(_0x5598ca,_0x8bd59e)=>(_0x1612a5,_0x334700)=>_0x8bd59e(_0x1612a5,_0x334700,_0x5598ca);let g=class extends _0x41eace{constructor(_0x347896,_0x3ebda7){const _0x360e8a=_0x39886c;super(),this[_0x360e8a(0xc2)]=_0x347896,this['_threadCommentDataSource']=_0x3ebda7,this[_0x360e8a(0xa0)]();}[_0x39886c(0xa0)](){const _0x1e9fd8=_0x39886c;this[_0x1e9fd8(0xc2)][_0x1e9fd8(0xb6)]=this[_0x1e9fd8(0xdb)],this[_0x1e9fd8(0xc2)][_0x1e9fd8(0xdd)]=!0x1;}};g=te([N(0x0,_0x852eb8),N(0x1,_0x361c7c(f))],g);var se=Object[_0x39886c(0xb9)],oe=Object[_0x39886c(0xc0)],ne=(_0x516097,_0xdb44bb,_0x29f9e3)=>_0xdb44bb in _0x516097?se(_0x516097,_0xdb44bb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x29f9e3}):_0x516097[_0xdb44bb]=_0x29f9e3,ie=(_0x49640a,_0x5d20d1,_0x19abec,_0x36c7a2)=>{const _0x3e833a=_0x39886c;for(var _0x24987f=_0x36c7a2>0x1?void 0x0:_0x36c7a2?oe(_0x5d20d1,_0x19abec):_0x5d20d1,_0x453cf1=_0x49640a[_0x3e833a(0xa1)]-0x1,_0xc578a3;_0x453cf1>=0x0;_0x453cf1--)(_0xc578a3=_0x49640a[_0x453cf1])&&(_0x24987f=_0xc578a3(_0x24987f)||_0x24987f);return _0x24987f;},w=(_0x329b6a,_0x1dcdcf)=>(_0x19706b,_0x42322c)=>_0x1dcdcf(_0x19706b,_0x42322c,_0x329b6a),$=(_0x2a1c2b,_0xa592,_0x327d14)=>ne(_0x2a1c2b,typeof _0xa592!=_0x39886c(0x87)?_0xa592+'':_0xa592,_0x327d14);let b=class extends _0x5da7bd{constructor(_0x4b5d60=M,_0x5df046,_0x18ceb7){const _0x2f1178=_0x39886c;super(),this[_0x2f1178(0x85)]=_0x4b5d60,this[_0x2f1178(0xbc)]=_0x5df046,this['_configService']=_0x18ceb7;const {..._0x5d8b90}=_0x22fe1a({},M,this[_0x2f1178(0x85)]);this[_0x2f1178(0xac)][_0x2f1178(0x8a)](z,_0x5d8b90);}['onStarting'](){const _0x4f9a77=_0x39886c;[[f],[g],[S]][_0x4f9a77(0xa3)](_0x4bba79=>{this['_injector']['add'](_0x4bba79);});}[_0x39886c(0x96)](){const _0x21854f=_0x39886c;this[_0x21854f(0xbc)]['get'](g),this[_0x21854f(0xbc)][_0x21854f(0xd5)](S);}};$(b,_0x39886c(0x93),W),$(b,_0x39886c(0xb1),_0x235ad1[_0x39886c(0x9f)]),b=ie([_0x56b67b(_0x230aaa,_0x1627d3,_0x2b2705),w(0x1,_0x361c7c(_0x585345)),w(0x2,_0x45f6f1)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x4216a6=_0xb571;(function(_0x2d8b2f,_0x59151c){const _0xa1f72=_0xb571,_0x559c02=_0x2d8b2f();while(!![]){try{const _0x527ec2=-parseInt(_0xa1f72(0xcf))/0x1+parseInt(_0xa1f72(0xdb))/0x2+-parseInt(_0xa1f72(0xeb))/0x3*(-parseInt(_0xa1f72(0xb2))/0x4)+parseInt(_0xa1f72(0xe4))/0x5+parseInt(_0xa1f72(0xf0))/0x6+parseInt(_0xa1f72(0xde))/0x7*(parseInt(_0xa1f72(0x9d))/0x8)+parseInt(_0xa1f72(0xa0))/0x9*(-parseInt(_0xa1f72(0xf5))/0xa);if(_0x527ec2===_0x59151c)break;else _0x559c02['push'](_0x559c02['shift']());}catch(_0x54dd11){_0x559c02['push'](_0x559c02['shift']());}}}(_0x5c5c,0xc48b6));import{CommentService as _0x1584c3,CollaborationSessionService as _0x12ee47,UniverCollaborationClientPlugin as _0x5719a3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x187f4d}from'@univerjs-pro/license';import{dayjs as _0x5b50d4,UserManagerService as _0x598b93,Inject as _0x49b372,Injector as _0x43ed79,Disposable as _0xef71e6,CustomRangeType as _0x5edfc0,UniverInstanceType as _0x347d61,DependentOn as _0x526950,IConfigService as _0x349588,Plugin as _0x2e9e01,merge as _0x41cc18}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x54f46d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x35b968,IThreadCommentDataSourceService as _0x23173b}from'@univerjs/thread-comment';import{bufferTime as _0x4b2858}from'rxjs';import{HTTPService as _0x38b897}from'@univerjs/network';const W=_0x4216a6(0xd9);var I=(_0x20269e=>(_0x20269e[_0x20269e['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x20269e[_0x20269e[_0x4216a6(0xcc)]=0x1]=_0x4216a6(0xcc),_0x20269e[_0x20269e[_0x4216a6(0xe8)]=-0x1]=_0x4216a6(0xe8),_0x20269e))(I||{}),v=(_0x5f1b7b=>(_0x5f1b7b[_0x5f1b7b[_0x4216a6(0xcb)]=0x0]=_0x4216a6(0xcb),_0x5f1b7b[_0x5f1b7b[_0x4216a6(0xfd)]=0x1]=_0x4216a6(0xfd),_0x5f1b7b[_0x5f1b7b[_0x4216a6(0xab)]=0x2]=_0x4216a6(0xab),_0x5f1b7b[_0x5f1b7b[_0x4216a6(0xd2)]=0x3]='Edit',_0x5f1b7b[_0x5f1b7b['Delete']=0x4]='Delete',_0x5f1b7b[_0x5f1b7b[_0x4216a6(0xff)]=0x5]=_0x4216a6(0xff),_0x5f1b7b[_0x5f1b7b[_0x4216a6(0xe8)]=-0x1]=_0x4216a6(0xe8),_0x5f1b7b))(v||{});const y=_0x2a8d2c=>_0x5b50d4(new Date(+_0x2a8d2c))[_0x4216a6(0xc8)](_0x4216a6(0xa1)),B=async(_0x53a0c8,_0x2de9bf)=>{const _0x431f59=_0x4216a6,_0x4090dc=_0x53a0c8[_0x431f59(0xa4)](_0x598b93),_0x2c2bdc=_0x53a0c8[_0x431f59(0xa4)](_0x38b897);_0x2de9bf[_0x431f59(0xec)](_0x3569be=>{const _0x566d9d=_0x431f59;_0x4090dc[_0x566d9d(0xad)](_0x3569be)&&_0x2de9bf['delete'](_0x3569be);}),_0x2de9bf[_0x431f59(0xea)]&&(await _0x2c2bdc[_0x431f59(0xa4)](_0x431f59(0x9f),{'params':{'userIDs':[..._0x2de9bf]}}))[_0x431f59(0xbe)][_0x431f59(0xf3)][_0x431f59(0xec)](_0x22f4b6=>{const _0x546d23=_0x431f59;_0x22f4b6&&_0x4090dc[_0x546d23(0xe0)](_0x22f4b6);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x4d6cf8,_0x3bb8fe,_0x599119,_0x46b88d)=>{for(var _0xfbae88=_0x46b88d>0x1?void 0x0:_0x46b88d?K(_0x3bb8fe,_0x599119):_0x3bb8fe,_0x524dec=_0x4d6cf8['length']-0x1,_0x1d27d6;_0x524dec>=0x0;_0x524dec--)(_0x1d27d6=_0x4d6cf8[_0x524dec])&&(_0xfbae88=_0x1d27d6(_0xfbae88)||_0xfbae88);return _0xfbae88;},p=(_0x469302,_0x3c61f1)=>(_0x3ec9ac,_0x36e9fb)=>_0x3c61f1(_0x3ec9ac,_0x36e9fb,_0x469302);let _=class extends _0xef71e6{constructor(_0x29bb3d,_0xf8d8af,_0x1559d2,_0x2fa1a8){const _0x3d6071=_0x4216a6;super(),this['_commentService']=_0x29bb3d,this['_threadCommentModel']=_0xf8d8af,this[_0x3d6071(0xf8)]=_0x1559d2,this[_0x3d6071(0xc0)]=_0x2fa1a8,this[_0x3d6071(0xac)](),this['_initUserSync']();}['_initUserSync'](){const _0x13cca5=_0x4216a6;this['disposeWithMe'](this[_0x13cca5(0xc5)][_0x13cca5(0xc2)]['pipe'](_0x4b2858(0x10))[_0x13cca5(0xfc)](_0x1de64d=>{const _0x17c26b=_0x13cca5,_0x3efb5e=new Set();_0x1de64d['forEach'](_0xf06023=>{const _0x2dbedc=_0xb571;switch(_0xf06023[_0x2dbedc(0xdf)]){case'add':{const _0x19f1d0=_0xf06023['payload']['personId'];_0x3efb5e['add'](_0x19f1d0);break;}}}),B(this[_0x17c26b(0xc0)],_0x3efb5e);}));}['_init'](){const _0x25c521=_0x4216a6;this['disposeWithMe'](this[_0x25c521(0xf6)][_0x25c521(0xc2)][_0x25c521(0xfc)](async _0x27952f=>{const _0x2232f3=_0x25c521;var _0x5ef136,_0x2d05b3,_0x9d3245,_0x1843b4;const _0x91a08a=(_0x5ef136=this[_0x2232f3(0xc5)]['getUnit'](_0x27952f[_0x2232f3(0x9e)])[_0x2232f3(0xd1)](_0xc242fc=>_0xc242fc['threadId']===_0x27952f['threadId']))==null?void 0x0:_0x5ef136['root'];if(!_0x91a08a)return;const {unitId:_0x110ed3,subUnitId:_0x46d10a}=_0x91a08a;switch(_0x27952f['user']&&this['_userService']['addUser'](_0x27952f['user']),_0x27952f[_0x2232f3(0xdf)]){case v[_0x2232f3(0xfd)]:break;case v['Reply']:{this[_0x2232f3(0xc5)]['addComment'](_0x110ed3,_0x46d10a,{'unitId':_0x110ed3,'subUnitId':_0x46d10a,'ref':'','id':_0x27952f[_0x2232f3(0xba)],'dT':y(+_0x27952f['createTimestamp']),'threadId':_0x27952f[_0x2232f3(0xae)],'personId':(_0x9d3245=(_0x2d05b3=_0x27952f[_0x2232f3(0xe6)])==null?void 0x0:_0x2d05b3[_0x2232f3(0xaf)])!=null?_0x9d3245:_0x27952f['userId'],'text':JSON['parse'](_0x27952f['content']),'parentId':_0x91a08a['id']});break;}case v[_0x2232f3(0xaa)]:{const _0x1f8839=this[_0x2232f3(0xc5)]['getComment'](_0x110ed3,_0x46d10a,_0x27952f[_0x2232f3(0xba)]);_0x1f8839&&_0x1f8839['parentId']&&this[_0x2232f3(0xc5)][_0x2232f3(0xb7)](_0x110ed3,_0x46d10a,_0x27952f[_0x2232f3(0xba)]);break;}case v[_0x2232f3(0xd2)]:{this[_0x2232f3(0xc5)][_0x2232f3(0xed)](_0x110ed3,_0x46d10a,{'commentId':_0x27952f[_0x2232f3(0xba)],'text':JSON[_0x2232f3(0xd5)](_0x27952f[_0x2232f3(0xc1)])});break;}case v[_0x2232f3(0xff)]:{const _0x48098a=(_0x1843b4=this[_0x2232f3(0xc5)][_0x2232f3(0xc7)](_0x27952f['unitId'])[_0x2232f3(0xd1)](_0x211a44=>_0x211a44['threadId']===_0x27952f['threadId']))==null?void 0x0:_0x1843b4[_0x2232f3(0xbf)];_0x48098a&&this[_0x2232f3(0xc5)][_0x2232f3(0xbc)](_0x110ed3,_0x46d10a,_0x48098a['id'],_0x27952f[_0x2232f3(0xa9)]===I[_0x2232f3(0xcc)]);break;}}}));}};_=V([p(0x0,_0x49b372(_0x1584c3)),p(0x1,_0x49b372(_0x35b968)),p(0x2,_0x49b372(_0x598b93)),p(0x3,_0x49b372(_0x43ed79))],_);const z=_0x4216a6(0xd6),O={};function _0xb571(_0x3d7de3,_0x8b813a){const _0x5c5cb7=_0x5c5c();return _0xb571=function(_0xb5711a,_0x53b26d){_0xb5711a=_0xb5711a-0x9d;let _0x5dfa3b=_0x5c5cb7[_0xb5711a];return _0x5dfa3b;},_0xb571(_0x3d7de3,_0x8b813a);}var k=Object['getOwnPropertyDescriptor'],Q=(_0x3fa53d,_0x3e42e8,_0x4b9dc8,_0x396df9)=>{for(var _0x1d9696=_0x396df9>0x1?void 0x0:_0x396df9?k(_0x3e42e8,_0x4b9dc8):_0x3e42e8,_0x554496=_0x3fa53d['length']-0x1,_0x560d1b;_0x554496>=0x0;_0x554496--)(_0x560d1b=_0x3fa53d[_0x554496])&&(_0x1d9696=_0x560d1b(_0x1d9696)||_0x1d9696);return _0x1d9696;},b=(_0x23497d,_0x526561)=>(_0x54d12d,_0x9bceb)=>_0x526561(_0x54d12d,_0x9bceb,_0x23497d);function X(_0x2ec03e,_0x2288c3){const _0x31fa5d=_0x4216a6,_0x3e668f=_0x2ec03e[_0x31fa5d(0xc3)][0x0];return{..._0x2288c3,'id':_0x3e668f[_0x31fa5d(0xba)],'resolved':_0x2ec03e[_0x31fa5d(0xa9)]===0x1,'dT':y(_0x3e668f[_0x31fa5d(0xe2)]),'personId':_0x3e668f['userId'],'threadId':_0x3e668f[_0x31fa5d(0xae)]};}function ee(_0x25a34a,_0x191128,_0x183b51){const _0x2afda8=_0x4216a6;var _0x5557ca,_0x6fc11b;if(((_0x6fc11b=(_0x5557ca=_0x25a34a==null?void 0x0:_0x25a34a[_0x2afda8(0xc3)])==null?void 0x0:_0x5557ca['length'])!=null?_0x6fc11b:0x0)>0x0){const _0x4f3d99=(_0x325783,_0x360fa1)=>({'id':_0x325783[_0x2afda8(0xba)],'threadId':_0x325783[_0x2afda8(0xae)],'dT':y(_0x325783[_0x2afda8(0xe2)]),'personId':_0x325783['userId'],'resolved':_0x25a34a['solved']===I['Solved'],'unitId':_0x191128,'subUnitId':_0x183b51,'text':JSON[_0x2afda8(0xd5)](_0x325783[_0x2afda8(0xc1)]),'parentId':_0x360fa1}),_0xbe6269=_0x4f3d99(_0x25a34a['replies'][0x0]);return{..._0xbe6269,'children':_0x25a34a['replies'][_0x2afda8(0xf7)](0x1)['map'](_0x2d4475=>_0x4f3d99(_0x2d4475,_0xbe6269['id']))};}return null;}let S=class{constructor(_0x206409,_0x559f8e,_0xf1f047){const _0xf5386a=_0x4216a6;this[_0xf5386a(0xb0)]=_0x206409,this['_userService']=_0x559f8e,this[_0xf5386a(0xb6)]=_0xf1f047;}async[_0x4216a6(0xca)](_0x54a245){const _0xa64d51=_0x4216a6;var _0x59cfeb,_0x3388ad;const {parentId:_0x57cee4,unitId:_0x33e0b3,text:_0x3eddd2,threadId:_0x2d4399}=_0x54a245,_0x271ad8=(_0x3388ad=(_0x59cfeb=_0x3eddd2[_0xa64d51(0xfa)])==null?void 0x0:_0x59cfeb[_0xa64d51(0xe5)](_0x21818a=>_0x21818a[_0xa64d51(0xa3)]===_0x5edfc0[_0xa64d51(0xbd)])['map'](_0x558601=>_0x558601['rangeId']))!=null?_0x3388ad:[],_0x304aeb=JSON[_0xa64d51(0xa2)](_0x3eddd2),_0x2c8c9f=(await this[_0xa64d51(0xb6)][_0xa64d51(0xd4)](_0x33e0b3))[_0xa64d51(0xfe)]();if(_0x57cee4){const _0xda28d1={'memberId':_0x2c8c9f,'unitId':_0x33e0b3,'content':_0x304aeb,'mention':_0x271ad8,'threadId':_0x2d4399},_0x5d50c5=(await this[_0xa64d51(0xb0)][_0xa64d51(0xbb)]('/universer-api/comment/unit/'+_0x33e0b3+_0xa64d51(0xef),{'body':_0xda28d1}))['body'][_0xa64d51(0xb8)];return{..._0x54a245,'id':_0x5d50c5[_0xa64d51(0xba)],'dT':_0x5b50d4(+_0x5d50c5[_0xa64d51(0xe2)])['format'](_0xa64d51(0xa1)),'personId':_0x5d50c5[_0xa64d51(0xf9)]};}else{const _0x3a3bcb={'memberId':_0x2c8c9f,'unitId':_0x33e0b3,'content':_0x304aeb,'mention':_0x271ad8},_0x4f1c8f=await this[_0xa64d51(0xb0)][_0xa64d51(0xbb)]('/universer-api/comment/unit/'+_0x33e0b3+_0xa64d51(0xf1),{'body':_0x3a3bcb});return X(_0x4f1c8f['body'][_0xa64d51(0xd3)],_0x54a245);}}async['updateComment'](_0xb1d840){const _0x119173=_0x4216a6;var _0x43ec39,_0x507f0a;const {text:_0x2ff724,unitId:_0x411044}=_0xb1d840,_0x260608=(_0x507f0a=(_0x43ec39=_0x2ff724[_0x119173(0xfa)])==null?void 0x0:_0x43ec39[_0x119173(0xe5)](_0x11c5bc=>_0x11c5bc[_0x119173(0xa3)]===_0x5edfc0[_0x119173(0xbd)])[_0x119173(0xc4)](_0x5e4b41=>_0x5e4b41[_0x119173(0xcd)]))!=null?_0x507f0a:[],_0x488b94=JSON['stringify'](_0x2ff724),_0x40d891=_0xb1d840[_0x119173(0xae)],_0x229020=_0xb1d840['id'],_0x588261={'memberId':(await this[_0x119173(0xb6)][_0x119173(0xd4)](_0x411044))[_0x119173(0xfe)](),'unitId':_0x411044,'threadId':_0x40d891,'mention':_0x260608,'content':_0x488b94,'replyId':_0x229020},_0x12cf44=await this[_0x119173(0xb0)][_0x119173(0xbb)](_0x119173(0xa5)+_0x411044+'/edit',{'body':_0x588261});return!_0x12cf44['body'][_0x119173(0xfb)]||_0x12cf44['body'][_0x119173(0xfb)][_0x119173(0xb5)]===0x1;}async[_0x4216a6(0xbc)](_0x384578){const _0x44ae4e=_0x4216a6,{unitId:_0x1f43b3}=_0x384578,_0x3b1657=_0x384578[_0x44ae4e(0xae)],_0x9f6883={'memberId':this[_0x44ae4e(0xf8)]['getCurrentUser']()['userID'],'unitId':_0x1f43b3,'threadId':_0x3b1657,'solved':_0x384578[_0x44ae4e(0xf2)]?I[_0x44ae4e(0xcc)]:I[_0x44ae4e(0xa7)]},_0x1584ca=await this[_0x44ae4e(0xb0)][_0x44ae4e(0xbb)](_0x44ae4e(0xa5)+_0x1f43b3+_0x44ae4e(0xd8),{'body':_0x9f6883});return!_0x1584ca['body'][_0x44ae4e(0xfb)]||_0x1584ca[_0x44ae4e(0xbe)]['error']['code']===0x1;}async[_0x4216a6(0xb7)](_0x8f098,_0xd47587,_0x121e87,_0x1d296a){const _0x1f4169=_0x4216a6,_0xd622c0={'memberId':(await this[_0x1f4169(0xb6)][_0x1f4169(0xd4)](_0x8f098))[_0x1f4169(0xfe)](),'threadId':_0x121e87,'replyId':_0x1d296a,'unitId':_0x8f098},_0x2911d8=await this[_0x1f4169(0xb0)][_0x1f4169(0xbb)]('/universer-api/comment/unit/'+_0x8f098+_0x1f4169(0xda),{'body':_0xd622c0});return!_0x2911d8['body']['error']||_0x2911d8[_0x1f4169(0xbe)][_0x1f4169(0xfb)][_0x1f4169(0xb5)]===0x1;}async['listComments'](_0x23b489,_0x222ba0,_0x20e8b9){const _0x3c2907=_0x4216a6,_0x33c943={'unitId':_0x23b489,'threadId':_0x20e8b9},_0x1eb491=await this[_0x3c2907(0xb0)][_0x3c2907(0xbb)](_0x3c2907(0xa5)+_0x23b489+_0x3c2907(0xe9),{'body':_0x33c943}),_0x3d55df=_0x20e8b9[_0x3c2907(0xc4)](_0x509889=>ee(_0x1eb491[_0x3c2907(0xbe)][_0x3c2907(0x100)][_0x509889],_0x23b489,_0x222ba0))[_0x3c2907(0xe5)](Boolean);return Object[_0x3c2907(0xd0)](_0x1eb491[_0x3c2907(0xbe)][_0x3c2907(0xf3)])[_0x3c2907(0xec)](_0x479309=>{const _0x1d5a5e=_0x3c2907;this[_0x1d5a5e(0xf8)][_0x1d5a5e(0xe0)](_0x479309);}),_0x3d55df;}[_0x4216a6(0xa8)](_0x434240){const _0x5e7bb6=_0x4216a6;return{'id':_0x434240['id'],'threadId':_0x434240[_0x5e7bb6(0xae)],'ref':_0x434240[_0x5e7bb6(0xd7)]};}};S=Q([b(0x0,_0x49b372(_0x38b897)),b(0x1,_0x49b372(_0x598b93)),b(0x2,_0x49b372(_0x12ee47))],S);var re=Object[_0x4216a6(0xe1)],te=(_0x347f9d,_0x45d7d4,_0x63250c,_0x3defd5)=>{const _0x2415d1=_0x4216a6;for(var _0x2251de=_0x3defd5>0x1?void 0x0:_0x3defd5?re(_0x45d7d4,_0x63250c):_0x45d7d4,_0x3564a4=_0x347f9d[_0x2415d1(0xe3)]-0x1,_0x2918e9;_0x3564a4>=0x0;_0x3564a4--)(_0x2918e9=_0x347f9d[_0x3564a4])&&(_0x2251de=_0x2918e9(_0x2251de)||_0x2251de);return _0x2251de;},M=(_0x3d6542,_0x2b609d)=>(_0x49e1bf,_0x2ae6d8)=>_0x2b609d(_0x49e1bf,_0x2ae6d8,_0x3d6542);let f=class extends _0xef71e6{constructor(_0x50d149,_0x9bb59e){const _0x3e6000=_0x4216a6;super(),this[_0x3e6000(0xf4)]=_0x50d149,this['_threadCommentDataSource']=_0x9bb59e,this[_0x3e6000(0xb3)]();}[_0x4216a6(0xb3)](){const _0x2d4ab3=_0x4216a6;this['_threadCommentDataSourceService'][_0x2d4ab3(0xdd)]=this['_threadCommentDataSource'],this[_0x2d4ab3(0xf4)][_0x2d4ab3(0xb1)]=!0x1;}};f=te([M(0x0,_0x23173b),M(0x1,_0x49b372(S))],f);function _0x5c5c(){const _0xb48658=['reply','_config','replyId','post','resolveComment','COMMENT','body','root','_injector','content','commentUpdate$','replies','map','_threadCommentModel','setConfig','getUnit','format','defineProperty','addComment','Unknown','Solved','rangeId','UNIVER_UNKNOWN','1423865lLpQkd','values','find','Edit','comment','requireSession','parse','thread-comment-data-source.config','ref','/solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/delete','1718768wEfgwp','onReady','dataSource','707KkHKJh','type','addUser','getOwnPropertyDescriptor','createTimestamp','length','4544560GuSjYK','filter','user','onStarting','UNRECOGNIZED','/list','size','1751991ssMERF','forEach','updateComment','add','/reply','7920756JbXfiK','/add','resolved','users','_threadCommentDataSourceService','145600IUrZQv','_commentService','slice','_userService','userId','customRanges','error','subscribe','Add','getMemberID','Solve','comments','3296nDEwci','unitId','/universer-api/user/list','918xCawYy','YYYY/MM/DD\x20HH:mm','stringify','rangeType','get','/universer-api/comment/unit/','pluginName','OpenOrReOpen','saveCommentToSnapshot','solved','Delete','Reply','_init','getUser','threadId','userID','_httpService','syncUpdateMutationToColla','4LWHoFh','_initDataSource','_configService','code','_sessionService','deleteComment'];_0x5c5c=function(){return _0xb48658;};return _0x5c5c();}var se=Object[_0x4216a6(0xc9)],oe=Object[_0x4216a6(0xe1)],ne=(_0x441d6e,_0xd6a5ed,_0x11cfb0)=>_0xd6a5ed in _0x441d6e?se(_0x441d6e,_0xd6a5ed,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x11cfb0}):_0x441d6e[_0xd6a5ed]=_0x11cfb0,ie=(_0x541027,_0x39134b,_0x58a663,_0x547a9d)=>{const _0x2f5176=_0x4216a6;for(var _0xd75e81=_0x547a9d>0x1?void 0x0:_0x547a9d?oe(_0x39134b,_0x58a663):_0x39134b,_0x3a899c=_0x541027[_0x2f5176(0xe3)]-0x1,_0x56bff0;_0x3a899c>=0x0;_0x3a899c--)(_0x56bff0=_0x541027[_0x3a899c])&&(_0xd75e81=_0x56bff0(_0xd75e81)||_0xd75e81);return _0xd75e81;},N=(_0x3e2aef,_0x1e4ee2)=>(_0x1d7003,_0x30b021)=>_0x1e4ee2(_0x1d7003,_0x30b021,_0x3e2aef),$=(_0x4e1eb8,_0x1f8670,_0x5255f4)=>ne(_0x4e1eb8,typeof _0x1f8670!='symbol'?_0x1f8670+'':_0x1f8670,_0x5255f4);let g=class extends _0x2e9e01{constructor(_0x2b1a19=O,_0x169ad5,_0x366b34){const _0x212939=_0x4216a6;super(),this[_0x212939(0xb9)]=_0x2b1a19,this['_injector']=_0x169ad5,this['_configService']=_0x366b34;const {..._0x1c14c0}=_0x41cc18({},O,this[_0x212939(0xb9)]);this[_0x212939(0xb4)][_0x212939(0xc6)](z,_0x1c14c0);}[_0x4216a6(0xe7)](){const _0x745e4f=_0x4216a6;[[S],[f],[_]][_0x745e4f(0xec)](_0x171f41=>{const _0x22f5d5=_0x745e4f;this[_0x22f5d5(0xc0)][_0x22f5d5(0xee)](_0x171f41);});}[_0x4216a6(0xdc)](){const _0x466b3e=_0x4216a6;this['_injector']['get'](f),this['_injector'][_0x466b3e(0xa4)](_);}};$(g,_0x4216a6(0xa6),W),$(g,'type',_0x347d61[_0x4216a6(0xce)]),g=ie([_0x526950(_0x54f46d,_0x5719a3,_0x187f4d),N(0x1,_0x49b372(_0x43ed79)),N(0x2,_0x349588)],g);export{g as UniverThreadCommentDataSourcePlugin};
@@ -1,13 +1,12 @@
1
1
  import { IBaseComment, IThreadComment, IThreadCommentDataSource } from '@univerjs/thread-comment';
2
2
  import { CollaborationSessionService } from '@univerjs-pro/collaboration-client';
3
- import { Injector, UserManagerService } from '@univerjs/core';
3
+ import { UserManagerService } from '@univerjs/core';
4
4
  import { HTTPService } from '@univerjs/network';
5
5
  export declare class ThreadCommentServerDataSource implements IThreadCommentDataSource {
6
6
  private readonly _httpService;
7
7
  private readonly _userService;
8
8
  private readonly _sessionService;
9
- private _injector;
10
- constructor(_httpService: HTTPService, _userService: UserManagerService, _sessionService: CollaborationSessionService, _injector: Injector);
9
+ constructor(_httpService: HTTPService, _userService: UserManagerService, _sessionService: CollaborationSessionService);
11
10
  addComment(comment: IThreadComment): Promise<IThreadComment>;
12
11
  updateComment(comment: IThreadComment): Promise<boolean>;
13
12
  resolveComment(comment: IThreadComment): Promise<boolean>;
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x161f(_0x46cc66,_0x2893f4){const _0x3e1c43=_0x3e1c();return _0x161f=function(_0x161ff1,_0x135c09){_0x161ff1=_0x161ff1-0x70;let _0x3044c5=_0x3e1c43[_0x161ff1];return _0x3044c5;},_0x161f(_0x46cc66,_0x2893f4);}function _0x3e1c(){const _0x5c2c97=['UniverThreadCommentDataSourcePlugin','type','length','subscribe','filter','getOwnPropertyDescriptor','Plugin','_config','UniverThreadCommentUIPlugin','rangeId','createTimestamp','values','unitId','/delete','post','stringify','find','_initUserSync','CollaborationSessionService','function','forEach','getMemberID','UniverCollaborationClientPlugin','format','user','_httpService','body','HTTPService','getUser','DependentOn','_initDataSource','comment','Reply','addComment','bufferTime','rangeType','getComment','pluginName','_threadCommentDataSourceService','threadId','/solved','UniverNetwork','UserManagerService','Unknown','rxjs','_threadCommentDataSource','Module','Solve','commentUpdate$','replies','customRanges','getCurrentUser','_userService','UniverCore','setConfig','@univerjs/thread-comment-ui','replyId','Injector','code','addUser','disposeWithMe','_threadCommentModel','129210glUyXt','_injector','dayjs','_sessionService','onReady','UniverProThreadCommentDatasource','UniverLicensePlugin','IThreadCommentDataSourceService','exports','1828314pyUBmw','_init','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','syncUpdateMutationToColla','updateComment','deleteComment','1611kgZDLj','@univerjs-pro/license','map','userID','ref','Add','listComments','UniverProCollaborationClient','resolveComment','requireSession','parentId','root','/universer-api/comment/unit/','amd','Inject','42FbalBH','userId','YYYY/MM/DD\x20HH:mm','toStringTag','3150706TLdBog','payload','users','143032KoYKzF','solved','10618632SRnYqA','size','UniverInstanceType','Disposable','defineProperty','_configService','slice','getUnit','1964410RNPTjQ','@univerjs/network','OpenOrReOpen','personId','Delete','_commentService','@univerjs/thread-comment','object','@univerjs/core','parse','error','resolved','UNRECOGNIZED','Solved','content','add','reply','/universer-api/user/list','COMMENT','Edit','comments','CustomRangeType','1485569Aktfnq','pipe','@univerjs-pro/collaboration-client','UniverProLicense','129BkTHvs','get','onStarting'];_0x3e1c=function(){return _0x5c2c97;};return _0x3e1c();}(function(_0x5e73a6,_0x46c5fe){const _0x11736a=_0x161f,_0x309197=_0x5e73a6();while(!![]){try{const _0x4b1b55=-parseInt(_0x11736a(0x70))/0x1+parseInt(_0x11736a(0xd7))/0x2+-parseInt(_0x11736a(0x74))/0x3*(parseInt(_0x11736a(0xda))/0x4)+-parseInt(_0x11736a(0xe4))/0x5+-parseInt(_0x11736a(0xbe))/0x6*(-parseInt(_0x11736a(0xd3))/0x7)+-parseInt(_0x11736a(0xdc))/0x8+-parseInt(_0x11736a(0xc4))/0x9*(-parseInt(_0x11736a(0xb5))/0xa);if(_0x4b1b55===_0x46c5fe)break;else _0x309197['push'](_0x309197['shift']());}catch(_0x24c12d){_0x309197['push'](_0x309197['shift']());}}}(_0x3e1c,0xed960),function(_0x33beb2,_0x2b2eb5){const _0x4052b6=_0x161f;typeof exports==_0x4052b6(0xeb)&&typeof module<'u'?_0x2b2eb5(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x4052b6(0x8a)&&define[_0x4052b6(0xd1)]?define([_0x4052b6(0xbd),_0x4052b6(0x72),_0x4052b6(0xc5),_0x4052b6(0xec),_0x4052b6(0xae),_0x4052b6(0xea),'rxjs',_0x4052b6(0xe5)],_0x2b2eb5):(_0x33beb2=typeof globalThis<'u'?globalThis:_0x33beb2||self,_0x2b2eb5(_0x33beb2[_0x4052b6(0xba)]={},_0x33beb2[_0x4052b6(0xcb)],_0x33beb2[_0x4052b6(0x73)],_0x33beb2[_0x4052b6(0xac)],_0x33beb2['UniverThreadCommentUi'],_0x33beb2['UniverThreadComment'],_0x33beb2[_0x4052b6(0xa3)],_0x33beb2[_0x4052b6(0xa0)]));}(this,function(_0x5062d6,_0x10cc09,_0x6d9789,_0x155477,_0x13a88a,_0xaa109b,_0x1afae6,_0x29013c){'use strict';const _0x54280a=_0x161f;const _0xfc6d01=_0x54280a(0xc0);var _0x4702e4=(_0xe2c95f=>(_0xe2c95f[_0xe2c95f['OpenOrReOpen']=0x0]=_0x54280a(0xe6),_0xe2c95f[_0xe2c95f[_0x54280a(0xf1)]=0x1]=_0x54280a(0xf1),_0xe2c95f[_0xe2c95f[_0x54280a(0xf0)]=-0x1]=_0x54280a(0xf0),_0xe2c95f))(_0x4702e4||{}),_0xfe74f0=(_0x95d014=>(_0x95d014[_0x95d014[_0x54280a(0xa2)]=0x0]='Unknown',_0x95d014[_0x95d014[_0x54280a(0xc9)]=0x1]='Add',_0x95d014[_0x95d014['Reply']=0x2]='Reply',_0x95d014[_0x95d014[_0x54280a(0xf7)]=0x3]='Edit',_0x95d014[_0x95d014['Delete']=0x4]=_0x54280a(0xe8),_0x95d014[_0x95d014[_0x54280a(0xa6)]=0x5]='Solve',_0x95d014[_0x95d014[_0x54280a(0xf0)]=-0x1]=_0x54280a(0xf0),_0x95d014))(_0xfe74f0||{});const _0x4eb31d=_0x31c2d6=>_0x155477[_0x54280a(0xb7)](new Date(+_0x31c2d6))[_0x54280a(0x8e)](_0x54280a(0xd5)),_0x81cda4=async(_0x22d8a8,_0x181f8f)=>{const _0x5209bd=_0x54280a,_0x17f479=_0x22d8a8[_0x5209bd(0x75)](_0x155477[_0x5209bd(0xa1)]),_0x149832=_0x22d8a8[_0x5209bd(0x75)](_0x29013c[_0x5209bd(0x92)]);_0x181f8f[_0x5209bd(0x8b)](_0x5e61c3=>{const _0x193275=_0x5209bd;_0x17f479[_0x193275(0x93)](_0x5e61c3)&&_0x181f8f['delete'](_0x5e61c3);}),_0x181f8f[_0x5209bd(0xdd)]&&(await _0x149832['get'](_0x5209bd(0xf5),{'params':{'userIDs':[..._0x181f8f]}}))['body'][_0x5209bd(0xd9)][_0x5209bd(0x8b)](_0x26e43b=>{_0x26e43b&&_0x17f479['addUser'](_0x26e43b);});};var _0x53e184=Object[_0x54280a(0x7c)],_0x18f646=(_0x411241,_0x2dabd1,_0x9e114d,_0x2c197b)=>{for(var _0x235ea9=_0x2c197b>0x1?void 0x0:_0x2c197b?_0x53e184(_0x2dabd1,_0x9e114d):_0x2dabd1,_0x12dc86=_0x411241['length']-0x1,_0x22ce09;_0x12dc86>=0x0;_0x12dc86--)(_0x22ce09=_0x411241[_0x12dc86])&&(_0x235ea9=_0x22ce09(_0x235ea9)||_0x235ea9);return _0x235ea9;},_0x54dd7a=(_0x2e552f,_0x154f37)=>(_0x543864,_0x4c1556)=>_0x154f37(_0x543864,_0x4c1556,_0x2e552f);let _0x52bd67=class extends _0x155477[_0x54280a(0xdf)]{constructor(_0x555059,_0x6ddecd,_0x35bc2f,_0x5f4660){const _0x37c0d2=_0x54280a;super(),this['_commentService']=_0x555059,this[_0x37c0d2(0xb4)]=_0x6ddecd,this[_0x37c0d2(0xab)]=_0x35bc2f,this['_injector']=_0x5f4660,this[_0x37c0d2(0xbf)](),this['_initUserSync']();}[_0x54280a(0x88)](){const _0x55b616=_0x54280a;this[_0x55b616(0xb3)](this[_0x55b616(0xb4)][_0x55b616(0xa7)][_0x55b616(0x71)](_0x1afae6[_0x55b616(0x99)](0x10))[_0x55b616(0x7a)](_0x3d1357=>{const _0xd3902d=_0x55b616,_0x5256bd=new Set();_0x3d1357[_0xd3902d(0x8b)](_0x35fd3b=>{const _0x4dd887=_0xd3902d;switch(_0x35fd3b[_0x4dd887(0x78)]){case _0x4dd887(0xf3):{const _0x5c194d=_0x35fd3b[_0x4dd887(0xd8)][_0x4dd887(0xe7)];_0x5256bd[_0x4dd887(0xf3)](_0x5c194d);break;}}}),_0x81cda4(this[_0xd3902d(0xb6)],_0x5256bd);}));}[_0x54280a(0xbf)](){const _0x481194=_0x54280a;this[_0x481194(0xb3)](this[_0x481194(0xe9)][_0x481194(0xa7)][_0x481194(0x7a)](async _0x521ef3=>{const _0x2702b1=_0x481194;var _0x5bbf92,_0x48a5ad,_0x4b8e98,_0x2d50ad;const _0x4dd3cb=(_0x5bbf92=this[_0x2702b1(0xb4)]['getUnit'](_0x521ef3[_0x2702b1(0x83)])['find'](_0x1cf9d6=>_0x1cf9d6['threadId']===_0x521ef3[_0x2702b1(0x9e)]))==null?void 0x0:_0x5bbf92[_0x2702b1(0xcf)];if(!_0x4dd3cb)return;const {unitId:_0x951d91,subUnitId:_0x7dfaa5}=_0x4dd3cb;switch(_0x521ef3['user']&&this[_0x2702b1(0xab)]['addUser'](_0x521ef3[_0x2702b1(0x8f)]),_0x521ef3[_0x2702b1(0x78)]){case _0xfe74f0[_0x2702b1(0xc9)]:break;case _0xfe74f0[_0x2702b1(0x97)]:{this[_0x2702b1(0xb4)][_0x2702b1(0x98)](_0x951d91,_0x7dfaa5,{'unitId':_0x951d91,'subUnitId':_0x7dfaa5,'ref':'','id':_0x521ef3[_0x2702b1(0xaf)],'dT':_0x4eb31d(+_0x521ef3[_0x2702b1(0x81)]),'threadId':_0x521ef3[_0x2702b1(0x9e)],'personId':(_0x4b8e98=(_0x48a5ad=_0x521ef3[_0x2702b1(0x8f)])==null?void 0x0:_0x48a5ad[_0x2702b1(0xc7)])!=null?_0x4b8e98:_0x521ef3[_0x2702b1(0xd4)],'text':JSON[_0x2702b1(0xed)](_0x521ef3[_0x2702b1(0xf2)]),'parentId':_0x4dd3cb['id']});break;}case _0xfe74f0[_0x2702b1(0xe8)]:{const _0x3d6b76=this[_0x2702b1(0xb4)][_0x2702b1(0x9b)](_0x951d91,_0x7dfaa5,_0x521ef3[_0x2702b1(0xaf)]);_0x3d6b76&&_0x3d6b76[_0x2702b1(0xce)]&&this[_0x2702b1(0xb4)][_0x2702b1(0xc3)](_0x951d91,_0x7dfaa5,_0x521ef3[_0x2702b1(0xaf)]);break;}case _0xfe74f0[_0x2702b1(0xf7)]:{this[_0x2702b1(0xb4)][_0x2702b1(0xc2)](_0x951d91,_0x7dfaa5,{'commentId':_0x521ef3[_0x2702b1(0xaf)],'text':JSON[_0x2702b1(0xed)](_0x521ef3[_0x2702b1(0xf2)])});break;}case _0xfe74f0[_0x2702b1(0xa6)]:{const _0x517477=(_0x2d50ad=this[_0x2702b1(0xb4)][_0x2702b1(0xe3)](_0x521ef3[_0x2702b1(0x83)])[_0x2702b1(0x87)](_0x9b4ced=>_0x9b4ced[_0x2702b1(0x9e)]===_0x521ef3[_0x2702b1(0x9e)]))==null?void 0x0:_0x2d50ad[_0x2702b1(0xcf)];_0x517477&&this['_threadCommentModel'][_0x2702b1(0xcc)](_0x951d91,_0x7dfaa5,_0x517477['id'],_0x521ef3['solved']===_0x4702e4['Solved']);break;}}}));}};_0x52bd67=_0x18f646([_0x54dd7a(0x0,_0x155477[_0x54280a(0xd2)](_0x10cc09['CommentService'])),_0x54dd7a(0x1,_0x155477[_0x54280a(0xd2)](_0xaa109b['ThreadCommentModel'])),_0x54dd7a(0x2,_0x155477[_0x54280a(0xd2)](_0x155477['UserManagerService'])),_0x54dd7a(0x3,_0x155477[_0x54280a(0xd2)](_0x155477[_0x54280a(0xb0)]))],_0x52bd67);const _0x1b0463='thread-comment-data-source.config',_0x20e99e={};var _0x1b7d61=Object[_0x54280a(0x7c)],_0x2c02cd=(_0x350ec4,_0x4f975d,_0x488d8e,_0x4440fe)=>{for(var _0x5c8c17=_0x4440fe>0x1?void 0x0:_0x4440fe?_0x1b7d61(_0x4f975d,_0x488d8e):_0x4f975d,_0x17af34=_0x350ec4['length']-0x1,_0x2f6e4e;_0x17af34>=0x0;_0x17af34--)(_0x2f6e4e=_0x350ec4[_0x17af34])&&(_0x5c8c17=_0x2f6e4e(_0x5c8c17)||_0x5c8c17);return _0x5c8c17;},_0x35e91b=(_0x36cf38,_0x3bffeb)=>(_0x512e57,_0x51a03c)=>_0x3bffeb(_0x512e57,_0x51a03c,_0x36cf38);function _0x18874f(_0x2d8733,_0x4d8501){const _0x4aa46a=_0x54280a,_0x25c341=_0x2d8733[_0x4aa46a(0xa8)][0x0];return{..._0x4d8501,'id':_0x25c341[_0x4aa46a(0xaf)],'resolved':_0x2d8733[_0x4aa46a(0xdb)]===0x1,'dT':_0x4eb31d(_0x25c341[_0x4aa46a(0x81)]),'personId':_0x25c341['userId'],'threadId':_0x25c341['threadId']};}function _0x50e719(_0x391164,_0x12889a,_0x5f5698){const _0x2a9657=_0x54280a;var _0x3e72b0,_0x5e5294;if(((_0x5e5294=(_0x3e72b0=_0x391164==null?void 0x0:_0x391164['replies'])==null?void 0x0:_0x3e72b0[_0x2a9657(0x79)])!=null?_0x5e5294:0x0)>0x0){const _0x29e469=(_0x315870,_0x5d6e3c)=>({'id':_0x315870[_0x2a9657(0xaf)],'threadId':_0x315870['threadId'],'dT':_0x4eb31d(_0x315870[_0x2a9657(0x81)]),'personId':_0x315870['userId'],'resolved':_0x391164['solved']===_0x4702e4['Solved'],'unitId':_0x12889a,'subUnitId':_0x5f5698,'text':JSON['parse'](_0x315870['content']),'parentId':_0x5d6e3c}),_0x50b2b5=_0x29e469(_0x391164[_0x2a9657(0xa8)][0x0]);return{..._0x50b2b5,'children':_0x391164[_0x2a9657(0xa8)][_0x2a9657(0xe2)](0x1)[_0x2a9657(0xc6)](_0x39000c=>_0x29e469(_0x39000c,_0x50b2b5['id']))};}return null;}let _0x435ad0=class{constructor(_0x2936d5,_0x4bc1f7,_0x43c247,_0x2f20ef){const _0x5be9f6=_0x54280a;this[_0x5be9f6(0x90)]=_0x2936d5,this[_0x5be9f6(0xab)]=_0x4bc1f7,this[_0x5be9f6(0xb8)]=_0x43c247,this[_0x5be9f6(0xb6)]=_0x2f20ef;}async['addComment'](_0x8321d1){const _0x2c69ed=_0x54280a;var _0x47c9d1,_0x5dc5c8;const {parentId:_0x4fdd4f,unitId:_0x173097,text:_0x540e5c,threadId:_0x3c02aa}=_0x8321d1,_0x20cfb4=(_0x5dc5c8=(_0x47c9d1=_0x540e5c[_0x2c69ed(0xa9)])==null?void 0x0:_0x47c9d1[_0x2c69ed(0x7b)](_0x6ecb6=>_0x6ecb6[_0x2c69ed(0x9a)]===_0x155477[_0x2c69ed(0xf9)][_0x2c69ed(0xf6)])[_0x2c69ed(0xc6)](_0x1185e3=>_0x1185e3[_0x2c69ed(0x80)]))!=null?_0x5dc5c8:[],_0x5f0f82=JSON[_0x2c69ed(0x86)](_0x540e5c),_0x344b03=(await this[_0x2c69ed(0xb8)][_0x2c69ed(0xcd)](_0x173097))[_0x2c69ed(0x8c)]();if(_0x4fdd4f){const _0x133803={'memberId':_0x344b03,'unitId':_0x173097,'content':_0x5f0f82,'mention':_0x20cfb4,'threadId':_0x3c02aa},_0x3e4ada=(await this[_0x2c69ed(0x90)][_0x2c69ed(0x85)](_0x2c69ed(0xd0)+_0x173097+'/reply',{'body':_0x133803}))[_0x2c69ed(0x91)][_0x2c69ed(0xf4)];return{..._0x8321d1,'id':_0x3e4ada['replyId'],'dT':_0x155477['dayjs'](+_0x3e4ada['createTimestamp'])[_0x2c69ed(0x8e)](_0x2c69ed(0xd5)),'personId':_0x3e4ada['userId']};}else{const _0x4f50f1={'memberId':_0x344b03,'unitId':_0x173097,'content':_0x5f0f82,'mention':_0x20cfb4},_0x2bb52f=await this[_0x2c69ed(0x90)][_0x2c69ed(0x85)]('/universer-api/comment/unit/'+_0x173097+'/add',{'body':_0x4f50f1});return _0x18874f(_0x2bb52f['body'][_0x2c69ed(0x96)],_0x8321d1);}}async[_0x54280a(0xc2)](_0x52df13){const _0x6eb2d7=_0x54280a;var _0x45fa9a,_0x563c8f;const {text:_0x438d83,unitId:_0x1693c9}=_0x52df13,_0x7ffdc5=(_0x563c8f=(_0x45fa9a=_0x438d83[_0x6eb2d7(0xa9)])==null?void 0x0:_0x45fa9a[_0x6eb2d7(0x7b)](_0x2585ee=>_0x2585ee['rangeType']===_0x155477[_0x6eb2d7(0xf9)][_0x6eb2d7(0xf6)])[_0x6eb2d7(0xc6)](_0x5ee9c1=>_0x5ee9c1['rangeId']))!=null?_0x563c8f:[],_0x301161=JSON[_0x6eb2d7(0x86)](_0x438d83),_0xb0512=_0x52df13[_0x6eb2d7(0x9e)],_0xbaed01=_0x52df13['id'],_0x3ebcdb={'memberId':(await this['_sessionService'][_0x6eb2d7(0xcd)](_0x1693c9))[_0x6eb2d7(0x8c)](),'unitId':_0x1693c9,'threadId':_0xb0512,'mention':_0x7ffdc5,'content':_0x301161,'replyId':_0xbaed01},_0x5e4477=await this[_0x6eb2d7(0x90)]['post'](_0x6eb2d7(0xd0)+_0x1693c9+'/edit',{'body':_0x3ebcdb});return!_0x5e4477[_0x6eb2d7(0x91)][_0x6eb2d7(0xee)]||_0x5e4477[_0x6eb2d7(0x91)][_0x6eb2d7(0xee)][_0x6eb2d7(0xb1)]===0x1;}async[_0x54280a(0xcc)](_0x260be2){const _0x25c6fd=_0x54280a,{unitId:_0x195731}=_0x260be2,_0x11d939=_0x260be2[_0x25c6fd(0x9e)],_0x7143ee={'memberId':this[_0x25c6fd(0xab)][_0x25c6fd(0xaa)]()[_0x25c6fd(0xc7)],'unitId':_0x195731,'threadId':_0x11d939,'solved':_0x260be2[_0x25c6fd(0xef)]?_0x4702e4[_0x25c6fd(0xf1)]:_0x4702e4[_0x25c6fd(0xe6)]},_0x47f985=await this[_0x25c6fd(0x90)][_0x25c6fd(0x85)](_0x25c6fd(0xd0)+_0x195731+_0x25c6fd(0x9f),{'body':_0x7143ee});return!_0x47f985[_0x25c6fd(0x91)][_0x25c6fd(0xee)]||_0x47f985[_0x25c6fd(0x91)][_0x25c6fd(0xee)][_0x25c6fd(0xb1)]===0x1;}async[_0x54280a(0xc3)](_0x16d2bd,_0x1daad8,_0x3afb71,_0x2ddda7){const _0x31fb01=_0x54280a,_0x3dfd87={'memberId':(await this[_0x31fb01(0xb8)][_0x31fb01(0xcd)](_0x16d2bd))[_0x31fb01(0x8c)](),'threadId':_0x3afb71,'replyId':_0x2ddda7,'unitId':_0x16d2bd},_0x1def29=await this[_0x31fb01(0x90)][_0x31fb01(0x85)]('/universer-api/comment/unit/'+_0x16d2bd+_0x31fb01(0x84),{'body':_0x3dfd87});return!_0x1def29[_0x31fb01(0x91)]['error']||_0x1def29[_0x31fb01(0x91)]['error'][_0x31fb01(0xb1)]===0x1;}async[_0x54280a(0xca)](_0x505f87,_0x30dfdf,_0x4a057c){const _0x7f85e6=_0x54280a,_0x244092={'unitId':_0x505f87,'threadId':_0x4a057c},_0xb732=await this[_0x7f85e6(0x90)][_0x7f85e6(0x85)](_0x7f85e6(0xd0)+_0x505f87+'/list',{'body':_0x244092}),_0x3d2d8b=_0x4a057c['map'](_0xd898c5=>_0x50e719(_0xb732[_0x7f85e6(0x91)][_0x7f85e6(0xf8)][_0xd898c5],_0x505f87,_0x30dfdf))[_0x7f85e6(0x7b)](Boolean);return Object[_0x7f85e6(0x82)](_0xb732[_0x7f85e6(0x91)][_0x7f85e6(0xd9)])[_0x7f85e6(0x8b)](_0x1e714c=>{const _0x519363=_0x7f85e6;this['_userService'][_0x519363(0xb2)](_0x1e714c);}),_0x3d2d8b;}['saveCommentToSnapshot'](_0x332034){const _0x20fbe0=_0x54280a;return{'id':_0x332034['id'],'threadId':_0x332034[_0x20fbe0(0x9e)],'ref':_0x332034[_0x20fbe0(0xc8)]};}};_0x435ad0=_0x2c02cd([_0x35e91b(0x0,_0x155477['Inject'](_0x29013c[_0x54280a(0x92)])),_0x35e91b(0x1,_0x155477['Inject'](_0x155477['UserManagerService'])),_0x35e91b(0x2,_0x155477[_0x54280a(0xd2)](_0x10cc09[_0x54280a(0x89)])),_0x35e91b(0x3,_0x155477[_0x54280a(0xd2)](_0x155477[_0x54280a(0xb0)]))],_0x435ad0);var _0x33969e=Object[_0x54280a(0x7c)],_0xc29a1a=(_0x3fa3a6,_0xd663ae,_0x5eee14,_0x2dea23)=>{const _0x590b99=_0x54280a;for(var _0x5c50a4=_0x2dea23>0x1?void 0x0:_0x2dea23?_0x33969e(_0xd663ae,_0x5eee14):_0xd663ae,_0x8a5c5f=_0x3fa3a6[_0x590b99(0x79)]-0x1,_0x24c2c5;_0x8a5c5f>=0x0;_0x8a5c5f--)(_0x24c2c5=_0x3fa3a6[_0x8a5c5f])&&(_0x5c50a4=_0x24c2c5(_0x5c50a4)||_0x5c50a4);return _0x5c50a4;},_0x3d82fe=(_0x4f5138,_0x37909c)=>(_0x2a06b8,_0x3c1f57)=>_0x37909c(_0x2a06b8,_0x3c1f57,_0x4f5138);let _0x439afd=class extends _0x155477[_0x54280a(0xdf)]{constructor(_0x48a3a7,_0x5eb756){const _0x3dea8f=_0x54280a;super(),this[_0x3dea8f(0x9d)]=_0x48a3a7,this[_0x3dea8f(0xa4)]=_0x5eb756,this[_0x3dea8f(0x95)]();}[_0x54280a(0x95)](){const _0x938d00=_0x54280a;this[_0x938d00(0x9d)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x938d00(0xc1)]=!0x1;}};_0x439afd=_0xc29a1a([_0x3d82fe(0x0,_0xaa109b[_0x54280a(0xbc)]),_0x3d82fe(0x1,_0x155477[_0x54280a(0xd2)](_0x435ad0))],_0x439afd);var _0x68a8b7=Object[_0x54280a(0xe0)],_0x418fc3=Object['getOwnPropertyDescriptor'],_0x49e276=(_0x2d6119,_0xea048c,_0xe8c98d)=>_0xea048c in _0x2d6119?_0x68a8b7(_0x2d6119,_0xea048c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xe8c98d}):_0x2d6119[_0xea048c]=_0xe8c98d,_0x4fc447=(_0x51498d,_0x20cb20,_0x296805,_0x45a730)=>{const _0x266480=_0x54280a;for(var _0x46ebb8=_0x45a730>0x1?void 0x0:_0x45a730?_0x418fc3(_0x20cb20,_0x296805):_0x20cb20,_0x6d53b6=_0x51498d[_0x266480(0x79)]-0x1,_0x174a89;_0x6d53b6>=0x0;_0x6d53b6--)(_0x174a89=_0x51498d[_0x6d53b6])&&(_0x46ebb8=_0x174a89(_0x46ebb8)||_0x46ebb8);return _0x46ebb8;},_0x221996=(_0x5064,_0x4ca1e4)=>(_0x5b2568,_0x36addd)=>_0x4ca1e4(_0x5b2568,_0x36addd,_0x5064),_0xd315ca=(_0x3a3317,_0x34b027,_0x3aeebc)=>_0x49e276(_0x3a3317,typeof _0x34b027!='symbol'?_0x34b027+'':_0x34b027,_0x3aeebc);_0x5062d6['UniverThreadCommentDataSourcePlugin']=class extends _0x155477[_0x54280a(0x7d)]{constructor(_0x4c93b3=_0x20e99e,_0x31ba94,_0x334be8){const _0x4dbec8=_0x54280a;super(),this[_0x4dbec8(0x7e)]=_0x4c93b3,this[_0x4dbec8(0xb6)]=_0x31ba94,this[_0x4dbec8(0xe1)]=_0x334be8;const {..._0x1d0e7d}=_0x155477['merge']({},_0x20e99e,this[_0x4dbec8(0x7e)]);this[_0x4dbec8(0xe1)][_0x4dbec8(0xad)](_0x1b0463,_0x1d0e7d);}[_0x54280a(0x76)](){const _0x1f16dd=_0x54280a;[[_0x435ad0],[_0x439afd],[_0x52bd67]][_0x1f16dd(0x8b)](_0xbcf224=>{const _0x425656=_0x1f16dd;this[_0x425656(0xb6)]['add'](_0xbcf224);});}[_0x54280a(0xb9)](){const _0x38be9d=_0x54280a;this['_injector'][_0x38be9d(0x75)](_0x439afd),this[_0x38be9d(0xb6)][_0x38be9d(0x75)](_0x52bd67);}},_0xd315ca(_0x5062d6[_0x54280a(0x77)],_0x54280a(0x9c),_0xfc6d01),_0xd315ca(_0x5062d6[_0x54280a(0x77)],_0x54280a(0x78),_0x155477[_0x54280a(0xde)]['UNIVER_UNKNOWN']),_0x5062d6[_0x54280a(0x77)]=_0x4fc447([_0x155477[_0x54280a(0x94)](_0x13a88a[_0x54280a(0x7f)],_0x10cc09[_0x54280a(0x8d)],_0x6d9789[_0x54280a(0xbb)]),_0x221996(0x1,_0x155477[_0x54280a(0xd2)](_0x155477[_0x54280a(0xb0)])),_0x221996(0x2,_0x155477['IConfigService'])],_0x5062d6[_0x54280a(0x77)]),Object[_0x54280a(0xe0)](_0x5062d6,Symbol[_0x54280a(0xd6)],{'value':_0x54280a(0xa5)});}));
1
+ function _0x3476(){const _0x26782b=['deleteComment','subscribe','map','getComment','/reply','/delete','dataSource','Solved','/universer-api/user/list','delete','solved','body','payload','7009008UqrcSI','length','addComment','UNRECOGNIZED','Reply','error','@univerjs-pro/license','replyId','defineProperty','dayjs','rxjs','parse','onReady','amd','getUser','exports','UniverThreadCommentUIPlugin','6381783FBFHSQ','resolveComment','users','comment','UniverProLicense','Edit','_threadCommentModel','IConfigService','updateComment','root','CommentService','@univerjs/thread-comment-ui','thread-comment-data-source.config','resolved','size','10125820WlLEbK','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getOwnPropertyDescriptor','commentUpdate$','find','553760qMvsps','Solve','IThreadCommentDataSourceService','slice','/list','addUser','requireSession','function','YYYY/MM/DD\x20HH:mm','Delete','_initDataSource','/universer-api/comment/unit/','filter','threadId','bufferTime','content','HTTPService','disposeWithMe','Inject','createTimestamp','UniverThreadCommentDataSourcePlugin','DependentOn','@univerjs/network','_commentService','format','object','/edit','unitId','code','getUnit','reply','forEach','rangeId','Unknown','UniverThreadCommentUi','15YTFVdU','user','pipe','UniverProThreadCommentDatasource','Disposable','CollaborationSessionService','_userService','_configService','Module','type','add','post','7SWcueH','UniverProCollaborationClient','42457aPiTNZ','_init','symbol','merge','OpenOrReOpen','personId','_sessionService','CustomRangeType','UniverCollaborationClientPlugin','COMMENT','UniverLicensePlugin','parentId','_httpService','UserManagerService','Add','replies','rangeType','ref','listComments','@univerjs-pro/collaboration-client','comments','/add','5321904Uulert','2JETqrf','_initUserSync','stringify','userId','getMemberID','UNIVER_UNKNOWN','get','_threadCommentDataSourceService','264276aOaAsz','_config','Injector','_injector','UniverCore'];_0x3476=function(){return _0x26782b;};return _0x3476();}function _0x56bf(_0x51d974,_0x31755a){const _0x3476a1=_0x3476();return _0x56bf=function(_0x56bf87,_0x5404af){_0x56bf87=_0x56bf87-0x9d;let _0x58ee15=_0x3476a1[_0x56bf87];return _0x58ee15;},_0x56bf(_0x51d974,_0x31755a);}(function(_0x2ef7d0,_0x257934){const _0x129bee=_0x56bf,_0x161fac=_0x2ef7d0();while(!![]){try{const _0x177eb0=parseInt(_0x129bee(0xc1))/0x1+-parseInt(_0x129bee(0xd8))/0x2*(-parseInt(_0x129bee(0xe0))/0x3)+parseInt(_0x129bee(0x117))/0x4*(parseInt(_0x129bee(0xb3))/0x5)+-parseInt(_0x129bee(0xd7))/0x6+-parseInt(_0x129bee(0xbf))/0x7*(parseInt(_0x129bee(0xf2))/0x8)+parseInt(_0x129bee(0x103))/0x9+parseInt(_0x129bee(0x112))/0xa;if(_0x177eb0===_0x257934)break;else _0x161fac['push'](_0x161fac['shift']());}catch(_0x53a153){_0x161fac['push'](_0x161fac['shift']());}}}(_0x3476,0x7b26c),function(_0x2770f2,_0x2ebdf5){const _0x434414=_0x56bf;typeof exports==_0x434414(0xa9)&&typeof module<'u'?_0x2ebdf5(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x434414(0x11e)&&define[_0x434414(0xff)]?define([_0x434414(0x101),_0x434414(0xd4),_0x434414(0xf8),'@univerjs/core',_0x434414(0x10e),'@univerjs/thread-comment',_0x434414(0xfc),_0x434414(0xa6)],_0x2ebdf5):(_0x2770f2=typeof globalThis<'u'?globalThis:_0x2770f2||self,_0x2ebdf5(_0x2770f2[_0x434414(0xb6)]={},_0x2770f2[_0x434414(0xc0)],_0x2770f2[_0x434414(0x107)],_0x2770f2[_0x434414(0xe4)],_0x2770f2[_0x434414(0xb2)],_0x2770f2['UniverThreadComment'],_0x2770f2[_0x434414(0xfc)],_0x2770f2['UniverNetwork']));}(this,function(_0x4c7e66,_0x4a6ab9,_0x6d5476,_0x1b130c,_0xe14e60,_0x4b0c43,_0x51337c,_0x191bb6){'use strict';const _0x15cc7d=_0x56bf;const _0x150976=_0x15cc7d(0x113);var _0x54607c=(_0x4642da=>(_0x4642da[_0x4642da[_0x15cc7d(0xc5)]=0x0]=_0x15cc7d(0xc5),_0x4642da[_0x4642da[_0x15cc7d(0xec)]=0x1]='Solved',_0x4642da[_0x4642da[_0x15cc7d(0xf5)]=-0x1]=_0x15cc7d(0xf5),_0x4642da))(_0x54607c||{}),_0x52978e=(_0x56c0cb=>(_0x56c0cb[_0x56c0cb[_0x15cc7d(0xb1)]=0x0]='Unknown',_0x56c0cb[_0x56c0cb[_0x15cc7d(0xcf)]=0x1]=_0x15cc7d(0xcf),_0x56c0cb[_0x56c0cb[_0x15cc7d(0xf6)]=0x2]=_0x15cc7d(0xf6),_0x56c0cb[_0x56c0cb[_0x15cc7d(0x108)]=0x3]=_0x15cc7d(0x108),_0x56c0cb[_0x56c0cb[_0x15cc7d(0x120)]=0x4]=_0x15cc7d(0x120),_0x56c0cb[_0x56c0cb[_0x15cc7d(0x118)]=0x5]=_0x15cc7d(0x118),_0x56c0cb[_0x56c0cb[_0x15cc7d(0xf5)]=-0x1]=_0x15cc7d(0xf5),_0x56c0cb))(_0x52978e||{});const _0x28e31f=_0x43a8f8=>_0x1b130c[_0x15cc7d(0xfb)](new Date(+_0x43a8f8))['format'](_0x15cc7d(0x11f)),_0x44f95c=async(_0x130bf4,_0x444115)=>{const _0x347d93=_0x15cc7d,_0x36fa6e=_0x130bf4[_0x347d93(0xde)](_0x1b130c['UserManagerService']),_0x2d87c6=_0x130bf4['get'](_0x191bb6[_0x347d93(0xa0)]);_0x444115[_0x347d93(0xaf)](_0x2ece2c=>{const _0x1898fb=_0x347d93;_0x36fa6e[_0x1898fb(0x100)](_0x2ece2c)&&_0x444115[_0x1898fb(0xee)](_0x2ece2c);}),_0x444115[_0x347d93(0x111)]&&(await _0x2d87c6[_0x347d93(0xde)](_0x347d93(0xed),{'params':{'userIDs':[..._0x444115]}}))['body'][_0x347d93(0x105)][_0x347d93(0xaf)](_0x3915a5=>{const _0x3b7d3a=_0x347d93;_0x3915a5&&_0x36fa6e[_0x3b7d3a(0x11c)](_0x3915a5);});};var _0x18c602=Object[_0x15cc7d(0x114)],_0x134add=(_0x4b614a,_0x8d2798,_0xbcfe1c,_0x44d4f3)=>{const _0x20c953=_0x15cc7d;for(var _0x1fb92c=_0x44d4f3>0x1?void 0x0:_0x44d4f3?_0x18c602(_0x8d2798,_0xbcfe1c):_0x8d2798,_0x54abb1=_0x4b614a[_0x20c953(0xf3)]-0x1,_0x2f2f2e;_0x54abb1>=0x0;_0x54abb1--)(_0x2f2f2e=_0x4b614a[_0x54abb1])&&(_0x1fb92c=_0x2f2f2e(_0x1fb92c)||_0x1fb92c);return _0x1fb92c;},_0x4c896d=(_0x128294,_0xe0a984)=>(_0x156d5d,_0x17577d)=>_0xe0a984(_0x156d5d,_0x17577d,_0x128294);let _0x4cebda=class extends _0x1b130c['Disposable']{constructor(_0x5b0b27,_0x1e5b23,_0x2a385d,_0x389a2a){const _0x3d0255=_0x15cc7d;super(),this[_0x3d0255(0xa7)]=_0x5b0b27,this[_0x3d0255(0x109)]=_0x1e5b23,this['_userService']=_0x2a385d,this[_0x3d0255(0xe3)]=_0x389a2a,this[_0x3d0255(0xc2)](),this[_0x3d0255(0xd9)]();}[_0x15cc7d(0xd9)](){const _0x21f4e9=_0x15cc7d;this['disposeWithMe'](this[_0x21f4e9(0x109)]['commentUpdate$'][_0x21f4e9(0xb5)](_0x51337c[_0x21f4e9(0x9e)](0x10))[_0x21f4e9(0xe6)](_0x5862e0=>{const _0x56e262=_0x21f4e9,_0x5e402a=new Set();_0x5862e0[_0x56e262(0xaf)](_0x4cdaae=>{const _0x1c7e87=_0x56e262;switch(_0x4cdaae['type']){case _0x1c7e87(0xbd):{const _0xd8ccac=_0x4cdaae[_0x1c7e87(0xf1)][_0x1c7e87(0xc6)];_0x5e402a[_0x1c7e87(0xbd)](_0xd8ccac);break;}}}),_0x44f95c(this[_0x56e262(0xe3)],_0x5e402a);}));}['_init'](){const _0x13c4b5=_0x15cc7d;this[_0x13c4b5(0xa1)](this[_0x13c4b5(0xa7)][_0x13c4b5(0x115)]['subscribe'](async _0xaf2103=>{const _0x299ee3=_0x13c4b5;var _0x1725ae,_0x4afec1,_0x44f56a,_0x3a7019;const _0x8726bf=(_0x1725ae=this[_0x299ee3(0x109)][_0x299ee3(0xad)](_0xaf2103['unitId'])[_0x299ee3(0x116)](_0x245b8b=>_0x245b8b['threadId']===_0xaf2103[_0x299ee3(0x9d)]))==null?void 0x0:_0x1725ae[_0x299ee3(0x10c)];if(!_0x8726bf)return;const {unitId:_0x302dec,subUnitId:_0x4a6d22}=_0x8726bf;switch(_0xaf2103[_0x299ee3(0xb4)]&&this[_0x299ee3(0xb9)][_0x299ee3(0x11c)](_0xaf2103['user']),_0xaf2103[_0x299ee3(0xbc)]){case _0x52978e[_0x299ee3(0xcf)]:break;case _0x52978e[_0x299ee3(0xf6)]:{this[_0x299ee3(0x109)][_0x299ee3(0xf4)](_0x302dec,_0x4a6d22,{'unitId':_0x302dec,'subUnitId':_0x4a6d22,'ref':'','id':_0xaf2103[_0x299ee3(0xf9)],'dT':_0x28e31f(+_0xaf2103['createTimestamp']),'threadId':_0xaf2103[_0x299ee3(0x9d)],'personId':(_0x44f56a=(_0x4afec1=_0xaf2103[_0x299ee3(0xb4)])==null?void 0x0:_0x4afec1['userID'])!=null?_0x44f56a:_0xaf2103[_0x299ee3(0xdb)],'text':JSON[_0x299ee3(0xfd)](_0xaf2103[_0x299ee3(0x9f)]),'parentId':_0x8726bf['id']});break;}case _0x52978e[_0x299ee3(0x120)]:{const _0x5a3c01=this['_threadCommentModel'][_0x299ee3(0xe8)](_0x302dec,_0x4a6d22,_0xaf2103['replyId']);_0x5a3c01&&_0x5a3c01[_0x299ee3(0xcc)]&&this[_0x299ee3(0x109)][_0x299ee3(0xe5)](_0x302dec,_0x4a6d22,_0xaf2103['replyId']);break;}case _0x52978e[_0x299ee3(0x108)]:{this['_threadCommentModel'][_0x299ee3(0x10b)](_0x302dec,_0x4a6d22,{'commentId':_0xaf2103[_0x299ee3(0xf9)],'text':JSON[_0x299ee3(0xfd)](_0xaf2103[_0x299ee3(0x9f)])});break;}case _0x52978e[_0x299ee3(0x118)]:{const _0x2f1124=(_0x3a7019=this['_threadCommentModel'][_0x299ee3(0xad)](_0xaf2103[_0x299ee3(0xab)])[_0x299ee3(0x116)](_0x17389e=>_0x17389e[_0x299ee3(0x9d)]===_0xaf2103[_0x299ee3(0x9d)]))==null?void 0x0:_0x3a7019[_0x299ee3(0x10c)];_0x2f1124&&this['_threadCommentModel'][_0x299ee3(0x104)](_0x302dec,_0x4a6d22,_0x2f1124['id'],_0xaf2103[_0x299ee3(0xef)]===_0x54607c[_0x299ee3(0xec)]);break;}}}));}};_0x4cebda=_0x134add([_0x4c896d(0x0,_0x1b130c['Inject'](_0x4a6ab9[_0x15cc7d(0x10d)])),_0x4c896d(0x1,_0x1b130c[_0x15cc7d(0xa2)](_0x4b0c43['ThreadCommentModel'])),_0x4c896d(0x2,_0x1b130c[_0x15cc7d(0xa2)](_0x1b130c[_0x15cc7d(0xce)])),_0x4c896d(0x3,_0x1b130c[_0x15cc7d(0xa2)](_0x1b130c[_0x15cc7d(0xe2)]))],_0x4cebda);const _0x4dd06f=_0x15cc7d(0x10f),_0x1119be={};var _0x9544a3=Object[_0x15cc7d(0x114)],_0x47f319=(_0x46961d,_0x3da9f5,_0x4aff04,_0x207b37)=>{for(var _0x1e9615=_0x207b37>0x1?void 0x0:_0x207b37?_0x9544a3(_0x3da9f5,_0x4aff04):_0x3da9f5,_0x2c8930=_0x46961d['length']-0x1,_0x332bd9;_0x2c8930>=0x0;_0x2c8930--)(_0x332bd9=_0x46961d[_0x2c8930])&&(_0x1e9615=_0x332bd9(_0x1e9615)||_0x1e9615);return _0x1e9615;},_0x591c07=(_0x4c6493,_0x5df39b)=>(_0x2f2a81,_0x4ccc7e)=>_0x5df39b(_0x2f2a81,_0x4ccc7e,_0x4c6493);function _0x5dbd0b(_0x25f90c,_0x363af3){const _0x5f5196=_0x15cc7d,_0x6c2093=_0x25f90c['replies'][0x0];return{..._0x363af3,'id':_0x6c2093[_0x5f5196(0xf9)],'resolved':_0x25f90c[_0x5f5196(0xef)]===0x1,'dT':_0x28e31f(_0x6c2093['createTimestamp']),'personId':_0x6c2093[_0x5f5196(0xdb)],'threadId':_0x6c2093[_0x5f5196(0x9d)]};}function _0x24c125(_0x1f33ee,_0x1617cf,_0x33a297){const _0x26ea62=_0x15cc7d;var _0xf95655,_0x2d5c7a;if(((_0x2d5c7a=(_0xf95655=_0x1f33ee==null?void 0x0:_0x1f33ee[_0x26ea62(0xd0)])==null?void 0x0:_0xf95655['length'])!=null?_0x2d5c7a:0x0)>0x0){const _0x53958a=(_0x4e6023,_0x49cfd9)=>({'id':_0x4e6023[_0x26ea62(0xf9)],'threadId':_0x4e6023[_0x26ea62(0x9d)],'dT':_0x28e31f(_0x4e6023[_0x26ea62(0xa3)]),'personId':_0x4e6023[_0x26ea62(0xdb)],'resolved':_0x1f33ee[_0x26ea62(0xef)]===_0x54607c[_0x26ea62(0xec)],'unitId':_0x1617cf,'subUnitId':_0x33a297,'text':JSON['parse'](_0x4e6023[_0x26ea62(0x9f)]),'parentId':_0x49cfd9}),_0xfebcc8=_0x53958a(_0x1f33ee[_0x26ea62(0xd0)][0x0]);return{..._0xfebcc8,'children':_0x1f33ee[_0x26ea62(0xd0)][_0x26ea62(0x11a)](0x1)[_0x26ea62(0xe7)](_0x2a930b=>_0x53958a(_0x2a930b,_0xfebcc8['id']))};}return null;}let _0x1e7eeb=class{constructor(_0x270131,_0x4b99ec,_0x560b5c){const _0x17b8d3=_0x15cc7d;this[_0x17b8d3(0xcd)]=_0x270131,this[_0x17b8d3(0xb9)]=_0x4b99ec,this[_0x17b8d3(0xc7)]=_0x560b5c;}async[_0x15cc7d(0xf4)](_0x3c73a7){const _0x168fb4=_0x15cc7d;var _0x46c51d,_0x5f35a5;const {parentId:_0x463e49,unitId:_0x5d8d67,text:_0x2b4e94,threadId:_0x22d7e8}=_0x3c73a7,_0x340f7b=(_0x5f35a5=(_0x46c51d=_0x2b4e94['customRanges'])==null?void 0x0:_0x46c51d[_0x168fb4(0x123)](_0x544b41=>_0x544b41['rangeType']===_0x1b130c[_0x168fb4(0xc8)][_0x168fb4(0xca)])[_0x168fb4(0xe7)](_0x4ad65d=>_0x4ad65d[_0x168fb4(0xb0)]))!=null?_0x5f35a5:[],_0x58f396=JSON[_0x168fb4(0xda)](_0x2b4e94),_0x1011d5=(await this['_sessionService']['requireSession'](_0x5d8d67))[_0x168fb4(0xdc)]();if(_0x463e49){const _0x23ca6f={'memberId':_0x1011d5,'unitId':_0x5d8d67,'content':_0x58f396,'mention':_0x340f7b,'threadId':_0x22d7e8},_0x2d477f=(await this['_httpService'][_0x168fb4(0xbe)]('/universer-api/comment/unit/'+_0x5d8d67+_0x168fb4(0xe9),{'body':_0x23ca6f}))[_0x168fb4(0xf0)][_0x168fb4(0xae)];return{..._0x3c73a7,'id':_0x2d477f[_0x168fb4(0xf9)],'dT':_0x1b130c[_0x168fb4(0xfb)](+_0x2d477f[_0x168fb4(0xa3)])[_0x168fb4(0xa8)](_0x168fb4(0x11f)),'personId':_0x2d477f[_0x168fb4(0xdb)]};}else{const _0x485d52={'memberId':_0x1011d5,'unitId':_0x5d8d67,'content':_0x58f396,'mention':_0x340f7b},_0x3dfb74=await this[_0x168fb4(0xcd)][_0x168fb4(0xbe)]('/universer-api/comment/unit/'+_0x5d8d67+_0x168fb4(0xd6),{'body':_0x485d52});return _0x5dbd0b(_0x3dfb74[_0x168fb4(0xf0)][_0x168fb4(0x106)],_0x3c73a7);}}async[_0x15cc7d(0x10b)](_0x2f35bc){const _0x77cc7=_0x15cc7d;var _0x540a40,_0x2b1161;const {text:_0x54d4ed,unitId:_0x3488a6}=_0x2f35bc,_0x53fec1=(_0x2b1161=(_0x540a40=_0x54d4ed['customRanges'])==null?void 0x0:_0x540a40[_0x77cc7(0x123)](_0x575075=>_0x575075[_0x77cc7(0xd1)]===_0x1b130c['CustomRangeType']['COMMENT'])[_0x77cc7(0xe7)](_0x4c171b=>_0x4c171b['rangeId']))!=null?_0x2b1161:[],_0x122e8=JSON['stringify'](_0x54d4ed),_0xac1a7a=_0x2f35bc[_0x77cc7(0x9d)],_0xee7870=_0x2f35bc['id'],_0x178666={'memberId':(await this['_sessionService'][_0x77cc7(0x11d)](_0x3488a6))[_0x77cc7(0xdc)](),'unitId':_0x3488a6,'threadId':_0xac1a7a,'mention':_0x53fec1,'content':_0x122e8,'replyId':_0xee7870},_0x2ea23b=await this['_httpService'][_0x77cc7(0xbe)](_0x77cc7(0x122)+_0x3488a6+_0x77cc7(0xaa),{'body':_0x178666});return!_0x2ea23b[_0x77cc7(0xf0)][_0x77cc7(0xf7)]||_0x2ea23b[_0x77cc7(0xf0)]['error'][_0x77cc7(0xac)]===0x1;}async[_0x15cc7d(0x104)](_0x50121d){const _0x1f6dae=_0x15cc7d,{unitId:_0x2230eb}=_0x50121d,_0x432a4e=_0x50121d[_0x1f6dae(0x9d)],_0x16edfb={'memberId':this[_0x1f6dae(0xb9)]['getCurrentUser']()['userID'],'unitId':_0x2230eb,'threadId':_0x432a4e,'solved':_0x50121d[_0x1f6dae(0x110)]?_0x54607c['Solved']:_0x54607c[_0x1f6dae(0xc5)]},_0x4e4532=await this[_0x1f6dae(0xcd)]['post']('/universer-api/comment/unit/'+_0x2230eb+'/solved',{'body':_0x16edfb});return!_0x4e4532['body'][_0x1f6dae(0xf7)]||_0x4e4532['body']['error'][_0x1f6dae(0xac)]===0x1;}async[_0x15cc7d(0xe5)](_0x247c66,_0x112647,_0x534117,_0x5a6ffa){const _0x437eec=_0x15cc7d,_0xf35e75={'memberId':(await this[_0x437eec(0xc7)][_0x437eec(0x11d)](_0x247c66))[_0x437eec(0xdc)](),'threadId':_0x534117,'replyId':_0x5a6ffa,'unitId':_0x247c66},_0x3b0e66=await this[_0x437eec(0xcd)][_0x437eec(0xbe)](_0x437eec(0x122)+_0x247c66+_0x437eec(0xea),{'body':_0xf35e75});return!_0x3b0e66[_0x437eec(0xf0)][_0x437eec(0xf7)]||_0x3b0e66[_0x437eec(0xf0)]['error']['code']===0x1;}async[_0x15cc7d(0xd3)](_0xa5a6b2,_0x2c9495,_0x277747){const _0x47fbde=_0x15cc7d,_0x992260={'unitId':_0xa5a6b2,'threadId':_0x277747},_0xcc30eb=await this['_httpService'][_0x47fbde(0xbe)]('/universer-api/comment/unit/'+_0xa5a6b2+_0x47fbde(0x11b),{'body':_0x992260}),_0x1d41d7=_0x277747['map'](_0x227e3d=>_0x24c125(_0xcc30eb[_0x47fbde(0xf0)][_0x47fbde(0xd5)][_0x227e3d],_0xa5a6b2,_0x2c9495))['filter'](Boolean);return Object['values'](_0xcc30eb['body'][_0x47fbde(0x105)])['forEach'](_0x203ead=>{const _0x58c0f3=_0x47fbde;this['_userService'][_0x58c0f3(0x11c)](_0x203ead);}),_0x1d41d7;}['saveCommentToSnapshot'](_0x3567a3){const _0x43c826=_0x15cc7d;return{'id':_0x3567a3['id'],'threadId':_0x3567a3[_0x43c826(0x9d)],'ref':_0x3567a3[_0x43c826(0xd2)]};}};_0x1e7eeb=_0x47f319([_0x591c07(0x0,_0x1b130c[_0x15cc7d(0xa2)](_0x191bb6[_0x15cc7d(0xa0)])),_0x591c07(0x1,_0x1b130c[_0x15cc7d(0xa2)](_0x1b130c[_0x15cc7d(0xce)])),_0x591c07(0x2,_0x1b130c['Inject'](_0x4a6ab9[_0x15cc7d(0xb8)]))],_0x1e7eeb);var _0x5d751f=Object[_0x15cc7d(0x114)],_0x3baff4=(_0x160958,_0x451d66,_0x5ceef7,_0x2b0a61)=>{for(var _0x8accc9=_0x2b0a61>0x1?void 0x0:_0x2b0a61?_0x5d751f(_0x451d66,_0x5ceef7):_0x451d66,_0x1478af=_0x160958['length']-0x1,_0x58469b;_0x1478af>=0x0;_0x1478af--)(_0x58469b=_0x160958[_0x1478af])&&(_0x8accc9=_0x58469b(_0x8accc9)||_0x8accc9);return _0x8accc9;},_0x1df553=(_0x3dc7d5,_0x79ffb8)=>(_0xe77aec,_0x506137)=>_0x79ffb8(_0xe77aec,_0x506137,_0x3dc7d5);let _0x45f58a=class extends _0x1b130c[_0x15cc7d(0xb7)]{constructor(_0xd4b162,_0x369b6e){const _0x3af3e=_0x15cc7d;super(),this[_0x3af3e(0xdf)]=_0xd4b162,this['_threadCommentDataSource']=_0x369b6e,this[_0x3af3e(0x121)]();}[_0x15cc7d(0x121)](){const _0x2d221e=_0x15cc7d;this[_0x2d221e(0xdf)][_0x2d221e(0xeb)]=this['_threadCommentDataSource'],this[_0x2d221e(0xdf)]['syncUpdateMutationToColla']=!0x1;}};_0x45f58a=_0x3baff4([_0x1df553(0x0,_0x4b0c43[_0x15cc7d(0x119)]),_0x1df553(0x1,_0x1b130c[_0x15cc7d(0xa2)](_0x1e7eeb))],_0x45f58a);var _0x42da57=Object[_0x15cc7d(0xfa)],_0x5427c5=Object[_0x15cc7d(0x114)],_0x3dac11=(_0x4b7cc6,_0xa6f953,_0x39e5f0)=>_0xa6f953 in _0x4b7cc6?_0x42da57(_0x4b7cc6,_0xa6f953,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x39e5f0}):_0x4b7cc6[_0xa6f953]=_0x39e5f0,_0x2f0cb7=(_0x322b85,_0x7d513,_0x12c3a9,_0x4f1fd5)=>{for(var _0x5a4416=_0x4f1fd5>0x1?void 0x0:_0x4f1fd5?_0x5427c5(_0x7d513,_0x12c3a9):_0x7d513,_0x2ce79c=_0x322b85['length']-0x1,_0x313512;_0x2ce79c>=0x0;_0x2ce79c--)(_0x313512=_0x322b85[_0x2ce79c])&&(_0x5a4416=_0x313512(_0x5a4416)||_0x5a4416);return _0x5a4416;},_0x5af9c8=(_0x211f41,_0x2e2448)=>(_0x33dcbf,_0x2b0100)=>_0x2e2448(_0x33dcbf,_0x2b0100,_0x211f41),_0x1786be=(_0x562fea,_0x281d30,_0x33a989)=>_0x3dac11(_0x562fea,typeof _0x281d30!=_0x15cc7d(0xc3)?_0x281d30+'':_0x281d30,_0x33a989);_0x4c7e66['UniverThreadCommentDataSourcePlugin']=class extends _0x1b130c['Plugin']{constructor(_0x28f362=_0x1119be,_0x93b1a7,_0x2a871b){const _0x53ceac=_0x15cc7d;super(),this[_0x53ceac(0xe1)]=_0x28f362,this[_0x53ceac(0xe3)]=_0x93b1a7,this['_configService']=_0x2a871b;const {..._0x5c6976}=_0x1b130c[_0x53ceac(0xc4)]({},_0x1119be,this['_config']);this[_0x53ceac(0xba)]['setConfig'](_0x4dd06f,_0x5c6976);}['onStarting'](){const _0x5704d9=_0x15cc7d;[[_0x1e7eeb],[_0x45f58a],[_0x4cebda]][_0x5704d9(0xaf)](_0x4137c9=>{const _0x4d52c8=_0x5704d9;this[_0x4d52c8(0xe3)][_0x4d52c8(0xbd)](_0x4137c9);});}[_0x15cc7d(0xfe)](){const _0x13e0fb=_0x15cc7d;this['_injector'][_0x13e0fb(0xde)](_0x45f58a),this[_0x13e0fb(0xe3)]['get'](_0x4cebda);}},_0x1786be(_0x4c7e66['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x150976),_0x1786be(_0x4c7e66[_0x15cc7d(0xa4)],_0x15cc7d(0xbc),_0x1b130c['UniverInstanceType'][_0x15cc7d(0xdd)]),_0x4c7e66[_0x15cc7d(0xa4)]=_0x2f0cb7([_0x1b130c[_0x15cc7d(0xa5)](_0xe14e60[_0x15cc7d(0x102)],_0x4a6ab9[_0x15cc7d(0xc9)],_0x6d5476[_0x15cc7d(0xcb)]),_0x5af9c8(0x1,_0x1b130c[_0x15cc7d(0xa2)](_0x1b130c['Injector'])),_0x5af9c8(0x2,_0x1b130c[_0x15cc7d(0x10a)])],_0x4c7e66['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x4c7e66,Symbol['toStringTag'],{'value':_0x15cc7d(0xbb)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.9.4",
3
+ "version": "0.10.0",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.9.4",
49
- "@univerjs-pro/license": "0.9.4",
50
- "@univerjs/network": "0.9.4",
48
+ "@univerjs-pro/collaboration-client": "0.10.0",
49
+ "@univerjs/core": "0.10.0",
50
+ "@univerjs-pro/license": "0.10.0",
51
51
  "@univerjs/protocol": "0.1.47-alpha.0",
52
- "@univerjs/thread-comment-ui": "0.9.4",
53
- "@univerjs/thread-comment": "0.9.4",
54
- "@univerjs/core": "0.9.4"
52
+ "@univerjs/network": "0.10.0",
53
+ "@univerjs/thread-comment": "0.10.0",
54
+ "@univerjs/thread-comment-ui": "0.10.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.8.3",
59
- "vite": "^7.0.5",
59
+ "vite": "^7.0.6",
60
60
  "vitest": "^3.2.4",
61
- "@univerjs-infra/shared": "0.9.4"
61
+ "@univerjs-infra/shared": "0.10.0"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",