@univerjs-pro/thread-comment-datasource 0.13.0-insiders.20251215-64041bb → 0.13.0-insiders.20251216-1519cb7

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 _0x48f676=_0x2843;(function(_0x4df76c,_0x55a429){const _0x2cf12a=_0x2843,_0x32d310=_0x4df76c();while(!![]){try{const _0x22668c=-parseInt(_0x2cf12a(0x141))/0x1*(parseInt(_0x2cf12a(0x148))/0x2)+parseInt(_0x2cf12a(0x139))/0x3+parseInt(_0x2cf12a(0x132))/0x4+-parseInt(_0x2cf12a(0x145))/0x5*(parseInt(_0x2cf12a(0x127))/0x6)+-parseInt(_0x2cf12a(0x160))/0x7+-parseInt(_0x2cf12a(0x197))/0x8*(parseInt(_0x2cf12a(0x15c))/0x9)+parseInt(_0x2cf12a(0x12b))/0xa*(parseInt(_0x2cf12a(0x18c))/0xb);if(_0x22668c===_0x55a429)break;else _0x32d310['push'](_0x32d310['shift']());}catch(_0x57eb1f){_0x32d310['push'](_0x32d310['shift']());}}}(_0x2d4e,0x742c3));Object[_0x48f676(0x154)](exports,Symbol[_0x48f676(0x166)],{'value':_0x48f676(0x147)});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=_0x48f676(0x173);function _0x2d4e(){const _0x3e67cc=['solved','getMemberID','replyId','createTimestamp','values','UniverCollaborationClientPlugin','dayjs','deleteComment','UserManagerService','_userService','stringify','defineProperty','_threadCommentDataSource','_httpService','UniverThreadCommentUIPlugin','thread-comment-data-source.config','parentId','_config','saveCommentToSnapshot','9kplJUC','UNIVER_UNKNOWN','add','UniverLicensePlugin','4643492uMsGaj','disposeWithMe','requireSession','rangeType','getCurrentUser','replies','toStringTag','get','userId','Solved','/solved','Inject','rangeId','subscribe','reply','symbol','code','/delete','OpenOrReOpen','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','length','bufferTime','listComments','Plugin','threadId','_initDataSource','IConfigService','userID','unitId','format','Disposable','CommentService','forEach','_threadCommentDataSourceService','Delete','HTTPService','syncUpdateMutationToColla','_sessionService','find','CollaborationSessionService','updateComment','Edit','addComment','Add','282788CiwwBC','/add','merge','/list','delete','_threadCommentModel','/universer-api/user/list','CustomRangeType','body','YYYY/MM/DD\x20HH:mm','UNRECOGNIZED','37616wvEtGk','type','comments','/edit','onReady','COMMENT','_injector','pluginName','slice','customRanges','ThreadCommentModel','getOwnPropertyDescriptor','getComment','error','size','payload','content','12FGjiqs','Injector','IThreadCommentDataSourceService','filter','490rphaqH','_configService','getUser','Reply','getUnit','onStarting','/universer-api/comment/unit/','650372jwWVcX','_init','UniverThreadCommentDataSourcePlugin','post','parse','ref','users','1053987KEeUUV','resolveComment','DependentOn','addUser','map','Unknown','setConfig','commentUpdate$','1twwKCB','root','_commentService','/reply','1065715mulDHl','user','Module','406854PRrfkZ'];_0x2d4e=function(){return _0x3e67cc;};return _0x2d4e();}var I=(_0x41634f=>(_0x41634f[_0x41634f[_0x48f676(0x172)]=0x0]=_0x48f676(0x172),_0x41634f[_0x41634f['Solved']=0x1]=_0x48f676(0x169),_0x41634f[_0x41634f[_0x48f676(0x196)]=-0x1]='UNRECOGNIZED',_0x41634f))(I||{}),v=(_0x14797e=>(_0x14797e[_0x14797e[_0x48f676(0x13e)]=0x0]=_0x48f676(0x13e),_0x14797e[_0x14797e[_0x48f676(0x18b)]=0x1]='Add',_0x14797e[_0x14797e[_0x48f676(0x12e)]=0x2]='Reply',_0x14797e[_0x14797e[_0x48f676(0x189)]=0x3]=_0x48f676(0x189),_0x14797e[_0x14797e['Delete']=0x4]=_0x48f676(0x182),_0x14797e[_0x14797e['Solve']=0x5]='Solve',_0x14797e[_0x14797e[_0x48f676(0x196)]=-0x1]=_0x48f676(0x196),_0x14797e))(v||{});const f=_0x1e04d3=>c[_0x48f676(0x14f)](new Date(+_0x1e04d3))[_0x48f676(0x17d)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x10c30e,_0x1ab8cb)=>{const _0x236783=_0x48f676,_0x372fad=_0x10c30e[_0x236783(0x167)](c['UserManagerService']),_0x33aded=_0x10c30e[_0x236783(0x167)](P[_0x236783(0x183)]);_0x1ab8cb[_0x236783(0x180)](_0x5aa123=>{const _0x132f43=_0x236783;_0x372fad[_0x132f43(0x12d)](_0x5aa123)&&_0x1ab8cb[_0x132f43(0x190)](_0x5aa123);}),_0x1ab8cb[_0x236783(0x124)]&&(await _0x33aded['get'](_0x236783(0x192),{'params':{'userIDs':[..._0x1ab8cb]}}))[_0x236783(0x194)][_0x236783(0x138)][_0x236783(0x180)](_0x3d98a9=>{const _0x57c86f=_0x236783;_0x3d98a9&&_0x372fad[_0x57c86f(0x13c)](_0x3d98a9);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x5a317d,_0x5d1d30,_0x119224,_0x3940cb)=>{const _0x90d7fd=_0x48f676;for(var _0x156bfd=_0x3940cb>0x1?void 0x0:_0x3940cb?$(_0x5d1d30,_0x119224):_0x5d1d30,_0x133e6e=_0x5a317d[_0x90d7fd(0x174)]-0x1,_0x289cd3;_0x133e6e>=0x0;_0x133e6e--)(_0x289cd3=_0x5a317d[_0x133e6e])&&(_0x156bfd=_0x289cd3(_0x156bfd)||_0x156bfd);return _0x156bfd;},S=(_0xa3e717,_0x28699f)=>(_0x41ccbc,_0x1d9b7a)=>_0x28699f(_0x41ccbc,_0x1d9b7a,_0xa3e717);let _=class extends c[_0x48f676(0x17e)]{constructor(_0x4399c4,_0x3eacf3,_0x1ec672,_0x34a536){const _0x4615ff=_0x48f676;super(),this[_0x4615ff(0x143)]=_0x4399c4,this[_0x4615ff(0x191)]=_0x3eacf3,this[_0x4615ff(0x152)]=_0x1ec672,this[_0x4615ff(0x19d)]=_0x34a536,this[_0x4615ff(0x133)](),this['_initUserSync']();}['_initUserSync'](){const _0x1ba7e4=_0x48f676;this['disposeWithMe'](this[_0x1ba7e4(0x191)][_0x1ba7e4(0x140)]['pipe'](j[_0x1ba7e4(0x175)](0x10))['subscribe'](_0x1a2837=>{const _0x26675a=_0x1ba7e4,_0x3a0586=new Set();_0x1a2837[_0x26675a(0x180)](_0x5b74b2=>{const _0xddbf26=_0x26675a;switch(_0x5b74b2['type']){case'add':{const _0x36785c=_0x5b74b2[_0xddbf26(0x125)]['personId'];_0x3a0586['add'](_0x36785c);break;}}}),R(this[_0x26675a(0x19d)],_0x3a0586);}));}[_0x48f676(0x133)](){const _0x5a74e6=_0x48f676;this[_0x5a74e6(0x161)](this[_0x5a74e6(0x143)][_0x5a74e6(0x140)][_0x5a74e6(0x16d)](async _0x2279fe=>{const _0x592bd9=_0x5a74e6;var _0x516b21,_0x4677bf,_0x281487,_0x112452;const _0x2a7db6=(_0x516b21=this[_0x592bd9(0x191)][_0x592bd9(0x12f)](_0x2279fe[_0x592bd9(0x17c)])[_0x592bd9(0x186)](_0x656c2e=>_0x656c2e[_0x592bd9(0x178)]===_0x2279fe[_0x592bd9(0x178)]))==null?void 0x0:_0x516b21['root'];if(!_0x2a7db6)return;const {unitId:_0xc1ef27,subUnitId:_0x25fbcd}=_0x2a7db6;switch(_0x2279fe[_0x592bd9(0x146)]&&this[_0x592bd9(0x152)]['addUser'](_0x2279fe['user']),_0x2279fe[_0x592bd9(0x198)]){case v[_0x592bd9(0x18b)]:break;case v[_0x592bd9(0x12e)]:{this[_0x592bd9(0x191)][_0x592bd9(0x18a)](_0xc1ef27,_0x25fbcd,{'unitId':_0xc1ef27,'subUnitId':_0x25fbcd,'ref':'','id':_0x2279fe[_0x592bd9(0x14b)],'dT':f(+_0x2279fe[_0x592bd9(0x14c)]),'threadId':_0x2279fe[_0x592bd9(0x178)],'personId':(_0x281487=(_0x4677bf=_0x2279fe[_0x592bd9(0x146)])==null?void 0x0:_0x4677bf['userID'])!=null?_0x281487:_0x2279fe[_0x592bd9(0x168)],'text':JSON[_0x592bd9(0x136)](_0x2279fe[_0x592bd9(0x126)]),'parentId':_0x2a7db6['id']});break;}case v[_0x592bd9(0x182)]:{const _0x16bc25=this[_0x592bd9(0x191)][_0x592bd9(0x122)](_0xc1ef27,_0x25fbcd,_0x2279fe[_0x592bd9(0x14b)]);_0x16bc25&&_0x16bc25[_0x592bd9(0x159)]&&this[_0x592bd9(0x191)][_0x592bd9(0x150)](_0xc1ef27,_0x25fbcd,_0x2279fe[_0x592bd9(0x14b)]);break;}case v[_0x592bd9(0x189)]:{this['_threadCommentModel'][_0x592bd9(0x188)](_0xc1ef27,_0x25fbcd,{'commentId':_0x2279fe[_0x592bd9(0x14b)],'text':JSON['parse'](_0x2279fe[_0x592bd9(0x126)])});break;}case v['Solve']:{const _0x515e1c=(_0x112452=this[_0x592bd9(0x191)]['getUnit'](_0x2279fe[_0x592bd9(0x17c)])[_0x592bd9(0x186)](_0x1b1b1c=>_0x1b1b1c[_0x592bd9(0x178)]===_0x2279fe['threadId']))==null?void 0x0:_0x112452[_0x592bd9(0x142)];_0x515e1c&&this['_threadCommentModel'][_0x592bd9(0x13a)](_0xc1ef27,_0x25fbcd,_0x515e1c['id'],_0x2279fe[_0x592bd9(0x149)]===I[_0x592bd9(0x169)]);break;}}}));}};_=E([S(0x0,c[_0x48f676(0x16b)](b[_0x48f676(0x17f)])),S(0x1,c[_0x48f676(0x16b)](M[_0x48f676(0x1a1)])),S(0x2,c[_0x48f676(0x16b)](c[_0x48f676(0x151)])),S(0x3,c[_0x48f676(0x16b)](c[_0x48f676(0x128)]))],_);const q=_0x48f676(0x158),D={};var A=Object[_0x48f676(0x1a2)],x=(_0x367cb4,_0x41654f,_0xf8b352,_0xa4b56e)=>{const _0x4805fb=_0x48f676;for(var _0x2b0bab=_0xa4b56e>0x1?void 0x0:_0xa4b56e?A(_0x41654f,_0xf8b352):_0x41654f,_0x308784=_0x367cb4[_0x4805fb(0x174)]-0x1,_0x12addf;_0x308784>=0x0;_0x308784--)(_0x12addf=_0x367cb4[_0x308784])&&(_0x2b0bab=_0x12addf(_0x2b0bab)||_0x2b0bab);return _0x2b0bab;},C=(_0x1a3b1c,_0x46d900)=>(_0x365914,_0x3ababa)=>_0x46d900(_0x365914,_0x3ababa,_0x1a3b1c);function Y(_0x25599,_0x4667a6){const _0x235126=_0x48f676,_0x48a3fe=_0x25599['replies'][0x0];return{..._0x4667a6,'id':_0x48a3fe[_0x235126(0x14b)],'resolved':_0x25599[_0x235126(0x149)]===0x1,'dT':f(_0x48a3fe[_0x235126(0x14c)]),'personId':_0x48a3fe[_0x235126(0x168)],'threadId':_0x48a3fe[_0x235126(0x178)]};}function G(_0x15d58c,_0x1ff346,_0x3c8eed){const _0x174be0=_0x48f676;var _0x3f1df7,_0x308ce7;if(((_0x308ce7=(_0x3f1df7=_0x15d58c==null?void 0x0:_0x15d58c[_0x174be0(0x165)])==null?void 0x0:_0x3f1df7['length'])!=null?_0x308ce7:0x0)>0x0){const _0x1c4fae=(_0x56d4c2,_0x338fac)=>({'id':_0x56d4c2[_0x174be0(0x14b)],'threadId':_0x56d4c2[_0x174be0(0x178)],'dT':f(_0x56d4c2[_0x174be0(0x14c)]),'personId':_0x56d4c2[_0x174be0(0x168)],'resolved':_0x15d58c[_0x174be0(0x149)]===I[_0x174be0(0x169)],'unitId':_0x1ff346,'subUnitId':_0x3c8eed,'text':JSON[_0x174be0(0x136)](_0x56d4c2[_0x174be0(0x126)]),'parentId':_0x338fac}),_0x25e510=_0x1c4fae(_0x15d58c[_0x174be0(0x165)][0x0]);return{..._0x25e510,'children':_0x15d58c[_0x174be0(0x165)][_0x174be0(0x19f)](0x1)[_0x174be0(0x13d)](_0x310c9e=>_0x1c4fae(_0x310c9e,_0x25e510['id']))};}return null;}function _0x2843(_0x2c2223,_0x1c5f89){_0x2c2223=_0x2c2223-0x122;const _0x2d4e2d=_0x2d4e();let _0x284308=_0x2d4e2d[_0x2c2223];return _0x284308;}let p=class{constructor(_0xd8fc92,_0x4ac114,_0x16546b){const _0x4c04cf=_0x48f676;this[_0x4c04cf(0x156)]=_0xd8fc92,this[_0x4c04cf(0x152)]=_0x4ac114,this[_0x4c04cf(0x185)]=_0x16546b;}async['addComment'](_0x2e988b){const _0x2ccb8c=_0x48f676;var _0x40be24,_0x526c58;const {parentId:_0x388a9d,unitId:_0x50b333,text:_0x1bf648,threadId:_0x185feb}=_0x2e988b,_0x4f747e=(_0x526c58=(_0x40be24=_0x1bf648['customRanges'])==null?void 0x0:_0x40be24[_0x2ccb8c(0x12a)](_0x30ff62=>_0x30ff62[_0x2ccb8c(0x163)]===c[_0x2ccb8c(0x193)][_0x2ccb8c(0x19c)])[_0x2ccb8c(0x13d)](_0x29358a=>_0x29358a[_0x2ccb8c(0x16c)]))!=null?_0x526c58:[],_0x470bce=JSON[_0x2ccb8c(0x153)](_0x1bf648),_0x15c9b5=(await this[_0x2ccb8c(0x185)][_0x2ccb8c(0x162)](_0x50b333))[_0x2ccb8c(0x14a)]();if(_0x388a9d){const _0x2e8df5={'memberId':_0x15c9b5,'unitId':_0x50b333,'content':_0x470bce,'mention':_0x4f747e,'threadId':_0x185feb},_0x397d82=(await this[_0x2ccb8c(0x156)]['post'](_0x2ccb8c(0x131)+_0x50b333+_0x2ccb8c(0x144),{'body':_0x2e8df5}))[_0x2ccb8c(0x194)][_0x2ccb8c(0x16e)];return{..._0x2e988b,'id':_0x397d82[_0x2ccb8c(0x14b)],'dT':c[_0x2ccb8c(0x14f)](+_0x397d82[_0x2ccb8c(0x14c)])['format'](_0x2ccb8c(0x195)),'personId':_0x397d82['userId']};}else{const _0x48acfb={'memberId':_0x15c9b5,'unitId':_0x50b333,'content':_0x470bce,'mention':_0x4f747e},_0x440261=await this[_0x2ccb8c(0x156)]['post']('/universer-api/comment/unit/'+_0x50b333+_0x2ccb8c(0x18d),{'body':_0x48acfb});return Y(_0x440261[_0x2ccb8c(0x194)]['comment'],_0x2e988b);}}async['updateComment'](_0x302d81){const _0xe1f260=_0x48f676;var _0x556863,_0x3023eb;const {text:_0x2f8041,unitId:_0x570770}=_0x302d81,_0x4c8027=(_0x3023eb=(_0x556863=_0x2f8041[_0xe1f260(0x1a0)])==null?void 0x0:_0x556863[_0xe1f260(0x12a)](_0x286639=>_0x286639[_0xe1f260(0x163)]===c[_0xe1f260(0x193)]['COMMENT'])[_0xe1f260(0x13d)](_0x4b6cc6=>_0x4b6cc6['rangeId']))!=null?_0x3023eb:[],_0x386eb5=JSON[_0xe1f260(0x153)](_0x2f8041),_0x5c3143=_0x302d81['threadId'],_0x25ec5e=_0x302d81['id'],_0x1d3066={'memberId':(await this[_0xe1f260(0x185)]['requireSession'](_0x570770))[_0xe1f260(0x14a)](),'unitId':_0x570770,'threadId':_0x5c3143,'mention':_0x4c8027,'content':_0x386eb5,'replyId':_0x25ec5e},_0x5e13e3=await this[_0xe1f260(0x156)][_0xe1f260(0x135)](_0xe1f260(0x131)+_0x570770+_0xe1f260(0x19a),{'body':_0x1d3066});return!_0x5e13e3['body'][_0xe1f260(0x123)]||_0x5e13e3[_0xe1f260(0x194)]['error'][_0xe1f260(0x170)]===0x1;}async['resolveComment'](_0x1dc74c){const _0x160f04=_0x48f676,{unitId:_0x3b0466}=_0x1dc74c,_0x1608de=_0x1dc74c['threadId'],_0x2270b6={'memberId':this[_0x160f04(0x152)][_0x160f04(0x164)]()[_0x160f04(0x17b)],'unitId':_0x3b0466,'threadId':_0x1608de,'solved':_0x1dc74c['resolved']?I[_0x160f04(0x169)]:I[_0x160f04(0x172)]},_0x45c45a=await this[_0x160f04(0x156)][_0x160f04(0x135)](_0x160f04(0x131)+_0x3b0466+_0x160f04(0x16a),{'body':_0x2270b6});return!_0x45c45a[_0x160f04(0x194)][_0x160f04(0x123)]||_0x45c45a[_0x160f04(0x194)][_0x160f04(0x123)][_0x160f04(0x170)]===0x1;}async[_0x48f676(0x150)](_0x5b4251,_0x1ba8a9,_0x3e88de,_0x423484){const _0x2e8bef=_0x48f676,_0x88dc13={'memberId':(await this['_sessionService'][_0x2e8bef(0x162)](_0x5b4251))[_0x2e8bef(0x14a)](),'threadId':_0x3e88de,'replyId':_0x423484,'unitId':_0x5b4251},_0x456b5f=await this[_0x2e8bef(0x156)][_0x2e8bef(0x135)](_0x2e8bef(0x131)+_0x5b4251+_0x2e8bef(0x171),{'body':_0x88dc13});return!_0x456b5f[_0x2e8bef(0x194)][_0x2e8bef(0x123)]||_0x456b5f[_0x2e8bef(0x194)][_0x2e8bef(0x123)]['code']===0x1;}async[_0x48f676(0x176)](_0x3404e8,_0x302c29,_0x1c2656){const _0x1d2282=_0x48f676,_0x5d5854={'unitId':_0x3404e8,'threadId':_0x1c2656},_0x5af478=await this[_0x1d2282(0x156)][_0x1d2282(0x135)](_0x1d2282(0x131)+_0x3404e8+_0x1d2282(0x18f),{'body':_0x5d5854}),_0x2f8252=_0x1c2656[_0x1d2282(0x13d)](_0xf54b75=>G(_0x5af478[_0x1d2282(0x194)][_0x1d2282(0x199)][_0xf54b75],_0x3404e8,_0x302c29))['filter'](Boolean);return Object[_0x1d2282(0x14d)](_0x5af478['body']['users'])[_0x1d2282(0x180)](_0x211b33=>{const _0x4f0736=_0x1d2282;this[_0x4f0736(0x152)]['addUser'](_0x211b33);}),_0x2f8252;}[_0x48f676(0x15b)](_0x1f5f35){const _0x5c55da=_0x48f676;return{'id':_0x1f5f35['id'],'threadId':_0x1f5f35[_0x5c55da(0x178)],'ref':_0x1f5f35[_0x5c55da(0x137)]};}};p=x([C(0x0,c[_0x48f676(0x16b)](P[_0x48f676(0x183)])),C(0x1,c['Inject'](c[_0x48f676(0x151)])),C(0x2,c[_0x48f676(0x16b)](b[_0x48f676(0x187)]))],p);var H=Object[_0x48f676(0x1a2)],J=(_0x443d67,_0x4f84ba,_0x27bcce,_0x1cdf36)=>{const _0x4d5c59=_0x48f676;for(var _0x1af5b4=_0x1cdf36>0x1?void 0x0:_0x1cdf36?H(_0x4f84ba,_0x27bcce):_0x4f84ba,_0x31afec=_0x443d67[_0x4d5c59(0x174)]-0x1,_0x10caee;_0x31afec>=0x0;_0x31afec--)(_0x10caee=_0x443d67[_0x31afec])&&(_0x1af5b4=_0x10caee(_0x1af5b4)||_0x1af5b4);return _0x1af5b4;},y=(_0x40c90c,_0x541370)=>(_0x2edfe4,_0x15f0cf)=>_0x541370(_0x2edfe4,_0x15f0cf,_0x40c90c);let g=class extends c[_0x48f676(0x17e)]{constructor(_0x258d53,_0x5aa99b){const _0x1ee32d=_0x48f676;super(),this[_0x1ee32d(0x181)]=_0x258d53,this['_threadCommentDataSource']=_0x5aa99b,this[_0x1ee32d(0x179)]();}['_initDataSource'](){const _0x979689=_0x48f676;this['_threadCommentDataSourceService']['dataSource']=this[_0x979689(0x155)],this[_0x979689(0x181)][_0x979689(0x184)]=!0x1;}};g=J([y(0x0,M[_0x48f676(0x129)]),y(0x1,c[_0x48f676(0x16b)](p))],g);var F=Object[_0x48f676(0x154)],L=Object['getOwnPropertyDescriptor'],Z=(_0x46b85b,_0x2ae2ec,_0x20e74b)=>_0x2ae2ec in _0x46b85b?F(_0x46b85b,_0x2ae2ec,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x20e74b}):_0x46b85b[_0x2ae2ec]=_0x20e74b,W=(_0x157a9d,_0x5debcf,_0x4576f5,_0x533d80)=>{for(var _0x2884b1=_0x533d80>0x1?void 0x0:_0x533d80?L(_0x5debcf,_0x4576f5):_0x5debcf,_0x3b4f87=_0x157a9d['length']-0x1,_0xcf8210;_0x3b4f87>=0x0;_0x3b4f87--)(_0xcf8210=_0x157a9d[_0x3b4f87])&&(_0x2884b1=_0xcf8210(_0x2884b1)||_0x2884b1);return _0x2884b1;},O=(_0x26e5c0,_0x2ecd2d)=>(_0x2624fe,_0x39ea6a)=>_0x2ecd2d(_0x2624fe,_0x39ea6a,_0x26e5c0),N=(_0x1dc7a7,_0x45d61d,_0x341225)=>Z(_0x1dc7a7,typeof _0x45d61d!=_0x48f676(0x16f)?_0x45d61d+'':_0x45d61d,_0x341225);exports[_0x48f676(0x134)]=class extends c[_0x48f676(0x177)]{constructor(_0x5034a2=D,_0x4f3159,_0x5de601){const _0x4d0fce=_0x48f676;super(),this['_config']=_0x5034a2,this[_0x4d0fce(0x19d)]=_0x4f3159,this[_0x4d0fce(0x12c)]=_0x5de601;const {..._0x438a81}=c[_0x4d0fce(0x18e)]({},D,this[_0x4d0fce(0x15a)]);this[_0x4d0fce(0x12c)][_0x4d0fce(0x13f)](q,_0x438a81);}[_0x48f676(0x130)](){const _0x5bc755=_0x48f676;[[p],[g],[_]][_0x5bc755(0x180)](_0x518bcf=>{const _0x4a8b88=_0x5bc755;this[_0x4a8b88(0x19d)][_0x4a8b88(0x15e)](_0x518bcf);});}[_0x48f676(0x19b)](){const _0x1e2ba8=_0x48f676;this[_0x1e2ba8(0x19d)][_0x1e2ba8(0x167)](g),this[_0x1e2ba8(0x19d)]['get'](_);}},N(exports[_0x48f676(0x134)],_0x48f676(0x19e),U),N(exports[_0x48f676(0x134)],'type',c['UniverInstanceType'][_0x48f676(0x15d)]),exports[_0x48f676(0x134)]=W([c[_0x48f676(0x13b)](w[_0x48f676(0x157)],b[_0x48f676(0x14e)],T[_0x48f676(0x15f)]),O(0x1,c[_0x48f676(0x16b)](c[_0x48f676(0x128)])),O(0x2,c[_0x48f676(0x17a)])],exports[_0x48f676(0x134)]);
1
+ 'use strict';const _0xc938f6=_0x8491;function _0x20d3(){const _0x5c8d0d=['Module','ref','getCurrentUser','140576yFGDmw','UniverCollaborationClientPlugin','UniverThreadCommentDataSourcePlugin','syncUpdateMutationToColla','Edit','error','_initUserSync','_commentService','pipe','_httpService','replyId','_threadCommentModel','resolveComment','stringify','requireSession','commentUpdate$','resolved','Plugin','rangeType','values','dayjs','_userService','12WJQEWI','forEach','addComment','deleteComment','length','/universer-api/user/list','users','body','find','UserManagerService','Disposable','16340HbVQvg','parentId','_sessionService','user','thread-comment-data-source.config','pluginName','userId','parse','OpenOrReOpen','7842888SwZCBP','HTTPService','addUser','YYYY/MM/DD\x20HH:mm','map','post','onReady','_threadCommentDataSource','Solved','CommentService','Delete','userID','reply','replies','getUser','subscribe','updateComment','createTimestamp','IThreadCommentDataSourceService','threadId','UniverInstanceType','UNRECOGNIZED','getOwnPropertyDescriptor','size','2250915vfKTLD','customRanges','payload','2853NqKUzn','Unknown','Inject','slice','Solve','_config','filter','_injector','rangeId','4600085cQvugu','bufferTime','_initDataSource','/reply','setConfig','UniverLicensePlugin','get','CustomRangeType','add','defineProperty','Add','getMemberID','/universer-api/comment/unit/','solved','/edit','type','Reply','/add','code','/list','getUnit','17740uKnzyi','103WqtgiW','unitId','content','disposeWithMe','root','Injector','onStarting','966275wurAUZ','comment','COMMENT','format','merge','_init','/solved'];_0x20d3=function(){return _0x5c8d0d;};return _0x20d3();}(function(_0x2b328e,_0x178ad5){const _0x4fd283=_0x8491,_0x4321ac=_0x2b328e();while(!![]){try{const _0x57c3d8=-parseInt(_0x4fd283(0x18d))/0x1*(parseInt(_0x4fd283(0x1bf))/0x2)+parseInt(_0x4fd283(0x16b))/0x3+-parseInt(_0x4fd283(0x19e))/0x4+-parseInt(_0x4fd283(0x194))/0x5*(parseInt(_0x4fd283(0x1b4))/0x6)+parseInt(_0x4fd283(0x177))/0x7+parseInt(_0x4fd283(0x1c8))/0x8+parseInt(_0x4fd283(0x16e))/0x9*(-parseInt(_0x4fd283(0x18c))/0xa);if(_0x57c3d8===_0x178ad5)break;else _0x4321ac['push'](_0x4321ac['shift']());}catch(_0x525b05){_0x4321ac['push'](_0x4321ac['shift']());}}}(_0x20d3,0x8947b));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0xc938f6(0x19b)});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=(_0x5488a6=>(_0x5488a6[_0x5488a6['OpenOrReOpen']=0x0]=_0xc938f6(0x1c7),_0x5488a6[_0x5488a6['Solved']=0x1]=_0xc938f6(0x1d0),_0x5488a6[_0x5488a6[_0xc938f6(0x1dd)]=-0x1]=_0xc938f6(0x1dd),_0x5488a6))(I||{}),v=(_0x5ae9aa=>(_0x5ae9aa[_0x5ae9aa['Unknown']=0x0]=_0xc938f6(0x16f),_0x5ae9aa[_0x5ae9aa[_0xc938f6(0x181)]=0x1]=_0xc938f6(0x181),_0x5ae9aa[_0x5ae9aa['Reply']=0x2]='Reply',_0x5ae9aa[_0x5ae9aa['Edit']=0x3]=_0xc938f6(0x1a2),_0x5ae9aa[_0x5ae9aa[_0xc938f6(0x1d2)]=0x4]='Delete',_0x5ae9aa[_0x5ae9aa[_0xc938f6(0x172)]=0x5]='Solve',_0x5ae9aa[_0x5ae9aa[_0xc938f6(0x1dd)]=-0x1]=_0xc938f6(0x1dd),_0x5ae9aa))(v||{});const f=_0x45fc74=>c[_0xc938f6(0x1b2)](new Date(+_0x45fc74))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x5a0dcf,_0x47fa32)=>{const _0x47702c=_0xc938f6,_0x454292=_0x5a0dcf[_0x47702c(0x17d)](c[_0x47702c(0x1bd)]),_0x4db2a6=_0x5a0dcf[_0x47702c(0x17d)](P[_0x47702c(0x1c9)]);_0x47fa32[_0x47702c(0x1b5)](_0x3b56c2=>{const _0xf4a364=_0x47702c;_0x454292[_0xf4a364(0x1d6)](_0x3b56c2)&&_0x47fa32['delete'](_0x3b56c2);}),_0x47fa32[_0x47702c(0x1df)]&&(await _0x4db2a6[_0x47702c(0x17d)](_0x47702c(0x1b9),{'params':{'userIDs':[..._0x47fa32]}}))[_0x47702c(0x1bb)][_0x47702c(0x1ba)][_0x47702c(0x1b5)](_0x1bcead=>{const _0x2a2f04=_0x47702c;_0x1bcead&&_0x454292[_0x2a2f04(0x1ca)](_0x1bcead);});};var $=Object[_0xc938f6(0x1de)],E=(_0x2dd839,_0x4e4ebf,_0x497fa5,_0x36a496)=>{const _0x33596a=_0xc938f6;for(var _0x5b39dc=_0x36a496>0x1?void 0x0:_0x36a496?$(_0x4e4ebf,_0x497fa5):_0x4e4ebf,_0x5804f4=_0x2dd839[_0x33596a(0x1b8)]-0x1,_0xb1fd18;_0x5804f4>=0x0;_0x5804f4--)(_0xb1fd18=_0x2dd839[_0x5804f4])&&(_0x5b39dc=_0xb1fd18(_0x5b39dc)||_0x5b39dc);return _0x5b39dc;},S=(_0x3c214f,_0x336ae0)=>(_0x54d317,_0x2d6c91)=>_0x336ae0(_0x54d317,_0x2d6c91,_0x3c214f);let _=class extends c['Disposable']{constructor(_0x14fbc2,_0x3c66b9,_0x49333b,_0x334664){const _0x37044f=_0xc938f6;super(),this[_0x37044f(0x1a5)]=_0x14fbc2,this[_0x37044f(0x1a9)]=_0x3c66b9,this[_0x37044f(0x1b3)]=_0x49333b,this['_injector']=_0x334664,this[_0x37044f(0x199)](),this[_0x37044f(0x1a4)]();}[_0xc938f6(0x1a4)](){const _0x56fb75=_0xc938f6;this['disposeWithMe'](this[_0x56fb75(0x1a9)][_0x56fb75(0x1ad)][_0x56fb75(0x1a6)](j[_0x56fb75(0x178)](0x10))[_0x56fb75(0x1d7)](_0x314b38=>{const _0x56ad65=_0x56fb75,_0x212d68=new Set();_0x314b38['forEach'](_0x1ba8c1=>{const _0x16a9ec=_0x8491;switch(_0x1ba8c1[_0x16a9ec(0x186)]){case'add':{const _0x832905=_0x1ba8c1[_0x16a9ec(0x16d)]['personId'];_0x212d68[_0x16a9ec(0x17f)](_0x832905);break;}}}),R(this[_0x56ad65(0x175)],_0x212d68);}));}['_init'](){const _0x552728=_0xc938f6;this[_0x552728(0x190)](this[_0x552728(0x1a5)][_0x552728(0x1ad)][_0x552728(0x1d7)](async _0xdec365=>{const _0x1dea13=_0x552728;var _0x2e3baa,_0x374bdb,_0x2ea446,_0x1a0cef;const _0x125826=(_0x2e3baa=this['_threadCommentModel'][_0x1dea13(0x18b)](_0xdec365[_0x1dea13(0x18e)])['find'](_0x106f5b=>_0x106f5b['threadId']===_0xdec365[_0x1dea13(0x1db)]))==null?void 0x0:_0x2e3baa[_0x1dea13(0x191)];if(!_0x125826)return;const {unitId:_0x38ed06,subUnitId:_0x145f9f}=_0x125826;switch(_0xdec365[_0x1dea13(0x1c2)]&&this[_0x1dea13(0x1b3)]['addUser'](_0xdec365[_0x1dea13(0x1c2)]),_0xdec365[_0x1dea13(0x186)]){case v[_0x1dea13(0x181)]:break;case v[_0x1dea13(0x187)]:{this[_0x1dea13(0x1a9)][_0x1dea13(0x1b6)](_0x38ed06,_0x145f9f,{'unitId':_0x38ed06,'subUnitId':_0x145f9f,'ref':'','id':_0xdec365[_0x1dea13(0x1a8)],'dT':f(+_0xdec365[_0x1dea13(0x1d9)]),'threadId':_0xdec365[_0x1dea13(0x1db)],'personId':(_0x2ea446=(_0x374bdb=_0xdec365['user'])==null?void 0x0:_0x374bdb[_0x1dea13(0x1d3)])!=null?_0x2ea446:_0xdec365['userId'],'text':JSON[_0x1dea13(0x1c6)](_0xdec365[_0x1dea13(0x18f)]),'parentId':_0x125826['id']});break;}case v[_0x1dea13(0x1d2)]:{const _0x31480f=this[_0x1dea13(0x1a9)]['getComment'](_0x38ed06,_0x145f9f,_0xdec365[_0x1dea13(0x1a8)]);_0x31480f&&_0x31480f[_0x1dea13(0x1c0)]&&this['_threadCommentModel']['deleteComment'](_0x38ed06,_0x145f9f,_0xdec365[_0x1dea13(0x1a8)]);break;}case v[_0x1dea13(0x1a2)]:{this['_threadCommentModel'][_0x1dea13(0x1d8)](_0x38ed06,_0x145f9f,{'commentId':_0xdec365['replyId'],'text':JSON['parse'](_0xdec365[_0x1dea13(0x18f)])});break;}case v['Solve']:{const _0x56e1a8=(_0x1a0cef=this[_0x1dea13(0x1a9)][_0x1dea13(0x18b)](_0xdec365[_0x1dea13(0x18e)])[_0x1dea13(0x1bc)](_0x51863c=>_0x51863c[_0x1dea13(0x1db)]===_0xdec365[_0x1dea13(0x1db)]))==null?void 0x0:_0x1a0cef[_0x1dea13(0x191)];_0x56e1a8&&this['_threadCommentModel'][_0x1dea13(0x1aa)](_0x38ed06,_0x145f9f,_0x56e1a8['id'],_0xdec365[_0x1dea13(0x184)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0xc938f6(0x170)](b[_0xc938f6(0x1d1)])),S(0x1,c[_0xc938f6(0x170)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0xc938f6(0x1bd)])),S(0x3,c[_0xc938f6(0x170)](c[_0xc938f6(0x192)]))],_);const q=_0xc938f6(0x1c3),D={};var A=Object[_0xc938f6(0x1de)],x=(_0x2e59d2,_0x2a8880,_0x32971c,_0x8de674)=>{for(var _0x3e0e3d=_0x8de674>0x1?void 0x0:_0x8de674?A(_0x2a8880,_0x32971c):_0x2a8880,_0x449b6d=_0x2e59d2['length']-0x1,_0x375ebd;_0x449b6d>=0x0;_0x449b6d--)(_0x375ebd=_0x2e59d2[_0x449b6d])&&(_0x3e0e3d=_0x375ebd(_0x3e0e3d)||_0x3e0e3d);return _0x3e0e3d;},C=(_0x2cdd2a,_0x419280)=>(_0x162afc,_0x6f4162)=>_0x419280(_0x162afc,_0x6f4162,_0x2cdd2a);function Y(_0x14b0c7,_0x2caea1){const _0x37659b=_0xc938f6,_0x3c5896=_0x14b0c7['replies'][0x0];return{..._0x2caea1,'id':_0x3c5896[_0x37659b(0x1a8)],'resolved':_0x14b0c7['solved']===0x1,'dT':f(_0x3c5896[_0x37659b(0x1d9)]),'personId':_0x3c5896[_0x37659b(0x1c5)],'threadId':_0x3c5896[_0x37659b(0x1db)]};}function G(_0x49f81e,_0x2ee5e4,_0x279b52){const _0x4dfa78=_0xc938f6;var _0xd84fec,_0x9545bb;if(((_0x9545bb=(_0xd84fec=_0x49f81e==null?void 0x0:_0x49f81e[_0x4dfa78(0x1d5)])==null?void 0x0:_0xd84fec[_0x4dfa78(0x1b8)])!=null?_0x9545bb:0x0)>0x0){const _0x4da43=(_0x195289,_0x403a51)=>({'id':_0x195289[_0x4dfa78(0x1a8)],'threadId':_0x195289[_0x4dfa78(0x1db)],'dT':f(_0x195289[_0x4dfa78(0x1d9)]),'personId':_0x195289['userId'],'resolved':_0x49f81e[_0x4dfa78(0x184)]===I['Solved'],'unitId':_0x2ee5e4,'subUnitId':_0x279b52,'text':JSON[_0x4dfa78(0x1c6)](_0x195289['content']),'parentId':_0x403a51}),_0x5ebaa6=_0x4da43(_0x49f81e[_0x4dfa78(0x1d5)][0x0]);return{..._0x5ebaa6,'children':_0x49f81e[_0x4dfa78(0x1d5)][_0x4dfa78(0x171)](0x1)[_0x4dfa78(0x1cc)](_0x2f854a=>_0x4da43(_0x2f854a,_0x5ebaa6['id']))};}return null;}function _0x8491(_0x2aadaf,_0xf7eb6b){_0x2aadaf=_0x2aadaf-0x16b;const _0x20d329=_0x20d3();let _0x849192=_0x20d329[_0x2aadaf];return _0x849192;}let p=class{constructor(_0x322e62,_0x30dbf2,_0x1cb237){const _0xb07b1f=_0xc938f6;this[_0xb07b1f(0x1a7)]=_0x322e62,this[_0xb07b1f(0x1b3)]=_0x30dbf2,this['_sessionService']=_0x1cb237;}async[_0xc938f6(0x1b6)](_0x2d2307){const _0x39368c=_0xc938f6;var _0x49a2bc,_0x170b07;const {parentId:_0x43a7e8,unitId:_0x15e98f,text:_0x57e494,threadId:_0x945762}=_0x2d2307,_0x389c75=(_0x170b07=(_0x49a2bc=_0x57e494[_0x39368c(0x16c)])==null?void 0x0:_0x49a2bc[_0x39368c(0x174)](_0x40fba9=>_0x40fba9[_0x39368c(0x1b0)]===c[_0x39368c(0x17e)][_0x39368c(0x196)])[_0x39368c(0x1cc)](_0x33eb48=>_0x33eb48[_0x39368c(0x176)]))!=null?_0x170b07:[],_0x2d5cb7=JSON[_0x39368c(0x1ab)](_0x57e494),_0x948412=(await this[_0x39368c(0x1c1)][_0x39368c(0x1ac)](_0x15e98f))[_0x39368c(0x182)]();if(_0x43a7e8){const _0x49c24a={'memberId':_0x948412,'unitId':_0x15e98f,'content':_0x2d5cb7,'mention':_0x389c75,'threadId':_0x945762},_0x57bb46=(await this[_0x39368c(0x1a7)][_0x39368c(0x1cd)]('/universer-api/comment/unit/'+_0x15e98f+_0x39368c(0x17a),{'body':_0x49c24a}))['body'][_0x39368c(0x1d4)];return{..._0x2d2307,'id':_0x57bb46[_0x39368c(0x1a8)],'dT':c[_0x39368c(0x1b2)](+_0x57bb46[_0x39368c(0x1d9)])[_0x39368c(0x197)](_0x39368c(0x1cb)),'personId':_0x57bb46['userId']};}else{const _0x252706={'memberId':_0x948412,'unitId':_0x15e98f,'content':_0x2d5cb7,'mention':_0x389c75},_0x57a920=await this[_0x39368c(0x1a7)][_0x39368c(0x1cd)](_0x39368c(0x183)+_0x15e98f+_0x39368c(0x188),{'body':_0x252706});return Y(_0x57a920['body'][_0x39368c(0x195)],_0x2d2307);}}async[_0xc938f6(0x1d8)](_0x48dde){const _0x3f0c09=_0xc938f6;var _0x5f155a,_0x4ef511;const {text:_0xc7f607,unitId:_0x38441d}=_0x48dde,_0x597b05=(_0x4ef511=(_0x5f155a=_0xc7f607[_0x3f0c09(0x16c)])==null?void 0x0:_0x5f155a[_0x3f0c09(0x174)](_0x2fc186=>_0x2fc186[_0x3f0c09(0x1b0)]===c[_0x3f0c09(0x17e)][_0x3f0c09(0x196)])[_0x3f0c09(0x1cc)](_0x3ffa49=>_0x3ffa49[_0x3f0c09(0x176)]))!=null?_0x4ef511:[],_0x165cef=JSON[_0x3f0c09(0x1ab)](_0xc7f607),_0xb9e493=_0x48dde['threadId'],_0x2034e8=_0x48dde['id'],_0x20bb42={'memberId':(await this[_0x3f0c09(0x1c1)][_0x3f0c09(0x1ac)](_0x38441d))[_0x3f0c09(0x182)](),'unitId':_0x38441d,'threadId':_0xb9e493,'mention':_0x597b05,'content':_0x165cef,'replyId':_0x2034e8},_0x10509a=await this['_httpService'][_0x3f0c09(0x1cd)](_0x3f0c09(0x183)+_0x38441d+_0x3f0c09(0x185),{'body':_0x20bb42});return!_0x10509a[_0x3f0c09(0x1bb)][_0x3f0c09(0x1a3)]||_0x10509a[_0x3f0c09(0x1bb)][_0x3f0c09(0x1a3)][_0x3f0c09(0x189)]===0x1;}async[_0xc938f6(0x1aa)](_0x413f5d){const _0x1918ff=_0xc938f6,{unitId:_0x109b99}=_0x413f5d,_0xe38934=_0x413f5d[_0x1918ff(0x1db)],_0x5ba7e1={'memberId':this[_0x1918ff(0x1b3)][_0x1918ff(0x19d)]()[_0x1918ff(0x1d3)],'unitId':_0x109b99,'threadId':_0xe38934,'solved':_0x413f5d[_0x1918ff(0x1ae)]?I['Solved']:I['OpenOrReOpen']},_0x2418b7=await this['_httpService'][_0x1918ff(0x1cd)](_0x1918ff(0x183)+_0x109b99+_0x1918ff(0x19a),{'body':_0x5ba7e1});return!_0x2418b7[_0x1918ff(0x1bb)]['error']||_0x2418b7['body'][_0x1918ff(0x1a3)]['code']===0x1;}async[_0xc938f6(0x1b7)](_0x149d78,_0x309eee,_0x5a4e72,_0x2bd597){const _0x1869ed=_0xc938f6,_0x545a09={'memberId':(await this[_0x1869ed(0x1c1)][_0x1869ed(0x1ac)](_0x149d78))[_0x1869ed(0x182)](),'threadId':_0x5a4e72,'replyId':_0x2bd597,'unitId':_0x149d78},_0x2a2c8b=await this['_httpService'][_0x1869ed(0x1cd)]('/universer-api/comment/unit/'+_0x149d78+'/delete',{'body':_0x545a09});return!_0x2a2c8b[_0x1869ed(0x1bb)][_0x1869ed(0x1a3)]||_0x2a2c8b[_0x1869ed(0x1bb)][_0x1869ed(0x1a3)]['code']===0x1;}async['listComments'](_0x5dd740,_0x14b4d7,_0x370340){const _0x1752b8=_0xc938f6,_0x349306={'unitId':_0x5dd740,'threadId':_0x370340},_0x1c8c24=await this[_0x1752b8(0x1a7)][_0x1752b8(0x1cd)]('/universer-api/comment/unit/'+_0x5dd740+_0x1752b8(0x18a),{'body':_0x349306}),_0x21eaa3=_0x370340['map'](_0xc4f9e0=>G(_0x1c8c24[_0x1752b8(0x1bb)]['comments'][_0xc4f9e0],_0x5dd740,_0x14b4d7))['filter'](Boolean);return Object[_0x1752b8(0x1b1)](_0x1c8c24['body']['users'])[_0x1752b8(0x1b5)](_0x527b66=>{const _0x2d134c=_0x1752b8;this[_0x2d134c(0x1b3)][_0x2d134c(0x1ca)](_0x527b66);}),_0x21eaa3;}['saveCommentToSnapshot'](_0x1dffdc){const _0x2a4fc2=_0xc938f6;return{'id':_0x1dffdc['id'],'threadId':_0x1dffdc[_0x2a4fc2(0x1db)],'ref':_0x1dffdc[_0x2a4fc2(0x19c)]};}};p=x([C(0x0,c['Inject'](P[_0xc938f6(0x1c9)])),C(0x1,c[_0xc938f6(0x170)](c[_0xc938f6(0x1bd)])),C(0x2,c[_0xc938f6(0x170)](b['CollaborationSessionService']))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x139876,_0x48d523,_0xd2761d,_0x5cf572)=>{const _0x10c811=_0xc938f6;for(var _0x430aa9=_0x5cf572>0x1?void 0x0:_0x5cf572?H(_0x48d523,_0xd2761d):_0x48d523,_0xbea806=_0x139876[_0x10c811(0x1b8)]-0x1,_0x357772;_0xbea806>=0x0;_0xbea806--)(_0x357772=_0x139876[_0xbea806])&&(_0x430aa9=_0x357772(_0x430aa9)||_0x430aa9);return _0x430aa9;},y=(_0x1d098b,_0x5a5648)=>(_0x4264c1,_0x234146)=>_0x5a5648(_0x4264c1,_0x234146,_0x1d098b);let g=class extends c[_0xc938f6(0x1be)]{constructor(_0xf4143a,_0x343dd5){const _0x4188e3=_0xc938f6;super(),this['_threadCommentDataSourceService']=_0xf4143a,this[_0x4188e3(0x1cf)]=_0x343dd5,this[_0x4188e3(0x179)]();}[_0xc938f6(0x179)](){const _0x292c9f=_0xc938f6;this['_threadCommentDataSourceService']['dataSource']=this[_0x292c9f(0x1cf)],this['_threadCommentDataSourceService'][_0x292c9f(0x1a1)]=!0x1;}};g=J([y(0x0,M[_0xc938f6(0x1da)]),y(0x1,c[_0xc938f6(0x170)](p))],g);var F=Object[_0xc938f6(0x180)],L=Object[_0xc938f6(0x1de)],Z=(_0x4d478d,_0x15b119,_0x6fa78)=>_0x15b119 in _0x4d478d?F(_0x4d478d,_0x15b119,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x6fa78}):_0x4d478d[_0x15b119]=_0x6fa78,W=(_0x4e6a11,_0x30c5a2,_0x35a54e,_0xc67c9f)=>{const _0x2dce32=_0xc938f6;for(var _0x42e268=_0xc67c9f>0x1?void 0x0:_0xc67c9f?L(_0x30c5a2,_0x35a54e):_0x30c5a2,_0x3023a9=_0x4e6a11[_0x2dce32(0x1b8)]-0x1,_0x2462c2;_0x3023a9>=0x0;_0x3023a9--)(_0x2462c2=_0x4e6a11[_0x3023a9])&&(_0x42e268=_0x2462c2(_0x42e268)||_0x42e268);return _0x42e268;},O=(_0x5d4f95,_0x5b3ca6)=>(_0x440f74,_0x8db732)=>_0x5b3ca6(_0x440f74,_0x8db732,_0x5d4f95),N=(_0x2a7795,_0xbe8efa,_0x1e76b0)=>Z(_0x2a7795,typeof _0xbe8efa!='symbol'?_0xbe8efa+'':_0xbe8efa,_0x1e76b0);exports[_0xc938f6(0x1a0)]=class extends c[_0xc938f6(0x1af)]{constructor(_0x2e1ad5=D,_0xda7095,_0x537453){const _0x4c8f50=_0xc938f6;super(),this[_0x4c8f50(0x173)]=_0x2e1ad5,this['_injector']=_0xda7095,this['_configService']=_0x537453;const {..._0x26d0d7}=c[_0x4c8f50(0x198)]({},D,this[_0x4c8f50(0x173)]);this['_configService'][_0x4c8f50(0x17b)](q,_0x26d0d7);}[_0xc938f6(0x193)](){const _0x4c6dc0=_0xc938f6;[[p],[g],[_]][_0x4c6dc0(0x1b5)](_0x36cf9d=>{const _0x25667a=_0x4c6dc0;this[_0x25667a(0x175)]['add'](_0x36cf9d);});}[_0xc938f6(0x1ce)](){const _0x15bb24=_0xc938f6;this[_0x15bb24(0x175)]['get'](g),this[_0x15bb24(0x175)][_0x15bb24(0x17d)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0xc938f6(0x1c4),U),N(exports[_0xc938f6(0x1a0)],_0xc938f6(0x186),c[_0xc938f6(0x1dc)]['UNIVER_UNKNOWN']),exports[_0xc938f6(0x1a0)]=W([c['DependentOn'](w['UniverThreadCommentUIPlugin'],b[_0xc938f6(0x19f)],T[_0xc938f6(0x17c)]),O(0x1,c[_0xc938f6(0x170)](c[_0xc938f6(0x192)])),O(0x2,c['IConfigService'])],exports[_0xc938f6(0x1a0)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x4fb932=_0x3851;(function(_0xc1e752,_0x44c97f){const _0x196dcc=_0x3851,_0x2198d9=_0xc1e752();while(!![]){try{const _0x1054ab=parseInt(_0x196dcc(0xcd))/0x1*(parseInt(_0x196dcc(0x88))/0x2)+-parseInt(_0x196dcc(0x8a))/0x3+-parseInt(_0x196dcc(0x90))/0x4*(parseInt(_0x196dcc(0xa9))/0x5)+parseInt(_0x196dcc(0xbf))/0x6+parseInt(_0x196dcc(0xc1))/0x7*(parseInt(_0x196dcc(0x86))/0x8)+-parseInt(_0x196dcc(0x97))/0x9*(parseInt(_0x196dcc(0xd2))/0xa)+parseInt(_0x196dcc(0xa8))/0xb*(parseInt(_0x196dcc(0x91))/0xc);if(_0x1054ab===_0x44c97f)break;else _0x2198d9['push'](_0x2198d9['shift']());}catch(_0x41f3e0){_0x2198d9['push'](_0x2198d9['shift']());}}}(_0x5bc4,0x2d923));import{CommentService as _0x3e5339,CollaborationSessionService as _0x153124,UniverCollaborationClientPlugin as _0x302632}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x21485d}from'@univerjs-pro/license';import{dayjs as _0x67181a,UserManagerService as _0x653602,Inject as _0x128bec,Injector as _0x4f226c,Disposable as _0x224507,CustomRangeType as _0x42ea01,UniverInstanceType as _0x49b985,DependentOn as _0x3d8f7e,IConfigService as _0x1d7854,Plugin as _0x58a3f6,merge as _0x348f8b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x95a849}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xa6c183,IThreadCommentDataSourceService as _0x40cc3e}from'@univerjs/thread-comment';import{bufferTime as _0x152de6}from'rxjs';import{HTTPService as _0x29ca6e}from'@univerjs/network';const W=_0x4fb932(0xa5);var I=(_0x2f41c9=>(_0x2f41c9[_0x2f41c9[_0x4fb932(0x8e)]=0x0]=_0x4fb932(0x8e),_0x2f41c9[_0x2f41c9[_0x4fb932(0xde)]=0x1]='Solved',_0x2f41c9[_0x2f41c9[_0x4fb932(0xa2)]=-0x1]=_0x4fb932(0xa2),_0x2f41c9))(I||{}),v=(_0x3c6094=>(_0x3c6094[_0x3c6094[_0x4fb932(0x98)]=0x0]=_0x4fb932(0x98),_0x3c6094[_0x3c6094[_0x4fb932(0xce)]=0x1]='Add',_0x3c6094[_0x3c6094[_0x4fb932(0xca)]=0x2]=_0x4fb932(0xca),_0x3c6094[_0x3c6094[_0x4fb932(0xc3)]=0x3]='Edit',_0x3c6094[_0x3c6094[_0x4fb932(0x9c)]=0x4]='Delete',_0x3c6094[_0x3c6094[_0x4fb932(0xe4)]=0x5]='Solve',_0x3c6094[_0x3c6094['UNRECOGNIZED']=-0x1]=_0x4fb932(0xa2),_0x3c6094))(v||{});const y=_0x5e27f4=>_0x67181a(new Date(+_0x5e27f4))[_0x4fb932(0xc2)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x38ae86,_0x47839d)=>{const _0x275b16=_0x4fb932,_0x261f27=_0x38ae86[_0x275b16(0xbd)](_0x653602),_0x3ffd14=_0x38ae86[_0x275b16(0xbd)](_0x29ca6e);_0x47839d['forEach'](_0x3930a3=>{const _0x4b461c=_0x275b16;_0x261f27[_0x4b461c(0x8d)](_0x3930a3)&&_0x47839d[_0x4b461c(0xb8)](_0x3930a3);}),_0x47839d[_0x275b16(0xcc)]&&(await _0x3ffd14[_0x275b16(0xbd)](_0x275b16(0x96),{'params':{'userIDs':[..._0x47839d]}}))[_0x275b16(0xad)][_0x275b16(0xab)][_0x275b16(0x95)](_0x5be515=>{const _0x534620=_0x275b16;_0x5be515&&_0x261f27[_0x534620(0xe5)](_0x5be515);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x4f5a1e,_0x6e51c9,_0x549c61,_0x1ebac5)=>{for(var _0x3aea04=_0x1ebac5>0x1?void 0x0:_0x1ebac5?K(_0x6e51c9,_0x549c61):_0x6e51c9,_0x6b4c92=_0x4f5a1e['length']-0x1,_0x311cbd;_0x6b4c92>=0x0;_0x6b4c92--)(_0x311cbd=_0x4f5a1e[_0x6b4c92])&&(_0x3aea04=_0x311cbd(_0x3aea04)||_0x3aea04);return _0x3aea04;},p=(_0x1430d3,_0x4eac93)=>(_0x1ef89c,_0x3e8da3)=>_0x4eac93(_0x1ef89c,_0x3e8da3,_0x1430d3);let _=class extends _0x224507{constructor(_0x36c26f,_0x1e2605,_0x24b3db,_0x1990a9){const _0x381b33=_0x4fb932;super(),this['_commentService']=_0x36c26f,this[_0x381b33(0xa6)]=_0x1e2605,this['_userService']=_0x24b3db,this[_0x381b33(0xc5)]=_0x1990a9,this[_0x381b33(0xaf)](),this[_0x381b33(0xc9)]();}[_0x4fb932(0xc9)](){const _0x3e4c2f=_0x4fb932;this['disposeWithMe'](this[_0x3e4c2f(0xa6)]['commentUpdate$'][_0x3e4c2f(0xb9)](_0x152de6(0x10))['subscribe'](_0x303df7=>{const _0x213c4a=_0x3e4c2f,_0x3c06b9=new Set();_0x303df7[_0x213c4a(0x95)](_0xacd6f6=>{const _0x45ffa7=_0x213c4a;switch(_0xacd6f6[_0x45ffa7(0x8b)]){case _0x45ffa7(0xd3):{const _0x154b1b=_0xacd6f6[_0x45ffa7(0xe6)]['personId'];_0x3c06b9[_0x45ffa7(0xd3)](_0x154b1b);break;}}}),B(this[_0x213c4a(0xc5)],_0x3c06b9);}));}[_0x4fb932(0xaf)](){const _0x56913d=_0x4fb932;this[_0x56913d(0x85)](this[_0x56913d(0xc4)]['commentUpdate$'][_0x56913d(0xcb)](async _0x329b88=>{const _0x17084d=_0x56913d;var _0x5dd0db,_0x228fd9,_0x5759b1,_0x5ace2f;const _0x2c53b2=(_0x5dd0db=this[_0x17084d(0xa6)][_0x17084d(0xdb)](_0x329b88[_0x17084d(0xa1)])[_0x17084d(0xe1)](_0x21cd62=>_0x21cd62[_0x17084d(0xb4)]===_0x329b88[_0x17084d(0xb4)]))==null?void 0x0:_0x5dd0db[_0x17084d(0xa3)];if(!_0x2c53b2)return;const {unitId:_0x3f8026,subUnitId:_0xffb399}=_0x2c53b2;switch(_0x329b88[_0x17084d(0xa7)]&&this['_userService'][_0x17084d(0xe5)](_0x329b88[_0x17084d(0xa7)]),_0x329b88['type']){case v['Add']:break;case v['Reply']:{this['_threadCommentModel'][_0x17084d(0x9b)](_0x3f8026,_0xffb399,{'unitId':_0x3f8026,'subUnitId':_0xffb399,'ref':'','id':_0x329b88[_0x17084d(0xd1)],'dT':y(+_0x329b88[_0x17084d(0x8c)]),'threadId':_0x329b88[_0x17084d(0xb4)],'personId':(_0x5759b1=(_0x228fd9=_0x329b88[_0x17084d(0xa7)])==null?void 0x0:_0x228fd9[_0x17084d(0x99)])!=null?_0x5759b1:_0x329b88['userId'],'text':JSON[_0x17084d(0x8f)](_0x329b88['content']),'parentId':_0x2c53b2['id']});break;}case v['Delete']:{const _0x591a73=this[_0x17084d(0xa6)][_0x17084d(0xaa)](_0x3f8026,_0xffb399,_0x329b88[_0x17084d(0xd1)]);_0x591a73&&_0x591a73[_0x17084d(0xe0)]&&this[_0x17084d(0xa6)]['deleteComment'](_0x3f8026,_0xffb399,_0x329b88[_0x17084d(0xd1)]);break;}case v[_0x17084d(0xc3)]:{this[_0x17084d(0xa6)]['updateComment'](_0x3f8026,_0xffb399,{'commentId':_0x329b88['replyId'],'text':JSON['parse'](_0x329b88['content'])});break;}case v[_0x17084d(0xe4)]:{const _0x96ec5e=(_0x5ace2f=this[_0x17084d(0xa6)][_0x17084d(0xdb)](_0x329b88[_0x17084d(0xa1)])[_0x17084d(0xe1)](_0x4913db=>_0x4913db[_0x17084d(0xb4)]===_0x329b88[_0x17084d(0xb4)]))==null?void 0x0:_0x5ace2f[_0x17084d(0xa3)];_0x96ec5e&&this[_0x17084d(0xa6)]['resolveComment'](_0x3f8026,_0xffb399,_0x96ec5e['id'],_0x329b88[_0x17084d(0xbe)]===I[_0x17084d(0xde)]);break;}}}));}};_=V([p(0x0,_0x128bec(_0x3e5339)),p(0x1,_0x128bec(_0xa6c183)),p(0x2,_0x128bec(_0x653602)),p(0x3,_0x128bec(_0x4f226c))],_);const z='thread-comment-data-source.config',O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x289d8c,_0xa98d1b,_0x266fa5,_0x22a279)=>{const _0x1626ed=_0x4fb932;for(var _0x218e22=_0x22a279>0x1?void 0x0:_0x22a279?k(_0xa98d1b,_0x266fa5):_0xa98d1b,_0xf5f4a0=_0x289d8c[_0x1626ed(0xd8)]-0x1,_0x21e9f0;_0xf5f4a0>=0x0;_0xf5f4a0--)(_0x21e9f0=_0x289d8c[_0xf5f4a0])&&(_0x218e22=_0x21e9f0(_0x218e22)||_0x218e22);return _0x218e22;},b=(_0xd59d05,_0x15acc2)=>(_0x3b59ff,_0x510660)=>_0x15acc2(_0x3b59ff,_0x510660,_0xd59d05);function _0x3851(_0x1d7e1c,_0x5adde3){_0x1d7e1c=_0x1d7e1c-0x82;const _0x5bc47e=_0x5bc4();let _0x38511f=_0x5bc47e[_0x1d7e1c];return _0x38511f;}function X(_0x11cae1,_0x5cb698){const _0x21836=_0x4fb932,_0x575525=_0x11cae1[_0x21836(0xbb)][0x0];return{..._0x5cb698,'id':_0x575525[_0x21836(0xd1)],'resolved':_0x11cae1[_0x21836(0xbe)]===0x1,'dT':y(_0x575525[_0x21836(0x8c)]),'personId':_0x575525['userId'],'threadId':_0x575525[_0x21836(0xb4)]};}function ee(_0x5e979b,_0x1117dc,_0x3012ef){const _0x43514c=_0x4fb932;var _0xc1188f,_0x233d81;if(((_0x233d81=(_0xc1188f=_0x5e979b==null?void 0x0:_0x5e979b[_0x43514c(0xbb)])==null?void 0x0:_0xc1188f[_0x43514c(0xd8)])!=null?_0x233d81:0x0)>0x0){const _0x3599ff=(_0x524cb9,_0x215f5a)=>({'id':_0x524cb9[_0x43514c(0xd1)],'threadId':_0x524cb9['threadId'],'dT':y(_0x524cb9[_0x43514c(0x8c)]),'personId':_0x524cb9[_0x43514c(0x9d)],'resolved':_0x5e979b[_0x43514c(0xbe)]===I['Solved'],'unitId':_0x1117dc,'subUnitId':_0x3012ef,'text':JSON['parse'](_0x524cb9['content']),'parentId':_0x215f5a}),_0x396132=_0x3599ff(_0x5e979b[_0x43514c(0xbb)][0x0]);return{..._0x396132,'children':_0x5e979b[_0x43514c(0xbb)][_0x43514c(0xb3)](0x1)[_0x43514c(0xa0)](_0x5c42b2=>_0x3599ff(_0x5c42b2,_0x396132['id']))};}return null;}let S=class{constructor(_0x42675d,_0x2538b5,_0x271cd3){const _0x4de1f6=_0x4fb932;this[_0x4de1f6(0xd9)]=_0x42675d,this[_0x4de1f6(0xd4)]=_0x2538b5,this[_0x4de1f6(0xda)]=_0x271cd3;}async[_0x4fb932(0x9b)](_0x594c2c){const _0x46c252=_0x4fb932;var _0x98fbab,_0x2c7d38;const {parentId:_0x48bc75,unitId:_0x43a20b,text:_0x5e569f,threadId:_0x5884d7}=_0x594c2c,_0x16d53d=(_0x2c7d38=(_0x98fbab=_0x5e569f[_0x46c252(0xb0)])==null?void 0x0:_0x98fbab[_0x46c252(0xb1)](_0x4efbf7=>_0x4efbf7['rangeType']===_0x42ea01[_0x46c252(0xc8)])[_0x46c252(0xa0)](_0x3c65c4=>_0x3c65c4['rangeId']))!=null?_0x2c7d38:[],_0x53a2c8=JSON[_0x46c252(0xba)](_0x5e569f),_0x4561b6=(await this[_0x46c252(0xda)]['requireSession'](_0x43a20b))[_0x46c252(0xdc)]();if(_0x48bc75){const _0xbd99f5={'memberId':_0x4561b6,'unitId':_0x43a20b,'content':_0x53a2c8,'mention':_0x16d53d,'threadId':_0x5884d7},_0x1f984f=(await this['_httpService'][_0x46c252(0x9e)]('/universer-api/comment/unit/'+_0x43a20b+'/reply',{'body':_0xbd99f5}))[_0x46c252(0xad)]['reply'];return{..._0x594c2c,'id':_0x1f984f[_0x46c252(0xd1)],'dT':_0x67181a(+_0x1f984f['createTimestamp'])[_0x46c252(0xc2)](_0x46c252(0xd7)),'personId':_0x1f984f[_0x46c252(0x9d)]};}else{const _0x142b70={'memberId':_0x4561b6,'unitId':_0x43a20b,'content':_0x53a2c8,'mention':_0x16d53d},_0x4d4647=await this[_0x46c252(0xd9)][_0x46c252(0x9e)](_0x46c252(0x89)+_0x43a20b+_0x46c252(0xa4),{'body':_0x142b70});return X(_0x4d4647[_0x46c252(0xad)][_0x46c252(0xe8)],_0x594c2c);}}async[_0x4fb932(0x94)](_0x27926d){const _0x117dcb=_0x4fb932;var _0x2dbded,_0x43a066;const {text:_0x189b17,unitId:_0x1f83e0}=_0x27926d,_0x30ca7f=(_0x43a066=(_0x2dbded=_0x189b17[_0x117dcb(0xb0)])==null?void 0x0:_0x2dbded[_0x117dcb(0xb1)](_0x2682c2=>_0x2682c2[_0x117dcb(0x82)]===_0x42ea01['COMMENT'])[_0x117dcb(0xa0)](_0x16919f=>_0x16919f[_0x117dcb(0xcf)]))!=null?_0x43a066:[],_0x522faa=JSON[_0x117dcb(0xba)](_0x189b17),_0x313f71=_0x27926d[_0x117dcb(0xb4)],_0x393243=_0x27926d['id'],_0x34c20c={'memberId':(await this['_sessionService'][_0x117dcb(0x9a)](_0x1f83e0))['getMemberID'](),'unitId':_0x1f83e0,'threadId':_0x313f71,'mention':_0x30ca7f,'content':_0x522faa,'replyId':_0x393243},_0x2ac145=await this[_0x117dcb(0xd9)][_0x117dcb(0x9e)](_0x117dcb(0x89)+_0x1f83e0+'/edit',{'body':_0x34c20c});return!_0x2ac145[_0x117dcb(0xad)]['error']||_0x2ac145[_0x117dcb(0xad)][_0x117dcb(0x9f)][_0x117dcb(0xd5)]===0x1;}async[_0x4fb932(0xb5)](_0x522b57){const _0x402511=_0x4fb932,{unitId:_0x2373d2}=_0x522b57,_0x596b2f=_0x522b57[_0x402511(0xb4)],_0x2f6612={'memberId':this[_0x402511(0xd4)][_0x402511(0xdf)]()[_0x402511(0x99)],'unitId':_0x2373d2,'threadId':_0x596b2f,'solved':_0x522b57[_0x402511(0x92)]?I[_0x402511(0xde)]:I[_0x402511(0x8e)]},_0x562f2b=await this[_0x402511(0xd9)][_0x402511(0x9e)](_0x402511(0x89)+_0x2373d2+_0x402511(0xd6),{'body':_0x2f6612});return!_0x562f2b[_0x402511(0xad)][_0x402511(0x9f)]||_0x562f2b[_0x402511(0xad)]['error'][_0x402511(0xd5)]===0x1;}async[_0x4fb932(0xc7)](_0x1f759f,_0xbe3d66,_0x51d002,_0x264644){const _0x13d110=_0x4fb932,_0x2f53bc={'memberId':(await this[_0x13d110(0xda)][_0x13d110(0x9a)](_0x1f759f))['getMemberID'](),'threadId':_0x51d002,'replyId':_0x264644,'unitId':_0x1f759f},_0x38bf6e=await this[_0x13d110(0xd9)][_0x13d110(0x9e)](_0x13d110(0x89)+_0x1f759f+'/delete',{'body':_0x2f53bc});return!_0x38bf6e[_0x13d110(0xad)][_0x13d110(0x9f)]||_0x38bf6e[_0x13d110(0xad)][_0x13d110(0x9f)][_0x13d110(0xd5)]===0x1;}async[_0x4fb932(0xac)](_0x1c4a1f,_0x2f7aad,_0x4c8daa){const _0x7e0295=_0x4fb932,_0x47abd0={'unitId':_0x1c4a1f,'threadId':_0x4c8daa},_0x579495=await this[_0x7e0295(0xd9)]['post'](_0x7e0295(0x89)+_0x1c4a1f+_0x7e0295(0xbc),{'body':_0x47abd0}),_0x42e971=_0x4c8daa[_0x7e0295(0xa0)](_0x4b9c42=>ee(_0x579495['body'][_0x7e0295(0xc6)][_0x4b9c42],_0x1c4a1f,_0x2f7aad))[_0x7e0295(0xb1)](Boolean);return Object['values'](_0x579495[_0x7e0295(0xad)][_0x7e0295(0xab)])[_0x7e0295(0x95)](_0x4f7f69=>{const _0x480c9f=_0x7e0295;this[_0x480c9f(0xd4)]['addUser'](_0x4f7f69);}),_0x42e971;}['saveCommentToSnapshot'](_0x4fed5f){const _0x172f82=_0x4fb932;return{'id':_0x4fed5f['id'],'threadId':_0x4fed5f[_0x172f82(0xb4)],'ref':_0x4fed5f[_0x172f82(0xb7)]};}};S=Q([b(0x0,_0x128bec(_0x29ca6e)),b(0x1,_0x128bec(_0x653602)),b(0x2,_0x128bec(_0x153124))],S);function _0x5bc4(){const _0x5e4d37=['type','createTimestamp','getUser','OpenOrReOpen','parse','40GvBiNF','12YHKSyo','resolved','syncUpdateMutationToColla','updateComment','forEach','/universer-api/user/list','115299FnLaTJ','Unknown','userID','requireSession','addComment','Delete','userId','post','error','map','unitId','UNRECOGNIZED','root','/add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentModel','user','1644973WzqnLR','16615niFQMo','getComment','users','listComments','body','defineProperty','_init','customRanges','filter','setConfig','slice','threadId','resolveComment','_threadCommentDataSourceService','ref','delete','pipe','stringify','replies','/list','get','solved','668982ZzXfKv','getOwnPropertyDescriptor','42518KVyFRm','format','Edit','_commentService','_injector','comments','deleteComment','COMMENT','_initUserSync','Reply','subscribe','size','601uAgdHk','Add','rangeId','_config','replyId','10dsfoMF','add','_userService','code','/solved','YYYY/MM/DD\x20HH:mm','length','_httpService','_sessionService','getUnit','getMemberID','_initDataSource','Solved','getCurrentUser','parentId','find','pluginName','_threadCommentDataSource','Solve','addUser','payload','onReady','comment','rangeType','onStarting','_configService','disposeWithMe','8TKUnwx','dataSource','582YECVhX','/universer-api/comment/unit/','627915elAVhm'];_0x5bc4=function(){return _0x5e4d37;};return _0x5bc4();}var re=Object[_0x4fb932(0xc0)],te=(_0x240e22,_0x4fe0cc,_0x1396d8,_0x274ba3)=>{for(var _0x178cbb=_0x274ba3>0x1?void 0x0:_0x274ba3?re(_0x4fe0cc,_0x1396d8):_0x4fe0cc,_0x3338ab=_0x240e22['length']-0x1,_0x496294;_0x3338ab>=0x0;_0x3338ab--)(_0x496294=_0x240e22[_0x3338ab])&&(_0x178cbb=_0x496294(_0x178cbb)||_0x178cbb);return _0x178cbb;},M=(_0x4061b6,_0x166db9)=>(_0x16cb32,_0x551e95)=>_0x166db9(_0x16cb32,_0x551e95,_0x4061b6);let f=class extends _0x224507{constructor(_0x401ede,_0x35bfce){const _0x7651e9=_0x4fb932;super(),this[_0x7651e9(0xb6)]=_0x401ede,this[_0x7651e9(0xe3)]=_0x35bfce,this[_0x7651e9(0xdd)]();}[_0x4fb932(0xdd)](){const _0x1deaa7=_0x4fb932;this[_0x1deaa7(0xb6)][_0x1deaa7(0x87)]=this[_0x1deaa7(0xe3)],this[_0x1deaa7(0xb6)][_0x1deaa7(0x93)]=!0x1;}};f=te([M(0x0,_0x40cc3e),M(0x1,_0x128bec(S))],f);var se=Object[_0x4fb932(0xae)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x412e3b,_0x48474f,_0xfd20e7)=>_0x48474f in _0x412e3b?se(_0x412e3b,_0x48474f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xfd20e7}):_0x412e3b[_0x48474f]=_0xfd20e7,ie=(_0x4b7edf,_0x292da4,_0x28d3c0,_0x5f4356)=>{const _0x308822=_0x4fb932;for(var _0x396e71=_0x5f4356>0x1?void 0x0:_0x5f4356?oe(_0x292da4,_0x28d3c0):_0x292da4,_0x27b2c0=_0x4b7edf[_0x308822(0xd8)]-0x1,_0x5664a8;_0x27b2c0>=0x0;_0x27b2c0--)(_0x5664a8=_0x4b7edf[_0x27b2c0])&&(_0x396e71=_0x5664a8(_0x396e71)||_0x396e71);return _0x396e71;},N=(_0x4d4976,_0x237e50)=>(_0x25a0f7,_0xed0263)=>_0x237e50(_0x25a0f7,_0xed0263,_0x4d4976),$=(_0x3cd161,_0x53edce,_0x3e15e7)=>ne(_0x3cd161,typeof _0x53edce!='symbol'?_0x53edce+'':_0x53edce,_0x3e15e7);let g=class extends _0x58a3f6{constructor(_0x24634d=O,_0x111f43,_0x3e83fe){const _0x2aa71c=_0x4fb932;super(),this[_0x2aa71c(0xd0)]=_0x24634d,this[_0x2aa71c(0xc5)]=_0x111f43,this[_0x2aa71c(0x84)]=_0x3e83fe;const {..._0x2bac8c}=_0x348f8b({},O,this[_0x2aa71c(0xd0)]);this[_0x2aa71c(0x84)][_0x2aa71c(0xb2)](z,_0x2bac8c);}[_0x4fb932(0x83)](){const _0x5659e9=_0x4fb932;[[S],[f],[_]][_0x5659e9(0x95)](_0x303714=>{const _0x338f32=_0x5659e9;this[_0x338f32(0xc5)][_0x338f32(0xd3)](_0x303714);});}[_0x4fb932(0xe7)](){const _0xa8e340=_0x4fb932;this[_0xa8e340(0xc5)][_0xa8e340(0xbd)](f),this[_0xa8e340(0xc5)]['get'](_);}};$(g,_0x4fb932(0xe2),W),$(g,_0x4fb932(0x8b),_0x49b985['UNIVER_UNKNOWN']),g=ie([_0x3d8f7e(_0x95a849,_0x302632,_0x21485d),N(0x1,_0x128bec(_0x4f226c)),N(0x2,_0x1d7854)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x390ebd=_0xb832;(function(_0x10052c,_0x44c00b){const _0x555670=_0xb832,_0x19b972=_0x10052c();while(!![]){try{const _0x1c2fd4=parseInt(_0x555670(0x16e))/0x1+-parseInt(_0x555670(0x167))/0x2+parseInt(_0x555670(0x16d))/0x3+parseInt(_0x555670(0x159))/0x4+parseInt(_0x555670(0x15a))/0x5*(-parseInt(_0x555670(0x1be))/0x6)+parseInt(_0x555670(0x1bc))/0x7*(parseInt(_0x555670(0x16f))/0x8)+parseInt(_0x555670(0x18a))/0x9*(-parseInt(_0x555670(0x1a1))/0xa);if(_0x1c2fd4===_0x44c00b)break;else _0x19b972['push'](_0x19b972['shift']());}catch(_0x21deba){_0x19b972['push'](_0x19b972['shift']());}}}(_0x48f8,0x8f0a6));import{CommentService as _0x5b9634,CollaborationSessionService as _0x1815bc,UniverCollaborationClientPlugin as _0x395b52}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x16cf6f}from'@univerjs-pro/license';import{dayjs as _0x252e0c,UserManagerService as _0x3039bd,Inject as _0x1a89d1,Injector as _0x11e476,Disposable as _0xdcc8ac,CustomRangeType as _0x339677,UniverInstanceType as _0x16c046,DependentOn as _0x5b7f34,IConfigService as _0x828273,Plugin as _0x1d42c8,merge as _0x22269a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x59d47d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1356a4,IThreadCommentDataSourceService as _0x46c254}from'@univerjs/thread-comment';import{bufferTime as _0x242edb}from'rxjs';import{HTTPService as _0x28a050}from'@univerjs/network';const W=_0x390ebd(0x18f);var I=(_0x531b8b=>(_0x531b8b[_0x531b8b[_0x390ebd(0x1a5)]=0x0]=_0x390ebd(0x1a5),_0x531b8b[_0x531b8b['Solved']=0x1]=_0x390ebd(0x176),_0x531b8b[_0x531b8b['UNRECOGNIZED']=-0x1]=_0x390ebd(0x19a),_0x531b8b))(I||{}),v=(_0x1b8941=>(_0x1b8941[_0x1b8941['Unknown']=0x0]='Unknown',_0x1b8941[_0x1b8941[_0x390ebd(0x187)]=0x1]='Add',_0x1b8941[_0x1b8941['Reply']=0x2]=_0x390ebd(0x189),_0x1b8941[_0x1b8941['Edit']=0x3]=_0x390ebd(0x1a4),_0x1b8941[_0x1b8941[_0x390ebd(0x193)]=0x4]=_0x390ebd(0x193),_0x1b8941[_0x1b8941['Solve']=0x5]='Solve',_0x1b8941[_0x1b8941[_0x390ebd(0x19a)]=-0x1]=_0x390ebd(0x19a),_0x1b8941))(v||{});const y=_0x416089=>_0x252e0c(new Date(+_0x416089))['format'](_0x390ebd(0x17d)),B=async(_0x3bd88d,_0xed1b20)=>{const _0xe95c37=_0x390ebd,_0x850852=_0x3bd88d[_0xe95c37(0x194)](_0x3039bd),_0x4752c7=_0x3bd88d['get'](_0x28a050);_0xed1b20['forEach'](_0x1ced2d=>{const _0x1b55e7=_0xe95c37;_0x850852[_0x1b55e7(0x1a7)](_0x1ced2d)&&_0xed1b20[_0x1b55e7(0x18c)](_0x1ced2d);}),_0xed1b20[_0xe95c37(0x19b)]&&(await _0x4752c7[_0xe95c37(0x194)](_0xe95c37(0x171),{'params':{'userIDs':[..._0xed1b20]}}))[_0xe95c37(0x1aa)][_0xe95c37(0x190)][_0xe95c37(0x186)](_0x427edb=>{_0x427edb&&_0x850852['addUser'](_0x427edb);});};var K=Object[_0x390ebd(0x197)],V=(_0x8bbdb3,_0x57ca97,_0x7a84d6,_0x2114c8)=>{const _0x3d7b91=_0x390ebd;for(var _0x1b4225=_0x2114c8>0x1?void 0x0:_0x2114c8?K(_0x57ca97,_0x7a84d6):_0x57ca97,_0x31ce4e=_0x8bbdb3[_0x3d7b91(0x19f)]-0x1,_0x52c782;_0x31ce4e>=0x0;_0x31ce4e--)(_0x52c782=_0x8bbdb3[_0x31ce4e])&&(_0x1b4225=_0x52c782(_0x1b4225)||_0x1b4225);return _0x1b4225;},p=(_0x30effb,_0xd151e)=>(_0x339de0,_0x1df885)=>_0xd151e(_0x339de0,_0x1df885,_0x30effb);let _=class extends _0xdcc8ac{constructor(_0x4cfc7f,_0x4442dc,_0x33e7d6,_0x57f45d){const _0x1f6528=_0x390ebd;super(),this[_0x1f6528(0x179)]=_0x4cfc7f,this['_threadCommentModel']=_0x4442dc,this[_0x1f6528(0x160)]=_0x33e7d6,this['_injector']=_0x57f45d,this[_0x1f6528(0x16a)](),this[_0x1f6528(0x170)]();}[_0x390ebd(0x170)](){const _0xe28928=_0x390ebd;this[_0xe28928(0x1a3)](this[_0xe28928(0x15b)][_0xe28928(0x15c)][_0xe28928(0x161)](_0x242edb(0x10))['subscribe'](_0x810c8f=>{const _0x248e08=_0xe28928,_0xbdda71=new Set();_0x810c8f[_0x248e08(0x186)](_0x104c92=>{const _0x571adc=_0x248e08;switch(_0x104c92[_0x571adc(0x17b)]){case _0x571adc(0x198):{const _0xfff2fa=_0x104c92[_0x571adc(0x1a2)]['personId'];_0xbdda71[_0x571adc(0x198)](_0xfff2fa);break;}}}),B(this[_0x248e08(0x19e)],_0xbdda71);}));}[_0x390ebd(0x16a)](){const _0x56cae4=_0x390ebd;this[_0x56cae4(0x1a3)](this[_0x56cae4(0x179)][_0x56cae4(0x15c)][_0x56cae4(0x184)](async _0x27bf83=>{const _0x333319=_0x56cae4;var _0x476ce8,_0x3925be,_0x40bc82,_0x566ed4;const _0x1b008c=(_0x476ce8=this[_0x333319(0x15b)]['getUnit'](_0x27bf83['unitId'])[_0x333319(0x17f)](_0x174b29=>_0x174b29[_0x333319(0x17c)]===_0x27bf83[_0x333319(0x17c)]))==null?void 0x0:_0x476ce8['root'];if(!_0x1b008c)return;const {unitId:_0x12b361,subUnitId:_0x1dcd14}=_0x1b008c;switch(_0x27bf83[_0x333319(0x175)]&&this['_userService'][_0x333319(0x180)](_0x27bf83['user']),_0x27bf83[_0x333319(0x17b)]){case v[_0x333319(0x187)]:break;case v[_0x333319(0x189)]:{this[_0x333319(0x15b)][_0x333319(0x1ac)](_0x12b361,_0x1dcd14,{'unitId':_0x12b361,'subUnitId':_0x1dcd14,'ref':'','id':_0x27bf83[_0x333319(0x195)],'dT':y(+_0x27bf83['createTimestamp']),'threadId':_0x27bf83[_0x333319(0x17c)],'personId':(_0x40bc82=(_0x3925be=_0x27bf83[_0x333319(0x175)])==null?void 0x0:_0x3925be[_0x333319(0x18d)])!=null?_0x40bc82:_0x27bf83[_0x333319(0x1b8)],'text':JSON[_0x333319(0x162)](_0x27bf83[_0x333319(0x1ad)]),'parentId':_0x1b008c['id']});break;}case v['Delete']:{const _0x26410b=this[_0x333319(0x15b)]['getComment'](_0x12b361,_0x1dcd14,_0x27bf83[_0x333319(0x195)]);_0x26410b&&_0x26410b[_0x333319(0x19c)]&&this[_0x333319(0x15b)]['deleteComment'](_0x12b361,_0x1dcd14,_0x27bf83[_0x333319(0x195)]);break;}case v['Edit']:{this[_0x333319(0x15b)][_0x333319(0x1b6)](_0x12b361,_0x1dcd14,{'commentId':_0x27bf83[_0x333319(0x195)],'text':JSON[_0x333319(0x162)](_0x27bf83['content'])});break;}case v[_0x333319(0x1a0)]:{const _0x26202a=(_0x566ed4=this['_threadCommentModel'][_0x333319(0x181)](_0x27bf83[_0x333319(0x15f)])[_0x333319(0x17f)](_0x4b5345=>_0x4b5345[_0x333319(0x17c)]===_0x27bf83[_0x333319(0x17c)]))==null?void 0x0:_0x566ed4[_0x333319(0x1a8)];_0x26202a&&this[_0x333319(0x15b)][_0x333319(0x157)](_0x12b361,_0x1dcd14,_0x26202a['id'],_0x27bf83[_0x333319(0x196)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x1a89d1(_0x5b9634)),p(0x1,_0x1a89d1(_0x1356a4)),p(0x2,_0x1a89d1(_0x3039bd)),p(0x3,_0x1a89d1(_0x11e476))],_);function _0xb832(_0x4368d3,_0x1f71ee){_0x4368d3=_0x4368d3-0x157;const _0x48f8e7=_0x48f8();let _0xb83245=_0x48f8e7[_0x4368d3];return _0xb83245;}const z=_0x390ebd(0x1b2),O={};var k=Object[_0x390ebd(0x197)],Q=(_0x32e31a,_0x34f7e7,_0x1d3f16,_0x172180)=>{const _0xfe2134=_0x390ebd;for(var _0x26c6da=_0x172180>0x1?void 0x0:_0x172180?k(_0x34f7e7,_0x1d3f16):_0x34f7e7,_0x571f89=_0x32e31a[_0xfe2134(0x19f)]-0x1,_0x1636e4;_0x571f89>=0x0;_0x571f89--)(_0x1636e4=_0x32e31a[_0x571f89])&&(_0x26c6da=_0x1636e4(_0x26c6da)||_0x26c6da);return _0x26c6da;},b=(_0x530f71,_0x368fda)=>(_0x379903,_0x172958)=>_0x368fda(_0x379903,_0x172958,_0x530f71);function X(_0x52ec88,_0x5f4cea){const _0x57ac86=_0x390ebd,_0x1b44c1=_0x52ec88['replies'][0x0];return{..._0x5f4cea,'id':_0x1b44c1['replyId'],'resolved':_0x52ec88[_0x57ac86(0x196)]===0x1,'dT':y(_0x1b44c1['createTimestamp']),'personId':_0x1b44c1[_0x57ac86(0x1b8)],'threadId':_0x1b44c1[_0x57ac86(0x17c)]};}function ee(_0x1c3ff9,_0x54b2b7,_0x499b7a){const _0xb8ea17=_0x390ebd;var _0x1b7dde,_0x52bb2e;if(((_0x52bb2e=(_0x1b7dde=_0x1c3ff9==null?void 0x0:_0x1c3ff9[_0xb8ea17(0x1b4)])==null?void 0x0:_0x1b7dde[_0xb8ea17(0x19f)])!=null?_0x52bb2e:0x0)>0x0){const _0x10d111=(_0x12acf0,_0x51a6eb)=>({'id':_0x12acf0['replyId'],'threadId':_0x12acf0['threadId'],'dT':y(_0x12acf0[_0xb8ea17(0x183)]),'personId':_0x12acf0[_0xb8ea17(0x1b8)],'resolved':_0x1c3ff9['solved']===I[_0xb8ea17(0x176)],'unitId':_0x54b2b7,'subUnitId':_0x499b7a,'text':JSON['parse'](_0x12acf0[_0xb8ea17(0x1ad)]),'parentId':_0x51a6eb}),_0x18f4ce=_0x10d111(_0x1c3ff9['replies'][0x0]);return{..._0x18f4ce,'children':_0x1c3ff9[_0xb8ea17(0x1b4)][_0xb8ea17(0x1ae)](0x1)['map'](_0xc35bea=>_0x10d111(_0xc35bea,_0x18f4ce['id']))};}return null;}let S=class{constructor(_0x46f022,_0x56f40a,_0x2cc885){const _0x28410a=_0x390ebd;this[_0x28410a(0x15e)]=_0x46f022,this[_0x28410a(0x160)]=_0x56f40a,this[_0x28410a(0x1b5)]=_0x2cc885;}async[_0x390ebd(0x1ac)](_0x39c4be){const _0x29ffc7=_0x390ebd;var _0x3f759c,_0x4d151f;const {parentId:_0x34d7c7,unitId:_0x114d34,text:_0x14d38e,threadId:_0x387a9a}=_0x39c4be,_0x45198f=(_0x4d151f=(_0x3f759c=_0x14d38e[_0x29ffc7(0x16b)])==null?void 0x0:_0x3f759c[_0x29ffc7(0x1ab)](_0x5bc132=>_0x5bc132[_0x29ffc7(0x18e)]===_0x339677[_0x29ffc7(0x1bd)])['map'](_0x40e817=>_0x40e817[_0x29ffc7(0x19d)]))!=null?_0x4d151f:[],_0x4d3bca=JSON[_0x29ffc7(0x163)](_0x14d38e),_0x360cb6=(await this[_0x29ffc7(0x1b5)][_0x29ffc7(0x172)](_0x114d34))[_0x29ffc7(0x188)]();if(_0x34d7c7){const _0x41a87e={'memberId':_0x360cb6,'unitId':_0x114d34,'content':_0x4d3bca,'mention':_0x45198f,'threadId':_0x387a9a},_0x46ebc4=(await this[_0x29ffc7(0x15e)][_0x29ffc7(0x1ba)](_0x29ffc7(0x1b9)+_0x114d34+_0x29ffc7(0x1b0),{'body':_0x41a87e}))[_0x29ffc7(0x1aa)][_0x29ffc7(0x173)];return{..._0x39c4be,'id':_0x46ebc4[_0x29ffc7(0x195)],'dT':_0x252e0c(+_0x46ebc4['createTimestamp'])[_0x29ffc7(0x192)](_0x29ffc7(0x17d)),'personId':_0x46ebc4['userId']};}else{const _0x5122a2={'memberId':_0x360cb6,'unitId':_0x114d34,'content':_0x4d3bca,'mention':_0x45198f},_0xa9d2ff=await this[_0x29ffc7(0x15e)][_0x29ffc7(0x1ba)](_0x29ffc7(0x1b9)+_0x114d34+'/add',{'body':_0x5122a2});return X(_0xa9d2ff[_0x29ffc7(0x1aa)][_0x29ffc7(0x1a9)],_0x39c4be);}}async[_0x390ebd(0x1b6)](_0x3315fe){const _0x5d50cc=_0x390ebd;var _0x4788a8,_0x809d75;const {text:_0x12fd68,unitId:_0x231c69}=_0x3315fe,_0x386f40=(_0x809d75=(_0x4788a8=_0x12fd68['customRanges'])==null?void 0x0:_0x4788a8[_0x5d50cc(0x1ab)](_0x42f56c=>_0x42f56c[_0x5d50cc(0x18e)]===_0x339677[_0x5d50cc(0x1bd)])[_0x5d50cc(0x1a6)](_0x514401=>_0x514401[_0x5d50cc(0x19d)]))!=null?_0x809d75:[],_0x445ca6=JSON[_0x5d50cc(0x163)](_0x12fd68),_0x2fd922=_0x3315fe[_0x5d50cc(0x17c)],_0x3057e6=_0x3315fe['id'],_0x30ba8f={'memberId':(await this[_0x5d50cc(0x1b5)][_0x5d50cc(0x172)](_0x231c69))[_0x5d50cc(0x188)](),'unitId':_0x231c69,'threadId':_0x2fd922,'mention':_0x386f40,'content':_0x445ca6,'replyId':_0x3057e6},_0x395ff9=await this[_0x5d50cc(0x15e)][_0x5d50cc(0x1ba)]('/universer-api/comment/unit/'+_0x231c69+_0x5d50cc(0x177),{'body':_0x30ba8f});return!_0x395ff9['body'][_0x5d50cc(0x174)]||_0x395ff9[_0x5d50cc(0x1aa)][_0x5d50cc(0x174)][_0x5d50cc(0x164)]===0x1;}async[_0x390ebd(0x157)](_0x44be1a){const _0x283893=_0x390ebd,{unitId:_0x36d7bc}=_0x44be1a,_0x565663=_0x44be1a['threadId'],_0x115acc={'memberId':this[_0x283893(0x160)][_0x283893(0x1bb)]()['userID'],'unitId':_0x36d7bc,'threadId':_0x565663,'solved':_0x44be1a[_0x283893(0x1af)]?I[_0x283893(0x176)]:I[_0x283893(0x1a5)]},_0x1c6b6c=await this[_0x283893(0x15e)][_0x283893(0x1ba)]('/universer-api/comment/unit/'+_0x36d7bc+_0x283893(0x165),{'body':_0x115acc});return!_0x1c6b6c[_0x283893(0x1aa)][_0x283893(0x174)]||_0x1c6b6c[_0x283893(0x1aa)][_0x283893(0x174)][_0x283893(0x164)]===0x1;}async[_0x390ebd(0x17e)](_0x4b2fc3,_0x13a00a,_0x4fadb3,_0x7a4c70){const _0x1cf08a=_0x390ebd,_0x16cfa3={'memberId':(await this[_0x1cf08a(0x1b5)][_0x1cf08a(0x172)](_0x4b2fc3))[_0x1cf08a(0x188)](),'threadId':_0x4fadb3,'replyId':_0x7a4c70,'unitId':_0x4b2fc3},_0x192dd4=await this[_0x1cf08a(0x15e)]['post'](_0x1cf08a(0x1b9)+_0x4b2fc3+_0x1cf08a(0x18b),{'body':_0x16cfa3});return!_0x192dd4['body'][_0x1cf08a(0x174)]||_0x192dd4[_0x1cf08a(0x1aa)][_0x1cf08a(0x174)][_0x1cf08a(0x164)]===0x1;}async[_0x390ebd(0x15d)](_0x58f3de,_0x90df94,_0x3f6189){const _0x5396b4=_0x390ebd,_0x2d931c={'unitId':_0x58f3de,'threadId':_0x3f6189},_0x1ca2e2=await this[_0x5396b4(0x15e)][_0x5396b4(0x1ba)]('/universer-api/comment/unit/'+_0x58f3de+_0x5396b4(0x17a),{'body':_0x2d931c}),_0x447a58=_0x3f6189['map'](_0x18e918=>ee(_0x1ca2e2[_0x5396b4(0x1aa)][_0x5396b4(0x182)][_0x18e918],_0x58f3de,_0x90df94))[_0x5396b4(0x1ab)](Boolean);return Object['values'](_0x1ca2e2['body']['users'])[_0x5396b4(0x186)](_0x471c2b=>{const _0x3fb686=_0x5396b4;this[_0x3fb686(0x160)][_0x3fb686(0x180)](_0x471c2b);}),_0x447a58;}[_0x390ebd(0x178)](_0x55cffb){const _0x3c2b42=_0x390ebd;return{'id':_0x55cffb['id'],'threadId':_0x55cffb[_0x3c2b42(0x17c)],'ref':_0x55cffb[_0x3c2b42(0x1b7)]};}};S=Q([b(0x0,_0x1a89d1(_0x28a050)),b(0x1,_0x1a89d1(_0x3039bd)),b(0x2,_0x1a89d1(_0x1815bc))],S);var re=Object[_0x390ebd(0x197)],te=(_0x1fce58,_0x58cca3,_0x1819f0,_0x39d9b6)=>{const _0x24ae52=_0x390ebd;for(var _0x43fb58=_0x39d9b6>0x1?void 0x0:_0x39d9b6?re(_0x58cca3,_0x1819f0):_0x58cca3,_0x3c82f4=_0x1fce58[_0x24ae52(0x19f)]-0x1,_0x1b0197;_0x3c82f4>=0x0;_0x3c82f4--)(_0x1b0197=_0x1fce58[_0x3c82f4])&&(_0x43fb58=_0x1b0197(_0x43fb58)||_0x43fb58);return _0x43fb58;},M=(_0x32d953,_0x4a6396)=>(_0x2dfc45,_0x3d11db)=>_0x4a6396(_0x2dfc45,_0x3d11db,_0x32d953);let f=class extends _0xdcc8ac{constructor(_0x26677a,_0x4923c7){const _0x5ab973=_0x390ebd;super(),this[_0x5ab973(0x191)]=_0x26677a,this['_threadCommentDataSource']=_0x4923c7,this[_0x5ab973(0x16c)]();}['_initDataSource'](){const _0x3cd22c=_0x390ebd;this[_0x3cd22c(0x191)][_0x3cd22c(0x1b3)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x3cd22c(0x168)]=!0x1;}};f=te([M(0x0,_0x46c254),M(0x1,_0x1a89d1(S))],f);var se=Object[_0x390ebd(0x199)],oe=Object['getOwnPropertyDescriptor'],ne=(_0xa7fc83,_0x120229,_0x87295e)=>_0x120229 in _0xa7fc83?se(_0xa7fc83,_0x120229,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x87295e}):_0xa7fc83[_0x120229]=_0x87295e,ie=(_0x391ecd,_0x46da9d,_0x44421c,_0x16df4c)=>{for(var _0x16e47f=_0x16df4c>0x1?void 0x0:_0x16df4c?oe(_0x46da9d,_0x44421c):_0x46da9d,_0x1b9df9=_0x391ecd['length']-0x1,_0x3d7a23;_0x1b9df9>=0x0;_0x1b9df9--)(_0x3d7a23=_0x391ecd[_0x1b9df9])&&(_0x16e47f=_0x3d7a23(_0x16e47f)||_0x16e47f);return _0x16e47f;},N=(_0x2b4efa,_0xb5c73c)=>(_0x558afc,_0x4cd159)=>_0xb5c73c(_0x558afc,_0x4cd159,_0x2b4efa),$=(_0x135955,_0x2bce72,_0x3b8b78)=>ne(_0x135955,typeof _0x2bce72!=_0x390ebd(0x169)?_0x2bce72+'':_0x2bce72,_0x3b8b78);function _0x48f8(){const _0x21d76e=['70188CfXhuL','resolveComment','UNIVER_UNKNOWN','860528khrtpi','90QQqvjn','_threadCommentModel','commentUpdate$','listComments','_httpService','unitId','_userService','pipe','parse','stringify','code','/solved','setConfig','2161640hjUeBk','syncUpdateMutationToColla','symbol','_init','customRanges','_initDataSource','851199pytMiX','371447MXUIly','8IMDaJC','_initUserSync','/universer-api/user/list','requireSession','reply','error','user','Solved','/edit','saveCommentToSnapshot','_commentService','/list','type','threadId','YYYY/MM/DD\x20HH:mm','deleteComment','find','addUser','getUnit','comments','createTimestamp','subscribe','_config','forEach','Add','getMemberID','Reply','313326hioooz','/delete','delete','userID','rangeType','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','users','_threadCommentDataSourceService','format','Delete','get','replyId','solved','getOwnPropertyDescriptor','add','defineProperty','UNRECOGNIZED','size','parentId','rangeId','_injector','length','Solve','20eVjjfg','payload','disposeWithMe','Edit','OpenOrReOpen','map','getUser','root','comment','body','filter','addComment','content','slice','resolved','/reply','_configService','thread-comment-data-source.config','dataSource','replies','_sessionService','updateComment','ref','userId','/universer-api/comment/unit/','post','getCurrentUser','7536158gcvuvp','COMMENT'];_0x48f8=function(){return _0x21d76e;};return _0x48f8();}let g=class extends _0x1d42c8{constructor(_0x13a746=O,_0x47b0f9,_0x46f81b){const _0x6f45a2=_0x390ebd;super(),this[_0x6f45a2(0x185)]=_0x13a746,this[_0x6f45a2(0x19e)]=_0x47b0f9,this[_0x6f45a2(0x1b1)]=_0x46f81b;const {..._0x1da4a1}=_0x22269a({},O,this[_0x6f45a2(0x185)]);this[_0x6f45a2(0x1b1)][_0x6f45a2(0x166)](z,_0x1da4a1);}['onStarting'](){const _0xaed757=_0x390ebd;[[S],[f],[_]][_0xaed757(0x186)](_0x40bab0=>{const _0x2bfe02=_0xaed757;this[_0x2bfe02(0x19e)]['add'](_0x40bab0);});}['onReady'](){const _0x25286c=_0x390ebd;this[_0x25286c(0x19e)]['get'](f),this[_0x25286c(0x19e)]['get'](_);}};$(g,'pluginName',W),$(g,'type',_0x16c046[_0x390ebd(0x158)]),g=ie([_0x5b7f34(_0x59d47d,_0x395b52,_0x16cf6f),N(0x1,_0x1a89d1(_0x11e476)),N(0x2,_0x828273)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x4fb932=_0x3851;(function(_0xc1e752,_0x44c97f){const _0x196dcc=_0x3851,_0x2198d9=_0xc1e752();while(!![]){try{const _0x1054ab=parseInt(_0x196dcc(0xcd))/0x1*(parseInt(_0x196dcc(0x88))/0x2)+-parseInt(_0x196dcc(0x8a))/0x3+-parseInt(_0x196dcc(0x90))/0x4*(parseInt(_0x196dcc(0xa9))/0x5)+parseInt(_0x196dcc(0xbf))/0x6+parseInt(_0x196dcc(0xc1))/0x7*(parseInt(_0x196dcc(0x86))/0x8)+-parseInt(_0x196dcc(0x97))/0x9*(parseInt(_0x196dcc(0xd2))/0xa)+parseInt(_0x196dcc(0xa8))/0xb*(parseInt(_0x196dcc(0x91))/0xc);if(_0x1054ab===_0x44c97f)break;else _0x2198d9['push'](_0x2198d9['shift']());}catch(_0x41f3e0){_0x2198d9['push'](_0x2198d9['shift']());}}}(_0x5bc4,0x2d923));import{CommentService as _0x3e5339,CollaborationSessionService as _0x153124,UniverCollaborationClientPlugin as _0x302632}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x21485d}from'@univerjs-pro/license';import{dayjs as _0x67181a,UserManagerService as _0x653602,Inject as _0x128bec,Injector as _0x4f226c,Disposable as _0x224507,CustomRangeType as _0x42ea01,UniverInstanceType as _0x49b985,DependentOn as _0x3d8f7e,IConfigService as _0x1d7854,Plugin as _0x58a3f6,merge as _0x348f8b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x95a849}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xa6c183,IThreadCommentDataSourceService as _0x40cc3e}from'@univerjs/thread-comment';import{bufferTime as _0x152de6}from'rxjs';import{HTTPService as _0x29ca6e}from'@univerjs/network';const W=_0x4fb932(0xa5);var I=(_0x2f41c9=>(_0x2f41c9[_0x2f41c9[_0x4fb932(0x8e)]=0x0]=_0x4fb932(0x8e),_0x2f41c9[_0x2f41c9[_0x4fb932(0xde)]=0x1]='Solved',_0x2f41c9[_0x2f41c9[_0x4fb932(0xa2)]=-0x1]=_0x4fb932(0xa2),_0x2f41c9))(I||{}),v=(_0x3c6094=>(_0x3c6094[_0x3c6094[_0x4fb932(0x98)]=0x0]=_0x4fb932(0x98),_0x3c6094[_0x3c6094[_0x4fb932(0xce)]=0x1]='Add',_0x3c6094[_0x3c6094[_0x4fb932(0xca)]=0x2]=_0x4fb932(0xca),_0x3c6094[_0x3c6094[_0x4fb932(0xc3)]=0x3]='Edit',_0x3c6094[_0x3c6094[_0x4fb932(0x9c)]=0x4]='Delete',_0x3c6094[_0x3c6094[_0x4fb932(0xe4)]=0x5]='Solve',_0x3c6094[_0x3c6094['UNRECOGNIZED']=-0x1]=_0x4fb932(0xa2),_0x3c6094))(v||{});const y=_0x5e27f4=>_0x67181a(new Date(+_0x5e27f4))[_0x4fb932(0xc2)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x38ae86,_0x47839d)=>{const _0x275b16=_0x4fb932,_0x261f27=_0x38ae86[_0x275b16(0xbd)](_0x653602),_0x3ffd14=_0x38ae86[_0x275b16(0xbd)](_0x29ca6e);_0x47839d['forEach'](_0x3930a3=>{const _0x4b461c=_0x275b16;_0x261f27[_0x4b461c(0x8d)](_0x3930a3)&&_0x47839d[_0x4b461c(0xb8)](_0x3930a3);}),_0x47839d[_0x275b16(0xcc)]&&(await _0x3ffd14[_0x275b16(0xbd)](_0x275b16(0x96),{'params':{'userIDs':[..._0x47839d]}}))[_0x275b16(0xad)][_0x275b16(0xab)][_0x275b16(0x95)](_0x5be515=>{const _0x534620=_0x275b16;_0x5be515&&_0x261f27[_0x534620(0xe5)](_0x5be515);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x4f5a1e,_0x6e51c9,_0x549c61,_0x1ebac5)=>{for(var _0x3aea04=_0x1ebac5>0x1?void 0x0:_0x1ebac5?K(_0x6e51c9,_0x549c61):_0x6e51c9,_0x6b4c92=_0x4f5a1e['length']-0x1,_0x311cbd;_0x6b4c92>=0x0;_0x6b4c92--)(_0x311cbd=_0x4f5a1e[_0x6b4c92])&&(_0x3aea04=_0x311cbd(_0x3aea04)||_0x3aea04);return _0x3aea04;},p=(_0x1430d3,_0x4eac93)=>(_0x1ef89c,_0x3e8da3)=>_0x4eac93(_0x1ef89c,_0x3e8da3,_0x1430d3);let _=class extends _0x224507{constructor(_0x36c26f,_0x1e2605,_0x24b3db,_0x1990a9){const _0x381b33=_0x4fb932;super(),this['_commentService']=_0x36c26f,this[_0x381b33(0xa6)]=_0x1e2605,this['_userService']=_0x24b3db,this[_0x381b33(0xc5)]=_0x1990a9,this[_0x381b33(0xaf)](),this[_0x381b33(0xc9)]();}[_0x4fb932(0xc9)](){const _0x3e4c2f=_0x4fb932;this['disposeWithMe'](this[_0x3e4c2f(0xa6)]['commentUpdate$'][_0x3e4c2f(0xb9)](_0x152de6(0x10))['subscribe'](_0x303df7=>{const _0x213c4a=_0x3e4c2f,_0x3c06b9=new Set();_0x303df7[_0x213c4a(0x95)](_0xacd6f6=>{const _0x45ffa7=_0x213c4a;switch(_0xacd6f6[_0x45ffa7(0x8b)]){case _0x45ffa7(0xd3):{const _0x154b1b=_0xacd6f6[_0x45ffa7(0xe6)]['personId'];_0x3c06b9[_0x45ffa7(0xd3)](_0x154b1b);break;}}}),B(this[_0x213c4a(0xc5)],_0x3c06b9);}));}[_0x4fb932(0xaf)](){const _0x56913d=_0x4fb932;this[_0x56913d(0x85)](this[_0x56913d(0xc4)]['commentUpdate$'][_0x56913d(0xcb)](async _0x329b88=>{const _0x17084d=_0x56913d;var _0x5dd0db,_0x228fd9,_0x5759b1,_0x5ace2f;const _0x2c53b2=(_0x5dd0db=this[_0x17084d(0xa6)][_0x17084d(0xdb)](_0x329b88[_0x17084d(0xa1)])[_0x17084d(0xe1)](_0x21cd62=>_0x21cd62[_0x17084d(0xb4)]===_0x329b88[_0x17084d(0xb4)]))==null?void 0x0:_0x5dd0db[_0x17084d(0xa3)];if(!_0x2c53b2)return;const {unitId:_0x3f8026,subUnitId:_0xffb399}=_0x2c53b2;switch(_0x329b88[_0x17084d(0xa7)]&&this['_userService'][_0x17084d(0xe5)](_0x329b88[_0x17084d(0xa7)]),_0x329b88['type']){case v['Add']:break;case v['Reply']:{this['_threadCommentModel'][_0x17084d(0x9b)](_0x3f8026,_0xffb399,{'unitId':_0x3f8026,'subUnitId':_0xffb399,'ref':'','id':_0x329b88[_0x17084d(0xd1)],'dT':y(+_0x329b88[_0x17084d(0x8c)]),'threadId':_0x329b88[_0x17084d(0xb4)],'personId':(_0x5759b1=(_0x228fd9=_0x329b88[_0x17084d(0xa7)])==null?void 0x0:_0x228fd9[_0x17084d(0x99)])!=null?_0x5759b1:_0x329b88['userId'],'text':JSON[_0x17084d(0x8f)](_0x329b88['content']),'parentId':_0x2c53b2['id']});break;}case v['Delete']:{const _0x591a73=this[_0x17084d(0xa6)][_0x17084d(0xaa)](_0x3f8026,_0xffb399,_0x329b88[_0x17084d(0xd1)]);_0x591a73&&_0x591a73[_0x17084d(0xe0)]&&this[_0x17084d(0xa6)]['deleteComment'](_0x3f8026,_0xffb399,_0x329b88[_0x17084d(0xd1)]);break;}case v[_0x17084d(0xc3)]:{this[_0x17084d(0xa6)]['updateComment'](_0x3f8026,_0xffb399,{'commentId':_0x329b88['replyId'],'text':JSON['parse'](_0x329b88['content'])});break;}case v[_0x17084d(0xe4)]:{const _0x96ec5e=(_0x5ace2f=this[_0x17084d(0xa6)][_0x17084d(0xdb)](_0x329b88[_0x17084d(0xa1)])[_0x17084d(0xe1)](_0x4913db=>_0x4913db[_0x17084d(0xb4)]===_0x329b88[_0x17084d(0xb4)]))==null?void 0x0:_0x5ace2f[_0x17084d(0xa3)];_0x96ec5e&&this[_0x17084d(0xa6)]['resolveComment'](_0x3f8026,_0xffb399,_0x96ec5e['id'],_0x329b88[_0x17084d(0xbe)]===I[_0x17084d(0xde)]);break;}}}));}};_=V([p(0x0,_0x128bec(_0x3e5339)),p(0x1,_0x128bec(_0xa6c183)),p(0x2,_0x128bec(_0x653602)),p(0x3,_0x128bec(_0x4f226c))],_);const z='thread-comment-data-source.config',O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x289d8c,_0xa98d1b,_0x266fa5,_0x22a279)=>{const _0x1626ed=_0x4fb932;for(var _0x218e22=_0x22a279>0x1?void 0x0:_0x22a279?k(_0xa98d1b,_0x266fa5):_0xa98d1b,_0xf5f4a0=_0x289d8c[_0x1626ed(0xd8)]-0x1,_0x21e9f0;_0xf5f4a0>=0x0;_0xf5f4a0--)(_0x21e9f0=_0x289d8c[_0xf5f4a0])&&(_0x218e22=_0x21e9f0(_0x218e22)||_0x218e22);return _0x218e22;},b=(_0xd59d05,_0x15acc2)=>(_0x3b59ff,_0x510660)=>_0x15acc2(_0x3b59ff,_0x510660,_0xd59d05);function _0x3851(_0x1d7e1c,_0x5adde3){_0x1d7e1c=_0x1d7e1c-0x82;const _0x5bc47e=_0x5bc4();let _0x38511f=_0x5bc47e[_0x1d7e1c];return _0x38511f;}function X(_0x11cae1,_0x5cb698){const _0x21836=_0x4fb932,_0x575525=_0x11cae1[_0x21836(0xbb)][0x0];return{..._0x5cb698,'id':_0x575525[_0x21836(0xd1)],'resolved':_0x11cae1[_0x21836(0xbe)]===0x1,'dT':y(_0x575525[_0x21836(0x8c)]),'personId':_0x575525['userId'],'threadId':_0x575525[_0x21836(0xb4)]};}function ee(_0x5e979b,_0x1117dc,_0x3012ef){const _0x43514c=_0x4fb932;var _0xc1188f,_0x233d81;if(((_0x233d81=(_0xc1188f=_0x5e979b==null?void 0x0:_0x5e979b[_0x43514c(0xbb)])==null?void 0x0:_0xc1188f[_0x43514c(0xd8)])!=null?_0x233d81:0x0)>0x0){const _0x3599ff=(_0x524cb9,_0x215f5a)=>({'id':_0x524cb9[_0x43514c(0xd1)],'threadId':_0x524cb9['threadId'],'dT':y(_0x524cb9[_0x43514c(0x8c)]),'personId':_0x524cb9[_0x43514c(0x9d)],'resolved':_0x5e979b[_0x43514c(0xbe)]===I['Solved'],'unitId':_0x1117dc,'subUnitId':_0x3012ef,'text':JSON['parse'](_0x524cb9['content']),'parentId':_0x215f5a}),_0x396132=_0x3599ff(_0x5e979b[_0x43514c(0xbb)][0x0]);return{..._0x396132,'children':_0x5e979b[_0x43514c(0xbb)][_0x43514c(0xb3)](0x1)[_0x43514c(0xa0)](_0x5c42b2=>_0x3599ff(_0x5c42b2,_0x396132['id']))};}return null;}let S=class{constructor(_0x42675d,_0x2538b5,_0x271cd3){const _0x4de1f6=_0x4fb932;this[_0x4de1f6(0xd9)]=_0x42675d,this[_0x4de1f6(0xd4)]=_0x2538b5,this[_0x4de1f6(0xda)]=_0x271cd3;}async[_0x4fb932(0x9b)](_0x594c2c){const _0x46c252=_0x4fb932;var _0x98fbab,_0x2c7d38;const {parentId:_0x48bc75,unitId:_0x43a20b,text:_0x5e569f,threadId:_0x5884d7}=_0x594c2c,_0x16d53d=(_0x2c7d38=(_0x98fbab=_0x5e569f[_0x46c252(0xb0)])==null?void 0x0:_0x98fbab[_0x46c252(0xb1)](_0x4efbf7=>_0x4efbf7['rangeType']===_0x42ea01[_0x46c252(0xc8)])[_0x46c252(0xa0)](_0x3c65c4=>_0x3c65c4['rangeId']))!=null?_0x2c7d38:[],_0x53a2c8=JSON[_0x46c252(0xba)](_0x5e569f),_0x4561b6=(await this[_0x46c252(0xda)]['requireSession'](_0x43a20b))[_0x46c252(0xdc)]();if(_0x48bc75){const _0xbd99f5={'memberId':_0x4561b6,'unitId':_0x43a20b,'content':_0x53a2c8,'mention':_0x16d53d,'threadId':_0x5884d7},_0x1f984f=(await this['_httpService'][_0x46c252(0x9e)]('/universer-api/comment/unit/'+_0x43a20b+'/reply',{'body':_0xbd99f5}))[_0x46c252(0xad)]['reply'];return{..._0x594c2c,'id':_0x1f984f[_0x46c252(0xd1)],'dT':_0x67181a(+_0x1f984f['createTimestamp'])[_0x46c252(0xc2)](_0x46c252(0xd7)),'personId':_0x1f984f[_0x46c252(0x9d)]};}else{const _0x142b70={'memberId':_0x4561b6,'unitId':_0x43a20b,'content':_0x53a2c8,'mention':_0x16d53d},_0x4d4647=await this[_0x46c252(0xd9)][_0x46c252(0x9e)](_0x46c252(0x89)+_0x43a20b+_0x46c252(0xa4),{'body':_0x142b70});return X(_0x4d4647[_0x46c252(0xad)][_0x46c252(0xe8)],_0x594c2c);}}async[_0x4fb932(0x94)](_0x27926d){const _0x117dcb=_0x4fb932;var _0x2dbded,_0x43a066;const {text:_0x189b17,unitId:_0x1f83e0}=_0x27926d,_0x30ca7f=(_0x43a066=(_0x2dbded=_0x189b17[_0x117dcb(0xb0)])==null?void 0x0:_0x2dbded[_0x117dcb(0xb1)](_0x2682c2=>_0x2682c2[_0x117dcb(0x82)]===_0x42ea01['COMMENT'])[_0x117dcb(0xa0)](_0x16919f=>_0x16919f[_0x117dcb(0xcf)]))!=null?_0x43a066:[],_0x522faa=JSON[_0x117dcb(0xba)](_0x189b17),_0x313f71=_0x27926d[_0x117dcb(0xb4)],_0x393243=_0x27926d['id'],_0x34c20c={'memberId':(await this['_sessionService'][_0x117dcb(0x9a)](_0x1f83e0))['getMemberID'](),'unitId':_0x1f83e0,'threadId':_0x313f71,'mention':_0x30ca7f,'content':_0x522faa,'replyId':_0x393243},_0x2ac145=await this[_0x117dcb(0xd9)][_0x117dcb(0x9e)](_0x117dcb(0x89)+_0x1f83e0+'/edit',{'body':_0x34c20c});return!_0x2ac145[_0x117dcb(0xad)]['error']||_0x2ac145[_0x117dcb(0xad)][_0x117dcb(0x9f)][_0x117dcb(0xd5)]===0x1;}async[_0x4fb932(0xb5)](_0x522b57){const _0x402511=_0x4fb932,{unitId:_0x2373d2}=_0x522b57,_0x596b2f=_0x522b57[_0x402511(0xb4)],_0x2f6612={'memberId':this[_0x402511(0xd4)][_0x402511(0xdf)]()[_0x402511(0x99)],'unitId':_0x2373d2,'threadId':_0x596b2f,'solved':_0x522b57[_0x402511(0x92)]?I[_0x402511(0xde)]:I[_0x402511(0x8e)]},_0x562f2b=await this[_0x402511(0xd9)][_0x402511(0x9e)](_0x402511(0x89)+_0x2373d2+_0x402511(0xd6),{'body':_0x2f6612});return!_0x562f2b[_0x402511(0xad)][_0x402511(0x9f)]||_0x562f2b[_0x402511(0xad)]['error'][_0x402511(0xd5)]===0x1;}async[_0x4fb932(0xc7)](_0x1f759f,_0xbe3d66,_0x51d002,_0x264644){const _0x13d110=_0x4fb932,_0x2f53bc={'memberId':(await this[_0x13d110(0xda)][_0x13d110(0x9a)](_0x1f759f))['getMemberID'](),'threadId':_0x51d002,'replyId':_0x264644,'unitId':_0x1f759f},_0x38bf6e=await this[_0x13d110(0xd9)][_0x13d110(0x9e)](_0x13d110(0x89)+_0x1f759f+'/delete',{'body':_0x2f53bc});return!_0x38bf6e[_0x13d110(0xad)][_0x13d110(0x9f)]||_0x38bf6e[_0x13d110(0xad)][_0x13d110(0x9f)][_0x13d110(0xd5)]===0x1;}async[_0x4fb932(0xac)](_0x1c4a1f,_0x2f7aad,_0x4c8daa){const _0x7e0295=_0x4fb932,_0x47abd0={'unitId':_0x1c4a1f,'threadId':_0x4c8daa},_0x579495=await this[_0x7e0295(0xd9)]['post'](_0x7e0295(0x89)+_0x1c4a1f+_0x7e0295(0xbc),{'body':_0x47abd0}),_0x42e971=_0x4c8daa[_0x7e0295(0xa0)](_0x4b9c42=>ee(_0x579495['body'][_0x7e0295(0xc6)][_0x4b9c42],_0x1c4a1f,_0x2f7aad))[_0x7e0295(0xb1)](Boolean);return Object['values'](_0x579495[_0x7e0295(0xad)][_0x7e0295(0xab)])[_0x7e0295(0x95)](_0x4f7f69=>{const _0x480c9f=_0x7e0295;this[_0x480c9f(0xd4)]['addUser'](_0x4f7f69);}),_0x42e971;}['saveCommentToSnapshot'](_0x4fed5f){const _0x172f82=_0x4fb932;return{'id':_0x4fed5f['id'],'threadId':_0x4fed5f[_0x172f82(0xb4)],'ref':_0x4fed5f[_0x172f82(0xb7)]};}};S=Q([b(0x0,_0x128bec(_0x29ca6e)),b(0x1,_0x128bec(_0x653602)),b(0x2,_0x128bec(_0x153124))],S);function _0x5bc4(){const _0x5e4d37=['type','createTimestamp','getUser','OpenOrReOpen','parse','40GvBiNF','12YHKSyo','resolved','syncUpdateMutationToColla','updateComment','forEach','/universer-api/user/list','115299FnLaTJ','Unknown','userID','requireSession','addComment','Delete','userId','post','error','map','unitId','UNRECOGNIZED','root','/add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentModel','user','1644973WzqnLR','16615niFQMo','getComment','users','listComments','body','defineProperty','_init','customRanges','filter','setConfig','slice','threadId','resolveComment','_threadCommentDataSourceService','ref','delete','pipe','stringify','replies','/list','get','solved','668982ZzXfKv','getOwnPropertyDescriptor','42518KVyFRm','format','Edit','_commentService','_injector','comments','deleteComment','COMMENT','_initUserSync','Reply','subscribe','size','601uAgdHk','Add','rangeId','_config','replyId','10dsfoMF','add','_userService','code','/solved','YYYY/MM/DD\x20HH:mm','length','_httpService','_sessionService','getUnit','getMemberID','_initDataSource','Solved','getCurrentUser','parentId','find','pluginName','_threadCommentDataSource','Solve','addUser','payload','onReady','comment','rangeType','onStarting','_configService','disposeWithMe','8TKUnwx','dataSource','582YECVhX','/universer-api/comment/unit/','627915elAVhm'];_0x5bc4=function(){return _0x5e4d37;};return _0x5bc4();}var re=Object[_0x4fb932(0xc0)],te=(_0x240e22,_0x4fe0cc,_0x1396d8,_0x274ba3)=>{for(var _0x178cbb=_0x274ba3>0x1?void 0x0:_0x274ba3?re(_0x4fe0cc,_0x1396d8):_0x4fe0cc,_0x3338ab=_0x240e22['length']-0x1,_0x496294;_0x3338ab>=0x0;_0x3338ab--)(_0x496294=_0x240e22[_0x3338ab])&&(_0x178cbb=_0x496294(_0x178cbb)||_0x178cbb);return _0x178cbb;},M=(_0x4061b6,_0x166db9)=>(_0x16cb32,_0x551e95)=>_0x166db9(_0x16cb32,_0x551e95,_0x4061b6);let f=class extends _0x224507{constructor(_0x401ede,_0x35bfce){const _0x7651e9=_0x4fb932;super(),this[_0x7651e9(0xb6)]=_0x401ede,this[_0x7651e9(0xe3)]=_0x35bfce,this[_0x7651e9(0xdd)]();}[_0x4fb932(0xdd)](){const _0x1deaa7=_0x4fb932;this[_0x1deaa7(0xb6)][_0x1deaa7(0x87)]=this[_0x1deaa7(0xe3)],this[_0x1deaa7(0xb6)][_0x1deaa7(0x93)]=!0x1;}};f=te([M(0x0,_0x40cc3e),M(0x1,_0x128bec(S))],f);var se=Object[_0x4fb932(0xae)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x412e3b,_0x48474f,_0xfd20e7)=>_0x48474f in _0x412e3b?se(_0x412e3b,_0x48474f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xfd20e7}):_0x412e3b[_0x48474f]=_0xfd20e7,ie=(_0x4b7edf,_0x292da4,_0x28d3c0,_0x5f4356)=>{const _0x308822=_0x4fb932;for(var _0x396e71=_0x5f4356>0x1?void 0x0:_0x5f4356?oe(_0x292da4,_0x28d3c0):_0x292da4,_0x27b2c0=_0x4b7edf[_0x308822(0xd8)]-0x1,_0x5664a8;_0x27b2c0>=0x0;_0x27b2c0--)(_0x5664a8=_0x4b7edf[_0x27b2c0])&&(_0x396e71=_0x5664a8(_0x396e71)||_0x396e71);return _0x396e71;},N=(_0x4d4976,_0x237e50)=>(_0x25a0f7,_0xed0263)=>_0x237e50(_0x25a0f7,_0xed0263,_0x4d4976),$=(_0x3cd161,_0x53edce,_0x3e15e7)=>ne(_0x3cd161,typeof _0x53edce!='symbol'?_0x53edce+'':_0x53edce,_0x3e15e7);let g=class extends _0x58a3f6{constructor(_0x24634d=O,_0x111f43,_0x3e83fe){const _0x2aa71c=_0x4fb932;super(),this[_0x2aa71c(0xd0)]=_0x24634d,this[_0x2aa71c(0xc5)]=_0x111f43,this[_0x2aa71c(0x84)]=_0x3e83fe;const {..._0x2bac8c}=_0x348f8b({},O,this[_0x2aa71c(0xd0)]);this[_0x2aa71c(0x84)][_0x2aa71c(0xb2)](z,_0x2bac8c);}[_0x4fb932(0x83)](){const _0x5659e9=_0x4fb932;[[S],[f],[_]][_0x5659e9(0x95)](_0x303714=>{const _0x338f32=_0x5659e9;this[_0x338f32(0xc5)][_0x338f32(0xd3)](_0x303714);});}[_0x4fb932(0xe7)](){const _0xa8e340=_0x4fb932;this[_0xa8e340(0xc5)][_0xa8e340(0xbd)](f),this[_0xa8e340(0xc5)]['get'](_);}};$(g,_0x4fb932(0xe2),W),$(g,_0x4fb932(0x8b),_0x49b985['UNIVER_UNKNOWN']),g=ie([_0x3d8f7e(_0x95a849,_0x302632,_0x21485d),N(0x1,_0x128bec(_0x4f226c)),N(0x2,_0x1d7854)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x390ebd=_0xb832;(function(_0x10052c,_0x44c00b){const _0x555670=_0xb832,_0x19b972=_0x10052c();while(!![]){try{const _0x1c2fd4=parseInt(_0x555670(0x16e))/0x1+-parseInt(_0x555670(0x167))/0x2+parseInt(_0x555670(0x16d))/0x3+parseInt(_0x555670(0x159))/0x4+parseInt(_0x555670(0x15a))/0x5*(-parseInt(_0x555670(0x1be))/0x6)+parseInt(_0x555670(0x1bc))/0x7*(parseInt(_0x555670(0x16f))/0x8)+parseInt(_0x555670(0x18a))/0x9*(-parseInt(_0x555670(0x1a1))/0xa);if(_0x1c2fd4===_0x44c00b)break;else _0x19b972['push'](_0x19b972['shift']());}catch(_0x21deba){_0x19b972['push'](_0x19b972['shift']());}}}(_0x48f8,0x8f0a6));import{CommentService as _0x5b9634,CollaborationSessionService as _0x1815bc,UniverCollaborationClientPlugin as _0x395b52}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x16cf6f}from'@univerjs-pro/license';import{dayjs as _0x252e0c,UserManagerService as _0x3039bd,Inject as _0x1a89d1,Injector as _0x11e476,Disposable as _0xdcc8ac,CustomRangeType as _0x339677,UniverInstanceType as _0x16c046,DependentOn as _0x5b7f34,IConfigService as _0x828273,Plugin as _0x1d42c8,merge as _0x22269a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x59d47d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1356a4,IThreadCommentDataSourceService as _0x46c254}from'@univerjs/thread-comment';import{bufferTime as _0x242edb}from'rxjs';import{HTTPService as _0x28a050}from'@univerjs/network';const W=_0x390ebd(0x18f);var I=(_0x531b8b=>(_0x531b8b[_0x531b8b[_0x390ebd(0x1a5)]=0x0]=_0x390ebd(0x1a5),_0x531b8b[_0x531b8b['Solved']=0x1]=_0x390ebd(0x176),_0x531b8b[_0x531b8b['UNRECOGNIZED']=-0x1]=_0x390ebd(0x19a),_0x531b8b))(I||{}),v=(_0x1b8941=>(_0x1b8941[_0x1b8941['Unknown']=0x0]='Unknown',_0x1b8941[_0x1b8941[_0x390ebd(0x187)]=0x1]='Add',_0x1b8941[_0x1b8941['Reply']=0x2]=_0x390ebd(0x189),_0x1b8941[_0x1b8941['Edit']=0x3]=_0x390ebd(0x1a4),_0x1b8941[_0x1b8941[_0x390ebd(0x193)]=0x4]=_0x390ebd(0x193),_0x1b8941[_0x1b8941['Solve']=0x5]='Solve',_0x1b8941[_0x1b8941[_0x390ebd(0x19a)]=-0x1]=_0x390ebd(0x19a),_0x1b8941))(v||{});const y=_0x416089=>_0x252e0c(new Date(+_0x416089))['format'](_0x390ebd(0x17d)),B=async(_0x3bd88d,_0xed1b20)=>{const _0xe95c37=_0x390ebd,_0x850852=_0x3bd88d[_0xe95c37(0x194)](_0x3039bd),_0x4752c7=_0x3bd88d['get'](_0x28a050);_0xed1b20['forEach'](_0x1ced2d=>{const _0x1b55e7=_0xe95c37;_0x850852[_0x1b55e7(0x1a7)](_0x1ced2d)&&_0xed1b20[_0x1b55e7(0x18c)](_0x1ced2d);}),_0xed1b20[_0xe95c37(0x19b)]&&(await _0x4752c7[_0xe95c37(0x194)](_0xe95c37(0x171),{'params':{'userIDs':[..._0xed1b20]}}))[_0xe95c37(0x1aa)][_0xe95c37(0x190)][_0xe95c37(0x186)](_0x427edb=>{_0x427edb&&_0x850852['addUser'](_0x427edb);});};var K=Object[_0x390ebd(0x197)],V=(_0x8bbdb3,_0x57ca97,_0x7a84d6,_0x2114c8)=>{const _0x3d7b91=_0x390ebd;for(var _0x1b4225=_0x2114c8>0x1?void 0x0:_0x2114c8?K(_0x57ca97,_0x7a84d6):_0x57ca97,_0x31ce4e=_0x8bbdb3[_0x3d7b91(0x19f)]-0x1,_0x52c782;_0x31ce4e>=0x0;_0x31ce4e--)(_0x52c782=_0x8bbdb3[_0x31ce4e])&&(_0x1b4225=_0x52c782(_0x1b4225)||_0x1b4225);return _0x1b4225;},p=(_0x30effb,_0xd151e)=>(_0x339de0,_0x1df885)=>_0xd151e(_0x339de0,_0x1df885,_0x30effb);let _=class extends _0xdcc8ac{constructor(_0x4cfc7f,_0x4442dc,_0x33e7d6,_0x57f45d){const _0x1f6528=_0x390ebd;super(),this[_0x1f6528(0x179)]=_0x4cfc7f,this['_threadCommentModel']=_0x4442dc,this[_0x1f6528(0x160)]=_0x33e7d6,this['_injector']=_0x57f45d,this[_0x1f6528(0x16a)](),this[_0x1f6528(0x170)]();}[_0x390ebd(0x170)](){const _0xe28928=_0x390ebd;this[_0xe28928(0x1a3)](this[_0xe28928(0x15b)][_0xe28928(0x15c)][_0xe28928(0x161)](_0x242edb(0x10))['subscribe'](_0x810c8f=>{const _0x248e08=_0xe28928,_0xbdda71=new Set();_0x810c8f[_0x248e08(0x186)](_0x104c92=>{const _0x571adc=_0x248e08;switch(_0x104c92[_0x571adc(0x17b)]){case _0x571adc(0x198):{const _0xfff2fa=_0x104c92[_0x571adc(0x1a2)]['personId'];_0xbdda71[_0x571adc(0x198)](_0xfff2fa);break;}}}),B(this[_0x248e08(0x19e)],_0xbdda71);}));}[_0x390ebd(0x16a)](){const _0x56cae4=_0x390ebd;this[_0x56cae4(0x1a3)](this[_0x56cae4(0x179)][_0x56cae4(0x15c)][_0x56cae4(0x184)](async _0x27bf83=>{const _0x333319=_0x56cae4;var _0x476ce8,_0x3925be,_0x40bc82,_0x566ed4;const _0x1b008c=(_0x476ce8=this[_0x333319(0x15b)]['getUnit'](_0x27bf83['unitId'])[_0x333319(0x17f)](_0x174b29=>_0x174b29[_0x333319(0x17c)]===_0x27bf83[_0x333319(0x17c)]))==null?void 0x0:_0x476ce8['root'];if(!_0x1b008c)return;const {unitId:_0x12b361,subUnitId:_0x1dcd14}=_0x1b008c;switch(_0x27bf83[_0x333319(0x175)]&&this['_userService'][_0x333319(0x180)](_0x27bf83['user']),_0x27bf83[_0x333319(0x17b)]){case v[_0x333319(0x187)]:break;case v[_0x333319(0x189)]:{this[_0x333319(0x15b)][_0x333319(0x1ac)](_0x12b361,_0x1dcd14,{'unitId':_0x12b361,'subUnitId':_0x1dcd14,'ref':'','id':_0x27bf83[_0x333319(0x195)],'dT':y(+_0x27bf83['createTimestamp']),'threadId':_0x27bf83[_0x333319(0x17c)],'personId':(_0x40bc82=(_0x3925be=_0x27bf83[_0x333319(0x175)])==null?void 0x0:_0x3925be[_0x333319(0x18d)])!=null?_0x40bc82:_0x27bf83[_0x333319(0x1b8)],'text':JSON[_0x333319(0x162)](_0x27bf83[_0x333319(0x1ad)]),'parentId':_0x1b008c['id']});break;}case v['Delete']:{const _0x26410b=this[_0x333319(0x15b)]['getComment'](_0x12b361,_0x1dcd14,_0x27bf83[_0x333319(0x195)]);_0x26410b&&_0x26410b[_0x333319(0x19c)]&&this[_0x333319(0x15b)]['deleteComment'](_0x12b361,_0x1dcd14,_0x27bf83[_0x333319(0x195)]);break;}case v['Edit']:{this[_0x333319(0x15b)][_0x333319(0x1b6)](_0x12b361,_0x1dcd14,{'commentId':_0x27bf83[_0x333319(0x195)],'text':JSON[_0x333319(0x162)](_0x27bf83['content'])});break;}case v[_0x333319(0x1a0)]:{const _0x26202a=(_0x566ed4=this['_threadCommentModel'][_0x333319(0x181)](_0x27bf83[_0x333319(0x15f)])[_0x333319(0x17f)](_0x4b5345=>_0x4b5345[_0x333319(0x17c)]===_0x27bf83[_0x333319(0x17c)]))==null?void 0x0:_0x566ed4[_0x333319(0x1a8)];_0x26202a&&this[_0x333319(0x15b)][_0x333319(0x157)](_0x12b361,_0x1dcd14,_0x26202a['id'],_0x27bf83[_0x333319(0x196)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x1a89d1(_0x5b9634)),p(0x1,_0x1a89d1(_0x1356a4)),p(0x2,_0x1a89d1(_0x3039bd)),p(0x3,_0x1a89d1(_0x11e476))],_);function _0xb832(_0x4368d3,_0x1f71ee){_0x4368d3=_0x4368d3-0x157;const _0x48f8e7=_0x48f8();let _0xb83245=_0x48f8e7[_0x4368d3];return _0xb83245;}const z=_0x390ebd(0x1b2),O={};var k=Object[_0x390ebd(0x197)],Q=(_0x32e31a,_0x34f7e7,_0x1d3f16,_0x172180)=>{const _0xfe2134=_0x390ebd;for(var _0x26c6da=_0x172180>0x1?void 0x0:_0x172180?k(_0x34f7e7,_0x1d3f16):_0x34f7e7,_0x571f89=_0x32e31a[_0xfe2134(0x19f)]-0x1,_0x1636e4;_0x571f89>=0x0;_0x571f89--)(_0x1636e4=_0x32e31a[_0x571f89])&&(_0x26c6da=_0x1636e4(_0x26c6da)||_0x26c6da);return _0x26c6da;},b=(_0x530f71,_0x368fda)=>(_0x379903,_0x172958)=>_0x368fda(_0x379903,_0x172958,_0x530f71);function X(_0x52ec88,_0x5f4cea){const _0x57ac86=_0x390ebd,_0x1b44c1=_0x52ec88['replies'][0x0];return{..._0x5f4cea,'id':_0x1b44c1['replyId'],'resolved':_0x52ec88[_0x57ac86(0x196)]===0x1,'dT':y(_0x1b44c1['createTimestamp']),'personId':_0x1b44c1[_0x57ac86(0x1b8)],'threadId':_0x1b44c1[_0x57ac86(0x17c)]};}function ee(_0x1c3ff9,_0x54b2b7,_0x499b7a){const _0xb8ea17=_0x390ebd;var _0x1b7dde,_0x52bb2e;if(((_0x52bb2e=(_0x1b7dde=_0x1c3ff9==null?void 0x0:_0x1c3ff9[_0xb8ea17(0x1b4)])==null?void 0x0:_0x1b7dde[_0xb8ea17(0x19f)])!=null?_0x52bb2e:0x0)>0x0){const _0x10d111=(_0x12acf0,_0x51a6eb)=>({'id':_0x12acf0['replyId'],'threadId':_0x12acf0['threadId'],'dT':y(_0x12acf0[_0xb8ea17(0x183)]),'personId':_0x12acf0[_0xb8ea17(0x1b8)],'resolved':_0x1c3ff9['solved']===I[_0xb8ea17(0x176)],'unitId':_0x54b2b7,'subUnitId':_0x499b7a,'text':JSON['parse'](_0x12acf0[_0xb8ea17(0x1ad)]),'parentId':_0x51a6eb}),_0x18f4ce=_0x10d111(_0x1c3ff9['replies'][0x0]);return{..._0x18f4ce,'children':_0x1c3ff9[_0xb8ea17(0x1b4)][_0xb8ea17(0x1ae)](0x1)['map'](_0xc35bea=>_0x10d111(_0xc35bea,_0x18f4ce['id']))};}return null;}let S=class{constructor(_0x46f022,_0x56f40a,_0x2cc885){const _0x28410a=_0x390ebd;this[_0x28410a(0x15e)]=_0x46f022,this[_0x28410a(0x160)]=_0x56f40a,this[_0x28410a(0x1b5)]=_0x2cc885;}async[_0x390ebd(0x1ac)](_0x39c4be){const _0x29ffc7=_0x390ebd;var _0x3f759c,_0x4d151f;const {parentId:_0x34d7c7,unitId:_0x114d34,text:_0x14d38e,threadId:_0x387a9a}=_0x39c4be,_0x45198f=(_0x4d151f=(_0x3f759c=_0x14d38e[_0x29ffc7(0x16b)])==null?void 0x0:_0x3f759c[_0x29ffc7(0x1ab)](_0x5bc132=>_0x5bc132[_0x29ffc7(0x18e)]===_0x339677[_0x29ffc7(0x1bd)])['map'](_0x40e817=>_0x40e817[_0x29ffc7(0x19d)]))!=null?_0x4d151f:[],_0x4d3bca=JSON[_0x29ffc7(0x163)](_0x14d38e),_0x360cb6=(await this[_0x29ffc7(0x1b5)][_0x29ffc7(0x172)](_0x114d34))[_0x29ffc7(0x188)]();if(_0x34d7c7){const _0x41a87e={'memberId':_0x360cb6,'unitId':_0x114d34,'content':_0x4d3bca,'mention':_0x45198f,'threadId':_0x387a9a},_0x46ebc4=(await this[_0x29ffc7(0x15e)][_0x29ffc7(0x1ba)](_0x29ffc7(0x1b9)+_0x114d34+_0x29ffc7(0x1b0),{'body':_0x41a87e}))[_0x29ffc7(0x1aa)][_0x29ffc7(0x173)];return{..._0x39c4be,'id':_0x46ebc4[_0x29ffc7(0x195)],'dT':_0x252e0c(+_0x46ebc4['createTimestamp'])[_0x29ffc7(0x192)](_0x29ffc7(0x17d)),'personId':_0x46ebc4['userId']};}else{const _0x5122a2={'memberId':_0x360cb6,'unitId':_0x114d34,'content':_0x4d3bca,'mention':_0x45198f},_0xa9d2ff=await this[_0x29ffc7(0x15e)][_0x29ffc7(0x1ba)](_0x29ffc7(0x1b9)+_0x114d34+'/add',{'body':_0x5122a2});return X(_0xa9d2ff[_0x29ffc7(0x1aa)][_0x29ffc7(0x1a9)],_0x39c4be);}}async[_0x390ebd(0x1b6)](_0x3315fe){const _0x5d50cc=_0x390ebd;var _0x4788a8,_0x809d75;const {text:_0x12fd68,unitId:_0x231c69}=_0x3315fe,_0x386f40=(_0x809d75=(_0x4788a8=_0x12fd68['customRanges'])==null?void 0x0:_0x4788a8[_0x5d50cc(0x1ab)](_0x42f56c=>_0x42f56c[_0x5d50cc(0x18e)]===_0x339677[_0x5d50cc(0x1bd)])[_0x5d50cc(0x1a6)](_0x514401=>_0x514401[_0x5d50cc(0x19d)]))!=null?_0x809d75:[],_0x445ca6=JSON[_0x5d50cc(0x163)](_0x12fd68),_0x2fd922=_0x3315fe[_0x5d50cc(0x17c)],_0x3057e6=_0x3315fe['id'],_0x30ba8f={'memberId':(await this[_0x5d50cc(0x1b5)][_0x5d50cc(0x172)](_0x231c69))[_0x5d50cc(0x188)](),'unitId':_0x231c69,'threadId':_0x2fd922,'mention':_0x386f40,'content':_0x445ca6,'replyId':_0x3057e6},_0x395ff9=await this[_0x5d50cc(0x15e)][_0x5d50cc(0x1ba)]('/universer-api/comment/unit/'+_0x231c69+_0x5d50cc(0x177),{'body':_0x30ba8f});return!_0x395ff9['body'][_0x5d50cc(0x174)]||_0x395ff9[_0x5d50cc(0x1aa)][_0x5d50cc(0x174)][_0x5d50cc(0x164)]===0x1;}async[_0x390ebd(0x157)](_0x44be1a){const _0x283893=_0x390ebd,{unitId:_0x36d7bc}=_0x44be1a,_0x565663=_0x44be1a['threadId'],_0x115acc={'memberId':this[_0x283893(0x160)][_0x283893(0x1bb)]()['userID'],'unitId':_0x36d7bc,'threadId':_0x565663,'solved':_0x44be1a[_0x283893(0x1af)]?I[_0x283893(0x176)]:I[_0x283893(0x1a5)]},_0x1c6b6c=await this[_0x283893(0x15e)][_0x283893(0x1ba)]('/universer-api/comment/unit/'+_0x36d7bc+_0x283893(0x165),{'body':_0x115acc});return!_0x1c6b6c[_0x283893(0x1aa)][_0x283893(0x174)]||_0x1c6b6c[_0x283893(0x1aa)][_0x283893(0x174)][_0x283893(0x164)]===0x1;}async[_0x390ebd(0x17e)](_0x4b2fc3,_0x13a00a,_0x4fadb3,_0x7a4c70){const _0x1cf08a=_0x390ebd,_0x16cfa3={'memberId':(await this[_0x1cf08a(0x1b5)][_0x1cf08a(0x172)](_0x4b2fc3))[_0x1cf08a(0x188)](),'threadId':_0x4fadb3,'replyId':_0x7a4c70,'unitId':_0x4b2fc3},_0x192dd4=await this[_0x1cf08a(0x15e)]['post'](_0x1cf08a(0x1b9)+_0x4b2fc3+_0x1cf08a(0x18b),{'body':_0x16cfa3});return!_0x192dd4['body'][_0x1cf08a(0x174)]||_0x192dd4[_0x1cf08a(0x1aa)][_0x1cf08a(0x174)][_0x1cf08a(0x164)]===0x1;}async[_0x390ebd(0x15d)](_0x58f3de,_0x90df94,_0x3f6189){const _0x5396b4=_0x390ebd,_0x2d931c={'unitId':_0x58f3de,'threadId':_0x3f6189},_0x1ca2e2=await this[_0x5396b4(0x15e)][_0x5396b4(0x1ba)]('/universer-api/comment/unit/'+_0x58f3de+_0x5396b4(0x17a),{'body':_0x2d931c}),_0x447a58=_0x3f6189['map'](_0x18e918=>ee(_0x1ca2e2[_0x5396b4(0x1aa)][_0x5396b4(0x182)][_0x18e918],_0x58f3de,_0x90df94))[_0x5396b4(0x1ab)](Boolean);return Object['values'](_0x1ca2e2['body']['users'])[_0x5396b4(0x186)](_0x471c2b=>{const _0x3fb686=_0x5396b4;this[_0x3fb686(0x160)][_0x3fb686(0x180)](_0x471c2b);}),_0x447a58;}[_0x390ebd(0x178)](_0x55cffb){const _0x3c2b42=_0x390ebd;return{'id':_0x55cffb['id'],'threadId':_0x55cffb[_0x3c2b42(0x17c)],'ref':_0x55cffb[_0x3c2b42(0x1b7)]};}};S=Q([b(0x0,_0x1a89d1(_0x28a050)),b(0x1,_0x1a89d1(_0x3039bd)),b(0x2,_0x1a89d1(_0x1815bc))],S);var re=Object[_0x390ebd(0x197)],te=(_0x1fce58,_0x58cca3,_0x1819f0,_0x39d9b6)=>{const _0x24ae52=_0x390ebd;for(var _0x43fb58=_0x39d9b6>0x1?void 0x0:_0x39d9b6?re(_0x58cca3,_0x1819f0):_0x58cca3,_0x3c82f4=_0x1fce58[_0x24ae52(0x19f)]-0x1,_0x1b0197;_0x3c82f4>=0x0;_0x3c82f4--)(_0x1b0197=_0x1fce58[_0x3c82f4])&&(_0x43fb58=_0x1b0197(_0x43fb58)||_0x43fb58);return _0x43fb58;},M=(_0x32d953,_0x4a6396)=>(_0x2dfc45,_0x3d11db)=>_0x4a6396(_0x2dfc45,_0x3d11db,_0x32d953);let f=class extends _0xdcc8ac{constructor(_0x26677a,_0x4923c7){const _0x5ab973=_0x390ebd;super(),this[_0x5ab973(0x191)]=_0x26677a,this['_threadCommentDataSource']=_0x4923c7,this[_0x5ab973(0x16c)]();}['_initDataSource'](){const _0x3cd22c=_0x390ebd;this[_0x3cd22c(0x191)][_0x3cd22c(0x1b3)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x3cd22c(0x168)]=!0x1;}};f=te([M(0x0,_0x46c254),M(0x1,_0x1a89d1(S))],f);var se=Object[_0x390ebd(0x199)],oe=Object['getOwnPropertyDescriptor'],ne=(_0xa7fc83,_0x120229,_0x87295e)=>_0x120229 in _0xa7fc83?se(_0xa7fc83,_0x120229,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x87295e}):_0xa7fc83[_0x120229]=_0x87295e,ie=(_0x391ecd,_0x46da9d,_0x44421c,_0x16df4c)=>{for(var _0x16e47f=_0x16df4c>0x1?void 0x0:_0x16df4c?oe(_0x46da9d,_0x44421c):_0x46da9d,_0x1b9df9=_0x391ecd['length']-0x1,_0x3d7a23;_0x1b9df9>=0x0;_0x1b9df9--)(_0x3d7a23=_0x391ecd[_0x1b9df9])&&(_0x16e47f=_0x3d7a23(_0x16e47f)||_0x16e47f);return _0x16e47f;},N=(_0x2b4efa,_0xb5c73c)=>(_0x558afc,_0x4cd159)=>_0xb5c73c(_0x558afc,_0x4cd159,_0x2b4efa),$=(_0x135955,_0x2bce72,_0x3b8b78)=>ne(_0x135955,typeof _0x2bce72!=_0x390ebd(0x169)?_0x2bce72+'':_0x2bce72,_0x3b8b78);function _0x48f8(){const _0x21d76e=['70188CfXhuL','resolveComment','UNIVER_UNKNOWN','860528khrtpi','90QQqvjn','_threadCommentModel','commentUpdate$','listComments','_httpService','unitId','_userService','pipe','parse','stringify','code','/solved','setConfig','2161640hjUeBk','syncUpdateMutationToColla','symbol','_init','customRanges','_initDataSource','851199pytMiX','371447MXUIly','8IMDaJC','_initUserSync','/universer-api/user/list','requireSession','reply','error','user','Solved','/edit','saveCommentToSnapshot','_commentService','/list','type','threadId','YYYY/MM/DD\x20HH:mm','deleteComment','find','addUser','getUnit','comments','createTimestamp','subscribe','_config','forEach','Add','getMemberID','Reply','313326hioooz','/delete','delete','userID','rangeType','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','users','_threadCommentDataSourceService','format','Delete','get','replyId','solved','getOwnPropertyDescriptor','add','defineProperty','UNRECOGNIZED','size','parentId','rangeId','_injector','length','Solve','20eVjjfg','payload','disposeWithMe','Edit','OpenOrReOpen','map','getUser','root','comment','body','filter','addComment','content','slice','resolved','/reply','_configService','thread-comment-data-source.config','dataSource','replies','_sessionService','updateComment','ref','userId','/universer-api/comment/unit/','post','getCurrentUser','7536158gcvuvp','COMMENT'];_0x48f8=function(){return _0x21d76e;};return _0x48f8();}let g=class extends _0x1d42c8{constructor(_0x13a746=O,_0x47b0f9,_0x46f81b){const _0x6f45a2=_0x390ebd;super(),this[_0x6f45a2(0x185)]=_0x13a746,this[_0x6f45a2(0x19e)]=_0x47b0f9,this[_0x6f45a2(0x1b1)]=_0x46f81b;const {..._0x1da4a1}=_0x22269a({},O,this[_0x6f45a2(0x185)]);this[_0x6f45a2(0x1b1)][_0x6f45a2(0x166)](z,_0x1da4a1);}['onStarting'](){const _0xaed757=_0x390ebd;[[S],[f],[_]][_0xaed757(0x186)](_0x40bab0=>{const _0x2bfe02=_0xaed757;this[_0x2bfe02(0x19e)]['add'](_0x40bab0);});}['onReady'](){const _0x25286c=_0x390ebd;this[_0x25286c(0x19e)]['get'](f),this[_0x25286c(0x19e)]['get'](_);}};$(g,'pluginName',W),$(g,'type',_0x16c046[_0x390ebd(0x158)]),g=ie([_0x5b7f34(_0x59d47d,_0x395b52,_0x16cf6f),N(0x1,_0x1a89d1(_0x11e476)),N(0x2,_0x828273)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x2373(_0x50b736,_0x3a5b2e){_0x50b736=_0x50b736-0x1d3;const _0x302449=_0x3024();let _0x2373d9=_0x302449[_0x50b736];return _0x2373d9;}function _0x3024(){const _0x2a2e04=['reply','@univerjs/thread-comment-ui','object','defineProperty','userId','pipe','size','_userService','ThreadCommentModel','forEach','subscribe','CollaborationSessionService','length','replyId','threadId','saveCommentToSnapshot','syncUpdateMutationToColla','CustomRangeType','replies','@univerjs/core','/list','/delete','map','setConfig','customRanges','root','find','deleteComment','comment','payload','Disposable','_threadCommentModel','stringify','COMMENT','filter','_threadCommentDataSourceService','requireSession','getOwnPropertyDescriptor','/edit','_sessionService','_threadCommentDataSource','UNIVER_UNKNOWN','_commentService','500255KvQMvS','Reply','addUser','@univerjs-pro/license','getUnit','content','607912FwCcgK','UniverLicensePlugin','dayjs','45zdANKb','@univerjs-pro/collaboration-client','user','225WCglUl','error','getCurrentUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_init','rangeType','Edit','44880DqhNAh','UniverCollaborationClientPlugin','UniverThreadCommentDataSourcePlugin','_initUserSync','resolved','OpenOrReOpen','/universer-api/user/list','YYYY/MM/DD\x20HH:mm','UniverProLicense','_injector','UserManagerService','ref','@univerjs/thread-comment','UniverThreadComment','updateComment','UniverInstanceType','resolveComment','_config','disposeWithMe','Delete','users','Plugin','body','22844FhgZna','462424aTqPEV','6nofFwO','values','type','onStarting','DependentOn','IThreadCommentDataSourceService','commentUpdate$','310640twzsTq','Module','3167230uKMWyr','function','parse','UniverThreadCommentUIPlugin','rxjs','add','getUser','dataSource','addComment','Add','post','symbol','parentId','HTTPService','solved','unitId','code','get','exports','amd','pluginName','/universer-api/comment/unit/','_configService','getMemberID','UNRECOGNIZED','CommentService','_httpService','UniverProThreadCommentDatasource','slice','Inject','IConfigService','listComments','format','createTimestamp','Solve','_initDataSource','Injector','UniverCore','toStringTag','comments'];_0x3024=function(){return _0x2a2e04;};return _0x3024();}(function(_0x3d863e,_0x18d98d){const _0x47bec1=_0x2373,_0x366be7=_0x3d863e();while(!![]){try{const _0x18236a=parseInt(_0x47bec1(0x220))/0x1+-parseInt(_0x47bec1(0x238))/0x2+-parseInt(_0x47bec1(0x219))/0x3*(parseInt(_0x47bec1(0x237))/0x4)+parseInt(_0x47bec1(0x240))/0x5*(parseInt(_0x47bec1(0x239))/0x6)+parseInt(_0x47bec1(0x20d))/0x7+-parseInt(_0x47bec1(0x213))/0x8*(-parseInt(_0x47bec1(0x216))/0x9)+parseInt(_0x47bec1(0x242))/0xa;if(_0x18236a===_0x18d98d)break;else _0x366be7['push'](_0x366be7['shift']());}catch(_0x2d818a){_0x366be7['push'](_0x366be7['shift']());}}}(_0x3024,0x34a34),function(_0x25293b,_0xa6ed5d){const _0x4166e5=_0x2373;typeof exports==_0x4166e5(0x1e4)&&typeof module<'u'?_0xa6ed5d(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==_0x4166e5(0x243)&&define[_0x4166e5(0x255)]?define([_0x4166e5(0x254),_0x4166e5(0x217),_0x4166e5(0x210),_0x4166e5(0x1f5),_0x4166e5(0x1e3),_0x4166e5(0x22c),_0x4166e5(0x246),'@univerjs/network'],_0xa6ed5d):(_0x25293b=typeof globalThis<'u'?globalThis:_0x25293b||self,_0xa6ed5d(_0x25293b[_0x4166e5(0x1d5)]={},_0x25293b['UniverProCollaborationClient'],_0x25293b[_0x4166e5(0x228)],_0x25293b[_0x4166e5(0x1df)],_0x25293b['UniverThreadCommentUi'],_0x25293b[_0x4166e5(0x22d)],_0x25293b['rxjs'],_0x25293b['UniverNetwork']));}(this,function(_0x396d53,_0x23ce89,_0x3f5f49,_0x7e2ec,_0x53347e,_0x48618d,_0x257664,_0x384937){'use strict';const _0x1f5f39=_0x2373;const _0x4c3067=_0x1f5f39(0x21c);var _0xe7f05c=(_0x4723b2=>(_0x4723b2[_0x4723b2['OpenOrReOpen']=0x0]=_0x1f5f39(0x225),_0x4723b2[_0x4723b2['Solved']=0x1]='Solved',_0x4723b2[_0x4723b2[_0x1f5f39(0x25a)]=-0x1]=_0x1f5f39(0x25a),_0x4723b2))(_0xe7f05c||{}),_0x493f24=(_0x341691=>(_0x341691[_0x341691['Unknown']=0x0]='Unknown',_0x341691[_0x341691[_0x1f5f39(0x24b)]=0x1]=_0x1f5f39(0x24b),_0x341691[_0x341691[_0x1f5f39(0x20e)]=0x2]='Reply',_0x341691[_0x341691['Edit']=0x3]=_0x1f5f39(0x21f),_0x341691[_0x341691[_0x1f5f39(0x233)]=0x4]=_0x1f5f39(0x233),_0x341691[_0x341691[_0x1f5f39(0x1dc)]=0x5]=_0x1f5f39(0x1dc),_0x341691[_0x341691[_0x1f5f39(0x25a)]=-0x1]=_0x1f5f39(0x25a),_0x341691))(_0x493f24||{});const _0x25b1db=_0x8ba333=>_0x7e2ec[_0x1f5f39(0x215)](new Date(+_0x8ba333))[_0x1f5f39(0x1da)](_0x1f5f39(0x227)),_0x426506=async(_0x1c82e9,_0x4eafc2)=>{const _0x8c660a=_0x1f5f39,_0x32205a=_0x1c82e9[_0x8c660a(0x253)](_0x7e2ec[_0x8c660a(0x22a)]),_0x394cbf=_0x1c82e9[_0x8c660a(0x253)](_0x384937[_0x8c660a(0x24f)]);_0x4eafc2[_0x8c660a(0x1eb)](_0x3c01e0=>{const _0x42ba2e=_0x8c660a;_0x32205a[_0x42ba2e(0x248)](_0x3c01e0)&&_0x4eafc2['delete'](_0x3c01e0);}),_0x4eafc2[_0x8c660a(0x1e8)]&&(await _0x394cbf[_0x8c660a(0x253)](_0x8c660a(0x226),{'params':{'userIDs':[..._0x4eafc2]}}))[_0x8c660a(0x236)][_0x8c660a(0x234)][_0x8c660a(0x1eb)](_0x4f1dde=>{_0x4f1dde&&_0x32205a['addUser'](_0x4f1dde);});};var _0x524a9a=Object['getOwnPropertyDescriptor'],_0x35bcb0=(_0x5c9ddc,_0x5d7288,_0x26a353,_0x25dab6)=>{const _0x24d4d2=_0x1f5f39;for(var _0x26b55c=_0x25dab6>0x1?void 0x0:_0x25dab6?_0x524a9a(_0x5d7288,_0x26a353):_0x5d7288,_0x1d08db=_0x5c9ddc[_0x24d4d2(0x1ee)]-0x1,_0x47a467;_0x1d08db>=0x0;_0x1d08db--)(_0x47a467=_0x5c9ddc[_0x1d08db])&&(_0x26b55c=_0x47a467(_0x26b55c)||_0x26b55c);return _0x26b55c;},_0x2fe67e=(_0x49e349,_0x265de8)=>(_0x180535,_0x55e965)=>_0x265de8(_0x180535,_0x55e965,_0x49e349);let _0x12a999=class extends _0x7e2ec[_0x1f5f39(0x200)]{constructor(_0xd622f7,_0x30149f,_0x3ae35d,_0xfa996a){const _0x58abcf=_0x1f5f39;super(),this['_commentService']=_0xd622f7,this[_0x58abcf(0x201)]=_0x30149f,this[_0x58abcf(0x1e9)]=_0x3ae35d,this[_0x58abcf(0x229)]=_0xfa996a,this[_0x58abcf(0x21d)](),this[_0x58abcf(0x223)]();}['_initUserSync'](){const _0x1eb3d7=_0x1f5f39;this[_0x1eb3d7(0x232)](this[_0x1eb3d7(0x201)][_0x1eb3d7(0x23f)][_0x1eb3d7(0x1e7)](_0x257664['bufferTime'](0x10))[_0x1eb3d7(0x1ec)](_0x439756=>{const _0xaedd3a=_0x1eb3d7,_0xc138c2=new Set();_0x439756[_0xaedd3a(0x1eb)](_0x786694=>{const _0x15f769=_0xaedd3a;switch(_0x786694[_0x15f769(0x23b)]){case _0x15f769(0x247):{const _0x1c3b53=_0x786694[_0x15f769(0x1ff)]['personId'];_0xc138c2[_0x15f769(0x247)](_0x1c3b53);break;}}}),_0x426506(this['_injector'],_0xc138c2);}));}[_0x1f5f39(0x21d)](){const _0x4ecb34=_0x1f5f39;this[_0x4ecb34(0x232)](this[_0x4ecb34(0x20c)][_0x4ecb34(0x23f)]['subscribe'](async _0x294d09=>{const _0x1c82da=_0x4ecb34;var _0x1c7aa6,_0x17d4fb,_0x48c196,_0x58ba0d;const _0x4076e6=(_0x1c7aa6=this[_0x1c82da(0x201)][_0x1c82da(0x211)](_0x294d09['unitId'])[_0x1c82da(0x1fc)](_0x3a2023=>_0x3a2023[_0x1c82da(0x1f0)]===_0x294d09['threadId']))==null?void 0x0:_0x1c7aa6[_0x1c82da(0x1fb)];if(!_0x4076e6)return;const {unitId:_0x205a2a,subUnitId:_0x37a88c}=_0x4076e6;switch(_0x294d09['user']&&this[_0x1c82da(0x1e9)]['addUser'](_0x294d09[_0x1c82da(0x218)]),_0x294d09[_0x1c82da(0x23b)]){case _0x493f24['Add']:break;case _0x493f24['Reply']:{this[_0x1c82da(0x201)]['addComment'](_0x205a2a,_0x37a88c,{'unitId':_0x205a2a,'subUnitId':_0x37a88c,'ref':'','id':_0x294d09['replyId'],'dT':_0x25b1db(+_0x294d09[_0x1c82da(0x1db)]),'threadId':_0x294d09[_0x1c82da(0x1f0)],'personId':(_0x48c196=(_0x17d4fb=_0x294d09[_0x1c82da(0x218)])==null?void 0x0:_0x17d4fb['userID'])!=null?_0x48c196:_0x294d09[_0x1c82da(0x1e6)],'text':JSON[_0x1c82da(0x244)](_0x294d09[_0x1c82da(0x212)]),'parentId':_0x4076e6['id']});break;}case _0x493f24[_0x1c82da(0x233)]:{const _0x3f98f7=this['_threadCommentModel']['getComment'](_0x205a2a,_0x37a88c,_0x294d09[_0x1c82da(0x1ef)]);_0x3f98f7&&_0x3f98f7[_0x1c82da(0x24e)]&&this[_0x1c82da(0x201)][_0x1c82da(0x1fd)](_0x205a2a,_0x37a88c,_0x294d09[_0x1c82da(0x1ef)]);break;}case _0x493f24['Edit']:{this[_0x1c82da(0x201)][_0x1c82da(0x22e)](_0x205a2a,_0x37a88c,{'commentId':_0x294d09[_0x1c82da(0x1ef)],'text':JSON[_0x1c82da(0x244)](_0x294d09[_0x1c82da(0x212)])});break;}case _0x493f24[_0x1c82da(0x1dc)]:{const _0xe3d5c8=(_0x58ba0d=this['_threadCommentModel'][_0x1c82da(0x211)](_0x294d09[_0x1c82da(0x251)])['find'](_0x4470ba=>_0x4470ba[_0x1c82da(0x1f0)]===_0x294d09[_0x1c82da(0x1f0)]))==null?void 0x0:_0x58ba0d[_0x1c82da(0x1fb)];_0xe3d5c8&&this[_0x1c82da(0x201)]['resolveComment'](_0x205a2a,_0x37a88c,_0xe3d5c8['id'],_0x294d09[_0x1c82da(0x250)]===_0xe7f05c['Solved']);break;}}}));}};_0x12a999=_0x35bcb0([_0x2fe67e(0x0,_0x7e2ec[_0x1f5f39(0x1d7)](_0x23ce89[_0x1f5f39(0x1d3)])),_0x2fe67e(0x1,_0x7e2ec[_0x1f5f39(0x1d7)](_0x48618d[_0x1f5f39(0x1ea)])),_0x2fe67e(0x2,_0x7e2ec[_0x1f5f39(0x1d7)](_0x7e2ec[_0x1f5f39(0x22a)])),_0x2fe67e(0x3,_0x7e2ec['Inject'](_0x7e2ec['Injector']))],_0x12a999);const _0x34db90='thread-comment-data-source.config',_0x4cd41b={};var _0x300291=Object['getOwnPropertyDescriptor'],_0x22698f=(_0x57e3db,_0x3cabac,_0x581d0e,_0x22565f)=>{for(var _0x1cad57=_0x22565f>0x1?void 0x0:_0x22565f?_0x300291(_0x3cabac,_0x581d0e):_0x3cabac,_0x111ec0=_0x57e3db['length']-0x1,_0x3f7332;_0x111ec0>=0x0;_0x111ec0--)(_0x3f7332=_0x57e3db[_0x111ec0])&&(_0x1cad57=_0x3f7332(_0x1cad57)||_0x1cad57);return _0x1cad57;},_0x4e97e5=(_0x31aed8,_0x5da593)=>(_0xd0b8be,_0x3e4aed)=>_0x5da593(_0xd0b8be,_0x3e4aed,_0x31aed8);function _0x173e65(_0xd007b7,_0x4a842f){const _0x492838=_0x1f5f39,_0x216542=_0xd007b7[_0x492838(0x1f4)][0x0];return{..._0x4a842f,'id':_0x216542[_0x492838(0x1ef)],'resolved':_0xd007b7[_0x492838(0x250)]===0x1,'dT':_0x25b1db(_0x216542['createTimestamp']),'personId':_0x216542[_0x492838(0x1e6)],'threadId':_0x216542['threadId']};}function _0xa22d72(_0x742c20,_0x429dde,_0xcdd301){const _0x57c137=_0x1f5f39;var _0x5175ef,_0x4f448b;if(((_0x4f448b=(_0x5175ef=_0x742c20==null?void 0x0:_0x742c20['replies'])==null?void 0x0:_0x5175ef[_0x57c137(0x1ee)])!=null?_0x4f448b:0x0)>0x0){const _0x51636e=(_0x147688,_0x179863)=>({'id':_0x147688[_0x57c137(0x1ef)],'threadId':_0x147688[_0x57c137(0x1f0)],'dT':_0x25b1db(_0x147688[_0x57c137(0x1db)]),'personId':_0x147688[_0x57c137(0x1e6)],'resolved':_0x742c20[_0x57c137(0x250)]===_0xe7f05c['Solved'],'unitId':_0x429dde,'subUnitId':_0xcdd301,'text':JSON[_0x57c137(0x244)](_0x147688['content']),'parentId':_0x179863}),_0x116a44=_0x51636e(_0x742c20['replies'][0x0]);return{..._0x116a44,'children':_0x742c20['replies'][_0x57c137(0x1d6)](0x1)[_0x57c137(0x1f8)](_0x407b92=>_0x51636e(_0x407b92,_0x116a44['id']))};}return null;}let _0x4c9f94=class{constructor(_0xd3d0a7,_0x33e10c,_0x11e7e4){const _0x121bbe=_0x1f5f39;this[_0x121bbe(0x1d4)]=_0xd3d0a7,this[_0x121bbe(0x1e9)]=_0x33e10c,this[_0x121bbe(0x209)]=_0x11e7e4;}async[_0x1f5f39(0x24a)](_0x270c1f){const _0x133ee5=_0x1f5f39;var _0x214d46,_0x548c1d;const {parentId:_0xb890cf,unitId:_0x1cf97f,text:_0x5c6e4d,threadId:_0x5b0764}=_0x270c1f,_0x472e26=(_0x548c1d=(_0x214d46=_0x5c6e4d[_0x133ee5(0x1fa)])==null?void 0x0:_0x214d46[_0x133ee5(0x204)](_0x27606a=>_0x27606a['rangeType']===_0x7e2ec[_0x133ee5(0x1f3)][_0x133ee5(0x203)])['map'](_0x31851a=>_0x31851a['rangeId']))!=null?_0x548c1d:[],_0x411d70=JSON['stringify'](_0x5c6e4d),_0xee5e0e=(await this[_0x133ee5(0x209)]['requireSession'](_0x1cf97f))['getMemberID']();if(_0xb890cf){const _0x2e9d7f={'memberId':_0xee5e0e,'unitId':_0x1cf97f,'content':_0x411d70,'mention':_0x472e26,'threadId':_0x5b0764},_0xf940dd=(await this[_0x133ee5(0x1d4)][_0x133ee5(0x24c)](_0x133ee5(0x257)+_0x1cf97f+'/reply',{'body':_0x2e9d7f}))['body'][_0x133ee5(0x1e2)];return{..._0x270c1f,'id':_0xf940dd['replyId'],'dT':_0x7e2ec['dayjs'](+_0xf940dd[_0x133ee5(0x1db)])[_0x133ee5(0x1da)](_0x133ee5(0x227)),'personId':_0xf940dd[_0x133ee5(0x1e6)]};}else{const _0x4ed07e={'memberId':_0xee5e0e,'unitId':_0x1cf97f,'content':_0x411d70,'mention':_0x472e26},_0x5baae5=await this['_httpService']['post'](_0x133ee5(0x257)+_0x1cf97f+'/add',{'body':_0x4ed07e});return _0x173e65(_0x5baae5[_0x133ee5(0x236)][_0x133ee5(0x1fe)],_0x270c1f);}}async[_0x1f5f39(0x22e)](_0x27444e){const _0x5c9e3e=_0x1f5f39;var _0x4613d3,_0x26c698;const {text:_0x1da8d1,unitId:_0x205c8a}=_0x27444e,_0x4e5fe2=(_0x26c698=(_0x4613d3=_0x1da8d1[_0x5c9e3e(0x1fa)])==null?void 0x0:_0x4613d3['filter'](_0xb24801=>_0xb24801[_0x5c9e3e(0x21e)]===_0x7e2ec[_0x5c9e3e(0x1f3)]['COMMENT'])[_0x5c9e3e(0x1f8)](_0x42fe20=>_0x42fe20['rangeId']))!=null?_0x26c698:[],_0x544710=JSON[_0x5c9e3e(0x202)](_0x1da8d1),_0x464792=_0x27444e[_0x5c9e3e(0x1f0)],_0x5234d8=_0x27444e['id'],_0x1697a1={'memberId':(await this[_0x5c9e3e(0x209)]['requireSession'](_0x205c8a))[_0x5c9e3e(0x259)](),'unitId':_0x205c8a,'threadId':_0x464792,'mention':_0x4e5fe2,'content':_0x544710,'replyId':_0x5234d8},_0x6388aa=await this[_0x5c9e3e(0x1d4)]['post']('/universer-api/comment/unit/'+_0x205c8a+_0x5c9e3e(0x208),{'body':_0x1697a1});return!_0x6388aa[_0x5c9e3e(0x236)][_0x5c9e3e(0x21a)]||_0x6388aa[_0x5c9e3e(0x236)][_0x5c9e3e(0x21a)]['code']===0x1;}async[_0x1f5f39(0x230)](_0x31681d){const _0xeca917=_0x1f5f39,{unitId:_0x2242a1}=_0x31681d,_0x12ff9c=_0x31681d['threadId'],_0x9568c7={'memberId':this[_0xeca917(0x1e9)][_0xeca917(0x21b)]()['userID'],'unitId':_0x2242a1,'threadId':_0x12ff9c,'solved':_0x31681d[_0xeca917(0x224)]?_0xe7f05c['Solved']:_0xe7f05c[_0xeca917(0x225)]},_0x5ab012=await this[_0xeca917(0x1d4)]['post'](_0xeca917(0x257)+_0x2242a1+'/solved',{'body':_0x9568c7});return!_0x5ab012[_0xeca917(0x236)][_0xeca917(0x21a)]||_0x5ab012['body'][_0xeca917(0x21a)]['code']===0x1;}async[_0x1f5f39(0x1fd)](_0x53ee14,_0x5c0602,_0x23f24a,_0xdc2ed9){const _0x5c17a9=_0x1f5f39,_0x589828={'memberId':(await this[_0x5c17a9(0x209)][_0x5c17a9(0x206)](_0x53ee14))[_0x5c17a9(0x259)](),'threadId':_0x23f24a,'replyId':_0xdc2ed9,'unitId':_0x53ee14},_0x637260=await this[_0x5c17a9(0x1d4)][_0x5c17a9(0x24c)](_0x5c17a9(0x257)+_0x53ee14+_0x5c17a9(0x1f7),{'body':_0x589828});return!_0x637260[_0x5c17a9(0x236)][_0x5c17a9(0x21a)]||_0x637260[_0x5c17a9(0x236)][_0x5c17a9(0x21a)][_0x5c17a9(0x252)]===0x1;}async[_0x1f5f39(0x1d9)](_0x41a4b0,_0x5105f1,_0x368706){const _0xdc562f=_0x1f5f39,_0x295223={'unitId':_0x41a4b0,'threadId':_0x368706},_0x526809=await this['_httpService']['post'](_0xdc562f(0x257)+_0x41a4b0+_0xdc562f(0x1f6),{'body':_0x295223}),_0x78d5d0=_0x368706['map'](_0x14a273=>_0xa22d72(_0x526809['body'][_0xdc562f(0x1e1)][_0x14a273],_0x41a4b0,_0x5105f1))['filter'](Boolean);return Object[_0xdc562f(0x23a)](_0x526809['body'][_0xdc562f(0x234)])['forEach'](_0x2b42c3=>{const _0x420b84=_0xdc562f;this['_userService'][_0x420b84(0x20f)](_0x2b42c3);}),_0x78d5d0;}[_0x1f5f39(0x1f1)](_0x5ef7e5){const _0x2781f8=_0x1f5f39;return{'id':_0x5ef7e5['id'],'threadId':_0x5ef7e5[_0x2781f8(0x1f0)],'ref':_0x5ef7e5[_0x2781f8(0x22b)]};}};_0x4c9f94=_0x22698f([_0x4e97e5(0x0,_0x7e2ec[_0x1f5f39(0x1d7)](_0x384937[_0x1f5f39(0x24f)])),_0x4e97e5(0x1,_0x7e2ec['Inject'](_0x7e2ec['UserManagerService'])),_0x4e97e5(0x2,_0x7e2ec['Inject'](_0x23ce89[_0x1f5f39(0x1ed)]))],_0x4c9f94);var _0x39960b=Object[_0x1f5f39(0x207)],_0x109f0b=(_0x5245fe,_0x4cc220,_0x2fdf01,_0x55cf3d)=>{const _0x189d28=_0x1f5f39;for(var _0x529988=_0x55cf3d>0x1?void 0x0:_0x55cf3d?_0x39960b(_0x4cc220,_0x2fdf01):_0x4cc220,_0x84d596=_0x5245fe[_0x189d28(0x1ee)]-0x1,_0x3adc0e;_0x84d596>=0x0;_0x84d596--)(_0x3adc0e=_0x5245fe[_0x84d596])&&(_0x529988=_0x3adc0e(_0x529988)||_0x529988);return _0x529988;},_0x475288=(_0x20b3c9,_0x5bd3b3)=>(_0x11185d,_0x442f68)=>_0x5bd3b3(_0x11185d,_0x442f68,_0x20b3c9);let _0x4fd3ae=class extends _0x7e2ec[_0x1f5f39(0x200)]{constructor(_0xf1dd0a,_0x9a35a0){const _0x22aeb0=_0x1f5f39;super(),this[_0x22aeb0(0x205)]=_0xf1dd0a,this[_0x22aeb0(0x20a)]=_0x9a35a0,this[_0x22aeb0(0x1dd)]();}[_0x1f5f39(0x1dd)](){const _0x26048c=_0x1f5f39;this['_threadCommentDataSourceService'][_0x26048c(0x249)]=this[_0x26048c(0x20a)],this[_0x26048c(0x205)][_0x26048c(0x1f2)]=!0x1;}};_0x4fd3ae=_0x109f0b([_0x475288(0x0,_0x48618d[_0x1f5f39(0x23e)]),_0x475288(0x1,_0x7e2ec[_0x1f5f39(0x1d7)](_0x4c9f94))],_0x4fd3ae);var _0x111e1b=Object[_0x1f5f39(0x1e5)],_0x287f64=Object[_0x1f5f39(0x207)],_0x578645=(_0x4b7911,_0x6a8745,_0x219148)=>_0x6a8745 in _0x4b7911?_0x111e1b(_0x4b7911,_0x6a8745,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x219148}):_0x4b7911[_0x6a8745]=_0x219148,_0x67fc91=(_0x3ff769,_0x5dd8f0,_0x2aa9e3,_0x1595a8)=>{const _0x4c19ae=_0x1f5f39;for(var _0x20de4c=_0x1595a8>0x1?void 0x0:_0x1595a8?_0x287f64(_0x5dd8f0,_0x2aa9e3):_0x5dd8f0,_0xc1dd6a=_0x3ff769[_0x4c19ae(0x1ee)]-0x1,_0xa2f3d8;_0xc1dd6a>=0x0;_0xc1dd6a--)(_0xa2f3d8=_0x3ff769[_0xc1dd6a])&&(_0x20de4c=_0xa2f3d8(_0x20de4c)||_0x20de4c);return _0x20de4c;},_0x27ba05=(_0x38b2a6,_0x2a8639)=>(_0x395e4a,_0x1421eb)=>_0x2a8639(_0x395e4a,_0x1421eb,_0x38b2a6),_0x2e560b=(_0x28c655,_0x36c759,_0x231ee5)=>_0x578645(_0x28c655,typeof _0x36c759!=_0x1f5f39(0x24d)?_0x36c759+'':_0x36c759,_0x231ee5);_0x396d53[_0x1f5f39(0x222)]=class extends _0x7e2ec[_0x1f5f39(0x235)]{constructor(_0x1a46b9=_0x4cd41b,_0x131de4,_0x4d5873){const _0x56fa9f=_0x1f5f39;super(),this[_0x56fa9f(0x231)]=_0x1a46b9,this[_0x56fa9f(0x229)]=_0x131de4,this[_0x56fa9f(0x258)]=_0x4d5873;const {..._0x108cea}=_0x7e2ec['merge']({},_0x4cd41b,this[_0x56fa9f(0x231)]);this[_0x56fa9f(0x258)][_0x56fa9f(0x1f9)](_0x34db90,_0x108cea);}[_0x1f5f39(0x23c)](){const _0x79cf50=_0x1f5f39;[[_0x4c9f94],[_0x4fd3ae],[_0x12a999]][_0x79cf50(0x1eb)](_0x1fef4b=>{const _0x17cb87=_0x79cf50;this['_injector'][_0x17cb87(0x247)](_0x1fef4b);});}['onReady'](){const _0x481588=_0x1f5f39;this['_injector'][_0x481588(0x253)](_0x4fd3ae),this['_injector'][_0x481588(0x253)](_0x12a999);}},_0x2e560b(_0x396d53[_0x1f5f39(0x222)],_0x1f5f39(0x256),_0x4c3067),_0x2e560b(_0x396d53['UniverThreadCommentDataSourcePlugin'],'type',_0x7e2ec[_0x1f5f39(0x22f)][_0x1f5f39(0x20b)]),_0x396d53[_0x1f5f39(0x222)]=_0x67fc91([_0x7e2ec[_0x1f5f39(0x23d)](_0x53347e[_0x1f5f39(0x245)],_0x23ce89[_0x1f5f39(0x221)],_0x3f5f49[_0x1f5f39(0x214)]),_0x27ba05(0x1,_0x7e2ec[_0x1f5f39(0x1d7)](_0x7e2ec[_0x1f5f39(0x1de)])),_0x27ba05(0x2,_0x7e2ec[_0x1f5f39(0x1d8)])],_0x396d53['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x396d53,Symbol[_0x1f5f39(0x1e0)],{'value':_0x1f5f39(0x241)});}));
1
+ function _0x4672(_0x1d5ae6,_0x56513a){_0x1d5ae6=_0x1d5ae6-0x110;const _0x1614a2=_0x1614();let _0x4672b2=_0x1614a2[_0x1d5ae6];return _0x4672b2;}function _0x1614(){const _0x47a312=['_init','/universer-api/comment/unit/','Unknown','addComment','onReady','code','reply','addUser','512916Xozhhd','UniverThreadCommentUIPlugin','UniverProCollaborationClient','@univerjs/thread-comment-ui','exports','deleteComment','user','onStarting','Solve','replyId','users','_configService','/list','listComments','map','CustomRangeType','357362cUVnfv','error','userID','@univerjs/thread-comment','find','OpenOrReOpen','UNRECOGNIZED','_commentService','thread-comment-data-source.config','commentUpdate$','userId','content','_sessionService','getUnit','comments','@univerjs/network','resolved','rangeId','_initDataSource','values','/reply','Plugin','object','Solved','get','customRanges','_config','bufferTime','getUser','rangeType','function','COMMENT','getCurrentUser','getMemberID','52262qQhFYc','_userService','merge','body','UNIVER_UNKNOWN','delete','/universer-api/user/list','ThreadCommentModel','disposeWithMe','CommentService','payload','post','UniverProLicense','createTimestamp','IConfigService','Injector','resolveComment','format','threadId','2940543MXdWPK','Disposable','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','length','Reply','_threadCommentDataSource','10gZgeuw','syncUpdateMutationToColla','/add','_threadCommentDataSourceService','dayjs','unitId','_httpService','HTTPService','getComment','/solved','UniverCore','size','IThreadCommentDataSourceService','pipe','subscribe','replies','UniverThreadCommentUi','saveCommentToSnapshot','55sUnDDu','add','DependentOn','UniverCollaborationClientPlugin','_injector','parse','stringify','solved','_threadCommentModel','defineProperty','pluginName','filter','1285023HBayaJ','Inject','type','ref','dataSource','updateComment','12936fDzsBv','@univerjs-pro/collaboration-client','Delete','getOwnPropertyDescriptor','Add','624580DZhnER','parentId','symbol','comment','rxjs','UniverNetwork','/delete','setConfig','personId','UserManagerService','forEach','UniverThreadCommentDataSourcePlugin','Edit','amd','272aSAqNd','root','requireSession'];_0x1614=function(){return _0x47a312;};return _0x1614();}(function(_0x34c7bd,_0x478576){const _0x39a45f=_0x4672,_0x4a38c3=_0x34c7bd();while(!![]){try{const _0x6ebd02=-parseInt(_0x39a45f(0x12e))/0x1+-parseInt(_0x39a45f(0x192))/0x2+parseInt(_0x39a45f(0x187))/0x3+-parseInt(_0x39a45f(0x18d))/0x4*(parseInt(_0x39a45f(0x17b))/0x5)+-parseInt(_0x39a45f(0x11e))/0x6+-parseInt(_0x39a45f(0x150))/0x7*(-parseInt(_0x39a45f(0x113))/0x8)+parseInt(_0x39a45f(0x163))/0x9*(parseInt(_0x39a45f(0x169))/0xa);if(_0x6ebd02===_0x478576)break;else _0x4a38c3['push'](_0x4a38c3['shift']());}catch(_0x562851){_0x4a38c3['push'](_0x4a38c3['shift']());}}}(_0x1614,0x35458),function(_0x19cdfa,_0x4dbf30){const _0x19a694=_0x4672;typeof exports==_0x19a694(0x144)&&typeof module<'u'?_0x4dbf30(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==_0x19a694(0x14c)&&define[_0x19a694(0x112)]?define([_0x19a694(0x122),_0x19a694(0x18e),'@univerjs-pro/license','@univerjs/core',_0x19a694(0x121),_0x19a694(0x131),_0x19a694(0x196),_0x19a694(0x13d)],_0x4dbf30):(_0x19cdfa=typeof globalThis<'u'?globalThis:_0x19cdfa||self,_0x4dbf30(_0x19cdfa['UniverProThreadCommentDatasource']={},_0x19cdfa[_0x19a694(0x120)],_0x19cdfa[_0x19a694(0x15c)],_0x19cdfa[_0x19a694(0x173)],_0x19cdfa[_0x19a694(0x179)],_0x19cdfa['UniverThreadComment'],_0x19cdfa[_0x19a694(0x196)],_0x19cdfa[_0x19a694(0x197)]));}(this,function(_0x3d14b1,_0x39b4a1,_0x338502,_0x782fd0,_0x145a2a,_0x1a5ffb,_0x325b90,_0x1743c9){'use strict';const _0x39bac6=_0x4672;const _0x13e2de=_0x39bac6(0x165);var _0x164965=(_0x5bcc62=>(_0x5bcc62[_0x5bcc62[_0x39bac6(0x133)]=0x0]=_0x39bac6(0x133),_0x5bcc62[_0x5bcc62[_0x39bac6(0x145)]=0x1]='Solved',_0x5bcc62[_0x5bcc62[_0x39bac6(0x134)]=-0x1]=_0x39bac6(0x134),_0x5bcc62))(_0x164965||{}),_0x121c0c=(_0x3f73e1=>(_0x3f73e1[_0x3f73e1[_0x39bac6(0x118)]=0x0]='Unknown',_0x3f73e1[_0x3f73e1[_0x39bac6(0x191)]=0x1]='Add',_0x3f73e1[_0x3f73e1[_0x39bac6(0x167)]=0x2]=_0x39bac6(0x167),_0x3f73e1[_0x3f73e1['Edit']=0x3]=_0x39bac6(0x111),_0x3f73e1[_0x3f73e1[_0x39bac6(0x18f)]=0x4]=_0x39bac6(0x18f),_0x3f73e1[_0x3f73e1[_0x39bac6(0x126)]=0x5]=_0x39bac6(0x126),_0x3f73e1[_0x3f73e1[_0x39bac6(0x134)]=-0x1]=_0x39bac6(0x134),_0x3f73e1))(_0x121c0c||{});const _0x12611a=_0x4b0ef6=>_0x782fd0[_0x39bac6(0x16d)](new Date(+_0x4b0ef6))[_0x39bac6(0x161)]('YYYY/MM/DD\x20HH:mm'),_0x43d62f=async(_0x3e0d4a,_0x349a23)=>{const _0x34e526=_0x39bac6,_0x40c71f=_0x3e0d4a['get'](_0x782fd0[_0x34e526(0x19b)]),_0x4845bf=_0x3e0d4a['get'](_0x1743c9[_0x34e526(0x170)]);_0x349a23[_0x34e526(0x19c)](_0x1e8930=>{const _0x35ad8b=_0x34e526;_0x40c71f[_0x35ad8b(0x14a)](_0x1e8930)&&_0x349a23[_0x35ad8b(0x155)](_0x1e8930);}),_0x349a23[_0x34e526(0x174)]&&(await _0x4845bf['get'](_0x34e526(0x156),{'params':{'userIDs':[..._0x349a23]}}))[_0x34e526(0x153)][_0x34e526(0x128)]['forEach'](_0x4e4156=>{const _0x4345d8=_0x34e526;_0x4e4156&&_0x40c71f[_0x4345d8(0x11d)](_0x4e4156);});};var _0x10a481=Object[_0x39bac6(0x190)],_0x23ddd7=(_0x33d954,_0x3ccbf0,_0x26231c,_0x132d78)=>{for(var _0x232ff0=_0x132d78>0x1?void 0x0:_0x132d78?_0x10a481(_0x3ccbf0,_0x26231c):_0x3ccbf0,_0x3d2cd2=_0x33d954['length']-0x1,_0x41e040;_0x3d2cd2>=0x0;_0x3d2cd2--)(_0x41e040=_0x33d954[_0x3d2cd2])&&(_0x232ff0=_0x41e040(_0x232ff0)||_0x232ff0);return _0x232ff0;},_0x102341=(_0x52ef4b,_0x364e06)=>(_0x4e89da,_0x2cd7f1)=>_0x364e06(_0x4e89da,_0x2cd7f1,_0x52ef4b);let _0x621e03=class extends _0x782fd0[_0x39bac6(0x164)]{constructor(_0x1f3a4d,_0x3b11a6,_0x2bacbe,_0x1250be){const _0x527f42=_0x39bac6;super(),this[_0x527f42(0x135)]=_0x1f3a4d,this[_0x527f42(0x183)]=_0x3b11a6,this[_0x527f42(0x151)]=_0x2bacbe,this[_0x527f42(0x17f)]=_0x1250be,this[_0x527f42(0x116)](),this['_initUserSync']();}['_initUserSync'](){const _0x22cd0f=_0x39bac6;this[_0x22cd0f(0x158)](this[_0x22cd0f(0x183)][_0x22cd0f(0x137)][_0x22cd0f(0x176)](_0x325b90[_0x22cd0f(0x149)](0x10))[_0x22cd0f(0x177)](_0x390d04=>{const _0x1d100e=_0x22cd0f,_0x5f0131=new Set();_0x390d04[_0x1d100e(0x19c)](_0x21bc3b=>{const _0xebd611=_0x1d100e;switch(_0x21bc3b[_0xebd611(0x189)]){case _0xebd611(0x17c):{const _0xd75310=_0x21bc3b[_0xebd611(0x15a)][_0xebd611(0x19a)];_0x5f0131[_0xebd611(0x17c)](_0xd75310);break;}}}),_0x43d62f(this[_0x1d100e(0x17f)],_0x5f0131);}));}[_0x39bac6(0x116)](){const _0x51ef0a=_0x39bac6;this['disposeWithMe'](this[_0x51ef0a(0x135)][_0x51ef0a(0x137)]['subscribe'](async _0x5f2877=>{const _0x31d188=_0x51ef0a;var _0x4e93bc,_0x50aa02,_0x57f041,_0x54d130;const _0x1fddcc=(_0x4e93bc=this[_0x31d188(0x183)][_0x31d188(0x13b)](_0x5f2877[_0x31d188(0x16e)])[_0x31d188(0x132)](_0x744047=>_0x744047['threadId']===_0x5f2877['threadId']))==null?void 0x0:_0x4e93bc['root'];if(!_0x1fddcc)return;const {unitId:_0x3bfe9b,subUnitId:_0x3c67a0}=_0x1fddcc;switch(_0x5f2877['user']&&this['_userService'][_0x31d188(0x11d)](_0x5f2877[_0x31d188(0x124)]),_0x5f2877[_0x31d188(0x189)]){case _0x121c0c[_0x31d188(0x191)]:break;case _0x121c0c[_0x31d188(0x167)]:{this[_0x31d188(0x183)][_0x31d188(0x119)](_0x3bfe9b,_0x3c67a0,{'unitId':_0x3bfe9b,'subUnitId':_0x3c67a0,'ref':'','id':_0x5f2877[_0x31d188(0x127)],'dT':_0x12611a(+_0x5f2877['createTimestamp']),'threadId':_0x5f2877[_0x31d188(0x162)],'personId':(_0x57f041=(_0x50aa02=_0x5f2877[_0x31d188(0x124)])==null?void 0x0:_0x50aa02['userID'])!=null?_0x57f041:_0x5f2877[_0x31d188(0x138)],'text':JSON[_0x31d188(0x180)](_0x5f2877['content']),'parentId':_0x1fddcc['id']});break;}case _0x121c0c[_0x31d188(0x18f)]:{const _0x3895d4=this[_0x31d188(0x183)][_0x31d188(0x171)](_0x3bfe9b,_0x3c67a0,_0x5f2877['replyId']);_0x3895d4&&_0x3895d4[_0x31d188(0x193)]&&this['_threadCommentModel']['deleteComment'](_0x3bfe9b,_0x3c67a0,_0x5f2877[_0x31d188(0x127)]);break;}case _0x121c0c['Edit']:{this[_0x31d188(0x183)][_0x31d188(0x18c)](_0x3bfe9b,_0x3c67a0,{'commentId':_0x5f2877[_0x31d188(0x127)],'text':JSON[_0x31d188(0x180)](_0x5f2877[_0x31d188(0x139)])});break;}case _0x121c0c[_0x31d188(0x126)]:{const _0x4792f9=(_0x54d130=this[_0x31d188(0x183)][_0x31d188(0x13b)](_0x5f2877[_0x31d188(0x16e)])[_0x31d188(0x132)](_0x1c1f72=>_0x1c1f72[_0x31d188(0x162)]===_0x5f2877[_0x31d188(0x162)]))==null?void 0x0:_0x54d130[_0x31d188(0x114)];_0x4792f9&&this['_threadCommentModel'][_0x31d188(0x160)](_0x3bfe9b,_0x3c67a0,_0x4792f9['id'],_0x5f2877[_0x31d188(0x182)]===_0x164965['Solved']);break;}}}));}};_0x621e03=_0x23ddd7([_0x102341(0x0,_0x782fd0[_0x39bac6(0x188)](_0x39b4a1[_0x39bac6(0x159)])),_0x102341(0x1,_0x782fd0['Inject'](_0x1a5ffb[_0x39bac6(0x157)])),_0x102341(0x2,_0x782fd0[_0x39bac6(0x188)](_0x782fd0[_0x39bac6(0x19b)])),_0x102341(0x3,_0x782fd0['Inject'](_0x782fd0['Injector']))],_0x621e03);const _0x6fb472=_0x39bac6(0x136),_0xb8b559={};var _0x5b95e3=Object[_0x39bac6(0x190)],_0x341482=(_0x421932,_0x319b86,_0x5866ae,_0x5740a1)=>{const _0x14b1cd=_0x39bac6;for(var _0x4a4cfa=_0x5740a1>0x1?void 0x0:_0x5740a1?_0x5b95e3(_0x319b86,_0x5866ae):_0x319b86,_0x512360=_0x421932[_0x14b1cd(0x166)]-0x1,_0x25af2e;_0x512360>=0x0;_0x512360--)(_0x25af2e=_0x421932[_0x512360])&&(_0x4a4cfa=_0x25af2e(_0x4a4cfa)||_0x4a4cfa);return _0x4a4cfa;},_0x54e373=(_0x1725c3,_0x31925e)=>(_0x47fc08,_0x569687)=>_0x31925e(_0x47fc08,_0x569687,_0x1725c3);function _0x920e66(_0x38876b,_0x51bfe3){const _0x118e88=_0x39bac6,_0x15e564=_0x38876b['replies'][0x0];return{..._0x51bfe3,'id':_0x15e564[_0x118e88(0x127)],'resolved':_0x38876b[_0x118e88(0x182)]===0x1,'dT':_0x12611a(_0x15e564[_0x118e88(0x15d)]),'personId':_0x15e564[_0x118e88(0x138)],'threadId':_0x15e564[_0x118e88(0x162)]};}function _0x457631(_0x1ffea8,_0x1ad0b1,_0x43e436){const _0x37814b=_0x39bac6;var _0x5618ae,_0xcca847;if(((_0xcca847=(_0x5618ae=_0x1ffea8==null?void 0x0:_0x1ffea8[_0x37814b(0x178)])==null?void 0x0:_0x5618ae[_0x37814b(0x166)])!=null?_0xcca847:0x0)>0x0){const _0x445749=(_0x258523,_0x16f5a3)=>({'id':_0x258523[_0x37814b(0x127)],'threadId':_0x258523[_0x37814b(0x162)],'dT':_0x12611a(_0x258523['createTimestamp']),'personId':_0x258523['userId'],'resolved':_0x1ffea8[_0x37814b(0x182)]===_0x164965[_0x37814b(0x145)],'unitId':_0x1ad0b1,'subUnitId':_0x43e436,'text':JSON['parse'](_0x258523['content']),'parentId':_0x16f5a3}),_0x1d6c9d=_0x445749(_0x1ffea8[_0x37814b(0x178)][0x0]);return{..._0x1d6c9d,'children':_0x1ffea8[_0x37814b(0x178)]['slice'](0x1)[_0x37814b(0x12c)](_0x20f24c=>_0x445749(_0x20f24c,_0x1d6c9d['id']))};}return null;}let _0xdaded3=class{constructor(_0x260e02,_0x4f3ca9,_0x233e2b){const _0x376e7b=_0x39bac6;this[_0x376e7b(0x16f)]=_0x260e02,this[_0x376e7b(0x151)]=_0x4f3ca9,this['_sessionService']=_0x233e2b;}async[_0x39bac6(0x119)](_0x308b98){const _0x10482e=_0x39bac6;var _0xb3dbeb,_0x106803;const {parentId:_0x26caab,unitId:_0x169a57,text:_0x378339,threadId:_0x19bd27}=_0x308b98,_0x3bcb37=(_0x106803=(_0xb3dbeb=_0x378339[_0x10482e(0x147)])==null?void 0x0:_0xb3dbeb[_0x10482e(0x186)](_0x5a671f=>_0x5a671f[_0x10482e(0x14b)]===_0x782fd0['CustomRangeType']['COMMENT'])[_0x10482e(0x12c)](_0x3c7d7f=>_0x3c7d7f[_0x10482e(0x13f)]))!=null?_0x106803:[],_0x506106=JSON[_0x10482e(0x181)](_0x378339),_0x139885=(await this[_0x10482e(0x13a)][_0x10482e(0x115)](_0x169a57))[_0x10482e(0x14f)]();if(_0x26caab){const _0x5d7a3f={'memberId':_0x139885,'unitId':_0x169a57,'content':_0x506106,'mention':_0x3bcb37,'threadId':_0x19bd27},_0x350feb=(await this[_0x10482e(0x16f)][_0x10482e(0x15b)](_0x10482e(0x117)+_0x169a57+_0x10482e(0x142),{'body':_0x5d7a3f}))[_0x10482e(0x153)][_0x10482e(0x11c)];return{..._0x308b98,'id':_0x350feb[_0x10482e(0x127)],'dT':_0x782fd0['dayjs'](+_0x350feb[_0x10482e(0x15d)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x350feb[_0x10482e(0x138)]};}else{const _0x3e3f56={'memberId':_0x139885,'unitId':_0x169a57,'content':_0x506106,'mention':_0x3bcb37},_0x3fe384=await this[_0x10482e(0x16f)][_0x10482e(0x15b)](_0x10482e(0x117)+_0x169a57+_0x10482e(0x16b),{'body':_0x3e3f56});return _0x920e66(_0x3fe384[_0x10482e(0x153)][_0x10482e(0x195)],_0x308b98);}}async[_0x39bac6(0x18c)](_0x8b9b46){const _0xb450c3=_0x39bac6;var _0x8625a4,_0xa71be4;const {text:_0x4a68e6,unitId:_0x106438}=_0x8b9b46,_0xde822a=(_0xa71be4=(_0x8625a4=_0x4a68e6[_0xb450c3(0x147)])==null?void 0x0:_0x8625a4[_0xb450c3(0x186)](_0xd9a070=>_0xd9a070[_0xb450c3(0x14b)]===_0x782fd0[_0xb450c3(0x12d)][_0xb450c3(0x14d)])[_0xb450c3(0x12c)](_0x4f40c7=>_0x4f40c7['rangeId']))!=null?_0xa71be4:[],_0x242bb9=JSON[_0xb450c3(0x181)](_0x4a68e6),_0x35b175=_0x8b9b46[_0xb450c3(0x162)],_0x208f13=_0x8b9b46['id'],_0x2d3823={'memberId':(await this[_0xb450c3(0x13a)][_0xb450c3(0x115)](_0x106438))[_0xb450c3(0x14f)](),'unitId':_0x106438,'threadId':_0x35b175,'mention':_0xde822a,'content':_0x242bb9,'replyId':_0x208f13},_0x893a3a=await this[_0xb450c3(0x16f)][_0xb450c3(0x15b)](_0xb450c3(0x117)+_0x106438+'/edit',{'body':_0x2d3823});return!_0x893a3a[_0xb450c3(0x153)][_0xb450c3(0x12f)]||_0x893a3a[_0xb450c3(0x153)][_0xb450c3(0x12f)][_0xb450c3(0x11b)]===0x1;}async[_0x39bac6(0x160)](_0x21de49){const _0x232b94=_0x39bac6,{unitId:_0x1a0153}=_0x21de49,_0xecdddd=_0x21de49[_0x232b94(0x162)],_0x5dea95={'memberId':this[_0x232b94(0x151)][_0x232b94(0x14e)]()[_0x232b94(0x130)],'unitId':_0x1a0153,'threadId':_0xecdddd,'solved':_0x21de49[_0x232b94(0x13e)]?_0x164965['Solved']:_0x164965[_0x232b94(0x133)]},_0x3af354=await this[_0x232b94(0x16f)]['post'](_0x232b94(0x117)+_0x1a0153+_0x232b94(0x172),{'body':_0x5dea95});return!_0x3af354[_0x232b94(0x153)][_0x232b94(0x12f)]||_0x3af354[_0x232b94(0x153)][_0x232b94(0x12f)][_0x232b94(0x11b)]===0x1;}async[_0x39bac6(0x123)](_0xadd8cf,_0x4c5b3e,_0x30661a,_0x3ef511){const _0x2daa3d=_0x39bac6,_0x140414={'memberId':(await this['_sessionService'][_0x2daa3d(0x115)](_0xadd8cf))['getMemberID'](),'threadId':_0x30661a,'replyId':_0x3ef511,'unitId':_0xadd8cf},_0x10ecf8=await this['_httpService'][_0x2daa3d(0x15b)](_0x2daa3d(0x117)+_0xadd8cf+_0x2daa3d(0x198),{'body':_0x140414});return!_0x10ecf8['body']['error']||_0x10ecf8['body'][_0x2daa3d(0x12f)][_0x2daa3d(0x11b)]===0x1;}async[_0x39bac6(0x12b)](_0x2a789e,_0x3993fc,_0x24fa13){const _0x8c7613=_0x39bac6,_0x323aba={'unitId':_0x2a789e,'threadId':_0x24fa13},_0x42c927=await this[_0x8c7613(0x16f)]['post'](_0x8c7613(0x117)+_0x2a789e+_0x8c7613(0x12a),{'body':_0x323aba}),_0x53285a=_0x24fa13[_0x8c7613(0x12c)](_0x495b07=>_0x457631(_0x42c927['body'][_0x8c7613(0x13c)][_0x495b07],_0x2a789e,_0x3993fc))[_0x8c7613(0x186)](Boolean);return Object[_0x8c7613(0x141)](_0x42c927['body'][_0x8c7613(0x128)])['forEach'](_0x317cb1=>{const _0xcf96d4=_0x8c7613;this[_0xcf96d4(0x151)]['addUser'](_0x317cb1);}),_0x53285a;}[_0x39bac6(0x17a)](_0x12cf9d){const _0x5eb4ed=_0x39bac6;return{'id':_0x12cf9d['id'],'threadId':_0x12cf9d[_0x5eb4ed(0x162)],'ref':_0x12cf9d[_0x5eb4ed(0x18a)]};}};_0xdaded3=_0x341482([_0x54e373(0x0,_0x782fd0['Inject'](_0x1743c9[_0x39bac6(0x170)])),_0x54e373(0x1,_0x782fd0[_0x39bac6(0x188)](_0x782fd0['UserManagerService'])),_0x54e373(0x2,_0x782fd0['Inject'](_0x39b4a1['CollaborationSessionService']))],_0xdaded3);var _0x35e2d3=Object[_0x39bac6(0x190)],_0x251c6c=(_0x39b604,_0x16e532,_0x3ceee9,_0x544e1f)=>{const _0x4bf264=_0x39bac6;for(var _0x189f22=_0x544e1f>0x1?void 0x0:_0x544e1f?_0x35e2d3(_0x16e532,_0x3ceee9):_0x16e532,_0xa21c5f=_0x39b604[_0x4bf264(0x166)]-0x1,_0x8a23ef;_0xa21c5f>=0x0;_0xa21c5f--)(_0x8a23ef=_0x39b604[_0xa21c5f])&&(_0x189f22=_0x8a23ef(_0x189f22)||_0x189f22);return _0x189f22;},_0xc5bf0a=(_0x4b8646,_0x3c378f)=>(_0x58a946,_0x3e73f9)=>_0x3c378f(_0x58a946,_0x3e73f9,_0x4b8646);let _0x5e86a5=class extends _0x782fd0[_0x39bac6(0x164)]{constructor(_0x5339b6,_0x5edd86){const _0x553597=_0x39bac6;super(),this['_threadCommentDataSourceService']=_0x5339b6,this[_0x553597(0x168)]=_0x5edd86,this[_0x553597(0x140)]();}[_0x39bac6(0x140)](){const _0x5e3ad4=_0x39bac6;this[_0x5e3ad4(0x16c)][_0x5e3ad4(0x18b)]=this[_0x5e3ad4(0x168)],this[_0x5e3ad4(0x16c)][_0x5e3ad4(0x16a)]=!0x1;}};_0x5e86a5=_0x251c6c([_0xc5bf0a(0x0,_0x1a5ffb[_0x39bac6(0x175)]),_0xc5bf0a(0x1,_0x782fd0[_0x39bac6(0x188)](_0xdaded3))],_0x5e86a5);var _0x3e7616=Object[_0x39bac6(0x184)],_0x1478eb=Object['getOwnPropertyDescriptor'],_0x5c00e3=(_0xa5e157,_0x56122d,_0x2608fa)=>_0x56122d in _0xa5e157?_0x3e7616(_0xa5e157,_0x56122d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2608fa}):_0xa5e157[_0x56122d]=_0x2608fa,_0x37846f=(_0x47f843,_0x989710,_0x51a3ce,_0xc9d341)=>{const _0x26911c=_0x39bac6;for(var _0x30c813=_0xc9d341>0x1?void 0x0:_0xc9d341?_0x1478eb(_0x989710,_0x51a3ce):_0x989710,_0x5496bb=_0x47f843[_0x26911c(0x166)]-0x1,_0x4810a4;_0x5496bb>=0x0;_0x5496bb--)(_0x4810a4=_0x47f843[_0x5496bb])&&(_0x30c813=_0x4810a4(_0x30c813)||_0x30c813);return _0x30c813;},_0x31ad66=(_0x4ba811,_0x45e0a8)=>(_0x5a3f4a,_0x12e7c)=>_0x45e0a8(_0x5a3f4a,_0x12e7c,_0x4ba811),_0x44b548=(_0x460ab4,_0x1cc7a1,_0x371345)=>_0x5c00e3(_0x460ab4,typeof _0x1cc7a1!=_0x39bac6(0x194)?_0x1cc7a1+'':_0x1cc7a1,_0x371345);_0x3d14b1[_0x39bac6(0x110)]=class extends _0x782fd0[_0x39bac6(0x143)]{constructor(_0x30c588=_0xb8b559,_0x282a78,_0x18f083){const _0xb35703=_0x39bac6;super(),this[_0xb35703(0x148)]=_0x30c588,this[_0xb35703(0x17f)]=_0x282a78,this[_0xb35703(0x129)]=_0x18f083;const {..._0x5e7252}=_0x782fd0[_0xb35703(0x152)]({},_0xb8b559,this['_config']);this[_0xb35703(0x129)][_0xb35703(0x199)](_0x6fb472,_0x5e7252);}[_0x39bac6(0x125)](){const _0x56a516=_0x39bac6;[[_0xdaded3],[_0x5e86a5],[_0x621e03]][_0x56a516(0x19c)](_0x208c3d=>{const _0x500d5e=_0x56a516;this['_injector'][_0x500d5e(0x17c)](_0x208c3d);});}[_0x39bac6(0x11a)](){const _0x455048=_0x39bac6;this[_0x455048(0x17f)][_0x455048(0x146)](_0x5e86a5),this[_0x455048(0x17f)]['get'](_0x621e03);}},_0x44b548(_0x3d14b1['UniverThreadCommentDataSourcePlugin'],_0x39bac6(0x185),_0x13e2de),_0x44b548(_0x3d14b1[_0x39bac6(0x110)],_0x39bac6(0x189),_0x782fd0['UniverInstanceType'][_0x39bac6(0x154)]),_0x3d14b1['UniverThreadCommentDataSourcePlugin']=_0x37846f([_0x782fd0[_0x39bac6(0x17d)](_0x145a2a[_0x39bac6(0x11f)],_0x39b4a1[_0x39bac6(0x17e)],_0x338502['UniverLicensePlugin']),_0x31ad66(0x1,_0x782fd0[_0x39bac6(0x188)](_0x782fd0[_0x39bac6(0x15f)])),_0x31ad66(0x2,_0x782fd0[_0x39bac6(0x15e)])],_0x3d14b1[_0x39bac6(0x110)]),Object[_0x39bac6(0x184)](_0x3d14b1,Symbol['toStringTag'],{'value':'Module'});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.13.0-insiders.20251215-64041bb",
3
+ "version": "0.13.0-insiders.20251216-1519cb7",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.13.0-insiders.20251215-64041bb",
49
- "@univerjs/core": "0.13.0-insiders.20251215-64041bb",
50
- "@univerjs-pro/license": "0.13.0-insiders.20251215-64041bb",
48
+ "@univerjs-pro/license": "0.13.0-insiders.20251216-1519cb7",
49
+ "@univerjs-pro/collaboration-client": "0.13.0-insiders.20251216-1519cb7",
51
50
  "@univerjs/protocol": "0.1.47",
52
- "@univerjs/network": "0.13.0-insiders.20251215-64041bb",
53
- "@univerjs/thread-comment-ui": "0.13.0-insiders.20251215-64041bb",
54
- "@univerjs/thread-comment": "0.13.0-insiders.20251215-64041bb"
51
+ "@univerjs/network": "0.13.0-insiders.20251216-1519cb7",
52
+ "@univerjs/core": "0.13.0-insiders.20251216-1519cb7",
53
+ "@univerjs/thread-comment-ui": "0.13.0-insiders.20251216-1519cb7",
54
+ "@univerjs/thread-comment": "0.13.0-insiders.20251216-1519cb7"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",