@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202505131607 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';function _0x2c6f(){const _0x275c8a=['pipe','UserManagerService','1165098XMmDSL','_initDataSource','users','/add','/reply','/delete','getOwnPropertyDescriptor','onReady','_commentService','size','thread-comment-data-source.config','replyId','Solved','Inject','find','bufferTime','12VLrnNE','_initUserSync','post','293268IgJwaz','map','Delete','listComments','_threadCommentDataSource','replies','forEach','@univerjs-pro/collaboration-client','_httpService','filter','parse','content','length','Reply','CollaborationSessionService','IConfigService','commentUpdate$','unitId','@univerjs/thread-comment','defineProperty','DependentOn','UniverInstanceType','_sessionService','Injector','/solved','CustomRangeType','userId','YYYY/MM/DD\x20HH:mm','user','symbol','_userService','Disposable','getMemberID','type','customRanges','code','threadId','addComment','_threadCommentDataSourceService','rxjs','updateComment','stringify','toStringTag','saveCommentToSnapshot','@univerjs/network','add','get','1305140OGyfRg','reply','17991coURTN','UNRECOGNIZED','_config','CommentService','24zAeIST','5075497kXWimN','Solve','root','ref','createTimestamp','UNIVER_UNKNOWN','error','delete','dayjs','getUser','HTTPService','UniverCollaborationClientPlugin','body','IThreadCommentDataSourceService','Unknown','_init','UniverThreadCommentDataSourcePlugin','pluginName','disposeWithMe','format','requireSession','@univerjs/core','setConfig','_threadCommentModel','syncUpdateMutationToColla','/universer-api/comment/unit/','Add','@univerjs/thread-comment-ui','rangeId','solved','onStarting','addUser','3440riHWkV','14421710qQMcdW','UniverThreadCommentUIPlugin','COMMENT','subscribe','comment','OpenOrReOpen','comments','44648oJqXCW','rangeType','Edit','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_configService','slice'];_0x2c6f=function(){return _0x275c8a;};return _0x2c6f();}const _0x52d492=_0x5cbb;(function(_0x289697,_0x29d15f){const _0x5c60fd=_0x5cbb,_0x377570=_0x289697();while(!![]){try{const _0x89b301=-parseInt(_0x5c60fd(0xe2))/0x1+parseInt(_0x5c60fd(0xf5))/0x2*(parseInt(_0x5c60fd(0x12a))/0x3)+-parseInt(_0x5c60fd(0x153))/0x4+parseInt(_0x5c60fd(0x124))/0x5*(parseInt(_0x5c60fd(0xf2))/0x6)+parseInt(_0x5c60fd(0x12b))/0x7+-parseInt(_0x5c60fd(0x14b))/0x8*(-parseInt(_0x5c60fd(0x126))/0x9)+-parseInt(_0x5c60fd(0x14c))/0xa;if(_0x89b301===_0x29d15f)break;else _0x377570['push'](_0x377570['shift']());}catch(_0x2415d4){_0x377570['push'](_0x377570['shift']());}}}(_0x2c6f,0xa175a));Object['defineProperty'](exports,Symbol[_0x52d492(0x11f)],{'value':'Module'});const b=require(_0x52d492(0xfc)),T=require('@univerjs-pro/license'),c=require(_0x52d492(0x140)),j=require(_0x52d492(0x146)),M=require(_0x52d492(0x107)),w=require(_0x52d492(0x11c)),P=require(_0x52d492(0x121)),U=_0x52d492(0xdd);var I=(_0x3c323b=>(_0x3c323b[_0x3c323b[_0x52d492(0x151)]=0x0]=_0x52d492(0x151),_0x3c323b[_0x3c323b[_0x52d492(0xee)]=0x1]=_0x52d492(0xee),_0x3c323b[_0x3c323b[_0x52d492(0x127)]=-0x1]='UNRECOGNIZED',_0x3c323b))(I||{}),v=(_0x35857a=>(_0x35857a[_0x35857a[_0x52d492(0x139)]=0x0]=_0x52d492(0x139),_0x35857a[_0x35857a[_0x52d492(0x145)]=0x1]='Add',_0x35857a[_0x35857a[_0x52d492(0x102)]=0x2]='Reply',_0x35857a[_0x35857a[_0x52d492(0xdc)]=0x3]=_0x52d492(0xdc),_0x35857a[_0x35857a['Delete']=0x4]='Delete',_0x35857a[_0x35857a[_0x52d492(0x12c)]=0x5]=_0x52d492(0x12c),_0x35857a[_0x35857a['UNRECOGNIZED']=-0x1]=_0x52d492(0x127),_0x35857a))(v||{});const f=_0x50f58a=>c[_0x52d492(0x133)](new Date(+_0x50f58a))[_0x52d492(0x13e)](_0x52d492(0x110)),R=async(_0x3e4551,_0x2e68a6)=>{const _0x456585=_0x52d492,_0x167d32=_0x3e4551[_0x456585(0x123)](c[_0x456585(0xe1)]),_0xadfbdc=_0x3e4551[_0x456585(0x123)](P[_0x456585(0x135)]);_0x2e68a6[_0x456585(0xfb)](_0x38bc84=>{const _0x10e004=_0x456585;_0x167d32[_0x10e004(0x134)](_0x38bc84)&&_0x2e68a6[_0x10e004(0x132)](_0x38bc84);}),_0x2e68a6[_0x456585(0xeb)]&&(await _0xadfbdc[_0x456585(0x123)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2e68a6]}}))[_0x456585(0x137)][_0x456585(0xe4)]['forEach'](_0x3154f9=>{_0x3154f9&&_0x167d32['addUser'](_0x3154f9);});};var $=Object[_0x52d492(0xe8)],E=(_0x480dc3,_0x378425,_0x31f26d,_0x2d5ed8)=>{for(var _0x3aeaf4=_0x2d5ed8>0x1?void 0x0:_0x2d5ed8?$(_0x378425,_0x31f26d):_0x378425,_0x1b0ee1=_0x480dc3['length']-0x1,_0x262460;_0x1b0ee1>=0x0;_0x1b0ee1--)(_0x262460=_0x480dc3[_0x1b0ee1])&&(_0x3aeaf4=_0x262460(_0x3aeaf4)||_0x3aeaf4);return _0x3aeaf4;},S=(_0x206ed4,_0x24139e)=>(_0x21e656,_0x142334)=>_0x24139e(_0x21e656,_0x142334,_0x206ed4);let p=class extends c[_0x52d492(0x114)]{constructor(_0x54d593,_0x4fe6b8,_0x31c5df,_0x10c478){const _0x5bb7b5=_0x52d492;super(),this['_commentService']=_0x54d593,this[_0x5bb7b5(0x142)]=_0x4fe6b8,this['_userService']=_0x31c5df,this['_injector']=_0x10c478,this['_init'](),this['_initUserSync']();}[_0x52d492(0xf3)](){const _0x5017b7=_0x52d492;this[_0x5017b7(0x13d)](this['_threadCommentModel'][_0x5017b7(0x105)][_0x5017b7(0xe0)](w[_0x5017b7(0xf1)](0x10))[_0x5017b7(0x14f)](_0x3bf1f0=>{const _0x3f711d=_0x5017b7,_0x5b6cce=new Set();_0x3bf1f0[_0x3f711d(0xfb)](_0x4e0b13=>{const _0x3d28dd=_0x3f711d;switch(_0x4e0b13[_0x3d28dd(0x116)]){case _0x3d28dd(0x122):{const _0x3fcd40=_0x4e0b13['payload']['personId'];_0x5b6cce[_0x3d28dd(0x122)](_0x3fcd40);break;}}}),R(this['_injector'],_0x5b6cce);}));}[_0x52d492(0x13a)](){const _0x40bcda=_0x52d492;this['disposeWithMe'](this[_0x40bcda(0xea)]['commentUpdate$']['subscribe'](async _0x33d99d=>{const _0xa038a3=_0x40bcda;var _0x1a211f,_0x462cf9,_0x57fa23,_0x407767;const _0x512956=(_0x1a211f=this[_0xa038a3(0x142)]['getUnit'](_0x33d99d[_0xa038a3(0x106)])[_0xa038a3(0xf0)](_0x2c531e=>_0x2c531e['threadId']===_0x33d99d[_0xa038a3(0x119)]))==null?void 0x0:_0x1a211f[_0xa038a3(0x12d)];if(!_0x512956)return;const {unitId:_0x263c90,subUnitId:_0x3bf227}=_0x512956;switch(_0x33d99d[_0xa038a3(0x111)]&&this[_0xa038a3(0x113)][_0xa038a3(0x14a)](_0x33d99d[_0xa038a3(0x111)]),_0x33d99d[_0xa038a3(0x116)]){case v[_0xa038a3(0x145)]:break;case v['Reply']:{this[_0xa038a3(0x142)][_0xa038a3(0x11a)](_0x263c90,_0x3bf227,{'unitId':_0x263c90,'subUnitId':_0x3bf227,'ref':'','id':_0x33d99d[_0xa038a3(0xed)],'dT':f(+_0x33d99d[_0xa038a3(0x12f)]),'threadId':_0x33d99d['threadId'],'personId':(_0x57fa23=(_0x462cf9=_0x33d99d[_0xa038a3(0x111)])==null?void 0x0:_0x462cf9['userID'])!=null?_0x57fa23:_0x33d99d[_0xa038a3(0x10f)],'text':JSON[_0xa038a3(0xff)](_0x33d99d[_0xa038a3(0x100)]),'parentId':_0x512956['id']});break;}case v[_0xa038a3(0xf7)]:{const _0x25e7a1=this['_threadCommentModel']['getComment'](_0x263c90,_0x3bf227,_0x33d99d[_0xa038a3(0xed)]);_0x25e7a1&&_0x25e7a1['parentId']&&this['_threadCommentModel']['deleteComment'](_0x263c90,_0x3bf227,_0x33d99d[_0xa038a3(0xed)]);break;}case v[_0xa038a3(0xdc)]:{this['_threadCommentModel'][_0xa038a3(0x11d)](_0x263c90,_0x3bf227,{'commentId':_0x33d99d[_0xa038a3(0xed)],'text':JSON[_0xa038a3(0xff)](_0x33d99d['content'])});break;}case v['Solve']:{const _0x563983=(_0x407767=this[_0xa038a3(0x142)]['getUnit'](_0x33d99d[_0xa038a3(0x106)])[_0xa038a3(0xf0)](_0x11df3e=>_0x11df3e[_0xa038a3(0x119)]===_0x33d99d[_0xa038a3(0x119)]))==null?void 0x0:_0x407767['root'];_0x563983&&this[_0xa038a3(0x142)]['resolveComment'](_0x263c90,_0x3bf227,_0x563983['id'],_0x33d99d[_0xa038a3(0x148)]===I[_0xa038a3(0xee)]);break;}}}));}};p=E([S(0x0,c[_0x52d492(0xef)](b[_0x52d492(0x129)])),S(0x1,c[_0x52d492(0xef)](M['ThreadCommentModel'])),S(0x2,c[_0x52d492(0xef)](c['UserManagerService'])),S(0x3,c[_0x52d492(0xef)](c[_0x52d492(0x10c)]))],p);const q=_0x52d492(0xec),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0xfa79dc,_0x527692,_0x4ebdfb,_0x209ca1)=>{for(var _0x210442=_0x209ca1>0x1?void 0x0:_0x209ca1?A(_0x527692,_0x4ebdfb):_0x527692,_0x346fad=_0xfa79dc['length']-0x1,_0x4a2b4d;_0x346fad>=0x0;_0x346fad--)(_0x4a2b4d=_0xfa79dc[_0x346fad])&&(_0x210442=_0x4a2b4d(_0x210442)||_0x210442);return _0x210442;},_=(_0x2e6ebc,_0x5f462e)=>(_0x5f2f53,_0x48d8d4)=>_0x5f462e(_0x5f2f53,_0x48d8d4,_0x2e6ebc);function Y(_0x5c2536,_0x544f3a){const _0x1d8907=_0x52d492,_0x4e9d9d=_0x5c2536[_0x1d8907(0xfa)][0x0];return{..._0x544f3a,'id':_0x4e9d9d[_0x1d8907(0xed)],'resolved':_0x5c2536['solved']===0x1,'dT':f(_0x4e9d9d[_0x1d8907(0x12f)]),'personId':_0x4e9d9d[_0x1d8907(0x10f)],'threadId':_0x4e9d9d[_0x1d8907(0x119)]};}function G(_0x230f90,_0x5259d5,_0x56c241){const _0x42220a=_0x52d492;var _0x4b92a9,_0x2ceb98;if(((_0x2ceb98=(_0x4b92a9=_0x230f90==null?void 0x0:_0x230f90[_0x42220a(0xfa)])==null?void 0x0:_0x4b92a9[_0x42220a(0x101)])!=null?_0x2ceb98:0x0)>0x0){const _0x32f4fb=(_0x5460ec,_0x15b6b4)=>({'id':_0x5460ec[_0x42220a(0xed)],'threadId':_0x5460ec[_0x42220a(0x119)],'dT':f(_0x5460ec[_0x42220a(0x12f)]),'personId':_0x5460ec[_0x42220a(0x10f)],'resolved':_0x230f90[_0x42220a(0x148)]===I[_0x42220a(0xee)],'unitId':_0x5259d5,'subUnitId':_0x56c241,'text':JSON[_0x42220a(0xff)](_0x5460ec[_0x42220a(0x100)]),'parentId':_0x15b6b4}),_0x549642=_0x32f4fb(_0x230f90[_0x42220a(0xfa)][0x0]);return{..._0x549642,'children':_0x230f90[_0x42220a(0xfa)][_0x42220a(0xdf)](0x1)[_0x42220a(0xf6)](_0x2f6215=>_0x32f4fb(_0x2f6215,_0x549642['id']))};}return null;}function _0x5cbb(_0x273ca0,_0x9e87c){const _0x2c6f55=_0x2c6f();return _0x5cbb=function(_0x5cbb59,_0x7ce387){_0x5cbb59=_0x5cbb59-0xdc;let _0x4bb5cb=_0x2c6f55[_0x5cbb59];return _0x4bb5cb;},_0x5cbb(_0x273ca0,_0x9e87c);}let g=class{constructor(_0x56b0b8,_0x3176e3,_0x5927e8,_0x3b23de){const _0x242b20=_0x52d492;this[_0x242b20(0xfd)]=_0x56b0b8,this['_userService']=_0x3176e3,this[_0x242b20(0x10b)]=_0x5927e8,this['_injector']=_0x3b23de;}async[_0x52d492(0x11a)](_0x4f24fa){const _0x3ee37f=_0x52d492;var _0x1a5991,_0x222131;const {parentId:_0x2b1dbb,unitId:_0x2e625d,text:_0x5538cb,threadId:_0x1699b0}=_0x4f24fa,_0x4ed9d9=(_0x222131=(_0x1a5991=_0x5538cb[_0x3ee37f(0x117)])==null?void 0x0:_0x1a5991[_0x3ee37f(0xfe)](_0x193cad=>_0x193cad['rangeType']===c[_0x3ee37f(0x10e)][_0x3ee37f(0x14e)])[_0x3ee37f(0xf6)](_0xd62db4=>_0xd62db4[_0x3ee37f(0x147)]))!=null?_0x222131:[],_0xd042b6=JSON['stringify'](_0x5538cb),_0x3b0f9b=(await this[_0x3ee37f(0x10b)][_0x3ee37f(0x13f)](_0x2e625d))[_0x3ee37f(0x115)]();if(_0x2b1dbb){const _0x1c6640={'memberId':_0x3b0f9b,'unitId':_0x2e625d,'content':_0xd042b6,'mention':_0x4ed9d9,'threadId':_0x1699b0},_0x27b720=(await this[_0x3ee37f(0xfd)][_0x3ee37f(0xf4)]('/universer-api/comment/unit/'+_0x2e625d+_0x3ee37f(0xe6),{'body':_0x1c6640}))[_0x3ee37f(0x137)][_0x3ee37f(0x125)];return{..._0x4f24fa,'id':_0x27b720['replyId'],'dT':c[_0x3ee37f(0x133)](+_0x27b720['createTimestamp'])[_0x3ee37f(0x13e)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x27b720[_0x3ee37f(0x10f)]};}else{const _0x45fde2={'memberId':_0x3b0f9b,'unitId':_0x2e625d,'content':_0xd042b6,'mention':_0x4ed9d9},_0x177768=await this[_0x3ee37f(0xfd)][_0x3ee37f(0xf4)](_0x3ee37f(0x144)+_0x2e625d+_0x3ee37f(0xe5),{'body':_0x45fde2});return Y(_0x177768['body'][_0x3ee37f(0x150)],_0x4f24fa);}}async[_0x52d492(0x11d)](_0x496874){const _0xe9378=_0x52d492;var _0x84af71,_0x218cb9;const {text:_0xd733ef,unitId:_0x553b79}=_0x496874,_0x34608b=(_0x218cb9=(_0x84af71=_0xd733ef['customRanges'])==null?void 0x0:_0x84af71['filter'](_0x3965ff=>_0x3965ff[_0xe9378(0x154)]===c[_0xe9378(0x10e)]['COMMENT'])[_0xe9378(0xf6)](_0x4365b5=>_0x4365b5['rangeId']))!=null?_0x218cb9:[],_0x180480=JSON[_0xe9378(0x11e)](_0xd733ef),_0x90c881=_0x496874[_0xe9378(0x119)],_0x2b6d9e=_0x496874['id'],_0x21b491={'memberId':(await this['_sessionService'][_0xe9378(0x13f)](_0x553b79))['getMemberID'](),'unitId':_0x553b79,'threadId':_0x90c881,'mention':_0x34608b,'content':_0x180480,'replyId':_0x2b6d9e},_0x222471=await this['_httpService']['post'](_0xe9378(0x144)+_0x553b79+'/edit',{'body':_0x21b491});return!_0x222471[_0xe9378(0x137)]['error']||_0x222471[_0xe9378(0x137)][_0xe9378(0x131)]['code']===0x1;}async['resolveComment'](_0x245a9d){const _0x1c2749=_0x52d492,{unitId:_0x3b3785}=_0x245a9d,_0x7ebe1a=_0x245a9d[_0x1c2749(0x119)],_0x17179e={'memberId':this[_0x1c2749(0x113)]['getCurrentUser']()['userID'],'unitId':_0x3b3785,'threadId':_0x7ebe1a,'solved':_0x245a9d['resolved']?I[_0x1c2749(0xee)]:I[_0x1c2749(0x151)]},_0x27c567=await this[_0x1c2749(0xfd)][_0x1c2749(0xf4)](_0x1c2749(0x144)+_0x3b3785+_0x1c2749(0x10d),{'body':_0x17179e});return!_0x27c567[_0x1c2749(0x137)][_0x1c2749(0x131)]||_0x27c567[_0x1c2749(0x137)][_0x1c2749(0x131)][_0x1c2749(0x118)]===0x1;}async['deleteComment'](_0x5d4ff0,_0x265a85,_0x26f52f,_0x5b1e79){const _0x310660=_0x52d492,_0x57baba={'memberId':(await this[_0x310660(0x10b)]['requireSession'](_0x5d4ff0))[_0x310660(0x115)](),'threadId':_0x26f52f,'replyId':_0x5b1e79,'unitId':_0x5d4ff0},_0x547379=await this[_0x310660(0xfd)][_0x310660(0xf4)](_0x310660(0x144)+_0x5d4ff0+_0x310660(0xe7),{'body':_0x57baba});return!_0x547379['body']['error']||_0x547379['body'][_0x310660(0x131)][_0x310660(0x118)]===0x1;}async[_0x52d492(0xf8)](_0x4678a3,_0xa9b060,_0x38662c){const _0x4ed5f5=_0x52d492,_0x5e896e={'unitId':_0x4678a3,'threadId':_0x38662c},_0x47168d=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x4678a3+'/list',{'body':_0x5e896e}),_0x55f7a6=_0x38662c[_0x4ed5f5(0xf6)](_0x1419c2=>G(_0x47168d[_0x4ed5f5(0x137)][_0x4ed5f5(0x152)][_0x1419c2],_0x4678a3,_0xa9b060))[_0x4ed5f5(0xfe)](Boolean);return Object['values'](_0x47168d[_0x4ed5f5(0x137)][_0x4ed5f5(0xe4)])['forEach'](_0x3ea75a=>{const _0xc17e7a=_0x4ed5f5;this[_0xc17e7a(0x113)][_0xc17e7a(0x14a)](_0x3ea75a);}),_0x55f7a6;}[_0x52d492(0x120)](_0x21e1d5){const _0x2ba870=_0x52d492;return{'id':_0x21e1d5['id'],'threadId':_0x21e1d5[_0x2ba870(0x119)],'ref':_0x21e1d5[_0x2ba870(0x12e)]};}};g=x([_(0x0,c[_0x52d492(0xef)](P[_0x52d492(0x135)])),_(0x1,c[_0x52d492(0xef)](c[_0x52d492(0xe1)])),_(0x2,c[_0x52d492(0xef)](b[_0x52d492(0x103)])),_(0x3,c['Inject'](c[_0x52d492(0x10c)]))],g);var H=Object[_0x52d492(0xe8)],J=(_0x1209ae,_0x152d5d,_0x32e88b,_0x1c0f8f)=>{const _0x242148=_0x52d492;for(var _0x5c233d=_0x1c0f8f>0x1?void 0x0:_0x1c0f8f?H(_0x152d5d,_0x32e88b):_0x152d5d,_0x4a5440=_0x1209ae[_0x242148(0x101)]-0x1,_0x24738d;_0x4a5440>=0x0;_0x4a5440--)(_0x24738d=_0x1209ae[_0x4a5440])&&(_0x5c233d=_0x24738d(_0x5c233d)||_0x5c233d);return _0x5c233d;},y=(_0x17a926,_0x40c1f8)=>(_0x2916d8,_0x2d52d4)=>_0x40c1f8(_0x2916d8,_0x2d52d4,_0x17a926);let C=class extends c[_0x52d492(0x114)]{constructor(_0x5bb3e5,_0x2e2c7d){const _0x4dfa64=_0x52d492;super(),this[_0x4dfa64(0x11b)]=_0x5bb3e5,this[_0x4dfa64(0xf9)]=_0x2e2c7d,this[_0x4dfa64(0xe3)]();}['_initDataSource'](){const _0x13057c=_0x52d492;this[_0x13057c(0x11b)]['dataSource']=this[_0x13057c(0xf9)],this[_0x13057c(0x11b)][_0x13057c(0x143)]=!0x1;}};C=J([y(0x0,M[_0x52d492(0x138)]),y(0x1,c[_0x52d492(0xef)](g))],C);var F=Object[_0x52d492(0x108)],L=Object[_0x52d492(0xe8)],Z=(_0x2e9e8e,_0x1f3053,_0x135968)=>_0x1f3053 in _0x2e9e8e?F(_0x2e9e8e,_0x1f3053,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x135968}):_0x2e9e8e[_0x1f3053]=_0x135968,W=(_0x389f31,_0x3cf823,_0x5983d9,_0xf80b0d)=>{const _0x1f9a62=_0x52d492;for(var _0x463b88=_0xf80b0d>0x1?void 0x0:_0xf80b0d?L(_0x3cf823,_0x5983d9):_0x3cf823,_0x539e76=_0x389f31[_0x1f9a62(0x101)]-0x1,_0x52f355;_0x539e76>=0x0;_0x539e76--)(_0x52f355=_0x389f31[_0x539e76])&&(_0x463b88=_0x52f355(_0x463b88)||_0x463b88);return _0x463b88;},O=(_0x5970b7,_0x42492c)=>(_0xe041dc,_0x484066)=>_0x42492c(_0xe041dc,_0x484066,_0x5970b7),N=(_0x436571,_0x257778,_0x36954c)=>Z(_0x436571,typeof _0x257778!=_0x52d492(0x112)?_0x257778+'':_0x257778,_0x36954c);exports['UniverThreadCommentDataSourcePlugin']=class extends c['Plugin']{constructor(_0x3c9009=D,_0x28b657,_0x44cd1c){const _0x5bc01f=_0x52d492;super(),this[_0x5bc01f(0x128)]=_0x3c9009,this['_injector']=_0x28b657,this[_0x5bc01f(0xde)]=_0x44cd1c;const {..._0x36046e}=c['merge']({},D,this[_0x5bc01f(0x128)]);this[_0x5bc01f(0xde)][_0x5bc01f(0x141)](q,_0x36046e);}[_0x52d492(0x149)](){const _0x3bd074=_0x52d492;[[g],[C],[p]][_0x3bd074(0xfb)](_0x17ac63=>{const _0x58ee54=_0x3bd074;this['_injector'][_0x58ee54(0x122)](_0x17ac63);});}[_0x52d492(0xe9)](){const _0xc2bdf=_0x52d492;this['_injector'][_0xc2bdf(0x123)](C),this['_injector']['get'](p);}},N(exports[_0x52d492(0x13b)],_0x52d492(0x13c),U),N(exports[_0x52d492(0x13b)],_0x52d492(0x116),c[_0x52d492(0x10a)][_0x52d492(0x130)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x52d492(0x109)](j[_0x52d492(0x14d)],b[_0x52d492(0x136)],T['UniverLicensePlugin']),O(0x1,c[_0x52d492(0xef)](c['Injector'])),O(0x2,c[_0x52d492(0x104)])],exports[_0x52d492(0x13b)]);
1
+ 'use strict';const _0x32bf24=_0x28ba;(function(_0xc1044d,_0x421445){const _0x552ffb=_0x28ba,_0x4a4327=_0xc1044d();while(!![]){try{const _0xd7be0b=parseInt(_0x552ffb(0x25d))/0x1*(-parseInt(_0x552ffb(0x204))/0x2)+-parseInt(_0x552ffb(0x257))/0x3+-parseInt(_0x552ffb(0x221))/0x4+parseInt(_0x552ffb(0x1e9))/0x5+parseInt(_0x552ffb(0x1f0))/0x6*(-parseInt(_0x552ffb(0x1f5))/0x7)+-parseInt(_0x552ffb(0x1fc))/0x8*(parseInt(_0x552ffb(0x26b))/0x9)+parseInt(_0x552ffb(0x1ec))/0xa;if(_0xd7be0b===_0x421445)break;else _0x4a4327['push'](_0x4a4327['shift']());}catch(_0x3e83bb){_0x4a4327['push'](_0x4a4327['shift']());}}}(_0x28eb,0x9f9f3));function _0x28ba(_0x2bb994,_0x69103c){const _0x28eb3e=_0x28eb();return _0x28ba=function(_0x28ba12,_0x2cb552){_0x28ba12=_0x28ba12-0x1e8;let _0x212b15=_0x28eb3e[_0x28ba12];return _0x212b15;},_0x28ba(_0x2bb994,_0x69103c);}Object['defineProperty'](exports,Symbol[_0x32bf24(0x232)],{'value':_0x32bf24(0x1ff)});const b=require(_0x32bf24(0x1ea)),T=require(_0x32bf24(0x235)),c=require('@univerjs/core'),j=require(_0x32bf24(0x1f1)),M=require(_0x32bf24(0x234)),w=require(_0x32bf24(0x1ef)),P=require(_0x32bf24(0x20d)),U=_0x32bf24(0x1e8);var I=(_0x4ca070=>(_0x4ca070[_0x4ca070[_0x32bf24(0x253)]=0x0]=_0x32bf24(0x253),_0x4ca070[_0x4ca070[_0x32bf24(0x1f6)]=0x1]=_0x32bf24(0x1f6),_0x4ca070[_0x4ca070[_0x32bf24(0x23a)]=-0x1]=_0x32bf24(0x23a),_0x4ca070))(I||{}),v=(_0x39a7f9=>(_0x39a7f9[_0x39a7f9[_0x32bf24(0x24c)]=0x0]=_0x32bf24(0x24c),_0x39a7f9[_0x39a7f9[_0x32bf24(0x207)]=0x1]='Add',_0x39a7f9[_0x39a7f9[_0x32bf24(0x1fd)]=0x2]=_0x32bf24(0x1fd),_0x39a7f9[_0x39a7f9[_0x32bf24(0x241)]=0x3]=_0x32bf24(0x241),_0x39a7f9[_0x39a7f9['Delete']=0x4]='Delete',_0x39a7f9[_0x39a7f9[_0x32bf24(0x242)]=0x5]=_0x32bf24(0x242),_0x39a7f9[_0x39a7f9[_0x32bf24(0x23a)]=-0x1]='UNRECOGNIZED',_0x39a7f9))(v||{});const f=_0x1cad2=>c['dayjs'](new Date(+_0x1cad2))[_0x32bf24(0x21e)](_0x32bf24(0x267)),R=async(_0xbc68bf,_0x1aec37)=>{const _0x5a0c2f=_0x32bf24,_0x3c9cab=_0xbc68bf[_0x5a0c2f(0x26a)](c[_0x5a0c2f(0x226)]),_0x4b5e7b=_0xbc68bf[_0x5a0c2f(0x26a)](P['HTTPService']);_0x1aec37[_0x5a0c2f(0x211)](_0x301176=>{const _0x5b899c=_0x5a0c2f;_0x3c9cab[_0x5b899c(0x247)](_0x301176)&&_0x1aec37['delete'](_0x301176);}),_0x1aec37[_0x5a0c2f(0x24b)]&&(await _0x4b5e7b[_0x5a0c2f(0x26a)](_0x5a0c2f(0x209),{'params':{'userIDs':[..._0x1aec37]}}))[_0x5a0c2f(0x260)]['users'][_0x5a0c2f(0x211)](_0x1fccfd=>{const _0x2b9b7d=_0x5a0c2f;_0x1fccfd&&_0x3c9cab[_0x2b9b7d(0x210)](_0x1fccfd);});};var $=Object[_0x32bf24(0x21f)],E=(_0x3f4843,_0x49449e,_0x36ff1a,_0x555636)=>{const _0x3fe3f1=_0x32bf24;for(var _0x21354c=_0x555636>0x1?void 0x0:_0x555636?$(_0x49449e,_0x36ff1a):_0x49449e,_0x28ed06=_0x3f4843[_0x3fe3f1(0x259)]-0x1,_0x2845f6;_0x28ed06>=0x0;_0x28ed06--)(_0x2845f6=_0x3f4843[_0x28ed06])&&(_0x21354c=_0x2845f6(_0x21354c)||_0x21354c);return _0x21354c;},S=(_0x3b9d0e,_0x13a873)=>(_0x25584b,_0x47a235)=>_0x13a873(_0x25584b,_0x47a235,_0x3b9d0e);let p=class extends c['Disposable']{constructor(_0xdaf727,_0x218bd1,_0x3e1d60,_0xdbbd48){const _0x11cca4=_0x32bf24;super(),this[_0x11cca4(0x224)]=_0xdaf727,this[_0x11cca4(0x22f)]=_0x218bd1,this['_userService']=_0x3e1d60,this[_0x11cca4(0x246)]=_0xdbbd48,this[_0x11cca4(0x24e)](),this[_0x11cca4(0x1fa)]();}[_0x32bf24(0x1fa)](){const _0x18b669=_0x32bf24;this['disposeWithMe'](this['_threadCommentModel'][_0x18b669(0x236)][_0x18b669(0x21c)](w[_0x18b669(0x217)](0x10))[_0x18b669(0x20e)](_0x266e2a=>{const _0x4b8af9=new Set();_0x266e2a['forEach'](_0x579fbd=>{const _0x2e37f0=_0x28ba;switch(_0x579fbd[_0x2e37f0(0x249)]){case _0x2e37f0(0x23f):{const _0x438029=_0x579fbd[_0x2e37f0(0x213)][_0x2e37f0(0x205)];_0x4b8af9[_0x2e37f0(0x23f)](_0x438029);break;}}}),R(this['_injector'],_0x4b8af9);}));}['_init'](){const _0x1b44d8=_0x32bf24;this[_0x1b44d8(0x248)](this['_commentService'][_0x1b44d8(0x236)][_0x1b44d8(0x20e)](async _0x54c955=>{const _0x4350cc=_0x1b44d8;var _0x59dff3,_0x577ec4,_0x3076f4,_0x1e4692;const _0x38e56e=(_0x59dff3=this[_0x4350cc(0x22f)]['getUnit'](_0x54c955['unitId'])[_0x4350cc(0x1ee)](_0x42ea23=>_0x42ea23[_0x4350cc(0x222)]===_0x54c955[_0x4350cc(0x222)]))==null?void 0x0:_0x59dff3[_0x4350cc(0x200)];if(!_0x38e56e)return;const {unitId:_0x312a15,subUnitId:_0x2d7d0f}=_0x38e56e;switch(_0x54c955[_0x4350cc(0x22c)]&&this['_userService'][_0x4350cc(0x210)](_0x54c955[_0x4350cc(0x22c)]),_0x54c955['type']){case v[_0x4350cc(0x207)]:break;case v[_0x4350cc(0x1fd)]:{this[_0x4350cc(0x22f)][_0x4350cc(0x1f3)](_0x312a15,_0x2d7d0f,{'unitId':_0x312a15,'subUnitId':_0x2d7d0f,'ref':'','id':_0x54c955['replyId'],'dT':f(+_0x54c955[_0x4350cc(0x25e)]),'threadId':_0x54c955[_0x4350cc(0x222)],'personId':(_0x3076f4=(_0x577ec4=_0x54c955['user'])==null?void 0x0:_0x577ec4[_0x4350cc(0x24d)])!=null?_0x3076f4:_0x54c955[_0x4350cc(0x254)],'text':JSON[_0x4350cc(0x261)](_0x54c955[_0x4350cc(0x266)]),'parentId':_0x38e56e['id']});break;}case v[_0x4350cc(0x25f)]:{const _0x15a9d9=this[_0x4350cc(0x22f)][_0x4350cc(0x225)](_0x312a15,_0x2d7d0f,_0x54c955[_0x4350cc(0x1f9)]);_0x15a9d9&&_0x15a9d9[_0x4350cc(0x1fe)]&&this['_threadCommentModel'][_0x4350cc(0x20c)](_0x312a15,_0x2d7d0f,_0x54c955['replyId']);break;}case v[_0x4350cc(0x241)]:{this[_0x4350cc(0x22f)][_0x4350cc(0x25c)](_0x312a15,_0x2d7d0f,{'commentId':_0x54c955[_0x4350cc(0x1f9)],'text':JSON['parse'](_0x54c955[_0x4350cc(0x266)])});break;}case v[_0x4350cc(0x242)]:{const _0x277da1=(_0x1e4692=this[_0x4350cc(0x22f)][_0x4350cc(0x258)](_0x54c955[_0x4350cc(0x269)])[_0x4350cc(0x1ee)](_0x259866=>_0x259866[_0x4350cc(0x222)]===_0x54c955['threadId']))==null?void 0x0:_0x1e4692[_0x4350cc(0x200)];_0x277da1&&this[_0x4350cc(0x22f)][_0x4350cc(0x22d)](_0x312a15,_0x2d7d0f,_0x277da1['id'],_0x54c955['solved']===I[_0x4350cc(0x1f6)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x32bf24(0x231)])),S(0x1,c[_0x32bf24(0x1ed)](M[_0x32bf24(0x22e)])),S(0x2,c[_0x32bf24(0x1ed)](c[_0x32bf24(0x226)])),S(0x3,c[_0x32bf24(0x1ed)](c['Injector']))],p);const q=_0x32bf24(0x250),D={};function _0x28eb(){const _0x288c5e=['bufferTime','UniverThreadCommentUIPlugin','error','DependentOn','onStarting','pipe','/universer-api/comment/unit/','format','getOwnPropertyDescriptor','code','4316140CJzZob','threadId','comments','_commentService','getComment','UserManagerService','users','_httpService','Injector','/reply','Disposable','user','resolveComment','ThreadCommentModel','_threadCommentModel','defineProperty','CommentService','toStringTag','post','@univerjs/thread-comment','@univerjs-pro/license','commentUpdate$','reply','pluginName','getMemberID','UNRECOGNIZED','_config','requireSession','comment','UniverCollaborationClientPlugin','add','dataSource','Edit','Solve','/add','UNIVER_UNKNOWN','dayjs','_injector','getUser','disposeWithMe','type','rangeId','size','Unknown','userID','_init','_userService','thread-comment-data-source.config','stringify','CollaborationSessionService','OpenOrReOpen','userId','ref','/list','3598539EXusPZ','getUnit','length','_sessionService','HTTPService','updateComment','211384RGiLLF','createTimestamp','Delete','body','parse','values','COMMENT','onReady','_initDataSource','content','YYYY/MM/DD\x20HH:mm','IThreadCommentDataSourceService','unitId','get','3724029DYVkZz','UniverThreadCommentDataSourcePlugin','merge','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','474135PzUKKL','@univerjs-pro/collaboration-client','replies','62861720nILUVE','Inject','find','rxjs','6902262CDaXYd','@univerjs/thread-comment-ui','/edit','addComment','symbol','7jasVfu','Solved','syncUpdateMutationToColla','resolved','replyId','_initUserSync','/solved','24sNryiW','Reply','parentId','Module','root','solved','CustomRangeType','UniverInstanceType','10hrFdna','personId','getCurrentUser','Add','_threadCommentDataSourceService','/universer-api/user/list','rangeType','saveCommentToSnapshot','deleteComment','@univerjs/network','subscribe','map','addUser','forEach','filter','payload','_configService','listComments','_threadCommentDataSource'];_0x28eb=function(){return _0x288c5e;};return _0x28eb();}var A=Object[_0x32bf24(0x21f)],x=(_0xab5f43,_0x516de3,_0x508b1d,_0x2a35df)=>{const _0x5c69f6=_0x32bf24;for(var _0x272d20=_0x2a35df>0x1?void 0x0:_0x2a35df?A(_0x516de3,_0x508b1d):_0x516de3,_0x7651f1=_0xab5f43[_0x5c69f6(0x259)]-0x1,_0x5a1a84;_0x7651f1>=0x0;_0x7651f1--)(_0x5a1a84=_0xab5f43[_0x7651f1])&&(_0x272d20=_0x5a1a84(_0x272d20)||_0x272d20);return _0x272d20;},_=(_0xad6636,_0x1033b2)=>(_0x24b6b2,_0x31bda6)=>_0x1033b2(_0x24b6b2,_0x31bda6,_0xad6636);function Y(_0xceb71f,_0x1411a9){const _0x4cd374=_0x32bf24,_0x21da1c=_0xceb71f[_0x4cd374(0x1eb)][0x0];return{..._0x1411a9,'id':_0x21da1c['replyId'],'resolved':_0xceb71f[_0x4cd374(0x201)]===0x1,'dT':f(_0x21da1c['createTimestamp']),'personId':_0x21da1c[_0x4cd374(0x254)],'threadId':_0x21da1c[_0x4cd374(0x222)]};}function G(_0x2735ef,_0x53a45c,_0x277187){const _0x4b6ce5=_0x32bf24;var _0x4542c4,_0x2426cc;if(((_0x2426cc=(_0x4542c4=_0x2735ef==null?void 0x0:_0x2735ef[_0x4b6ce5(0x1eb)])==null?void 0x0:_0x4542c4['length'])!=null?_0x2426cc:0x0)>0x0){const _0x367cb2=(_0x45ffe4,_0x2ea1c2)=>({'id':_0x45ffe4['replyId'],'threadId':_0x45ffe4[_0x4b6ce5(0x222)],'dT':f(_0x45ffe4[_0x4b6ce5(0x25e)]),'personId':_0x45ffe4[_0x4b6ce5(0x254)],'resolved':_0x2735ef[_0x4b6ce5(0x201)]===I['Solved'],'unitId':_0x53a45c,'subUnitId':_0x277187,'text':JSON[_0x4b6ce5(0x261)](_0x45ffe4[_0x4b6ce5(0x266)]),'parentId':_0x2ea1c2}),_0x2a9e30=_0x367cb2(_0x2735ef['replies'][0x0]);return{..._0x2a9e30,'children':_0x2735ef['replies']['slice'](0x1)['map'](_0xabd79f=>_0x367cb2(_0xabd79f,_0x2a9e30['id']))};}return null;}let g=class{constructor(_0x2ab868,_0x1ad747,_0x1abc77,_0x33c090){const _0x2f4d3d=_0x32bf24;this[_0x2f4d3d(0x228)]=_0x2ab868,this[_0x2f4d3d(0x24f)]=_0x1ad747,this['_sessionService']=_0x1abc77,this[_0x2f4d3d(0x246)]=_0x33c090;}async[_0x32bf24(0x1f3)](_0x57d36c){const _0x40cff3=_0x32bf24;var _0x483af0,_0x4c3150;const {parentId:_0x46240c,unitId:_0x591126,text:_0x460228,threadId:_0x2bb440}=_0x57d36c,_0x2052bd=(_0x4c3150=(_0x483af0=_0x460228['customRanges'])==null?void 0x0:_0x483af0[_0x40cff3(0x212)](_0x8b7540=>_0x8b7540[_0x40cff3(0x20a)]===c['CustomRangeType'][_0x40cff3(0x263)])[_0x40cff3(0x20f)](_0x183287=>_0x183287[_0x40cff3(0x24a)]))!=null?_0x4c3150:[],_0x3be949=JSON[_0x40cff3(0x251)](_0x460228),_0x213c0d=(await this[_0x40cff3(0x25a)]['requireSession'](_0x591126))['getMemberID']();if(_0x46240c){const _0x1a1464={'memberId':_0x213c0d,'unitId':_0x591126,'content':_0x3be949,'mention':_0x2052bd,'threadId':_0x2bb440},_0x47c28f=(await this[_0x40cff3(0x228)][_0x40cff3(0x233)]('/universer-api/comment/unit/'+_0x591126+_0x40cff3(0x22a),{'body':_0x1a1464}))['body'][_0x40cff3(0x237)];return{..._0x57d36c,'id':_0x47c28f[_0x40cff3(0x1f9)],'dT':c[_0x40cff3(0x245)](+_0x47c28f['createTimestamp'])[_0x40cff3(0x21e)](_0x40cff3(0x267)),'personId':_0x47c28f[_0x40cff3(0x254)]};}else{const _0x11fe77={'memberId':_0x213c0d,'unitId':_0x591126,'content':_0x3be949,'mention':_0x2052bd},_0x3c6c27=await this['_httpService']['post'](_0x40cff3(0x21d)+_0x591126+_0x40cff3(0x243),{'body':_0x11fe77});return Y(_0x3c6c27[_0x40cff3(0x260)][_0x40cff3(0x23d)],_0x57d36c);}}async[_0x32bf24(0x25c)](_0x118e1f){const _0x1a5dab=_0x32bf24;var _0x4e2bd6,_0x342783;const {text:_0x2e24c2,unitId:_0x4a5320}=_0x118e1f,_0x1bb527=(_0x342783=(_0x4e2bd6=_0x2e24c2['customRanges'])==null?void 0x0:_0x4e2bd6['filter'](_0x2d4b82=>_0x2d4b82[_0x1a5dab(0x20a)]===c[_0x1a5dab(0x202)][_0x1a5dab(0x263)])[_0x1a5dab(0x20f)](_0x1f52d6=>_0x1f52d6['rangeId']))!=null?_0x342783:[],_0x2a9552=JSON['stringify'](_0x2e24c2),_0x2faaab=_0x118e1f['threadId'],_0x328801=_0x118e1f['id'],_0x4d668f={'memberId':(await this['_sessionService'][_0x1a5dab(0x23c)](_0x4a5320))['getMemberID'](),'unitId':_0x4a5320,'threadId':_0x2faaab,'mention':_0x1bb527,'content':_0x2a9552,'replyId':_0x328801},_0x14903f=await this[_0x1a5dab(0x228)]['post'](_0x1a5dab(0x21d)+_0x4a5320+_0x1a5dab(0x1f2),{'body':_0x4d668f});return!_0x14903f[_0x1a5dab(0x260)][_0x1a5dab(0x219)]||_0x14903f['body']['error'][_0x1a5dab(0x220)]===0x1;}async[_0x32bf24(0x22d)](_0x37f8fd){const _0x35abb9=_0x32bf24,{unitId:_0x296e9a}=_0x37f8fd,_0x3974c9=_0x37f8fd[_0x35abb9(0x222)],_0x1190c5={'memberId':this[_0x35abb9(0x24f)][_0x35abb9(0x206)]()[_0x35abb9(0x24d)],'unitId':_0x296e9a,'threadId':_0x3974c9,'solved':_0x37f8fd[_0x35abb9(0x1f8)]?I['Solved']:I['OpenOrReOpen']},_0x88c3f4=await this[_0x35abb9(0x228)][_0x35abb9(0x233)](_0x35abb9(0x21d)+_0x296e9a+_0x35abb9(0x1fb),{'body':_0x1190c5});return!_0x88c3f4['body']['error']||_0x88c3f4[_0x35abb9(0x260)][_0x35abb9(0x219)][_0x35abb9(0x220)]===0x1;}async[_0x32bf24(0x20c)](_0xbe1276,_0x59c941,_0x3450df,_0x4a8c6f){const _0x49d824=_0x32bf24,_0x4f928d={'memberId':(await this['_sessionService'][_0x49d824(0x23c)](_0xbe1276))[_0x49d824(0x239)](),'threadId':_0x3450df,'replyId':_0x4a8c6f,'unitId':_0xbe1276},_0x525073=await this['_httpService']['post'](_0x49d824(0x21d)+_0xbe1276+'/delete',{'body':_0x4f928d});return!_0x525073[_0x49d824(0x260)][_0x49d824(0x219)]||_0x525073[_0x49d824(0x260)]['error']['code']===0x1;}async[_0x32bf24(0x215)](_0x479f51,_0x4f3a5d,_0x41d3d8){const _0x35e738=_0x32bf24,_0x402a90={'unitId':_0x479f51,'threadId':_0x41d3d8},_0x240b44=await this['_httpService'][_0x35e738(0x233)](_0x35e738(0x21d)+_0x479f51+_0x35e738(0x256),{'body':_0x402a90}),_0x7ee5de=_0x41d3d8['map'](_0x592aff=>G(_0x240b44[_0x35e738(0x260)][_0x35e738(0x223)][_0x592aff],_0x479f51,_0x4f3a5d))[_0x35e738(0x212)](Boolean);return Object[_0x35e738(0x262)](_0x240b44[_0x35e738(0x260)][_0x35e738(0x227)])[_0x35e738(0x211)](_0x94c6b2=>{const _0x1eaa89=_0x35e738;this[_0x1eaa89(0x24f)]['addUser'](_0x94c6b2);}),_0x7ee5de;}[_0x32bf24(0x20b)](_0x49b265){const _0x3aa705=_0x32bf24;return{'id':_0x49b265['id'],'threadId':_0x49b265[_0x3aa705(0x222)],'ref':_0x49b265[_0x3aa705(0x255)]};}};g=x([_(0x0,c[_0x32bf24(0x1ed)](P[_0x32bf24(0x25b)])),_(0x1,c[_0x32bf24(0x1ed)](c['UserManagerService'])),_(0x2,c['Inject'](b[_0x32bf24(0x252)])),_(0x3,c['Inject'](c[_0x32bf24(0x229)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x3b3e4e,_0xa03f4f,_0x296124,_0x59987c)=>{for(var _0x2bac5e=_0x59987c>0x1?void 0x0:_0x59987c?H(_0xa03f4f,_0x296124):_0xa03f4f,_0x77cff4=_0x3b3e4e['length']-0x1,_0x179712;_0x77cff4>=0x0;_0x77cff4--)(_0x179712=_0x3b3e4e[_0x77cff4])&&(_0x2bac5e=_0x179712(_0x2bac5e)||_0x2bac5e);return _0x2bac5e;},y=(_0xa86682,_0x2526f6)=>(_0xdab616,_0x1569e2)=>_0x2526f6(_0xdab616,_0x1569e2,_0xa86682);let C=class extends c[_0x32bf24(0x22b)]{constructor(_0x55838f,_0x401ca2){const _0x1d85cb=_0x32bf24;super(),this[_0x1d85cb(0x208)]=_0x55838f,this[_0x1d85cb(0x216)]=_0x401ca2,this[_0x1d85cb(0x265)]();}['_initDataSource'](){const _0x57e909=_0x32bf24;this[_0x57e909(0x208)][_0x57e909(0x240)]=this[_0x57e909(0x216)],this[_0x57e909(0x208)][_0x57e909(0x1f7)]=!0x1;}};C=J([y(0x0,M[_0x32bf24(0x268)]),y(0x1,c[_0x32bf24(0x1ed)](g))],C);var F=Object[_0x32bf24(0x230)],L=Object[_0x32bf24(0x21f)],Z=(_0x44400c,_0x3b724e,_0x13d384)=>_0x3b724e in _0x44400c?F(_0x44400c,_0x3b724e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x13d384}):_0x44400c[_0x3b724e]=_0x13d384,W=(_0x25c230,_0x32cd07,_0x260495,_0x23acde)=>{const _0x8eeb21=_0x32bf24;for(var _0xc3b646=_0x23acde>0x1?void 0x0:_0x23acde?L(_0x32cd07,_0x260495):_0x32cd07,_0x38c613=_0x25c230[_0x8eeb21(0x259)]-0x1,_0x5d4ef7;_0x38c613>=0x0;_0x38c613--)(_0x5d4ef7=_0x25c230[_0x38c613])&&(_0xc3b646=_0x5d4ef7(_0xc3b646)||_0xc3b646);return _0xc3b646;},O=(_0x40c00d,_0xf7af8a)=>(_0x36fc8e,_0xe10767)=>_0xf7af8a(_0x36fc8e,_0xe10767,_0x40c00d),N=(_0x20e3e8,_0x4bd495,_0x3917da)=>Z(_0x20e3e8,typeof _0x4bd495!=_0x32bf24(0x1f4)?_0x4bd495+'':_0x4bd495,_0x3917da);exports[_0x32bf24(0x26c)]=class extends c['Plugin']{constructor(_0x487a69=D,_0x2b1133,_0x3e3150){const _0x2dd4db=_0x32bf24;super(),this['_config']=_0x487a69,this['_injector']=_0x2b1133,this[_0x2dd4db(0x214)]=_0x3e3150;const {..._0x3ea356}=c[_0x2dd4db(0x26d)]({},D,this[_0x2dd4db(0x23b)]);this[_0x2dd4db(0x214)]['setConfig'](q,_0x3ea356);}[_0x32bf24(0x21b)](){const _0x1e6f0d=_0x32bf24;[[g],[C],[p]][_0x1e6f0d(0x211)](_0x253ab1=>{const _0xe6bd58=_0x1e6f0d;this[_0xe6bd58(0x246)][_0xe6bd58(0x23f)](_0x253ab1);});}[_0x32bf24(0x264)](){const _0x41cfff=_0x32bf24;this[_0x41cfff(0x246)]['get'](C),this[_0x41cfff(0x246)][_0x41cfff(0x26a)](p);}},N(exports[_0x32bf24(0x26c)],_0x32bf24(0x238),U),N(exports[_0x32bf24(0x26c)],_0x32bf24(0x249),c[_0x32bf24(0x203)][_0x32bf24(0x244)]),exports[_0x32bf24(0x26c)]=W([c[_0x32bf24(0x21a)](j[_0x32bf24(0x218)],b[_0x32bf24(0x23e)],T['UniverLicensePlugin']),O(0x1,c['Inject'](c['Injector'])),O(0x2,c['IConfigService'])],exports[_0x32bf24(0x26c)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x297170=_0x31ac;(function(_0xc07465,_0x3389ea){const _0x20f3da=_0x31ac,_0x426425=_0xc07465();while(!![]){try{const _0x8681e=parseInt(_0x20f3da(0x107))/0x1*(parseInt(_0x20f3da(0x11f))/0x2)+parseInt(_0x20f3da(0x14a))/0x3*(parseInt(_0x20f3da(0x11e))/0x4)+-parseInt(_0x20f3da(0x135))/0x5*(parseInt(_0x20f3da(0x101))/0x6)+-parseInt(_0x20f3da(0x157))/0x7+-parseInt(_0x20f3da(0x11b))/0x8+-parseInt(_0x20f3da(0x129))/0x9+parseInt(_0x20f3da(0xfd))/0xa;if(_0x8681e===_0x3389ea)break;else _0x426425['push'](_0x426425['shift']());}catch(_0x15324e){_0x426425['push'](_0x426425['shift']());}}}(_0x8653,0x428f0));import{CommentService as _0x402890,CollaborationSessionService as _0x288d12,UniverCollaborationClientPlugin as _0x32f6c5}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3729ac}from'@univerjs-pro/license';import{dayjs as _0x14c484,UserManagerService as _0x95a105,Inject as _0x3ff32b,Injector as _0x47bae4,Disposable as _0x5963a4,CustomRangeType as _0x9ed84b,UniverInstanceType as _0x2678d6,DependentOn as _0x557d35,IConfigService as _0x309048,Plugin as _0x341216,merge as _0x2c3e44}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x16c7d9}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x47dbdb,IThreadCommentDataSourceService as _0x373199}from'@univerjs/thread-comment';import{bufferTime as _0x2cb961}from'rxjs';import{HTTPService as _0x48d5dd}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3518fa=>(_0x3518fa[_0x3518fa[_0x297170(0x106)]=0x0]=_0x297170(0x106),_0x3518fa[_0x3518fa[_0x297170(0x110)]=0x1]=_0x297170(0x110),_0x3518fa[_0x3518fa[_0x297170(0x134)]=-0x1]=_0x297170(0x134),_0x3518fa))(I||{}),v=(_0x5883e3=>(_0x5883e3[_0x5883e3[_0x297170(0x158)]=0x0]='Unknown',_0x5883e3[_0x5883e3['Add']=0x1]='Add',_0x5883e3[_0x5883e3[_0x297170(0x144)]=0x2]='Reply',_0x5883e3[_0x5883e3[_0x297170(0x124)]=0x3]=_0x297170(0x124),_0x5883e3[_0x5883e3['Delete']=0x4]='Delete',_0x5883e3[_0x5883e3[_0x297170(0x12c)]=0x5]='Solve',_0x5883e3[_0x5883e3[_0x297170(0x134)]=-0x1]='UNRECOGNIZED',_0x5883e3))(v||{});const D=_0x7b9742=>_0x14c484(new Date(+_0x7b9742))[_0x297170(0x156)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x1a4b51,_0x3f5962)=>{const _0x39f0cb=_0x297170,_0x4cb4c2=_0x1a4b51[_0x39f0cb(0x12d)](_0x95a105),_0x30f6f9=_0x1a4b51[_0x39f0cb(0x12d)](_0x48d5dd);_0x3f5962[_0x39f0cb(0x13a)](_0x21e445=>{const _0x17298d=_0x39f0cb;_0x4cb4c2[_0x17298d(0xfa)](_0x21e445)&&_0x3f5962[_0x17298d(0x100)](_0x21e445);}),_0x3f5962[_0x39f0cb(0x126)]&&(await _0x30f6f9[_0x39f0cb(0x12d)](_0x39f0cb(0x10c),{'params':{'userIDs':[..._0x3f5962]}}))['body'][_0x39f0cb(0x108)]['forEach'](_0x4b56e7=>{const _0x406ffb=_0x39f0cb;_0x4b56e7&&_0x4cb4c2[_0x406ffb(0x10b)](_0x4b56e7);});};var K=Object[_0x297170(0x141)],V=(_0xc97fb3,_0x126c51,_0x1e6d93,_0x3c4003)=>{const _0x3de073=_0x297170;for(var _0x4fea08=_0x3c4003>0x1?void 0x0:_0x3c4003?K(_0x126c51,_0x1e6d93):_0x126c51,_0x1e3d37=_0xc97fb3[_0x3de073(0x121)]-0x1,_0x461261;_0x1e3d37>=0x0;_0x1e3d37--)(_0x461261=_0xc97fb3[_0x1e3d37])&&(_0x4fea08=_0x461261(_0x4fea08)||_0x4fea08);return _0x4fea08;},p=(_0x31e203,_0x3d4932)=>(_0x3e528a,_0xf3a76)=>_0x3d4932(_0x3e528a,_0xf3a76,_0x31e203);let S=class extends _0x5963a4{constructor(_0x16e23e,_0x34eca4,_0x407fbd,_0x3c0d92){const _0x44c808=_0x297170;super(),this[_0x44c808(0x13e)]=_0x16e23e,this['_threadCommentModel']=_0x34eca4,this[_0x44c808(0x12a)]=_0x407fbd,this[_0x44c808(0x10a)]=_0x3c0d92,this[_0x44c808(0x13d)](),this[_0x44c808(0x133)]();}['_initUserSync'](){const _0x20d196=_0x297170;this['disposeWithMe'](this[_0x20d196(0x120)][_0x20d196(0x109)]['pipe'](_0x2cb961(0x10))[_0x20d196(0x131)](_0x147f5c=>{const _0x4e198f=_0x20d196,_0x56af3c=new Set();_0x147f5c[_0x4e198f(0x13a)](_0x47d622=>{const _0x4cc4a3=_0x4e198f;switch(_0x47d622[_0x4cc4a3(0x13c)]){case _0x4cc4a3(0x116):{const _0x16a166=_0x47d622[_0x4cc4a3(0x122)]['personId'];_0x56af3c['add'](_0x16a166);break;}}}),B(this[_0x4e198f(0x10a)],_0x56af3c);}));}[_0x297170(0x13d)](){const _0xbcc2b0=_0x297170;this[_0xbcc2b0(0x111)](this[_0xbcc2b0(0x13e)]['commentUpdate$'][_0xbcc2b0(0x131)](async _0x463f1e=>{const _0x3c1d79=_0xbcc2b0;var _0x1a0523,_0x5d5bf3,_0x1399e1,_0x4f4acd;const _0x3c71a8=(_0x1a0523=this[_0x3c1d79(0x120)][_0x3c1d79(0x140)](_0x463f1e[_0x3c1d79(0x10f)])[_0x3c1d79(0x154)](_0x4d2534=>_0x4d2534[_0x3c1d79(0x11d)]===_0x463f1e[_0x3c1d79(0x11d)]))==null?void 0x0:_0x1a0523['root'];if(!_0x3c71a8)return;const {unitId:_0x167d17,subUnitId:_0x1197a4}=_0x3c71a8;switch(_0x463f1e[_0x3c1d79(0x142)]&&this[_0x3c1d79(0x12a)][_0x3c1d79(0x10b)](_0x463f1e['user']),_0x463f1e[_0x3c1d79(0x13c)]){case v[_0x3c1d79(0x132)]:break;case v[_0x3c1d79(0x144)]:{this[_0x3c1d79(0x120)][_0x3c1d79(0x127)](_0x167d17,_0x1197a4,{'unitId':_0x167d17,'subUnitId':_0x1197a4,'ref':'','id':_0x463f1e[_0x3c1d79(0x136)],'dT':D(+_0x463f1e[_0x3c1d79(0x14e)]),'threadId':_0x463f1e['threadId'],'personId':(_0x1399e1=(_0x5d5bf3=_0x463f1e['user'])==null?void 0x0:_0x5d5bf3['userID'])!=null?_0x1399e1:_0x463f1e[_0x3c1d79(0x12f)],'text':JSON[_0x3c1d79(0x125)](_0x463f1e[_0x3c1d79(0x114)]),'parentId':_0x3c71a8['id']});break;}case v['Delete']:{const _0x3d558f=this[_0x3c1d79(0x120)][_0x3c1d79(0x14d)](_0x167d17,_0x1197a4,_0x463f1e[_0x3c1d79(0x136)]);_0x3d558f&&_0x3d558f['parentId']&&this['_threadCommentModel'][_0x3c1d79(0x137)](_0x167d17,_0x1197a4,_0x463f1e[_0x3c1d79(0x136)]);break;}case v[_0x3c1d79(0x124)]:{this['_threadCommentModel'][_0x3c1d79(0x138)](_0x167d17,_0x1197a4,{'commentId':_0x463f1e[_0x3c1d79(0x136)],'text':JSON[_0x3c1d79(0x125)](_0x463f1e[_0x3c1d79(0x114)])});break;}case v['Solve']:{const _0x437ec6=(_0x4f4acd=this[_0x3c1d79(0x120)]['getUnit'](_0x463f1e[_0x3c1d79(0x10f)])[_0x3c1d79(0x154)](_0x1a2b04=>_0x1a2b04['threadId']===_0x463f1e[_0x3c1d79(0x11d)]))==null?void 0x0:_0x4f4acd[_0x3c1d79(0x14b)];_0x437ec6&&this[_0x3c1d79(0x120)][_0x3c1d79(0xfe)](_0x167d17,_0x1197a4,_0x437ec6['id'],_0x463f1e[_0x3c1d79(0x103)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x3ff32b(_0x402890)),p(0x1,_0x3ff32b(_0x47dbdb)),p(0x2,_0x3ff32b(_0x95a105)),p(0x3,_0x3ff32b(_0x47bae4))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x28ff8a,_0x2fb894,_0x495986,_0x362829)=>{const _0x1b199c=_0x297170;for(var _0x8f0b6d=_0x362829>0x1?void 0x0:_0x362829?k(_0x2fb894,_0x495986):_0x2fb894,_0x1af1d5=_0x28ff8a[_0x1b199c(0x121)]-0x1,_0x37cbc0;_0x1af1d5>=0x0;_0x1af1d5--)(_0x37cbc0=_0x28ff8a[_0x1af1d5])&&(_0x8f0b6d=_0x37cbc0(_0x8f0b6d)||_0x8f0b6d);return _0x8f0b6d;},_=(_0x12b65c,_0x1c7902)=>(_0x5ed37e,_0x2fed6d)=>_0x1c7902(_0x5ed37e,_0x2fed6d,_0x12b65c);function X(_0x3184ff,_0x2d6b4b){const _0xcaa39=_0x297170,_0x1d5c88=_0x3184ff[_0xcaa39(0xfb)][0x0];return{..._0x2d6b4b,'id':_0x1d5c88['replyId'],'resolved':_0x3184ff['solved']===0x1,'dT':D(_0x1d5c88[_0xcaa39(0x14e)]),'personId':_0x1d5c88[_0xcaa39(0x12f)],'threadId':_0x1d5c88[_0xcaa39(0x11d)]};}function ee(_0x47b1c7,_0x428aa3,_0x4cd724){const _0x564aae=_0x297170;var _0x2ac0a5,_0x38e522;if(((_0x38e522=(_0x2ac0a5=_0x47b1c7==null?void 0x0:_0x47b1c7[_0x564aae(0xfb)])==null?void 0x0:_0x2ac0a5['length'])!=null?_0x38e522:0x0)>0x0){const _0x2592d3=(_0x562d01,_0x5749f7)=>({'id':_0x562d01['replyId'],'threadId':_0x562d01[_0x564aae(0x11d)],'dT':D(_0x562d01[_0x564aae(0x14e)]),'personId':_0x562d01[_0x564aae(0x12f)],'resolved':_0x47b1c7['solved']===I[_0x564aae(0x110)],'unitId':_0x428aa3,'subUnitId':_0x4cd724,'text':JSON['parse'](_0x562d01[_0x564aae(0x114)]),'parentId':_0x5749f7}),_0x19c2f4=_0x2592d3(_0x47b1c7[_0x564aae(0xfb)][0x0]);return{..._0x19c2f4,'children':_0x47b1c7['replies']['slice'](0x1)['map'](_0x80f21f=>_0x2592d3(_0x80f21f,_0x19c2f4['id']))};}return null;}let f=class{constructor(_0x5557e5,_0x16bf2a,_0x13e01e,_0x455c67){const _0xa36daf=_0x297170;this[_0xa36daf(0x115)]=_0x5557e5,this['_userService']=_0x16bf2a,this[_0xa36daf(0x113)]=_0x13e01e,this[_0xa36daf(0x10a)]=_0x455c67;}async[_0x297170(0x127)](_0x2aa293){const _0x21200b=_0x297170;var _0x41aeb9,_0x3fe16c;const {parentId:_0x291a68,unitId:_0x4a6a21,text:_0x29c4e6,threadId:_0x59e976}=_0x2aa293,_0x3c73e6=(_0x3fe16c=(_0x41aeb9=_0x29c4e6['customRanges'])==null?void 0x0:_0x41aeb9[_0x21200b(0x119)](_0x599dfe=>_0x599dfe['rangeType']===_0x9ed84b['COMMENT'])[_0x21200b(0x150)](_0x4f9cbe=>_0x4f9cbe[_0x21200b(0x149)]))!=null?_0x3fe16c:[],_0x3a927e=JSON[_0x21200b(0x143)](_0x29c4e6),_0x894962=(await this[_0x21200b(0x113)][_0x21200b(0x12e)](_0x4a6a21))[_0x21200b(0x148)]();if(_0x291a68){const _0xf7b59={'memberId':_0x894962,'unitId':_0x4a6a21,'content':_0x3a927e,'mention':_0x3c73e6,'threadId':_0x59e976},_0x336f01=(await this[_0x21200b(0x115)][_0x21200b(0x155)](_0x21200b(0x11a)+_0x4a6a21+'/reply',{'body':_0xf7b59}))[_0x21200b(0x104)]['reply'];return{..._0x2aa293,'id':_0x336f01['replyId'],'dT':_0x14c484(+_0x336f01[_0x21200b(0x14e)])[_0x21200b(0x156)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x336f01[_0x21200b(0x12f)]};}else{const _0x27932b={'memberId':_0x894962,'unitId':_0x4a6a21,'content':_0x3a927e,'mention':_0x3c73e6},_0x52d768=await this[_0x21200b(0x115)][_0x21200b(0x155)](_0x21200b(0x11a)+_0x4a6a21+'/add',{'body':_0x27932b});return X(_0x52d768[_0x21200b(0x104)][_0x21200b(0x14c)],_0x2aa293);}}async['updateComment'](_0x4275a5){const _0x457dc0=_0x297170;var _0x3ee75a,_0x24bdcb;const {text:_0x3e620e,unitId:_0x3e0aef}=_0x4275a5,_0x1e13ba=(_0x24bdcb=(_0x3ee75a=_0x3e620e['customRanges'])==null?void 0x0:_0x3ee75a[_0x457dc0(0x119)](_0x576a6d=>_0x576a6d[_0x457dc0(0x102)]===_0x9ed84b[_0x457dc0(0x130)])[_0x457dc0(0x150)](_0x1a4377=>_0x1a4377[_0x457dc0(0x149)]))!=null?_0x24bdcb:[],_0x1b3d75=JSON['stringify'](_0x3e620e),_0xf2f4e6=_0x4275a5['threadId'],_0x485d71=_0x4275a5['id'],_0x2b4b03={'memberId':(await this[_0x457dc0(0x113)][_0x457dc0(0x12e)](_0x3e0aef))['getMemberID'](),'unitId':_0x3e0aef,'threadId':_0xf2f4e6,'mention':_0x1e13ba,'content':_0x1b3d75,'replyId':_0x485d71},_0x44539d=await this[_0x457dc0(0x115)][_0x457dc0(0x155)]('/universer-api/comment/unit/'+_0x3e0aef+_0x457dc0(0xff),{'body':_0x2b4b03});return!_0x44539d[_0x457dc0(0x104)][_0x457dc0(0x14f)]||_0x44539d['body'][_0x457dc0(0x14f)][_0x457dc0(0x145)]===0x1;}async[_0x297170(0xfe)](_0x4388ea){const _0x4577a2=_0x297170,{unitId:_0x42e453}=_0x4388ea,_0x300be7=_0x4388ea['threadId'],_0x203583={'memberId':this[_0x4577a2(0x12a)][_0x4577a2(0x146)]()[_0x4577a2(0x117)],'unitId':_0x42e453,'threadId':_0x300be7,'solved':_0x4388ea[_0x4577a2(0x152)]?I[_0x4577a2(0x110)]:I[_0x4577a2(0x106)]},_0xd88d6=await this['_httpService']['post'](_0x4577a2(0x11a)+_0x42e453+'/solved',{'body':_0x203583});return!_0xd88d6[_0x4577a2(0x104)][_0x4577a2(0x14f)]||_0xd88d6[_0x4577a2(0x104)][_0x4577a2(0x14f)][_0x4577a2(0x145)]===0x1;}async['deleteComment'](_0x3fd85c,_0x18fefd,_0x489806,_0x15076b){const _0xa9eea6=_0x297170,_0x631d8c={'memberId':(await this['_sessionService'][_0xa9eea6(0x12e)](_0x3fd85c))[_0xa9eea6(0x148)](),'threadId':_0x489806,'replyId':_0x15076b,'unitId':_0x3fd85c},_0x5620b2=await this[_0xa9eea6(0x115)][_0xa9eea6(0x155)](_0xa9eea6(0x11a)+_0x3fd85c+_0xa9eea6(0x118),{'body':_0x631d8c});return!_0x5620b2[_0xa9eea6(0x104)][_0xa9eea6(0x14f)]||_0x5620b2[_0xa9eea6(0x104)][_0xa9eea6(0x14f)][_0xa9eea6(0x145)]===0x1;}async[_0x297170(0x10d)](_0x1bb5dc,_0x47b91c,_0x31be4b){const _0x21c9f4=_0x297170,_0x203d0b={'unitId':_0x1bb5dc,'threadId':_0x31be4b},_0x347204=await this['_httpService'][_0x21c9f4(0x155)](_0x21c9f4(0x11a)+_0x1bb5dc+'/list',{'body':_0x203d0b}),_0x3175fa=_0x31be4b[_0x21c9f4(0x150)](_0x21ef01=>ee(_0x347204['body'][_0x21c9f4(0x13b)][_0x21ef01],_0x1bb5dc,_0x47b91c))['filter'](Boolean);return Object[_0x21c9f4(0x10e)](_0x347204[_0x21c9f4(0x104)]['users'])[_0x21c9f4(0x13a)](_0x2e2be9=>{const _0x552646=_0x21c9f4;this[_0x552646(0x12a)][_0x552646(0x10b)](_0x2e2be9);}),_0x3175fa;}[_0x297170(0x147)](_0xc5e6f9){const _0x337170=_0x297170;return{'id':_0xc5e6f9['id'],'threadId':_0xc5e6f9['threadId'],'ref':_0xc5e6f9[_0x337170(0x13f)]};}};f=Q([_(0x0,_0x3ff32b(_0x48d5dd)),_(0x1,_0x3ff32b(_0x95a105)),_(0x2,_0x3ff32b(_0x288d12)),_(0x3,_0x3ff32b(_0x47bae4))],f);var re=Object[_0x297170(0x141)],te=(_0x457479,_0x5bc6ad,_0x3da56e,_0x377ae9)=>{for(var _0x5eb2a8=_0x377ae9>0x1?void 0x0:_0x377ae9?re(_0x5bc6ad,_0x3da56e):_0x5bc6ad,_0x39e7d9=_0x457479['length']-0x1,_0x2c78cc;_0x39e7d9>=0x0;_0x39e7d9--)(_0x2c78cc=_0x457479[_0x39e7d9])&&(_0x5eb2a8=_0x2c78cc(_0x5eb2a8)||_0x5eb2a8);return _0x5eb2a8;},N=(_0x5e6060,_0x3d014b)=>(_0x2a4acf,_0x199fdd)=>_0x3d014b(_0x2a4acf,_0x199fdd,_0x5e6060);function _0x8653(){const _0x28528e=['Add','_initUserSync','UNRECOGNIZED','5DiDFMz','replyId','deleteComment','updateComment','_threadCommentDataSourceService','forEach','comments','type','_init','_commentService','ref','getUnit','getOwnPropertyDescriptor','user','stringify','Reply','code','getCurrentUser','saveCommentToSnapshot','getMemberID','rangeId','3eTCogY','root','comment','getComment','createTimestamp','error','map','dataSource','resolved','_threadCommentDataSource','find','post','format','172333QGzNtl','Unknown','getUser','replies','pluginName','1220970MdGIXG','resolveComment','/edit','delete','1711902WgvgCy','rangeType','solved','body','onStarting','OpenOrReOpen','103NmfUIF','users','commentUpdate$','_injector','addUser','/universer-api/user/list','listComments','values','unitId','Solved','disposeWithMe','_config','_sessionService','content','_httpService','add','userID','/delete','filter','/universer-api/comment/unit/','2354984vEiZUJ','syncUpdateMutationToColla','threadId','1617556yvFYPg','8198OXsyWT','_threadCommentModel','length','payload','onReady','Edit','parse','size','addComment','_configService','645750vyYLTg','_userService','setConfig','Solve','get','requireSession','userId','COMMENT','subscribe'];_0x8653=function(){return _0x28528e;};return _0x8653();}let g=class extends _0x5963a4{constructor(_0x33c47a,_0x49917b){const _0x5c615a=_0x297170;super(),this[_0x5c615a(0x139)]=_0x33c47a,this[_0x5c615a(0x153)]=_0x49917b,this['_initDataSource']();}['_initDataSource'](){const _0xc9355f=_0x297170;this[_0xc9355f(0x139)][_0xc9355f(0x151)]=this[_0xc9355f(0x153)],this['_threadCommentDataSourceService'][_0xc9355f(0x11c)]=!0x1;}};function _0x31ac(_0x497322,_0x50a33){const _0x865386=_0x8653();return _0x31ac=function(_0x31ac2d,_0xb9e28f){_0x31ac2d=_0x31ac2d-0xfa;let _0x162a10=_0x865386[_0x31ac2d];return _0x162a10;},_0x31ac(_0x497322,_0x50a33);}g=te([N(0x0,_0x373199),N(0x1,_0x3ff32b(f))],g);var se=Object['defineProperty'],oe=Object[_0x297170(0x141)],ne=(_0x1dab4c,_0x139882,_0x41354c)=>_0x139882 in _0x1dab4c?se(_0x1dab4c,_0x139882,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x41354c}):_0x1dab4c[_0x139882]=_0x41354c,ie=(_0x4752d3,_0xf5acd2,_0x5136fb,_0x190eb4)=>{const _0x53a8a4=_0x297170;for(var _0x359ab7=_0x190eb4>0x1?void 0x0:_0x190eb4?oe(_0xf5acd2,_0x5136fb):_0xf5acd2,_0x4fba82=_0x4752d3[_0x53a8a4(0x121)]-0x1,_0x13b13d;_0x4fba82>=0x0;_0x4fba82--)(_0x13b13d=_0x4752d3[_0x4fba82])&&(_0x359ab7=_0x13b13d(_0x359ab7)||_0x359ab7);return _0x359ab7;},w=(_0x48566f,_0x1b73c8)=>(_0x339429,_0x482147)=>_0x1b73c8(_0x339429,_0x482147,_0x48566f),$=(_0x5e0f3e,_0x12d9e5,_0x3bdc21)=>ne(_0x5e0f3e,typeof _0x12d9e5!='symbol'?_0x12d9e5+'':_0x12d9e5,_0x3bdc21);let b=class extends _0x341216{constructor(_0x313507=M,_0x1b58fa,_0x5165ba){const _0x2221f8=_0x297170;super(),this['_config']=_0x313507,this[_0x2221f8(0x10a)]=_0x1b58fa,this[_0x2221f8(0x128)]=_0x5165ba;const {..._0x4384e8}=_0x2c3e44({},M,this[_0x2221f8(0x112)]);this[_0x2221f8(0x128)][_0x2221f8(0x12b)](z,_0x4384e8);}[_0x297170(0x105)](){const _0x5b3bac=_0x297170;[[f],[g],[S]][_0x5b3bac(0x13a)](_0x5b3774=>{const _0x50a89d=_0x5b3bac;this[_0x50a89d(0x10a)][_0x50a89d(0x116)](_0x5b3774);});}[_0x297170(0x123)](){const _0x2c0756=_0x297170;this[_0x2c0756(0x10a)][_0x2c0756(0x12d)](g),this[_0x2c0756(0x10a)]['get'](S);}};$(b,_0x297170(0xfc),W),$(b,_0x297170(0x13c),_0x2678d6['UNIVER_UNKNOWN']),b=ie([_0x557d35(_0x16c7d9,_0x32f6c5,_0x3729ac),w(0x1,_0x3ff32b(_0x47bae4)),w(0x2,_0x309048)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x361ff7=_0x2b3d;(function(_0x3b8dfd,_0x23b7d1){const _0x2726bb=_0x2b3d,_0x2a2d8a=_0x3b8dfd();while(!![]){try{const _0x3bc8a1=-parseInt(_0x2726bb(0x14f))/0x1+parseInt(_0x2726bb(0x11c))/0x2+parseInt(_0x2726bb(0x123))/0x3*(-parseInt(_0x2726bb(0x178))/0x4)+-parseInt(_0x2726bb(0x13d))/0x5+parseInt(_0x2726bb(0x144))/0x6+-parseInt(_0x2726bb(0x127))/0x7+parseInt(_0x2726bb(0x17a))/0x8*(parseInt(_0x2726bb(0x126))/0x9);if(_0x3bc8a1===_0x23b7d1)break;else _0x2a2d8a['push'](_0x2a2d8a['shift']());}catch(_0x16e457){_0x2a2d8a['push'](_0x2a2d8a['shift']());}}}(_0x1ab1,0x60da5));import{CommentService as _0x550980,CollaborationSessionService as _0xed4b95,UniverCollaborationClientPlugin as _0x1f4157}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x50fae2}from'@univerjs-pro/license';import{dayjs as _0x453ba2,UserManagerService as _0x230923,Inject as _0x4c9cd9,Injector as _0x1592aa,Disposable as _0xaf25f7,CustomRangeType as _0x32fdec,UniverInstanceType as _0x5015d6,DependentOn as _0x434b14,IConfigService as _0x2808c2,Plugin as _0x375e34,merge as _0x3bd94e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4bca2b}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x51ac0f,IThreadCommentDataSourceService as _0x38d4a8}from'@univerjs/thread-comment';import{bufferTime as _0x2c3f39}from'rxjs';import{HTTPService as _0x13c39a}from'@univerjs/network';const W=_0x361ff7(0x15c);var I=(_0x43eb89=>(_0x43eb89[_0x43eb89[_0x361ff7(0x15b)]=0x0]=_0x361ff7(0x15b),_0x43eb89[_0x43eb89[_0x361ff7(0x12e)]=0x1]=_0x361ff7(0x12e),_0x43eb89[_0x43eb89[_0x361ff7(0x164)]=-0x1]=_0x361ff7(0x164),_0x43eb89))(I||{}),v=(_0x6d47e4=>(_0x6d47e4[_0x6d47e4['Unknown']=0x0]=_0x361ff7(0x175),_0x6d47e4[_0x6d47e4[_0x361ff7(0x13f)]=0x1]=_0x361ff7(0x13f),_0x6d47e4[_0x6d47e4[_0x361ff7(0x180)]=0x2]=_0x361ff7(0x180),_0x6d47e4[_0x6d47e4[_0x361ff7(0x16b)]=0x3]='Edit',_0x6d47e4[_0x6d47e4[_0x361ff7(0x17b)]=0x4]='Delete',_0x6d47e4[_0x6d47e4[_0x361ff7(0x12d)]=0x5]=_0x361ff7(0x12d),_0x6d47e4[_0x6d47e4[_0x361ff7(0x164)]=-0x1]=_0x361ff7(0x164),_0x6d47e4))(v||{});const D=_0x2ad013=>_0x453ba2(new Date(+_0x2ad013))[_0x361ff7(0x16c)](_0x361ff7(0x13a)),B=async(_0x1bc43e,_0x333760)=>{const _0x37d30e=_0x361ff7,_0x4799ba=_0x1bc43e[_0x37d30e(0x176)](_0x230923),_0x5acad5=_0x1bc43e['get'](_0x13c39a);_0x333760[_0x37d30e(0x136)](_0x25ad47=>{const _0x3ec9dc=_0x37d30e;_0x4799ba[_0x3ec9dc(0x16e)](_0x25ad47)&&_0x333760[_0x3ec9dc(0x13b)](_0x25ad47);}),_0x333760[_0x37d30e(0x125)]&&(await _0x5acad5[_0x37d30e(0x176)](_0x37d30e(0x12b),{'params':{'userIDs':[..._0x333760]}}))[_0x37d30e(0x119)]['users'][_0x37d30e(0x136)](_0xdb7fd5=>{_0xdb7fd5&&_0x4799ba['addUser'](_0xdb7fd5);});};var K=Object[_0x361ff7(0x121)],V=(_0xa4a34c,_0x75f4ba,_0x12ff7f,_0x670346)=>{const _0x3a553c=_0x361ff7;for(var _0x40cfa9=_0x670346>0x1?void 0x0:_0x670346?K(_0x75f4ba,_0x12ff7f):_0x75f4ba,_0x2dd1f0=_0xa4a34c[_0x3a553c(0x11d)]-0x1,_0x1d9674;_0x2dd1f0>=0x0;_0x2dd1f0--)(_0x1d9674=_0xa4a34c[_0x2dd1f0])&&(_0x40cfa9=_0x1d9674(_0x40cfa9)||_0x40cfa9);return _0x40cfa9;},p=(_0x17e6e4,_0xe04232)=>(_0x3b1e38,_0x2bf4bf)=>_0xe04232(_0x3b1e38,_0x2bf4bf,_0x17e6e4);function _0x2b3d(_0x38e0cb,_0x3d6b74){const _0x1ab131=_0x1ab1();return _0x2b3d=function(_0x2b3d77,_0x2ed7e1){_0x2b3d77=_0x2b3d77-0x119;let _0x3962fd=_0x1ab131[_0x2b3d77];return _0x3962fd;},_0x2b3d(_0x38e0cb,_0x3d6b74);}let S=class extends _0xaf25f7{constructor(_0x32a74d,_0x4cbcd9,_0x5edc86,_0x298108){const _0x37a336=_0x361ff7;super(),this[_0x37a336(0x122)]=_0x32a74d,this[_0x37a336(0x147)]=_0x4cbcd9,this[_0x37a336(0x165)]=_0x5edc86,this[_0x37a336(0x128)]=_0x298108,this[_0x37a336(0x168)](),this[_0x37a336(0x140)]();}[_0x361ff7(0x140)](){const _0x104cbb=_0x361ff7;this[_0x104cbb(0x120)](this[_0x104cbb(0x147)][_0x104cbb(0x15a)][_0x104cbb(0x14d)](_0x2c3f39(0x10))['subscribe'](_0xb9ee1f=>{const _0x3c7d97=_0x104cbb,_0x29ed2e=new Set();_0xb9ee1f[_0x3c7d97(0x136)](_0x53b36e=>{const _0x38de08=_0x3c7d97;switch(_0x53b36e[_0x38de08(0x172)]){case _0x38de08(0x14c):{const _0x9c8192=_0x53b36e[_0x38de08(0x16d)]['personId'];_0x29ed2e[_0x38de08(0x14c)](_0x9c8192);break;}}}),B(this[_0x3c7d97(0x128)],_0x29ed2e);}));}['_init'](){const _0x51ac85=_0x361ff7;this[_0x51ac85(0x120)](this[_0x51ac85(0x122)][_0x51ac85(0x15a)][_0x51ac85(0x163)](async _0x17de44=>{const _0x358862=_0x51ac85;var _0x1a5e8a,_0xb4a3a9,_0x333f70,_0x538181;const _0x36a951=(_0x1a5e8a=this[_0x358862(0x147)]['getUnit'](_0x17de44[_0x358862(0x142)])[_0x358862(0x170)](_0x451c5e=>_0x451c5e['threadId']===_0x17de44['threadId']))==null?void 0x0:_0x1a5e8a['root'];if(!_0x36a951)return;const {unitId:_0x4004bd,subUnitId:_0x17d3bf}=_0x36a951;switch(_0x17de44[_0x358862(0x12a)]&&this[_0x358862(0x165)][_0x358862(0x130)](_0x17de44[_0x358862(0x12a)]),_0x17de44['type']){case v['Add']:break;case v[_0x358862(0x180)]:{this[_0x358862(0x147)][_0x358862(0x153)](_0x4004bd,_0x17d3bf,{'unitId':_0x4004bd,'subUnitId':_0x17d3bf,'ref':'','id':_0x17de44[_0x358862(0x17c)],'dT':D(+_0x17de44[_0x358862(0x138)]),'threadId':_0x17de44['threadId'],'personId':(_0x333f70=(_0xb4a3a9=_0x17de44[_0x358862(0x12a)])==null?void 0x0:_0xb4a3a9['userID'])!=null?_0x333f70:_0x17de44[_0x358862(0x146)],'text':JSON[_0x358862(0x177)](_0x17de44[_0x358862(0x135)]),'parentId':_0x36a951['id']});break;}case v[_0x358862(0x17b)]:{const _0x594598=this[_0x358862(0x147)]['getComment'](_0x4004bd,_0x17d3bf,_0x17de44['replyId']);_0x594598&&_0x594598[_0x358862(0x13c)]&&this[_0x358862(0x147)][_0x358862(0x14e)](_0x4004bd,_0x17d3bf,_0x17de44[_0x358862(0x17c)]);break;}case v[_0x358862(0x16b)]:{this['_threadCommentModel']['updateComment'](_0x4004bd,_0x17d3bf,{'commentId':_0x17de44[_0x358862(0x17c)],'text':JSON[_0x358862(0x177)](_0x17de44['content'])});break;}case v[_0x358862(0x12d)]:{const _0x5adef5=(_0x538181=this[_0x358862(0x147)][_0x358862(0x141)](_0x17de44['unitId'])[_0x358862(0x170)](_0x523fc8=>_0x523fc8[_0x358862(0x145)]===_0x17de44[_0x358862(0x145)]))==null?void 0x0:_0x538181[_0x358862(0x134)];_0x5adef5&&this[_0x358862(0x147)]['resolveComment'](_0x4004bd,_0x17d3bf,_0x5adef5['id'],_0x17de44[_0x358862(0x173)]===I[_0x358862(0x12e)]);break;}}}));}};S=V([p(0x0,_0x4c9cd9(_0x550980)),p(0x1,_0x4c9cd9(_0x51ac0f)),p(0x2,_0x4c9cd9(_0x230923)),p(0x3,_0x4c9cd9(_0x1592aa))],S);const z=_0x361ff7(0x154),M={};function _0x1ab1(){const _0xb90c2c=['Solved','dataSource','addUser','replies','ref','getMemberID','root','content','forEach','setConfig','createTimestamp','_initDataSource','YYYY/MM/DD\x20HH:mm','delete','parentId','1861005ZxZnHv','rangeId','Add','_initUserSync','getUnit','unitId','UNIVER_UNKNOWN','2834496hEMLOf','threadId','userId','_threadCommentModel','userID','_configService','comment','/reply','add','pipe','deleteComment','85830ovYLdY','/delete','_sessionService','filter','addComment','thread-comment-data-source.config','reply','defineProperty','resolveComment','symbol','code','commentUpdate$','OpenOrReOpen','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/edit','post','comments','/list','_threadCommentDataSource','stringify','subscribe','UNRECOGNIZED','_userService','_config','_threadCommentDataSourceService','_init','/universer-api/comment/unit/','requireSession','Edit','format','payload','getUser','COMMENT','find','pluginName','type','solved','syncUpdateMutationToColla','Unknown','get','parse','4UTFVrR','onReady','71048JiKkRL','Delete','replyId','listComments','customRanges','getCurrentUser','Reply','map','body','/solved','users','1368642uIDPiw','length','rangeType','_httpService','disposeWithMe','getOwnPropertyDescriptor','_commentService','987741EYoUbe','error','size','351RRFTME','2233763tTHEqj','_injector','slice','user','/universer-api/user/list','/add','Solve'];_0x1ab1=function(){return _0xb90c2c;};return _0x1ab1();}var k=Object[_0x361ff7(0x121)],Q=(_0x1ff86c,_0xb0fb5f,_0x169f2a,_0x24bf4b)=>{for(var _0x18079d=_0x24bf4b>0x1?void 0x0:_0x24bf4b?k(_0xb0fb5f,_0x169f2a):_0xb0fb5f,_0x3e9778=_0x1ff86c['length']-0x1,_0x49cef4;_0x3e9778>=0x0;_0x3e9778--)(_0x49cef4=_0x1ff86c[_0x3e9778])&&(_0x18079d=_0x49cef4(_0x18079d)||_0x18079d);return _0x18079d;},_=(_0x596ad6,_0x449f02)=>(_0x310cd7,_0x4cf512)=>_0x449f02(_0x310cd7,_0x4cf512,_0x596ad6);function X(_0x598a7f,_0x3e3b3c){const _0x60820d=_0x361ff7,_0x21b693=_0x598a7f[_0x60820d(0x131)][0x0];return{..._0x3e3b3c,'id':_0x21b693[_0x60820d(0x17c)],'resolved':_0x598a7f[_0x60820d(0x173)]===0x1,'dT':D(_0x21b693[_0x60820d(0x138)]),'personId':_0x21b693[_0x60820d(0x146)],'threadId':_0x21b693['threadId']};}function ee(_0x4b1d5b,_0x3502d3,_0x151f3c){const _0x13ff7d=_0x361ff7;var _0x17a31a,_0x1f24dc;if(((_0x1f24dc=(_0x17a31a=_0x4b1d5b==null?void 0x0:_0x4b1d5b['replies'])==null?void 0x0:_0x17a31a[_0x13ff7d(0x11d)])!=null?_0x1f24dc:0x0)>0x0){const _0x33940f=(_0x219e26,_0x1c170f)=>({'id':_0x219e26[_0x13ff7d(0x17c)],'threadId':_0x219e26[_0x13ff7d(0x145)],'dT':D(_0x219e26[_0x13ff7d(0x138)]),'personId':_0x219e26[_0x13ff7d(0x146)],'resolved':_0x4b1d5b['solved']===I[_0x13ff7d(0x12e)],'unitId':_0x3502d3,'subUnitId':_0x151f3c,'text':JSON[_0x13ff7d(0x177)](_0x219e26['content']),'parentId':_0x1c170f}),_0x3dbeb8=_0x33940f(_0x4b1d5b[_0x13ff7d(0x131)][0x0]);return{..._0x3dbeb8,'children':_0x4b1d5b[_0x13ff7d(0x131)][_0x13ff7d(0x129)](0x1)['map'](_0xcaab3e=>_0x33940f(_0xcaab3e,_0x3dbeb8['id']))};}return null;}let f=class{constructor(_0x36b86b,_0x59304f,_0x102033,_0x55d464){const _0x5ae170=_0x361ff7;this['_httpService']=_0x36b86b,this[_0x5ae170(0x165)]=_0x59304f,this[_0x5ae170(0x151)]=_0x102033,this['_injector']=_0x55d464;}async['addComment'](_0x4f94bc){const _0x2c7dd2=_0x361ff7;var _0x2a0c30,_0x22d5e2;const {parentId:_0x520163,unitId:_0x5d1eb2,text:_0xfbc3db,threadId:_0x1ea3ab}=_0x4f94bc,_0xd6ae0c=(_0x22d5e2=(_0x2a0c30=_0xfbc3db[_0x2c7dd2(0x17e)])==null?void 0x0:_0x2a0c30[_0x2c7dd2(0x152)](_0x5e0a86=>_0x5e0a86[_0x2c7dd2(0x11e)]===_0x32fdec[_0x2c7dd2(0x16f)])[_0x2c7dd2(0x181)](_0x1eb04a=>_0x1eb04a[_0x2c7dd2(0x13e)]))!=null?_0x22d5e2:[],_0x1a3539=JSON[_0x2c7dd2(0x162)](_0xfbc3db),_0x573dac=(await this['_sessionService'][_0x2c7dd2(0x16a)](_0x5d1eb2))[_0x2c7dd2(0x133)]();if(_0x520163){const _0x440989={'memberId':_0x573dac,'unitId':_0x5d1eb2,'content':_0x1a3539,'mention':_0xd6ae0c,'threadId':_0x1ea3ab},_0x1d3075=(await this[_0x2c7dd2(0x11f)][_0x2c7dd2(0x15e)](_0x2c7dd2(0x169)+_0x5d1eb2+_0x2c7dd2(0x14b),{'body':_0x440989}))[_0x2c7dd2(0x119)][_0x2c7dd2(0x155)];return{..._0x4f94bc,'id':_0x1d3075['replyId'],'dT':_0x453ba2(+_0x1d3075[_0x2c7dd2(0x138)])[_0x2c7dd2(0x16c)](_0x2c7dd2(0x13a)),'personId':_0x1d3075['userId']};}else{const _0x4bb6ce={'memberId':_0x573dac,'unitId':_0x5d1eb2,'content':_0x1a3539,'mention':_0xd6ae0c},_0x175faa=await this[_0x2c7dd2(0x11f)][_0x2c7dd2(0x15e)](_0x2c7dd2(0x169)+_0x5d1eb2+_0x2c7dd2(0x12c),{'body':_0x4bb6ce});return X(_0x175faa[_0x2c7dd2(0x119)][_0x2c7dd2(0x14a)],_0x4f94bc);}}async['updateComment'](_0x205399){const _0x481f7b=_0x361ff7;var _0x41e766,_0x227547;const {text:_0x2d957f,unitId:_0x24ce9d}=_0x205399,_0x1dddaa=(_0x227547=(_0x41e766=_0x2d957f['customRanges'])==null?void 0x0:_0x41e766[_0x481f7b(0x152)](_0x523bdc=>_0x523bdc[_0x481f7b(0x11e)]===_0x32fdec['COMMENT'])[_0x481f7b(0x181)](_0x5e718e=>_0x5e718e['rangeId']))!=null?_0x227547:[],_0x4d5791=JSON[_0x481f7b(0x162)](_0x2d957f),_0x5aa590=_0x205399['threadId'],_0x3136b7=_0x205399['id'],_0x1eb828={'memberId':(await this[_0x481f7b(0x151)][_0x481f7b(0x16a)](_0x24ce9d))[_0x481f7b(0x133)](),'unitId':_0x24ce9d,'threadId':_0x5aa590,'mention':_0x1dddaa,'content':_0x4d5791,'replyId':_0x3136b7},_0x2d4a77=await this[_0x481f7b(0x11f)][_0x481f7b(0x15e)](_0x481f7b(0x169)+_0x24ce9d+_0x481f7b(0x15d),{'body':_0x1eb828});return!_0x2d4a77[_0x481f7b(0x119)][_0x481f7b(0x124)]||_0x2d4a77['body'][_0x481f7b(0x124)]['code']===0x1;}async[_0x361ff7(0x157)](_0x32702d){const _0x8b7020=_0x361ff7,{unitId:_0x2517f5}=_0x32702d,_0x3b236e=_0x32702d[_0x8b7020(0x145)],_0x297efb={'memberId':this[_0x8b7020(0x165)][_0x8b7020(0x17f)]()[_0x8b7020(0x148)],'unitId':_0x2517f5,'threadId':_0x3b236e,'solved':_0x32702d['resolved']?I['Solved']:I[_0x8b7020(0x15b)]},_0xfafc82=await this[_0x8b7020(0x11f)][_0x8b7020(0x15e)](_0x8b7020(0x169)+_0x2517f5+_0x8b7020(0x11a),{'body':_0x297efb});return!_0xfafc82[_0x8b7020(0x119)][_0x8b7020(0x124)]||_0xfafc82['body'][_0x8b7020(0x124)][_0x8b7020(0x159)]===0x1;}async[_0x361ff7(0x14e)](_0x188e6e,_0x3c74ec,_0x378f98,_0x34705b){const _0x24a3f9=_0x361ff7,_0x408ad2={'memberId':(await this[_0x24a3f9(0x151)]['requireSession'](_0x188e6e))[_0x24a3f9(0x133)](),'threadId':_0x378f98,'replyId':_0x34705b,'unitId':_0x188e6e},_0x4eb936=await this[_0x24a3f9(0x11f)][_0x24a3f9(0x15e)]('/universer-api/comment/unit/'+_0x188e6e+_0x24a3f9(0x150),{'body':_0x408ad2});return!_0x4eb936['body']['error']||_0x4eb936[_0x24a3f9(0x119)][_0x24a3f9(0x124)][_0x24a3f9(0x159)]===0x1;}async[_0x361ff7(0x17d)](_0x3c84ba,_0x354e92,_0x58b9f1){const _0x50371b=_0x361ff7,_0x5c3e62={'unitId':_0x3c84ba,'threadId':_0x58b9f1},_0x7f5e91=await this['_httpService'][_0x50371b(0x15e)](_0x50371b(0x169)+_0x3c84ba+_0x50371b(0x160),{'body':_0x5c3e62}),_0x204345=_0x58b9f1[_0x50371b(0x181)](_0x23e6aa=>ee(_0x7f5e91[_0x50371b(0x119)][_0x50371b(0x15f)][_0x23e6aa],_0x3c84ba,_0x354e92))[_0x50371b(0x152)](Boolean);return Object['values'](_0x7f5e91['body'][_0x50371b(0x11b)])[_0x50371b(0x136)](_0x2e7ccf=>{const _0x2486c8=_0x50371b;this['_userService'][_0x2486c8(0x130)](_0x2e7ccf);}),_0x204345;}['saveCommentToSnapshot'](_0x209869){const _0x193b09=_0x361ff7;return{'id':_0x209869['id'],'threadId':_0x209869[_0x193b09(0x145)],'ref':_0x209869[_0x193b09(0x132)]};}};f=Q([_(0x0,_0x4c9cd9(_0x13c39a)),_(0x1,_0x4c9cd9(_0x230923)),_(0x2,_0x4c9cd9(_0xed4b95)),_(0x3,_0x4c9cd9(_0x1592aa))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x162788,_0x3318da,_0x11107e,_0x4af0d8)=>{for(var _0x35984d=_0x4af0d8>0x1?void 0x0:_0x4af0d8?re(_0x3318da,_0x11107e):_0x3318da,_0x5085f8=_0x162788['length']-0x1,_0x9e599c;_0x5085f8>=0x0;_0x5085f8--)(_0x9e599c=_0x162788[_0x5085f8])&&(_0x35984d=_0x9e599c(_0x35984d)||_0x35984d);return _0x35984d;},N=(_0x49076c,_0x4333b2)=>(_0xab9dd3,_0x1b4a13)=>_0x4333b2(_0xab9dd3,_0x1b4a13,_0x49076c);let g=class extends _0xaf25f7{constructor(_0x1dca2e,_0x23297d){const _0x43b1e2=_0x361ff7;super(),this[_0x43b1e2(0x167)]=_0x1dca2e,this[_0x43b1e2(0x161)]=_0x23297d,this[_0x43b1e2(0x139)]();}[_0x361ff7(0x139)](){const _0x322152=_0x361ff7;this[_0x322152(0x167)][_0x322152(0x12f)]=this[_0x322152(0x161)],this['_threadCommentDataSourceService'][_0x322152(0x174)]=!0x1;}};g=te([N(0x0,_0x38d4a8),N(0x1,_0x4c9cd9(f))],g);var se=Object[_0x361ff7(0x156)],oe=Object[_0x361ff7(0x121)],ne=(_0xc6012a,_0x2e4070,_0xf4e055)=>_0x2e4070 in _0xc6012a?se(_0xc6012a,_0x2e4070,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf4e055}):_0xc6012a[_0x2e4070]=_0xf4e055,ie=(_0xf60cff,_0x19f739,_0x4b71c0,_0x46ad65)=>{const _0x1a8c32=_0x361ff7;for(var _0x442c0e=_0x46ad65>0x1?void 0x0:_0x46ad65?oe(_0x19f739,_0x4b71c0):_0x19f739,_0x950c48=_0xf60cff[_0x1a8c32(0x11d)]-0x1,_0x5485e2;_0x950c48>=0x0;_0x950c48--)(_0x5485e2=_0xf60cff[_0x950c48])&&(_0x442c0e=_0x5485e2(_0x442c0e)||_0x442c0e);return _0x442c0e;},w=(_0x48d74e,_0x332cbe)=>(_0x16fb5f,_0x2a157f)=>_0x332cbe(_0x16fb5f,_0x2a157f,_0x48d74e),$=(_0x2158cb,_0x58cdbc,_0x174bac)=>ne(_0x2158cb,typeof _0x58cdbc!=_0x361ff7(0x158)?_0x58cdbc+'':_0x58cdbc,_0x174bac);let b=class extends _0x375e34{constructor(_0x5d6040=M,_0x30b201,_0x161b3a){const _0x316b89=_0x361ff7;super(),this['_config']=_0x5d6040,this['_injector']=_0x30b201,this[_0x316b89(0x149)]=_0x161b3a;const {..._0x45947b}=_0x3bd94e({},M,this[_0x316b89(0x166)]);this['_configService'][_0x316b89(0x137)](z,_0x45947b);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x3ee509=>{const _0x1254ce=_0x2b3d;this[_0x1254ce(0x128)][_0x1254ce(0x14c)](_0x3ee509);});}[_0x361ff7(0x179)](){const _0x338fb9=_0x361ff7;this[_0x338fb9(0x128)]['get'](g),this[_0x338fb9(0x128)][_0x338fb9(0x176)](S);}};$(b,_0x361ff7(0x171),W),$(b,_0x361ff7(0x172),_0x5015d6[_0x361ff7(0x143)]),b=ie([_0x434b14(_0x4bca2b,_0x1f4157,_0x50fae2),w(0x1,_0x4c9cd9(_0x1592aa)),w(0x2,_0x2808c2)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x297170=_0x31ac;(function(_0xc07465,_0x3389ea){const _0x20f3da=_0x31ac,_0x426425=_0xc07465();while(!![]){try{const _0x8681e=parseInt(_0x20f3da(0x107))/0x1*(parseInt(_0x20f3da(0x11f))/0x2)+parseInt(_0x20f3da(0x14a))/0x3*(parseInt(_0x20f3da(0x11e))/0x4)+-parseInt(_0x20f3da(0x135))/0x5*(parseInt(_0x20f3da(0x101))/0x6)+-parseInt(_0x20f3da(0x157))/0x7+-parseInt(_0x20f3da(0x11b))/0x8+-parseInt(_0x20f3da(0x129))/0x9+parseInt(_0x20f3da(0xfd))/0xa;if(_0x8681e===_0x3389ea)break;else _0x426425['push'](_0x426425['shift']());}catch(_0x15324e){_0x426425['push'](_0x426425['shift']());}}}(_0x8653,0x428f0));import{CommentService as _0x402890,CollaborationSessionService as _0x288d12,UniverCollaborationClientPlugin as _0x32f6c5}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3729ac}from'@univerjs-pro/license';import{dayjs as _0x14c484,UserManagerService as _0x95a105,Inject as _0x3ff32b,Injector as _0x47bae4,Disposable as _0x5963a4,CustomRangeType as _0x9ed84b,UniverInstanceType as _0x2678d6,DependentOn as _0x557d35,IConfigService as _0x309048,Plugin as _0x341216,merge as _0x2c3e44}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x16c7d9}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x47dbdb,IThreadCommentDataSourceService as _0x373199}from'@univerjs/thread-comment';import{bufferTime as _0x2cb961}from'rxjs';import{HTTPService as _0x48d5dd}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3518fa=>(_0x3518fa[_0x3518fa[_0x297170(0x106)]=0x0]=_0x297170(0x106),_0x3518fa[_0x3518fa[_0x297170(0x110)]=0x1]=_0x297170(0x110),_0x3518fa[_0x3518fa[_0x297170(0x134)]=-0x1]=_0x297170(0x134),_0x3518fa))(I||{}),v=(_0x5883e3=>(_0x5883e3[_0x5883e3[_0x297170(0x158)]=0x0]='Unknown',_0x5883e3[_0x5883e3['Add']=0x1]='Add',_0x5883e3[_0x5883e3[_0x297170(0x144)]=0x2]='Reply',_0x5883e3[_0x5883e3[_0x297170(0x124)]=0x3]=_0x297170(0x124),_0x5883e3[_0x5883e3['Delete']=0x4]='Delete',_0x5883e3[_0x5883e3[_0x297170(0x12c)]=0x5]='Solve',_0x5883e3[_0x5883e3[_0x297170(0x134)]=-0x1]='UNRECOGNIZED',_0x5883e3))(v||{});const D=_0x7b9742=>_0x14c484(new Date(+_0x7b9742))[_0x297170(0x156)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x1a4b51,_0x3f5962)=>{const _0x39f0cb=_0x297170,_0x4cb4c2=_0x1a4b51[_0x39f0cb(0x12d)](_0x95a105),_0x30f6f9=_0x1a4b51[_0x39f0cb(0x12d)](_0x48d5dd);_0x3f5962[_0x39f0cb(0x13a)](_0x21e445=>{const _0x17298d=_0x39f0cb;_0x4cb4c2[_0x17298d(0xfa)](_0x21e445)&&_0x3f5962[_0x17298d(0x100)](_0x21e445);}),_0x3f5962[_0x39f0cb(0x126)]&&(await _0x30f6f9[_0x39f0cb(0x12d)](_0x39f0cb(0x10c),{'params':{'userIDs':[..._0x3f5962]}}))['body'][_0x39f0cb(0x108)]['forEach'](_0x4b56e7=>{const _0x406ffb=_0x39f0cb;_0x4b56e7&&_0x4cb4c2[_0x406ffb(0x10b)](_0x4b56e7);});};var K=Object[_0x297170(0x141)],V=(_0xc97fb3,_0x126c51,_0x1e6d93,_0x3c4003)=>{const _0x3de073=_0x297170;for(var _0x4fea08=_0x3c4003>0x1?void 0x0:_0x3c4003?K(_0x126c51,_0x1e6d93):_0x126c51,_0x1e3d37=_0xc97fb3[_0x3de073(0x121)]-0x1,_0x461261;_0x1e3d37>=0x0;_0x1e3d37--)(_0x461261=_0xc97fb3[_0x1e3d37])&&(_0x4fea08=_0x461261(_0x4fea08)||_0x4fea08);return _0x4fea08;},p=(_0x31e203,_0x3d4932)=>(_0x3e528a,_0xf3a76)=>_0x3d4932(_0x3e528a,_0xf3a76,_0x31e203);let S=class extends _0x5963a4{constructor(_0x16e23e,_0x34eca4,_0x407fbd,_0x3c0d92){const _0x44c808=_0x297170;super(),this[_0x44c808(0x13e)]=_0x16e23e,this['_threadCommentModel']=_0x34eca4,this[_0x44c808(0x12a)]=_0x407fbd,this[_0x44c808(0x10a)]=_0x3c0d92,this[_0x44c808(0x13d)](),this[_0x44c808(0x133)]();}['_initUserSync'](){const _0x20d196=_0x297170;this['disposeWithMe'](this[_0x20d196(0x120)][_0x20d196(0x109)]['pipe'](_0x2cb961(0x10))[_0x20d196(0x131)](_0x147f5c=>{const _0x4e198f=_0x20d196,_0x56af3c=new Set();_0x147f5c[_0x4e198f(0x13a)](_0x47d622=>{const _0x4cc4a3=_0x4e198f;switch(_0x47d622[_0x4cc4a3(0x13c)]){case _0x4cc4a3(0x116):{const _0x16a166=_0x47d622[_0x4cc4a3(0x122)]['personId'];_0x56af3c['add'](_0x16a166);break;}}}),B(this[_0x4e198f(0x10a)],_0x56af3c);}));}[_0x297170(0x13d)](){const _0xbcc2b0=_0x297170;this[_0xbcc2b0(0x111)](this[_0xbcc2b0(0x13e)]['commentUpdate$'][_0xbcc2b0(0x131)](async _0x463f1e=>{const _0x3c1d79=_0xbcc2b0;var _0x1a0523,_0x5d5bf3,_0x1399e1,_0x4f4acd;const _0x3c71a8=(_0x1a0523=this[_0x3c1d79(0x120)][_0x3c1d79(0x140)](_0x463f1e[_0x3c1d79(0x10f)])[_0x3c1d79(0x154)](_0x4d2534=>_0x4d2534[_0x3c1d79(0x11d)]===_0x463f1e[_0x3c1d79(0x11d)]))==null?void 0x0:_0x1a0523['root'];if(!_0x3c71a8)return;const {unitId:_0x167d17,subUnitId:_0x1197a4}=_0x3c71a8;switch(_0x463f1e[_0x3c1d79(0x142)]&&this[_0x3c1d79(0x12a)][_0x3c1d79(0x10b)](_0x463f1e['user']),_0x463f1e[_0x3c1d79(0x13c)]){case v[_0x3c1d79(0x132)]:break;case v[_0x3c1d79(0x144)]:{this[_0x3c1d79(0x120)][_0x3c1d79(0x127)](_0x167d17,_0x1197a4,{'unitId':_0x167d17,'subUnitId':_0x1197a4,'ref':'','id':_0x463f1e[_0x3c1d79(0x136)],'dT':D(+_0x463f1e[_0x3c1d79(0x14e)]),'threadId':_0x463f1e['threadId'],'personId':(_0x1399e1=(_0x5d5bf3=_0x463f1e['user'])==null?void 0x0:_0x5d5bf3['userID'])!=null?_0x1399e1:_0x463f1e[_0x3c1d79(0x12f)],'text':JSON[_0x3c1d79(0x125)](_0x463f1e[_0x3c1d79(0x114)]),'parentId':_0x3c71a8['id']});break;}case v['Delete']:{const _0x3d558f=this[_0x3c1d79(0x120)][_0x3c1d79(0x14d)](_0x167d17,_0x1197a4,_0x463f1e[_0x3c1d79(0x136)]);_0x3d558f&&_0x3d558f['parentId']&&this['_threadCommentModel'][_0x3c1d79(0x137)](_0x167d17,_0x1197a4,_0x463f1e[_0x3c1d79(0x136)]);break;}case v[_0x3c1d79(0x124)]:{this['_threadCommentModel'][_0x3c1d79(0x138)](_0x167d17,_0x1197a4,{'commentId':_0x463f1e[_0x3c1d79(0x136)],'text':JSON[_0x3c1d79(0x125)](_0x463f1e[_0x3c1d79(0x114)])});break;}case v['Solve']:{const _0x437ec6=(_0x4f4acd=this[_0x3c1d79(0x120)]['getUnit'](_0x463f1e[_0x3c1d79(0x10f)])[_0x3c1d79(0x154)](_0x1a2b04=>_0x1a2b04['threadId']===_0x463f1e[_0x3c1d79(0x11d)]))==null?void 0x0:_0x4f4acd[_0x3c1d79(0x14b)];_0x437ec6&&this[_0x3c1d79(0x120)][_0x3c1d79(0xfe)](_0x167d17,_0x1197a4,_0x437ec6['id'],_0x463f1e[_0x3c1d79(0x103)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x3ff32b(_0x402890)),p(0x1,_0x3ff32b(_0x47dbdb)),p(0x2,_0x3ff32b(_0x95a105)),p(0x3,_0x3ff32b(_0x47bae4))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x28ff8a,_0x2fb894,_0x495986,_0x362829)=>{const _0x1b199c=_0x297170;for(var _0x8f0b6d=_0x362829>0x1?void 0x0:_0x362829?k(_0x2fb894,_0x495986):_0x2fb894,_0x1af1d5=_0x28ff8a[_0x1b199c(0x121)]-0x1,_0x37cbc0;_0x1af1d5>=0x0;_0x1af1d5--)(_0x37cbc0=_0x28ff8a[_0x1af1d5])&&(_0x8f0b6d=_0x37cbc0(_0x8f0b6d)||_0x8f0b6d);return _0x8f0b6d;},_=(_0x12b65c,_0x1c7902)=>(_0x5ed37e,_0x2fed6d)=>_0x1c7902(_0x5ed37e,_0x2fed6d,_0x12b65c);function X(_0x3184ff,_0x2d6b4b){const _0xcaa39=_0x297170,_0x1d5c88=_0x3184ff[_0xcaa39(0xfb)][0x0];return{..._0x2d6b4b,'id':_0x1d5c88['replyId'],'resolved':_0x3184ff['solved']===0x1,'dT':D(_0x1d5c88[_0xcaa39(0x14e)]),'personId':_0x1d5c88[_0xcaa39(0x12f)],'threadId':_0x1d5c88[_0xcaa39(0x11d)]};}function ee(_0x47b1c7,_0x428aa3,_0x4cd724){const _0x564aae=_0x297170;var _0x2ac0a5,_0x38e522;if(((_0x38e522=(_0x2ac0a5=_0x47b1c7==null?void 0x0:_0x47b1c7[_0x564aae(0xfb)])==null?void 0x0:_0x2ac0a5['length'])!=null?_0x38e522:0x0)>0x0){const _0x2592d3=(_0x562d01,_0x5749f7)=>({'id':_0x562d01['replyId'],'threadId':_0x562d01[_0x564aae(0x11d)],'dT':D(_0x562d01[_0x564aae(0x14e)]),'personId':_0x562d01[_0x564aae(0x12f)],'resolved':_0x47b1c7['solved']===I[_0x564aae(0x110)],'unitId':_0x428aa3,'subUnitId':_0x4cd724,'text':JSON['parse'](_0x562d01[_0x564aae(0x114)]),'parentId':_0x5749f7}),_0x19c2f4=_0x2592d3(_0x47b1c7[_0x564aae(0xfb)][0x0]);return{..._0x19c2f4,'children':_0x47b1c7['replies']['slice'](0x1)['map'](_0x80f21f=>_0x2592d3(_0x80f21f,_0x19c2f4['id']))};}return null;}let f=class{constructor(_0x5557e5,_0x16bf2a,_0x13e01e,_0x455c67){const _0xa36daf=_0x297170;this[_0xa36daf(0x115)]=_0x5557e5,this['_userService']=_0x16bf2a,this[_0xa36daf(0x113)]=_0x13e01e,this[_0xa36daf(0x10a)]=_0x455c67;}async[_0x297170(0x127)](_0x2aa293){const _0x21200b=_0x297170;var _0x41aeb9,_0x3fe16c;const {parentId:_0x291a68,unitId:_0x4a6a21,text:_0x29c4e6,threadId:_0x59e976}=_0x2aa293,_0x3c73e6=(_0x3fe16c=(_0x41aeb9=_0x29c4e6['customRanges'])==null?void 0x0:_0x41aeb9[_0x21200b(0x119)](_0x599dfe=>_0x599dfe['rangeType']===_0x9ed84b['COMMENT'])[_0x21200b(0x150)](_0x4f9cbe=>_0x4f9cbe[_0x21200b(0x149)]))!=null?_0x3fe16c:[],_0x3a927e=JSON[_0x21200b(0x143)](_0x29c4e6),_0x894962=(await this[_0x21200b(0x113)][_0x21200b(0x12e)](_0x4a6a21))[_0x21200b(0x148)]();if(_0x291a68){const _0xf7b59={'memberId':_0x894962,'unitId':_0x4a6a21,'content':_0x3a927e,'mention':_0x3c73e6,'threadId':_0x59e976},_0x336f01=(await this[_0x21200b(0x115)][_0x21200b(0x155)](_0x21200b(0x11a)+_0x4a6a21+'/reply',{'body':_0xf7b59}))[_0x21200b(0x104)]['reply'];return{..._0x2aa293,'id':_0x336f01['replyId'],'dT':_0x14c484(+_0x336f01[_0x21200b(0x14e)])[_0x21200b(0x156)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x336f01[_0x21200b(0x12f)]};}else{const _0x27932b={'memberId':_0x894962,'unitId':_0x4a6a21,'content':_0x3a927e,'mention':_0x3c73e6},_0x52d768=await this[_0x21200b(0x115)][_0x21200b(0x155)](_0x21200b(0x11a)+_0x4a6a21+'/add',{'body':_0x27932b});return X(_0x52d768[_0x21200b(0x104)][_0x21200b(0x14c)],_0x2aa293);}}async['updateComment'](_0x4275a5){const _0x457dc0=_0x297170;var _0x3ee75a,_0x24bdcb;const {text:_0x3e620e,unitId:_0x3e0aef}=_0x4275a5,_0x1e13ba=(_0x24bdcb=(_0x3ee75a=_0x3e620e['customRanges'])==null?void 0x0:_0x3ee75a[_0x457dc0(0x119)](_0x576a6d=>_0x576a6d[_0x457dc0(0x102)]===_0x9ed84b[_0x457dc0(0x130)])[_0x457dc0(0x150)](_0x1a4377=>_0x1a4377[_0x457dc0(0x149)]))!=null?_0x24bdcb:[],_0x1b3d75=JSON['stringify'](_0x3e620e),_0xf2f4e6=_0x4275a5['threadId'],_0x485d71=_0x4275a5['id'],_0x2b4b03={'memberId':(await this[_0x457dc0(0x113)][_0x457dc0(0x12e)](_0x3e0aef))['getMemberID'](),'unitId':_0x3e0aef,'threadId':_0xf2f4e6,'mention':_0x1e13ba,'content':_0x1b3d75,'replyId':_0x485d71},_0x44539d=await this[_0x457dc0(0x115)][_0x457dc0(0x155)]('/universer-api/comment/unit/'+_0x3e0aef+_0x457dc0(0xff),{'body':_0x2b4b03});return!_0x44539d[_0x457dc0(0x104)][_0x457dc0(0x14f)]||_0x44539d['body'][_0x457dc0(0x14f)][_0x457dc0(0x145)]===0x1;}async[_0x297170(0xfe)](_0x4388ea){const _0x4577a2=_0x297170,{unitId:_0x42e453}=_0x4388ea,_0x300be7=_0x4388ea['threadId'],_0x203583={'memberId':this[_0x4577a2(0x12a)][_0x4577a2(0x146)]()[_0x4577a2(0x117)],'unitId':_0x42e453,'threadId':_0x300be7,'solved':_0x4388ea[_0x4577a2(0x152)]?I[_0x4577a2(0x110)]:I[_0x4577a2(0x106)]},_0xd88d6=await this['_httpService']['post'](_0x4577a2(0x11a)+_0x42e453+'/solved',{'body':_0x203583});return!_0xd88d6[_0x4577a2(0x104)][_0x4577a2(0x14f)]||_0xd88d6[_0x4577a2(0x104)][_0x4577a2(0x14f)][_0x4577a2(0x145)]===0x1;}async['deleteComment'](_0x3fd85c,_0x18fefd,_0x489806,_0x15076b){const _0xa9eea6=_0x297170,_0x631d8c={'memberId':(await this['_sessionService'][_0xa9eea6(0x12e)](_0x3fd85c))[_0xa9eea6(0x148)](),'threadId':_0x489806,'replyId':_0x15076b,'unitId':_0x3fd85c},_0x5620b2=await this[_0xa9eea6(0x115)][_0xa9eea6(0x155)](_0xa9eea6(0x11a)+_0x3fd85c+_0xa9eea6(0x118),{'body':_0x631d8c});return!_0x5620b2[_0xa9eea6(0x104)][_0xa9eea6(0x14f)]||_0x5620b2[_0xa9eea6(0x104)][_0xa9eea6(0x14f)][_0xa9eea6(0x145)]===0x1;}async[_0x297170(0x10d)](_0x1bb5dc,_0x47b91c,_0x31be4b){const _0x21c9f4=_0x297170,_0x203d0b={'unitId':_0x1bb5dc,'threadId':_0x31be4b},_0x347204=await this['_httpService'][_0x21c9f4(0x155)](_0x21c9f4(0x11a)+_0x1bb5dc+'/list',{'body':_0x203d0b}),_0x3175fa=_0x31be4b[_0x21c9f4(0x150)](_0x21ef01=>ee(_0x347204['body'][_0x21c9f4(0x13b)][_0x21ef01],_0x1bb5dc,_0x47b91c))['filter'](Boolean);return Object[_0x21c9f4(0x10e)](_0x347204[_0x21c9f4(0x104)]['users'])[_0x21c9f4(0x13a)](_0x2e2be9=>{const _0x552646=_0x21c9f4;this[_0x552646(0x12a)][_0x552646(0x10b)](_0x2e2be9);}),_0x3175fa;}[_0x297170(0x147)](_0xc5e6f9){const _0x337170=_0x297170;return{'id':_0xc5e6f9['id'],'threadId':_0xc5e6f9['threadId'],'ref':_0xc5e6f9[_0x337170(0x13f)]};}};f=Q([_(0x0,_0x3ff32b(_0x48d5dd)),_(0x1,_0x3ff32b(_0x95a105)),_(0x2,_0x3ff32b(_0x288d12)),_(0x3,_0x3ff32b(_0x47bae4))],f);var re=Object[_0x297170(0x141)],te=(_0x457479,_0x5bc6ad,_0x3da56e,_0x377ae9)=>{for(var _0x5eb2a8=_0x377ae9>0x1?void 0x0:_0x377ae9?re(_0x5bc6ad,_0x3da56e):_0x5bc6ad,_0x39e7d9=_0x457479['length']-0x1,_0x2c78cc;_0x39e7d9>=0x0;_0x39e7d9--)(_0x2c78cc=_0x457479[_0x39e7d9])&&(_0x5eb2a8=_0x2c78cc(_0x5eb2a8)||_0x5eb2a8);return _0x5eb2a8;},N=(_0x5e6060,_0x3d014b)=>(_0x2a4acf,_0x199fdd)=>_0x3d014b(_0x2a4acf,_0x199fdd,_0x5e6060);function _0x8653(){const _0x28528e=['Add','_initUserSync','UNRECOGNIZED','5DiDFMz','replyId','deleteComment','updateComment','_threadCommentDataSourceService','forEach','comments','type','_init','_commentService','ref','getUnit','getOwnPropertyDescriptor','user','stringify','Reply','code','getCurrentUser','saveCommentToSnapshot','getMemberID','rangeId','3eTCogY','root','comment','getComment','createTimestamp','error','map','dataSource','resolved','_threadCommentDataSource','find','post','format','172333QGzNtl','Unknown','getUser','replies','pluginName','1220970MdGIXG','resolveComment','/edit','delete','1711902WgvgCy','rangeType','solved','body','onStarting','OpenOrReOpen','103NmfUIF','users','commentUpdate$','_injector','addUser','/universer-api/user/list','listComments','values','unitId','Solved','disposeWithMe','_config','_sessionService','content','_httpService','add','userID','/delete','filter','/universer-api/comment/unit/','2354984vEiZUJ','syncUpdateMutationToColla','threadId','1617556yvFYPg','8198OXsyWT','_threadCommentModel','length','payload','onReady','Edit','parse','size','addComment','_configService','645750vyYLTg','_userService','setConfig','Solve','get','requireSession','userId','COMMENT','subscribe'];_0x8653=function(){return _0x28528e;};return _0x8653();}let g=class extends _0x5963a4{constructor(_0x33c47a,_0x49917b){const _0x5c615a=_0x297170;super(),this[_0x5c615a(0x139)]=_0x33c47a,this[_0x5c615a(0x153)]=_0x49917b,this['_initDataSource']();}['_initDataSource'](){const _0xc9355f=_0x297170;this[_0xc9355f(0x139)][_0xc9355f(0x151)]=this[_0xc9355f(0x153)],this['_threadCommentDataSourceService'][_0xc9355f(0x11c)]=!0x1;}};function _0x31ac(_0x497322,_0x50a33){const _0x865386=_0x8653();return _0x31ac=function(_0x31ac2d,_0xb9e28f){_0x31ac2d=_0x31ac2d-0xfa;let _0x162a10=_0x865386[_0x31ac2d];return _0x162a10;},_0x31ac(_0x497322,_0x50a33);}g=te([N(0x0,_0x373199),N(0x1,_0x3ff32b(f))],g);var se=Object['defineProperty'],oe=Object[_0x297170(0x141)],ne=(_0x1dab4c,_0x139882,_0x41354c)=>_0x139882 in _0x1dab4c?se(_0x1dab4c,_0x139882,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x41354c}):_0x1dab4c[_0x139882]=_0x41354c,ie=(_0x4752d3,_0xf5acd2,_0x5136fb,_0x190eb4)=>{const _0x53a8a4=_0x297170;for(var _0x359ab7=_0x190eb4>0x1?void 0x0:_0x190eb4?oe(_0xf5acd2,_0x5136fb):_0xf5acd2,_0x4fba82=_0x4752d3[_0x53a8a4(0x121)]-0x1,_0x13b13d;_0x4fba82>=0x0;_0x4fba82--)(_0x13b13d=_0x4752d3[_0x4fba82])&&(_0x359ab7=_0x13b13d(_0x359ab7)||_0x359ab7);return _0x359ab7;},w=(_0x48566f,_0x1b73c8)=>(_0x339429,_0x482147)=>_0x1b73c8(_0x339429,_0x482147,_0x48566f),$=(_0x5e0f3e,_0x12d9e5,_0x3bdc21)=>ne(_0x5e0f3e,typeof _0x12d9e5!='symbol'?_0x12d9e5+'':_0x12d9e5,_0x3bdc21);let b=class extends _0x341216{constructor(_0x313507=M,_0x1b58fa,_0x5165ba){const _0x2221f8=_0x297170;super(),this['_config']=_0x313507,this[_0x2221f8(0x10a)]=_0x1b58fa,this[_0x2221f8(0x128)]=_0x5165ba;const {..._0x4384e8}=_0x2c3e44({},M,this[_0x2221f8(0x112)]);this[_0x2221f8(0x128)][_0x2221f8(0x12b)](z,_0x4384e8);}[_0x297170(0x105)](){const _0x5b3bac=_0x297170;[[f],[g],[S]][_0x5b3bac(0x13a)](_0x5b3774=>{const _0x50a89d=_0x5b3bac;this[_0x50a89d(0x10a)][_0x50a89d(0x116)](_0x5b3774);});}[_0x297170(0x123)](){const _0x2c0756=_0x297170;this[_0x2c0756(0x10a)][_0x2c0756(0x12d)](g),this[_0x2c0756(0x10a)]['get'](S);}};$(b,_0x297170(0xfc),W),$(b,_0x297170(0x13c),_0x2678d6['UNIVER_UNKNOWN']),b=ie([_0x557d35(_0x16c7d9,_0x32f6c5,_0x3729ac),w(0x1,_0x3ff32b(_0x47bae4)),w(0x2,_0x309048)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x361ff7=_0x2b3d;(function(_0x3b8dfd,_0x23b7d1){const _0x2726bb=_0x2b3d,_0x2a2d8a=_0x3b8dfd();while(!![]){try{const _0x3bc8a1=-parseInt(_0x2726bb(0x14f))/0x1+parseInt(_0x2726bb(0x11c))/0x2+parseInt(_0x2726bb(0x123))/0x3*(-parseInt(_0x2726bb(0x178))/0x4)+-parseInt(_0x2726bb(0x13d))/0x5+parseInt(_0x2726bb(0x144))/0x6+-parseInt(_0x2726bb(0x127))/0x7+parseInt(_0x2726bb(0x17a))/0x8*(parseInt(_0x2726bb(0x126))/0x9);if(_0x3bc8a1===_0x23b7d1)break;else _0x2a2d8a['push'](_0x2a2d8a['shift']());}catch(_0x16e457){_0x2a2d8a['push'](_0x2a2d8a['shift']());}}}(_0x1ab1,0x60da5));import{CommentService as _0x550980,CollaborationSessionService as _0xed4b95,UniverCollaborationClientPlugin as _0x1f4157}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x50fae2}from'@univerjs-pro/license';import{dayjs as _0x453ba2,UserManagerService as _0x230923,Inject as _0x4c9cd9,Injector as _0x1592aa,Disposable as _0xaf25f7,CustomRangeType as _0x32fdec,UniverInstanceType as _0x5015d6,DependentOn as _0x434b14,IConfigService as _0x2808c2,Plugin as _0x375e34,merge as _0x3bd94e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4bca2b}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x51ac0f,IThreadCommentDataSourceService as _0x38d4a8}from'@univerjs/thread-comment';import{bufferTime as _0x2c3f39}from'rxjs';import{HTTPService as _0x13c39a}from'@univerjs/network';const W=_0x361ff7(0x15c);var I=(_0x43eb89=>(_0x43eb89[_0x43eb89[_0x361ff7(0x15b)]=0x0]=_0x361ff7(0x15b),_0x43eb89[_0x43eb89[_0x361ff7(0x12e)]=0x1]=_0x361ff7(0x12e),_0x43eb89[_0x43eb89[_0x361ff7(0x164)]=-0x1]=_0x361ff7(0x164),_0x43eb89))(I||{}),v=(_0x6d47e4=>(_0x6d47e4[_0x6d47e4['Unknown']=0x0]=_0x361ff7(0x175),_0x6d47e4[_0x6d47e4[_0x361ff7(0x13f)]=0x1]=_0x361ff7(0x13f),_0x6d47e4[_0x6d47e4[_0x361ff7(0x180)]=0x2]=_0x361ff7(0x180),_0x6d47e4[_0x6d47e4[_0x361ff7(0x16b)]=0x3]='Edit',_0x6d47e4[_0x6d47e4[_0x361ff7(0x17b)]=0x4]='Delete',_0x6d47e4[_0x6d47e4[_0x361ff7(0x12d)]=0x5]=_0x361ff7(0x12d),_0x6d47e4[_0x6d47e4[_0x361ff7(0x164)]=-0x1]=_0x361ff7(0x164),_0x6d47e4))(v||{});const D=_0x2ad013=>_0x453ba2(new Date(+_0x2ad013))[_0x361ff7(0x16c)](_0x361ff7(0x13a)),B=async(_0x1bc43e,_0x333760)=>{const _0x37d30e=_0x361ff7,_0x4799ba=_0x1bc43e[_0x37d30e(0x176)](_0x230923),_0x5acad5=_0x1bc43e['get'](_0x13c39a);_0x333760[_0x37d30e(0x136)](_0x25ad47=>{const _0x3ec9dc=_0x37d30e;_0x4799ba[_0x3ec9dc(0x16e)](_0x25ad47)&&_0x333760[_0x3ec9dc(0x13b)](_0x25ad47);}),_0x333760[_0x37d30e(0x125)]&&(await _0x5acad5[_0x37d30e(0x176)](_0x37d30e(0x12b),{'params':{'userIDs':[..._0x333760]}}))[_0x37d30e(0x119)]['users'][_0x37d30e(0x136)](_0xdb7fd5=>{_0xdb7fd5&&_0x4799ba['addUser'](_0xdb7fd5);});};var K=Object[_0x361ff7(0x121)],V=(_0xa4a34c,_0x75f4ba,_0x12ff7f,_0x670346)=>{const _0x3a553c=_0x361ff7;for(var _0x40cfa9=_0x670346>0x1?void 0x0:_0x670346?K(_0x75f4ba,_0x12ff7f):_0x75f4ba,_0x2dd1f0=_0xa4a34c[_0x3a553c(0x11d)]-0x1,_0x1d9674;_0x2dd1f0>=0x0;_0x2dd1f0--)(_0x1d9674=_0xa4a34c[_0x2dd1f0])&&(_0x40cfa9=_0x1d9674(_0x40cfa9)||_0x40cfa9);return _0x40cfa9;},p=(_0x17e6e4,_0xe04232)=>(_0x3b1e38,_0x2bf4bf)=>_0xe04232(_0x3b1e38,_0x2bf4bf,_0x17e6e4);function _0x2b3d(_0x38e0cb,_0x3d6b74){const _0x1ab131=_0x1ab1();return _0x2b3d=function(_0x2b3d77,_0x2ed7e1){_0x2b3d77=_0x2b3d77-0x119;let _0x3962fd=_0x1ab131[_0x2b3d77];return _0x3962fd;},_0x2b3d(_0x38e0cb,_0x3d6b74);}let S=class extends _0xaf25f7{constructor(_0x32a74d,_0x4cbcd9,_0x5edc86,_0x298108){const _0x37a336=_0x361ff7;super(),this[_0x37a336(0x122)]=_0x32a74d,this[_0x37a336(0x147)]=_0x4cbcd9,this[_0x37a336(0x165)]=_0x5edc86,this[_0x37a336(0x128)]=_0x298108,this[_0x37a336(0x168)](),this[_0x37a336(0x140)]();}[_0x361ff7(0x140)](){const _0x104cbb=_0x361ff7;this[_0x104cbb(0x120)](this[_0x104cbb(0x147)][_0x104cbb(0x15a)][_0x104cbb(0x14d)](_0x2c3f39(0x10))['subscribe'](_0xb9ee1f=>{const _0x3c7d97=_0x104cbb,_0x29ed2e=new Set();_0xb9ee1f[_0x3c7d97(0x136)](_0x53b36e=>{const _0x38de08=_0x3c7d97;switch(_0x53b36e[_0x38de08(0x172)]){case _0x38de08(0x14c):{const _0x9c8192=_0x53b36e[_0x38de08(0x16d)]['personId'];_0x29ed2e[_0x38de08(0x14c)](_0x9c8192);break;}}}),B(this[_0x3c7d97(0x128)],_0x29ed2e);}));}['_init'](){const _0x51ac85=_0x361ff7;this[_0x51ac85(0x120)](this[_0x51ac85(0x122)][_0x51ac85(0x15a)][_0x51ac85(0x163)](async _0x17de44=>{const _0x358862=_0x51ac85;var _0x1a5e8a,_0xb4a3a9,_0x333f70,_0x538181;const _0x36a951=(_0x1a5e8a=this[_0x358862(0x147)]['getUnit'](_0x17de44[_0x358862(0x142)])[_0x358862(0x170)](_0x451c5e=>_0x451c5e['threadId']===_0x17de44['threadId']))==null?void 0x0:_0x1a5e8a['root'];if(!_0x36a951)return;const {unitId:_0x4004bd,subUnitId:_0x17d3bf}=_0x36a951;switch(_0x17de44[_0x358862(0x12a)]&&this[_0x358862(0x165)][_0x358862(0x130)](_0x17de44[_0x358862(0x12a)]),_0x17de44['type']){case v['Add']:break;case v[_0x358862(0x180)]:{this[_0x358862(0x147)][_0x358862(0x153)](_0x4004bd,_0x17d3bf,{'unitId':_0x4004bd,'subUnitId':_0x17d3bf,'ref':'','id':_0x17de44[_0x358862(0x17c)],'dT':D(+_0x17de44[_0x358862(0x138)]),'threadId':_0x17de44['threadId'],'personId':(_0x333f70=(_0xb4a3a9=_0x17de44[_0x358862(0x12a)])==null?void 0x0:_0xb4a3a9['userID'])!=null?_0x333f70:_0x17de44[_0x358862(0x146)],'text':JSON[_0x358862(0x177)](_0x17de44[_0x358862(0x135)]),'parentId':_0x36a951['id']});break;}case v[_0x358862(0x17b)]:{const _0x594598=this[_0x358862(0x147)]['getComment'](_0x4004bd,_0x17d3bf,_0x17de44['replyId']);_0x594598&&_0x594598[_0x358862(0x13c)]&&this[_0x358862(0x147)][_0x358862(0x14e)](_0x4004bd,_0x17d3bf,_0x17de44[_0x358862(0x17c)]);break;}case v[_0x358862(0x16b)]:{this['_threadCommentModel']['updateComment'](_0x4004bd,_0x17d3bf,{'commentId':_0x17de44[_0x358862(0x17c)],'text':JSON[_0x358862(0x177)](_0x17de44['content'])});break;}case v[_0x358862(0x12d)]:{const _0x5adef5=(_0x538181=this[_0x358862(0x147)][_0x358862(0x141)](_0x17de44['unitId'])[_0x358862(0x170)](_0x523fc8=>_0x523fc8[_0x358862(0x145)]===_0x17de44[_0x358862(0x145)]))==null?void 0x0:_0x538181[_0x358862(0x134)];_0x5adef5&&this[_0x358862(0x147)]['resolveComment'](_0x4004bd,_0x17d3bf,_0x5adef5['id'],_0x17de44[_0x358862(0x173)]===I[_0x358862(0x12e)]);break;}}}));}};S=V([p(0x0,_0x4c9cd9(_0x550980)),p(0x1,_0x4c9cd9(_0x51ac0f)),p(0x2,_0x4c9cd9(_0x230923)),p(0x3,_0x4c9cd9(_0x1592aa))],S);const z=_0x361ff7(0x154),M={};function _0x1ab1(){const _0xb90c2c=['Solved','dataSource','addUser','replies','ref','getMemberID','root','content','forEach','setConfig','createTimestamp','_initDataSource','YYYY/MM/DD\x20HH:mm','delete','parentId','1861005ZxZnHv','rangeId','Add','_initUserSync','getUnit','unitId','UNIVER_UNKNOWN','2834496hEMLOf','threadId','userId','_threadCommentModel','userID','_configService','comment','/reply','add','pipe','deleteComment','85830ovYLdY','/delete','_sessionService','filter','addComment','thread-comment-data-source.config','reply','defineProperty','resolveComment','symbol','code','commentUpdate$','OpenOrReOpen','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/edit','post','comments','/list','_threadCommentDataSource','stringify','subscribe','UNRECOGNIZED','_userService','_config','_threadCommentDataSourceService','_init','/universer-api/comment/unit/','requireSession','Edit','format','payload','getUser','COMMENT','find','pluginName','type','solved','syncUpdateMutationToColla','Unknown','get','parse','4UTFVrR','onReady','71048JiKkRL','Delete','replyId','listComments','customRanges','getCurrentUser','Reply','map','body','/solved','users','1368642uIDPiw','length','rangeType','_httpService','disposeWithMe','getOwnPropertyDescriptor','_commentService','987741EYoUbe','error','size','351RRFTME','2233763tTHEqj','_injector','slice','user','/universer-api/user/list','/add','Solve'];_0x1ab1=function(){return _0xb90c2c;};return _0x1ab1();}var k=Object[_0x361ff7(0x121)],Q=(_0x1ff86c,_0xb0fb5f,_0x169f2a,_0x24bf4b)=>{for(var _0x18079d=_0x24bf4b>0x1?void 0x0:_0x24bf4b?k(_0xb0fb5f,_0x169f2a):_0xb0fb5f,_0x3e9778=_0x1ff86c['length']-0x1,_0x49cef4;_0x3e9778>=0x0;_0x3e9778--)(_0x49cef4=_0x1ff86c[_0x3e9778])&&(_0x18079d=_0x49cef4(_0x18079d)||_0x18079d);return _0x18079d;},_=(_0x596ad6,_0x449f02)=>(_0x310cd7,_0x4cf512)=>_0x449f02(_0x310cd7,_0x4cf512,_0x596ad6);function X(_0x598a7f,_0x3e3b3c){const _0x60820d=_0x361ff7,_0x21b693=_0x598a7f[_0x60820d(0x131)][0x0];return{..._0x3e3b3c,'id':_0x21b693[_0x60820d(0x17c)],'resolved':_0x598a7f[_0x60820d(0x173)]===0x1,'dT':D(_0x21b693[_0x60820d(0x138)]),'personId':_0x21b693[_0x60820d(0x146)],'threadId':_0x21b693['threadId']};}function ee(_0x4b1d5b,_0x3502d3,_0x151f3c){const _0x13ff7d=_0x361ff7;var _0x17a31a,_0x1f24dc;if(((_0x1f24dc=(_0x17a31a=_0x4b1d5b==null?void 0x0:_0x4b1d5b['replies'])==null?void 0x0:_0x17a31a[_0x13ff7d(0x11d)])!=null?_0x1f24dc:0x0)>0x0){const _0x33940f=(_0x219e26,_0x1c170f)=>({'id':_0x219e26[_0x13ff7d(0x17c)],'threadId':_0x219e26[_0x13ff7d(0x145)],'dT':D(_0x219e26[_0x13ff7d(0x138)]),'personId':_0x219e26[_0x13ff7d(0x146)],'resolved':_0x4b1d5b['solved']===I[_0x13ff7d(0x12e)],'unitId':_0x3502d3,'subUnitId':_0x151f3c,'text':JSON[_0x13ff7d(0x177)](_0x219e26['content']),'parentId':_0x1c170f}),_0x3dbeb8=_0x33940f(_0x4b1d5b[_0x13ff7d(0x131)][0x0]);return{..._0x3dbeb8,'children':_0x4b1d5b[_0x13ff7d(0x131)][_0x13ff7d(0x129)](0x1)['map'](_0xcaab3e=>_0x33940f(_0xcaab3e,_0x3dbeb8['id']))};}return null;}let f=class{constructor(_0x36b86b,_0x59304f,_0x102033,_0x55d464){const _0x5ae170=_0x361ff7;this['_httpService']=_0x36b86b,this[_0x5ae170(0x165)]=_0x59304f,this[_0x5ae170(0x151)]=_0x102033,this['_injector']=_0x55d464;}async['addComment'](_0x4f94bc){const _0x2c7dd2=_0x361ff7;var _0x2a0c30,_0x22d5e2;const {parentId:_0x520163,unitId:_0x5d1eb2,text:_0xfbc3db,threadId:_0x1ea3ab}=_0x4f94bc,_0xd6ae0c=(_0x22d5e2=(_0x2a0c30=_0xfbc3db[_0x2c7dd2(0x17e)])==null?void 0x0:_0x2a0c30[_0x2c7dd2(0x152)](_0x5e0a86=>_0x5e0a86[_0x2c7dd2(0x11e)]===_0x32fdec[_0x2c7dd2(0x16f)])[_0x2c7dd2(0x181)](_0x1eb04a=>_0x1eb04a[_0x2c7dd2(0x13e)]))!=null?_0x22d5e2:[],_0x1a3539=JSON[_0x2c7dd2(0x162)](_0xfbc3db),_0x573dac=(await this['_sessionService'][_0x2c7dd2(0x16a)](_0x5d1eb2))[_0x2c7dd2(0x133)]();if(_0x520163){const _0x440989={'memberId':_0x573dac,'unitId':_0x5d1eb2,'content':_0x1a3539,'mention':_0xd6ae0c,'threadId':_0x1ea3ab},_0x1d3075=(await this[_0x2c7dd2(0x11f)][_0x2c7dd2(0x15e)](_0x2c7dd2(0x169)+_0x5d1eb2+_0x2c7dd2(0x14b),{'body':_0x440989}))[_0x2c7dd2(0x119)][_0x2c7dd2(0x155)];return{..._0x4f94bc,'id':_0x1d3075['replyId'],'dT':_0x453ba2(+_0x1d3075[_0x2c7dd2(0x138)])[_0x2c7dd2(0x16c)](_0x2c7dd2(0x13a)),'personId':_0x1d3075['userId']};}else{const _0x4bb6ce={'memberId':_0x573dac,'unitId':_0x5d1eb2,'content':_0x1a3539,'mention':_0xd6ae0c},_0x175faa=await this[_0x2c7dd2(0x11f)][_0x2c7dd2(0x15e)](_0x2c7dd2(0x169)+_0x5d1eb2+_0x2c7dd2(0x12c),{'body':_0x4bb6ce});return X(_0x175faa[_0x2c7dd2(0x119)][_0x2c7dd2(0x14a)],_0x4f94bc);}}async['updateComment'](_0x205399){const _0x481f7b=_0x361ff7;var _0x41e766,_0x227547;const {text:_0x2d957f,unitId:_0x24ce9d}=_0x205399,_0x1dddaa=(_0x227547=(_0x41e766=_0x2d957f['customRanges'])==null?void 0x0:_0x41e766[_0x481f7b(0x152)](_0x523bdc=>_0x523bdc[_0x481f7b(0x11e)]===_0x32fdec['COMMENT'])[_0x481f7b(0x181)](_0x5e718e=>_0x5e718e['rangeId']))!=null?_0x227547:[],_0x4d5791=JSON[_0x481f7b(0x162)](_0x2d957f),_0x5aa590=_0x205399['threadId'],_0x3136b7=_0x205399['id'],_0x1eb828={'memberId':(await this[_0x481f7b(0x151)][_0x481f7b(0x16a)](_0x24ce9d))[_0x481f7b(0x133)](),'unitId':_0x24ce9d,'threadId':_0x5aa590,'mention':_0x1dddaa,'content':_0x4d5791,'replyId':_0x3136b7},_0x2d4a77=await this[_0x481f7b(0x11f)][_0x481f7b(0x15e)](_0x481f7b(0x169)+_0x24ce9d+_0x481f7b(0x15d),{'body':_0x1eb828});return!_0x2d4a77[_0x481f7b(0x119)][_0x481f7b(0x124)]||_0x2d4a77['body'][_0x481f7b(0x124)]['code']===0x1;}async[_0x361ff7(0x157)](_0x32702d){const _0x8b7020=_0x361ff7,{unitId:_0x2517f5}=_0x32702d,_0x3b236e=_0x32702d[_0x8b7020(0x145)],_0x297efb={'memberId':this[_0x8b7020(0x165)][_0x8b7020(0x17f)]()[_0x8b7020(0x148)],'unitId':_0x2517f5,'threadId':_0x3b236e,'solved':_0x32702d['resolved']?I['Solved']:I[_0x8b7020(0x15b)]},_0xfafc82=await this[_0x8b7020(0x11f)][_0x8b7020(0x15e)](_0x8b7020(0x169)+_0x2517f5+_0x8b7020(0x11a),{'body':_0x297efb});return!_0xfafc82[_0x8b7020(0x119)][_0x8b7020(0x124)]||_0xfafc82['body'][_0x8b7020(0x124)][_0x8b7020(0x159)]===0x1;}async[_0x361ff7(0x14e)](_0x188e6e,_0x3c74ec,_0x378f98,_0x34705b){const _0x24a3f9=_0x361ff7,_0x408ad2={'memberId':(await this[_0x24a3f9(0x151)]['requireSession'](_0x188e6e))[_0x24a3f9(0x133)](),'threadId':_0x378f98,'replyId':_0x34705b,'unitId':_0x188e6e},_0x4eb936=await this[_0x24a3f9(0x11f)][_0x24a3f9(0x15e)]('/universer-api/comment/unit/'+_0x188e6e+_0x24a3f9(0x150),{'body':_0x408ad2});return!_0x4eb936['body']['error']||_0x4eb936[_0x24a3f9(0x119)][_0x24a3f9(0x124)][_0x24a3f9(0x159)]===0x1;}async[_0x361ff7(0x17d)](_0x3c84ba,_0x354e92,_0x58b9f1){const _0x50371b=_0x361ff7,_0x5c3e62={'unitId':_0x3c84ba,'threadId':_0x58b9f1},_0x7f5e91=await this['_httpService'][_0x50371b(0x15e)](_0x50371b(0x169)+_0x3c84ba+_0x50371b(0x160),{'body':_0x5c3e62}),_0x204345=_0x58b9f1[_0x50371b(0x181)](_0x23e6aa=>ee(_0x7f5e91[_0x50371b(0x119)][_0x50371b(0x15f)][_0x23e6aa],_0x3c84ba,_0x354e92))[_0x50371b(0x152)](Boolean);return Object['values'](_0x7f5e91['body'][_0x50371b(0x11b)])[_0x50371b(0x136)](_0x2e7ccf=>{const _0x2486c8=_0x50371b;this['_userService'][_0x2486c8(0x130)](_0x2e7ccf);}),_0x204345;}['saveCommentToSnapshot'](_0x209869){const _0x193b09=_0x361ff7;return{'id':_0x209869['id'],'threadId':_0x209869[_0x193b09(0x145)],'ref':_0x209869[_0x193b09(0x132)]};}};f=Q([_(0x0,_0x4c9cd9(_0x13c39a)),_(0x1,_0x4c9cd9(_0x230923)),_(0x2,_0x4c9cd9(_0xed4b95)),_(0x3,_0x4c9cd9(_0x1592aa))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x162788,_0x3318da,_0x11107e,_0x4af0d8)=>{for(var _0x35984d=_0x4af0d8>0x1?void 0x0:_0x4af0d8?re(_0x3318da,_0x11107e):_0x3318da,_0x5085f8=_0x162788['length']-0x1,_0x9e599c;_0x5085f8>=0x0;_0x5085f8--)(_0x9e599c=_0x162788[_0x5085f8])&&(_0x35984d=_0x9e599c(_0x35984d)||_0x35984d);return _0x35984d;},N=(_0x49076c,_0x4333b2)=>(_0xab9dd3,_0x1b4a13)=>_0x4333b2(_0xab9dd3,_0x1b4a13,_0x49076c);let g=class extends _0xaf25f7{constructor(_0x1dca2e,_0x23297d){const _0x43b1e2=_0x361ff7;super(),this[_0x43b1e2(0x167)]=_0x1dca2e,this[_0x43b1e2(0x161)]=_0x23297d,this[_0x43b1e2(0x139)]();}[_0x361ff7(0x139)](){const _0x322152=_0x361ff7;this[_0x322152(0x167)][_0x322152(0x12f)]=this[_0x322152(0x161)],this['_threadCommentDataSourceService'][_0x322152(0x174)]=!0x1;}};g=te([N(0x0,_0x38d4a8),N(0x1,_0x4c9cd9(f))],g);var se=Object[_0x361ff7(0x156)],oe=Object[_0x361ff7(0x121)],ne=(_0xc6012a,_0x2e4070,_0xf4e055)=>_0x2e4070 in _0xc6012a?se(_0xc6012a,_0x2e4070,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf4e055}):_0xc6012a[_0x2e4070]=_0xf4e055,ie=(_0xf60cff,_0x19f739,_0x4b71c0,_0x46ad65)=>{const _0x1a8c32=_0x361ff7;for(var _0x442c0e=_0x46ad65>0x1?void 0x0:_0x46ad65?oe(_0x19f739,_0x4b71c0):_0x19f739,_0x950c48=_0xf60cff[_0x1a8c32(0x11d)]-0x1,_0x5485e2;_0x950c48>=0x0;_0x950c48--)(_0x5485e2=_0xf60cff[_0x950c48])&&(_0x442c0e=_0x5485e2(_0x442c0e)||_0x442c0e);return _0x442c0e;},w=(_0x48d74e,_0x332cbe)=>(_0x16fb5f,_0x2a157f)=>_0x332cbe(_0x16fb5f,_0x2a157f,_0x48d74e),$=(_0x2158cb,_0x58cdbc,_0x174bac)=>ne(_0x2158cb,typeof _0x58cdbc!=_0x361ff7(0x158)?_0x58cdbc+'':_0x58cdbc,_0x174bac);let b=class extends _0x375e34{constructor(_0x5d6040=M,_0x30b201,_0x161b3a){const _0x316b89=_0x361ff7;super(),this['_config']=_0x5d6040,this['_injector']=_0x30b201,this[_0x316b89(0x149)]=_0x161b3a;const {..._0x45947b}=_0x3bd94e({},M,this[_0x316b89(0x166)]);this['_configService'][_0x316b89(0x137)](z,_0x45947b);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x3ee509=>{const _0x1254ce=_0x2b3d;this[_0x1254ce(0x128)][_0x1254ce(0x14c)](_0x3ee509);});}[_0x361ff7(0x179)](){const _0x338fb9=_0x361ff7;this[_0x338fb9(0x128)]['get'](g),this[_0x338fb9(0x128)][_0x338fb9(0x176)](S);}};$(b,_0x361ff7(0x171),W),$(b,_0x361ff7(0x172),_0x5015d6[_0x361ff7(0x143)]),b=ie([_0x434b14(_0x4bca2b,_0x1f4157,_0x50fae2),w(0x1,_0x4c9cd9(_0x1592aa)),w(0x2,_0x2808c2)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x1112(){const _0x4b0cba=['Add','solved','replies','Edit','_config','IConfigService','pluginName','UniverThreadCommentDataSourcePlugin','_httpService','customRanges','_threadCommentDataSourceService','map','2664204jdvbHY','_initDataSource','size','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Solve','getUnit','2793801oyiLSv','Inject','addComment','root','disposeWithMe','Disposable','@univerjs/thread-comment-ui','dataSource','getUser','code','getComment','pipe','toStringTag','_commentService','object','/reply','subscribe','4eZZEEr','get','_sessionService','@univerjs/thread-comment','type','UniverProThreadCommentDatasource','body','@univerjs/core','UniverLicensePlugin','COMMENT','userID','reply','UserManagerService','6UcrZLU','/edit','commentUpdate$','CustomRangeType','find','personId','forEach','HTTPService','CollaborationSessionService','parse','UNRECOGNIZED','6659710TBUZyt','Solved','/solved','payload','userId','add','ref','deleteComment','369AmeUqr','dayjs','_init','unitId','_threadCommentModel','_initUserSync','@univerjs/network','254472kaXVmc','rangeType','values','delete','_threadCommentDataSource','user','listComments','Delete','1520958SDnoQM','/universer-api/comment/unit/','UniverProLicense','11799240rxStyU','resolveComment','bufferTime','_injector','/list','onReady','stringify','/universer-api/user/list','Unknown','/delete','Reply','threadId','rxjs','onStarting','_userService','rangeId','content','DependentOn','addUser','YYYY/MM/DD\x20HH:mm','@univerjs-pro/license','format','getOwnPropertyDescriptor','Injector','Plugin','replyId','UniverThreadComment','error','8149533aBUdKt','filter','ThreadCommentModel','parentId','defineProperty','getMemberID','saveCommentToSnapshot','CommentService','createTimestamp','function','@univerjs-pro/collaboration-client','_configService','post','OpenOrReOpen','requireSession','syncUpdateMutationToColla','users','setConfig','UniverProCollaborationClient','IThreadCommentDataSourceService','UniverCore'];_0x1112=function(){return _0x4b0cba;};return _0x1112();}function _0x161e(_0x14ee43,_0x2c0c88){const _0x111207=_0x1112();return _0x161e=function(_0x161e95,_0x1f046b){_0x161e95=_0x161e95-0x6e;let _0x2fddd1=_0x111207[_0x161e95];return _0x2fddd1;},_0x161e(_0x14ee43,_0x2c0c88);}(function(_0x1edce7,_0x4d7f6c){const _0x334bb7=_0x161e,_0x3fbab4=_0x1edce7();while(!![]){try{const _0x17f395=-parseInt(_0x334bb7(0xe0))/0x1+parseInt(_0x334bb7(0xb1))/0x2*(parseInt(_0x334bb7(0xa0))/0x3)+parseInt(_0x334bb7(0x9a))/0x4+-parseInt(_0x334bb7(0xc9))/0x5+parseInt(_0x334bb7(0xbe))/0x6*(parseInt(_0x334bb7(0x79))/0x7)+-parseInt(_0x334bb7(0xd8))/0x8*(-parseInt(_0x334bb7(0xd1))/0x9)+-parseInt(_0x334bb7(0xe3))/0xa;if(_0x17f395===_0x4d7f6c)break;else _0x3fbab4['push'](_0x3fbab4['shift']());}catch(_0xaf17ab){_0x3fbab4['push'](_0x3fbab4['shift']());}}}(_0x1112,0xeb635),function(_0x13e501,_0x1fa985){const _0x1c9895=_0x161e;typeof exports==_0x1c9895(0xae)&&typeof module<'u'?_0x1fa985(exports,require(_0x1c9895(0x83)),require(_0x1c9895(0x71)),require(_0x1c9895(0xb8)),require(_0x1c9895(0xa6)),require(_0x1c9895(0xb4)),require(_0x1c9895(0xef)),require('@univerjs/network')):typeof define==_0x1c9895(0x82)&&define['amd']?define(['exports',_0x1c9895(0x83),_0x1c9895(0x71),_0x1c9895(0xb8),_0x1c9895(0xa6),_0x1c9895(0xb4),'rxjs',_0x1c9895(0xd7)],_0x1fa985):(_0x13e501=typeof globalThis<'u'?globalThis:_0x13e501||self,_0x1fa985(_0x13e501[_0x1c9895(0xb6)]={},_0x13e501[_0x1c9895(0x8b)],_0x13e501[_0x1c9895(0xe2)],_0x13e501[_0x1c9895(0x8d)],_0x13e501['UniverThreadCommentUi'],_0x13e501[_0x1c9895(0x77)],_0x13e501['rxjs'],_0x13e501['UniverNetwork']));}(this,function(_0x51a636,_0x2b6358,_0x59453f,_0x54ffd4,_0x3067d4,_0x2ebc91,_0x157b87,_0x250d5f){'use strict';const _0x572099=_0x161e;const _0x3b74b7=_0x572099(0x9d);var _0xdf7756=(_0x186fea=>(_0x186fea[_0x186fea[_0x572099(0x86)]=0x0]=_0x572099(0x86),_0x186fea[_0x186fea[_0x572099(0xca)]=0x1]='Solved',_0x186fea[_0x186fea[_0x572099(0xc8)]=-0x1]=_0x572099(0xc8),_0x186fea))(_0xdf7756||{}),_0x3715e2=(_0x28258d=>(_0x28258d[_0x28258d[_0x572099(0xeb)]=0x0]=_0x572099(0xeb),_0x28258d[_0x28258d[_0x572099(0x8e)]=0x1]='Add',_0x28258d[_0x28258d[_0x572099(0xed)]=0x2]=_0x572099(0xed),_0x28258d[_0x28258d['Edit']=0x3]=_0x572099(0x91),_0x28258d[_0x28258d[_0x572099(0xdf)]=0x4]='Delete',_0x28258d[_0x28258d[_0x572099(0x9e)]=0x5]=_0x572099(0x9e),_0x28258d[_0x28258d[_0x572099(0xc8)]=-0x1]=_0x572099(0xc8),_0x28258d))(_0x3715e2||{});const _0x90f2d8=_0x4d6ca6=>_0x54ffd4[_0x572099(0xd2)](new Date(+_0x4d6ca6))[_0x572099(0x72)](_0x572099(0x70)),_0x98a820=async(_0xb4e071,_0x2d6b41)=>{const _0x4fde0b=_0x572099,_0x2f61e1=_0xb4e071['get'](_0x54ffd4['UserManagerService']),_0x4a548d=_0xb4e071[_0x4fde0b(0xb2)](_0x250d5f[_0x4fde0b(0xc5)]);_0x2d6b41[_0x4fde0b(0xc4)](_0x2324f1=>{const _0x5d6587=_0x4fde0b;_0x2f61e1[_0x5d6587(0xa8)](_0x2324f1)&&_0x2d6b41[_0x5d6587(0xdb)](_0x2324f1);}),_0x2d6b41[_0x4fde0b(0x9c)]&&(await _0x4a548d[_0x4fde0b(0xb2)](_0x4fde0b(0xea),{'params':{'userIDs':[..._0x2d6b41]}}))[_0x4fde0b(0xb7)][_0x4fde0b(0x89)]['forEach'](_0x2a0195=>{_0x2a0195&&_0x2f61e1['addUser'](_0x2a0195);});};var _0x29f4ff=Object['getOwnPropertyDescriptor'],_0x25e013=(_0x136a56,_0x5b47ad,_0x3d566c,_0x3cea01)=>{for(var _0x448435=_0x3cea01>0x1?void 0x0:_0x3cea01?_0x29f4ff(_0x5b47ad,_0x3d566c):_0x5b47ad,_0x4bcb8a=_0x136a56['length']-0x1,_0x1c2bc6;_0x4bcb8a>=0x0;_0x4bcb8a--)(_0x1c2bc6=_0x136a56[_0x4bcb8a])&&(_0x448435=_0x1c2bc6(_0x448435)||_0x448435);return _0x448435;},_0x5cd4a0=(_0xac2cf4,_0x943a75)=>(_0x5387ee,_0x5a063d)=>_0x943a75(_0x5387ee,_0x5a063d,_0xac2cf4);let _0x5bf372=class extends _0x54ffd4['Disposable']{constructor(_0xa26889,_0x32d3a0,_0x2a9bb0,_0x1c7642){const _0x385ce1=_0x572099;super(),this[_0x385ce1(0xad)]=_0xa26889,this[_0x385ce1(0xd5)]=_0x32d3a0,this[_0x385ce1(0xf1)]=_0x2a9bb0,this[_0x385ce1(0xe6)]=_0x1c7642,this[_0x385ce1(0xd3)](),this[_0x385ce1(0xd6)]();}[_0x572099(0xd6)](){const _0x4f52cc=_0x572099;this[_0x4f52cc(0xa4)](this[_0x4f52cc(0xd5)][_0x4f52cc(0xc0)][_0x4f52cc(0xab)](_0x157b87[_0x4f52cc(0xe5)](0x10))['subscribe'](_0x353ec2=>{const _0x45ea74=_0x4f52cc,_0x392500=new Set();_0x353ec2['forEach'](_0x5d69a8=>{const _0x3b7b06=_0x161e;switch(_0x5d69a8['type']){case _0x3b7b06(0xce):{const _0x4f12bf=_0x5d69a8[_0x3b7b06(0xcc)][_0x3b7b06(0xc3)];_0x392500['add'](_0x4f12bf);break;}}}),_0x98a820(this[_0x45ea74(0xe6)],_0x392500);}));}[_0x572099(0xd3)](){const _0x363196=_0x572099;this[_0x363196(0xa4)](this['_commentService'][_0x363196(0xc0)][_0x363196(0xb0)](async _0x381a48=>{const _0xfa0907=_0x363196;var _0x4e343a,_0x459d32,_0x5596ce,_0x219bca;const _0x1fe0da=(_0x4e343a=this['_threadCommentModel']['getUnit'](_0x381a48[_0xfa0907(0xd4)])[_0xfa0907(0xc2)](_0x4a30aa=>_0x4a30aa['threadId']===_0x381a48[_0xfa0907(0xee)]))==null?void 0x0:_0x4e343a['root'];if(!_0x1fe0da)return;const {unitId:_0x4bbfdd,subUnitId:_0x3c8e46}=_0x1fe0da;switch(_0x381a48['user']&&this[_0xfa0907(0xf1)]['addUser'](_0x381a48[_0xfa0907(0xdd)]),_0x381a48[_0xfa0907(0xb5)]){case _0x3715e2[_0xfa0907(0x8e)]:break;case _0x3715e2['Reply']:{this[_0xfa0907(0xd5)][_0xfa0907(0xa2)](_0x4bbfdd,_0x3c8e46,{'unitId':_0x4bbfdd,'subUnitId':_0x3c8e46,'ref':'','id':_0x381a48['replyId'],'dT':_0x90f2d8(+_0x381a48['createTimestamp']),'threadId':_0x381a48[_0xfa0907(0xee)],'personId':(_0x5596ce=(_0x459d32=_0x381a48[_0xfa0907(0xdd)])==null?void 0x0:_0x459d32[_0xfa0907(0xbb)])!=null?_0x5596ce:_0x381a48[_0xfa0907(0xcd)],'text':JSON['parse'](_0x381a48[_0xfa0907(0xf3)]),'parentId':_0x1fe0da['id']});break;}case _0x3715e2[_0xfa0907(0xdf)]:{const _0x7aa9c3=this[_0xfa0907(0xd5)][_0xfa0907(0xaa)](_0x4bbfdd,_0x3c8e46,_0x381a48[_0xfa0907(0x76)]);_0x7aa9c3&&_0x7aa9c3[_0xfa0907(0x7c)]&&this[_0xfa0907(0xd5)][_0xfa0907(0xd0)](_0x4bbfdd,_0x3c8e46,_0x381a48[_0xfa0907(0x76)]);break;}case _0x3715e2[_0xfa0907(0x91)]:{this['_threadCommentModel']['updateComment'](_0x4bbfdd,_0x3c8e46,{'commentId':_0x381a48['replyId'],'text':JSON[_0xfa0907(0xc7)](_0x381a48[_0xfa0907(0xf3)])});break;}case _0x3715e2[_0xfa0907(0x9e)]:{const _0x63de75=(_0x219bca=this[_0xfa0907(0xd5)][_0xfa0907(0x9f)](_0x381a48[_0xfa0907(0xd4)])[_0xfa0907(0xc2)](_0x40c982=>_0x40c982[_0xfa0907(0xee)]===_0x381a48[_0xfa0907(0xee)]))==null?void 0x0:_0x219bca[_0xfa0907(0xa3)];_0x63de75&&this[_0xfa0907(0xd5)][_0xfa0907(0xe4)](_0x4bbfdd,_0x3c8e46,_0x63de75['id'],_0x381a48[_0xfa0907(0x8f)]===_0xdf7756[_0xfa0907(0xca)]);break;}}}));}};_0x5bf372=_0x25e013([_0x5cd4a0(0x0,_0x54ffd4[_0x572099(0xa1)](_0x2b6358[_0x572099(0x80)])),_0x5cd4a0(0x1,_0x54ffd4['Inject'](_0x2ebc91[_0x572099(0x7b)])),_0x5cd4a0(0x2,_0x54ffd4[_0x572099(0xa1)](_0x54ffd4[_0x572099(0xbd)])),_0x5cd4a0(0x3,_0x54ffd4['Inject'](_0x54ffd4[_0x572099(0x74)]))],_0x5bf372);const _0xc03f36='thread-comment-data-source.config',_0xa91f75={};var _0x44e6f5=Object[_0x572099(0x73)],_0x560841=(_0x2c627c,_0x45fa1d,_0x34bfb3,_0x2f67b6)=>{for(var _0x3ecac3=_0x2f67b6>0x1?void 0x0:_0x2f67b6?_0x44e6f5(_0x45fa1d,_0x34bfb3):_0x45fa1d,_0x575842=_0x2c627c['length']-0x1,_0x467e2a;_0x575842>=0x0;_0x575842--)(_0x467e2a=_0x2c627c[_0x575842])&&(_0x3ecac3=_0x467e2a(_0x3ecac3)||_0x3ecac3);return _0x3ecac3;},_0x2481fc=(_0x253287,_0x561a56)=>(_0x2b6d3b,_0x3686bb)=>_0x561a56(_0x2b6d3b,_0x3686bb,_0x253287);function _0x582824(_0x5d02be,_0x792373){const _0x5c68b0=_0x572099,_0x15e4ee=_0x5d02be['replies'][0x0];return{..._0x792373,'id':_0x15e4ee['replyId'],'resolved':_0x5d02be['solved']===0x1,'dT':_0x90f2d8(_0x15e4ee['createTimestamp']),'personId':_0x15e4ee[_0x5c68b0(0xcd)],'threadId':_0x15e4ee['threadId']};}function _0x4cedc5(_0xd69e4f,_0x2bd781,_0x524556){const _0x26f8c3=_0x572099;var _0x3f1dd1,_0x230b24;if(((_0x230b24=(_0x3f1dd1=_0xd69e4f==null?void 0x0:_0xd69e4f[_0x26f8c3(0x90)])==null?void 0x0:_0x3f1dd1['length'])!=null?_0x230b24:0x0)>0x0){const _0x157ce0=(_0x4c06a7,_0x15aeea)=>({'id':_0x4c06a7['replyId'],'threadId':_0x4c06a7[_0x26f8c3(0xee)],'dT':_0x90f2d8(_0x4c06a7[_0x26f8c3(0x81)]),'personId':_0x4c06a7[_0x26f8c3(0xcd)],'resolved':_0xd69e4f[_0x26f8c3(0x8f)]===_0xdf7756[_0x26f8c3(0xca)],'unitId':_0x2bd781,'subUnitId':_0x524556,'text':JSON['parse'](_0x4c06a7[_0x26f8c3(0xf3)]),'parentId':_0x15aeea}),_0x1af92b=_0x157ce0(_0xd69e4f['replies'][0x0]);return{..._0x1af92b,'children':_0xd69e4f[_0x26f8c3(0x90)]['slice'](0x1)['map'](_0x2f3bf3=>_0x157ce0(_0x2f3bf3,_0x1af92b['id']))};}return null;}let _0x555366=class{constructor(_0xa2339d,_0x225475,_0x53a667,_0xdd2ea8){const _0x181265=_0x572099;this[_0x181265(0x96)]=_0xa2339d,this[_0x181265(0xf1)]=_0x225475,this[_0x181265(0xb3)]=_0x53a667,this[_0x181265(0xe6)]=_0xdd2ea8;}async[_0x572099(0xa2)](_0x2aa453){const _0x298d08=_0x572099;var _0x5a7a0f,_0xca09e7;const {parentId:_0x27f1ba,unitId:_0x4eeb5a,text:_0x3bed92,threadId:_0x1bc5db}=_0x2aa453,_0x313b24=(_0xca09e7=(_0x5a7a0f=_0x3bed92[_0x298d08(0x97)])==null?void 0x0:_0x5a7a0f[_0x298d08(0x7a)](_0x484631=>_0x484631['rangeType']===_0x54ffd4[_0x298d08(0xc1)][_0x298d08(0xba)])[_0x298d08(0x99)](_0x3f3a87=>_0x3f3a87['rangeId']))!=null?_0xca09e7:[],_0x476eb1=JSON['stringify'](_0x3bed92),_0x4f949b=(await this['_sessionService']['requireSession'](_0x4eeb5a))[_0x298d08(0x7e)]();if(_0x27f1ba){const _0x1692ba={'memberId':_0x4f949b,'unitId':_0x4eeb5a,'content':_0x476eb1,'mention':_0x313b24,'threadId':_0x1bc5db},_0x1d8132=(await this['_httpService'][_0x298d08(0x85)](_0x298d08(0xe1)+_0x4eeb5a+_0x298d08(0xaf),{'body':_0x1692ba}))[_0x298d08(0xb7)][_0x298d08(0xbc)];return{..._0x2aa453,'id':_0x1d8132[_0x298d08(0x76)],'dT':_0x54ffd4[_0x298d08(0xd2)](+_0x1d8132[_0x298d08(0x81)])['format'](_0x298d08(0x70)),'personId':_0x1d8132[_0x298d08(0xcd)]};}else{const _0x249eda={'memberId':_0x4f949b,'unitId':_0x4eeb5a,'content':_0x476eb1,'mention':_0x313b24},_0x5b7ed4=await this[_0x298d08(0x96)][_0x298d08(0x85)]('/universer-api/comment/unit/'+_0x4eeb5a+'/add',{'body':_0x249eda});return _0x582824(_0x5b7ed4[_0x298d08(0xb7)]['comment'],_0x2aa453);}}async['updateComment'](_0x2810e5){const _0x3c9a3b=_0x572099;var _0x216e58,_0x158df2;const {text:_0x17c710,unitId:_0x312bbe}=_0x2810e5,_0x26e05e=(_0x158df2=(_0x216e58=_0x17c710[_0x3c9a3b(0x97)])==null?void 0x0:_0x216e58[_0x3c9a3b(0x7a)](_0x41cd11=>_0x41cd11[_0x3c9a3b(0xd9)]===_0x54ffd4['CustomRangeType'][_0x3c9a3b(0xba)])['map'](_0x173ac9=>_0x173ac9[_0x3c9a3b(0xf2)]))!=null?_0x158df2:[],_0x1c5914=JSON[_0x3c9a3b(0xe9)](_0x17c710),_0x3adfca=_0x2810e5[_0x3c9a3b(0xee)],_0x4ac943=_0x2810e5['id'],_0x4329ed={'memberId':(await this[_0x3c9a3b(0xb3)][_0x3c9a3b(0x87)](_0x312bbe))[_0x3c9a3b(0x7e)](),'unitId':_0x312bbe,'threadId':_0x3adfca,'mention':_0x26e05e,'content':_0x1c5914,'replyId':_0x4ac943},_0x47d476=await this[_0x3c9a3b(0x96)][_0x3c9a3b(0x85)](_0x3c9a3b(0xe1)+_0x312bbe+_0x3c9a3b(0xbf),{'body':_0x4329ed});return!_0x47d476[_0x3c9a3b(0xb7)][_0x3c9a3b(0x78)]||_0x47d476[_0x3c9a3b(0xb7)][_0x3c9a3b(0x78)][_0x3c9a3b(0xa9)]===0x1;}async['resolveComment'](_0x30292f){const _0x17f947=_0x572099,{unitId:_0x48741d}=_0x30292f,_0x249d2f=_0x30292f[_0x17f947(0xee)],_0x535fbc={'memberId':this['_userService']['getCurrentUser']()[_0x17f947(0xbb)],'unitId':_0x48741d,'threadId':_0x249d2f,'solved':_0x30292f['resolved']?_0xdf7756[_0x17f947(0xca)]:_0xdf7756[_0x17f947(0x86)]},_0x29694a=await this[_0x17f947(0x96)][_0x17f947(0x85)](_0x17f947(0xe1)+_0x48741d+_0x17f947(0xcb),{'body':_0x535fbc});return!_0x29694a[_0x17f947(0xb7)][_0x17f947(0x78)]||_0x29694a[_0x17f947(0xb7)]['error'][_0x17f947(0xa9)]===0x1;}async[_0x572099(0xd0)](_0x4f305f,_0x5afb70,_0x406ea2,_0x571a14){const _0x3dfb63=_0x572099,_0x4e74ca={'memberId':(await this[_0x3dfb63(0xb3)][_0x3dfb63(0x87)](_0x4f305f))[_0x3dfb63(0x7e)](),'threadId':_0x406ea2,'replyId':_0x571a14,'unitId':_0x4f305f},_0x11d6f0=await this[_0x3dfb63(0x96)][_0x3dfb63(0x85)](_0x3dfb63(0xe1)+_0x4f305f+_0x3dfb63(0xec),{'body':_0x4e74ca});return!_0x11d6f0['body'][_0x3dfb63(0x78)]||_0x11d6f0[_0x3dfb63(0xb7)][_0x3dfb63(0x78)][_0x3dfb63(0xa9)]===0x1;}async[_0x572099(0xde)](_0x1012db,_0x1ba1b9,_0x4a1561){const _0x16e622=_0x572099,_0x4247ff={'unitId':_0x1012db,'threadId':_0x4a1561},_0x111852=await this[_0x16e622(0x96)][_0x16e622(0x85)](_0x16e622(0xe1)+_0x1012db+_0x16e622(0xe7),{'body':_0x4247ff}),_0x2d8a6d=_0x4a1561[_0x16e622(0x99)](_0x1793ba=>_0x4cedc5(_0x111852[_0x16e622(0xb7)]['comments'][_0x1793ba],_0x1012db,_0x1ba1b9))[_0x16e622(0x7a)](Boolean);return Object[_0x16e622(0xda)](_0x111852[_0x16e622(0xb7)][_0x16e622(0x89)])[_0x16e622(0xc4)](_0x517e71=>{const _0x47f05b=_0x16e622;this[_0x47f05b(0xf1)][_0x47f05b(0x6f)](_0x517e71);}),_0x2d8a6d;}[_0x572099(0x7f)](_0x5a98d7){const _0x37308b=_0x572099;return{'id':_0x5a98d7['id'],'threadId':_0x5a98d7[_0x37308b(0xee)],'ref':_0x5a98d7[_0x37308b(0xcf)]};}};_0x555366=_0x560841([_0x2481fc(0x0,_0x54ffd4[_0x572099(0xa1)](_0x250d5f[_0x572099(0xc5)])),_0x2481fc(0x1,_0x54ffd4[_0x572099(0xa1)](_0x54ffd4[_0x572099(0xbd)])),_0x2481fc(0x2,_0x54ffd4[_0x572099(0xa1)](_0x2b6358[_0x572099(0xc6)])),_0x2481fc(0x3,_0x54ffd4[_0x572099(0xa1)](_0x54ffd4[_0x572099(0x74)]))],_0x555366);var _0x3487d8=Object[_0x572099(0x73)],_0x4a4a93=(_0x1497d7,_0x473e2b,_0x263bb5,_0x2d1017)=>{for(var _0x263252=_0x2d1017>0x1?void 0x0:_0x2d1017?_0x3487d8(_0x473e2b,_0x263bb5):_0x473e2b,_0x156827=_0x1497d7['length']-0x1,_0x4d1cd2;_0x156827>=0x0;_0x156827--)(_0x4d1cd2=_0x1497d7[_0x156827])&&(_0x263252=_0x4d1cd2(_0x263252)||_0x263252);return _0x263252;},_0x56c455=(_0x23c27d,_0x5a3956)=>(_0x1e0545,_0x2f55a0)=>_0x5a3956(_0x1e0545,_0x2f55a0,_0x23c27d);let _0x396e23=class extends _0x54ffd4[_0x572099(0xa5)]{constructor(_0x378bd5,_0x2d308e){const _0x5d053d=_0x572099;super(),this['_threadCommentDataSourceService']=_0x378bd5,this[_0x5d053d(0xdc)]=_0x2d308e,this[_0x5d053d(0x9b)]();}['_initDataSource'](){const _0x3ec657=_0x572099;this[_0x3ec657(0x98)][_0x3ec657(0xa7)]=this['_threadCommentDataSource'],this[_0x3ec657(0x98)][_0x3ec657(0x88)]=!0x1;}};_0x396e23=_0x4a4a93([_0x56c455(0x0,_0x2ebc91[_0x572099(0x8c)]),_0x56c455(0x1,_0x54ffd4[_0x572099(0xa1)](_0x555366))],_0x396e23);var _0x5dca1a=Object[_0x572099(0x7d)],_0x5b0d88=Object[_0x572099(0x73)],_0x34a1dd=(_0x53d08a,_0x1d495a,_0x4d1628)=>_0x1d495a in _0x53d08a?_0x5dca1a(_0x53d08a,_0x1d495a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4d1628}):_0x53d08a[_0x1d495a]=_0x4d1628,_0x249dab=(_0x167c6c,_0x3ec4e2,_0x39ed15,_0x39935c)=>{for(var _0x17b2b9=_0x39935c>0x1?void 0x0:_0x39935c?_0x5b0d88(_0x3ec4e2,_0x39ed15):_0x3ec4e2,_0x4c0e69=_0x167c6c['length']-0x1,_0x5042c8;_0x4c0e69>=0x0;_0x4c0e69--)(_0x5042c8=_0x167c6c[_0x4c0e69])&&(_0x17b2b9=_0x5042c8(_0x17b2b9)||_0x17b2b9);return _0x17b2b9;},_0x3436a3=(_0x971775,_0x4e5239)=>(_0x57eadf,_0x3fad5a)=>_0x4e5239(_0x57eadf,_0x3fad5a,_0x971775),_0x537625=(_0x1a370f,_0x56557b,_0x51ac59)=>_0x34a1dd(_0x1a370f,typeof _0x56557b!='symbol'?_0x56557b+'':_0x56557b,_0x51ac59);_0x51a636[_0x572099(0x95)]=class extends _0x54ffd4[_0x572099(0x75)]{constructor(_0x348933=_0xa91f75,_0x2a8e72,_0x49a954){const _0x4f69df=_0x572099;super(),this[_0x4f69df(0x92)]=_0x348933,this[_0x4f69df(0xe6)]=_0x2a8e72,this[_0x4f69df(0x84)]=_0x49a954;const {..._0x1dcccb}=_0x54ffd4['merge']({},_0xa91f75,this[_0x4f69df(0x92)]);this['_configService'][_0x4f69df(0x8a)](_0xc03f36,_0x1dcccb);}[_0x572099(0xf0)](){const _0x43f506=_0x572099;[[_0x555366],[_0x396e23],[_0x5bf372]][_0x43f506(0xc4)](_0x4e3a8d=>{const _0x34ed3a=_0x43f506;this[_0x34ed3a(0xe6)]['add'](_0x4e3a8d);});}[_0x572099(0xe8)](){const _0x26eabd=_0x572099;this['_injector'][_0x26eabd(0xb2)](_0x396e23),this[_0x26eabd(0xe6)][_0x26eabd(0xb2)](_0x5bf372);}},_0x537625(_0x51a636['UniverThreadCommentDataSourcePlugin'],_0x572099(0x94),_0x3b74b7),_0x537625(_0x51a636['UniverThreadCommentDataSourcePlugin'],'type',_0x54ffd4['UniverInstanceType']['UNIVER_UNKNOWN']),_0x51a636[_0x572099(0x95)]=_0x249dab([_0x54ffd4[_0x572099(0x6e)](_0x3067d4['UniverThreadCommentUIPlugin'],_0x2b6358['UniverCollaborationClientPlugin'],_0x59453f[_0x572099(0xb9)]),_0x3436a3(0x1,_0x54ffd4[_0x572099(0xa1)](_0x54ffd4[_0x572099(0x74)])),_0x3436a3(0x2,_0x54ffd4[_0x572099(0x93)])],_0x51a636[_0x572099(0x95)]),Object['defineProperty'](_0x51a636,Symbol[_0x572099(0xac)],{'value':'Module'});}));
1
+ function _0x2e59(){const _0x1de1a4=['_injector','root','649176CNfwrc','Reply','UniverCore','Add','disposeWithMe','UniverThreadCommentUIPlugin','_userService','64842Mregox','size','comment','IThreadCommentDataSourceService','1486405mAoIJo','Edit','length','1038bFfTrO','CustomRangeType','rangeType','deleteComment','Unknown','personId','IConfigService','/reply','type','get','DependentOn','dataSource','parse','UniverInstanceType','saveCommentToSnapshot','forEach','function','resolveComment','Inject','Injector','payload','add','solved','1361099ofHQnQ','requireSession','body','_initDataSource','getUser','getMemberID','10520700lcdeGo','@univerjs/thread-comment-ui','code','onStarting','defineProperty','ref','rangeId','merge','addUser','OpenOrReOpen','userID','483hPdBmy','/add','object','8206KhwXuy','getCurrentUser','_sessionService','customRanges','content','pluginName','_commentService','values','UniverCollaborationClientPlugin','/universer-api/user/list','135iaFBgH','_init','_threadCommentModel','UniverProCollaborationClient','exports','post','user','_threadCommentDataSource','@univerjs-pro/license','Solve','getUnit','UniverThreadCommentUi','replies','Delete','YYYY/MM/DD\x20HH:mm','UniverProLicense','_configService','dayjs','_initUserSync','@univerjs/network','CollaborationSessionService','COMMENT','/list','subscribe','UniverProThreadCommentDatasource','listComments','2568665ERSPmB','UserManagerService','/universer-api/comment/unit/','replyId','Module','filter','@univerjs/core','addComment','Solved','bufferTime','thread-comment-data-source.config','createTimestamp','reply','commentUpdate$','find','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getOwnPropertyDescriptor','updateComment','_threadCommentDataSourceService','UniverNetwork','error','UNRECOGNIZED','HTTPService','/delete','UniverThreadCommentDataSourcePlugin','threadId','4wVfQFs','delete','resolved','toStringTag','_config','slice','getComment','_httpService','Disposable','format','comments','userId','rxjs','map','setConfig','@univerjs/thread-comment'];_0x2e59=function(){return _0x1de1a4;};return _0x2e59();}function _0x110d(_0x28f4bb,_0x1fc91d){const _0x2e59d5=_0x2e59();return _0x110d=function(_0x110d3e,_0x51545f){_0x110d3e=_0x110d3e-0x7e;let _0x577268=_0x2e59d5[_0x110d3e];return _0x577268;},_0x110d(_0x28f4bb,_0x1fc91d);}(function(_0x4612b1,_0x265f85){const _0xd80ef0=_0x110d,_0x1d66a7=_0x4612b1();while(!![]){try{const _0x1c27a4=-parseInt(_0xd80ef0(0x98))/0x1+parseInt(_0xd80ef0(0xac))/0x2*(parseInt(_0xd80ef0(0x81))/0x3)+parseInt(_0xd80ef0(0xea))/0x4*(-parseInt(_0xd80ef0(0x7e))/0x5)+-parseInt(_0xd80ef0(0x103))/0x6*(-parseInt(_0xd80ef0(0xa9))/0x7)+-parseInt(_0xd80ef0(0xfc))/0x8*(-parseInt(_0xd80ef0(0xb6))/0x9)+-parseInt(_0xd80ef0(0x9e))/0xa+parseInt(_0xd80ef0(0xd0))/0xb;if(_0x1c27a4===_0x265f85)break;else _0x1d66a7['push'](_0x1d66a7['shift']());}catch(_0x4e2af2){_0x1d66a7['push'](_0x1d66a7['shift']());}}}(_0x2e59,0xdd177),function(_0x576453,_0x3e43d2){const _0x5e04fb=_0x110d;typeof exports==_0x5e04fb(0xab)&&typeof module<'u'?_0x3e43d2(exports,require('@univerjs-pro/collaboration-client'),require(_0x5e04fb(0xbe)),require(_0x5e04fb(0xd6)),require(_0x5e04fb(0x9f)),require(_0x5e04fb(0xf9)),require('rxjs'),require(_0x5e04fb(0xc9))):typeof define==_0x5e04fb(0x91)&&define['amd']?define([_0x5e04fb(0xba),'@univerjs-pro/collaboration-client','@univerjs-pro/license',_0x5e04fb(0xd6),_0x5e04fb(0x9f),_0x5e04fb(0xf9),_0x5e04fb(0xf6),_0x5e04fb(0xc9)],_0x3e43d2):(_0x576453=typeof globalThis<'u'?globalThis:_0x576453||self,_0x3e43d2(_0x576453[_0x5e04fb(0xce)]={},_0x576453[_0x5e04fb(0xb9)],_0x576453[_0x5e04fb(0xc5)],_0x576453[_0x5e04fb(0xfe)],_0x576453[_0x5e04fb(0xc1)],_0x576453['UniverThreadComment'],_0x576453[_0x5e04fb(0xf6)],_0x576453[_0x5e04fb(0xe3)]));}(this,function(_0x46e8a4,_0x22466d,_0x3ab69a,_0x433b27,_0x2f04bb,_0x158d2c,_0x232b85,_0x314ea6){'use strict';const _0x1d4772=_0x110d;const _0x188ebf=_0x1d4772(0xdf);var _0x32d80a=(_0x4370f9=>(_0x4370f9[_0x4370f9[_0x1d4772(0xa7)]=0x0]=_0x1d4772(0xa7),_0x4370f9[_0x4370f9[_0x1d4772(0xd8)]=0x1]='Solved',_0x4370f9[_0x4370f9[_0x1d4772(0xe5)]=-0x1]=_0x1d4772(0xe5),_0x4370f9))(_0x32d80a||{}),_0x594ec7=(_0x189fcd=>(_0x189fcd[_0x189fcd[_0x1d4772(0x85)]=0x0]=_0x1d4772(0x85),_0x189fcd[_0x189fcd[_0x1d4772(0xff)]=0x1]=_0x1d4772(0xff),_0x189fcd[_0x189fcd[_0x1d4772(0xfd)]=0x2]='Reply',_0x189fcd[_0x189fcd[_0x1d4772(0x7f)]=0x3]=_0x1d4772(0x7f),_0x189fcd[_0x189fcd[_0x1d4772(0xc3)]=0x4]=_0x1d4772(0xc3),_0x189fcd[_0x189fcd[_0x1d4772(0xbf)]=0x5]='Solve',_0x189fcd[_0x189fcd[_0x1d4772(0xe5)]=-0x1]=_0x1d4772(0xe5),_0x189fcd))(_0x594ec7||{});const _0x3bc9ef=_0x58940e=>_0x433b27[_0x1d4772(0xc7)](new Date(+_0x58940e))[_0x1d4772(0xf3)](_0x1d4772(0xc4)),_0x3f4c98=async(_0x129496,_0x121628)=>{const _0x1eba46=_0x1d4772,_0xea4e69=_0x129496[_0x1eba46(0x8a)](_0x433b27[_0x1eba46(0xd1)]),_0x64eb58=_0x129496['get'](_0x314ea6[_0x1eba46(0xe6)]);_0x121628[_0x1eba46(0x90)](_0x506380=>{const _0x1b43f7=_0x1eba46;_0xea4e69[_0x1b43f7(0x9c)](_0x506380)&&_0x121628[_0x1b43f7(0xeb)](_0x506380);}),_0x121628[_0x1eba46(0x104)]&&(await _0x64eb58[_0x1eba46(0x8a)](_0x1eba46(0xb5),{'params':{'userIDs':[..._0x121628]}}))[_0x1eba46(0x9a)]['users']['forEach'](_0xf47aeb=>{_0xf47aeb&&_0xea4e69['addUser'](_0xf47aeb);});};var _0x1970e3=Object[_0x1d4772(0xe0)],_0x1dd895=(_0x412698,_0x59c071,_0x31151b,_0x4e6c33)=>{const _0x4e7587=_0x1d4772;for(var _0x4885dd=_0x4e6c33>0x1?void 0x0:_0x4e6c33?_0x1970e3(_0x59c071,_0x31151b):_0x59c071,_0x5b6d80=_0x412698[_0x4e7587(0x80)]-0x1,_0x3638c1;_0x5b6d80>=0x0;_0x5b6d80--)(_0x3638c1=_0x412698[_0x5b6d80])&&(_0x4885dd=_0x3638c1(_0x4885dd)||_0x4885dd);return _0x4885dd;},_0x2a846a=(_0x297f66,_0x56bb97)=>(_0x279d75,_0x4c87c3)=>_0x56bb97(_0x279d75,_0x4c87c3,_0x297f66);let _0x1ef2cb=class extends _0x433b27['Disposable']{constructor(_0x216cd8,_0x2c6626,_0x235a97,_0x253fc8){const _0xd822fc=_0x1d4772;super(),this['_commentService']=_0x216cd8,this[_0xd822fc(0xb8)]=_0x2c6626,this[_0xd822fc(0x102)]=_0x235a97,this[_0xd822fc(0xfa)]=_0x253fc8,this['_init'](),this['_initUserSync']();}[_0x1d4772(0xc8)](){const _0x43f72=_0x1d4772;this[_0x43f72(0x100)](this[_0x43f72(0xb8)][_0x43f72(0xdd)]['pipe'](_0x232b85[_0x43f72(0xd9)](0x10))[_0x43f72(0xcd)](_0x1aed4a=>{const _0x146c87=_0x43f72,_0x315fe1=new Set();_0x1aed4a[_0x146c87(0x90)](_0x36295d=>{const _0x47c168=_0x146c87;switch(_0x36295d[_0x47c168(0x89)]){case _0x47c168(0x96):{const _0x48b8d0=_0x36295d[_0x47c168(0x95)][_0x47c168(0x86)];_0x315fe1['add'](_0x48b8d0);break;}}}),_0x3f4c98(this[_0x146c87(0xfa)],_0x315fe1);}));}[_0x1d4772(0xb7)](){const _0x2dac06=_0x1d4772;this[_0x2dac06(0x100)](this[_0x2dac06(0xb2)]['commentUpdate$'][_0x2dac06(0xcd)](async _0x1151f5=>{const _0x153595=_0x2dac06;var _0x4b6419,_0x5b2d95,_0x538bcc,_0x18b0dd;const _0x1a262d=(_0x4b6419=this[_0x153595(0xb8)][_0x153595(0xc0)](_0x1151f5['unitId'])[_0x153595(0xde)](_0x193184=>_0x193184['threadId']===_0x1151f5[_0x153595(0xe9)]))==null?void 0x0:_0x4b6419[_0x153595(0xfb)];if(!_0x1a262d)return;const {unitId:_0x3e4abb,subUnitId:_0x38eab4}=_0x1a262d;switch(_0x1151f5[_0x153595(0xbc)]&&this['_userService'][_0x153595(0xa6)](_0x1151f5[_0x153595(0xbc)]),_0x1151f5['type']){case _0x594ec7[_0x153595(0xff)]:break;case _0x594ec7['Reply']:{this[_0x153595(0xb8)][_0x153595(0xd7)](_0x3e4abb,_0x38eab4,{'unitId':_0x3e4abb,'subUnitId':_0x38eab4,'ref':'','id':_0x1151f5['replyId'],'dT':_0x3bc9ef(+_0x1151f5[_0x153595(0xdb)]),'threadId':_0x1151f5[_0x153595(0xe9)],'personId':(_0x538bcc=(_0x5b2d95=_0x1151f5[_0x153595(0xbc)])==null?void 0x0:_0x5b2d95[_0x153595(0xa8)])!=null?_0x538bcc:_0x1151f5[_0x153595(0xf5)],'text':JSON[_0x153595(0x8d)](_0x1151f5['content']),'parentId':_0x1a262d['id']});break;}case _0x594ec7[_0x153595(0xc3)]:{const _0x5d5dbd=this[_0x153595(0xb8)][_0x153595(0xf0)](_0x3e4abb,_0x38eab4,_0x1151f5[_0x153595(0xd3)]);_0x5d5dbd&&_0x5d5dbd['parentId']&&this[_0x153595(0xb8)][_0x153595(0x84)](_0x3e4abb,_0x38eab4,_0x1151f5[_0x153595(0xd3)]);break;}case _0x594ec7['Edit']:{this['_threadCommentModel'][_0x153595(0xe1)](_0x3e4abb,_0x38eab4,{'commentId':_0x1151f5[_0x153595(0xd3)],'text':JSON['parse'](_0x1151f5[_0x153595(0xb0)])});break;}case _0x594ec7[_0x153595(0xbf)]:{const _0x2ce26d=(_0x18b0dd=this[_0x153595(0xb8)][_0x153595(0xc0)](_0x1151f5['unitId'])['find'](_0x986bb0=>_0x986bb0['threadId']===_0x1151f5[_0x153595(0xe9)]))==null?void 0x0:_0x18b0dd[_0x153595(0xfb)];_0x2ce26d&&this['_threadCommentModel'][_0x153595(0x92)](_0x3e4abb,_0x38eab4,_0x2ce26d['id'],_0x1151f5[_0x153595(0x97)]===_0x32d80a[_0x153595(0xd8)]);break;}}}));}};_0x1ef2cb=_0x1dd895([_0x2a846a(0x0,_0x433b27[_0x1d4772(0x93)](_0x22466d['CommentService'])),_0x2a846a(0x1,_0x433b27[_0x1d4772(0x93)](_0x158d2c['ThreadCommentModel'])),_0x2a846a(0x2,_0x433b27[_0x1d4772(0x93)](_0x433b27[_0x1d4772(0xd1)])),_0x2a846a(0x3,_0x433b27[_0x1d4772(0x93)](_0x433b27[_0x1d4772(0x94)]))],_0x1ef2cb);const _0x14a81b=_0x1d4772(0xda),_0x4b4cba={};var _0x4b4807=Object['getOwnPropertyDescriptor'],_0x23d3f5=(_0x4cdfa0,_0x3b787c,_0x34cd98,_0xa161bf)=>{for(var _0x2aab18=_0xa161bf>0x1?void 0x0:_0xa161bf?_0x4b4807(_0x3b787c,_0x34cd98):_0x3b787c,_0x3fe52d=_0x4cdfa0['length']-0x1,_0x37b6c3;_0x3fe52d>=0x0;_0x3fe52d--)(_0x37b6c3=_0x4cdfa0[_0x3fe52d])&&(_0x2aab18=_0x37b6c3(_0x2aab18)||_0x2aab18);return _0x2aab18;},_0x3b7792=(_0x5ec054,_0x421886)=>(_0x3857e5,_0x272619)=>_0x421886(_0x3857e5,_0x272619,_0x5ec054);function _0x370122(_0x2796f1,_0xc3a9d3){const _0x889210=_0x1d4772,_0x11d7cb=_0x2796f1[_0x889210(0xc2)][0x0];return{..._0xc3a9d3,'id':_0x11d7cb[_0x889210(0xd3)],'resolved':_0x2796f1[_0x889210(0x97)]===0x1,'dT':_0x3bc9ef(_0x11d7cb[_0x889210(0xdb)]),'personId':_0x11d7cb[_0x889210(0xf5)],'threadId':_0x11d7cb['threadId']};}function _0x204357(_0x134154,_0x3d6b74,_0x245db1){const _0x32bb58=_0x1d4772;var _0x365ad6,_0x4a59ce;if(((_0x4a59ce=(_0x365ad6=_0x134154==null?void 0x0:_0x134154[_0x32bb58(0xc2)])==null?void 0x0:_0x365ad6[_0x32bb58(0x80)])!=null?_0x4a59ce:0x0)>0x0){const _0x2d57b6=(_0x17fa51,_0x4c5690)=>({'id':_0x17fa51[_0x32bb58(0xd3)],'threadId':_0x17fa51['threadId'],'dT':_0x3bc9ef(_0x17fa51[_0x32bb58(0xdb)]),'personId':_0x17fa51[_0x32bb58(0xf5)],'resolved':_0x134154[_0x32bb58(0x97)]===_0x32d80a[_0x32bb58(0xd8)],'unitId':_0x3d6b74,'subUnitId':_0x245db1,'text':JSON[_0x32bb58(0x8d)](_0x17fa51[_0x32bb58(0xb0)]),'parentId':_0x4c5690}),_0x569586=_0x2d57b6(_0x134154['replies'][0x0]);return{..._0x569586,'children':_0x134154[_0x32bb58(0xc2)][_0x32bb58(0xef)](0x1)[_0x32bb58(0xf7)](_0x179f63=>_0x2d57b6(_0x179f63,_0x569586['id']))};}return null;}let _0x410124=class{constructor(_0x4f68f2,_0x3497f4,_0xe48bb7,_0x24d40e){const _0x30e08c=_0x1d4772;this['_httpService']=_0x4f68f2,this[_0x30e08c(0x102)]=_0x3497f4,this['_sessionService']=_0xe48bb7,this[_0x30e08c(0xfa)]=_0x24d40e;}async[_0x1d4772(0xd7)](_0x23f0b0){const _0x548e51=_0x1d4772;var _0x8884a5,_0x272e40;const {parentId:_0x3f2ee6,unitId:_0x52620d,text:_0x56c212,threadId:_0x347eb4}=_0x23f0b0,_0xba724c=(_0x272e40=(_0x8884a5=_0x56c212[_0x548e51(0xaf)])==null?void 0x0:_0x8884a5[_0x548e51(0xd5)](_0x1e1776=>_0x1e1776[_0x548e51(0x83)]===_0x433b27[_0x548e51(0x82)][_0x548e51(0xcb)])[_0x548e51(0xf7)](_0x3fdea4=>_0x3fdea4[_0x548e51(0xa4)]))!=null?_0x272e40:[],_0x481077=JSON['stringify'](_0x56c212),_0x5b3059=(await this[_0x548e51(0xae)][_0x548e51(0x99)](_0x52620d))[_0x548e51(0x9d)]();if(_0x3f2ee6){const _0x39266b={'memberId':_0x5b3059,'unitId':_0x52620d,'content':_0x481077,'mention':_0xba724c,'threadId':_0x347eb4},_0x279f18=(await this[_0x548e51(0xf1)][_0x548e51(0xbb)](_0x548e51(0xd2)+_0x52620d+_0x548e51(0x88),{'body':_0x39266b}))[_0x548e51(0x9a)][_0x548e51(0xdc)];return{..._0x23f0b0,'id':_0x279f18[_0x548e51(0xd3)],'dT':_0x433b27[_0x548e51(0xc7)](+_0x279f18[_0x548e51(0xdb)])['format'](_0x548e51(0xc4)),'personId':_0x279f18[_0x548e51(0xf5)]};}else{const _0x6f0151={'memberId':_0x5b3059,'unitId':_0x52620d,'content':_0x481077,'mention':_0xba724c},_0x375194=await this[_0x548e51(0xf1)]['post']('/universer-api/comment/unit/'+_0x52620d+_0x548e51(0xaa),{'body':_0x6f0151});return _0x370122(_0x375194[_0x548e51(0x9a)][_0x548e51(0x105)],_0x23f0b0);}}async[_0x1d4772(0xe1)](_0x1548f0){const _0x20dc79=_0x1d4772;var _0x2b68d9,_0x59e52e;const {text:_0x53cc89,unitId:_0xfe669c}=_0x1548f0,_0xa0e11=(_0x59e52e=(_0x2b68d9=_0x53cc89['customRanges'])==null?void 0x0:_0x2b68d9[_0x20dc79(0xd5)](_0x9cfd72=>_0x9cfd72[_0x20dc79(0x83)]===_0x433b27[_0x20dc79(0x82)]['COMMENT'])[_0x20dc79(0xf7)](_0x5af48a=>_0x5af48a[_0x20dc79(0xa4)]))!=null?_0x59e52e:[],_0x1c52f3=JSON['stringify'](_0x53cc89),_0x4fd9ca=_0x1548f0['threadId'],_0xbd54b8=_0x1548f0['id'],_0x43fafd={'memberId':(await this['_sessionService'][_0x20dc79(0x99)](_0xfe669c))[_0x20dc79(0x9d)](),'unitId':_0xfe669c,'threadId':_0x4fd9ca,'mention':_0xa0e11,'content':_0x1c52f3,'replyId':_0xbd54b8},_0x141724=await this['_httpService'][_0x20dc79(0xbb)](_0x20dc79(0xd2)+_0xfe669c+'/edit',{'body':_0x43fafd});return!_0x141724[_0x20dc79(0x9a)][_0x20dc79(0xe4)]||_0x141724['body']['error']['code']===0x1;}async['resolveComment'](_0x273963){const _0x9acd07=_0x1d4772,{unitId:_0x4d1644}=_0x273963,_0x39cf0e=_0x273963['threadId'],_0x279e86={'memberId':this[_0x9acd07(0x102)][_0x9acd07(0xad)]()['userID'],'unitId':_0x4d1644,'threadId':_0x39cf0e,'solved':_0x273963[_0x9acd07(0xec)]?_0x32d80a[_0x9acd07(0xd8)]:_0x32d80a[_0x9acd07(0xa7)]},_0x49aeeb=await this[_0x9acd07(0xf1)][_0x9acd07(0xbb)](_0x9acd07(0xd2)+_0x4d1644+'/solved',{'body':_0x279e86});return!_0x49aeeb[_0x9acd07(0x9a)][_0x9acd07(0xe4)]||_0x49aeeb[_0x9acd07(0x9a)]['error'][_0x9acd07(0xa0)]===0x1;}async[_0x1d4772(0x84)](_0x3fe813,_0x429c98,_0x5c3b92,_0x2d093b){const _0xc5af5f=_0x1d4772,_0x1f1277={'memberId':(await this['_sessionService'][_0xc5af5f(0x99)](_0x3fe813))[_0xc5af5f(0x9d)](),'threadId':_0x5c3b92,'replyId':_0x2d093b,'unitId':_0x3fe813},_0x37b135=await this['_httpService'][_0xc5af5f(0xbb)](_0xc5af5f(0xd2)+_0x3fe813+_0xc5af5f(0xe7),{'body':_0x1f1277});return!_0x37b135[_0xc5af5f(0x9a)][_0xc5af5f(0xe4)]||_0x37b135[_0xc5af5f(0x9a)][_0xc5af5f(0xe4)]['code']===0x1;}async[_0x1d4772(0xcf)](_0x512f23,_0x34147d,_0x46d443){const _0x590bf0=_0x1d4772,_0x37d998={'unitId':_0x512f23,'threadId':_0x46d443},_0x55c93d=await this[_0x590bf0(0xf1)][_0x590bf0(0xbb)](_0x590bf0(0xd2)+_0x512f23+_0x590bf0(0xcc),{'body':_0x37d998}),_0x37eba3=_0x46d443[_0x590bf0(0xf7)](_0x32e9eb=>_0x204357(_0x55c93d[_0x590bf0(0x9a)][_0x590bf0(0xf4)][_0x32e9eb],_0x512f23,_0x34147d))[_0x590bf0(0xd5)](Boolean);return Object[_0x590bf0(0xb3)](_0x55c93d[_0x590bf0(0x9a)]['users'])[_0x590bf0(0x90)](_0x3f746b=>{const _0x360eab=_0x590bf0;this[_0x360eab(0x102)][_0x360eab(0xa6)](_0x3f746b);}),_0x37eba3;}[_0x1d4772(0x8f)](_0x1f2216){const _0x558f6f=_0x1d4772;return{'id':_0x1f2216['id'],'threadId':_0x1f2216[_0x558f6f(0xe9)],'ref':_0x1f2216[_0x558f6f(0xa3)]};}};_0x410124=_0x23d3f5([_0x3b7792(0x0,_0x433b27[_0x1d4772(0x93)](_0x314ea6['HTTPService'])),_0x3b7792(0x1,_0x433b27[_0x1d4772(0x93)](_0x433b27[_0x1d4772(0xd1)])),_0x3b7792(0x2,_0x433b27['Inject'](_0x22466d[_0x1d4772(0xca)])),_0x3b7792(0x3,_0x433b27['Inject'](_0x433b27[_0x1d4772(0x94)]))],_0x410124);var _0x50909f=Object['getOwnPropertyDescriptor'],_0x3088a7=(_0x3c0320,_0x4124cc,_0x6f197f,_0x4eb43f)=>{for(var _0x146d78=_0x4eb43f>0x1?void 0x0:_0x4eb43f?_0x50909f(_0x4124cc,_0x6f197f):_0x4124cc,_0x11d0bb=_0x3c0320['length']-0x1,_0x146b70;_0x11d0bb>=0x0;_0x11d0bb--)(_0x146b70=_0x3c0320[_0x11d0bb])&&(_0x146d78=_0x146b70(_0x146d78)||_0x146d78);return _0x146d78;},_0x11bb19=(_0x4875d7,_0x1fc6b0)=>(_0xada19e,_0x46ac86)=>_0x1fc6b0(_0xada19e,_0x46ac86,_0x4875d7);let _0x5b2df6=class extends _0x433b27[_0x1d4772(0xf2)]{constructor(_0x3fea78,_0x582fe6){const _0x11c099=_0x1d4772;super(),this[_0x11c099(0xe2)]=_0x3fea78,this[_0x11c099(0xbd)]=_0x582fe6,this[_0x11c099(0x9b)]();}[_0x1d4772(0x9b)](){const _0x47315e=_0x1d4772;this[_0x47315e(0xe2)][_0x47315e(0x8c)]=this[_0x47315e(0xbd)],this[_0x47315e(0xe2)]['syncUpdateMutationToColla']=!0x1;}};_0x5b2df6=_0x3088a7([_0x11bb19(0x0,_0x158d2c[_0x1d4772(0x106)]),_0x11bb19(0x1,_0x433b27[_0x1d4772(0x93)](_0x410124))],_0x5b2df6);var _0x3e8add=Object[_0x1d4772(0xa2)],_0x4d9646=Object[_0x1d4772(0xe0)],_0x181827=(_0x47ac88,_0x51f313,_0x228741)=>_0x51f313 in _0x47ac88?_0x3e8add(_0x47ac88,_0x51f313,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x228741}):_0x47ac88[_0x51f313]=_0x228741,_0x5600a8=(_0x3279c0,_0x56b366,_0x4fe542,_0xc9d5e4)=>{const _0x1833f2=_0x1d4772;for(var _0x4b4d61=_0xc9d5e4>0x1?void 0x0:_0xc9d5e4?_0x4d9646(_0x56b366,_0x4fe542):_0x56b366,_0x14a4b4=_0x3279c0[_0x1833f2(0x80)]-0x1,_0x42ba16;_0x14a4b4>=0x0;_0x14a4b4--)(_0x42ba16=_0x3279c0[_0x14a4b4])&&(_0x4b4d61=_0x42ba16(_0x4b4d61)||_0x4b4d61);return _0x4b4d61;},_0x365b26=(_0xd6324c,_0x24d3e7)=>(_0xc4fead,_0x2adba3)=>_0x24d3e7(_0xc4fead,_0x2adba3,_0xd6324c),_0x80cd08=(_0x5a1b5e,_0x5ae52a,_0x2b247a)=>_0x181827(_0x5a1b5e,typeof _0x5ae52a!='symbol'?_0x5ae52a+'':_0x5ae52a,_0x2b247a);_0x46e8a4[_0x1d4772(0xe8)]=class extends _0x433b27['Plugin']{constructor(_0x43f9e8=_0x4b4cba,_0x290b9f,_0x156280){const _0x263bdc=_0x1d4772;super(),this[_0x263bdc(0xee)]=_0x43f9e8,this['_injector']=_0x290b9f,this[_0x263bdc(0xc6)]=_0x156280;const {..._0x48c9d7}=_0x433b27[_0x263bdc(0xa5)]({},_0x4b4cba,this[_0x263bdc(0xee)]);this[_0x263bdc(0xc6)][_0x263bdc(0xf8)](_0x14a81b,_0x48c9d7);}[_0x1d4772(0xa1)](){const _0x17dca5=_0x1d4772;[[_0x410124],[_0x5b2df6],[_0x1ef2cb]][_0x17dca5(0x90)](_0x2cedcf=>{const _0x13359c=_0x17dca5;this[_0x13359c(0xfa)][_0x13359c(0x96)](_0x2cedcf);});}['onReady'](){const _0x166c23=_0x1d4772;this[_0x166c23(0xfa)][_0x166c23(0x8a)](_0x5b2df6),this[_0x166c23(0xfa)][_0x166c23(0x8a)](_0x1ef2cb);}},_0x80cd08(_0x46e8a4[_0x1d4772(0xe8)],_0x1d4772(0xb1),_0x188ebf),_0x80cd08(_0x46e8a4['UniverThreadCommentDataSourcePlugin'],_0x1d4772(0x89),_0x433b27[_0x1d4772(0x8e)]['UNIVER_UNKNOWN']),_0x46e8a4[_0x1d4772(0xe8)]=_0x5600a8([_0x433b27[_0x1d4772(0x8b)](_0x2f04bb[_0x1d4772(0x101)],_0x22466d[_0x1d4772(0xb4)],_0x3ab69a['UniverLicensePlugin']),_0x365b26(0x1,_0x433b27['Inject'](_0x433b27[_0x1d4772(0x94)])),_0x365b26(0x2,_0x433b27[_0x1d4772(0x87)])],_0x46e8a4[_0x1d4772(0xe8)]),Object[_0x1d4772(0xa2)](_0x46e8a4,Symbol[_0x1d4772(0xed)],{'value':_0x1d4772(0xd4)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.7.0-nightly.202505131607",
3
+ "version": "0.7.0",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.7.0-nightly.202505131607",
49
- "@univerjs/core": "0.7.0-nightly.202505131607",
48
+ "@univerjs-pro/collaboration-client": "0.7.0",
49
+ "@univerjs-pro/license": "0.7.0",
50
+ "@univerjs/network": "0.7.0",
50
51
  "@univerjs/protocol": "0.1.46-alpha.3",
51
- "@univerjs-pro/license": "0.7.0-nightly.202505131607",
52
- "@univerjs/thread-comment-ui": "0.7.0-nightly.202505131607",
53
- "@univerjs/thread-comment": "0.7.0-nightly.202505131607",
54
- "@univerjs/network": "0.7.0-nightly.202505131607"
52
+ "@univerjs/thread-comment-ui": "0.7.0",
53
+ "@univerjs/thread-comment": "0.7.0",
54
+ "@univerjs/core": "0.7.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.8.3",
59
59
  "vite": "^6.3.5",
60
60
  "vitest": "^3.1.3",
61
- "@univerjs-infra/shared": "0.7.0-beta.1"
61
+ "@univerjs-infra/shared": "0.7.0"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",