@univerjs-pro/thread-comment-datasource 0.5.3-experimental.20250106-e3b7a39 → 0.5.3-experimental.20250107-3e6579c

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x4449da=_0xc73f;(function(_0xbeff76,_0x102059){const _0x22f8c4=_0xc73f,_0x5d3d4f=_0xbeff76();while(!![]){try{const _0x6ff9a1=-parseInt(_0x22f8c4(0xe5))/0x1+-parseInt(_0x22f8c4(0xbf))/0x2+-parseInt(_0x22f8c4(0x9d))/0x3*(parseInt(_0x22f8c4(0xaf))/0x4)+-parseInt(_0x22f8c4(0xb0))/0x5+-parseInt(_0x22f8c4(0xb2))/0x6+parseInt(_0x22f8c4(0xb7))/0x7*(-parseInt(_0x22f8c4(0xab))/0x8)+parseInt(_0x22f8c4(0xe0))/0x9;if(_0x6ff9a1===_0x102059)break;else _0x5d3d4f['push'](_0x5d3d4f['shift']());}catch(_0xd9809){_0x5d3d4f['push'](_0x5d3d4f['shift']());}}}(_0x43cf,0x20be4));Object[_0x4449da(0x89)](exports,Symbol['toStringTag'],{'value':'Module'});const C=require('@univerjs-pro/collaboration-client'),T=require(_0x4449da(0xd6)),c=require('@univerjs/core'),w=require(_0x4449da(0xe2)),P=require(_0x4449da(0xe8)),U=require('rxjs'),M=require(_0x4449da(0xee)),R=_0x4449da(0xca);var I=(_0x50ae21=>(_0x50ae21[_0x50ae21['OpenOrReOpen']=0x0]=_0x4449da(0xc0),_0x50ae21[_0x50ae21[_0x4449da(0xf6)]=0x1]=_0x4449da(0xf6),_0x50ae21[_0x50ae21['UNRECOGNIZED']=-0x1]=_0x4449da(0xa8),_0x50ae21))(I||{}),v=(_0x402ff5=>(_0x402ff5[_0x402ff5[_0x4449da(0xb9)]=0x0]=_0x4449da(0xb9),_0x402ff5[_0x402ff5[_0x4449da(0x9a)]=0x1]=_0x4449da(0x9a),_0x402ff5[_0x402ff5['Reply']=0x2]=_0x4449da(0x8c),_0x402ff5[_0x402ff5[_0x4449da(0xed)]=0x3]='Edit',_0x402ff5[_0x402ff5[_0x4449da(0xd8)]=0x4]='Delete',_0x402ff5[_0x402ff5[_0x4449da(0xb4)]=0x5]=_0x4449da(0xb4),_0x402ff5[_0x402ff5[_0x4449da(0xa8)]=-0x1]=_0x4449da(0xa8),_0x402ff5))(v||{});function _0xc73f(_0x4b8a8a,_0x2137ef){const _0x43cfaa=_0x43cf();return _0xc73f=function(_0xc73ff5,_0x15704b){_0xc73ff5=_0xc73ff5-0x83;let _0x23310a=_0x43cfaa[_0xc73ff5];return _0x23310a;},_0xc73f(_0x4b8a8a,_0x2137ef);}function _0x43cf(){const _0x4bcebf=['UNIVER_UNKNOWN','_commentService','_threadCommentDataSource','threadId','/add','addComment','addUser','listComments','@univerjs-pro/license','createTimestamp','Delete','type','_init','thread-comment-data-source.config','format','userId','_userService','_injector','8737497OoURim','HTTPService','@univerjs/thread-comment-ui','_config','CollaborationSessionService','234415ltkLDa','comments','length','@univerjs/thread-comment','symbol','rangeType','userID','slice','Edit','@univerjs/network','getUser','CustomRangeType','Inject','_sessionService','deleteComment','map','COMMENT','Solved','getMemberID','onReady','/edit','commentUpdate$','_initUserSync','pipe','defineProperty','rangeId','merge','Reply','values','ThreadCommentModel','Disposable','UniverThreadCommentDataSourcePlugin','_threadCommentDataSourceService','_threadCommentModel','UniverThreadCommentUIPlugin','root','disposeWithMe','_httpService','body','getOwnPropertyDescriptor','_configService','Add','code','parentId','3ZEhvyE','solved','filter','resolved','subscribe','UniverLicensePlugin','updateComment','replyId','bufferTime','users','_initDataSource','UNRECOGNIZED','find','onStarting','464sJvFiw','/reply','customRanges','error','896452duXoeO','154160VAjvaJ','payload','57978woTrQI','post','Solve','stringify','get','23891TspWHv','requireSession','Unknown','/solved','reply','UniverInstanceType','UniverCollaborationClientPlugin','parse','279480NDEtKa','OpenOrReOpen','/universer-api/comment/unit/','replies','Injector','resolveComment','Plugin','UserManagerService','/universer-api/user/list','forEach','user','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getUnit','content','add'];_0x43cf=function(){return _0x4bcebf;};return _0x43cf();}const g=_0x2bef63=>c['dayjs'](new Date(+_0x2bef63))[_0x4449da(0xdc)]('YYYY/MM/DD\x20HH:mm'),$=async(_0x5622f4,_0x126c17)=>{const _0x4a0534=_0x4449da,_0x18a837=_0x5622f4['get'](c['UserManagerService']),_0x8f4990=_0x5622f4[_0x4a0534(0xb6)](M[_0x4a0534(0xe1)]);_0x126c17['forEach'](_0x36ec49=>{const _0xc8f852=_0x4a0534;_0x18a837[_0xc8f852(0xef)](_0x36ec49)&&_0x126c17['delete'](_0x36ec49);}),_0x126c17['size']&&(await _0x8f4990[_0x4a0534(0xb6)](_0x4a0534(0xc7),{'params':{'userIDs':[..._0x126c17]}}))[_0x4a0534(0x97)]['users'][_0x4a0534(0xc8)](_0x4eb19a=>{_0x4eb19a&&_0x18a837['addUser'](_0x4eb19a);});};var E=Object[_0x4449da(0x89)],q=Object[_0x4449da(0x98)],A=(_0x165381,_0x410a98,_0x2fb7c1,_0x2007f9)=>{const _0x5863cb=_0x4449da;for(var _0x52cec4=_0x2007f9>0x1?void 0x0:_0x2007f9?q(_0x410a98,_0x2fb7c1):_0x410a98,_0x26d031=_0x165381[_0x5863cb(0xe7)]-0x1,_0xf666a8;_0x26d031>=0x0;_0x26d031--)(_0xf666a8=_0x165381[_0x26d031])&&(_0x52cec4=(_0x2007f9?_0xf666a8(_0x410a98,_0x2fb7c1,_0x52cec4):_0xf666a8(_0x52cec4))||_0x52cec4);return _0x2007f9&&_0x52cec4&&E(_0x410a98,_0x2fb7c1,_0x52cec4),_0x52cec4;},_=(_0x42eea0,_0x200240)=>(_0xebee76,_0x2d047a)=>_0x200240(_0xebee76,_0x2d047a,_0x42eea0);let S=class extends c['Disposable']{constructor(_0x54b2c3,_0x528ef5,_0x226af3,_0x3d6c40){const _0x24c490=_0x4449da;super(),this[_0x24c490(0xcf)]=_0x54b2c3,this['_threadCommentModel']=_0x528ef5,this['_userService']=_0x226af3,this[_0x24c490(0xdf)]=_0x3d6c40,this['_init'](),this['_initUserSync']();}[_0x4449da(0x87)](){const _0x21ca26=_0x4449da;this[_0x21ca26(0x95)](this[_0x21ca26(0x92)][_0x21ca26(0x86)][_0x21ca26(0x88)](U[_0x21ca26(0xa5)](0x10))['subscribe'](_0x5e848d=>{const _0x104c35=_0x21ca26,_0x3b5323=new Set();_0x5e848d['forEach'](_0x416a52=>{const _0x117618=_0xc73f;switch(_0x416a52[_0x117618(0xd9)]){case'add':{const _0x239607=_0x416a52[_0x117618(0xb1)]['personId'];_0x3b5323[_0x117618(0xcd)](_0x239607);break;}}}),$(this[_0x104c35(0xdf)],_0x3b5323);}));}[_0x4449da(0xda)](){const _0xb707d7=_0x4449da;this[_0xb707d7(0x95)](this[_0xb707d7(0xcf)][_0xb707d7(0x86)][_0xb707d7(0xa1)](async _0x4b9fdf=>{const _0x53262a=_0xb707d7;var _0x33cfb1,_0x2c4525,_0x45df72,_0x2d0192;const _0x1a672b=(_0x33cfb1=this[_0x53262a(0x92)][_0x53262a(0xcb)](_0x4b9fdf['unitId'])['find'](_0x4d54dd=>_0x4d54dd['threadId']===_0x4b9fdf[_0x53262a(0xd1)]))==null?void 0x0:_0x33cfb1[_0x53262a(0x94)];if(!_0x1a672b)return;const {unitId:_0xd89840,subUnitId:_0x1f206d}=_0x1a672b;switch(_0x4b9fdf[_0x53262a(0xc9)]&&this[_0x53262a(0xde)][_0x53262a(0xd4)](_0x4b9fdf[_0x53262a(0xc9)]),_0x4b9fdf[_0x53262a(0xd9)]){case v[_0x53262a(0x9a)]:break;case v[_0x53262a(0x8c)]:{this[_0x53262a(0x92)][_0x53262a(0xd3)](_0xd89840,_0x1f206d,{'unitId':_0xd89840,'subUnitId':_0x1f206d,'ref':'','id':_0x4b9fdf['replyId'],'dT':g(+_0x4b9fdf['createTimestamp']),'threadId':_0x4b9fdf['threadId'],'personId':(_0x45df72=(_0x2c4525=_0x4b9fdf['user'])==null?void 0x0:_0x2c4525[_0x53262a(0xeb)])!=null?_0x45df72:_0x4b9fdf[_0x53262a(0xdd)],'text':JSON[_0x53262a(0xbe)](_0x4b9fdf[_0x53262a(0xcc)]),'parentId':_0x1a672b['id']});break;}case v[_0x53262a(0xd8)]:{const _0x56fb6a=this['_threadCommentModel']['getComment'](_0xd89840,_0x1f206d,_0x4b9fdf[_0x53262a(0xa4)]);_0x56fb6a&&_0x56fb6a[_0x53262a(0x9c)]&&this[_0x53262a(0x92)][_0x53262a(0xf3)](_0xd89840,_0x1f206d,_0x4b9fdf['replyId']);break;}case v[_0x53262a(0xed)]:{this[_0x53262a(0x92)][_0x53262a(0xa3)](_0xd89840,_0x1f206d,{'commentId':_0x4b9fdf['replyId'],'text':JSON[_0x53262a(0xbe)](_0x4b9fdf[_0x53262a(0xcc)])});break;}case v[_0x53262a(0xb4)]:{const _0x5c1ec8=(_0x2d0192=this['_threadCommentModel'][_0x53262a(0xcb)](_0x4b9fdf['unitId'])[_0x53262a(0xa9)](_0x547885=>_0x547885[_0x53262a(0xd1)]===_0x4b9fdf[_0x53262a(0xd1)]))==null?void 0x0:_0x2d0192[_0x53262a(0x94)];_0x5c1ec8&&this[_0x53262a(0x92)][_0x53262a(0xc4)](_0xd89840,_0x1f206d,_0x5c1ec8['id'],_0x4b9fdf[_0x53262a(0x9e)]===I['Solved']);break;}}}));}};S=A([_(0x0,c[_0x4449da(0xf1)](C['CommentService'])),_(0x1,c['Inject'](P[_0x4449da(0x8e)])),_(0x2,c['Inject'](c[_0x4449da(0xc6)])),_(0x3,c[_0x4449da(0xf1)](c[_0x4449da(0xc3)]))],S);const x=_0x4449da(0xdb),D={};var Y=Object[_0x4449da(0x89)],G=Object[_0x4449da(0x98)],H=(_0xafabd9,_0x477707,_0x321717,_0x1218df)=>{for(var _0x1e7ef7=_0x1218df>0x1?void 0x0:_0x1218df?G(_0x477707,_0x321717):_0x477707,_0x4f550d=_0xafabd9['length']-0x1,_0x58e59a;_0x4f550d>=0x0;_0x4f550d--)(_0x58e59a=_0xafabd9[_0x4f550d])&&(_0x1e7ef7=(_0x1218df?_0x58e59a(_0x477707,_0x321717,_0x1e7ef7):_0x58e59a(_0x1e7ef7))||_0x1e7ef7);return _0x1218df&&_0x1e7ef7&&Y(_0x477707,_0x321717,_0x1e7ef7),_0x1e7ef7;},p=(_0x5ae09a,_0x592dda)=>(_0xf46f3c,_0x3b7467)=>_0x592dda(_0xf46f3c,_0x3b7467,_0x5ae09a);function J(_0x2279d7,_0x1ebdf2){const _0x2cd111=_0x4449da,_0x269792=_0x2279d7[_0x2cd111(0xc2)][0x0];return{..._0x1ebdf2,'id':_0x269792[_0x2cd111(0xa4)],'resolved':_0x2279d7[_0x2cd111(0x9e)]===0x1,'dT':g(_0x269792[_0x2cd111(0xd7)]),'personId':_0x269792[_0x2cd111(0xdd)],'threadId':_0x269792[_0x2cd111(0xd1)]};}function F(_0x5774a3,_0x34353b,_0x3ba214){const _0x3dec89=_0x4449da;var _0x47592c,_0x4cf0a9;if(((_0x4cf0a9=(_0x47592c=_0x5774a3==null?void 0x0:_0x5774a3['replies'])==null?void 0x0:_0x47592c[_0x3dec89(0xe7)])!=null?_0x4cf0a9:0x0)>0x0){const _0x7f874b=(_0x1ff52b,_0x27c2e7)=>({'id':_0x1ff52b['replyId'],'threadId':_0x1ff52b['threadId'],'dT':g(_0x1ff52b[_0x3dec89(0xd7)]),'personId':_0x1ff52b['userId'],'resolved':_0x5774a3[_0x3dec89(0x9e)]===I['Solved'],'unitId':_0x34353b,'subUnitId':_0x3ba214,'text':JSON[_0x3dec89(0xbe)](_0x1ff52b[_0x3dec89(0xcc)]),'parentId':_0x27c2e7}),_0x4fdf0d=_0x7f874b(_0x5774a3[_0x3dec89(0xc2)][0x0]);return{..._0x4fdf0d,'children':_0x5774a3[_0x3dec89(0xc2)][_0x3dec89(0xec)](0x1)[_0x3dec89(0xf4)](_0x47730f=>_0x7f874b(_0x47730f,_0x4fdf0d['id']))};}return null;}let f=class{constructor(_0x1de2df,_0x404d00,_0x3aaa48,_0xe9eb94){const _0x139911=_0x4449da;this[_0x139911(0x96)]=_0x1de2df,this[_0x139911(0xde)]=_0x404d00,this[_0x139911(0xf2)]=_0x3aaa48,this[_0x139911(0xdf)]=_0xe9eb94;}async[_0x4449da(0xd3)](_0x58ef71){const _0x11b9bf=_0x4449da;var _0x4153c4,_0x3fc188;const {parentId:_0x462d09,unitId:_0x31aff0,text:_0x162191,threadId:_0x31c5d9}=_0x58ef71,_0x4c5c98=(_0x3fc188=(_0x4153c4=_0x162191[_0x11b9bf(0xad)])==null?void 0x0:_0x4153c4[_0x11b9bf(0x9f)](_0x4418d2=>_0x4418d2[_0x11b9bf(0xea)]===c[_0x11b9bf(0xf0)][_0x11b9bf(0xf5)])[_0x11b9bf(0xf4)](_0x59c46b=>_0x59c46b[_0x11b9bf(0x8a)]))!=null?_0x3fc188:[],_0x5b932c=JSON['stringify'](_0x162191),_0x1ad73c=(await this[_0x11b9bf(0xf2)]['requireSession'](_0x31aff0))['getMemberID']();if(_0x462d09){const _0x586a1c={'memberId':_0x1ad73c,'unitId':_0x31aff0,'content':_0x5b932c,'mention':_0x4c5c98,'threadId':_0x31c5d9},_0x1aab2f=(await this[_0x11b9bf(0x96)][_0x11b9bf(0xb3)](_0x11b9bf(0xc1)+_0x31aff0+_0x11b9bf(0xac),{'body':_0x586a1c}))[_0x11b9bf(0x97)][_0x11b9bf(0xbb)];return{..._0x58ef71,'id':_0x1aab2f[_0x11b9bf(0xa4)],'dT':c['dayjs'](+_0x1aab2f[_0x11b9bf(0xd7)])[_0x11b9bf(0xdc)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1aab2f['userId']};}else{const _0xafd6ff={'memberId':_0x1ad73c,'unitId':_0x31aff0,'content':_0x5b932c,'mention':_0x4c5c98},_0x47ea9b=await this['_httpService'][_0x11b9bf(0xb3)](_0x11b9bf(0xc1)+_0x31aff0+_0x11b9bf(0xd2),{'body':_0xafd6ff});return J(_0x47ea9b['body']['comment'],_0x58ef71);}}async['updateComment'](_0x30eaee){const _0x98997c=_0x4449da;var _0x5dede6,_0x55bfe0;const {text:_0x206904,unitId:_0x58df80}=_0x30eaee,_0x4a2076=(_0x55bfe0=(_0x5dede6=_0x206904[_0x98997c(0xad)])==null?void 0x0:_0x5dede6[_0x98997c(0x9f)](_0x52a5d8=>_0x52a5d8[_0x98997c(0xea)]===c[_0x98997c(0xf0)]['COMMENT'])[_0x98997c(0xf4)](_0x599483=>_0x599483[_0x98997c(0x8a)]))!=null?_0x55bfe0:[],_0x1bb65a=JSON[_0x98997c(0xb5)](_0x206904),_0xb4f5d5=_0x30eaee[_0x98997c(0xd1)],_0x5ca109=_0x30eaee['id'],_0x127b86={'memberId':(await this[_0x98997c(0xf2)][_0x98997c(0xb8)](_0x58df80))[_0x98997c(0x83)](),'unitId':_0x58df80,'threadId':_0xb4f5d5,'mention':_0x4a2076,'content':_0x1bb65a,'replyId':_0x5ca109},_0x5b1026=await this[_0x98997c(0x96)]['post']('/universer-api/comment/unit/'+_0x58df80+_0x98997c(0x85),{'body':_0x127b86});return!_0x5b1026[_0x98997c(0x97)]['error']||_0x5b1026['body']['error'][_0x98997c(0x9b)]===0x1;}async['resolveComment'](_0x50be44){const _0x23ffc2=_0x4449da,{unitId:_0x2c2363}=_0x50be44,_0x50f1c2=_0x50be44[_0x23ffc2(0xd1)],_0x5b9cba={'memberId':this[_0x23ffc2(0xde)]['getCurrentUser']()[_0x23ffc2(0xeb)],'unitId':_0x2c2363,'threadId':_0x50f1c2,'solved':_0x50be44[_0x23ffc2(0xa0)]?I[_0x23ffc2(0xf6)]:I['OpenOrReOpen']},_0x39aa63=await this[_0x23ffc2(0x96)][_0x23ffc2(0xb3)]('/universer-api/comment/unit/'+_0x2c2363+_0x23ffc2(0xba),{'body':_0x5b9cba});return!_0x39aa63['body'][_0x23ffc2(0xae)]||_0x39aa63[_0x23ffc2(0x97)][_0x23ffc2(0xae)][_0x23ffc2(0x9b)]===0x1;}async[_0x4449da(0xf3)](_0x32f392,_0x2bc7b9,_0x15ba97,_0x453821){const _0x479f74=_0x4449da,_0xf2c572={'memberId':(await this[_0x479f74(0xf2)][_0x479f74(0xb8)](_0x32f392))[_0x479f74(0x83)](),'threadId':_0x15ba97,'replyId':_0x453821,'unitId':_0x32f392},_0x1a69f6=await this[_0x479f74(0x96)][_0x479f74(0xb3)]('/universer-api/comment/unit/'+_0x32f392+'/delete',{'body':_0xf2c572});return!_0x1a69f6[_0x479f74(0x97)]['error']||_0x1a69f6['body']['error']['code']===0x1;}async[_0x4449da(0xd5)](_0x3e6633,_0x4bbd13,_0x4b64f3){const _0x16e628=_0x4449da,_0x3ff503={'unitId':_0x3e6633,'threadId':_0x4b64f3},_0x21fbe1=await this['_httpService']['post'](_0x16e628(0xc1)+_0x3e6633+'/list',{'body':_0x3ff503}),_0x25d358=_0x4b64f3[_0x16e628(0xf4)](_0x5ac91b=>F(_0x21fbe1[_0x16e628(0x97)][_0x16e628(0xe6)][_0x5ac91b],_0x3e6633,_0x4bbd13))['filter'](Boolean);return Object[_0x16e628(0x8d)](_0x21fbe1[_0x16e628(0x97)][_0x16e628(0xa6)])['forEach'](_0x23a091=>{const _0x1401b0=_0x16e628;this[_0x1401b0(0xde)][_0x1401b0(0xd4)](_0x23a091);}),_0x25d358;}['saveCommentToSnapshot'](_0x4e0800){return{'id':_0x4e0800['id'],'threadId':_0x4e0800['threadId'],'ref':_0x4e0800['ref']};}};f=H([p(0x0,c[_0x4449da(0xf1)](M[_0x4449da(0xe1)])),p(0x1,c[_0x4449da(0xf1)](c[_0x4449da(0xc6)])),p(0x2,c[_0x4449da(0xf1)](C[_0x4449da(0xe4)])),p(0x3,c[_0x4449da(0xf1)](c['Injector']))],f);var L=Object[_0x4449da(0x89)],Z=Object[_0x4449da(0x98)],W=(_0x4bc478,_0x3b0d74,_0x588403,_0x2657ed)=>{const _0x38afbf=_0x4449da;for(var _0x253749=_0x2657ed>0x1?void 0x0:_0x2657ed?Z(_0x3b0d74,_0x588403):_0x3b0d74,_0x260baa=_0x4bc478[_0x38afbf(0xe7)]-0x1,_0x88a01d;_0x260baa>=0x0;_0x260baa--)(_0x88a01d=_0x4bc478[_0x260baa])&&(_0x253749=(_0x2657ed?_0x88a01d(_0x3b0d74,_0x588403,_0x253749):_0x88a01d(_0x253749))||_0x253749);return _0x2657ed&&_0x253749&&L(_0x3b0d74,_0x588403,_0x253749),_0x253749;},O=(_0x365380,_0x5635b0)=>(_0x445f19,_0x492774)=>_0x5635b0(_0x445f19,_0x492774,_0x365380);let b=class extends c[_0x4449da(0x8f)]{constructor(_0x55c80e,_0x1e6b47){const _0x1c8253=_0x4449da;super(),this['_threadCommentDataSourceService']=_0x55c80e,this[_0x1c8253(0xd0)]=_0x1e6b47,this['_initDataSource']();}[_0x4449da(0xa7)](){const _0x36f6d7=_0x4449da;this[_0x36f6d7(0x91)]['dataSource']=this[_0x36f6d7(0xd0)],this[_0x36f6d7(0x91)]['syncUpdateMutationToColla']=!0x1;}};b=W([O(0x0,P['IThreadCommentDataSourceService']),O(0x1,c[_0x4449da(0xf1)](f))],b);var j=Object[_0x4449da(0x89)],B=Object['getOwnPropertyDescriptor'],K=(_0x1f64d3,_0x5c9327,_0x30a82a)=>_0x5c9327 in _0x1f64d3?j(_0x1f64d3,_0x5c9327,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x30a82a}):_0x1f64d3[_0x5c9327]=_0x30a82a,V=(_0x495429,_0x3cc05f,_0x1c072a,_0x3234f2)=>{for(var _0x355d84=_0x3234f2>0x1?void 0x0:_0x3234f2?B(_0x3cc05f,_0x1c072a):_0x3cc05f,_0x16aedb=_0x495429['length']-0x1,_0x383441;_0x16aedb>=0x0;_0x16aedb--)(_0x383441=_0x495429[_0x16aedb])&&(_0x355d84=(_0x3234f2?_0x383441(_0x3cc05f,_0x1c072a,_0x355d84):_0x383441(_0x355d84))||_0x355d84);return _0x3234f2&&_0x355d84&&j(_0x3cc05f,_0x1c072a,_0x355d84),_0x355d84;},y=(_0x49219f,_0x2ec08b)=>(_0x7217fa,_0x3835b5)=>_0x2ec08b(_0x7217fa,_0x3835b5,_0x49219f),N=(_0x4a5d7c,_0x1f898b,_0x348ec8)=>K(_0x4a5d7c,typeof _0x1f898b!=_0x4449da(0xe9)?_0x1f898b+'':_0x1f898b,_0x348ec8);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x4449da(0xc5)]{constructor(_0xb826f7=D,_0x1d320e,_0x30b663){const _0x2c0a8f=_0x4449da;super(),this[_0x2c0a8f(0xe3)]=_0xb826f7,this[_0x2c0a8f(0xdf)]=_0x1d320e,this[_0x2c0a8f(0x99)]=_0x30b663;const {..._0x1349d2}=c[_0x2c0a8f(0x8b)]({},D,this['_config']);this['_configService']['setConfig'](x,_0x1349d2);}[_0x4449da(0xaa)](){const _0x186154=_0x4449da;[[f],[b],[S]][_0x186154(0xc8)](_0x4cbc19=>{const _0x477b60=_0x186154;this[_0x477b60(0xdf)][_0x477b60(0xcd)](_0x4cbc19);});}[_0x4449da(0x84)](){const _0x173764=_0x4449da;this[_0x173764(0xdf)][_0x173764(0xb6)](b),this['_injector'][_0x173764(0xb6)](S);}},N(exports[_0x4449da(0x90)],'pluginName',R),N(exports[_0x4449da(0x90)],_0x4449da(0xd9),c[_0x4449da(0xbc)][_0x4449da(0xce)]),exports[_0x4449da(0x90)]=V([c['DependentOn'](w[_0x4449da(0x93)],C[_0x4449da(0xbd)],T[_0x4449da(0xa2)]),y(0x1,c[_0x4449da(0xf1)](c['Injector'])),y(0x2,c['IConfigService'])],exports[_0x4449da(0x90)]);
1
+ 'use strict';const _0x1257c8=_0x482f;(function(_0x44e2da,_0x2a1c02){const _0x2d7c90=_0x482f,_0x3ce683=_0x44e2da();while(!![]){try{const _0x14de87=parseInt(_0x2d7c90(0x16b))/0x1+-parseInt(_0x2d7c90(0x163))/0x2*(-parseInt(_0x2d7c90(0x172))/0x3)+parseInt(_0x2d7c90(0x147))/0x4+-parseInt(_0x2d7c90(0x1aa))/0x5*(-parseInt(_0x2d7c90(0x162))/0x6)+parseInt(_0x2d7c90(0x164))/0x7+parseInt(_0x2d7c90(0x1b7))/0x8*(parseInt(_0x2d7c90(0x17c))/0x9)+-parseInt(_0x2d7c90(0x16e))/0xa*(parseInt(_0x2d7c90(0x149))/0xb);if(_0x14de87===_0x2a1c02)break;else _0x3ce683['push'](_0x3ce683['shift']());}catch(_0x2d4e45){_0x3ce683['push'](_0x3ce683['shift']());}}}(_0x298a,0x8a03e));function _0x298a(){const _0x59ac89=['format','UniverInstanceType','addComment','find','parse','/universer-api/comment/unit/','UNIVER_UNKNOWN','DependentOn','saveCommentToSnapshot','replyId','syncUpdateMutationToColla','_commentService','solved','Inject','162iLRZlP','1882yaFMvC','2942366cSBsLa','resolved','parentId','_threadCommentDataSourceService','_httpService','UNRECOGNIZED','getMemberID','183544wyYHOB','Injector','unitId','5156860FbzDRG','users','Delete','pluginName','63uURlUM','personId','_sessionService','customRanges','@univerjs/thread-comment-ui','commentUpdate$','length','_configService','payload','toStringTag','18xWQKEF','code','filter','getOwnPropertyDescriptor','/universer-api/user/list','get','Unknown','COMMENT','forEach','Disposable','ThreadCommentModel','slice','@univerjs/network','Edit','updateComment','dataSource','OpenOrReOpen','delete','dayjs','getComment','type','userId','/add','subscribe','_initDataSource','content','rxjs','onReady','@univerjs/core','CommentService','rangeType','/reply','requireSession','CollaborationSessionService','rangeId','UniverCollaborationClientPlugin','_injector','defineProperty','comment','Add','/delete','_config','post','resolveComment','userID','HTTPService','53720TCJwxk','addUser','/edit','_threadCommentModel','@univerjs/thread-comment','_initUserSync','/solved','Reply','map','error','root','getUnit','YYYY/MM/DD\x20HH:mm','1156384CsEMHy','createTimestamp','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_init','_userService','disposeWithMe','body','Module','Solved','replies','reply','add','Plugin','thread-comment-data-source.config','1575420AVkMek','deleteComment','22xbdlZk','UniverThreadCommentDataSourcePlugin','UserManagerService','_threadCommentDataSource','stringify','merge','Solve','user','IConfigService','threadId','/list'];_0x298a=function(){return _0x59ac89;};return _0x298a();}Object[_0x1257c8(0x1a1)](exports,Symbol[_0x1257c8(0x17b)],{'value':_0x1257c8(0x1be)});const C=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require(_0x1257c8(0x198)),w=require(_0x1257c8(0x176)),P=require(_0x1257c8(0x1ae)),U=require(_0x1257c8(0x196)),M=require(_0x1257c8(0x188)),R=_0x1257c8(0x1b9);var I=(_0x21ccb9=>(_0x21ccb9[_0x21ccb9[_0x1257c8(0x18c)]=0x0]=_0x1257c8(0x18c),_0x21ccb9[_0x21ccb9[_0x1257c8(0x1bf)]=0x1]=_0x1257c8(0x1bf),_0x21ccb9[_0x21ccb9[_0x1257c8(0x169)]=-0x1]=_0x1257c8(0x169),_0x21ccb9))(I||{}),v=(_0x406c20=>(_0x406c20[_0x406c20[_0x1257c8(0x182)]=0x0]='Unknown',_0x406c20[_0x406c20[_0x1257c8(0x1a3)]=0x1]=_0x1257c8(0x1a3),_0x406c20[_0x406c20[_0x1257c8(0x1b1)]=0x2]=_0x1257c8(0x1b1),_0x406c20[_0x406c20['Edit']=0x3]=_0x1257c8(0x189),_0x406c20[_0x406c20[_0x1257c8(0x170)]=0x4]=_0x1257c8(0x170),_0x406c20[_0x406c20[_0x1257c8(0x14f)]=0x5]='Solve',_0x406c20[_0x406c20[_0x1257c8(0x169)]=-0x1]='UNRECOGNIZED',_0x406c20))(v||{});const g=_0x1428e3=>c[_0x1257c8(0x18e)](new Date(+_0x1428e3))[_0x1257c8(0x154)](_0x1257c8(0x1b6)),$=async(_0x2517a2,_0x4a8fc1)=>{const _0x5c3a28=_0x1257c8,_0x15c381=_0x2517a2[_0x5c3a28(0x181)](c[_0x5c3a28(0x14b)]),_0x5d55bb=_0x2517a2[_0x5c3a28(0x181)](M[_0x5c3a28(0x1a9)]);_0x4a8fc1['forEach'](_0x2d79f6=>{const _0xb81d18=_0x5c3a28;_0x15c381['getUser'](_0x2d79f6)&&_0x4a8fc1[_0xb81d18(0x18d)](_0x2d79f6);}),_0x4a8fc1['size']&&(await _0x5d55bb[_0x5c3a28(0x181)](_0x5c3a28(0x180),{'params':{'userIDs':[..._0x4a8fc1]}}))[_0x5c3a28(0x1bd)][_0x5c3a28(0x16f)]['forEach'](_0x3241d0=>{const _0x1aee6e=_0x5c3a28;_0x3241d0&&_0x15c381[_0x1aee6e(0x1ab)](_0x3241d0);});};var E=Object['defineProperty'],q=Object['getOwnPropertyDescriptor'],A=(_0x25ac2e,_0x16b378,_0x40abcc,_0x4da320)=>{for(var _0x64bf86=_0x4da320>0x1?void 0x0:_0x4da320?q(_0x16b378,_0x40abcc):_0x16b378,_0x160943=_0x25ac2e['length']-0x1,_0xa720c7;_0x160943>=0x0;_0x160943--)(_0xa720c7=_0x25ac2e[_0x160943])&&(_0x64bf86=(_0x4da320?_0xa720c7(_0x16b378,_0x40abcc,_0x64bf86):_0xa720c7(_0x64bf86))||_0x64bf86);return _0x4da320&&_0x64bf86&&E(_0x16b378,_0x40abcc,_0x64bf86),_0x64bf86;},_=(_0x5aa892,_0x1abc04)=>(_0x21348a,_0x25b734)=>_0x1abc04(_0x21348a,_0x25b734,_0x5aa892);let S=class extends c[_0x1257c8(0x185)]{constructor(_0x2a3051,_0x35650a,_0x5bcc83,_0x4cd022){const _0x1f31da=_0x1257c8;super(),this['_commentService']=_0x2a3051,this[_0x1f31da(0x1ad)]=_0x35650a,this['_userService']=_0x5bcc83,this[_0x1f31da(0x1a0)]=_0x4cd022,this[_0x1f31da(0x1ba)](),this['_initUserSync']();}[_0x1257c8(0x1af)](){const _0x576f62=_0x1257c8;this[_0x576f62(0x1bc)](this[_0x576f62(0x1ad)][_0x576f62(0x177)]['pipe'](U['bufferTime'](0x10))[_0x576f62(0x193)](_0x3fdeac=>{const _0x7166e5=_0x576f62,_0x595855=new Set();_0x3fdeac[_0x7166e5(0x184)](_0x210f3d=>{const _0x450292=_0x7166e5;switch(_0x210f3d[_0x450292(0x190)]){case'add':{const _0x256344=_0x210f3d[_0x450292(0x17a)][_0x450292(0x173)];_0x595855[_0x450292(0x144)](_0x256344);break;}}}),$(this[_0x7166e5(0x1a0)],_0x595855);}));}[_0x1257c8(0x1ba)](){const _0x260cb7=_0x1257c8;this[_0x260cb7(0x1bc)](this[_0x260cb7(0x15f)][_0x260cb7(0x177)][_0x260cb7(0x193)](async _0x20e57e=>{const _0x3dd460=_0x260cb7;var _0x4d5b1d,_0x2a6044,_0x412de1,_0x41fd02;const _0x9f0f38=(_0x4d5b1d=this[_0x3dd460(0x1ad)][_0x3dd460(0x1b5)](_0x20e57e[_0x3dd460(0x16d)])[_0x3dd460(0x157)](_0x4fe8fd=>_0x4fe8fd[_0x3dd460(0x152)]===_0x20e57e[_0x3dd460(0x152)]))==null?void 0x0:_0x4d5b1d[_0x3dd460(0x1b4)];if(!_0x9f0f38)return;const {unitId:_0x451f87,subUnitId:_0x16ee68}=_0x9f0f38;switch(_0x20e57e[_0x3dd460(0x150)]&&this[_0x3dd460(0x1bb)]['addUser'](_0x20e57e[_0x3dd460(0x150)]),_0x20e57e[_0x3dd460(0x190)]){case v[_0x3dd460(0x1a3)]:break;case v[_0x3dd460(0x1b1)]:{this[_0x3dd460(0x1ad)]['addComment'](_0x451f87,_0x16ee68,{'unitId':_0x451f87,'subUnitId':_0x16ee68,'ref':'','id':_0x20e57e[_0x3dd460(0x15d)],'dT':g(+_0x20e57e[_0x3dd460(0x1b8)]),'threadId':_0x20e57e[_0x3dd460(0x152)],'personId':(_0x412de1=(_0x2a6044=_0x20e57e[_0x3dd460(0x150)])==null?void 0x0:_0x2a6044[_0x3dd460(0x1a8)])!=null?_0x412de1:_0x20e57e['userId'],'text':JSON[_0x3dd460(0x158)](_0x20e57e[_0x3dd460(0x195)]),'parentId':_0x9f0f38['id']});break;}case v[_0x3dd460(0x170)]:{const _0xf02c7c=this['_threadCommentModel'][_0x3dd460(0x18f)](_0x451f87,_0x16ee68,_0x20e57e[_0x3dd460(0x15d)]);_0xf02c7c&&_0xf02c7c[_0x3dd460(0x166)]&&this['_threadCommentModel'][_0x3dd460(0x148)](_0x451f87,_0x16ee68,_0x20e57e[_0x3dd460(0x15d)]);break;}case v[_0x3dd460(0x189)]:{this[_0x3dd460(0x1ad)][_0x3dd460(0x18a)](_0x451f87,_0x16ee68,{'commentId':_0x20e57e[_0x3dd460(0x15d)],'text':JSON[_0x3dd460(0x158)](_0x20e57e[_0x3dd460(0x195)])});break;}case v[_0x3dd460(0x14f)]:{const _0x30cdd3=(_0x41fd02=this[_0x3dd460(0x1ad)]['getUnit'](_0x20e57e[_0x3dd460(0x16d)])['find'](_0x5e669a=>_0x5e669a[_0x3dd460(0x152)]===_0x20e57e['threadId']))==null?void 0x0:_0x41fd02[_0x3dd460(0x1b4)];_0x30cdd3&&this[_0x3dd460(0x1ad)][_0x3dd460(0x1a7)](_0x451f87,_0x16ee68,_0x30cdd3['id'],_0x20e57e[_0x3dd460(0x160)]===I[_0x3dd460(0x1bf)]);break;}}}));}};S=A([_(0x0,c['Inject'](C[_0x1257c8(0x199)])),_(0x1,c[_0x1257c8(0x161)](P[_0x1257c8(0x186)])),_(0x2,c[_0x1257c8(0x161)](c[_0x1257c8(0x14b)])),_(0x3,c[_0x1257c8(0x161)](c[_0x1257c8(0x16c)]))],S);function _0x482f(_0x347c05,_0x4585c2){const _0x298a16=_0x298a();return _0x482f=function(_0x482f89,_0x524bf1){_0x482f89=_0x482f89-0x142;let _0x4f1b8a=_0x298a16[_0x482f89];return _0x4f1b8a;},_0x482f(_0x347c05,_0x4585c2);}const x=_0x1257c8(0x146),D={};var Y=Object[_0x1257c8(0x1a1)],G=Object['getOwnPropertyDescriptor'],H=(_0xafdd8e,_0x370637,_0x451b44,_0x3dcc92)=>{const _0x297a20=_0x1257c8;for(var _0x226d6c=_0x3dcc92>0x1?void 0x0:_0x3dcc92?G(_0x370637,_0x451b44):_0x370637,_0x3f221e=_0xafdd8e[_0x297a20(0x178)]-0x1,_0x22aa79;_0x3f221e>=0x0;_0x3f221e--)(_0x22aa79=_0xafdd8e[_0x3f221e])&&(_0x226d6c=(_0x3dcc92?_0x22aa79(_0x370637,_0x451b44,_0x226d6c):_0x22aa79(_0x226d6c))||_0x226d6c);return _0x3dcc92&&_0x226d6c&&Y(_0x370637,_0x451b44,_0x226d6c),_0x226d6c;},p=(_0x12acd5,_0x47d80c)=>(_0x1b20b6,_0x4595e9)=>_0x47d80c(_0x1b20b6,_0x4595e9,_0x12acd5);function J(_0x42d07e,_0x50ad64){const _0x259268=_0x1257c8,_0x538097=_0x42d07e[_0x259268(0x142)][0x0];return{..._0x50ad64,'id':_0x538097[_0x259268(0x15d)],'resolved':_0x42d07e[_0x259268(0x160)]===0x1,'dT':g(_0x538097[_0x259268(0x1b8)]),'personId':_0x538097[_0x259268(0x191)],'threadId':_0x538097['threadId']};}function F(_0x2540d1,_0x2fdb70,_0x44d834){const _0x2bbd01=_0x1257c8;var _0x9a9302,_0x383f2e;if(((_0x383f2e=(_0x9a9302=_0x2540d1==null?void 0x0:_0x2540d1[_0x2bbd01(0x142)])==null?void 0x0:_0x9a9302[_0x2bbd01(0x178)])!=null?_0x383f2e:0x0)>0x0){const _0x11809c=(_0x2f0029,_0x478af6)=>({'id':_0x2f0029[_0x2bbd01(0x15d)],'threadId':_0x2f0029[_0x2bbd01(0x152)],'dT':g(_0x2f0029['createTimestamp']),'personId':_0x2f0029['userId'],'resolved':_0x2540d1['solved']===I['Solved'],'unitId':_0x2fdb70,'subUnitId':_0x44d834,'text':JSON[_0x2bbd01(0x158)](_0x2f0029[_0x2bbd01(0x195)]),'parentId':_0x478af6}),_0x48045d=_0x11809c(_0x2540d1['replies'][0x0]);return{..._0x48045d,'children':_0x2540d1[_0x2bbd01(0x142)][_0x2bbd01(0x187)](0x1)[_0x2bbd01(0x1b2)](_0x3e2925=>_0x11809c(_0x3e2925,_0x48045d['id']))};}return null;}let f=class{constructor(_0x4600c4,_0x175f97,_0x1d6cd1,_0x34e264){const _0x2cf6d0=_0x1257c8;this['_httpService']=_0x4600c4,this[_0x2cf6d0(0x1bb)]=_0x175f97,this[_0x2cf6d0(0x174)]=_0x1d6cd1,this[_0x2cf6d0(0x1a0)]=_0x34e264;}async[_0x1257c8(0x156)](_0xb8d66){const _0x2ce409=_0x1257c8;var _0x55d010,_0xbd252;const {parentId:_0x28d959,unitId:_0x8f74f2,text:_0x38e91f,threadId:_0x126eb4}=_0xb8d66,_0x2880e3=(_0xbd252=(_0x55d010=_0x38e91f[_0x2ce409(0x175)])==null?void 0x0:_0x55d010[_0x2ce409(0x17e)](_0x522288=>_0x522288[_0x2ce409(0x19a)]===c['CustomRangeType']['COMMENT'])['map'](_0x4e3f34=>_0x4e3f34[_0x2ce409(0x19e)]))!=null?_0xbd252:[],_0x44c3b6=JSON[_0x2ce409(0x14d)](_0x38e91f),_0x111f33=(await this[_0x2ce409(0x174)][_0x2ce409(0x19c)](_0x8f74f2))['getMemberID']();if(_0x28d959){const _0x42a729={'memberId':_0x111f33,'unitId':_0x8f74f2,'content':_0x44c3b6,'mention':_0x2880e3,'threadId':_0x126eb4},_0x108d8a=(await this[_0x2ce409(0x168)]['post']('/universer-api/comment/unit/'+_0x8f74f2+_0x2ce409(0x19b),{'body':_0x42a729}))[_0x2ce409(0x1bd)][_0x2ce409(0x143)];return{..._0xb8d66,'id':_0x108d8a[_0x2ce409(0x15d)],'dT':c[_0x2ce409(0x18e)](+_0x108d8a[_0x2ce409(0x1b8)])['format'](_0x2ce409(0x1b6)),'personId':_0x108d8a[_0x2ce409(0x191)]};}else{const _0x27f4cd={'memberId':_0x111f33,'unitId':_0x8f74f2,'content':_0x44c3b6,'mention':_0x2880e3},_0x22fbee=await this[_0x2ce409(0x168)]['post'](_0x2ce409(0x159)+_0x8f74f2+_0x2ce409(0x192),{'body':_0x27f4cd});return J(_0x22fbee[_0x2ce409(0x1bd)][_0x2ce409(0x1a2)],_0xb8d66);}}async['updateComment'](_0x2aef20){const _0x18cd01=_0x1257c8;var _0x12dae0,_0x5a9ecf;const {text:_0x17f2f6,unitId:_0x520671}=_0x2aef20,_0x11727e=(_0x5a9ecf=(_0x12dae0=_0x17f2f6[_0x18cd01(0x175)])==null?void 0x0:_0x12dae0['filter'](_0x4d53c7=>_0x4d53c7[_0x18cd01(0x19a)]===c['CustomRangeType'][_0x18cd01(0x183)])[_0x18cd01(0x1b2)](_0x175b20=>_0x175b20[_0x18cd01(0x19e)]))!=null?_0x5a9ecf:[],_0x2836b1=JSON[_0x18cd01(0x14d)](_0x17f2f6),_0xd38d72=_0x2aef20[_0x18cd01(0x152)],_0x445fd1=_0x2aef20['id'],_0x5e3b82={'memberId':(await this[_0x18cd01(0x174)]['requireSession'](_0x520671))[_0x18cd01(0x16a)](),'unitId':_0x520671,'threadId':_0xd38d72,'mention':_0x11727e,'content':_0x2836b1,'replyId':_0x445fd1},_0x4ffba4=await this[_0x18cd01(0x168)][_0x18cd01(0x1a6)]('/universer-api/comment/unit/'+_0x520671+_0x18cd01(0x1ac),{'body':_0x5e3b82});return!_0x4ffba4['body'][_0x18cd01(0x1b3)]||_0x4ffba4[_0x18cd01(0x1bd)]['error'][_0x18cd01(0x17d)]===0x1;}async['resolveComment'](_0x493977){const _0x46b77c=_0x1257c8,{unitId:_0x695827}=_0x493977,_0x185293=_0x493977['threadId'],_0x589869={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x695827,'threadId':_0x185293,'solved':_0x493977[_0x46b77c(0x165)]?I[_0x46b77c(0x1bf)]:I['OpenOrReOpen']},_0x37b96d=await this[_0x46b77c(0x168)]['post'](_0x46b77c(0x159)+_0x695827+_0x46b77c(0x1b0),{'body':_0x589869});return!_0x37b96d[_0x46b77c(0x1bd)]['error']||_0x37b96d[_0x46b77c(0x1bd)][_0x46b77c(0x1b3)][_0x46b77c(0x17d)]===0x1;}async[_0x1257c8(0x148)](_0x5479a4,_0x1ab240,_0x2fa2da,_0xf46ab5){const _0x43afd0=_0x1257c8,_0x4f6c94={'memberId':(await this[_0x43afd0(0x174)][_0x43afd0(0x19c)](_0x5479a4))[_0x43afd0(0x16a)](),'threadId':_0x2fa2da,'replyId':_0xf46ab5,'unitId':_0x5479a4},_0xb1e6c3=await this[_0x43afd0(0x168)][_0x43afd0(0x1a6)](_0x43afd0(0x159)+_0x5479a4+_0x43afd0(0x1a4),{'body':_0x4f6c94});return!_0xb1e6c3['body'][_0x43afd0(0x1b3)]||_0xb1e6c3[_0x43afd0(0x1bd)][_0x43afd0(0x1b3)]['code']===0x1;}async['listComments'](_0x5bf161,_0x27207e,_0x3dcd74){const _0x38781e=_0x1257c8,_0x4a7bfe={'unitId':_0x5bf161,'threadId':_0x3dcd74},_0x4c71f7=await this[_0x38781e(0x168)]['post'](_0x38781e(0x159)+_0x5bf161+_0x38781e(0x153),{'body':_0x4a7bfe}),_0x19f293=_0x3dcd74[_0x38781e(0x1b2)](_0x2de5ca=>F(_0x4c71f7['body']['comments'][_0x2de5ca],_0x5bf161,_0x27207e))[_0x38781e(0x17e)](Boolean);return Object['values'](_0x4c71f7[_0x38781e(0x1bd)][_0x38781e(0x16f)])[_0x38781e(0x184)](_0xdbdedb=>{const _0x50746a=_0x38781e;this[_0x50746a(0x1bb)]['addUser'](_0xdbdedb);}),_0x19f293;}[_0x1257c8(0x15c)](_0x2be70f){const _0x1c291f=_0x1257c8;return{'id':_0x2be70f['id'],'threadId':_0x2be70f[_0x1c291f(0x152)],'ref':_0x2be70f['ref']};}};f=H([p(0x0,c[_0x1257c8(0x161)](M[_0x1257c8(0x1a9)])),p(0x1,c[_0x1257c8(0x161)](c[_0x1257c8(0x14b)])),p(0x2,c[_0x1257c8(0x161)](C[_0x1257c8(0x19d)])),p(0x3,c[_0x1257c8(0x161)](c[_0x1257c8(0x16c)]))],f);var L=Object[_0x1257c8(0x1a1)],Z=Object[_0x1257c8(0x17f)],W=(_0x2724e4,_0x114fd9,_0x26a5e9,_0x253df8)=>{const _0xcca58d=_0x1257c8;for(var _0x48b621=_0x253df8>0x1?void 0x0:_0x253df8?Z(_0x114fd9,_0x26a5e9):_0x114fd9,_0x5a2dbd=_0x2724e4[_0xcca58d(0x178)]-0x1,_0x1aba03;_0x5a2dbd>=0x0;_0x5a2dbd--)(_0x1aba03=_0x2724e4[_0x5a2dbd])&&(_0x48b621=(_0x253df8?_0x1aba03(_0x114fd9,_0x26a5e9,_0x48b621):_0x1aba03(_0x48b621))||_0x48b621);return _0x253df8&&_0x48b621&&L(_0x114fd9,_0x26a5e9,_0x48b621),_0x48b621;},O=(_0x274c21,_0x143952)=>(_0x34fbc6,_0x2cdbe4)=>_0x143952(_0x34fbc6,_0x2cdbe4,_0x274c21);let b=class extends c['Disposable']{constructor(_0x4b2135,_0x5afb8f){const _0x3e3596=_0x1257c8;super(),this[_0x3e3596(0x167)]=_0x4b2135,this[_0x3e3596(0x14c)]=_0x5afb8f,this[_0x3e3596(0x194)]();}[_0x1257c8(0x194)](){const _0x3dc640=_0x1257c8;this['_threadCommentDataSourceService'][_0x3dc640(0x18b)]=this[_0x3dc640(0x14c)],this[_0x3dc640(0x167)][_0x3dc640(0x15e)]=!0x1;}};b=W([O(0x0,P['IThreadCommentDataSourceService']),O(0x1,c[_0x1257c8(0x161)](f))],b);var j=Object[_0x1257c8(0x1a1)],B=Object[_0x1257c8(0x17f)],K=(_0xff556e,_0x114d97,_0x265832)=>_0x114d97 in _0xff556e?j(_0xff556e,_0x114d97,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x265832}):_0xff556e[_0x114d97]=_0x265832,V=(_0x331fdf,_0xc4d661,_0x5612d6,_0x3b96df)=>{const _0x29db09=_0x1257c8;for(var _0x3d2777=_0x3b96df>0x1?void 0x0:_0x3b96df?B(_0xc4d661,_0x5612d6):_0xc4d661,_0x573eba=_0x331fdf[_0x29db09(0x178)]-0x1,_0x51d91f;_0x573eba>=0x0;_0x573eba--)(_0x51d91f=_0x331fdf[_0x573eba])&&(_0x3d2777=(_0x3b96df?_0x51d91f(_0xc4d661,_0x5612d6,_0x3d2777):_0x51d91f(_0x3d2777))||_0x3d2777);return _0x3b96df&&_0x3d2777&&j(_0xc4d661,_0x5612d6,_0x3d2777),_0x3d2777;},y=(_0x31e038,_0x5aa304)=>(_0x21ec9e,_0x8cf3af)=>_0x5aa304(_0x21ec9e,_0x8cf3af,_0x31e038),N=(_0x509c93,_0x43fe54,_0x40a000)=>K(_0x509c93,typeof _0x43fe54!='symbol'?_0x43fe54+'':_0x43fe54,_0x40a000);exports[_0x1257c8(0x14a)]=class extends c[_0x1257c8(0x145)]{constructor(_0x561562=D,_0xee29b9,_0x2b057a){const _0x590c82=_0x1257c8;super(),this[_0x590c82(0x1a5)]=_0x561562,this['_injector']=_0xee29b9,this[_0x590c82(0x179)]=_0x2b057a;const {..._0x203788}=c[_0x590c82(0x14e)]({},D,this[_0x590c82(0x1a5)]);this[_0x590c82(0x179)]['setConfig'](x,_0x203788);}['onStarting'](){const _0x4dbac4=_0x1257c8;[[f],[b],[S]][_0x4dbac4(0x184)](_0x154bb0=>{const _0x5a25ee=_0x4dbac4;this[_0x5a25ee(0x1a0)][_0x5a25ee(0x144)](_0x154bb0);});}[_0x1257c8(0x197)](){const _0x38dbe3=_0x1257c8;this['_injector']['get'](b),this[_0x38dbe3(0x1a0)][_0x38dbe3(0x181)](S);}},N(exports[_0x1257c8(0x14a)],_0x1257c8(0x171),R),N(exports[_0x1257c8(0x14a)],'type',c[_0x1257c8(0x155)][_0x1257c8(0x15a)]),exports[_0x1257c8(0x14a)]=V([c[_0x1257c8(0x15b)](w['UniverThreadCommentUIPlugin'],C[_0x1257c8(0x19f)],T['UniverLicensePlugin']),y(0x1,c[_0x1257c8(0x161)](c[_0x1257c8(0x16c)])),y(0x2,c[_0x1257c8(0x151)])],exports[_0x1257c8(0x14a)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x483a87=_0x4978;(function(_0x2ed3fe,_0x2da360){const _0xaef6f8=_0x4978,_0x1d91e3=_0x2ed3fe();while(!![]){try{const _0x45df9e=parseInt(_0xaef6f8(0xbf))/0x1+parseInt(_0xaef6f8(0xe5))/0x2+-parseInt(_0xaef6f8(0xa0))/0x3+-parseInt(_0xaef6f8(0xb8))/0x4+-parseInt(_0xaef6f8(0xaf))/0x5*(-parseInt(_0xaef6f8(0x94))/0x6)+parseInt(_0xaef6f8(0xc1))/0x7+-parseInt(_0xaef6f8(0xd9))/0x8;if(_0x45df9e===_0x2da360)break;else _0x1d91e3['push'](_0x1d91e3['shift']());}catch(_0x17693d){_0x1d91e3['push'](_0x1d91e3['shift']());}}}(_0x5bb2,0x553a0));import{CommentService as _0xea8c4d,CollaborationSessionService as _0xf43820,UniverCollaborationClientPlugin as _0x53f4e0}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4d0fa9}from'@univerjs-pro/license';function _0x5bb2(){const _0x4f0d10=['parse','COMMENT','syncUpdateMutationToColla','addComment','Edit','error','createTimestamp','dataSource','values','get','reply','rangeType','rangeId','post','resolved','3555024wJbOUf','user','slice','_configService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_userService','resolveComment','_config','type','/delete','personId','/reply','844804RZFfmX','Add','getUser','Delete','threadId','_threadCommentDataSource','payload','onStarting','stringify','/add','root','subscribe','Reply','getComment','_init','_initDataSource','add','requireSession','pipe','/solved','disposeWithMe','_initUserSync','94086dpIIdY','updateComment','find','forEach','UNRECOGNIZED','_threadCommentDataSourceService','format','replyId','_injector','defineProperty','users','_threadCommentModel','1373508fbgOpI','thread-comment-data-source.config','customRanges','commentUpdate$','_sessionService','Solve','YYYY/MM/DD\x20HH:mm','/universer-api/comment/unit/','getMemberID','getOwnPropertyDescriptor','_httpService','/universer-api/user/list','getUnit','getCurrentUser','map','55LmpZYG','_commentService','size','Unknown','Solved','userID','content','solved','replies','101492AXVFKB','length','OpenOrReOpen','code','symbol','filter','setConfig','487372mShWom','UNIVER_UNKNOWN','1360870aYEtKQ','onReady','userId','deleteComment','saveCommentToSnapshot','addUser','/edit','/list','body'];_0x5bb2=function(){return _0x4f0d10;};return _0x5bb2();}import{dayjs as _0x5ac57a,UserManagerService as _0x4b74f8,Inject as _0x1c3f7e,Injector as _0x333bd3,Disposable as _0x2cb0ba,CustomRangeType as _0x1dbbcc,UniverInstanceType as _0x310767,DependentOn as _0x305b34,Plugin as _0x3efe4c,merge as _0x1947cd,IConfigService as _0x58d764}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x22cb8}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x319e88,IThreadCommentDataSourceService as _0x35b8ff}from'@univerjs/thread-comment';import{bufferTime as _0x21ee96}from'rxjs';import{HTTPService as _0x33040e}from'@univerjs/network';const B=_0x483a87(0xdd);var v=(_0x158edc=>(_0x158edc[_0x158edc[_0x483a87(0xba)]=0x0]=_0x483a87(0xba),_0x158edc[_0x158edc[_0x483a87(0xb3)]=0x1]=_0x483a87(0xb3),_0x158edc[_0x158edc[_0x483a87(0x98)]=-0x1]=_0x483a87(0x98),_0x158edc))(v||{}),p=(_0x18486a=>(_0x18486a[_0x18486a[_0x483a87(0xb2)]=0x0]=_0x483a87(0xb2),_0x18486a[_0x18486a[_0x483a87(0xe6)]=0x1]=_0x483a87(0xe6),_0x18486a[_0x18486a[_0x483a87(0xf1)]=0x2]=_0x483a87(0xf1),_0x18486a[_0x18486a[_0x483a87(0xce)]=0x3]='Edit',_0x18486a[_0x18486a[_0x483a87(0xe8)]=0x4]='Delete',_0x18486a[_0x18486a['Solve']=0x5]=_0x483a87(0xa5),_0x18486a[_0x18486a['UNRECOGNIZED']=-0x1]=_0x483a87(0x98),_0x18486a))(p||{});const O=_0x33ad30=>_0x5ac57a(new Date(+_0x33ad30))[_0x483a87(0x9a)]('YYYY/MM/DD\x20HH:mm'),K=async(_0x8fd83d,_0x45ae9f)=>{const _0x4674be=_0x483a87,_0x599b96=_0x8fd83d[_0x4674be(0xd3)](_0x4b74f8),_0x1d3c17=_0x8fd83d[_0x4674be(0xd3)](_0x33040e);_0x45ae9f['forEach'](_0x292593=>{const _0x1855a2=_0x4674be;_0x599b96[_0x1855a2(0xe7)](_0x292593)&&_0x45ae9f['delete'](_0x292593);}),_0x45ae9f[_0x4674be(0xb1)]&&(await _0x1d3c17[_0x4674be(0xd3)](_0x4674be(0xab),{'params':{'userIDs':[..._0x45ae9f]}}))[_0x4674be(0xc9)]['users']['forEach'](_0x4df09a=>{const _0x10cd21=_0x4674be;_0x4df09a&&_0x599b96[_0x10cd21(0xc6)](_0x4df09a);});};var V=Object['defineProperty'],z=Object[_0x483a87(0xa9)],Q=(_0x26e3b5,_0x44d901,_0x2f5a15,_0x4d0978)=>{const _0x39d81e=_0x483a87;for(var _0x27123f=_0x4d0978>0x1?void 0x0:_0x4d0978?z(_0x44d901,_0x2f5a15):_0x44d901,_0x1da4c1=_0x26e3b5[_0x39d81e(0xb9)]-0x1,_0x491e37;_0x1da4c1>=0x0;_0x1da4c1--)(_0x491e37=_0x26e3b5[_0x1da4c1])&&(_0x27123f=(_0x4d0978?_0x491e37(_0x44d901,_0x2f5a15,_0x27123f):_0x491e37(_0x27123f))||_0x27123f);return _0x4d0978&&_0x27123f&&V(_0x44d901,_0x2f5a15,_0x27123f),_0x27123f;},_=(_0x506023,_0x4af030)=>(_0x4f06d6,_0x37aa7f)=>_0x4af030(_0x4f06d6,_0x37aa7f,_0x506023);let f=class extends _0x2cb0ba{constructor(_0xe41f1d,_0x49fb59,_0x49a375,_0x3b9927){const _0x24319d=_0x483a87;super(),this[_0x24319d(0xb0)]=_0xe41f1d,this[_0x24319d(0x9f)]=_0x49fb59,this[_0x24319d(0xde)]=_0x49a375,this['_injector']=_0x3b9927,this[_0x24319d(0x8c)](),this[_0x24319d(0x93)]();}['_initUserSync'](){const _0x4770fb=_0x483a87;this[_0x4770fb(0x92)](this[_0x4770fb(0x9f)][_0x4770fb(0xa3)][_0x4770fb(0x90)](_0x21ee96(0x10))[_0x4770fb(0xf0)](_0x36991b=>{const _0x511a5a=_0x4770fb,_0x5a5a91=new Set();_0x36991b[_0x511a5a(0x97)](_0x52ba1b=>{const _0x3a35aa=_0x511a5a;switch(_0x52ba1b['type']){case'add':{const _0x3f0437=_0x52ba1b[_0x3a35aa(0xeb)][_0x3a35aa(0xe3)];_0x5a5a91[_0x3a35aa(0x8e)](_0x3f0437);break;}}}),K(this[_0x511a5a(0x9c)],_0x5a5a91);}));}[_0x483a87(0x8c)](){const _0xdf37ff=_0x483a87;this[_0xdf37ff(0x92)](this[_0xdf37ff(0xb0)][_0xdf37ff(0xa3)][_0xdf37ff(0xf0)](async _0x6284df=>{const _0x2165a3=_0xdf37ff;var _0x47995e,_0x2f44dc,_0x3ac679,_0x2b6a41;const _0x5166c1=(_0x47995e=this[_0x2165a3(0x9f)][_0x2165a3(0xac)](_0x6284df['unitId'])[_0x2165a3(0x96)](_0x4518c2=>_0x4518c2[_0x2165a3(0xe9)]===_0x6284df[_0x2165a3(0xe9)]))==null?void 0x0:_0x47995e['root'];if(!_0x5166c1)return;const {unitId:_0x2a8a90,subUnitId:_0x2eb574}=_0x5166c1;switch(_0x6284df[_0x2165a3(0xda)]&&this[_0x2165a3(0xde)]['addUser'](_0x6284df['user']),_0x6284df[_0x2165a3(0xe1)]){case p[_0x2165a3(0xe6)]:break;case p[_0x2165a3(0xf1)]:{this[_0x2165a3(0x9f)][_0x2165a3(0xcd)](_0x2a8a90,_0x2eb574,{'unitId':_0x2a8a90,'subUnitId':_0x2eb574,'ref':'','id':_0x6284df[_0x2165a3(0x9b)],'dT':O(+_0x6284df[_0x2165a3(0xd0)]),'threadId':_0x6284df[_0x2165a3(0xe9)],'personId':(_0x3ac679=(_0x2f44dc=_0x6284df['user'])==null?void 0x0:_0x2f44dc[_0x2165a3(0xb4)])!=null?_0x3ac679:_0x6284df[_0x2165a3(0xc3)],'text':JSON[_0x2165a3(0xca)](_0x6284df[_0x2165a3(0xb5)]),'parentId':_0x5166c1['id']});break;}case p[_0x2165a3(0xe8)]:{const _0x1ed2c9=this[_0x2165a3(0x9f)][_0x2165a3(0xf2)](_0x2a8a90,_0x2eb574,_0x6284df['replyId']);_0x1ed2c9&&_0x1ed2c9['parentId']&&this[_0x2165a3(0x9f)]['deleteComment'](_0x2a8a90,_0x2eb574,_0x6284df[_0x2165a3(0x9b)]);break;}case p[_0x2165a3(0xce)]:{this[_0x2165a3(0x9f)][_0x2165a3(0x95)](_0x2a8a90,_0x2eb574,{'commentId':_0x6284df[_0x2165a3(0x9b)],'text':JSON[_0x2165a3(0xca)](_0x6284df['content'])});break;}case p[_0x2165a3(0xa5)]:{const _0x59d5ad=(_0x2b6a41=this[_0x2165a3(0x9f)]['getUnit'](_0x6284df['unitId'])[_0x2165a3(0x96)](_0x20a9bd=>_0x20a9bd[_0x2165a3(0xe9)]===_0x6284df[_0x2165a3(0xe9)]))==null?void 0x0:_0x2b6a41[_0x2165a3(0xef)];_0x59d5ad&&this[_0x2165a3(0x9f)][_0x2165a3(0xdf)](_0x2a8a90,_0x2eb574,_0x59d5ad['id'],_0x6284df[_0x2165a3(0xb6)]===v['Solved']);break;}}}));}};f=Q([_(0x0,_0x1c3f7e(_0xea8c4d)),_(0x1,_0x1c3f7e(_0x319e88)),_(0x2,_0x1c3f7e(_0x4b74f8)),_(0x3,_0x1c3f7e(_0x333bd3))],f);const X=_0x483a87(0xa1),P={};var k=Object[_0x483a87(0x9d)],ee=Object['getOwnPropertyDescriptor'],re=(_0x4650a2,_0xfa25fe,_0x3c005e,_0x54d2c2)=>{const _0x5c175f=_0x483a87;for(var _0xbd98d6=_0x54d2c2>0x1?void 0x0:_0x54d2c2?ee(_0xfa25fe,_0x3c005e):_0xfa25fe,_0x2322d1=_0x4650a2[_0x5c175f(0xb9)]-0x1,_0xb802d7;_0x2322d1>=0x0;_0x2322d1--)(_0xb802d7=_0x4650a2[_0x2322d1])&&(_0xbd98d6=(_0x54d2c2?_0xb802d7(_0xfa25fe,_0x3c005e,_0xbd98d6):_0xb802d7(_0xbd98d6))||_0xbd98d6);return _0x54d2c2&&_0xbd98d6&&k(_0xfa25fe,_0x3c005e,_0xbd98d6),_0xbd98d6;},I=(_0x5bb6ea,_0x46b968)=>(_0x595235,_0x3ad416)=>_0x46b968(_0x595235,_0x3ad416,_0x5bb6ea);function te(_0x23aaa5,_0x5dcefe){const _0x38262a=_0x483a87,_0x5018dc=_0x23aaa5[_0x38262a(0xb7)][0x0];return{..._0x5dcefe,'id':_0x5018dc[_0x38262a(0x9b)],'resolved':_0x23aaa5[_0x38262a(0xb6)]===0x1,'dT':O(_0x5018dc['createTimestamp']),'personId':_0x5018dc['userId'],'threadId':_0x5018dc[_0x38262a(0xe9)]};}function se(_0x135ab1,_0x55c51e,_0x305460){const _0x1c7213=_0x483a87;var _0x39b9f8,_0x3c1917;if(((_0x3c1917=(_0x39b9f8=_0x135ab1==null?void 0x0:_0x135ab1[_0x1c7213(0xb7)])==null?void 0x0:_0x39b9f8['length'])!=null?_0x3c1917:0x0)>0x0){const _0x48b875=(_0x35f431,_0x5119f2)=>({'id':_0x35f431[_0x1c7213(0x9b)],'threadId':_0x35f431[_0x1c7213(0xe9)],'dT':O(_0x35f431['createTimestamp']),'personId':_0x35f431[_0x1c7213(0xc3)],'resolved':_0x135ab1[_0x1c7213(0xb6)]===v[_0x1c7213(0xb3)],'unitId':_0x55c51e,'subUnitId':_0x305460,'text':JSON[_0x1c7213(0xca)](_0x35f431[_0x1c7213(0xb5)]),'parentId':_0x5119f2}),_0x330ced=_0x48b875(_0x135ab1[_0x1c7213(0xb7)][0x0]);return{..._0x330ced,'children':_0x135ab1[_0x1c7213(0xb7)][_0x1c7213(0xdb)](0x1)['map'](_0x3dfbfd=>_0x48b875(_0x3dfbfd,_0x330ced['id']))};}return null;}let S=class{constructor(_0x53f626,_0x2a78c7,_0x4720aa,_0x465693){const _0x49eebf=_0x483a87;this[_0x49eebf(0xaa)]=_0x53f626,this[_0x49eebf(0xde)]=_0x2a78c7,this[_0x49eebf(0xa4)]=_0x4720aa,this[_0x49eebf(0x9c)]=_0x465693;}async[_0x483a87(0xcd)](_0x5d4e33){const _0x308473=_0x483a87;var _0xaed305,_0x398bdf;const {parentId:_0x11efdf,unitId:_0x1ec9e2,text:_0x720741,threadId:_0x38ceac}=_0x5d4e33,_0x45599b=(_0x398bdf=(_0xaed305=_0x720741[_0x308473(0xa2)])==null?void 0x0:_0xaed305[_0x308473(0xbd)](_0x5b598a=>_0x5b598a[_0x308473(0xd5)]===_0x1dbbcc['COMMENT'])[_0x308473(0xae)](_0x45e244=>_0x45e244[_0x308473(0xd6)]))!=null?_0x398bdf:[],_0x1ed378=JSON['stringify'](_0x720741),_0x1d8565=(await this[_0x308473(0xa4)][_0x308473(0x8f)](_0x1ec9e2))[_0x308473(0xa8)]();if(_0x11efdf){const _0x16614e={'memberId':_0x1d8565,'unitId':_0x1ec9e2,'content':_0x1ed378,'mention':_0x45599b,'threadId':_0x38ceac},_0xd479c8=(await this[_0x308473(0xaa)][_0x308473(0xd7)](_0x308473(0xa7)+_0x1ec9e2+_0x308473(0xe4),{'body':_0x16614e}))['body'][_0x308473(0xd4)];return{..._0x5d4e33,'id':_0xd479c8[_0x308473(0x9b)],'dT':_0x5ac57a(+_0xd479c8[_0x308473(0xd0)])[_0x308473(0x9a)](_0x308473(0xa6)),'personId':_0xd479c8[_0x308473(0xc3)]};}else{const _0x4c25b8={'memberId':_0x1d8565,'unitId':_0x1ec9e2,'content':_0x1ed378,'mention':_0x45599b},_0xd07fc9=await this[_0x308473(0xaa)][_0x308473(0xd7)](_0x308473(0xa7)+_0x1ec9e2+_0x308473(0xee),{'body':_0x4c25b8});return te(_0xd07fc9[_0x308473(0xc9)]['comment'],_0x5d4e33);}}async[_0x483a87(0x95)](_0x6b9e84){const _0x1bed3d=_0x483a87;var _0x1258bc,_0x20bb47;const {text:_0x1df47e,unitId:_0x2a44b8}=_0x6b9e84,_0x413222=(_0x20bb47=(_0x1258bc=_0x1df47e[_0x1bed3d(0xa2)])==null?void 0x0:_0x1258bc[_0x1bed3d(0xbd)](_0x4bc9a5=>_0x4bc9a5[_0x1bed3d(0xd5)]===_0x1dbbcc[_0x1bed3d(0xcb)])['map'](_0xcf99bd=>_0xcf99bd[_0x1bed3d(0xd6)]))!=null?_0x20bb47:[],_0x519217=JSON[_0x1bed3d(0xed)](_0x1df47e),_0x229c38=_0x6b9e84[_0x1bed3d(0xe9)],_0x1f2cb8=_0x6b9e84['id'],_0x4e6852={'memberId':(await this['_sessionService']['requireSession'](_0x2a44b8))[_0x1bed3d(0xa8)](),'unitId':_0x2a44b8,'threadId':_0x229c38,'mention':_0x413222,'content':_0x519217,'replyId':_0x1f2cb8},_0x2417b3=await this['_httpService'][_0x1bed3d(0xd7)](_0x1bed3d(0xa7)+_0x2a44b8+_0x1bed3d(0xc7),{'body':_0x4e6852});return!_0x2417b3['body']['error']||_0x2417b3[_0x1bed3d(0xc9)][_0x1bed3d(0xcf)][_0x1bed3d(0xbb)]===0x1;}async[_0x483a87(0xdf)](_0x587a37){const _0x82b465=_0x483a87,{unitId:_0x3698bd}=_0x587a37,_0xa0eb19=_0x587a37['threadId'],_0x37fca7={'memberId':this['_userService'][_0x82b465(0xad)]()[_0x82b465(0xb4)],'unitId':_0x3698bd,'threadId':_0xa0eb19,'solved':_0x587a37[_0x82b465(0xd8)]?v[_0x82b465(0xb3)]:v[_0x82b465(0xba)]},_0x35b7f2=await this['_httpService'][_0x82b465(0xd7)](_0x82b465(0xa7)+_0x3698bd+_0x82b465(0x91),{'body':_0x37fca7});return!_0x35b7f2[_0x82b465(0xc9)][_0x82b465(0xcf)]||_0x35b7f2[_0x82b465(0xc9)][_0x82b465(0xcf)]['code']===0x1;}async[_0x483a87(0xc4)](_0x2d21af,_0xb0d414,_0x47c860,_0x190a95){const _0x335c42=_0x483a87,_0x2e57e7={'memberId':(await this[_0x335c42(0xa4)]['requireSession'](_0x2d21af))[_0x335c42(0xa8)](),'threadId':_0x47c860,'replyId':_0x190a95,'unitId':_0x2d21af},_0x1fe506=await this['_httpService'][_0x335c42(0xd7)](_0x335c42(0xa7)+_0x2d21af+_0x335c42(0xe2),{'body':_0x2e57e7});return!_0x1fe506['body'][_0x335c42(0xcf)]||_0x1fe506['body']['error']['code']===0x1;}async['listComments'](_0xf701e2,_0x330f11,_0x2c37bd){const _0x40e3cd=_0x483a87,_0x37e883={'unitId':_0xf701e2,'threadId':_0x2c37bd},_0x3a4b4e=await this['_httpService']['post'](_0x40e3cd(0xa7)+_0xf701e2+_0x40e3cd(0xc8),{'body':_0x37e883}),_0x4095cc=_0x2c37bd[_0x40e3cd(0xae)](_0x1961f8=>se(_0x3a4b4e['body']['comments'][_0x1961f8],_0xf701e2,_0x330f11))[_0x40e3cd(0xbd)](Boolean);return Object[_0x40e3cd(0xd2)](_0x3a4b4e[_0x40e3cd(0xc9)][_0x40e3cd(0x9e)])['forEach'](_0x5666ee=>{const _0x2b095c=_0x40e3cd;this[_0x2b095c(0xde)][_0x2b095c(0xc6)](_0x5666ee);}),_0x4095cc;}[_0x483a87(0xc5)](_0x58b772){const _0x25e50e=_0x483a87;return{'id':_0x58b772['id'],'threadId':_0x58b772[_0x25e50e(0xe9)],'ref':_0x58b772['ref']};}};S=re([I(0x0,_0x1c3f7e(_0x33040e)),I(0x1,_0x1c3f7e(_0x4b74f8)),I(0x2,_0x1c3f7e(_0xf43820)),I(0x3,_0x1c3f7e(_0x333bd3))],S);var oe=Object[_0x483a87(0x9d)],ne=Object[_0x483a87(0xa9)],ie=(_0x2fc68e,_0x15bd0a,_0x4b8eb6,_0x43d511)=>{const _0x5c38f6=_0x483a87;for(var _0x38bebe=_0x43d511>0x1?void 0x0:_0x43d511?ne(_0x15bd0a,_0x4b8eb6):_0x15bd0a,_0x542050=_0x2fc68e[_0x5c38f6(0xb9)]-0x1,_0x5a8b19;_0x542050>=0x0;_0x542050--)(_0x5a8b19=_0x2fc68e[_0x542050])&&(_0x38bebe=(_0x43d511?_0x5a8b19(_0x15bd0a,_0x4b8eb6,_0x38bebe):_0x5a8b19(_0x38bebe))||_0x38bebe);return _0x43d511&&_0x38bebe&&oe(_0x15bd0a,_0x4b8eb6,_0x38bebe),_0x38bebe;},M=(_0x3ce58d,_0x216ce0)=>(_0x32c5a6,_0x3bcaa6)=>_0x216ce0(_0x32c5a6,_0x3bcaa6,_0x3ce58d);let b=class extends _0x2cb0ba{constructor(_0x57ca82,_0xe3319c){const _0x7a4733=_0x483a87;super(),this[_0x7a4733(0x99)]=_0x57ca82,this[_0x7a4733(0xea)]=_0xe3319c,this[_0x7a4733(0x8d)]();}[_0x483a87(0x8d)](){const _0x1fa01d=_0x483a87;this[_0x1fa01d(0x99)][_0x1fa01d(0xd1)]=this[_0x1fa01d(0xea)],this[_0x1fa01d(0x99)][_0x1fa01d(0xcc)]=!0x1;}};b=ie([M(0x0,_0x35b8ff),M(0x1,_0x1c3f7e(S))],b);var $=Object['defineProperty'],ce=Object[_0x483a87(0xa9)],ae=(_0x558e0c,_0x46be64,_0x312e25)=>_0x46be64 in _0x558e0c?$(_0x558e0c,_0x46be64,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x312e25}):_0x558e0c[_0x46be64]=_0x312e25,de=(_0x3eb319,_0x170ff2,_0x37913e,_0x4066ea)=>{const _0x2c1e36=_0x483a87;for(var _0x32091f=_0x4066ea>0x1?void 0x0:_0x4066ea?ce(_0x170ff2,_0x37913e):_0x170ff2,_0x1fbf2d=_0x3eb319[_0x2c1e36(0xb9)]-0x1,_0x275101;_0x1fbf2d>=0x0;_0x1fbf2d--)(_0x275101=_0x3eb319[_0x1fbf2d])&&(_0x32091f=(_0x4066ea?_0x275101(_0x170ff2,_0x37913e,_0x32091f):_0x275101(_0x32091f))||_0x32091f);return _0x4066ea&&_0x32091f&&$(_0x170ff2,_0x37913e,_0x32091f),_0x32091f;},N=(_0x50b079,_0xdac1a4)=>(_0x148262,_0x4b642d)=>_0xdac1a4(_0x148262,_0x4b642d,_0x50b079),j=(_0x25d3a2,_0x3e3dc3,_0xcd2929)=>ae(_0x25d3a2,typeof _0x3e3dc3!=_0x483a87(0xbc)?_0x3e3dc3+'':_0x3e3dc3,_0xcd2929);function _0x4978(_0x57c95e,_0x2451af){const _0x5bb291=_0x5bb2();return _0x4978=function(_0x4978ae,_0x484911){_0x4978ae=_0x4978ae-0x8c;let _0x131e0c=_0x5bb291[_0x4978ae];return _0x131e0c;},_0x4978(_0x57c95e,_0x2451af);}let C=class extends _0x3efe4c{constructor(_0x4f2bc0=P,_0x479687,_0x5c9a1f){const _0x154fd2=_0x483a87;super(),this['_config']=_0x4f2bc0,this[_0x154fd2(0x9c)]=_0x479687,this[_0x154fd2(0xdc)]=_0x5c9a1f;const {..._0x328f12}=_0x1947cd({},P,this[_0x154fd2(0xe0)]);this[_0x154fd2(0xdc)][_0x154fd2(0xbe)](X,_0x328f12);}[_0x483a87(0xec)](){[[S],[b],[f]]['forEach'](_0xf2b0a1=>{const _0xddc4a5=_0x4978;this[_0xddc4a5(0x9c)][_0xddc4a5(0x8e)](_0xf2b0a1);});}[_0x483a87(0xc2)](){const _0x1e91a0=_0x483a87;this['_injector'][_0x1e91a0(0xd3)](b),this['_injector'][_0x1e91a0(0xd3)](f);}};j(C,'pluginName',B),j(C,_0x483a87(0xe1),_0x310767[_0x483a87(0xc0)]),C=de([_0x305b34(_0x22cb8,_0x53f4e0,_0x4d0fa9),N(0x1,_0x1c3f7e(_0x333bd3)),N(0x2,_0x58d764)],C);export{C as UniverThreadCommentDataSourcePlugin};
1
+ const _0x57df2d=_0x3834;(function(_0x456d60,_0x1ee49c){const _0x3867df=_0x3834,_0x5a5069=_0x456d60();while(!![]){try{const _0x5190f3=-parseInt(_0x3867df(0xdd))/0x1+parseInt(_0x3867df(0xbe))/0x2*(parseInt(_0x3867df(0x101))/0x3)+parseInt(_0x3867df(0xe9))/0x4*(parseInt(_0x3867df(0x104))/0x5)+parseInt(_0x3867df(0xf8))/0x6*(parseInt(_0x3867df(0xae))/0x7)+-parseInt(_0x3867df(0xda))/0x8+parseInt(_0x3867df(0x113))/0x9+parseInt(_0x3867df(0x103))/0xa*(parseInt(_0x3867df(0xad))/0xb);if(_0x5190f3===_0x1ee49c)break;else _0x5a5069['push'](_0x5a5069['shift']());}catch(_0x4949b2){_0x5a5069['push'](_0x5a5069['shift']());}}}(_0x3c55,0x9ac87));import{CommentService as _0x3038c6,CollaborationSessionService as _0x264acf,UniverCollaborationClientPlugin as _0x45084c}from'@univerjs-pro/collaboration-client';function _0x3834(_0x99efc4,_0x481495){const _0x3c5584=_0x3c55();return _0x3834=function(_0x383496,_0x10609f){_0x383496=_0x383496-0xad;let _0xc30c15=_0x3c5584[_0x383496];return _0xc30c15;},_0x3834(_0x99efc4,_0x481495);}import{UniverLicensePlugin as _0x47478f}from'@univerjs-pro/license';import{dayjs as _0x40e202,UserManagerService as _0x2003ee,Inject as _0x11353b,Injector as _0xfbf0c7,Disposable as _0x50c7a0,CustomRangeType as _0x3d90f3,UniverInstanceType as _0x323446,DependentOn as _0xe23e76,Plugin as _0x46a9f2,merge as _0x219f51,IConfigService as _0x4fa017}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5dbff5}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x42f7be,IThreadCommentDataSourceService as _0x5a8885}from'@univerjs/thread-comment';import{bufferTime as _0x5da5ae}from'rxjs';function _0x3c55(){const _0x138d81=['UNRECOGNIZED','unitId','map','rangeType','filter','Solved','user','getMemberID','/universer-api/user/list','Delete','payload','disposeWithMe','UNIVER_UNKNOWN','/delete','_threadCommentDataSource','_threadCommentDataSourceService','_initDataSource','139064RLcNAM','addUser','deleteComment','55846JhMtCY','post','setConfig','slice','resolveComment','_config','saveCommentToSnapshot','_commentService','COMMENT','values','createTimestamp','userID','4wevzYK','Reply','addComment','content','listComments','format','personId','_userService','Solve','size','root','/list','get','_httpService','YYYY/MM/DD\x20HH:mm','2766PGFcLP','userId','comments','commentUpdate$','ref','subscribe','getCurrentUser','_init','add','11667YyPJva','reply','41590FqYZkp','296385GhzzIq','length','error','code','_sessionService','replies','getComment','onStarting','stringify','customRanges','getUnit','onReady','updateComment','threadId','/universer-api/comment/unit/','555498byAsPt','Add','body','759fmCDfS','2359lbTPDT','parentId','type','symbol','users','_injector','dataSource','_initUserSync','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/reply','OpenOrReOpen','getOwnPropertyDescriptor','parse','defineProperty','comment','syncUpdateMutationToColla','74lqqqpg','rangeId','_configService','replyId','_threadCommentModel','resolved','getUser','Unknown','solved','Edit','forEach'];_0x3c55=function(){return _0x138d81;};return _0x3c55();}import{HTTPService as _0x21f8b6}from'@univerjs/network';const B=_0x57df2d(0xb6);var v=(_0x4568cb=>(_0x4568cb[_0x4568cb[_0x57df2d(0xb8)]=0x0]='OpenOrReOpen',_0x4568cb[_0x4568cb[_0x57df2d(0xce)]=0x1]=_0x57df2d(0xce),_0x4568cb[_0x4568cb['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x4568cb))(v||{}),p=(_0x424a75=>(_0x424a75[_0x424a75[_0x57df2d(0xc5)]=0x0]='Unknown',_0x424a75[_0x424a75[_0x57df2d(0x114)]=0x1]=_0x57df2d(0x114),_0x424a75[_0x424a75[_0x57df2d(0xea)]=0x2]='Reply',_0x424a75[_0x424a75[_0x57df2d(0xc7)]=0x3]=_0x57df2d(0xc7),_0x424a75[_0x424a75['Delete']=0x4]=_0x57df2d(0xd2),_0x424a75[_0x424a75[_0x57df2d(0xf1)]=0x5]=_0x57df2d(0xf1),_0x424a75[_0x424a75[_0x57df2d(0xc9)]=-0x1]='UNRECOGNIZED',_0x424a75))(p||{});const O=_0x223d23=>_0x40e202(new Date(+_0x223d23))['format'](_0x57df2d(0xf7)),K=async(_0x409ae5,_0x1dcf37)=>{const _0x36a683=_0x57df2d,_0x4bea45=_0x409ae5[_0x36a683(0xf5)](_0x2003ee),_0x435ad4=_0x409ae5[_0x36a683(0xf5)](_0x21f8b6);_0x1dcf37['forEach'](_0x330462=>{const _0xd78de2=_0x36a683;_0x4bea45[_0xd78de2(0xc4)](_0x330462)&&_0x1dcf37['delete'](_0x330462);}),_0x1dcf37[_0x36a683(0xf2)]&&(await _0x435ad4['get'](_0x36a683(0xd1),{'params':{'userIDs':[..._0x1dcf37]}}))[_0x36a683(0x115)][_0x36a683(0xb2)][_0x36a683(0xc8)](_0x580290=>{const _0x5a6ac5=_0x36a683;_0x580290&&_0x4bea45[_0x5a6ac5(0xdb)](_0x580290);});};var V=Object[_0x57df2d(0xbb)],z=Object[_0x57df2d(0xb9)],Q=(_0x4977d5,_0xd25630,_0x1d1fe5,_0x2ce92b)=>{const _0x5a3b62=_0x57df2d;for(var _0x4074c3=_0x2ce92b>0x1?void 0x0:_0x2ce92b?z(_0xd25630,_0x1d1fe5):_0xd25630,_0x2ee6d9=_0x4977d5[_0x5a3b62(0x105)]-0x1,_0x1e7901;_0x2ee6d9>=0x0;_0x2ee6d9--)(_0x1e7901=_0x4977d5[_0x2ee6d9])&&(_0x4074c3=(_0x2ce92b?_0x1e7901(_0xd25630,_0x1d1fe5,_0x4074c3):_0x1e7901(_0x4074c3))||_0x4074c3);return _0x2ce92b&&_0x4074c3&&V(_0xd25630,_0x1d1fe5,_0x4074c3),_0x4074c3;},_=(_0x35b421,_0x46bc5b)=>(_0x4d0ff9,_0x4ac8c8)=>_0x46bc5b(_0x4d0ff9,_0x4ac8c8,_0x35b421);let f=class extends _0x50c7a0{constructor(_0x49b01d,_0x507297,_0x4caa97,_0x309aca){const _0x57b848=_0x57df2d;super(),this[_0x57b848(0xe4)]=_0x49b01d,this[_0x57b848(0xc2)]=_0x507297,this[_0x57b848(0xf0)]=_0x4caa97,this[_0x57b848(0xb3)]=_0x309aca,this[_0x57b848(0xff)](),this[_0x57b848(0xb5)]();}[_0x57df2d(0xb5)](){const _0x4d7412=_0x57df2d;this['disposeWithMe'](this[_0x4d7412(0xc2)]['commentUpdate$']['pipe'](_0x5da5ae(0x10))[_0x4d7412(0xfd)](_0x213336=>{const _0x20c7b7=_0x4d7412,_0x5cecf1=new Set();_0x213336[_0x20c7b7(0xc8)](_0x1d364d=>{const _0x4c10bc=_0x20c7b7;switch(_0x1d364d[_0x4c10bc(0xb0)]){case _0x4c10bc(0x100):{const _0x16123a=_0x1d364d[_0x4c10bc(0xd3)][_0x4c10bc(0xef)];_0x5cecf1['add'](_0x16123a);break;}}}),K(this[_0x20c7b7(0xb3)],_0x5cecf1);}));}[_0x57df2d(0xff)](){const _0x33e0db=_0x57df2d;this[_0x33e0db(0xd4)](this['_commentService'][_0x33e0db(0xfb)]['subscribe'](async _0x531239=>{const _0x44605b=_0x33e0db;var _0x1c5905,_0x27854c,_0x1d8212,_0x4f44ad;const _0x5c6a0c=(_0x1c5905=this['_threadCommentModel'][_0x44605b(0x10e)](_0x531239[_0x44605b(0xca)])['find'](_0x114a29=>_0x114a29[_0x44605b(0x111)]===_0x531239[_0x44605b(0x111)]))==null?void 0x0:_0x1c5905[_0x44605b(0xf3)];if(!_0x5c6a0c)return;const {unitId:_0x3fcfa0,subUnitId:_0x4c547e}=_0x5c6a0c;switch(_0x531239['user']&&this[_0x44605b(0xf0)][_0x44605b(0xdb)](_0x531239[_0x44605b(0xcf)]),_0x531239[_0x44605b(0xb0)]){case p[_0x44605b(0x114)]:break;case p[_0x44605b(0xea)]:{this[_0x44605b(0xc2)][_0x44605b(0xeb)](_0x3fcfa0,_0x4c547e,{'unitId':_0x3fcfa0,'subUnitId':_0x4c547e,'ref':'','id':_0x531239[_0x44605b(0xc1)],'dT':O(+_0x531239[_0x44605b(0xe7)]),'threadId':_0x531239[_0x44605b(0x111)],'personId':(_0x1d8212=(_0x27854c=_0x531239[_0x44605b(0xcf)])==null?void 0x0:_0x27854c[_0x44605b(0xe8)])!=null?_0x1d8212:_0x531239[_0x44605b(0xf9)],'text':JSON[_0x44605b(0xba)](_0x531239[_0x44605b(0xec)]),'parentId':_0x5c6a0c['id']});break;}case p[_0x44605b(0xd2)]:{const _0xfb12ab=this[_0x44605b(0xc2)][_0x44605b(0x10a)](_0x3fcfa0,_0x4c547e,_0x531239[_0x44605b(0xc1)]);_0xfb12ab&&_0xfb12ab[_0x44605b(0xaf)]&&this[_0x44605b(0xc2)]['deleteComment'](_0x3fcfa0,_0x4c547e,_0x531239[_0x44605b(0xc1)]);break;}case p[_0x44605b(0xc7)]:{this[_0x44605b(0xc2)]['updateComment'](_0x3fcfa0,_0x4c547e,{'commentId':_0x531239['replyId'],'text':JSON['parse'](_0x531239[_0x44605b(0xec)])});break;}case p['Solve']:{const _0x4cd019=(_0x4f44ad=this[_0x44605b(0xc2)][_0x44605b(0x10e)](_0x531239['unitId'])['find'](_0xcdd878=>_0xcdd878['threadId']===_0x531239[_0x44605b(0x111)]))==null?void 0x0:_0x4f44ad['root'];_0x4cd019&&this[_0x44605b(0xc2)][_0x44605b(0xe1)](_0x3fcfa0,_0x4c547e,_0x4cd019['id'],_0x531239['solved']===v[_0x44605b(0xce)]);break;}}}));}};f=Q([_(0x0,_0x11353b(_0x3038c6)),_(0x1,_0x11353b(_0x42f7be)),_(0x2,_0x11353b(_0x2003ee)),_(0x3,_0x11353b(_0xfbf0c7))],f);const X='thread-comment-data-source.config',P={};var k=Object['defineProperty'],ee=Object['getOwnPropertyDescriptor'],re=(_0x24d53e,_0x5b39e0,_0xd61d0e,_0x353cc1)=>{const _0x1463d0=_0x57df2d;for(var _0xfdd000=_0x353cc1>0x1?void 0x0:_0x353cc1?ee(_0x5b39e0,_0xd61d0e):_0x5b39e0,_0x290ffc=_0x24d53e[_0x1463d0(0x105)]-0x1,_0x53ccc0;_0x290ffc>=0x0;_0x290ffc--)(_0x53ccc0=_0x24d53e[_0x290ffc])&&(_0xfdd000=(_0x353cc1?_0x53ccc0(_0x5b39e0,_0xd61d0e,_0xfdd000):_0x53ccc0(_0xfdd000))||_0xfdd000);return _0x353cc1&&_0xfdd000&&k(_0x5b39e0,_0xd61d0e,_0xfdd000),_0xfdd000;},I=(_0x2a9339,_0x1e1312)=>(_0x51613d,_0x1c3962)=>_0x1e1312(_0x51613d,_0x1c3962,_0x2a9339);function te(_0x4b6402,_0x467cd3){const _0x4cb035=_0x57df2d,_0x45200f=_0x4b6402[_0x4cb035(0x109)][0x0];return{..._0x467cd3,'id':_0x45200f[_0x4cb035(0xc1)],'resolved':_0x4b6402[_0x4cb035(0xc6)]===0x1,'dT':O(_0x45200f[_0x4cb035(0xe7)]),'personId':_0x45200f[_0x4cb035(0xf9)],'threadId':_0x45200f[_0x4cb035(0x111)]};}function se(_0x22c888,_0x3afdf6,_0x271b1a){const _0x2162bc=_0x57df2d;var _0x1e9a35,_0x4c90ce;if(((_0x4c90ce=(_0x1e9a35=_0x22c888==null?void 0x0:_0x22c888[_0x2162bc(0x109)])==null?void 0x0:_0x1e9a35[_0x2162bc(0x105)])!=null?_0x4c90ce:0x0)>0x0){const _0x5cc710=(_0x4bcc0a,_0x2be13b)=>({'id':_0x4bcc0a[_0x2162bc(0xc1)],'threadId':_0x4bcc0a[_0x2162bc(0x111)],'dT':O(_0x4bcc0a[_0x2162bc(0xe7)]),'personId':_0x4bcc0a[_0x2162bc(0xf9)],'resolved':_0x22c888[_0x2162bc(0xc6)]===v[_0x2162bc(0xce)],'unitId':_0x3afdf6,'subUnitId':_0x271b1a,'text':JSON[_0x2162bc(0xba)](_0x4bcc0a[_0x2162bc(0xec)]),'parentId':_0x2be13b}),_0x3a46f4=_0x5cc710(_0x22c888[_0x2162bc(0x109)][0x0]);return{..._0x3a46f4,'children':_0x22c888[_0x2162bc(0x109)][_0x2162bc(0xe0)](0x1)[_0x2162bc(0xcb)](_0x443d16=>_0x5cc710(_0x443d16,_0x3a46f4['id']))};}return null;}let S=class{constructor(_0x337d6c,_0x81905d,_0x38e544,_0x5e405f){const _0x3a47bb=_0x57df2d;this['_httpService']=_0x337d6c,this[_0x3a47bb(0xf0)]=_0x81905d,this[_0x3a47bb(0x108)]=_0x38e544,this['_injector']=_0x5e405f;}async[_0x57df2d(0xeb)](_0x472eea){const _0x43c8ef=_0x57df2d;var _0x45181d,_0x19f28f;const {parentId:_0x4ba4b1,unitId:_0x550c78,text:_0x126a38,threadId:_0x298b90}=_0x472eea,_0x1ea931=(_0x19f28f=(_0x45181d=_0x126a38[_0x43c8ef(0x10d)])==null?void 0x0:_0x45181d[_0x43c8ef(0xcd)](_0x5855b5=>_0x5855b5['rangeType']===_0x3d90f3[_0x43c8ef(0xe5)])['map'](_0x46fef5=>_0x46fef5[_0x43c8ef(0xbf)]))!=null?_0x19f28f:[],_0x3c77f5=JSON[_0x43c8ef(0x10c)](_0x126a38),_0x4ea1ab=(await this[_0x43c8ef(0x108)]['requireSession'](_0x550c78))[_0x43c8ef(0xd0)]();if(_0x4ba4b1){const _0x3e55fc={'memberId':_0x4ea1ab,'unitId':_0x550c78,'content':_0x3c77f5,'mention':_0x1ea931,'threadId':_0x298b90},_0x188bbb=(await this[_0x43c8ef(0xf6)][_0x43c8ef(0xde)]('/universer-api/comment/unit/'+_0x550c78+_0x43c8ef(0xb7),{'body':_0x3e55fc}))[_0x43c8ef(0x115)][_0x43c8ef(0x102)];return{..._0x472eea,'id':_0x188bbb[_0x43c8ef(0xc1)],'dT':_0x40e202(+_0x188bbb[_0x43c8ef(0xe7)])[_0x43c8ef(0xee)](_0x43c8ef(0xf7)),'personId':_0x188bbb[_0x43c8ef(0xf9)]};}else{const _0x2b643f={'memberId':_0x4ea1ab,'unitId':_0x550c78,'content':_0x3c77f5,'mention':_0x1ea931},_0x33cd79=await this[_0x43c8ef(0xf6)][_0x43c8ef(0xde)](_0x43c8ef(0x112)+_0x550c78+'/add',{'body':_0x2b643f});return te(_0x33cd79[_0x43c8ef(0x115)][_0x43c8ef(0xbc)],_0x472eea);}}async[_0x57df2d(0x110)](_0x5b4f23){const _0x40fb2d=_0x57df2d;var _0x3ad397,_0x2d371e;const {text:_0x484e1f,unitId:_0x23fde2}=_0x5b4f23,_0x5a9a0b=(_0x2d371e=(_0x3ad397=_0x484e1f['customRanges'])==null?void 0x0:_0x3ad397[_0x40fb2d(0xcd)](_0x746d2a=>_0x746d2a[_0x40fb2d(0xcc)]===_0x3d90f3[_0x40fb2d(0xe5)])[_0x40fb2d(0xcb)](_0x481557=>_0x481557[_0x40fb2d(0xbf)]))!=null?_0x2d371e:[],_0x42b4a9=JSON[_0x40fb2d(0x10c)](_0x484e1f),_0x3375a6=_0x5b4f23[_0x40fb2d(0x111)],_0x134081=_0x5b4f23['id'],_0x478483={'memberId':(await this[_0x40fb2d(0x108)]['requireSession'](_0x23fde2))[_0x40fb2d(0xd0)](),'unitId':_0x23fde2,'threadId':_0x3375a6,'mention':_0x5a9a0b,'content':_0x42b4a9,'replyId':_0x134081},_0x45b8bb=await this[_0x40fb2d(0xf6)][_0x40fb2d(0xde)]('/universer-api/comment/unit/'+_0x23fde2+'/edit',{'body':_0x478483});return!_0x45b8bb[_0x40fb2d(0x115)][_0x40fb2d(0x106)]||_0x45b8bb[_0x40fb2d(0x115)][_0x40fb2d(0x106)][_0x40fb2d(0x107)]===0x1;}async['resolveComment'](_0x514367){const _0x453e86=_0x57df2d,{unitId:_0x5121e2}=_0x514367,_0x2e5344=_0x514367[_0x453e86(0x111)],_0x117bec={'memberId':this['_userService'][_0x453e86(0xfe)]()['userID'],'unitId':_0x5121e2,'threadId':_0x2e5344,'solved':_0x514367[_0x453e86(0xc3)]?v['Solved']:v[_0x453e86(0xb8)]},_0x5ad36c=await this[_0x453e86(0xf6)][_0x453e86(0xde)](_0x453e86(0x112)+_0x5121e2+'/solved',{'body':_0x117bec});return!_0x5ad36c[_0x453e86(0x115)][_0x453e86(0x106)]||_0x5ad36c[_0x453e86(0x115)][_0x453e86(0x106)][_0x453e86(0x107)]===0x1;}async[_0x57df2d(0xdc)](_0x4409ca,_0x5e6642,_0x9fac6,_0xb74991){const _0x435597=_0x57df2d,_0x150034={'memberId':(await this[_0x435597(0x108)]['requireSession'](_0x4409ca))[_0x435597(0xd0)](),'threadId':_0x9fac6,'replyId':_0xb74991,'unitId':_0x4409ca},_0x185f9f=await this['_httpService'][_0x435597(0xde)](_0x435597(0x112)+_0x4409ca+_0x435597(0xd6),{'body':_0x150034});return!_0x185f9f[_0x435597(0x115)][_0x435597(0x106)]||_0x185f9f[_0x435597(0x115)][_0x435597(0x106)][_0x435597(0x107)]===0x1;}async[_0x57df2d(0xed)](_0x1948b5,_0x165a80,_0x202753){const _0x80817f=_0x57df2d,_0xd3b28={'unitId':_0x1948b5,'threadId':_0x202753},_0x185269=await this[_0x80817f(0xf6)][_0x80817f(0xde)](_0x80817f(0x112)+_0x1948b5+_0x80817f(0xf4),{'body':_0xd3b28}),_0x4772d6=_0x202753[_0x80817f(0xcb)](_0x397311=>se(_0x185269['body'][_0x80817f(0xfa)][_0x397311],_0x1948b5,_0x165a80))[_0x80817f(0xcd)](Boolean);return Object[_0x80817f(0xe6)](_0x185269[_0x80817f(0x115)][_0x80817f(0xb2)])[_0x80817f(0xc8)](_0x49e208=>{const _0x541eca=_0x80817f;this[_0x541eca(0xf0)]['addUser'](_0x49e208);}),_0x4772d6;}[_0x57df2d(0xe3)](_0x491008){const _0x543e09=_0x57df2d;return{'id':_0x491008['id'],'threadId':_0x491008[_0x543e09(0x111)],'ref':_0x491008[_0x543e09(0xfc)]};}};S=re([I(0x0,_0x11353b(_0x21f8b6)),I(0x1,_0x11353b(_0x2003ee)),I(0x2,_0x11353b(_0x264acf)),I(0x3,_0x11353b(_0xfbf0c7))],S);var oe=Object['defineProperty'],ne=Object[_0x57df2d(0xb9)],ie=(_0x234ea9,_0xce2598,_0x69daed,_0x4a4158)=>{const _0x475427=_0x57df2d;for(var _0x24bd12=_0x4a4158>0x1?void 0x0:_0x4a4158?ne(_0xce2598,_0x69daed):_0xce2598,_0x1f0e16=_0x234ea9[_0x475427(0x105)]-0x1,_0x4cb2d7;_0x1f0e16>=0x0;_0x1f0e16--)(_0x4cb2d7=_0x234ea9[_0x1f0e16])&&(_0x24bd12=(_0x4a4158?_0x4cb2d7(_0xce2598,_0x69daed,_0x24bd12):_0x4cb2d7(_0x24bd12))||_0x24bd12);return _0x4a4158&&_0x24bd12&&oe(_0xce2598,_0x69daed,_0x24bd12),_0x24bd12;},M=(_0x4f0a54,_0x5a5a20)=>(_0x268bcc,_0x290498)=>_0x5a5a20(_0x268bcc,_0x290498,_0x4f0a54);let b=class extends _0x50c7a0{constructor(_0x4341c7,_0x363bf7){const _0x1ca309=_0x57df2d;super(),this[_0x1ca309(0xd8)]=_0x4341c7,this[_0x1ca309(0xd7)]=_0x363bf7,this['_initDataSource']();}[_0x57df2d(0xd9)](){const _0x23c963=_0x57df2d;this[_0x23c963(0xd8)][_0x23c963(0xb4)]=this[_0x23c963(0xd7)],this[_0x23c963(0xd8)][_0x23c963(0xbd)]=!0x1;}};b=ie([M(0x0,_0x5a8885),M(0x1,_0x11353b(S))],b);var $=Object['defineProperty'],ce=Object['getOwnPropertyDescriptor'],ae=(_0xe5129c,_0x4cd47c,_0x4ccbfe)=>_0x4cd47c in _0xe5129c?$(_0xe5129c,_0x4cd47c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4ccbfe}):_0xe5129c[_0x4cd47c]=_0x4ccbfe,de=(_0x3236f1,_0x547229,_0x40d38e,_0x428196)=>{const _0xbda86=_0x57df2d;for(var _0x146bdf=_0x428196>0x1?void 0x0:_0x428196?ce(_0x547229,_0x40d38e):_0x547229,_0x3f99c5=_0x3236f1[_0xbda86(0x105)]-0x1,_0x11e6d2;_0x3f99c5>=0x0;_0x3f99c5--)(_0x11e6d2=_0x3236f1[_0x3f99c5])&&(_0x146bdf=(_0x428196?_0x11e6d2(_0x547229,_0x40d38e,_0x146bdf):_0x11e6d2(_0x146bdf))||_0x146bdf);return _0x428196&&_0x146bdf&&$(_0x547229,_0x40d38e,_0x146bdf),_0x146bdf;},N=(_0x20c6b3,_0x394d76)=>(_0xace40,_0x366243)=>_0x394d76(_0xace40,_0x366243,_0x20c6b3),j=(_0x2cd352,_0x38f5fa,_0xd698ee)=>ae(_0x2cd352,typeof _0x38f5fa!=_0x57df2d(0xb1)?_0x38f5fa+'':_0x38f5fa,_0xd698ee);let C=class extends _0x46a9f2{constructor(_0x3ecc21=P,_0x254686,_0x3af564){const _0x9abf4=_0x57df2d;super(),this[_0x9abf4(0xe2)]=_0x3ecc21,this[_0x9abf4(0xb3)]=_0x254686,this[_0x9abf4(0xc0)]=_0x3af564;const {..._0x4000de}=_0x219f51({},P,this[_0x9abf4(0xe2)]);this[_0x9abf4(0xc0)][_0x9abf4(0xdf)](X,_0x4000de);}[_0x57df2d(0x10b)](){const _0x2b7bfc=_0x57df2d;[[S],[b],[f]][_0x2b7bfc(0xc8)](_0x3104b8=>{const _0x170ce4=_0x2b7bfc;this[_0x170ce4(0xb3)][_0x170ce4(0x100)](_0x3104b8);});}[_0x57df2d(0x10f)](){const _0x147aba=_0x57df2d;this[_0x147aba(0xb3)][_0x147aba(0xf5)](b),this[_0x147aba(0xb3)]['get'](f);}};j(C,'pluginName',B),j(C,'type',_0x323446[_0x57df2d(0xd5)]),C=de([_0xe23e76(_0x5dbff5,_0x45084c,_0x47478f),N(0x1,_0x11353b(_0xfbf0c7)),N(0x2,_0x4fa017)],C);export{C as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x120b(_0x17cad6,_0x38053f){const _0x69fa84=_0x69fa();return _0x120b=function(_0x120b17,_0x2173f5){_0x120b17=_0x120b17-0x1c8;let _0x267bd9=_0x69fa84[_0x120b17];return _0x267bd9;},_0x120b(_0x17cad6,_0x38053f);}(function(_0x9874fb,_0x2fda36){const _0x561e2b=_0x120b,_0x1077e3=_0x9874fb();while(!![]){try{const _0x4300d9=-parseInt(_0x561e2b(0x233))/0x1*(-parseInt(_0x561e2b(0x1ea))/0x2)+-parseInt(_0x561e2b(0x226))/0x3+-parseInt(_0x561e2b(0x1d4))/0x4+-parseInt(_0x561e2b(0x203))/0x5*(-parseInt(_0x561e2b(0x1f7))/0x6)+-parseInt(_0x561e2b(0x207))/0x7*(-parseInt(_0x561e2b(0x213))/0x8)+parseInt(_0x561e2b(0x20c))/0x9+-parseInt(_0x561e2b(0x24a))/0xa;if(_0x4300d9===_0x2fda36)break;else _0x1077e3['push'](_0x1077e3['shift']());}catch(_0x3f44bd){_0x1077e3['push'](_0x1077e3['shift']());}}}(_0x69fa,0xdd5a0),function(_0x127791,_0x3764fc){const _0xf11bec=_0x120b;typeof exports==_0xf11bec(0x1db)&&typeof module<'u'?_0x3764fc(exports,require(_0xf11bec(0x1e1)),require(_0xf11bec(0x1fb)),require(_0xf11bec(0x204)),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require(_0xf11bec(0x240)),require(_0xf11bec(0x242))):typeof define==_0xf11bec(0x225)&&define[_0xf11bec(0x237)]?define([_0xf11bec(0x206),_0xf11bec(0x1e1),_0xf11bec(0x1fb),'@univerjs/core','@univerjs/thread-comment-ui','@univerjs/thread-comment',_0xf11bec(0x240),_0xf11bec(0x242)],_0x3764fc):(_0x127791=typeof globalThis<'u'?globalThis:_0x127791||self,_0x3764fc(_0x127791[_0xf11bec(0x1f6)]={},_0x127791[_0xf11bec(0x1d6)],_0x127791['UniverProLicense'],_0x127791[_0xf11bec(0x220)],_0x127791[_0xf11bec(0x22d)],_0x127791['UniverThreadComment'],_0x127791[_0xf11bec(0x240)],_0x127791[_0xf11bec(0x1d3)]));}(this,function(_0x49a0d4,_0x4b2ae7,_0x27a9e0,_0x3a212d,_0xbd58f2,_0x1e89df,_0x1b6005,_0x2f3a4f){'use strict';const _0x4b6dc2=_0x120b;const _0x3b2a12=_0x4b6dc2(0x20d);var _0x3179e6=(_0x1232af=>(_0x1232af[_0x1232af[_0x4b6dc2(0x210)]=0x0]=_0x4b6dc2(0x210),_0x1232af[_0x1232af[_0x4b6dc2(0x1c9)]=0x1]=_0x4b6dc2(0x1c9),_0x1232af[_0x1232af[_0x4b6dc2(0x1eb)]=-0x1]=_0x4b6dc2(0x1eb),_0x1232af))(_0x3179e6||{}),_0x5a666e=(_0x294f53=>(_0x294f53[_0x294f53[_0x4b6dc2(0x1d5)]=0x0]=_0x4b6dc2(0x1d5),_0x294f53[_0x294f53[_0x4b6dc2(0x227)]=0x1]=_0x4b6dc2(0x227),_0x294f53[_0x294f53['Reply']=0x2]=_0x4b6dc2(0x1ff),_0x294f53[_0x294f53[_0x4b6dc2(0x241)]=0x3]=_0x4b6dc2(0x241),_0x294f53[_0x294f53[_0x4b6dc2(0x24e)]=0x4]=_0x4b6dc2(0x24e),_0x294f53[_0x294f53['Solve']=0x5]=_0x4b6dc2(0x20b),_0x294f53[_0x294f53['UNRECOGNIZED']=-0x1]=_0x4b6dc2(0x1eb),_0x294f53))(_0x5a666e||{});const _0x175d87=_0x39e42b=>_0x3a212d['dayjs'](new Date(+_0x39e42b))['format'](_0x4b6dc2(0x1da)),_0x5310ee=async(_0x163db7,_0x16aa4f)=>{const _0x393967=_0x4b6dc2,_0x2b1f29=_0x163db7[_0x393967(0x22e)](_0x3a212d[_0x393967(0x24d)]),_0x2410f0=_0x163db7[_0x393967(0x22e)](_0x2f3a4f[_0x393967(0x1dc)]);_0x16aa4f[_0x393967(0x246)](_0xb6e7a=>{const _0x3401cb=_0x393967;_0x2b1f29[_0x3401cb(0x1ee)](_0xb6e7a)&&_0x16aa4f[_0x3401cb(0x1f3)](_0xb6e7a);}),_0x16aa4f[_0x393967(0x248)]&&(await _0x2410f0[_0x393967(0x22e)]('/universer-api/user/list',{'params':{'userIDs':[..._0x16aa4f]}}))[_0x393967(0x235)][_0x393967(0x249)]['forEach'](_0x587efe=>{const _0x581ca8=_0x393967;_0x587efe&&_0x2b1f29[_0x581ca8(0x1e6)](_0x587efe);});};var _0x463919=Object[_0x4b6dc2(0x239)],_0xdf3ece=Object[_0x4b6dc2(0x1e9)],_0x439c08=(_0x5336d4,_0x4d5ac3,_0x830c64,_0x2f9f15)=>{const _0x41b6be=_0x4b6dc2;for(var _0x6f4c07=_0x2f9f15>0x1?void 0x0:_0x2f9f15?_0xdf3ece(_0x4d5ac3,_0x830c64):_0x4d5ac3,_0x55d89f=_0x5336d4[_0x41b6be(0x222)]-0x1,_0x98241e;_0x55d89f>=0x0;_0x55d89f--)(_0x98241e=_0x5336d4[_0x55d89f])&&(_0x6f4c07=(_0x2f9f15?_0x98241e(_0x4d5ac3,_0x830c64,_0x6f4c07):_0x98241e(_0x6f4c07))||_0x6f4c07);return _0x2f9f15&&_0x6f4c07&&_0x463919(_0x4d5ac3,_0x830c64,_0x6f4c07),_0x6f4c07;},_0x505c49=(_0x4180f5,_0x2fb0ea)=>(_0x88c043,_0x586651)=>_0x2fb0ea(_0x88c043,_0x586651,_0x4180f5);let _0x24dc24=class extends _0x3a212d[_0x4b6dc2(0x1e7)]{constructor(_0x56fe95,_0xb65a1c,_0x4db834,_0x400696){const _0x3dbbd2=_0x4b6dc2;super(),this[_0x3dbbd2(0x1c8)]=_0x56fe95,this[_0x3dbbd2(0x1cb)]=_0xb65a1c,this[_0x3dbbd2(0x1fd)]=_0x4db834,this[_0x3dbbd2(0x20f)]=_0x400696,this[_0x3dbbd2(0x22f)](),this[_0x3dbbd2(0x1e3)]();}[_0x4b6dc2(0x1e3)](){const _0x2b0b59=_0x4b6dc2;this[_0x2b0b59(0x22c)](this[_0x2b0b59(0x1cb)]['commentUpdate$']['pipe'](_0x1b6005[_0x2b0b59(0x247)](0x10))[_0x2b0b59(0x221)](_0x3e581e=>{const _0x1cd954=_0x2b0b59,_0x5e2efb=new Set();_0x3e581e[_0x1cd954(0x246)](_0x5676d7=>{const _0x5e30a6=_0x1cd954;switch(_0x5676d7[_0x5e30a6(0x217)]){case _0x5e30a6(0x224):{const _0x2c4e4f=_0x5676d7['payload'][_0x5e30a6(0x20e)];_0x5e2efb[_0x5e30a6(0x224)](_0x2c4e4f);break;}}}),_0x5310ee(this['_injector'],_0x5e2efb);}));}[_0x4b6dc2(0x22f)](){const _0x5a0c87=_0x4b6dc2;this[_0x5a0c87(0x22c)](this[_0x5a0c87(0x1c8)][_0x5a0c87(0x1ed)][_0x5a0c87(0x221)](async _0x58b7ed=>{const _0x1c25e=_0x5a0c87;var _0x150a2a,_0x2d7b76,_0x22388e,_0x342e20;const _0x14dbf3=(_0x150a2a=this[_0x1c25e(0x1cb)][_0x1c25e(0x1e0)](_0x58b7ed['unitId'])['find'](_0x5c694e=>_0x5c694e[_0x1c25e(0x214)]===_0x58b7ed['threadId']))==null?void 0x0:_0x150a2a[_0x1c25e(0x1f4)];if(!_0x14dbf3)return;const {unitId:_0x1bded5,subUnitId:_0x377206}=_0x14dbf3;switch(_0x58b7ed[_0x1c25e(0x211)]&&this[_0x1c25e(0x1fd)][_0x1c25e(0x1e6)](_0x58b7ed['user']),_0x58b7ed['type']){case _0x5a666e[_0x1c25e(0x227)]:break;case _0x5a666e[_0x1c25e(0x1ff)]:{this[_0x1c25e(0x1cb)]['addComment'](_0x1bded5,_0x377206,{'unitId':_0x1bded5,'subUnitId':_0x377206,'ref':'','id':_0x58b7ed[_0x1c25e(0x1fa)],'dT':_0x175d87(+_0x58b7ed[_0x1c25e(0x243)]),'threadId':_0x58b7ed[_0x1c25e(0x214)],'personId':(_0x22388e=(_0x2d7b76=_0x58b7ed['user'])==null?void 0x0:_0x2d7b76[_0x1c25e(0x1d0)])!=null?_0x22388e:_0x58b7ed[_0x1c25e(0x236)],'text':JSON[_0x1c25e(0x23b)](_0x58b7ed['content']),'parentId':_0x14dbf3['id']});break;}case _0x5a666e[_0x1c25e(0x24e)]:{const _0x3c2f0a=this[_0x1c25e(0x1cb)][_0x1c25e(0x23a)](_0x1bded5,_0x377206,_0x58b7ed[_0x1c25e(0x1fa)]);_0x3c2f0a&&_0x3c2f0a[_0x1c25e(0x23e)]&&this['_threadCommentModel'][_0x1c25e(0x23f)](_0x1bded5,_0x377206,_0x58b7ed[_0x1c25e(0x1fa)]);break;}case _0x5a666e[_0x1c25e(0x241)]:{this[_0x1c25e(0x1cb)][_0x1c25e(0x21c)](_0x1bded5,_0x377206,{'commentId':_0x58b7ed[_0x1c25e(0x1fa)],'text':JSON[_0x1c25e(0x23b)](_0x58b7ed[_0x1c25e(0x1f1)])});break;}case _0x5a666e[_0x1c25e(0x20b)]:{const _0x6f61ee=(_0x342e20=this[_0x1c25e(0x1cb)][_0x1c25e(0x1e0)](_0x58b7ed[_0x1c25e(0x21d)])[_0x1c25e(0x230)](_0x52edf5=>_0x52edf5[_0x1c25e(0x214)]===_0x58b7ed[_0x1c25e(0x214)]))==null?void 0x0:_0x342e20[_0x1c25e(0x1f4)];_0x6f61ee&&this[_0x1c25e(0x1cb)][_0x1c25e(0x1dd)](_0x1bded5,_0x377206,_0x6f61ee['id'],_0x58b7ed[_0x1c25e(0x229)]===_0x3179e6[_0x1c25e(0x1c9)]);break;}}}));}};_0x24dc24=_0x439c08([_0x505c49(0x0,_0x3a212d['Inject'](_0x4b2ae7[_0x4b6dc2(0x208)])),_0x505c49(0x1,_0x3a212d[_0x4b6dc2(0x1e8)](_0x1e89df['ThreadCommentModel'])),_0x505c49(0x2,_0x3a212d[_0x4b6dc2(0x1e8)](_0x3a212d[_0x4b6dc2(0x24d)])),_0x505c49(0x3,_0x3a212d[_0x4b6dc2(0x1e8)](_0x3a212d[_0x4b6dc2(0x228)]))],_0x24dc24);const _0x444c84=_0x4b6dc2(0x245),_0x4bddc2={};var _0x35dae1=Object[_0x4b6dc2(0x239)],_0x47627a=Object['getOwnPropertyDescriptor'],_0x566803=(_0x31fc45,_0x3493ba,_0x2ae390,_0x5e4575)=>{const _0x24ee90=_0x4b6dc2;for(var _0xe00e97=_0x5e4575>0x1?void 0x0:_0x5e4575?_0x47627a(_0x3493ba,_0x2ae390):_0x3493ba,_0x54fc77=_0x31fc45[_0x24ee90(0x222)]-0x1,_0x457753;_0x54fc77>=0x0;_0x54fc77--)(_0x457753=_0x31fc45[_0x54fc77])&&(_0xe00e97=(_0x5e4575?_0x457753(_0x3493ba,_0x2ae390,_0xe00e97):_0x457753(_0xe00e97))||_0xe00e97);return _0x5e4575&&_0xe00e97&&_0x35dae1(_0x3493ba,_0x2ae390,_0xe00e97),_0xe00e97;},_0xf7a449=(_0x29a6c4,_0x3fc015)=>(_0x5117e5,_0x4233b2)=>_0x3fc015(_0x5117e5,_0x4233b2,_0x29a6c4);function _0x2451ab(_0x427dd0,_0x4b3654){const _0x87ddae=_0x4b6dc2,_0x5e9f70=_0x427dd0[_0x87ddae(0x1f2)][0x0];return{..._0x4b3654,'id':_0x5e9f70[_0x87ddae(0x1fa)],'resolved':_0x427dd0[_0x87ddae(0x229)]===0x1,'dT':_0x175d87(_0x5e9f70[_0x87ddae(0x243)]),'personId':_0x5e9f70[_0x87ddae(0x236)],'threadId':_0x5e9f70[_0x87ddae(0x214)]};}function _0x277862(_0x5455e8,_0x576e4d,_0x21f0dd){const _0x544df0=_0x4b6dc2;var _0x58fb5a,_0x3219f0;if(((_0x3219f0=(_0x58fb5a=_0x5455e8==null?void 0x0:_0x5455e8[_0x544df0(0x1f2)])==null?void 0x0:_0x58fb5a[_0x544df0(0x222)])!=null?_0x3219f0:0x0)>0x0){const _0x4a9c50=(_0x328a1d,_0x69b0b8)=>({'id':_0x328a1d['replyId'],'threadId':_0x328a1d['threadId'],'dT':_0x175d87(_0x328a1d[_0x544df0(0x243)]),'personId':_0x328a1d[_0x544df0(0x236)],'resolved':_0x5455e8[_0x544df0(0x229)]===_0x3179e6['Solved'],'unitId':_0x576e4d,'subUnitId':_0x21f0dd,'text':JSON['parse'](_0x328a1d[_0x544df0(0x1f1)]),'parentId':_0x69b0b8}),_0x4e6b71=_0x4a9c50(_0x5455e8[_0x544df0(0x1f2)][0x0]);return{..._0x4e6b71,'children':_0x5455e8[_0x544df0(0x1f2)]['slice'](0x1)['map'](_0x4580ec=>_0x4a9c50(_0x4580ec,_0x4e6b71['id']))};}return null;}let _0xa5c8d5=class{constructor(_0x1854e6,_0x30849e,_0x137850,_0x2beb13){const _0x18621b=_0x4b6dc2;this[_0x18621b(0x1f0)]=_0x1854e6,this['_userService']=_0x30849e,this[_0x18621b(0x1fe)]=_0x137850,this[_0x18621b(0x20f)]=_0x2beb13;}async[_0x4b6dc2(0x1ec)](_0xeedcca){const _0x459eb6=_0x4b6dc2;var _0x51ce3d,_0x48304e;const {parentId:_0x12e46f,unitId:_0x3cc05f,text:_0x4c6281,threadId:_0x3a7ac3}=_0xeedcca,_0x1568a8=(_0x48304e=(_0x51ce3d=_0x4c6281['customRanges'])==null?void 0x0:_0x51ce3d['filter'](_0x2da844=>_0x2da844[_0x459eb6(0x209)]===_0x3a212d[_0x459eb6(0x1f5)][_0x459eb6(0x223)])[_0x459eb6(0x1f8)](_0x3650d7=>_0x3650d7[_0x459eb6(0x1ef)]))!=null?_0x48304e:[],_0x1c2b5a=JSON[_0x459eb6(0x20a)](_0x4c6281),_0x517aae=(await this['_sessionService'][_0x459eb6(0x202)](_0x3cc05f))['getMemberID']();if(_0x12e46f){const _0x42a83b={'memberId':_0x517aae,'unitId':_0x3cc05f,'content':_0x1c2b5a,'mention':_0x1568a8,'threadId':_0x3a7ac3},_0x2ccc3b=(await this['_httpService'][_0x459eb6(0x23c)](_0x459eb6(0x23d)+_0x3cc05f+'/reply',{'body':_0x42a83b}))[_0x459eb6(0x235)][_0x459eb6(0x1d8)];return{..._0xeedcca,'id':_0x2ccc3b[_0x459eb6(0x1fa)],'dT':_0x3a212d['dayjs'](+_0x2ccc3b[_0x459eb6(0x243)])['format'](_0x459eb6(0x1da)),'personId':_0x2ccc3b[_0x459eb6(0x236)]};}else{const _0xeb3444={'memberId':_0x517aae,'unitId':_0x3cc05f,'content':_0x1c2b5a,'mention':_0x1568a8},_0x55698e=await this[_0x459eb6(0x1f0)][_0x459eb6(0x23c)](_0x459eb6(0x23d)+_0x3cc05f+_0x459eb6(0x1d2),{'body':_0xeb3444});return _0x2451ab(_0x55698e[_0x459eb6(0x235)][_0x459eb6(0x1ca)],_0xeedcca);}}async[_0x4b6dc2(0x21c)](_0x3aed67){const _0x1db610=_0x4b6dc2;var _0x345a5f,_0x57b7b9;const {text:_0x41a427,unitId:_0x1ad152}=_0x3aed67,_0x3b4178=(_0x57b7b9=(_0x345a5f=_0x41a427[_0x1db610(0x1e2)])==null?void 0x0:_0x345a5f[_0x1db610(0x1e4)](_0x413280=>_0x413280[_0x1db610(0x209)]===_0x3a212d[_0x1db610(0x1f5)][_0x1db610(0x223)])[_0x1db610(0x1f8)](_0x317132=>_0x317132[_0x1db610(0x1ef)]))!=null?_0x57b7b9:[],_0x18e6ae=JSON[_0x1db610(0x20a)](_0x41a427),_0x35bb13=_0x3aed67[_0x1db610(0x214)],_0x1d1fbb=_0x3aed67['id'],_0x1d7816={'memberId':(await this[_0x1db610(0x1fe)][_0x1db610(0x202)](_0x1ad152))['getMemberID'](),'unitId':_0x1ad152,'threadId':_0x35bb13,'mention':_0x3b4178,'content':_0x18e6ae,'replyId':_0x1d1fbb},_0x13fe48=await this[_0x1db610(0x1f0)][_0x1db610(0x23c)](_0x1db610(0x23d)+_0x1ad152+_0x1db610(0x1d1),{'body':_0x1d7816});return!_0x13fe48[_0x1db610(0x235)][_0x1db610(0x1f9)]||_0x13fe48['body'][_0x1db610(0x1f9)]['code']===0x1;}async[_0x4b6dc2(0x1dd)](_0x2f62d7){const _0x1a616c=_0x4b6dc2,{unitId:_0xd1abce}=_0x2f62d7,_0x30ccaf=_0x2f62d7[_0x1a616c(0x214)],_0x5a7a30={'memberId':this['_userService'][_0x1a616c(0x1de)]()[_0x1a616c(0x1d0)],'unitId':_0xd1abce,'threadId':_0x30ccaf,'solved':_0x2f62d7[_0x1a616c(0x231)]?_0x3179e6[_0x1a616c(0x1c9)]:_0x3179e6[_0x1a616c(0x210)]},_0x2de6fa=await this[_0x1a616c(0x1f0)][_0x1a616c(0x23c)](_0x1a616c(0x23d)+_0xd1abce+_0x1a616c(0x21f),{'body':_0x5a7a30});return!_0x2de6fa[_0x1a616c(0x235)]['error']||_0x2de6fa['body'][_0x1a616c(0x1f9)][_0x1a616c(0x1ce)]===0x1;}async[_0x4b6dc2(0x23f)](_0x4b48f4,_0x466e0b,_0x23551b,_0x57a05f){const _0x152227=_0x4b6dc2,_0x5c683e={'memberId':(await this[_0x152227(0x1fe)][_0x152227(0x202)](_0x4b48f4))[_0x152227(0x232)](),'threadId':_0x23551b,'replyId':_0x57a05f,'unitId':_0x4b48f4},_0x15736e=await this[_0x152227(0x1f0)][_0x152227(0x23c)](_0x152227(0x23d)+_0x4b48f4+_0x152227(0x212),{'body':_0x5c683e});return!_0x15736e[_0x152227(0x235)][_0x152227(0x1f9)]||_0x15736e['body'][_0x152227(0x1f9)]['code']===0x1;}async['listComments'](_0x5b6de5,_0xd36424,_0x153958){const _0x5ab173=_0x4b6dc2,_0x45297c={'unitId':_0x5b6de5,'threadId':_0x153958},_0x32a35c=await this[_0x5ab173(0x1f0)][_0x5ab173(0x23c)]('/universer-api/comment/unit/'+_0x5b6de5+_0x5ab173(0x215),{'body':_0x45297c}),_0x154936=_0x153958[_0x5ab173(0x1f8)](_0x27bbb5=>_0x277862(_0x32a35c[_0x5ab173(0x235)][_0x5ab173(0x24c)][_0x27bbb5],_0x5b6de5,_0xd36424))[_0x5ab173(0x1e4)](Boolean);return Object[_0x5ab173(0x21a)](_0x32a35c['body'][_0x5ab173(0x249)])['forEach'](_0x168710=>{const _0x28fe3b=_0x5ab173;this['_userService'][_0x28fe3b(0x1e6)](_0x168710);}),_0x154936;}[_0x4b6dc2(0x21e)](_0x3e4c63){const _0x1a3df2=_0x4b6dc2;return{'id':_0x3e4c63['id'],'threadId':_0x3e4c63[_0x1a3df2(0x214)],'ref':_0x3e4c63['ref']};}};_0xa5c8d5=_0x566803([_0xf7a449(0x0,_0x3a212d[_0x4b6dc2(0x1e8)](_0x2f3a4f[_0x4b6dc2(0x1dc)])),_0xf7a449(0x1,_0x3a212d[_0x4b6dc2(0x1e8)](_0x3a212d[_0x4b6dc2(0x24d)])),_0xf7a449(0x2,_0x3a212d[_0x4b6dc2(0x1e8)](_0x4b2ae7[_0x4b6dc2(0x238)])),_0xf7a449(0x3,_0x3a212d[_0x4b6dc2(0x1e8)](_0x3a212d[_0x4b6dc2(0x228)]))],_0xa5c8d5);var _0x39dd26=Object[_0x4b6dc2(0x239)],_0x12e5de=Object[_0x4b6dc2(0x1e9)],_0x4aa846=(_0x15e091,_0x3214be,_0x4506b0,_0x4b258e)=>{const _0xc2fd3c=_0x4b6dc2;for(var _0x38f66f=_0x4b258e>0x1?void 0x0:_0x4b258e?_0x12e5de(_0x3214be,_0x4506b0):_0x3214be,_0x5746c2=_0x15e091[_0xc2fd3c(0x222)]-0x1,_0x435a93;_0x5746c2>=0x0;_0x5746c2--)(_0x435a93=_0x15e091[_0x5746c2])&&(_0x38f66f=(_0x4b258e?_0x435a93(_0x3214be,_0x4506b0,_0x38f66f):_0x435a93(_0x38f66f))||_0x38f66f);return _0x4b258e&&_0x38f66f&&_0x39dd26(_0x3214be,_0x4506b0,_0x38f66f),_0x38f66f;},_0x1b0f71=(_0x4b8a6b,_0x5d7bbd)=>(_0x1ad5c8,_0x2277fb)=>_0x5d7bbd(_0x1ad5c8,_0x2277fb,_0x4b8a6b);let _0x2dbcfd=class extends _0x3a212d[_0x4b6dc2(0x1e7)]{constructor(_0x1f8d8e,_0x30d187){const _0x43e511=_0x4b6dc2;super(),this[_0x43e511(0x1cd)]=_0x1f8d8e,this['_threadCommentDataSource']=_0x30d187,this['_initDataSource']();}[_0x4b6dc2(0x21b)](){const _0x9bd3c8=_0x4b6dc2;this[_0x9bd3c8(0x1cd)]['dataSource']=this[_0x9bd3c8(0x1d9)],this[_0x9bd3c8(0x1cd)][_0x9bd3c8(0x22a)]=!0x1;}};_0x2dbcfd=_0x4aa846([_0x1b0f71(0x0,_0x1e89df[_0x4b6dc2(0x1d7)]),_0x1b0f71(0x1,_0x3a212d[_0x4b6dc2(0x1e8)](_0xa5c8d5))],_0x2dbcfd);var _0xfa0b83=Object['defineProperty'],_0xcffbc4=Object['getOwnPropertyDescriptor'],_0xa3922a=(_0x5681ca,_0x595f8f,_0x48cf73)=>_0x595f8f in _0x5681ca?_0xfa0b83(_0x5681ca,_0x595f8f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x48cf73}):_0x5681ca[_0x595f8f]=_0x48cf73,_0x48fe1a=(_0x7a4dbf,_0x233270,_0x5a426d,_0x2ff901)=>{const _0x449181=_0x4b6dc2;for(var _0x31cc0c=_0x2ff901>0x1?void 0x0:_0x2ff901?_0xcffbc4(_0x233270,_0x5a426d):_0x233270,_0x1f1d32=_0x7a4dbf[_0x449181(0x222)]-0x1,_0x1b5a71;_0x1f1d32>=0x0;_0x1f1d32--)(_0x1b5a71=_0x7a4dbf[_0x1f1d32])&&(_0x31cc0c=(_0x2ff901?_0x1b5a71(_0x233270,_0x5a426d,_0x31cc0c):_0x1b5a71(_0x31cc0c))||_0x31cc0c);return _0x2ff901&&_0x31cc0c&&_0xfa0b83(_0x233270,_0x5a426d,_0x31cc0c),_0x31cc0c;},_0x24eb0d=(_0x5c81a0,_0x2ae940)=>(_0x4e2393,_0x159112)=>_0x2ae940(_0x4e2393,_0x159112,_0x5c81a0),_0x28e21c=(_0xa6e6d1,_0x3e62be,_0x5caaf5)=>_0xa3922a(_0xa6e6d1,typeof _0x3e62be!='symbol'?_0x3e62be+'':_0x3e62be,_0x5caaf5);_0x49a0d4[_0x4b6dc2(0x1e5)]=class extends _0x3a212d[_0x4b6dc2(0x1cc)]{constructor(_0x2949ba=_0x4bddc2,_0x1628e2,_0x41bd62){const _0x320d2c=_0x4b6dc2;super(),this[_0x320d2c(0x24b)]=_0x2949ba,this[_0x320d2c(0x20f)]=_0x1628e2,this[_0x320d2c(0x234)]=_0x41bd62;const {..._0x1bf912}=_0x3a212d[_0x320d2c(0x22b)]({},_0x4bddc2,this[_0x320d2c(0x24b)]);this[_0x320d2c(0x234)][_0x320d2c(0x218)](_0x444c84,_0x1bf912);}[_0x4b6dc2(0x201)](){const _0x3e867e=_0x4b6dc2;[[_0xa5c8d5],[_0x2dbcfd],[_0x24dc24]][_0x3e867e(0x246)](_0x44e47f=>{this['_injector']['add'](_0x44e47f);});}[_0x4b6dc2(0x244)](){const _0x3bd27b=_0x4b6dc2;this[_0x3bd27b(0x20f)][_0x3bd27b(0x22e)](_0x2dbcfd),this[_0x3bd27b(0x20f)]['get'](_0x24dc24);}},_0x28e21c(_0x49a0d4[_0x4b6dc2(0x1e5)],'pluginName',_0x3b2a12),_0x28e21c(_0x49a0d4[_0x4b6dc2(0x1e5)],_0x4b6dc2(0x217),_0x3a212d[_0x4b6dc2(0x1fc)][_0x4b6dc2(0x216)]),_0x49a0d4[_0x4b6dc2(0x1e5)]=_0x48fe1a([_0x3a212d[_0x4b6dc2(0x205)](_0xbd58f2[_0x4b6dc2(0x219)],_0x4b2ae7[_0x4b6dc2(0x1cf)],_0x27a9e0['UniverLicensePlugin']),_0x24eb0d(0x1,_0x3a212d[_0x4b6dc2(0x1e8)](_0x3a212d[_0x4b6dc2(0x228)])),_0x24eb0d(0x2,_0x3a212d[_0x4b6dc2(0x200)])],_0x49a0d4['UniverThreadCommentDataSourcePlugin']),Object[_0x4b6dc2(0x239)](_0x49a0d4,Symbol[_0x4b6dc2(0x1df)],{'value':'Module'});}));function _0x69fa(){const _0x16defd=['userId','amd','CollaborationSessionService','defineProperty','getComment','parse','post','/universer-api/comment/unit/','parentId','deleteComment','rxjs','Edit','@univerjs/network','createTimestamp','onReady','thread-comment-data-source.config','forEach','bufferTime','size','users','5094020VmiwXt','_config','comments','UserManagerService','Delete','_commentService','Solved','comment','_threadCommentModel','Plugin','_threadCommentDataSourceService','code','UniverCollaborationClientPlugin','userID','/edit','/add','UniverNetwork','6327584pRiaVW','Unknown','UniverProCollaborationClient','IThreadCommentDataSourceService','reply','_threadCommentDataSource','YYYY/MM/DD\x20HH:mm','object','HTTPService','resolveComment','getCurrentUser','toStringTag','getUnit','@univerjs-pro/collaboration-client','customRanges','_initUserSync','filter','UniverThreadCommentDataSourcePlugin','addUser','Disposable','Inject','getOwnPropertyDescriptor','8sUpEVk','UNRECOGNIZED','addComment','commentUpdate$','getUser','rangeId','_httpService','content','replies','delete','root','CustomRangeType','UniverProThreadCommentDatasource','1414092gnRBXN','map','error','replyId','@univerjs-pro/license','UniverInstanceType','_userService','_sessionService','Reply','IConfigService','onStarting','requireSession','35Fohfwu','@univerjs/core','DependentOn','exports','5395551bfZhEg','CommentService','rangeType','stringify','Solve','6232833ODuzSr','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','personId','_injector','OpenOrReOpen','user','/delete','8spStif','threadId','/list','UNIVER_UNKNOWN','type','setConfig','UniverThreadCommentUIPlugin','values','_initDataSource','updateComment','unitId','saveCommentToSnapshot','/solved','UniverCore','subscribe','length','COMMENT','add','function','3824802khYIBa','Add','Injector','solved','syncUpdateMutationToColla','merge','disposeWithMe','UniverThreadCommentUi','get','_init','find','resolved','getMemberID','289946Adnthw','_configService','body'];_0x69fa=function(){return _0x16defd;};return _0x69fa();}
1
+ function _0x440a(_0x6aa8b0,_0x43444c){const _0x37a172=_0x37a1();return _0x440a=function(_0x440acd,_0x3f2661){_0x440acd=_0x440acd-0xd2;let _0x22cffb=_0x37a172[_0x440acd];return _0x22cffb;},_0x440a(_0x6aa8b0,_0x43444c);}(function(_0x193f73,_0x3458e0){const _0x5ac860=_0x440a,_0x2afd5e=_0x193f73();while(!![]){try{const _0x15965e=-parseInt(_0x5ac860(0x129))/0x1*(-parseInt(_0x5ac860(0x139))/0x2)+parseInt(_0x5ac860(0xeb))/0x3*(parseInt(_0x5ac860(0xfa))/0x4)+parseInt(_0x5ac860(0xe8))/0x5+-parseInt(_0x5ac860(0x108))/0x6*(parseInt(_0x5ac860(0x156))/0x7)+-parseInt(_0x5ac860(0xfb))/0x8*(parseInt(_0x5ac860(0xfe))/0x9)+parseInt(_0x5ac860(0xda))/0xa+-parseInt(_0x5ac860(0x158))/0xb*(-parseInt(_0x5ac860(0xe6))/0xc);if(_0x15965e===_0x3458e0)break;else _0x2afd5e['push'](_0x2afd5e['shift']());}catch(_0x11a638){_0x2afd5e['push'](_0x2afd5e['shift']());}}}(_0x37a1,0xc73c5),function(_0x4bdf7a,_0x102535){const _0x33225e=_0x440a;typeof exports==_0x33225e(0x10e)&&typeof module<'u'?_0x102535(exports,require(_0x33225e(0x123)),require(_0x33225e(0x145)),require('@univerjs/core'),require(_0x33225e(0xd3)),require(_0x33225e(0x107)),require(_0x33225e(0x147)),require(_0x33225e(0xe4))):typeof define==_0x33225e(0x138)&&define[_0x33225e(0x13e)]?define([_0x33225e(0x116),_0x33225e(0x123),_0x33225e(0x145),_0x33225e(0xdd),_0x33225e(0xd3),'@univerjs/thread-comment',_0x33225e(0x147),_0x33225e(0xe4)],_0x102535):(_0x4bdf7a=typeof globalThis<'u'?globalThis:_0x4bdf7a||self,_0x102535(_0x4bdf7a[_0x33225e(0x13c)]={},_0x4bdf7a[_0x33225e(0x131)],_0x4bdf7a[_0x33225e(0xec)],_0x4bdf7a[_0x33225e(0x11b)],_0x4bdf7a['UniverThreadCommentUi'],_0x4bdf7a['UniverThreadComment'],_0x4bdf7a['rxjs'],_0x4bdf7a['UniverNetwork']));}(this,function(_0x2623eb,_0x358889,_0x14ca47,_0x391ec7,_0x227a4b,_0x2fe0c7,_0x135db4,_0x1991b2){'use strict';const _0x10f868=_0x440a;const _0x32ecea='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x1bfcd0=(_0x15ccae=>(_0x15ccae[_0x15ccae['OpenOrReOpen']=0x0]=_0x10f868(0x150),_0x15ccae[_0x15ccae['Solved']=0x1]=_0x10f868(0x10c),_0x15ccae[_0x15ccae['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x15ccae))(_0x1bfcd0||{}),_0x4bec08=(_0x3a802e=>(_0x3a802e[_0x3a802e['Unknown']=0x0]=_0x10f868(0xdb),_0x3a802e[_0x3a802e[_0x10f868(0x141)]=0x1]=_0x10f868(0x141),_0x3a802e[_0x3a802e[_0x10f868(0x102)]=0x2]=_0x10f868(0x102),_0x3a802e[_0x3a802e[_0x10f868(0x130)]=0x3]=_0x10f868(0x130),_0x3a802e[_0x3a802e[_0x10f868(0xf5)]=0x4]=_0x10f868(0xf5),_0x3a802e[_0x3a802e[_0x10f868(0x10f)]=0x5]=_0x10f868(0x10f),_0x3a802e[_0x3a802e[_0x10f868(0x11c)]=-0x1]=_0x10f868(0x11c),_0x3a802e))(_0x4bec08||{});const _0x551956=_0x361c30=>_0x391ec7[_0x10f868(0x146)](new Date(+_0x361c30))[_0x10f868(0x155)](_0x10f868(0x11f)),_0x24bb14=async(_0x35d5c4,_0x4a177e)=>{const _0x4e15ba=_0x10f868,_0x546b72=_0x35d5c4[_0x4e15ba(0xd5)](_0x391ec7['UserManagerService']),_0x4e5b5e=_0x35d5c4['get'](_0x1991b2[_0x4e15ba(0xdf)]);_0x4a177e[_0x4e15ba(0xdc)](_0x30c6f8=>{const _0x1e71e1=_0x4e15ba;_0x546b72[_0x1e71e1(0x126)](_0x30c6f8)&&_0x4a177e[_0x1e71e1(0x12b)](_0x30c6f8);}),_0x4a177e['size']&&(await _0x4e5b5e['get'](_0x4e15ba(0xd8),{'params':{'userIDs':[..._0x4a177e]}}))[_0x4e15ba(0x143)]['users'][_0x4e15ba(0xdc)](_0x45d7ee=>{const _0x3b54c4=_0x4e15ba;_0x45d7ee&&_0x546b72[_0x3b54c4(0xfd)](_0x45d7ee);});};var _0xb0dd53=Object[_0x10f868(0x11d)],_0x2df279=Object[_0x10f868(0x152)],_0x443290=(_0x2461cd,_0x114abe,_0x46aa4e,_0x106ad8)=>{const _0x5465e7=_0x10f868;for(var _0x3601c9=_0x106ad8>0x1?void 0x0:_0x106ad8?_0x2df279(_0x114abe,_0x46aa4e):_0x114abe,_0x194726=_0x2461cd[_0x5465e7(0xed)]-0x1,_0x2a95e6;_0x194726>=0x0;_0x194726--)(_0x2a95e6=_0x2461cd[_0x194726])&&(_0x3601c9=(_0x106ad8?_0x2a95e6(_0x114abe,_0x46aa4e,_0x3601c9):_0x2a95e6(_0x3601c9))||_0x3601c9);return _0x106ad8&&_0x3601c9&&_0xb0dd53(_0x114abe,_0x46aa4e,_0x3601c9),_0x3601c9;},_0x5cffbe=(_0x514db4,_0x1b0fcd)=>(_0x194eb2,_0x2239a5)=>_0x1b0fcd(_0x194eb2,_0x2239a5,_0x514db4);let _0x109d89=class extends _0x391ec7['Disposable']{constructor(_0x4970ba,_0x4a5973,_0x35a42f,_0xb776c){const _0x1277c4=_0x10f868;super(),this['_commentService']=_0x4970ba,this[_0x1277c4(0x14f)]=_0x4a5973,this['_userService']=_0x35a42f,this[_0x1277c4(0xf1)]=_0xb776c,this[_0x1277c4(0xe5)](),this[_0x1277c4(0x125)]();}[_0x10f868(0x125)](){const _0x5af991=_0x10f868;this[_0x5af991(0x122)](this[_0x5af991(0x14f)][_0x5af991(0x13f)][_0x5af991(0xe7)](_0x135db4['bufferTime'](0x10))[_0x5af991(0xf7)](_0x157c60=>{const _0x2a84f0=_0x5af991,_0x160153=new Set();_0x157c60[_0x2a84f0(0xdc)](_0x49ecc8=>{const _0x56261e=_0x2a84f0;switch(_0x49ecc8[_0x56261e(0x103)]){case _0x56261e(0x105):{const _0x4ecf29=_0x49ecc8['payload'][_0x56261e(0x115)];_0x160153[_0x56261e(0x105)](_0x4ecf29);break;}}}),_0x24bb14(this[_0x2a84f0(0xf1)],_0x160153);}));}[_0x10f868(0xe5)](){const _0x36d5b1=_0x10f868;this[_0x36d5b1(0x122)](this[_0x36d5b1(0x151)][_0x36d5b1(0x13f)][_0x36d5b1(0xf7)](async _0x5d2ece=>{const _0x16d9e6=_0x36d5b1;var _0x2b3c5e,_0x3246f1,_0x178758,_0x29d8f4;const _0x3501a9=(_0x2b3c5e=this[_0x16d9e6(0x14f)]['getUnit'](_0x5d2ece[_0x16d9e6(0x159)])[_0x16d9e6(0x140)](_0x270457=>_0x270457[_0x16d9e6(0x154)]===_0x5d2ece[_0x16d9e6(0x154)]))==null?void 0x0:_0x2b3c5e[_0x16d9e6(0xe1)];if(!_0x3501a9)return;const {unitId:_0x1b09ae,subUnitId:_0x265380}=_0x3501a9;switch(_0x5d2ece[_0x16d9e6(0x13d)]&&this[_0x16d9e6(0x12c)][_0x16d9e6(0xfd)](_0x5d2ece[_0x16d9e6(0x13d)]),_0x5d2ece[_0x16d9e6(0x103)]){case _0x4bec08['Add']:break;case _0x4bec08[_0x16d9e6(0x102)]:{this['_threadCommentModel'][_0x16d9e6(0x111)](_0x1b09ae,_0x265380,{'unitId':_0x1b09ae,'subUnitId':_0x265380,'ref':'','id':_0x5d2ece[_0x16d9e6(0xfc)],'dT':_0x551956(+_0x5d2ece['createTimestamp']),'threadId':_0x5d2ece[_0x16d9e6(0x154)],'personId':(_0x178758=(_0x3246f1=_0x5d2ece[_0x16d9e6(0x13d)])==null?void 0x0:_0x3246f1['userID'])!=null?_0x178758:_0x5d2ece[_0x16d9e6(0x11a)],'text':JSON[_0x16d9e6(0x14c)](_0x5d2ece[_0x16d9e6(0xd6)]),'parentId':_0x3501a9['id']});break;}case _0x4bec08[_0x16d9e6(0xf5)]:{const _0x387133=this['_threadCommentModel']['getComment'](_0x1b09ae,_0x265380,_0x5d2ece[_0x16d9e6(0xfc)]);_0x387133&&_0x387133[_0x16d9e6(0xf9)]&&this[_0x16d9e6(0x14f)][_0x16d9e6(0xea)](_0x1b09ae,_0x265380,_0x5d2ece[_0x16d9e6(0xfc)]);break;}case _0x4bec08[_0x16d9e6(0x130)]:{this['_threadCommentModel']['updateComment'](_0x1b09ae,_0x265380,{'commentId':_0x5d2ece['replyId'],'text':JSON['parse'](_0x5d2ece[_0x16d9e6(0xd6)])});break;}case _0x4bec08[_0x16d9e6(0x10f)]:{const _0x178b48=(_0x29d8f4=this[_0x16d9e6(0x14f)][_0x16d9e6(0xef)](_0x5d2ece['unitId'])[_0x16d9e6(0x140)](_0x91e7a0=>_0x91e7a0[_0x16d9e6(0x154)]===_0x5d2ece[_0x16d9e6(0x154)]))==null?void 0x0:_0x29d8f4['root'];_0x178b48&&this[_0x16d9e6(0x14f)]['resolveComment'](_0x1b09ae,_0x265380,_0x178b48['id'],_0x5d2ece[_0x16d9e6(0xd2)]===_0x1bfcd0[_0x16d9e6(0x10c)]);break;}}}));}};_0x109d89=_0x443290([_0x5cffbe(0x0,_0x391ec7[_0x10f868(0xf2)](_0x358889[_0x10f868(0x149)])),_0x5cffbe(0x1,_0x391ec7[_0x10f868(0xf2)](_0x2fe0c7[_0x10f868(0x10b)])),_0x5cffbe(0x2,_0x391ec7[_0x10f868(0xf2)](_0x391ec7['UserManagerService'])),_0x5cffbe(0x3,_0x391ec7[_0x10f868(0xf2)](_0x391ec7[_0x10f868(0x104)]))],_0x109d89);const _0x2cc259=_0x10f868(0x144),_0x2651bb={};var _0x310f13=Object[_0x10f868(0x11d)],_0x5b918e=Object[_0x10f868(0x152)],_0x158609=(_0xe88b4f,_0x3974e7,_0x23ef4f,_0x58318d)=>{const _0x4451a9=_0x10f868;for(var _0x24609b=_0x58318d>0x1?void 0x0:_0x58318d?_0x5b918e(_0x3974e7,_0x23ef4f):_0x3974e7,_0x3a42e6=_0xe88b4f[_0x4451a9(0xed)]-0x1,_0x386a64;_0x3a42e6>=0x0;_0x3a42e6--)(_0x386a64=_0xe88b4f[_0x3a42e6])&&(_0x24609b=(_0x58318d?_0x386a64(_0x3974e7,_0x23ef4f,_0x24609b):_0x386a64(_0x24609b))||_0x24609b);return _0x58318d&&_0x24609b&&_0x310f13(_0x3974e7,_0x23ef4f,_0x24609b),_0x24609b;},_0x4d627e=(_0x482dcf,_0x3f5e4a)=>(_0x52ac37,_0x4ac2a7)=>_0x3f5e4a(_0x52ac37,_0x4ac2a7,_0x482dcf);function _0x2dd273(_0x15bc56,_0x77a131){const _0xd52853=_0x10f868,_0x1f5eca=_0x15bc56[_0xd52853(0x120)][0x0];return{..._0x77a131,'id':_0x1f5eca[_0xd52853(0xfc)],'resolved':_0x15bc56[_0xd52853(0xd2)]===0x1,'dT':_0x551956(_0x1f5eca['createTimestamp']),'personId':_0x1f5eca[_0xd52853(0x11a)],'threadId':_0x1f5eca[_0xd52853(0x154)]};}function _0x14e38a(_0xf689e5,_0x3112f5,_0x5a98cb){const _0x9133ae=_0x10f868;var _0x1099ed,_0x26c963;if(((_0x26c963=(_0x1099ed=_0xf689e5==null?void 0x0:_0xf689e5[_0x9133ae(0x120)])==null?void 0x0:_0x1099ed['length'])!=null?_0x26c963:0x0)>0x0){const _0x37e74e=(_0x23875a,_0x270774)=>({'id':_0x23875a[_0x9133ae(0xfc)],'threadId':_0x23875a['threadId'],'dT':_0x551956(_0x23875a[_0x9133ae(0xe9)]),'personId':_0x23875a[_0x9133ae(0x11a)],'resolved':_0xf689e5[_0x9133ae(0xd2)]===_0x1bfcd0[_0x9133ae(0x10c)],'unitId':_0x3112f5,'subUnitId':_0x5a98cb,'text':JSON['parse'](_0x23875a[_0x9133ae(0xd6)]),'parentId':_0x270774}),_0xddb38c=_0x37e74e(_0xf689e5[_0x9133ae(0x120)][0x0]);return{..._0xddb38c,'children':_0xf689e5['replies'][_0x9133ae(0xf4)](0x1)['map'](_0x3191bf=>_0x37e74e(_0x3191bf,_0xddb38c['id']))};}return null;}let _0x6bb45b=class{constructor(_0x5553d5,_0x30b65a,_0xcf737e,_0x1a06db){const _0x2c3f25=_0x10f868;this[_0x2c3f25(0xd9)]=_0x5553d5,this[_0x2c3f25(0x12c)]=_0x30b65a,this['_sessionService']=_0xcf737e,this[_0x2c3f25(0xf1)]=_0x1a06db;}async[_0x10f868(0x111)](_0xf085ce){const _0x41df50=_0x10f868;var _0x233eae,_0x28ec25;const {parentId:_0x3e96cf,unitId:_0x4f99d0,text:_0x4c1997,threadId:_0x3a86b1}=_0xf085ce,_0xb622bd=(_0x28ec25=(_0x233eae=_0x4c1997[_0x41df50(0x14b)])==null?void 0x0:_0x233eae[_0x41df50(0xe2)](_0x29add5=>_0x29add5[_0x41df50(0x12e)]===_0x391ec7['CustomRangeType'][_0x41df50(0x106)])[_0x41df50(0x101)](_0x1865c7=>_0x1865c7[_0x41df50(0x12f)]))!=null?_0x28ec25:[],_0x304016=JSON[_0x41df50(0x137)](_0x4c1997),_0x7adc1b=(await this['_sessionService'][_0x41df50(0x135)](_0x4f99d0))['getMemberID']();if(_0x3e96cf){const _0xb297={'memberId':_0x7adc1b,'unitId':_0x4f99d0,'content':_0x304016,'mention':_0xb622bd,'threadId':_0x3a86b1},_0x34a095=(await this['_httpService']['post'](_0x41df50(0x118)+_0x4f99d0+'/reply',{'body':_0xb297}))[_0x41df50(0x143)][_0x41df50(0x13b)];return{..._0xf085ce,'id':_0x34a095[_0x41df50(0xfc)],'dT':_0x391ec7[_0x41df50(0x146)](+_0x34a095[_0x41df50(0xe9)])[_0x41df50(0x155)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x34a095['userId']};}else{const _0x522f58={'memberId':_0x7adc1b,'unitId':_0x4f99d0,'content':_0x304016,'mention':_0xb622bd},_0xc4f4f8=await this[_0x41df50(0xd9)][_0x41df50(0x117)](_0x41df50(0x118)+_0x4f99d0+_0x41df50(0xee),{'body':_0x522f58});return _0x2dd273(_0xc4f4f8[_0x41df50(0x143)][_0x41df50(0xe3)],_0xf085ce);}}async[_0x10f868(0x13a)](_0x4d7cc9){const _0x474b5e=_0x10f868;var _0x329ae8,_0xb5723;const {text:_0x41b133,unitId:_0x274d3d}=_0x4d7cc9,_0x3ca707=(_0xb5723=(_0x329ae8=_0x41b133[_0x474b5e(0x14b)])==null?void 0x0:_0x329ae8['filter'](_0x4e4535=>_0x4e4535['rangeType']===_0x391ec7[_0x474b5e(0x119)][_0x474b5e(0x106)])[_0x474b5e(0x101)](_0x27896f=>_0x27896f['rangeId']))!=null?_0xb5723:[],_0x4442b9=JSON['stringify'](_0x41b133),_0x384b79=_0x4d7cc9[_0x474b5e(0x154)],_0x14e1ab=_0x4d7cc9['id'],_0x18c87b={'memberId':(await this[_0x474b5e(0x14e)][_0x474b5e(0x135)](_0x274d3d))[_0x474b5e(0x127)](),'unitId':_0x274d3d,'threadId':_0x384b79,'mention':_0x3ca707,'content':_0x4442b9,'replyId':_0x14e1ab},_0x20e010=await this[_0x474b5e(0xd9)][_0x474b5e(0x117)](_0x474b5e(0x118)+_0x274d3d+_0x474b5e(0x14d),{'body':_0x18c87b});return!_0x20e010[_0x474b5e(0x143)][_0x474b5e(0x10a)]||_0x20e010['body'][_0x474b5e(0x10a)][_0x474b5e(0xf6)]===0x1;}async[_0x10f868(0x132)](_0xa40e96){const _0x34c02c=_0x10f868,{unitId:_0x536427}=_0xa40e96,_0x4c8839=_0xa40e96['threadId'],_0x1924b6={'memberId':this['_userService'][_0x34c02c(0xff)]()[_0x34c02c(0x109)],'unitId':_0x536427,'threadId':_0x4c8839,'solved':_0xa40e96[_0x34c02c(0xe0)]?_0x1bfcd0[_0x34c02c(0x10c)]:_0x1bfcd0[_0x34c02c(0x150)]},_0x3be31d=await this[_0x34c02c(0xd9)]['post'](_0x34c02c(0x118)+_0x536427+_0x34c02c(0xf0),{'body':_0x1924b6});return!_0x3be31d[_0x34c02c(0x143)][_0x34c02c(0x10a)]||_0x3be31d[_0x34c02c(0x143)][_0x34c02c(0x10a)][_0x34c02c(0xf6)]===0x1;}async['deleteComment'](_0x2f32f1,_0x32e4a2,_0x31df1b,_0x3b4e0a){const _0x163ab6=_0x10f868,_0x42e7f9={'memberId':(await this['_sessionService'][_0x163ab6(0x135)](_0x2f32f1))[_0x163ab6(0x127)](),'threadId':_0x31df1b,'replyId':_0x3b4e0a,'unitId':_0x2f32f1},_0x4ad957=await this[_0x163ab6(0xd9)]['post'](_0x163ab6(0x118)+_0x2f32f1+_0x163ab6(0x121),{'body':_0x42e7f9});return!_0x4ad957[_0x163ab6(0x143)][_0x163ab6(0x10a)]||_0x4ad957[_0x163ab6(0x143)]['error'][_0x163ab6(0xf6)]===0x1;}async['listComments'](_0x5f44f4,_0x117361,_0x1ac40d){const _0x1f68cf=_0x10f868,_0x5f443c={'unitId':_0x5f44f4,'threadId':_0x1ac40d},_0x4ccb5b=await this['_httpService'][_0x1f68cf(0x117)](_0x1f68cf(0x118)+_0x5f44f4+_0x1f68cf(0x11e),{'body':_0x5f443c}),_0x1983ac=_0x1ac40d[_0x1f68cf(0x101)](_0xedcf08=>_0x14e38a(_0x4ccb5b[_0x1f68cf(0x143)][_0x1f68cf(0x136)][_0xedcf08],_0x5f44f4,_0x117361))[_0x1f68cf(0xe2)](Boolean);return Object[_0x1f68cf(0x114)](_0x4ccb5b[_0x1f68cf(0x143)]['users'])['forEach'](_0x617d42=>{const _0x407bef=_0x1f68cf;this[_0x407bef(0x12c)]['addUser'](_0x617d42);}),_0x1983ac;}[_0x10f868(0x134)](_0x2c7d1f){const _0x8d4468=_0x10f868;return{'id':_0x2c7d1f['id'],'threadId':_0x2c7d1f[_0x8d4468(0x154)],'ref':_0x2c7d1f[_0x8d4468(0x15a)]};}};_0x6bb45b=_0x158609([_0x4d627e(0x0,_0x391ec7[_0x10f868(0xf2)](_0x1991b2[_0x10f868(0xdf)])),_0x4d627e(0x1,_0x391ec7[_0x10f868(0xf2)](_0x391ec7['UserManagerService'])),_0x4d627e(0x2,_0x391ec7[_0x10f868(0xf2)](_0x358889[_0x10f868(0x113)])),_0x4d627e(0x3,_0x391ec7['Inject'](_0x391ec7['Injector']))],_0x6bb45b);var _0x178019=Object[_0x10f868(0x11d)],_0x23bd51=Object[_0x10f868(0x152)],_0x577e4d=(_0x210259,_0x1976cb,_0x3e6d9c,_0x2866c0)=>{const _0x382833=_0x10f868;for(var _0x2761b6=_0x2866c0>0x1?void 0x0:_0x2866c0?_0x23bd51(_0x1976cb,_0x3e6d9c):_0x1976cb,_0x27e3af=_0x210259[_0x382833(0xed)]-0x1,_0x35b2d2;_0x27e3af>=0x0;_0x27e3af--)(_0x35b2d2=_0x210259[_0x27e3af])&&(_0x2761b6=(_0x2866c0?_0x35b2d2(_0x1976cb,_0x3e6d9c,_0x2761b6):_0x35b2d2(_0x2761b6))||_0x2761b6);return _0x2866c0&&_0x2761b6&&_0x178019(_0x1976cb,_0x3e6d9c,_0x2761b6),_0x2761b6;},_0x3c76c1=(_0x45667c,_0x538d1a)=>(_0x30d888,_0x42bbb9)=>_0x538d1a(_0x30d888,_0x42bbb9,_0x45667c);let _0x58c1e7=class extends _0x391ec7['Disposable']{constructor(_0x3a8e11,_0x217143){super(),this['_threadCommentDataSourceService']=_0x3a8e11,this['_threadCommentDataSource']=_0x217143,this['_initDataSource']();}[_0x10f868(0x128)](){const _0x4fe93d=_0x10f868;this[_0x4fe93d(0xf3)][_0x4fe93d(0x100)]=this[_0x4fe93d(0x124)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x58c1e7=_0x577e4d([_0x3c76c1(0x0,_0x2fe0c7['IThreadCommentDataSourceService']),_0x3c76c1(0x1,_0x391ec7[_0x10f868(0xf2)](_0x6bb45b))],_0x58c1e7);var _0x1b4192=Object[_0x10f868(0x11d)],_0x1f1140=Object[_0x10f868(0x152)],_0x30bb56=(_0x447fd9,_0x13223a,_0x12b80a)=>_0x13223a in _0x447fd9?_0x1b4192(_0x447fd9,_0x13223a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x12b80a}):_0x447fd9[_0x13223a]=_0x12b80a,_0x1fb027=(_0x43d1fe,_0x3de1bb,_0x9e0546,_0x2aa507)=>{const _0x4b7eb6=_0x10f868;for(var _0x5d7134=_0x2aa507>0x1?void 0x0:_0x2aa507?_0x1f1140(_0x3de1bb,_0x9e0546):_0x3de1bb,_0x28ee7a=_0x43d1fe[_0x4b7eb6(0xed)]-0x1,_0x347ab5;_0x28ee7a>=0x0;_0x28ee7a--)(_0x347ab5=_0x43d1fe[_0x28ee7a])&&(_0x5d7134=(_0x2aa507?_0x347ab5(_0x3de1bb,_0x9e0546,_0x5d7134):_0x347ab5(_0x5d7134))||_0x5d7134);return _0x2aa507&&_0x5d7134&&_0x1b4192(_0x3de1bb,_0x9e0546,_0x5d7134),_0x5d7134;},_0x58a1d0=(_0x132121,_0x755073)=>(_0xb9dc28,_0x22cbe3)=>_0x755073(_0xb9dc28,_0x22cbe3,_0x132121),_0x583869=(_0x277c57,_0x3b1cad,_0xfa6557)=>_0x30bb56(_0x277c57,typeof _0x3b1cad!=_0x10f868(0xde)?_0x3b1cad+'':_0x3b1cad,_0xfa6557);_0x2623eb['UniverThreadCommentDataSourcePlugin']=class extends _0x391ec7[_0x10f868(0x157)]{constructor(_0x292972=_0x2651bb,_0x38a2ee,_0x28b4d3){const _0x2364b2=_0x10f868;super(),this[_0x2364b2(0x110)]=_0x292972,this[_0x2364b2(0xf1)]=_0x38a2ee,this[_0x2364b2(0x112)]=_0x28b4d3;const {..._0x22179d}=_0x391ec7[_0x2364b2(0x12a)]({},_0x2651bb,this['_config']);this['_configService']['setConfig'](_0x2cc259,_0x22179d);}[_0x10f868(0x142)](){const _0x2db971=_0x10f868;[[_0x6bb45b],[_0x58c1e7],[_0x109d89]][_0x2db971(0xdc)](_0x58b569=>{const _0x5c697f=_0x2db971;this[_0x5c697f(0xf1)]['add'](_0x58b569);});}[_0x10f868(0x153)](){const _0xf37e06=_0x10f868;this[_0xf37e06(0xf1)][_0xf37e06(0xd5)](_0x58c1e7),this['_injector']['get'](_0x109d89);}},_0x583869(_0x2623eb[_0x10f868(0xd4)],'pluginName',_0x32ecea),_0x583869(_0x2623eb[_0x10f868(0xd4)],'type',_0x391ec7[_0x10f868(0x10d)][_0x10f868(0xf8)]),_0x2623eb[_0x10f868(0xd4)]=_0x1fb027([_0x391ec7['DependentOn'](_0x227a4b[_0x10f868(0x12d)],_0x358889[_0x10f868(0x148)],_0x14ca47['UniverLicensePlugin']),_0x58a1d0(0x1,_0x391ec7['Inject'](_0x391ec7['Injector'])),_0x58a1d0(0x2,_0x391ec7[_0x10f868(0x133)])],_0x2623eb['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x2623eb,Symbol[_0x10f868(0x14a)],{'value':_0x10f868(0xd7)});}));function _0x37a1(){const _0x52fcd7=['650331lfkOhv','unitId','ref','solved','@univerjs/thread-comment-ui','UniverThreadCommentDataSourcePlugin','get','content','Module','/universer-api/user/list','_httpService','6216280ElaAFu','Unknown','forEach','@univerjs/core','symbol','HTTPService','resolved','root','filter','comment','@univerjs/network','_init','144ARLNSu','pipe','2167600rUuYdS','createTimestamp','deleteComment','1887GEhQGR','UniverProLicense','length','/add','getUnit','/solved','_injector','Inject','_threadCommentDataSourceService','slice','Delete','code','subscribe','UNIVER_UNKNOWN','parentId','9932FgUcCZ','22904LSYQIG','replyId','addUser','3663KFbSMd','getCurrentUser','dataSource','map','Reply','type','Injector','add','COMMENT','@univerjs/thread-comment','7806IDEshr','userID','error','ThreadCommentModel','Solved','UniverInstanceType','object','Solve','_config','addComment','_configService','CollaborationSessionService','values','personId','exports','post','/universer-api/comment/unit/','CustomRangeType','userId','UniverCore','UNRECOGNIZED','defineProperty','/list','YYYY/MM/DD\x20HH:mm','replies','/delete','disposeWithMe','@univerjs-pro/collaboration-client','_threadCommentDataSource','_initUserSync','getUser','getMemberID','_initDataSource','139926nIUWKJ','merge','delete','_userService','UniverThreadCommentUIPlugin','rangeType','rangeId','Edit','UniverProCollaborationClient','resolveComment','IConfigService','saveCommentToSnapshot','requireSession','comments','stringify','function','4OxYgOY','updateComment','reply','UniverProThreadCommentDatasource','user','amd','commentUpdate$','find','Add','onStarting','body','thread-comment-data-source.config','@univerjs-pro/license','dayjs','rxjs','UniverCollaborationClientPlugin','CommentService','toStringTag','customRanges','parse','/edit','_sessionService','_threadCommentModel','OpenOrReOpen','_commentService','getOwnPropertyDescriptor','onReady','threadId','format','8743nGIFYj','Plugin'];_0x37a1=function(){return _0x52fcd7;};return _0x37a1();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.5.3-experimental.20250106-e3b7a39",
3
+ "version": "0.5.3-experimental.20250107-3e6579c",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.5.3-experimental.20250106-e3b7a39",
49
- "@univerjs-pro/license": "0.5.3-experimental.20250106-e3b7a39",
50
- "@univerjs/core": "0.5.3-experimental.20250106-e3b7a39",
48
+ "@univerjs-pro/license": "0.5.3-experimental.20250107-3e6579c",
49
+ "@univerjs-pro/collaboration-client": "0.5.3-experimental.20250107-3e6579c",
50
+ "@univerjs/network": "0.5.3-experimental.20250107-3e6579c",
51
51
  "@univerjs/protocol": "0.1.40-alpha.10",
52
- "@univerjs/thread-comment-ui": "0.5.3-experimental.20250106-e3b7a39",
53
- "@univerjs/network": "0.5.3-experimental.20250106-e3b7a39",
54
- "@univerjs/thread-comment": "0.5.3-experimental.20250106-e3b7a39"
52
+ "@univerjs/core": "0.5.3-experimental.20250107-3e6579c",
53
+ "@univerjs/thread-comment-ui": "0.5.3-experimental.20250107-3e6579c",
54
+ "@univerjs/thread-comment": "0.5.3-experimental.20250107-3e6579c"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",