@univerjs-pro/thread-comment-datasource 0.5.3-experimental.20250106-e3b7a39 → 0.5.3-experimental.20250106-4af1f4e
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 +1 -1
- package/lib/es/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
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 _0x40835f=_0x5c7e;(function(_0x2ce84e,_0x2883bb){const _0x236621=_0x5c7e,_0x335986=_0x2ce84e();while(!![]){try{const _0x5eed92=-parseInt(_0x236621(0x1a4))/0x1+-parseInt(_0x236621(0x191))/0x2*(parseInt(_0x236621(0x17f))/0x3)+parseInt(_0x236621(0x1ce))/0x4+-parseInt(_0x236621(0x179))/0x5*(parseInt(_0x236621(0x1d1))/0x6)+parseInt(_0x236621(0x17a))/0x7*(parseInt(_0x236621(0x1bd))/0x8)+-parseInt(_0x236621(0x17c))/0x9+parseInt(_0x236621(0x1c5))/0xa*(parseInt(_0x236621(0x194))/0xb);if(_0x5eed92===_0x2883bb)break;else _0x335986['push'](_0x335986['shift']());}catch(_0x5a5afe){_0x335986['push'](_0x335986['shift']());}}}(_0x3556,0x9e990));function _0x3556(){const _0xe3a9d8=['UNIVER_UNKNOWN','30845410dbfZag','replyId','comment','userId','pipe','_threadCommentDataSource','length','_initUserSync','body','505352IWoTAt','Solve','@univerjs-pro/collaboration-client','474ztljtH','rangeType','personId','unitId','delete','updateComment','rxjs','/universer-api/user/list','pluginName','_injector','values','/solved','user','@univerjs/core','/delete','comments','solved','find','Injector','filter','setConfig','requireSession','disposeWithMe','code','getUser','onReady','users','type','parentId','CommentService','getOwnPropertyDescriptor','getComment','listComments','OpenOrReOpen','reply','payload','dayjs','_config','stringify','Reply','Module','46455JRGDoY','14PGqrcT','rangeId','7385706OXOvub','HTTPService','addComment','2876043NDziYk','format','IConfigService','UniverInstanceType','@univerjs/thread-comment','_httpService','resolveComment','replies','Plugin','UNRECOGNIZED','UniverThreadCommentDataSourcePlugin','symbol','@univerjs/network','getMemberID','Add','@univerjs-pro/license','deleteComment','Solved','2UGXTdC','error','toStringTag','11UGqodN','/edit','onStarting','subscribe','_init','COMMENT','Delete','CustomRangeType','/universer-api/comment/unit/','_threadCommentModel','_userService','Unknown','post','UniverCollaborationClientPlugin','customRanges','commentUpdate$','707633LpdUwg','add','addUser','defineProperty','size','slice','getUnit','getCurrentUser','get','content','_sessionService','UserManagerService','Edit','YYYY/MM/DD\x20HH:mm','Inject','createTimestamp','/reply','UniverLicensePlugin','Disposable','parse','bufferTime','forEach','_commentService','_threadCommentDataSourceService','dataSource','2638696IKsOwB','map','ref','UniverThreadCommentUIPlugin','/add','threadId','_initDataSource'];_0x3556=function(){return _0xe3a9d8;};return _0x3556();}Object[_0x40835f(0x1a7)](exports,Symbol[_0x40835f(0x193)],{'value':_0x40835f(0x178)});const C=require(_0x40835f(0x1d0)),T=require(_0x40835f(0x18e)),c=require(_0x40835f(0x1de)),w=require('@univerjs/thread-comment-ui'),P=require(_0x40835f(0x183)),U=require(_0x40835f(0x1d7)),M=require(_0x40835f(0x18b)),R='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5b734d=>(_0x5b734d[_0x5b734d[_0x40835f(0x171)]=0x0]='OpenOrReOpen',_0x5b734d[_0x5b734d[_0x40835f(0x190)]=0x1]='Solved',_0x5b734d[_0x5b734d[_0x40835f(0x188)]=-0x1]=_0x40835f(0x188),_0x5b734d))(I||{}),v=(_0x260ba3=>(_0x260ba3[_0x260ba3[_0x40835f(0x19f)]=0x0]=_0x40835f(0x19f),_0x260ba3[_0x260ba3['Add']=0x1]=_0x40835f(0x18d),_0x260ba3[_0x260ba3[_0x40835f(0x177)]=0x2]='Reply',_0x260ba3[_0x260ba3[_0x40835f(0x1b0)]=0x3]=_0x40835f(0x1b0),_0x260ba3[_0x260ba3['Delete']=0x4]=_0x40835f(0x19a),_0x260ba3[_0x260ba3[_0x40835f(0x1cf)]=0x5]=_0x40835f(0x1cf),_0x260ba3[_0x260ba3[_0x40835f(0x188)]=-0x1]='UNRECOGNIZED',_0x260ba3))(v||{});const g=_0x7a020c=>c[_0x40835f(0x174)](new Date(+_0x7a020c))[_0x40835f(0x180)](_0x40835f(0x1b1)),$=async(_0xeb876b,_0x208655)=>{const _0x5dcc62=_0x40835f,_0x2b2b6a=_0xeb876b[_0x5dcc62(0x1ac)](c[_0x5dcc62(0x1af)]),_0x13bdfa=_0xeb876b[_0x5dcc62(0x1ac)](M[_0x5dcc62(0x17d)]);_0x208655['forEach'](_0x206ee8=>{const _0x595057=_0x5dcc62;_0x2b2b6a[_0x595057(0x1e9)](_0x206ee8)&&_0x208655[_0x595057(0x1d5)](_0x206ee8);}),_0x208655[_0x5dcc62(0x1a8)]&&(await _0x13bdfa[_0x5dcc62(0x1ac)](_0x5dcc62(0x1d8),{'params':{'userIDs':[..._0x208655]}}))[_0x5dcc62(0x1cd)][_0x5dcc62(0x1eb)][_0x5dcc62(0x1b9)](_0xe2b0eb=>{const _0x5afb6e=_0x5dcc62;_0xe2b0eb&&_0x2b2b6a[_0x5afb6e(0x1a6)](_0xe2b0eb);});};var E=Object[_0x40835f(0x1a7)],q=Object[_0x40835f(0x1ef)],A=(_0x2a640f,_0x185121,_0x5a7915,_0x4fec07)=>{const _0x534a99=_0x40835f;for(var _0xbce4cf=_0x4fec07>0x1?void 0x0:_0x4fec07?q(_0x185121,_0x5a7915):_0x185121,_0x12268b=_0x2a640f[_0x534a99(0x1cb)]-0x1,_0x251b0a;_0x12268b>=0x0;_0x12268b--)(_0x251b0a=_0x2a640f[_0x12268b])&&(_0xbce4cf=(_0x4fec07?_0x251b0a(_0x185121,_0x5a7915,_0xbce4cf):_0x251b0a(_0xbce4cf))||_0xbce4cf);return _0x4fec07&&_0xbce4cf&&E(_0x185121,_0x5a7915,_0xbce4cf),_0xbce4cf;},_=(_0x184bff,_0x3ff0cf)=>(_0x1e1dde,_0x12b9a8)=>_0x3ff0cf(_0x1e1dde,_0x12b9a8,_0x184bff);let S=class extends c[_0x40835f(0x1b6)]{constructor(_0x518616,_0x1ec1fd,_0x3c5bfe,_0x1dd7db){const _0x54a966=_0x40835f;super(),this['_commentService']=_0x518616,this[_0x54a966(0x19d)]=_0x1ec1fd,this['_userService']=_0x3c5bfe,this[_0x54a966(0x1da)]=_0x1dd7db,this[_0x54a966(0x198)](),this[_0x54a966(0x1cc)]();}['_initUserSync'](){const _0x5ea301=_0x40835f;this[_0x5ea301(0x1e7)](this[_0x5ea301(0x19d)][_0x5ea301(0x1a3)][_0x5ea301(0x1c9)](U[_0x5ea301(0x1b8)](0x10))['subscribe'](_0x47ec88=>{const _0x5034c7=_0x5ea301,_0x44ccc7=new Set();_0x47ec88['forEach'](_0x64381e=>{const _0x274f82=_0x5c7e;switch(_0x64381e[_0x274f82(0x1ec)]){case _0x274f82(0x1a5):{const _0x5c6425=_0x64381e[_0x274f82(0x173)][_0x274f82(0x1d3)];_0x44ccc7[_0x274f82(0x1a5)](_0x5c6425);break;}}}),$(this[_0x5034c7(0x1da)],_0x44ccc7);}));}[_0x40835f(0x198)](){const _0x48a30e=_0x40835f;this[_0x48a30e(0x1e7)](this[_0x48a30e(0x1ba)][_0x48a30e(0x1a3)][_0x48a30e(0x197)](async _0x423698=>{const _0x4cd2e1=_0x48a30e;var _0xae8abe,_0x4e70b5,_0x439660,_0x5eedc5;const _0x1cd68e=(_0xae8abe=this[_0x4cd2e1(0x19d)][_0x4cd2e1(0x1aa)](_0x423698[_0x4cd2e1(0x1d4)])[_0x4cd2e1(0x1e2)](_0x48b2f5=>_0x48b2f5[_0x4cd2e1(0x1c2)]===_0x423698[_0x4cd2e1(0x1c2)]))==null?void 0x0:_0xae8abe['root'];if(!_0x1cd68e)return;const {unitId:_0x59ce4e,subUnitId:_0x1b2c92}=_0x1cd68e;switch(_0x423698['user']&&this[_0x4cd2e1(0x19e)][_0x4cd2e1(0x1a6)](_0x423698['user']),_0x423698[_0x4cd2e1(0x1ec)]){case v[_0x4cd2e1(0x18d)]:break;case v[_0x4cd2e1(0x177)]:{this[_0x4cd2e1(0x19d)]['addComment'](_0x59ce4e,_0x1b2c92,{'unitId':_0x59ce4e,'subUnitId':_0x1b2c92,'ref':'','id':_0x423698['replyId'],'dT':g(+_0x423698[_0x4cd2e1(0x1b3)]),'threadId':_0x423698[_0x4cd2e1(0x1c2)],'personId':(_0x439660=(_0x4e70b5=_0x423698[_0x4cd2e1(0x1dd)])==null?void 0x0:_0x4e70b5['userID'])!=null?_0x439660:_0x423698[_0x4cd2e1(0x1c8)],'text':JSON[_0x4cd2e1(0x1b7)](_0x423698[_0x4cd2e1(0x1ad)]),'parentId':_0x1cd68e['id']});break;}case v[_0x4cd2e1(0x19a)]:{const _0x24982a=this[_0x4cd2e1(0x19d)][_0x4cd2e1(0x1f0)](_0x59ce4e,_0x1b2c92,_0x423698['replyId']);_0x24982a&&_0x24982a[_0x4cd2e1(0x1ed)]&&this[_0x4cd2e1(0x19d)][_0x4cd2e1(0x18f)](_0x59ce4e,_0x1b2c92,_0x423698['replyId']);break;}case v[_0x4cd2e1(0x1b0)]:{this[_0x4cd2e1(0x19d)]['updateComment'](_0x59ce4e,_0x1b2c92,{'commentId':_0x423698['replyId'],'text':JSON['parse'](_0x423698[_0x4cd2e1(0x1ad)])});break;}case v[_0x4cd2e1(0x1cf)]:{const _0x159963=(_0x5eedc5=this['_threadCommentModel'][_0x4cd2e1(0x1aa)](_0x423698[_0x4cd2e1(0x1d4)])['find'](_0x27903b=>_0x27903b['threadId']===_0x423698[_0x4cd2e1(0x1c2)]))==null?void 0x0:_0x5eedc5['root'];_0x159963&&this['_threadCommentModel'][_0x4cd2e1(0x185)](_0x59ce4e,_0x1b2c92,_0x159963['id'],_0x423698[_0x4cd2e1(0x1e1)]===I[_0x4cd2e1(0x190)]);break;}}}));}};S=A([_(0x0,c[_0x40835f(0x1b2)](C[_0x40835f(0x1ee)])),_(0x1,c[_0x40835f(0x1b2)](P['ThreadCommentModel'])),_(0x2,c[_0x40835f(0x1b2)](c[_0x40835f(0x1af)])),_(0x3,c[_0x40835f(0x1b2)](c[_0x40835f(0x1e3)]))],S);const x='thread-comment-data-source.config',D={};var Y=Object[_0x40835f(0x1a7)],G=Object[_0x40835f(0x1ef)],H=(_0x6aa2e0,_0x997f1f,_0x411683,_0x15277c)=>{const _0x5c28b6=_0x40835f;for(var _0x5b339b=_0x15277c>0x1?void 0x0:_0x15277c?G(_0x997f1f,_0x411683):_0x997f1f,_0x2a1b4d=_0x6aa2e0[_0x5c28b6(0x1cb)]-0x1,_0x2b1833;_0x2a1b4d>=0x0;_0x2a1b4d--)(_0x2b1833=_0x6aa2e0[_0x2a1b4d])&&(_0x5b339b=(_0x15277c?_0x2b1833(_0x997f1f,_0x411683,_0x5b339b):_0x2b1833(_0x5b339b))||_0x5b339b);return _0x15277c&&_0x5b339b&&Y(_0x997f1f,_0x411683,_0x5b339b),_0x5b339b;},p=(_0x1b37f4,_0x3d1c53)=>(_0x13521d,_0x57fc52)=>_0x3d1c53(_0x13521d,_0x57fc52,_0x1b37f4);function J(_0x1dba25,_0x3e6b02){const _0x59820e=_0x40835f,_0x1ed942=_0x1dba25['replies'][0x0];return{..._0x3e6b02,'id':_0x1ed942[_0x59820e(0x1c6)],'resolved':_0x1dba25[_0x59820e(0x1e1)]===0x1,'dT':g(_0x1ed942[_0x59820e(0x1b3)]),'personId':_0x1ed942[_0x59820e(0x1c8)],'threadId':_0x1ed942[_0x59820e(0x1c2)]};}function F(_0x28b058,_0x1af6e5,_0x572a8d){const _0x1a5221=_0x40835f;var _0x4aa683,_0x4a3ab5;if(((_0x4a3ab5=(_0x4aa683=_0x28b058==null?void 0x0:_0x28b058[_0x1a5221(0x186)])==null?void 0x0:_0x4aa683['length'])!=null?_0x4a3ab5:0x0)>0x0){const _0x289ef2=(_0x281fa6,_0x17acba)=>({'id':_0x281fa6[_0x1a5221(0x1c6)],'threadId':_0x281fa6[_0x1a5221(0x1c2)],'dT':g(_0x281fa6[_0x1a5221(0x1b3)]),'personId':_0x281fa6[_0x1a5221(0x1c8)],'resolved':_0x28b058[_0x1a5221(0x1e1)]===I[_0x1a5221(0x190)],'unitId':_0x1af6e5,'subUnitId':_0x572a8d,'text':JSON['parse'](_0x281fa6[_0x1a5221(0x1ad)]),'parentId':_0x17acba}),_0x706814=_0x289ef2(_0x28b058[_0x1a5221(0x186)][0x0]);return{..._0x706814,'children':_0x28b058[_0x1a5221(0x186)][_0x1a5221(0x1a9)](0x1)[_0x1a5221(0x1be)](_0x4df532=>_0x289ef2(_0x4df532,_0x706814['id']))};}return null;}let f=class{constructor(_0x40c846,_0x4d5994,_0xf5c40d,_0x2a2100){const _0x4cbdfd=_0x40835f;this['_httpService']=_0x40c846,this[_0x4cbdfd(0x19e)]=_0x4d5994,this[_0x4cbdfd(0x1ae)]=_0xf5c40d,this[_0x4cbdfd(0x1da)]=_0x2a2100;}async[_0x40835f(0x17e)](_0x4973f5){const _0x81493f=_0x40835f;var _0x12d698,_0x24127e;const {parentId:_0x466b72,unitId:_0x399684,text:_0x226a82,threadId:_0x475eab}=_0x4973f5,_0x4f3fed=(_0x24127e=(_0x12d698=_0x226a82[_0x81493f(0x1a2)])==null?void 0x0:_0x12d698['filter'](_0x1a1987=>_0x1a1987[_0x81493f(0x1d2)]===c[_0x81493f(0x19b)][_0x81493f(0x199)])['map'](_0xff1e52=>_0xff1e52['rangeId']))!=null?_0x24127e:[],_0x54205d=JSON['stringify'](_0x226a82),_0x23fe6c=(await this[_0x81493f(0x1ae)]['requireSession'](_0x399684))[_0x81493f(0x18c)]();if(_0x466b72){const _0x29c4e6={'memberId':_0x23fe6c,'unitId':_0x399684,'content':_0x54205d,'mention':_0x4f3fed,'threadId':_0x475eab},_0x4d5ac5=(await this[_0x81493f(0x184)][_0x81493f(0x1a0)]('/universer-api/comment/unit/'+_0x399684+_0x81493f(0x1b4),{'body':_0x29c4e6}))[_0x81493f(0x1cd)][_0x81493f(0x172)];return{..._0x4973f5,'id':_0x4d5ac5[_0x81493f(0x1c6)],'dT':c[_0x81493f(0x174)](+_0x4d5ac5[_0x81493f(0x1b3)])[_0x81493f(0x180)](_0x81493f(0x1b1)),'personId':_0x4d5ac5[_0x81493f(0x1c8)]};}else{const _0x22c56b={'memberId':_0x23fe6c,'unitId':_0x399684,'content':_0x54205d,'mention':_0x4f3fed},_0x10459c=await this[_0x81493f(0x184)][_0x81493f(0x1a0)](_0x81493f(0x19c)+_0x399684+_0x81493f(0x1c1),{'body':_0x22c56b});return J(_0x10459c['body'][_0x81493f(0x1c7)],_0x4973f5);}}async[_0x40835f(0x1d6)](_0x4a8ffe){const _0x1248c4=_0x40835f;var _0x30347c,_0x3369a6;const {text:_0x4689ef,unitId:_0x3846a8}=_0x4a8ffe,_0x312f26=(_0x3369a6=(_0x30347c=_0x4689ef[_0x1248c4(0x1a2)])==null?void 0x0:_0x30347c[_0x1248c4(0x1e4)](_0x11fe22=>_0x11fe22[_0x1248c4(0x1d2)]===c[_0x1248c4(0x19b)][_0x1248c4(0x199)])[_0x1248c4(0x1be)](_0x3b9ae8=>_0x3b9ae8[_0x1248c4(0x17b)]))!=null?_0x3369a6:[],_0x45389c=JSON[_0x1248c4(0x176)](_0x4689ef),_0x3ee69e=_0x4a8ffe[_0x1248c4(0x1c2)],_0x25f4f6=_0x4a8ffe['id'],_0x539d47={'memberId':(await this['_sessionService'][_0x1248c4(0x1e6)](_0x3846a8))['getMemberID'](),'unitId':_0x3846a8,'threadId':_0x3ee69e,'mention':_0x312f26,'content':_0x45389c,'replyId':_0x25f4f6},_0x20d0f5=await this[_0x1248c4(0x184)][_0x1248c4(0x1a0)](_0x1248c4(0x19c)+_0x3846a8+_0x1248c4(0x195),{'body':_0x539d47});return!_0x20d0f5[_0x1248c4(0x1cd)][_0x1248c4(0x192)]||_0x20d0f5[_0x1248c4(0x1cd)][_0x1248c4(0x192)][_0x1248c4(0x1e8)]===0x1;}async[_0x40835f(0x185)](_0x45a168){const _0x45389a=_0x40835f,{unitId:_0x14d08a}=_0x45a168,_0x25dc1d=_0x45a168['threadId'],_0x414efd={'memberId':this[_0x45389a(0x19e)][_0x45389a(0x1ab)]()['userID'],'unitId':_0x14d08a,'threadId':_0x25dc1d,'solved':_0x45a168['resolved']?I['Solved']:I[_0x45389a(0x171)]},_0x4c7c6e=await this[_0x45389a(0x184)][_0x45389a(0x1a0)]('/universer-api/comment/unit/'+_0x14d08a+_0x45389a(0x1dc),{'body':_0x414efd});return!_0x4c7c6e[_0x45389a(0x1cd)][_0x45389a(0x192)]||_0x4c7c6e[_0x45389a(0x1cd)][_0x45389a(0x192)][_0x45389a(0x1e8)]===0x1;}async[_0x40835f(0x18f)](_0xc15b8f,_0x1a98c0,_0x3faf27,_0x28b7ae){const _0x2d7440=_0x40835f,_0x247f5a={'memberId':(await this['_sessionService']['requireSession'](_0xc15b8f))[_0x2d7440(0x18c)](),'threadId':_0x3faf27,'replyId':_0x28b7ae,'unitId':_0xc15b8f},_0x570bd3=await this['_httpService'][_0x2d7440(0x1a0)](_0x2d7440(0x19c)+_0xc15b8f+_0x2d7440(0x1df),{'body':_0x247f5a});return!_0x570bd3[_0x2d7440(0x1cd)]['error']||_0x570bd3[_0x2d7440(0x1cd)][_0x2d7440(0x192)]['code']===0x1;}async[_0x40835f(0x170)](_0x182c95,_0x5cf1e9,_0x2190e3){const _0x1af7e5=_0x40835f,_0x18f993={'unitId':_0x182c95,'threadId':_0x2190e3},_0x261099=await this[_0x1af7e5(0x184)][_0x1af7e5(0x1a0)](_0x1af7e5(0x19c)+_0x182c95+'/list',{'body':_0x18f993}),_0x17efc8=_0x2190e3[_0x1af7e5(0x1be)](_0x4d8c3f=>F(_0x261099[_0x1af7e5(0x1cd)][_0x1af7e5(0x1e0)][_0x4d8c3f],_0x182c95,_0x5cf1e9))[_0x1af7e5(0x1e4)](Boolean);return Object[_0x1af7e5(0x1db)](_0x261099[_0x1af7e5(0x1cd)]['users'])[_0x1af7e5(0x1b9)](_0x8f756e=>{const _0x5e3320=_0x1af7e5;this[_0x5e3320(0x19e)][_0x5e3320(0x1a6)](_0x8f756e);}),_0x17efc8;}['saveCommentToSnapshot'](_0x5bb21c){const _0x44ce1f=_0x40835f;return{'id':_0x5bb21c['id'],'threadId':_0x5bb21c[_0x44ce1f(0x1c2)],'ref':_0x5bb21c[_0x44ce1f(0x1bf)]};}};function _0x5c7e(_0x1164ba,_0x5d3b38){const _0x35561a=_0x3556();return _0x5c7e=function(_0x5c7ef,_0x4a1489){_0x5c7ef=_0x5c7ef-0x170;let _0x4522ee=_0x35561a[_0x5c7ef];return _0x4522ee;},_0x5c7e(_0x1164ba,_0x5d3b38);}f=H([p(0x0,c[_0x40835f(0x1b2)](M['HTTPService'])),p(0x1,c[_0x40835f(0x1b2)](c[_0x40835f(0x1af)])),p(0x2,c[_0x40835f(0x1b2)](C['CollaborationSessionService'])),p(0x3,c[_0x40835f(0x1b2)](c['Injector']))],f);var L=Object[_0x40835f(0x1a7)],Z=Object[_0x40835f(0x1ef)],W=(_0x4174d4,_0x3e2676,_0x29627d,_0x3ec078)=>{for(var _0x189183=_0x3ec078>0x1?void 0x0:_0x3ec078?Z(_0x3e2676,_0x29627d):_0x3e2676,_0x5eef2c=_0x4174d4['length']-0x1,_0x17cb17;_0x5eef2c>=0x0;_0x5eef2c--)(_0x17cb17=_0x4174d4[_0x5eef2c])&&(_0x189183=(_0x3ec078?_0x17cb17(_0x3e2676,_0x29627d,_0x189183):_0x17cb17(_0x189183))||_0x189183);return _0x3ec078&&_0x189183&&L(_0x3e2676,_0x29627d,_0x189183),_0x189183;},O=(_0x25a18f,_0x46eafd)=>(_0x6c266c,_0x56d483)=>_0x46eafd(_0x6c266c,_0x56d483,_0x25a18f);let b=class extends c[_0x40835f(0x1b6)]{constructor(_0xae4575,_0x51cbd3){const _0x551ed3=_0x40835f;super(),this[_0x551ed3(0x1bb)]=_0xae4575,this[_0x551ed3(0x1ca)]=_0x51cbd3,this[_0x551ed3(0x1c3)]();}['_initDataSource'](){const _0x35a42c=_0x40835f;this[_0x35a42c(0x1bb)][_0x35a42c(0x1bc)]=this[_0x35a42c(0x1ca)],this[_0x35a42c(0x1bb)]['syncUpdateMutationToColla']=!0x1;}};b=W([O(0x0,P['IThreadCommentDataSourceService']),O(0x1,c[_0x40835f(0x1b2)](f))],b);var j=Object['defineProperty'],B=Object[_0x40835f(0x1ef)],K=(_0xf35658,_0x20c164,_0x264eae)=>_0x20c164 in _0xf35658?j(_0xf35658,_0x20c164,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x264eae}):_0xf35658[_0x20c164]=_0x264eae,V=(_0x4646c6,_0x459564,_0xb3758b,_0x25414f)=>{const _0x4ce310=_0x40835f;for(var _0x1b49ab=_0x25414f>0x1?void 0x0:_0x25414f?B(_0x459564,_0xb3758b):_0x459564,_0x33472f=_0x4646c6[_0x4ce310(0x1cb)]-0x1,_0x336dc8;_0x33472f>=0x0;_0x33472f--)(_0x336dc8=_0x4646c6[_0x33472f])&&(_0x1b49ab=(_0x25414f?_0x336dc8(_0x459564,_0xb3758b,_0x1b49ab):_0x336dc8(_0x1b49ab))||_0x1b49ab);return _0x25414f&&_0x1b49ab&&j(_0x459564,_0xb3758b,_0x1b49ab),_0x1b49ab;},y=(_0x1603ea,_0x242718)=>(_0x120603,_0x1153d9)=>_0x242718(_0x120603,_0x1153d9,_0x1603ea),N=(_0x4fc542,_0x155b2f,_0x4c16de)=>K(_0x4fc542,typeof _0x155b2f!=_0x40835f(0x18a)?_0x155b2f+'':_0x155b2f,_0x4c16de);exports[_0x40835f(0x189)]=class extends c[_0x40835f(0x187)]{constructor(_0x365508=D,_0x33a7e7,_0x1740b5){const _0x2c54cb=_0x40835f;super(),this[_0x2c54cb(0x175)]=_0x365508,this[_0x2c54cb(0x1da)]=_0x33a7e7,this['_configService']=_0x1740b5;const {..._0x5d02e9}=c['merge']({},D,this[_0x2c54cb(0x175)]);this['_configService'][_0x2c54cb(0x1e5)](x,_0x5d02e9);}[_0x40835f(0x196)](){const _0x3d18f0=_0x40835f;[[f],[b],[S]][_0x3d18f0(0x1b9)](_0x20b52b=>{const _0x3d4da2=_0x3d18f0;this[_0x3d4da2(0x1da)][_0x3d4da2(0x1a5)](_0x20b52b);});}[_0x40835f(0x1ea)](){const _0x296846=_0x40835f;this['_injector'][_0x296846(0x1ac)](b),this[_0x296846(0x1da)][_0x296846(0x1ac)](S);}},N(exports[_0x40835f(0x189)],_0x40835f(0x1d9),R),N(exports['UniverThreadCommentDataSourcePlugin'],_0x40835f(0x1ec),c[_0x40835f(0x182)][_0x40835f(0x1c4)]),exports[_0x40835f(0x189)]=V([c['DependentOn'](w[_0x40835f(0x1c0)],C[_0x40835f(0x1a1)],T[_0x40835f(0x1b5)]),y(0x1,c[_0x40835f(0x1b2)](c[_0x40835f(0x1e3)])),y(0x2,c[_0x40835f(0x181)])],exports['UniverThreadCommentDataSourcePlugin']);
|
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 _0x28ccda=_0x68f5;(function(_0x3baf1d,_0x32ad2e){const _0x345608=_0x68f5,_0x552711=_0x3baf1d();while(!![]){try{const _0x3a6e48=-parseInt(_0x345608(0x169))/0x1*(-parseInt(_0x345608(0x14c))/0x2)+parseInt(_0x345608(0x18d))/0x3+parseInt(_0x345608(0x189))/0x4*(parseInt(_0x345608(0x19a))/0x5)+-parseInt(_0x345608(0x157))/0x6+parseInt(_0x345608(0x163))/0x7*(-parseInt(_0x345608(0x182))/0x8)+parseInt(_0x345608(0x174))/0x9+-parseInt(_0x345608(0x183))/0xa;if(_0x3a6e48===_0x32ad2e)break;else _0x552711['push'](_0x552711['shift']());}catch(_0x58b628){_0x552711['push'](_0x552711['shift']());}}}(_0x5f1d,0x25f4c));import{CommentService as _0x12249c,CollaborationSessionService as _0x5b73bc,UniverCollaborationClientPlugin as _0x39fca1}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x508010}from'@univerjs-pro/license';import{dayjs as _0x397212,UserManagerService as _0x12a5e3,Inject as _0x3a0570,Injector as _0xe262b1,Disposable as _0x143e3d,CustomRangeType as _0x3ba666,UniverInstanceType as _0x847d30,DependentOn as _0x594ede,Plugin as _0x2c670a,merge as _0x1ae5f5,IConfigService as _0x59e28e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1d8280}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4808d8,IThreadCommentDataSourceService as _0x1b74e6}from'@univerjs/thread-comment';import{bufferTime as _0x3a8559}from'rxjs';import{HTTPService as _0x4ec0a8}from'@univerjs/network';const B=_0x28ccda(0x168);var v=(_0x17042e=>(_0x17042e[_0x17042e[_0x28ccda(0x15b)]=0x0]=_0x28ccda(0x15b),_0x17042e[_0x17042e[_0x28ccda(0x167)]=0x1]=_0x28ccda(0x167),_0x17042e[_0x17042e[_0x28ccda(0x19d)]=-0x1]=_0x28ccda(0x19d),_0x17042e))(v||{}),p=(_0x43ea2b=>(_0x43ea2b[_0x43ea2b[_0x28ccda(0x14e)]=0x0]=_0x28ccda(0x14e),_0x43ea2b[_0x43ea2b[_0x28ccda(0x152)]=0x1]='Add',_0x43ea2b[_0x43ea2b['Reply']=0x2]=_0x28ccda(0x186),_0x43ea2b[_0x43ea2b[_0x28ccda(0x18f)]=0x3]=_0x28ccda(0x18f),_0x43ea2b[_0x43ea2b[_0x28ccda(0x1ab)]=0x4]='Delete',_0x43ea2b[_0x43ea2b['Solve']=0x5]=_0x28ccda(0x15a),_0x43ea2b[_0x43ea2b[_0x28ccda(0x19d)]=-0x1]=_0x28ccda(0x19d),_0x43ea2b))(p||{});function _0x68f5(_0x4d633b,_0x7b5f){const _0x5f1dfd=_0x5f1d();return _0x68f5=function(_0x68f54e,_0x4eb9f0){_0x68f54e=_0x68f54e-0x14a;let _0x4c47bb=_0x5f1dfd[_0x68f54e];return _0x4c47bb;},_0x68f5(_0x4d633b,_0x7b5f);}const O=_0x12a445=>_0x397212(new Date(+_0x12a445))[_0x28ccda(0x1a5)]('YYYY/MM/DD\x20HH:mm'),K=async(_0x49da19,_0x38c33b)=>{const _0x2b6397=_0x28ccda,_0x1aac10=_0x49da19['get'](_0x12a5e3),_0x4c5463=_0x49da19[_0x2b6397(0x188)](_0x4ec0a8);_0x38c33b[_0x2b6397(0x176)](_0x2a101d=>{const _0xf77f40=_0x2b6397;_0x1aac10[_0xf77f40(0x1a1)](_0x2a101d)&&_0x38c33b['delete'](_0x2a101d);}),_0x38c33b[_0x2b6397(0x17b)]&&(await _0x4c5463[_0x2b6397(0x188)]('/universer-api/user/list',{'params':{'userIDs':[..._0x38c33b]}}))['body'][_0x2b6397(0x18a)]['forEach'](_0x320376=>{const _0x3c8207=_0x2b6397;_0x320376&&_0x1aac10[_0x3c8207(0x178)](_0x320376);});};var V=Object['defineProperty'],z=Object['getOwnPropertyDescriptor'],Q=(_0x11230a,_0x1e8bb6,_0x24733a,_0x13667d)=>{const _0x19a184=_0x28ccda;for(var _0x3b641d=_0x13667d>0x1?void 0x0:_0x13667d?z(_0x1e8bb6,_0x24733a):_0x1e8bb6,_0x23d86e=_0x11230a[_0x19a184(0x195)]-0x1,_0x587c87;_0x23d86e>=0x0;_0x23d86e--)(_0x587c87=_0x11230a[_0x23d86e])&&(_0x3b641d=(_0x13667d?_0x587c87(_0x1e8bb6,_0x24733a,_0x3b641d):_0x587c87(_0x3b641d))||_0x3b641d);return _0x13667d&&_0x3b641d&&V(_0x1e8bb6,_0x24733a,_0x3b641d),_0x3b641d;},_=(_0x3dd55e,_0x18efc0)=>(_0x6cb4e4,_0x4b9866)=>_0x18efc0(_0x6cb4e4,_0x4b9866,_0x3dd55e);let f=class extends _0x143e3d{constructor(_0x498459,_0x5abb79,_0x245bf3,_0x4ee7dc){const _0x90e601=_0x28ccda;super(),this[_0x90e601(0x19e)]=_0x498459,this[_0x90e601(0x16e)]=_0x5abb79,this[_0x90e601(0x154)]=_0x245bf3,this[_0x90e601(0x14d)]=_0x4ee7dc,this[_0x90e601(0x16f)](),this[_0x90e601(0x14f)]();}[_0x28ccda(0x14f)](){const _0x573b7a=_0x28ccda;this[_0x573b7a(0x159)](this[_0x573b7a(0x16e)][_0x573b7a(0x161)][_0x573b7a(0x1a2)](_0x3a8559(0x10))[_0x573b7a(0x192)](_0x55bb1f=>{const _0xacfcce=_0x573b7a,_0x410be6=new Set();_0x55bb1f[_0xacfcce(0x176)](_0x2302ec=>{const _0x34bd09=_0xacfcce;switch(_0x2302ec[_0x34bd09(0x16a)]){case _0x34bd09(0x17c):{const _0x57533e=_0x2302ec[_0x34bd09(0x180)][_0x34bd09(0x162)];_0x410be6[_0x34bd09(0x17c)](_0x57533e);break;}}}),K(this[_0xacfcce(0x14d)],_0x410be6);}));}[_0x28ccda(0x16f)](){const _0x18f716=_0x28ccda;this[_0x18f716(0x159)](this[_0x18f716(0x19e)]['commentUpdate$'][_0x18f716(0x192)](async _0x5870ce=>{const _0x47ee85=_0x18f716;var _0x4b10df,_0x3396aa,_0x2b953d,_0x30ab61;const _0x26d0b1=(_0x4b10df=this[_0x47ee85(0x16e)][_0x47ee85(0x171)](_0x5870ce[_0x47ee85(0x15f)])['find'](_0x443096=>_0x443096[_0x47ee85(0x1a0)]===_0x5870ce['threadId']))==null?void 0x0:_0x4b10df[_0x47ee85(0x16b)];if(!_0x26d0b1)return;const {unitId:_0x4ad7b2,subUnitId:_0x5b6cbb}=_0x26d0b1;switch(_0x5870ce['user']&&this[_0x47ee85(0x154)][_0x47ee85(0x178)](_0x5870ce[_0x47ee85(0x194)]),_0x5870ce[_0x47ee85(0x16a)]){case p['Add']:break;case p['Reply']:{this[_0x47ee85(0x16e)]['addComment'](_0x4ad7b2,_0x5b6cbb,{'unitId':_0x4ad7b2,'subUnitId':_0x5b6cbb,'ref':'','id':_0x5870ce[_0x47ee85(0x17d)],'dT':O(+_0x5870ce[_0x47ee85(0x15d)]),'threadId':_0x5870ce[_0x47ee85(0x1a0)],'personId':(_0x2b953d=(_0x3396aa=_0x5870ce['user'])==null?void 0x0:_0x3396aa[_0x47ee85(0x1ad)])!=null?_0x2b953d:_0x5870ce[_0x47ee85(0x15c)],'text':JSON[_0x47ee85(0x15e)](_0x5870ce[_0x47ee85(0x165)]),'parentId':_0x26d0b1['id']});break;}case p[_0x47ee85(0x1ab)]:{const _0x39d6f7=this[_0x47ee85(0x16e)][_0x47ee85(0x199)](_0x4ad7b2,_0x5b6cbb,_0x5870ce[_0x47ee85(0x17d)]);_0x39d6f7&&_0x39d6f7[_0x47ee85(0x172)]&&this[_0x47ee85(0x16e)][_0x47ee85(0x160)](_0x4ad7b2,_0x5b6cbb,_0x5870ce[_0x47ee85(0x17d)]);break;}case p['Edit']:{this['_threadCommentModel'][_0x47ee85(0x155)](_0x4ad7b2,_0x5b6cbb,{'commentId':_0x5870ce['replyId'],'text':JSON[_0x47ee85(0x15e)](_0x5870ce[_0x47ee85(0x165)])});break;}case p['Solve']:{const _0x23c139=(_0x30ab61=this['_threadCommentModel']['getUnit'](_0x5870ce['unitId'])[_0x47ee85(0x17f)](_0x268454=>_0x268454['threadId']===_0x5870ce[_0x47ee85(0x1a0)]))==null?void 0x0:_0x30ab61[_0x47ee85(0x16b)];_0x23c139&&this[_0x47ee85(0x16e)]['resolveComment'](_0x4ad7b2,_0x5b6cbb,_0x23c139['id'],_0x5870ce[_0x47ee85(0x196)]===v[_0x47ee85(0x167)]);break;}}}));}};f=Q([_(0x0,_0x3a0570(_0x12249c)),_(0x1,_0x3a0570(_0x4808d8)),_(0x2,_0x3a0570(_0x12a5e3)),_(0x3,_0x3a0570(_0xe262b1))],f);function _0x5f1d(){const _0x4e0913=['comments','post','syncUpdateMutationToColla','onReady','Delete','requireSession','userID','_configService','comment','_config','188696aWgqRg','_injector','Unknown','_initUserSync','stringify','/list','Add','_threadCommentDataSource','_userService','updateComment','/delete','1391958xdALqy','code','disposeWithMe','Solve','OpenOrReOpen','userId','createTimestamp','parse','unitId','deleteComment','commentUpdate$','personId','49091TsvJNt','symbol','content','thread-comment-data-source.config','Solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','3eBJgKa','type','root','rangeId','defineProperty','_threadCommentModel','_init','/edit','getUnit','parentId','replies','1764072GFSVpY','saveCommentToSnapshot','forEach','dataSource','addUser','/reply','_initDataSource','size','add','replyId','_sessionService','find','payload','setConfig','184FdpILB','3227780iShVID','ref','rangeType','Reply','filter','get','20HYVDxt','users','body','map','627303DbEcGr','getMemberID','Edit','values','error','subscribe','reply','user','length','solved','_threadCommentDataSourceService','customRanges','getComment','183385ZAFcWW','getOwnPropertyDescriptor','resolveComment','UNRECOGNIZED','_commentService','onStarting','threadId','getUser','pipe','_httpService','/universer-api/comment/unit/','format','COMMENT'];_0x5f1d=function(){return _0x4e0913;};return _0x5f1d();}const X=_0x28ccda(0x166),P={};var k=Object['defineProperty'],ee=Object[_0x28ccda(0x19b)],re=(_0x35a205,_0x908dfb,_0x1b8d90,_0x12b36a)=>{for(var _0xd23f6f=_0x12b36a>0x1?void 0x0:_0x12b36a?ee(_0x908dfb,_0x1b8d90):_0x908dfb,_0x3bd0ed=_0x35a205['length']-0x1,_0x5c42e8;_0x3bd0ed>=0x0;_0x3bd0ed--)(_0x5c42e8=_0x35a205[_0x3bd0ed])&&(_0xd23f6f=(_0x12b36a?_0x5c42e8(_0x908dfb,_0x1b8d90,_0xd23f6f):_0x5c42e8(_0xd23f6f))||_0xd23f6f);return _0x12b36a&&_0xd23f6f&&k(_0x908dfb,_0x1b8d90,_0xd23f6f),_0xd23f6f;},I=(_0x45065d,_0x418bf8)=>(_0x26fa1c,_0x4c965c)=>_0x418bf8(_0x26fa1c,_0x4c965c,_0x45065d);function te(_0x5dac7b,_0x569a2f){const _0x1bd1fc=_0x28ccda,_0x1d1e68=_0x5dac7b['replies'][0x0];return{..._0x569a2f,'id':_0x1d1e68[_0x1bd1fc(0x17d)],'resolved':_0x5dac7b[_0x1bd1fc(0x196)]===0x1,'dT':O(_0x1d1e68['createTimestamp']),'personId':_0x1d1e68['userId'],'threadId':_0x1d1e68[_0x1bd1fc(0x1a0)]};}function se(_0x2c19f9,_0x371030,_0x19d95b){const _0x1e2bd8=_0x28ccda;var _0x1d2ac4,_0x44f486;if(((_0x44f486=(_0x1d2ac4=_0x2c19f9==null?void 0x0:_0x2c19f9['replies'])==null?void 0x0:_0x1d2ac4[_0x1e2bd8(0x195)])!=null?_0x44f486:0x0)>0x0){const _0x3e7442=(_0x46c68e,_0x26fc10)=>({'id':_0x46c68e[_0x1e2bd8(0x17d)],'threadId':_0x46c68e[_0x1e2bd8(0x1a0)],'dT':O(_0x46c68e[_0x1e2bd8(0x15d)]),'personId':_0x46c68e[_0x1e2bd8(0x15c)],'resolved':_0x2c19f9[_0x1e2bd8(0x196)]===v['Solved'],'unitId':_0x371030,'subUnitId':_0x19d95b,'text':JSON[_0x1e2bd8(0x15e)](_0x46c68e['content']),'parentId':_0x26fc10}),_0x257580=_0x3e7442(_0x2c19f9['replies'][0x0]);return{..._0x257580,'children':_0x2c19f9[_0x1e2bd8(0x173)]['slice'](0x1)[_0x1e2bd8(0x18c)](_0x8ace9c=>_0x3e7442(_0x8ace9c,_0x257580['id']))};}return null;}let S=class{constructor(_0x5f2978,_0x4a74c9,_0x216da2,_0x4b9ca3){const _0xe1828e=_0x28ccda;this[_0xe1828e(0x1a3)]=_0x5f2978,this['_userService']=_0x4a74c9,this[_0xe1828e(0x17e)]=_0x216da2,this[_0xe1828e(0x14d)]=_0x4b9ca3;}async['addComment'](_0x4e4621){const _0x5662d4=_0x28ccda;var _0x40d66a,_0x24fbb2;const {parentId:_0x722309,unitId:_0x4acb5b,text:_0xca96f,threadId:_0x4e59de}=_0x4e4621,_0x340392=(_0x24fbb2=(_0x40d66a=_0xca96f[_0x5662d4(0x198)])==null?void 0x0:_0x40d66a[_0x5662d4(0x187)](_0x33fa34=>_0x33fa34[_0x5662d4(0x185)]===_0x3ba666[_0x5662d4(0x1a6)])[_0x5662d4(0x18c)](_0x49ca72=>_0x49ca72[_0x5662d4(0x16c)]))!=null?_0x24fbb2:[],_0xc23240=JSON['stringify'](_0xca96f),_0x1fd9fd=(await this[_0x5662d4(0x17e)]['requireSession'](_0x4acb5b))[_0x5662d4(0x18e)]();if(_0x722309){const _0x133f38={'memberId':_0x1fd9fd,'unitId':_0x4acb5b,'content':_0xc23240,'mention':_0x340392,'threadId':_0x4e59de},_0x2e6080=(await this[_0x5662d4(0x1a3)][_0x5662d4(0x1a8)](_0x5662d4(0x1a4)+_0x4acb5b+_0x5662d4(0x179),{'body':_0x133f38}))[_0x5662d4(0x18b)][_0x5662d4(0x193)];return{..._0x4e4621,'id':_0x2e6080['replyId'],'dT':_0x397212(+_0x2e6080[_0x5662d4(0x15d)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x2e6080[_0x5662d4(0x15c)]};}else{const _0xcdbd67={'memberId':_0x1fd9fd,'unitId':_0x4acb5b,'content':_0xc23240,'mention':_0x340392},_0x2a8b08=await this[_0x5662d4(0x1a3)][_0x5662d4(0x1a8)](_0x5662d4(0x1a4)+_0x4acb5b+'/add',{'body':_0xcdbd67});return te(_0x2a8b08['body'][_0x5662d4(0x14a)],_0x4e4621);}}async[_0x28ccda(0x155)](_0x4ca19f){const _0x46a4ef=_0x28ccda;var _0x513f01,_0x361a24;const {text:_0x42131e,unitId:_0xadcb89}=_0x4ca19f,_0x38f242=(_0x361a24=(_0x513f01=_0x42131e['customRanges'])==null?void 0x0:_0x513f01[_0x46a4ef(0x187)](_0x2aa2ff=>_0x2aa2ff[_0x46a4ef(0x185)]===_0x3ba666[_0x46a4ef(0x1a6)])['map'](_0x7c471=>_0x7c471[_0x46a4ef(0x16c)]))!=null?_0x361a24:[],_0x1a4fa2=JSON[_0x46a4ef(0x150)](_0x42131e),_0x202c5a=_0x4ca19f[_0x46a4ef(0x1a0)],_0x4006c5=_0x4ca19f['id'],_0x5db48e={'memberId':(await this[_0x46a4ef(0x17e)]['requireSession'](_0xadcb89))[_0x46a4ef(0x18e)](),'unitId':_0xadcb89,'threadId':_0x202c5a,'mention':_0x38f242,'content':_0x1a4fa2,'replyId':_0x4006c5},_0x476680=await this['_httpService']['post'](_0x46a4ef(0x1a4)+_0xadcb89+_0x46a4ef(0x170),{'body':_0x5db48e});return!_0x476680[_0x46a4ef(0x18b)][_0x46a4ef(0x191)]||_0x476680[_0x46a4ef(0x18b)][_0x46a4ef(0x191)][_0x46a4ef(0x158)]===0x1;}async[_0x28ccda(0x19c)](_0x4dac24){const _0x20344e=_0x28ccda,{unitId:_0x454539}=_0x4dac24,_0x43ab1f=_0x4dac24[_0x20344e(0x1a0)],_0x4eb56c={'memberId':this['_userService']['getCurrentUser']()[_0x20344e(0x1ad)],'unitId':_0x454539,'threadId':_0x43ab1f,'solved':_0x4dac24['resolved']?v[_0x20344e(0x167)]:v['OpenOrReOpen']},_0x259e34=await this[_0x20344e(0x1a3)][_0x20344e(0x1a8)](_0x20344e(0x1a4)+_0x454539+'/solved',{'body':_0x4eb56c});return!_0x259e34['body'][_0x20344e(0x191)]||_0x259e34[_0x20344e(0x18b)]['error'][_0x20344e(0x158)]===0x1;}async['deleteComment'](_0x17d478,_0x5a398d,_0x55c1d4,_0x193fae){const _0x45f166=_0x28ccda,_0x5c6626={'memberId':(await this['_sessionService'][_0x45f166(0x1ac)](_0x17d478))[_0x45f166(0x18e)](),'threadId':_0x55c1d4,'replyId':_0x193fae,'unitId':_0x17d478},_0x3a3f35=await this[_0x45f166(0x1a3)][_0x45f166(0x1a8)](_0x45f166(0x1a4)+_0x17d478+_0x45f166(0x156),{'body':_0x5c6626});return!_0x3a3f35[_0x45f166(0x18b)]['error']||_0x3a3f35[_0x45f166(0x18b)][_0x45f166(0x191)][_0x45f166(0x158)]===0x1;}async['listComments'](_0x24e523,_0x551d2,_0x11761e){const _0x4e69d4=_0x28ccda,_0x1198fc={'unitId':_0x24e523,'threadId':_0x11761e},_0x396144=await this['_httpService'][_0x4e69d4(0x1a8)](_0x4e69d4(0x1a4)+_0x24e523+_0x4e69d4(0x151),{'body':_0x1198fc}),_0x387efc=_0x11761e['map'](_0x43f3fa=>se(_0x396144[_0x4e69d4(0x18b)][_0x4e69d4(0x1a7)][_0x43f3fa],_0x24e523,_0x551d2))[_0x4e69d4(0x187)](Boolean);return Object[_0x4e69d4(0x190)](_0x396144[_0x4e69d4(0x18b)][_0x4e69d4(0x18a)])['forEach'](_0x2c0aa9=>{const _0x44b41c=_0x4e69d4;this[_0x44b41c(0x154)]['addUser'](_0x2c0aa9);}),_0x387efc;}[_0x28ccda(0x175)](_0x6e8813){const _0x1ae0a7=_0x28ccda;return{'id':_0x6e8813['id'],'threadId':_0x6e8813[_0x1ae0a7(0x1a0)],'ref':_0x6e8813[_0x1ae0a7(0x184)]};}};S=re([I(0x0,_0x3a0570(_0x4ec0a8)),I(0x1,_0x3a0570(_0x12a5e3)),I(0x2,_0x3a0570(_0x5b73bc)),I(0x3,_0x3a0570(_0xe262b1))],S);var oe=Object[_0x28ccda(0x16d)],ne=Object['getOwnPropertyDescriptor'],ie=(_0xfe44,_0x1919f8,_0x2d5c36,_0x11d858)=>{const _0x4d9538=_0x28ccda;for(var _0x4e57f3=_0x11d858>0x1?void 0x0:_0x11d858?ne(_0x1919f8,_0x2d5c36):_0x1919f8,_0x468385=_0xfe44[_0x4d9538(0x195)]-0x1,_0x248330;_0x468385>=0x0;_0x468385--)(_0x248330=_0xfe44[_0x468385])&&(_0x4e57f3=(_0x11d858?_0x248330(_0x1919f8,_0x2d5c36,_0x4e57f3):_0x248330(_0x4e57f3))||_0x4e57f3);return _0x11d858&&_0x4e57f3&&oe(_0x1919f8,_0x2d5c36,_0x4e57f3),_0x4e57f3;},M=(_0x3edf9a,_0x18ee9a)=>(_0x736ea9,_0x49285c)=>_0x18ee9a(_0x736ea9,_0x49285c,_0x3edf9a);let b=class extends _0x143e3d{constructor(_0x5625d2,_0x4fbfc9){const _0x3fbba5=_0x28ccda;super(),this[_0x3fbba5(0x197)]=_0x5625d2,this[_0x3fbba5(0x153)]=_0x4fbfc9,this['_initDataSource']();}[_0x28ccda(0x17a)](){const _0x40729f=_0x28ccda;this['_threadCommentDataSourceService'][_0x40729f(0x177)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x40729f(0x1a9)]=!0x1;}};b=ie([M(0x0,_0x1b74e6),M(0x1,_0x3a0570(S))],b);var $=Object['defineProperty'],ce=Object[_0x28ccda(0x19b)],ae=(_0x2a8ed9,_0x5425e8,_0x75ea59)=>_0x5425e8 in _0x2a8ed9?$(_0x2a8ed9,_0x5425e8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x75ea59}):_0x2a8ed9[_0x5425e8]=_0x75ea59,de=(_0x1fa78d,_0xc001de,_0x437a20,_0x19b538)=>{const _0x406266=_0x28ccda;for(var _0x226c2f=_0x19b538>0x1?void 0x0:_0x19b538?ce(_0xc001de,_0x437a20):_0xc001de,_0x505e3a=_0x1fa78d[_0x406266(0x195)]-0x1,_0x1a9326;_0x505e3a>=0x0;_0x505e3a--)(_0x1a9326=_0x1fa78d[_0x505e3a])&&(_0x226c2f=(_0x19b538?_0x1a9326(_0xc001de,_0x437a20,_0x226c2f):_0x1a9326(_0x226c2f))||_0x226c2f);return _0x19b538&&_0x226c2f&&$(_0xc001de,_0x437a20,_0x226c2f),_0x226c2f;},N=(_0x16cedb,_0x50f6ae)=>(_0x4f0b0c,_0x32eb40)=>_0x50f6ae(_0x4f0b0c,_0x32eb40,_0x16cedb),j=(_0x3e33a3,_0x9d2e43,_0x41db73)=>ae(_0x3e33a3,typeof _0x9d2e43!=_0x28ccda(0x164)?_0x9d2e43+'':_0x9d2e43,_0x41db73);let C=class extends _0x2c670a{constructor(_0x1028c3=P,_0x236814,_0x176dd6){const _0x13ed80=_0x28ccda;super(),this[_0x13ed80(0x14b)]=_0x1028c3,this['_injector']=_0x236814,this[_0x13ed80(0x1ae)]=_0x176dd6;const {..._0x2233ee}=_0x1ae5f5({},P,this['_config']);this[_0x13ed80(0x1ae)][_0x13ed80(0x181)](X,_0x2233ee);}[_0x28ccda(0x19f)](){const _0x40484d=_0x28ccda;[[S],[b],[f]][_0x40484d(0x176)](_0x5b3fe1=>{const _0x1afa0e=_0x40484d;this[_0x1afa0e(0x14d)][_0x1afa0e(0x17c)](_0x5b3fe1);});}[_0x28ccda(0x1aa)](){const _0x384d65=_0x28ccda;this[_0x384d65(0x14d)][_0x384d65(0x188)](b),this[_0x384d65(0x14d)][_0x384d65(0x188)](f);}};j(C,'pluginName',B),j(C,_0x28ccda(0x16a),_0x847d30['UNIVER_UNKNOWN']),C=de([_0x594ede(_0x1d8280,_0x39fca1,_0x508010),N(0x1,_0x3a0570(_0xe262b1)),N(0x2,_0x59e28e)],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 _0x46f1(_0x21443d,_0x5e511a){const _0x37c560=_0x37c5();return _0x46f1=function(_0x46f1d9,_0x253dda){_0x46f1d9=_0x46f1d9-0xc8;let _0x202f69=_0x37c560[_0x46f1d9];return _0x202f69;},_0x46f1(_0x21443d,_0x5e511a);}function _0x37c5(){const _0x4f6086=['2251840UgGzqT','UniverCollaborationClientPlugin','rxjs','Reply','pluginName','map','reply','saveCommentToSnapshot','UniverProLicense','_commentService','Add','forEach','body','onStarting','solved','_userService','UniverThreadCommentDataSourcePlugin','Unknown','_injector','UserManagerService','_configService','ThreadCommentModel','Solve','Edit','user','Module','personId','HTTPService','Disposable','UNIVER_UNKNOWN','dataSource','exports','UniverLicensePlugin','disposeWithMe','_config','IConfigService','CollaborationSessionService','/add','@univerjs/thread-comment-ui','Solved','setConfig','_initUserSync','Inject','UniverNetwork','thread-comment-data-source.config','addComment','CustomRangeType','/solved','_threadCommentDataSource','Injector','content','@univerjs/core','replyId','getUnit','type','syncUpdateMutationToColla','users','/universer-api/user/list','get','addUser','updateComment','2187936ApgRfR','resolved','customRanges','7WmtySJ','@univerjs-pro/license','deleteComment','UniverThreadComment','dayjs','/universer-api/comment/unit/','error','pipe','code','UniverThreadCommentUIPlugin','@univerjs/thread-comment','comments','_threadCommentModel','@univerjs-pro/collaboration-client','format','toStringTag','ref','symbol','filter','UNRECOGNIZED','_init','function','userID','Delete','YYYY/MM/DD\x20HH:mm','/reply','UniverProThreadCommentDatasource','/edit','userId','UniverProCollaborationClient','CommentService','threadId','_sessionService','commentUpdate$','createTimestamp','add','getComment','replies','1418697EVmyMS','unitId','DependentOn','defineProperty','_threadCommentDataSourceService','slice','getOwnPropertyDescriptor','IThreadCommentDataSourceService','length','COMMENT','find','parse','/list','listComments','values','1565296KgbIXj','getUser','_initDataSource','bufferTime','Plugin','rangeId','subscribe','stringify','OpenOrReOpen','getCurrentUser','9506456xoTzjB','_httpService','payload','2228610vKAPcG','post','requireSession','/delete','getMemberID','resolveComment','840632ZlzXFd','root'];_0x37c5=function(){return _0x4f6086;};return _0x37c5();}(function(_0x3ce4c9,_0x36ae30){const _0x29a04e=_0x46f1,_0x3434aa=_0x3ce4c9();while(!![]){try{const _0x2a95b9=-parseInt(_0x29a04e(0x113))/0x1+-parseInt(_0x29a04e(0x100))/0x2+-parseInt(_0x29a04e(0xf1))/0x3+parseInt(_0x29a04e(0xc8))/0x4+parseInt(_0x29a04e(0x115))/0x5+parseInt(_0x29a04e(0x10d))/0x6+parseInt(_0x29a04e(0xcb))/0x7*(parseInt(_0x29a04e(0x10a))/0x8);if(_0x2a95b9===_0x36ae30)break;else _0x3434aa['push'](_0x3434aa['shift']());}catch(_0x11e731){_0x3434aa['push'](_0x3434aa['shift']());}}}(_0x37c5,0x70873),function(_0x5ed793,_0x949f2c){const _0x13cdce=_0x46f1;typeof exports=='object'&&typeof module<'u'?_0x949f2c(exports,require(_0x13cdce(0xd8)),require(_0x13cdce(0xcc)),require(_0x13cdce(0x148)),require(_0x13cdce(0x13b)),require(_0x13cdce(0xd5)),require(_0x13cdce(0x117)),require('@univerjs/network')):typeof define==_0x13cdce(0xe0)&&define['amd']?define([_0x13cdce(0x134),'@univerjs-pro/collaboration-client','@univerjs-pro/license',_0x13cdce(0x148),_0x13cdce(0x13b),_0x13cdce(0xd5),_0x13cdce(0x117),'@univerjs/network'],_0x949f2c):(_0x5ed793=typeof globalThis<'u'?globalThis:_0x5ed793||self,_0x949f2c(_0x5ed793[_0x13cdce(0xe5)]={},_0x5ed793[_0x13cdce(0xe8)],_0x5ed793[_0x13cdce(0x11d)],_0x5ed793['UniverCore'],_0x5ed793['UniverThreadCommentUi'],_0x5ed793[_0x13cdce(0xce)],_0x5ed793[_0x13cdce(0x117)],_0x5ed793[_0x13cdce(0x140)]));}(this,function(_0xb81cba,_0x4ebbea,_0x19d3fd,_0x1d4eaa,_0x27cbe3,_0x5bbffd,_0x167f00,_0x394e71){'use strict';const _0x12c703=_0x46f1;const _0x116508='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x5194f4=(_0x1012ca=>(_0x1012ca[_0x1012ca[_0x12c703(0x108)]=0x0]=_0x12c703(0x108),_0x1012ca[_0x1012ca[_0x12c703(0x13c)]=0x1]='Solved',_0x1012ca[_0x1012ca[_0x12c703(0xde)]=-0x1]=_0x12c703(0xde),_0x1012ca))(_0x5194f4||{}),_0x25b835=(_0x5c342b=>(_0x5c342b[_0x5c342b[_0x12c703(0x126)]=0x0]=_0x12c703(0x126),_0x5c342b[_0x5c342b[_0x12c703(0x11f)]=0x1]='Add',_0x5c342b[_0x5c342b[_0x12c703(0x118)]=0x2]=_0x12c703(0x118),_0x5c342b[_0x5c342b['Edit']=0x3]=_0x12c703(0x12c),_0x5c342b[_0x5c342b[_0x12c703(0xe2)]=0x4]='Delete',_0x5c342b[_0x5c342b[_0x12c703(0x12b)]=0x5]=_0x12c703(0x12b),_0x5c342b[_0x5c342b['UNRECOGNIZED']=-0x1]=_0x12c703(0xde),_0x5c342b))(_0x25b835||{});const _0x204ccb=_0x5a01c0=>_0x1d4eaa['dayjs'](new Date(+_0x5a01c0))[_0x12c703(0xd9)](_0x12c703(0xe3)),_0x1335a4=async(_0x3ee0f1,_0x9dc27c)=>{const _0x5d1606=_0x12c703,_0x5def33=_0x3ee0f1[_0x5d1606(0x14f)](_0x1d4eaa[_0x5d1606(0x128)]),_0x1cee00=_0x3ee0f1['get'](_0x394e71[_0x5d1606(0x130)]);_0x9dc27c[_0x5d1606(0x120)](_0x2bec55=>{const _0x23146e=_0x5d1606;_0x5def33[_0x23146e(0x101)](_0x2bec55)&&_0x9dc27c['delete'](_0x2bec55);}),_0x9dc27c['size']&&(await _0x1cee00[_0x5d1606(0x14f)](_0x5d1606(0x14e),{'params':{'userIDs':[..._0x9dc27c]}}))[_0x5d1606(0x121)]['users'][_0x5d1606(0x120)](_0x3a86ac=>{_0x3a86ac&&_0x5def33['addUser'](_0x3a86ac);});};var _0x437a70=Object[_0x12c703(0xf4)],_0x43bf9f=Object[_0x12c703(0xf7)],_0x1fbbd6=(_0xe71b9,_0x4315af,_0x4cfc08,_0x4c02ab)=>{const _0x26f8ca=_0x12c703;for(var _0x1f07c0=_0x4c02ab>0x1?void 0x0:_0x4c02ab?_0x43bf9f(_0x4315af,_0x4cfc08):_0x4315af,_0x3971db=_0xe71b9[_0x26f8ca(0xf9)]-0x1,_0x8de014;_0x3971db>=0x0;_0x3971db--)(_0x8de014=_0xe71b9[_0x3971db])&&(_0x1f07c0=(_0x4c02ab?_0x8de014(_0x4315af,_0x4cfc08,_0x1f07c0):_0x8de014(_0x1f07c0))||_0x1f07c0);return _0x4c02ab&&_0x1f07c0&&_0x437a70(_0x4315af,_0x4cfc08,_0x1f07c0),_0x1f07c0;},_0x3c7ce2=(_0x321227,_0x3cca87)=>(_0x19a599,_0x4163aa)=>_0x3cca87(_0x19a599,_0x4163aa,_0x321227);let _0x372d93=class extends _0x1d4eaa[_0x12c703(0x131)]{constructor(_0x2121f2,_0x1713f8,_0x8993ea,_0x3a1352){const _0x25f088=_0x12c703;super(),this[_0x25f088(0x11e)]=_0x2121f2,this[_0x25f088(0xd7)]=_0x1713f8,this[_0x25f088(0x124)]=_0x8993ea,this[_0x25f088(0x127)]=_0x3a1352,this[_0x25f088(0xdf)](),this[_0x25f088(0x13e)]();}[_0x12c703(0x13e)](){const _0x379aa5=_0x12c703;this['disposeWithMe'](this[_0x379aa5(0xd7)][_0x379aa5(0xec)][_0x379aa5(0xd2)](_0x167f00[_0x379aa5(0x103)](0x10))[_0x379aa5(0x106)](_0x2ae4b4=>{const _0x1a8230=_0x379aa5,_0x2c9746=new Set();_0x2ae4b4[_0x1a8230(0x120)](_0x26ee34=>{const _0x3ed479=_0x1a8230;switch(_0x26ee34[_0x3ed479(0x14b)]){case _0x3ed479(0xee):{const _0x2b1eea=_0x26ee34[_0x3ed479(0x10c)][_0x3ed479(0x12f)];_0x2c9746[_0x3ed479(0xee)](_0x2b1eea);break;}}}),_0x1335a4(this[_0x1a8230(0x127)],_0x2c9746);}));}[_0x12c703(0xdf)](){const _0x5a9fa6=_0x12c703;this[_0x5a9fa6(0x136)](this[_0x5a9fa6(0x11e)]['commentUpdate$'][_0x5a9fa6(0x106)](async _0x5c2f7e=>{const _0xd5c905=_0x5a9fa6;var _0x413164,_0x3f04fe,_0x5bbd1d,_0x4973c0;const _0x35c02e=(_0x413164=this[_0xd5c905(0xd7)][_0xd5c905(0x14a)](_0x5c2f7e[_0xd5c905(0xf2)])[_0xd5c905(0xfb)](_0x4b4679=>_0x4b4679[_0xd5c905(0xea)]===_0x5c2f7e[_0xd5c905(0xea)]))==null?void 0x0:_0x413164[_0xd5c905(0x114)];if(!_0x35c02e)return;const {unitId:_0xe46b1c,subUnitId:_0x475db0}=_0x35c02e;switch(_0x5c2f7e['user']&&this[_0xd5c905(0x124)][_0xd5c905(0x150)](_0x5c2f7e[_0xd5c905(0x12d)]),_0x5c2f7e[_0xd5c905(0x14b)]){case _0x25b835[_0xd5c905(0x11f)]:break;case _0x25b835['Reply']:{this['_threadCommentModel'][_0xd5c905(0x142)](_0xe46b1c,_0x475db0,{'unitId':_0xe46b1c,'subUnitId':_0x475db0,'ref':'','id':_0x5c2f7e['replyId'],'dT':_0x204ccb(+_0x5c2f7e[_0xd5c905(0xed)]),'threadId':_0x5c2f7e[_0xd5c905(0xea)],'personId':(_0x5bbd1d=(_0x3f04fe=_0x5c2f7e['user'])==null?void 0x0:_0x3f04fe[_0xd5c905(0xe1)])!=null?_0x5bbd1d:_0x5c2f7e[_0xd5c905(0xe7)],'text':JSON[_0xd5c905(0xfc)](_0x5c2f7e[_0xd5c905(0x147)]),'parentId':_0x35c02e['id']});break;}case _0x25b835[_0xd5c905(0xe2)]:{const _0xb6bdd7=this[_0xd5c905(0xd7)][_0xd5c905(0xef)](_0xe46b1c,_0x475db0,_0x5c2f7e[_0xd5c905(0x149)]);_0xb6bdd7&&_0xb6bdd7['parentId']&&this[_0xd5c905(0xd7)]['deleteComment'](_0xe46b1c,_0x475db0,_0x5c2f7e['replyId']);break;}case _0x25b835[_0xd5c905(0x12c)]:{this[_0xd5c905(0xd7)][_0xd5c905(0x151)](_0xe46b1c,_0x475db0,{'commentId':_0x5c2f7e[_0xd5c905(0x149)],'text':JSON['parse'](_0x5c2f7e[_0xd5c905(0x147)])});break;}case _0x25b835[_0xd5c905(0x12b)]:{const _0x3490bc=(_0x4973c0=this[_0xd5c905(0xd7)][_0xd5c905(0x14a)](_0x5c2f7e[_0xd5c905(0xf2)])['find'](_0x22ad87=>_0x22ad87[_0xd5c905(0xea)]===_0x5c2f7e[_0xd5c905(0xea)]))==null?void 0x0:_0x4973c0[_0xd5c905(0x114)];_0x3490bc&&this[_0xd5c905(0xd7)][_0xd5c905(0x112)](_0xe46b1c,_0x475db0,_0x3490bc['id'],_0x5c2f7e['solved']===_0x5194f4['Solved']);break;}}}));}};_0x372d93=_0x1fbbd6([_0x3c7ce2(0x0,_0x1d4eaa[_0x12c703(0x13f)](_0x4ebbea[_0x12c703(0xe9)])),_0x3c7ce2(0x1,_0x1d4eaa[_0x12c703(0x13f)](_0x5bbffd[_0x12c703(0x12a)])),_0x3c7ce2(0x2,_0x1d4eaa[_0x12c703(0x13f)](_0x1d4eaa[_0x12c703(0x128)])),_0x3c7ce2(0x3,_0x1d4eaa[_0x12c703(0x13f)](_0x1d4eaa['Injector']))],_0x372d93);const _0x48979b=_0x12c703(0x141),_0x1227cf={};var _0x306676=Object[_0x12c703(0xf4)],_0x90f218=Object[_0x12c703(0xf7)],_0x3b6b0e=(_0x45435c,_0x23f82d,_0x1d8a3f,_0x5c690d)=>{const _0x599381=_0x12c703;for(var _0x235aa2=_0x5c690d>0x1?void 0x0:_0x5c690d?_0x90f218(_0x23f82d,_0x1d8a3f):_0x23f82d,_0x13da9a=_0x45435c[_0x599381(0xf9)]-0x1,_0x268091;_0x13da9a>=0x0;_0x13da9a--)(_0x268091=_0x45435c[_0x13da9a])&&(_0x235aa2=(_0x5c690d?_0x268091(_0x23f82d,_0x1d8a3f,_0x235aa2):_0x268091(_0x235aa2))||_0x235aa2);return _0x5c690d&&_0x235aa2&&_0x306676(_0x23f82d,_0x1d8a3f,_0x235aa2),_0x235aa2;},_0x2920aa=(_0x1e4e98,_0x5279e5)=>(_0x41c387,_0x4dc21b)=>_0x5279e5(_0x41c387,_0x4dc21b,_0x1e4e98);function _0xafcea7(_0xcc2d5c,_0x3f3cad){const _0x589cac=_0x12c703,_0xc59948=_0xcc2d5c[_0x589cac(0xf0)][0x0];return{..._0x3f3cad,'id':_0xc59948[_0x589cac(0x149)],'resolved':_0xcc2d5c[_0x589cac(0x123)]===0x1,'dT':_0x204ccb(_0xc59948[_0x589cac(0xed)]),'personId':_0xc59948[_0x589cac(0xe7)],'threadId':_0xc59948[_0x589cac(0xea)]};}function _0x201257(_0x39204b,_0x1a9baa,_0x3297f5){const _0x371056=_0x12c703;var _0x59d3c0,_0x286981;if(((_0x286981=(_0x59d3c0=_0x39204b==null?void 0x0:_0x39204b['replies'])==null?void 0x0:_0x59d3c0['length'])!=null?_0x286981:0x0)>0x0){const _0x374897=(_0xc2f3b4,_0x143c6b)=>({'id':_0xc2f3b4[_0x371056(0x149)],'threadId':_0xc2f3b4[_0x371056(0xea)],'dT':_0x204ccb(_0xc2f3b4['createTimestamp']),'personId':_0xc2f3b4[_0x371056(0xe7)],'resolved':_0x39204b[_0x371056(0x123)]===_0x5194f4[_0x371056(0x13c)],'unitId':_0x1a9baa,'subUnitId':_0x3297f5,'text':JSON[_0x371056(0xfc)](_0xc2f3b4[_0x371056(0x147)]),'parentId':_0x143c6b}),_0x317683=_0x374897(_0x39204b['replies'][0x0]);return{..._0x317683,'children':_0x39204b['replies'][_0x371056(0xf6)](0x1)[_0x371056(0x11a)](_0x5b5943=>_0x374897(_0x5b5943,_0x317683['id']))};}return null;}let _0x3f9a97=class{constructor(_0x582854,_0x500fbd,_0x42967a,_0x3229e8){const _0x18242f=_0x12c703;this[_0x18242f(0x10b)]=_0x582854,this[_0x18242f(0x124)]=_0x500fbd,this[_0x18242f(0xeb)]=_0x42967a,this['_injector']=_0x3229e8;}async[_0x12c703(0x142)](_0x4fda9e){const _0x250bc3=_0x12c703;var _0x10988f,_0x35662b;const {parentId:_0xe979ed,unitId:_0x534f34,text:_0x21d8ac,threadId:_0xf27dbe}=_0x4fda9e,_0x27d767=(_0x35662b=(_0x10988f=_0x21d8ac[_0x250bc3(0xca)])==null?void 0x0:_0x10988f['filter'](_0x1b85b9=>_0x1b85b9['rangeType']===_0x1d4eaa[_0x250bc3(0x143)]['COMMENT'])['map'](_0x1365d0=>_0x1365d0[_0x250bc3(0x105)]))!=null?_0x35662b:[],_0x484755=JSON[_0x250bc3(0x107)](_0x21d8ac),_0x57ca73=(await this[_0x250bc3(0xeb)]['requireSession'](_0x534f34))['getMemberID']();if(_0xe979ed){const _0x2f6b9c={'memberId':_0x57ca73,'unitId':_0x534f34,'content':_0x484755,'mention':_0x27d767,'threadId':_0xf27dbe},_0x51d682=(await this[_0x250bc3(0x10b)][_0x250bc3(0x10e)](_0x250bc3(0xd0)+_0x534f34+_0x250bc3(0xe4),{'body':_0x2f6b9c}))['body'][_0x250bc3(0x11b)];return{..._0x4fda9e,'id':_0x51d682[_0x250bc3(0x149)],'dT':_0x1d4eaa[_0x250bc3(0xcf)](+_0x51d682['createTimestamp'])[_0x250bc3(0xd9)](_0x250bc3(0xe3)),'personId':_0x51d682['userId']};}else{const _0x222df8={'memberId':_0x57ca73,'unitId':_0x534f34,'content':_0x484755,'mention':_0x27d767},_0xa63e3a=await this[_0x250bc3(0x10b)][_0x250bc3(0x10e)](_0x250bc3(0xd0)+_0x534f34+_0x250bc3(0x13a),{'body':_0x222df8});return _0xafcea7(_0xa63e3a[_0x250bc3(0x121)]['comment'],_0x4fda9e);}}async[_0x12c703(0x151)](_0x46d36d){const _0x549c3c=_0x12c703;var _0x103bd,_0x49c4f6;const {text:_0x5eabd9,unitId:_0xda1b11}=_0x46d36d,_0x3a62e5=(_0x49c4f6=(_0x103bd=_0x5eabd9['customRanges'])==null?void 0x0:_0x103bd[_0x549c3c(0xdd)](_0x3217c2=>_0x3217c2['rangeType']===_0x1d4eaa['CustomRangeType'][_0x549c3c(0xfa)])[_0x549c3c(0x11a)](_0x26634c=>_0x26634c[_0x549c3c(0x105)]))!=null?_0x49c4f6:[],_0x5bb6e4=JSON['stringify'](_0x5eabd9),_0xe6cf1a=_0x46d36d[_0x549c3c(0xea)],_0x4c23d2=_0x46d36d['id'],_0x5c3df6={'memberId':(await this[_0x549c3c(0xeb)][_0x549c3c(0x10f)](_0xda1b11))[_0x549c3c(0x111)](),'unitId':_0xda1b11,'threadId':_0xe6cf1a,'mention':_0x3a62e5,'content':_0x5bb6e4,'replyId':_0x4c23d2},_0x34a687=await this[_0x549c3c(0x10b)][_0x549c3c(0x10e)]('/universer-api/comment/unit/'+_0xda1b11+_0x549c3c(0xe6),{'body':_0x5c3df6});return!_0x34a687[_0x549c3c(0x121)][_0x549c3c(0xd1)]||_0x34a687[_0x549c3c(0x121)][_0x549c3c(0xd1)][_0x549c3c(0xd3)]===0x1;}async[_0x12c703(0x112)](_0x391372){const _0x5d183a=_0x12c703,{unitId:_0xb8afbb}=_0x391372,_0x52b845=_0x391372[_0x5d183a(0xea)],_0x294909={'memberId':this[_0x5d183a(0x124)][_0x5d183a(0x109)]()[_0x5d183a(0xe1)],'unitId':_0xb8afbb,'threadId':_0x52b845,'solved':_0x391372[_0x5d183a(0xc9)]?_0x5194f4[_0x5d183a(0x13c)]:_0x5194f4[_0x5d183a(0x108)]},_0x5276ef=await this['_httpService'][_0x5d183a(0x10e)](_0x5d183a(0xd0)+_0xb8afbb+_0x5d183a(0x144),{'body':_0x294909});return!_0x5276ef[_0x5d183a(0x121)][_0x5d183a(0xd1)]||_0x5276ef[_0x5d183a(0x121)][_0x5d183a(0xd1)][_0x5d183a(0xd3)]===0x1;}async[_0x12c703(0xcd)](_0x1aa571,_0x516ca4,_0x398592,_0x16974f){const _0x429f32=_0x12c703,_0xcf01b9={'memberId':(await this[_0x429f32(0xeb)][_0x429f32(0x10f)](_0x1aa571))[_0x429f32(0x111)](),'threadId':_0x398592,'replyId':_0x16974f,'unitId':_0x1aa571},_0x573335=await this[_0x429f32(0x10b)][_0x429f32(0x10e)](_0x429f32(0xd0)+_0x1aa571+_0x429f32(0x110),{'body':_0xcf01b9});return!_0x573335['body'][_0x429f32(0xd1)]||_0x573335[_0x429f32(0x121)]['error'][_0x429f32(0xd3)]===0x1;}async[_0x12c703(0xfe)](_0x18a05b,_0x28e03,_0x3ddc76){const _0x4acc2c=_0x12c703,_0xee5d3={'unitId':_0x18a05b,'threadId':_0x3ddc76},_0x574ec7=await this[_0x4acc2c(0x10b)][_0x4acc2c(0x10e)](_0x4acc2c(0xd0)+_0x18a05b+_0x4acc2c(0xfd),{'body':_0xee5d3}),_0xb78d91=_0x3ddc76[_0x4acc2c(0x11a)](_0x12f6da=>_0x201257(_0x574ec7[_0x4acc2c(0x121)][_0x4acc2c(0xd6)][_0x12f6da],_0x18a05b,_0x28e03))[_0x4acc2c(0xdd)](Boolean);return Object[_0x4acc2c(0xff)](_0x574ec7[_0x4acc2c(0x121)][_0x4acc2c(0x14d)])['forEach'](_0xcf32a=>{this['_userService']['addUser'](_0xcf32a);}),_0xb78d91;}[_0x12c703(0x11c)](_0x9b936e){const _0x2aeedc=_0x12c703;return{'id':_0x9b936e['id'],'threadId':_0x9b936e[_0x2aeedc(0xea)],'ref':_0x9b936e[_0x2aeedc(0xdb)]};}};_0x3f9a97=_0x3b6b0e([_0x2920aa(0x0,_0x1d4eaa[_0x12c703(0x13f)](_0x394e71['HTTPService'])),_0x2920aa(0x1,_0x1d4eaa[_0x12c703(0x13f)](_0x1d4eaa[_0x12c703(0x128)])),_0x2920aa(0x2,_0x1d4eaa[_0x12c703(0x13f)](_0x4ebbea[_0x12c703(0x139)])),_0x2920aa(0x3,_0x1d4eaa[_0x12c703(0x13f)](_0x1d4eaa[_0x12c703(0x146)]))],_0x3f9a97);var _0x40e942=Object['defineProperty'],_0x4b7bec=Object[_0x12c703(0xf7)],_0xaf621b=(_0x982ed3,_0x4357e7,_0x34b071,_0x255fce)=>{const _0x6e4691=_0x12c703;for(var _0x14ac3a=_0x255fce>0x1?void 0x0:_0x255fce?_0x4b7bec(_0x4357e7,_0x34b071):_0x4357e7,_0x32d526=_0x982ed3[_0x6e4691(0xf9)]-0x1,_0x51237a;_0x32d526>=0x0;_0x32d526--)(_0x51237a=_0x982ed3[_0x32d526])&&(_0x14ac3a=(_0x255fce?_0x51237a(_0x4357e7,_0x34b071,_0x14ac3a):_0x51237a(_0x14ac3a))||_0x14ac3a);return _0x255fce&&_0x14ac3a&&_0x40e942(_0x4357e7,_0x34b071,_0x14ac3a),_0x14ac3a;},_0x93b05b=(_0x3aaecb,_0x2503e2)=>(_0x3ade5e,_0x4590e6)=>_0x2503e2(_0x3ade5e,_0x4590e6,_0x3aaecb);let _0x1dc213=class extends _0x1d4eaa[_0x12c703(0x131)]{constructor(_0x1aab61,_0x59cd2d){const _0x4f73d2=_0x12c703;super(),this[_0x4f73d2(0xf5)]=_0x1aab61,this[_0x4f73d2(0x145)]=_0x59cd2d,this[_0x4f73d2(0x102)]();}[_0x12c703(0x102)](){const _0x38a405=_0x12c703;this[_0x38a405(0xf5)][_0x38a405(0x133)]=this[_0x38a405(0x145)],this[_0x38a405(0xf5)][_0x38a405(0x14c)]=!0x1;}};_0x1dc213=_0xaf621b([_0x93b05b(0x0,_0x5bbffd[_0x12c703(0xf8)]),_0x93b05b(0x1,_0x1d4eaa['Inject'](_0x3f9a97))],_0x1dc213);var _0x40350b=Object[_0x12c703(0xf4)],_0xace297=Object[_0x12c703(0xf7)],_0x44b0d=(_0x1fca8c,_0x5e114d,_0x403b89)=>_0x5e114d in _0x1fca8c?_0x40350b(_0x1fca8c,_0x5e114d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x403b89}):_0x1fca8c[_0x5e114d]=_0x403b89,_0x14899d=(_0x21e112,_0x1a9229,_0x26d9f5,_0x23cf5f)=>{const _0x214622=_0x12c703;for(var _0x52de8a=_0x23cf5f>0x1?void 0x0:_0x23cf5f?_0xace297(_0x1a9229,_0x26d9f5):_0x1a9229,_0x12039b=_0x21e112[_0x214622(0xf9)]-0x1,_0x111bcd;_0x12039b>=0x0;_0x12039b--)(_0x111bcd=_0x21e112[_0x12039b])&&(_0x52de8a=(_0x23cf5f?_0x111bcd(_0x1a9229,_0x26d9f5,_0x52de8a):_0x111bcd(_0x52de8a))||_0x52de8a);return _0x23cf5f&&_0x52de8a&&_0x40350b(_0x1a9229,_0x26d9f5,_0x52de8a),_0x52de8a;},_0x5bc41f=(_0x19fbc8,_0x41dcc8)=>(_0x111d41,_0x2dc83f)=>_0x41dcc8(_0x111d41,_0x2dc83f,_0x19fbc8),_0x4d22f3=(_0x5382db,_0xf74b5a,_0x262f19)=>_0x44b0d(_0x5382db,typeof _0xf74b5a!=_0x12c703(0xdc)?_0xf74b5a+'':_0xf74b5a,_0x262f19);_0xb81cba['UniverThreadCommentDataSourcePlugin']=class extends _0x1d4eaa[_0x12c703(0x104)]{constructor(_0x2f7bf2=_0x1227cf,_0x4e4f49,_0x52b6c3){const _0x368ff7=_0x12c703;super(),this[_0x368ff7(0x137)]=_0x2f7bf2,this[_0x368ff7(0x127)]=_0x4e4f49,this[_0x368ff7(0x129)]=_0x52b6c3;const {..._0x49a0ff}=_0x1d4eaa['merge']({},_0x1227cf,this[_0x368ff7(0x137)]);this[_0x368ff7(0x129)][_0x368ff7(0x13d)](_0x48979b,_0x49a0ff);}[_0x12c703(0x122)](){const _0x4119d7=_0x12c703;[[_0x3f9a97],[_0x1dc213],[_0x372d93]][_0x4119d7(0x120)](_0x3c0703=>{const _0x1ce672=_0x4119d7;this[_0x1ce672(0x127)]['add'](_0x3c0703);});}['onReady'](){const _0xee4700=_0x12c703;this[_0xee4700(0x127)]['get'](_0x1dc213),this[_0xee4700(0x127)]['get'](_0x372d93);}},_0x4d22f3(_0xb81cba[_0x12c703(0x125)],_0x12c703(0x119),_0x116508),_0x4d22f3(_0xb81cba[_0x12c703(0x125)],'type',_0x1d4eaa['UniverInstanceType'][_0x12c703(0x132)]),_0xb81cba['UniverThreadCommentDataSourcePlugin']=_0x14899d([_0x1d4eaa[_0x12c703(0xf3)](_0x27cbe3[_0x12c703(0xd4)],_0x4ebbea[_0x12c703(0x116)],_0x19d3fd[_0x12c703(0x135)]),_0x5bc41f(0x1,_0x1d4eaa['Inject'](_0x1d4eaa['Injector'])),_0x5bc41f(0x2,_0x1d4eaa[_0x12c703(0x138)])],_0xb81cba[_0x12c703(0x125)]),Object['defineProperty'](_0xb81cba,Symbol[_0x12c703(0xda)],{'value':_0x12c703(0x12e)});}));
|
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-
|
|
3
|
+
"version": "0.5.3-experimental.20250106-4af1f4e",
|
|
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-
|
|
49
|
-
"@univerjs
|
|
50
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.5.3-experimental.20250106-4af1f4e",
|
|
49
|
+
"@univerjs/core": "0.5.3-experimental.20250106-4af1f4e",
|
|
50
|
+
"@univerjs-pro/license": "0.5.3-experimental.20250106-4af1f4e",
|
|
51
|
+
"@univerjs/thread-comment": "0.5.3-experimental.20250106-4af1f4e",
|
|
52
|
+
"@univerjs/network": "0.5.3-experimental.20250106-4af1f4e",
|
|
51
53
|
"@univerjs/protocol": "0.1.40-alpha.10",
|
|
52
|
-
"@univerjs/thread-comment-ui": "0.5.3-experimental.20250106-
|
|
53
|
-
"@univerjs/network": "0.5.3-experimental.20250106-e3b7a39",
|
|
54
|
-
"@univerjs/thread-comment": "0.5.3-experimental.20250106-e3b7a39"
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.5.3-experimental.20250106-4af1f4e"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|