@univerjs-pro/thread-comment-datasource 0.10.3-experimental.20250812-b4b6f1a → 0.10.3-nightly.202508121228

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 _0x4e17d9=_0x3823;(function(_0xb29057,_0x5387e0){const _0x4adaa9=_0x3823,_0x225e72=_0xb29057();while(!![]){try{const _0x3f7496=parseInt(_0x4adaa9(0x11a))/0x1*(-parseInt(_0x4adaa9(0x12d))/0x2)+-parseInt(_0x4adaa9(0x109))/0x3*(-parseInt(_0x4adaa9(0xee))/0x4)+parseInt(_0x4adaa9(0x13b))/0x5+parseInt(_0x4adaa9(0x136))/0x6+-parseInt(_0x4adaa9(0x10e))/0x7*(-parseInt(_0x4adaa9(0x12f))/0x8)+parseInt(_0x4adaa9(0xf4))/0x9+-parseInt(_0x4adaa9(0x100))/0xa;if(_0x3f7496===_0x5387e0)break;else _0x225e72['push'](_0x225e72['shift']());}catch(_0xd7ce1b){_0x225e72['push'](_0x225e72['shift']());}}}(_0x12be,0x796cd));Object[_0x4e17d9(0x130)](exports,Symbol['toStringTag'],{'value':_0x4e17d9(0x129)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x4e17d9(0xf1);var I=(_0x145e10=>(_0x145e10[_0x145e10[_0x4e17d9(0xf9)]=0x0]='OpenOrReOpen',_0x145e10[_0x145e10[_0x4e17d9(0x112)]=0x1]=_0x4e17d9(0x112),_0x145e10[_0x145e10[_0x4e17d9(0x108)]=-0x1]='UNRECOGNIZED',_0x145e10))(I||{}),v=(_0xac5613=>(_0xac5613[_0xac5613[_0x4e17d9(0xdd)]=0x0]=_0x4e17d9(0xdd),_0xac5613[_0xac5613['Add']=0x1]='Add',_0xac5613[_0xac5613[_0x4e17d9(0x12a)]=0x2]=_0x4e17d9(0x12a),_0xac5613[_0xac5613[_0x4e17d9(0x133)]=0x3]=_0x4e17d9(0x133),_0xac5613[_0xac5613[_0x4e17d9(0xed)]=0x4]=_0x4e17d9(0xed),_0xac5613[_0xac5613['Solve']=0x5]=_0x4e17d9(0x117),_0xac5613[_0xac5613[_0x4e17d9(0x108)]=-0x1]=_0x4e17d9(0x108),_0xac5613))(v||{});const f=_0x4a397d=>c[_0x4e17d9(0x122)](new Date(+_0x4a397d))['format'](_0x4e17d9(0xdf)),R=async(_0x477e5e,_0x2d7a16)=>{const _0xb1531e=_0x4e17d9,_0x1f9d41=_0x477e5e[_0xb1531e(0x11c)](c[_0xb1531e(0x11b)]),_0x1e0074=_0x477e5e[_0xb1531e(0x11c)](P[_0xb1531e(0x137)]);_0x2d7a16[_0xb1531e(0x141)](_0x45b6ba=>{_0x1f9d41['getUser'](_0x45b6ba)&&_0x2d7a16['delete'](_0x45b6ba);}),_0x2d7a16[_0xb1531e(0x110)]&&(await _0x1e0074['get'](_0xb1531e(0xe9),{'params':{'userIDs':[..._0x2d7a16]}}))[_0xb1531e(0x121)][_0xb1531e(0x126)][_0xb1531e(0x141)](_0x31d795=>{const _0x19ac06=_0xb1531e;_0x31d795&&_0x1f9d41[_0x19ac06(0xfe)](_0x31d795);});};var $=Object[_0x4e17d9(0x10b)],E=(_0xa820e2,_0x48a996,_0x3579fe,_0x1e1f0f)=>{for(var _0x1272f2=_0x1e1f0f>0x1?void 0x0:_0x1e1f0f?$(_0x48a996,_0x3579fe):_0x48a996,_0x3db5a5=_0xa820e2['length']-0x1,_0x54098d;_0x3db5a5>=0x0;_0x3db5a5--)(_0x54098d=_0xa820e2[_0x3db5a5])&&(_0x1272f2=_0x54098d(_0x1272f2)||_0x1272f2);return _0x1272f2;},S=(_0x46e83c,_0x11630a)=>(_0x580307,_0x16a374)=>_0x11630a(_0x580307,_0x16a374,_0x46e83c);let _=class extends c['Disposable']{constructor(_0x69ac87,_0x1ead45,_0x4d0706,_0x5c591a){const _0x171005=_0x4e17d9;super(),this['_commentService']=_0x69ac87,this[_0x171005(0x10f)]=_0x1ead45,this['_userService']=_0x4d0706,this[_0x171005(0x147)]=_0x5c591a,this['_init'](),this[_0x171005(0x13a)]();}[_0x4e17d9(0x13a)](){const _0x4d506f=_0x4e17d9;this['disposeWithMe'](this[_0x4d506f(0x10f)]['commentUpdate$'][_0x4d506f(0xda)](j[_0x4d506f(0x106)](0x10))['subscribe'](_0x3b7b4f=>{const _0x8ac26=_0x4d506f,_0x200455=new Set();_0x3b7b4f[_0x8ac26(0x141)](_0x3efb93=>{const _0x576d0f=_0x8ac26;switch(_0x3efb93['type']){case'add':{const _0x3e51b3=_0x3efb93[_0x576d0f(0x119)][_0x576d0f(0xd1)];_0x200455[_0x576d0f(0xe2)](_0x3e51b3);break;}}}),R(this['_injector'],_0x200455);}));}[_0x4e17d9(0x127)](){const _0x35d0c0=_0x4e17d9;this[_0x35d0c0(0xf3)](this[_0x35d0c0(0x111)][_0x35d0c0(0x132)][_0x35d0c0(0xea)](async _0x342afb=>{const _0x3c4237=_0x35d0c0;var _0x379990,_0x2e0bad,_0x25e331,_0x55adc5;const _0x3d9750=(_0x379990=this[_0x3c4237(0x10f)][_0x3c4237(0xec)](_0x342afb[_0x3c4237(0x138)])[_0x3c4237(0xfb)](_0x34d9b2=>_0x34d9b2[_0x3c4237(0xd9)]===_0x342afb[_0x3c4237(0xd9)]))==null?void 0x0:_0x379990[_0x3c4237(0xff)];if(!_0x3d9750)return;const {unitId:_0x26ec77,subUnitId:_0x1c55fe}=_0x3d9750;switch(_0x342afb[_0x3c4237(0x113)]&&this[_0x3c4237(0xf2)][_0x3c4237(0xfe)](_0x342afb[_0x3c4237(0x113)]),_0x342afb[_0x3c4237(0x145)]){case v[_0x3c4237(0x10d)]:break;case v[_0x3c4237(0x12a)]:{this['_threadCommentModel']['addComment'](_0x26ec77,_0x1c55fe,{'unitId':_0x26ec77,'subUnitId':_0x1c55fe,'ref':'','id':_0x342afb[_0x3c4237(0x13f)],'dT':f(+_0x342afb[_0x3c4237(0xfd)]),'threadId':_0x342afb[_0x3c4237(0xd9)],'personId':(_0x25e331=(_0x2e0bad=_0x342afb['user'])==null?void 0x0:_0x2e0bad['userID'])!=null?_0x25e331:_0x342afb[_0x3c4237(0x120)],'text':JSON[_0x3c4237(0x116)](_0x342afb[_0x3c4237(0xef)]),'parentId':_0x3d9750['id']});break;}case v[_0x3c4237(0xed)]:{const _0x42cef3=this[_0x3c4237(0x10f)][_0x3c4237(0xe7)](_0x26ec77,_0x1c55fe,_0x342afb['replyId']);_0x42cef3&&_0x42cef3['parentId']&&this[_0x3c4237(0x10f)]['deleteComment'](_0x26ec77,_0x1c55fe,_0x342afb[_0x3c4237(0x13f)]);break;}case v[_0x3c4237(0x133)]:{this[_0x3c4237(0x10f)][_0x3c4237(0xe3)](_0x26ec77,_0x1c55fe,{'commentId':_0x342afb[_0x3c4237(0x13f)],'text':JSON['parse'](_0x342afb[_0x3c4237(0xef)])});break;}case v[_0x3c4237(0x117)]:{const _0x24650f=(_0x55adc5=this[_0x3c4237(0x10f)][_0x3c4237(0xec)](_0x342afb[_0x3c4237(0x138)])[_0x3c4237(0xfb)](_0x374a74=>_0x374a74[_0x3c4237(0xd9)]===_0x342afb[_0x3c4237(0xd9)]))==null?void 0x0:_0x55adc5['root'];_0x24650f&&this[_0x3c4237(0x10f)]['resolveComment'](_0x26ec77,_0x1c55fe,_0x24650f['id'],_0x342afb[_0x3c4237(0xce)]===I[_0x3c4237(0x112)]);break;}}}));}};_=E([S(0x0,c[_0x4e17d9(0xd4)](b[_0x4e17d9(0x123)])),S(0x1,c['Inject'](M[_0x4e17d9(0x144)])),S(0x2,c[_0x4e17d9(0xd4)](c[_0x4e17d9(0x11b)])),S(0x3,c[_0x4e17d9(0xd4)](c[_0x4e17d9(0x13e)]))],_);const q=_0x4e17d9(0xd7),D={};function _0x12be(){const _0x37e88a=['personId','_configService','comments','Inject','DependentOn','COMMENT','thread-comment-data-source.config','CustomRangeType','threadId','pipe','_sessionService','pluginName','Unknown','Plugin','YYYY/MM/DD\x20HH:mm','values','getMemberID','add','updateComment','/add','comment','/solved','getComment','dataSource','/universer-api/user/list','subscribe','IThreadCommentDataSourceService','getUnit','Delete','202556rTHpDe','content','listComments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_userService','disposeWithMe','4658085rtefFO','map','/reply','UniverCollaborationClientPlugin','UniverThreadCommentUIPlugin','OpenOrReOpen','CollaborationSessionService','find','Disposable','createTimestamp','addUser','root','18651000UOUOUW','_threadCommentDataSource','_threadCommentDataSourceService','deleteComment','reply','_initDataSource','bufferTime','post','UNRECOGNIZED','6nkrmUS','UniverLicensePlugin','getOwnPropertyDescriptor','symbol','Add','1505HenaNg','_threadCommentModel','size','_commentService','Solved','user','filter','resolveComment','parse','Solve','/delete','payload','44LbftRN','UserManagerService','get','resolved','IConfigService','customRanges','userId','body','dayjs','CommentService','_httpService','code','users','_init','error','Module','Reply','length','onStarting','22854zLsdaG','requireSession','31880KgLHof','defineProperty','_config','commentUpdate$','Edit','onReady','UniverThreadCommentDataSourcePlugin','5964006OqygSC','HTTPService','unitId','addComment','_initUserSync','1978130lBzAvl','setConfig','stringify','Injector','replyId','/universer-api/comment/unit/','forEach','merge','replies','ThreadCommentModel','type','rangeType','_injector','UNIVER_UNKNOWN','solved','rangeId','userID'];_0x12be=function(){return _0x37e88a;};return _0x12be();}var A=Object[_0x4e17d9(0x10b)],x=(_0x2eb4ac,_0x268727,_0x11aaf8,_0xe65d0c)=>{const _0x28e1b1=_0x4e17d9;for(var _0x53b2f4=_0xe65d0c>0x1?void 0x0:_0xe65d0c?A(_0x268727,_0x11aaf8):_0x268727,_0x4dcb1e=_0x2eb4ac[_0x28e1b1(0x12b)]-0x1,_0x137b0c;_0x4dcb1e>=0x0;_0x4dcb1e--)(_0x137b0c=_0x2eb4ac[_0x4dcb1e])&&(_0x53b2f4=_0x137b0c(_0x53b2f4)||_0x53b2f4);return _0x53b2f4;},C=(_0x54e97a,_0x290d5e)=>(_0x28bed3,_0x248d72)=>_0x290d5e(_0x28bed3,_0x248d72,_0x54e97a);function Y(_0x3ada4e,_0x11d4ee){const _0x44b437=_0x4e17d9,_0x354407=_0x3ada4e[_0x44b437(0x143)][0x0];return{..._0x11d4ee,'id':_0x354407[_0x44b437(0x13f)],'resolved':_0x3ada4e[_0x44b437(0xce)]===0x1,'dT':f(_0x354407[_0x44b437(0xfd)]),'personId':_0x354407[_0x44b437(0x120)],'threadId':_0x354407[_0x44b437(0xd9)]};}function G(_0x4fbd4e,_0x183c75,_0x8309ce){const _0x18d4f0=_0x4e17d9;var _0x41606e,_0x3dc0b1;if(((_0x3dc0b1=(_0x41606e=_0x4fbd4e==null?void 0x0:_0x4fbd4e[_0x18d4f0(0x143)])==null?void 0x0:_0x41606e[_0x18d4f0(0x12b)])!=null?_0x3dc0b1:0x0)>0x0){const _0x4939f1=(_0x47dcef,_0x259023)=>({'id':_0x47dcef[_0x18d4f0(0x13f)],'threadId':_0x47dcef[_0x18d4f0(0xd9)],'dT':f(_0x47dcef[_0x18d4f0(0xfd)]),'personId':_0x47dcef['userId'],'resolved':_0x4fbd4e[_0x18d4f0(0xce)]===I['Solved'],'unitId':_0x183c75,'subUnitId':_0x8309ce,'text':JSON[_0x18d4f0(0x116)](_0x47dcef['content']),'parentId':_0x259023}),_0xb36bbc=_0x4939f1(_0x4fbd4e[_0x18d4f0(0x143)][0x0]);return{..._0xb36bbc,'children':_0x4fbd4e[_0x18d4f0(0x143)]['slice'](0x1)[_0x18d4f0(0xf5)](_0x2abdac=>_0x4939f1(_0x2abdac,_0xb36bbc['id']))};}return null;}let p=class{constructor(_0x49ccc4,_0x376817,_0x3f9ff2){const _0x214a91=_0x4e17d9;this[_0x214a91(0x124)]=_0x49ccc4,this[_0x214a91(0xf2)]=_0x376817,this[_0x214a91(0xdb)]=_0x3f9ff2;}async[_0x4e17d9(0x139)](_0x4f8dc5){const _0x1327b0=_0x4e17d9;var _0x5c51cb,_0x9d0b24;const {parentId:_0x94b0e7,unitId:_0x5b2992,text:_0x52e12f,threadId:_0x2cdbdb}=_0x4f8dc5,_0x8c1907=(_0x9d0b24=(_0x5c51cb=_0x52e12f[_0x1327b0(0x11f)])==null?void 0x0:_0x5c51cb['filter'](_0x281cfe=>_0x281cfe['rangeType']===c[_0x1327b0(0xd8)][_0x1327b0(0xd6)])['map'](_0x7168e8=>_0x7168e8[_0x1327b0(0xcf)]))!=null?_0x9d0b24:[],_0x167be7=JSON['stringify'](_0x52e12f),_0x49b65a=(await this['_sessionService']['requireSession'](_0x5b2992))[_0x1327b0(0xe1)]();if(_0x94b0e7){const _0x298611={'memberId':_0x49b65a,'unitId':_0x5b2992,'content':_0x167be7,'mention':_0x8c1907,'threadId':_0x2cdbdb},_0x50f763=(await this[_0x1327b0(0x124)][_0x1327b0(0x107)](_0x1327b0(0x140)+_0x5b2992+_0x1327b0(0xf6),{'body':_0x298611}))[_0x1327b0(0x121)][_0x1327b0(0x104)];return{..._0x4f8dc5,'id':_0x50f763['replyId'],'dT':c['dayjs'](+_0x50f763['createTimestamp'])['format'](_0x1327b0(0xdf)),'personId':_0x50f763[_0x1327b0(0x120)]};}else{const _0x2a7a85={'memberId':_0x49b65a,'unitId':_0x5b2992,'content':_0x167be7,'mention':_0x8c1907},_0x173bbc=await this[_0x1327b0(0x124)][_0x1327b0(0x107)](_0x1327b0(0x140)+_0x5b2992+_0x1327b0(0xe4),{'body':_0x2a7a85});return Y(_0x173bbc[_0x1327b0(0x121)][_0x1327b0(0xe5)],_0x4f8dc5);}}async[_0x4e17d9(0xe3)](_0x25ba3a){const _0x55de65=_0x4e17d9;var _0x275f2a,_0x4e51fb;const {text:_0x256c93,unitId:_0x2f2b17}=_0x25ba3a,_0xdee93d=(_0x4e51fb=(_0x275f2a=_0x256c93['customRanges'])==null?void 0x0:_0x275f2a[_0x55de65(0x114)](_0x57eecc=>_0x57eecc[_0x55de65(0x146)]===c['CustomRangeType'][_0x55de65(0xd6)])[_0x55de65(0xf5)](_0x4c0316=>_0x4c0316[_0x55de65(0xcf)]))!=null?_0x4e51fb:[],_0x9059e6=JSON[_0x55de65(0x13d)](_0x256c93),_0x103d64=_0x25ba3a[_0x55de65(0xd9)],_0x4b47ca=_0x25ba3a['id'],_0x3d660e={'memberId':(await this[_0x55de65(0xdb)][_0x55de65(0x12e)](_0x2f2b17))[_0x55de65(0xe1)](),'unitId':_0x2f2b17,'threadId':_0x103d64,'mention':_0xdee93d,'content':_0x9059e6,'replyId':_0x4b47ca},_0x4f295e=await this[_0x55de65(0x124)]['post'](_0x55de65(0x140)+_0x2f2b17+'/edit',{'body':_0x3d660e});return!_0x4f295e[_0x55de65(0x121)][_0x55de65(0x128)]||_0x4f295e['body'][_0x55de65(0x128)]['code']===0x1;}async[_0x4e17d9(0x115)](_0xf153cb){const _0xfe0cc7=_0x4e17d9,{unitId:_0x3eeef0}=_0xf153cb,_0x49263f=_0xf153cb[_0xfe0cc7(0xd9)],_0x53f00e={'memberId':this[_0xfe0cc7(0xf2)]['getCurrentUser']()[_0xfe0cc7(0xd0)],'unitId':_0x3eeef0,'threadId':_0x49263f,'solved':_0xf153cb[_0xfe0cc7(0x11d)]?I[_0xfe0cc7(0x112)]:I[_0xfe0cc7(0xf9)]},_0x31ba52=await this[_0xfe0cc7(0x124)][_0xfe0cc7(0x107)](_0xfe0cc7(0x140)+_0x3eeef0+_0xfe0cc7(0xe6),{'body':_0x53f00e});return!_0x31ba52[_0xfe0cc7(0x121)]['error']||_0x31ba52[_0xfe0cc7(0x121)][_0xfe0cc7(0x128)][_0xfe0cc7(0x125)]===0x1;}async[_0x4e17d9(0x103)](_0x11dc11,_0x11a1d4,_0x3f98b5,_0x550438){const _0x92860d=_0x4e17d9,_0x52f063={'memberId':(await this[_0x92860d(0xdb)][_0x92860d(0x12e)](_0x11dc11))[_0x92860d(0xe1)](),'threadId':_0x3f98b5,'replyId':_0x550438,'unitId':_0x11dc11},_0x47fb00=await this['_httpService'][_0x92860d(0x107)](_0x92860d(0x140)+_0x11dc11+_0x92860d(0x118),{'body':_0x52f063});return!_0x47fb00[_0x92860d(0x121)][_0x92860d(0x128)]||_0x47fb00['body'][_0x92860d(0x128)]['code']===0x1;}async[_0x4e17d9(0xf0)](_0x50f3b0,_0x249f60,_0x5b9591){const _0x5304b5=_0x4e17d9,_0x7e808c={'unitId':_0x50f3b0,'threadId':_0x5b9591},_0x559bef=await this[_0x5304b5(0x124)][_0x5304b5(0x107)](_0x5304b5(0x140)+_0x50f3b0+'/list',{'body':_0x7e808c}),_0x4adb69=_0x5b9591[_0x5304b5(0xf5)](_0x3de047=>G(_0x559bef[_0x5304b5(0x121)][_0x5304b5(0xd3)][_0x3de047],_0x50f3b0,_0x249f60))['filter'](Boolean);return Object[_0x5304b5(0xe0)](_0x559bef[_0x5304b5(0x121)][_0x5304b5(0x126)])[_0x5304b5(0x141)](_0x544ec3=>{const _0x48ffcc=_0x5304b5;this[_0x48ffcc(0xf2)][_0x48ffcc(0xfe)](_0x544ec3);}),_0x4adb69;}['saveCommentToSnapshot'](_0x4ea878){return{'id':_0x4ea878['id'],'threadId':_0x4ea878['threadId'],'ref':_0x4ea878['ref']};}};p=x([C(0x0,c[_0x4e17d9(0xd4)](P[_0x4e17d9(0x137)])),C(0x1,c[_0x4e17d9(0xd4)](c[_0x4e17d9(0x11b)])),C(0x2,c[_0x4e17d9(0xd4)](b[_0x4e17d9(0xfa)]))],p);var H=Object[_0x4e17d9(0x10b)],J=(_0x1c8b9c,_0x442ace,_0xa3f0f6,_0x4114a9)=>{const _0x35c6a4=_0x4e17d9;for(var _0x5cf295=_0x4114a9>0x1?void 0x0:_0x4114a9?H(_0x442ace,_0xa3f0f6):_0x442ace,_0x5c4051=_0x1c8b9c[_0x35c6a4(0x12b)]-0x1,_0x16ff27;_0x5c4051>=0x0;_0x5c4051--)(_0x16ff27=_0x1c8b9c[_0x5c4051])&&(_0x5cf295=_0x16ff27(_0x5cf295)||_0x5cf295);return _0x5cf295;},y=(_0x2e8f6e,_0x3af385)=>(_0x248e36,_0x104cbf)=>_0x3af385(_0x248e36,_0x104cbf,_0x2e8f6e);let g=class extends c[_0x4e17d9(0xfc)]{constructor(_0x59abb2,_0x333b9a){const _0x625d6f=_0x4e17d9;super(),this[_0x625d6f(0x102)]=_0x59abb2,this[_0x625d6f(0x101)]=_0x333b9a,this[_0x625d6f(0x105)]();}['_initDataSource'](){const _0x2927fb=_0x4e17d9;this[_0x2927fb(0x102)][_0x2927fb(0xe8)]=this['_threadCommentDataSource'],this[_0x2927fb(0x102)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x4e17d9(0xeb)]),y(0x1,c[_0x4e17d9(0xd4)](p))],g);function _0x3823(_0x32c266,_0x26fd90){const _0x12be48=_0x12be();return _0x3823=function(_0x382373,_0x54a3ba){_0x382373=_0x382373-0xce;let _0x2c7e67=_0x12be48[_0x382373];return _0x2c7e67;},_0x3823(_0x32c266,_0x26fd90);}var F=Object[_0x4e17d9(0x130)],L=Object[_0x4e17d9(0x10b)],Z=(_0xe92ea8,_0x2cbfba,_0x4c975e)=>_0x2cbfba in _0xe92ea8?F(_0xe92ea8,_0x2cbfba,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4c975e}):_0xe92ea8[_0x2cbfba]=_0x4c975e,W=(_0xd1f9b1,_0x231c7a,_0x43656a,_0xbf70aa)=>{const _0x4b7489=_0x4e17d9;for(var _0x117c37=_0xbf70aa>0x1?void 0x0:_0xbf70aa?L(_0x231c7a,_0x43656a):_0x231c7a,_0x18a78d=_0xd1f9b1[_0x4b7489(0x12b)]-0x1,_0x78b8fe;_0x18a78d>=0x0;_0x18a78d--)(_0x78b8fe=_0xd1f9b1[_0x18a78d])&&(_0x117c37=_0x78b8fe(_0x117c37)||_0x117c37);return _0x117c37;},O=(_0x5d10b7,_0x20047c)=>(_0x2eb921,_0x48bb4d)=>_0x20047c(_0x2eb921,_0x48bb4d,_0x5d10b7),N=(_0x51112e,_0x454e1c,_0x3cfccb)=>Z(_0x51112e,typeof _0x454e1c!=_0x4e17d9(0x10c)?_0x454e1c+'':_0x454e1c,_0x3cfccb);exports[_0x4e17d9(0x135)]=class extends c[_0x4e17d9(0xde)]{constructor(_0x2c1584=D,_0x3ee91d,_0x117bbe){const _0xc15ccb=_0x4e17d9;super(),this[_0xc15ccb(0x131)]=_0x2c1584,this['_injector']=_0x3ee91d,this[_0xc15ccb(0xd2)]=_0x117bbe;const {..._0x5ea0da}=c[_0xc15ccb(0x142)]({},D,this[_0xc15ccb(0x131)]);this[_0xc15ccb(0xd2)][_0xc15ccb(0x13c)](q,_0x5ea0da);}[_0x4e17d9(0x12c)](){[[p],[g],[_]]['forEach'](_0x1897f5=>{const _0x492956=_0x3823;this[_0x492956(0x147)]['add'](_0x1897f5);});}[_0x4e17d9(0x134)](){const _0x4e9bcb=_0x4e17d9;this['_injector'][_0x4e9bcb(0x11c)](g),this['_injector'][_0x4e9bcb(0x11c)](_);}},N(exports[_0x4e17d9(0x135)],_0x4e17d9(0xdc),U),N(exports[_0x4e17d9(0x135)],_0x4e17d9(0x145),c['UniverInstanceType'][_0x4e17d9(0x148)]),exports[_0x4e17d9(0x135)]=W([c[_0x4e17d9(0xd5)](w[_0x4e17d9(0xf8)],b[_0x4e17d9(0xf7)],T[_0x4e17d9(0x10a)]),O(0x1,c[_0x4e17d9(0xd4)](c['Injector'])),O(0x2,c[_0x4e17d9(0x11e)])],exports[_0x4e17d9(0x135)]);
1
+ 'use strict';const _0x2d5d1c=_0x937a;(function(_0x205b06,_0x301069){const _0x534cb9=_0x937a,_0x28f668=_0x205b06();while(!![]){try{const _0x2b51aa=-parseInt(_0x534cb9(0x179))/0x1*(parseInt(_0x534cb9(0x15e))/0x2)+-parseInt(_0x534cb9(0x18a))/0x3*(parseInt(_0x534cb9(0x1a3))/0x4)+-parseInt(_0x534cb9(0x141))/0x5*(parseInt(_0x534cb9(0x135))/0x6)+-parseInt(_0x534cb9(0x130))/0x7*(-parseInt(_0x534cb9(0x13f))/0x8)+parseInt(_0x534cb9(0x129))/0x9+parseInt(_0x534cb9(0x12b))/0xa*(parseInt(_0x534cb9(0x18e))/0xb)+-parseInt(_0x534cb9(0x14c))/0xc;if(_0x2b51aa===_0x301069)break;else _0x28f668['push'](_0x28f668['shift']());}catch(_0x402bf8){_0x28f668['push'](_0x28f668['shift']());}}}(_0x9315,0xd70ca));Object['defineProperty'](exports,Symbol[_0x2d5d1c(0x172)],{'value':_0x2d5d1c(0x176)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x2d5d1c(0x19d);var I=(_0x1a1e83=>(_0x1a1e83[_0x1a1e83[_0x2d5d1c(0x13d)]=0x0]=_0x2d5d1c(0x13d),_0x1a1e83[_0x1a1e83['Solved']=0x1]='Solved',_0x1a1e83[_0x1a1e83[_0x2d5d1c(0x144)]=-0x1]=_0x2d5d1c(0x144),_0x1a1e83))(I||{}),v=(_0x38d61b=>(_0x38d61b[_0x38d61b[_0x2d5d1c(0x148)]=0x0]=_0x2d5d1c(0x148),_0x38d61b[_0x38d61b[_0x2d5d1c(0x154)]=0x1]=_0x2d5d1c(0x154),_0x38d61b[_0x38d61b['Reply']=0x2]=_0x2d5d1c(0x16e),_0x38d61b[_0x38d61b[_0x2d5d1c(0x13b)]=0x3]=_0x2d5d1c(0x13b),_0x38d61b[_0x38d61b[_0x2d5d1c(0x18c)]=0x4]=_0x2d5d1c(0x18c),_0x38d61b[_0x38d61b[_0x2d5d1c(0x132)]=0x5]=_0x2d5d1c(0x132),_0x38d61b[_0x38d61b['UNRECOGNIZED']=-0x1]=_0x2d5d1c(0x144),_0x38d61b))(v||{});const f=_0x170c03=>c[_0x2d5d1c(0x14e)](new Date(+_0x170c03))[_0x2d5d1c(0x128)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x395029,_0xf59cdf)=>{const _0x16bfdd=_0x2d5d1c,_0x1c759d=_0x395029[_0x16bfdd(0x13e)](c[_0x16bfdd(0x149)]),_0x20721b=_0x395029[_0x16bfdd(0x13e)](P[_0x16bfdd(0x193)]);_0xf59cdf[_0x16bfdd(0x1a1)](_0x4c545b=>{const _0x580127=_0x16bfdd;_0x1c759d[_0x580127(0x19a)](_0x4c545b)&&_0xf59cdf['delete'](_0x4c545b);}),_0xf59cdf[_0x16bfdd(0x198)]&&(await _0x20721b['get'](_0x16bfdd(0x19c),{'params':{'userIDs':[..._0xf59cdf]}}))[_0x16bfdd(0x17d)][_0x16bfdd(0x17b)][_0x16bfdd(0x1a1)](_0x59d036=>{_0x59d036&&_0x1c759d['addUser'](_0x59d036);});};var $=Object[_0x2d5d1c(0x177)],E=(_0x32d654,_0x45c194,_0x4ce546,_0x175c9f)=>{const _0x6bb612=_0x2d5d1c;for(var _0x4ae6c8=_0x175c9f>0x1?void 0x0:_0x175c9f?$(_0x45c194,_0x4ce546):_0x45c194,_0xb7093=_0x32d654[_0x6bb612(0x153)]-0x1,_0x26be55;_0xb7093>=0x0;_0xb7093--)(_0x26be55=_0x32d654[_0xb7093])&&(_0x4ae6c8=_0x26be55(_0x4ae6c8)||_0x4ae6c8);return _0x4ae6c8;},S=(_0x4c493a,_0x46837a)=>(_0x4c3948,_0x2ee9dc)=>_0x46837a(_0x4c3948,_0x2ee9dc,_0x4c493a);let _=class extends c[_0x2d5d1c(0x16b)]{constructor(_0x3e0c52,_0x5bedb0,_0x17f714,_0x4e9fbb){const _0x101203=_0x2d5d1c;super(),this['_commentService']=_0x3e0c52,this[_0x101203(0x185)]=_0x5bedb0,this[_0x101203(0x150)]=_0x17f714,this[_0x101203(0x159)]=_0x4e9fbb,this['_init'](),this[_0x101203(0x171)]();}[_0x2d5d1c(0x171)](){const _0x2452fe=_0x2d5d1c;this[_0x2452fe(0x1a2)](this['_threadCommentModel'][_0x2452fe(0x196)][_0x2452fe(0x183)](j[_0x2452fe(0x15a)](0x10))[_0x2452fe(0x157)](_0x40a789=>{const _0x2fce50=_0x2452fe,_0x215ba8=new Set();_0x40a789[_0x2fce50(0x1a1)](_0x1d4ff3=>{const _0x2e1fbd=_0x2fce50;switch(_0x1d4ff3[_0x2e1fbd(0x19e)]){case'add':{const _0x1db8b0=_0x1d4ff3[_0x2e1fbd(0x12c)][_0x2e1fbd(0x131)];_0x215ba8[_0x2e1fbd(0x147)](_0x1db8b0);break;}}}),R(this['_injector'],_0x215ba8);}));}['_init'](){const _0x46e4bc=_0x2d5d1c;this[_0x46e4bc(0x1a2)](this[_0x46e4bc(0x156)][_0x46e4bc(0x196)][_0x46e4bc(0x157)](async _0x21e41e=>{const _0x1cc09a=_0x46e4bc;var _0x9bd824,_0x8f5252,_0x141d00,_0x54e0a6;const _0x42b5ea=(_0x9bd824=this[_0x1cc09a(0x185)][_0x1cc09a(0x15d)](_0x21e41e[_0x1cc09a(0x16f)])[_0x1cc09a(0x18b)](_0x700372=>_0x700372[_0x1cc09a(0x136)]===_0x21e41e[_0x1cc09a(0x136)]))==null?void 0x0:_0x9bd824[_0x1cc09a(0x138)];if(!_0x42b5ea)return;const {unitId:_0x2adae9,subUnitId:_0x243641}=_0x42b5ea;switch(_0x21e41e[_0x1cc09a(0x1a0)]&&this[_0x1cc09a(0x150)]['addUser'](_0x21e41e['user']),_0x21e41e[_0x1cc09a(0x19e)]){case v[_0x1cc09a(0x154)]:break;case v[_0x1cc09a(0x16e)]:{this[_0x1cc09a(0x185)][_0x1cc09a(0x139)](_0x2adae9,_0x243641,{'unitId':_0x2adae9,'subUnitId':_0x243641,'ref':'','id':_0x21e41e[_0x1cc09a(0x197)],'dT':f(+_0x21e41e[_0x1cc09a(0x184)]),'threadId':_0x21e41e[_0x1cc09a(0x136)],'personId':(_0x141d00=(_0x8f5252=_0x21e41e[_0x1cc09a(0x1a0)])==null?void 0x0:_0x8f5252[_0x1cc09a(0x190)])!=null?_0x141d00:_0x21e41e['userId'],'text':JSON[_0x1cc09a(0x14a)](_0x21e41e[_0x1cc09a(0x12e)]),'parentId':_0x42b5ea['id']});break;}case v['Delete']:{const _0x1191ed=this[_0x1cc09a(0x185)]['getComment'](_0x2adae9,_0x243641,_0x21e41e[_0x1cc09a(0x197)]);_0x1191ed&&_0x1191ed[_0x1cc09a(0x186)]&&this['_threadCommentModel'][_0x1cc09a(0x173)](_0x2adae9,_0x243641,_0x21e41e['replyId']);break;}case v[_0x1cc09a(0x13b)]:{this[_0x1cc09a(0x185)][_0x1cc09a(0x165)](_0x2adae9,_0x243641,{'commentId':_0x21e41e['replyId'],'text':JSON[_0x1cc09a(0x14a)](_0x21e41e['content'])});break;}case v[_0x1cc09a(0x132)]:{const _0x345893=(_0x54e0a6=this[_0x1cc09a(0x185)]['getUnit'](_0x21e41e[_0x1cc09a(0x16f)])[_0x1cc09a(0x18b)](_0x4a7a9e=>_0x4a7a9e[_0x1cc09a(0x136)]===_0x21e41e['threadId']))==null?void 0x0:_0x54e0a6[_0x1cc09a(0x138)];_0x345893&&this[_0x1cc09a(0x185)][_0x1cc09a(0x17e)](_0x2adae9,_0x243641,_0x345893['id'],_0x21e41e[_0x1cc09a(0x164)]===I[_0x1cc09a(0x18f)]);break;}}}));}};_=E([S(0x0,c['Inject'](b[_0x2d5d1c(0x158)])),S(0x1,c[_0x2d5d1c(0x145)](M[_0x2d5d1c(0x143)])),S(0x2,c[_0x2d5d1c(0x145)](c[_0x2d5d1c(0x149)])),S(0x3,c[_0x2d5d1c(0x145)](c[_0x2d5d1c(0x195)]))],_);const q='thread-comment-data-source.config',D={};function _0x9315(){const _0x428f07=['UniverCollaborationClientPlugin','length','Add','code','_commentService','subscribe','CommentService','_injector','bufferTime','onStarting','values','getUnit','390umKcml','/edit','CollaborationSessionService','resolved','/list','setConfig','solved','updateComment','_config','_threadCommentDataSourceService','rangeId','CustomRangeType','_httpService','Disposable','/reply','post','Reply','unitId','syncUpdateMutationToColla','_initUserSync','toStringTag','deleteComment','slice','reply','Module','getOwnPropertyDescriptor','_threadCommentDataSource','955gUxXri','requireSession','users','COMMENT','body','resolveComment','stringify','error','customRanges','/solved','pipe','createTimestamp','_threadCommentModel','parentId','IThreadCommentDataSourceService','merge','/add','3859353HoxZJD','find','Delete','UniverInstanceType','2482832NVRBVx','Solved','userID','_initDataSource','listComments','HTTPService','filter','Injector','commentUpdate$','replyId','size','/universer-api/comment/unit/','getUser','Plugin','/universer-api/user/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','type','getMemberID','user','forEach','disposeWithMe','4NfITjv','_sessionService','format','12578571nDPdnP','IConfigService','70kgRTsL','payload','rangeType','content','symbol','511OcPNKu','personId','Solve','dataSource','map','69966VpKUlt','threadId','defineProperty','root','addComment','YYYY/MM/DD\x20HH:mm','Edit','DependentOn','OpenOrReOpen','get','106000uKOZMe','replies','335WpWZDS','UNIVER_UNKNOWN','ThreadCommentModel','UNRECOGNIZED','Inject','userId','add','Unknown','UserManagerService','parse','UniverLicensePlugin','9720576xxhlGg','UniverThreadCommentDataSourcePlugin','dayjs','_configService','_userService','saveCommentToSnapshot'];_0x9315=function(){return _0x428f07;};return _0x9315();}var A=Object[_0x2d5d1c(0x177)],x=(_0x277b79,_0x59a345,_0x502fbe,_0x1054b7)=>{const _0x28c313=_0x2d5d1c;for(var _0x427490=_0x1054b7>0x1?void 0x0:_0x1054b7?A(_0x59a345,_0x502fbe):_0x59a345,_0x423b99=_0x277b79[_0x28c313(0x153)]-0x1,_0x2dd47e;_0x423b99>=0x0;_0x423b99--)(_0x2dd47e=_0x277b79[_0x423b99])&&(_0x427490=_0x2dd47e(_0x427490)||_0x427490);return _0x427490;},C=(_0x42348e,_0x42dd0b)=>(_0x56d9a4,_0x25e93c)=>_0x42dd0b(_0x56d9a4,_0x25e93c,_0x42348e);function Y(_0x5cd27f,_0x12bde1){const _0x35f27e=_0x2d5d1c,_0x522f27=_0x5cd27f[_0x35f27e(0x140)][0x0];return{..._0x12bde1,'id':_0x522f27[_0x35f27e(0x197)],'resolved':_0x5cd27f[_0x35f27e(0x164)]===0x1,'dT':f(_0x522f27[_0x35f27e(0x184)]),'personId':_0x522f27[_0x35f27e(0x146)],'threadId':_0x522f27[_0x35f27e(0x136)]};}function G(_0xe2107b,_0x4ab549,_0x19c2b5){const _0x5a1f30=_0x2d5d1c;var _0x48530f,_0x1f99c7;if(((_0x1f99c7=(_0x48530f=_0xe2107b==null?void 0x0:_0xe2107b[_0x5a1f30(0x140)])==null?void 0x0:_0x48530f[_0x5a1f30(0x153)])!=null?_0x1f99c7:0x0)>0x0){const _0xe3520d=(_0x58b6e6,_0x40163a)=>({'id':_0x58b6e6[_0x5a1f30(0x197)],'threadId':_0x58b6e6[_0x5a1f30(0x136)],'dT':f(_0x58b6e6[_0x5a1f30(0x184)]),'personId':_0x58b6e6['userId'],'resolved':_0xe2107b['solved']===I['Solved'],'unitId':_0x4ab549,'subUnitId':_0x19c2b5,'text':JSON['parse'](_0x58b6e6[_0x5a1f30(0x12e)]),'parentId':_0x40163a}),_0x37880a=_0xe3520d(_0xe2107b[_0x5a1f30(0x140)][0x0]);return{..._0x37880a,'children':_0xe2107b['replies'][_0x5a1f30(0x174)](0x1)[_0x5a1f30(0x134)](_0x5acb31=>_0xe3520d(_0x5acb31,_0x37880a['id']))};}return null;}let p=class{constructor(_0x50c5e4,_0x19b8c1,_0x422898){const _0x4f9624=_0x2d5d1c;this[_0x4f9624(0x16a)]=_0x50c5e4,this['_userService']=_0x19b8c1,this['_sessionService']=_0x422898;}async[_0x2d5d1c(0x139)](_0x1e9d18){const _0x20fee9=_0x2d5d1c;var _0x3e6978,_0x47f75a;const {parentId:_0x42930f,unitId:_0x5cbf35,text:_0x26b662,threadId:_0x3b924c}=_0x1e9d18,_0x26cc07=(_0x47f75a=(_0x3e6978=_0x26b662[_0x20fee9(0x181)])==null?void 0x0:_0x3e6978[_0x20fee9(0x194)](_0x77bfa2=>_0x77bfa2[_0x20fee9(0x12d)]===c[_0x20fee9(0x169)][_0x20fee9(0x17c)])[_0x20fee9(0x134)](_0x4f2c83=>_0x4f2c83[_0x20fee9(0x168)]))!=null?_0x47f75a:[],_0x39cffe=JSON[_0x20fee9(0x17f)](_0x26b662),_0x1fb9df=(await this[_0x20fee9(0x127)][_0x20fee9(0x17a)](_0x5cbf35))[_0x20fee9(0x19f)]();if(_0x42930f){const _0x2ebcf8={'memberId':_0x1fb9df,'unitId':_0x5cbf35,'content':_0x39cffe,'mention':_0x26cc07,'threadId':_0x3b924c},_0x21f5c4=(await this[_0x20fee9(0x16a)][_0x20fee9(0x16d)](_0x20fee9(0x199)+_0x5cbf35+_0x20fee9(0x16c),{'body':_0x2ebcf8}))['body'][_0x20fee9(0x175)];return{..._0x1e9d18,'id':_0x21f5c4[_0x20fee9(0x197)],'dT':c[_0x20fee9(0x14e)](+_0x21f5c4[_0x20fee9(0x184)])[_0x20fee9(0x128)](_0x20fee9(0x13a)),'personId':_0x21f5c4[_0x20fee9(0x146)]};}else{const _0x545436={'memberId':_0x1fb9df,'unitId':_0x5cbf35,'content':_0x39cffe,'mention':_0x26cc07},_0x4503e0=await this[_0x20fee9(0x16a)][_0x20fee9(0x16d)](_0x20fee9(0x199)+_0x5cbf35+_0x20fee9(0x189),{'body':_0x545436});return Y(_0x4503e0[_0x20fee9(0x17d)]['comment'],_0x1e9d18);}}async[_0x2d5d1c(0x165)](_0x110842){const _0x14b8b5=_0x2d5d1c;var _0x4ac640,_0x189ae2;const {text:_0x5abe84,unitId:_0x58a782}=_0x110842,_0x120ac1=(_0x189ae2=(_0x4ac640=_0x5abe84[_0x14b8b5(0x181)])==null?void 0x0:_0x4ac640['filter'](_0x2cdfe0=>_0x2cdfe0[_0x14b8b5(0x12d)]===c['CustomRangeType'][_0x14b8b5(0x17c)])[_0x14b8b5(0x134)](_0x375b0f=>_0x375b0f[_0x14b8b5(0x168)]))!=null?_0x189ae2:[],_0x29f7f4=JSON[_0x14b8b5(0x17f)](_0x5abe84),_0x57e17e=_0x110842[_0x14b8b5(0x136)],_0x36319c=_0x110842['id'],_0x41933e={'memberId':(await this[_0x14b8b5(0x127)][_0x14b8b5(0x17a)](_0x58a782))[_0x14b8b5(0x19f)](),'unitId':_0x58a782,'threadId':_0x57e17e,'mention':_0x120ac1,'content':_0x29f7f4,'replyId':_0x36319c},_0x23406e=await this[_0x14b8b5(0x16a)][_0x14b8b5(0x16d)]('/universer-api/comment/unit/'+_0x58a782+_0x14b8b5(0x15f),{'body':_0x41933e});return!_0x23406e['body']['error']||_0x23406e[_0x14b8b5(0x17d)]['error']['code']===0x1;}async[_0x2d5d1c(0x17e)](_0x154eab){const _0x4c3a03=_0x2d5d1c,{unitId:_0x3dbdee}=_0x154eab,_0x9b26ab=_0x154eab[_0x4c3a03(0x136)],_0x56d362={'memberId':this[_0x4c3a03(0x150)]['getCurrentUser']()[_0x4c3a03(0x190)],'unitId':_0x3dbdee,'threadId':_0x9b26ab,'solved':_0x154eab[_0x4c3a03(0x161)]?I[_0x4c3a03(0x18f)]:I[_0x4c3a03(0x13d)]},_0x2cd5cf=await this[_0x4c3a03(0x16a)][_0x4c3a03(0x16d)]('/universer-api/comment/unit/'+_0x3dbdee+_0x4c3a03(0x182),{'body':_0x56d362});return!_0x2cd5cf[_0x4c3a03(0x17d)][_0x4c3a03(0x180)]||_0x2cd5cf[_0x4c3a03(0x17d)]['error'][_0x4c3a03(0x155)]===0x1;}async[_0x2d5d1c(0x173)](_0x346062,_0x5f2c9f,_0x58eaf3,_0x5dc8db){const _0x4667fa=_0x2d5d1c,_0x3e32ff={'memberId':(await this[_0x4667fa(0x127)][_0x4667fa(0x17a)](_0x346062))['getMemberID'](),'threadId':_0x58eaf3,'replyId':_0x5dc8db,'unitId':_0x346062},_0x28984d=await this['_httpService'][_0x4667fa(0x16d)](_0x4667fa(0x199)+_0x346062+'/delete',{'body':_0x3e32ff});return!_0x28984d[_0x4667fa(0x17d)]['error']||_0x28984d[_0x4667fa(0x17d)][_0x4667fa(0x180)]['code']===0x1;}async[_0x2d5d1c(0x192)](_0xa62426,_0x4f7f9c,_0x15ace6){const _0x16c0b1=_0x2d5d1c,_0x26a40f={'unitId':_0xa62426,'threadId':_0x15ace6},_0x25a1c5=await this[_0x16c0b1(0x16a)][_0x16c0b1(0x16d)]('/universer-api/comment/unit/'+_0xa62426+_0x16c0b1(0x162),{'body':_0x26a40f}),_0x15250c=_0x15ace6[_0x16c0b1(0x134)](_0x6cc3e9=>G(_0x25a1c5[_0x16c0b1(0x17d)]['comments'][_0x6cc3e9],_0xa62426,_0x4f7f9c))[_0x16c0b1(0x194)](Boolean);return Object[_0x16c0b1(0x15c)](_0x25a1c5[_0x16c0b1(0x17d)][_0x16c0b1(0x17b)])[_0x16c0b1(0x1a1)](_0x4a1d99=>{const _0x4402ea=_0x16c0b1;this[_0x4402ea(0x150)]['addUser'](_0x4a1d99);}),_0x15250c;}[_0x2d5d1c(0x151)](_0x4101e1){const _0x5aca04=_0x2d5d1c;return{'id':_0x4101e1['id'],'threadId':_0x4101e1[_0x5aca04(0x136)],'ref':_0x4101e1['ref']};}};p=x([C(0x0,c[_0x2d5d1c(0x145)](P['HTTPService'])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c[_0x2d5d1c(0x145)](b[_0x2d5d1c(0x160)]))],p);function _0x937a(_0x20fe46,_0x14c83a){const _0x93159c=_0x9315();return _0x937a=function(_0x937ad0,_0x12332f){_0x937ad0=_0x937ad0-0x127;let _0x2db651=_0x93159c[_0x937ad0];return _0x2db651;},_0x937a(_0x20fe46,_0x14c83a);}var H=Object[_0x2d5d1c(0x177)],J=(_0x3c09df,_0xd6ab6e,_0x5ccc3d,_0x12aa91)=>{const _0x31a8c7=_0x2d5d1c;for(var _0x33d68b=_0x12aa91>0x1?void 0x0:_0x12aa91?H(_0xd6ab6e,_0x5ccc3d):_0xd6ab6e,_0xcbf4d7=_0x3c09df[_0x31a8c7(0x153)]-0x1,_0x446b5b;_0xcbf4d7>=0x0;_0xcbf4d7--)(_0x446b5b=_0x3c09df[_0xcbf4d7])&&(_0x33d68b=_0x446b5b(_0x33d68b)||_0x33d68b);return _0x33d68b;},y=(_0x4f9159,_0x2ef317)=>(_0x50194a,_0x1f5875)=>_0x2ef317(_0x50194a,_0x1f5875,_0x4f9159);let g=class extends c[_0x2d5d1c(0x16b)]{constructor(_0x4cf0d4,_0xe80b64){const _0xe1ff4=_0x2d5d1c;super(),this[_0xe1ff4(0x167)]=_0x4cf0d4,this[_0xe1ff4(0x178)]=_0xe80b64,this[_0xe1ff4(0x191)]();}[_0x2d5d1c(0x191)](){const _0xedb93f=_0x2d5d1c;this[_0xedb93f(0x167)][_0xedb93f(0x133)]=this[_0xedb93f(0x178)],this[_0xedb93f(0x167)][_0xedb93f(0x170)]=!0x1;}};g=J([y(0x0,M[_0x2d5d1c(0x187)]),y(0x1,c[_0x2d5d1c(0x145)](p))],g);var F=Object[_0x2d5d1c(0x137)],L=Object['getOwnPropertyDescriptor'],Z=(_0x484627,_0x2ec610,_0x2103dd)=>_0x2ec610 in _0x484627?F(_0x484627,_0x2ec610,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2103dd}):_0x484627[_0x2ec610]=_0x2103dd,W=(_0xe1ff51,_0x473b52,_0x47b531,_0x1730ef)=>{const _0x1f6575=_0x2d5d1c;for(var _0x3001ed=_0x1730ef>0x1?void 0x0:_0x1730ef?L(_0x473b52,_0x47b531):_0x473b52,_0x34d78f=_0xe1ff51[_0x1f6575(0x153)]-0x1,_0x2e9ba5;_0x34d78f>=0x0;_0x34d78f--)(_0x2e9ba5=_0xe1ff51[_0x34d78f])&&(_0x3001ed=_0x2e9ba5(_0x3001ed)||_0x3001ed);return _0x3001ed;},O=(_0xce0a4e,_0x2e4960)=>(_0x28f1b4,_0x4fe557)=>_0x2e4960(_0x28f1b4,_0x4fe557,_0xce0a4e),N=(_0x31229d,_0xd6ddb2,_0x5f4bec)=>Z(_0x31229d,typeof _0xd6ddb2!=_0x2d5d1c(0x12f)?_0xd6ddb2+'':_0xd6ddb2,_0x5f4bec);exports[_0x2d5d1c(0x14d)]=class extends c[_0x2d5d1c(0x19b)]{constructor(_0x347e4a=D,_0x1b7ecb,_0x1cfd07){const _0xac400c=_0x2d5d1c;super(),this[_0xac400c(0x166)]=_0x347e4a,this[_0xac400c(0x159)]=_0x1b7ecb,this[_0xac400c(0x14f)]=_0x1cfd07;const {..._0x502bca}=c[_0xac400c(0x188)]({},D,this[_0xac400c(0x166)]);this[_0xac400c(0x14f)][_0xac400c(0x163)](q,_0x502bca);}[_0x2d5d1c(0x15b)](){const _0x53b17f=_0x2d5d1c;[[p],[g],[_]][_0x53b17f(0x1a1)](_0x406c78=>{const _0x1fce04=_0x53b17f;this['_injector'][_0x1fce04(0x147)](_0x406c78);});}['onReady'](){const _0x152638=_0x2d5d1c;this['_injector'][_0x152638(0x13e)](g),this['_injector'][_0x152638(0x13e)](_);}},N(exports[_0x2d5d1c(0x14d)],'pluginName',U),N(exports[_0x2d5d1c(0x14d)],_0x2d5d1c(0x19e),c[_0x2d5d1c(0x18d)][_0x2d5d1c(0x142)]),exports[_0x2d5d1c(0x14d)]=W([c[_0x2d5d1c(0x13c)](w['UniverThreadCommentUIPlugin'],b[_0x2d5d1c(0x152)],T[_0x2d5d1c(0x14b)]),O(0x1,c[_0x2d5d1c(0x145)](c[_0x2d5d1c(0x195)])),O(0x2,c[_0x2d5d1c(0x12a)])],exports[_0x2d5d1c(0x14d)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x35a1d4=_0x3e59;(function(_0x46ccbb,_0x4d668c){const _0x4e7b0a=_0x3e59,_0x2cd634=_0x46ccbb();while(!![]){try{const _0x392e65=parseInt(_0x4e7b0a(0xe9))/0x1*(parseInt(_0x4e7b0a(0xdd))/0x2)+-parseInt(_0x4e7b0a(0xf3))/0x3*(-parseInt(_0x4e7b0a(0xc6))/0x4)+-parseInt(_0x4e7b0a(0xbf))/0x5*(-parseInt(_0x4e7b0a(0x9d))/0x6)+-parseInt(_0x4e7b0a(0xeb))/0x7+parseInt(_0x4e7b0a(0xe1))/0x8*(-parseInt(_0x4e7b0a(0x90))/0x9)+-parseInt(_0x4e7b0a(0xbd))/0xa+-parseInt(_0x4e7b0a(0xb0))/0xb*(-parseInt(_0x4e7b0a(0xef))/0xc);if(_0x392e65===_0x4d668c)break;else _0x2cd634['push'](_0x2cd634['shift']());}catch(_0x215a14){_0x2cd634['push'](_0x2cd634['shift']());}}}(_0x2b72,0x7656d));import{CommentService as _0x57b718,CollaborationSessionService as _0x333ebf,UniverCollaborationClientPlugin as _0x27c89b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x32bd05}from'@univerjs-pro/license';import{dayjs as _0x5eed82,UserManagerService as _0x104e56,Inject as _0x568319,Injector as _0x5710e7,Disposable as _0xacb343,CustomRangeType as _0x228e02,UniverInstanceType as _0x505f7d,DependentOn as _0x54f3d1,IConfigService as _0x241ad2,Plugin as _0x46fdf3,merge as _0x577e8b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2aaa9d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x59aefc,IThreadCommentDataSourceService as _0x1e6e5b}from'@univerjs/thread-comment';import{bufferTime as _0x4bd892}from'rxjs';import{HTTPService as _0x2e05a5}from'@univerjs/network';const W=_0x35a1d4(0x91);var I=(_0x1eae20=>(_0x1eae20[_0x1eae20[_0x35a1d4(0xa2)]=0x0]=_0x35a1d4(0xa2),_0x1eae20[_0x1eae20[_0x35a1d4(0xa7)]=0x1]=_0x35a1d4(0xa7),_0x1eae20[_0x1eae20['UNRECOGNIZED']=-0x1]=_0x35a1d4(0x95),_0x1eae20))(I||{}),v=(_0x435084=>(_0x435084[_0x435084[_0x35a1d4(0xee)]=0x0]=_0x35a1d4(0xee),_0x435084[_0x435084[_0x35a1d4(0xd5)]=0x1]=_0x35a1d4(0xd5),_0x435084[_0x435084[_0x35a1d4(0xd4)]=0x2]=_0x35a1d4(0xd4),_0x435084[_0x435084[_0x35a1d4(0xc8)]=0x3]='Edit',_0x435084[_0x435084[_0x35a1d4(0xb2)]=0x4]=_0x35a1d4(0xb2),_0x435084[_0x435084[_0x35a1d4(0xaf)]=0x5]=_0x35a1d4(0xaf),_0x435084[_0x435084[_0x35a1d4(0x95)]=-0x1]=_0x35a1d4(0x95),_0x435084))(v||{});function _0x3e59(_0x3acb0f,_0x3be540){const _0x2b729e=_0x2b72();return _0x3e59=function(_0x3e59c3,_0xca1bd9){_0x3e59c3=_0x3e59c3-0x8f;let _0x20e9fd=_0x2b729e[_0x3e59c3];return _0x20e9fd;},_0x3e59(_0x3acb0f,_0x3be540);}const y=_0x5e73ac=>_0x5eed82(new Date(+_0x5e73ac))[_0x35a1d4(0xb4)](_0x35a1d4(0x9e)),B=async(_0x56a26e,_0x55c367)=>{const _0x338a87=_0x35a1d4,_0x5bc796=_0x56a26e[_0x338a87(0xa3)](_0x104e56),_0x3cb0aa=_0x56a26e[_0x338a87(0xa3)](_0x2e05a5);_0x55c367[_0x338a87(0xa1)](_0x470cfa=>{const _0x3ba6e9=_0x338a87;_0x5bc796[_0x3ba6e9(0x97)](_0x470cfa)&&_0x55c367['delete'](_0x470cfa);}),_0x55c367[_0x338a87(0xcf)]&&(await _0x3cb0aa[_0x338a87(0xa3)](_0x338a87(0x9b),{'params':{'userIDs':[..._0x55c367]}}))[_0x338a87(0xea)][_0x338a87(0xe0)][_0x338a87(0xa1)](_0xc0ba51=>{const _0x1814e9=_0x338a87;_0xc0ba51&&_0x5bc796[_0x1814e9(0xe3)](_0xc0ba51);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x248a24,_0x33537b,_0x3887e5,_0x84099)=>{const _0x50c4f6=_0x35a1d4;for(var _0x1b299d=_0x84099>0x1?void 0x0:_0x84099?K(_0x33537b,_0x3887e5):_0x33537b,_0x23200c=_0x248a24[_0x50c4f6(0x99)]-0x1,_0x3b4368;_0x23200c>=0x0;_0x23200c--)(_0x3b4368=_0x248a24[_0x23200c])&&(_0x1b299d=_0x3b4368(_0x1b299d)||_0x1b299d);return _0x1b299d;},p=(_0xe9bd7a,_0x152668)=>(_0x1f70fb,_0x543d64)=>_0x152668(_0x1f70fb,_0x543d64,_0xe9bd7a);let _=class extends _0xacb343{constructor(_0x576436,_0x2718f0,_0x4149be,_0x31bf06){const _0x27725f=_0x35a1d4;super(),this['_commentService']=_0x576436,this['_threadCommentModel']=_0x2718f0,this[_0x27725f(0xbc)]=_0x4149be,this['_injector']=_0x31bf06,this[_0x27725f(0x98)](),this[_0x27725f(0x94)]();}[_0x35a1d4(0x94)](){const _0x74bc5d=_0x35a1d4;this[_0x74bc5d(0xe6)](this[_0x74bc5d(0xf0)][_0x74bc5d(0xe5)][_0x74bc5d(0xb6)](_0x4bd892(0x10))['subscribe'](_0x534b4b=>{const _0x1916c2=_0x74bc5d,_0x121af6=new Set();_0x534b4b[_0x1916c2(0xa1)](_0x58e66d=>{const _0x12efe0=_0x1916c2;switch(_0x58e66d[_0x12efe0(0xbe)]){case _0x12efe0(0xd9):{const _0x1e416f=_0x58e66d['payload'][_0x12efe0(0xc1)];_0x121af6['add'](_0x1e416f);break;}}}),B(this[_0x1916c2(0xec)],_0x121af6);}));}[_0x35a1d4(0x98)](){const _0x4c07d0=_0x35a1d4;this['disposeWithMe'](this[_0x4c07d0(0xd2)][_0x4c07d0(0xe5)][_0x4c07d0(0x92)](async _0x1cb16b=>{const _0x3c097c=_0x4c07d0;var _0x2db8cd,_0x478f80,_0x419b44,_0x3d6358;const _0x5c889f=(_0x2db8cd=this['_threadCommentModel'][_0x3c097c(0xdb)](_0x1cb16b[_0x3c097c(0xdc)])['find'](_0x5b86a8=>_0x5b86a8['threadId']===_0x1cb16b[_0x3c097c(0xc2)]))==null?void 0x0:_0x2db8cd[_0x3c097c(0xba)];if(!_0x5c889f)return;const {unitId:_0xcb196f,subUnitId:_0x5defad}=_0x5c889f;switch(_0x1cb16b['user']&&this[_0x3c097c(0xbc)][_0x3c097c(0xe3)](_0x1cb16b['user']),_0x1cb16b[_0x3c097c(0xbe)]){case v['Add']:break;case v[_0x3c097c(0xd4)]:{this[_0x3c097c(0xf0)]['addComment'](_0xcb196f,_0x5defad,{'unitId':_0xcb196f,'subUnitId':_0x5defad,'ref':'','id':_0x1cb16b['replyId'],'dT':y(+_0x1cb16b[_0x3c097c(0xdf)]),'threadId':_0x1cb16b[_0x3c097c(0xc2)],'personId':(_0x419b44=(_0x478f80=_0x1cb16b[_0x3c097c(0xcc)])==null?void 0x0:_0x478f80[_0x3c097c(0xf2)])!=null?_0x419b44:_0x1cb16b[_0x3c097c(0xc7)],'text':JSON[_0x3c097c(0x93)](_0x1cb16b[_0x3c097c(0xa0)]),'parentId':_0x5c889f['id']});break;}case v[_0x3c097c(0xb2)]:{const _0x1aa9cf=this[_0x3c097c(0xf0)]['getComment'](_0xcb196f,_0x5defad,_0x1cb16b[_0x3c097c(0xa8)]);_0x1aa9cf&&_0x1aa9cf[_0x3c097c(0xed)]&&this[_0x3c097c(0xf0)][_0x3c097c(0xd6)](_0xcb196f,_0x5defad,_0x1cb16b[_0x3c097c(0xa8)]);break;}case v[_0x3c097c(0xc8)]:{this['_threadCommentModel']['updateComment'](_0xcb196f,_0x5defad,{'commentId':_0x1cb16b[_0x3c097c(0xa8)],'text':JSON[_0x3c097c(0x93)](_0x1cb16b['content'])});break;}case v[_0x3c097c(0xaf)]:{const _0x2049e2=(_0x3d6358=this[_0x3c097c(0xf0)][_0x3c097c(0xdb)](_0x1cb16b['unitId'])[_0x3c097c(0xc3)](_0x138b34=>_0x138b34['threadId']===_0x1cb16b['threadId']))==null?void 0x0:_0x3d6358[_0x3c097c(0xba)];_0x2049e2&&this[_0x3c097c(0xf0)]['resolveComment'](_0xcb196f,_0x5defad,_0x2049e2['id'],_0x1cb16b[_0x3c097c(0xd1)]===I[_0x3c097c(0xa7)]);break;}}}));}};_=V([p(0x0,_0x568319(_0x57b718)),p(0x1,_0x568319(_0x59aefc)),p(0x2,_0x568319(_0x104e56)),p(0x3,_0x568319(_0x5710e7))],_);const z=_0x35a1d4(0xb9),O={};var k=Object[_0x35a1d4(0xac)],Q=(_0x103a5f,_0x4fb6d6,_0x29bb89,_0x3868fc)=>{for(var _0x349259=_0x3868fc>0x1?void 0x0:_0x3868fc?k(_0x4fb6d6,_0x29bb89):_0x4fb6d6,_0x52e029=_0x103a5f['length']-0x1,_0x5efa3c;_0x52e029>=0x0;_0x52e029--)(_0x5efa3c=_0x103a5f[_0x52e029])&&(_0x349259=_0x5efa3c(_0x349259)||_0x349259);return _0x349259;},b=(_0x748b5b,_0x2388f2)=>(_0xeda274,_0x4ac3ef)=>_0x2388f2(_0xeda274,_0x4ac3ef,_0x748b5b);function _0x2b72(){const _0x246614=['/delete','_threadCommentDataSource','filter','9EtYIMz','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','subscribe','parse','_initUserSync','UNRECOGNIZED','onReady','getUser','_init','length','_threadCommentDataSourceService','/universer-api/user/list','symbol','1374ZSHgVz','YYYY/MM/DD\x20HH:mm','addComment','content','forEach','OpenOrReOpen','get','/reply','rangeId','/universer-api/comment/unit/','Solved','replyId','stringify','rangeType','reply','getOwnPropertyDescriptor','setConfig','customRanges','Solve','143451iTAUOR','_httpService','Delete','post','format','saveCommentToSnapshot','pipe','UNIVER_UNKNOWN','defineProperty','thread-comment-data-source.config','root','getMemberID','_userService','9640610VDqTnD','type','18775MpIcAp','ref','personId','threadId','find','requireSession','comments','4OQVRKW','userId','Edit','dataSource','resolved','_sessionService','user','/edit','listComments','size','code','solved','_commentService','syncUpdateMutationToColla','Reply','Add','deleteComment','/list','/add','add','_configService','getUnit','unitId','19226kishrT','pluginName','createTimestamp','users','7297144nTxfhI','COMMENT','addUser','comment','commentUpdate$','disposeWithMe','_initDataSource','map','4fRQqqS','body','5427254xlyzCf','_injector','parentId','Unknown','1488RZJrkK','_threadCommentModel','error','userID','1862436SeumzB'];_0x2b72=function(){return _0x246614;};return _0x2b72();}function X(_0x519930,_0x12d8ad){const _0x35e14f=_0x35a1d4,_0x25899a=_0x519930['replies'][0x0];return{..._0x12d8ad,'id':_0x25899a[_0x35e14f(0xa8)],'resolved':_0x519930[_0x35e14f(0xd1)]===0x1,'dT':y(_0x25899a[_0x35e14f(0xdf)]),'personId':_0x25899a['userId'],'threadId':_0x25899a['threadId']};}function ee(_0x2305a0,_0x48400e,_0x1fda8d){const _0x11c244=_0x35a1d4;var _0x4a490b,_0x223f5e;if(((_0x223f5e=(_0x4a490b=_0x2305a0==null?void 0x0:_0x2305a0['replies'])==null?void 0x0:_0x4a490b[_0x11c244(0x99)])!=null?_0x223f5e:0x0)>0x0){const _0x2503ee=(_0x4abf93,_0x218f10)=>({'id':_0x4abf93[_0x11c244(0xa8)],'threadId':_0x4abf93[_0x11c244(0xc2)],'dT':y(_0x4abf93[_0x11c244(0xdf)]),'personId':_0x4abf93[_0x11c244(0xc7)],'resolved':_0x2305a0[_0x11c244(0xd1)]===I['Solved'],'unitId':_0x48400e,'subUnitId':_0x1fda8d,'text':JSON[_0x11c244(0x93)](_0x4abf93['content']),'parentId':_0x218f10}),_0x19bf52=_0x2503ee(_0x2305a0['replies'][0x0]);return{..._0x19bf52,'children':_0x2305a0['replies']['slice'](0x1)[_0x11c244(0xe8)](_0x5074a7=>_0x2503ee(_0x5074a7,_0x19bf52['id']))};}return null;}let S=class{constructor(_0x3a49ae,_0x169264,_0x2d1b80){const _0x470caf=_0x35a1d4;this[_0x470caf(0xb1)]=_0x3a49ae,this[_0x470caf(0xbc)]=_0x169264,this['_sessionService']=_0x2d1b80;}async[_0x35a1d4(0x9f)](_0x5cc68c){const _0x229205=_0x35a1d4;var _0x35c9c4,_0x33eee7;const {parentId:_0x30c06c,unitId:_0x28c657,text:_0x157728,threadId:_0x54cb36}=_0x5cc68c,_0x24e640=(_0x33eee7=(_0x35c9c4=_0x157728[_0x229205(0xae)])==null?void 0x0:_0x35c9c4[_0x229205(0x8f)](_0x5885c3=>_0x5885c3[_0x229205(0xaa)]===_0x228e02[_0x229205(0xe2)])['map'](_0x1f4ee8=>_0x1f4ee8[_0x229205(0xa5)]))!=null?_0x33eee7:[],_0x100776=JSON[_0x229205(0xa9)](_0x157728),_0x37a1dd=(await this[_0x229205(0xcb)][_0x229205(0xc4)](_0x28c657))['getMemberID']();if(_0x30c06c){const _0x56bcc3={'memberId':_0x37a1dd,'unitId':_0x28c657,'content':_0x100776,'mention':_0x24e640,'threadId':_0x54cb36},_0x1edd0a=(await this['_httpService'][_0x229205(0xb3)](_0x229205(0xa6)+_0x28c657+_0x229205(0xa4),{'body':_0x56bcc3}))['body'][_0x229205(0xab)];return{..._0x5cc68c,'id':_0x1edd0a[_0x229205(0xa8)],'dT':_0x5eed82(+_0x1edd0a[_0x229205(0xdf)])[_0x229205(0xb4)](_0x229205(0x9e)),'personId':_0x1edd0a[_0x229205(0xc7)]};}else{const _0x57dbe7={'memberId':_0x37a1dd,'unitId':_0x28c657,'content':_0x100776,'mention':_0x24e640},_0x25c7fb=await this[_0x229205(0xb1)][_0x229205(0xb3)](_0x229205(0xa6)+_0x28c657+_0x229205(0xd8),{'body':_0x57dbe7});return X(_0x25c7fb[_0x229205(0xea)][_0x229205(0xe4)],_0x5cc68c);}}async['updateComment'](_0x5dc479){const _0x2c587a=_0x35a1d4;var _0x5248fe,_0x25bf8c;const {text:_0x2562d6,unitId:_0x40f509}=_0x5dc479,_0x8c32d6=(_0x25bf8c=(_0x5248fe=_0x2562d6['customRanges'])==null?void 0x0:_0x5248fe['filter'](_0x558266=>_0x558266[_0x2c587a(0xaa)]===_0x228e02[_0x2c587a(0xe2)])[_0x2c587a(0xe8)](_0x2a472f=>_0x2a472f[_0x2c587a(0xa5)]))!=null?_0x25bf8c:[],_0x327578=JSON[_0x2c587a(0xa9)](_0x2562d6),_0x10c9e3=_0x5dc479[_0x2c587a(0xc2)],_0x48f001=_0x5dc479['id'],_0x35d3fd={'memberId':(await this['_sessionService'][_0x2c587a(0xc4)](_0x40f509))[_0x2c587a(0xbb)](),'unitId':_0x40f509,'threadId':_0x10c9e3,'mention':_0x8c32d6,'content':_0x327578,'replyId':_0x48f001},_0x28b562=await this['_httpService'][_0x2c587a(0xb3)](_0x2c587a(0xa6)+_0x40f509+_0x2c587a(0xcd),{'body':_0x35d3fd});return!_0x28b562[_0x2c587a(0xea)][_0x2c587a(0xf1)]||_0x28b562[_0x2c587a(0xea)]['error'][_0x2c587a(0xd0)]===0x1;}async['resolveComment'](_0x3de4ce){const _0x2da0d3=_0x35a1d4,{unitId:_0x1212a9}=_0x3de4ce,_0x4da36e=_0x3de4ce[_0x2da0d3(0xc2)],_0x5049e7={'memberId':this[_0x2da0d3(0xbc)]['getCurrentUser']()['userID'],'unitId':_0x1212a9,'threadId':_0x4da36e,'solved':_0x3de4ce[_0x2da0d3(0xca)]?I[_0x2da0d3(0xa7)]:I['OpenOrReOpen']},_0x4934f0=await this[_0x2da0d3(0xb1)][_0x2da0d3(0xb3)](_0x2da0d3(0xa6)+_0x1212a9+'/solved',{'body':_0x5049e7});return!_0x4934f0[_0x2da0d3(0xea)]['error']||_0x4934f0[_0x2da0d3(0xea)][_0x2da0d3(0xf1)][_0x2da0d3(0xd0)]===0x1;}async['deleteComment'](_0x27c585,_0x68030d,_0x12f87c,_0x4d6021){const _0x1cda9c=_0x35a1d4,_0x27f5e1={'memberId':(await this[_0x1cda9c(0xcb)][_0x1cda9c(0xc4)](_0x27c585))[_0x1cda9c(0xbb)](),'threadId':_0x12f87c,'replyId':_0x4d6021,'unitId':_0x27c585},_0x5efc0c=await this[_0x1cda9c(0xb1)]['post'](_0x1cda9c(0xa6)+_0x27c585+_0x1cda9c(0xf4),{'body':_0x27f5e1});return!_0x5efc0c[_0x1cda9c(0xea)][_0x1cda9c(0xf1)]||_0x5efc0c[_0x1cda9c(0xea)]['error']['code']===0x1;}async[_0x35a1d4(0xce)](_0x5a0527,_0x20ddce,_0x557567){const _0x44466e=_0x35a1d4,_0x2c2a62={'unitId':_0x5a0527,'threadId':_0x557567},_0x2c9ac2=await this[_0x44466e(0xb1)][_0x44466e(0xb3)](_0x44466e(0xa6)+_0x5a0527+_0x44466e(0xd7),{'body':_0x2c2a62}),_0x2eec90=_0x557567[_0x44466e(0xe8)](_0x9e07a7=>ee(_0x2c9ac2[_0x44466e(0xea)][_0x44466e(0xc5)][_0x9e07a7],_0x5a0527,_0x20ddce))['filter'](Boolean);return Object['values'](_0x2c9ac2['body'][_0x44466e(0xe0)])[_0x44466e(0xa1)](_0xe1388b=>{const _0x2f7030=_0x44466e;this[_0x2f7030(0xbc)][_0x2f7030(0xe3)](_0xe1388b);}),_0x2eec90;}[_0x35a1d4(0xb5)](_0x2cfdd1){const _0x28fa45=_0x35a1d4;return{'id':_0x2cfdd1['id'],'threadId':_0x2cfdd1['threadId'],'ref':_0x2cfdd1[_0x28fa45(0xc0)]};}};S=Q([b(0x0,_0x568319(_0x2e05a5)),b(0x1,_0x568319(_0x104e56)),b(0x2,_0x568319(_0x333ebf))],S);var re=Object[_0x35a1d4(0xac)],te=(_0x24a234,_0x569947,_0x1eadd9,_0x33713d)=>{const _0x47b595=_0x35a1d4;for(var _0x159440=_0x33713d>0x1?void 0x0:_0x33713d?re(_0x569947,_0x1eadd9):_0x569947,_0x47b3e9=_0x24a234[_0x47b595(0x99)]-0x1,_0x5088b9;_0x47b3e9>=0x0;_0x47b3e9--)(_0x5088b9=_0x24a234[_0x47b3e9])&&(_0x159440=_0x5088b9(_0x159440)||_0x159440);return _0x159440;},M=(_0x281b33,_0x25d9ed)=>(_0x3fda6b,_0x44ae4e)=>_0x25d9ed(_0x3fda6b,_0x44ae4e,_0x281b33);let f=class extends _0xacb343{constructor(_0x16ac65,_0x2820d3){const _0x4f2094=_0x35a1d4;super(),this[_0x4f2094(0x9a)]=_0x16ac65,this['_threadCommentDataSource']=_0x2820d3,this[_0x4f2094(0xe7)]();}[_0x35a1d4(0xe7)](){const _0x1b2b85=_0x35a1d4;this['_threadCommentDataSourceService'][_0x1b2b85(0xc9)]=this[_0x1b2b85(0xf5)],this[_0x1b2b85(0x9a)][_0x1b2b85(0xd3)]=!0x1;}};f=te([M(0x0,_0x1e6e5b),M(0x1,_0x568319(S))],f);var se=Object[_0x35a1d4(0xb8)],oe=Object[_0x35a1d4(0xac)],ne=(_0x13e5a4,_0x43e3ee,_0x5c4c9d)=>_0x43e3ee in _0x13e5a4?se(_0x13e5a4,_0x43e3ee,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5c4c9d}):_0x13e5a4[_0x43e3ee]=_0x5c4c9d,ie=(_0x1395d2,_0x37448f,_0x2ec810,_0x18cb0f)=>{const _0x2dd999=_0x35a1d4;for(var _0x3131ac=_0x18cb0f>0x1?void 0x0:_0x18cb0f?oe(_0x37448f,_0x2ec810):_0x37448f,_0x564a35=_0x1395d2[_0x2dd999(0x99)]-0x1,_0x4114e0;_0x564a35>=0x0;_0x564a35--)(_0x4114e0=_0x1395d2[_0x564a35])&&(_0x3131ac=_0x4114e0(_0x3131ac)||_0x3131ac);return _0x3131ac;},N=(_0x58d5f1,_0x16c8d5)=>(_0x45c77b,_0x5ba941)=>_0x16c8d5(_0x45c77b,_0x5ba941,_0x58d5f1),$=(_0x5db7cc,_0x237fd5,_0xc25b5a)=>ne(_0x5db7cc,typeof _0x237fd5!=_0x35a1d4(0x9c)?_0x237fd5+'':_0x237fd5,_0xc25b5a);let g=class extends _0x46fdf3{constructor(_0x39b1bd=O,_0x32b609,_0x572c09){const _0x196965=_0x35a1d4;super(),this['_config']=_0x39b1bd,this['_injector']=_0x32b609,this[_0x196965(0xda)]=_0x572c09;const {..._0x2a2787}=_0x577e8b({},O,this['_config']);this[_0x196965(0xda)][_0x196965(0xad)](z,_0x2a2787);}['onStarting'](){const _0x36fea8=_0x35a1d4;[[S],[f],[_]][_0x36fea8(0xa1)](_0x69b35f=>{const _0x2c7cb6=_0x36fea8;this[_0x2c7cb6(0xec)][_0x2c7cb6(0xd9)](_0x69b35f);});}[_0x35a1d4(0x96)](){const _0xe4235e=_0x35a1d4;this[_0xe4235e(0xec)][_0xe4235e(0xa3)](f),this[_0xe4235e(0xec)]['get'](_);}};$(g,_0x35a1d4(0xde),W),$(g,_0x35a1d4(0xbe),_0x505f7d[_0x35a1d4(0xb7)]),g=ie([_0x54f3d1(_0x2aaa9d,_0x27c89b,_0x32bd05),N(0x1,_0x568319(_0x5710e7)),N(0x2,_0x241ad2)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ function _0x2a0d(){const _0x5d0c5e=['getOwnPropertyDescriptor','_init','_httpService','unitId','pluginName','/add','410003ZrOwBA','getUnit','UNIVER_UNKNOWN','user','type','slice','delete','COMMENT','commentUpdate$','get','code','/delete','_userService','content','forEach','syncUpdateMutationToColla','Reply','replies','dataSource','customRanges','YYYY/MM/DD\x20HH:mm','55DxAgtR','Solved','_threadCommentDataSource','filter','setConfig','payload','subscribe','symbol','getMemberID','85196AsVuof','length','_config','840864WiteAJ','map','comment','values','Unknown','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','ref','addComment','userId','/reply','_injector','OpenOrReOpen','createTimestamp','reply','Delete','thread-comment-data-source.config','find','_configService','_initUserSync','requireSession','stringify','486525wvJUtb','onReady','_threadCommentDataSourceService','post','comments','body','rangeId','/universer-api/comment/unit/','replyId','9AKoaPU','_sessionService','size','/list','3487344GtSZhE','resolved','_commentService','disposeWithMe','Add','1203642ZWZhCv','UNRECOGNIZED','getComment','rangeType','deleteComment','add','2187848SUCEhq','parse','resolveComment','error','/edit','updateComment','addUser','listComments','userID','solved','threadId','defineProperty','parentId','pipe','/solved','saveCommentToSnapshot','format','_threadCommentModel','users'];_0x2a0d=function(){return _0x5d0c5e;};return _0x2a0d();}const _0x2b3a05=_0x81a1;(function(_0x5937ad,_0x232c0a){const _0x9b48ba=_0x81a1,_0x23d8e0=_0x5937ad();while(!![]){try{const _0x328333=parseInt(_0x9b48ba(0x104))/0x1+-parseInt(_0x9b48ba(0xe5))/0x2+-parseInt(_0x9b48ba(0xd3))/0x3+-parseInt(_0x9b48ba(0xba))/0x4*(parseInt(_0x9b48ba(0xb1))/0x5)+parseInt(_0x9b48ba(0xbd))/0x6+parseInt(_0x9b48ba(0xe0))/0x7+parseInt(_0x9b48ba(0xeb))/0x8*(parseInt(_0x9b48ba(0xdc))/0x9);if(_0x328333===_0x232c0a)break;else _0x23d8e0['push'](_0x23d8e0['shift']());}catch(_0x28618b){_0x23d8e0['push'](_0x23d8e0['shift']());}}}(_0x2a0d,0x4efcf));import{CommentService as _0x57eda0,CollaborationSessionService as _0x34dfc7,UniverCollaborationClientPlugin as _0x24dfe9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2890f9}from'@univerjs-pro/license';import{dayjs as _0x8123a1,UserManagerService as _0x29389e,Inject as _0x498129,Injector as _0x4a0051,Disposable as _0x36a07e,CustomRangeType as _0x450107,UniverInstanceType as _0x5e44b5,DependentOn as _0x100038,IConfigService as _0x31db9c,Plugin as _0x1f8d6e,merge as _0x1b1ca2}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xa3c3d4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x59939f,IThreadCommentDataSourceService as _0x4069f7}from'@univerjs/thread-comment';import{bufferTime as _0x2daf75}from'rxjs';import{HTTPService as _0x26a669}from'@univerjs/network';const W=_0x2b3a05(0xc2);var I=(_0x145428=>(_0x145428[_0x145428[_0x2b3a05(0xc9)]=0x0]='OpenOrReOpen',_0x145428[_0x145428[_0x2b3a05(0xb2)]=0x1]=_0x2b3a05(0xb2),_0x145428[_0x145428[_0x2b3a05(0xe6)]=-0x1]='UNRECOGNIZED',_0x145428))(I||{}),v=(_0x130188=>(_0x130188[_0x130188[_0x2b3a05(0xc1)]=0x0]=_0x2b3a05(0xc1),_0x130188[_0x130188[_0x2b3a05(0xe4)]=0x1]=_0x2b3a05(0xe4),_0x130188[_0x130188['Reply']=0x2]=_0x2b3a05(0xac),_0x130188[_0x130188['Edit']=0x3]=_0x2b3a05(0xc3),_0x130188[_0x130188['Delete']=0x4]=_0x2b3a05(0xcc),_0x130188[_0x130188['Solve']=0x5]='Solve',_0x130188[_0x130188[_0x2b3a05(0xe6)]=-0x1]=_0x2b3a05(0xe6),_0x130188))(v||{});const y=_0x177b1d=>_0x8123a1(new Date(+_0x177b1d))[_0x2b3a05(0xfb)](_0x2b3a05(0xb0)),B=async(_0x46cc82,_0x2ba6db)=>{const _0x9493a3=_0x2b3a05,_0x6ea9fc=_0x46cc82[_0x9493a3(0xa5)](_0x29389e),_0x152d99=_0x46cc82[_0x9493a3(0xa5)](_0x26a669);_0x2ba6db['forEach'](_0xe0a975=>{const _0x504d9e=_0x9493a3;_0x6ea9fc['getUser'](_0xe0a975)&&_0x2ba6db[_0x504d9e(0x10a)](_0xe0a975);}),_0x2ba6db[_0x9493a3(0xde)]&&(await _0x152d99['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x2ba6db]}}))[_0x9493a3(0xd8)][_0x9493a3(0xfd)][_0x9493a3(0xaa)](_0x4ca041=>{_0x4ca041&&_0x6ea9fc['addUser'](_0x4ca041);});};var K=Object[_0x2b3a05(0xfe)],V=(_0x3ccb97,_0x1bf184,_0x14da28,_0x2e9ef7)=>{for(var _0x1eae47=_0x2e9ef7>0x1?void 0x0:_0x2e9ef7?K(_0x1bf184,_0x14da28):_0x1bf184,_0x82114d=_0x3ccb97['length']-0x1,_0xcf1a2;_0x82114d>=0x0;_0x82114d--)(_0xcf1a2=_0x3ccb97[_0x82114d])&&(_0x1eae47=_0xcf1a2(_0x1eae47)||_0x1eae47);return _0x1eae47;},p=(_0x127bbb,_0x4ddbf6)=>(_0x3fe9ec,_0x1834e3)=>_0x4ddbf6(_0x3fe9ec,_0x1834e3,_0x127bbb);let _=class extends _0x36a07e{constructor(_0x31a92b,_0x5dbcb1,_0x24fda3,_0x49e3e8){const _0x39452e=_0x2b3a05;super(),this[_0x39452e(0xe2)]=_0x31a92b,this[_0x39452e(0xfc)]=_0x5dbcb1,this[_0x39452e(0xa8)]=_0x24fda3,this[_0x39452e(0xc8)]=_0x49e3e8,this[_0x39452e(0xff)](),this['_initUserSync']();}[_0x2b3a05(0xd0)](){const _0x38e32f=_0x2b3a05;this[_0x38e32f(0xe3)](this[_0x38e32f(0xfc)][_0x38e32f(0xa4)][_0x38e32f(0xf8)](_0x2daf75(0x10))[_0x38e32f(0xb7)](_0x3fc155=>{const _0x2153a1=_0x38e32f,_0x3abdc6=new Set();_0x3fc155[_0x2153a1(0xaa)](_0x7b70a4=>{const _0xaa0e38=_0x2153a1;switch(_0x7b70a4[_0xaa0e38(0x108)]){case _0xaa0e38(0xea):{const _0x436d90=_0x7b70a4[_0xaa0e38(0xb6)]['personId'];_0x3abdc6['add'](_0x436d90);break;}}}),B(this[_0x2153a1(0xc8)],_0x3abdc6);}));}[_0x2b3a05(0xff)](){const _0x4411d9=_0x2b3a05;this[_0x4411d9(0xe3)](this[_0x4411d9(0xe2)]['commentUpdate$'][_0x4411d9(0xb7)](async _0x2c708d=>{const _0x5c7953=_0x4411d9;var _0x4b0a00,_0x31c3e3,_0x2f3d3a,_0x2a5386;const _0x5d36f4=(_0x4b0a00=this[_0x5c7953(0xfc)][_0x5c7953(0x105)](_0x2c708d[_0x5c7953(0x101)])[_0x5c7953(0xce)](_0x69703e=>_0x69703e[_0x5c7953(0xf5)]===_0x2c708d[_0x5c7953(0xf5)]))==null?void 0x0:_0x4b0a00['root'];if(!_0x5d36f4)return;const {unitId:_0xa6e968,subUnitId:_0xa812bc}=_0x5d36f4;switch(_0x2c708d[_0x5c7953(0x107)]&&this['_userService'][_0x5c7953(0xf1)](_0x2c708d[_0x5c7953(0x107)]),_0x2c708d[_0x5c7953(0x108)]){case v[_0x5c7953(0xe4)]:break;case v[_0x5c7953(0xac)]:{this[_0x5c7953(0xfc)][_0x5c7953(0xc5)](_0xa6e968,_0xa812bc,{'unitId':_0xa6e968,'subUnitId':_0xa812bc,'ref':'','id':_0x2c708d[_0x5c7953(0xdb)],'dT':y(+_0x2c708d[_0x5c7953(0xca)]),'threadId':_0x2c708d[_0x5c7953(0xf5)],'personId':(_0x2f3d3a=(_0x31c3e3=_0x2c708d[_0x5c7953(0x107)])==null?void 0x0:_0x31c3e3[_0x5c7953(0xf3)])!=null?_0x2f3d3a:_0x2c708d[_0x5c7953(0xc6)],'text':JSON[_0x5c7953(0xec)](_0x2c708d['content']),'parentId':_0x5d36f4['id']});break;}case v['Delete']:{const _0x13abc4=this[_0x5c7953(0xfc)][_0x5c7953(0xe7)](_0xa6e968,_0xa812bc,_0x2c708d['replyId']);_0x13abc4&&_0x13abc4[_0x5c7953(0xf7)]&&this[_0x5c7953(0xfc)][_0x5c7953(0xe9)](_0xa6e968,_0xa812bc,_0x2c708d['replyId']);break;}case v[_0x5c7953(0xc3)]:{this[_0x5c7953(0xfc)][_0x5c7953(0xf0)](_0xa6e968,_0xa812bc,{'commentId':_0x2c708d['replyId'],'text':JSON[_0x5c7953(0xec)](_0x2c708d[_0x5c7953(0xa9)])});break;}case v['Solve']:{const _0x5f0403=(_0x2a5386=this[_0x5c7953(0xfc)]['getUnit'](_0x2c708d[_0x5c7953(0x101)])['find'](_0x346a0d=>_0x346a0d['threadId']===_0x2c708d['threadId']))==null?void 0x0:_0x2a5386['root'];_0x5f0403&&this[_0x5c7953(0xfc)][_0x5c7953(0xed)](_0xa6e968,_0xa812bc,_0x5f0403['id'],_0x2c708d['solved']===I[_0x5c7953(0xb2)]);break;}}}));}};_=V([p(0x0,_0x498129(_0x57eda0)),p(0x1,_0x498129(_0x59939f)),p(0x2,_0x498129(_0x29389e)),p(0x3,_0x498129(_0x4a0051))],_);const z=_0x2b3a05(0xcd),O={};var k=Object[_0x2b3a05(0xfe)],Q=(_0x137738,_0x58e2dd,_0x33fb3e,_0xa4184d)=>{const _0x3d3795=_0x2b3a05;for(var _0x5a0188=_0xa4184d>0x1?void 0x0:_0xa4184d?k(_0x58e2dd,_0x33fb3e):_0x58e2dd,_0x4e6697=_0x137738[_0x3d3795(0xbb)]-0x1,_0x1c6276;_0x4e6697>=0x0;_0x4e6697--)(_0x1c6276=_0x137738[_0x4e6697])&&(_0x5a0188=_0x1c6276(_0x5a0188)||_0x5a0188);return _0x5a0188;},b=(_0x58e9f7,_0x2d8fb1)=>(_0x3ef83b,_0x1f6602)=>_0x2d8fb1(_0x3ef83b,_0x1f6602,_0x58e9f7);function _0x81a1(_0x59653b,_0x3e4848){const _0x2a0d55=_0x2a0d();return _0x81a1=function(_0x81a15b,_0xae53e9){_0x81a15b=_0x81a15b-0xa3;let _0x462405=_0x2a0d55[_0x81a15b];return _0x462405;},_0x81a1(_0x59653b,_0x3e4848);}function X(_0x4c2bcc,_0x2abf67){const _0x405497=_0x2b3a05,_0x24f327=_0x4c2bcc['replies'][0x0];return{..._0x2abf67,'id':_0x24f327[_0x405497(0xdb)],'resolved':_0x4c2bcc[_0x405497(0xf4)]===0x1,'dT':y(_0x24f327[_0x405497(0xca)]),'personId':_0x24f327['userId'],'threadId':_0x24f327[_0x405497(0xf5)]};}function ee(_0x4de25f,_0x3f471b,_0x13f928){const _0x4f1039=_0x2b3a05;var _0x55fd92,_0x20976b;if(((_0x20976b=(_0x55fd92=_0x4de25f==null?void 0x0:_0x4de25f[_0x4f1039(0xad)])==null?void 0x0:_0x55fd92[_0x4f1039(0xbb)])!=null?_0x20976b:0x0)>0x0){const _0x14f233=(_0x282b42,_0x49735b)=>({'id':_0x282b42[_0x4f1039(0xdb)],'threadId':_0x282b42[_0x4f1039(0xf5)],'dT':y(_0x282b42[_0x4f1039(0xca)]),'personId':_0x282b42[_0x4f1039(0xc6)],'resolved':_0x4de25f[_0x4f1039(0xf4)]===I['Solved'],'unitId':_0x3f471b,'subUnitId':_0x13f928,'text':JSON[_0x4f1039(0xec)](_0x282b42['content']),'parentId':_0x49735b}),_0x5c74db=_0x14f233(_0x4de25f['replies'][0x0]);return{..._0x5c74db,'children':_0x4de25f[_0x4f1039(0xad)][_0x4f1039(0x109)](0x1)[_0x4f1039(0xbe)](_0x29dff8=>_0x14f233(_0x29dff8,_0x5c74db['id']))};}return null;}let S=class{constructor(_0x2ee7f3,_0x58d0cc,_0x38f933){const _0x420dcd=_0x2b3a05;this['_httpService']=_0x2ee7f3,this[_0x420dcd(0xa8)]=_0x58d0cc,this[_0x420dcd(0xdd)]=_0x38f933;}async[_0x2b3a05(0xc5)](_0x5237fe){const _0x89560a=_0x2b3a05;var _0xb05776,_0x10b74d;const {parentId:_0x5654f9,unitId:_0x972565,text:_0x37986e,threadId:_0x2e044a}=_0x5237fe,_0x54bc0c=(_0x10b74d=(_0xb05776=_0x37986e[_0x89560a(0xaf)])==null?void 0x0:_0xb05776['filter'](_0x2d2b98=>_0x2d2b98[_0x89560a(0xe8)]===_0x450107[_0x89560a(0xa3)])[_0x89560a(0xbe)](_0x4f2c7a=>_0x4f2c7a[_0x89560a(0xd9)]))!=null?_0x10b74d:[],_0x3678f9=JSON[_0x89560a(0xd2)](_0x37986e),_0x54e823=(await this[_0x89560a(0xdd)][_0x89560a(0xd1)](_0x972565))[_0x89560a(0xb9)]();if(_0x5654f9){const _0x3b95d9={'memberId':_0x54e823,'unitId':_0x972565,'content':_0x3678f9,'mention':_0x54bc0c,'threadId':_0x2e044a},_0x39c1ec=(await this[_0x89560a(0x100)]['post'](_0x89560a(0xda)+_0x972565+_0x89560a(0xc7),{'body':_0x3b95d9}))[_0x89560a(0xd8)][_0x89560a(0xcb)];return{..._0x5237fe,'id':_0x39c1ec[_0x89560a(0xdb)],'dT':_0x8123a1(+_0x39c1ec[_0x89560a(0xca)])[_0x89560a(0xfb)](_0x89560a(0xb0)),'personId':_0x39c1ec[_0x89560a(0xc6)]};}else{const _0x1b5d8f={'memberId':_0x54e823,'unitId':_0x972565,'content':_0x3678f9,'mention':_0x54bc0c},_0x363458=await this[_0x89560a(0x100)]['post'](_0x89560a(0xda)+_0x972565+_0x89560a(0x103),{'body':_0x1b5d8f});return X(_0x363458[_0x89560a(0xd8)][_0x89560a(0xbf)],_0x5237fe);}}async['updateComment'](_0x1bb80e){const _0x23c55b=_0x2b3a05;var _0x2f7f46,_0x41ebd1;const {text:_0xff9c23,unitId:_0x23fdb3}=_0x1bb80e,_0x4a016c=(_0x41ebd1=(_0x2f7f46=_0xff9c23[_0x23c55b(0xaf)])==null?void 0x0:_0x2f7f46[_0x23c55b(0xb4)](_0x46c3ae=>_0x46c3ae[_0x23c55b(0xe8)]===_0x450107[_0x23c55b(0xa3)])[_0x23c55b(0xbe)](_0x31bced=>_0x31bced[_0x23c55b(0xd9)]))!=null?_0x41ebd1:[],_0x22036a=JSON[_0x23c55b(0xd2)](_0xff9c23),_0x26e176=_0x1bb80e['threadId'],_0x37c6ef=_0x1bb80e['id'],_0x2cb86c={'memberId':(await this['_sessionService']['requireSession'](_0x23fdb3))[_0x23c55b(0xb9)](),'unitId':_0x23fdb3,'threadId':_0x26e176,'mention':_0x4a016c,'content':_0x22036a,'replyId':_0x37c6ef},_0x1267e9=await this[_0x23c55b(0x100)][_0x23c55b(0xd6)](_0x23c55b(0xda)+_0x23fdb3+_0x23c55b(0xef),{'body':_0x2cb86c});return!_0x1267e9[_0x23c55b(0xd8)][_0x23c55b(0xee)]||_0x1267e9['body'][_0x23c55b(0xee)][_0x23c55b(0xa6)]===0x1;}async['resolveComment'](_0x21f90c){const _0x4f3c95=_0x2b3a05,{unitId:_0x12ce03}=_0x21f90c,_0xbf820e=_0x21f90c[_0x4f3c95(0xf5)],_0x2f1e7e={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x12ce03,'threadId':_0xbf820e,'solved':_0x21f90c[_0x4f3c95(0xe1)]?I[_0x4f3c95(0xb2)]:I[_0x4f3c95(0xc9)]},_0x52ed40=await this[_0x4f3c95(0x100)]['post']('/universer-api/comment/unit/'+_0x12ce03+_0x4f3c95(0xf9),{'body':_0x2f1e7e});return!_0x52ed40[_0x4f3c95(0xd8)][_0x4f3c95(0xee)]||_0x52ed40[_0x4f3c95(0xd8)][_0x4f3c95(0xee)][_0x4f3c95(0xa6)]===0x1;}async[_0x2b3a05(0xe9)](_0x543592,_0x5ba2ac,_0x532199,_0x445b27){const _0x43d901=_0x2b3a05,_0x54e169={'memberId':(await this[_0x43d901(0xdd)][_0x43d901(0xd1)](_0x543592))[_0x43d901(0xb9)](),'threadId':_0x532199,'replyId':_0x445b27,'unitId':_0x543592},_0x4152f7=await this[_0x43d901(0x100)]['post'](_0x43d901(0xda)+_0x543592+_0x43d901(0xa7),{'body':_0x54e169});return!_0x4152f7[_0x43d901(0xd8)]['error']||_0x4152f7['body'][_0x43d901(0xee)][_0x43d901(0xa6)]===0x1;}async[_0x2b3a05(0xf2)](_0x43fb89,_0x35dfc7,_0x44ccf7){const _0xdc56a0=_0x2b3a05,_0x2bb512={'unitId':_0x43fb89,'threadId':_0x44ccf7},_0x136aa3=await this[_0xdc56a0(0x100)][_0xdc56a0(0xd6)](_0xdc56a0(0xda)+_0x43fb89+_0xdc56a0(0xdf),{'body':_0x2bb512}),_0x396b45=_0x44ccf7[_0xdc56a0(0xbe)](_0x521a42=>ee(_0x136aa3[_0xdc56a0(0xd8)][_0xdc56a0(0xd7)][_0x521a42],_0x43fb89,_0x35dfc7))['filter'](Boolean);return Object[_0xdc56a0(0xc0)](_0x136aa3[_0xdc56a0(0xd8)][_0xdc56a0(0xfd)])[_0xdc56a0(0xaa)](_0x51b647=>{const _0x5f17ad=_0xdc56a0;this['_userService'][_0x5f17ad(0xf1)](_0x51b647);}),_0x396b45;}[_0x2b3a05(0xfa)](_0x532809){const _0x48a49a=_0x2b3a05;return{'id':_0x532809['id'],'threadId':_0x532809[_0x48a49a(0xf5)],'ref':_0x532809[_0x48a49a(0xc4)]};}};S=Q([b(0x0,_0x498129(_0x26a669)),b(0x1,_0x498129(_0x29389e)),b(0x2,_0x498129(_0x34dfc7))],S);var re=Object[_0x2b3a05(0xfe)],te=(_0x2b6795,_0x24c0d5,_0x177188,_0x2fa035)=>{for(var _0x5313f7=_0x2fa035>0x1?void 0x0:_0x2fa035?re(_0x24c0d5,_0x177188):_0x24c0d5,_0x3135b0=_0x2b6795['length']-0x1,_0x503ffd;_0x3135b0>=0x0;_0x3135b0--)(_0x503ffd=_0x2b6795[_0x3135b0])&&(_0x5313f7=_0x503ffd(_0x5313f7)||_0x5313f7);return _0x5313f7;},M=(_0x1f5aaa,_0x5cb32c)=>(_0x16b200,_0x5c335a)=>_0x5cb32c(_0x16b200,_0x5c335a,_0x1f5aaa);let f=class extends _0x36a07e{constructor(_0x16e3b6,_0x14ab06){const _0x40106c=_0x2b3a05;super(),this[_0x40106c(0xd5)]=_0x16e3b6,this[_0x40106c(0xb3)]=_0x14ab06,this['_initDataSource']();}['_initDataSource'](){const _0x29dfc7=_0x2b3a05;this[_0x29dfc7(0xd5)][_0x29dfc7(0xae)]=this[_0x29dfc7(0xb3)],this[_0x29dfc7(0xd5)][_0x29dfc7(0xab)]=!0x1;}};f=te([M(0x0,_0x4069f7),M(0x1,_0x498129(S))],f);var se=Object[_0x2b3a05(0xf6)],oe=Object['getOwnPropertyDescriptor'],ne=(_0xf6d3f8,_0x53120e,_0x40e63d)=>_0x53120e in _0xf6d3f8?se(_0xf6d3f8,_0x53120e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x40e63d}):_0xf6d3f8[_0x53120e]=_0x40e63d,ie=(_0x46d76f,_0x43b2b0,_0x52d179,_0x723148)=>{const _0x465b61=_0x2b3a05;for(var _0x1267a0=_0x723148>0x1?void 0x0:_0x723148?oe(_0x43b2b0,_0x52d179):_0x43b2b0,_0x1a5a81=_0x46d76f[_0x465b61(0xbb)]-0x1,_0x56c178;_0x1a5a81>=0x0;_0x1a5a81--)(_0x56c178=_0x46d76f[_0x1a5a81])&&(_0x1267a0=_0x56c178(_0x1267a0)||_0x1267a0);return _0x1267a0;},N=(_0x516c10,_0x34c475)=>(_0x3d8091,_0x18876d)=>_0x34c475(_0x3d8091,_0x18876d,_0x516c10),$=(_0x24957d,_0x2ce9cd,_0x54fd97)=>ne(_0x24957d,typeof _0x2ce9cd!=_0x2b3a05(0xb8)?_0x2ce9cd+'':_0x2ce9cd,_0x54fd97);let g=class extends _0x1f8d6e{constructor(_0x30ac06=O,_0x33d4ec,_0x4403be){const _0x156dfb=_0x2b3a05;super(),this[_0x156dfb(0xbc)]=_0x30ac06,this['_injector']=_0x33d4ec,this[_0x156dfb(0xcf)]=_0x4403be;const {..._0x5ddd41}=_0x1b1ca2({},O,this['_config']);this[_0x156dfb(0xcf)][_0x156dfb(0xb5)](z,_0x5ddd41);}['onStarting'](){const _0x2796d5=_0x2b3a05;[[S],[f],[_]][_0x2796d5(0xaa)](_0x42ec86=>{const _0x175418=_0x2796d5;this[_0x175418(0xc8)][_0x175418(0xea)](_0x42ec86);});}[_0x2b3a05(0xd4)](){const _0x324ca2=_0x2b3a05;this[_0x324ca2(0xc8)][_0x324ca2(0xa5)](f),this[_0x324ca2(0xc8)]['get'](_);}};$(g,_0x2b3a05(0x102),W),$(g,'type',_0x5e44b5[_0x2b3a05(0x106)]),g=ie([_0x100038(_0xa3c3d4,_0x24dfe9,_0x2890f9),N(0x1,_0x498129(_0x4a0051)),N(0x2,_0x31db9c)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x35a1d4=_0x3e59;(function(_0x46ccbb,_0x4d668c){const _0x4e7b0a=_0x3e59,_0x2cd634=_0x46ccbb();while(!![]){try{const _0x392e65=parseInt(_0x4e7b0a(0xe9))/0x1*(parseInt(_0x4e7b0a(0xdd))/0x2)+-parseInt(_0x4e7b0a(0xf3))/0x3*(-parseInt(_0x4e7b0a(0xc6))/0x4)+-parseInt(_0x4e7b0a(0xbf))/0x5*(-parseInt(_0x4e7b0a(0x9d))/0x6)+-parseInt(_0x4e7b0a(0xeb))/0x7+parseInt(_0x4e7b0a(0xe1))/0x8*(-parseInt(_0x4e7b0a(0x90))/0x9)+-parseInt(_0x4e7b0a(0xbd))/0xa+-parseInt(_0x4e7b0a(0xb0))/0xb*(-parseInt(_0x4e7b0a(0xef))/0xc);if(_0x392e65===_0x4d668c)break;else _0x2cd634['push'](_0x2cd634['shift']());}catch(_0x215a14){_0x2cd634['push'](_0x2cd634['shift']());}}}(_0x2b72,0x7656d));import{CommentService as _0x57b718,CollaborationSessionService as _0x333ebf,UniverCollaborationClientPlugin as _0x27c89b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x32bd05}from'@univerjs-pro/license';import{dayjs as _0x5eed82,UserManagerService as _0x104e56,Inject as _0x568319,Injector as _0x5710e7,Disposable as _0xacb343,CustomRangeType as _0x228e02,UniverInstanceType as _0x505f7d,DependentOn as _0x54f3d1,IConfigService as _0x241ad2,Plugin as _0x46fdf3,merge as _0x577e8b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2aaa9d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x59aefc,IThreadCommentDataSourceService as _0x1e6e5b}from'@univerjs/thread-comment';import{bufferTime as _0x4bd892}from'rxjs';import{HTTPService as _0x2e05a5}from'@univerjs/network';const W=_0x35a1d4(0x91);var I=(_0x1eae20=>(_0x1eae20[_0x1eae20[_0x35a1d4(0xa2)]=0x0]=_0x35a1d4(0xa2),_0x1eae20[_0x1eae20[_0x35a1d4(0xa7)]=0x1]=_0x35a1d4(0xa7),_0x1eae20[_0x1eae20['UNRECOGNIZED']=-0x1]=_0x35a1d4(0x95),_0x1eae20))(I||{}),v=(_0x435084=>(_0x435084[_0x435084[_0x35a1d4(0xee)]=0x0]=_0x35a1d4(0xee),_0x435084[_0x435084[_0x35a1d4(0xd5)]=0x1]=_0x35a1d4(0xd5),_0x435084[_0x435084[_0x35a1d4(0xd4)]=0x2]=_0x35a1d4(0xd4),_0x435084[_0x435084[_0x35a1d4(0xc8)]=0x3]='Edit',_0x435084[_0x435084[_0x35a1d4(0xb2)]=0x4]=_0x35a1d4(0xb2),_0x435084[_0x435084[_0x35a1d4(0xaf)]=0x5]=_0x35a1d4(0xaf),_0x435084[_0x435084[_0x35a1d4(0x95)]=-0x1]=_0x35a1d4(0x95),_0x435084))(v||{});function _0x3e59(_0x3acb0f,_0x3be540){const _0x2b729e=_0x2b72();return _0x3e59=function(_0x3e59c3,_0xca1bd9){_0x3e59c3=_0x3e59c3-0x8f;let _0x20e9fd=_0x2b729e[_0x3e59c3];return _0x20e9fd;},_0x3e59(_0x3acb0f,_0x3be540);}const y=_0x5e73ac=>_0x5eed82(new Date(+_0x5e73ac))[_0x35a1d4(0xb4)](_0x35a1d4(0x9e)),B=async(_0x56a26e,_0x55c367)=>{const _0x338a87=_0x35a1d4,_0x5bc796=_0x56a26e[_0x338a87(0xa3)](_0x104e56),_0x3cb0aa=_0x56a26e[_0x338a87(0xa3)](_0x2e05a5);_0x55c367[_0x338a87(0xa1)](_0x470cfa=>{const _0x3ba6e9=_0x338a87;_0x5bc796[_0x3ba6e9(0x97)](_0x470cfa)&&_0x55c367['delete'](_0x470cfa);}),_0x55c367[_0x338a87(0xcf)]&&(await _0x3cb0aa[_0x338a87(0xa3)](_0x338a87(0x9b),{'params':{'userIDs':[..._0x55c367]}}))[_0x338a87(0xea)][_0x338a87(0xe0)][_0x338a87(0xa1)](_0xc0ba51=>{const _0x1814e9=_0x338a87;_0xc0ba51&&_0x5bc796[_0x1814e9(0xe3)](_0xc0ba51);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x248a24,_0x33537b,_0x3887e5,_0x84099)=>{const _0x50c4f6=_0x35a1d4;for(var _0x1b299d=_0x84099>0x1?void 0x0:_0x84099?K(_0x33537b,_0x3887e5):_0x33537b,_0x23200c=_0x248a24[_0x50c4f6(0x99)]-0x1,_0x3b4368;_0x23200c>=0x0;_0x23200c--)(_0x3b4368=_0x248a24[_0x23200c])&&(_0x1b299d=_0x3b4368(_0x1b299d)||_0x1b299d);return _0x1b299d;},p=(_0xe9bd7a,_0x152668)=>(_0x1f70fb,_0x543d64)=>_0x152668(_0x1f70fb,_0x543d64,_0xe9bd7a);let _=class extends _0xacb343{constructor(_0x576436,_0x2718f0,_0x4149be,_0x31bf06){const _0x27725f=_0x35a1d4;super(),this['_commentService']=_0x576436,this['_threadCommentModel']=_0x2718f0,this[_0x27725f(0xbc)]=_0x4149be,this['_injector']=_0x31bf06,this[_0x27725f(0x98)](),this[_0x27725f(0x94)]();}[_0x35a1d4(0x94)](){const _0x74bc5d=_0x35a1d4;this[_0x74bc5d(0xe6)](this[_0x74bc5d(0xf0)][_0x74bc5d(0xe5)][_0x74bc5d(0xb6)](_0x4bd892(0x10))['subscribe'](_0x534b4b=>{const _0x1916c2=_0x74bc5d,_0x121af6=new Set();_0x534b4b[_0x1916c2(0xa1)](_0x58e66d=>{const _0x12efe0=_0x1916c2;switch(_0x58e66d[_0x12efe0(0xbe)]){case _0x12efe0(0xd9):{const _0x1e416f=_0x58e66d['payload'][_0x12efe0(0xc1)];_0x121af6['add'](_0x1e416f);break;}}}),B(this[_0x1916c2(0xec)],_0x121af6);}));}[_0x35a1d4(0x98)](){const _0x4c07d0=_0x35a1d4;this['disposeWithMe'](this[_0x4c07d0(0xd2)][_0x4c07d0(0xe5)][_0x4c07d0(0x92)](async _0x1cb16b=>{const _0x3c097c=_0x4c07d0;var _0x2db8cd,_0x478f80,_0x419b44,_0x3d6358;const _0x5c889f=(_0x2db8cd=this['_threadCommentModel'][_0x3c097c(0xdb)](_0x1cb16b[_0x3c097c(0xdc)])['find'](_0x5b86a8=>_0x5b86a8['threadId']===_0x1cb16b[_0x3c097c(0xc2)]))==null?void 0x0:_0x2db8cd[_0x3c097c(0xba)];if(!_0x5c889f)return;const {unitId:_0xcb196f,subUnitId:_0x5defad}=_0x5c889f;switch(_0x1cb16b['user']&&this[_0x3c097c(0xbc)][_0x3c097c(0xe3)](_0x1cb16b['user']),_0x1cb16b[_0x3c097c(0xbe)]){case v['Add']:break;case v[_0x3c097c(0xd4)]:{this[_0x3c097c(0xf0)]['addComment'](_0xcb196f,_0x5defad,{'unitId':_0xcb196f,'subUnitId':_0x5defad,'ref':'','id':_0x1cb16b['replyId'],'dT':y(+_0x1cb16b[_0x3c097c(0xdf)]),'threadId':_0x1cb16b[_0x3c097c(0xc2)],'personId':(_0x419b44=(_0x478f80=_0x1cb16b[_0x3c097c(0xcc)])==null?void 0x0:_0x478f80[_0x3c097c(0xf2)])!=null?_0x419b44:_0x1cb16b[_0x3c097c(0xc7)],'text':JSON[_0x3c097c(0x93)](_0x1cb16b[_0x3c097c(0xa0)]),'parentId':_0x5c889f['id']});break;}case v[_0x3c097c(0xb2)]:{const _0x1aa9cf=this[_0x3c097c(0xf0)]['getComment'](_0xcb196f,_0x5defad,_0x1cb16b[_0x3c097c(0xa8)]);_0x1aa9cf&&_0x1aa9cf[_0x3c097c(0xed)]&&this[_0x3c097c(0xf0)][_0x3c097c(0xd6)](_0xcb196f,_0x5defad,_0x1cb16b[_0x3c097c(0xa8)]);break;}case v[_0x3c097c(0xc8)]:{this['_threadCommentModel']['updateComment'](_0xcb196f,_0x5defad,{'commentId':_0x1cb16b[_0x3c097c(0xa8)],'text':JSON[_0x3c097c(0x93)](_0x1cb16b['content'])});break;}case v[_0x3c097c(0xaf)]:{const _0x2049e2=(_0x3d6358=this[_0x3c097c(0xf0)][_0x3c097c(0xdb)](_0x1cb16b['unitId'])[_0x3c097c(0xc3)](_0x138b34=>_0x138b34['threadId']===_0x1cb16b['threadId']))==null?void 0x0:_0x3d6358[_0x3c097c(0xba)];_0x2049e2&&this[_0x3c097c(0xf0)]['resolveComment'](_0xcb196f,_0x5defad,_0x2049e2['id'],_0x1cb16b[_0x3c097c(0xd1)]===I[_0x3c097c(0xa7)]);break;}}}));}};_=V([p(0x0,_0x568319(_0x57b718)),p(0x1,_0x568319(_0x59aefc)),p(0x2,_0x568319(_0x104e56)),p(0x3,_0x568319(_0x5710e7))],_);const z=_0x35a1d4(0xb9),O={};var k=Object[_0x35a1d4(0xac)],Q=(_0x103a5f,_0x4fb6d6,_0x29bb89,_0x3868fc)=>{for(var _0x349259=_0x3868fc>0x1?void 0x0:_0x3868fc?k(_0x4fb6d6,_0x29bb89):_0x4fb6d6,_0x52e029=_0x103a5f['length']-0x1,_0x5efa3c;_0x52e029>=0x0;_0x52e029--)(_0x5efa3c=_0x103a5f[_0x52e029])&&(_0x349259=_0x5efa3c(_0x349259)||_0x349259);return _0x349259;},b=(_0x748b5b,_0x2388f2)=>(_0xeda274,_0x4ac3ef)=>_0x2388f2(_0xeda274,_0x4ac3ef,_0x748b5b);function _0x2b72(){const _0x246614=['/delete','_threadCommentDataSource','filter','9EtYIMz','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','subscribe','parse','_initUserSync','UNRECOGNIZED','onReady','getUser','_init','length','_threadCommentDataSourceService','/universer-api/user/list','symbol','1374ZSHgVz','YYYY/MM/DD\x20HH:mm','addComment','content','forEach','OpenOrReOpen','get','/reply','rangeId','/universer-api/comment/unit/','Solved','replyId','stringify','rangeType','reply','getOwnPropertyDescriptor','setConfig','customRanges','Solve','143451iTAUOR','_httpService','Delete','post','format','saveCommentToSnapshot','pipe','UNIVER_UNKNOWN','defineProperty','thread-comment-data-source.config','root','getMemberID','_userService','9640610VDqTnD','type','18775MpIcAp','ref','personId','threadId','find','requireSession','comments','4OQVRKW','userId','Edit','dataSource','resolved','_sessionService','user','/edit','listComments','size','code','solved','_commentService','syncUpdateMutationToColla','Reply','Add','deleteComment','/list','/add','add','_configService','getUnit','unitId','19226kishrT','pluginName','createTimestamp','users','7297144nTxfhI','COMMENT','addUser','comment','commentUpdate$','disposeWithMe','_initDataSource','map','4fRQqqS','body','5427254xlyzCf','_injector','parentId','Unknown','1488RZJrkK','_threadCommentModel','error','userID','1862436SeumzB'];_0x2b72=function(){return _0x246614;};return _0x2b72();}function X(_0x519930,_0x12d8ad){const _0x35e14f=_0x35a1d4,_0x25899a=_0x519930['replies'][0x0];return{..._0x12d8ad,'id':_0x25899a[_0x35e14f(0xa8)],'resolved':_0x519930[_0x35e14f(0xd1)]===0x1,'dT':y(_0x25899a[_0x35e14f(0xdf)]),'personId':_0x25899a['userId'],'threadId':_0x25899a['threadId']};}function ee(_0x2305a0,_0x48400e,_0x1fda8d){const _0x11c244=_0x35a1d4;var _0x4a490b,_0x223f5e;if(((_0x223f5e=(_0x4a490b=_0x2305a0==null?void 0x0:_0x2305a0['replies'])==null?void 0x0:_0x4a490b[_0x11c244(0x99)])!=null?_0x223f5e:0x0)>0x0){const _0x2503ee=(_0x4abf93,_0x218f10)=>({'id':_0x4abf93[_0x11c244(0xa8)],'threadId':_0x4abf93[_0x11c244(0xc2)],'dT':y(_0x4abf93[_0x11c244(0xdf)]),'personId':_0x4abf93[_0x11c244(0xc7)],'resolved':_0x2305a0[_0x11c244(0xd1)]===I['Solved'],'unitId':_0x48400e,'subUnitId':_0x1fda8d,'text':JSON[_0x11c244(0x93)](_0x4abf93['content']),'parentId':_0x218f10}),_0x19bf52=_0x2503ee(_0x2305a0['replies'][0x0]);return{..._0x19bf52,'children':_0x2305a0['replies']['slice'](0x1)[_0x11c244(0xe8)](_0x5074a7=>_0x2503ee(_0x5074a7,_0x19bf52['id']))};}return null;}let S=class{constructor(_0x3a49ae,_0x169264,_0x2d1b80){const _0x470caf=_0x35a1d4;this[_0x470caf(0xb1)]=_0x3a49ae,this[_0x470caf(0xbc)]=_0x169264,this['_sessionService']=_0x2d1b80;}async[_0x35a1d4(0x9f)](_0x5cc68c){const _0x229205=_0x35a1d4;var _0x35c9c4,_0x33eee7;const {parentId:_0x30c06c,unitId:_0x28c657,text:_0x157728,threadId:_0x54cb36}=_0x5cc68c,_0x24e640=(_0x33eee7=(_0x35c9c4=_0x157728[_0x229205(0xae)])==null?void 0x0:_0x35c9c4[_0x229205(0x8f)](_0x5885c3=>_0x5885c3[_0x229205(0xaa)]===_0x228e02[_0x229205(0xe2)])['map'](_0x1f4ee8=>_0x1f4ee8[_0x229205(0xa5)]))!=null?_0x33eee7:[],_0x100776=JSON[_0x229205(0xa9)](_0x157728),_0x37a1dd=(await this[_0x229205(0xcb)][_0x229205(0xc4)](_0x28c657))['getMemberID']();if(_0x30c06c){const _0x56bcc3={'memberId':_0x37a1dd,'unitId':_0x28c657,'content':_0x100776,'mention':_0x24e640,'threadId':_0x54cb36},_0x1edd0a=(await this['_httpService'][_0x229205(0xb3)](_0x229205(0xa6)+_0x28c657+_0x229205(0xa4),{'body':_0x56bcc3}))['body'][_0x229205(0xab)];return{..._0x5cc68c,'id':_0x1edd0a[_0x229205(0xa8)],'dT':_0x5eed82(+_0x1edd0a[_0x229205(0xdf)])[_0x229205(0xb4)](_0x229205(0x9e)),'personId':_0x1edd0a[_0x229205(0xc7)]};}else{const _0x57dbe7={'memberId':_0x37a1dd,'unitId':_0x28c657,'content':_0x100776,'mention':_0x24e640},_0x25c7fb=await this[_0x229205(0xb1)][_0x229205(0xb3)](_0x229205(0xa6)+_0x28c657+_0x229205(0xd8),{'body':_0x57dbe7});return X(_0x25c7fb[_0x229205(0xea)][_0x229205(0xe4)],_0x5cc68c);}}async['updateComment'](_0x5dc479){const _0x2c587a=_0x35a1d4;var _0x5248fe,_0x25bf8c;const {text:_0x2562d6,unitId:_0x40f509}=_0x5dc479,_0x8c32d6=(_0x25bf8c=(_0x5248fe=_0x2562d6['customRanges'])==null?void 0x0:_0x5248fe['filter'](_0x558266=>_0x558266[_0x2c587a(0xaa)]===_0x228e02[_0x2c587a(0xe2)])[_0x2c587a(0xe8)](_0x2a472f=>_0x2a472f[_0x2c587a(0xa5)]))!=null?_0x25bf8c:[],_0x327578=JSON[_0x2c587a(0xa9)](_0x2562d6),_0x10c9e3=_0x5dc479[_0x2c587a(0xc2)],_0x48f001=_0x5dc479['id'],_0x35d3fd={'memberId':(await this['_sessionService'][_0x2c587a(0xc4)](_0x40f509))[_0x2c587a(0xbb)](),'unitId':_0x40f509,'threadId':_0x10c9e3,'mention':_0x8c32d6,'content':_0x327578,'replyId':_0x48f001},_0x28b562=await this['_httpService'][_0x2c587a(0xb3)](_0x2c587a(0xa6)+_0x40f509+_0x2c587a(0xcd),{'body':_0x35d3fd});return!_0x28b562[_0x2c587a(0xea)][_0x2c587a(0xf1)]||_0x28b562[_0x2c587a(0xea)]['error'][_0x2c587a(0xd0)]===0x1;}async['resolveComment'](_0x3de4ce){const _0x2da0d3=_0x35a1d4,{unitId:_0x1212a9}=_0x3de4ce,_0x4da36e=_0x3de4ce[_0x2da0d3(0xc2)],_0x5049e7={'memberId':this[_0x2da0d3(0xbc)]['getCurrentUser']()['userID'],'unitId':_0x1212a9,'threadId':_0x4da36e,'solved':_0x3de4ce[_0x2da0d3(0xca)]?I[_0x2da0d3(0xa7)]:I['OpenOrReOpen']},_0x4934f0=await this[_0x2da0d3(0xb1)][_0x2da0d3(0xb3)](_0x2da0d3(0xa6)+_0x1212a9+'/solved',{'body':_0x5049e7});return!_0x4934f0[_0x2da0d3(0xea)]['error']||_0x4934f0[_0x2da0d3(0xea)][_0x2da0d3(0xf1)][_0x2da0d3(0xd0)]===0x1;}async['deleteComment'](_0x27c585,_0x68030d,_0x12f87c,_0x4d6021){const _0x1cda9c=_0x35a1d4,_0x27f5e1={'memberId':(await this[_0x1cda9c(0xcb)][_0x1cda9c(0xc4)](_0x27c585))[_0x1cda9c(0xbb)](),'threadId':_0x12f87c,'replyId':_0x4d6021,'unitId':_0x27c585},_0x5efc0c=await this[_0x1cda9c(0xb1)]['post'](_0x1cda9c(0xa6)+_0x27c585+_0x1cda9c(0xf4),{'body':_0x27f5e1});return!_0x5efc0c[_0x1cda9c(0xea)][_0x1cda9c(0xf1)]||_0x5efc0c[_0x1cda9c(0xea)]['error']['code']===0x1;}async[_0x35a1d4(0xce)](_0x5a0527,_0x20ddce,_0x557567){const _0x44466e=_0x35a1d4,_0x2c2a62={'unitId':_0x5a0527,'threadId':_0x557567},_0x2c9ac2=await this[_0x44466e(0xb1)][_0x44466e(0xb3)](_0x44466e(0xa6)+_0x5a0527+_0x44466e(0xd7),{'body':_0x2c2a62}),_0x2eec90=_0x557567[_0x44466e(0xe8)](_0x9e07a7=>ee(_0x2c9ac2[_0x44466e(0xea)][_0x44466e(0xc5)][_0x9e07a7],_0x5a0527,_0x20ddce))['filter'](Boolean);return Object['values'](_0x2c9ac2['body'][_0x44466e(0xe0)])[_0x44466e(0xa1)](_0xe1388b=>{const _0x2f7030=_0x44466e;this[_0x2f7030(0xbc)][_0x2f7030(0xe3)](_0xe1388b);}),_0x2eec90;}[_0x35a1d4(0xb5)](_0x2cfdd1){const _0x28fa45=_0x35a1d4;return{'id':_0x2cfdd1['id'],'threadId':_0x2cfdd1['threadId'],'ref':_0x2cfdd1[_0x28fa45(0xc0)]};}};S=Q([b(0x0,_0x568319(_0x2e05a5)),b(0x1,_0x568319(_0x104e56)),b(0x2,_0x568319(_0x333ebf))],S);var re=Object[_0x35a1d4(0xac)],te=(_0x24a234,_0x569947,_0x1eadd9,_0x33713d)=>{const _0x47b595=_0x35a1d4;for(var _0x159440=_0x33713d>0x1?void 0x0:_0x33713d?re(_0x569947,_0x1eadd9):_0x569947,_0x47b3e9=_0x24a234[_0x47b595(0x99)]-0x1,_0x5088b9;_0x47b3e9>=0x0;_0x47b3e9--)(_0x5088b9=_0x24a234[_0x47b3e9])&&(_0x159440=_0x5088b9(_0x159440)||_0x159440);return _0x159440;},M=(_0x281b33,_0x25d9ed)=>(_0x3fda6b,_0x44ae4e)=>_0x25d9ed(_0x3fda6b,_0x44ae4e,_0x281b33);let f=class extends _0xacb343{constructor(_0x16ac65,_0x2820d3){const _0x4f2094=_0x35a1d4;super(),this[_0x4f2094(0x9a)]=_0x16ac65,this['_threadCommentDataSource']=_0x2820d3,this[_0x4f2094(0xe7)]();}[_0x35a1d4(0xe7)](){const _0x1b2b85=_0x35a1d4;this['_threadCommentDataSourceService'][_0x1b2b85(0xc9)]=this[_0x1b2b85(0xf5)],this[_0x1b2b85(0x9a)][_0x1b2b85(0xd3)]=!0x1;}};f=te([M(0x0,_0x1e6e5b),M(0x1,_0x568319(S))],f);var se=Object[_0x35a1d4(0xb8)],oe=Object[_0x35a1d4(0xac)],ne=(_0x13e5a4,_0x43e3ee,_0x5c4c9d)=>_0x43e3ee in _0x13e5a4?se(_0x13e5a4,_0x43e3ee,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5c4c9d}):_0x13e5a4[_0x43e3ee]=_0x5c4c9d,ie=(_0x1395d2,_0x37448f,_0x2ec810,_0x18cb0f)=>{const _0x2dd999=_0x35a1d4;for(var _0x3131ac=_0x18cb0f>0x1?void 0x0:_0x18cb0f?oe(_0x37448f,_0x2ec810):_0x37448f,_0x564a35=_0x1395d2[_0x2dd999(0x99)]-0x1,_0x4114e0;_0x564a35>=0x0;_0x564a35--)(_0x4114e0=_0x1395d2[_0x564a35])&&(_0x3131ac=_0x4114e0(_0x3131ac)||_0x3131ac);return _0x3131ac;},N=(_0x58d5f1,_0x16c8d5)=>(_0x45c77b,_0x5ba941)=>_0x16c8d5(_0x45c77b,_0x5ba941,_0x58d5f1),$=(_0x5db7cc,_0x237fd5,_0xc25b5a)=>ne(_0x5db7cc,typeof _0x237fd5!=_0x35a1d4(0x9c)?_0x237fd5+'':_0x237fd5,_0xc25b5a);let g=class extends _0x46fdf3{constructor(_0x39b1bd=O,_0x32b609,_0x572c09){const _0x196965=_0x35a1d4;super(),this['_config']=_0x39b1bd,this['_injector']=_0x32b609,this[_0x196965(0xda)]=_0x572c09;const {..._0x2a2787}=_0x577e8b({},O,this['_config']);this[_0x196965(0xda)][_0x196965(0xad)](z,_0x2a2787);}['onStarting'](){const _0x36fea8=_0x35a1d4;[[S],[f],[_]][_0x36fea8(0xa1)](_0x69b35f=>{const _0x2c7cb6=_0x36fea8;this[_0x2c7cb6(0xec)][_0x2c7cb6(0xd9)](_0x69b35f);});}[_0x35a1d4(0x96)](){const _0xe4235e=_0x35a1d4;this[_0xe4235e(0xec)][_0xe4235e(0xa3)](f),this[_0xe4235e(0xec)]['get'](_);}};$(g,_0x35a1d4(0xde),W),$(g,_0x35a1d4(0xbe),_0x505f7d[_0x35a1d4(0xb7)]),g=ie([_0x54f3d1(_0x2aaa9d,_0x27c89b,_0x32bd05),N(0x1,_0x568319(_0x5710e7)),N(0x2,_0x241ad2)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ function _0x2a0d(){const _0x5d0c5e=['getOwnPropertyDescriptor','_init','_httpService','unitId','pluginName','/add','410003ZrOwBA','getUnit','UNIVER_UNKNOWN','user','type','slice','delete','COMMENT','commentUpdate$','get','code','/delete','_userService','content','forEach','syncUpdateMutationToColla','Reply','replies','dataSource','customRanges','YYYY/MM/DD\x20HH:mm','55DxAgtR','Solved','_threadCommentDataSource','filter','setConfig','payload','subscribe','symbol','getMemberID','85196AsVuof','length','_config','840864WiteAJ','map','comment','values','Unknown','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','ref','addComment','userId','/reply','_injector','OpenOrReOpen','createTimestamp','reply','Delete','thread-comment-data-source.config','find','_configService','_initUserSync','requireSession','stringify','486525wvJUtb','onReady','_threadCommentDataSourceService','post','comments','body','rangeId','/universer-api/comment/unit/','replyId','9AKoaPU','_sessionService','size','/list','3487344GtSZhE','resolved','_commentService','disposeWithMe','Add','1203642ZWZhCv','UNRECOGNIZED','getComment','rangeType','deleteComment','add','2187848SUCEhq','parse','resolveComment','error','/edit','updateComment','addUser','listComments','userID','solved','threadId','defineProperty','parentId','pipe','/solved','saveCommentToSnapshot','format','_threadCommentModel','users'];_0x2a0d=function(){return _0x5d0c5e;};return _0x2a0d();}const _0x2b3a05=_0x81a1;(function(_0x5937ad,_0x232c0a){const _0x9b48ba=_0x81a1,_0x23d8e0=_0x5937ad();while(!![]){try{const _0x328333=parseInt(_0x9b48ba(0x104))/0x1+-parseInt(_0x9b48ba(0xe5))/0x2+-parseInt(_0x9b48ba(0xd3))/0x3+-parseInt(_0x9b48ba(0xba))/0x4*(parseInt(_0x9b48ba(0xb1))/0x5)+parseInt(_0x9b48ba(0xbd))/0x6+parseInt(_0x9b48ba(0xe0))/0x7+parseInt(_0x9b48ba(0xeb))/0x8*(parseInt(_0x9b48ba(0xdc))/0x9);if(_0x328333===_0x232c0a)break;else _0x23d8e0['push'](_0x23d8e0['shift']());}catch(_0x28618b){_0x23d8e0['push'](_0x23d8e0['shift']());}}}(_0x2a0d,0x4efcf));import{CommentService as _0x57eda0,CollaborationSessionService as _0x34dfc7,UniverCollaborationClientPlugin as _0x24dfe9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2890f9}from'@univerjs-pro/license';import{dayjs as _0x8123a1,UserManagerService as _0x29389e,Inject as _0x498129,Injector as _0x4a0051,Disposable as _0x36a07e,CustomRangeType as _0x450107,UniverInstanceType as _0x5e44b5,DependentOn as _0x100038,IConfigService as _0x31db9c,Plugin as _0x1f8d6e,merge as _0x1b1ca2}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xa3c3d4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x59939f,IThreadCommentDataSourceService as _0x4069f7}from'@univerjs/thread-comment';import{bufferTime as _0x2daf75}from'rxjs';import{HTTPService as _0x26a669}from'@univerjs/network';const W=_0x2b3a05(0xc2);var I=(_0x145428=>(_0x145428[_0x145428[_0x2b3a05(0xc9)]=0x0]='OpenOrReOpen',_0x145428[_0x145428[_0x2b3a05(0xb2)]=0x1]=_0x2b3a05(0xb2),_0x145428[_0x145428[_0x2b3a05(0xe6)]=-0x1]='UNRECOGNIZED',_0x145428))(I||{}),v=(_0x130188=>(_0x130188[_0x130188[_0x2b3a05(0xc1)]=0x0]=_0x2b3a05(0xc1),_0x130188[_0x130188[_0x2b3a05(0xe4)]=0x1]=_0x2b3a05(0xe4),_0x130188[_0x130188['Reply']=0x2]=_0x2b3a05(0xac),_0x130188[_0x130188['Edit']=0x3]=_0x2b3a05(0xc3),_0x130188[_0x130188['Delete']=0x4]=_0x2b3a05(0xcc),_0x130188[_0x130188['Solve']=0x5]='Solve',_0x130188[_0x130188[_0x2b3a05(0xe6)]=-0x1]=_0x2b3a05(0xe6),_0x130188))(v||{});const y=_0x177b1d=>_0x8123a1(new Date(+_0x177b1d))[_0x2b3a05(0xfb)](_0x2b3a05(0xb0)),B=async(_0x46cc82,_0x2ba6db)=>{const _0x9493a3=_0x2b3a05,_0x6ea9fc=_0x46cc82[_0x9493a3(0xa5)](_0x29389e),_0x152d99=_0x46cc82[_0x9493a3(0xa5)](_0x26a669);_0x2ba6db['forEach'](_0xe0a975=>{const _0x504d9e=_0x9493a3;_0x6ea9fc['getUser'](_0xe0a975)&&_0x2ba6db[_0x504d9e(0x10a)](_0xe0a975);}),_0x2ba6db[_0x9493a3(0xde)]&&(await _0x152d99['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x2ba6db]}}))[_0x9493a3(0xd8)][_0x9493a3(0xfd)][_0x9493a3(0xaa)](_0x4ca041=>{_0x4ca041&&_0x6ea9fc['addUser'](_0x4ca041);});};var K=Object[_0x2b3a05(0xfe)],V=(_0x3ccb97,_0x1bf184,_0x14da28,_0x2e9ef7)=>{for(var _0x1eae47=_0x2e9ef7>0x1?void 0x0:_0x2e9ef7?K(_0x1bf184,_0x14da28):_0x1bf184,_0x82114d=_0x3ccb97['length']-0x1,_0xcf1a2;_0x82114d>=0x0;_0x82114d--)(_0xcf1a2=_0x3ccb97[_0x82114d])&&(_0x1eae47=_0xcf1a2(_0x1eae47)||_0x1eae47);return _0x1eae47;},p=(_0x127bbb,_0x4ddbf6)=>(_0x3fe9ec,_0x1834e3)=>_0x4ddbf6(_0x3fe9ec,_0x1834e3,_0x127bbb);let _=class extends _0x36a07e{constructor(_0x31a92b,_0x5dbcb1,_0x24fda3,_0x49e3e8){const _0x39452e=_0x2b3a05;super(),this[_0x39452e(0xe2)]=_0x31a92b,this[_0x39452e(0xfc)]=_0x5dbcb1,this[_0x39452e(0xa8)]=_0x24fda3,this[_0x39452e(0xc8)]=_0x49e3e8,this[_0x39452e(0xff)](),this['_initUserSync']();}[_0x2b3a05(0xd0)](){const _0x38e32f=_0x2b3a05;this[_0x38e32f(0xe3)](this[_0x38e32f(0xfc)][_0x38e32f(0xa4)][_0x38e32f(0xf8)](_0x2daf75(0x10))[_0x38e32f(0xb7)](_0x3fc155=>{const _0x2153a1=_0x38e32f,_0x3abdc6=new Set();_0x3fc155[_0x2153a1(0xaa)](_0x7b70a4=>{const _0xaa0e38=_0x2153a1;switch(_0x7b70a4[_0xaa0e38(0x108)]){case _0xaa0e38(0xea):{const _0x436d90=_0x7b70a4[_0xaa0e38(0xb6)]['personId'];_0x3abdc6['add'](_0x436d90);break;}}}),B(this[_0x2153a1(0xc8)],_0x3abdc6);}));}[_0x2b3a05(0xff)](){const _0x4411d9=_0x2b3a05;this[_0x4411d9(0xe3)](this[_0x4411d9(0xe2)]['commentUpdate$'][_0x4411d9(0xb7)](async _0x2c708d=>{const _0x5c7953=_0x4411d9;var _0x4b0a00,_0x31c3e3,_0x2f3d3a,_0x2a5386;const _0x5d36f4=(_0x4b0a00=this[_0x5c7953(0xfc)][_0x5c7953(0x105)](_0x2c708d[_0x5c7953(0x101)])[_0x5c7953(0xce)](_0x69703e=>_0x69703e[_0x5c7953(0xf5)]===_0x2c708d[_0x5c7953(0xf5)]))==null?void 0x0:_0x4b0a00['root'];if(!_0x5d36f4)return;const {unitId:_0xa6e968,subUnitId:_0xa812bc}=_0x5d36f4;switch(_0x2c708d[_0x5c7953(0x107)]&&this['_userService'][_0x5c7953(0xf1)](_0x2c708d[_0x5c7953(0x107)]),_0x2c708d[_0x5c7953(0x108)]){case v[_0x5c7953(0xe4)]:break;case v[_0x5c7953(0xac)]:{this[_0x5c7953(0xfc)][_0x5c7953(0xc5)](_0xa6e968,_0xa812bc,{'unitId':_0xa6e968,'subUnitId':_0xa812bc,'ref':'','id':_0x2c708d[_0x5c7953(0xdb)],'dT':y(+_0x2c708d[_0x5c7953(0xca)]),'threadId':_0x2c708d[_0x5c7953(0xf5)],'personId':(_0x2f3d3a=(_0x31c3e3=_0x2c708d[_0x5c7953(0x107)])==null?void 0x0:_0x31c3e3[_0x5c7953(0xf3)])!=null?_0x2f3d3a:_0x2c708d[_0x5c7953(0xc6)],'text':JSON[_0x5c7953(0xec)](_0x2c708d['content']),'parentId':_0x5d36f4['id']});break;}case v['Delete']:{const _0x13abc4=this[_0x5c7953(0xfc)][_0x5c7953(0xe7)](_0xa6e968,_0xa812bc,_0x2c708d['replyId']);_0x13abc4&&_0x13abc4[_0x5c7953(0xf7)]&&this[_0x5c7953(0xfc)][_0x5c7953(0xe9)](_0xa6e968,_0xa812bc,_0x2c708d['replyId']);break;}case v[_0x5c7953(0xc3)]:{this[_0x5c7953(0xfc)][_0x5c7953(0xf0)](_0xa6e968,_0xa812bc,{'commentId':_0x2c708d['replyId'],'text':JSON[_0x5c7953(0xec)](_0x2c708d[_0x5c7953(0xa9)])});break;}case v['Solve']:{const _0x5f0403=(_0x2a5386=this[_0x5c7953(0xfc)]['getUnit'](_0x2c708d[_0x5c7953(0x101)])['find'](_0x346a0d=>_0x346a0d['threadId']===_0x2c708d['threadId']))==null?void 0x0:_0x2a5386['root'];_0x5f0403&&this[_0x5c7953(0xfc)][_0x5c7953(0xed)](_0xa6e968,_0xa812bc,_0x5f0403['id'],_0x2c708d['solved']===I[_0x5c7953(0xb2)]);break;}}}));}};_=V([p(0x0,_0x498129(_0x57eda0)),p(0x1,_0x498129(_0x59939f)),p(0x2,_0x498129(_0x29389e)),p(0x3,_0x498129(_0x4a0051))],_);const z=_0x2b3a05(0xcd),O={};var k=Object[_0x2b3a05(0xfe)],Q=(_0x137738,_0x58e2dd,_0x33fb3e,_0xa4184d)=>{const _0x3d3795=_0x2b3a05;for(var _0x5a0188=_0xa4184d>0x1?void 0x0:_0xa4184d?k(_0x58e2dd,_0x33fb3e):_0x58e2dd,_0x4e6697=_0x137738[_0x3d3795(0xbb)]-0x1,_0x1c6276;_0x4e6697>=0x0;_0x4e6697--)(_0x1c6276=_0x137738[_0x4e6697])&&(_0x5a0188=_0x1c6276(_0x5a0188)||_0x5a0188);return _0x5a0188;},b=(_0x58e9f7,_0x2d8fb1)=>(_0x3ef83b,_0x1f6602)=>_0x2d8fb1(_0x3ef83b,_0x1f6602,_0x58e9f7);function _0x81a1(_0x59653b,_0x3e4848){const _0x2a0d55=_0x2a0d();return _0x81a1=function(_0x81a15b,_0xae53e9){_0x81a15b=_0x81a15b-0xa3;let _0x462405=_0x2a0d55[_0x81a15b];return _0x462405;},_0x81a1(_0x59653b,_0x3e4848);}function X(_0x4c2bcc,_0x2abf67){const _0x405497=_0x2b3a05,_0x24f327=_0x4c2bcc['replies'][0x0];return{..._0x2abf67,'id':_0x24f327[_0x405497(0xdb)],'resolved':_0x4c2bcc[_0x405497(0xf4)]===0x1,'dT':y(_0x24f327[_0x405497(0xca)]),'personId':_0x24f327['userId'],'threadId':_0x24f327[_0x405497(0xf5)]};}function ee(_0x4de25f,_0x3f471b,_0x13f928){const _0x4f1039=_0x2b3a05;var _0x55fd92,_0x20976b;if(((_0x20976b=(_0x55fd92=_0x4de25f==null?void 0x0:_0x4de25f[_0x4f1039(0xad)])==null?void 0x0:_0x55fd92[_0x4f1039(0xbb)])!=null?_0x20976b:0x0)>0x0){const _0x14f233=(_0x282b42,_0x49735b)=>({'id':_0x282b42[_0x4f1039(0xdb)],'threadId':_0x282b42[_0x4f1039(0xf5)],'dT':y(_0x282b42[_0x4f1039(0xca)]),'personId':_0x282b42[_0x4f1039(0xc6)],'resolved':_0x4de25f[_0x4f1039(0xf4)]===I['Solved'],'unitId':_0x3f471b,'subUnitId':_0x13f928,'text':JSON[_0x4f1039(0xec)](_0x282b42['content']),'parentId':_0x49735b}),_0x5c74db=_0x14f233(_0x4de25f['replies'][0x0]);return{..._0x5c74db,'children':_0x4de25f[_0x4f1039(0xad)][_0x4f1039(0x109)](0x1)[_0x4f1039(0xbe)](_0x29dff8=>_0x14f233(_0x29dff8,_0x5c74db['id']))};}return null;}let S=class{constructor(_0x2ee7f3,_0x58d0cc,_0x38f933){const _0x420dcd=_0x2b3a05;this['_httpService']=_0x2ee7f3,this[_0x420dcd(0xa8)]=_0x58d0cc,this[_0x420dcd(0xdd)]=_0x38f933;}async[_0x2b3a05(0xc5)](_0x5237fe){const _0x89560a=_0x2b3a05;var _0xb05776,_0x10b74d;const {parentId:_0x5654f9,unitId:_0x972565,text:_0x37986e,threadId:_0x2e044a}=_0x5237fe,_0x54bc0c=(_0x10b74d=(_0xb05776=_0x37986e[_0x89560a(0xaf)])==null?void 0x0:_0xb05776['filter'](_0x2d2b98=>_0x2d2b98[_0x89560a(0xe8)]===_0x450107[_0x89560a(0xa3)])[_0x89560a(0xbe)](_0x4f2c7a=>_0x4f2c7a[_0x89560a(0xd9)]))!=null?_0x10b74d:[],_0x3678f9=JSON[_0x89560a(0xd2)](_0x37986e),_0x54e823=(await this[_0x89560a(0xdd)][_0x89560a(0xd1)](_0x972565))[_0x89560a(0xb9)]();if(_0x5654f9){const _0x3b95d9={'memberId':_0x54e823,'unitId':_0x972565,'content':_0x3678f9,'mention':_0x54bc0c,'threadId':_0x2e044a},_0x39c1ec=(await this[_0x89560a(0x100)]['post'](_0x89560a(0xda)+_0x972565+_0x89560a(0xc7),{'body':_0x3b95d9}))[_0x89560a(0xd8)][_0x89560a(0xcb)];return{..._0x5237fe,'id':_0x39c1ec[_0x89560a(0xdb)],'dT':_0x8123a1(+_0x39c1ec[_0x89560a(0xca)])[_0x89560a(0xfb)](_0x89560a(0xb0)),'personId':_0x39c1ec[_0x89560a(0xc6)]};}else{const _0x1b5d8f={'memberId':_0x54e823,'unitId':_0x972565,'content':_0x3678f9,'mention':_0x54bc0c},_0x363458=await this[_0x89560a(0x100)]['post'](_0x89560a(0xda)+_0x972565+_0x89560a(0x103),{'body':_0x1b5d8f});return X(_0x363458[_0x89560a(0xd8)][_0x89560a(0xbf)],_0x5237fe);}}async['updateComment'](_0x1bb80e){const _0x23c55b=_0x2b3a05;var _0x2f7f46,_0x41ebd1;const {text:_0xff9c23,unitId:_0x23fdb3}=_0x1bb80e,_0x4a016c=(_0x41ebd1=(_0x2f7f46=_0xff9c23[_0x23c55b(0xaf)])==null?void 0x0:_0x2f7f46[_0x23c55b(0xb4)](_0x46c3ae=>_0x46c3ae[_0x23c55b(0xe8)]===_0x450107[_0x23c55b(0xa3)])[_0x23c55b(0xbe)](_0x31bced=>_0x31bced[_0x23c55b(0xd9)]))!=null?_0x41ebd1:[],_0x22036a=JSON[_0x23c55b(0xd2)](_0xff9c23),_0x26e176=_0x1bb80e['threadId'],_0x37c6ef=_0x1bb80e['id'],_0x2cb86c={'memberId':(await this['_sessionService']['requireSession'](_0x23fdb3))[_0x23c55b(0xb9)](),'unitId':_0x23fdb3,'threadId':_0x26e176,'mention':_0x4a016c,'content':_0x22036a,'replyId':_0x37c6ef},_0x1267e9=await this[_0x23c55b(0x100)][_0x23c55b(0xd6)](_0x23c55b(0xda)+_0x23fdb3+_0x23c55b(0xef),{'body':_0x2cb86c});return!_0x1267e9[_0x23c55b(0xd8)][_0x23c55b(0xee)]||_0x1267e9['body'][_0x23c55b(0xee)][_0x23c55b(0xa6)]===0x1;}async['resolveComment'](_0x21f90c){const _0x4f3c95=_0x2b3a05,{unitId:_0x12ce03}=_0x21f90c,_0xbf820e=_0x21f90c[_0x4f3c95(0xf5)],_0x2f1e7e={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x12ce03,'threadId':_0xbf820e,'solved':_0x21f90c[_0x4f3c95(0xe1)]?I[_0x4f3c95(0xb2)]:I[_0x4f3c95(0xc9)]},_0x52ed40=await this[_0x4f3c95(0x100)]['post']('/universer-api/comment/unit/'+_0x12ce03+_0x4f3c95(0xf9),{'body':_0x2f1e7e});return!_0x52ed40[_0x4f3c95(0xd8)][_0x4f3c95(0xee)]||_0x52ed40[_0x4f3c95(0xd8)][_0x4f3c95(0xee)][_0x4f3c95(0xa6)]===0x1;}async[_0x2b3a05(0xe9)](_0x543592,_0x5ba2ac,_0x532199,_0x445b27){const _0x43d901=_0x2b3a05,_0x54e169={'memberId':(await this[_0x43d901(0xdd)][_0x43d901(0xd1)](_0x543592))[_0x43d901(0xb9)](),'threadId':_0x532199,'replyId':_0x445b27,'unitId':_0x543592},_0x4152f7=await this[_0x43d901(0x100)]['post'](_0x43d901(0xda)+_0x543592+_0x43d901(0xa7),{'body':_0x54e169});return!_0x4152f7[_0x43d901(0xd8)]['error']||_0x4152f7['body'][_0x43d901(0xee)][_0x43d901(0xa6)]===0x1;}async[_0x2b3a05(0xf2)](_0x43fb89,_0x35dfc7,_0x44ccf7){const _0xdc56a0=_0x2b3a05,_0x2bb512={'unitId':_0x43fb89,'threadId':_0x44ccf7},_0x136aa3=await this[_0xdc56a0(0x100)][_0xdc56a0(0xd6)](_0xdc56a0(0xda)+_0x43fb89+_0xdc56a0(0xdf),{'body':_0x2bb512}),_0x396b45=_0x44ccf7[_0xdc56a0(0xbe)](_0x521a42=>ee(_0x136aa3[_0xdc56a0(0xd8)][_0xdc56a0(0xd7)][_0x521a42],_0x43fb89,_0x35dfc7))['filter'](Boolean);return Object[_0xdc56a0(0xc0)](_0x136aa3[_0xdc56a0(0xd8)][_0xdc56a0(0xfd)])[_0xdc56a0(0xaa)](_0x51b647=>{const _0x5f17ad=_0xdc56a0;this['_userService'][_0x5f17ad(0xf1)](_0x51b647);}),_0x396b45;}[_0x2b3a05(0xfa)](_0x532809){const _0x48a49a=_0x2b3a05;return{'id':_0x532809['id'],'threadId':_0x532809[_0x48a49a(0xf5)],'ref':_0x532809[_0x48a49a(0xc4)]};}};S=Q([b(0x0,_0x498129(_0x26a669)),b(0x1,_0x498129(_0x29389e)),b(0x2,_0x498129(_0x34dfc7))],S);var re=Object[_0x2b3a05(0xfe)],te=(_0x2b6795,_0x24c0d5,_0x177188,_0x2fa035)=>{for(var _0x5313f7=_0x2fa035>0x1?void 0x0:_0x2fa035?re(_0x24c0d5,_0x177188):_0x24c0d5,_0x3135b0=_0x2b6795['length']-0x1,_0x503ffd;_0x3135b0>=0x0;_0x3135b0--)(_0x503ffd=_0x2b6795[_0x3135b0])&&(_0x5313f7=_0x503ffd(_0x5313f7)||_0x5313f7);return _0x5313f7;},M=(_0x1f5aaa,_0x5cb32c)=>(_0x16b200,_0x5c335a)=>_0x5cb32c(_0x16b200,_0x5c335a,_0x1f5aaa);let f=class extends _0x36a07e{constructor(_0x16e3b6,_0x14ab06){const _0x40106c=_0x2b3a05;super(),this[_0x40106c(0xd5)]=_0x16e3b6,this[_0x40106c(0xb3)]=_0x14ab06,this['_initDataSource']();}['_initDataSource'](){const _0x29dfc7=_0x2b3a05;this[_0x29dfc7(0xd5)][_0x29dfc7(0xae)]=this[_0x29dfc7(0xb3)],this[_0x29dfc7(0xd5)][_0x29dfc7(0xab)]=!0x1;}};f=te([M(0x0,_0x4069f7),M(0x1,_0x498129(S))],f);var se=Object[_0x2b3a05(0xf6)],oe=Object['getOwnPropertyDescriptor'],ne=(_0xf6d3f8,_0x53120e,_0x40e63d)=>_0x53120e in _0xf6d3f8?se(_0xf6d3f8,_0x53120e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x40e63d}):_0xf6d3f8[_0x53120e]=_0x40e63d,ie=(_0x46d76f,_0x43b2b0,_0x52d179,_0x723148)=>{const _0x465b61=_0x2b3a05;for(var _0x1267a0=_0x723148>0x1?void 0x0:_0x723148?oe(_0x43b2b0,_0x52d179):_0x43b2b0,_0x1a5a81=_0x46d76f[_0x465b61(0xbb)]-0x1,_0x56c178;_0x1a5a81>=0x0;_0x1a5a81--)(_0x56c178=_0x46d76f[_0x1a5a81])&&(_0x1267a0=_0x56c178(_0x1267a0)||_0x1267a0);return _0x1267a0;},N=(_0x516c10,_0x34c475)=>(_0x3d8091,_0x18876d)=>_0x34c475(_0x3d8091,_0x18876d,_0x516c10),$=(_0x24957d,_0x2ce9cd,_0x54fd97)=>ne(_0x24957d,typeof _0x2ce9cd!=_0x2b3a05(0xb8)?_0x2ce9cd+'':_0x2ce9cd,_0x54fd97);let g=class extends _0x1f8d6e{constructor(_0x30ac06=O,_0x33d4ec,_0x4403be){const _0x156dfb=_0x2b3a05;super(),this[_0x156dfb(0xbc)]=_0x30ac06,this['_injector']=_0x33d4ec,this[_0x156dfb(0xcf)]=_0x4403be;const {..._0x5ddd41}=_0x1b1ca2({},O,this['_config']);this[_0x156dfb(0xcf)][_0x156dfb(0xb5)](z,_0x5ddd41);}['onStarting'](){const _0x2796d5=_0x2b3a05;[[S],[f],[_]][_0x2796d5(0xaa)](_0x42ec86=>{const _0x175418=_0x2796d5;this[_0x175418(0xc8)][_0x175418(0xea)](_0x42ec86);});}[_0x2b3a05(0xd4)](){const _0x324ca2=_0x2b3a05;this[_0x324ca2(0xc8)][_0x324ca2(0xa5)](f),this[_0x324ca2(0xc8)]['get'](_);}};$(g,_0x2b3a05(0x102),W),$(g,'type',_0x5e44b5[_0x2b3a05(0x106)]),g=ie([_0x100038(_0xa3c3d4,_0x24dfe9,_0x2890f9),N(0x1,_0x498129(_0x4a0051)),N(0x2,_0x31db9c)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0xc476(){const _0x529c11=['Solved','359895lMNRKv','comment','post','_configService','HTTPService','UniverCore','ref','COMMENT','replyId','map','function','Injector','@univerjs/network','dayjs','slice','format','disposeWithMe','root','reply','CollaborationSessionService','addUser','code','filter','add','Delete','exports','_commentService','error','symbol','delete','5170758jYcYic','personId','Unknown','11OLwFjr','/universer-api/user/list','rangeId','user','amd','comments','994995rcyiDm','stringify','UniverCollaborationClientPlugin','IThreadCommentDataSourceService','UNRECOGNIZED','pipe','@univerjs/thread-comment','_threadCommentDataSourceService','_userService','replies','customRanges','_init','userId','Module','forEach','@univerjs/core','payload','/universer-api/comment/unit/','parse','1864528KxNzww','type','users','_initDataSource','parentId','CustomRangeType','DependentOn','pluginName','threadId','defineProperty','merge','Add','getOwnPropertyDescriptor','length','size','5467700TRtfnB','toStringTag','rxjs','object','setConfig','getUnit','Edit','/solved','_sessionService','Disposable','_httpService','values','get','/add','UniverThreadCommentUi','19970570nRvqLm','_injector','ThreadCommentModel','find','userID','getComment','CommentService','3870324hpRuwN','resolved','Plugin','UniverProThreadCommentDatasource','YYYY/MM/DD\x20HH:mm','deleteComment','solved','UniverThreadComment','addComment','rangeType','Reply','OpenOrReOpen','commentUpdate$','UniverThreadCommentDataSourcePlugin','UniverNetwork','getMemberID','subscribe','content','_threadCommentModel','getUser','unitId','UniverProCollaborationClient','resolveComment','onReady','/delete','body','IConfigService','Solve','_initUserSync','UniverInstanceType','_threadCommentDataSource','UniverLicensePlugin','requireSession','@univerjs/thread-comment-ui','@univerjs-pro/collaboration-client','54fvkEMT','/edit','_config','UserManagerService','Inject','10xruOlO','createTimestamp','7eGvcAH','saveCommentToSnapshot','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/reply'];_0xc476=function(){return _0x529c11;};return _0xc476();}function _0x2f68(_0x271dbe,_0x25f33c){const _0xc4765=_0xc476();return _0x2f68=function(_0x2f6854,_0x5469bf){_0x2f6854=_0x2f6854-0x96;let _0x210980=_0xc4765[_0x2f6854];return _0x210980;},_0x2f68(_0x271dbe,_0x25f33c);}(function(_0xb87033,_0x2fb6a7){const _0x31b3f0=_0x2f68,_0x2181ed=_0xb87033();while(!![]){try{const _0x1dc901=parseInt(_0x31b3f0(0xd6))/0x1*(-parseInt(_0x31b3f0(0xcf))/0x2)+parseInt(_0x31b3f0(0xa7))/0x3+parseInt(_0x31b3f0(0x11f))/0x4+-parseInt(_0x31b3f0(0xfd))/0x5+-parseInt(_0x31b3f0(0xf4))/0x6*(-parseInt(_0x31b3f0(0xd1))/0x7)+-parseInt(_0x31b3f0(0x110))/0x8*(-parseInt(_0x31b3f0(0xca))/0x9)+-parseInt(_0x31b3f0(0xa0))/0xa*(parseInt(_0x31b3f0(0xf7))/0xb);if(_0x1dc901===_0x2fb6a7)break;else _0x2181ed['push'](_0x2181ed['shift']());}catch(_0xd37a1f){_0x2181ed['push'](_0x2181ed['shift']());}}}(_0xc476,0xe105b),function(_0x1c9d4d,_0x7f4872){const _0xb1b1e9=_0x2f68;typeof exports==_0xb1b1e9(0x122)&&typeof module<'u'?_0x7f4872(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==_0xb1b1e9(0xe0)&&define[_0xb1b1e9(0xfb)]?define([_0xb1b1e9(0xef),_0xb1b1e9(0xc9),'@univerjs-pro/license',_0xb1b1e9(0x10c),_0xb1b1e9(0xc8),_0xb1b1e9(0x103),_0xb1b1e9(0x121),_0xb1b1e9(0xe2)],_0x7f4872):(_0x1c9d4d=typeof globalThis<'u'?globalThis:_0x1c9d4d||self,_0x7f4872(_0x1c9d4d[_0xb1b1e9(0xaa)]={},_0x1c9d4d[_0xb1b1e9(0xbc)],_0x1c9d4d['UniverProLicense'],_0x1c9d4d[_0xb1b1e9(0xdb)],_0x1c9d4d[_0xb1b1e9(0x9f)],_0x1c9d4d[_0xb1b1e9(0xae)],_0x1c9d4d[_0xb1b1e9(0x121)],_0x1c9d4d[_0xb1b1e9(0xb5)]));}(this,function(_0x3b0238,_0x1f850e,_0x25b08e,_0x4dc168,_0x940fd9,_0x396cb8,_0x32004a,_0x3bd295){'use strict';const _0x327966=_0x2f68;const _0x43fbd9=_0x327966(0xd3);var _0x58e237=(_0x5ca945=>(_0x5ca945[_0x5ca945[_0x327966(0xb2)]=0x0]=_0x327966(0xb2),_0x5ca945[_0x5ca945[_0x327966(0xd5)]=0x1]=_0x327966(0xd5),_0x5ca945[_0x5ca945['UNRECOGNIZED']=-0x1]=_0x327966(0x101),_0x5ca945))(_0x58e237||{}),_0x2a392e=(_0x471823=>(_0x471823[_0x471823[_0x327966(0xf6)]=0x0]=_0x327966(0xf6),_0x471823[_0x471823[_0x327966(0x11b)]=0x1]='Add',_0x471823[_0x471823[_0x327966(0xb1)]=0x2]=_0x327966(0xb1),_0x471823[_0x471823['Edit']=0x3]=_0x327966(0x97),_0x471823[_0x471823[_0x327966(0xee)]=0x4]=_0x327966(0xee),_0x471823[_0x471823[_0x327966(0xc2)]=0x5]=_0x327966(0xc2),_0x471823[_0x471823[_0x327966(0x101)]=-0x1]='UNRECOGNIZED',_0x471823))(_0x2a392e||{});const _0x5efbbc=_0x3c4c00=>_0x4dc168[_0x327966(0xe3)](new Date(+_0x3c4c00))[_0x327966(0xe5)](_0x327966(0xab)),_0x135566=async(_0x448abc,_0x12c5cf)=>{const _0x42b1e5=_0x327966,_0x384e7f=_0x448abc[_0x42b1e5(0x9d)](_0x4dc168[_0x42b1e5(0xcd)]),_0x1b02c2=_0x448abc[_0x42b1e5(0x9d)](_0x3bd295[_0x42b1e5(0xda)]);_0x12c5cf[_0x42b1e5(0x10b)](_0x55b00d=>{const _0x1145a6=_0x42b1e5;_0x384e7f[_0x1145a6(0xba)](_0x55b00d)&&_0x12c5cf[_0x1145a6(0xf3)](_0x55b00d);}),_0x12c5cf[_0x42b1e5(0x11e)]&&(await _0x1b02c2[_0x42b1e5(0x9d)](_0x42b1e5(0xf8),{'params':{'userIDs':[..._0x12c5cf]}}))[_0x42b1e5(0xc0)][_0x42b1e5(0x112)][_0x42b1e5(0x10b)](_0x5d0f07=>{const _0x4f3e14=_0x42b1e5;_0x5d0f07&&_0x384e7f[_0x4f3e14(0xea)](_0x5d0f07);});};var _0x56432e=Object[_0x327966(0x11c)],_0x40a743=(_0x251ee5,_0x113d2e,_0x192411,_0x44c1eb)=>{for(var _0x560eba=_0x44c1eb>0x1?void 0x0:_0x44c1eb?_0x56432e(_0x113d2e,_0x192411):_0x113d2e,_0x44aedc=_0x251ee5['length']-0x1,_0x3c1251;_0x44aedc>=0x0;_0x44aedc--)(_0x3c1251=_0x251ee5[_0x44aedc])&&(_0x560eba=_0x3c1251(_0x560eba)||_0x560eba);return _0x560eba;},_0x2e2e56=(_0xe3044d,_0x1d9822)=>(_0x4d105e,_0x5bec97)=>_0x1d9822(_0x4d105e,_0x5bec97,_0xe3044d);let _0x1f3357=class extends _0x4dc168[_0x327966(0x9a)]{constructor(_0x1a3b73,_0x4eb07f,_0x25f8d8,_0x1ea39f){const _0x4802ad=_0x327966;super(),this[_0x4802ad(0xf0)]=_0x1a3b73,this[_0x4802ad(0xb9)]=_0x4eb07f,this[_0x4802ad(0x105)]=_0x25f8d8,this[_0x4802ad(0xa1)]=_0x1ea39f,this[_0x4802ad(0x108)](),this[_0x4802ad(0xc3)]();}['_initUserSync'](){const _0x988aaa=_0x327966;this['disposeWithMe'](this[_0x988aaa(0xb9)][_0x988aaa(0xb3)][_0x988aaa(0x102)](_0x32004a['bufferTime'](0x10))[_0x988aaa(0xb7)](_0x546705=>{const _0xfb2e84=_0x988aaa,_0x4fdcba=new Set();_0x546705[_0xfb2e84(0x10b)](_0x1fb96d=>{const _0x3d2d0b=_0xfb2e84;switch(_0x1fb96d[_0x3d2d0b(0x111)]){case _0x3d2d0b(0xed):{const _0xd045cc=_0x1fb96d[_0x3d2d0b(0x10d)][_0x3d2d0b(0xf5)];_0x4fdcba['add'](_0xd045cc);break;}}}),_0x135566(this[_0xfb2e84(0xa1)],_0x4fdcba);}));}[_0x327966(0x108)](){const _0x4f0181=_0x327966;this[_0x4f0181(0xe6)](this[_0x4f0181(0xf0)]['commentUpdate$'][_0x4f0181(0xb7)](async _0x2aed10=>{const _0x3ff38f=_0x4f0181;var _0x44e2bf,_0x1fdc39,_0x415389,_0x24759e;const _0x20ee2a=(_0x44e2bf=this[_0x3ff38f(0xb9)][_0x3ff38f(0x96)](_0x2aed10[_0x3ff38f(0xbb)])['find'](_0x5caf9a=>_0x5caf9a[_0x3ff38f(0x118)]===_0x2aed10[_0x3ff38f(0x118)]))==null?void 0x0:_0x44e2bf[_0x3ff38f(0xe7)];if(!_0x20ee2a)return;const {unitId:_0x2655f8,subUnitId:_0x4ba732}=_0x20ee2a;switch(_0x2aed10[_0x3ff38f(0xfa)]&&this[_0x3ff38f(0x105)]['addUser'](_0x2aed10[_0x3ff38f(0xfa)]),_0x2aed10[_0x3ff38f(0x111)]){case _0x2a392e[_0x3ff38f(0x11b)]:break;case _0x2a392e[_0x3ff38f(0xb1)]:{this['_threadCommentModel']['addComment'](_0x2655f8,_0x4ba732,{'unitId':_0x2655f8,'subUnitId':_0x4ba732,'ref':'','id':_0x2aed10[_0x3ff38f(0xde)],'dT':_0x5efbbc(+_0x2aed10['createTimestamp']),'threadId':_0x2aed10[_0x3ff38f(0x118)],'personId':(_0x415389=(_0x1fdc39=_0x2aed10[_0x3ff38f(0xfa)])==null?void 0x0:_0x1fdc39[_0x3ff38f(0xa4)])!=null?_0x415389:_0x2aed10[_0x3ff38f(0x109)],'text':JSON['parse'](_0x2aed10[_0x3ff38f(0xb8)]),'parentId':_0x20ee2a['id']});break;}case _0x2a392e[_0x3ff38f(0xee)]:{const _0x323b0d=this['_threadCommentModel'][_0x3ff38f(0xa5)](_0x2655f8,_0x4ba732,_0x2aed10[_0x3ff38f(0xde)]);_0x323b0d&&_0x323b0d[_0x3ff38f(0x114)]&&this['_threadCommentModel']['deleteComment'](_0x2655f8,_0x4ba732,_0x2aed10[_0x3ff38f(0xde)]);break;}case _0x2a392e[_0x3ff38f(0x97)]:{this[_0x3ff38f(0xb9)]['updateComment'](_0x2655f8,_0x4ba732,{'commentId':_0x2aed10[_0x3ff38f(0xde)],'text':JSON[_0x3ff38f(0x10f)](_0x2aed10[_0x3ff38f(0xb8)])});break;}case _0x2a392e['Solve']:{const _0x4923dc=(_0x24759e=this[_0x3ff38f(0xb9)][_0x3ff38f(0x96)](_0x2aed10[_0x3ff38f(0xbb)])[_0x3ff38f(0xa3)](_0x4cd95a=>_0x4cd95a[_0x3ff38f(0x118)]===_0x2aed10['threadId']))==null?void 0x0:_0x24759e[_0x3ff38f(0xe7)];_0x4923dc&&this['_threadCommentModel'][_0x3ff38f(0xbd)](_0x2655f8,_0x4ba732,_0x4923dc['id'],_0x2aed10[_0x3ff38f(0xad)]===_0x58e237[_0x3ff38f(0xd5)]);break;}}}));}};_0x1f3357=_0x40a743([_0x2e2e56(0x0,_0x4dc168[_0x327966(0xce)](_0x1f850e[_0x327966(0xa6)])),_0x2e2e56(0x1,_0x4dc168['Inject'](_0x396cb8[_0x327966(0xa2)])),_0x2e2e56(0x2,_0x4dc168[_0x327966(0xce)](_0x4dc168['UserManagerService'])),_0x2e2e56(0x3,_0x4dc168[_0x327966(0xce)](_0x4dc168[_0x327966(0xe1)]))],_0x1f3357);const _0x2f467a='thread-comment-data-source.config',_0x1cae5c={};var _0x3b79be=Object[_0x327966(0x11c)],_0x4e6402=(_0x120d59,_0x448a6c,_0x1be3a5,_0x10f36a)=>{for(var _0x2ae339=_0x10f36a>0x1?void 0x0:_0x10f36a?_0x3b79be(_0x448a6c,_0x1be3a5):_0x448a6c,_0x1047ee=_0x120d59['length']-0x1,_0x8fa1e0;_0x1047ee>=0x0;_0x1047ee--)(_0x8fa1e0=_0x120d59[_0x1047ee])&&(_0x2ae339=_0x8fa1e0(_0x2ae339)||_0x2ae339);return _0x2ae339;},_0x2799af=(_0x5eb65b,_0xe5f370)=>(_0x15c027,_0xb320a0)=>_0xe5f370(_0x15c027,_0xb320a0,_0x5eb65b);function _0x250f64(_0x3be529,_0x81d08){const _0x58c0b5=_0x327966,_0x5abd65=_0x3be529[_0x58c0b5(0x106)][0x0];return{..._0x81d08,'id':_0x5abd65['replyId'],'resolved':_0x3be529[_0x58c0b5(0xad)]===0x1,'dT':_0x5efbbc(_0x5abd65[_0x58c0b5(0xd0)]),'personId':_0x5abd65[_0x58c0b5(0x109)],'threadId':_0x5abd65['threadId']};}function _0x3e5dca(_0x1468fa,_0x160309,_0x438dba){const _0x873b07=_0x327966;var _0x586873,_0xbc9885;if(((_0xbc9885=(_0x586873=_0x1468fa==null?void 0x0:_0x1468fa[_0x873b07(0x106)])==null?void 0x0:_0x586873[_0x873b07(0x11d)])!=null?_0xbc9885:0x0)>0x0){const _0x3559fc=(_0x2e089c,_0x296079)=>({'id':_0x2e089c[_0x873b07(0xde)],'threadId':_0x2e089c[_0x873b07(0x118)],'dT':_0x5efbbc(_0x2e089c[_0x873b07(0xd0)]),'personId':_0x2e089c[_0x873b07(0x109)],'resolved':_0x1468fa[_0x873b07(0xad)]===_0x58e237[_0x873b07(0xd5)],'unitId':_0x160309,'subUnitId':_0x438dba,'text':JSON[_0x873b07(0x10f)](_0x2e089c[_0x873b07(0xb8)]),'parentId':_0x296079}),_0x1930b3=_0x3559fc(_0x1468fa[_0x873b07(0x106)][0x0]);return{..._0x1930b3,'children':_0x1468fa['replies'][_0x873b07(0xe4)](0x1)[_0x873b07(0xdf)](_0x54c705=>_0x3559fc(_0x54c705,_0x1930b3['id']))};}return null;}let _0x20bedb=class{constructor(_0x9b5c11,_0xbf37e,_0x7cd19a){const _0x187d17=_0x327966;this[_0x187d17(0x9b)]=_0x9b5c11,this[_0x187d17(0x105)]=_0xbf37e,this[_0x187d17(0x99)]=_0x7cd19a;}async[_0x327966(0xaf)](_0x399b9b){const _0x8d977d=_0x327966;var _0x7957ed,_0x454120;const {parentId:_0x4ed1f3,unitId:_0x450045,text:_0x5d15de,threadId:_0x5af9c8}=_0x399b9b,_0x46b199=(_0x454120=(_0x7957ed=_0x5d15de[_0x8d977d(0x107)])==null?void 0x0:_0x7957ed['filter'](_0x3c444c=>_0x3c444c[_0x8d977d(0xb0)]===_0x4dc168[_0x8d977d(0x115)][_0x8d977d(0xdd)])[_0x8d977d(0xdf)](_0x23af1c=>_0x23af1c[_0x8d977d(0xf9)]))!=null?_0x454120:[],_0x265330=JSON[_0x8d977d(0xfe)](_0x5d15de),_0x1f67ff=(await this['_sessionService'][_0x8d977d(0xc7)](_0x450045))['getMemberID']();if(_0x4ed1f3){const _0xc45976={'memberId':_0x1f67ff,'unitId':_0x450045,'content':_0x265330,'mention':_0x46b199,'threadId':_0x5af9c8},_0x3968a7=(await this['_httpService']['post'](_0x8d977d(0x10e)+_0x450045+_0x8d977d(0xd4),{'body':_0xc45976}))[_0x8d977d(0xc0)][_0x8d977d(0xe8)];return{..._0x399b9b,'id':_0x3968a7[_0x8d977d(0xde)],'dT':_0x4dc168[_0x8d977d(0xe3)](+_0x3968a7['createTimestamp'])[_0x8d977d(0xe5)](_0x8d977d(0xab)),'personId':_0x3968a7[_0x8d977d(0x109)]};}else{const _0x1e8550={'memberId':_0x1f67ff,'unitId':_0x450045,'content':_0x265330,'mention':_0x46b199},_0x46dba1=await this[_0x8d977d(0x9b)]['post'](_0x8d977d(0x10e)+_0x450045+_0x8d977d(0x9e),{'body':_0x1e8550});return _0x250f64(_0x46dba1[_0x8d977d(0xc0)][_0x8d977d(0xd7)],_0x399b9b);}}async['updateComment'](_0x4acc59){const _0x5a2422=_0x327966;var _0x3e55a1,_0x1f6490;const {text:_0x5c2a2c,unitId:_0x4c9c45}=_0x4acc59,_0x1b1a54=(_0x1f6490=(_0x3e55a1=_0x5c2a2c[_0x5a2422(0x107)])==null?void 0x0:_0x3e55a1[_0x5a2422(0xec)](_0x212719=>_0x212719['rangeType']===_0x4dc168['CustomRangeType'][_0x5a2422(0xdd)])[_0x5a2422(0xdf)](_0x10a5f0=>_0x10a5f0[_0x5a2422(0xf9)]))!=null?_0x1f6490:[],_0x569a3a=JSON[_0x5a2422(0xfe)](_0x5c2a2c),_0x5c710f=_0x4acc59[_0x5a2422(0x118)],_0x328083=_0x4acc59['id'],_0x55a772={'memberId':(await this[_0x5a2422(0x99)][_0x5a2422(0xc7)](_0x4c9c45))[_0x5a2422(0xb6)](),'unitId':_0x4c9c45,'threadId':_0x5c710f,'mention':_0x1b1a54,'content':_0x569a3a,'replyId':_0x328083},_0x2a52b5=await this['_httpService'][_0x5a2422(0xd8)](_0x5a2422(0x10e)+_0x4c9c45+_0x5a2422(0xcb),{'body':_0x55a772});return!_0x2a52b5['body'][_0x5a2422(0xf1)]||_0x2a52b5[_0x5a2422(0xc0)][_0x5a2422(0xf1)][_0x5a2422(0xeb)]===0x1;}async['resolveComment'](_0x2f54be){const _0x562f28=_0x327966,{unitId:_0x1960f6}=_0x2f54be,_0x17e2a6=_0x2f54be[_0x562f28(0x118)],_0x1d5afe={'memberId':this[_0x562f28(0x105)]['getCurrentUser']()[_0x562f28(0xa4)],'unitId':_0x1960f6,'threadId':_0x17e2a6,'solved':_0x2f54be[_0x562f28(0xa8)]?_0x58e237[_0x562f28(0xd5)]:_0x58e237[_0x562f28(0xb2)]},_0x45f41c=await this[_0x562f28(0x9b)][_0x562f28(0xd8)](_0x562f28(0x10e)+_0x1960f6+_0x562f28(0x98),{'body':_0x1d5afe});return!_0x45f41c[_0x562f28(0xc0)]['error']||_0x45f41c['body'][_0x562f28(0xf1)]['code']===0x1;}async[_0x327966(0xac)](_0x24caf5,_0xf81232,_0xa82bcd,_0x2e4957){const _0x1cb6bd=_0x327966,_0x40aaf3={'memberId':(await this[_0x1cb6bd(0x99)][_0x1cb6bd(0xc7)](_0x24caf5))[_0x1cb6bd(0xb6)](),'threadId':_0xa82bcd,'replyId':_0x2e4957,'unitId':_0x24caf5},_0x3558b1=await this['_httpService'][_0x1cb6bd(0xd8)](_0x1cb6bd(0x10e)+_0x24caf5+_0x1cb6bd(0xbf),{'body':_0x40aaf3});return!_0x3558b1[_0x1cb6bd(0xc0)]['error']||_0x3558b1['body'][_0x1cb6bd(0xf1)][_0x1cb6bd(0xeb)]===0x1;}async['listComments'](_0x315b3b,_0x48c897,_0x4769a9){const _0x33f8b2=_0x327966,_0x313d24={'unitId':_0x315b3b,'threadId':_0x4769a9},_0x26d2b1=await this['_httpService'][_0x33f8b2(0xd8)](_0x33f8b2(0x10e)+_0x315b3b+'/list',{'body':_0x313d24}),_0x5ddca4=_0x4769a9[_0x33f8b2(0xdf)](_0x595540=>_0x3e5dca(_0x26d2b1[_0x33f8b2(0xc0)][_0x33f8b2(0xfc)][_0x595540],_0x315b3b,_0x48c897))[_0x33f8b2(0xec)](Boolean);return Object[_0x33f8b2(0x9c)](_0x26d2b1[_0x33f8b2(0xc0)][_0x33f8b2(0x112)])[_0x33f8b2(0x10b)](_0x50a925=>{const _0x2430ff=_0x33f8b2;this[_0x2430ff(0x105)][_0x2430ff(0xea)](_0x50a925);}),_0x5ddca4;}[_0x327966(0xd2)](_0xd0cfdf){const _0x15901=_0x327966;return{'id':_0xd0cfdf['id'],'threadId':_0xd0cfdf[_0x15901(0x118)],'ref':_0xd0cfdf[_0x15901(0xdc)]};}};_0x20bedb=_0x4e6402([_0x2799af(0x0,_0x4dc168[_0x327966(0xce)](_0x3bd295['HTTPService'])),_0x2799af(0x1,_0x4dc168[_0x327966(0xce)](_0x4dc168['UserManagerService'])),_0x2799af(0x2,_0x4dc168[_0x327966(0xce)](_0x1f850e[_0x327966(0xe9)]))],_0x20bedb);var _0x23ebe6=Object['getOwnPropertyDescriptor'],_0x50725f=(_0x5d6c4e,_0x13eb2d,_0x33425a,_0x274e1c)=>{const _0x3f81c1=_0x327966;for(var _0x219dc0=_0x274e1c>0x1?void 0x0:_0x274e1c?_0x23ebe6(_0x13eb2d,_0x33425a):_0x13eb2d,_0x4ceed7=_0x5d6c4e[_0x3f81c1(0x11d)]-0x1,_0x1fefe3;_0x4ceed7>=0x0;_0x4ceed7--)(_0x1fefe3=_0x5d6c4e[_0x4ceed7])&&(_0x219dc0=_0x1fefe3(_0x219dc0)||_0x219dc0);return _0x219dc0;},_0x554cb4=(_0x152ca7,_0x4daf52)=>(_0x248d07,_0x1182aa)=>_0x4daf52(_0x248d07,_0x1182aa,_0x152ca7);let _0x13880a=class extends _0x4dc168[_0x327966(0x9a)]{constructor(_0x3b5ce7,_0x4a165f){const _0x409e49=_0x327966;super(),this[_0x409e49(0x104)]=_0x3b5ce7,this[_0x409e49(0xc5)]=_0x4a165f,this[_0x409e49(0x113)]();}['_initDataSource'](){const _0x1217df=_0x327966;this[_0x1217df(0x104)]['dataSource']=this['_threadCommentDataSource'],this[_0x1217df(0x104)]['syncUpdateMutationToColla']=!0x1;}};_0x13880a=_0x50725f([_0x554cb4(0x0,_0x396cb8[_0x327966(0x100)]),_0x554cb4(0x1,_0x4dc168[_0x327966(0xce)](_0x20bedb))],_0x13880a);var _0x2deb99=Object[_0x327966(0x119)],_0x43f983=Object[_0x327966(0x11c)],_0x4a34d2=(_0xeeee9c,_0x43d041,_0x192aca)=>_0x43d041 in _0xeeee9c?_0x2deb99(_0xeeee9c,_0x43d041,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x192aca}):_0xeeee9c[_0x43d041]=_0x192aca,_0x1dda2c=(_0x5424b5,_0x256c3f,_0x581b2f,_0xa1af5)=>{for(var _0x48f96c=_0xa1af5>0x1?void 0x0:_0xa1af5?_0x43f983(_0x256c3f,_0x581b2f):_0x256c3f,_0xd23ea1=_0x5424b5['length']-0x1,_0x4e716a;_0xd23ea1>=0x0;_0xd23ea1--)(_0x4e716a=_0x5424b5[_0xd23ea1])&&(_0x48f96c=_0x4e716a(_0x48f96c)||_0x48f96c);return _0x48f96c;},_0x50ef05=(_0x296b9e,_0x219ace)=>(_0x399328,_0x5bb111)=>_0x219ace(_0x399328,_0x5bb111,_0x296b9e),_0x7b636b=(_0x247b1c,_0x494df5,_0x58443c)=>_0x4a34d2(_0x247b1c,typeof _0x494df5!=_0x327966(0xf2)?_0x494df5+'':_0x494df5,_0x58443c);_0x3b0238[_0x327966(0xb4)]=class extends _0x4dc168[_0x327966(0xa9)]{constructor(_0x3a0702=_0x1cae5c,_0xbc51cd,_0x46c99a){const _0x58904b=_0x327966;super(),this[_0x58904b(0xcc)]=_0x3a0702,this[_0x58904b(0xa1)]=_0xbc51cd,this[_0x58904b(0xd9)]=_0x46c99a;const {..._0x1329d1}=_0x4dc168[_0x58904b(0x11a)]({},_0x1cae5c,this[_0x58904b(0xcc)]);this[_0x58904b(0xd9)][_0x58904b(0x123)](_0x2f467a,_0x1329d1);}['onStarting'](){const _0x3a6c34=_0x327966;[[_0x20bedb],[_0x13880a],[_0x1f3357]][_0x3a6c34(0x10b)](_0x403a6e=>{const _0x51151d=_0x3a6c34;this['_injector'][_0x51151d(0xed)](_0x403a6e);});}[_0x327966(0xbe)](){const _0x1730d6=_0x327966;this[_0x1730d6(0xa1)][_0x1730d6(0x9d)](_0x13880a),this[_0x1730d6(0xa1)]['get'](_0x1f3357);}},_0x7b636b(_0x3b0238[_0x327966(0xb4)],_0x327966(0x117),_0x43fbd9),_0x7b636b(_0x3b0238[_0x327966(0xb4)],'type',_0x4dc168[_0x327966(0xc4)]['UNIVER_UNKNOWN']),_0x3b0238['UniverThreadCommentDataSourcePlugin']=_0x1dda2c([_0x4dc168[_0x327966(0x116)](_0x940fd9['UniverThreadCommentUIPlugin'],_0x1f850e[_0x327966(0xff)],_0x25b08e[_0x327966(0xc6)]),_0x50ef05(0x1,_0x4dc168[_0x327966(0xce)](_0x4dc168[_0x327966(0xe1)])),_0x50ef05(0x2,_0x4dc168[_0x327966(0xc1)])],_0x3b0238['UniverThreadCommentDataSourcePlugin']),Object[_0x327966(0x119)](_0x3b0238,Symbol[_0x327966(0x120)],{'value':_0x327966(0x10a)});}));
1
+ (function(_0xd66fd9,_0x5c1538){const _0x426762=_0x5c50,_0xc13820=_0xd66fd9();while(!![]){try{const _0x2ba1f3=-parseInt(_0x426762(0x1b5))/0x1*(parseInt(_0x426762(0x1ce))/0x2)+-parseInt(_0x426762(0x190))/0x3*(parseInt(_0x426762(0x1d1))/0x4)+-parseInt(_0x426762(0x19d))/0x5*(parseInt(_0x426762(0x1eb))/0x6)+-parseInt(_0x426762(0x186))/0x7*(parseInt(_0x426762(0x1da))/0x8)+-parseInt(_0x426762(0x1a4))/0x9+-parseInt(_0x426762(0x1c1))/0xa*(-parseInt(_0x426762(0x1af))/0xb)+parseInt(_0x426762(0x16e))/0xc;if(_0x2ba1f3===_0x5c1538)break;else _0xc13820['push'](_0xc13820['shift']());}catch(_0x366184){_0xc13820['push'](_0xc13820['shift']());}}}(_0x1ab1,0x3e612),function(_0x16d5eb,_0x3f6ff8){const _0x5c0453=_0x5c50;typeof exports==_0x5c0453(0x1cb)&&typeof module<'u'?_0x3f6ff8(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=='function'&&define['amd']?define([_0x5c0453(0x1e9),_0x5c0453(0x1ee),_0x5c0453(0x1bf),_0x5c0453(0x1c8),_0x5c0453(0x1c3),_0x5c0453(0x170),'rxjs',_0x5c0453(0x1b9)],_0x3f6ff8):(_0x16d5eb=typeof globalThis<'u'?globalThis:_0x16d5eb||self,_0x3f6ff8(_0x16d5eb[_0x5c0453(0x1aa)]={},_0x16d5eb[_0x5c0453(0x1b7)],_0x16d5eb[_0x5c0453(0x1e3)],_0x16d5eb['UniverCore'],_0x16d5eb['UniverThreadCommentUi'],_0x16d5eb[_0x5c0453(0x16d)],_0x16d5eb[_0x5c0453(0x17a)],_0x16d5eb['UniverNetwork']));}(this,function(_0x2658bc,_0x42c319,_0x5c2e4c,_0x42599a,_0x6de668,_0x2b67bb,_0x590b5b,_0x11d5d9){'use strict';const _0x12b0cc=_0x5c50;const _0x2532e4=_0x12b0cc(0x19b);var _0x562e05=(_0x111521=>(_0x111521[_0x111521[_0x12b0cc(0x191)]=0x0]=_0x12b0cc(0x191),_0x111521[_0x111521[_0x12b0cc(0x18b)]=0x1]=_0x12b0cc(0x18b),_0x111521[_0x111521[_0x12b0cc(0x1cd)]=-0x1]=_0x12b0cc(0x1cd),_0x111521))(_0x562e05||{}),_0x5adc3b=(_0x4eeb23=>(_0x4eeb23[_0x4eeb23[_0x12b0cc(0x1d5)]=0x0]=_0x12b0cc(0x1d5),_0x4eeb23[_0x4eeb23[_0x12b0cc(0x1b4)]=0x1]=_0x12b0cc(0x1b4),_0x4eeb23[_0x4eeb23[_0x12b0cc(0x1db)]=0x2]='Reply',_0x4eeb23[_0x4eeb23[_0x12b0cc(0x195)]=0x3]=_0x12b0cc(0x195),_0x4eeb23[_0x4eeb23[_0x12b0cc(0x1ab)]=0x4]=_0x12b0cc(0x1ab),_0x4eeb23[_0x4eeb23[_0x12b0cc(0x1e6)]=0x5]='Solve',_0x4eeb23[_0x4eeb23[_0x12b0cc(0x1cd)]=-0x1]=_0x12b0cc(0x1cd),_0x4eeb23))(_0x5adc3b||{});const _0x2e9c6c=_0x37657c=>_0x42599a['dayjs'](new Date(+_0x37657c))['format'](_0x12b0cc(0x181)),_0x411cbd=async(_0x331a47,_0x3e0d0e)=>{const _0x4ad1ab=_0x12b0cc,_0x325ad9=_0x331a47[_0x4ad1ab(0x18c)](_0x42599a['UserManagerService']),_0x1a81d5=_0x331a47[_0x4ad1ab(0x18c)](_0x11d5d9[_0x4ad1ab(0x185)]);_0x3e0d0e[_0x4ad1ab(0x17f)](_0xc4a606=>{const _0x5cf849=_0x4ad1ab;_0x325ad9['getUser'](_0xc4a606)&&_0x3e0d0e[_0x5cf849(0x19e)](_0xc4a606);}),_0x3e0d0e[_0x4ad1ab(0x197)]&&(await _0x1a81d5['get'](_0x4ad1ab(0x1df),{'params':{'userIDs':[..._0x3e0d0e]}}))[_0x4ad1ab(0x1a9)]['users']['forEach'](_0x525834=>{const _0x2b68af=_0x4ad1ab;_0x525834&&_0x325ad9[_0x2b68af(0x1bc)](_0x525834);});};var _0x400d7e=Object[_0x12b0cc(0x1de)],_0x134501=(_0x296739,_0x564fdf,_0x54c7fe,_0x337a4b)=>{const _0x363097=_0x12b0cc;for(var _0x333c0f=_0x337a4b>0x1?void 0x0:_0x337a4b?_0x400d7e(_0x564fdf,_0x54c7fe):_0x564fdf,_0x1a3ef8=_0x296739[_0x363097(0x194)]-0x1,_0x9bdb8c;_0x1a3ef8>=0x0;_0x1a3ef8--)(_0x9bdb8c=_0x296739[_0x1a3ef8])&&(_0x333c0f=_0x9bdb8c(_0x333c0f)||_0x333c0f);return _0x333c0f;},_0x3d3ecb=(_0x57cbf1,_0xf3625d)=>(_0x518724,_0x51d59d)=>_0xf3625d(_0x518724,_0x51d59d,_0x57cbf1);let _0x498709=class extends _0x42599a['Disposable']{constructor(_0x4d270d,_0x4098c9,_0x4d1357,_0x822259){const _0x2239e6=_0x12b0cc;super(),this[_0x2239e6(0x1e7)]=_0x4d270d,this['_threadCommentModel']=_0x4098c9,this['_userService']=_0x4d1357,this[_0x2239e6(0x1a3)]=_0x822259,this[_0x2239e6(0x1e1)](),this[_0x2239e6(0x180)]();}[_0x12b0cc(0x180)](){const _0x309fe1=_0x12b0cc;this[_0x309fe1(0x18d)](this[_0x309fe1(0x1d8)][_0x309fe1(0x1cf)]['pipe'](_0x590b5b[_0x309fe1(0x1b0)](0x10))['subscribe'](_0x52d2a5=>{const _0x5ca46b=_0x309fe1,_0x46aff3=new Set();_0x52d2a5['forEach'](_0x161d58=>{const _0x56e8c7=_0x5c50;switch(_0x161d58['type']){case'add':{const _0x28423d=_0x161d58[_0x56e8c7(0x1d9)][_0x56e8c7(0x1be)];_0x46aff3[_0x56e8c7(0x1a0)](_0x28423d);break;}}}),_0x411cbd(this[_0x5ca46b(0x1a3)],_0x46aff3);}));}[_0x12b0cc(0x1e1)](){const _0x18493a=_0x12b0cc;this[_0x18493a(0x18d)](this[_0x18493a(0x1e7)][_0x18493a(0x1cf)][_0x18493a(0x18a)](async _0x533ede=>{const _0x3f5f80=_0x18493a;var _0x5f5b70,_0x3d3d1b,_0xfdfb6,_0x52d0d6;const _0xdb7833=(_0x5f5b70=this[_0x3f5f80(0x1d8)][_0x3f5f80(0x1a6)](_0x533ede['unitId'])[_0x3f5f80(0x1f0)](_0x361a9d=>_0x361a9d['threadId']===_0x533ede[_0x3f5f80(0x1c5)]))==null?void 0x0:_0x5f5b70['root'];if(!_0xdb7833)return;const {unitId:_0x32f55e,subUnitId:_0x2607f6}=_0xdb7833;switch(_0x533ede[_0x3f5f80(0x1e2)]&&this[_0x3f5f80(0x1ae)][_0x3f5f80(0x1bc)](_0x533ede['user']),_0x533ede[_0x3f5f80(0x1c6)]){case _0x5adc3b[_0x3f5f80(0x1b4)]:break;case _0x5adc3b[_0x3f5f80(0x1db)]:{this[_0x3f5f80(0x1d8)][_0x3f5f80(0x1cc)](_0x32f55e,_0x2607f6,{'unitId':_0x32f55e,'subUnitId':_0x2607f6,'ref':'','id':_0x533ede[_0x3f5f80(0x16c)],'dT':_0x2e9c6c(+_0x533ede['createTimestamp']),'threadId':_0x533ede[_0x3f5f80(0x1c5)],'personId':(_0xfdfb6=(_0x3d3d1b=_0x533ede[_0x3f5f80(0x1e2)])==null?void 0x0:_0x3d3d1b['userID'])!=null?_0xfdfb6:_0x533ede['userId'],'text':JSON['parse'](_0x533ede[_0x3f5f80(0x1a2)]),'parentId':_0xdb7833['id']});break;}case _0x5adc3b['Delete']:{const _0x22ac5b=this[_0x3f5f80(0x1d8)][_0x3f5f80(0x1ad)](_0x32f55e,_0x2607f6,_0x533ede[_0x3f5f80(0x16c)]);_0x22ac5b&&_0x22ac5b[_0x3f5f80(0x1d3)]&&this['_threadCommentModel'][_0x3f5f80(0x1d2)](_0x32f55e,_0x2607f6,_0x533ede[_0x3f5f80(0x16c)]);break;}case _0x5adc3b['Edit']:{this[_0x3f5f80(0x1d8)][_0x3f5f80(0x1ed)](_0x32f55e,_0x2607f6,{'commentId':_0x533ede[_0x3f5f80(0x16c)],'text':JSON['parse'](_0x533ede['content'])});break;}case _0x5adc3b[_0x3f5f80(0x1e6)]:{const _0x292079=(_0x52d0d6=this[_0x3f5f80(0x1d8)][_0x3f5f80(0x1a6)](_0x533ede[_0x3f5f80(0x19c)])[_0x3f5f80(0x1f0)](_0x39058c=>_0x39058c['threadId']===_0x533ede['threadId']))==null?void 0x0:_0x52d0d6[_0x3f5f80(0x19a)];_0x292079&&this['_threadCommentModel'][_0x3f5f80(0x187)](_0x32f55e,_0x2607f6,_0x292079['id'],_0x533ede['solved']===_0x562e05[_0x3f5f80(0x18b)]);break;}}}));}};_0x498709=_0x134501([_0x3d3ecb(0x0,_0x42599a[_0x12b0cc(0x1d4)](_0x42c319[_0x12b0cc(0x193)])),_0x3d3ecb(0x1,_0x42599a[_0x12b0cc(0x1d4)](_0x2b67bb['ThreadCommentModel'])),_0x3d3ecb(0x2,_0x42599a[_0x12b0cc(0x1d4)](_0x42599a[_0x12b0cc(0x1bd)])),_0x3d3ecb(0x3,_0x42599a['Inject'](_0x42599a['Injector']))],_0x498709);const _0x530a65='thread-comment-data-source.config',_0x4267d1={};var _0x335c76=Object[_0x12b0cc(0x1de)],_0x2ef107=(_0x391bd6,_0x3e81e7,_0x28d960,_0x115157)=>{const _0x5df394=_0x12b0cc;for(var _0x1fe39f=_0x115157>0x1?void 0x0:_0x115157?_0x335c76(_0x3e81e7,_0x28d960):_0x3e81e7,_0x1debf7=_0x391bd6[_0x5df394(0x194)]-0x1,_0x5a902a;_0x1debf7>=0x0;_0x1debf7--)(_0x5a902a=_0x391bd6[_0x1debf7])&&(_0x1fe39f=_0x5a902a(_0x1fe39f)||_0x1fe39f);return _0x1fe39f;},_0x396c75=(_0x486618,_0x2ed593)=>(_0x50f0b5,_0x4798de)=>_0x2ed593(_0x50f0b5,_0x4798de,_0x486618);function _0xac1cfc(_0x331678,_0x41486b){const _0x14d9c2=_0x12b0cc,_0x1b35a6=_0x331678[_0x14d9c2(0x196)][0x0];return{..._0x41486b,'id':_0x1b35a6['replyId'],'resolved':_0x331678[_0x14d9c2(0x1e4)]===0x1,'dT':_0x2e9c6c(_0x1b35a6[_0x14d9c2(0x1ca)]),'personId':_0x1b35a6[_0x14d9c2(0x17b)],'threadId':_0x1b35a6[_0x14d9c2(0x1c5)]};}function _0x297557(_0x1e3d17,_0x597c63,_0x380e2f){const _0x37664c=_0x12b0cc;var _0x500cbd,_0x5b961c;if(((_0x5b961c=(_0x500cbd=_0x1e3d17==null?void 0x0:_0x1e3d17['replies'])==null?void 0x0:_0x500cbd[_0x37664c(0x194)])!=null?_0x5b961c:0x0)>0x0){const _0x2ef7e7=(_0x101a59,_0x4bca4f)=>({'id':_0x101a59[_0x37664c(0x16c)],'threadId':_0x101a59[_0x37664c(0x1c5)],'dT':_0x2e9c6c(_0x101a59[_0x37664c(0x1ca)]),'personId':_0x101a59[_0x37664c(0x17b)],'resolved':_0x1e3d17[_0x37664c(0x1e4)]===_0x562e05['Solved'],'unitId':_0x597c63,'subUnitId':_0x380e2f,'text':JSON[_0x37664c(0x169)](_0x101a59[_0x37664c(0x1a2)]),'parentId':_0x4bca4f}),_0x40e108=_0x2ef7e7(_0x1e3d17['replies'][0x0]);return{..._0x40e108,'children':_0x1e3d17[_0x37664c(0x196)][_0x37664c(0x1ef)](0x1)[_0x37664c(0x16b)](_0x7fddef=>_0x2ef7e7(_0x7fddef,_0x40e108['id']))};}return null;}let _0x49b173=class{constructor(_0x36404d,_0x1903f6,_0x3ee212){const _0x5413b0=_0x12b0cc;this['_httpService']=_0x36404d,this[_0x5413b0(0x1ae)]=_0x1903f6,this['_sessionService']=_0x3ee212;}async[_0x12b0cc(0x1cc)](_0x3ba889){const _0x546dfb=_0x12b0cc;var _0x24cb91,_0x43ae8e;const {parentId:_0x964e25,unitId:_0x512675,text:_0x547112,threadId:_0x20ff1b}=_0x3ba889,_0x4e94c7=(_0x43ae8e=(_0x24cb91=_0x547112[_0x546dfb(0x1c7)])==null?void 0x0:_0x24cb91[_0x546dfb(0x1c2)](_0x399fcb=>_0x399fcb[_0x546dfb(0x177)]===_0x42599a[_0x546dfb(0x192)][_0x546dfb(0x1a1)])[_0x546dfb(0x16b)](_0x1918a3=>_0x1918a3[_0x546dfb(0x173)]))!=null?_0x43ae8e:[],_0x4983ba=JSON[_0x546dfb(0x1a5)](_0x547112),_0x1d5f91=(await this['_sessionService'][_0x546dfb(0x1c4)](_0x512675))[_0x546dfb(0x188)]();if(_0x964e25){const _0x35bd9a={'memberId':_0x1d5f91,'unitId':_0x512675,'content':_0x4983ba,'mention':_0x4e94c7,'threadId':_0x20ff1b},_0x2ca155=(await this[_0x546dfb(0x1bb)]['post'](_0x546dfb(0x1b2)+_0x512675+_0x546dfb(0x182),{'body':_0x35bd9a}))[_0x546dfb(0x1a9)][_0x546dfb(0x178)];return{..._0x3ba889,'id':_0x2ca155[_0x546dfb(0x16c)],'dT':_0x42599a[_0x546dfb(0x1c0)](+_0x2ca155['createTimestamp'])[_0x546dfb(0x17d)](_0x546dfb(0x181)),'personId':_0x2ca155[_0x546dfb(0x17b)]};}else{const _0x50859c={'memberId':_0x1d5f91,'unitId':_0x512675,'content':_0x4983ba,'mention':_0x4e94c7},_0x56a678=await this[_0x546dfb(0x1bb)][_0x546dfb(0x1e5)](_0x546dfb(0x1b2)+_0x512675+'/add',{'body':_0x50859c});return _0xac1cfc(_0x56a678[_0x546dfb(0x1a9)][_0x546dfb(0x179)],_0x3ba889);}}async[_0x12b0cc(0x1ed)](_0x1e1df0){const _0x29dcc9=_0x12b0cc;var _0x148477,_0x4d1d61;const {text:_0x3d9590,unitId:_0x349854}=_0x1e1df0,_0x367503=(_0x4d1d61=(_0x148477=_0x3d9590['customRanges'])==null?void 0x0:_0x148477[_0x29dcc9(0x1c2)](_0x35419c=>_0x35419c[_0x29dcc9(0x177)]===_0x42599a[_0x29dcc9(0x192)]['COMMENT'])['map'](_0x273a5a=>_0x273a5a[_0x29dcc9(0x173)]))!=null?_0x4d1d61:[],_0x3bab8c=JSON[_0x29dcc9(0x1a5)](_0x3d9590),_0x146684=_0x1e1df0[_0x29dcc9(0x1c5)],_0xf917a5=_0x1e1df0['id'],_0x4361a8={'memberId':(await this[_0x29dcc9(0x1ac)][_0x29dcc9(0x1c4)](_0x349854))[_0x29dcc9(0x188)](),'unitId':_0x349854,'threadId':_0x146684,'mention':_0x367503,'content':_0x3bab8c,'replyId':_0xf917a5},_0x2cd38f=await this[_0x29dcc9(0x1bb)][_0x29dcc9(0x1e5)]('/universer-api/comment/unit/'+_0x349854+'/edit',{'body':_0x4361a8});return!_0x2cd38f[_0x29dcc9(0x1a9)]['error']||_0x2cd38f['body'][_0x29dcc9(0x183)][_0x29dcc9(0x1c9)]===0x1;}async[_0x12b0cc(0x187)](_0x2d6db1){const _0x43e37e=_0x12b0cc,{unitId:_0x2d8c00}=_0x2d6db1,_0xd2ce70=_0x2d6db1[_0x43e37e(0x1c5)],_0x181259={'memberId':this[_0x43e37e(0x1ae)][_0x43e37e(0x184)]()[_0x43e37e(0x1a7)],'unitId':_0x2d8c00,'threadId':_0xd2ce70,'solved':_0x2d6db1[_0x43e37e(0x1dc)]?_0x562e05[_0x43e37e(0x18b)]:_0x562e05[_0x43e37e(0x191)]},_0x4a13e1=await this['_httpService'][_0x43e37e(0x1e5)](_0x43e37e(0x1b2)+_0x2d8c00+_0x43e37e(0x1b1),{'body':_0x181259});return!_0x4a13e1[_0x43e37e(0x1a9)][_0x43e37e(0x183)]||_0x4a13e1[_0x43e37e(0x1a9)][_0x43e37e(0x183)][_0x43e37e(0x1c9)]===0x1;}async['deleteComment'](_0x70537a,_0x4bdbb4,_0xce1313,_0x5d0295){const _0x548622=_0x12b0cc,_0x170bbe={'memberId':(await this['_sessionService'][_0x548622(0x1c4)](_0x70537a))['getMemberID'](),'threadId':_0xce1313,'replyId':_0x5d0295,'unitId':_0x70537a},_0x4609af=await this[_0x548622(0x1bb)]['post'](_0x548622(0x1b2)+_0x70537a+_0x548622(0x199),{'body':_0x170bbe});return!_0x4609af['body'][_0x548622(0x183)]||_0x4609af[_0x548622(0x1a9)][_0x548622(0x183)][_0x548622(0x1c9)]===0x1;}async['listComments'](_0xae0e0c,_0x248f3b,_0x54d85a){const _0x2a18b9=_0x12b0cc,_0x2dee56={'unitId':_0xae0e0c,'threadId':_0x54d85a},_0x35088d=await this[_0x2a18b9(0x1bb)][_0x2a18b9(0x1e5)]('/universer-api/comment/unit/'+_0xae0e0c+_0x2a18b9(0x1d6),{'body':_0x2dee56}),_0x435fe6=_0x54d85a[_0x2a18b9(0x16b)](_0x8d1de2=>_0x297557(_0x35088d['body']['comments'][_0x8d1de2],_0xae0e0c,_0x248f3b))[_0x2a18b9(0x1c2)](Boolean);return Object['values'](_0x35088d[_0x2a18b9(0x1a9)][_0x2a18b9(0x174)])[_0x2a18b9(0x17f)](_0x1ea756=>{this['_userService']['addUser'](_0x1ea756);}),_0x435fe6;}[_0x12b0cc(0x1ba)](_0x46b32c){const _0x4fac22=_0x12b0cc;return{'id':_0x46b32c['id'],'threadId':_0x46b32c['threadId'],'ref':_0x46b32c[_0x4fac22(0x1b6)]};}};_0x49b173=_0x2ef107([_0x396c75(0x0,_0x42599a[_0x12b0cc(0x1d4)](_0x11d5d9[_0x12b0cc(0x185)])),_0x396c75(0x1,_0x42599a['Inject'](_0x42599a[_0x12b0cc(0x1bd)])),_0x396c75(0x2,_0x42599a[_0x12b0cc(0x1d4)](_0x42c319[_0x12b0cc(0x1b8)]))],_0x49b173);var _0x500772=Object[_0x12b0cc(0x1de)],_0x55cd39=(_0x383f91,_0x1437e3,_0xd80369,_0x1a0451)=>{const _0x43e7f7=_0x12b0cc;for(var _0x17a344=_0x1a0451>0x1?void 0x0:_0x1a0451?_0x500772(_0x1437e3,_0xd80369):_0x1437e3,_0x411719=_0x383f91[_0x43e7f7(0x194)]-0x1,_0x29e18f;_0x411719>=0x0;_0x411719--)(_0x29e18f=_0x383f91[_0x411719])&&(_0x17a344=_0x29e18f(_0x17a344)||_0x17a344);return _0x17a344;},_0x4db8b2=(_0x585627,_0x2d28eb)=>(_0x1bf808,_0x372651)=>_0x2d28eb(_0x1bf808,_0x372651,_0x585627);let _0x1a4a0e=class extends _0x42599a[_0x12b0cc(0x198)]{constructor(_0x5e093e,_0x22484a){const _0x5ca96d=_0x12b0cc;super(),this['_threadCommentDataSourceService']=_0x5e093e,this[_0x5ca96d(0x1d0)]=_0x22484a,this['_initDataSource']();}['_initDataSource'](){const _0x1d3b20=_0x12b0cc;this[_0x1d3b20(0x175)][_0x1d3b20(0x1dd)]=this[_0x1d3b20(0x1d0)],this['_threadCommentDataSourceService'][_0x1d3b20(0x176)]=!0x1;}};_0x1a4a0e=_0x55cd39([_0x4db8b2(0x0,_0x2b67bb[_0x12b0cc(0x1ec)]),_0x4db8b2(0x1,_0x42599a[_0x12b0cc(0x1d4)](_0x49b173))],_0x1a4a0e);var _0x2faf6b=Object[_0x12b0cc(0x168)],_0x33d933=Object[_0x12b0cc(0x1de)],_0xee51e6=(_0x27395e,_0x34ff2e,_0x377525)=>_0x34ff2e in _0x27395e?_0x2faf6b(_0x27395e,_0x34ff2e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x377525}):_0x27395e[_0x34ff2e]=_0x377525,_0x4e0187=(_0x58d3a5,_0x3e5c32,_0x190705,_0x37f190)=>{for(var _0x52cc10=_0x37f190>0x1?void 0x0:_0x37f190?_0x33d933(_0x3e5c32,_0x190705):_0x3e5c32,_0x4a37e7=_0x58d3a5['length']-0x1,_0x2615a4;_0x4a37e7>=0x0;_0x4a37e7--)(_0x2615a4=_0x58d3a5[_0x4a37e7])&&(_0x52cc10=_0x2615a4(_0x52cc10)||_0x52cc10);return _0x52cc10;},_0x9e1a86=(_0x10dccb,_0x139477)=>(_0x3688ff,_0x15d31b)=>_0x139477(_0x3688ff,_0x15d31b,_0x10dccb),_0x505e4c=(_0x2e071e,_0x359feb,_0x1197f3)=>_0xee51e6(_0x2e071e,typeof _0x359feb!=_0x12b0cc(0x17c)?_0x359feb+'':_0x359feb,_0x1197f3);_0x2658bc[_0x12b0cc(0x1ea)]=class extends _0x42599a[_0x12b0cc(0x16f)]{constructor(_0x352107=_0x4267d1,_0x205a5f,_0x13240f){const _0x2e8403=_0x12b0cc;super(),this[_0x2e8403(0x1f1)]=_0x352107,this[_0x2e8403(0x1a3)]=_0x205a5f,this[_0x2e8403(0x19f)]=_0x13240f;const {..._0x1104c9}=_0x42599a[_0x2e8403(0x18f)]({},_0x4267d1,this[_0x2e8403(0x1f1)]);this[_0x2e8403(0x19f)]['setConfig'](_0x530a65,_0x1104c9);}[_0x12b0cc(0x171)](){const _0x212e44=_0x12b0cc;[[_0x49b173],[_0x1a4a0e],[_0x498709]][_0x212e44(0x17f)](_0x30e70f=>{const _0x51abb5=_0x212e44;this['_injector'][_0x51abb5(0x1a0)](_0x30e70f);});}['onReady'](){const _0x43fa20=_0x12b0cc;this['_injector'][_0x43fa20(0x18c)](_0x1a4a0e),this[_0x43fa20(0x1a3)][_0x43fa20(0x18c)](_0x498709);}},_0x505e4c(_0x2658bc[_0x12b0cc(0x1ea)],_0x12b0cc(0x16a),_0x2532e4),_0x505e4c(_0x2658bc[_0x12b0cc(0x1ea)],_0x12b0cc(0x1c6),_0x42599a[_0x12b0cc(0x172)][_0x12b0cc(0x1a8)]),_0x2658bc[_0x12b0cc(0x1ea)]=_0x4e0187([_0x42599a[_0x12b0cc(0x1b3)](_0x6de668[_0x12b0cc(0x1e0)],_0x42c319[_0x12b0cc(0x1d7)],_0x5c2e4c[_0x12b0cc(0x18e)]),_0x9e1a86(0x1,_0x42599a['Inject'](_0x42599a['Injector'])),_0x9e1a86(0x2,_0x42599a[_0x12b0cc(0x189)])],_0x2658bc[_0x12b0cc(0x1ea)]),Object[_0x12b0cc(0x168)](_0x2658bc,Symbol[_0x12b0cc(0x1e8)],{'value':_0x12b0cc(0x17e)});}));function _0x5c50(_0x4e1f5a,_0x1e6df2){const _0x1ab18f=_0x1ab1();return _0x5c50=function(_0x5c507c,_0x1ba68a){_0x5c507c=_0x5c507c-0x168;let _0x33689a=_0x1ab18f[_0x5c507c];return _0x33689a;},_0x5c50(_0x4e1f5a,_0x1e6df2);}function _0x1ab1(){const _0x44e7b9=['_init','user','UniverProLicense','solved','post','Solve','_commentService','toStringTag','exports','UniverThreadCommentDataSourcePlugin','24sKEDzT','IThreadCommentDataSourceService','updateComment','@univerjs-pro/collaboration-client','slice','find','_config','defineProperty','parse','pluginName','map','replyId','UniverThreadComment','16557588uevqBM','Plugin','@univerjs/thread-comment','onStarting','UniverInstanceType','rangeId','users','_threadCommentDataSourceService','syncUpdateMutationToColla','rangeType','reply','comment','rxjs','userId','symbol','format','Module','forEach','_initUserSync','YYYY/MM/DD\x20HH:mm','/reply','error','getCurrentUser','HTTPService','49ZKDkQp','resolveComment','getMemberID','IConfigService','subscribe','Solved','get','disposeWithMe','UniverLicensePlugin','merge','23151YclcaM','OpenOrReOpen','CustomRangeType','CommentService','length','Edit','replies','size','Disposable','/delete','root','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','unitId','335840WWkjtr','delete','_configService','add','COMMENT','content','_injector','2490354TLpvoM','stringify','getUnit','userID','UNIVER_UNKNOWN','body','UniverProThreadCommentDatasource','Delete','_sessionService','getComment','_userService','2596IvPQLd','bufferTime','/solved','/universer-api/comment/unit/','DependentOn','Add','221Dhmtyz','ref','UniverProCollaborationClient','CollaborationSessionService','@univerjs/network','saveCommentToSnapshot','_httpService','addUser','UserManagerService','personId','@univerjs-pro/license','dayjs','8190OFVBdH','filter','@univerjs/thread-comment-ui','requireSession','threadId','type','customRanges','@univerjs/core','code','createTimestamp','object','addComment','UNRECOGNIZED','626armHnI','commentUpdate$','_threadCommentDataSource','236rzVhlw','deleteComment','parentId','Inject','Unknown','/list','UniverCollaborationClientPlugin','_threadCommentModel','payload','283112bQkwee','Reply','resolved','dataSource','getOwnPropertyDescriptor','/universer-api/user/list','UniverThreadCommentUIPlugin'];_0x1ab1=function(){return _0x44e7b9;};return _0x1ab1();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.10.3-experimental.20250812-b4b6f1a",
3
+ "version": "0.10.3-nightly.202508121228",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.10.3-experimental.20250812-b4b6f1a",
49
- "@univerjs-pro/license": "0.10.3-experimental.20250812-b4b6f1a",
50
- "@univerjs/core": "0.10.3-experimental.20250812-b4b6f1a",
51
- "@univerjs/network": "0.10.3-experimental.20250812-b4b6f1a",
52
- "@univerjs/thread-comment": "0.10.3-experimental.20250812-b4b6f1a",
48
+ "@univerjs-pro/license": "0.10.3-nightly.202508121228",
49
+ "@univerjs-pro/collaboration-client": "0.10.3-nightly.202508121228",
50
+ "@univerjs/network": "0.10.3-nightly.202508121228",
53
51
  "@univerjs/protocol": "0.1.47-alpha.0",
54
- "@univerjs/thread-comment-ui": "0.10.3-experimental.20250812-b4b6f1a"
52
+ "@univerjs/core": "0.10.3-nightly.202508121228",
53
+ "@univerjs/thread-comment-ui": "0.10.3-nightly.202508121228",
54
+ "@univerjs/thread-comment": "0.10.3-nightly.202508121228"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",