@univerjs-pro/thread-comment-datasource 0.10.3-nightly.202508150623 → 0.10.4-nightly.202508220605

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x35a5ab=_0x7193;(function(_0x577646,_0x333f60){const _0x591d94=_0x7193,_0x59d24b=_0x577646();while(!![]){try{const _0x3b92b0=parseInt(_0x591d94(0xdc))/0x1*(parseInt(_0x591d94(0xd6))/0x2)+-parseInt(_0x591d94(0xa5))/0x3*(-parseInt(_0x591d94(0xf8))/0x4)+parseInt(_0x591d94(0xfd))/0x5+parseInt(_0x591d94(0xd2))/0x6+-parseInt(_0x591d94(0xe0))/0x7+parseInt(_0x591d94(0xb6))/0x8+parseInt(_0x591d94(0xa6))/0x9*(-parseInt(_0x591d94(0xd0))/0xa);if(_0x3b92b0===_0x333f60)break;else _0x59d24b['push'](_0x59d24b['shift']());}catch(_0x1807c0){_0x59d24b['push'](_0x59d24b['shift']());}}}(_0x33a0,0x86788));Object[_0x35a5ab(0x102)](exports,Symbol[_0x35a5ab(0xbc)],{'value':_0x35a5ab(0xd9)});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=_0x35a5ab(0xfa);var I=(_0x5e53f6=>(_0x5e53f6[_0x5e53f6[_0x35a5ab(0x101)]=0x0]=_0x35a5ab(0x101),_0x5e53f6[_0x5e53f6[_0x35a5ab(0x10a)]=0x1]='Solved',_0x5e53f6[_0x5e53f6[_0x35a5ab(0xf2)]=-0x1]=_0x35a5ab(0xf2),_0x5e53f6))(I||{}),v=(_0x45d326=>(_0x45d326[_0x45d326['Unknown']=0x0]=_0x35a5ab(0x107),_0x45d326[_0x45d326[_0x35a5ab(0xee)]=0x1]=_0x35a5ab(0xee),_0x45d326[_0x45d326[_0x35a5ab(0xc5)]=0x2]=_0x35a5ab(0xc5),_0x45d326[_0x45d326[_0x35a5ab(0x103)]=0x3]=_0x35a5ab(0x103),_0x45d326[_0x45d326[_0x35a5ab(0xda)]=0x4]=_0x35a5ab(0xda),_0x45d326[_0x45d326['Solve']=0x5]='Solve',_0x45d326[_0x45d326['UNRECOGNIZED']=-0x1]=_0x35a5ab(0xf2),_0x45d326))(v||{});const f=_0x4b37dd=>c[_0x35a5ab(0xc7)](new Date(+_0x4b37dd))[_0x35a5ab(0xd7)](_0x35a5ab(0x117)),R=async(_0x124d1e,_0x161c23)=>{const _0xb85fbc=_0x35a5ab,_0x3782d4=_0x124d1e[_0xb85fbc(0x112)](c[_0xb85fbc(0xa4)]),_0x3c3b6a=_0x124d1e[_0xb85fbc(0x112)](P['HTTPService']);_0x161c23[_0xb85fbc(0x100)](_0x4b3aff=>{const _0x4b3f38=_0xb85fbc;_0x3782d4[_0x4b3f38(0xbf)](_0x4b3aff)&&_0x161c23[_0x4b3f38(0x10d)](_0x4b3aff);}),_0x161c23[_0xb85fbc(0x10b)]&&(await _0x3c3b6a[_0xb85fbc(0x112)]('/universer-api/user/list',{'params':{'userIDs':[..._0x161c23]}}))[_0xb85fbc(0xcd)][_0xb85fbc(0x106)][_0xb85fbc(0x100)](_0x391b19=>{const _0x2aca40=_0xb85fbc;_0x391b19&&_0x3782d4[_0x2aca40(0xae)](_0x391b19);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x43576b,_0x209190,_0x3fe690,_0x49c5eb)=>{const _0x350c11=_0x35a5ab;for(var _0x1b2535=_0x49c5eb>0x1?void 0x0:_0x49c5eb?$(_0x209190,_0x3fe690):_0x209190,_0x36d554=_0x43576b[_0x350c11(0x110)]-0x1,_0x3ad588;_0x36d554>=0x0;_0x36d554--)(_0x3ad588=_0x43576b[_0x36d554])&&(_0x1b2535=_0x3ad588(_0x1b2535)||_0x1b2535);return _0x1b2535;},S=(_0x387ccc,_0x1ea3ad)=>(_0xe28f64,_0x35edb5)=>_0x1ea3ad(_0xe28f64,_0x35edb5,_0x387ccc);let _=class extends c[_0x35a5ab(0x119)]{constructor(_0x468c4f,_0x57c177,_0x2771b2,_0x1e23af){const _0x50e38e=_0x35a5ab;super(),this['_commentService']=_0x468c4f,this[_0x50e38e(0xa3)]=_0x57c177,this[_0x50e38e(0xb0)]=_0x2771b2,this[_0x50e38e(0xb8)]=_0x1e23af,this[_0x50e38e(0xc8)](),this[_0x50e38e(0xaa)]();}[_0x35a5ab(0xaa)](){const _0x3dab22=_0x35a5ab;this[_0x3dab22(0xe9)](this[_0x3dab22(0xa3)]['commentUpdate$'][_0x3dab22(0xbb)](j[_0x3dab22(0xf6)](0x10))['subscribe'](_0x591f42=>{const _0x509edd=_0x3dab22,_0x112502=new Set();_0x591f42[_0x509edd(0x100)](_0x42089c=>{const _0x553d4d=_0x509edd;switch(_0x42089c[_0x553d4d(0xf0)]){case _0x553d4d(0xaf):{const _0x5c08e3=_0x42089c[_0x553d4d(0xf3)]['personId'];_0x112502['add'](_0x5c08e3);break;}}}),R(this[_0x509edd(0xb8)],_0x112502);}));}[_0x35a5ab(0xc8)](){const _0x244c17=_0x35a5ab;this['disposeWithMe'](this[_0x244c17(0x118)][_0x244c17(0x10f)][_0x244c17(0xb7)](async _0x271c8c=>{const _0x45843c=_0x244c17;var _0x74a57e,_0x242e39,_0x14e9ab,_0x20fde0;const _0x2976fb=(_0x74a57e=this[_0x45843c(0xa3)][_0x45843c(0xc9)](_0x271c8c[_0x45843c(0x109)])[_0x45843c(0x114)](_0x3492d7=>_0x3492d7[_0x45843c(0xcf)]===_0x271c8c['threadId']))==null?void 0x0:_0x74a57e[_0x45843c(0xf5)];if(!_0x2976fb)return;const {unitId:_0x1461e8,subUnitId:_0x8af43f}=_0x2976fb;switch(_0x271c8c[_0x45843c(0xfb)]&&this[_0x45843c(0xb0)]['addUser'](_0x271c8c[_0x45843c(0xfb)]),_0x271c8c[_0x45843c(0xf0)]){case v[_0x45843c(0xee)]:break;case v[_0x45843c(0xc5)]:{this[_0x45843c(0xa3)][_0x45843c(0xe3)](_0x1461e8,_0x8af43f,{'unitId':_0x1461e8,'subUnitId':_0x8af43f,'ref':'','id':_0x271c8c[_0x45843c(0xf7)],'dT':f(+_0x271c8c[_0x45843c(0xed)]),'threadId':_0x271c8c['threadId'],'personId':(_0x14e9ab=(_0x242e39=_0x271c8c['user'])==null?void 0x0:_0x242e39['userID'])!=null?_0x14e9ab:_0x271c8c[_0x45843c(0xc4)],'text':JSON[_0x45843c(0xff)](_0x271c8c['content']),'parentId':_0x2976fb['id']});break;}case v[_0x45843c(0xda)]:{const _0xa3156e=this['_threadCommentModel'][_0x45843c(0x10c)](_0x1461e8,_0x8af43f,_0x271c8c[_0x45843c(0xf7)]);_0xa3156e&&_0xa3156e[_0x45843c(0xd3)]&&this[_0x45843c(0xa3)][_0x45843c(0x108)](_0x1461e8,_0x8af43f,_0x271c8c['replyId']);break;}case v[_0x45843c(0x103)]:{this['_threadCommentModel']['updateComment'](_0x1461e8,_0x8af43f,{'commentId':_0x271c8c[_0x45843c(0xf7)],'text':JSON[_0x45843c(0xff)](_0x271c8c[_0x45843c(0x104)])});break;}case v['Solve']:{const _0x1732e1=(_0x20fde0=this[_0x45843c(0xa3)][_0x45843c(0xc9)](_0x271c8c[_0x45843c(0x109)])['find'](_0x2b83e8=>_0x2b83e8[_0x45843c(0xcf)]===_0x271c8c[_0x45843c(0xcf)]))==null?void 0x0:_0x20fde0['root'];_0x1732e1&&this[_0x45843c(0xa3)][_0x45843c(0xd8)](_0x1461e8,_0x8af43f,_0x1732e1['id'],_0x271c8c[_0x45843c(0xfc)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x35a5ab(0xd1)](b[_0x35a5ab(0xad)])),S(0x1,c[_0x35a5ab(0xd1)](M[_0x35a5ab(0xde)])),S(0x2,c['Inject'](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x35a5ab(0xbe)]))],_);const q=_0x35a5ab(0xb2),D={};var A=Object[_0x35a5ab(0xb3)],x=(_0xc77cb2,_0x2a9c77,_0x594138,_0x3fe1f0)=>{const _0x402de4=_0x35a5ab;for(var _0x4479a0=_0x3fe1f0>0x1?void 0x0:_0x3fe1f0?A(_0x2a9c77,_0x594138):_0x2a9c77,_0x26b670=_0xc77cb2[_0x402de4(0x110)]-0x1,_0x5bbb83;_0x26b670>=0x0;_0x26b670--)(_0x5bbb83=_0xc77cb2[_0x26b670])&&(_0x4479a0=_0x5bbb83(_0x4479a0)||_0x4479a0);return _0x4479a0;},C=(_0x195134,_0x420826)=>(_0x5d1143,_0x26bffd)=>_0x420826(_0x5d1143,_0x26bffd,_0x195134);function _0x33a0(){const _0x122e8e=['commentUpdate$','length','merge','get','UniverCollaborationClientPlugin','find','UNIVER_UNKNOWN','requireSession','YYYY/MM/DD\x20HH:mm','_commentService','Disposable','DependentOn','_threadCommentDataSource','_threadCommentModel','UserManagerService','531EwCzXH','353367YVSRAA','userID','symbol','_sessionService','_initUserSync','getCurrentUser','code','CommentService','addUser','add','_userService','_configService','thread-comment-data-source.config','getOwnPropertyDescriptor','map','stringify','3885352qOwwrV','subscribe','_injector','reply','onStarting','pipe','toStringTag','_threadCommentDataSourceService','Injector','getUser','slice','resolved','values','COMMENT','userId','Reply','replies','dayjs','_init','getUnit','syncUpdateMutationToColla','post','IConfigService','body','CustomRangeType','threadId','120tMPMzD','Inject','1778646yItcMr','parentId','rangeId','HTTPService','33290SZPyDj','format','resolveComment','Module','Delete','error','6RSUOBH','comment','ThreadCommentModel','CollaborationSessionService','5824028YpPhwa','pluginName','/solved','addComment','filter','_httpService','UniverThreadCommentDataSourcePlugin','_initDataSource','UniverThreadCommentUIPlugin','disposeWithMe','IThreadCommentDataSourceService','rangeType','saveCommentToSnapshot','createTimestamp','Add','/add','type','dataSource','UNRECOGNIZED','payload','/edit','root','bufferTime','replyId','2872ecJKdx','/universer-api/comment/unit/','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','user','solved','4224430VtSLYx','/reply','parse','forEach','OpenOrReOpen','defineProperty','Edit','content','listComments','users','Unknown','deleteComment','unitId','Solved','size','getComment','delete','setConfig'];_0x33a0=function(){return _0x122e8e;};return _0x33a0();}function Y(_0x255075,_0x445970){const _0x2d5265=_0x35a5ab,_0xe9ff8=_0x255075[_0x2d5265(0xc6)][0x0];return{..._0x445970,'id':_0xe9ff8['replyId'],'resolved':_0x255075[_0x2d5265(0xfc)]===0x1,'dT':f(_0xe9ff8[_0x2d5265(0xed)]),'personId':_0xe9ff8[_0x2d5265(0xc4)],'threadId':_0xe9ff8[_0x2d5265(0xcf)]};}function G(_0x3711bc,_0x87f31c,_0x4e87e6){const _0x44634a=_0x35a5ab;var _0x22ab5c,_0x95e655;if(((_0x95e655=(_0x22ab5c=_0x3711bc==null?void 0x0:_0x3711bc[_0x44634a(0xc6)])==null?void 0x0:_0x22ab5c[_0x44634a(0x110)])!=null?_0x95e655:0x0)>0x0){const _0x48e6aa=(_0x495104,_0x367140)=>({'id':_0x495104[_0x44634a(0xf7)],'threadId':_0x495104['threadId'],'dT':f(_0x495104[_0x44634a(0xed)]),'personId':_0x495104['userId'],'resolved':_0x3711bc[_0x44634a(0xfc)]===I[_0x44634a(0x10a)],'unitId':_0x87f31c,'subUnitId':_0x4e87e6,'text':JSON[_0x44634a(0xff)](_0x495104['content']),'parentId':_0x367140}),_0x259d66=_0x48e6aa(_0x3711bc[_0x44634a(0xc6)][0x0]);return{..._0x259d66,'children':_0x3711bc['replies'][_0x44634a(0xc0)](0x1)['map'](_0xd7edc9=>_0x48e6aa(_0xd7edc9,_0x259d66['id']))};}return null;}let p=class{constructor(_0x21e3d5,_0xd8de2c,_0x3032c7){const _0x37717d=_0x35a5ab;this[_0x37717d(0xe5)]=_0x21e3d5,this[_0x37717d(0xb0)]=_0xd8de2c,this[_0x37717d(0xa9)]=_0x3032c7;}async['addComment'](_0x5877c5){const _0x1cd50e=_0x35a5ab;var _0x30a0c,_0x5e858a;const {parentId:_0x2bda05,unitId:_0x159b35,text:_0x4122fc,threadId:_0x346d17}=_0x5877c5,_0x95a6e1=(_0x5e858a=(_0x30a0c=_0x4122fc['customRanges'])==null?void 0x0:_0x30a0c[_0x1cd50e(0xe4)](_0x1eb91d=>_0x1eb91d[_0x1cd50e(0xeb)]===c['CustomRangeType'][_0x1cd50e(0xc3)])[_0x1cd50e(0xb4)](_0x1b5915=>_0x1b5915[_0x1cd50e(0xd4)]))!=null?_0x5e858a:[],_0x2240ae=JSON['stringify'](_0x4122fc),_0x3e1971=(await this[_0x1cd50e(0xa9)][_0x1cd50e(0x116)](_0x159b35))['getMemberID']();if(_0x2bda05){const _0x481e06={'memberId':_0x3e1971,'unitId':_0x159b35,'content':_0x2240ae,'mention':_0x95a6e1,'threadId':_0x346d17},_0xc39e14=(await this[_0x1cd50e(0xe5)][_0x1cd50e(0xcb)](_0x1cd50e(0xf9)+_0x159b35+_0x1cd50e(0xfe),{'body':_0x481e06}))[_0x1cd50e(0xcd)][_0x1cd50e(0xb9)];return{..._0x5877c5,'id':_0xc39e14[_0x1cd50e(0xf7)],'dT':c['dayjs'](+_0xc39e14[_0x1cd50e(0xed)])[_0x1cd50e(0xd7)](_0x1cd50e(0x117)),'personId':_0xc39e14[_0x1cd50e(0xc4)]};}else{const _0x165d3a={'memberId':_0x3e1971,'unitId':_0x159b35,'content':_0x2240ae,'mention':_0x95a6e1},_0x3810ee=await this[_0x1cd50e(0xe5)][_0x1cd50e(0xcb)](_0x1cd50e(0xf9)+_0x159b35+_0x1cd50e(0xef),{'body':_0x165d3a});return Y(_0x3810ee[_0x1cd50e(0xcd)][_0x1cd50e(0xdd)],_0x5877c5);}}async['updateComment'](_0x221d6b){const _0x209a1a=_0x35a5ab;var _0x3cc631,_0x3db8e0;const {text:_0x3be8a6,unitId:_0x5a8f50}=_0x221d6b,_0x5cc058=(_0x3db8e0=(_0x3cc631=_0x3be8a6['customRanges'])==null?void 0x0:_0x3cc631[_0x209a1a(0xe4)](_0x780ae4=>_0x780ae4[_0x209a1a(0xeb)]===c[_0x209a1a(0xce)][_0x209a1a(0xc3)])[_0x209a1a(0xb4)](_0x72502f=>_0x72502f['rangeId']))!=null?_0x3db8e0:[],_0x2818d0=JSON[_0x209a1a(0xb5)](_0x3be8a6),_0x58a3db=_0x221d6b[_0x209a1a(0xcf)],_0x168ab8=_0x221d6b['id'],_0x204976={'memberId':(await this[_0x209a1a(0xa9)][_0x209a1a(0x116)](_0x5a8f50))['getMemberID'](),'unitId':_0x5a8f50,'threadId':_0x58a3db,'mention':_0x5cc058,'content':_0x2818d0,'replyId':_0x168ab8},_0x27278e=await this[_0x209a1a(0xe5)][_0x209a1a(0xcb)](_0x209a1a(0xf9)+_0x5a8f50+_0x209a1a(0xf4),{'body':_0x204976});return!_0x27278e[_0x209a1a(0xcd)][_0x209a1a(0xdb)]||_0x27278e['body'][_0x209a1a(0xdb)][_0x209a1a(0xac)]===0x1;}async[_0x35a5ab(0xd8)](_0x3cd459){const _0x143fae=_0x35a5ab,{unitId:_0x3a830a}=_0x3cd459,_0x375696=_0x3cd459['threadId'],_0x2bde59={'memberId':this[_0x143fae(0xb0)][_0x143fae(0xab)]()[_0x143fae(0xa7)],'unitId':_0x3a830a,'threadId':_0x375696,'solved':_0x3cd459[_0x143fae(0xc1)]?I[_0x143fae(0x10a)]:I['OpenOrReOpen']},_0x37ebce=await this['_httpService'][_0x143fae(0xcb)](_0x143fae(0xf9)+_0x3a830a+_0x143fae(0xe2),{'body':_0x2bde59});return!_0x37ebce[_0x143fae(0xcd)]['error']||_0x37ebce[_0x143fae(0xcd)][_0x143fae(0xdb)]['code']===0x1;}async['deleteComment'](_0x48c307,_0x3cc5d5,_0x32d8f2,_0x5d6b5e){const _0x220eb0=_0x35a5ab,_0x2b7aff={'memberId':(await this[_0x220eb0(0xa9)][_0x220eb0(0x116)](_0x48c307))['getMemberID'](),'threadId':_0x32d8f2,'replyId':_0x5d6b5e,'unitId':_0x48c307},_0xf7d648=await this[_0x220eb0(0xe5)][_0x220eb0(0xcb)](_0x220eb0(0xf9)+_0x48c307+'/delete',{'body':_0x2b7aff});return!_0xf7d648[_0x220eb0(0xcd)][_0x220eb0(0xdb)]||_0xf7d648[_0x220eb0(0xcd)]['error']['code']===0x1;}async[_0x35a5ab(0x105)](_0xe46b2d,_0x27482d,_0x2816a0){const _0x21a80b=_0x35a5ab,_0x50292={'unitId':_0xe46b2d,'threadId':_0x2816a0},_0x17c87e=await this['_httpService'][_0x21a80b(0xcb)](_0x21a80b(0xf9)+_0xe46b2d+'/list',{'body':_0x50292}),_0x56e53c=_0x2816a0[_0x21a80b(0xb4)](_0x15c3f1=>G(_0x17c87e[_0x21a80b(0xcd)]['comments'][_0x15c3f1],_0xe46b2d,_0x27482d))['filter'](Boolean);return Object[_0x21a80b(0xc2)](_0x17c87e[_0x21a80b(0xcd)][_0x21a80b(0x106)])[_0x21a80b(0x100)](_0x3507b0=>{const _0x16fb8e=_0x21a80b;this['_userService'][_0x16fb8e(0xae)](_0x3507b0);}),_0x56e53c;}[_0x35a5ab(0xec)](_0x3fafc3){const _0x493ee9=_0x35a5ab;return{'id':_0x3fafc3['id'],'threadId':_0x3fafc3[_0x493ee9(0xcf)],'ref':_0x3fafc3['ref']};}};p=x([C(0x0,c[_0x35a5ab(0xd1)](P[_0x35a5ab(0xd5)])),C(0x1,c['Inject'](c[_0x35a5ab(0xa4)])),C(0x2,c['Inject'](b[_0x35a5ab(0xdf)]))],p);var H=Object[_0x35a5ab(0xb3)],J=(_0x3e456f,_0x5dda8d,_0x39c102,_0x5857b0)=>{const _0x2c7a32=_0x35a5ab;for(var _0x307802=_0x5857b0>0x1?void 0x0:_0x5857b0?H(_0x5dda8d,_0x39c102):_0x5dda8d,_0x4b3619=_0x3e456f[_0x2c7a32(0x110)]-0x1,_0x2df532;_0x4b3619>=0x0;_0x4b3619--)(_0x2df532=_0x3e456f[_0x4b3619])&&(_0x307802=_0x2df532(_0x307802)||_0x307802);return _0x307802;},y=(_0x33cf02,_0x7268aa)=>(_0x2091e2,_0x226f5)=>_0x7268aa(_0x2091e2,_0x226f5,_0x33cf02);function _0x7193(_0x21d612,_0x5b4dc3){const _0x33a074=_0x33a0();return _0x7193=function(_0x719345,_0x4d9a49){_0x719345=_0x719345-0xa1;let _0x4e328a=_0x33a074[_0x719345];return _0x4e328a;},_0x7193(_0x21d612,_0x5b4dc3);}let g=class extends c[_0x35a5ab(0x119)]{constructor(_0x14840c,_0xde0d3b){const _0x5427c6=_0x35a5ab;super(),this[_0x5427c6(0xbd)]=_0x14840c,this[_0x5427c6(0xa2)]=_0xde0d3b,this[_0x5427c6(0xe7)]();}[_0x35a5ab(0xe7)](){const _0x5adaf3=_0x35a5ab;this[_0x5adaf3(0xbd)][_0x5adaf3(0xf1)]=this[_0x5adaf3(0xa2)],this['_threadCommentDataSourceService'][_0x5adaf3(0xca)]=!0x1;}};g=J([y(0x0,M[_0x35a5ab(0xea)]),y(0x1,c[_0x35a5ab(0xd1)](p))],g);var F=Object[_0x35a5ab(0x102)],L=Object[_0x35a5ab(0xb3)],Z=(_0x10b622,_0x2a6a1f,_0x483a20)=>_0x2a6a1f in _0x10b622?F(_0x10b622,_0x2a6a1f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x483a20}):_0x10b622[_0x2a6a1f]=_0x483a20,W=(_0xe2e451,_0x3275d2,_0x1bd4c2,_0x566d27)=>{const _0x43aaf6=_0x35a5ab;for(var _0x1f8cba=_0x566d27>0x1?void 0x0:_0x566d27?L(_0x3275d2,_0x1bd4c2):_0x3275d2,_0x354c49=_0xe2e451[_0x43aaf6(0x110)]-0x1,_0xf019e6;_0x354c49>=0x0;_0x354c49--)(_0xf019e6=_0xe2e451[_0x354c49])&&(_0x1f8cba=_0xf019e6(_0x1f8cba)||_0x1f8cba);return _0x1f8cba;},O=(_0x556259,_0x22386b)=>(_0x3d3c31,_0x5c9538)=>_0x22386b(_0x3d3c31,_0x5c9538,_0x556259),N=(_0x2845ab,_0x5dd455,_0x4cdc24)=>Z(_0x2845ab,typeof _0x5dd455!=_0x35a5ab(0xa8)?_0x5dd455+'':_0x5dd455,_0x4cdc24);exports[_0x35a5ab(0xe6)]=class extends c['Plugin']{constructor(_0x574cc3=D,_0x372eab,_0x4a7e7a){const _0x3d5e90=_0x35a5ab;super(),this['_config']=_0x574cc3,this[_0x3d5e90(0xb8)]=_0x372eab,this[_0x3d5e90(0xb1)]=_0x4a7e7a;const {..._0x2a5abd}=c[_0x3d5e90(0x111)]({},D,this['_config']);this['_configService'][_0x3d5e90(0x10e)](q,_0x2a5abd);}[_0x35a5ab(0xba)](){const _0x544ffa=_0x35a5ab;[[p],[g],[_]][_0x544ffa(0x100)](_0xd952d3=>{this['_injector']['add'](_0xd952d3);});}['onReady'](){const _0xa24a74=_0x35a5ab;this[_0xa24a74(0xb8)][_0xa24a74(0x112)](g),this[_0xa24a74(0xb8)]['get'](_);}},N(exports[_0x35a5ab(0xe6)],_0x35a5ab(0xe1),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x35a5ab(0xf0),c['UniverInstanceType'][_0x35a5ab(0x115)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x35a5ab(0xa1)](w[_0x35a5ab(0xe8)],b[_0x35a5ab(0x113)],T['UniverLicensePlugin']),O(0x1,c[_0x35a5ab(0xd1)](c[_0x35a5ab(0xbe)])),O(0x2,c[_0x35a5ab(0xcc)])],exports[_0x35a5ab(0xe6)]);
1
+ 'use strict';const _0x3fafe0=_0x295b;(function(_0x2c28b4,_0x382d9e){const _0x5707b2=_0x295b,_0x17def3=_0x2c28b4();while(!![]){try{const _0x242479=-parseInt(_0x5707b2(0x1b9))/0x1+-parseInt(_0x5707b2(0x1e9))/0x2+parseInt(_0x5707b2(0x18e))/0x3*(parseInt(_0x5707b2(0x194))/0x4)+parseInt(_0x5707b2(0x1d3))/0x5+parseInt(_0x5707b2(0x1b6))/0x6+-parseInt(_0x5707b2(0x1c8))/0x7*(-parseInt(_0x5707b2(0x1d5))/0x8)+parseInt(_0x5707b2(0x1ba))/0x9;if(_0x242479===_0x382d9e)break;else _0x17def3['push'](_0x17def3['shift']());}catch(_0x4bb79b){_0x17def3['push'](_0x17def3['shift']());}}}(_0x56a5,0xc3136));Object[_0x3fafe0(0x1a7)](exports,Symbol[_0x3fafe0(0x1b7)],{'value':_0x3fafe0(0x1e5)});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='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x282c4e=>(_0x282c4e[_0x282c4e[_0x3fafe0(0x1b4)]=0x0]=_0x3fafe0(0x1b4),_0x282c4e[_0x282c4e['Solved']=0x1]=_0x3fafe0(0x1d4),_0x282c4e[_0x282c4e[_0x3fafe0(0x19e)]=-0x1]=_0x3fafe0(0x19e),_0x282c4e))(I||{}),v=(_0x2f0c2a=>(_0x2f0c2a[_0x2f0c2a[_0x3fafe0(0x1cd)]=0x0]=_0x3fafe0(0x1cd),_0x2f0c2a[_0x2f0c2a[_0x3fafe0(0x1e6)]=0x1]=_0x3fafe0(0x1e6),_0x2f0c2a[_0x2f0c2a['Reply']=0x2]=_0x3fafe0(0x1d8),_0x2f0c2a[_0x2f0c2a[_0x3fafe0(0x1ea)]=0x3]=_0x3fafe0(0x1ea),_0x2f0c2a[_0x2f0c2a[_0x3fafe0(0x1da)]=0x4]=_0x3fafe0(0x1da),_0x2f0c2a[_0x2f0c2a[_0x3fafe0(0x1a6)]=0x5]=_0x3fafe0(0x1a6),_0x2f0c2a[_0x2f0c2a[_0x3fafe0(0x19e)]=-0x1]='UNRECOGNIZED',_0x2f0c2a))(v||{});const f=_0x393d6b=>c[_0x3fafe0(0x1a8)](new Date(+_0x393d6b))[_0x3fafe0(0x185)](_0x3fafe0(0x1a9)),R=async(_0x5a65f7,_0x3bfb3c)=>{const _0xdafb73=_0x3fafe0,_0xfec1ee=_0x5a65f7[_0xdafb73(0x1bc)](c[_0xdafb73(0x17c)]),_0x3d266c=_0x5a65f7['get'](P[_0xdafb73(0x181)]);_0x3bfb3c['forEach'](_0x121550=>{const _0x37345e=_0xdafb73;_0xfec1ee[_0x37345e(0x1a4)](_0x121550)&&_0x3bfb3c['delete'](_0x121550);}),_0x3bfb3c[_0xdafb73(0x19f)]&&(await _0x3d266c[_0xdafb73(0x1bc)](_0xdafb73(0x193),{'params':{'userIDs':[..._0x3bfb3c]}}))[_0xdafb73(0x17a)]['users'][_0xdafb73(0x1d7)](_0x4ad8fd=>{const _0x468c78=_0xdafb73;_0x4ad8fd&&_0xfec1ee[_0x468c78(0x192)](_0x4ad8fd);});};var $=Object[_0x3fafe0(0x1e2)],E=(_0x59b83c,_0x56834a,_0x12cea9,_0x58235a)=>{const _0x58869e=_0x3fafe0;for(var _0x30de6a=_0x58235a>0x1?void 0x0:_0x58235a?$(_0x56834a,_0x12cea9):_0x56834a,_0x451aaf=_0x59b83c[_0x58869e(0x1bd)]-0x1,_0x42aa75;_0x451aaf>=0x0;_0x451aaf--)(_0x42aa75=_0x59b83c[_0x451aaf])&&(_0x30de6a=_0x42aa75(_0x30de6a)||_0x30de6a);return _0x30de6a;},S=(_0x21b7f4,_0x1f84e3)=>(_0x122d24,_0x2bfe62)=>_0x1f84e3(_0x122d24,_0x2bfe62,_0x21b7f4);let _=class extends c[_0x3fafe0(0x1a1)]{constructor(_0x1bfe28,_0x478531,_0x360e64,_0x428baf){const _0x4ba993=_0x3fafe0;super(),this[_0x4ba993(0x1eb)]=_0x1bfe28,this[_0x4ba993(0x180)]=_0x478531,this[_0x4ba993(0x1c5)]=_0x360e64,this[_0x4ba993(0x191)]=_0x428baf,this['_init'](),this[_0x4ba993(0x1df)]();}[_0x3fafe0(0x1df)](){const _0x208aa9=_0x3fafe0;this['disposeWithMe'](this[_0x208aa9(0x180)][_0x208aa9(0x1b8)]['pipe'](j[_0x208aa9(0x1e7)](0x10))[_0x208aa9(0x17b)](_0x44d6f8=>{const _0x589dc0=_0x208aa9,_0x2d404d=new Set();_0x44d6f8[_0x589dc0(0x1d7)](_0x340549=>{const _0x4e3968=_0x589dc0;switch(_0x340549[_0x4e3968(0x1ad)]){case'add':{const _0x4ab7f4=_0x340549[_0x4e3968(0x179)][_0x4e3968(0x19c)];_0x2d404d[_0x4e3968(0x17d)](_0x4ab7f4);break;}}}),R(this[_0x589dc0(0x191)],_0x2d404d);}));}[_0x3fafe0(0x1d6)](){const _0x221b77=_0x3fafe0;this[_0x221b77(0x1d0)](this['_commentService'][_0x221b77(0x1b8)][_0x221b77(0x17b)](async _0x3722ad=>{const _0x21934f=_0x221b77;var _0x42a7c5,_0x15e9db,_0x28962d,_0x10cfed;const _0x2cab58=(_0x42a7c5=this[_0x21934f(0x180)][_0x21934f(0x183)](_0x3722ad[_0x21934f(0x1de)])[_0x21934f(0x18f)](_0xea3a71=>_0xea3a71[_0x21934f(0x17f)]===_0x3722ad[_0x21934f(0x17f)]))==null?void 0x0:_0x42a7c5[_0x21934f(0x178)];if(!_0x2cab58)return;const {unitId:_0x3e87ad,subUnitId:_0x7fd547}=_0x2cab58;switch(_0x3722ad[_0x21934f(0x1ee)]&&this[_0x21934f(0x1c5)][_0x21934f(0x192)](_0x3722ad[_0x21934f(0x1ee)]),_0x3722ad[_0x21934f(0x1ad)]){case v['Add']:break;case v[_0x21934f(0x1d8)]:{this[_0x21934f(0x180)]['addComment'](_0x3e87ad,_0x7fd547,{'unitId':_0x3e87ad,'subUnitId':_0x7fd547,'ref':'','id':_0x3722ad[_0x21934f(0x1b5)],'dT':f(+_0x3722ad[_0x21934f(0x1e0)]),'threadId':_0x3722ad[_0x21934f(0x17f)],'personId':(_0x28962d=(_0x15e9db=_0x3722ad[_0x21934f(0x1ee)])==null?void 0x0:_0x15e9db[_0x21934f(0x1ce)])!=null?_0x28962d:_0x3722ad[_0x21934f(0x1a5)],'text':JSON[_0x21934f(0x198)](_0x3722ad[_0x21934f(0x19b)]),'parentId':_0x2cab58['id']});break;}case v[_0x21934f(0x1da)]:{const _0x1dc37a=this['_threadCommentModel']['getComment'](_0x3e87ad,_0x7fd547,_0x3722ad[_0x21934f(0x1b5)]);_0x1dc37a&&_0x1dc37a[_0x21934f(0x195)]&&this['_threadCommentModel'][_0x21934f(0x199)](_0x3e87ad,_0x7fd547,_0x3722ad['replyId']);break;}case v['Edit']:{this[_0x21934f(0x180)][_0x21934f(0x1af)](_0x3e87ad,_0x7fd547,{'commentId':_0x3722ad[_0x21934f(0x1b5)],'text':JSON[_0x21934f(0x198)](_0x3722ad[_0x21934f(0x19b)])});break;}case v[_0x21934f(0x1a6)]:{const _0x1aa43c=(_0x10cfed=this[_0x21934f(0x180)][_0x21934f(0x183)](_0x3722ad['unitId'])[_0x21934f(0x18f)](_0x45134c=>_0x45134c[_0x21934f(0x17f)]===_0x3722ad[_0x21934f(0x17f)]))==null?void 0x0:_0x10cfed[_0x21934f(0x178)];_0x1aa43c&&this[_0x21934f(0x180)]['resolveComment'](_0x3e87ad,_0x7fd547,_0x1aa43c['id'],_0x3722ad[_0x21934f(0x1b0)]===I[_0x21934f(0x1d4)]);break;}}}));}};_=E([S(0x0,c[_0x3fafe0(0x1cb)](b[_0x3fafe0(0x1c6)])),S(0x1,c[_0x3fafe0(0x1cb)](M[_0x3fafe0(0x1e1)])),S(0x2,c['Inject'](c[_0x3fafe0(0x17c)])),S(0x3,c[_0x3fafe0(0x1cb)](c[_0x3fafe0(0x176)]))],_);const q=_0x3fafe0(0x187),D={};function _0x56a5(){const _0xee0480=['_initUserSync','createTimestamp','ThreadCommentModel','getOwnPropertyDescriptor','DependentOn','UniverThreadCommentDataSourcePlugin','Module','Add','bufferTime','_configService','2650870gSNTQU','Edit','_commentService','filter','error','user','UniverCollaborationClientPlugin','Injector','COMMENT','root','payload','body','subscribe','UserManagerService','add','/list','threadId','_threadCommentModel','HTTPService','pluginName','getUnit','customRanges','format','users','thread-comment-data-source.config','rangeId','post','Plugin','stringify','resolved','map','451587GrksTE','find','listComments','_injector','addUser','/universer-api/user/list','4HLMyQx','parentId','_sessionService','_threadCommentDataSourceService','parse','deleteComment','/universer-api/comment/unit/','content','personId','/edit','UNRECOGNIZED','size','IConfigService','Disposable','syncUpdateMutationToColla','replies','getUser','userId','Solve','defineProperty','dayjs','YYYY/MM/DD\x20HH:mm','CollaborationSessionService','_config','resolveComment','type','getMemberID','updateComment','solved','UNIVER_UNKNOWN','ref','CustomRangeType','OpenOrReOpen','replyId','1908426kKyWpG','toStringTag','commentUpdate$','568594YVYCey','10070739ijQEwz','code','get','length','rangeType','dataSource','_httpService','UniverLicensePlugin','UniverThreadCommentUIPlugin','requireSession','setConfig','_userService','CommentService','onReady','6433861jVPPwE','values','onStarting','Inject','/add','Unknown','userID','/solved','disposeWithMe','_threadCommentDataSource','comment','931825iDZRqY','Solved','8kTLwIb','_init','forEach','Reply','_initDataSource','Delete','/delete','slice','reply','unitId'];_0x56a5=function(){return _0xee0480;};return _0x56a5();}var A=Object['getOwnPropertyDescriptor'],x=(_0x4e8f0d,_0x443d5f,_0x103f62,_0x55961e)=>{const _0xc1c64e=_0x3fafe0;for(var _0x52e6be=_0x55961e>0x1?void 0x0:_0x55961e?A(_0x443d5f,_0x103f62):_0x443d5f,_0x52b791=_0x4e8f0d[_0xc1c64e(0x1bd)]-0x1,_0x10f093;_0x52b791>=0x0;_0x52b791--)(_0x10f093=_0x4e8f0d[_0x52b791])&&(_0x52e6be=_0x10f093(_0x52e6be)||_0x52e6be);return _0x52e6be;},C=(_0x38b39a,_0x253735)=>(_0x51e89b,_0x44ac82)=>_0x253735(_0x51e89b,_0x44ac82,_0x38b39a);function _0x295b(_0x188400,_0x2ef208){const _0x56a58d=_0x56a5();return _0x295b=function(_0x295bdc,_0x5d40d6){_0x295bdc=_0x295bdc-0x175;let _0x1e6539=_0x56a58d[_0x295bdc];return _0x1e6539;},_0x295b(_0x188400,_0x2ef208);}function Y(_0x3ec974,_0x16eda6){const _0x1a09cd=_0x3fafe0,_0x3a421c=_0x3ec974[_0x1a09cd(0x1a3)][0x0];return{..._0x16eda6,'id':_0x3a421c[_0x1a09cd(0x1b5)],'resolved':_0x3ec974[_0x1a09cd(0x1b0)]===0x1,'dT':f(_0x3a421c[_0x1a09cd(0x1e0)]),'personId':_0x3a421c[_0x1a09cd(0x1a5)],'threadId':_0x3a421c[_0x1a09cd(0x17f)]};}function G(_0x331602,_0x3f40b6,_0x4ac7cc){const _0x33898b=_0x3fafe0;var _0x1c676c,_0x4bf4a6;if(((_0x4bf4a6=(_0x1c676c=_0x331602==null?void 0x0:_0x331602['replies'])==null?void 0x0:_0x1c676c[_0x33898b(0x1bd)])!=null?_0x4bf4a6:0x0)>0x0){const _0x101624=(_0x239806,_0x2c21c4)=>({'id':_0x239806[_0x33898b(0x1b5)],'threadId':_0x239806[_0x33898b(0x17f)],'dT':f(_0x239806['createTimestamp']),'personId':_0x239806['userId'],'resolved':_0x331602[_0x33898b(0x1b0)]===I[_0x33898b(0x1d4)],'unitId':_0x3f40b6,'subUnitId':_0x4ac7cc,'text':JSON['parse'](_0x239806[_0x33898b(0x19b)]),'parentId':_0x2c21c4}),_0x31e97a=_0x101624(_0x331602[_0x33898b(0x1a3)][0x0]);return{..._0x31e97a,'children':_0x331602[_0x33898b(0x1a3)][_0x33898b(0x1dc)](0x1)['map'](_0x31ace0=>_0x101624(_0x31ace0,_0x31e97a['id']))};}return null;}let p=class{constructor(_0x41bd64,_0x57138f,_0x4d1fff){const _0x409351=_0x3fafe0;this['_httpService']=_0x41bd64,this[_0x409351(0x1c5)]=_0x57138f,this[_0x409351(0x196)]=_0x4d1fff;}async['addComment'](_0x1c9077){const _0x440be9=_0x3fafe0;var _0x22c022,_0x308f5b;const {parentId:_0x2425fe,unitId:_0x3e5398,text:_0x3a8be5,threadId:_0x3ff4b0}=_0x1c9077,_0x339da3=(_0x308f5b=(_0x22c022=_0x3a8be5['customRanges'])==null?void 0x0:_0x22c022[_0x440be9(0x1ec)](_0x208941=>_0x208941[_0x440be9(0x1be)]===c[_0x440be9(0x1b3)][_0x440be9(0x177)])['map'](_0x591b61=>_0x591b61[_0x440be9(0x188)]))!=null?_0x308f5b:[],_0x47e232=JSON[_0x440be9(0x18b)](_0x3a8be5),_0x2b9fe1=(await this[_0x440be9(0x196)][_0x440be9(0x1c3)](_0x3e5398))['getMemberID']();if(_0x2425fe){const _0xc1c44a={'memberId':_0x2b9fe1,'unitId':_0x3e5398,'content':_0x47e232,'mention':_0x339da3,'threadId':_0x3ff4b0},_0x28a702=(await this[_0x440be9(0x1c0)][_0x440be9(0x189)]('/universer-api/comment/unit/'+_0x3e5398+'/reply',{'body':_0xc1c44a}))[_0x440be9(0x17a)][_0x440be9(0x1dd)];return{..._0x1c9077,'id':_0x28a702[_0x440be9(0x1b5)],'dT':c[_0x440be9(0x1a8)](+_0x28a702['createTimestamp'])[_0x440be9(0x185)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x28a702[_0x440be9(0x1a5)]};}else{const _0x42fc3e={'memberId':_0x2b9fe1,'unitId':_0x3e5398,'content':_0x47e232,'mention':_0x339da3},_0x2b514a=await this[_0x440be9(0x1c0)][_0x440be9(0x189)]('/universer-api/comment/unit/'+_0x3e5398+_0x440be9(0x1cc),{'body':_0x42fc3e});return Y(_0x2b514a[_0x440be9(0x17a)][_0x440be9(0x1d2)],_0x1c9077);}}async['updateComment'](_0x97306a){const _0x217b6c=_0x3fafe0;var _0x51fd86,_0x47ab0a;const {text:_0xef1125,unitId:_0x1f5cf1}=_0x97306a,_0x441e43=(_0x47ab0a=(_0x51fd86=_0xef1125[_0x217b6c(0x184)])==null?void 0x0:_0x51fd86['filter'](_0x453290=>_0x453290['rangeType']===c[_0x217b6c(0x1b3)]['COMMENT'])[_0x217b6c(0x18d)](_0x1d0ec9=>_0x1d0ec9[_0x217b6c(0x188)]))!=null?_0x47ab0a:[],_0x5c0966=JSON[_0x217b6c(0x18b)](_0xef1125),_0x2628ec=_0x97306a[_0x217b6c(0x17f)],_0x3fe3e=_0x97306a['id'],_0x519462={'memberId':(await this[_0x217b6c(0x196)][_0x217b6c(0x1c3)](_0x1f5cf1))[_0x217b6c(0x1ae)](),'unitId':_0x1f5cf1,'threadId':_0x2628ec,'mention':_0x441e43,'content':_0x5c0966,'replyId':_0x3fe3e},_0x5b5200=await this[_0x217b6c(0x1c0)][_0x217b6c(0x189)](_0x217b6c(0x19a)+_0x1f5cf1+_0x217b6c(0x19d),{'body':_0x519462});return!_0x5b5200[_0x217b6c(0x17a)][_0x217b6c(0x1ed)]||_0x5b5200[_0x217b6c(0x17a)][_0x217b6c(0x1ed)][_0x217b6c(0x1bb)]===0x1;}async[_0x3fafe0(0x1ac)](_0x567078){const _0x5ee5cd=_0x3fafe0,{unitId:_0x3c8abd}=_0x567078,_0x5062dc=_0x567078[_0x5ee5cd(0x17f)],_0x18bed8={'memberId':this[_0x5ee5cd(0x1c5)]['getCurrentUser']()[_0x5ee5cd(0x1ce)],'unitId':_0x3c8abd,'threadId':_0x5062dc,'solved':_0x567078[_0x5ee5cd(0x18c)]?I['Solved']:I['OpenOrReOpen']},_0x5b84b3=await this[_0x5ee5cd(0x1c0)][_0x5ee5cd(0x189)]('/universer-api/comment/unit/'+_0x3c8abd+_0x5ee5cd(0x1cf),{'body':_0x18bed8});return!_0x5b84b3[_0x5ee5cd(0x17a)][_0x5ee5cd(0x1ed)]||_0x5b84b3[_0x5ee5cd(0x17a)]['error'][_0x5ee5cd(0x1bb)]===0x1;}async['deleteComment'](_0x65ab5e,_0x126fc6,_0x3ec976,_0x3d8305){const _0x375e02=_0x3fafe0,_0x325141={'memberId':(await this[_0x375e02(0x196)][_0x375e02(0x1c3)](_0x65ab5e))[_0x375e02(0x1ae)](),'threadId':_0x3ec976,'replyId':_0x3d8305,'unitId':_0x65ab5e},_0x4428cb=await this[_0x375e02(0x1c0)][_0x375e02(0x189)](_0x375e02(0x19a)+_0x65ab5e+_0x375e02(0x1db),{'body':_0x325141});return!_0x4428cb[_0x375e02(0x17a)][_0x375e02(0x1ed)]||_0x4428cb['body'][_0x375e02(0x1ed)][_0x375e02(0x1bb)]===0x1;}async[_0x3fafe0(0x190)](_0x239e8e,_0x12c94c,_0x3ab4e6){const _0x214a08=_0x3fafe0,_0x10cb14={'unitId':_0x239e8e,'threadId':_0x3ab4e6},_0x4e1f48=await this['_httpService'][_0x214a08(0x189)](_0x214a08(0x19a)+_0x239e8e+_0x214a08(0x17e),{'body':_0x10cb14}),_0x4a4dab=_0x3ab4e6[_0x214a08(0x18d)](_0x1c2230=>G(_0x4e1f48['body']['comments'][_0x1c2230],_0x239e8e,_0x12c94c))[_0x214a08(0x1ec)](Boolean);return Object[_0x214a08(0x1c9)](_0x4e1f48[_0x214a08(0x17a)][_0x214a08(0x186)])[_0x214a08(0x1d7)](_0x21da34=>{const _0x4fb364=_0x214a08;this[_0x4fb364(0x1c5)][_0x4fb364(0x192)](_0x21da34);}),_0x4a4dab;}['saveCommentToSnapshot'](_0x336c29){const _0x4ed9ab=_0x3fafe0;return{'id':_0x336c29['id'],'threadId':_0x336c29['threadId'],'ref':_0x336c29[_0x4ed9ab(0x1b2)]};}};p=x([C(0x0,c[_0x3fafe0(0x1cb)](P['HTTPService'])),C(0x1,c[_0x3fafe0(0x1cb)](c['UserManagerService'])),C(0x2,c[_0x3fafe0(0x1cb)](b[_0x3fafe0(0x1aa)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x26d05f,_0x5e2b40,_0x214aa7,_0x7398e9)=>{const _0x3ffdad=_0x3fafe0;for(var _0x4f8cf2=_0x7398e9>0x1?void 0x0:_0x7398e9?H(_0x5e2b40,_0x214aa7):_0x5e2b40,_0x4e6787=_0x26d05f[_0x3ffdad(0x1bd)]-0x1,_0x20ab17;_0x4e6787>=0x0;_0x4e6787--)(_0x20ab17=_0x26d05f[_0x4e6787])&&(_0x4f8cf2=_0x20ab17(_0x4f8cf2)||_0x4f8cf2);return _0x4f8cf2;},y=(_0x2586fb,_0x28690)=>(_0x3d6a56,_0x4febfc)=>_0x28690(_0x3d6a56,_0x4febfc,_0x2586fb);let g=class extends c[_0x3fafe0(0x1a1)]{constructor(_0x5981d3,_0x5e13dd){const _0x4b5a2f=_0x3fafe0;super(),this[_0x4b5a2f(0x197)]=_0x5981d3,this[_0x4b5a2f(0x1d1)]=_0x5e13dd,this['_initDataSource']();}[_0x3fafe0(0x1d9)](){const _0x5a786a=_0x3fafe0;this[_0x5a786a(0x197)][_0x5a786a(0x1bf)]=this[_0x5a786a(0x1d1)],this[_0x5a786a(0x197)][_0x5a786a(0x1a2)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x3fafe0(0x1cb)](p))],g);var F=Object[_0x3fafe0(0x1a7)],L=Object['getOwnPropertyDescriptor'],Z=(_0x2632e9,_0x2d20a4,_0x2c4ebb)=>_0x2d20a4 in _0x2632e9?F(_0x2632e9,_0x2d20a4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2c4ebb}):_0x2632e9[_0x2d20a4]=_0x2c4ebb,W=(_0xff6684,_0x1c6155,_0x4a315c,_0x4341ca)=>{const _0x2a20e5=_0x3fafe0;for(var _0x2881c6=_0x4341ca>0x1?void 0x0:_0x4341ca?L(_0x1c6155,_0x4a315c):_0x1c6155,_0x36998d=_0xff6684[_0x2a20e5(0x1bd)]-0x1,_0x2a527f;_0x36998d>=0x0;_0x36998d--)(_0x2a527f=_0xff6684[_0x36998d])&&(_0x2881c6=_0x2a527f(_0x2881c6)||_0x2881c6);return _0x2881c6;},O=(_0x52a093,_0x5e75fe)=>(_0xb043a8,_0xf8db7a)=>_0x5e75fe(_0xb043a8,_0xf8db7a,_0x52a093),N=(_0x440e8c,_0x38a173,_0x41c076)=>Z(_0x440e8c,typeof _0x38a173!='symbol'?_0x38a173+'':_0x38a173,_0x41c076);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x3fafe0(0x18a)]{constructor(_0x3bb677=D,_0x4c6893,_0x53ce92){const _0xd280c2=_0x3fafe0;super(),this[_0xd280c2(0x1ab)]=_0x3bb677,this['_injector']=_0x4c6893,this['_configService']=_0x53ce92;const {..._0x2a4419}=c['merge']({},D,this[_0xd280c2(0x1ab)]);this[_0xd280c2(0x1e8)][_0xd280c2(0x1c4)](q,_0x2a4419);}[_0x3fafe0(0x1ca)](){const _0x935dd2=_0x3fafe0;[[p],[g],[_]][_0x935dd2(0x1d7)](_0x384c43=>{const _0x1c5b89=_0x935dd2;this[_0x1c5b89(0x191)][_0x1c5b89(0x17d)](_0x384c43);});}[_0x3fafe0(0x1c7)](){const _0x4c4e40=_0x3fafe0;this['_injector'][_0x4c4e40(0x1bc)](g),this[_0x4c4e40(0x191)][_0x4c4e40(0x1bc)](_);}},N(exports[_0x3fafe0(0x1e4)],_0x3fafe0(0x182),U),N(exports[_0x3fafe0(0x1e4)],'type',c['UniverInstanceType'][_0x3fafe0(0x1b1)]),exports[_0x3fafe0(0x1e4)]=W([c[_0x3fafe0(0x1e3)](w[_0x3fafe0(0x1c2)],b[_0x3fafe0(0x175)],T[_0x3fafe0(0x1c1)]),O(0x1,c[_0x3fafe0(0x1cb)](c['Injector'])),O(0x2,c[_0x3fafe0(0x1a0)])],exports[_0x3fafe0(0x1e4)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0xf2dd0a=_0x4f80;(function(_0x5d3492,_0x139a0a){const _0x1ac33b=_0x4f80,_0x30b8ca=_0x5d3492();while(!![]){try{const _0x5da65c=parseInt(_0x1ac33b(0x14a))/0x1+parseInt(_0x1ac33b(0x177))/0x2*(parseInt(_0x1ac33b(0x12d))/0x3)+parseInt(_0x1ac33b(0x12c))/0x4*(-parseInt(_0x1ac33b(0x18d))/0x5)+parseInt(_0x1ac33b(0x188))/0x6+-parseInt(_0x1ac33b(0x132))/0x7+-parseInt(_0x1ac33b(0x15b))/0x8*(-parseInt(_0x1ac33b(0x129))/0x9)+-parseInt(_0x1ac33b(0x150))/0xa;if(_0x5da65c===_0x139a0a)break;else _0x30b8ca['push'](_0x30b8ca['shift']());}catch(_0x19890a){_0x30b8ca['push'](_0x30b8ca['shift']());}}}(_0x20b3,0xba5e8));import{CommentService as _0x27ef41,CollaborationSessionService as _0x408cc2,UniverCollaborationClientPlugin as _0x4d714d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xf62078}from'@univerjs-pro/license';import{dayjs as _0x3296f5,UserManagerService as _0x1a82c8,Inject as _0x2a723d,Injector as _0x48547d,Disposable as _0x5f0700,CustomRangeType as _0x8aea36,UniverInstanceType as _0x561314,DependentOn as _0xd6cc24,IConfigService as _0x3fbe75,Plugin as _0xa37bcf,merge as _0x3de015}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x55c17b}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x378e1d,IThreadCommentDataSourceService as _0x2bb3bb}from'@univerjs/thread-comment';import{bufferTime as _0x2eb9bc}from'rxjs';import{HTTPService as _0x105545}from'@univerjs/network';const W=_0xf2dd0a(0x169);var I=(_0x3f38d7=>(_0x3f38d7[_0x3f38d7[_0xf2dd0a(0x12b)]=0x0]=_0xf2dd0a(0x12b),_0x3f38d7[_0x3f38d7[_0xf2dd0a(0x181)]=0x1]=_0xf2dd0a(0x181),_0x3f38d7[_0x3f38d7['UNRECOGNIZED']=-0x1]=_0xf2dd0a(0x18b),_0x3f38d7))(I||{}),v=(_0x74bc2e=>(_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x154)]=0x0]=_0xf2dd0a(0x154),_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x161)]=0x1]=_0xf2dd0a(0x161),_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x149)]=0x2]=_0xf2dd0a(0x149),_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x156)]=0x3]='Edit',_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x139)]=0x4]='Delete',_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x158)]=0x5]=_0xf2dd0a(0x158),_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x18b)]=-0x1]=_0xf2dd0a(0x18b),_0x74bc2e))(v||{});const y=_0x4ff9da=>_0x3296f5(new Date(+_0x4ff9da))[_0xf2dd0a(0x128)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x14f257,_0x1663fb)=>{const _0x2ed6f0=_0xf2dd0a,_0x60d12b=_0x14f257['get'](_0x1a82c8),_0x29195a=_0x14f257[_0x2ed6f0(0x130)](_0x105545);_0x1663fb[_0x2ed6f0(0x144)](_0x2167d6=>{const _0x2554c1=_0x2ed6f0;_0x60d12b['getUser'](_0x2167d6)&&_0x1663fb[_0x2554c1(0x14e)](_0x2167d6);}),_0x1663fb[_0x2ed6f0(0x17a)]&&(await _0x29195a['get'](_0x2ed6f0(0x141),{'params':{'userIDs':[..._0x1663fb]}}))[_0x2ed6f0(0x16c)]['users'][_0x2ed6f0(0x144)](_0x349ba6=>{const _0x328932=_0x2ed6f0;_0x349ba6&&_0x60d12b[_0x328932(0x164)](_0x349ba6);});};var K=Object[_0xf2dd0a(0x180)],V=(_0xf6bd97,_0x2acb42,_0x581d3a,_0x29947b)=>{const _0x3894b9=_0xf2dd0a;for(var _0x34f9cf=_0x29947b>0x1?void 0x0:_0x29947b?K(_0x2acb42,_0x581d3a):_0x2acb42,_0x12e167=_0xf6bd97[_0x3894b9(0x13e)]-0x1,_0x3fd1bb;_0x12e167>=0x0;_0x12e167--)(_0x3fd1bb=_0xf6bd97[_0x12e167])&&(_0x34f9cf=_0x3fd1bb(_0x34f9cf)||_0x34f9cf);return _0x34f9cf;},p=(_0x324197,_0x11351c)=>(_0x32dd4f,_0x173b14)=>_0x11351c(_0x32dd4f,_0x173b14,_0x324197);let _=class extends _0x5f0700{constructor(_0x16e83d,_0x12f3ff,_0x97344f,_0x1e96e3){const _0x4546ac=_0xf2dd0a;super(),this['_commentService']=_0x16e83d,this[_0x4546ac(0x165)]=_0x12f3ff,this[_0x4546ac(0x171)]=_0x97344f,this[_0x4546ac(0x14b)]=_0x1e96e3,this[_0x4546ac(0x138)](),this[_0x4546ac(0x17d)]();}[_0xf2dd0a(0x17d)](){const _0x354784=_0xf2dd0a;this[_0x354784(0x16b)](this[_0x354784(0x165)][_0x354784(0x187)]['pipe'](_0x2eb9bc(0x10))[_0x354784(0x145)](_0x41dd81=>{const _0x576917=_0x354784,_0x23ccf9=new Set();_0x41dd81[_0x576917(0x144)](_0x164fff=>{const _0x29e8c9=_0x576917;switch(_0x164fff[_0x29e8c9(0x137)]){case'add':{const _0x591f11=_0x164fff['payload'][_0x29e8c9(0x189)];_0x23ccf9['add'](_0x591f11);break;}}}),B(this[_0x576917(0x14b)],_0x23ccf9);}));}[_0xf2dd0a(0x138)](){const _0x40ac59=_0xf2dd0a;this[_0x40ac59(0x16b)](this[_0x40ac59(0x16a)][_0x40ac59(0x187)][_0x40ac59(0x145)](async _0xb6794c=>{const _0x3dbbcb=_0x40ac59;var _0x5a9004,_0x5d7313,_0x2f6c21,_0x514210;const _0x13ceed=(_0x5a9004=this[_0x3dbbcb(0x165)][_0x3dbbcb(0x13d)](_0xb6794c[_0x3dbbcb(0x172)])[_0x3dbbcb(0x135)](_0x20214e=>_0x20214e['threadId']===_0xb6794c[_0x3dbbcb(0x184)]))==null?void 0x0:_0x5a9004[_0x3dbbcb(0x151)];if(!_0x13ceed)return;const {unitId:_0xc065bf,subUnitId:_0x425db2}=_0x13ceed;switch(_0xb6794c[_0x3dbbcb(0x17f)]&&this[_0x3dbbcb(0x171)][_0x3dbbcb(0x164)](_0xb6794c[_0x3dbbcb(0x17f)]),_0xb6794c[_0x3dbbcb(0x137)]){case v[_0x3dbbcb(0x161)]:break;case v[_0x3dbbcb(0x149)]:{this[_0x3dbbcb(0x165)]['addComment'](_0xc065bf,_0x425db2,{'unitId':_0xc065bf,'subUnitId':_0x425db2,'ref':'','id':_0xb6794c[_0x3dbbcb(0x18a)],'dT':y(+_0xb6794c['createTimestamp']),'threadId':_0xb6794c[_0x3dbbcb(0x184)],'personId':(_0x2f6c21=(_0x5d7313=_0xb6794c[_0x3dbbcb(0x17f)])==null?void 0x0:_0x5d7313[_0x3dbbcb(0x152)])!=null?_0x2f6c21:_0xb6794c['userId'],'text':JSON[_0x3dbbcb(0x18c)](_0xb6794c[_0x3dbbcb(0x143)]),'parentId':_0x13ceed['id']});break;}case v[_0x3dbbcb(0x139)]:{const _0x48c22d=this[_0x3dbbcb(0x165)][_0x3dbbcb(0x142)](_0xc065bf,_0x425db2,_0xb6794c[_0x3dbbcb(0x18a)]);_0x48c22d&&_0x48c22d[_0x3dbbcb(0x146)]&&this['_threadCommentModel'][_0x3dbbcb(0x13b)](_0xc065bf,_0x425db2,_0xb6794c[_0x3dbbcb(0x18a)]);break;}case v[_0x3dbbcb(0x156)]:{this[_0x3dbbcb(0x165)][_0x3dbbcb(0x131)](_0xc065bf,_0x425db2,{'commentId':_0xb6794c[_0x3dbbcb(0x18a)],'text':JSON['parse'](_0xb6794c[_0x3dbbcb(0x143)])});break;}case v[_0x3dbbcb(0x158)]:{const _0x402136=(_0x514210=this['_threadCommentModel']['getUnit'](_0xb6794c[_0x3dbbcb(0x172)])['find'](_0x31de39=>_0x31de39[_0x3dbbcb(0x184)]===_0xb6794c[_0x3dbbcb(0x184)]))==null?void 0x0:_0x514210['root'];_0x402136&&this[_0x3dbbcb(0x165)][_0x3dbbcb(0x167)](_0xc065bf,_0x425db2,_0x402136['id'],_0xb6794c[_0x3dbbcb(0x14c)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x2a723d(_0x27ef41)),p(0x1,_0x2a723d(_0x378e1d)),p(0x2,_0x2a723d(_0x1a82c8)),p(0x3,_0x2a723d(_0x48547d))],_);const z=_0xf2dd0a(0x16f),O={};var k=Object[_0xf2dd0a(0x180)],Q=(_0x121ad6,_0x2099aa,_0xbb3d2b,_0x5ca734)=>{for(var _0xda0bf6=_0x5ca734>0x1?void 0x0:_0x5ca734?k(_0x2099aa,_0xbb3d2b):_0x2099aa,_0xc12bea=_0x121ad6['length']-0x1,_0x3815eb;_0xc12bea>=0x0;_0xc12bea--)(_0x3815eb=_0x121ad6[_0xc12bea])&&(_0xda0bf6=_0x3815eb(_0xda0bf6)||_0xda0bf6);return _0xda0bf6;},b=(_0x18125b,_0x4381de)=>(_0x5a6f9f,_0x387ab5)=>_0x4381de(_0x5a6f9f,_0x387ab5,_0x18125b);function _0x20b3(){const _0xc2e80c=['/delete','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_commentService','disposeWithMe','body','UNIVER_UNKNOWN','filter','thread-comment-data-source.config','slice','_userService','unitId','_httpService','COMMENT','getCurrentUser','onStarting','2gcrWcU','/reply','_config','size','comment','_configService','_initUserSync','defineProperty','user','getOwnPropertyDescriptor','Solved','addComment','YYYY/MM/DD\x20HH:mm','threadId','/add','customRanges','commentUpdate$','6815640KPJKBg','personId','replyId','UNRECOGNIZED','parse','4170XRqfsC','_sessionService','format','2670363FDClmw','users','OpenOrReOpen','6712swSIDj','2582373JjyrMK','add','listComments','get','updateComment','9569280BVbtga','map','requireSession','find','/universer-api/comment/unit/','type','_init','Delete','rangeType','deleteComment','getMemberID','getUnit','length','syncUpdateMutationToColla','_threadCommentDataSourceService','/universer-api/user/list','getComment','content','forEach','subscribe','parentId','/list','/edit','Reply','236418JBsXCB','_injector','solved','error','delete','post','1868240HNBtQJ','root','userID','setConfig','Unknown','_threadCommentDataSource','Edit','resolved','Solve','stringify','replies','40iIaDqq','symbol','reply','userId','rangeId','dataSource','Add','_initDataSource','code','addUser','_threadCommentModel','createTimestamp','resolveComment'];_0x20b3=function(){return _0xc2e80c;};return _0x20b3();}function X(_0x36dd8f,_0x43caab){const _0x1f2558=_0xf2dd0a,_0x53c775=_0x36dd8f[_0x1f2558(0x15a)][0x0];return{..._0x43caab,'id':_0x53c775['replyId'],'resolved':_0x36dd8f[_0x1f2558(0x14c)]===0x1,'dT':y(_0x53c775[_0x1f2558(0x166)]),'personId':_0x53c775[_0x1f2558(0x15e)],'threadId':_0x53c775[_0x1f2558(0x184)]};}function ee(_0x2f6674,_0x5b0134,_0x1ad43c){const _0x398fd6=_0xf2dd0a;var _0x52f95a,_0x5d1eae;if(((_0x5d1eae=(_0x52f95a=_0x2f6674==null?void 0x0:_0x2f6674[_0x398fd6(0x15a)])==null?void 0x0:_0x52f95a[_0x398fd6(0x13e)])!=null?_0x5d1eae:0x0)>0x0){const _0x422ddf=(_0x15657c,_0x1c9cbf)=>({'id':_0x15657c[_0x398fd6(0x18a)],'threadId':_0x15657c[_0x398fd6(0x184)],'dT':y(_0x15657c[_0x398fd6(0x166)]),'personId':_0x15657c[_0x398fd6(0x15e)],'resolved':_0x2f6674[_0x398fd6(0x14c)]===I[_0x398fd6(0x181)],'unitId':_0x5b0134,'subUnitId':_0x1ad43c,'text':JSON[_0x398fd6(0x18c)](_0x15657c[_0x398fd6(0x143)]),'parentId':_0x1c9cbf}),_0x542975=_0x422ddf(_0x2f6674[_0x398fd6(0x15a)][0x0]);return{..._0x542975,'children':_0x2f6674[_0x398fd6(0x15a)][_0x398fd6(0x170)](0x1)[_0x398fd6(0x133)](_0x4ed855=>_0x422ddf(_0x4ed855,_0x542975['id']))};}return null;}let S=class{constructor(_0x501c85,_0x9778bf,_0x4a0706){const _0x488c6e=_0xf2dd0a;this['_httpService']=_0x501c85,this[_0x488c6e(0x171)]=_0x9778bf,this[_0x488c6e(0x18e)]=_0x4a0706;}async[_0xf2dd0a(0x182)](_0x22fe1d){const _0x32a6be=_0xf2dd0a;var _0x225ad7,_0x82421;const {parentId:_0x329542,unitId:_0x38cbfc,text:_0x1c6112,threadId:_0x5ebdb5}=_0x22fe1d,_0x7157e3=(_0x82421=(_0x225ad7=_0x1c6112[_0x32a6be(0x186)])==null?void 0x0:_0x225ad7[_0x32a6be(0x16e)](_0x233b9f=>_0x233b9f[_0x32a6be(0x13a)]===_0x8aea36[_0x32a6be(0x174)])[_0x32a6be(0x133)](_0x20329a=>_0x20329a['rangeId']))!=null?_0x82421:[],_0xc8c301=JSON[_0x32a6be(0x159)](_0x1c6112),_0x1196e2=(await this[_0x32a6be(0x18e)][_0x32a6be(0x134)](_0x38cbfc))[_0x32a6be(0x13c)]();if(_0x329542){const _0x1712f0={'memberId':_0x1196e2,'unitId':_0x38cbfc,'content':_0xc8c301,'mention':_0x7157e3,'threadId':_0x5ebdb5},_0x5a8480=(await this['_httpService']['post'](_0x32a6be(0x136)+_0x38cbfc+_0x32a6be(0x178),{'body':_0x1712f0}))[_0x32a6be(0x16c)][_0x32a6be(0x15d)];return{..._0x22fe1d,'id':_0x5a8480[_0x32a6be(0x18a)],'dT':_0x3296f5(+_0x5a8480[_0x32a6be(0x166)])[_0x32a6be(0x128)](_0x32a6be(0x183)),'personId':_0x5a8480['userId']};}else{const _0x25f543={'memberId':_0x1196e2,'unitId':_0x38cbfc,'content':_0xc8c301,'mention':_0x7157e3},_0x18f544=await this[_0x32a6be(0x173)][_0x32a6be(0x14f)](_0x32a6be(0x136)+_0x38cbfc+_0x32a6be(0x185),{'body':_0x25f543});return X(_0x18f544['body'][_0x32a6be(0x17b)],_0x22fe1d);}}async[_0xf2dd0a(0x131)](_0x2b5516){const _0x281c01=_0xf2dd0a;var _0x4c9901,_0x31daf5;const {text:_0x1eabcf,unitId:_0xf44fcc}=_0x2b5516,_0x3da96a=(_0x31daf5=(_0x4c9901=_0x1eabcf['customRanges'])==null?void 0x0:_0x4c9901['filter'](_0x34afb5=>_0x34afb5[_0x281c01(0x13a)]===_0x8aea36[_0x281c01(0x174)])[_0x281c01(0x133)](_0x45002d=>_0x45002d[_0x281c01(0x15f)]))!=null?_0x31daf5:[],_0xc320be=JSON[_0x281c01(0x159)](_0x1eabcf),_0x340380=_0x2b5516[_0x281c01(0x184)],_0x375d5b=_0x2b5516['id'],_0x431709={'memberId':(await this[_0x281c01(0x18e)]['requireSession'](_0xf44fcc))[_0x281c01(0x13c)](),'unitId':_0xf44fcc,'threadId':_0x340380,'mention':_0x3da96a,'content':_0xc320be,'replyId':_0x375d5b},_0x48a4b2=await this[_0x281c01(0x173)][_0x281c01(0x14f)]('/universer-api/comment/unit/'+_0xf44fcc+_0x281c01(0x148),{'body':_0x431709});return!_0x48a4b2[_0x281c01(0x16c)][_0x281c01(0x14d)]||_0x48a4b2[_0x281c01(0x16c)][_0x281c01(0x14d)][_0x281c01(0x163)]===0x1;}async[_0xf2dd0a(0x167)](_0x46894a){const _0x34faa1=_0xf2dd0a,{unitId:_0x28685f}=_0x46894a,_0x276e95=_0x46894a['threadId'],_0x1d22ef={'memberId':this[_0x34faa1(0x171)][_0x34faa1(0x175)]()[_0x34faa1(0x152)],'unitId':_0x28685f,'threadId':_0x276e95,'solved':_0x46894a[_0x34faa1(0x157)]?I[_0x34faa1(0x181)]:I[_0x34faa1(0x12b)]},_0x53a167=await this['_httpService'][_0x34faa1(0x14f)]('/universer-api/comment/unit/'+_0x28685f+'/solved',{'body':_0x1d22ef});return!_0x53a167[_0x34faa1(0x16c)][_0x34faa1(0x14d)]||_0x53a167[_0x34faa1(0x16c)]['error'][_0x34faa1(0x163)]===0x1;}async['deleteComment'](_0x5505fb,_0x2530ff,_0x581f06,_0x2ae049){const _0x208c41=_0xf2dd0a,_0x319a56={'memberId':(await this[_0x208c41(0x18e)]['requireSession'](_0x5505fb))[_0x208c41(0x13c)](),'threadId':_0x581f06,'replyId':_0x2ae049,'unitId':_0x5505fb},_0xe85e02=await this[_0x208c41(0x173)][_0x208c41(0x14f)](_0x208c41(0x136)+_0x5505fb+_0x208c41(0x168),{'body':_0x319a56});return!_0xe85e02[_0x208c41(0x16c)][_0x208c41(0x14d)]||_0xe85e02[_0x208c41(0x16c)][_0x208c41(0x14d)][_0x208c41(0x163)]===0x1;}async[_0xf2dd0a(0x12f)](_0x4e2784,_0x34788e,_0x139f5f){const _0x3cc636=_0xf2dd0a,_0x44bac9={'unitId':_0x4e2784,'threadId':_0x139f5f},_0x11cb45=await this['_httpService'][_0x3cc636(0x14f)](_0x3cc636(0x136)+_0x4e2784+_0x3cc636(0x147),{'body':_0x44bac9}),_0x4a706f=_0x139f5f[_0x3cc636(0x133)](_0x516815=>ee(_0x11cb45['body']['comments'][_0x516815],_0x4e2784,_0x34788e))['filter'](Boolean);return Object['values'](_0x11cb45[_0x3cc636(0x16c)][_0x3cc636(0x12a)])[_0x3cc636(0x144)](_0x407cfd=>{this['_userService']['addUser'](_0x407cfd);}),_0x4a706f;}['saveCommentToSnapshot'](_0x111ede){const _0x42ff2f=_0xf2dd0a;return{'id':_0x111ede['id'],'threadId':_0x111ede[_0x42ff2f(0x184)],'ref':_0x111ede['ref']};}};function _0x4f80(_0xafa963,_0x53b3ab){const _0x20b31c=_0x20b3();return _0x4f80=function(_0x4f8050,_0x2f83d0){_0x4f8050=_0x4f8050-0x128;let _0x267939=_0x20b31c[_0x4f8050];return _0x267939;},_0x4f80(_0xafa963,_0x53b3ab);}S=Q([b(0x0,_0x2a723d(_0x105545)),b(0x1,_0x2a723d(_0x1a82c8)),b(0x2,_0x2a723d(_0x408cc2))],S);var re=Object[_0xf2dd0a(0x180)],te=(_0xb5e824,_0xa391bc,_0x1e4e99,_0x394c85)=>{const _0x3d1b5b=_0xf2dd0a;for(var _0x4b4688=_0x394c85>0x1?void 0x0:_0x394c85?re(_0xa391bc,_0x1e4e99):_0xa391bc,_0x383471=_0xb5e824[_0x3d1b5b(0x13e)]-0x1,_0x4c51b7;_0x383471>=0x0;_0x383471--)(_0x4c51b7=_0xb5e824[_0x383471])&&(_0x4b4688=_0x4c51b7(_0x4b4688)||_0x4b4688);return _0x4b4688;},M=(_0x2c2d19,_0x9fcb9f)=>(_0x3620cf,_0x100100)=>_0x9fcb9f(_0x3620cf,_0x100100,_0x2c2d19);let f=class extends _0x5f0700{constructor(_0xea660f,_0x175171){const _0x12490e=_0xf2dd0a;super(),this[_0x12490e(0x140)]=_0xea660f,this[_0x12490e(0x155)]=_0x175171,this['_initDataSource']();}[_0xf2dd0a(0x162)](){const _0x1fd6d0=_0xf2dd0a;this[_0x1fd6d0(0x140)][_0x1fd6d0(0x160)]=this[_0x1fd6d0(0x155)],this['_threadCommentDataSourceService'][_0x1fd6d0(0x13f)]=!0x1;}};f=te([M(0x0,_0x2bb3bb),M(0x1,_0x2a723d(S))],f);var se=Object[_0xf2dd0a(0x17e)],oe=Object[_0xf2dd0a(0x180)],ne=(_0x5df8ae,_0x1cd5b7,_0x5911ff)=>_0x1cd5b7 in _0x5df8ae?se(_0x5df8ae,_0x1cd5b7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5911ff}):_0x5df8ae[_0x1cd5b7]=_0x5911ff,ie=(_0x53b488,_0x53832f,_0x1aa73f,_0x1aa272)=>{const _0x3b3a05=_0xf2dd0a;for(var _0x132eeb=_0x1aa272>0x1?void 0x0:_0x1aa272?oe(_0x53832f,_0x1aa73f):_0x53832f,_0x5ef4a7=_0x53b488[_0x3b3a05(0x13e)]-0x1,_0x247717;_0x5ef4a7>=0x0;_0x5ef4a7--)(_0x247717=_0x53b488[_0x5ef4a7])&&(_0x132eeb=_0x247717(_0x132eeb)||_0x132eeb);return _0x132eeb;},N=(_0x2fee8f,_0x318ed6)=>(_0x37d2ba,_0x2224df)=>_0x318ed6(_0x37d2ba,_0x2224df,_0x2fee8f),$=(_0x3df332,_0x5200d7,_0xdef899)=>ne(_0x3df332,typeof _0x5200d7!=_0xf2dd0a(0x15c)?_0x5200d7+'':_0x5200d7,_0xdef899);let g=class extends _0xa37bcf{constructor(_0x12010b=O,_0x21ffe7,_0x58d343){const _0x2a10bf=_0xf2dd0a;super(),this['_config']=_0x12010b,this['_injector']=_0x21ffe7,this[_0x2a10bf(0x17c)]=_0x58d343;const {..._0x37b03a}=_0x3de015({},O,this[_0x2a10bf(0x179)]);this['_configService'][_0x2a10bf(0x153)](z,_0x37b03a);}[_0xf2dd0a(0x176)](){const _0x464609=_0xf2dd0a;[[S],[f],[_]][_0x464609(0x144)](_0x35b556=>{const _0x3912a1=_0x464609;this['_injector'][_0x3912a1(0x12e)](_0x35b556);});}['onReady'](){const _0x55e5c8=_0xf2dd0a;this[_0x55e5c8(0x14b)]['get'](f),this[_0x55e5c8(0x14b)][_0x55e5c8(0x130)](_);}};$(g,'pluginName',W),$(g,_0xf2dd0a(0x137),_0x561314[_0xf2dd0a(0x16d)]),g=ie([_0xd6cc24(_0x55c17b,_0x4d714d,_0xf62078),N(0x1,_0x2a723d(_0x48547d)),N(0x2,_0x3fbe75)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x1de8d3=_0x50d5;(function(_0x43cf47,_0x5f481c){const _0x15ea6d=_0x50d5,_0xfa322a=_0x43cf47();while(!![]){try{const _0x449410=parseInt(_0x15ea6d(0xe1))/0x1*(parseInt(_0x15ea6d(0xad))/0x2)+-parseInt(_0x15ea6d(0xa9))/0x3*(-parseInt(_0x15ea6d(0xf6))/0x4)+parseInt(_0x15ea6d(0xe5))/0x5+-parseInt(_0x15ea6d(0xc7))/0x6*(-parseInt(_0x15ea6d(0xd3))/0x7)+parseInt(_0x15ea6d(0xcc))/0x8+parseInt(_0x15ea6d(0xfa))/0x9+-parseInt(_0x15ea6d(0xf2))/0xa*(parseInt(_0x15ea6d(0xbe))/0xb);if(_0x449410===_0x5f481c)break;else _0xfa322a['push'](_0xfa322a['shift']());}catch(_0x23a2d2){_0xfa322a['push'](_0xfa322a['shift']());}}}(_0x1fba,0x716e6));import{CommentService as _0x51f429,CollaborationSessionService as _0x2a87d7,UniverCollaborationClientPlugin as _0x35400d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4941d3}from'@univerjs-pro/license';import{dayjs as _0x1c2be8,UserManagerService as _0x138cc1,Inject as _0x1a5836,Injector as _0x65dfee,Disposable as _0x43eb65,CustomRangeType as _0x5ae553,UniverInstanceType as _0x545086,DependentOn as _0x2cfcd1,IConfigService as _0x4f3519,Plugin as _0x5cbe9f,merge as _0x2d15a1}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x49253b}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3877cf,IThreadCommentDataSourceService as _0x595174}from'@univerjs/thread-comment';import{bufferTime as _0x2d8fa9}from'rxjs';import{HTTPService as _0x51d2a0}from'@univerjs/network';const W=_0x1de8d3(0xf3);var I=(_0x5eab65=>(_0x5eab65[_0x5eab65[_0x1de8d3(0xb5)]=0x0]=_0x1de8d3(0xb5),_0x5eab65[_0x5eab65[_0x1de8d3(0xe3)]=0x1]='Solved',_0x5eab65[_0x5eab65[_0x1de8d3(0xc4)]=-0x1]='UNRECOGNIZED',_0x5eab65))(I||{}),v=(_0x142991=>(_0x142991[_0x142991['Unknown']=0x0]=_0x1de8d3(0xd0),_0x142991[_0x142991[_0x1de8d3(0xc3)]=0x1]=_0x1de8d3(0xc3),_0x142991[_0x142991[_0x1de8d3(0xe2)]=0x2]=_0x1de8d3(0xe2),_0x142991[_0x142991[_0x1de8d3(0xdd)]=0x3]=_0x1de8d3(0xdd),_0x142991[_0x142991[_0x1de8d3(0x109)]=0x4]=_0x1de8d3(0x109),_0x142991[_0x142991[_0x1de8d3(0xeb)]=0x5]=_0x1de8d3(0xeb),_0x142991[_0x142991[_0x1de8d3(0xc4)]=-0x1]=_0x1de8d3(0xc4),_0x142991))(v||{});const y=_0x16664e=>_0x1c2be8(new Date(+_0x16664e))[_0x1de8d3(0xe4)](_0x1de8d3(0xaa)),B=async(_0x1e9a9e,_0x162532)=>{const _0x2f6904=_0x1de8d3,_0x4d0d07=_0x1e9a9e[_0x2f6904(0xc0)](_0x138cc1),_0x5b0678=_0x1e9a9e[_0x2f6904(0xc0)](_0x51d2a0);_0x162532['forEach'](_0x551e40=>{const _0x5aefc3=_0x2f6904;_0x4d0d07[_0x5aefc3(0xee)](_0x551e40)&&_0x162532[_0x5aefc3(0xd1)](_0x551e40);}),_0x162532['size']&&(await _0x5b0678[_0x2f6904(0xc0)]('/universer-api/user/list',{'params':{'userIDs':[..._0x162532]}}))[_0x2f6904(0xb9)][_0x2f6904(0xcd)]['forEach'](_0xe74413=>{const _0x5aa899=_0x2f6904;_0xe74413&&_0x4d0d07[_0x5aa899(0xb6)](_0xe74413);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x37deb2,_0x1b2236,_0x1692eb,_0x34df38)=>{const _0x4dd9b8=_0x1de8d3;for(var _0x15dd57=_0x34df38>0x1?void 0x0:_0x34df38?K(_0x1b2236,_0x1692eb):_0x1b2236,_0x1737e9=_0x37deb2[_0x4dd9b8(0x105)]-0x1,_0x2664c7;_0x1737e9>=0x0;_0x1737e9--)(_0x2664c7=_0x37deb2[_0x1737e9])&&(_0x15dd57=_0x2664c7(_0x15dd57)||_0x15dd57);return _0x15dd57;},p=(_0x3d44e2,_0x1df155)=>(_0x49aca4,_0x28b00b)=>_0x1df155(_0x49aca4,_0x28b00b,_0x3d44e2);let _=class extends _0x43eb65{constructor(_0x533e16,_0x2e90c1,_0x507525,_0x36c6cf){const _0x2f98b7=_0x1de8d3;super(),this[_0x2f98b7(0xf7)]=_0x533e16,this[_0x2f98b7(0xb8)]=_0x2e90c1,this['_userService']=_0x507525,this[_0x2f98b7(0xdc)]=_0x36c6cf,this[_0x2f98b7(0xe0)](),this[_0x2f98b7(0xc6)]();}['_initUserSync'](){const _0x37a622=_0x1de8d3;this[_0x37a622(0xaf)](this[_0x37a622(0xb8)][_0x37a622(0xd5)][_0x37a622(0xae)](_0x2d8fa9(0x10))[_0x37a622(0xc2)](_0x2dc6d9=>{const _0x8787c7=_0x37a622,_0x306f00=new Set();_0x2dc6d9[_0x8787c7(0xef)](_0x12ca84=>{const _0x5beb42=_0x8787c7;switch(_0x12ca84[_0x5beb42(0xbd)]){case _0x5beb42(0xf0):{const _0x43b613=_0x12ca84[_0x5beb42(0xe6)][_0x5beb42(0xfc)];_0x306f00[_0x5beb42(0xf0)](_0x43b613);break;}}}),B(this['_injector'],_0x306f00);}));}[_0x1de8d3(0xe0)](){const _0xeb0aa6=_0x1de8d3;this[_0xeb0aa6(0xaf)](this[_0xeb0aa6(0xf7)][_0xeb0aa6(0xd5)]['subscribe'](async _0x2e6efc=>{const _0x35b6e3=_0xeb0aa6;var _0x5e0a84,_0x546cbd,_0x5b6699,_0x4e0d19;const _0x2a7779=(_0x5e0a84=this[_0x35b6e3(0xb8)][_0x35b6e3(0x103)](_0x2e6efc['unitId'])[_0x35b6e3(0xd2)](_0x1c72e2=>_0x1c72e2[_0x35b6e3(0xab)]===_0x2e6efc[_0x35b6e3(0xab)]))==null?void 0x0:_0x5e0a84['root'];if(!_0x2a7779)return;const {unitId:_0x3663c6,subUnitId:_0x3cbc59}=_0x2a7779;switch(_0x2e6efc[_0x35b6e3(0x101)]&&this['_userService']['addUser'](_0x2e6efc[_0x35b6e3(0x101)]),_0x2e6efc[_0x35b6e3(0xbd)]){case v['Add']:break;case v[_0x35b6e3(0xe2)]:{this[_0x35b6e3(0xb8)]['addComment'](_0x3663c6,_0x3cbc59,{'unitId':_0x3663c6,'subUnitId':_0x3cbc59,'ref':'','id':_0x2e6efc[_0x35b6e3(0xed)],'dT':y(+_0x2e6efc[_0x35b6e3(0xf1)]),'threadId':_0x2e6efc[_0x35b6e3(0xab)],'personId':(_0x5b6699=(_0x546cbd=_0x2e6efc['user'])==null?void 0x0:_0x546cbd[_0x35b6e3(0x106)])!=null?_0x5b6699:_0x2e6efc[_0x35b6e3(0x107)],'text':JSON[_0x35b6e3(0xbc)](_0x2e6efc[_0x35b6e3(0xce)]),'parentId':_0x2a7779['id']});break;}case v[_0x35b6e3(0x109)]:{const _0x5aa492=this['_threadCommentModel'][_0x35b6e3(0xa8)](_0x3663c6,_0x3cbc59,_0x2e6efc[_0x35b6e3(0xed)]);_0x5aa492&&_0x5aa492[_0x35b6e3(0xc8)]&&this[_0x35b6e3(0xb8)][_0x35b6e3(0xb0)](_0x3663c6,_0x3cbc59,_0x2e6efc['replyId']);break;}case v[_0x35b6e3(0xdd)]:{this[_0x35b6e3(0xb8)]['updateComment'](_0x3663c6,_0x3cbc59,{'commentId':_0x2e6efc[_0x35b6e3(0xed)],'text':JSON[_0x35b6e3(0xbc)](_0x2e6efc['content'])});break;}case v[_0x35b6e3(0xeb)]:{const _0x265ae3=(_0x4e0d19=this[_0x35b6e3(0xb8)][_0x35b6e3(0x103)](_0x2e6efc['unitId'])['find'](_0x4101da=>_0x4101da['threadId']===_0x2e6efc[_0x35b6e3(0xab)]))==null?void 0x0:_0x4e0d19[_0x35b6e3(0xe9)];_0x265ae3&&this['_threadCommentModel'][_0x35b6e3(0xff)](_0x3663c6,_0x3cbc59,_0x265ae3['id'],_0x2e6efc[_0x35b6e3(0xfb)]===I[_0x35b6e3(0xe3)]);break;}}}));}};_=V([p(0x0,_0x1a5836(_0x51f429)),p(0x1,_0x1a5836(_0x3877cf)),p(0x2,_0x1a5836(_0x138cc1)),p(0x3,_0x1a5836(_0x65dfee))],_);function _0x1fba(){const _0x4cf795=['pluginName','_initUserSync','1297686yyBnHB','parentId','rangeType','_config','slice','6330672KIgcBE','users','content','_threadCommentDataSourceService','Unknown','delete','find','7hkUDBt','getCurrentUser','commentUpdate$','stringify','code','getMemberID','saveCommentToSnapshot','setConfig','/solved','_injector','Edit','comments','error','_init','121934eFfGdQ','Reply','Solved','format','1917480xbugSs','payload','onReady','/list','root','dataSource','Solve','_initDataSource','replyId','getUser','forEach','add','createTimestamp','120690FPnstA','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','reply','_httpService','52fuAQiQ','_commentService','getOwnPropertyDescriptor','_sessionService','667422vDGVZs','solved','personId','map','_configService','resolveComment','addComment','user','/reply','getUnit','_userService','length','userID','userId','customRanges','Delete','getComment','49806auUjfa','YYYY/MM/DD\x20HH:mm','threadId','rangeId','4rPzoWg','pipe','disposeWithMe','deleteComment','syncUpdateMutationToColla','replies','filter','updateComment','OpenOrReOpen','addUser','post','_threadCommentModel','body','/universer-api/comment/unit/','ref','parse','type','1331aZImVc','requireSession','get','thread-comment-data-source.config','subscribe','Add','UNRECOGNIZED'];_0x1fba=function(){return _0x4cf795;};return _0x1fba();}const z=_0x1de8d3(0xc1),O={};var k=Object[_0x1de8d3(0xf8)],Q=(_0x417c6f,_0x113527,_0x5ec991,_0x3b1560)=>{for(var _0x4e02a5=_0x3b1560>0x1?void 0x0:_0x3b1560?k(_0x113527,_0x5ec991):_0x113527,_0x2c4f86=_0x417c6f['length']-0x1,_0x1cc605;_0x2c4f86>=0x0;_0x2c4f86--)(_0x1cc605=_0x417c6f[_0x2c4f86])&&(_0x4e02a5=_0x1cc605(_0x4e02a5)||_0x4e02a5);return _0x4e02a5;},b=(_0x3bc1f3,_0x4c7253)=>(_0x4ec2bb,_0x1d1748)=>_0x4c7253(_0x4ec2bb,_0x1d1748,_0x3bc1f3);function X(_0x4e1f97,_0x2a92c9){const _0x32845e=_0x1de8d3,_0x48557d=_0x4e1f97[_0x32845e(0xb2)][0x0];return{..._0x2a92c9,'id':_0x48557d[_0x32845e(0xed)],'resolved':_0x4e1f97[_0x32845e(0xfb)]===0x1,'dT':y(_0x48557d['createTimestamp']),'personId':_0x48557d['userId'],'threadId':_0x48557d[_0x32845e(0xab)]};}function ee(_0x52c200,_0x371d90,_0x1be5fa){const _0x6d7c44=_0x1de8d3;var _0x437197,_0x3f2507;if(((_0x3f2507=(_0x437197=_0x52c200==null?void 0x0:_0x52c200[_0x6d7c44(0xb2)])==null?void 0x0:_0x437197[_0x6d7c44(0x105)])!=null?_0x3f2507:0x0)>0x0){const _0x3337d1=(_0x1c876f,_0x54180c)=>({'id':_0x1c876f[_0x6d7c44(0xed)],'threadId':_0x1c876f[_0x6d7c44(0xab)],'dT':y(_0x1c876f[_0x6d7c44(0xf1)]),'personId':_0x1c876f[_0x6d7c44(0x107)],'resolved':_0x52c200[_0x6d7c44(0xfb)]===I[_0x6d7c44(0xe3)],'unitId':_0x371d90,'subUnitId':_0x1be5fa,'text':JSON['parse'](_0x1c876f[_0x6d7c44(0xce)]),'parentId':_0x54180c}),_0x144100=_0x3337d1(_0x52c200[_0x6d7c44(0xb2)][0x0]);return{..._0x144100,'children':_0x52c200[_0x6d7c44(0xb2)][_0x6d7c44(0xcb)](0x1)[_0x6d7c44(0xfd)](_0xb8709c=>_0x3337d1(_0xb8709c,_0x144100['id']))};}return null;}let S=class{constructor(_0x55deac,_0x2bb6e6,_0x2914ae){const _0x4a6f7d=_0x1de8d3;this[_0x4a6f7d(0xf5)]=_0x55deac,this[_0x4a6f7d(0x104)]=_0x2bb6e6,this[_0x4a6f7d(0xf9)]=_0x2914ae;}async[_0x1de8d3(0x100)](_0x2cad32){const _0x25fe07=_0x1de8d3;var _0x51e25c,_0x2fa986;const {parentId:_0xc61477,unitId:_0x311cad,text:_0x3e085a,threadId:_0x2fdfb9}=_0x2cad32,_0x51647c=(_0x2fa986=(_0x51e25c=_0x3e085a[_0x25fe07(0x108)])==null?void 0x0:_0x51e25c[_0x25fe07(0xb3)](_0xe48db7=>_0xe48db7[_0x25fe07(0xc9)]===_0x5ae553['COMMENT'])['map'](_0x2651e6=>_0x2651e6[_0x25fe07(0xac)]))!=null?_0x2fa986:[],_0x37954e=JSON[_0x25fe07(0xd6)](_0x3e085a),_0x54388c=(await this[_0x25fe07(0xf9)][_0x25fe07(0xbf)](_0x311cad))['getMemberID']();if(_0xc61477){const _0x1fdfb2={'memberId':_0x54388c,'unitId':_0x311cad,'content':_0x37954e,'mention':_0x51647c,'threadId':_0x2fdfb9},_0x5963d4=(await this[_0x25fe07(0xf5)][_0x25fe07(0xb7)]('/universer-api/comment/unit/'+_0x311cad+_0x25fe07(0x102),{'body':_0x1fdfb2}))[_0x25fe07(0xb9)][_0x25fe07(0xf4)];return{..._0x2cad32,'id':_0x5963d4[_0x25fe07(0xed)],'dT':_0x1c2be8(+_0x5963d4[_0x25fe07(0xf1)])[_0x25fe07(0xe4)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5963d4[_0x25fe07(0x107)]};}else{const _0x26bf21={'memberId':_0x54388c,'unitId':_0x311cad,'content':_0x37954e,'mention':_0x51647c},_0xab4fb2=await this[_0x25fe07(0xf5)]['post'](_0x25fe07(0xba)+_0x311cad+'/add',{'body':_0x26bf21});return X(_0xab4fb2[_0x25fe07(0xb9)]['comment'],_0x2cad32);}}async[_0x1de8d3(0xb4)](_0x1d6fd5){const _0x20c543=_0x1de8d3;var _0x14b6e5,_0x26b3d6;const {text:_0x44d493,unitId:_0x4438cc}=_0x1d6fd5,_0x4e74a8=(_0x26b3d6=(_0x14b6e5=_0x44d493[_0x20c543(0x108)])==null?void 0x0:_0x14b6e5['filter'](_0x2d9489=>_0x2d9489[_0x20c543(0xc9)]===_0x5ae553['COMMENT'])[_0x20c543(0xfd)](_0x381c0b=>_0x381c0b[_0x20c543(0xac)]))!=null?_0x26b3d6:[],_0x31dc54=JSON[_0x20c543(0xd6)](_0x44d493),_0xf45fa2=_0x1d6fd5['threadId'],_0x23112d=_0x1d6fd5['id'],_0x278b02={'memberId':(await this[_0x20c543(0xf9)][_0x20c543(0xbf)](_0x4438cc))[_0x20c543(0xd8)](),'unitId':_0x4438cc,'threadId':_0xf45fa2,'mention':_0x4e74a8,'content':_0x31dc54,'replyId':_0x23112d},_0x368f84=await this[_0x20c543(0xf5)][_0x20c543(0xb7)](_0x20c543(0xba)+_0x4438cc+'/edit',{'body':_0x278b02});return!_0x368f84[_0x20c543(0xb9)]['error']||_0x368f84[_0x20c543(0xb9)]['error'][_0x20c543(0xd7)]===0x1;}async['resolveComment'](_0x50200b){const _0x4c4654=_0x1de8d3,{unitId:_0x10f4f4}=_0x50200b,_0x5233ad=_0x50200b[_0x4c4654(0xab)],_0x107a6b={'memberId':this[_0x4c4654(0x104)][_0x4c4654(0xd4)]()[_0x4c4654(0x106)],'unitId':_0x10f4f4,'threadId':_0x5233ad,'solved':_0x50200b['resolved']?I['Solved']:I[_0x4c4654(0xb5)]},_0x12d567=await this[_0x4c4654(0xf5)][_0x4c4654(0xb7)](_0x4c4654(0xba)+_0x10f4f4+_0x4c4654(0xdb),{'body':_0x107a6b});return!_0x12d567[_0x4c4654(0xb9)][_0x4c4654(0xdf)]||_0x12d567[_0x4c4654(0xb9)][_0x4c4654(0xdf)]['code']===0x1;}async[_0x1de8d3(0xb0)](_0x2b463c,_0x264028,_0x1a8cf7,_0x34220a){const _0x45b87e=_0x1de8d3,_0x39fa1f={'memberId':(await this[_0x45b87e(0xf9)][_0x45b87e(0xbf)](_0x2b463c))[_0x45b87e(0xd8)](),'threadId':_0x1a8cf7,'replyId':_0x34220a,'unitId':_0x2b463c},_0x1cc7e2=await this[_0x45b87e(0xf5)][_0x45b87e(0xb7)](_0x45b87e(0xba)+_0x2b463c+'/delete',{'body':_0x39fa1f});return!_0x1cc7e2[_0x45b87e(0xb9)][_0x45b87e(0xdf)]||_0x1cc7e2[_0x45b87e(0xb9)]['error'][_0x45b87e(0xd7)]===0x1;}async['listComments'](_0x2fbaa3,_0x1d6a1e,_0x33eb69){const _0x38f6ae=_0x1de8d3,_0x19f0d6={'unitId':_0x2fbaa3,'threadId':_0x33eb69},_0x21f90c=await this[_0x38f6ae(0xf5)]['post'](_0x38f6ae(0xba)+_0x2fbaa3+_0x38f6ae(0xe8),{'body':_0x19f0d6}),_0x36b706=_0x33eb69[_0x38f6ae(0xfd)](_0x2ef6b4=>ee(_0x21f90c[_0x38f6ae(0xb9)][_0x38f6ae(0xde)][_0x2ef6b4],_0x2fbaa3,_0x1d6a1e))['filter'](Boolean);return Object['values'](_0x21f90c['body'][_0x38f6ae(0xcd)])[_0x38f6ae(0xef)](_0x55afcd=>{this['_userService']['addUser'](_0x55afcd);}),_0x36b706;}[_0x1de8d3(0xd9)](_0x1ebe83){const _0x1f9a70=_0x1de8d3;return{'id':_0x1ebe83['id'],'threadId':_0x1ebe83['threadId'],'ref':_0x1ebe83[_0x1f9a70(0xbb)]};}};S=Q([b(0x0,_0x1a5836(_0x51d2a0)),b(0x1,_0x1a5836(_0x138cc1)),b(0x2,_0x1a5836(_0x2a87d7))],S);var re=Object[_0x1de8d3(0xf8)],te=(_0x205d3a,_0xbbf38c,_0x5bcce5,_0x808813)=>{const _0x8ef62f=_0x1de8d3;for(var _0x5411c8=_0x808813>0x1?void 0x0:_0x808813?re(_0xbbf38c,_0x5bcce5):_0xbbf38c,_0x1e9adf=_0x205d3a[_0x8ef62f(0x105)]-0x1,_0xa001e7;_0x1e9adf>=0x0;_0x1e9adf--)(_0xa001e7=_0x205d3a[_0x1e9adf])&&(_0x5411c8=_0xa001e7(_0x5411c8)||_0x5411c8);return _0x5411c8;},M=(_0xa66a65,_0x4bde8e)=>(_0x2cc131,_0x45e600)=>_0x4bde8e(_0x2cc131,_0x45e600,_0xa66a65);let f=class extends _0x43eb65{constructor(_0x1f3fdb,_0x4be5d6){const _0x41c4a6=_0x1de8d3;super(),this[_0x41c4a6(0xcf)]=_0x1f3fdb,this['_threadCommentDataSource']=_0x4be5d6,this[_0x41c4a6(0xec)]();}[_0x1de8d3(0xec)](){const _0x2d3cb2=_0x1de8d3;this['_threadCommentDataSourceService'][_0x2d3cb2(0xea)]=this['_threadCommentDataSource'],this[_0x2d3cb2(0xcf)][_0x2d3cb2(0xb1)]=!0x1;}};f=te([M(0x0,_0x595174),M(0x1,_0x1a5836(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x11b674,_0x27a49e,_0x5b8f73)=>_0x27a49e in _0x11b674?se(_0x11b674,_0x27a49e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5b8f73}):_0x11b674[_0x27a49e]=_0x5b8f73,ie=(_0x5a9a95,_0x5ede9c,_0x28d692,_0x1775ad)=>{for(var _0x298346=_0x1775ad>0x1?void 0x0:_0x1775ad?oe(_0x5ede9c,_0x28d692):_0x5ede9c,_0x2c4910=_0x5a9a95['length']-0x1,_0x40c4fb;_0x2c4910>=0x0;_0x2c4910--)(_0x40c4fb=_0x5a9a95[_0x2c4910])&&(_0x298346=_0x40c4fb(_0x298346)||_0x298346);return _0x298346;},N=(_0x5d32c2,_0x14cf35)=>(_0x40a9a6,_0x2fc018)=>_0x14cf35(_0x40a9a6,_0x2fc018,_0x5d32c2),$=(_0x3c9914,_0x5580a0,_0x4abca4)=>ne(_0x3c9914,typeof _0x5580a0!='symbol'?_0x5580a0+'':_0x5580a0,_0x4abca4);let g=class extends _0x5cbe9f{constructor(_0x53a2b2=O,_0x1e3329,_0x91c210){const _0x206d4d=_0x1de8d3;super(),this[_0x206d4d(0xca)]=_0x53a2b2,this['_injector']=_0x1e3329,this[_0x206d4d(0xfe)]=_0x91c210;const {..._0x57f18a}=_0x2d15a1({},O,this['_config']);this['_configService'][_0x206d4d(0xda)](z,_0x57f18a);}['onStarting'](){[[S],[f],[_]]['forEach'](_0x365d40=>{const _0x49e845=_0x50d5;this[_0x49e845(0xdc)][_0x49e845(0xf0)](_0x365d40);});}[_0x1de8d3(0xe7)](){const _0x1d94a4=_0x1de8d3;this[_0x1d94a4(0xdc)]['get'](f),this[_0x1d94a4(0xdc)][_0x1d94a4(0xc0)](_);}};function _0x50d5(_0x43b4a1,_0x3f2d1d){const _0x1fba1e=_0x1fba();return _0x50d5=function(_0x50d57b,_0x2b8f8e){_0x50d57b=_0x50d57b-0xa8;let _0x3a8317=_0x1fba1e[_0x50d57b];return _0x3a8317;},_0x50d5(_0x43b4a1,_0x3f2d1d);}$(g,_0x1de8d3(0xc5),W),$(g,'type',_0x545086['UNIVER_UNKNOWN']),g=ie([_0x2cfcd1(_0x49253b,_0x35400d,_0x4941d3),N(0x1,_0x1a5836(_0x65dfee)),N(0x2,_0x4f3519)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0xf2dd0a=_0x4f80;(function(_0x5d3492,_0x139a0a){const _0x1ac33b=_0x4f80,_0x30b8ca=_0x5d3492();while(!![]){try{const _0x5da65c=parseInt(_0x1ac33b(0x14a))/0x1+parseInt(_0x1ac33b(0x177))/0x2*(parseInt(_0x1ac33b(0x12d))/0x3)+parseInt(_0x1ac33b(0x12c))/0x4*(-parseInt(_0x1ac33b(0x18d))/0x5)+parseInt(_0x1ac33b(0x188))/0x6+-parseInt(_0x1ac33b(0x132))/0x7+-parseInt(_0x1ac33b(0x15b))/0x8*(-parseInt(_0x1ac33b(0x129))/0x9)+-parseInt(_0x1ac33b(0x150))/0xa;if(_0x5da65c===_0x139a0a)break;else _0x30b8ca['push'](_0x30b8ca['shift']());}catch(_0x19890a){_0x30b8ca['push'](_0x30b8ca['shift']());}}}(_0x20b3,0xba5e8));import{CommentService as _0x27ef41,CollaborationSessionService as _0x408cc2,UniverCollaborationClientPlugin as _0x4d714d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xf62078}from'@univerjs-pro/license';import{dayjs as _0x3296f5,UserManagerService as _0x1a82c8,Inject as _0x2a723d,Injector as _0x48547d,Disposable as _0x5f0700,CustomRangeType as _0x8aea36,UniverInstanceType as _0x561314,DependentOn as _0xd6cc24,IConfigService as _0x3fbe75,Plugin as _0xa37bcf,merge as _0x3de015}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x55c17b}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x378e1d,IThreadCommentDataSourceService as _0x2bb3bb}from'@univerjs/thread-comment';import{bufferTime as _0x2eb9bc}from'rxjs';import{HTTPService as _0x105545}from'@univerjs/network';const W=_0xf2dd0a(0x169);var I=(_0x3f38d7=>(_0x3f38d7[_0x3f38d7[_0xf2dd0a(0x12b)]=0x0]=_0xf2dd0a(0x12b),_0x3f38d7[_0x3f38d7[_0xf2dd0a(0x181)]=0x1]=_0xf2dd0a(0x181),_0x3f38d7[_0x3f38d7['UNRECOGNIZED']=-0x1]=_0xf2dd0a(0x18b),_0x3f38d7))(I||{}),v=(_0x74bc2e=>(_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x154)]=0x0]=_0xf2dd0a(0x154),_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x161)]=0x1]=_0xf2dd0a(0x161),_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x149)]=0x2]=_0xf2dd0a(0x149),_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x156)]=0x3]='Edit',_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x139)]=0x4]='Delete',_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x158)]=0x5]=_0xf2dd0a(0x158),_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x18b)]=-0x1]=_0xf2dd0a(0x18b),_0x74bc2e))(v||{});const y=_0x4ff9da=>_0x3296f5(new Date(+_0x4ff9da))[_0xf2dd0a(0x128)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x14f257,_0x1663fb)=>{const _0x2ed6f0=_0xf2dd0a,_0x60d12b=_0x14f257['get'](_0x1a82c8),_0x29195a=_0x14f257[_0x2ed6f0(0x130)](_0x105545);_0x1663fb[_0x2ed6f0(0x144)](_0x2167d6=>{const _0x2554c1=_0x2ed6f0;_0x60d12b['getUser'](_0x2167d6)&&_0x1663fb[_0x2554c1(0x14e)](_0x2167d6);}),_0x1663fb[_0x2ed6f0(0x17a)]&&(await _0x29195a['get'](_0x2ed6f0(0x141),{'params':{'userIDs':[..._0x1663fb]}}))[_0x2ed6f0(0x16c)]['users'][_0x2ed6f0(0x144)](_0x349ba6=>{const _0x328932=_0x2ed6f0;_0x349ba6&&_0x60d12b[_0x328932(0x164)](_0x349ba6);});};var K=Object[_0xf2dd0a(0x180)],V=(_0xf6bd97,_0x2acb42,_0x581d3a,_0x29947b)=>{const _0x3894b9=_0xf2dd0a;for(var _0x34f9cf=_0x29947b>0x1?void 0x0:_0x29947b?K(_0x2acb42,_0x581d3a):_0x2acb42,_0x12e167=_0xf6bd97[_0x3894b9(0x13e)]-0x1,_0x3fd1bb;_0x12e167>=0x0;_0x12e167--)(_0x3fd1bb=_0xf6bd97[_0x12e167])&&(_0x34f9cf=_0x3fd1bb(_0x34f9cf)||_0x34f9cf);return _0x34f9cf;},p=(_0x324197,_0x11351c)=>(_0x32dd4f,_0x173b14)=>_0x11351c(_0x32dd4f,_0x173b14,_0x324197);let _=class extends _0x5f0700{constructor(_0x16e83d,_0x12f3ff,_0x97344f,_0x1e96e3){const _0x4546ac=_0xf2dd0a;super(),this['_commentService']=_0x16e83d,this[_0x4546ac(0x165)]=_0x12f3ff,this[_0x4546ac(0x171)]=_0x97344f,this[_0x4546ac(0x14b)]=_0x1e96e3,this[_0x4546ac(0x138)](),this[_0x4546ac(0x17d)]();}[_0xf2dd0a(0x17d)](){const _0x354784=_0xf2dd0a;this[_0x354784(0x16b)](this[_0x354784(0x165)][_0x354784(0x187)]['pipe'](_0x2eb9bc(0x10))[_0x354784(0x145)](_0x41dd81=>{const _0x576917=_0x354784,_0x23ccf9=new Set();_0x41dd81[_0x576917(0x144)](_0x164fff=>{const _0x29e8c9=_0x576917;switch(_0x164fff[_0x29e8c9(0x137)]){case'add':{const _0x591f11=_0x164fff['payload'][_0x29e8c9(0x189)];_0x23ccf9['add'](_0x591f11);break;}}}),B(this[_0x576917(0x14b)],_0x23ccf9);}));}[_0xf2dd0a(0x138)](){const _0x40ac59=_0xf2dd0a;this[_0x40ac59(0x16b)](this[_0x40ac59(0x16a)][_0x40ac59(0x187)][_0x40ac59(0x145)](async _0xb6794c=>{const _0x3dbbcb=_0x40ac59;var _0x5a9004,_0x5d7313,_0x2f6c21,_0x514210;const _0x13ceed=(_0x5a9004=this[_0x3dbbcb(0x165)][_0x3dbbcb(0x13d)](_0xb6794c[_0x3dbbcb(0x172)])[_0x3dbbcb(0x135)](_0x20214e=>_0x20214e['threadId']===_0xb6794c[_0x3dbbcb(0x184)]))==null?void 0x0:_0x5a9004[_0x3dbbcb(0x151)];if(!_0x13ceed)return;const {unitId:_0xc065bf,subUnitId:_0x425db2}=_0x13ceed;switch(_0xb6794c[_0x3dbbcb(0x17f)]&&this[_0x3dbbcb(0x171)][_0x3dbbcb(0x164)](_0xb6794c[_0x3dbbcb(0x17f)]),_0xb6794c[_0x3dbbcb(0x137)]){case v[_0x3dbbcb(0x161)]:break;case v[_0x3dbbcb(0x149)]:{this[_0x3dbbcb(0x165)]['addComment'](_0xc065bf,_0x425db2,{'unitId':_0xc065bf,'subUnitId':_0x425db2,'ref':'','id':_0xb6794c[_0x3dbbcb(0x18a)],'dT':y(+_0xb6794c['createTimestamp']),'threadId':_0xb6794c[_0x3dbbcb(0x184)],'personId':(_0x2f6c21=(_0x5d7313=_0xb6794c[_0x3dbbcb(0x17f)])==null?void 0x0:_0x5d7313[_0x3dbbcb(0x152)])!=null?_0x2f6c21:_0xb6794c['userId'],'text':JSON[_0x3dbbcb(0x18c)](_0xb6794c[_0x3dbbcb(0x143)]),'parentId':_0x13ceed['id']});break;}case v[_0x3dbbcb(0x139)]:{const _0x48c22d=this[_0x3dbbcb(0x165)][_0x3dbbcb(0x142)](_0xc065bf,_0x425db2,_0xb6794c[_0x3dbbcb(0x18a)]);_0x48c22d&&_0x48c22d[_0x3dbbcb(0x146)]&&this['_threadCommentModel'][_0x3dbbcb(0x13b)](_0xc065bf,_0x425db2,_0xb6794c[_0x3dbbcb(0x18a)]);break;}case v[_0x3dbbcb(0x156)]:{this[_0x3dbbcb(0x165)][_0x3dbbcb(0x131)](_0xc065bf,_0x425db2,{'commentId':_0xb6794c[_0x3dbbcb(0x18a)],'text':JSON['parse'](_0xb6794c[_0x3dbbcb(0x143)])});break;}case v[_0x3dbbcb(0x158)]:{const _0x402136=(_0x514210=this['_threadCommentModel']['getUnit'](_0xb6794c[_0x3dbbcb(0x172)])['find'](_0x31de39=>_0x31de39[_0x3dbbcb(0x184)]===_0xb6794c[_0x3dbbcb(0x184)]))==null?void 0x0:_0x514210['root'];_0x402136&&this[_0x3dbbcb(0x165)][_0x3dbbcb(0x167)](_0xc065bf,_0x425db2,_0x402136['id'],_0xb6794c[_0x3dbbcb(0x14c)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x2a723d(_0x27ef41)),p(0x1,_0x2a723d(_0x378e1d)),p(0x2,_0x2a723d(_0x1a82c8)),p(0x3,_0x2a723d(_0x48547d))],_);const z=_0xf2dd0a(0x16f),O={};var k=Object[_0xf2dd0a(0x180)],Q=(_0x121ad6,_0x2099aa,_0xbb3d2b,_0x5ca734)=>{for(var _0xda0bf6=_0x5ca734>0x1?void 0x0:_0x5ca734?k(_0x2099aa,_0xbb3d2b):_0x2099aa,_0xc12bea=_0x121ad6['length']-0x1,_0x3815eb;_0xc12bea>=0x0;_0xc12bea--)(_0x3815eb=_0x121ad6[_0xc12bea])&&(_0xda0bf6=_0x3815eb(_0xda0bf6)||_0xda0bf6);return _0xda0bf6;},b=(_0x18125b,_0x4381de)=>(_0x5a6f9f,_0x387ab5)=>_0x4381de(_0x5a6f9f,_0x387ab5,_0x18125b);function _0x20b3(){const _0xc2e80c=['/delete','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_commentService','disposeWithMe','body','UNIVER_UNKNOWN','filter','thread-comment-data-source.config','slice','_userService','unitId','_httpService','COMMENT','getCurrentUser','onStarting','2gcrWcU','/reply','_config','size','comment','_configService','_initUserSync','defineProperty','user','getOwnPropertyDescriptor','Solved','addComment','YYYY/MM/DD\x20HH:mm','threadId','/add','customRanges','commentUpdate$','6815640KPJKBg','personId','replyId','UNRECOGNIZED','parse','4170XRqfsC','_sessionService','format','2670363FDClmw','users','OpenOrReOpen','6712swSIDj','2582373JjyrMK','add','listComments','get','updateComment','9569280BVbtga','map','requireSession','find','/universer-api/comment/unit/','type','_init','Delete','rangeType','deleteComment','getMemberID','getUnit','length','syncUpdateMutationToColla','_threadCommentDataSourceService','/universer-api/user/list','getComment','content','forEach','subscribe','parentId','/list','/edit','Reply','236418JBsXCB','_injector','solved','error','delete','post','1868240HNBtQJ','root','userID','setConfig','Unknown','_threadCommentDataSource','Edit','resolved','Solve','stringify','replies','40iIaDqq','symbol','reply','userId','rangeId','dataSource','Add','_initDataSource','code','addUser','_threadCommentModel','createTimestamp','resolveComment'];_0x20b3=function(){return _0xc2e80c;};return _0x20b3();}function X(_0x36dd8f,_0x43caab){const _0x1f2558=_0xf2dd0a,_0x53c775=_0x36dd8f[_0x1f2558(0x15a)][0x0];return{..._0x43caab,'id':_0x53c775['replyId'],'resolved':_0x36dd8f[_0x1f2558(0x14c)]===0x1,'dT':y(_0x53c775[_0x1f2558(0x166)]),'personId':_0x53c775[_0x1f2558(0x15e)],'threadId':_0x53c775[_0x1f2558(0x184)]};}function ee(_0x2f6674,_0x5b0134,_0x1ad43c){const _0x398fd6=_0xf2dd0a;var _0x52f95a,_0x5d1eae;if(((_0x5d1eae=(_0x52f95a=_0x2f6674==null?void 0x0:_0x2f6674[_0x398fd6(0x15a)])==null?void 0x0:_0x52f95a[_0x398fd6(0x13e)])!=null?_0x5d1eae:0x0)>0x0){const _0x422ddf=(_0x15657c,_0x1c9cbf)=>({'id':_0x15657c[_0x398fd6(0x18a)],'threadId':_0x15657c[_0x398fd6(0x184)],'dT':y(_0x15657c[_0x398fd6(0x166)]),'personId':_0x15657c[_0x398fd6(0x15e)],'resolved':_0x2f6674[_0x398fd6(0x14c)]===I[_0x398fd6(0x181)],'unitId':_0x5b0134,'subUnitId':_0x1ad43c,'text':JSON[_0x398fd6(0x18c)](_0x15657c[_0x398fd6(0x143)]),'parentId':_0x1c9cbf}),_0x542975=_0x422ddf(_0x2f6674[_0x398fd6(0x15a)][0x0]);return{..._0x542975,'children':_0x2f6674[_0x398fd6(0x15a)][_0x398fd6(0x170)](0x1)[_0x398fd6(0x133)](_0x4ed855=>_0x422ddf(_0x4ed855,_0x542975['id']))};}return null;}let S=class{constructor(_0x501c85,_0x9778bf,_0x4a0706){const _0x488c6e=_0xf2dd0a;this['_httpService']=_0x501c85,this[_0x488c6e(0x171)]=_0x9778bf,this[_0x488c6e(0x18e)]=_0x4a0706;}async[_0xf2dd0a(0x182)](_0x22fe1d){const _0x32a6be=_0xf2dd0a;var _0x225ad7,_0x82421;const {parentId:_0x329542,unitId:_0x38cbfc,text:_0x1c6112,threadId:_0x5ebdb5}=_0x22fe1d,_0x7157e3=(_0x82421=(_0x225ad7=_0x1c6112[_0x32a6be(0x186)])==null?void 0x0:_0x225ad7[_0x32a6be(0x16e)](_0x233b9f=>_0x233b9f[_0x32a6be(0x13a)]===_0x8aea36[_0x32a6be(0x174)])[_0x32a6be(0x133)](_0x20329a=>_0x20329a['rangeId']))!=null?_0x82421:[],_0xc8c301=JSON[_0x32a6be(0x159)](_0x1c6112),_0x1196e2=(await this[_0x32a6be(0x18e)][_0x32a6be(0x134)](_0x38cbfc))[_0x32a6be(0x13c)]();if(_0x329542){const _0x1712f0={'memberId':_0x1196e2,'unitId':_0x38cbfc,'content':_0xc8c301,'mention':_0x7157e3,'threadId':_0x5ebdb5},_0x5a8480=(await this['_httpService']['post'](_0x32a6be(0x136)+_0x38cbfc+_0x32a6be(0x178),{'body':_0x1712f0}))[_0x32a6be(0x16c)][_0x32a6be(0x15d)];return{..._0x22fe1d,'id':_0x5a8480[_0x32a6be(0x18a)],'dT':_0x3296f5(+_0x5a8480[_0x32a6be(0x166)])[_0x32a6be(0x128)](_0x32a6be(0x183)),'personId':_0x5a8480['userId']};}else{const _0x25f543={'memberId':_0x1196e2,'unitId':_0x38cbfc,'content':_0xc8c301,'mention':_0x7157e3},_0x18f544=await this[_0x32a6be(0x173)][_0x32a6be(0x14f)](_0x32a6be(0x136)+_0x38cbfc+_0x32a6be(0x185),{'body':_0x25f543});return X(_0x18f544['body'][_0x32a6be(0x17b)],_0x22fe1d);}}async[_0xf2dd0a(0x131)](_0x2b5516){const _0x281c01=_0xf2dd0a;var _0x4c9901,_0x31daf5;const {text:_0x1eabcf,unitId:_0xf44fcc}=_0x2b5516,_0x3da96a=(_0x31daf5=(_0x4c9901=_0x1eabcf['customRanges'])==null?void 0x0:_0x4c9901['filter'](_0x34afb5=>_0x34afb5[_0x281c01(0x13a)]===_0x8aea36[_0x281c01(0x174)])[_0x281c01(0x133)](_0x45002d=>_0x45002d[_0x281c01(0x15f)]))!=null?_0x31daf5:[],_0xc320be=JSON[_0x281c01(0x159)](_0x1eabcf),_0x340380=_0x2b5516[_0x281c01(0x184)],_0x375d5b=_0x2b5516['id'],_0x431709={'memberId':(await this[_0x281c01(0x18e)]['requireSession'](_0xf44fcc))[_0x281c01(0x13c)](),'unitId':_0xf44fcc,'threadId':_0x340380,'mention':_0x3da96a,'content':_0xc320be,'replyId':_0x375d5b},_0x48a4b2=await this[_0x281c01(0x173)][_0x281c01(0x14f)]('/universer-api/comment/unit/'+_0xf44fcc+_0x281c01(0x148),{'body':_0x431709});return!_0x48a4b2[_0x281c01(0x16c)][_0x281c01(0x14d)]||_0x48a4b2[_0x281c01(0x16c)][_0x281c01(0x14d)][_0x281c01(0x163)]===0x1;}async[_0xf2dd0a(0x167)](_0x46894a){const _0x34faa1=_0xf2dd0a,{unitId:_0x28685f}=_0x46894a,_0x276e95=_0x46894a['threadId'],_0x1d22ef={'memberId':this[_0x34faa1(0x171)][_0x34faa1(0x175)]()[_0x34faa1(0x152)],'unitId':_0x28685f,'threadId':_0x276e95,'solved':_0x46894a[_0x34faa1(0x157)]?I[_0x34faa1(0x181)]:I[_0x34faa1(0x12b)]},_0x53a167=await this['_httpService'][_0x34faa1(0x14f)]('/universer-api/comment/unit/'+_0x28685f+'/solved',{'body':_0x1d22ef});return!_0x53a167[_0x34faa1(0x16c)][_0x34faa1(0x14d)]||_0x53a167[_0x34faa1(0x16c)]['error'][_0x34faa1(0x163)]===0x1;}async['deleteComment'](_0x5505fb,_0x2530ff,_0x581f06,_0x2ae049){const _0x208c41=_0xf2dd0a,_0x319a56={'memberId':(await this[_0x208c41(0x18e)]['requireSession'](_0x5505fb))[_0x208c41(0x13c)](),'threadId':_0x581f06,'replyId':_0x2ae049,'unitId':_0x5505fb},_0xe85e02=await this[_0x208c41(0x173)][_0x208c41(0x14f)](_0x208c41(0x136)+_0x5505fb+_0x208c41(0x168),{'body':_0x319a56});return!_0xe85e02[_0x208c41(0x16c)][_0x208c41(0x14d)]||_0xe85e02[_0x208c41(0x16c)][_0x208c41(0x14d)][_0x208c41(0x163)]===0x1;}async[_0xf2dd0a(0x12f)](_0x4e2784,_0x34788e,_0x139f5f){const _0x3cc636=_0xf2dd0a,_0x44bac9={'unitId':_0x4e2784,'threadId':_0x139f5f},_0x11cb45=await this['_httpService'][_0x3cc636(0x14f)](_0x3cc636(0x136)+_0x4e2784+_0x3cc636(0x147),{'body':_0x44bac9}),_0x4a706f=_0x139f5f[_0x3cc636(0x133)](_0x516815=>ee(_0x11cb45['body']['comments'][_0x516815],_0x4e2784,_0x34788e))['filter'](Boolean);return Object['values'](_0x11cb45[_0x3cc636(0x16c)][_0x3cc636(0x12a)])[_0x3cc636(0x144)](_0x407cfd=>{this['_userService']['addUser'](_0x407cfd);}),_0x4a706f;}['saveCommentToSnapshot'](_0x111ede){const _0x42ff2f=_0xf2dd0a;return{'id':_0x111ede['id'],'threadId':_0x111ede[_0x42ff2f(0x184)],'ref':_0x111ede['ref']};}};function _0x4f80(_0xafa963,_0x53b3ab){const _0x20b31c=_0x20b3();return _0x4f80=function(_0x4f8050,_0x2f83d0){_0x4f8050=_0x4f8050-0x128;let _0x267939=_0x20b31c[_0x4f8050];return _0x267939;},_0x4f80(_0xafa963,_0x53b3ab);}S=Q([b(0x0,_0x2a723d(_0x105545)),b(0x1,_0x2a723d(_0x1a82c8)),b(0x2,_0x2a723d(_0x408cc2))],S);var re=Object[_0xf2dd0a(0x180)],te=(_0xb5e824,_0xa391bc,_0x1e4e99,_0x394c85)=>{const _0x3d1b5b=_0xf2dd0a;for(var _0x4b4688=_0x394c85>0x1?void 0x0:_0x394c85?re(_0xa391bc,_0x1e4e99):_0xa391bc,_0x383471=_0xb5e824[_0x3d1b5b(0x13e)]-0x1,_0x4c51b7;_0x383471>=0x0;_0x383471--)(_0x4c51b7=_0xb5e824[_0x383471])&&(_0x4b4688=_0x4c51b7(_0x4b4688)||_0x4b4688);return _0x4b4688;},M=(_0x2c2d19,_0x9fcb9f)=>(_0x3620cf,_0x100100)=>_0x9fcb9f(_0x3620cf,_0x100100,_0x2c2d19);let f=class extends _0x5f0700{constructor(_0xea660f,_0x175171){const _0x12490e=_0xf2dd0a;super(),this[_0x12490e(0x140)]=_0xea660f,this[_0x12490e(0x155)]=_0x175171,this['_initDataSource']();}[_0xf2dd0a(0x162)](){const _0x1fd6d0=_0xf2dd0a;this[_0x1fd6d0(0x140)][_0x1fd6d0(0x160)]=this[_0x1fd6d0(0x155)],this['_threadCommentDataSourceService'][_0x1fd6d0(0x13f)]=!0x1;}};f=te([M(0x0,_0x2bb3bb),M(0x1,_0x2a723d(S))],f);var se=Object[_0xf2dd0a(0x17e)],oe=Object[_0xf2dd0a(0x180)],ne=(_0x5df8ae,_0x1cd5b7,_0x5911ff)=>_0x1cd5b7 in _0x5df8ae?se(_0x5df8ae,_0x1cd5b7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5911ff}):_0x5df8ae[_0x1cd5b7]=_0x5911ff,ie=(_0x53b488,_0x53832f,_0x1aa73f,_0x1aa272)=>{const _0x3b3a05=_0xf2dd0a;for(var _0x132eeb=_0x1aa272>0x1?void 0x0:_0x1aa272?oe(_0x53832f,_0x1aa73f):_0x53832f,_0x5ef4a7=_0x53b488[_0x3b3a05(0x13e)]-0x1,_0x247717;_0x5ef4a7>=0x0;_0x5ef4a7--)(_0x247717=_0x53b488[_0x5ef4a7])&&(_0x132eeb=_0x247717(_0x132eeb)||_0x132eeb);return _0x132eeb;},N=(_0x2fee8f,_0x318ed6)=>(_0x37d2ba,_0x2224df)=>_0x318ed6(_0x37d2ba,_0x2224df,_0x2fee8f),$=(_0x3df332,_0x5200d7,_0xdef899)=>ne(_0x3df332,typeof _0x5200d7!=_0xf2dd0a(0x15c)?_0x5200d7+'':_0x5200d7,_0xdef899);let g=class extends _0xa37bcf{constructor(_0x12010b=O,_0x21ffe7,_0x58d343){const _0x2a10bf=_0xf2dd0a;super(),this['_config']=_0x12010b,this['_injector']=_0x21ffe7,this[_0x2a10bf(0x17c)]=_0x58d343;const {..._0x37b03a}=_0x3de015({},O,this[_0x2a10bf(0x179)]);this['_configService'][_0x2a10bf(0x153)](z,_0x37b03a);}[_0xf2dd0a(0x176)](){const _0x464609=_0xf2dd0a;[[S],[f],[_]][_0x464609(0x144)](_0x35b556=>{const _0x3912a1=_0x464609;this['_injector'][_0x3912a1(0x12e)](_0x35b556);});}['onReady'](){const _0x55e5c8=_0xf2dd0a;this[_0x55e5c8(0x14b)]['get'](f),this[_0x55e5c8(0x14b)][_0x55e5c8(0x130)](_);}};$(g,'pluginName',W),$(g,_0xf2dd0a(0x137),_0x561314[_0xf2dd0a(0x16d)]),g=ie([_0xd6cc24(_0x55c17b,_0x4d714d,_0xf62078),N(0x1,_0x2a723d(_0x48547d)),N(0x2,_0x3fbe75)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x1de8d3=_0x50d5;(function(_0x43cf47,_0x5f481c){const _0x15ea6d=_0x50d5,_0xfa322a=_0x43cf47();while(!![]){try{const _0x449410=parseInt(_0x15ea6d(0xe1))/0x1*(parseInt(_0x15ea6d(0xad))/0x2)+-parseInt(_0x15ea6d(0xa9))/0x3*(-parseInt(_0x15ea6d(0xf6))/0x4)+parseInt(_0x15ea6d(0xe5))/0x5+-parseInt(_0x15ea6d(0xc7))/0x6*(-parseInt(_0x15ea6d(0xd3))/0x7)+parseInt(_0x15ea6d(0xcc))/0x8+parseInt(_0x15ea6d(0xfa))/0x9+-parseInt(_0x15ea6d(0xf2))/0xa*(parseInt(_0x15ea6d(0xbe))/0xb);if(_0x449410===_0x5f481c)break;else _0xfa322a['push'](_0xfa322a['shift']());}catch(_0x23a2d2){_0xfa322a['push'](_0xfa322a['shift']());}}}(_0x1fba,0x716e6));import{CommentService as _0x51f429,CollaborationSessionService as _0x2a87d7,UniverCollaborationClientPlugin as _0x35400d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4941d3}from'@univerjs-pro/license';import{dayjs as _0x1c2be8,UserManagerService as _0x138cc1,Inject as _0x1a5836,Injector as _0x65dfee,Disposable as _0x43eb65,CustomRangeType as _0x5ae553,UniverInstanceType as _0x545086,DependentOn as _0x2cfcd1,IConfigService as _0x4f3519,Plugin as _0x5cbe9f,merge as _0x2d15a1}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x49253b}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3877cf,IThreadCommentDataSourceService as _0x595174}from'@univerjs/thread-comment';import{bufferTime as _0x2d8fa9}from'rxjs';import{HTTPService as _0x51d2a0}from'@univerjs/network';const W=_0x1de8d3(0xf3);var I=(_0x5eab65=>(_0x5eab65[_0x5eab65[_0x1de8d3(0xb5)]=0x0]=_0x1de8d3(0xb5),_0x5eab65[_0x5eab65[_0x1de8d3(0xe3)]=0x1]='Solved',_0x5eab65[_0x5eab65[_0x1de8d3(0xc4)]=-0x1]='UNRECOGNIZED',_0x5eab65))(I||{}),v=(_0x142991=>(_0x142991[_0x142991['Unknown']=0x0]=_0x1de8d3(0xd0),_0x142991[_0x142991[_0x1de8d3(0xc3)]=0x1]=_0x1de8d3(0xc3),_0x142991[_0x142991[_0x1de8d3(0xe2)]=0x2]=_0x1de8d3(0xe2),_0x142991[_0x142991[_0x1de8d3(0xdd)]=0x3]=_0x1de8d3(0xdd),_0x142991[_0x142991[_0x1de8d3(0x109)]=0x4]=_0x1de8d3(0x109),_0x142991[_0x142991[_0x1de8d3(0xeb)]=0x5]=_0x1de8d3(0xeb),_0x142991[_0x142991[_0x1de8d3(0xc4)]=-0x1]=_0x1de8d3(0xc4),_0x142991))(v||{});const y=_0x16664e=>_0x1c2be8(new Date(+_0x16664e))[_0x1de8d3(0xe4)](_0x1de8d3(0xaa)),B=async(_0x1e9a9e,_0x162532)=>{const _0x2f6904=_0x1de8d3,_0x4d0d07=_0x1e9a9e[_0x2f6904(0xc0)](_0x138cc1),_0x5b0678=_0x1e9a9e[_0x2f6904(0xc0)](_0x51d2a0);_0x162532['forEach'](_0x551e40=>{const _0x5aefc3=_0x2f6904;_0x4d0d07[_0x5aefc3(0xee)](_0x551e40)&&_0x162532[_0x5aefc3(0xd1)](_0x551e40);}),_0x162532['size']&&(await _0x5b0678[_0x2f6904(0xc0)]('/universer-api/user/list',{'params':{'userIDs':[..._0x162532]}}))[_0x2f6904(0xb9)][_0x2f6904(0xcd)]['forEach'](_0xe74413=>{const _0x5aa899=_0x2f6904;_0xe74413&&_0x4d0d07[_0x5aa899(0xb6)](_0xe74413);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x37deb2,_0x1b2236,_0x1692eb,_0x34df38)=>{const _0x4dd9b8=_0x1de8d3;for(var _0x15dd57=_0x34df38>0x1?void 0x0:_0x34df38?K(_0x1b2236,_0x1692eb):_0x1b2236,_0x1737e9=_0x37deb2[_0x4dd9b8(0x105)]-0x1,_0x2664c7;_0x1737e9>=0x0;_0x1737e9--)(_0x2664c7=_0x37deb2[_0x1737e9])&&(_0x15dd57=_0x2664c7(_0x15dd57)||_0x15dd57);return _0x15dd57;},p=(_0x3d44e2,_0x1df155)=>(_0x49aca4,_0x28b00b)=>_0x1df155(_0x49aca4,_0x28b00b,_0x3d44e2);let _=class extends _0x43eb65{constructor(_0x533e16,_0x2e90c1,_0x507525,_0x36c6cf){const _0x2f98b7=_0x1de8d3;super(),this[_0x2f98b7(0xf7)]=_0x533e16,this[_0x2f98b7(0xb8)]=_0x2e90c1,this['_userService']=_0x507525,this[_0x2f98b7(0xdc)]=_0x36c6cf,this[_0x2f98b7(0xe0)](),this[_0x2f98b7(0xc6)]();}['_initUserSync'](){const _0x37a622=_0x1de8d3;this[_0x37a622(0xaf)](this[_0x37a622(0xb8)][_0x37a622(0xd5)][_0x37a622(0xae)](_0x2d8fa9(0x10))[_0x37a622(0xc2)](_0x2dc6d9=>{const _0x8787c7=_0x37a622,_0x306f00=new Set();_0x2dc6d9[_0x8787c7(0xef)](_0x12ca84=>{const _0x5beb42=_0x8787c7;switch(_0x12ca84[_0x5beb42(0xbd)]){case _0x5beb42(0xf0):{const _0x43b613=_0x12ca84[_0x5beb42(0xe6)][_0x5beb42(0xfc)];_0x306f00[_0x5beb42(0xf0)](_0x43b613);break;}}}),B(this['_injector'],_0x306f00);}));}[_0x1de8d3(0xe0)](){const _0xeb0aa6=_0x1de8d3;this[_0xeb0aa6(0xaf)](this[_0xeb0aa6(0xf7)][_0xeb0aa6(0xd5)]['subscribe'](async _0x2e6efc=>{const _0x35b6e3=_0xeb0aa6;var _0x5e0a84,_0x546cbd,_0x5b6699,_0x4e0d19;const _0x2a7779=(_0x5e0a84=this[_0x35b6e3(0xb8)][_0x35b6e3(0x103)](_0x2e6efc['unitId'])[_0x35b6e3(0xd2)](_0x1c72e2=>_0x1c72e2[_0x35b6e3(0xab)]===_0x2e6efc[_0x35b6e3(0xab)]))==null?void 0x0:_0x5e0a84['root'];if(!_0x2a7779)return;const {unitId:_0x3663c6,subUnitId:_0x3cbc59}=_0x2a7779;switch(_0x2e6efc[_0x35b6e3(0x101)]&&this['_userService']['addUser'](_0x2e6efc[_0x35b6e3(0x101)]),_0x2e6efc[_0x35b6e3(0xbd)]){case v['Add']:break;case v[_0x35b6e3(0xe2)]:{this[_0x35b6e3(0xb8)]['addComment'](_0x3663c6,_0x3cbc59,{'unitId':_0x3663c6,'subUnitId':_0x3cbc59,'ref':'','id':_0x2e6efc[_0x35b6e3(0xed)],'dT':y(+_0x2e6efc[_0x35b6e3(0xf1)]),'threadId':_0x2e6efc[_0x35b6e3(0xab)],'personId':(_0x5b6699=(_0x546cbd=_0x2e6efc['user'])==null?void 0x0:_0x546cbd[_0x35b6e3(0x106)])!=null?_0x5b6699:_0x2e6efc[_0x35b6e3(0x107)],'text':JSON[_0x35b6e3(0xbc)](_0x2e6efc[_0x35b6e3(0xce)]),'parentId':_0x2a7779['id']});break;}case v[_0x35b6e3(0x109)]:{const _0x5aa492=this['_threadCommentModel'][_0x35b6e3(0xa8)](_0x3663c6,_0x3cbc59,_0x2e6efc[_0x35b6e3(0xed)]);_0x5aa492&&_0x5aa492[_0x35b6e3(0xc8)]&&this[_0x35b6e3(0xb8)][_0x35b6e3(0xb0)](_0x3663c6,_0x3cbc59,_0x2e6efc['replyId']);break;}case v[_0x35b6e3(0xdd)]:{this[_0x35b6e3(0xb8)]['updateComment'](_0x3663c6,_0x3cbc59,{'commentId':_0x2e6efc[_0x35b6e3(0xed)],'text':JSON[_0x35b6e3(0xbc)](_0x2e6efc['content'])});break;}case v[_0x35b6e3(0xeb)]:{const _0x265ae3=(_0x4e0d19=this[_0x35b6e3(0xb8)][_0x35b6e3(0x103)](_0x2e6efc['unitId'])['find'](_0x4101da=>_0x4101da['threadId']===_0x2e6efc[_0x35b6e3(0xab)]))==null?void 0x0:_0x4e0d19[_0x35b6e3(0xe9)];_0x265ae3&&this['_threadCommentModel'][_0x35b6e3(0xff)](_0x3663c6,_0x3cbc59,_0x265ae3['id'],_0x2e6efc[_0x35b6e3(0xfb)]===I[_0x35b6e3(0xe3)]);break;}}}));}};_=V([p(0x0,_0x1a5836(_0x51f429)),p(0x1,_0x1a5836(_0x3877cf)),p(0x2,_0x1a5836(_0x138cc1)),p(0x3,_0x1a5836(_0x65dfee))],_);function _0x1fba(){const _0x4cf795=['pluginName','_initUserSync','1297686yyBnHB','parentId','rangeType','_config','slice','6330672KIgcBE','users','content','_threadCommentDataSourceService','Unknown','delete','find','7hkUDBt','getCurrentUser','commentUpdate$','stringify','code','getMemberID','saveCommentToSnapshot','setConfig','/solved','_injector','Edit','comments','error','_init','121934eFfGdQ','Reply','Solved','format','1917480xbugSs','payload','onReady','/list','root','dataSource','Solve','_initDataSource','replyId','getUser','forEach','add','createTimestamp','120690FPnstA','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','reply','_httpService','52fuAQiQ','_commentService','getOwnPropertyDescriptor','_sessionService','667422vDGVZs','solved','personId','map','_configService','resolveComment','addComment','user','/reply','getUnit','_userService','length','userID','userId','customRanges','Delete','getComment','49806auUjfa','YYYY/MM/DD\x20HH:mm','threadId','rangeId','4rPzoWg','pipe','disposeWithMe','deleteComment','syncUpdateMutationToColla','replies','filter','updateComment','OpenOrReOpen','addUser','post','_threadCommentModel','body','/universer-api/comment/unit/','ref','parse','type','1331aZImVc','requireSession','get','thread-comment-data-source.config','subscribe','Add','UNRECOGNIZED'];_0x1fba=function(){return _0x4cf795;};return _0x1fba();}const z=_0x1de8d3(0xc1),O={};var k=Object[_0x1de8d3(0xf8)],Q=(_0x417c6f,_0x113527,_0x5ec991,_0x3b1560)=>{for(var _0x4e02a5=_0x3b1560>0x1?void 0x0:_0x3b1560?k(_0x113527,_0x5ec991):_0x113527,_0x2c4f86=_0x417c6f['length']-0x1,_0x1cc605;_0x2c4f86>=0x0;_0x2c4f86--)(_0x1cc605=_0x417c6f[_0x2c4f86])&&(_0x4e02a5=_0x1cc605(_0x4e02a5)||_0x4e02a5);return _0x4e02a5;},b=(_0x3bc1f3,_0x4c7253)=>(_0x4ec2bb,_0x1d1748)=>_0x4c7253(_0x4ec2bb,_0x1d1748,_0x3bc1f3);function X(_0x4e1f97,_0x2a92c9){const _0x32845e=_0x1de8d3,_0x48557d=_0x4e1f97[_0x32845e(0xb2)][0x0];return{..._0x2a92c9,'id':_0x48557d[_0x32845e(0xed)],'resolved':_0x4e1f97[_0x32845e(0xfb)]===0x1,'dT':y(_0x48557d['createTimestamp']),'personId':_0x48557d['userId'],'threadId':_0x48557d[_0x32845e(0xab)]};}function ee(_0x52c200,_0x371d90,_0x1be5fa){const _0x6d7c44=_0x1de8d3;var _0x437197,_0x3f2507;if(((_0x3f2507=(_0x437197=_0x52c200==null?void 0x0:_0x52c200[_0x6d7c44(0xb2)])==null?void 0x0:_0x437197[_0x6d7c44(0x105)])!=null?_0x3f2507:0x0)>0x0){const _0x3337d1=(_0x1c876f,_0x54180c)=>({'id':_0x1c876f[_0x6d7c44(0xed)],'threadId':_0x1c876f[_0x6d7c44(0xab)],'dT':y(_0x1c876f[_0x6d7c44(0xf1)]),'personId':_0x1c876f[_0x6d7c44(0x107)],'resolved':_0x52c200[_0x6d7c44(0xfb)]===I[_0x6d7c44(0xe3)],'unitId':_0x371d90,'subUnitId':_0x1be5fa,'text':JSON['parse'](_0x1c876f[_0x6d7c44(0xce)]),'parentId':_0x54180c}),_0x144100=_0x3337d1(_0x52c200[_0x6d7c44(0xb2)][0x0]);return{..._0x144100,'children':_0x52c200[_0x6d7c44(0xb2)][_0x6d7c44(0xcb)](0x1)[_0x6d7c44(0xfd)](_0xb8709c=>_0x3337d1(_0xb8709c,_0x144100['id']))};}return null;}let S=class{constructor(_0x55deac,_0x2bb6e6,_0x2914ae){const _0x4a6f7d=_0x1de8d3;this[_0x4a6f7d(0xf5)]=_0x55deac,this[_0x4a6f7d(0x104)]=_0x2bb6e6,this[_0x4a6f7d(0xf9)]=_0x2914ae;}async[_0x1de8d3(0x100)](_0x2cad32){const _0x25fe07=_0x1de8d3;var _0x51e25c,_0x2fa986;const {parentId:_0xc61477,unitId:_0x311cad,text:_0x3e085a,threadId:_0x2fdfb9}=_0x2cad32,_0x51647c=(_0x2fa986=(_0x51e25c=_0x3e085a[_0x25fe07(0x108)])==null?void 0x0:_0x51e25c[_0x25fe07(0xb3)](_0xe48db7=>_0xe48db7[_0x25fe07(0xc9)]===_0x5ae553['COMMENT'])['map'](_0x2651e6=>_0x2651e6[_0x25fe07(0xac)]))!=null?_0x2fa986:[],_0x37954e=JSON[_0x25fe07(0xd6)](_0x3e085a),_0x54388c=(await this[_0x25fe07(0xf9)][_0x25fe07(0xbf)](_0x311cad))['getMemberID']();if(_0xc61477){const _0x1fdfb2={'memberId':_0x54388c,'unitId':_0x311cad,'content':_0x37954e,'mention':_0x51647c,'threadId':_0x2fdfb9},_0x5963d4=(await this[_0x25fe07(0xf5)][_0x25fe07(0xb7)]('/universer-api/comment/unit/'+_0x311cad+_0x25fe07(0x102),{'body':_0x1fdfb2}))[_0x25fe07(0xb9)][_0x25fe07(0xf4)];return{..._0x2cad32,'id':_0x5963d4[_0x25fe07(0xed)],'dT':_0x1c2be8(+_0x5963d4[_0x25fe07(0xf1)])[_0x25fe07(0xe4)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5963d4[_0x25fe07(0x107)]};}else{const _0x26bf21={'memberId':_0x54388c,'unitId':_0x311cad,'content':_0x37954e,'mention':_0x51647c},_0xab4fb2=await this[_0x25fe07(0xf5)]['post'](_0x25fe07(0xba)+_0x311cad+'/add',{'body':_0x26bf21});return X(_0xab4fb2[_0x25fe07(0xb9)]['comment'],_0x2cad32);}}async[_0x1de8d3(0xb4)](_0x1d6fd5){const _0x20c543=_0x1de8d3;var _0x14b6e5,_0x26b3d6;const {text:_0x44d493,unitId:_0x4438cc}=_0x1d6fd5,_0x4e74a8=(_0x26b3d6=(_0x14b6e5=_0x44d493[_0x20c543(0x108)])==null?void 0x0:_0x14b6e5['filter'](_0x2d9489=>_0x2d9489[_0x20c543(0xc9)]===_0x5ae553['COMMENT'])[_0x20c543(0xfd)](_0x381c0b=>_0x381c0b[_0x20c543(0xac)]))!=null?_0x26b3d6:[],_0x31dc54=JSON[_0x20c543(0xd6)](_0x44d493),_0xf45fa2=_0x1d6fd5['threadId'],_0x23112d=_0x1d6fd5['id'],_0x278b02={'memberId':(await this[_0x20c543(0xf9)][_0x20c543(0xbf)](_0x4438cc))[_0x20c543(0xd8)](),'unitId':_0x4438cc,'threadId':_0xf45fa2,'mention':_0x4e74a8,'content':_0x31dc54,'replyId':_0x23112d},_0x368f84=await this[_0x20c543(0xf5)][_0x20c543(0xb7)](_0x20c543(0xba)+_0x4438cc+'/edit',{'body':_0x278b02});return!_0x368f84[_0x20c543(0xb9)]['error']||_0x368f84[_0x20c543(0xb9)]['error'][_0x20c543(0xd7)]===0x1;}async['resolveComment'](_0x50200b){const _0x4c4654=_0x1de8d3,{unitId:_0x10f4f4}=_0x50200b,_0x5233ad=_0x50200b[_0x4c4654(0xab)],_0x107a6b={'memberId':this[_0x4c4654(0x104)][_0x4c4654(0xd4)]()[_0x4c4654(0x106)],'unitId':_0x10f4f4,'threadId':_0x5233ad,'solved':_0x50200b['resolved']?I['Solved']:I[_0x4c4654(0xb5)]},_0x12d567=await this[_0x4c4654(0xf5)][_0x4c4654(0xb7)](_0x4c4654(0xba)+_0x10f4f4+_0x4c4654(0xdb),{'body':_0x107a6b});return!_0x12d567[_0x4c4654(0xb9)][_0x4c4654(0xdf)]||_0x12d567[_0x4c4654(0xb9)][_0x4c4654(0xdf)]['code']===0x1;}async[_0x1de8d3(0xb0)](_0x2b463c,_0x264028,_0x1a8cf7,_0x34220a){const _0x45b87e=_0x1de8d3,_0x39fa1f={'memberId':(await this[_0x45b87e(0xf9)][_0x45b87e(0xbf)](_0x2b463c))[_0x45b87e(0xd8)](),'threadId':_0x1a8cf7,'replyId':_0x34220a,'unitId':_0x2b463c},_0x1cc7e2=await this[_0x45b87e(0xf5)][_0x45b87e(0xb7)](_0x45b87e(0xba)+_0x2b463c+'/delete',{'body':_0x39fa1f});return!_0x1cc7e2[_0x45b87e(0xb9)][_0x45b87e(0xdf)]||_0x1cc7e2[_0x45b87e(0xb9)]['error'][_0x45b87e(0xd7)]===0x1;}async['listComments'](_0x2fbaa3,_0x1d6a1e,_0x33eb69){const _0x38f6ae=_0x1de8d3,_0x19f0d6={'unitId':_0x2fbaa3,'threadId':_0x33eb69},_0x21f90c=await this[_0x38f6ae(0xf5)]['post'](_0x38f6ae(0xba)+_0x2fbaa3+_0x38f6ae(0xe8),{'body':_0x19f0d6}),_0x36b706=_0x33eb69[_0x38f6ae(0xfd)](_0x2ef6b4=>ee(_0x21f90c[_0x38f6ae(0xb9)][_0x38f6ae(0xde)][_0x2ef6b4],_0x2fbaa3,_0x1d6a1e))['filter'](Boolean);return Object['values'](_0x21f90c['body'][_0x38f6ae(0xcd)])[_0x38f6ae(0xef)](_0x55afcd=>{this['_userService']['addUser'](_0x55afcd);}),_0x36b706;}[_0x1de8d3(0xd9)](_0x1ebe83){const _0x1f9a70=_0x1de8d3;return{'id':_0x1ebe83['id'],'threadId':_0x1ebe83['threadId'],'ref':_0x1ebe83[_0x1f9a70(0xbb)]};}};S=Q([b(0x0,_0x1a5836(_0x51d2a0)),b(0x1,_0x1a5836(_0x138cc1)),b(0x2,_0x1a5836(_0x2a87d7))],S);var re=Object[_0x1de8d3(0xf8)],te=(_0x205d3a,_0xbbf38c,_0x5bcce5,_0x808813)=>{const _0x8ef62f=_0x1de8d3;for(var _0x5411c8=_0x808813>0x1?void 0x0:_0x808813?re(_0xbbf38c,_0x5bcce5):_0xbbf38c,_0x1e9adf=_0x205d3a[_0x8ef62f(0x105)]-0x1,_0xa001e7;_0x1e9adf>=0x0;_0x1e9adf--)(_0xa001e7=_0x205d3a[_0x1e9adf])&&(_0x5411c8=_0xa001e7(_0x5411c8)||_0x5411c8);return _0x5411c8;},M=(_0xa66a65,_0x4bde8e)=>(_0x2cc131,_0x45e600)=>_0x4bde8e(_0x2cc131,_0x45e600,_0xa66a65);let f=class extends _0x43eb65{constructor(_0x1f3fdb,_0x4be5d6){const _0x41c4a6=_0x1de8d3;super(),this[_0x41c4a6(0xcf)]=_0x1f3fdb,this['_threadCommentDataSource']=_0x4be5d6,this[_0x41c4a6(0xec)]();}[_0x1de8d3(0xec)](){const _0x2d3cb2=_0x1de8d3;this['_threadCommentDataSourceService'][_0x2d3cb2(0xea)]=this['_threadCommentDataSource'],this[_0x2d3cb2(0xcf)][_0x2d3cb2(0xb1)]=!0x1;}};f=te([M(0x0,_0x595174),M(0x1,_0x1a5836(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x11b674,_0x27a49e,_0x5b8f73)=>_0x27a49e in _0x11b674?se(_0x11b674,_0x27a49e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5b8f73}):_0x11b674[_0x27a49e]=_0x5b8f73,ie=(_0x5a9a95,_0x5ede9c,_0x28d692,_0x1775ad)=>{for(var _0x298346=_0x1775ad>0x1?void 0x0:_0x1775ad?oe(_0x5ede9c,_0x28d692):_0x5ede9c,_0x2c4910=_0x5a9a95['length']-0x1,_0x40c4fb;_0x2c4910>=0x0;_0x2c4910--)(_0x40c4fb=_0x5a9a95[_0x2c4910])&&(_0x298346=_0x40c4fb(_0x298346)||_0x298346);return _0x298346;},N=(_0x5d32c2,_0x14cf35)=>(_0x40a9a6,_0x2fc018)=>_0x14cf35(_0x40a9a6,_0x2fc018,_0x5d32c2),$=(_0x3c9914,_0x5580a0,_0x4abca4)=>ne(_0x3c9914,typeof _0x5580a0!='symbol'?_0x5580a0+'':_0x5580a0,_0x4abca4);let g=class extends _0x5cbe9f{constructor(_0x53a2b2=O,_0x1e3329,_0x91c210){const _0x206d4d=_0x1de8d3;super(),this[_0x206d4d(0xca)]=_0x53a2b2,this['_injector']=_0x1e3329,this[_0x206d4d(0xfe)]=_0x91c210;const {..._0x57f18a}=_0x2d15a1({},O,this['_config']);this['_configService'][_0x206d4d(0xda)](z,_0x57f18a);}['onStarting'](){[[S],[f],[_]]['forEach'](_0x365d40=>{const _0x49e845=_0x50d5;this[_0x49e845(0xdc)][_0x49e845(0xf0)](_0x365d40);});}[_0x1de8d3(0xe7)](){const _0x1d94a4=_0x1de8d3;this[_0x1d94a4(0xdc)]['get'](f),this[_0x1d94a4(0xdc)][_0x1d94a4(0xc0)](_);}};function _0x50d5(_0x43b4a1,_0x3f2d1d){const _0x1fba1e=_0x1fba();return _0x50d5=function(_0x50d57b,_0x2b8f8e){_0x50d57b=_0x50d57b-0xa8;let _0x3a8317=_0x1fba1e[_0x50d57b];return _0x3a8317;},_0x50d5(_0x43b4a1,_0x3f2d1d);}$(g,_0x1de8d3(0xc5),W),$(g,'type',_0x545086['UNIVER_UNKNOWN']),g=ie([_0x2cfcd1(_0x49253b,_0x35400d,_0x4941d3),N(0x1,_0x1a5836(_0x65dfee)),N(0x2,_0x4f3519)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x26eb(){const _0x384bbe=['IThreadCommentDataSourceService','size','rxjs','Disposable','UniverProCollaborationClient','IConfigService','UNRECOGNIZED','object','saveCommentToSnapshot','unitId','resolveComment','YYYY/MM/DD\x20HH:mm','@univerjs/thread-comment-ui','_init','addUser','11696900KyexYi','disposeWithMe','parentId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','110468qWMkeQ','defineProperty','forEach','code','updateComment','_config','replyId','threadId','pipe','UniverNetwork','length','comments','requireSession','onReady','userId','listComments','error','format','UniverThreadComment','rangeType','comment','Edit','Delete','601321oFmPdo','Add','add','createTimestamp','deleteComment','@univerjs/thread-comment','_httpService','subscribe','OpenOrReOpen','3059602faIqll','onStarting','dayjs','/add','Unknown','UniverProThreadCommentDatasource','Inject','UniverInstanceType','UniverProLicense','users','COMMENT','setConfig','UniverThreadCommentUi','getMemberID','delete','Solve','_threadCommentModel','8oQyjSA','user','type','body','toStringTag','rangeId','amd','_sessionService','pluginName','getUnit','/delete','UniverLicensePlugin','commentUpdate$','dataSource','Reply','root','_initUserSync','/reply','Injector','@univerjs-pro/collaboration-client','post','_injector','@univerjs/core','getOwnPropertyDescriptor','filter','addComment','HTTPService','_userService','@univerjs-pro/license','120kvjrlH','84oUXNeg','solved','get','customRanges','personId','_configService','UserManagerService','Plugin','2674179JoeeQz','/universer-api/user/list','UNIVER_UNKNOWN','Solved','1353648kbxZdo','userID','function','thread-comment-data-source.config','198515vgKxPS','parse','CustomRangeType','/solved','_threadCommentDataSource','symbol','stringify','_initDataSource','_commentService','find','/universer-api/comment/unit/','_threadCommentDataSourceService','replies','payload','getComment','content','UniverThreadCommentDataSourcePlugin','UniverCollaborationClientPlugin','CommentService','map'];_0x26eb=function(){return _0x384bbe;};return _0x26eb();}function _0x5d93(_0x572b6c,_0x1b5639){const _0x26eb6c=_0x26eb();return _0x5d93=function(_0x5d93bc,_0x49f7b6){_0x5d93bc=_0x5d93bc-0x12d;let _0xa76e9e=_0x26eb6c[_0x5d93bc];return _0xa76e9e;},_0x5d93(_0x572b6c,_0x1b5639);}(function(_0x4b9a23,_0x360406){const _0x23a188=_0x5d93,_0x45b82a=_0x4b9a23();while(!![]){try{const _0x5bbfd9=-parseInt(_0x23a188(0x196))/0x1+parseInt(_0x23a188(0x154))/0x2+parseInt(_0x23a188(0x148))/0x3*(parseInt(_0x23a188(0x17f))/0x4)+parseInt(_0x23a188(0x158))/0x5*(-parseInt(_0x23a188(0x147))/0x6)+-parseInt(_0x23a188(0x19f))/0x7+-parseInt(_0x23a188(0x1b0))/0x8*(parseInt(_0x23a188(0x150))/0x9)+parseInt(_0x23a188(0x17b))/0xa;if(_0x5bbfd9===_0x360406)break;else _0x45b82a['push'](_0x45b82a['shift']());}catch(_0x5d4dec){_0x45b82a['push'](_0x45b82a['shift']());}}}(_0x26eb,0x77ad0),function(_0x2673ac,_0x18786b){const _0x1a072d=_0x5d93;typeof exports==_0x1a072d(0x173)&&typeof module<'u'?_0x18786b(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==_0x1a072d(0x156)&&define[_0x1a072d(0x130)]?define(['exports',_0x1a072d(0x13d),_0x1a072d(0x146),_0x1a072d(0x140),_0x1a072d(0x178),_0x1a072d(0x19b),_0x1a072d(0x16e),'@univerjs/network'],_0x18786b):(_0x2673ac=typeof globalThis<'u'?globalThis:_0x2673ac||self,_0x18786b(_0x2673ac[_0x1a072d(0x1a4)]={},_0x2673ac[_0x1a072d(0x170)],_0x2673ac[_0x1a072d(0x1a7)],_0x2673ac['UniverCore'],_0x2673ac[_0x1a072d(0x1ab)],_0x2673ac[_0x1a072d(0x191)],_0x2673ac[_0x1a072d(0x16e)],_0x2673ac[_0x1a072d(0x188)]));}(this,function(_0x3a087b,_0x323a48,_0x575afd,_0x19df08,_0x16314d,_0x421745,_0x3762e0,_0x446d9c){'use strict';const _0x52621c=_0x5d93;const _0x2f1353=_0x52621c(0x17e);var _0x48d075=(_0x2f6aea=>(_0x2f6aea[_0x2f6aea[_0x52621c(0x19e)]=0x0]='OpenOrReOpen',_0x2f6aea[_0x2f6aea[_0x52621c(0x153)]=0x1]=_0x52621c(0x153),_0x2f6aea[_0x2f6aea['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2f6aea))(_0x48d075||{}),_0x28aaad=(_0x457d9e=>(_0x457d9e[_0x457d9e[_0x52621c(0x1a3)]=0x0]=_0x52621c(0x1a3),_0x457d9e[_0x457d9e[_0x52621c(0x197)]=0x1]='Add',_0x457d9e[_0x457d9e['Reply']=0x2]=_0x52621c(0x138),_0x457d9e[_0x457d9e[_0x52621c(0x194)]=0x3]='Edit',_0x457d9e[_0x457d9e[_0x52621c(0x195)]=0x4]=_0x52621c(0x195),_0x457d9e[_0x457d9e[_0x52621c(0x1ae)]=0x5]=_0x52621c(0x1ae),_0x457d9e[_0x457d9e[_0x52621c(0x172)]=-0x1]=_0x52621c(0x172),_0x457d9e))(_0x28aaad||{});const _0x217280=_0x474528=>_0x19df08[_0x52621c(0x1a1)](new Date(+_0x474528))[_0x52621c(0x190)](_0x52621c(0x177)),_0x32d475=async(_0x30ee5c,_0x194c70)=>{const _0x3ea5a2=_0x52621c,_0x406fd7=_0x30ee5c['get'](_0x19df08[_0x3ea5a2(0x14e)]),_0x47f38f=_0x30ee5c[_0x3ea5a2(0x14a)](_0x446d9c[_0x3ea5a2(0x144)]);_0x194c70[_0x3ea5a2(0x181)](_0x4045f1=>{const _0x1aba79=_0x3ea5a2;_0x406fd7['getUser'](_0x4045f1)&&_0x194c70[_0x1aba79(0x1ad)](_0x4045f1);}),_0x194c70[_0x3ea5a2(0x16d)]&&(await _0x47f38f['get'](_0x3ea5a2(0x151),{'params':{'userIDs':[..._0x194c70]}}))[_0x3ea5a2(0x12d)][_0x3ea5a2(0x1a8)][_0x3ea5a2(0x181)](_0x23bba0=>{const _0x1cc050=_0x3ea5a2;_0x23bba0&&_0x406fd7[_0x1cc050(0x17a)](_0x23bba0);});};var _0x1dbe4d=Object[_0x52621c(0x141)],_0x254c2d=(_0x3edbce,_0xa07762,_0xb014b9,_0x3e347e)=>{const _0x373a31=_0x52621c;for(var _0x3230a0=_0x3e347e>0x1?void 0x0:_0x3e347e?_0x1dbe4d(_0xa07762,_0xb014b9):_0xa07762,_0x41ccef=_0x3edbce[_0x373a31(0x189)]-0x1,_0x5f4aa2;_0x41ccef>=0x0;_0x41ccef--)(_0x5f4aa2=_0x3edbce[_0x41ccef])&&(_0x3230a0=_0x5f4aa2(_0x3230a0)||_0x3230a0);return _0x3230a0;},_0x13ff24=(_0x187597,_0x315d76)=>(_0x26d958,_0x37e28a)=>_0x315d76(_0x26d958,_0x37e28a,_0x187597);let _0x26214a=class extends _0x19df08[_0x52621c(0x16f)]{constructor(_0x570951,_0x52a93c,_0x45f3cb,_0x59d76f){const _0x49df0e=_0x52621c;super(),this[_0x49df0e(0x160)]=_0x570951,this['_threadCommentModel']=_0x52a93c,this[_0x49df0e(0x145)]=_0x45f3cb,this[_0x49df0e(0x13f)]=_0x59d76f,this[_0x49df0e(0x179)](),this[_0x49df0e(0x13a)]();}[_0x52621c(0x13a)](){const _0x4e2eef=_0x52621c;this[_0x4e2eef(0x17c)](this[_0x4e2eef(0x1af)][_0x4e2eef(0x136)][_0x4e2eef(0x187)](_0x3762e0['bufferTime'](0x10))[_0x4e2eef(0x19d)](_0xa89dd8=>{const _0x41334b=_0x4e2eef,_0x103c44=new Set();_0xa89dd8[_0x41334b(0x181)](_0x6f78c8=>{const _0x270579=_0x41334b;switch(_0x6f78c8['type']){case _0x270579(0x198):{const _0x5e0f48=_0x6f78c8[_0x270579(0x165)][_0x270579(0x14c)];_0x103c44[_0x270579(0x198)](_0x5e0f48);break;}}}),_0x32d475(this[_0x41334b(0x13f)],_0x103c44);}));}[_0x52621c(0x179)](){const _0x10fab2=_0x52621c;this[_0x10fab2(0x17c)](this[_0x10fab2(0x160)][_0x10fab2(0x136)][_0x10fab2(0x19d)](async _0x5d8010=>{const _0x7ea267=_0x10fab2;var _0x2497a6,_0x87ec51,_0x16548f,_0x3dd121;const _0x256206=(_0x2497a6=this[_0x7ea267(0x1af)][_0x7ea267(0x133)](_0x5d8010[_0x7ea267(0x175)])[_0x7ea267(0x161)](_0x534e25=>_0x534e25[_0x7ea267(0x186)]===_0x5d8010['threadId']))==null?void 0x0:_0x2497a6[_0x7ea267(0x139)];if(!_0x256206)return;const {unitId:_0x358949,subUnitId:_0x31f582}=_0x256206;switch(_0x5d8010[_0x7ea267(0x1b1)]&&this[_0x7ea267(0x145)][_0x7ea267(0x17a)](_0x5d8010[_0x7ea267(0x1b1)]),_0x5d8010[_0x7ea267(0x1b2)]){case _0x28aaad[_0x7ea267(0x197)]:break;case _0x28aaad[_0x7ea267(0x138)]:{this[_0x7ea267(0x1af)][_0x7ea267(0x143)](_0x358949,_0x31f582,{'unitId':_0x358949,'subUnitId':_0x31f582,'ref':'','id':_0x5d8010[_0x7ea267(0x185)],'dT':_0x217280(+_0x5d8010['createTimestamp']),'threadId':_0x5d8010['threadId'],'personId':(_0x16548f=(_0x87ec51=_0x5d8010[_0x7ea267(0x1b1)])==null?void 0x0:_0x87ec51[_0x7ea267(0x155)])!=null?_0x16548f:_0x5d8010['userId'],'text':JSON[_0x7ea267(0x159)](_0x5d8010[_0x7ea267(0x167)]),'parentId':_0x256206['id']});break;}case _0x28aaad[_0x7ea267(0x195)]:{const _0x56107e=this[_0x7ea267(0x1af)][_0x7ea267(0x166)](_0x358949,_0x31f582,_0x5d8010[_0x7ea267(0x185)]);_0x56107e&&_0x56107e[_0x7ea267(0x17d)]&&this['_threadCommentModel'][_0x7ea267(0x19a)](_0x358949,_0x31f582,_0x5d8010[_0x7ea267(0x185)]);break;}case _0x28aaad[_0x7ea267(0x194)]:{this['_threadCommentModel'][_0x7ea267(0x183)](_0x358949,_0x31f582,{'commentId':_0x5d8010['replyId'],'text':JSON[_0x7ea267(0x159)](_0x5d8010[_0x7ea267(0x167)])});break;}case _0x28aaad[_0x7ea267(0x1ae)]:{const _0x58eaae=(_0x3dd121=this[_0x7ea267(0x1af)][_0x7ea267(0x133)](_0x5d8010[_0x7ea267(0x175)])['find'](_0x5d04c2=>_0x5d04c2[_0x7ea267(0x186)]===_0x5d8010[_0x7ea267(0x186)]))==null?void 0x0:_0x3dd121[_0x7ea267(0x139)];_0x58eaae&&this[_0x7ea267(0x1af)][_0x7ea267(0x176)](_0x358949,_0x31f582,_0x58eaae['id'],_0x5d8010[_0x7ea267(0x149)]===_0x48d075[_0x7ea267(0x153)]);break;}}}));}};_0x26214a=_0x254c2d([_0x13ff24(0x0,_0x19df08[_0x52621c(0x1a5)](_0x323a48[_0x52621c(0x16a)])),_0x13ff24(0x1,_0x19df08[_0x52621c(0x1a5)](_0x421745['ThreadCommentModel'])),_0x13ff24(0x2,_0x19df08[_0x52621c(0x1a5)](_0x19df08[_0x52621c(0x14e)])),_0x13ff24(0x3,_0x19df08['Inject'](_0x19df08[_0x52621c(0x13c)]))],_0x26214a);const _0x4b3d2e=_0x52621c(0x157),_0x2d7ec7={};var _0x20ab17=Object[_0x52621c(0x141)],_0x2b26b3=(_0x1406d3,_0x5635b0,_0x562926,_0x432411)=>{const _0x51ad3e=_0x52621c;for(var _0x13ae4b=_0x432411>0x1?void 0x0:_0x432411?_0x20ab17(_0x5635b0,_0x562926):_0x5635b0,_0x2a4a82=_0x1406d3[_0x51ad3e(0x189)]-0x1,_0x5663e9;_0x2a4a82>=0x0;_0x2a4a82--)(_0x5663e9=_0x1406d3[_0x2a4a82])&&(_0x13ae4b=_0x5663e9(_0x13ae4b)||_0x13ae4b);return _0x13ae4b;},_0xd97f5e=(_0x15a147,_0x3a4e9b)=>(_0x512065,_0x49724b)=>_0x3a4e9b(_0x512065,_0x49724b,_0x15a147);function _0x5183c8(_0x1be41b,_0x3de3b6){const _0x1b42bb=_0x52621c,_0x26c5e9=_0x1be41b[_0x1b42bb(0x164)][0x0];return{..._0x3de3b6,'id':_0x26c5e9[_0x1b42bb(0x185)],'resolved':_0x1be41b[_0x1b42bb(0x149)]===0x1,'dT':_0x217280(_0x26c5e9[_0x1b42bb(0x199)]),'personId':_0x26c5e9[_0x1b42bb(0x18d)],'threadId':_0x26c5e9[_0x1b42bb(0x186)]};}function _0x3ab341(_0x25c4dd,_0x498fec,_0x2cb424){const _0x1010d0=_0x52621c;var _0x36f90d,_0x33ebf0;if(((_0x33ebf0=(_0x36f90d=_0x25c4dd==null?void 0x0:_0x25c4dd['replies'])==null?void 0x0:_0x36f90d[_0x1010d0(0x189)])!=null?_0x33ebf0:0x0)>0x0){const _0x11f92d=(_0x20d4a4,_0x44be6e)=>({'id':_0x20d4a4['replyId'],'threadId':_0x20d4a4['threadId'],'dT':_0x217280(_0x20d4a4[_0x1010d0(0x199)]),'personId':_0x20d4a4[_0x1010d0(0x18d)],'resolved':_0x25c4dd[_0x1010d0(0x149)]===_0x48d075['Solved'],'unitId':_0x498fec,'subUnitId':_0x2cb424,'text':JSON[_0x1010d0(0x159)](_0x20d4a4[_0x1010d0(0x167)]),'parentId':_0x44be6e}),_0x5f1f47=_0x11f92d(_0x25c4dd[_0x1010d0(0x164)][0x0]);return{..._0x5f1f47,'children':_0x25c4dd[_0x1010d0(0x164)]['slice'](0x1)[_0x1010d0(0x16b)](_0x3aa11c=>_0x11f92d(_0x3aa11c,_0x5f1f47['id']))};}return null;}let _0x2e7e20=class{constructor(_0x3d78b9,_0x1db7dd,_0x5cd356){const _0x439ff4=_0x52621c;this[_0x439ff4(0x19c)]=_0x3d78b9,this[_0x439ff4(0x145)]=_0x1db7dd,this[_0x439ff4(0x131)]=_0x5cd356;}async[_0x52621c(0x143)](_0x1e2f31){const _0x5a3be3=_0x52621c;var _0x4b2ee0,_0x17f2fa;const {parentId:_0x1241fb,unitId:_0x13b7ee,text:_0x47abb2,threadId:_0x2b1a5d}=_0x1e2f31,_0x35d0a3=(_0x17f2fa=(_0x4b2ee0=_0x47abb2[_0x5a3be3(0x14b)])==null?void 0x0:_0x4b2ee0['filter'](_0x461fed=>_0x461fed[_0x5a3be3(0x192)]===_0x19df08[_0x5a3be3(0x15a)][_0x5a3be3(0x1a9)])[_0x5a3be3(0x16b)](_0x3bc4de=>_0x3bc4de[_0x5a3be3(0x12f)]))!=null?_0x17f2fa:[],_0x50e493=JSON[_0x5a3be3(0x15e)](_0x47abb2),_0x449137=(await this[_0x5a3be3(0x131)][_0x5a3be3(0x18b)](_0x13b7ee))['getMemberID']();if(_0x1241fb){const _0x4c020c={'memberId':_0x449137,'unitId':_0x13b7ee,'content':_0x50e493,'mention':_0x35d0a3,'threadId':_0x2b1a5d},_0x5e5051=(await this[_0x5a3be3(0x19c)][_0x5a3be3(0x13e)](_0x5a3be3(0x162)+_0x13b7ee+_0x5a3be3(0x13b),{'body':_0x4c020c}))['body']['reply'];return{..._0x1e2f31,'id':_0x5e5051[_0x5a3be3(0x185)],'dT':_0x19df08[_0x5a3be3(0x1a1)](+_0x5e5051[_0x5a3be3(0x199)])[_0x5a3be3(0x190)](_0x5a3be3(0x177)),'personId':_0x5e5051['userId']};}else{const _0x56b19e={'memberId':_0x449137,'unitId':_0x13b7ee,'content':_0x50e493,'mention':_0x35d0a3},_0x24606f=await this[_0x5a3be3(0x19c)][_0x5a3be3(0x13e)](_0x5a3be3(0x162)+_0x13b7ee+_0x5a3be3(0x1a2),{'body':_0x56b19e});return _0x5183c8(_0x24606f[_0x5a3be3(0x12d)][_0x5a3be3(0x193)],_0x1e2f31);}}async['updateComment'](_0x339b14){const _0x12df87=_0x52621c;var _0x14cb54,_0x3bfb85;const {text:_0x3b8059,unitId:_0x1e867d}=_0x339b14,_0x18b0e2=(_0x3bfb85=(_0x14cb54=_0x3b8059[_0x12df87(0x14b)])==null?void 0x0:_0x14cb54[_0x12df87(0x142)](_0x3d7025=>_0x3d7025[_0x12df87(0x192)]===_0x19df08[_0x12df87(0x15a)]['COMMENT'])[_0x12df87(0x16b)](_0x178d84=>_0x178d84['rangeId']))!=null?_0x3bfb85:[],_0xc6fb10=JSON['stringify'](_0x3b8059),_0x815b9f=_0x339b14[_0x12df87(0x186)],_0x1d98cc=_0x339b14['id'],_0x4a5116={'memberId':(await this[_0x12df87(0x131)][_0x12df87(0x18b)](_0x1e867d))[_0x12df87(0x1ac)](),'unitId':_0x1e867d,'threadId':_0x815b9f,'mention':_0x18b0e2,'content':_0xc6fb10,'replyId':_0x1d98cc},_0x15a7bf=await this[_0x12df87(0x19c)][_0x12df87(0x13e)](_0x12df87(0x162)+_0x1e867d+'/edit',{'body':_0x4a5116});return!_0x15a7bf[_0x12df87(0x12d)][_0x12df87(0x18f)]||_0x15a7bf['body']['error'][_0x12df87(0x182)]===0x1;}async['resolveComment'](_0x178e51){const _0xc45704=_0x52621c,{unitId:_0x48a285}=_0x178e51,_0x5474f5=_0x178e51[_0xc45704(0x186)],_0x3f3a0f={'memberId':this[_0xc45704(0x145)]['getCurrentUser']()[_0xc45704(0x155)],'unitId':_0x48a285,'threadId':_0x5474f5,'solved':_0x178e51['resolved']?_0x48d075[_0xc45704(0x153)]:_0x48d075[_0xc45704(0x19e)]},_0x588aa8=await this['_httpService']['post'](_0xc45704(0x162)+_0x48a285+_0xc45704(0x15b),{'body':_0x3f3a0f});return!_0x588aa8[_0xc45704(0x12d)][_0xc45704(0x18f)]||_0x588aa8[_0xc45704(0x12d)]['error'][_0xc45704(0x182)]===0x1;}async[_0x52621c(0x19a)](_0x3ffa4f,_0x3d8a84,_0x4a1078,_0x2dde06){const _0x10e3a9=_0x52621c,_0xa1019f={'memberId':(await this[_0x10e3a9(0x131)][_0x10e3a9(0x18b)](_0x3ffa4f))[_0x10e3a9(0x1ac)](),'threadId':_0x4a1078,'replyId':_0x2dde06,'unitId':_0x3ffa4f},_0xb4896b=await this[_0x10e3a9(0x19c)][_0x10e3a9(0x13e)](_0x10e3a9(0x162)+_0x3ffa4f+_0x10e3a9(0x134),{'body':_0xa1019f});return!_0xb4896b['body'][_0x10e3a9(0x18f)]||_0xb4896b[_0x10e3a9(0x12d)]['error']['code']===0x1;}async[_0x52621c(0x18e)](_0x373ef7,_0x3fc767,_0x3c4035){const _0x290ec2=_0x52621c,_0x4f23a0={'unitId':_0x373ef7,'threadId':_0x3c4035},_0x59f2a4=await this['_httpService'][_0x290ec2(0x13e)](_0x290ec2(0x162)+_0x373ef7+'/list',{'body':_0x4f23a0}),_0x25f204=_0x3c4035[_0x290ec2(0x16b)](_0x4ddbfd=>_0x3ab341(_0x59f2a4[_0x290ec2(0x12d)][_0x290ec2(0x18a)][_0x4ddbfd],_0x373ef7,_0x3fc767))[_0x290ec2(0x142)](Boolean);return Object['values'](_0x59f2a4['body'][_0x290ec2(0x1a8)])[_0x290ec2(0x181)](_0x26214c=>{this['_userService']['addUser'](_0x26214c);}),_0x25f204;}[_0x52621c(0x174)](_0x327c0c){const _0x331c13=_0x52621c;return{'id':_0x327c0c['id'],'threadId':_0x327c0c[_0x331c13(0x186)],'ref':_0x327c0c['ref']};}};_0x2e7e20=_0x2b26b3([_0xd97f5e(0x0,_0x19df08[_0x52621c(0x1a5)](_0x446d9c[_0x52621c(0x144)])),_0xd97f5e(0x1,_0x19df08[_0x52621c(0x1a5)](_0x19df08[_0x52621c(0x14e)])),_0xd97f5e(0x2,_0x19df08[_0x52621c(0x1a5)](_0x323a48['CollaborationSessionService']))],_0x2e7e20);var _0x42232d=Object[_0x52621c(0x141)],_0x3836f6=(_0x14f681,_0x2bd2a4,_0x2c8c66,_0x5b68bb)=>{for(var _0x2c6340=_0x5b68bb>0x1?void 0x0:_0x5b68bb?_0x42232d(_0x2bd2a4,_0x2c8c66):_0x2bd2a4,_0x50b346=_0x14f681['length']-0x1,_0x565f3c;_0x50b346>=0x0;_0x50b346--)(_0x565f3c=_0x14f681[_0x50b346])&&(_0x2c6340=_0x565f3c(_0x2c6340)||_0x2c6340);return _0x2c6340;},_0x4ab953=(_0x5c6fb7,_0x254208)=>(_0x25a362,_0x2a4a1b)=>_0x254208(_0x25a362,_0x2a4a1b,_0x5c6fb7);let _0x5ec874=class extends _0x19df08[_0x52621c(0x16f)]{constructor(_0x8cb54e,_0x5de5f0){const _0x425452=_0x52621c;super(),this['_threadCommentDataSourceService']=_0x8cb54e,this[_0x425452(0x15c)]=_0x5de5f0,this[_0x425452(0x15f)]();}['_initDataSource'](){const _0x5348e1=_0x52621c;this['_threadCommentDataSourceService'][_0x5348e1(0x137)]=this['_threadCommentDataSource'],this[_0x5348e1(0x163)]['syncUpdateMutationToColla']=!0x1;}};_0x5ec874=_0x3836f6([_0x4ab953(0x0,_0x421745[_0x52621c(0x16c)]),_0x4ab953(0x1,_0x19df08[_0x52621c(0x1a5)](_0x2e7e20))],_0x5ec874);var _0x4c04c5=Object[_0x52621c(0x180)],_0x3e63bb=Object['getOwnPropertyDescriptor'],_0x1f131f=(_0x38f7ab,_0x38fb0c,_0xc45e0)=>_0x38fb0c in _0x38f7ab?_0x4c04c5(_0x38f7ab,_0x38fb0c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xc45e0}):_0x38f7ab[_0x38fb0c]=_0xc45e0,_0x17f52f=(_0xe783a7,_0x2ab9b0,_0xb2df55,_0x47a416)=>{const _0x19cee6=_0x52621c;for(var _0xd845e4=_0x47a416>0x1?void 0x0:_0x47a416?_0x3e63bb(_0x2ab9b0,_0xb2df55):_0x2ab9b0,_0x5e2687=_0xe783a7[_0x19cee6(0x189)]-0x1,_0x12e7a4;_0x5e2687>=0x0;_0x5e2687--)(_0x12e7a4=_0xe783a7[_0x5e2687])&&(_0xd845e4=_0x12e7a4(_0xd845e4)||_0xd845e4);return _0xd845e4;},_0x1b8b4d=(_0x7c6f04,_0x38886f)=>(_0x569c23,_0x32b914)=>_0x38886f(_0x569c23,_0x32b914,_0x7c6f04),_0x4130b6=(_0x44c847,_0x5990de,_0xf325f5)=>_0x1f131f(_0x44c847,typeof _0x5990de!=_0x52621c(0x15d)?_0x5990de+'':_0x5990de,_0xf325f5);_0x3a087b[_0x52621c(0x168)]=class extends _0x19df08[_0x52621c(0x14f)]{constructor(_0x4608b7=_0x2d7ec7,_0x30aa3e,_0x48a0fd){const _0x3e544d=_0x52621c;super(),this[_0x3e544d(0x184)]=_0x4608b7,this[_0x3e544d(0x13f)]=_0x30aa3e,this[_0x3e544d(0x14d)]=_0x48a0fd;const {..._0x59b1d8}=_0x19df08['merge']({},_0x2d7ec7,this[_0x3e544d(0x184)]);this[_0x3e544d(0x14d)][_0x3e544d(0x1aa)](_0x4b3d2e,_0x59b1d8);}[_0x52621c(0x1a0)](){const _0xd64399=_0x52621c;[[_0x2e7e20],[_0x5ec874],[_0x26214a]][_0xd64399(0x181)](_0x19ff3c=>{const _0x41296d=_0xd64399;this['_injector'][_0x41296d(0x198)](_0x19ff3c);});}[_0x52621c(0x18c)](){const _0xed3f3c=_0x52621c;this[_0xed3f3c(0x13f)]['get'](_0x5ec874),this[_0xed3f3c(0x13f)][_0xed3f3c(0x14a)](_0x26214a);}},_0x4130b6(_0x3a087b[_0x52621c(0x168)],_0x52621c(0x132),_0x2f1353),_0x4130b6(_0x3a087b['UniverThreadCommentDataSourcePlugin'],_0x52621c(0x1b2),_0x19df08[_0x52621c(0x1a6)][_0x52621c(0x152)]),_0x3a087b[_0x52621c(0x168)]=_0x17f52f([_0x19df08['DependentOn'](_0x16314d['UniverThreadCommentUIPlugin'],_0x323a48[_0x52621c(0x169)],_0x575afd[_0x52621c(0x135)]),_0x1b8b4d(0x1,_0x19df08['Inject'](_0x19df08[_0x52621c(0x13c)])),_0x1b8b4d(0x2,_0x19df08[_0x52621c(0x171)])],_0x3a087b['UniverThreadCommentDataSourcePlugin']),Object[_0x52621c(0x180)](_0x3a087b,Symbol[_0x52621c(0x12e)],{'value':'Module'});}));
1
+ function _0xe752(){const _0x35c6ed=['_httpService','pluginName','resolved','userID','format','customRanges','comments','payload','length','_userService','updateComment','body','IConfigService','7QJxPFr','UniverThreadCommentDataSourcePlugin','ref','2920HMFhyV','post','UserManagerService','getUser','addComment','find','YYYY/MM/DD\x20HH:mm','rxjs','HTTPService','UNRECOGNIZED','forEach','Add','UniverProThreadCommentDatasource','UniverThreadCommentUIPlugin','replies','21009giPiEw','/universer-api/user/list','onReady','_init','map','root','185046oAoGAg','syncUpdateMutationToColla','CommentService','filter','/reply','_threadCommentDataSourceService','threadId','UNIVER_UNKNOWN','getOwnPropertyDescriptor','thread-comment-data-source.config','replyId','_threadCommentModel','getCurrentUser','comment','code','_initDataSource','COMMENT','UniverCore','onStarting','Delete','IThreadCommentDataSourceService','getUnit','Unknown','listComments','_threadCommentDataSource','3028280pfLkuC','defineProperty','@univerjs-pro/collaboration-client','@univerjs-pro/license','slice','Solved','783jrHwqq','168Qbvrpy','42IzgPEH','Reply','Solve','user','toStringTag','requireSession','1729507BqCRUf','rangeId','content','UniverThreadComment','UniverProCollaborationClient','@univerjs/thread-comment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','get','error','@univerjs/network','size','/edit','1608770kgYgWv','_initUserSync','reply','_config','unitId','/delete','UniverCollaborationClientPlugin','merge','getMemberID','CollaborationSessionService','subscribe','parse','resolveComment','type','rangeType','function','personId','@univerjs/thread-comment-ui','UniverThreadCommentUi','addUser','/add','Inject','11EFHixa','OpenOrReOpen','/universer-api/comment/unit/','Plugin','CustomRangeType','amd','values','add','_sessionService','52148wTXspw','ThreadCommentModel','_injector','userId','UniverInstanceType','Injector','_configService','12PmLEDZ','createTimestamp','UniverProLicense','Edit','_commentService','stringify','solved','bufferTime','disposeWithMe','deleteComment'];_0xe752=function(){return _0x35c6ed;};return _0xe752();}function _0x11ed(_0x2a8581,_0x13d0f4){const _0xe7520d=_0xe752();return _0x11ed=function(_0x11ede0,_0x380ae4){_0x11ede0=_0x11ede0-0x126;let _0x3559cd=_0xe7520d[_0x11ede0];return _0x3559cd;},_0x11ed(_0x2a8581,_0x13d0f4);}(function(_0x249d2b,_0x261882){const _0x17e78d=_0x11ed,_0x2ed17d=_0x249d2b();while(!![]){try{const _0x2d281a=-parseInt(_0x17e78d(0x129))/0x1*(-parseInt(_0x17e78d(0x193))/0x2)+parseInt(_0x17e78d(0x13b))/0x3*(parseInt(_0x17e78d(0x161))/0x4)+-parseInt(_0x17e78d(0x174))/0x5+parseInt(_0x17e78d(0x141))/0x6*(-parseInt(_0x17e78d(0x162))/0x7)+-parseInt(_0x17e78d(0x12c))/0x8*(-parseInt(_0x17e78d(0x160))/0x9)+parseInt(_0x17e78d(0x15a))/0xa*(parseInt(_0x17e78d(0x18a))/0xb)+parseInt(_0x17e78d(0x19a))/0xc*(-parseInt(_0x17e78d(0x168))/0xd);if(_0x2d281a===_0x261882)break;else _0x2ed17d['push'](_0x2ed17d['shift']());}catch(_0x1ba9b0){_0x2ed17d['push'](_0x2ed17d['shift']());}}}(_0xe752,0x29d7c),function(_0x510b48,_0x5e953a){const _0x2c5d83=_0x11ed;typeof exports=='object'&&typeof module<'u'?_0x5e953a(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==_0x2c5d83(0x183)&&define[_0x2c5d83(0x18f)]?define(['exports',_0x2c5d83(0x15c),_0x2c5d83(0x15d),'@univerjs/core',_0x2c5d83(0x185),_0x2c5d83(0x16d),_0x2c5d83(0x133),_0x2c5d83(0x171)],_0x5e953a):(_0x510b48=typeof globalThis<'u'?globalThis:_0x510b48||self,_0x5e953a(_0x510b48[_0x2c5d83(0x138)]={},_0x510b48[_0x2c5d83(0x16c)],_0x510b48[_0x2c5d83(0x19c)],_0x510b48[_0x2c5d83(0x152)],_0x510b48[_0x2c5d83(0x186)],_0x510b48[_0x2c5d83(0x16b)],_0x510b48['rxjs'],_0x510b48['UniverNetwork']));}(this,function(_0x3f0201,_0x3e7f8d,_0xcaf0b5,_0x4541aa,_0x3fd8df,_0x17029c,_0x5c575e,_0x59e69e){'use strict';const _0xa175d2=_0x11ed;const _0x514d6d=_0xa175d2(0x16e);var _0x25c01c=(_0x1bb025=>(_0x1bb025[_0x1bb025[_0xa175d2(0x18b)]=0x0]=_0xa175d2(0x18b),_0x1bb025[_0x1bb025[_0xa175d2(0x15f)]=0x1]=_0xa175d2(0x15f),_0x1bb025[_0x1bb025[_0xa175d2(0x135)]=-0x1]='UNRECOGNIZED',_0x1bb025))(_0x25c01c||{}),_0x114359=(_0x3d1c9a=>(_0x3d1c9a[_0x3d1c9a[_0xa175d2(0x157)]=0x0]='Unknown',_0x3d1c9a[_0x3d1c9a[_0xa175d2(0x137)]=0x1]=_0xa175d2(0x137),_0x3d1c9a[_0x3d1c9a[_0xa175d2(0x163)]=0x2]=_0xa175d2(0x163),_0x3d1c9a[_0x3d1c9a[_0xa175d2(0x19d)]=0x3]=_0xa175d2(0x19d),_0x3d1c9a[_0x3d1c9a[_0xa175d2(0x154)]=0x4]=_0xa175d2(0x154),_0x3d1c9a[_0x3d1c9a[_0xa175d2(0x164)]=0x5]='Solve',_0x3d1c9a[_0x3d1c9a[_0xa175d2(0x135)]=-0x1]='UNRECOGNIZED',_0x3d1c9a))(_0x114359||{});const _0x17da23=_0x3d5940=>_0x4541aa['dayjs'](new Date(+_0x3d5940))[_0xa175d2(0x1a8)](_0xa175d2(0x132)),_0x24e8fc=async(_0x4a368f,_0x29a569)=>{const _0x11ae78=_0xa175d2,_0x18d70e=_0x4a368f['get'](_0x4541aa[_0x11ae78(0x12e)]),_0x1bd31c=_0x4a368f[_0x11ae78(0x16f)](_0x59e69e[_0x11ae78(0x134)]);_0x29a569['forEach'](_0x2f7283=>{const _0x4dc02f=_0x11ae78;_0x18d70e[_0x4dc02f(0x12f)](_0x2f7283)&&_0x29a569['delete'](_0x2f7283);}),_0x29a569[_0x11ae78(0x172)]&&(await _0x1bd31c[_0x11ae78(0x16f)](_0x11ae78(0x13c),{'params':{'userIDs':[..._0x29a569]}}))[_0x11ae78(0x127)]['users']['forEach'](_0x573c5f=>{_0x573c5f&&_0x18d70e['addUser'](_0x573c5f);});};var _0x4cf3d7=Object[_0xa175d2(0x149)],_0x1cbe51=(_0x29e1e4,_0x3c773a,_0x145506,_0x1b6871)=>{const _0x5f2fad=_0xa175d2;for(var _0x5adf83=_0x1b6871>0x1?void 0x0:_0x1b6871?_0x4cf3d7(_0x3c773a,_0x145506):_0x3c773a,_0x33fb65=_0x29e1e4[_0x5f2fad(0x1ac)]-0x1,_0x3bc6de;_0x33fb65>=0x0;_0x33fb65--)(_0x3bc6de=_0x29e1e4[_0x33fb65])&&(_0x5adf83=_0x3bc6de(_0x5adf83)||_0x5adf83);return _0x5adf83;},_0x267ebe=(_0x12a38d,_0x93ebfa)=>(_0x2e0bc6,_0x33b8cb)=>_0x93ebfa(_0x2e0bc6,_0x33b8cb,_0x12a38d);let _0xcb0dba=class extends _0x4541aa['Disposable']{constructor(_0x17a837,_0x2b84ee,_0x597f70,_0x529bae){const _0x47aa86=_0xa175d2;super(),this[_0x47aa86(0x19e)]=_0x17a837,this[_0x47aa86(0x14c)]=_0x2b84ee,this[_0x47aa86(0x1ad)]=_0x597f70,this[_0x47aa86(0x195)]=_0x529bae,this[_0x47aa86(0x13e)](),this[_0x47aa86(0x175)]();}[_0xa175d2(0x175)](){const _0x53cfd8=_0xa175d2;this[_0x53cfd8(0x1a2)](this[_0x53cfd8(0x14c)]['commentUpdate$']['pipe'](_0x5c575e[_0x53cfd8(0x1a1)](0x10))[_0x53cfd8(0x17e)](_0x8e0e98=>{const _0x340cdd=_0x53cfd8,_0x4948ec=new Set();_0x8e0e98[_0x340cdd(0x136)](_0x160804=>{const _0x12ac4a=_0x340cdd;switch(_0x160804['type']){case'add':{const _0x438c5f=_0x160804[_0x12ac4a(0x1ab)][_0x12ac4a(0x184)];_0x4948ec[_0x12ac4a(0x191)](_0x438c5f);break;}}}),_0x24e8fc(this['_injector'],_0x4948ec);}));}['_init'](){const _0x40dba4=_0xa175d2;this['disposeWithMe'](this[_0x40dba4(0x19e)]['commentUpdate$']['subscribe'](async _0x369ec5=>{const _0x26feb1=_0x40dba4;var _0x3bea05,_0x239a41,_0x362e30,_0x54b311;const _0x4ca737=(_0x3bea05=this['_threadCommentModel'][_0x26feb1(0x156)](_0x369ec5[_0x26feb1(0x178)])[_0x26feb1(0x131)](_0x3fe87b=>_0x3fe87b['threadId']===_0x369ec5['threadId']))==null?void 0x0:_0x3bea05[_0x26feb1(0x140)];if(!_0x4ca737)return;const {unitId:_0x26571b,subUnitId:_0xe25e70}=_0x4ca737;switch(_0x369ec5['user']&&this[_0x26feb1(0x1ad)][_0x26feb1(0x187)](_0x369ec5[_0x26feb1(0x165)]),_0x369ec5['type']){case _0x114359[_0x26feb1(0x137)]:break;case _0x114359['Reply']:{this['_threadCommentModel'][_0x26feb1(0x130)](_0x26571b,_0xe25e70,{'unitId':_0x26571b,'subUnitId':_0xe25e70,'ref':'','id':_0x369ec5[_0x26feb1(0x14b)],'dT':_0x17da23(+_0x369ec5['createTimestamp']),'threadId':_0x369ec5[_0x26feb1(0x147)],'personId':(_0x362e30=(_0x239a41=_0x369ec5[_0x26feb1(0x165)])==null?void 0x0:_0x239a41[_0x26feb1(0x1a7)])!=null?_0x362e30:_0x369ec5[_0x26feb1(0x196)],'text':JSON[_0x26feb1(0x17f)](_0x369ec5[_0x26feb1(0x16a)]),'parentId':_0x4ca737['id']});break;}case _0x114359[_0x26feb1(0x154)]:{const _0x230632=this[_0x26feb1(0x14c)]['getComment'](_0x26571b,_0xe25e70,_0x369ec5[_0x26feb1(0x14b)]);_0x230632&&_0x230632['parentId']&&this[_0x26feb1(0x14c)][_0x26feb1(0x1a3)](_0x26571b,_0xe25e70,_0x369ec5['replyId']);break;}case _0x114359[_0x26feb1(0x19d)]:{this[_0x26feb1(0x14c)][_0x26feb1(0x126)](_0x26571b,_0xe25e70,{'commentId':_0x369ec5[_0x26feb1(0x14b)],'text':JSON[_0x26feb1(0x17f)](_0x369ec5[_0x26feb1(0x16a)])});break;}case _0x114359[_0x26feb1(0x164)]:{const _0x513824=(_0x54b311=this[_0x26feb1(0x14c)][_0x26feb1(0x156)](_0x369ec5[_0x26feb1(0x178)])['find'](_0x1f400d=>_0x1f400d['threadId']===_0x369ec5['threadId']))==null?void 0x0:_0x54b311[_0x26feb1(0x140)];_0x513824&&this['_threadCommentModel'][_0x26feb1(0x180)](_0x26571b,_0xe25e70,_0x513824['id'],_0x369ec5['solved']===_0x25c01c[_0x26feb1(0x15f)]);break;}}}));}};_0xcb0dba=_0x1cbe51([_0x267ebe(0x0,_0x4541aa[_0xa175d2(0x189)](_0x3e7f8d[_0xa175d2(0x143)])),_0x267ebe(0x1,_0x4541aa['Inject'](_0x17029c[_0xa175d2(0x194)])),_0x267ebe(0x2,_0x4541aa['Inject'](_0x4541aa[_0xa175d2(0x12e)])),_0x267ebe(0x3,_0x4541aa[_0xa175d2(0x189)](_0x4541aa['Injector']))],_0xcb0dba);const _0x3e9aad=_0xa175d2(0x14a),_0x5f1aa9={};var _0x41ae48=Object[_0xa175d2(0x149)],_0x4e43bd=(_0x216e1b,_0x5e43b5,_0x1d9cf6,_0xda7ceb)=>{const _0x119c78=_0xa175d2;for(var _0x39e3f0=_0xda7ceb>0x1?void 0x0:_0xda7ceb?_0x41ae48(_0x5e43b5,_0x1d9cf6):_0x5e43b5,_0x349e3b=_0x216e1b[_0x119c78(0x1ac)]-0x1,_0x1e27cb;_0x349e3b>=0x0;_0x349e3b--)(_0x1e27cb=_0x216e1b[_0x349e3b])&&(_0x39e3f0=_0x1e27cb(_0x39e3f0)||_0x39e3f0);return _0x39e3f0;},_0x469b75=(_0x181b7c,_0x1c02c4)=>(_0x558b89,_0x5cf764)=>_0x1c02c4(_0x558b89,_0x5cf764,_0x181b7c);function _0x4b5e9e(_0x3dba5f,_0xbe3a3){const _0x7dc43=_0xa175d2,_0x1eb795=_0x3dba5f[_0x7dc43(0x13a)][0x0];return{..._0xbe3a3,'id':_0x1eb795['replyId'],'resolved':_0x3dba5f[_0x7dc43(0x1a0)]===0x1,'dT':_0x17da23(_0x1eb795['createTimestamp']),'personId':_0x1eb795[_0x7dc43(0x196)],'threadId':_0x1eb795[_0x7dc43(0x147)]};}function _0x58f74b(_0x489223,_0x3bdab0,_0x285950){const _0x590e89=_0xa175d2;var _0x268ed8,_0x349c1f;if(((_0x349c1f=(_0x268ed8=_0x489223==null?void 0x0:_0x489223[_0x590e89(0x13a)])==null?void 0x0:_0x268ed8[_0x590e89(0x1ac)])!=null?_0x349c1f:0x0)>0x0){const _0x168cd4=(_0x1efb23,_0x156b77)=>({'id':_0x1efb23[_0x590e89(0x14b)],'threadId':_0x1efb23['threadId'],'dT':_0x17da23(_0x1efb23[_0x590e89(0x19b)]),'personId':_0x1efb23['userId'],'resolved':_0x489223[_0x590e89(0x1a0)]===_0x25c01c[_0x590e89(0x15f)],'unitId':_0x3bdab0,'subUnitId':_0x285950,'text':JSON[_0x590e89(0x17f)](_0x1efb23[_0x590e89(0x16a)]),'parentId':_0x156b77}),_0xeae19a=_0x168cd4(_0x489223[_0x590e89(0x13a)][0x0]);return{..._0xeae19a,'children':_0x489223[_0x590e89(0x13a)][_0x590e89(0x15e)](0x1)['map'](_0x4dc4ad=>_0x168cd4(_0x4dc4ad,_0xeae19a['id']))};}return null;}let _0x25037c=class{constructor(_0x1c2be3,_0x2935e7,_0x37e6e4){const _0x1dac42=_0xa175d2;this[_0x1dac42(0x1a4)]=_0x1c2be3,this['_userService']=_0x2935e7,this[_0x1dac42(0x192)]=_0x37e6e4;}async[_0xa175d2(0x130)](_0x47bcce){const _0x20082b=_0xa175d2;var _0x22c7a2,_0x5b7546;const {parentId:_0x3836ac,unitId:_0x14ab9c,text:_0x2d5136,threadId:_0xb77214}=_0x47bcce,_0x14cfd9=(_0x5b7546=(_0x22c7a2=_0x2d5136['customRanges'])==null?void 0x0:_0x22c7a2[_0x20082b(0x144)](_0x55663d=>_0x55663d[_0x20082b(0x182)]===_0x4541aa[_0x20082b(0x18e)][_0x20082b(0x151)])[_0x20082b(0x13f)](_0x32bdb2=>_0x32bdb2[_0x20082b(0x169)]))!=null?_0x5b7546:[],_0x245277=JSON[_0x20082b(0x19f)](_0x2d5136),_0x458f5d=(await this[_0x20082b(0x192)][_0x20082b(0x167)](_0x14ab9c))[_0x20082b(0x17c)]();if(_0x3836ac){const _0x8db81f={'memberId':_0x458f5d,'unitId':_0x14ab9c,'content':_0x245277,'mention':_0x14cfd9,'threadId':_0xb77214},_0x6e0b6d=(await this[_0x20082b(0x1a4)][_0x20082b(0x12d)](_0x20082b(0x18c)+_0x14ab9c+_0x20082b(0x145),{'body':_0x8db81f}))[_0x20082b(0x127)][_0x20082b(0x176)];return{..._0x47bcce,'id':_0x6e0b6d[_0x20082b(0x14b)],'dT':_0x4541aa['dayjs'](+_0x6e0b6d[_0x20082b(0x19b)])[_0x20082b(0x1a8)](_0x20082b(0x132)),'personId':_0x6e0b6d[_0x20082b(0x196)]};}else{const _0x2bcc96={'memberId':_0x458f5d,'unitId':_0x14ab9c,'content':_0x245277,'mention':_0x14cfd9},_0x130d75=await this[_0x20082b(0x1a4)][_0x20082b(0x12d)](_0x20082b(0x18c)+_0x14ab9c+_0x20082b(0x188),{'body':_0x2bcc96});return _0x4b5e9e(_0x130d75[_0x20082b(0x127)][_0x20082b(0x14e)],_0x47bcce);}}async[_0xa175d2(0x126)](_0x37784f){const _0x19b4ba=_0xa175d2;var _0x186420,_0x34093d;const {text:_0x2dd1c7,unitId:_0x4418c6}=_0x37784f,_0x5d9959=(_0x34093d=(_0x186420=_0x2dd1c7[_0x19b4ba(0x1a9)])==null?void 0x0:_0x186420[_0x19b4ba(0x144)](_0x234aa7=>_0x234aa7[_0x19b4ba(0x182)]===_0x4541aa[_0x19b4ba(0x18e)]['COMMENT'])[_0x19b4ba(0x13f)](_0xefadff=>_0xefadff[_0x19b4ba(0x169)]))!=null?_0x34093d:[],_0x437827=JSON[_0x19b4ba(0x19f)](_0x2dd1c7),_0x55980a=_0x37784f[_0x19b4ba(0x147)],_0x1047da=_0x37784f['id'],_0x9ab6a2={'memberId':(await this[_0x19b4ba(0x192)]['requireSession'](_0x4418c6))[_0x19b4ba(0x17c)](),'unitId':_0x4418c6,'threadId':_0x55980a,'mention':_0x5d9959,'content':_0x437827,'replyId':_0x1047da},_0x33281c=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x4418c6+_0x19b4ba(0x173),{'body':_0x9ab6a2});return!_0x33281c[_0x19b4ba(0x127)][_0x19b4ba(0x170)]||_0x33281c['body'][_0x19b4ba(0x170)][_0x19b4ba(0x14f)]===0x1;}async[_0xa175d2(0x180)](_0x4d9ef3){const _0x5389d6=_0xa175d2,{unitId:_0x5da677}=_0x4d9ef3,_0x491ec8=_0x4d9ef3['threadId'],_0x2e1964={'memberId':this[_0x5389d6(0x1ad)][_0x5389d6(0x14d)]()[_0x5389d6(0x1a7)],'unitId':_0x5da677,'threadId':_0x491ec8,'solved':_0x4d9ef3[_0x5389d6(0x1a6)]?_0x25c01c[_0x5389d6(0x15f)]:_0x25c01c[_0x5389d6(0x18b)]},_0x30c2ec=await this[_0x5389d6(0x1a4)]['post'](_0x5389d6(0x18c)+_0x5da677+'/solved',{'body':_0x2e1964});return!_0x30c2ec[_0x5389d6(0x127)][_0x5389d6(0x170)]||_0x30c2ec[_0x5389d6(0x127)]['error'][_0x5389d6(0x14f)]===0x1;}async[_0xa175d2(0x1a3)](_0xba6b08,_0x16f0d4,_0x34beb1,_0x4fc112){const _0x2a6950=_0xa175d2,_0x33b7cd={'memberId':(await this['_sessionService'][_0x2a6950(0x167)](_0xba6b08))[_0x2a6950(0x17c)](),'threadId':_0x34beb1,'replyId':_0x4fc112,'unitId':_0xba6b08},_0x40e601=await this['_httpService'][_0x2a6950(0x12d)]('/universer-api/comment/unit/'+_0xba6b08+_0x2a6950(0x179),{'body':_0x33b7cd});return!_0x40e601[_0x2a6950(0x127)][_0x2a6950(0x170)]||_0x40e601[_0x2a6950(0x127)][_0x2a6950(0x170)]['code']===0x1;}async[_0xa175d2(0x158)](_0x3db568,_0x4766a9,_0x5cc409){const _0x221a4e=_0xa175d2,_0x413415={'unitId':_0x3db568,'threadId':_0x5cc409},_0x5198b3=await this[_0x221a4e(0x1a4)][_0x221a4e(0x12d)]('/universer-api/comment/unit/'+_0x3db568+'/list',{'body':_0x413415}),_0x3523df=_0x5cc409[_0x221a4e(0x13f)](_0x5ea989=>_0x58f74b(_0x5198b3[_0x221a4e(0x127)][_0x221a4e(0x1aa)][_0x5ea989],_0x3db568,_0x4766a9))[_0x221a4e(0x144)](Boolean);return Object[_0x221a4e(0x190)](_0x5198b3['body']['users'])[_0x221a4e(0x136)](_0x29c1c9=>{const _0x16024f=_0x221a4e;this[_0x16024f(0x1ad)][_0x16024f(0x187)](_0x29c1c9);}),_0x3523df;}['saveCommentToSnapshot'](_0xb6b63a){const _0x53f7a6=_0xa175d2;return{'id':_0xb6b63a['id'],'threadId':_0xb6b63a[_0x53f7a6(0x147)],'ref':_0xb6b63a[_0x53f7a6(0x12b)]};}};_0x25037c=_0x4e43bd([_0x469b75(0x0,_0x4541aa[_0xa175d2(0x189)](_0x59e69e[_0xa175d2(0x134)])),_0x469b75(0x1,_0x4541aa['Inject'](_0x4541aa[_0xa175d2(0x12e)])),_0x469b75(0x2,_0x4541aa['Inject'](_0x3e7f8d[_0xa175d2(0x17d)]))],_0x25037c);var _0x4d29ae=Object[_0xa175d2(0x149)],_0x502d1c=(_0x1b66c8,_0x30c274,_0xb3ce01,_0x2e95d6)=>{const _0x3a10ea=_0xa175d2;for(var _0x177e3a=_0x2e95d6>0x1?void 0x0:_0x2e95d6?_0x4d29ae(_0x30c274,_0xb3ce01):_0x30c274,_0x313553=_0x1b66c8[_0x3a10ea(0x1ac)]-0x1,_0x255eb2;_0x313553>=0x0;_0x313553--)(_0x255eb2=_0x1b66c8[_0x313553])&&(_0x177e3a=_0x255eb2(_0x177e3a)||_0x177e3a);return _0x177e3a;},_0x4e7ef5=(_0x5c162d,_0x1971a0)=>(_0x3f938f,_0x420018)=>_0x1971a0(_0x3f938f,_0x420018,_0x5c162d);let _0x386bed=class extends _0x4541aa['Disposable']{constructor(_0x4b8c30,_0x110e45){const _0x1978c9=_0xa175d2;super(),this[_0x1978c9(0x146)]=_0x4b8c30,this[_0x1978c9(0x159)]=_0x110e45,this[_0x1978c9(0x150)]();}[_0xa175d2(0x150)](){const _0x1364be=_0xa175d2;this[_0x1364be(0x146)]['dataSource']=this[_0x1364be(0x159)],this[_0x1364be(0x146)][_0x1364be(0x142)]=!0x1;}};_0x386bed=_0x502d1c([_0x4e7ef5(0x0,_0x17029c[_0xa175d2(0x155)]),_0x4e7ef5(0x1,_0x4541aa['Inject'](_0x25037c))],_0x386bed);var _0x11b43f=Object[_0xa175d2(0x15b)],_0x46a3a1=Object['getOwnPropertyDescriptor'],_0x26a4b7=(_0x264370,_0x5b8896,_0x4fed76)=>_0x5b8896 in _0x264370?_0x11b43f(_0x264370,_0x5b8896,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4fed76}):_0x264370[_0x5b8896]=_0x4fed76,_0x57ed84=(_0x3dffc1,_0x15dd1c,_0x25dd6c,_0xc9f733)=>{const _0xaba6b8=_0xa175d2;for(var _0x2b45ab=_0xc9f733>0x1?void 0x0:_0xc9f733?_0x46a3a1(_0x15dd1c,_0x25dd6c):_0x15dd1c,_0x4f7192=_0x3dffc1[_0xaba6b8(0x1ac)]-0x1,_0x3f9088;_0x4f7192>=0x0;_0x4f7192--)(_0x3f9088=_0x3dffc1[_0x4f7192])&&(_0x2b45ab=_0x3f9088(_0x2b45ab)||_0x2b45ab);return _0x2b45ab;},_0x3c5daf=(_0x5b85c0,_0x3b8f0b)=>(_0x44778c,_0x57dc6c)=>_0x3b8f0b(_0x44778c,_0x57dc6c,_0x5b85c0),_0x44b5ca=(_0x52a653,_0x24b299,_0x57795f)=>_0x26a4b7(_0x52a653,typeof _0x24b299!='symbol'?_0x24b299+'':_0x24b299,_0x57795f);_0x3f0201[_0xa175d2(0x12a)]=class extends _0x4541aa[_0xa175d2(0x18d)]{constructor(_0x2c1030=_0x5f1aa9,_0xa12d,_0x406eea){const _0x33ac12=_0xa175d2;super(),this['_config']=_0x2c1030,this[_0x33ac12(0x195)]=_0xa12d,this['_configService']=_0x406eea;const {..._0x46f717}=_0x4541aa[_0x33ac12(0x17b)]({},_0x5f1aa9,this[_0x33ac12(0x177)]);this[_0x33ac12(0x199)]['setConfig'](_0x3e9aad,_0x46f717);}[_0xa175d2(0x153)](){const _0x3db094=_0xa175d2;[[_0x25037c],[_0x386bed],[_0xcb0dba]][_0x3db094(0x136)](_0xd093e4=>{const _0x489fb4=_0x3db094;this[_0x489fb4(0x195)][_0x489fb4(0x191)](_0xd093e4);});}[_0xa175d2(0x13d)](){const _0x3e3984=_0xa175d2;this[_0x3e3984(0x195)][_0x3e3984(0x16f)](_0x386bed),this[_0x3e3984(0x195)][_0x3e3984(0x16f)](_0xcb0dba);}},_0x44b5ca(_0x3f0201['UniverThreadCommentDataSourcePlugin'],_0xa175d2(0x1a5),_0x514d6d),_0x44b5ca(_0x3f0201[_0xa175d2(0x12a)],_0xa175d2(0x181),_0x4541aa[_0xa175d2(0x197)][_0xa175d2(0x148)]),_0x3f0201[_0xa175d2(0x12a)]=_0x57ed84([_0x4541aa['DependentOn'](_0x3fd8df[_0xa175d2(0x139)],_0x3e7f8d[_0xa175d2(0x17a)],_0xcaf0b5['UniverLicensePlugin']),_0x3c5daf(0x1,_0x4541aa[_0xa175d2(0x189)](_0x4541aa[_0xa175d2(0x198)])),_0x3c5daf(0x2,_0x4541aa[_0xa175d2(0x128)])],_0x3f0201[_0xa175d2(0x12a)]),Object[_0xa175d2(0x15b)](_0x3f0201,Symbol[_0xa175d2(0x166)],{'value':'Module'});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.10.3-nightly.202508150623",
3
+ "version": "0.10.4-nightly.202508220605",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,26 +45,26 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.10.3-nightly.202508150623",
49
- "@univerjs-pro/license": "0.10.3-nightly.202508150623",
50
- "@univerjs/network": "0.10.3-nightly.202508150623",
48
+ "@univerjs-pro/collaboration-client": "0.10.4-nightly.202508220605",
49
+ "@univerjs-pro/license": "0.10.4-nightly.202508220605",
50
+ "@univerjs/core": "0.10.4-nightly.202508220605",
51
+ "@univerjs/network": "0.10.4-nightly.202508220605",
51
52
  "@univerjs/protocol": "0.1.47-alpha.0",
52
- "@univerjs/thread-comment-ui": "0.10.3-nightly.202508150623",
53
- "@univerjs/thread-comment": "0.10.3-nightly.202508150623",
54
- "@univerjs/core": "0.10.3-nightly.202508150623"
53
+ "@univerjs/thread-comment": "0.10.4-nightly.202508220605",
54
+ "@univerjs/thread-comment-ui": "0.10.4-nightly.202508220605"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.8.3",
59
- "vite": "^7.0.6",
59
+ "vite": "^7.1.3",
60
60
  "vitest": "^3.2.4",
61
- "@univerjs-infra/shared": "0.10.3"
61
+ "@univerjs-infra/shared": "0.10.4"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",
65
65
  "test:watch": "vitest",
66
66
  "coverage": "vitest run --coverage",
67
- "lint:types": "tsc --noEmit",
67
+ "typecheck": "tsc --noEmit",
68
68
  "build": "univer-cli build"
69
69
  },
70
70
  "module": "./lib/es/index.js"