@univerjs-pro/thread-comment-datasource 0.9.1-nightly.202507101607 → 0.9.2-nightly.202507111607

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 _0x4978c9=_0x3d3e;(function(_0x2ccb2f,_0xbc4746){const _0x9d60f5=_0x3d3e,_0xa0d428=_0x2ccb2f();while(!![]){try{const _0x5bbbc4=-parseInt(_0x9d60f5(0x127))/0x1+parseInt(_0x9d60f5(0x144))/0x2+parseInt(_0x9d60f5(0x163))/0x3+-parseInt(_0x9d60f5(0x114))/0x4*(parseInt(_0x9d60f5(0x157))/0x5)+parseInt(_0x9d60f5(0x13f))/0x6*(parseInt(_0x9d60f5(0x130))/0x7)+parseInt(_0x9d60f5(0x138))/0x8*(-parseInt(_0x9d60f5(0x111))/0x9)+-parseInt(_0x9d60f5(0x113))/0xa*(-parseInt(_0x9d60f5(0x11d))/0xb);if(_0x5bbbc4===_0xbc4746)break;else _0xa0d428['push'](_0xa0d428['shift']());}catch(_0x4846be){_0xa0d428['push'](_0xa0d428['shift']());}}}(_0x3a3e,0x783df));Object[_0x4978c9(0xfb)](exports,Symbol[_0x4978c9(0x12f)],{'value':_0x4978c9(0xfe)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x4978c9(0x171);function _0x3d3e(_0x5b6ce2,_0x5e9623){const _0x3a3e6c=_0x3a3e();return _0x3d3e=function(_0x3d3e32,_0xbf01e5){_0x3d3e32=_0x3d3e32-0xfb;let _0x57ddb3=_0x3a3e6c[_0x3d3e32];return _0x57ddb3;},_0x3d3e(_0x5b6ce2,_0x5e9623);}var I=(_0x33f390=>(_0x33f390[_0x33f390[_0x4978c9(0x137)]=0x0]=_0x4978c9(0x137),_0x33f390[_0x33f390[_0x4978c9(0x148)]=0x1]=_0x4978c9(0x148),_0x33f390[_0x33f390[_0x4978c9(0x16b)]=-0x1]='UNRECOGNIZED',_0x33f390))(I||{}),v=(_0x251ded=>(_0x251ded[_0x251ded[_0x4978c9(0x140)]=0x0]='Unknown',_0x251ded[_0x251ded[_0x4978c9(0x105)]=0x1]=_0x4978c9(0x105),_0x251ded[_0x251ded[_0x4978c9(0x10f)]=0x2]=_0x4978c9(0x10f),_0x251ded[_0x251ded[_0x4978c9(0x135)]=0x3]=_0x4978c9(0x135),_0x251ded[_0x251ded['Delete']=0x4]=_0x4978c9(0x155),_0x251ded[_0x251ded[_0x4978c9(0x14e)]=0x5]='Solve',_0x251ded[_0x251ded[_0x4978c9(0x16b)]=-0x1]='UNRECOGNIZED',_0x251ded))(v||{});function _0x3a3e(){const _0x460965=['Add','pluginName','_configService','getMemberID','IConfigService','UserManagerService','Plugin','_threadCommentDataSourceService','syncUpdateMutationToColla','parse','Reply','createTimestamp','4293eSpuEw','getUnit','14210440RnMvZf','4IgMwTS','resolveComment','getUser','/solved','delete','subscribe','_config','requireSession','format','11MqKdDy','_threadCommentDataSource','Disposable','customRanges','Inject','rangeId','threadId','IThreadCommentDataSourceService','dayjs','_init','738651vfMOYE','/delete','error','dataSource','type','userID','UniverThreadCommentUIPlugin','/universer-api/comment/unit/','toStringTag','14cbdzcw','_sessionService','_injector','size','length','Edit','HTTPService','OpenOrReOpen','8448rgyanL','addComment','setConfig','add','resolved','content','_initDataSource','563952fBeFht','Unknown','rangeType','Injector','symbol','1207600pSEbky','replyId','find','post','Solved','root','disposeWithMe','/reply','filter','deleteComment','Solve','onStarting','_userService','getCurrentUser','unitId','_httpService','slice','Delete','/add','4017635ZPmVGr','values','reply','user','/edit','YYYY/MM/DD\x20HH:mm','UniverThreadCommentDataSourcePlugin','merge','_commentService','get','replies','getOwnPropertyDescriptor','976719ymRuqE','forEach','COMMENT','listComments','stringify','map','UniverCollaborationClientPlugin','users','UNRECOGNIZED','parentId','bufferTime','userId','CustomRangeType','commentUpdate$','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','updateComment','code','/universer-api/user/list','personId','solved','ThreadCommentModel','comment','defineProperty','_initUserSync','_threadCommentModel','Module','/list','UniverLicensePlugin','body','onReady','UNIVER_UNKNOWN','addUser'];_0x3a3e=function(){return _0x460965;};return _0x3a3e();}const f=_0x12a6df=>c[_0x4978c9(0x125)](new Date(+_0x12a6df))['format'](_0x4978c9(0x15c)),R=async(_0x34e305,_0x4f99e1)=>{const _0x3cc7e2=_0x4978c9,_0x1cd485=_0x34e305[_0x3cc7e2(0x160)](c[_0x3cc7e2(0x10a)]),_0x4534da=_0x34e305[_0x3cc7e2(0x160)](P[_0x3cc7e2(0x136)]);_0x4f99e1[_0x3cc7e2(0x164)](_0x315ccd=>{const _0x3d61ef=_0x3cc7e2;_0x1cd485[_0x3d61ef(0x116)](_0x315ccd)&&_0x4f99e1[_0x3d61ef(0x118)](_0x315ccd);}),_0x4f99e1[_0x3cc7e2(0x133)]&&(await _0x4534da[_0x3cc7e2(0x160)](_0x3cc7e2(0x174),{'params':{'userIDs':[..._0x4f99e1]}}))[_0x3cc7e2(0x101)][_0x3cc7e2(0x16a)]['forEach'](_0x197316=>{_0x197316&&_0x1cd485['addUser'](_0x197316);});};var $=Object[_0x4978c9(0x162)],E=(_0xe8c6c0,_0x58f604,_0x6b4baa,_0x518847)=>{const _0x4d94f7=_0x4978c9;for(var _0x202da7=_0x518847>0x1?void 0x0:_0x518847?$(_0x58f604,_0x6b4baa):_0x58f604,_0x477a67=_0xe8c6c0[_0x4d94f7(0x134)]-0x1,_0x1645c0;_0x477a67>=0x0;_0x477a67--)(_0x1645c0=_0xe8c6c0[_0x477a67])&&(_0x202da7=_0x1645c0(_0x202da7)||_0x202da7);return _0x202da7;},S=(_0x13403a,_0x2417ce)=>(_0x4ada13,_0x43d6d0)=>_0x2417ce(_0x4ada13,_0x43d6d0,_0x13403a);let p=class extends c[_0x4978c9(0x11f)]{constructor(_0x1facba,_0x2254d0,_0x3be2b9,_0x44b7dd){const _0x518849=_0x4978c9;super(),this[_0x518849(0x15f)]=_0x1facba,this[_0x518849(0xfd)]=_0x2254d0,this[_0x518849(0x150)]=_0x3be2b9,this[_0x518849(0x132)]=_0x44b7dd,this[_0x518849(0x126)](),this[_0x518849(0xfc)]();}['_initUserSync'](){const _0x4f690e=_0x4978c9;this['disposeWithMe'](this['_threadCommentModel'][_0x4f690e(0x170)]['pipe'](w[_0x4f690e(0x16d)](0x10))[_0x4f690e(0x119)](_0x14b02f=>{const _0x5c3ae8=_0x4f690e,_0x45e962=new Set();_0x14b02f[_0x5c3ae8(0x164)](_0x295e1b=>{const _0x48d2aa=_0x5c3ae8;switch(_0x295e1b[_0x48d2aa(0x12b)]){case _0x48d2aa(0x13b):{const _0x5d2605=_0x295e1b['payload'][_0x48d2aa(0x175)];_0x45e962[_0x48d2aa(0x13b)](_0x5d2605);break;}}}),R(this[_0x5c3ae8(0x132)],_0x45e962);}));}[_0x4978c9(0x126)](){const _0x2633e9=_0x4978c9;this[_0x2633e9(0x14a)](this[_0x2633e9(0x15f)][_0x2633e9(0x170)][_0x2633e9(0x119)](async _0x3f6ae0=>{const _0x2a45ea=_0x2633e9;var _0xd5be7e,_0x38329e,_0x23aef8,_0x213fe8;const _0x1db7b4=(_0xd5be7e=this[_0x2a45ea(0xfd)][_0x2a45ea(0x112)](_0x3f6ae0[_0x2a45ea(0x152)])[_0x2a45ea(0x146)](_0xa22f78=>_0xa22f78['threadId']===_0x3f6ae0[_0x2a45ea(0x123)]))==null?void 0x0:_0xd5be7e[_0x2a45ea(0x149)];if(!_0x1db7b4)return;const {unitId:_0x116089,subUnitId:_0x342479}=_0x1db7b4;switch(_0x3f6ae0['user']&&this[_0x2a45ea(0x150)][_0x2a45ea(0x104)](_0x3f6ae0[_0x2a45ea(0x15a)]),_0x3f6ae0[_0x2a45ea(0x12b)]){case v['Add']:break;case v[_0x2a45ea(0x10f)]:{this[_0x2a45ea(0xfd)][_0x2a45ea(0x139)](_0x116089,_0x342479,{'unitId':_0x116089,'subUnitId':_0x342479,'ref':'','id':_0x3f6ae0['replyId'],'dT':f(+_0x3f6ae0[_0x2a45ea(0x110)]),'threadId':_0x3f6ae0[_0x2a45ea(0x123)],'personId':(_0x23aef8=(_0x38329e=_0x3f6ae0[_0x2a45ea(0x15a)])==null?void 0x0:_0x38329e[_0x2a45ea(0x12c)])!=null?_0x23aef8:_0x3f6ae0[_0x2a45ea(0x16e)],'text':JSON[_0x2a45ea(0x10e)](_0x3f6ae0[_0x2a45ea(0x13d)]),'parentId':_0x1db7b4['id']});break;}case v[_0x2a45ea(0x155)]:{const _0x4b3a8b=this[_0x2a45ea(0xfd)]['getComment'](_0x116089,_0x342479,_0x3f6ae0[_0x2a45ea(0x145)]);_0x4b3a8b&&_0x4b3a8b[_0x2a45ea(0x16c)]&&this[_0x2a45ea(0xfd)][_0x2a45ea(0x14d)](_0x116089,_0x342479,_0x3f6ae0[_0x2a45ea(0x145)]);break;}case v[_0x2a45ea(0x135)]:{this[_0x2a45ea(0xfd)][_0x2a45ea(0x172)](_0x116089,_0x342479,{'commentId':_0x3f6ae0['replyId'],'text':JSON[_0x2a45ea(0x10e)](_0x3f6ae0[_0x2a45ea(0x13d)])});break;}case v[_0x2a45ea(0x14e)]:{const _0x5d7fe5=(_0x213fe8=this[_0x2a45ea(0xfd)][_0x2a45ea(0x112)](_0x3f6ae0[_0x2a45ea(0x152)])[_0x2a45ea(0x146)](_0x2b9954=>_0x2b9954['threadId']===_0x3f6ae0[_0x2a45ea(0x123)]))==null?void 0x0:_0x213fe8[_0x2a45ea(0x149)];_0x5d7fe5&&this['_threadCommentModel'][_0x2a45ea(0x115)](_0x116089,_0x342479,_0x5d7fe5['id'],_0x3f6ae0[_0x2a45ea(0x176)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x4978c9(0x121)](b['CommentService'])),S(0x1,c[_0x4978c9(0x121)](M[_0x4978c9(0x177)])),S(0x2,c['Inject'](c[_0x4978c9(0x10a)])),S(0x3,c[_0x4978c9(0x121)](c['Injector']))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x4978c9(0x162)],x=(_0x4ef648,_0x1e01c6,_0x3503e7,_0x592adc)=>{const _0x5c2571=_0x4978c9;for(var _0x34b17b=_0x592adc>0x1?void 0x0:_0x592adc?A(_0x1e01c6,_0x3503e7):_0x1e01c6,_0x2ecce5=_0x4ef648[_0x5c2571(0x134)]-0x1,_0x341cd7;_0x2ecce5>=0x0;_0x2ecce5--)(_0x341cd7=_0x4ef648[_0x2ecce5])&&(_0x34b17b=_0x341cd7(_0x34b17b)||_0x34b17b);return _0x34b17b;},_=(_0x385c18,_0x9f6b58)=>(_0x52be1f,_0x59c0a1)=>_0x9f6b58(_0x52be1f,_0x59c0a1,_0x385c18);function Y(_0x472588,_0x4ea424){const _0x43e0e8=_0x4978c9,_0x1d6edb=_0x472588[_0x43e0e8(0x161)][0x0];return{..._0x4ea424,'id':_0x1d6edb[_0x43e0e8(0x145)],'resolved':_0x472588[_0x43e0e8(0x176)]===0x1,'dT':f(_0x1d6edb[_0x43e0e8(0x110)]),'personId':_0x1d6edb[_0x43e0e8(0x16e)],'threadId':_0x1d6edb[_0x43e0e8(0x123)]};}function G(_0x2f2b2e,_0x9fca51,_0x4219d3){const _0x377a4b=_0x4978c9;var _0x533cd6,_0x1c5f3d;if(((_0x1c5f3d=(_0x533cd6=_0x2f2b2e==null?void 0x0:_0x2f2b2e[_0x377a4b(0x161)])==null?void 0x0:_0x533cd6[_0x377a4b(0x134)])!=null?_0x1c5f3d:0x0)>0x0){const _0x4ac8c8=(_0x56f899,_0x8c76b3)=>({'id':_0x56f899[_0x377a4b(0x145)],'threadId':_0x56f899['threadId'],'dT':f(_0x56f899[_0x377a4b(0x110)]),'personId':_0x56f899[_0x377a4b(0x16e)],'resolved':_0x2f2b2e['solved']===I[_0x377a4b(0x148)],'unitId':_0x9fca51,'subUnitId':_0x4219d3,'text':JSON['parse'](_0x56f899[_0x377a4b(0x13d)]),'parentId':_0x8c76b3}),_0x5858ca=_0x4ac8c8(_0x2f2b2e['replies'][0x0]);return{..._0x5858ca,'children':_0x2f2b2e[_0x377a4b(0x161)][_0x377a4b(0x154)](0x1)[_0x377a4b(0x168)](_0x42e5bf=>_0x4ac8c8(_0x42e5bf,_0x5858ca['id']))};}return null;}let g=class{constructor(_0x3ba5a6,_0x49bfba,_0x2fd6db,_0x3391c7){const _0x1a3440=_0x4978c9;this['_httpService']=_0x3ba5a6,this['_userService']=_0x49bfba,this[_0x1a3440(0x131)]=_0x2fd6db,this[_0x1a3440(0x132)]=_0x3391c7;}async['addComment'](_0x5674e2){const _0x4fe61f=_0x4978c9;var _0xd7803f,_0x512811;const {parentId:_0x2fb662,unitId:_0x29c70a,text:_0x405067,threadId:_0x11ef2a}=_0x5674e2,_0x1e24dc=(_0x512811=(_0xd7803f=_0x405067[_0x4fe61f(0x120)])==null?void 0x0:_0xd7803f[_0x4fe61f(0x14c)](_0x552c46=>_0x552c46[_0x4fe61f(0x141)]===c[_0x4fe61f(0x16f)][_0x4fe61f(0x165)])[_0x4fe61f(0x168)](_0x365388=>_0x365388[_0x4fe61f(0x122)]))!=null?_0x512811:[],_0x5c3b16=JSON['stringify'](_0x405067),_0x4313bd=(await this[_0x4fe61f(0x131)][_0x4fe61f(0x11b)](_0x29c70a))[_0x4fe61f(0x108)]();if(_0x2fb662){const _0x3886e9={'memberId':_0x4313bd,'unitId':_0x29c70a,'content':_0x5c3b16,'mention':_0x1e24dc,'threadId':_0x11ef2a},_0x45bcfc=(await this[_0x4fe61f(0x153)][_0x4fe61f(0x147)]('/universer-api/comment/unit/'+_0x29c70a+_0x4fe61f(0x14b),{'body':_0x3886e9}))['body'][_0x4fe61f(0x159)];return{..._0x5674e2,'id':_0x45bcfc['replyId'],'dT':c[_0x4fe61f(0x125)](+_0x45bcfc[_0x4fe61f(0x110)])[_0x4fe61f(0x11c)](_0x4fe61f(0x15c)),'personId':_0x45bcfc['userId']};}else{const _0x5768e6={'memberId':_0x4313bd,'unitId':_0x29c70a,'content':_0x5c3b16,'mention':_0x1e24dc},_0x14b182=await this[_0x4fe61f(0x153)]['post'](_0x4fe61f(0x12e)+_0x29c70a+_0x4fe61f(0x156),{'body':_0x5768e6});return Y(_0x14b182[_0x4fe61f(0x101)][_0x4fe61f(0x178)],_0x5674e2);}}async[_0x4978c9(0x172)](_0x1513fc){const _0x23d485=_0x4978c9;var _0x590634,_0x451014;const {text:_0x340ea5,unitId:_0x15aeea}=_0x1513fc,_0x3f8d47=(_0x451014=(_0x590634=_0x340ea5[_0x23d485(0x120)])==null?void 0x0:_0x590634['filter'](_0x3c6510=>_0x3c6510[_0x23d485(0x141)]===c[_0x23d485(0x16f)][_0x23d485(0x165)])[_0x23d485(0x168)](_0x3a7e03=>_0x3a7e03['rangeId']))!=null?_0x451014:[],_0x4a5052=JSON[_0x23d485(0x167)](_0x340ea5),_0x47d781=_0x1513fc[_0x23d485(0x123)],_0x5a88e9=_0x1513fc['id'],_0x4467ac={'memberId':(await this[_0x23d485(0x131)]['requireSession'](_0x15aeea))[_0x23d485(0x108)](),'unitId':_0x15aeea,'threadId':_0x47d781,'mention':_0x3f8d47,'content':_0x4a5052,'replyId':_0x5a88e9},_0x2fb354=await this[_0x23d485(0x153)][_0x23d485(0x147)](_0x23d485(0x12e)+_0x15aeea+_0x23d485(0x15b),{'body':_0x4467ac});return!_0x2fb354[_0x23d485(0x101)][_0x23d485(0x129)]||_0x2fb354[_0x23d485(0x101)][_0x23d485(0x129)][_0x23d485(0x173)]===0x1;}async[_0x4978c9(0x115)](_0x31e066){const _0x5659cb=_0x4978c9,{unitId:_0x308229}=_0x31e066,_0x5190e5=_0x31e066[_0x5659cb(0x123)],_0x58e40d={'memberId':this[_0x5659cb(0x150)][_0x5659cb(0x151)]()[_0x5659cb(0x12c)],'unitId':_0x308229,'threadId':_0x5190e5,'solved':_0x31e066[_0x5659cb(0x13c)]?I[_0x5659cb(0x148)]:I[_0x5659cb(0x137)]},_0x16c7a2=await this[_0x5659cb(0x153)]['post'](_0x5659cb(0x12e)+_0x308229+_0x5659cb(0x117),{'body':_0x58e40d});return!_0x16c7a2[_0x5659cb(0x101)][_0x5659cb(0x129)]||_0x16c7a2[_0x5659cb(0x101)][_0x5659cb(0x129)][_0x5659cb(0x173)]===0x1;}async[_0x4978c9(0x14d)](_0x33b302,_0x558b2a,_0x266c6f,_0x3b0423){const _0x2f7b1b=_0x4978c9,_0xdd8334={'memberId':(await this['_sessionService'][_0x2f7b1b(0x11b)](_0x33b302))[_0x2f7b1b(0x108)](),'threadId':_0x266c6f,'replyId':_0x3b0423,'unitId':_0x33b302},_0xb8af38=await this[_0x2f7b1b(0x153)][_0x2f7b1b(0x147)](_0x2f7b1b(0x12e)+_0x33b302+_0x2f7b1b(0x128),{'body':_0xdd8334});return!_0xb8af38['body'][_0x2f7b1b(0x129)]||_0xb8af38[_0x2f7b1b(0x101)][_0x2f7b1b(0x129)]['code']===0x1;}async[_0x4978c9(0x166)](_0x50aa12,_0xb566f3,_0x3cf8e6){const _0x538c12=_0x4978c9,_0x148f9c={'unitId':_0x50aa12,'threadId':_0x3cf8e6},_0x38aabb=await this['_httpService']['post'](_0x538c12(0x12e)+_0x50aa12+_0x538c12(0xff),{'body':_0x148f9c}),_0x52765a=_0x3cf8e6[_0x538c12(0x168)](_0x267940=>G(_0x38aabb[_0x538c12(0x101)]['comments'][_0x267940],_0x50aa12,_0xb566f3))['filter'](Boolean);return Object[_0x538c12(0x158)](_0x38aabb[_0x538c12(0x101)][_0x538c12(0x16a)])['forEach'](_0x2f610a=>{const _0x39f790=_0x538c12;this['_userService'][_0x39f790(0x104)](_0x2f610a);}),_0x52765a;}['saveCommentToSnapshot'](_0x143713){return{'id':_0x143713['id'],'threadId':_0x143713['threadId'],'ref':_0x143713['ref']};}};g=x([_(0x0,c[_0x4978c9(0x121)](P[_0x4978c9(0x136)])),_(0x1,c[_0x4978c9(0x121)](c[_0x4978c9(0x10a)])),_(0x2,c[_0x4978c9(0x121)](b['CollaborationSessionService'])),_(0x3,c[_0x4978c9(0x121)](c[_0x4978c9(0x142)]))],g);var H=Object[_0x4978c9(0x162)],J=(_0x3d5903,_0x3afe1d,_0x559ad1,_0x16dff6)=>{for(var _0x24fc45=_0x16dff6>0x1?void 0x0:_0x16dff6?H(_0x3afe1d,_0x559ad1):_0x3afe1d,_0x10e252=_0x3d5903['length']-0x1,_0x21de2a;_0x10e252>=0x0;_0x10e252--)(_0x21de2a=_0x3d5903[_0x10e252])&&(_0x24fc45=_0x21de2a(_0x24fc45)||_0x24fc45);return _0x24fc45;},y=(_0x290a18,_0x372fb7)=>(_0x15c999,_0x57dfdd)=>_0x372fb7(_0x15c999,_0x57dfdd,_0x290a18);let C=class extends c[_0x4978c9(0x11f)]{constructor(_0x3269bf,_0x4eff56){const _0xe98401=_0x4978c9;super(),this[_0xe98401(0x10c)]=_0x3269bf,this['_threadCommentDataSource']=_0x4eff56,this['_initDataSource']();}[_0x4978c9(0x13e)](){const _0x33d11f=_0x4978c9;this[_0x33d11f(0x10c)][_0x33d11f(0x12a)]=this[_0x33d11f(0x11e)],this['_threadCommentDataSourceService'][_0x33d11f(0x10d)]=!0x1;}};C=J([y(0x0,M[_0x4978c9(0x124)]),y(0x1,c[_0x4978c9(0x121)](g))],C);var F=Object[_0x4978c9(0xfb)],L=Object[_0x4978c9(0x162)],Z=(_0x2f7d75,_0x12f5c3,_0x4d6663)=>_0x12f5c3 in _0x2f7d75?F(_0x2f7d75,_0x12f5c3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4d6663}):_0x2f7d75[_0x12f5c3]=_0x4d6663,W=(_0x39f886,_0x3b9eb0,_0x2b1f3a,_0x1c224c)=>{const _0x15ef8e=_0x4978c9;for(var _0x33e028=_0x1c224c>0x1?void 0x0:_0x1c224c?L(_0x3b9eb0,_0x2b1f3a):_0x3b9eb0,_0x4630bb=_0x39f886[_0x15ef8e(0x134)]-0x1,_0x806916;_0x4630bb>=0x0;_0x4630bb--)(_0x806916=_0x39f886[_0x4630bb])&&(_0x33e028=_0x806916(_0x33e028)||_0x33e028);return _0x33e028;},O=(_0x5c242e,_0x335c43)=>(_0x2e24b9,_0x56485c)=>_0x335c43(_0x2e24b9,_0x56485c,_0x5c242e),N=(_0x16db2e,_0x5dee43,_0x1a265c)=>Z(_0x16db2e,typeof _0x5dee43!=_0x4978c9(0x143)?_0x5dee43+'':_0x5dee43,_0x1a265c);exports[_0x4978c9(0x15d)]=class extends c[_0x4978c9(0x10b)]{constructor(_0x4136e4=D,_0x3d2e02,_0x173eab){const _0x447366=_0x4978c9;super(),this[_0x447366(0x11a)]=_0x4136e4,this[_0x447366(0x132)]=_0x3d2e02,this[_0x447366(0x107)]=_0x173eab;const {..._0xb0972}=c[_0x447366(0x15e)]({},D,this['_config']);this['_configService'][_0x447366(0x13a)](q,_0xb0972);}[_0x4978c9(0x14f)](){const _0x48c5d8=_0x4978c9;[[g],[C],[p]][_0x48c5d8(0x164)](_0x3f5a24=>{const _0x47429d=_0x48c5d8;this[_0x47429d(0x132)]['add'](_0x3f5a24);});}[_0x4978c9(0x102)](){const _0x29221a=_0x4978c9;this[_0x29221a(0x132)][_0x29221a(0x160)](C),this['_injector'][_0x29221a(0x160)](p);}},N(exports[_0x4978c9(0x15d)],_0x4978c9(0x106),U),N(exports[_0x4978c9(0x15d)],_0x4978c9(0x12b),c['UniverInstanceType'][_0x4978c9(0x103)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](j[_0x4978c9(0x12d)],b[_0x4978c9(0x169)],T[_0x4978c9(0x100)]),O(0x1,c['Inject'](c[_0x4978c9(0x142)])),O(0x2,c[_0x4978c9(0x109)])],exports[_0x4978c9(0x15d)]);
1
+ 'use strict';const _0xbafa75=_0x4e7e;(function(_0x1ac6bb,_0x3bc651){const _0x2709d4=_0x4e7e,_0x3d623c=_0x1ac6bb();while(!![]){try{const _0x36e050=parseInt(_0x2709d4(0x1c6))/0x1*(parseInt(_0x2709d4(0x1f8))/0x2)+parseInt(_0x2709d4(0x1fe))/0x3*(-parseInt(_0x2709d4(0x1ea))/0x4)+parseInt(_0x2709d4(0x1c4))/0x5+parseInt(_0x2709d4(0x1f2))/0x6+-parseInt(_0x2709d4(0x1fa))/0x7+-parseInt(_0x2709d4(0x207))/0x8+parseInt(_0x2709d4(0x1b0))/0x9;if(_0x36e050===_0x3bc651)break;else _0x3d623c['push'](_0x3d623c['shift']());}catch(_0x3ff825){_0x3d623c['push'](_0x3d623c['shift']());}}}(_0x5c09,0xafa32));function _0x5c09(){const _0x319448=['/universer-api/comment/unit/','addComment','/universer-api/user/list','1338706fGUwPu','getCurrentUser','3507287hYMcdo','length','bufferTime','getOwnPropertyDescriptor','328191RfiOWl','/solved','body','merge','onReady','get','YYYY/MM/DD\x20HH:mm','setConfig','_initUserSync','6670488mdwWsS','UniverCollaborationClientPlugin','IThreadCommentDataSourceService','Edit','updateComment','COMMENT','Delete','Unknown','personId','content','syncUpdateMutationToColla','error','_threadCommentDataSourceService','Plugin','getComment','threadId','thread-comment-data-source.config','stringify','HTTPService','user','deleteComment','requireSession','pipe','delete','UniverLicensePlugin','users','_injector','DependentOn','subscribe','Injector','post','8783415fsDqCw','symbol','userID','slice','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','IConfigService','replyId','_commentService','type','disposeWithMe','reply','getMemberID','Disposable','/edit','parse','ref','comment','_httpService','format','Module','714475ECatFq','solved','1WTObUm','_userService','resolved','/list','CustomRangeType','comments','UniverThreadCommentDataSourcePlugin','find','dayjs','toStringTag','Inject','customRanges','add','_init','code','_threadCommentModel','defineProperty','UniverThreadCommentUIPlugin','dataSource','UNRECOGNIZED','/add','getUnit','_configService','resolveComment','map','Solved','unitId','_threadCommentDataSource','createTimestamp','values','_sessionService','root','filter','addUser','Reply','Solve','8iDTSlI','saveCommentToSnapshot','_initDataSource','OpenOrReOpen','userId','forEach','ThreadCommentModel','replies','2909238fZdHpP','getUser','UserManagerService'];_0x5c09=function(){return _0x319448;};return _0x5c09();}Object[_0xbafa75(0x1d6)](exports,Symbol[_0xbafa75(0x1cf)],{'value':_0xbafa75(0x1c3)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0xbafa75(0x1b4);var I=(_0x52e5a7=>(_0x52e5a7[_0x52e5a7[_0xbafa75(0x1ed)]=0x0]=_0xbafa75(0x1ed),_0x52e5a7[_0x52e5a7[_0xbafa75(0x1df)]=0x1]=_0xbafa75(0x1df),_0x52e5a7[_0x52e5a7[_0xbafa75(0x1d9)]=-0x1]=_0xbafa75(0x1d9),_0x52e5a7))(I||{}),v=(_0x750e3d=>(_0x750e3d[_0x750e3d[_0xbafa75(0x20e)]=0x0]=_0xbafa75(0x20e),_0x750e3d[_0x750e3d['Add']=0x1]='Add',_0x750e3d[_0x750e3d[_0xbafa75(0x1e8)]=0x2]=_0xbafa75(0x1e8),_0x750e3d[_0x750e3d[_0xbafa75(0x20a)]=0x3]=_0xbafa75(0x20a),_0x750e3d[_0x750e3d[_0xbafa75(0x20d)]=0x4]='Delete',_0x750e3d[_0x750e3d[_0xbafa75(0x1e9)]=0x5]='Solve',_0x750e3d[_0x750e3d[_0xbafa75(0x1d9)]=-0x1]=_0xbafa75(0x1d9),_0x750e3d))(v||{});const f=_0xc1fcb4=>c['dayjs'](new Date(+_0xc1fcb4))[_0xbafa75(0x1c2)](_0xbafa75(0x204)),R=async(_0x413a95,_0x467491)=>{const _0x41f51f=_0xbafa75,_0x2b1e4d=_0x413a95[_0x41f51f(0x203)](c[_0x41f51f(0x1f4)]),_0x2bcc2a=_0x413a95[_0x41f51f(0x203)](P['HTTPService']);_0x467491[_0x41f51f(0x1ef)](_0x1a970c=>{const _0x1c1151=_0x41f51f;_0x2b1e4d[_0x1c1151(0x1f3)](_0x1a970c)&&_0x467491[_0x1c1151(0x21e)](_0x1a970c);}),_0x467491['size']&&(await _0x2bcc2a[_0x41f51f(0x203)](_0x41f51f(0x1f7),{'params':{'userIDs':[..._0x467491]}}))[_0x41f51f(0x200)]['users'][_0x41f51f(0x1ef)](_0x4b45dc=>{_0x4b45dc&&_0x2b1e4d['addUser'](_0x4b45dc);});};var $=Object[_0xbafa75(0x1fd)],E=(_0x4b6377,_0x57c27c,_0x1fadc8,_0x7455e0)=>{const _0x5e7b09=_0xbafa75;for(var _0x3c7d2b=_0x7455e0>0x1?void 0x0:_0x7455e0?$(_0x57c27c,_0x1fadc8):_0x57c27c,_0x1dbbd4=_0x4b6377[_0x5e7b09(0x1fb)]-0x1,_0x3b91af;_0x1dbbd4>=0x0;_0x1dbbd4--)(_0x3b91af=_0x4b6377[_0x1dbbd4])&&(_0x3c7d2b=_0x3b91af(_0x3c7d2b)||_0x3c7d2b);return _0x3c7d2b;},S=(_0x43a5b9,_0x520431)=>(_0x4dbcfd,_0x15e9cd)=>_0x520431(_0x4dbcfd,_0x15e9cd,_0x43a5b9);let p=class extends c['Disposable']{constructor(_0x2c548d,_0x131167,_0x39d568,_0x1e70dd){const _0x336bbc=_0xbafa75;super(),this[_0x336bbc(0x1b7)]=_0x2c548d,this[_0x336bbc(0x1d5)]=_0x131167,this[_0x336bbc(0x1c7)]=_0x39d568,this['_injector']=_0x1e70dd,this[_0x336bbc(0x1d3)](),this[_0x336bbc(0x206)]();}[_0xbafa75(0x206)](){const _0xeeb2ea=_0xbafa75;this[_0xeeb2ea(0x1b9)](this[_0xeeb2ea(0x1d5)]['commentUpdate$'][_0xeeb2ea(0x21d)](w[_0xeeb2ea(0x1fc)](0x10))[_0xeeb2ea(0x223)](_0x35263b=>{const _0x535785=_0xeeb2ea,_0x553401=new Set();_0x35263b[_0x535785(0x1ef)](_0x353349=>{const _0x4df454=_0x535785;switch(_0x353349[_0x4df454(0x1b8)]){case _0x4df454(0x1d2):{const _0x38a98c=_0x353349['payload'][_0x4df454(0x20f)];_0x553401[_0x4df454(0x1d2)](_0x38a98c);break;}}}),R(this[_0x535785(0x221)],_0x553401);}));}[_0xbafa75(0x1d3)](){const _0x4eac4d=_0xbafa75;this[_0x4eac4d(0x1b9)](this['_commentService']['commentUpdate$'][_0x4eac4d(0x223)](async _0x1bc851=>{const _0x48aeb4=_0x4eac4d;var _0x580318,_0x40c3ed,_0xb7e349,_0x42a7b6;const _0x31bdaf=(_0x580318=this[_0x48aeb4(0x1d5)][_0x48aeb4(0x1db)](_0x1bc851['unitId'])['find'](_0x513b40=>_0x513b40[_0x48aeb4(0x216)]===_0x1bc851[_0x48aeb4(0x216)]))==null?void 0x0:_0x580318[_0x48aeb4(0x1e5)];if(!_0x31bdaf)return;const {unitId:_0x3eddb6,subUnitId:_0x6f4c43}=_0x31bdaf;switch(_0x1bc851[_0x48aeb4(0x21a)]&&this[_0x48aeb4(0x1c7)][_0x48aeb4(0x1e7)](_0x1bc851[_0x48aeb4(0x21a)]),_0x1bc851['type']){case v['Add']:break;case v['Reply']:{this[_0x48aeb4(0x1d5)][_0x48aeb4(0x1f6)](_0x3eddb6,_0x6f4c43,{'unitId':_0x3eddb6,'subUnitId':_0x6f4c43,'ref':'','id':_0x1bc851[_0x48aeb4(0x1b6)],'dT':f(+_0x1bc851[_0x48aeb4(0x1e2)]),'threadId':_0x1bc851[_0x48aeb4(0x216)],'personId':(_0xb7e349=(_0x40c3ed=_0x1bc851[_0x48aeb4(0x21a)])==null?void 0x0:_0x40c3ed['userID'])!=null?_0xb7e349:_0x1bc851[_0x48aeb4(0x1ee)],'text':JSON[_0x48aeb4(0x1be)](_0x1bc851['content']),'parentId':_0x31bdaf['id']});break;}case v['Delete']:{const _0x434f62=this[_0x48aeb4(0x1d5)][_0x48aeb4(0x215)](_0x3eddb6,_0x6f4c43,_0x1bc851[_0x48aeb4(0x1b6)]);_0x434f62&&_0x434f62['parentId']&&this[_0x48aeb4(0x1d5)][_0x48aeb4(0x21b)](_0x3eddb6,_0x6f4c43,_0x1bc851[_0x48aeb4(0x1b6)]);break;}case v[_0x48aeb4(0x20a)]:{this[_0x48aeb4(0x1d5)][_0x48aeb4(0x20b)](_0x3eddb6,_0x6f4c43,{'commentId':_0x1bc851['replyId'],'text':JSON[_0x48aeb4(0x1be)](_0x1bc851[_0x48aeb4(0x210)])});break;}case v[_0x48aeb4(0x1e9)]:{const _0x4b69d3=(_0x42a7b6=this[_0x48aeb4(0x1d5)][_0x48aeb4(0x1db)](_0x1bc851[_0x48aeb4(0x1e0)])[_0x48aeb4(0x1cd)](_0x143784=>_0x143784[_0x48aeb4(0x216)]===_0x1bc851[_0x48aeb4(0x216)]))==null?void 0x0:_0x42a7b6[_0x48aeb4(0x1e5)];_0x4b69d3&&this['_threadCommentModel'][_0x48aeb4(0x1dd)](_0x3eddb6,_0x6f4c43,_0x4b69d3['id'],_0x1bc851[_0x48aeb4(0x1c5)]===I['Solved']);break;}}}));}};p=E([S(0x0,c['Inject'](b['CommentService'])),S(0x1,c[_0xbafa75(0x1d0)](M[_0xbafa75(0x1f0)])),S(0x2,c[_0xbafa75(0x1d0)](c[_0xbafa75(0x1f4)])),S(0x3,c['Inject'](c[_0xbafa75(0x224)]))],p);const q=_0xbafa75(0x217),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x348770,_0x207dec,_0x462cec,_0x4d2697)=>{for(var _0x236f95=_0x4d2697>0x1?void 0x0:_0x4d2697?A(_0x207dec,_0x462cec):_0x207dec,_0x438a96=_0x348770['length']-0x1,_0x302dd9;_0x438a96>=0x0;_0x438a96--)(_0x302dd9=_0x348770[_0x438a96])&&(_0x236f95=_0x302dd9(_0x236f95)||_0x236f95);return _0x236f95;},_=(_0x3d27f5,_0x1141bb)=>(_0x17084f,_0x49eb33)=>_0x1141bb(_0x17084f,_0x49eb33,_0x3d27f5);function _0x4e7e(_0x68357e,_0x1ffce2){const _0x5c0964=_0x5c09();return _0x4e7e=function(_0x4e7e13,_0x223676){_0x4e7e13=_0x4e7e13-0x1b0;let _0x4ab7d5=_0x5c0964[_0x4e7e13];return _0x4ab7d5;},_0x4e7e(_0x68357e,_0x1ffce2);}function Y(_0x2a47ad,_0x5deb8c){const _0x211525=_0xbafa75,_0x521cf6=_0x2a47ad[_0x211525(0x1f1)][0x0];return{..._0x5deb8c,'id':_0x521cf6[_0x211525(0x1b6)],'resolved':_0x2a47ad[_0x211525(0x1c5)]===0x1,'dT':f(_0x521cf6[_0x211525(0x1e2)]),'personId':_0x521cf6[_0x211525(0x1ee)],'threadId':_0x521cf6['threadId']};}function G(_0x5994be,_0x4c44d8,_0x345f64){const _0x35456d=_0xbafa75;var _0x204b77,_0x466ad2;if(((_0x466ad2=(_0x204b77=_0x5994be==null?void 0x0:_0x5994be['replies'])==null?void 0x0:_0x204b77['length'])!=null?_0x466ad2:0x0)>0x0){const _0x3331aa=(_0x48aab0,_0x57ba5e)=>({'id':_0x48aab0[_0x35456d(0x1b6)],'threadId':_0x48aab0[_0x35456d(0x216)],'dT':f(_0x48aab0[_0x35456d(0x1e2)]),'personId':_0x48aab0[_0x35456d(0x1ee)],'resolved':_0x5994be[_0x35456d(0x1c5)]===I['Solved'],'unitId':_0x4c44d8,'subUnitId':_0x345f64,'text':JSON[_0x35456d(0x1be)](_0x48aab0[_0x35456d(0x210)]),'parentId':_0x57ba5e}),_0x38654=_0x3331aa(_0x5994be[_0x35456d(0x1f1)][0x0]);return{..._0x38654,'children':_0x5994be[_0x35456d(0x1f1)][_0x35456d(0x1b3)](0x1)['map'](_0x45e5bf=>_0x3331aa(_0x45e5bf,_0x38654['id']))};}return null;}let g=class{constructor(_0x275958,_0x404fb2,_0xe63467,_0x2f2f57){const _0x300520=_0xbafa75;this['_httpService']=_0x275958,this[_0x300520(0x1c7)]=_0x404fb2,this[_0x300520(0x1e4)]=_0xe63467,this[_0x300520(0x221)]=_0x2f2f57;}async[_0xbafa75(0x1f6)](_0x8ce363){const _0x2f2220=_0xbafa75;var _0x511feb,_0x5a806d;const {parentId:_0x2d2f65,unitId:_0x199afd,text:_0x1415e0,threadId:_0x214a92}=_0x8ce363,_0x36ba48=(_0x5a806d=(_0x511feb=_0x1415e0[_0x2f2220(0x1d1)])==null?void 0x0:_0x511feb[_0x2f2220(0x1e6)](_0x30a650=>_0x30a650['rangeType']===c[_0x2f2220(0x1ca)]['COMMENT'])[_0x2f2220(0x1de)](_0x5a81ff=>_0x5a81ff['rangeId']))!=null?_0x5a806d:[],_0x5141fe=JSON[_0x2f2220(0x218)](_0x1415e0),_0x3213cb=(await this['_sessionService'][_0x2f2220(0x21c)](_0x199afd))[_0x2f2220(0x1bb)]();if(_0x2d2f65){const _0x4e8156={'memberId':_0x3213cb,'unitId':_0x199afd,'content':_0x5141fe,'mention':_0x36ba48,'threadId':_0x214a92},_0x4f9529=(await this[_0x2f2220(0x1c1)]['post'](_0x2f2220(0x1f5)+_0x199afd+'/reply',{'body':_0x4e8156}))[_0x2f2220(0x200)][_0x2f2220(0x1ba)];return{..._0x8ce363,'id':_0x4f9529[_0x2f2220(0x1b6)],'dT':c[_0x2f2220(0x1ce)](+_0x4f9529[_0x2f2220(0x1e2)])[_0x2f2220(0x1c2)](_0x2f2220(0x204)),'personId':_0x4f9529[_0x2f2220(0x1ee)]};}else{const _0x42a5f1={'memberId':_0x3213cb,'unitId':_0x199afd,'content':_0x5141fe,'mention':_0x36ba48},_0x41b297=await this[_0x2f2220(0x1c1)][_0x2f2220(0x225)](_0x2f2220(0x1f5)+_0x199afd+_0x2f2220(0x1da),{'body':_0x42a5f1});return Y(_0x41b297[_0x2f2220(0x200)][_0x2f2220(0x1c0)],_0x8ce363);}}async[_0xbafa75(0x20b)](_0x149ada){const _0x50c326=_0xbafa75;var _0x58959d,_0x48e04c;const {text:_0x2d8eb7,unitId:_0x2bef8d}=_0x149ada,_0x4db81=(_0x48e04c=(_0x58959d=_0x2d8eb7[_0x50c326(0x1d1)])==null?void 0x0:_0x58959d[_0x50c326(0x1e6)](_0x29ce07=>_0x29ce07['rangeType']===c[_0x50c326(0x1ca)][_0x50c326(0x20c)])['map'](_0x21ea97=>_0x21ea97['rangeId']))!=null?_0x48e04c:[],_0x4ac806=JSON['stringify'](_0x2d8eb7),_0x4d3bc0=_0x149ada[_0x50c326(0x216)],_0x493e4e=_0x149ada['id'],_0x375d30={'memberId':(await this[_0x50c326(0x1e4)][_0x50c326(0x21c)](_0x2bef8d))[_0x50c326(0x1bb)](),'unitId':_0x2bef8d,'threadId':_0x4d3bc0,'mention':_0x4db81,'content':_0x4ac806,'replyId':_0x493e4e},_0x3c0ca8=await this[_0x50c326(0x1c1)][_0x50c326(0x225)]('/universer-api/comment/unit/'+_0x2bef8d+_0x50c326(0x1bd),{'body':_0x375d30});return!_0x3c0ca8['body'][_0x50c326(0x212)]||_0x3c0ca8['body']['error'][_0x50c326(0x1d4)]===0x1;}async['resolveComment'](_0x592adb){const _0x2b8c53=_0xbafa75,{unitId:_0xd8086}=_0x592adb,_0x3acb21=_0x592adb[_0x2b8c53(0x216)],_0x29ac2b={'memberId':this[_0x2b8c53(0x1c7)][_0x2b8c53(0x1f9)]()[_0x2b8c53(0x1b2)],'unitId':_0xd8086,'threadId':_0x3acb21,'solved':_0x592adb[_0x2b8c53(0x1c8)]?I[_0x2b8c53(0x1df)]:I[_0x2b8c53(0x1ed)]},_0xe7c0c6=await this[_0x2b8c53(0x1c1)][_0x2b8c53(0x225)](_0x2b8c53(0x1f5)+_0xd8086+_0x2b8c53(0x1ff),{'body':_0x29ac2b});return!_0xe7c0c6[_0x2b8c53(0x200)]['error']||_0xe7c0c6[_0x2b8c53(0x200)][_0x2b8c53(0x212)][_0x2b8c53(0x1d4)]===0x1;}async[_0xbafa75(0x21b)](_0x398629,_0x5df622,_0x4a2256,_0x510288){const _0x470f65=_0xbafa75,_0x25bb3e={'memberId':(await this[_0x470f65(0x1e4)][_0x470f65(0x21c)](_0x398629))[_0x470f65(0x1bb)](),'threadId':_0x4a2256,'replyId':_0x510288,'unitId':_0x398629},_0x131534=await this['_httpService'][_0x470f65(0x225)](_0x470f65(0x1f5)+_0x398629+'/delete',{'body':_0x25bb3e});return!_0x131534[_0x470f65(0x200)][_0x470f65(0x212)]||_0x131534[_0x470f65(0x200)]['error'][_0x470f65(0x1d4)]===0x1;}async['listComments'](_0x363647,_0x3db533,_0x2e2a23){const _0x299382=_0xbafa75,_0xf1254a={'unitId':_0x363647,'threadId':_0x2e2a23},_0x22ba52=await this[_0x299382(0x1c1)][_0x299382(0x225)](_0x299382(0x1f5)+_0x363647+_0x299382(0x1c9),{'body':_0xf1254a}),_0x5ba63c=_0x2e2a23[_0x299382(0x1de)](_0x155565=>G(_0x22ba52['body'][_0x299382(0x1cb)][_0x155565],_0x363647,_0x3db533))[_0x299382(0x1e6)](Boolean);return Object[_0x299382(0x1e3)](_0x22ba52['body'][_0x299382(0x220)])['forEach'](_0x7bab7c=>{const _0x2e49cb=_0x299382;this[_0x2e49cb(0x1c7)][_0x2e49cb(0x1e7)](_0x7bab7c);}),_0x5ba63c;}[_0xbafa75(0x1eb)](_0x1c6675){const _0x29382b=_0xbafa75;return{'id':_0x1c6675['id'],'threadId':_0x1c6675[_0x29382b(0x216)],'ref':_0x1c6675[_0x29382b(0x1bf)]};}};g=x([_(0x0,c['Inject'](P[_0xbafa75(0x219)])),_(0x1,c['Inject'](c[_0xbafa75(0x1f4)])),_(0x2,c[_0xbafa75(0x1d0)](b['CollaborationSessionService'])),_(0x3,c[_0xbafa75(0x1d0)](c[_0xbafa75(0x224)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x2ae542,_0xe0f66b,_0x44bb57,_0x57acde)=>{const _0x274a54=_0xbafa75;for(var _0x3871d8=_0x57acde>0x1?void 0x0:_0x57acde?H(_0xe0f66b,_0x44bb57):_0xe0f66b,_0x2ea932=_0x2ae542[_0x274a54(0x1fb)]-0x1,_0x199dcc;_0x2ea932>=0x0;_0x2ea932--)(_0x199dcc=_0x2ae542[_0x2ea932])&&(_0x3871d8=_0x199dcc(_0x3871d8)||_0x3871d8);return _0x3871d8;},y=(_0x183a6d,_0x245926)=>(_0x3530b5,_0x39c741)=>_0x245926(_0x3530b5,_0x39c741,_0x183a6d);let C=class extends c[_0xbafa75(0x1bc)]{constructor(_0x3964e1,_0x58aec3){const _0x36b4de=_0xbafa75;super(),this[_0x36b4de(0x213)]=_0x3964e1,this['_threadCommentDataSource']=_0x58aec3,this['_initDataSource']();}[_0xbafa75(0x1ec)](){const _0x3a256e=_0xbafa75;this['_threadCommentDataSourceService'][_0x3a256e(0x1d8)]=this[_0x3a256e(0x1e1)],this[_0x3a256e(0x213)][_0x3a256e(0x211)]=!0x1;}};C=J([y(0x0,M[_0xbafa75(0x209)]),y(0x1,c['Inject'](g))],C);var F=Object[_0xbafa75(0x1d6)],L=Object[_0xbafa75(0x1fd)],Z=(_0xe08e0e,_0x80f52a,_0x1d61e4)=>_0x80f52a in _0xe08e0e?F(_0xe08e0e,_0x80f52a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1d61e4}):_0xe08e0e[_0x80f52a]=_0x1d61e4,W=(_0x46bb2d,_0x328d0c,_0x370a4f,_0x48c7d2)=>{const _0x34f59e=_0xbafa75;for(var _0x59ccc4=_0x48c7d2>0x1?void 0x0:_0x48c7d2?L(_0x328d0c,_0x370a4f):_0x328d0c,_0x2653bd=_0x46bb2d[_0x34f59e(0x1fb)]-0x1,_0x41a4f1;_0x2653bd>=0x0;_0x2653bd--)(_0x41a4f1=_0x46bb2d[_0x2653bd])&&(_0x59ccc4=_0x41a4f1(_0x59ccc4)||_0x59ccc4);return _0x59ccc4;},O=(_0xc263a3,_0x2e8218)=>(_0x35e540,_0x611a81)=>_0x2e8218(_0x35e540,_0x611a81,_0xc263a3),N=(_0x27fd25,_0x5922c0,_0x4a9734)=>Z(_0x27fd25,typeof _0x5922c0!=_0xbafa75(0x1b1)?_0x5922c0+'':_0x5922c0,_0x4a9734);exports[_0xbafa75(0x1cc)]=class extends c[_0xbafa75(0x214)]{constructor(_0x3edf71=D,_0x3b61f1,_0x44e162){const _0xbd8aae=_0xbafa75;super(),this['_config']=_0x3edf71,this['_injector']=_0x3b61f1,this[_0xbd8aae(0x1dc)]=_0x44e162;const {..._0x8abb45}=c[_0xbd8aae(0x201)]({},D,this['_config']);this[_0xbd8aae(0x1dc)][_0xbd8aae(0x205)](q,_0x8abb45);}['onStarting'](){const _0x2da54d=_0xbafa75;[[g],[C],[p]][_0x2da54d(0x1ef)](_0x129c0c=>{const _0x268210=_0x2da54d;this[_0x268210(0x221)][_0x268210(0x1d2)](_0x129c0c);});}[_0xbafa75(0x202)](){const _0x14d737=_0xbafa75;this[_0x14d737(0x221)][_0x14d737(0x203)](C),this['_injector'][_0x14d737(0x203)](p);}},N(exports[_0xbafa75(0x1cc)],'pluginName',U),N(exports[_0xbafa75(0x1cc)],_0xbafa75(0x1b8),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports[_0xbafa75(0x1cc)]=W([c[_0xbafa75(0x222)](j[_0xbafa75(0x1d7)],b[_0xbafa75(0x208)],T[_0xbafa75(0x21f)]),O(0x1,c['Inject'](c[_0xbafa75(0x224)])),O(0x2,c[_0xbafa75(0x1b5)])],exports[_0xbafa75(0x1cc)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x4fa63f=_0x44bb;(function(_0x396371,_0x3f884e){const _0x4962c4=_0x44bb,_0x18bb2d=_0x396371();while(!![]){try{const _0x5e8278=parseInt(_0x4962c4(0x14a))/0x1+parseInt(_0x4962c4(0x13d))/0x2*(parseInt(_0x4962c4(0x13f))/0x3)+-parseInt(_0x4962c4(0x174))/0x4+-parseInt(_0x4962c4(0x142))/0x5*(-parseInt(_0x4962c4(0x168))/0x6)+-parseInt(_0x4962c4(0x139))/0x7+parseInt(_0x4962c4(0x16c))/0x8+parseInt(_0x4962c4(0x160))/0x9;if(_0x5e8278===_0x3f884e)break;else _0x18bb2d['push'](_0x18bb2d['shift']());}catch(_0xf8a481){_0x18bb2d['push'](_0x18bb2d['shift']());}}}(_0x2941,0x4debc));import{CommentService as _0x1eb02c,CollaborationSessionService as _0x16db22,UniverCollaborationClientPlugin as _0x87c461}from'@univerjs-pro/collaboration-client';function _0x44bb(_0x52d54d,_0x36b918){const _0x294197=_0x2941();return _0x44bb=function(_0x44bb62,_0x370668){_0x44bb62=_0x44bb62-0x134;let _0x3b8ce0=_0x294197[_0x44bb62];return _0x3b8ce0;},_0x44bb(_0x52d54d,_0x36b918);}import{UniverLicensePlugin as _0x1801ee}from'@univerjs-pro/license';import{dayjs as _0x480dc5,UserManagerService as _0x2991de,Inject as _0x2c392c,Injector as _0x114727,Disposable as _0x2a87b6,CustomRangeType as _0x4d9a95,UniverInstanceType as _0x479d0c,DependentOn as _0x5b7360,IConfigService as _0x1cfb99,Plugin as _0xfe02e8,merge as _0xd962df}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xda4de0}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4f0ad4,IThreadCommentDataSourceService as _0x3343f8}from'@univerjs/thread-comment';import{bufferTime as _0x1a377e}from'rxjs';import{HTTPService as _0x4577f2}from'@univerjs/network';const W=_0x4fa63f(0x18a);var I=(_0x310ffe=>(_0x310ffe[_0x310ffe[_0x4fa63f(0x163)]=0x0]=_0x4fa63f(0x163),_0x310ffe[_0x310ffe[_0x4fa63f(0x136)]=0x1]='Solved',_0x310ffe[_0x310ffe['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x310ffe))(I||{}),v=(_0x20e07b=>(_0x20e07b[_0x20e07b[_0x4fa63f(0x155)]=0x0]=_0x4fa63f(0x155),_0x20e07b[_0x20e07b[_0x4fa63f(0x172)]=0x1]=_0x4fa63f(0x172),_0x20e07b[_0x20e07b[_0x4fa63f(0x189)]=0x2]=_0x4fa63f(0x189),_0x20e07b[_0x20e07b['Edit']=0x3]=_0x4fa63f(0x17c),_0x20e07b[_0x20e07b[_0x4fa63f(0x17a)]=0x4]=_0x4fa63f(0x17a),_0x20e07b[_0x20e07b[_0x4fa63f(0x14f)]=0x5]=_0x4fa63f(0x14f),_0x20e07b[_0x20e07b[_0x4fa63f(0x190)]=-0x1]='UNRECOGNIZED',_0x20e07b))(v||{});const D=_0x260e43=>_0x480dc5(new Date(+_0x260e43))['format'](_0x4fa63f(0x145)),B=async(_0x19f126,_0xf060a)=>{const _0x29313b=_0x4fa63f,_0x3b1a02=_0x19f126[_0x29313b(0x157)](_0x2991de),_0x301327=_0x19f126['get'](_0x4577f2);_0xf060a[_0x29313b(0x14c)](_0x4d8b3f=>{const _0x4d736b=_0x29313b;_0x3b1a02[_0x4d736b(0x17d)](_0x4d8b3f)&&_0xf060a[_0x4d736b(0x13a)](_0x4d8b3f);}),_0xf060a[_0x29313b(0x15d)]&&(await _0x301327[_0x29313b(0x157)]('/universer-api/user/list',{'params':{'userIDs':[..._0xf060a]}}))[_0x29313b(0x179)][_0x29313b(0x18e)][_0x29313b(0x14c)](_0x12a01d=>{const _0x47de77=_0x29313b;_0x12a01d&&_0x3b1a02[_0x47de77(0x170)](_0x12a01d);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x279274,_0x156357,_0x334ddf,_0x579463)=>{for(var _0x2df564=_0x579463>0x1?void 0x0:_0x579463?K(_0x156357,_0x334ddf):_0x156357,_0x168ace=_0x279274['length']-0x1,_0x537a09;_0x168ace>=0x0;_0x168ace--)(_0x537a09=_0x279274[_0x168ace])&&(_0x2df564=_0x537a09(_0x2df564)||_0x2df564);return _0x2df564;},p=(_0x2d88d4,_0x4dbf1c)=>(_0x49e07d,_0x49d999)=>_0x4dbf1c(_0x49e07d,_0x49d999,_0x2d88d4);let S=class extends _0x2a87b6{constructor(_0x4824e3,_0x56a606,_0x36bf50,_0xb9200){const _0x264ca9=_0x4fa63f;super(),this[_0x264ca9(0x192)]=_0x4824e3,this[_0x264ca9(0x162)]=_0x56a606,this[_0x264ca9(0x180)]=_0x36bf50,this[_0x264ca9(0x183)]=_0xb9200,this['_init'](),this[_0x264ca9(0x181)]();}[_0x4fa63f(0x181)](){const _0x3a6c16=_0x4fa63f;this[_0x3a6c16(0x16f)](this[_0x3a6c16(0x162)][_0x3a6c16(0x137)]['pipe'](_0x1a377e(0x10))[_0x3a6c16(0x193)](_0x20401f=>{const _0x578f61=_0x3a6c16,_0x24c8f0=new Set();_0x20401f[_0x578f61(0x14c)](_0x58b8c3=>{const _0x3926ff=_0x578f61;switch(_0x58b8c3[_0x3926ff(0x140)]){case _0x3926ff(0x18d):{const _0x2a090c=_0x58b8c3['payload']['personId'];_0x24c8f0[_0x3926ff(0x18d)](_0x2a090c);break;}}}),B(this[_0x578f61(0x183)],_0x24c8f0);}));}[_0x4fa63f(0x15b)](){const _0xe3f4eb=_0x4fa63f;this['disposeWithMe'](this['_commentService'][_0xe3f4eb(0x137)][_0xe3f4eb(0x193)](async _0x1b2aca=>{const _0x46af08=_0xe3f4eb;var _0x10d1d0,_0x2f6e9e,_0x111f51,_0x426e2a;const _0x58fd44=(_0x10d1d0=this[_0x46af08(0x162)][_0x46af08(0x135)](_0x1b2aca[_0x46af08(0x138)])[_0x46af08(0x147)](_0x1eea29=>_0x1eea29[_0x46af08(0x169)]===_0x1b2aca['threadId']))==null?void 0x0:_0x10d1d0[_0x46af08(0x15f)];if(!_0x58fd44)return;const {unitId:_0x349c8c,subUnitId:_0x450566}=_0x58fd44;switch(_0x1b2aca['user']&&this['_userService']['addUser'](_0x1b2aca[_0x46af08(0x148)]),_0x1b2aca[_0x46af08(0x140)]){case v['Add']:break;case v['Reply']:{this[_0x46af08(0x162)]['addComment'](_0x349c8c,_0x450566,{'unitId':_0x349c8c,'subUnitId':_0x450566,'ref':'','id':_0x1b2aca[_0x46af08(0x159)],'dT':D(+_0x1b2aca['createTimestamp']),'threadId':_0x1b2aca['threadId'],'personId':(_0x111f51=(_0x2f6e9e=_0x1b2aca[_0x46af08(0x148)])==null?void 0x0:_0x2f6e9e['userID'])!=null?_0x111f51:_0x1b2aca[_0x46af08(0x166)],'text':JSON[_0x46af08(0x15e)](_0x1b2aca[_0x46af08(0x152)]),'parentId':_0x58fd44['id']});break;}case v['Delete']:{const _0x31e814=this[_0x46af08(0x162)][_0x46af08(0x17b)](_0x349c8c,_0x450566,_0x1b2aca[_0x46af08(0x159)]);_0x31e814&&_0x31e814[_0x46af08(0x161)]&&this[_0x46af08(0x162)][_0x46af08(0x16a)](_0x349c8c,_0x450566,_0x1b2aca[_0x46af08(0x159)]);break;}case v['Edit']:{this[_0x46af08(0x162)]['updateComment'](_0x349c8c,_0x450566,{'commentId':_0x1b2aca[_0x46af08(0x159)],'text':JSON['parse'](_0x1b2aca[_0x46af08(0x152)])});break;}case v[_0x46af08(0x14f)]:{const _0x2c5751=(_0x426e2a=this[_0x46af08(0x162)][_0x46af08(0x135)](_0x1b2aca[_0x46af08(0x138)])[_0x46af08(0x147)](_0x35884b=>_0x35884b[_0x46af08(0x169)]===_0x1b2aca[_0x46af08(0x169)]))==null?void 0x0:_0x426e2a[_0x46af08(0x15f)];_0x2c5751&&this['_threadCommentModel']['resolveComment'](_0x349c8c,_0x450566,_0x2c5751['id'],_0x1b2aca[_0x46af08(0x195)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x2c392c(_0x1eb02c)),p(0x1,_0x2c392c(_0x4f0ad4)),p(0x2,_0x2c392c(_0x2991de)),p(0x3,_0x2c392c(_0x114727))],S);const z=_0x4fa63f(0x150),M={};var k=Object[_0x4fa63f(0x171)],Q=(_0x2fbe82,_0x2a654d,_0x581523,_0x10c447)=>{const _0x13e588=_0x4fa63f;for(var _0x464ac1=_0x10c447>0x1?void 0x0:_0x10c447?k(_0x2a654d,_0x581523):_0x2a654d,_0x5a75b0=_0x2fbe82[_0x13e588(0x156)]-0x1,_0x45f7c8;_0x5a75b0>=0x0;_0x5a75b0--)(_0x45f7c8=_0x2fbe82[_0x5a75b0])&&(_0x464ac1=_0x45f7c8(_0x464ac1)||_0x464ac1);return _0x464ac1;},_=(_0x3ab12c,_0xaac9b5)=>(_0x10854b,_0x10ba0c)=>_0xaac9b5(_0x10854b,_0x10ba0c,_0x3ab12c);function X(_0x4d46ab,_0x596345){const _0x4f611f=_0x4fa63f,_0x373c2a=_0x4d46ab[_0x4f611f(0x14e)][0x0];return{..._0x596345,'id':_0x373c2a[_0x4f611f(0x159)],'resolved':_0x4d46ab[_0x4f611f(0x195)]===0x1,'dT':D(_0x373c2a[_0x4f611f(0x146)]),'personId':_0x373c2a[_0x4f611f(0x166)],'threadId':_0x373c2a[_0x4f611f(0x169)]};}function ee(_0x36e51a,_0x5eb9c7,_0xc72475){const _0x3c7b56=_0x4fa63f;var _0x4d6276,_0x371935;if(((_0x371935=(_0x4d6276=_0x36e51a==null?void 0x0:_0x36e51a['replies'])==null?void 0x0:_0x4d6276[_0x3c7b56(0x156)])!=null?_0x371935:0x0)>0x0){const _0x27a489=(_0x176eee,_0x3598b3)=>({'id':_0x176eee['replyId'],'threadId':_0x176eee[_0x3c7b56(0x169)],'dT':D(_0x176eee[_0x3c7b56(0x146)]),'personId':_0x176eee[_0x3c7b56(0x166)],'resolved':_0x36e51a[_0x3c7b56(0x195)]===I['Solved'],'unitId':_0x5eb9c7,'subUnitId':_0xc72475,'text':JSON['parse'](_0x176eee[_0x3c7b56(0x152)]),'parentId':_0x3598b3}),_0x2af274=_0x27a489(_0x36e51a['replies'][0x0]);return{..._0x2af274,'children':_0x36e51a[_0x3c7b56(0x14e)][_0x3c7b56(0x14d)](0x1)[_0x3c7b56(0x158)](_0x397d55=>_0x27a489(_0x397d55,_0x2af274['id']))};}return null;}let f=class{constructor(_0x3e18e7,_0x6c75b4,_0x507908,_0x3d50dd){const _0x270a70=_0x4fa63f;this['_httpService']=_0x3e18e7,this[_0x270a70(0x180)]=_0x6c75b4,this['_sessionService']=_0x507908,this['_injector']=_0x3d50dd;}async['addComment'](_0x14ea74){const _0xf87d96=_0x4fa63f;var _0x58d459,_0x176e79;const {parentId:_0x5589d3,unitId:_0x2d244d,text:_0xb90a6f,threadId:_0x1aaa86}=_0x14ea74,_0x5a36b4=(_0x176e79=(_0x58d459=_0xb90a6f['customRanges'])==null?void 0x0:_0x58d459['filter'](_0x3a1907=>_0x3a1907[_0xf87d96(0x187)]===_0x4d9a95[_0xf87d96(0x144)])[_0xf87d96(0x158)](_0x3fab85=>_0x3fab85[_0xf87d96(0x175)]))!=null?_0x176e79:[],_0x3dca7a=JSON[_0xf87d96(0x167)](_0xb90a6f),_0xc551cf=(await this['_sessionService']['requireSession'](_0x2d244d))[_0xf87d96(0x16e)]();if(_0x5589d3){const _0x2ca50e={'memberId':_0xc551cf,'unitId':_0x2d244d,'content':_0x3dca7a,'mention':_0x5a36b4,'threadId':_0x1aaa86},_0x4ecd05=(await this[_0xf87d96(0x13c)]['post'](_0xf87d96(0x182)+_0x2d244d+_0xf87d96(0x134),{'body':_0x2ca50e}))[_0xf87d96(0x179)][_0xf87d96(0x15a)];return{..._0x14ea74,'id':_0x4ecd05[_0xf87d96(0x159)],'dT':_0x480dc5(+_0x4ecd05[_0xf87d96(0x146)])['format'](_0xf87d96(0x145)),'personId':_0x4ecd05[_0xf87d96(0x166)]};}else{const _0x1573c0={'memberId':_0xc551cf,'unitId':_0x2d244d,'content':_0x3dca7a,'mention':_0x5a36b4},_0x1e0275=await this['_httpService'][_0xf87d96(0x13b)](_0xf87d96(0x182)+_0x2d244d+_0xf87d96(0x14b),{'body':_0x1573c0});return X(_0x1e0275[_0xf87d96(0x179)][_0xf87d96(0x184)],_0x14ea74);}}async[_0x4fa63f(0x17e)](_0x490e14){const _0x583578=_0x4fa63f;var _0x5557fd,_0x244b89;const {text:_0x445822,unitId:_0x40db82}=_0x490e14,_0x3b94e9=(_0x244b89=(_0x5557fd=_0x445822[_0x583578(0x149)])==null?void 0x0:_0x5557fd[_0x583578(0x16d)](_0x430240=>_0x430240[_0x583578(0x187)]===_0x4d9a95['COMMENT'])[_0x583578(0x158)](_0x47b2aa=>_0x47b2aa['rangeId']))!=null?_0x244b89:[],_0x5cbc2e=JSON[_0x583578(0x167)](_0x445822),_0x357d36=_0x490e14[_0x583578(0x169)],_0x47c093=_0x490e14['id'],_0x15ec24={'memberId':(await this[_0x583578(0x185)]['requireSession'](_0x40db82))[_0x583578(0x16e)](),'unitId':_0x40db82,'threadId':_0x357d36,'mention':_0x3b94e9,'content':_0x5cbc2e,'replyId':_0x47c093},_0x44f555=await this[_0x583578(0x13c)][_0x583578(0x13b)](_0x583578(0x182)+_0x40db82+'/edit',{'body':_0x15ec24});return!_0x44f555['body'][_0x583578(0x154)]||_0x44f555[_0x583578(0x179)][_0x583578(0x154)]['code']===0x1;}async[_0x4fa63f(0x153)](_0x124eea){const _0x160ce3=_0x4fa63f,{unitId:_0x3ccd6b}=_0x124eea,_0x310b4d=_0x124eea[_0x160ce3(0x169)],_0x4ec1cd={'memberId':this[_0x160ce3(0x180)]['getCurrentUser']()[_0x160ce3(0x191)],'unitId':_0x3ccd6b,'threadId':_0x310b4d,'solved':_0x124eea[_0x160ce3(0x18c)]?I[_0x160ce3(0x136)]:I[_0x160ce3(0x163)]},_0x4ea5e6=await this[_0x160ce3(0x13c)][_0x160ce3(0x13b)](_0x160ce3(0x182)+_0x3ccd6b+_0x160ce3(0x186),{'body':_0x4ec1cd});return!_0x4ea5e6['body']['error']||_0x4ea5e6[_0x160ce3(0x179)][_0x160ce3(0x154)][_0x160ce3(0x164)]===0x1;}async[_0x4fa63f(0x16a)](_0x260310,_0x171069,_0x4c9701,_0x544d7c){const _0x31555e=_0x4fa63f,_0x283497={'memberId':(await this['_sessionService'][_0x31555e(0x143)](_0x260310))[_0x31555e(0x16e)](),'threadId':_0x4c9701,'replyId':_0x544d7c,'unitId':_0x260310},_0x59c685=await this[_0x31555e(0x13c)][_0x31555e(0x13b)](_0x31555e(0x182)+_0x260310+'/delete',{'body':_0x283497});return!_0x59c685['body'][_0x31555e(0x154)]||_0x59c685['body']['error'][_0x31555e(0x164)]===0x1;}async[_0x4fa63f(0x194)](_0x3e6582,_0x2dab70,_0x27196a){const _0x3ebc04=_0x4fa63f,_0x4a5aca={'unitId':_0x3e6582,'threadId':_0x27196a},_0x585171=await this['_httpService'][_0x3ebc04(0x13b)](_0x3ebc04(0x182)+_0x3e6582+'/list',{'body':_0x4a5aca}),_0x5504f6=_0x27196a[_0x3ebc04(0x158)](_0x6c50e4=>ee(_0x585171[_0x3ebc04(0x179)][_0x3ebc04(0x173)][_0x6c50e4],_0x3e6582,_0x2dab70))[_0x3ebc04(0x16d)](Boolean);return Object['values'](_0x585171[_0x3ebc04(0x179)][_0x3ebc04(0x18e)])[_0x3ebc04(0x14c)](_0x30d0ff=>{const _0x4c7d64=_0x3ebc04;this['_userService'][_0x4c7d64(0x170)](_0x30d0ff);}),_0x5504f6;}['saveCommentToSnapshot'](_0x2c169c){const _0x587810=_0x4fa63f;return{'id':_0x2c169c['id'],'threadId':_0x2c169c[_0x587810(0x169)],'ref':_0x2c169c[_0x587810(0x17f)]};}};f=Q([_(0x0,_0x2c392c(_0x4577f2)),_(0x1,_0x2c392c(_0x2991de)),_(0x2,_0x2c392c(_0x16db22)),_(0x3,_0x2c392c(_0x114727))],f);var re=Object[_0x4fa63f(0x171)],te=(_0x1b99c2,_0x1a13e8,_0xecd51d,_0x1274a0)=>{const _0x1be127=_0x4fa63f;for(var _0x3b2eda=_0x1274a0>0x1?void 0x0:_0x1274a0?re(_0x1a13e8,_0xecd51d):_0x1a13e8,_0x3235ed=_0x1b99c2[_0x1be127(0x156)]-0x1,_0x3db552;_0x3235ed>=0x0;_0x3235ed--)(_0x3db552=_0x1b99c2[_0x3235ed])&&(_0x3b2eda=_0x3db552(_0x3b2eda)||_0x3b2eda);return _0x3b2eda;},N=(_0x5715bf,_0x3b3d80)=>(_0x2d8265,_0x54ace6)=>_0x3b3d80(_0x2d8265,_0x54ace6,_0x5715bf);function _0x2941(){const _0x39ca0c=['get','map','replyId','reply','_init','setConfig','size','parse','root','2837250iPetyY','parentId','_threadCommentModel','OpenOrReOpen','code','_config','userId','stringify','503742VCEueg','threadId','deleteComment','dataSource','1277600XwVAOF','filter','getMemberID','disposeWithMe','addUser','getOwnPropertyDescriptor','Add','comments','966412HwqXnU','rangeId','symbol','_configService','_threadCommentDataSourceService','body','Delete','getComment','Edit','getUser','updateComment','ref','_userService','_initUserSync','/universer-api/comment/unit/','_injector','comment','_sessionService','/solved','rangeType','onReady','Reply','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentDataSource','resolved','add','users','_initDataSource','UNRECOGNIZED','userID','_commentService','subscribe','listComments','solved','/reply','getUnit','Solved','commentUpdate$','unitId','3977890QZHMfo','delete','post','_httpService','6598MpSibx','pluginName','129MUxCDe','type','onStarting','20DcKLMW','requireSession','COMMENT','YYYY/MM/DD\x20HH:mm','createTimestamp','find','user','customRanges','176402sHRsRE','/add','forEach','slice','replies','Solve','thread-comment-data-source.config','UNIVER_UNKNOWN','content','resolveComment','error','Unknown','length'];_0x2941=function(){return _0x39ca0c;};return _0x2941();}let g=class extends _0x2a87b6{constructor(_0x37079f,_0xb2d9da){const _0x890789=_0x4fa63f;super(),this[_0x890789(0x178)]=_0x37079f,this[_0x890789(0x18b)]=_0xb2d9da,this[_0x890789(0x18f)]();}[_0x4fa63f(0x18f)](){const _0x6fc715=_0x4fa63f;this['_threadCommentDataSourceService'][_0x6fc715(0x16b)]=this[_0x6fc715(0x18b)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x3343f8),N(0x1,_0x2c392c(f))],g);var se=Object['defineProperty'],oe=Object[_0x4fa63f(0x171)],ne=(_0x4ae391,_0x213768,_0x355cb2)=>_0x213768 in _0x4ae391?se(_0x4ae391,_0x213768,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x355cb2}):_0x4ae391[_0x213768]=_0x355cb2,ie=(_0x2ec98f,_0x18cf9f,_0x46748e,_0x42cbe1)=>{const _0x1cb995=_0x4fa63f;for(var _0x115882=_0x42cbe1>0x1?void 0x0:_0x42cbe1?oe(_0x18cf9f,_0x46748e):_0x18cf9f,_0xa6acdf=_0x2ec98f[_0x1cb995(0x156)]-0x1,_0x1923bf;_0xa6acdf>=0x0;_0xa6acdf--)(_0x1923bf=_0x2ec98f[_0xa6acdf])&&(_0x115882=_0x1923bf(_0x115882)||_0x115882);return _0x115882;},w=(_0x320333,_0x3ab90b)=>(_0x32db0c,_0x18f4aa)=>_0x3ab90b(_0x32db0c,_0x18f4aa,_0x320333),$=(_0x42ae05,_0x2076ee,_0x4f500a)=>ne(_0x42ae05,typeof _0x2076ee!=_0x4fa63f(0x176)?_0x2076ee+'':_0x2076ee,_0x4f500a);let b=class extends _0xfe02e8{constructor(_0x29fc04=M,_0x32fa88,_0x404bd3){const _0xf420b7=_0x4fa63f;super(),this[_0xf420b7(0x165)]=_0x29fc04,this[_0xf420b7(0x183)]=_0x32fa88,this[_0xf420b7(0x177)]=_0x404bd3;const {..._0x40133f}=_0xd962df({},M,this['_config']);this[_0xf420b7(0x177)][_0xf420b7(0x15c)](z,_0x40133f);}[_0x4fa63f(0x141)](){const _0x12c2ca=_0x4fa63f;[[f],[g],[S]][_0x12c2ca(0x14c)](_0x25d63a=>{const _0x1436bb=_0x12c2ca;this['_injector'][_0x1436bb(0x18d)](_0x25d63a);});}[_0x4fa63f(0x188)](){const _0x1e694f=_0x4fa63f;this[_0x1e694f(0x183)][_0x1e694f(0x157)](g),this[_0x1e694f(0x183)]['get'](S);}};$(b,_0x4fa63f(0x13e),W),$(b,_0x4fa63f(0x140),_0x479d0c[_0x4fa63f(0x151)]),b=ie([_0x5b7360(_0xda4de0,_0x87c461,_0x1801ee),w(0x1,_0x2c392c(_0x114727)),w(0x2,_0x1cfb99)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x391085=_0x1132;(function(_0x380ac1,_0x106dff){const _0x2d1ff7=_0x1132,_0x47c228=_0x380ac1();while(!![]){try{const _0x4eac5f=parseInt(_0x2d1ff7(0x151))/0x1+-parseInt(_0x2d1ff7(0x10a))/0x2+parseInt(_0x2d1ff7(0x11f))/0x3+parseInt(_0x2d1ff7(0x147))/0x4+parseInt(_0x2d1ff7(0x102))/0x5+-parseInt(_0x2d1ff7(0x130))/0x6+parseInt(_0x2d1ff7(0x11d))/0x7*(-parseInt(_0x2d1ff7(0x12a))/0x8);if(_0x4eac5f===_0x106dff)break;else _0x47c228['push'](_0x47c228['shift']());}catch(_0x5af8da){_0x47c228['push'](_0x47c228['shift']());}}}(_0x5e17,0xc08a0));import{CommentService as _0x5f4e5e,CollaborationSessionService as _0x1fc687,UniverCollaborationClientPlugin as _0xf1e801}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x30c31e}from'@univerjs-pro/license';import{dayjs as _0x519154,UserManagerService as _0x42cfae,Inject as _0x139a48,Injector as _0x4598ff,Disposable as _0x40c267,CustomRangeType as _0x2c96ff,UniverInstanceType as _0x47b158,DependentOn as _0x3bde12,IConfigService as _0x5c9166,Plugin as _0x263ac2,merge as _0x1ea02d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x13dc44}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x38d485,IThreadCommentDataSourceService as _0x4c028a}from'@univerjs/thread-comment';import{bufferTime as _0x5a6ebf}from'rxjs';import{HTTPService as _0x43fbe3}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x51d6a9=>(_0x51d6a9[_0x51d6a9[_0x391085(0x121)]=0x0]=_0x391085(0x121),_0x51d6a9[_0x51d6a9[_0x391085(0x14b)]=0x1]=_0x391085(0x14b),_0x51d6a9[_0x51d6a9['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x51d6a9))(I||{}),v=(_0x126df6=>(_0x126df6[_0x126df6[_0x391085(0x12c)]=0x0]='Unknown',_0x126df6[_0x126df6[_0x391085(0x10c)]=0x1]=_0x391085(0x10c),_0x126df6[_0x126df6[_0x391085(0x155)]=0x2]='Reply',_0x126df6[_0x126df6[_0x391085(0x149)]=0x3]='Edit',_0x126df6[_0x126df6[_0x391085(0x129)]=0x4]=_0x391085(0x129),_0x126df6[_0x126df6[_0x391085(0x13b)]=0x5]='Solve',_0x126df6[_0x126df6[_0x391085(0x14e)]=-0x1]=_0x391085(0x14e),_0x126df6))(v||{});const D=_0x4fbdf3=>_0x519154(new Date(+_0x4fbdf3))[_0x391085(0x135)](_0x391085(0x120)),B=async(_0x124e0c,_0x2fd746)=>{const _0x4f57b0=_0x391085,_0x3d6887=_0x124e0c['get'](_0x42cfae),_0x411833=_0x124e0c[_0x4f57b0(0x10d)](_0x43fbe3);_0x2fd746[_0x4f57b0(0x14a)](_0x3dc7cf=>{const _0x280b86=_0x4f57b0;_0x3d6887[_0x280b86(0x164)](_0x3dc7cf)&&_0x2fd746['delete'](_0x3dc7cf);}),_0x2fd746['size']&&(await _0x411833[_0x4f57b0(0x10d)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2fd746]}}))[_0x4f57b0(0x15b)][_0x4f57b0(0x141)][_0x4f57b0(0x14a)](_0x2d970d=>{const _0x202d22=_0x4f57b0;_0x2d970d&&_0x3d6887[_0x202d22(0x165)](_0x2d970d);});};var K=Object[_0x391085(0x127)],V=(_0x2578ba,_0x14d0c1,_0x214cca,_0x432258)=>{const _0x14a4c3=_0x391085;for(var _0x2b1908=_0x432258>0x1?void 0x0:_0x432258?K(_0x14d0c1,_0x214cca):_0x14d0c1,_0x53c4ba=_0x2578ba[_0x14a4c3(0x124)]-0x1,_0xff6cff;_0x53c4ba>=0x0;_0x53c4ba--)(_0xff6cff=_0x2578ba[_0x53c4ba])&&(_0x2b1908=_0xff6cff(_0x2b1908)||_0x2b1908);return _0x2b1908;},p=(_0x4e7a7c,_0xa899e0)=>(_0xac0133,_0x527b70)=>_0xa899e0(_0xac0133,_0x527b70,_0x4e7a7c);let S=class extends _0x40c267{constructor(_0x44e463,_0x3dccea,_0x4fe521,_0x5295a5){const _0x2876a1=_0x391085;super(),this[_0x2876a1(0x150)]=_0x44e463,this[_0x2876a1(0x145)]=_0x3dccea,this['_userService']=_0x4fe521,this[_0x2876a1(0x128)]=_0x5295a5,this[_0x2876a1(0x146)](),this[_0x2876a1(0x142)]();}[_0x391085(0x142)](){const _0x1cd282=_0x391085;this['disposeWithMe'](this[_0x1cd282(0x145)]['commentUpdate$'][_0x1cd282(0x143)](_0x5a6ebf(0x10))[_0x1cd282(0x14c)](_0xc082f4=>{const _0xb6c36f=_0x1cd282,_0x455cd3=new Set();_0xc082f4[_0xb6c36f(0x14a)](_0x380c7f=>{const _0x122779=_0xb6c36f;switch(_0x380c7f[_0x122779(0x15f)]){case'add':{const _0x36b4dc=_0x380c7f[_0x122779(0x112)][_0x122779(0x153)];_0x455cd3['add'](_0x36b4dc);break;}}}),B(this['_injector'],_0x455cd3);}));}[_0x391085(0x146)](){const _0x4a359a=_0x391085;this[_0x4a359a(0x133)](this[_0x4a359a(0x150)][_0x4a359a(0x134)][_0x4a359a(0x14c)](async _0x3ceaf7=>{const _0x5453d7=_0x4a359a;var _0xdfba1a,_0x2ecca9,_0x5c7b23,_0x21a944;const _0x546c5=(_0xdfba1a=this['_threadCommentModel'][_0x5453d7(0x160)](_0x3ceaf7[_0x5453d7(0x117)])['find'](_0x2c7d7a=>_0x2c7d7a['threadId']===_0x3ceaf7[_0x5453d7(0x152)]))==null?void 0x0:_0xdfba1a['root'];if(!_0x546c5)return;const {unitId:_0xdefbb2,subUnitId:_0x65d083}=_0x546c5;switch(_0x3ceaf7['user']&&this[_0x5453d7(0x11b)][_0x5453d7(0x165)](_0x3ceaf7['user']),_0x3ceaf7[_0x5453d7(0x15f)]){case v['Add']:break;case v['Reply']:{this[_0x5453d7(0x145)][_0x5453d7(0x15a)](_0xdefbb2,_0x65d083,{'unitId':_0xdefbb2,'subUnitId':_0x65d083,'ref':'','id':_0x3ceaf7[_0x5453d7(0x11a)],'dT':D(+_0x3ceaf7['createTimestamp']),'threadId':_0x3ceaf7[_0x5453d7(0x152)],'personId':(_0x5c7b23=(_0x2ecca9=_0x3ceaf7[_0x5453d7(0x13f)])==null?void 0x0:_0x2ecca9[_0x5453d7(0x109)])!=null?_0x5c7b23:_0x3ceaf7[_0x5453d7(0x126)],'text':JSON[_0x5453d7(0x15d)](_0x3ceaf7[_0x5453d7(0x106)]),'parentId':_0x546c5['id']});break;}case v[_0x5453d7(0x129)]:{const _0xc1554a=this[_0x5453d7(0x145)][_0x5453d7(0x115)](_0xdefbb2,_0x65d083,_0x3ceaf7[_0x5453d7(0x11a)]);_0xc1554a&&_0xc1554a[_0x5453d7(0x15e)]&&this[_0x5453d7(0x145)][_0x5453d7(0x10e)](_0xdefbb2,_0x65d083,_0x3ceaf7[_0x5453d7(0x11a)]);break;}case v[_0x5453d7(0x149)]:{this[_0x5453d7(0x145)][_0x5453d7(0x12e)](_0xdefbb2,_0x65d083,{'commentId':_0x3ceaf7[_0x5453d7(0x11a)],'text':JSON[_0x5453d7(0x15d)](_0x3ceaf7[_0x5453d7(0x106)])});break;}case v[_0x5453d7(0x13b)]:{const _0xa9aef6=(_0x21a944=this[_0x5453d7(0x145)][_0x5453d7(0x160)](_0x3ceaf7[_0x5453d7(0x117)])[_0x5453d7(0x116)](_0x50f199=>_0x50f199['threadId']===_0x3ceaf7[_0x5453d7(0x152)]))==null?void 0x0:_0x21a944[_0x5453d7(0x148)];_0xa9aef6&&this[_0x5453d7(0x145)][_0x5453d7(0x138)](_0xdefbb2,_0x65d083,_0xa9aef6['id'],_0x3ceaf7[_0x5453d7(0x13d)]===I[_0x5453d7(0x14b)]);break;}}}));}};S=V([p(0x0,_0x139a48(_0x5f4e5e)),p(0x1,_0x139a48(_0x38d485)),p(0x2,_0x139a48(_0x42cfae)),p(0x3,_0x139a48(_0x4598ff))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x391085(0x127)],Q=(_0x47b180,_0x288def,_0x60361f,_0x10710c)=>{for(var _0x4b6d90=_0x10710c>0x1?void 0x0:_0x10710c?k(_0x288def,_0x60361f):_0x288def,_0x5904ca=_0x47b180['length']-0x1,_0x1eb111;_0x5904ca>=0x0;_0x5904ca--)(_0x1eb111=_0x47b180[_0x5904ca])&&(_0x4b6d90=_0x1eb111(_0x4b6d90)||_0x4b6d90);return _0x4b6d90;},_=(_0x5c1b24,_0x1ddd97)=>(_0x1c9ea4,_0x3a2b1a)=>_0x1ddd97(_0x1c9ea4,_0x3a2b1a,_0x5c1b24);function _0x5e17(){const _0x2df189=['5951956zJWiWU','root','Edit','forEach','Solved','subscribe','/edit','UNRECOGNIZED','dataSource','_commentService','1385566PRWrSc','threadId','personId','requireSession','Reply','_initDataSource','onReady','_sessionService','code','addComment','body','syncUpdateMutationToColla','parse','parentId','type','getUnit','_config','pluginName','_threadCommentDataSource','getUser','addUser','2713205riUNHe','comment','/add','saveCommentToSnapshot','content','_configService','filter','userID','2501216ELHxBl','/universer-api/comment/unit/','Add','get','deleteComment','createTimestamp','listComments','/list','payload','customRanges','post','getComment','find','unitId','replies','values','replyId','_userService','getCurrentUser','791uyCcHR','/reply','1422309CFhMih','YYYY/MM/DD\x20HH:mm','OpenOrReOpen','map','/delete','length','defineProperty','userId','getOwnPropertyDescriptor','_injector','Delete','126304CdafgE','symbol','Unknown','comments','updateComment','COMMENT','402042OZibRm','_threadCommentDataSourceService','error','disposeWithMe','commentUpdate$','format','getMemberID','_httpService','resolveComment','slice','/solved','Solve','rangeId','solved','reply','user','rangeType','users','_initUserSync','pipe','resolved','_threadCommentModel','_init'];_0x5e17=function(){return _0x2df189;};return _0x5e17();}function X(_0x76297c,_0x14565a){const _0x52fe49=_0x391085,_0x48f7a2=_0x76297c[_0x52fe49(0x118)][0x0];return{..._0x14565a,'id':_0x48f7a2['replyId'],'resolved':_0x76297c[_0x52fe49(0x13d)]===0x1,'dT':D(_0x48f7a2[_0x52fe49(0x10f)]),'personId':_0x48f7a2[_0x52fe49(0x126)],'threadId':_0x48f7a2[_0x52fe49(0x152)]};}function ee(_0x77d7d7,_0x4a0a85,_0x140a9e){const _0x245998=_0x391085;var _0x345f8d,_0x1477d1;if(((_0x1477d1=(_0x345f8d=_0x77d7d7==null?void 0x0:_0x77d7d7[_0x245998(0x118)])==null?void 0x0:_0x345f8d['length'])!=null?_0x1477d1:0x0)>0x0){const _0x34e14f=(_0x15c04b,_0x17f38a)=>({'id':_0x15c04b[_0x245998(0x11a)],'threadId':_0x15c04b[_0x245998(0x152)],'dT':D(_0x15c04b[_0x245998(0x10f)]),'personId':_0x15c04b[_0x245998(0x126)],'resolved':_0x77d7d7[_0x245998(0x13d)]===I['Solved'],'unitId':_0x4a0a85,'subUnitId':_0x140a9e,'text':JSON[_0x245998(0x15d)](_0x15c04b['content']),'parentId':_0x17f38a}),_0x521885=_0x34e14f(_0x77d7d7[_0x245998(0x118)][0x0]);return{..._0x521885,'children':_0x77d7d7[_0x245998(0x118)][_0x245998(0x139)](0x1)[_0x245998(0x122)](_0x1b30fe=>_0x34e14f(_0x1b30fe,_0x521885['id']))};}return null;}let f=class{constructor(_0x12ed92,_0x4a99b3,_0x4d031a,_0x36f528){const _0x1ff5ed=_0x391085;this[_0x1ff5ed(0x137)]=_0x12ed92,this[_0x1ff5ed(0x11b)]=_0x4a99b3,this[_0x1ff5ed(0x158)]=_0x4d031a,this[_0x1ff5ed(0x128)]=_0x36f528;}async[_0x391085(0x15a)](_0x27b8ba){const _0x2dc707=_0x391085;var _0x5d0b24,_0x2fc7eb;const {parentId:_0x45eecb,unitId:_0x55a4eb,text:_0x5c07c4,threadId:_0x4b36c1}=_0x27b8ba,_0x7192ab=(_0x2fc7eb=(_0x5d0b24=_0x5c07c4[_0x2dc707(0x113)])==null?void 0x0:_0x5d0b24[_0x2dc707(0x108)](_0xdddbe1=>_0xdddbe1[_0x2dc707(0x140)]===_0x2c96ff[_0x2dc707(0x12f)])[_0x2dc707(0x122)](_0x23d29d=>_0x23d29d['rangeId']))!=null?_0x2fc7eb:[],_0x509668=JSON['stringify'](_0x5c07c4),_0x1735ca=(await this['_sessionService'][_0x2dc707(0x154)](_0x55a4eb))[_0x2dc707(0x136)]();if(_0x45eecb){const _0x49be41={'memberId':_0x1735ca,'unitId':_0x55a4eb,'content':_0x509668,'mention':_0x7192ab,'threadId':_0x4b36c1},_0x314417=(await this['_httpService']['post'](_0x2dc707(0x10b)+_0x55a4eb+_0x2dc707(0x11e),{'body':_0x49be41}))[_0x2dc707(0x15b)][_0x2dc707(0x13e)];return{..._0x27b8ba,'id':_0x314417[_0x2dc707(0x11a)],'dT':_0x519154(+_0x314417[_0x2dc707(0x10f)])[_0x2dc707(0x135)](_0x2dc707(0x120)),'personId':_0x314417[_0x2dc707(0x126)]};}else{const _0x1b2866={'memberId':_0x1735ca,'unitId':_0x55a4eb,'content':_0x509668,'mention':_0x7192ab},_0x24389f=await this[_0x2dc707(0x137)][_0x2dc707(0x114)](_0x2dc707(0x10b)+_0x55a4eb+_0x2dc707(0x104),{'body':_0x1b2866});return X(_0x24389f[_0x2dc707(0x15b)][_0x2dc707(0x103)],_0x27b8ba);}}async['updateComment'](_0x810133){const _0x3f49ea=_0x391085;var _0x46e787,_0x3effb2;const {text:_0x3527ef,unitId:_0x5f16d8}=_0x810133,_0x3828a2=(_0x3effb2=(_0x46e787=_0x3527ef['customRanges'])==null?void 0x0:_0x46e787[_0x3f49ea(0x108)](_0x1206f1=>_0x1206f1[_0x3f49ea(0x140)]===_0x2c96ff[_0x3f49ea(0x12f)])[_0x3f49ea(0x122)](_0x472fc7=>_0x472fc7[_0x3f49ea(0x13c)]))!=null?_0x3effb2:[],_0x33881f=JSON['stringify'](_0x3527ef),_0x13b2a4=_0x810133[_0x3f49ea(0x152)],_0x3acbee=_0x810133['id'],_0x3d4621={'memberId':(await this[_0x3f49ea(0x158)][_0x3f49ea(0x154)](_0x5f16d8))[_0x3f49ea(0x136)](),'unitId':_0x5f16d8,'threadId':_0x13b2a4,'mention':_0x3828a2,'content':_0x33881f,'replyId':_0x3acbee},_0x5f5f7d=await this['_httpService']['post'](_0x3f49ea(0x10b)+_0x5f16d8+_0x3f49ea(0x14d),{'body':_0x3d4621});return!_0x5f5f7d[_0x3f49ea(0x15b)][_0x3f49ea(0x132)]||_0x5f5f7d[_0x3f49ea(0x15b)]['error'][_0x3f49ea(0x159)]===0x1;}async[_0x391085(0x138)](_0x143e3b){const _0x4e45b7=_0x391085,{unitId:_0x5d47cf}=_0x143e3b,_0x24e15f=_0x143e3b[_0x4e45b7(0x152)],_0x2012ba={'memberId':this['_userService'][_0x4e45b7(0x11c)]()['userID'],'unitId':_0x5d47cf,'threadId':_0x24e15f,'solved':_0x143e3b[_0x4e45b7(0x144)]?I['Solved']:I[_0x4e45b7(0x121)]},_0x58fc1d=await this[_0x4e45b7(0x137)][_0x4e45b7(0x114)]('/universer-api/comment/unit/'+_0x5d47cf+_0x4e45b7(0x13a),{'body':_0x2012ba});return!_0x58fc1d[_0x4e45b7(0x15b)][_0x4e45b7(0x132)]||_0x58fc1d['body'][_0x4e45b7(0x132)]['code']===0x1;}async[_0x391085(0x10e)](_0x25ac2a,_0x26978f,_0x4a42fa,_0x502032){const _0x2ed384=_0x391085,_0x429b5c={'memberId':(await this['_sessionService'][_0x2ed384(0x154)](_0x25ac2a))[_0x2ed384(0x136)](),'threadId':_0x4a42fa,'replyId':_0x502032,'unitId':_0x25ac2a},_0x5d838a=await this['_httpService']['post'](_0x2ed384(0x10b)+_0x25ac2a+_0x2ed384(0x123),{'body':_0x429b5c});return!_0x5d838a[_0x2ed384(0x15b)][_0x2ed384(0x132)]||_0x5d838a[_0x2ed384(0x15b)][_0x2ed384(0x132)][_0x2ed384(0x159)]===0x1;}async[_0x391085(0x110)](_0x255131,_0x597563,_0x3f0423){const _0x27cf02=_0x391085,_0x36a937={'unitId':_0x255131,'threadId':_0x3f0423},_0x4434c8=await this['_httpService'][_0x27cf02(0x114)]('/universer-api/comment/unit/'+_0x255131+_0x27cf02(0x111),{'body':_0x36a937}),_0x215a58=_0x3f0423[_0x27cf02(0x122)](_0x518a59=>ee(_0x4434c8[_0x27cf02(0x15b)][_0x27cf02(0x12d)][_0x518a59],_0x255131,_0x597563))[_0x27cf02(0x108)](Boolean);return Object[_0x27cf02(0x119)](_0x4434c8['body']['users'])[_0x27cf02(0x14a)](_0x195fa1=>{const _0x1dc902=_0x27cf02;this[_0x1dc902(0x11b)][_0x1dc902(0x165)](_0x195fa1);}),_0x215a58;}[_0x391085(0x105)](_0x671665){const _0x35398b=_0x391085;return{'id':_0x671665['id'],'threadId':_0x671665[_0x35398b(0x152)],'ref':_0x671665['ref']};}};f=Q([_(0x0,_0x139a48(_0x43fbe3)),_(0x1,_0x139a48(_0x42cfae)),_(0x2,_0x139a48(_0x1fc687)),_(0x3,_0x139a48(_0x4598ff))],f);var re=Object[_0x391085(0x127)],te=(_0x5da441,_0x4647ee,_0x458a62,_0x120f0e)=>{for(var _0xcf99d1=_0x120f0e>0x1?void 0x0:_0x120f0e?re(_0x4647ee,_0x458a62):_0x4647ee,_0x4cd40d=_0x5da441['length']-0x1,_0x2e0969;_0x4cd40d>=0x0;_0x4cd40d--)(_0x2e0969=_0x5da441[_0x4cd40d])&&(_0xcf99d1=_0x2e0969(_0xcf99d1)||_0xcf99d1);return _0xcf99d1;},N=(_0x588920,_0x39ecd3)=>(_0x212088,_0x43b4af)=>_0x39ecd3(_0x212088,_0x43b4af,_0x588920);let g=class extends _0x40c267{constructor(_0x164d0c,_0x2b1b97){const _0x5b70ef=_0x391085;super(),this[_0x5b70ef(0x131)]=_0x164d0c,this['_threadCommentDataSource']=_0x2b1b97,this[_0x5b70ef(0x156)]();}[_0x391085(0x156)](){const _0x400af2=_0x391085;this[_0x400af2(0x131)][_0x400af2(0x14f)]=this[_0x400af2(0x163)],this[_0x400af2(0x131)][_0x400af2(0x15c)]=!0x1;}};function _0x1132(_0xda36e0,_0x203d27){const _0x5e17eb=_0x5e17();return _0x1132=function(_0x1132af,_0x266979){_0x1132af=_0x1132af-0x102;let _0x25d195=_0x5e17eb[_0x1132af];return _0x25d195;},_0x1132(_0xda36e0,_0x203d27);}g=te([N(0x0,_0x4c028a),N(0x1,_0x139a48(f))],g);var se=Object[_0x391085(0x125)],oe=Object[_0x391085(0x127)],ne=(_0x10d1e9,_0x190595,_0x14519b)=>_0x190595 in _0x10d1e9?se(_0x10d1e9,_0x190595,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x14519b}):_0x10d1e9[_0x190595]=_0x14519b,ie=(_0x1a1ac1,_0x3c1205,_0x524017,_0xa8403c)=>{const _0x5c30f2=_0x391085;for(var _0x3070a8=_0xa8403c>0x1?void 0x0:_0xa8403c?oe(_0x3c1205,_0x524017):_0x3c1205,_0x4f5237=_0x1a1ac1[_0x5c30f2(0x124)]-0x1,_0x1d606b;_0x4f5237>=0x0;_0x4f5237--)(_0x1d606b=_0x1a1ac1[_0x4f5237])&&(_0x3070a8=_0x1d606b(_0x3070a8)||_0x3070a8);return _0x3070a8;},w=(_0x565486,_0x18c333)=>(_0x4f1b58,_0xfc6b0e)=>_0x18c333(_0x4f1b58,_0xfc6b0e,_0x565486),$=(_0x474861,_0x19e606,_0x32eb85)=>ne(_0x474861,typeof _0x19e606!=_0x391085(0x12b)?_0x19e606+'':_0x19e606,_0x32eb85);let b=class extends _0x263ac2{constructor(_0x119a29=M,_0x281d79,_0x5b4a7c){const _0xbf4cae=_0x391085;super(),this['_config']=_0x119a29,this['_injector']=_0x281d79,this[_0xbf4cae(0x107)]=_0x5b4a7c;const {..._0x128263}=_0x1ea02d({},M,this[_0xbf4cae(0x161)]);this['_configService']['setConfig'](z,_0x128263);}['onStarting'](){const _0x230462=_0x391085;[[f],[g],[S]][_0x230462(0x14a)](_0x179e6a=>{const _0x246cb1=_0x230462;this[_0x246cb1(0x128)]['add'](_0x179e6a);});}[_0x391085(0x157)](){const _0x270aaf=_0x391085;this['_injector'][_0x270aaf(0x10d)](g),this['_injector'][_0x270aaf(0x10d)](S);}};$(b,_0x391085(0x162),W),$(b,_0x391085(0x15f),_0x47b158['UNIVER_UNKNOWN']),b=ie([_0x3bde12(_0x13dc44,_0xf1e801,_0x30c31e),w(0x1,_0x139a48(_0x4598ff)),w(0x2,_0x5c9166)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x4fa63f=_0x44bb;(function(_0x396371,_0x3f884e){const _0x4962c4=_0x44bb,_0x18bb2d=_0x396371();while(!![]){try{const _0x5e8278=parseInt(_0x4962c4(0x14a))/0x1+parseInt(_0x4962c4(0x13d))/0x2*(parseInt(_0x4962c4(0x13f))/0x3)+-parseInt(_0x4962c4(0x174))/0x4+-parseInt(_0x4962c4(0x142))/0x5*(-parseInt(_0x4962c4(0x168))/0x6)+-parseInt(_0x4962c4(0x139))/0x7+parseInt(_0x4962c4(0x16c))/0x8+parseInt(_0x4962c4(0x160))/0x9;if(_0x5e8278===_0x3f884e)break;else _0x18bb2d['push'](_0x18bb2d['shift']());}catch(_0xf8a481){_0x18bb2d['push'](_0x18bb2d['shift']());}}}(_0x2941,0x4debc));import{CommentService as _0x1eb02c,CollaborationSessionService as _0x16db22,UniverCollaborationClientPlugin as _0x87c461}from'@univerjs-pro/collaboration-client';function _0x44bb(_0x52d54d,_0x36b918){const _0x294197=_0x2941();return _0x44bb=function(_0x44bb62,_0x370668){_0x44bb62=_0x44bb62-0x134;let _0x3b8ce0=_0x294197[_0x44bb62];return _0x3b8ce0;},_0x44bb(_0x52d54d,_0x36b918);}import{UniverLicensePlugin as _0x1801ee}from'@univerjs-pro/license';import{dayjs as _0x480dc5,UserManagerService as _0x2991de,Inject as _0x2c392c,Injector as _0x114727,Disposable as _0x2a87b6,CustomRangeType as _0x4d9a95,UniverInstanceType as _0x479d0c,DependentOn as _0x5b7360,IConfigService as _0x1cfb99,Plugin as _0xfe02e8,merge as _0xd962df}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xda4de0}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4f0ad4,IThreadCommentDataSourceService as _0x3343f8}from'@univerjs/thread-comment';import{bufferTime as _0x1a377e}from'rxjs';import{HTTPService as _0x4577f2}from'@univerjs/network';const W=_0x4fa63f(0x18a);var I=(_0x310ffe=>(_0x310ffe[_0x310ffe[_0x4fa63f(0x163)]=0x0]=_0x4fa63f(0x163),_0x310ffe[_0x310ffe[_0x4fa63f(0x136)]=0x1]='Solved',_0x310ffe[_0x310ffe['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x310ffe))(I||{}),v=(_0x20e07b=>(_0x20e07b[_0x20e07b[_0x4fa63f(0x155)]=0x0]=_0x4fa63f(0x155),_0x20e07b[_0x20e07b[_0x4fa63f(0x172)]=0x1]=_0x4fa63f(0x172),_0x20e07b[_0x20e07b[_0x4fa63f(0x189)]=0x2]=_0x4fa63f(0x189),_0x20e07b[_0x20e07b['Edit']=0x3]=_0x4fa63f(0x17c),_0x20e07b[_0x20e07b[_0x4fa63f(0x17a)]=0x4]=_0x4fa63f(0x17a),_0x20e07b[_0x20e07b[_0x4fa63f(0x14f)]=0x5]=_0x4fa63f(0x14f),_0x20e07b[_0x20e07b[_0x4fa63f(0x190)]=-0x1]='UNRECOGNIZED',_0x20e07b))(v||{});const D=_0x260e43=>_0x480dc5(new Date(+_0x260e43))['format'](_0x4fa63f(0x145)),B=async(_0x19f126,_0xf060a)=>{const _0x29313b=_0x4fa63f,_0x3b1a02=_0x19f126[_0x29313b(0x157)](_0x2991de),_0x301327=_0x19f126['get'](_0x4577f2);_0xf060a[_0x29313b(0x14c)](_0x4d8b3f=>{const _0x4d736b=_0x29313b;_0x3b1a02[_0x4d736b(0x17d)](_0x4d8b3f)&&_0xf060a[_0x4d736b(0x13a)](_0x4d8b3f);}),_0xf060a[_0x29313b(0x15d)]&&(await _0x301327[_0x29313b(0x157)]('/universer-api/user/list',{'params':{'userIDs':[..._0xf060a]}}))[_0x29313b(0x179)][_0x29313b(0x18e)][_0x29313b(0x14c)](_0x12a01d=>{const _0x47de77=_0x29313b;_0x12a01d&&_0x3b1a02[_0x47de77(0x170)](_0x12a01d);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x279274,_0x156357,_0x334ddf,_0x579463)=>{for(var _0x2df564=_0x579463>0x1?void 0x0:_0x579463?K(_0x156357,_0x334ddf):_0x156357,_0x168ace=_0x279274['length']-0x1,_0x537a09;_0x168ace>=0x0;_0x168ace--)(_0x537a09=_0x279274[_0x168ace])&&(_0x2df564=_0x537a09(_0x2df564)||_0x2df564);return _0x2df564;},p=(_0x2d88d4,_0x4dbf1c)=>(_0x49e07d,_0x49d999)=>_0x4dbf1c(_0x49e07d,_0x49d999,_0x2d88d4);let S=class extends _0x2a87b6{constructor(_0x4824e3,_0x56a606,_0x36bf50,_0xb9200){const _0x264ca9=_0x4fa63f;super(),this[_0x264ca9(0x192)]=_0x4824e3,this[_0x264ca9(0x162)]=_0x56a606,this[_0x264ca9(0x180)]=_0x36bf50,this[_0x264ca9(0x183)]=_0xb9200,this['_init'](),this[_0x264ca9(0x181)]();}[_0x4fa63f(0x181)](){const _0x3a6c16=_0x4fa63f;this[_0x3a6c16(0x16f)](this[_0x3a6c16(0x162)][_0x3a6c16(0x137)]['pipe'](_0x1a377e(0x10))[_0x3a6c16(0x193)](_0x20401f=>{const _0x578f61=_0x3a6c16,_0x24c8f0=new Set();_0x20401f[_0x578f61(0x14c)](_0x58b8c3=>{const _0x3926ff=_0x578f61;switch(_0x58b8c3[_0x3926ff(0x140)]){case _0x3926ff(0x18d):{const _0x2a090c=_0x58b8c3['payload']['personId'];_0x24c8f0[_0x3926ff(0x18d)](_0x2a090c);break;}}}),B(this[_0x578f61(0x183)],_0x24c8f0);}));}[_0x4fa63f(0x15b)](){const _0xe3f4eb=_0x4fa63f;this['disposeWithMe'](this['_commentService'][_0xe3f4eb(0x137)][_0xe3f4eb(0x193)](async _0x1b2aca=>{const _0x46af08=_0xe3f4eb;var _0x10d1d0,_0x2f6e9e,_0x111f51,_0x426e2a;const _0x58fd44=(_0x10d1d0=this[_0x46af08(0x162)][_0x46af08(0x135)](_0x1b2aca[_0x46af08(0x138)])[_0x46af08(0x147)](_0x1eea29=>_0x1eea29[_0x46af08(0x169)]===_0x1b2aca['threadId']))==null?void 0x0:_0x10d1d0[_0x46af08(0x15f)];if(!_0x58fd44)return;const {unitId:_0x349c8c,subUnitId:_0x450566}=_0x58fd44;switch(_0x1b2aca['user']&&this['_userService']['addUser'](_0x1b2aca[_0x46af08(0x148)]),_0x1b2aca[_0x46af08(0x140)]){case v['Add']:break;case v['Reply']:{this[_0x46af08(0x162)]['addComment'](_0x349c8c,_0x450566,{'unitId':_0x349c8c,'subUnitId':_0x450566,'ref':'','id':_0x1b2aca[_0x46af08(0x159)],'dT':D(+_0x1b2aca['createTimestamp']),'threadId':_0x1b2aca['threadId'],'personId':(_0x111f51=(_0x2f6e9e=_0x1b2aca[_0x46af08(0x148)])==null?void 0x0:_0x2f6e9e['userID'])!=null?_0x111f51:_0x1b2aca[_0x46af08(0x166)],'text':JSON[_0x46af08(0x15e)](_0x1b2aca[_0x46af08(0x152)]),'parentId':_0x58fd44['id']});break;}case v['Delete']:{const _0x31e814=this[_0x46af08(0x162)][_0x46af08(0x17b)](_0x349c8c,_0x450566,_0x1b2aca[_0x46af08(0x159)]);_0x31e814&&_0x31e814[_0x46af08(0x161)]&&this[_0x46af08(0x162)][_0x46af08(0x16a)](_0x349c8c,_0x450566,_0x1b2aca[_0x46af08(0x159)]);break;}case v['Edit']:{this[_0x46af08(0x162)]['updateComment'](_0x349c8c,_0x450566,{'commentId':_0x1b2aca[_0x46af08(0x159)],'text':JSON['parse'](_0x1b2aca[_0x46af08(0x152)])});break;}case v[_0x46af08(0x14f)]:{const _0x2c5751=(_0x426e2a=this[_0x46af08(0x162)][_0x46af08(0x135)](_0x1b2aca[_0x46af08(0x138)])[_0x46af08(0x147)](_0x35884b=>_0x35884b[_0x46af08(0x169)]===_0x1b2aca[_0x46af08(0x169)]))==null?void 0x0:_0x426e2a[_0x46af08(0x15f)];_0x2c5751&&this['_threadCommentModel']['resolveComment'](_0x349c8c,_0x450566,_0x2c5751['id'],_0x1b2aca[_0x46af08(0x195)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x2c392c(_0x1eb02c)),p(0x1,_0x2c392c(_0x4f0ad4)),p(0x2,_0x2c392c(_0x2991de)),p(0x3,_0x2c392c(_0x114727))],S);const z=_0x4fa63f(0x150),M={};var k=Object[_0x4fa63f(0x171)],Q=(_0x2fbe82,_0x2a654d,_0x581523,_0x10c447)=>{const _0x13e588=_0x4fa63f;for(var _0x464ac1=_0x10c447>0x1?void 0x0:_0x10c447?k(_0x2a654d,_0x581523):_0x2a654d,_0x5a75b0=_0x2fbe82[_0x13e588(0x156)]-0x1,_0x45f7c8;_0x5a75b0>=0x0;_0x5a75b0--)(_0x45f7c8=_0x2fbe82[_0x5a75b0])&&(_0x464ac1=_0x45f7c8(_0x464ac1)||_0x464ac1);return _0x464ac1;},_=(_0x3ab12c,_0xaac9b5)=>(_0x10854b,_0x10ba0c)=>_0xaac9b5(_0x10854b,_0x10ba0c,_0x3ab12c);function X(_0x4d46ab,_0x596345){const _0x4f611f=_0x4fa63f,_0x373c2a=_0x4d46ab[_0x4f611f(0x14e)][0x0];return{..._0x596345,'id':_0x373c2a[_0x4f611f(0x159)],'resolved':_0x4d46ab[_0x4f611f(0x195)]===0x1,'dT':D(_0x373c2a[_0x4f611f(0x146)]),'personId':_0x373c2a[_0x4f611f(0x166)],'threadId':_0x373c2a[_0x4f611f(0x169)]};}function ee(_0x36e51a,_0x5eb9c7,_0xc72475){const _0x3c7b56=_0x4fa63f;var _0x4d6276,_0x371935;if(((_0x371935=(_0x4d6276=_0x36e51a==null?void 0x0:_0x36e51a['replies'])==null?void 0x0:_0x4d6276[_0x3c7b56(0x156)])!=null?_0x371935:0x0)>0x0){const _0x27a489=(_0x176eee,_0x3598b3)=>({'id':_0x176eee['replyId'],'threadId':_0x176eee[_0x3c7b56(0x169)],'dT':D(_0x176eee[_0x3c7b56(0x146)]),'personId':_0x176eee[_0x3c7b56(0x166)],'resolved':_0x36e51a[_0x3c7b56(0x195)]===I['Solved'],'unitId':_0x5eb9c7,'subUnitId':_0xc72475,'text':JSON['parse'](_0x176eee[_0x3c7b56(0x152)]),'parentId':_0x3598b3}),_0x2af274=_0x27a489(_0x36e51a['replies'][0x0]);return{..._0x2af274,'children':_0x36e51a[_0x3c7b56(0x14e)][_0x3c7b56(0x14d)](0x1)[_0x3c7b56(0x158)](_0x397d55=>_0x27a489(_0x397d55,_0x2af274['id']))};}return null;}let f=class{constructor(_0x3e18e7,_0x6c75b4,_0x507908,_0x3d50dd){const _0x270a70=_0x4fa63f;this['_httpService']=_0x3e18e7,this[_0x270a70(0x180)]=_0x6c75b4,this['_sessionService']=_0x507908,this['_injector']=_0x3d50dd;}async['addComment'](_0x14ea74){const _0xf87d96=_0x4fa63f;var _0x58d459,_0x176e79;const {parentId:_0x5589d3,unitId:_0x2d244d,text:_0xb90a6f,threadId:_0x1aaa86}=_0x14ea74,_0x5a36b4=(_0x176e79=(_0x58d459=_0xb90a6f['customRanges'])==null?void 0x0:_0x58d459['filter'](_0x3a1907=>_0x3a1907[_0xf87d96(0x187)]===_0x4d9a95[_0xf87d96(0x144)])[_0xf87d96(0x158)](_0x3fab85=>_0x3fab85[_0xf87d96(0x175)]))!=null?_0x176e79:[],_0x3dca7a=JSON[_0xf87d96(0x167)](_0xb90a6f),_0xc551cf=(await this['_sessionService']['requireSession'](_0x2d244d))[_0xf87d96(0x16e)]();if(_0x5589d3){const _0x2ca50e={'memberId':_0xc551cf,'unitId':_0x2d244d,'content':_0x3dca7a,'mention':_0x5a36b4,'threadId':_0x1aaa86},_0x4ecd05=(await this[_0xf87d96(0x13c)]['post'](_0xf87d96(0x182)+_0x2d244d+_0xf87d96(0x134),{'body':_0x2ca50e}))[_0xf87d96(0x179)][_0xf87d96(0x15a)];return{..._0x14ea74,'id':_0x4ecd05[_0xf87d96(0x159)],'dT':_0x480dc5(+_0x4ecd05[_0xf87d96(0x146)])['format'](_0xf87d96(0x145)),'personId':_0x4ecd05[_0xf87d96(0x166)]};}else{const _0x1573c0={'memberId':_0xc551cf,'unitId':_0x2d244d,'content':_0x3dca7a,'mention':_0x5a36b4},_0x1e0275=await this['_httpService'][_0xf87d96(0x13b)](_0xf87d96(0x182)+_0x2d244d+_0xf87d96(0x14b),{'body':_0x1573c0});return X(_0x1e0275[_0xf87d96(0x179)][_0xf87d96(0x184)],_0x14ea74);}}async[_0x4fa63f(0x17e)](_0x490e14){const _0x583578=_0x4fa63f;var _0x5557fd,_0x244b89;const {text:_0x445822,unitId:_0x40db82}=_0x490e14,_0x3b94e9=(_0x244b89=(_0x5557fd=_0x445822[_0x583578(0x149)])==null?void 0x0:_0x5557fd[_0x583578(0x16d)](_0x430240=>_0x430240[_0x583578(0x187)]===_0x4d9a95['COMMENT'])[_0x583578(0x158)](_0x47b2aa=>_0x47b2aa['rangeId']))!=null?_0x244b89:[],_0x5cbc2e=JSON[_0x583578(0x167)](_0x445822),_0x357d36=_0x490e14[_0x583578(0x169)],_0x47c093=_0x490e14['id'],_0x15ec24={'memberId':(await this[_0x583578(0x185)]['requireSession'](_0x40db82))[_0x583578(0x16e)](),'unitId':_0x40db82,'threadId':_0x357d36,'mention':_0x3b94e9,'content':_0x5cbc2e,'replyId':_0x47c093},_0x44f555=await this[_0x583578(0x13c)][_0x583578(0x13b)](_0x583578(0x182)+_0x40db82+'/edit',{'body':_0x15ec24});return!_0x44f555['body'][_0x583578(0x154)]||_0x44f555[_0x583578(0x179)][_0x583578(0x154)]['code']===0x1;}async[_0x4fa63f(0x153)](_0x124eea){const _0x160ce3=_0x4fa63f,{unitId:_0x3ccd6b}=_0x124eea,_0x310b4d=_0x124eea[_0x160ce3(0x169)],_0x4ec1cd={'memberId':this[_0x160ce3(0x180)]['getCurrentUser']()[_0x160ce3(0x191)],'unitId':_0x3ccd6b,'threadId':_0x310b4d,'solved':_0x124eea[_0x160ce3(0x18c)]?I[_0x160ce3(0x136)]:I[_0x160ce3(0x163)]},_0x4ea5e6=await this[_0x160ce3(0x13c)][_0x160ce3(0x13b)](_0x160ce3(0x182)+_0x3ccd6b+_0x160ce3(0x186),{'body':_0x4ec1cd});return!_0x4ea5e6['body']['error']||_0x4ea5e6[_0x160ce3(0x179)][_0x160ce3(0x154)][_0x160ce3(0x164)]===0x1;}async[_0x4fa63f(0x16a)](_0x260310,_0x171069,_0x4c9701,_0x544d7c){const _0x31555e=_0x4fa63f,_0x283497={'memberId':(await this['_sessionService'][_0x31555e(0x143)](_0x260310))[_0x31555e(0x16e)](),'threadId':_0x4c9701,'replyId':_0x544d7c,'unitId':_0x260310},_0x59c685=await this[_0x31555e(0x13c)][_0x31555e(0x13b)](_0x31555e(0x182)+_0x260310+'/delete',{'body':_0x283497});return!_0x59c685['body'][_0x31555e(0x154)]||_0x59c685['body']['error'][_0x31555e(0x164)]===0x1;}async[_0x4fa63f(0x194)](_0x3e6582,_0x2dab70,_0x27196a){const _0x3ebc04=_0x4fa63f,_0x4a5aca={'unitId':_0x3e6582,'threadId':_0x27196a},_0x585171=await this['_httpService'][_0x3ebc04(0x13b)](_0x3ebc04(0x182)+_0x3e6582+'/list',{'body':_0x4a5aca}),_0x5504f6=_0x27196a[_0x3ebc04(0x158)](_0x6c50e4=>ee(_0x585171[_0x3ebc04(0x179)][_0x3ebc04(0x173)][_0x6c50e4],_0x3e6582,_0x2dab70))[_0x3ebc04(0x16d)](Boolean);return Object['values'](_0x585171[_0x3ebc04(0x179)][_0x3ebc04(0x18e)])[_0x3ebc04(0x14c)](_0x30d0ff=>{const _0x4c7d64=_0x3ebc04;this['_userService'][_0x4c7d64(0x170)](_0x30d0ff);}),_0x5504f6;}['saveCommentToSnapshot'](_0x2c169c){const _0x587810=_0x4fa63f;return{'id':_0x2c169c['id'],'threadId':_0x2c169c[_0x587810(0x169)],'ref':_0x2c169c[_0x587810(0x17f)]};}};f=Q([_(0x0,_0x2c392c(_0x4577f2)),_(0x1,_0x2c392c(_0x2991de)),_(0x2,_0x2c392c(_0x16db22)),_(0x3,_0x2c392c(_0x114727))],f);var re=Object[_0x4fa63f(0x171)],te=(_0x1b99c2,_0x1a13e8,_0xecd51d,_0x1274a0)=>{const _0x1be127=_0x4fa63f;for(var _0x3b2eda=_0x1274a0>0x1?void 0x0:_0x1274a0?re(_0x1a13e8,_0xecd51d):_0x1a13e8,_0x3235ed=_0x1b99c2[_0x1be127(0x156)]-0x1,_0x3db552;_0x3235ed>=0x0;_0x3235ed--)(_0x3db552=_0x1b99c2[_0x3235ed])&&(_0x3b2eda=_0x3db552(_0x3b2eda)||_0x3b2eda);return _0x3b2eda;},N=(_0x5715bf,_0x3b3d80)=>(_0x2d8265,_0x54ace6)=>_0x3b3d80(_0x2d8265,_0x54ace6,_0x5715bf);function _0x2941(){const _0x39ca0c=['get','map','replyId','reply','_init','setConfig','size','parse','root','2837250iPetyY','parentId','_threadCommentModel','OpenOrReOpen','code','_config','userId','stringify','503742VCEueg','threadId','deleteComment','dataSource','1277600XwVAOF','filter','getMemberID','disposeWithMe','addUser','getOwnPropertyDescriptor','Add','comments','966412HwqXnU','rangeId','symbol','_configService','_threadCommentDataSourceService','body','Delete','getComment','Edit','getUser','updateComment','ref','_userService','_initUserSync','/universer-api/comment/unit/','_injector','comment','_sessionService','/solved','rangeType','onReady','Reply','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentDataSource','resolved','add','users','_initDataSource','UNRECOGNIZED','userID','_commentService','subscribe','listComments','solved','/reply','getUnit','Solved','commentUpdate$','unitId','3977890QZHMfo','delete','post','_httpService','6598MpSibx','pluginName','129MUxCDe','type','onStarting','20DcKLMW','requireSession','COMMENT','YYYY/MM/DD\x20HH:mm','createTimestamp','find','user','customRanges','176402sHRsRE','/add','forEach','slice','replies','Solve','thread-comment-data-source.config','UNIVER_UNKNOWN','content','resolveComment','error','Unknown','length'];_0x2941=function(){return _0x39ca0c;};return _0x2941();}let g=class extends _0x2a87b6{constructor(_0x37079f,_0xb2d9da){const _0x890789=_0x4fa63f;super(),this[_0x890789(0x178)]=_0x37079f,this[_0x890789(0x18b)]=_0xb2d9da,this[_0x890789(0x18f)]();}[_0x4fa63f(0x18f)](){const _0x6fc715=_0x4fa63f;this['_threadCommentDataSourceService'][_0x6fc715(0x16b)]=this[_0x6fc715(0x18b)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x3343f8),N(0x1,_0x2c392c(f))],g);var se=Object['defineProperty'],oe=Object[_0x4fa63f(0x171)],ne=(_0x4ae391,_0x213768,_0x355cb2)=>_0x213768 in _0x4ae391?se(_0x4ae391,_0x213768,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x355cb2}):_0x4ae391[_0x213768]=_0x355cb2,ie=(_0x2ec98f,_0x18cf9f,_0x46748e,_0x42cbe1)=>{const _0x1cb995=_0x4fa63f;for(var _0x115882=_0x42cbe1>0x1?void 0x0:_0x42cbe1?oe(_0x18cf9f,_0x46748e):_0x18cf9f,_0xa6acdf=_0x2ec98f[_0x1cb995(0x156)]-0x1,_0x1923bf;_0xa6acdf>=0x0;_0xa6acdf--)(_0x1923bf=_0x2ec98f[_0xa6acdf])&&(_0x115882=_0x1923bf(_0x115882)||_0x115882);return _0x115882;},w=(_0x320333,_0x3ab90b)=>(_0x32db0c,_0x18f4aa)=>_0x3ab90b(_0x32db0c,_0x18f4aa,_0x320333),$=(_0x42ae05,_0x2076ee,_0x4f500a)=>ne(_0x42ae05,typeof _0x2076ee!=_0x4fa63f(0x176)?_0x2076ee+'':_0x2076ee,_0x4f500a);let b=class extends _0xfe02e8{constructor(_0x29fc04=M,_0x32fa88,_0x404bd3){const _0xf420b7=_0x4fa63f;super(),this[_0xf420b7(0x165)]=_0x29fc04,this[_0xf420b7(0x183)]=_0x32fa88,this[_0xf420b7(0x177)]=_0x404bd3;const {..._0x40133f}=_0xd962df({},M,this['_config']);this[_0xf420b7(0x177)][_0xf420b7(0x15c)](z,_0x40133f);}[_0x4fa63f(0x141)](){const _0x12c2ca=_0x4fa63f;[[f],[g],[S]][_0x12c2ca(0x14c)](_0x25d63a=>{const _0x1436bb=_0x12c2ca;this['_injector'][_0x1436bb(0x18d)](_0x25d63a);});}[_0x4fa63f(0x188)](){const _0x1e694f=_0x4fa63f;this[_0x1e694f(0x183)][_0x1e694f(0x157)](g),this[_0x1e694f(0x183)]['get'](S);}};$(b,_0x4fa63f(0x13e),W),$(b,_0x4fa63f(0x140),_0x479d0c[_0x4fa63f(0x151)]),b=ie([_0x5b7360(_0xda4de0,_0x87c461,_0x1801ee),w(0x1,_0x2c392c(_0x114727)),w(0x2,_0x1cfb99)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x391085=_0x1132;(function(_0x380ac1,_0x106dff){const _0x2d1ff7=_0x1132,_0x47c228=_0x380ac1();while(!![]){try{const _0x4eac5f=parseInt(_0x2d1ff7(0x151))/0x1+-parseInt(_0x2d1ff7(0x10a))/0x2+parseInt(_0x2d1ff7(0x11f))/0x3+parseInt(_0x2d1ff7(0x147))/0x4+parseInt(_0x2d1ff7(0x102))/0x5+-parseInt(_0x2d1ff7(0x130))/0x6+parseInt(_0x2d1ff7(0x11d))/0x7*(-parseInt(_0x2d1ff7(0x12a))/0x8);if(_0x4eac5f===_0x106dff)break;else _0x47c228['push'](_0x47c228['shift']());}catch(_0x5af8da){_0x47c228['push'](_0x47c228['shift']());}}}(_0x5e17,0xc08a0));import{CommentService as _0x5f4e5e,CollaborationSessionService as _0x1fc687,UniverCollaborationClientPlugin as _0xf1e801}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x30c31e}from'@univerjs-pro/license';import{dayjs as _0x519154,UserManagerService as _0x42cfae,Inject as _0x139a48,Injector as _0x4598ff,Disposable as _0x40c267,CustomRangeType as _0x2c96ff,UniverInstanceType as _0x47b158,DependentOn as _0x3bde12,IConfigService as _0x5c9166,Plugin as _0x263ac2,merge as _0x1ea02d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x13dc44}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x38d485,IThreadCommentDataSourceService as _0x4c028a}from'@univerjs/thread-comment';import{bufferTime as _0x5a6ebf}from'rxjs';import{HTTPService as _0x43fbe3}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x51d6a9=>(_0x51d6a9[_0x51d6a9[_0x391085(0x121)]=0x0]=_0x391085(0x121),_0x51d6a9[_0x51d6a9[_0x391085(0x14b)]=0x1]=_0x391085(0x14b),_0x51d6a9[_0x51d6a9['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x51d6a9))(I||{}),v=(_0x126df6=>(_0x126df6[_0x126df6[_0x391085(0x12c)]=0x0]='Unknown',_0x126df6[_0x126df6[_0x391085(0x10c)]=0x1]=_0x391085(0x10c),_0x126df6[_0x126df6[_0x391085(0x155)]=0x2]='Reply',_0x126df6[_0x126df6[_0x391085(0x149)]=0x3]='Edit',_0x126df6[_0x126df6[_0x391085(0x129)]=0x4]=_0x391085(0x129),_0x126df6[_0x126df6[_0x391085(0x13b)]=0x5]='Solve',_0x126df6[_0x126df6[_0x391085(0x14e)]=-0x1]=_0x391085(0x14e),_0x126df6))(v||{});const D=_0x4fbdf3=>_0x519154(new Date(+_0x4fbdf3))[_0x391085(0x135)](_0x391085(0x120)),B=async(_0x124e0c,_0x2fd746)=>{const _0x4f57b0=_0x391085,_0x3d6887=_0x124e0c['get'](_0x42cfae),_0x411833=_0x124e0c[_0x4f57b0(0x10d)](_0x43fbe3);_0x2fd746[_0x4f57b0(0x14a)](_0x3dc7cf=>{const _0x280b86=_0x4f57b0;_0x3d6887[_0x280b86(0x164)](_0x3dc7cf)&&_0x2fd746['delete'](_0x3dc7cf);}),_0x2fd746['size']&&(await _0x411833[_0x4f57b0(0x10d)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2fd746]}}))[_0x4f57b0(0x15b)][_0x4f57b0(0x141)][_0x4f57b0(0x14a)](_0x2d970d=>{const _0x202d22=_0x4f57b0;_0x2d970d&&_0x3d6887[_0x202d22(0x165)](_0x2d970d);});};var K=Object[_0x391085(0x127)],V=(_0x2578ba,_0x14d0c1,_0x214cca,_0x432258)=>{const _0x14a4c3=_0x391085;for(var _0x2b1908=_0x432258>0x1?void 0x0:_0x432258?K(_0x14d0c1,_0x214cca):_0x14d0c1,_0x53c4ba=_0x2578ba[_0x14a4c3(0x124)]-0x1,_0xff6cff;_0x53c4ba>=0x0;_0x53c4ba--)(_0xff6cff=_0x2578ba[_0x53c4ba])&&(_0x2b1908=_0xff6cff(_0x2b1908)||_0x2b1908);return _0x2b1908;},p=(_0x4e7a7c,_0xa899e0)=>(_0xac0133,_0x527b70)=>_0xa899e0(_0xac0133,_0x527b70,_0x4e7a7c);let S=class extends _0x40c267{constructor(_0x44e463,_0x3dccea,_0x4fe521,_0x5295a5){const _0x2876a1=_0x391085;super(),this[_0x2876a1(0x150)]=_0x44e463,this[_0x2876a1(0x145)]=_0x3dccea,this['_userService']=_0x4fe521,this[_0x2876a1(0x128)]=_0x5295a5,this[_0x2876a1(0x146)](),this[_0x2876a1(0x142)]();}[_0x391085(0x142)](){const _0x1cd282=_0x391085;this['disposeWithMe'](this[_0x1cd282(0x145)]['commentUpdate$'][_0x1cd282(0x143)](_0x5a6ebf(0x10))[_0x1cd282(0x14c)](_0xc082f4=>{const _0xb6c36f=_0x1cd282,_0x455cd3=new Set();_0xc082f4[_0xb6c36f(0x14a)](_0x380c7f=>{const _0x122779=_0xb6c36f;switch(_0x380c7f[_0x122779(0x15f)]){case'add':{const _0x36b4dc=_0x380c7f[_0x122779(0x112)][_0x122779(0x153)];_0x455cd3['add'](_0x36b4dc);break;}}}),B(this['_injector'],_0x455cd3);}));}[_0x391085(0x146)](){const _0x4a359a=_0x391085;this[_0x4a359a(0x133)](this[_0x4a359a(0x150)][_0x4a359a(0x134)][_0x4a359a(0x14c)](async _0x3ceaf7=>{const _0x5453d7=_0x4a359a;var _0xdfba1a,_0x2ecca9,_0x5c7b23,_0x21a944;const _0x546c5=(_0xdfba1a=this['_threadCommentModel'][_0x5453d7(0x160)](_0x3ceaf7[_0x5453d7(0x117)])['find'](_0x2c7d7a=>_0x2c7d7a['threadId']===_0x3ceaf7[_0x5453d7(0x152)]))==null?void 0x0:_0xdfba1a['root'];if(!_0x546c5)return;const {unitId:_0xdefbb2,subUnitId:_0x65d083}=_0x546c5;switch(_0x3ceaf7['user']&&this[_0x5453d7(0x11b)][_0x5453d7(0x165)](_0x3ceaf7['user']),_0x3ceaf7[_0x5453d7(0x15f)]){case v['Add']:break;case v['Reply']:{this[_0x5453d7(0x145)][_0x5453d7(0x15a)](_0xdefbb2,_0x65d083,{'unitId':_0xdefbb2,'subUnitId':_0x65d083,'ref':'','id':_0x3ceaf7[_0x5453d7(0x11a)],'dT':D(+_0x3ceaf7['createTimestamp']),'threadId':_0x3ceaf7[_0x5453d7(0x152)],'personId':(_0x5c7b23=(_0x2ecca9=_0x3ceaf7[_0x5453d7(0x13f)])==null?void 0x0:_0x2ecca9[_0x5453d7(0x109)])!=null?_0x5c7b23:_0x3ceaf7[_0x5453d7(0x126)],'text':JSON[_0x5453d7(0x15d)](_0x3ceaf7[_0x5453d7(0x106)]),'parentId':_0x546c5['id']});break;}case v[_0x5453d7(0x129)]:{const _0xc1554a=this[_0x5453d7(0x145)][_0x5453d7(0x115)](_0xdefbb2,_0x65d083,_0x3ceaf7[_0x5453d7(0x11a)]);_0xc1554a&&_0xc1554a[_0x5453d7(0x15e)]&&this[_0x5453d7(0x145)][_0x5453d7(0x10e)](_0xdefbb2,_0x65d083,_0x3ceaf7[_0x5453d7(0x11a)]);break;}case v[_0x5453d7(0x149)]:{this[_0x5453d7(0x145)][_0x5453d7(0x12e)](_0xdefbb2,_0x65d083,{'commentId':_0x3ceaf7[_0x5453d7(0x11a)],'text':JSON[_0x5453d7(0x15d)](_0x3ceaf7[_0x5453d7(0x106)])});break;}case v[_0x5453d7(0x13b)]:{const _0xa9aef6=(_0x21a944=this[_0x5453d7(0x145)][_0x5453d7(0x160)](_0x3ceaf7[_0x5453d7(0x117)])[_0x5453d7(0x116)](_0x50f199=>_0x50f199['threadId']===_0x3ceaf7[_0x5453d7(0x152)]))==null?void 0x0:_0x21a944[_0x5453d7(0x148)];_0xa9aef6&&this[_0x5453d7(0x145)][_0x5453d7(0x138)](_0xdefbb2,_0x65d083,_0xa9aef6['id'],_0x3ceaf7[_0x5453d7(0x13d)]===I[_0x5453d7(0x14b)]);break;}}}));}};S=V([p(0x0,_0x139a48(_0x5f4e5e)),p(0x1,_0x139a48(_0x38d485)),p(0x2,_0x139a48(_0x42cfae)),p(0x3,_0x139a48(_0x4598ff))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x391085(0x127)],Q=(_0x47b180,_0x288def,_0x60361f,_0x10710c)=>{for(var _0x4b6d90=_0x10710c>0x1?void 0x0:_0x10710c?k(_0x288def,_0x60361f):_0x288def,_0x5904ca=_0x47b180['length']-0x1,_0x1eb111;_0x5904ca>=0x0;_0x5904ca--)(_0x1eb111=_0x47b180[_0x5904ca])&&(_0x4b6d90=_0x1eb111(_0x4b6d90)||_0x4b6d90);return _0x4b6d90;},_=(_0x5c1b24,_0x1ddd97)=>(_0x1c9ea4,_0x3a2b1a)=>_0x1ddd97(_0x1c9ea4,_0x3a2b1a,_0x5c1b24);function _0x5e17(){const _0x2df189=['5951956zJWiWU','root','Edit','forEach','Solved','subscribe','/edit','UNRECOGNIZED','dataSource','_commentService','1385566PRWrSc','threadId','personId','requireSession','Reply','_initDataSource','onReady','_sessionService','code','addComment','body','syncUpdateMutationToColla','parse','parentId','type','getUnit','_config','pluginName','_threadCommentDataSource','getUser','addUser','2713205riUNHe','comment','/add','saveCommentToSnapshot','content','_configService','filter','userID','2501216ELHxBl','/universer-api/comment/unit/','Add','get','deleteComment','createTimestamp','listComments','/list','payload','customRanges','post','getComment','find','unitId','replies','values','replyId','_userService','getCurrentUser','791uyCcHR','/reply','1422309CFhMih','YYYY/MM/DD\x20HH:mm','OpenOrReOpen','map','/delete','length','defineProperty','userId','getOwnPropertyDescriptor','_injector','Delete','126304CdafgE','symbol','Unknown','comments','updateComment','COMMENT','402042OZibRm','_threadCommentDataSourceService','error','disposeWithMe','commentUpdate$','format','getMemberID','_httpService','resolveComment','slice','/solved','Solve','rangeId','solved','reply','user','rangeType','users','_initUserSync','pipe','resolved','_threadCommentModel','_init'];_0x5e17=function(){return _0x2df189;};return _0x5e17();}function X(_0x76297c,_0x14565a){const _0x52fe49=_0x391085,_0x48f7a2=_0x76297c[_0x52fe49(0x118)][0x0];return{..._0x14565a,'id':_0x48f7a2['replyId'],'resolved':_0x76297c[_0x52fe49(0x13d)]===0x1,'dT':D(_0x48f7a2[_0x52fe49(0x10f)]),'personId':_0x48f7a2[_0x52fe49(0x126)],'threadId':_0x48f7a2[_0x52fe49(0x152)]};}function ee(_0x77d7d7,_0x4a0a85,_0x140a9e){const _0x245998=_0x391085;var _0x345f8d,_0x1477d1;if(((_0x1477d1=(_0x345f8d=_0x77d7d7==null?void 0x0:_0x77d7d7[_0x245998(0x118)])==null?void 0x0:_0x345f8d['length'])!=null?_0x1477d1:0x0)>0x0){const _0x34e14f=(_0x15c04b,_0x17f38a)=>({'id':_0x15c04b[_0x245998(0x11a)],'threadId':_0x15c04b[_0x245998(0x152)],'dT':D(_0x15c04b[_0x245998(0x10f)]),'personId':_0x15c04b[_0x245998(0x126)],'resolved':_0x77d7d7[_0x245998(0x13d)]===I['Solved'],'unitId':_0x4a0a85,'subUnitId':_0x140a9e,'text':JSON[_0x245998(0x15d)](_0x15c04b['content']),'parentId':_0x17f38a}),_0x521885=_0x34e14f(_0x77d7d7[_0x245998(0x118)][0x0]);return{..._0x521885,'children':_0x77d7d7[_0x245998(0x118)][_0x245998(0x139)](0x1)[_0x245998(0x122)](_0x1b30fe=>_0x34e14f(_0x1b30fe,_0x521885['id']))};}return null;}let f=class{constructor(_0x12ed92,_0x4a99b3,_0x4d031a,_0x36f528){const _0x1ff5ed=_0x391085;this[_0x1ff5ed(0x137)]=_0x12ed92,this[_0x1ff5ed(0x11b)]=_0x4a99b3,this[_0x1ff5ed(0x158)]=_0x4d031a,this[_0x1ff5ed(0x128)]=_0x36f528;}async[_0x391085(0x15a)](_0x27b8ba){const _0x2dc707=_0x391085;var _0x5d0b24,_0x2fc7eb;const {parentId:_0x45eecb,unitId:_0x55a4eb,text:_0x5c07c4,threadId:_0x4b36c1}=_0x27b8ba,_0x7192ab=(_0x2fc7eb=(_0x5d0b24=_0x5c07c4[_0x2dc707(0x113)])==null?void 0x0:_0x5d0b24[_0x2dc707(0x108)](_0xdddbe1=>_0xdddbe1[_0x2dc707(0x140)]===_0x2c96ff[_0x2dc707(0x12f)])[_0x2dc707(0x122)](_0x23d29d=>_0x23d29d['rangeId']))!=null?_0x2fc7eb:[],_0x509668=JSON['stringify'](_0x5c07c4),_0x1735ca=(await this['_sessionService'][_0x2dc707(0x154)](_0x55a4eb))[_0x2dc707(0x136)]();if(_0x45eecb){const _0x49be41={'memberId':_0x1735ca,'unitId':_0x55a4eb,'content':_0x509668,'mention':_0x7192ab,'threadId':_0x4b36c1},_0x314417=(await this['_httpService']['post'](_0x2dc707(0x10b)+_0x55a4eb+_0x2dc707(0x11e),{'body':_0x49be41}))[_0x2dc707(0x15b)][_0x2dc707(0x13e)];return{..._0x27b8ba,'id':_0x314417[_0x2dc707(0x11a)],'dT':_0x519154(+_0x314417[_0x2dc707(0x10f)])[_0x2dc707(0x135)](_0x2dc707(0x120)),'personId':_0x314417[_0x2dc707(0x126)]};}else{const _0x1b2866={'memberId':_0x1735ca,'unitId':_0x55a4eb,'content':_0x509668,'mention':_0x7192ab},_0x24389f=await this[_0x2dc707(0x137)][_0x2dc707(0x114)](_0x2dc707(0x10b)+_0x55a4eb+_0x2dc707(0x104),{'body':_0x1b2866});return X(_0x24389f[_0x2dc707(0x15b)][_0x2dc707(0x103)],_0x27b8ba);}}async['updateComment'](_0x810133){const _0x3f49ea=_0x391085;var _0x46e787,_0x3effb2;const {text:_0x3527ef,unitId:_0x5f16d8}=_0x810133,_0x3828a2=(_0x3effb2=(_0x46e787=_0x3527ef['customRanges'])==null?void 0x0:_0x46e787[_0x3f49ea(0x108)](_0x1206f1=>_0x1206f1[_0x3f49ea(0x140)]===_0x2c96ff[_0x3f49ea(0x12f)])[_0x3f49ea(0x122)](_0x472fc7=>_0x472fc7[_0x3f49ea(0x13c)]))!=null?_0x3effb2:[],_0x33881f=JSON['stringify'](_0x3527ef),_0x13b2a4=_0x810133[_0x3f49ea(0x152)],_0x3acbee=_0x810133['id'],_0x3d4621={'memberId':(await this[_0x3f49ea(0x158)][_0x3f49ea(0x154)](_0x5f16d8))[_0x3f49ea(0x136)](),'unitId':_0x5f16d8,'threadId':_0x13b2a4,'mention':_0x3828a2,'content':_0x33881f,'replyId':_0x3acbee},_0x5f5f7d=await this['_httpService']['post'](_0x3f49ea(0x10b)+_0x5f16d8+_0x3f49ea(0x14d),{'body':_0x3d4621});return!_0x5f5f7d[_0x3f49ea(0x15b)][_0x3f49ea(0x132)]||_0x5f5f7d[_0x3f49ea(0x15b)]['error'][_0x3f49ea(0x159)]===0x1;}async[_0x391085(0x138)](_0x143e3b){const _0x4e45b7=_0x391085,{unitId:_0x5d47cf}=_0x143e3b,_0x24e15f=_0x143e3b[_0x4e45b7(0x152)],_0x2012ba={'memberId':this['_userService'][_0x4e45b7(0x11c)]()['userID'],'unitId':_0x5d47cf,'threadId':_0x24e15f,'solved':_0x143e3b[_0x4e45b7(0x144)]?I['Solved']:I[_0x4e45b7(0x121)]},_0x58fc1d=await this[_0x4e45b7(0x137)][_0x4e45b7(0x114)]('/universer-api/comment/unit/'+_0x5d47cf+_0x4e45b7(0x13a),{'body':_0x2012ba});return!_0x58fc1d[_0x4e45b7(0x15b)][_0x4e45b7(0x132)]||_0x58fc1d['body'][_0x4e45b7(0x132)]['code']===0x1;}async[_0x391085(0x10e)](_0x25ac2a,_0x26978f,_0x4a42fa,_0x502032){const _0x2ed384=_0x391085,_0x429b5c={'memberId':(await this['_sessionService'][_0x2ed384(0x154)](_0x25ac2a))[_0x2ed384(0x136)](),'threadId':_0x4a42fa,'replyId':_0x502032,'unitId':_0x25ac2a},_0x5d838a=await this['_httpService']['post'](_0x2ed384(0x10b)+_0x25ac2a+_0x2ed384(0x123),{'body':_0x429b5c});return!_0x5d838a[_0x2ed384(0x15b)][_0x2ed384(0x132)]||_0x5d838a[_0x2ed384(0x15b)][_0x2ed384(0x132)][_0x2ed384(0x159)]===0x1;}async[_0x391085(0x110)](_0x255131,_0x597563,_0x3f0423){const _0x27cf02=_0x391085,_0x36a937={'unitId':_0x255131,'threadId':_0x3f0423},_0x4434c8=await this['_httpService'][_0x27cf02(0x114)]('/universer-api/comment/unit/'+_0x255131+_0x27cf02(0x111),{'body':_0x36a937}),_0x215a58=_0x3f0423[_0x27cf02(0x122)](_0x518a59=>ee(_0x4434c8[_0x27cf02(0x15b)][_0x27cf02(0x12d)][_0x518a59],_0x255131,_0x597563))[_0x27cf02(0x108)](Boolean);return Object[_0x27cf02(0x119)](_0x4434c8['body']['users'])[_0x27cf02(0x14a)](_0x195fa1=>{const _0x1dc902=_0x27cf02;this[_0x1dc902(0x11b)][_0x1dc902(0x165)](_0x195fa1);}),_0x215a58;}[_0x391085(0x105)](_0x671665){const _0x35398b=_0x391085;return{'id':_0x671665['id'],'threadId':_0x671665[_0x35398b(0x152)],'ref':_0x671665['ref']};}};f=Q([_(0x0,_0x139a48(_0x43fbe3)),_(0x1,_0x139a48(_0x42cfae)),_(0x2,_0x139a48(_0x1fc687)),_(0x3,_0x139a48(_0x4598ff))],f);var re=Object[_0x391085(0x127)],te=(_0x5da441,_0x4647ee,_0x458a62,_0x120f0e)=>{for(var _0xcf99d1=_0x120f0e>0x1?void 0x0:_0x120f0e?re(_0x4647ee,_0x458a62):_0x4647ee,_0x4cd40d=_0x5da441['length']-0x1,_0x2e0969;_0x4cd40d>=0x0;_0x4cd40d--)(_0x2e0969=_0x5da441[_0x4cd40d])&&(_0xcf99d1=_0x2e0969(_0xcf99d1)||_0xcf99d1);return _0xcf99d1;},N=(_0x588920,_0x39ecd3)=>(_0x212088,_0x43b4af)=>_0x39ecd3(_0x212088,_0x43b4af,_0x588920);let g=class extends _0x40c267{constructor(_0x164d0c,_0x2b1b97){const _0x5b70ef=_0x391085;super(),this[_0x5b70ef(0x131)]=_0x164d0c,this['_threadCommentDataSource']=_0x2b1b97,this[_0x5b70ef(0x156)]();}[_0x391085(0x156)](){const _0x400af2=_0x391085;this[_0x400af2(0x131)][_0x400af2(0x14f)]=this[_0x400af2(0x163)],this[_0x400af2(0x131)][_0x400af2(0x15c)]=!0x1;}};function _0x1132(_0xda36e0,_0x203d27){const _0x5e17eb=_0x5e17();return _0x1132=function(_0x1132af,_0x266979){_0x1132af=_0x1132af-0x102;let _0x25d195=_0x5e17eb[_0x1132af];return _0x25d195;},_0x1132(_0xda36e0,_0x203d27);}g=te([N(0x0,_0x4c028a),N(0x1,_0x139a48(f))],g);var se=Object[_0x391085(0x125)],oe=Object[_0x391085(0x127)],ne=(_0x10d1e9,_0x190595,_0x14519b)=>_0x190595 in _0x10d1e9?se(_0x10d1e9,_0x190595,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x14519b}):_0x10d1e9[_0x190595]=_0x14519b,ie=(_0x1a1ac1,_0x3c1205,_0x524017,_0xa8403c)=>{const _0x5c30f2=_0x391085;for(var _0x3070a8=_0xa8403c>0x1?void 0x0:_0xa8403c?oe(_0x3c1205,_0x524017):_0x3c1205,_0x4f5237=_0x1a1ac1[_0x5c30f2(0x124)]-0x1,_0x1d606b;_0x4f5237>=0x0;_0x4f5237--)(_0x1d606b=_0x1a1ac1[_0x4f5237])&&(_0x3070a8=_0x1d606b(_0x3070a8)||_0x3070a8);return _0x3070a8;},w=(_0x565486,_0x18c333)=>(_0x4f1b58,_0xfc6b0e)=>_0x18c333(_0x4f1b58,_0xfc6b0e,_0x565486),$=(_0x474861,_0x19e606,_0x32eb85)=>ne(_0x474861,typeof _0x19e606!=_0x391085(0x12b)?_0x19e606+'':_0x19e606,_0x32eb85);let b=class extends _0x263ac2{constructor(_0x119a29=M,_0x281d79,_0x5b4a7c){const _0xbf4cae=_0x391085;super(),this['_config']=_0x119a29,this['_injector']=_0x281d79,this[_0xbf4cae(0x107)]=_0x5b4a7c;const {..._0x128263}=_0x1ea02d({},M,this[_0xbf4cae(0x161)]);this['_configService']['setConfig'](z,_0x128263);}['onStarting'](){const _0x230462=_0x391085;[[f],[g],[S]][_0x230462(0x14a)](_0x179e6a=>{const _0x246cb1=_0x230462;this[_0x246cb1(0x128)]['add'](_0x179e6a);});}[_0x391085(0x157)](){const _0x270aaf=_0x391085;this['_injector'][_0x270aaf(0x10d)](g),this['_injector'][_0x270aaf(0x10d)](S);}};$(b,_0x391085(0x162),W),$(b,_0x391085(0x15f),_0x47b158['UNIVER_UNKNOWN']),b=ie([_0x3bde12(_0x13dc44,_0xf1e801,_0x30c31e),w(0x1,_0x139a48(_0x4598ff)),w(0x2,_0x5c9166)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x17fe(){const _0xc355f0=['body','parse','/delete','10ZVGnUc','deleteComment','get','replies','syncUpdateMutationToColla','unitId','pipe','parentId','getCurrentUser','3286448UxaMVd','toStringTag','find','rangeId','format','UniverThreadCommentUi','rangeType','CommentService','UniverInstanceType','object','Plugin','864995ukbDvh','104134evAyZG','merge','UniverCore','Add','_threadCommentModel','_threadCommentDataSource','UserManagerService','_initUserSync','Disposable','UniverNetwork','2167376aAwnnJ','delete','user','thread-comment-data-source.config','302764zxOrcR','6oiYtWQ','300596GtMtek','Unknown','Solved','_httpService','_config','ref','symbol','UniverThreadCommentUIPlugin','/universer-api/user/list','/reply','requireSession','threadId','Edit','replyId','@univerjs/network','addUser','@univerjs/thread-comment-ui','COMMENT','stringify','post','solved','/list','filter','dayjs','reply','addComment','resolveComment','getComment','_configService','userId','OpenOrReOpen','subscribe','_commentService','Delete','rxjs','createTimestamp','_initDataSource','Injector','getUnit','3aLwSjo','function','customRanges','DependentOn','values','commentUpdate$','HTTPService','bufferTime','UniverProCollaborationClient','/edit','getMemberID','type','UniverThreadComment','comments','code','personId','updateComment','onReady','defineProperty','root','_userService','/add','map','error','length','UniverThreadCommentDataSourcePlugin','content','_threadCommentDataSourceService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','add','YYYY/MM/DD\x20HH:mm','exports','amd','size','_sessionService','Reply','/universer-api/comment/unit/','UniverProLicense','userID','1936422hsDnhT','disposeWithMe','_injector','getUser','getOwnPropertyDescriptor','users','Solve','IConfigService','comment','4kEojdb','payload','UniverLicensePlugin','forEach','CollaborationSessionService','saveCommentToSnapshot','UniverProThreadCommentDatasource','onStarting','slice','UNRECOGNIZED','@univerjs/thread-comment','Inject','@univerjs-pro/collaboration-client'];_0x17fe=function(){return _0xc355f0;};return _0x17fe();}function _0xefcd(_0x9efce8,_0x4261d5){const _0x17fef4=_0x17fe();return _0xefcd=function(_0xefcdc,_0x37d226){_0xefcdc=_0xefcdc-0x192;let _0xcb20b2=_0x17fef4[_0xefcdc];return _0xcb20b2;},_0xefcd(_0x9efce8,_0x4261d5);}(function(_0xaf0cb1,_0x1765ff){const _0xa008ca=_0xefcd,_0x304f16=_0xaf0cb1();while(!![]){try{const _0x519598=parseInt(_0xa008ca(0x21b))/0x1*(parseInt(_0xa008ca(0x1b4))/0x2)+-parseInt(_0xa008ca(0x1eb))/0x3*(-parseInt(_0xa008ca(0x1c4))/0x4)+-parseInt(_0xa008ca(0x1b3))/0x5*(-parseInt(_0xa008ca(0x1c3))/0x6)+-parseInt(_0xa008ca(0x1c2))/0x7+parseInt(_0xa008ca(0x1be))/0x8+-parseInt(_0xa008ca(0x212))/0x9+-parseInt(_0xa008ca(0x19f))/0xa*(parseInt(_0xa008ca(0x1a8))/0xb);if(_0x519598===_0x1765ff)break;else _0x304f16['push'](_0x304f16['shift']());}catch(_0x5686c4){_0x304f16['push'](_0x304f16['shift']());}}}(_0x17fe,0x298b0),function(_0x39bddc,_0x538340){const _0x2e2034=_0xefcd;typeof exports==_0x2e2034(0x1b1)&&typeof module<'u'?_0x538340(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==_0x2e2034(0x1ec)&&define[_0x2e2034(0x20b)]?define([_0x2e2034(0x20a),_0x2e2034(0x19b),'@univerjs-pro/license','@univerjs/core',_0x2e2034(0x1d4),_0x2e2034(0x199),_0x2e2034(0x1e6),_0x2e2034(0x1d2)],_0x538340):(_0x39bddc=typeof globalThis<'u'?globalThis:_0x39bddc||self,_0x538340(_0x39bddc[_0x2e2034(0x195)]={},_0x39bddc[_0x2e2034(0x1f3)],_0x39bddc[_0x2e2034(0x210)],_0x39bddc[_0x2e2034(0x1b6)],_0x39bddc[_0x2e2034(0x1ad)],_0x39bddc[_0x2e2034(0x1f7)],_0x39bddc[_0x2e2034(0x1e6)],_0x39bddc[_0x2e2034(0x1bd)]));}(this,function(_0x374dba,_0x33849b,_0x8f02c1,_0x1efb3c,_0x2e3e25,_0x3c4d09,_0x20e18a,_0x2f9148){'use strict';const _0x22442c=_0xefcd;const _0x1331fb=_0x22442c(0x207);var _0x241564=(_0x1b5bfb=>(_0x1b5bfb[_0x1b5bfb[_0x22442c(0x1e2)]=0x0]='OpenOrReOpen',_0x1b5bfb[_0x1b5bfb[_0x22442c(0x1c6)]=0x1]=_0x22442c(0x1c6),_0x1b5bfb[_0x1b5bfb[_0x22442c(0x198)]=-0x1]='UNRECOGNIZED',_0x1b5bfb))(_0x241564||{}),_0x4c1b79=(_0x2dc863=>(_0x2dc863[_0x2dc863[_0x22442c(0x1c5)]=0x0]='Unknown',_0x2dc863[_0x2dc863[_0x22442c(0x1b7)]=0x1]='Add',_0x2dc863[_0x2dc863['Reply']=0x2]=_0x22442c(0x20e),_0x2dc863[_0x2dc863[_0x22442c(0x1d0)]=0x3]=_0x22442c(0x1d0),_0x2dc863[_0x2dc863[_0x22442c(0x1e5)]=0x4]=_0x22442c(0x1e5),_0x2dc863[_0x2dc863[_0x22442c(0x218)]=0x5]=_0x22442c(0x218),_0x2dc863[_0x2dc863[_0x22442c(0x198)]=-0x1]=_0x22442c(0x198),_0x2dc863))(_0x4c1b79||{});const _0x5b9c7e=_0x23bca9=>_0x1efb3c[_0x22442c(0x1db)](new Date(+_0x23bca9))[_0x22442c(0x1ac)](_0x22442c(0x209)),_0x341fda=async(_0x55da6f,_0x166513)=>{const _0x468cbe=_0x22442c,_0x2e4070=_0x55da6f[_0x468cbe(0x1a1)](_0x1efb3c[_0x468cbe(0x1ba)]),_0x4a9d92=_0x55da6f[_0x468cbe(0x1a1)](_0x2f9148[_0x468cbe(0x1f1)]);_0x166513[_0x468cbe(0x192)](_0x560321=>{const _0x4a35e0=_0x468cbe;_0x2e4070[_0x4a35e0(0x215)](_0x560321)&&_0x166513[_0x4a35e0(0x1bf)](_0x560321);}),_0x166513[_0x468cbe(0x20c)]&&(await _0x4a9d92[_0x468cbe(0x1a1)](_0x468cbe(0x1cc),{'params':{'userIDs':[..._0x166513]}}))[_0x468cbe(0x19c)][_0x468cbe(0x217)][_0x468cbe(0x192)](_0x12d983=>{_0x12d983&&_0x2e4070['addUser'](_0x12d983);});};var _0x519d65=Object['getOwnPropertyDescriptor'],_0x4375b8=(_0x3acf8f,_0x1e693c,_0x4780aa,_0x722920)=>{const _0x374fd0=_0x22442c;for(var _0x5ecece=_0x722920>0x1?void 0x0:_0x722920?_0x519d65(_0x1e693c,_0x4780aa):_0x1e693c,_0x52af0c=_0x3acf8f[_0x374fd0(0x203)]-0x1,_0x3ff420;_0x52af0c>=0x0;_0x52af0c--)(_0x3ff420=_0x3acf8f[_0x52af0c])&&(_0x5ecece=_0x3ff420(_0x5ecece)||_0x5ecece);return _0x5ecece;},_0x303ca2=(_0x40325c,_0x4627b7)=>(_0x2a706d,_0x4427c)=>_0x4627b7(_0x2a706d,_0x4427c,_0x40325c);let _0x2ec182=class extends _0x1efb3c[_0x22442c(0x1bc)]{constructor(_0x225011,_0x5f4b9e,_0x5934be,_0x19d9f8){const _0x1bcf6a=_0x22442c;super(),this['_commentService']=_0x225011,this[_0x1bcf6a(0x1b8)]=_0x5f4b9e,this[_0x1bcf6a(0x1ff)]=_0x5934be,this['_injector']=_0x19d9f8,this['_init'](),this['_initUserSync']();}[_0x22442c(0x1bb)](){const _0x355a5d=_0x22442c;this['disposeWithMe'](this['_threadCommentModel'][_0x355a5d(0x1f0)][_0x355a5d(0x1a5)](_0x20e18a[_0x355a5d(0x1f2)](0x10))[_0x355a5d(0x1e3)](_0x236c54=>{const _0x360f8f=_0x355a5d,_0x15d2fa=new Set();_0x236c54[_0x360f8f(0x192)](_0x65a13b=>{const _0x1be4ee=_0x360f8f;switch(_0x65a13b[_0x1be4ee(0x1f6)]){case _0x1be4ee(0x208):{const _0x3d0349=_0x65a13b[_0x1be4ee(0x21c)][_0x1be4ee(0x1fa)];_0x15d2fa['add'](_0x3d0349);break;}}}),_0x341fda(this[_0x360f8f(0x214)],_0x15d2fa);}));}['_init'](){const _0x2e103f=_0x22442c;this[_0x2e103f(0x213)](this[_0x2e103f(0x1e4)][_0x2e103f(0x1f0)][_0x2e103f(0x1e3)](async _0x418bcc=>{const _0x4b70e0=_0x2e103f;var _0x25e27b,_0x5555b3,_0x47805f,_0xbb3654;const _0x34684a=(_0x25e27b=this[_0x4b70e0(0x1b8)][_0x4b70e0(0x1ea)](_0x418bcc[_0x4b70e0(0x1a4)])[_0x4b70e0(0x1aa)](_0x1dad88=>_0x1dad88['threadId']===_0x418bcc[_0x4b70e0(0x1cf)]))==null?void 0x0:_0x25e27b['root'];if(!_0x34684a)return;const {unitId:_0x5c8be8,subUnitId:_0x53b1fa}=_0x34684a;switch(_0x418bcc[_0x4b70e0(0x1c0)]&&this[_0x4b70e0(0x1ff)][_0x4b70e0(0x1d3)](_0x418bcc[_0x4b70e0(0x1c0)]),_0x418bcc[_0x4b70e0(0x1f6)]){case _0x4c1b79['Add']:break;case _0x4c1b79[_0x4b70e0(0x20e)]:{this[_0x4b70e0(0x1b8)][_0x4b70e0(0x1dd)](_0x5c8be8,_0x53b1fa,{'unitId':_0x5c8be8,'subUnitId':_0x53b1fa,'ref':'','id':_0x418bcc[_0x4b70e0(0x1d1)],'dT':_0x5b9c7e(+_0x418bcc[_0x4b70e0(0x1e7)]),'threadId':_0x418bcc['threadId'],'personId':(_0x47805f=(_0x5555b3=_0x418bcc['user'])==null?void 0x0:_0x5555b3[_0x4b70e0(0x211)])!=null?_0x47805f:_0x418bcc[_0x4b70e0(0x1e1)],'text':JSON[_0x4b70e0(0x19d)](_0x418bcc[_0x4b70e0(0x205)]),'parentId':_0x34684a['id']});break;}case _0x4c1b79[_0x4b70e0(0x1e5)]:{const _0x2be811=this[_0x4b70e0(0x1b8)][_0x4b70e0(0x1df)](_0x5c8be8,_0x53b1fa,_0x418bcc['replyId']);_0x2be811&&_0x2be811[_0x4b70e0(0x1a6)]&&this[_0x4b70e0(0x1b8)]['deleteComment'](_0x5c8be8,_0x53b1fa,_0x418bcc['replyId']);break;}case _0x4c1b79[_0x4b70e0(0x1d0)]:{this[_0x4b70e0(0x1b8)][_0x4b70e0(0x1fb)](_0x5c8be8,_0x53b1fa,{'commentId':_0x418bcc[_0x4b70e0(0x1d1)],'text':JSON['parse'](_0x418bcc[_0x4b70e0(0x205)])});break;}case _0x4c1b79[_0x4b70e0(0x218)]:{const _0x5c6f18=(_0xbb3654=this[_0x4b70e0(0x1b8)][_0x4b70e0(0x1ea)](_0x418bcc[_0x4b70e0(0x1a4)])['find'](_0x19108c=>_0x19108c['threadId']===_0x418bcc['threadId']))==null?void 0x0:_0xbb3654[_0x4b70e0(0x1fe)];_0x5c6f18&&this[_0x4b70e0(0x1b8)][_0x4b70e0(0x1de)](_0x5c8be8,_0x53b1fa,_0x5c6f18['id'],_0x418bcc[_0x4b70e0(0x1d8)]===_0x241564['Solved']);break;}}}));}};_0x2ec182=_0x4375b8([_0x303ca2(0x0,_0x1efb3c[_0x22442c(0x19a)](_0x33849b[_0x22442c(0x1af)])),_0x303ca2(0x1,_0x1efb3c[_0x22442c(0x19a)](_0x3c4d09['ThreadCommentModel'])),_0x303ca2(0x2,_0x1efb3c[_0x22442c(0x19a)](_0x1efb3c[_0x22442c(0x1ba)])),_0x303ca2(0x3,_0x1efb3c[_0x22442c(0x19a)](_0x1efb3c[_0x22442c(0x1e9)]))],_0x2ec182);const _0x4baf23=_0x22442c(0x1c1),_0x1b4ed2={};var _0x2fbf50=Object[_0x22442c(0x216)],_0xb57221=(_0x27a3a5,_0x2538a9,_0x5f13df,_0x2de93f)=>{const _0x45d511=_0x22442c;for(var _0x334f8a=_0x2de93f>0x1?void 0x0:_0x2de93f?_0x2fbf50(_0x2538a9,_0x5f13df):_0x2538a9,_0x2bd060=_0x27a3a5[_0x45d511(0x203)]-0x1,_0x42dd0f;_0x2bd060>=0x0;_0x2bd060--)(_0x42dd0f=_0x27a3a5[_0x2bd060])&&(_0x334f8a=_0x42dd0f(_0x334f8a)||_0x334f8a);return _0x334f8a;},_0x398be4=(_0x466825,_0x3db138)=>(_0x340caa,_0x5cc0bb)=>_0x3db138(_0x340caa,_0x5cc0bb,_0x466825);function _0x132565(_0x11932a,_0x123b32){const _0x22a71e=_0x22442c,_0xef9385=_0x11932a['replies'][0x0];return{..._0x123b32,'id':_0xef9385['replyId'],'resolved':_0x11932a[_0x22a71e(0x1d8)]===0x1,'dT':_0x5b9c7e(_0xef9385[_0x22a71e(0x1e7)]),'personId':_0xef9385[_0x22a71e(0x1e1)],'threadId':_0xef9385['threadId']};}function _0x49d447(_0x472148,_0x209515,_0x1c840a){const _0x4a0a12=_0x22442c;var _0x4c5c10,_0x9d7d8;if(((_0x9d7d8=(_0x4c5c10=_0x472148==null?void 0x0:_0x472148['replies'])==null?void 0x0:_0x4c5c10[_0x4a0a12(0x203)])!=null?_0x9d7d8:0x0)>0x0){const _0x3c683c=(_0x5c8651,_0x5c67c0)=>({'id':_0x5c8651['replyId'],'threadId':_0x5c8651[_0x4a0a12(0x1cf)],'dT':_0x5b9c7e(_0x5c8651[_0x4a0a12(0x1e7)]),'personId':_0x5c8651[_0x4a0a12(0x1e1)],'resolved':_0x472148[_0x4a0a12(0x1d8)]===_0x241564[_0x4a0a12(0x1c6)],'unitId':_0x209515,'subUnitId':_0x1c840a,'text':JSON[_0x4a0a12(0x19d)](_0x5c8651[_0x4a0a12(0x205)]),'parentId':_0x5c67c0}),_0x2867d3=_0x3c683c(_0x472148[_0x4a0a12(0x1a2)][0x0]);return{..._0x2867d3,'children':_0x472148[_0x4a0a12(0x1a2)][_0x4a0a12(0x197)](0x1)[_0x4a0a12(0x201)](_0xe1218f=>_0x3c683c(_0xe1218f,_0x2867d3['id']))};}return null;}let _0x4df6bc=class{constructor(_0x5c9c2c,_0x362409,_0x24af9f,_0x1b76b9){const _0x945ba9=_0x22442c;this[_0x945ba9(0x1c7)]=_0x5c9c2c,this[_0x945ba9(0x1ff)]=_0x362409,this[_0x945ba9(0x20d)]=_0x24af9f,this[_0x945ba9(0x214)]=_0x1b76b9;}async[_0x22442c(0x1dd)](_0x2b2556){const _0x9555b4=_0x22442c;var _0x55c87b,_0x420ad7;const {parentId:_0x5b44a0,unitId:_0x4f0a8e,text:_0x88ed3,threadId:_0x49b013}=_0x2b2556,_0x466f9f=(_0x420ad7=(_0x55c87b=_0x88ed3[_0x9555b4(0x1ed)])==null?void 0x0:_0x55c87b[_0x9555b4(0x1da)](_0xd9dc89=>_0xd9dc89['rangeType']===_0x1efb3c['CustomRangeType'][_0x9555b4(0x1d5)])[_0x9555b4(0x201)](_0x16d180=>_0x16d180[_0x9555b4(0x1ab)]))!=null?_0x420ad7:[],_0x26e49e=JSON['stringify'](_0x88ed3),_0x2d5c75=(await this[_0x9555b4(0x20d)][_0x9555b4(0x1ce)](_0x4f0a8e))[_0x9555b4(0x1f5)]();if(_0x5b44a0){const _0xa5d922={'memberId':_0x2d5c75,'unitId':_0x4f0a8e,'content':_0x26e49e,'mention':_0x466f9f,'threadId':_0x49b013},_0x3a2e29=(await this[_0x9555b4(0x1c7)]['post'](_0x9555b4(0x20f)+_0x4f0a8e+_0x9555b4(0x1cd),{'body':_0xa5d922}))[_0x9555b4(0x19c)][_0x9555b4(0x1dc)];return{..._0x2b2556,'id':_0x3a2e29[_0x9555b4(0x1d1)],'dT':_0x1efb3c['dayjs'](+_0x3a2e29['createTimestamp'])[_0x9555b4(0x1ac)](_0x9555b4(0x209)),'personId':_0x3a2e29[_0x9555b4(0x1e1)]};}else{const _0x50b654={'memberId':_0x2d5c75,'unitId':_0x4f0a8e,'content':_0x26e49e,'mention':_0x466f9f},_0x29be41=await this[_0x9555b4(0x1c7)]['post'](_0x9555b4(0x20f)+_0x4f0a8e+_0x9555b4(0x200),{'body':_0x50b654});return _0x132565(_0x29be41[_0x9555b4(0x19c)][_0x9555b4(0x21a)],_0x2b2556);}}async[_0x22442c(0x1fb)](_0x4e0940){const _0x22e418=_0x22442c;var _0x35e7fc,_0x1e9db3;const {text:_0xbab508,unitId:_0x4604c8}=_0x4e0940,_0x2a2760=(_0x1e9db3=(_0x35e7fc=_0xbab508[_0x22e418(0x1ed)])==null?void 0x0:_0x35e7fc[_0x22e418(0x1da)](_0x125540=>_0x125540[_0x22e418(0x1ae)]===_0x1efb3c['CustomRangeType'][_0x22e418(0x1d5)])[_0x22e418(0x201)](_0x23dabf=>_0x23dabf['rangeId']))!=null?_0x1e9db3:[],_0x208821=JSON[_0x22e418(0x1d6)](_0xbab508),_0x50c0e7=_0x4e0940[_0x22e418(0x1cf)],_0x5e126a=_0x4e0940['id'],_0x44baf8={'memberId':(await this[_0x22e418(0x20d)][_0x22e418(0x1ce)](_0x4604c8))[_0x22e418(0x1f5)](),'unitId':_0x4604c8,'threadId':_0x50c0e7,'mention':_0x2a2760,'content':_0x208821,'replyId':_0x5e126a},_0x4600aa=await this[_0x22e418(0x1c7)][_0x22e418(0x1d7)](_0x22e418(0x20f)+_0x4604c8+_0x22e418(0x1f4),{'body':_0x44baf8});return!_0x4600aa[_0x22e418(0x19c)][_0x22e418(0x202)]||_0x4600aa[_0x22e418(0x19c)][_0x22e418(0x202)][_0x22e418(0x1f9)]===0x1;}async[_0x22442c(0x1de)](_0x58f34e){const _0x3a5925=_0x22442c,{unitId:_0x2315b9}=_0x58f34e,_0x2f3b47=_0x58f34e[_0x3a5925(0x1cf)],_0x4ade7d={'memberId':this['_userService'][_0x3a5925(0x1a7)]()[_0x3a5925(0x211)],'unitId':_0x2315b9,'threadId':_0x2f3b47,'solved':_0x58f34e['resolved']?_0x241564[_0x3a5925(0x1c6)]:_0x241564[_0x3a5925(0x1e2)]},_0x5ec2a9=await this[_0x3a5925(0x1c7)][_0x3a5925(0x1d7)]('/universer-api/comment/unit/'+_0x2315b9+'/solved',{'body':_0x4ade7d});return!_0x5ec2a9[_0x3a5925(0x19c)][_0x3a5925(0x202)]||_0x5ec2a9[_0x3a5925(0x19c)]['error'][_0x3a5925(0x1f9)]===0x1;}async[_0x22442c(0x1a0)](_0x36138c,_0x3fb287,_0x2cd683,_0x17d712){const _0x3bb10b=_0x22442c,_0x377f74={'memberId':(await this['_sessionService'][_0x3bb10b(0x1ce)](_0x36138c))[_0x3bb10b(0x1f5)](),'threadId':_0x2cd683,'replyId':_0x17d712,'unitId':_0x36138c},_0x2eace7=await this[_0x3bb10b(0x1c7)][_0x3bb10b(0x1d7)](_0x3bb10b(0x20f)+_0x36138c+_0x3bb10b(0x19e),{'body':_0x377f74});return!_0x2eace7['body'][_0x3bb10b(0x202)]||_0x2eace7[_0x3bb10b(0x19c)]['error'][_0x3bb10b(0x1f9)]===0x1;}async['listComments'](_0x591770,_0x446ac8,_0x9e9216){const _0x128f5b=_0x22442c,_0x5a4698={'unitId':_0x591770,'threadId':_0x9e9216},_0x3114d3=await this[_0x128f5b(0x1c7)][_0x128f5b(0x1d7)](_0x128f5b(0x20f)+_0x591770+_0x128f5b(0x1d9),{'body':_0x5a4698}),_0x58a73c=_0x9e9216[_0x128f5b(0x201)](_0x13768c=>_0x49d447(_0x3114d3['body'][_0x128f5b(0x1f8)][_0x13768c],_0x591770,_0x446ac8))[_0x128f5b(0x1da)](Boolean);return Object[_0x128f5b(0x1ef)](_0x3114d3['body'][_0x128f5b(0x217)])[_0x128f5b(0x192)](_0x450880=>{const _0x28beb9=_0x128f5b;this[_0x28beb9(0x1ff)][_0x28beb9(0x1d3)](_0x450880);}),_0x58a73c;}[_0x22442c(0x194)](_0x25ee36){const _0xaa665b=_0x22442c;return{'id':_0x25ee36['id'],'threadId':_0x25ee36['threadId'],'ref':_0x25ee36[_0xaa665b(0x1c9)]};}};_0x4df6bc=_0xb57221([_0x398be4(0x0,_0x1efb3c[_0x22442c(0x19a)](_0x2f9148[_0x22442c(0x1f1)])),_0x398be4(0x1,_0x1efb3c['Inject'](_0x1efb3c[_0x22442c(0x1ba)])),_0x398be4(0x2,_0x1efb3c[_0x22442c(0x19a)](_0x33849b[_0x22442c(0x193)])),_0x398be4(0x3,_0x1efb3c['Inject'](_0x1efb3c['Injector']))],_0x4df6bc);var _0x57740e=Object[_0x22442c(0x216)],_0x222f0e=(_0x6e4c11,_0x539e29,_0x502c10,_0x5cb180)=>{const _0x19f701=_0x22442c;for(var _0x593d1f=_0x5cb180>0x1?void 0x0:_0x5cb180?_0x57740e(_0x539e29,_0x502c10):_0x539e29,_0x42e250=_0x6e4c11[_0x19f701(0x203)]-0x1,_0x5cf4be;_0x42e250>=0x0;_0x42e250--)(_0x5cf4be=_0x6e4c11[_0x42e250])&&(_0x593d1f=_0x5cf4be(_0x593d1f)||_0x593d1f);return _0x593d1f;},_0x27e585=(_0x34a8b0,_0x32e3e1)=>(_0x14657f,_0x5d8d3c)=>_0x32e3e1(_0x14657f,_0x5d8d3c,_0x34a8b0);let _0xfe7158=class extends _0x1efb3c[_0x22442c(0x1bc)]{constructor(_0x13122d,_0x791d9f){const _0x1be153=_0x22442c;super(),this['_threadCommentDataSourceService']=_0x13122d,this[_0x1be153(0x1b9)]=_0x791d9f,this['_initDataSource']();}[_0x22442c(0x1e8)](){const _0x539e26=_0x22442c;this[_0x539e26(0x206)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x539e26(0x1a3)]=!0x1;}};_0xfe7158=_0x222f0e([_0x27e585(0x0,_0x3c4d09['IThreadCommentDataSourceService']),_0x27e585(0x1,_0x1efb3c['Inject'](_0x4df6bc))],_0xfe7158);var _0x8d551d=Object[_0x22442c(0x1fd)],_0x1c2ee5=Object[_0x22442c(0x216)],_0x1749fb=(_0xba12bb,_0x3a5161,_0x4eb3b6)=>_0x3a5161 in _0xba12bb?_0x8d551d(_0xba12bb,_0x3a5161,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4eb3b6}):_0xba12bb[_0x3a5161]=_0x4eb3b6,_0x4bd5a0=(_0x31cfed,_0x29c2e6,_0x181a2d,_0x164275)=>{for(var _0x5e1d80=_0x164275>0x1?void 0x0:_0x164275?_0x1c2ee5(_0x29c2e6,_0x181a2d):_0x29c2e6,_0x232dc1=_0x31cfed['length']-0x1,_0x265c8d;_0x232dc1>=0x0;_0x232dc1--)(_0x265c8d=_0x31cfed[_0x232dc1])&&(_0x5e1d80=_0x265c8d(_0x5e1d80)||_0x5e1d80);return _0x5e1d80;},_0xff5c6d=(_0x3554eb,_0x1722d9)=>(_0x91d2b5,_0x228e00)=>_0x1722d9(_0x91d2b5,_0x228e00,_0x3554eb),_0x315123=(_0x2f219a,_0x376c8f,_0x5b17f1)=>_0x1749fb(_0x2f219a,typeof _0x376c8f!=_0x22442c(0x1ca)?_0x376c8f+'':_0x376c8f,_0x5b17f1);_0x374dba[_0x22442c(0x204)]=class extends _0x1efb3c[_0x22442c(0x1b2)]{constructor(_0x183f6f=_0x1b4ed2,_0x58ddbb,_0x210eaf){const _0x22a275=_0x22442c;super(),this[_0x22a275(0x1c8)]=_0x183f6f,this[_0x22a275(0x214)]=_0x58ddbb,this[_0x22a275(0x1e0)]=_0x210eaf;const {..._0x2954aa}=_0x1efb3c[_0x22a275(0x1b5)]({},_0x1b4ed2,this['_config']);this[_0x22a275(0x1e0)]['setConfig'](_0x4baf23,_0x2954aa);}[_0x22442c(0x196)](){const _0x55a527=_0x22442c;[[_0x4df6bc],[_0xfe7158],[_0x2ec182]][_0x55a527(0x192)](_0x52906a=>{const _0x3aaa14=_0x55a527;this[_0x3aaa14(0x214)][_0x3aaa14(0x208)](_0x52906a);});}[_0x22442c(0x1fc)](){const _0x57f661=_0x22442c;this['_injector'][_0x57f661(0x1a1)](_0xfe7158),this[_0x57f661(0x214)][_0x57f661(0x1a1)](_0x2ec182);}},_0x315123(_0x374dba['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x1331fb),_0x315123(_0x374dba['UniverThreadCommentDataSourcePlugin'],_0x22442c(0x1f6),_0x1efb3c[_0x22442c(0x1b0)]['UNIVER_UNKNOWN']),_0x374dba[_0x22442c(0x204)]=_0x4bd5a0([_0x1efb3c[_0x22442c(0x1ee)](_0x2e3e25[_0x22442c(0x1cb)],_0x33849b['UniverCollaborationClientPlugin'],_0x8f02c1[_0x22442c(0x21d)]),_0xff5c6d(0x1,_0x1efb3c[_0x22442c(0x19a)](_0x1efb3c[_0x22442c(0x1e9)])),_0xff5c6d(0x2,_0x1efb3c[_0x22442c(0x219)])],_0x374dba[_0x22442c(0x204)]),Object[_0x22442c(0x1fd)](_0x374dba,Symbol[_0x22442c(0x1a9)],{'value':'Module'});}));
1
+ function _0xb5ff(_0x2950c4,_0x485374){const _0x4ba960=_0x4ba9();return _0xb5ff=function(_0xb5ff06,_0x47ea7e){_0xb5ff06=_0xb5ff06-0xa5;let _0x9329da=_0x4ba960[_0xb5ff06];return _0x9329da;},_0xb5ff(_0x2950c4,_0x485374);}(function(_0x1dee9a,_0x47f710){const _0x2b3e32=_0xb5ff,_0x20e539=_0x1dee9a();while(!![]){try{const _0x122eb7=parseInt(_0x2b3e32(0xf4))/0x1+-parseInt(_0x2b3e32(0xd9))/0x2+parseInt(_0x2b3e32(0xd8))/0x3+-parseInt(_0x2b3e32(0x12b))/0x4*(-parseInt(_0x2b3e32(0xeb))/0x5)+parseInt(_0x2b3e32(0xa5))/0x6+-parseInt(_0x2b3e32(0xc1))/0x7*(-parseInt(_0x2b3e32(0xa7))/0x8)+-parseInt(_0x2b3e32(0xed))/0x9;if(_0x122eb7===_0x47f710)break;else _0x20e539['push'](_0x20e539['shift']());}catch(_0x3601a8){_0x20e539['push'](_0x20e539['shift']());}}}(_0x4ba9,0x57e8b),function(_0x586ca1,_0x2b454f){const _0x129ad1=_0xb5ff;typeof exports==_0x129ad1(0xe1)&&typeof module<'u'?_0x2b454f(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==_0x129ad1(0xe5)&&define['amd']?define([_0x129ad1(0xcc),_0x129ad1(0xba),_0x129ad1(0xbb),'@univerjs/core',_0x129ad1(0xc5),_0x129ad1(0xc0),_0x129ad1(0x100),_0x129ad1(0xe8)],_0x2b454f):(_0x586ca1=typeof globalThis<'u'?globalThis:_0x586ca1||self,_0x2b454f(_0x586ca1[_0x129ad1(0xe4)]={},_0x586ca1['UniverProCollaborationClient'],_0x586ca1['UniverProLicense'],_0x586ca1['UniverCore'],_0x586ca1[_0x129ad1(0xe7)],_0x586ca1[_0x129ad1(0xef)],_0x586ca1['rxjs'],_0x586ca1['UniverNetwork']));}(this,function(_0x1824fb,_0xca3e5c,_0x587bb1,_0xab9f20,_0xd8be23,_0x5bed43,_0x541ab7,_0xc5c16c){'use strict';const _0xe9f3a4=_0xb5ff;const _0x356f80=_0xe9f3a4(0xb2);var _0x426f9e=(_0x316a4e=>(_0x316a4e[_0x316a4e['OpenOrReOpen']=0x0]=_0xe9f3a4(0x116),_0x316a4e[_0x316a4e[_0xe9f3a4(0xee)]=0x1]=_0xe9f3a4(0xee),_0x316a4e[_0x316a4e[_0xe9f3a4(0xfd)]=-0x1]=_0xe9f3a4(0xfd),_0x316a4e))(_0x426f9e||{}),_0x596dec=(_0x267c10=>(_0x267c10[_0x267c10['Unknown']=0x0]=_0xe9f3a4(0xf8),_0x267c10[_0x267c10[_0xe9f3a4(0xdc)]=0x1]=_0xe9f3a4(0xdc),_0x267c10[_0x267c10['Reply']=0x2]=_0xe9f3a4(0xc6),_0x267c10[_0x267c10[_0xe9f3a4(0xea)]=0x3]=_0xe9f3a4(0xea),_0x267c10[_0x267c10['Delete']=0x4]=_0xe9f3a4(0x109),_0x267c10[_0x267c10[_0xe9f3a4(0xbe)]=0x5]=_0xe9f3a4(0xbe),_0x267c10[_0x267c10[_0xe9f3a4(0xfd)]=-0x1]=_0xe9f3a4(0xfd),_0x267c10))(_0x596dec||{});const _0x8a87c6=_0x5f3597=>_0xab9f20[_0xe9f3a4(0x10a)](new Date(+_0x5f3597))[_0xe9f3a4(0x11b)](_0xe9f3a4(0xd0)),_0x304fdf=async(_0x465e77,_0x30d6c1)=>{const _0x3ab4c6=_0xe9f3a4,_0x32a284=_0x465e77[_0x3ab4c6(0x10d)](_0xab9f20[_0x3ab4c6(0x108)]),_0x228d6c=_0x465e77[_0x3ab4c6(0x10d)](_0xc5c16c[_0x3ab4c6(0x120)]);_0x30d6c1[_0x3ab4c6(0x110)](_0x1b522d=>{const _0xea251a=_0x3ab4c6;_0x32a284[_0xea251a(0x10c)](_0x1b522d)&&_0x30d6c1[_0xea251a(0x104)](_0x1b522d);}),_0x30d6c1[_0x3ab4c6(0xac)]&&(await _0x228d6c[_0x3ab4c6(0x10d)]('/universer-api/user/list',{'params':{'userIDs':[..._0x30d6c1]}}))[_0x3ab4c6(0xb5)]['users']['forEach'](_0x220bd0=>{const _0x300052=_0x3ab4c6;_0x220bd0&&_0x32a284[_0x300052(0x11c)](_0x220bd0);});};var _0x27d704=Object[_0xe9f3a4(0x128)],_0x1c6669=(_0x397e2b,_0x44a2e2,_0x4446fd,_0x2ea5c1)=>{const _0x2463aa=_0xe9f3a4;for(var _0x588980=_0x2ea5c1>0x1?void 0x0:_0x2ea5c1?_0x27d704(_0x44a2e2,_0x4446fd):_0x44a2e2,_0x586b31=_0x397e2b[_0x2463aa(0xf6)]-0x1,_0x4d3558;_0x586b31>=0x0;_0x586b31--)(_0x4d3558=_0x397e2b[_0x586b31])&&(_0x588980=_0x4d3558(_0x588980)||_0x588980);return _0x588980;},_0x273b00=(_0x500dfe,_0x210789)=>(_0x5c7890,_0xca9bd1)=>_0x210789(_0x5c7890,_0xca9bd1,_0x500dfe);let _0x356766=class extends _0xab9f20[_0xe9f3a4(0x119)]{constructor(_0x420523,_0x387c51,_0x50cfc9,_0x2265fe){const _0x47c9f0=_0xe9f3a4;super(),this[_0x47c9f0(0xfc)]=_0x420523,this[_0x47c9f0(0x127)]=_0x387c51,this['_userService']=_0x50cfc9,this['_injector']=_0x2265fe,this['_init'](),this[_0x47c9f0(0xdd)]();}[_0xe9f3a4(0xdd)](){const _0x3448b5=_0xe9f3a4;this[_0x3448b5(0x111)](this[_0x3448b5(0x127)][_0x3448b5(0xfe)][_0x3448b5(0xe2)](_0x541ab7[_0x3448b5(0xb0)](0x10))['subscribe'](_0x433e69=>{const _0x57d482=_0x3448b5,_0x33790d=new Set();_0x433e69['forEach'](_0x2354cb=>{const _0x11b9e7=_0xb5ff;switch(_0x2354cb[_0x11b9e7(0xdb)]){case _0x11b9e7(0x101):{const _0x57d86e=_0x2354cb[_0x11b9e7(0x12c)][_0x11b9e7(0x11f)];_0x33790d[_0x11b9e7(0x101)](_0x57d86e);break;}}}),_0x304fdf(this[_0x57d482(0xbf)],_0x33790d);}));}[_0xe9f3a4(0xae)](){const _0x5d96a3=_0xe9f3a4;this[_0x5d96a3(0x111)](this[_0x5d96a3(0xfc)][_0x5d96a3(0xfe)][_0x5d96a3(0x114)](async _0x32316d=>{const _0x39a633=_0x5d96a3;var _0x3f65a8,_0x59a9ad,_0xe813c4,_0x51d637;const _0x3d2158=(_0x3f65a8=this[_0x39a633(0x127)][_0x39a633(0xe9)](_0x32316d['unitId'])[_0x39a633(0xc2)](_0x4c7c87=>_0x4c7c87[_0x39a633(0xcf)]===_0x32316d['threadId']))==null?void 0x0:_0x3f65a8[_0x39a633(0xbd)];if(!_0x3d2158)return;const {unitId:_0x5adeb4,subUnitId:_0x54f828}=_0x3d2158;switch(_0x32316d['user']&&this[_0x39a633(0xad)]['addUser'](_0x32316d['user']),_0x32316d[_0x39a633(0xdb)]){case _0x596dec[_0x39a633(0xdc)]:break;case _0x596dec['Reply']:{this['_threadCommentModel'][_0x39a633(0xf5)](_0x5adeb4,_0x54f828,{'unitId':_0x5adeb4,'subUnitId':_0x54f828,'ref':'','id':_0x32316d[_0x39a633(0xa8)],'dT':_0x8a87c6(+_0x32316d[_0x39a633(0x112)]),'threadId':_0x32316d[_0x39a633(0xcf)],'personId':(_0xe813c4=(_0x59a9ad=_0x32316d[_0x39a633(0x10b)])==null?void 0x0:_0x59a9ad[_0x39a633(0x129)])!=null?_0xe813c4:_0x32316d[_0x39a633(0xcd)],'text':JSON[_0x39a633(0xb9)](_0x32316d[_0x39a633(0x11a)]),'parentId':_0x3d2158['id']});break;}case _0x596dec[_0x39a633(0x109)]:{const _0x3bcc7c=this['_threadCommentModel']['getComment'](_0x5adeb4,_0x54f828,_0x32316d[_0x39a633(0xa8)]);_0x3bcc7c&&_0x3bcc7c['parentId']&&this[_0x39a633(0x127)][_0x39a633(0x118)](_0x5adeb4,_0x54f828,_0x32316d['replyId']);break;}case _0x596dec[_0x39a633(0xea)]:{this[_0x39a633(0x127)][_0x39a633(0xd7)](_0x5adeb4,_0x54f828,{'commentId':_0x32316d[_0x39a633(0xa8)],'text':JSON[_0x39a633(0xb9)](_0x32316d[_0x39a633(0x11a)])});break;}case _0x596dec[_0x39a633(0xbe)]:{const _0x528fd6=(_0x51d637=this['_threadCommentModel'][_0x39a633(0xe9)](_0x32316d[_0x39a633(0x11e)])[_0x39a633(0xc2)](_0x224478=>_0x224478['threadId']===_0x32316d[_0x39a633(0xcf)]))==null?void 0x0:_0x51d637[_0x39a633(0xbd)];_0x528fd6&&this[_0x39a633(0x127)][_0x39a633(0xc9)](_0x5adeb4,_0x54f828,_0x528fd6['id'],_0x32316d[_0x39a633(0xa6)]===_0x426f9e[_0x39a633(0xee)]);break;}}}));}};_0x356766=_0x1c6669([_0x273b00(0x0,_0xab9f20[_0xe9f3a4(0x105)](_0xca3e5c[_0xe9f3a4(0xe6)])),_0x273b00(0x1,_0xab9f20['Inject'](_0x5bed43[_0xe9f3a4(0xfb)])),_0x273b00(0x2,_0xab9f20[_0xe9f3a4(0x105)](_0xab9f20['UserManagerService'])),_0x273b00(0x3,_0xab9f20[_0xe9f3a4(0x105)](_0xab9f20['Injector']))],_0x356766);const _0x31b4e8=_0xe9f3a4(0xd5),_0x54e5b0={};var _0x5761c0=Object['getOwnPropertyDescriptor'],_0x3c7761=(_0x8840e7,_0x57a2cf,_0x10f7af,_0x97f61f)=>{const _0x440f40=_0xe9f3a4;for(var _0x184689=_0x97f61f>0x1?void 0x0:_0x97f61f?_0x5761c0(_0x57a2cf,_0x10f7af):_0x57a2cf,_0x42a98c=_0x8840e7[_0x440f40(0xf6)]-0x1,_0x1b3536;_0x42a98c>=0x0;_0x42a98c--)(_0x1b3536=_0x8840e7[_0x42a98c])&&(_0x184689=_0x1b3536(_0x184689)||_0x184689);return _0x184689;},_0x36abe4=(_0x49e4e2,_0x292312)=>(_0x377697,_0x574acb)=>_0x292312(_0x377697,_0x574acb,_0x49e4e2);function _0x38e97a(_0x281f52,_0x347328){const _0x3d4dfb=_0xe9f3a4,_0x23b276=_0x281f52[_0x3d4dfb(0xc8)][0x0];return{..._0x347328,'id':_0x23b276[_0x3d4dfb(0xa8)],'resolved':_0x281f52[_0x3d4dfb(0xa6)]===0x1,'dT':_0x8a87c6(_0x23b276[_0x3d4dfb(0x112)]),'personId':_0x23b276['userId'],'threadId':_0x23b276[_0x3d4dfb(0xcf)]};}function _0x2a36a4(_0x4d7536,_0xf1f796,_0x5e7f81){const _0x54533a=_0xe9f3a4;var _0x586161,_0x37acb3;if(((_0x37acb3=(_0x586161=_0x4d7536==null?void 0x0:_0x4d7536[_0x54533a(0xc8)])==null?void 0x0:_0x586161[_0x54533a(0xf6)])!=null?_0x37acb3:0x0)>0x0){const _0x2fedf3=(_0x57e0e1,_0x28e0e0)=>({'id':_0x57e0e1[_0x54533a(0xa8)],'threadId':_0x57e0e1['threadId'],'dT':_0x8a87c6(_0x57e0e1[_0x54533a(0x112)]),'personId':_0x57e0e1['userId'],'resolved':_0x4d7536[_0x54533a(0xa6)]===_0x426f9e[_0x54533a(0xee)],'unitId':_0xf1f796,'subUnitId':_0x5e7f81,'text':JSON[_0x54533a(0xb9)](_0x57e0e1[_0x54533a(0x11a)]),'parentId':_0x28e0e0}),_0x421e3e=_0x2fedf3(_0x4d7536[_0x54533a(0xc8)][0x0]);return{..._0x421e3e,'children':_0x4d7536[_0x54533a(0xc8)][_0x54533a(0x125)](0x1)[_0x54533a(0xde)](_0x3bab27=>_0x2fedf3(_0x3bab27,_0x421e3e['id']))};}return null;}let _0x2d33a4=class{constructor(_0x18df07,_0xacb44c,_0xff1e15,_0x2ccc0d){const _0x94cffe=_0xe9f3a4;this[_0x94cffe(0xec)]=_0x18df07,this[_0x94cffe(0xad)]=_0xacb44c,this[_0x94cffe(0xbc)]=_0xff1e15,this[_0x94cffe(0xbf)]=_0x2ccc0d;}async['addComment'](_0x305f15){const _0x488e51=_0xe9f3a4;var _0x49d6f7,_0x1ffe6a;const {parentId:_0x49fcb1,unitId:_0x7398eb,text:_0xfb04cb,threadId:_0x432e91}=_0x305f15,_0x5d0cc5=(_0x1ffe6a=(_0x49d6f7=_0xfb04cb['customRanges'])==null?void 0x0:_0x49d6f7[_0x488e51(0x12a)](_0x4744af=>_0x4744af['rangeType']===_0xab9f20[_0x488e51(0xda)][_0x488e51(0x124)])[_0x488e51(0xde)](_0x2096bd=>_0x2096bd['rangeId']))!=null?_0x1ffe6a:[],_0x201a73=JSON[_0x488e51(0xc3)](_0xfb04cb),_0x2ecd09=(await this[_0x488e51(0xbc)]['requireSession'](_0x7398eb))['getMemberID']();if(_0x49fcb1){const _0x35ccec={'memberId':_0x2ecd09,'unitId':_0x7398eb,'content':_0x201a73,'mention':_0x5d0cc5,'threadId':_0x432e91},_0x663406=(await this[_0x488e51(0xec)][_0x488e51(0x122)]('/universer-api/comment/unit/'+_0x7398eb+_0x488e51(0xdf),{'body':_0x35ccec}))['body']['reply'];return{..._0x305f15,'id':_0x663406[_0x488e51(0xa8)],'dT':_0xab9f20[_0x488e51(0x10a)](+_0x663406['createTimestamp'])[_0x488e51(0x11b)](_0x488e51(0xd0)),'personId':_0x663406[_0x488e51(0xcd)]};}else{const _0x5edd3a={'memberId':_0x2ecd09,'unitId':_0x7398eb,'content':_0x201a73,'mention':_0x5d0cc5},_0x3eddc9=await this[_0x488e51(0xec)][_0x488e51(0x122)](_0x488e51(0x126)+_0x7398eb+_0x488e51(0xca),{'body':_0x5edd3a});return _0x38e97a(_0x3eddc9[_0x488e51(0xb5)][_0x488e51(0xd4)],_0x305f15);}}async[_0xe9f3a4(0xd7)](_0x228b8b){const _0x3951bb=_0xe9f3a4;var _0x198b19,_0x549f43;const {text:_0x116267,unitId:_0x14781f}=_0x228b8b,_0x234d04=(_0x549f43=(_0x198b19=_0x116267[_0x3951bb(0xf0)])==null?void 0x0:_0x198b19[_0x3951bb(0x12a)](_0x246a7f=>_0x246a7f[_0x3951bb(0x102)]===_0xab9f20[_0x3951bb(0xda)][_0x3951bb(0x124)])[_0x3951bb(0xde)](_0x1fe575=>_0x1fe575[_0x3951bb(0x11d)]))!=null?_0x549f43:[],_0x3a69ae=JSON[_0x3951bb(0xc3)](_0x116267),_0x5db571=_0x228b8b[_0x3951bb(0xcf)],_0x21c9eb=_0x228b8b['id'],_0x331793={'memberId':(await this[_0x3951bb(0xbc)][_0x3951bb(0x123)](_0x14781f))[_0x3951bb(0xce)](),'unitId':_0x14781f,'threadId':_0x5db571,'mention':_0x234d04,'content':_0x3a69ae,'replyId':_0x21c9eb},_0x2d9859=await this[_0x3951bb(0xec)][_0x3951bb(0x122)](_0x3951bb(0x126)+_0x14781f+_0x3951bb(0xe0),{'body':_0x331793});return!_0x2d9859['body'][_0x3951bb(0x113)]||_0x2d9859[_0x3951bb(0xb5)][_0x3951bb(0x113)][_0x3951bb(0x10e)]===0x1;}async[_0xe9f3a4(0xc9)](_0x4d084e){const _0x256ba1=_0xe9f3a4,{unitId:_0x1a2a1e}=_0x4d084e,_0x522c4f=_0x4d084e[_0x256ba1(0xcf)],_0x59d72f={'memberId':this['_userService'][_0x256ba1(0xb8)]()[_0x256ba1(0x129)],'unitId':_0x1a2a1e,'threadId':_0x522c4f,'solved':_0x4d084e[_0x256ba1(0xd2)]?_0x426f9e[_0x256ba1(0xee)]:_0x426f9e[_0x256ba1(0x116)]},_0x29ec4f=await this[_0x256ba1(0xec)]['post'](_0x256ba1(0x126)+_0x1a2a1e+'/solved',{'body':_0x59d72f});return!_0x29ec4f[_0x256ba1(0xb5)][_0x256ba1(0x113)]||_0x29ec4f['body'][_0x256ba1(0x113)][_0x256ba1(0x10e)]===0x1;}async['deleteComment'](_0x4b6fca,_0x4b5021,_0x2f36bb,_0x1b6390){const _0x46ddc6=_0xe9f3a4,_0x403742={'memberId':(await this['_sessionService'][_0x46ddc6(0x123)](_0x4b6fca))[_0x46ddc6(0xce)](),'threadId':_0x2f36bb,'replyId':_0x1b6390,'unitId':_0x4b6fca},_0xec3413=await this['_httpService'][_0x46ddc6(0x122)](_0x46ddc6(0x126)+_0x4b6fca+_0x46ddc6(0xa9),{'body':_0x403742});return!_0xec3413[_0x46ddc6(0xb5)][_0x46ddc6(0x113)]||_0xec3413[_0x46ddc6(0xb5)]['error'][_0x46ddc6(0x10e)]===0x1;}async['listComments'](_0x462a12,_0x35ff38,_0x555ec7){const _0x27344c=_0xe9f3a4,_0x16c530={'unitId':_0x462a12,'threadId':_0x555ec7},_0x594387=await this[_0x27344c(0xec)]['post'](_0x27344c(0x126)+_0x462a12+_0x27344c(0xc7),{'body':_0x16c530}),_0x575260=_0x555ec7[_0x27344c(0xde)](_0x4bf743=>_0x2a36a4(_0x594387['body'][_0x27344c(0x107)][_0x4bf743],_0x462a12,_0x35ff38))[_0x27344c(0x12a)](Boolean);return Object[_0x27344c(0x121)](_0x594387[_0x27344c(0xb5)][_0x27344c(0xe3)])[_0x27344c(0x110)](_0x3e33b6=>{const _0x36339e=_0x27344c;this[_0x36339e(0xad)][_0x36339e(0x11c)](_0x3e33b6);}),_0x575260;}[_0xe9f3a4(0x10f)](_0x4b1572){const _0x2ff207=_0xe9f3a4;return{'id':_0x4b1572['id'],'threadId':_0x4b1572[_0x2ff207(0xcf)],'ref':_0x4b1572[_0x2ff207(0x106)]};}};_0x2d33a4=_0x3c7761([_0x36abe4(0x0,_0xab9f20[_0xe9f3a4(0x105)](_0xc5c16c[_0xe9f3a4(0x120)])),_0x36abe4(0x1,_0xab9f20[_0xe9f3a4(0x105)](_0xab9f20[_0xe9f3a4(0x108)])),_0x36abe4(0x2,_0xab9f20['Inject'](_0xca3e5c[_0xe9f3a4(0xd3)])),_0x36abe4(0x3,_0xab9f20['Inject'](_0xab9f20[_0xe9f3a4(0xb6)]))],_0x2d33a4);var _0x261192=Object['getOwnPropertyDescriptor'],_0x53c2f9=(_0x489e64,_0x103186,_0x5ea6a3,_0x273a14)=>{const _0x5c2b49=_0xe9f3a4;for(var _0x15b68b=_0x273a14>0x1?void 0x0:_0x273a14?_0x261192(_0x103186,_0x5ea6a3):_0x103186,_0x45919e=_0x489e64[_0x5c2b49(0xf6)]-0x1,_0x2bb198;_0x45919e>=0x0;_0x45919e--)(_0x2bb198=_0x489e64[_0x45919e])&&(_0x15b68b=_0x2bb198(_0x15b68b)||_0x15b68b);return _0x15b68b;},_0x1fb187=(_0x51214c,_0x1e84a1)=>(_0x511209,_0x460259)=>_0x1e84a1(_0x511209,_0x460259,_0x51214c);let _0x41e2a1=class extends _0xab9f20[_0xe9f3a4(0x119)]{constructor(_0xbd22fc,_0x4fdeac){const _0x869cfd=_0xe9f3a4;super(),this[_0x869cfd(0xd6)]=_0xbd22fc,this[_0x869cfd(0xcb)]=_0x4fdeac,this[_0x869cfd(0xaa)]();}[_0xe9f3a4(0xaa)](){const _0x13c5f9=_0xe9f3a4;this[_0x13c5f9(0xd6)]['dataSource']=this[_0x13c5f9(0xcb)],this[_0x13c5f9(0xd6)]['syncUpdateMutationToColla']=!0x1;}};_0x41e2a1=_0x53c2f9([_0x1fb187(0x0,_0x5bed43[_0xe9f3a4(0xff)]),_0x1fb187(0x1,_0xab9f20[_0xe9f3a4(0x105)](_0x2d33a4))],_0x41e2a1);var _0x125f2e=Object[_0xe9f3a4(0xf7)],_0x2955bb=Object[_0xe9f3a4(0x128)],_0x231f7e=(_0x2ba0c6,_0x3d1a79,_0x2cb45f)=>_0x3d1a79 in _0x2ba0c6?_0x125f2e(_0x2ba0c6,_0x3d1a79,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2cb45f}):_0x2ba0c6[_0x3d1a79]=_0x2cb45f,_0x489996=(_0x5ed791,_0x110c6d,_0x2b34a0,_0x4a2710)=>{const _0x3fd8e2=_0xe9f3a4;for(var _0x506f52=_0x4a2710>0x1?void 0x0:_0x4a2710?_0x2955bb(_0x110c6d,_0x2b34a0):_0x110c6d,_0x4a35da=_0x5ed791[_0x3fd8e2(0xf6)]-0x1,_0x28dc07;_0x4a35da>=0x0;_0x4a35da--)(_0x28dc07=_0x5ed791[_0x4a35da])&&(_0x506f52=_0x28dc07(_0x506f52)||_0x506f52);return _0x506f52;},_0x152736=(_0x3484b0,_0x2f13ac)=>(_0x2f37e9,_0x4805d2)=>_0x2f13ac(_0x2f37e9,_0x4805d2,_0x3484b0),_0x3aa028=(_0x1567a8,_0x210649,_0xbf7559)=>_0x231f7e(_0x1567a8,typeof _0x210649!=_0xe9f3a4(0xfa)?_0x210649+'':_0x210649,_0xbf7559);_0x1824fb[_0xe9f3a4(0x103)]=class extends _0xab9f20[_0xe9f3a4(0xb3)]{constructor(_0x260acc=_0x54e5b0,_0x1a444d,_0x29cf61){const _0x2f2fdb=_0xe9f3a4;super(),this[_0x2f2fdb(0xb1)]=_0x260acc,this[_0x2f2fdb(0xbf)]=_0x1a444d,this[_0x2f2fdb(0xf9)]=_0x29cf61;const {..._0x9e3cb1}=_0xab9f20[_0x2f2fdb(0x117)]({},_0x54e5b0,this[_0x2f2fdb(0xb1)]);this['_configService']['setConfig'](_0x31b4e8,_0x9e3cb1);}[_0xe9f3a4(0xf3)](){const _0x526b89=_0xe9f3a4;[[_0x2d33a4],[_0x41e2a1],[_0x356766]][_0x526b89(0x110)](_0x134292=>{const _0x3933cf=_0x526b89;this[_0x3933cf(0xbf)][_0x3933cf(0x101)](_0x134292);});}[_0xe9f3a4(0x115)](){const _0x4bff9c=_0xe9f3a4;this[_0x4bff9c(0xbf)]['get'](_0x41e2a1),this['_injector'][_0x4bff9c(0x10d)](_0x356766);}},_0x3aa028(_0x1824fb[_0xe9f3a4(0x103)],_0xe9f3a4(0xc4),_0x356f80),_0x3aa028(_0x1824fb[_0xe9f3a4(0x103)],_0xe9f3a4(0xdb),_0xab9f20[_0xe9f3a4(0xb4)][_0xe9f3a4(0xd1)]),_0x1824fb[_0xe9f3a4(0x103)]=_0x489996([_0xab9f20[_0xe9f3a4(0xab)](_0xd8be23['UniverThreadCommentUIPlugin'],_0xca3e5c[_0xe9f3a4(0xf2)],_0x587bb1['UniverLicensePlugin']),_0x152736(0x1,_0xab9f20[_0xe9f3a4(0x105)](_0xab9f20[_0xe9f3a4(0xb6)])),_0x152736(0x2,_0xab9f20[_0xe9f3a4(0xf1)])],_0x1824fb[_0xe9f3a4(0x103)]),Object[_0xe9f3a4(0xf7)](_0x1824fb,Symbol[_0xe9f3a4(0xaf)],{'value':_0xe9f3a4(0xb7)});}));function _0x4ba9(){const _0x5d0903=['symbol','ThreadCommentModel','_commentService','UNRECOGNIZED','commentUpdate$','IThreadCommentDataSourceService','rxjs','add','rangeType','UniverThreadCommentDataSourcePlugin','delete','Inject','ref','comments','UserManagerService','Delete','dayjs','user','getUser','get','code','saveCommentToSnapshot','forEach','disposeWithMe','createTimestamp','error','subscribe','onReady','OpenOrReOpen','merge','deleteComment','Disposable','content','format','addUser','rangeId','unitId','personId','HTTPService','values','post','requireSession','COMMENT','slice','/universer-api/comment/unit/','_threadCommentModel','getOwnPropertyDescriptor','userID','filter','4XbtsNi','payload','2472798kNNZdY','solved','1784UYNzSk','replyId','/delete','_initDataSource','DependentOn','size','_userService','_init','toStringTag','bufferTime','_config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Plugin','UniverInstanceType','body','Injector','Module','getCurrentUser','parse','@univerjs-pro/collaboration-client','@univerjs-pro/license','_sessionService','root','Solve','_injector','@univerjs/thread-comment','7707LToQRJ','find','stringify','pluginName','@univerjs/thread-comment-ui','Reply','/list','replies','resolveComment','/add','_threadCommentDataSource','exports','userId','getMemberID','threadId','YYYY/MM/DD\x20HH:mm','UNIVER_UNKNOWN','resolved','CollaborationSessionService','comment','thread-comment-data-source.config','_threadCommentDataSourceService','updateComment','249828qIWRuw','507922JXbjQT','CustomRangeType','type','Add','_initUserSync','map','/reply','/edit','object','pipe','users','UniverProThreadCommentDatasource','function','CommentService','UniverThreadCommentUi','@univerjs/network','getUnit','Edit','261735fRafxj','_httpService','7163748svHdRL','Solved','UniverThreadComment','customRanges','IConfigService','UniverCollaborationClientPlugin','onStarting','616729TPJFHK','addComment','length','defineProperty','Unknown','_configService'];_0x4ba9=function(){return _0x5d0903;};return _0x4ba9();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.9.1-nightly.202507101607",
3
+ "version": "0.9.2-nightly.202507111607",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.9.1-nightly.202507101607",
49
- "@univerjs-pro/license": "0.9.1-nightly.202507101607",
50
- "@univerjs/core": "0.9.1-nightly.202507101607",
51
- "@univerjs/network": "0.9.1-nightly.202507101607",
52
- "@univerjs/protocol": "0.1.47-alpha.0",
53
- "@univerjs/thread-comment": "0.9.1-nightly.202507101607",
54
- "@univerjs/thread-comment-ui": "0.9.1-nightly.202507101607"
48
+ "@univerjs-pro/collaboration-client": "0.9.2-nightly.202507111607",
49
+ "@univerjs-pro/license": "0.9.2-nightly.202507111607",
50
+ "@univerjs/network": "0.9.2-nightly.202507111607",
51
+ "@univerjs/thread-comment": "0.9.2-nightly.202507111607",
52
+ "@univerjs/thread-comment-ui": "0.9.2-nightly.202507111607",
53
+ "@univerjs/core": "0.9.2-nightly.202507111607",
54
+ "@univerjs/protocol": "0.1.47-alpha.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.8.3",
59
59
  "vite": "^6.3.5",
60
60
  "vitest": "^3.2.4",
61
- "@univerjs-infra/shared": "0.9.1"
61
+ "@univerjs-infra/shared": "0.9.2"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",